@fluentui/react-virtualizer 9.0.0-alpha.80 → 9.0.0-alpha.81

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 (96) hide show
  1. package/CHANGELOG.md +14 -2
  2. package/lib/Hooks.js.map +1 -1
  3. package/lib/Utilities.js.map +1 -1
  4. package/lib/Virtualizer.js.map +1 -1
  5. package/lib/VirtualizerScrollView.js.map +1 -1
  6. package/lib/VirtualizerScrollViewDynamic.js.map +1 -1
  7. package/lib/components/Virtualizer/Virtualizer.js.map +1 -1
  8. package/lib/components/Virtualizer/Virtualizer.types.js.map +1 -1
  9. package/lib/components/Virtualizer/index.js.map +1 -1
  10. package/lib/components/Virtualizer/renderVirtualizer.js.map +1 -1
  11. package/lib/components/Virtualizer/useVirtualizer.js.map +1 -1
  12. package/lib/components/VirtualizerScrollView/VirtualizerScrollView.js.map +1 -1
  13. package/lib/components/VirtualizerScrollView/VirtualizerScrollView.types.js.map +1 -1
  14. package/lib/components/VirtualizerScrollView/index.js.map +1 -1
  15. package/lib/components/VirtualizerScrollView/renderVirtualizerScrollView.js.map +1 -1
  16. package/lib/components/VirtualizerScrollView/useVirtualizerScrollView.js.map +1 -1
  17. package/lib/components/VirtualizerScrollViewDynamic/VirtualizerScrollViewDynamic.js.map +1 -1
  18. package/lib/components/VirtualizerScrollViewDynamic/VirtualizerScrollViewDynamic.types.js.map +1 -1
  19. package/lib/components/VirtualizerScrollViewDynamic/index.js.map +1 -1
  20. package/lib/components/VirtualizerScrollViewDynamic/renderVirtualizerScrollViewDynamic.js.map +1 -1
  21. package/lib/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamic.js.map +1 -1
  22. package/lib/hooks/hooks.types.js +4 -1
  23. package/lib/hooks/hooks.types.js.map +1 -1
  24. package/lib/hooks/index.js.map +1 -1
  25. package/lib/hooks/useDynamicPagination.js.map +1 -1
  26. package/lib/hooks/useDynamicVirtualizerMeasure.js.map +1 -1
  27. package/lib/hooks/useIntersectionObserver.js.map +1 -1
  28. package/lib/hooks/useMeasureList.js.map +1 -1
  29. package/lib/hooks/useMutationObserver.js.map +1 -1
  30. package/lib/hooks/useResizeObserverRef.js.map +1 -1
  31. package/lib/hooks/useStaticPagination.js.map +1 -1
  32. package/lib/hooks/useVirtualizerMeasure.js.map +1 -1
  33. package/lib/index.js.map +1 -1
  34. package/lib/utilities/ImperativeScrolling/imperativeScrolling.js.map +1 -1
  35. package/lib/utilities/ImperativeScrolling/imperativeScrolling.types.js.map +1 -1
  36. package/lib/utilities/ImperativeScrolling/imperativeScrollingDynamic.js.map +1 -1
  37. package/lib/utilities/ImperativeScrolling/index.js.map +1 -1
  38. package/lib/utilities/VirtualizerContext/VirtualizerContext.js.map +1 -1
  39. package/lib/utilities/VirtualizerContext/index.js.map +1 -1
  40. package/lib/utilities/VirtualizerContext/types.js.map +1 -1
  41. package/lib/utilities/createResizeObserverFromDocument.js.map +1 -1
  42. package/lib/utilities/debounce.js.map +1 -1
  43. package/lib/utilities/index.js.map +1 -1
  44. package/lib-commonjs/Hooks.js.map +1 -1
  45. package/lib-commonjs/Utilities.js.map +1 -1
  46. package/lib-commonjs/Virtualizer.js.map +1 -1
  47. package/lib-commonjs/VirtualizerScrollView.js.map +1 -1
  48. package/lib-commonjs/VirtualizerScrollViewDynamic.js.map +1 -1
  49. package/lib-commonjs/components/Virtualizer/Virtualizer.js.map +1 -1
  50. package/lib-commonjs/components/Virtualizer/Virtualizer.types.js.map +1 -1
  51. package/lib-commonjs/components/Virtualizer/index.js.map +1 -1
  52. package/lib-commonjs/components/Virtualizer/renderVirtualizer.js +3 -3
  53. package/lib-commonjs/components/Virtualizer/renderVirtualizer.js.map +1 -1
  54. package/lib-commonjs/components/Virtualizer/useVirtualizer.js.map +1 -1
  55. package/lib-commonjs/components/Virtualizer/useVirtualizerStyles.styles.js +3 -3
  56. package/lib-commonjs/components/Virtualizer/useVirtualizerStyles.styles.js.map +1 -1
  57. package/lib-commonjs/components/VirtualizerScrollView/VirtualizerScrollView.js.map +1 -1
  58. package/lib-commonjs/components/VirtualizerScrollView/VirtualizerScrollView.types.js.map +1 -1
  59. package/lib-commonjs/components/VirtualizerScrollView/index.js.map +1 -1
  60. package/lib-commonjs/components/VirtualizerScrollView/renderVirtualizerScrollView.js.map +1 -1
  61. package/lib-commonjs/components/VirtualizerScrollView/useVirtualizerScrollView.js.map +1 -1
  62. package/lib-commonjs/components/VirtualizerScrollView/useVirtualizerScrollViewStyles.styles.js +3 -3
  63. package/lib-commonjs/components/VirtualizerScrollView/useVirtualizerScrollViewStyles.styles.js.map +1 -1
  64. package/lib-commonjs/components/VirtualizerScrollViewDynamic/VirtualizerScrollViewDynamic.js.map +1 -1
  65. package/lib-commonjs/components/VirtualizerScrollViewDynamic/VirtualizerScrollViewDynamic.types.js.map +1 -1
  66. package/lib-commonjs/components/VirtualizerScrollViewDynamic/index.js.map +1 -1
  67. package/lib-commonjs/components/VirtualizerScrollViewDynamic/renderVirtualizerScrollViewDynamic.js.map +1 -1
  68. package/lib-commonjs/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamic.js.map +1 -1
  69. package/lib-commonjs/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamicStyles.styles.js +3 -3
  70. package/lib-commonjs/components/VirtualizerScrollViewDynamic/useVirtualizerScrollViewDynamicStyles.styles.js.map +1 -1
  71. package/lib-commonjs/hooks/hooks.types.js +4 -1
  72. package/lib-commonjs/hooks/hooks.types.js.map +1 -1
  73. package/lib-commonjs/hooks/index.js.map +1 -1
  74. package/lib-commonjs/hooks/useDynamicPagination.js.map +1 -1
  75. package/lib-commonjs/hooks/useDynamicVirtualizerMeasure.js.map +1 -1
  76. package/lib-commonjs/hooks/useIntersectionObserver.js.map +1 -1
  77. package/lib-commonjs/hooks/useMeasureList.js +3 -3
  78. package/lib-commonjs/hooks/useMeasureList.js.map +1 -1
  79. package/lib-commonjs/hooks/useMutationObserver.js.map +1 -1
  80. package/lib-commonjs/hooks/useResizeObserverRef.js.map +1 -1
  81. package/lib-commonjs/hooks/useStaticPagination.js.map +1 -1
  82. package/lib-commonjs/hooks/useVirtualizerMeasure.js.map +1 -1
  83. package/lib-commonjs/index.js +37 -37
  84. package/lib-commonjs/index.js.map +1 -1
  85. package/lib-commonjs/utilities/ImperativeScrolling/imperativeScrolling.js.map +1 -1
  86. package/lib-commonjs/utilities/ImperativeScrolling/imperativeScrolling.types.js.map +1 -1
  87. package/lib-commonjs/utilities/ImperativeScrolling/imperativeScrollingDynamic.js.map +1 -1
  88. package/lib-commonjs/utilities/ImperativeScrolling/index.js.map +1 -1
  89. package/lib-commonjs/utilities/VirtualizerContext/VirtualizerContext.js +3 -3
  90. package/lib-commonjs/utilities/VirtualizerContext/VirtualizerContext.js.map +1 -1
  91. package/lib-commonjs/utilities/VirtualizerContext/index.js.map +1 -1
  92. package/lib-commonjs/utilities/VirtualizerContext/types.js.map +1 -1
  93. package/lib-commonjs/utilities/createResizeObserverFromDocument.js.map +1 -1
  94. package/lib-commonjs/utilities/debounce.js.map +1 -1
  95. package/lib-commonjs/utilities/index.js.map +1 -1
  96. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"sources":["useMeasureList.js"],"sourcesContent":["import * as React from 'react';\nimport { useRef } from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n/**\n * Provides a way of automating size in the virtualizer\n * Returns\n * `width` - element width ref (0 by default),\n * `height` - element height ref (0 by default),\n * `measureElementRef` - a ref function to be passed as `ref` to the element you want to measure\n */ export function useMeasureList(currentIndex, refLength, totalLength, defaultItemSize) {\n const widthArray = React.useRef(new Array(totalLength).fill(defaultItemSize));\n const heightArray = React.useRef(new Array(totalLength).fill(defaultItemSize));\n const refArray = React.useRef([]);\n const { targetDocument } = useFluent();\n // This lets us trigger updates when a size change occurs.\n const sizeUpdateCount = useRef(0);\n // the handler for resize observer\n const handleIndexUpdate = React.useCallback((index)=>{\n var _refArray_current_index;\n let isChanged = false;\n const boundClientRect = (_refArray_current_index = refArray.current[index]) === null || _refArray_current_index === void 0 ? void 0 : _refArray_current_index.getBoundingClientRect();\n const containerWidth = boundClientRect === null || boundClientRect === void 0 ? void 0 : boundClientRect.width;\n if (containerWidth !== widthArray.current[currentIndex + index]) {\n isChanged = true;\n }\n widthArray.current[currentIndex + index] = containerWidth || defaultItemSize;\n const containerHeight = boundClientRect === null || boundClientRect === void 0 ? void 0 : boundClientRect.height;\n if (containerHeight !== heightArray.current[currentIndex + index]) {\n isChanged = true;\n }\n heightArray.current[currentIndex + index] = containerHeight || defaultItemSize;\n if (isChanged) {\n sizeUpdateCount.current = sizeUpdateCount.current + 1;\n }\n }, [\n currentIndex,\n defaultItemSize,\n sizeUpdateCount\n ]);\n const handleElementResizeCallback = (entries)=>{\n for (const entry of entries){\n const target = entry.target;\n // Call the elements own resize handler (indexed)\n target.handleResize();\n }\n };\n React.useEffect(()=>{\n widthArray.current = new Array(totalLength).fill(defaultItemSize);\n heightArray.current = new Array(totalLength).fill(defaultItemSize);\n }, [\n defaultItemSize,\n totalLength\n ]);\n // Keep the reference of ResizeObserver as a ref, as it should live through renders\n const resizeObserver = React.useRef(createResizeObserverFromDocument(targetDocument, handleElementResizeCallback));\n /* createIndexedRef provides a dynamic function to create an undefined number of refs at render time\n * these refs then provide an indexed callback via attaching 'handleResize' to the element itself\n * this function is then called on resize by handleElementResize and relies on indexing\n * to track continuous sizes throughout renders while releasing all virtualized element refs each render cycle.\n */ const createIndexedRef = React.useCallback((index)=>{\n const measureElementRef = (el)=>{\n if (!targetDocument || !resizeObserver.current) {\n return;\n }\n if (el) {\n el.handleResize = ()=>{\n handleIndexUpdate(index);\n };\n }\n // cleanup previous container\n if (refArray.current[index] !== undefined && refArray.current[index] !== null) {\n resizeObserver.current.unobserve(refArray.current[index]);\n }\n refArray.current[index] = undefined;\n if (el) {\n refArray.current[index] = el;\n resizeObserver.current.observe(el);\n handleIndexUpdate(index);\n }\n };\n return measureElementRef;\n }, [\n handleIndexUpdate,\n resizeObserver,\n targetDocument\n ]);\n React.useEffect(()=>{\n const _resizeObserver = resizeObserver;\n return ()=>{\n var _resizeObserver_current;\n return (_resizeObserver_current = _resizeObserver.current) === null || _resizeObserver_current === void 0 ? void 0 : _resizeObserver_current.disconnect();\n };\n }, [\n resizeObserver\n ]);\n return {\n widthArray,\n heightArray,\n createIndexedRef,\n refArray,\n sizeUpdateCount: sizeUpdateCount.current\n };\n}\n/**\n * FIXME - TS 3.8/3.9 don't have ResizeObserver types by default, move this to a shared utility once we bump the minbar\n * A utility method that creates a ResizeObserver from a target document\n * @param targetDocument - document to use to create the ResizeObserver\n * @param callback - https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback\n * @returns a ResizeObserver instance or null if the global does not exist on the document\n */ export function createResizeObserverFromDocument(targetDocument, callback) {\n var _targetDocument_defaultView;\n if (!(targetDocument === null || targetDocument === void 0 ? void 0 : (_targetDocument_defaultView = targetDocument.defaultView) === null || _targetDocument_defaultView === void 0 ? void 0 : _targetDocument_defaultView.ResizeObserver)) {\n return null;\n }\n return new targetDocument.defaultView.ResizeObserver(callback);\n}\n"],"names":["useMeasureList","createResizeObserverFromDocument","currentIndex","refLength","totalLength","defaultItemSize","widthArray","React","useRef","Array","fill","heightArray","refArray","targetDocument","useFluent","sizeUpdateCount","handleIndexUpdate","useCallback","index","_refArray_current_index","isChanged","boundClientRect","current","getBoundingClientRect","containerWidth","width","containerHeight","height","handleElementResizeCallback","entries","entry","target","handleResize","useEffect","resizeObserver","createIndexedRef","measureElementRef","el","undefined","unobserve","observe","_resizeObserver","_resizeObserver_current","disconnect","callback","_targetDocument_defaultView","defaultView","ResizeObserver"],"mappings":";;;;;;;;;;;IASoBA,cAAc;eAAdA;;IAoGAC,gCAAgC;eAAhCA;;;;iEA7GG;qCAEyB;AAOrC,SAASD,eAAeE,YAAY,EAAEC,SAAS,EAAEC,WAAW,EAAEC,eAAe;IACpF,MAAMC,aAAaC,OAA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CAAiCY,cAAc,EAAE+B,QAAQ;IACzE,IAAIC;IACJ,IAAI,CAAEhC,CAAAA,mBAAmB,QAAQA,mBAAmB,KAAK,IAAI,KAAK,IAAI,AAACgC,CAAAA,8BAA8BhC,eAAeiC,WAAW,AAAD,MAAO,QAAQD,gCAAgC,KAAK,IAAI,KAAK,IAAIA,4BAA4BE,cAAc,AAAD,GAAI;QACxO,OAAO;IACX;IACA,OAAO,IAAIlC,eAAeiC,WAAW,CAACC,cAAc,CAACH;AACzD"}
1
+ {"version":3,"sources":["useMeasureList.ts"],"sourcesContent":["import * as React from 'react';\nimport { useRef } from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\nexport interface IndexedResizeCallbackElement {\n handleResize: () => void;\n}\n/**\n * Provides a way of automating size in the virtualizer\n * Returns\n * `width` - element width ref (0 by default),\n * `height` - element height ref (0 by default),\n * `measureElementRef` - a ref function to be passed as `ref` to the element you want to measure\n */\nexport function useMeasureList<\n TElement extends HTMLElement & IndexedResizeCallbackElement = HTMLElement & IndexedResizeCallbackElement,\n>(currentIndex: number, refLength: number, totalLength: number, defaultItemSize: number) {\n const widthArray = React.useRef(new Array(totalLength).fill(defaultItemSize));\n const heightArray = React.useRef(new Array(totalLength).fill(defaultItemSize));\n\n const refArray = React.useRef<Array<TElement | undefined | null>>([]);\n const { targetDocument } = useFluent();\n\n // This lets us trigger updates when a size change occurs.\n const sizeUpdateCount = useRef(0);\n\n // the handler for resize observer\n const handleIndexUpdate = React.useCallback(\n (index: number) => {\n let isChanged = false;\n const boundClientRect = refArray.current[index]?.getBoundingClientRect();\n const containerWidth = boundClientRect?.width;\n if (containerWidth !== widthArray.current[currentIndex + index]) {\n isChanged = true;\n }\n widthArray.current[currentIndex + index] = containerWidth || defaultItemSize;\n\n const containerHeight = boundClientRect?.height;\n\n if (containerHeight !== heightArray.current[currentIndex + index]) {\n isChanged = true;\n }\n heightArray.current[currentIndex + index] = containerHeight || defaultItemSize;\n\n if (isChanged) {\n sizeUpdateCount.current = sizeUpdateCount.current + 1;\n }\n },\n [currentIndex, defaultItemSize, sizeUpdateCount],\n );\n\n const handleElementResizeCallback = (entries: ResizeObserverEntry[]) => {\n for (const entry of entries) {\n const target = entry.target as TElement;\n // Call the elements own resize handler (indexed)\n target.handleResize();\n }\n };\n\n React.useEffect(() => {\n widthArray.current = new Array(totalLength).fill(defaultItemSize);\n heightArray.current = new Array(totalLength).fill(defaultItemSize);\n }, [defaultItemSize, totalLength]);\n\n // Keep the reference of ResizeObserver as a ref, as it should live through renders\n const resizeObserver = React.useRef(createResizeObserverFromDocument(targetDocument, handleElementResizeCallback));\n\n /* createIndexedRef provides a dynamic function to create an undefined number of refs at render time\n * these refs then provide an indexed callback via attaching 'handleResize' to the element itself\n * this function is then called on resize by handleElementResize and relies on indexing\n * to track continuous sizes throughout renders while releasing all virtualized element refs each render cycle.\n */\n const createIndexedRef = React.useCallback(\n (index: number) => {\n const measureElementRef = (el: TElement) => {\n if (!targetDocument || !resizeObserver.current) {\n return;\n }\n\n if (el) {\n el.handleResize = () => {\n handleIndexUpdate(index);\n };\n }\n\n // cleanup previous container\n if (refArray.current[index] !== undefined && refArray.current[index] !== null) {\n resizeObserver.current.unobserve(refArray.current[index]!);\n }\n\n refArray.current[index] = undefined;\n if (el) {\n refArray.current[index] = el;\n resizeObserver.current.observe(el);\n handleIndexUpdate(index);\n }\n };\n\n return measureElementRef;\n },\n [handleIndexUpdate, resizeObserver, targetDocument],\n );\n\n React.useEffect(() => {\n const _resizeObserver = resizeObserver;\n return () => _resizeObserver.current?.disconnect();\n }, [resizeObserver]);\n\n return { widthArray, heightArray, createIndexedRef, refArray, sizeUpdateCount: sizeUpdateCount.current };\n}\n\n/**\n * FIXME - TS 3.8/3.9 don't have ResizeObserver types by default, move this to a shared utility once we bump the minbar\n * A utility method that creates a ResizeObserver from a target document\n * @param targetDocument - document to use to create the ResizeObserver\n * @param callback - https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback\n * @returns a ResizeObserver instance or null if the global does not exist on the document\n */\nexport function createResizeObserverFromDocument(\n targetDocument: Document | null | undefined,\n callback: ResizeObserverCallback,\n) {\n if (!targetDocument?.defaultView?.ResizeObserver) {\n return null;\n }\n\n return new targetDocument.defaultView.ResizeObserver(callback);\n}\n"],"names":["createResizeObserverFromDocument","useMeasureList","currentIndex","refLength","totalLength","defaultItemSize","widthArray","React","useRef","Array","fill","heightArray","refArray","targetDocument","useFluent","sizeUpdateCount","handleIndexUpdate","useCallback","index","isChanged","boundClientRect","current","getBoundingClientRect","containerWidth","width","containerHeight","height","handleElementResizeCallback","entries","entry","target","handleResize","useEffect","resizeObserver","createIndexedRef","measureElementRef","el","undefined","unobserve","observe","_resizeObserver","disconnect","callback","defaultView","ResizeObserver"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAsHgBA,gCAAAA;eAAAA;;IAxGAC,cAAAA;eAAAA;;;;iEAdO;qCAEyB;AAYzC,SAASA,eAEdC,YAAoB,EAAEC,SAAiB,EAAEC,WAAmB,EAAEC,eAAuB;IACrF,MAAMC,aAAaC,OAAMC,MAAM,CAAC,IAAIC,MAAML,aAAaM,IAAI,CAACL;IAC5D,MAAMM,cAAcJ,OAAMC,MAAM,CAAC,IAAIC,MAAML,aAAaM,IAAI,CAACL;IAE7D,MAAMO,WAAWL,OAAMC,MAAM,CAAqC,EAAE;IACpE,MAAM,EAAEK,cAAc,EAAE,GAAGC,IAAAA,uCAAAA;IAE3B,0DAA0D;IAC1D,MAAMC,kBAAkBP,IAAAA,aAAAA,EAAO;IAE/B,kCAAkC;IAClC,MAAMQ,oBAAoBT,OAAMU,WAAW,CACzC,CAACC;YAEyBN;QADxB,IAAIO,YAAY;QAChB,MAAMC,kBAAAA,AA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AAeZ,OAAO,EAAE;gBAC9C;YACF;YAEA,IAAIe,IAAI;gBACNA,GAAGL,YAAY,GAAG;oBAChBf,kBAAkBE;gBACpB;YACF;YAEA,6BAA6B;YAC7B,IAAIN,SAASS,OAAO,CAACH,MAAM,KAAKmB,aAAazB,SAASS,OAAO,CAACH,MAAM,KAAK,MAAM;gBAC7Ee,eAAeZ,OAAO,CAACiB,SAAS,CAAC1B,SAASS,OAAO,CAACH,MAAM;YAC1D;YAEAN,SAASS,OAAO,CAACH,MAAM,GAAGmB;YAC1B,IAAID,IAAI;gBACNxB,SAASS,OAAO,CAACH,MAAM,GAAGkB;gBAC1BH,eAAeZ,OAAO,CAACkB,OAAO,CAACH;gBAC/BpB,kBAAkBE;YACpB;QACF;QAEA,OAAOiB;IACT,GACA;QAACnB;QAAmBiB;QAAgBpB;KAAe;IAGrDN,OAAMyB,SAAS,CAAC;QACd,MAAMQ,kBAAkBP;QACxB,OAAO;gBAAMO;mBAAAA,CAAAA,0BAAAA,gBAAgBnB,OAAO,AAAPA,MAAO,QAAvBmB,4BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,wBAAyBC,UAAU;;IAClD,GAAG;QAACR;KAAe;IAEnB,OAAO;QAAE3B;QAAYK;QAAauB;QAAkBtB;QAAUG,iBAAiBA,gBAAgBM,OAAO;IAAC;AACzG;AASO,SAASrB,iCACda,cAA2C,EAC3C6B,QAAgC;QAE3B7B;IAAL,IAAI,CAACA,CAAAA,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,CAAAA,8BAAAA,eAAgB8B,WAAW,AAAXA,MAAW,QAA3B9B,gCAAAA,KAAAA,IAAAA,KAAAA,IAAAA,4BAA6B+B,cAAc,AAAdA,GAAgB;QAChD,OAAO;IACT;IAEA,OAAO,IAAI/B,eAAe8B,WAAW,CAACC,cAAc,CAACF;AACvD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useMutationObserver.js"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nconst { useRef, useEffect } = React;\nexport const useMutationObserver = (target, callback, options)=>{\n 'use no memo';\n // TODO: exclude types from this lint rule: https://github.com/microsoft/fluentui/issues/31286\n // eslint-disable-next-line no-restricted-globals\n const observer = useRef();\n const { targetDocument } = useFluent();\n const win = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView;\n useEffect(()=>{\n if (!win) {\n return;\n }\n // Create an observer instance linked to the callback function\n observer.current = new win.MutationObserver(callback);\n }, [\n callback,\n win\n ]);\n useEffect(()=>{\n if (target) {\n var // Start observing the target node for configured mutations\n _observer_current;\n (_observer_current = observer.current) === null || _observer_current === void 0 ? void 0 : _observer_current.observe(target, options);\n }\n return ()=>{\n var _observer_current;\n (_observer_current = observer.current) === null || _observer_current === void 0 ? void 0 : _observer_current.disconnect();\n };\n }, [\n target,\n options\n ]);\n return {\n observer\n };\n};\n"],"names":["useMutationObserver","useRef","useEffect","React","target","callback","options","observer","targetDocument","useFluent","win","defaultView","current","MutationObserver","_observer_current","observe","disconnect"],"mappings":";;;;+BAGaA;;;eAAAA;;;;iEAHU;qCACyB;AAChD,MAAM,EAAEC,MAAM,EAAEC,SAAS,EAAE,GAAGC;AACvB,MAAMH,sBAAsB,CAACI,QAAQC,UAAUC;IAClD;IACA,8FAA8F;IAC9F,iDAAiD;IACjD,MAAMC,WAAWN;IACjB,MAAM,EAAEO,cAAc,EAAE,GAAGC,IAAAA,uCAAS;IACpC,MAAMC,MAAMF,mBAAmB,QAAQA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeG,WAAW;IACtGT,UAAU;QACN,IAAI,CAACQ,KAAK;YACN;QACJ;QACA,8DAA8D;QAC9DH,SAASK,OAAO,GAAG,IAAIF,IAAIG,gBAAgB,CAACR;IAChD,GAAG;QACCA;QACAK;KACH;IACDR,UAAU;QACN,IAAIE,QAAQ;YACR,IACAU;YACCA,CAAAA,oBAAoBP,SAASK,OAAO,AAAD,MAAO,QAAQE,sBAAsB,KAAK,IAAI,KAAK,IAAIA,kBAAkBC,OAAO,CAACX,QAAQE;QACjI;QACA,OAAO;YACH,IAAIQ;YACHA,CAAAA,oBAAoBP,SAASK,OAAO,AAAD,MAAO,QAAQE,sBAAsB,KAAK,IAAI,KAAK,IAAIA,kBAAkBE,UAAU;QAC3H;IACJ,GAAG;QACCZ;QACAE;KACH;IACD,OAAO;QACHC;IACJ;AACJ"}
1
+ {"version":3,"sources":["useMutationObserver.ts"],"sourcesContent":["import type { MutableRefObject } from 'react';\nimport * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\nconst { useRef, useEffect } = React;\n\nexport const useMutationObserver = (\n target: Element | Document | undefined,\n callback: MutationCallback,\n options?: MutationObserverInit,\n): {\n observer: MutableRefObject<MutationObserver | undefined>; // eslint-disable-line no-restricted-globals\n} => {\n 'use no memo';\n\n // TODO: exclude types from this lint rule: https://github.com/microsoft/fluentui/issues/31286\n // eslint-disable-next-line no-restricted-globals\n const observer = useRef<MutationObserver>();\n const { targetDocument } = useFluent();\n const win = targetDocument?.defaultView;\n\n useEffect(() => {\n if (!win) {\n return;\n }\n // Create an observer instance linked to the callback function\n observer.current = new win.MutationObserver(callback);\n }, [callback, win]);\n\n useEffect(() => {\n if (target) {\n // Start observing the target node for configured mutations\n observer.current?.observe(target, options);\n }\n\n return () => {\n observer.current?.disconnect();\n };\n }, [target, options]);\n\n return { observer };\n};\n"],"names":["useMutationObserver","useRef","useEffect","React","target","callback","options","observer","targetDocument","useFluent","win","defaultView","current","MutationObserver","observe","disconnect"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;;iEALU;qCACyB;AAEhD,MAAM,EAAEC,MAAM,EAAEC,SAAS,EAAE,GAAGC;AAEvB,MAAMH,sBAAsB,CACjCI,QACAC,UACAC;IAIA;IAEA,8FAA8F;IAC9F,iDAAiD;IACjD,MAAMC,WAAWN;IACjB,MAAM,EAAEO,cAAc,EAAE,GAAGC,IAAAA,uCAAAA;IAC3B,MAAMC,MAAMF,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBG,WAAW;IAEvCT,UAAU;QACR,IAAI,CAACQ,KAAK;YACR;QACF;QACA,8DAA8D;QAC9DH,SAASK,OAAO,GAAG,IAAIF,IAAIG,gBAAgB,CAACR;IAC9C,GAAG;QAACA;QAAUK;KAAI;IAElBR,UAAU;QACR,IAAIE,QAAQ;gBAEVG;YAAAA,CAAAA,oBAAAA,SAASK,OAAO,AAAPA,MAAO,QAAhBL,sBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,kBAAkBO,OAAO,CAACV,QAAQE;QACpC;QAEA,OAAO;gBACLC;YAAAA,CAAAA,oBAAAA,SAASK,OAAO,AAAPA,MAAO,QAAhBL,sBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,kBAAkBQ,UAAU;QAC9B;IACF,GAAG;QAACX;QAAQE;KAAQ;IAEpB,OAAO;QAAEC;IAAS;AACpB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useResizeObserverRef.js"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { debounce } from '../utilities/debounce';\nimport { createResizeObserverFromDocument } from '../utilities/createResizeObserverFromDocument';\n/**\n * useResizeObserverRef_unstable simplifies resize observer connection and ensures debounce/cleanup\n */ export const useResizeObserverRef_unstable = (resizeCallback)=>{\n 'use no memo';\n const { targetDocument } = useFluent();\n const container = React.useRef(null);\n // the handler for resize observer\n // TODO: exclude types from this lint rule: https://github.com/microsoft/fluentui/issues/31286\n // eslint-disable-next-line no-restricted-globals\n const handleResize = debounce((entries, observer)=>{\n resizeCallback(entries, observer, container);\n });\n // Keep the reference of ResizeObserver in the state, as it should live through renders\n const [resizeObserver, setResizeObserver] = React.useState(()=>createResizeObserverFromDocument(targetDocument, handleResize));\n React.useEffect(()=>{\n // Update our state when resizeCallback changes\n container.current = null;\n resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();\n setResizeObserver(()=>createResizeObserverFromDocument(targetDocument, handleResize));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n resizeCallback,\n targetDocument\n ]);\n React.useEffect(()=>{\n return ()=>{\n container.current = null;\n resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n const scrollRef = React.useCallback((instance)=>{\n if (container.current !== instance) {\n if (container.current) {\n resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.unobserve(container.current);\n }\n container.current = instance;\n if (container.current) {\n resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.observe(container.current);\n }\n }\n }, [\n resizeObserver\n ]);\n return scrollRef;\n};\n"],"names":["useResizeObserverRef_unstable","resizeCallback","targetDocument","useFluent","container","React","useRef","handleResize","debounce","entries","observer","resizeObserver","setResizeObserver","useState","createResizeObserverFromDocument","useEffect","current","disconnect","scrollRef","useCallback","instance","unobserve","observe"],"mappings":";;;;+BAMiBA;;;eAAAA;;;;iEANM;qCACyB;0BACvB;kDACwB;AAGtC,MAAMA,gCAAgC,CAACC;IAC9C;IACA,MAAM,EAAEC,cAAc,EAAE,GAAGC,IAAAA,uCAAS;IACpC,MAAMC,YAAYC,OAAMC,MAAM,CAAC;IAC/B,kCAAkC;IAClC,8FAA8F;IAC9F,iDAAiD;IACjD,MAAMC,eAAeC,IAAAA,kBAAQ,EAAC,CAACC,SAASC;QACpCT,eAAeQ,SAASC,UAAUN;IACtC;IACA,uFAAuF;IACvF,MAAM,CAACO,gBAAgBC,kBAAkB,GAAGP,OAAMQ,QAAQ,CAAC,IAAIC,IAAAA,kEAAgC,EAACZ,gBAAgBK;IAChHF,OAAMU,SAAS,CAAC;QACZ,+CAA+C;QAC/CX,UAAUY,OAAO,GAAG;QACpBL,mBAAmB,QAAQA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeM,UAAU;QACzFL,kBAAkB,IAAIE,IAAAA,kEAAgC,EAACZ,gBAAgBK;IAC3E,uDAAuD;IACvD,GAAG;QACCN;QACAC;KACH;IACDG,OAAMU,SAAS,CAAC;QACZ,OAAO;YACHX,UAAUY,OAAO,GAAG;YACpBL,mBAAmB,QAAQA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeM,UAAU;QAC7F;IACJ,uDAAuD;IACvD,GAAG,EAAE;IACL,MAAMC,YAAYb,OAAMc,WAAW,CAAC,CAACC;QACjC,IAAIhB,UAAUY,OAAO,KAAKI,UAAU;YAChC,IAAIhB,UAAUY,OAAO,EAAE;gBACnBL,mBAAmB,QAAQA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeU,SAAS,CAACjB,UAAUY,OAAO;YAC9G;YACAZ,UAAUY,OAAO,GAAGI;YACpB,IAAIhB,UAAUY,OAAO,EAAE;gBACnBL,mBAAmB,QAAQA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeW,OAAO,CAAClB,UAAUY,OAAO;YAC5G;QACJ;IACJ,GAAG;QACCL;KACH;IACD,OAAOO;AACX"}
1
+ {"version":3,"sources":["useResizeObserverRef.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { debounce } from '../utilities/debounce';\nimport { createResizeObserverFromDocument } from '../utilities/createResizeObserverFromDocument';\nimport { ResizeCallbackWithRef } from './hooks.types';\n\n/**\n * useResizeObserverRef_unstable simplifies resize observer connection and ensures debounce/cleanup\n */\nexport const useResizeObserverRef_unstable = (resizeCallback: ResizeCallbackWithRef) => {\n 'use no memo';\n\n const { targetDocument } = useFluent();\n const container = React.useRef<HTMLElement | null>(null);\n // the handler for resize observer\n // TODO: exclude types from this lint rule: https://github.com/microsoft/fluentui/issues/31286\n // eslint-disable-next-line no-restricted-globals\n const handleResize = debounce((entries: ResizeObserverEntry[], observer: ResizeObserver) => {\n resizeCallback(entries, observer, container);\n });\n\n // Keep the reference of ResizeObserver in the state, as it should live through renders\n const [resizeObserver, setResizeObserver] = React.useState(() =>\n createResizeObserverFromDocument(targetDocument, handleResize),\n );\n\n React.useEffect(() => {\n // Update our state when resizeCallback changes\n container.current = null;\n resizeObserver?.disconnect();\n setResizeObserver(() => createResizeObserverFromDocument(targetDocument, handleResize));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [resizeCallback, targetDocument]);\n\n React.useEffect(() => {\n return () => {\n container.current = null;\n resizeObserver?.disconnect();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const scrollRef = React.useCallback(\n (instance: HTMLElement | HTMLDivElement | null) => {\n if (container.current !== instance) {\n if (container.current) {\n resizeObserver?.unobserve(container.current);\n }\n\n container.current = instance;\n if (container.current) {\n resizeObserver?.observe(container.current);\n }\n }\n },\n [resizeObserver],\n );\n\n return scrollRef;\n};\n"],"names":["useResizeObserverRef_unstable","resizeCallback","targetDocument","useFluent","container","React","useRef","handleResize","debounce","entries","observer","resizeObserver","setResizeObserver","useState","createResizeObserverFromDocument","useEffect","current","disconnect","scrollRef","useCallback","instance","unobserve","observe"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;;iEATU;qCACyB;0BACvB;kDACwB;AAM1C,MAAMA,gCAAgC,CAACC;IAC5C;IAEA,MAAM,EAAEC,cAAc,EAAE,GAAGC,IAAAA,uCAAAA;IAC3B,MAAMC,YAAYC,OAAMC,MAAM,CAAqB;IACnD,kCAAkC;IAClC,8FAA8F;IAC9F,iDAAiD;IACjD,MAAMC,eAAeC,IAAAA,kBAAAA,EAAS,CAACC,SAAgCC;QAC7DT,eAAeQ,SAASC,UAAUN;IACpC;IAEA,uFAAuF;IACvF,MAAM,CAACO,gBAAgBC,kBAAkB,GAAGP,OAAMQ,QAAQ,CAAC,IACzDC,IAAAA,kEAAAA,EAAiCZ,gBAAgBK;IAGnDF,OAAMU,SAAS,CAAC;QACd,+CAA+C;QAC/CX,UAAUY,OAAO,GAAG;QACpBL,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBM,UAAU;QAC1BL,kBAAkB,IAAME,IAAAA,kEAAAA,EAAiCZ,gBAAgBK;IACzE,uDAAuD;IACzD,GAAG;QAACN;QAAgBC;KAAe;IAEnCG,OAAMU,SAAS,CAAC;QACd,OAAO;YACLX,UAAUY,OAAO,GAAG;YACpBL,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBM,UAAU;QAC5B;IACA,uDAAuD;IACzD,GAAG,EAAE;IAEL,MAAMC,YAAYb,OAAMc,WAAW,CACjC,CAACC;QACC,IAAIhB,UAAUY,OAAO,KAAKI,UAAU;YAClC,IAAIhB,UAAUY,OAAO,EAAE;gBACrBL,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBU,SAAS,CAACjB,UAAUY,OAAO;YAC7C;YAEAZ,UAAUY,OAAO,GAAGI;YACpB,IAAIhB,UAAUY,OAAO,EAAE;gBACrBL,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBW,OAAO,CAAClB,UAAUY,OAAO;YAC3C;QACF;IACF,GACA;QAACL;KAAe;IAGlB,OAAOO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useStaticPagination.js"],"sourcesContent":["import * as React from 'react';\nimport { useRef } from 'react';\nimport { useTimeout } from '@fluentui/react-utilities';\n/**\n * Optional hook that will enable pagination on the virtualizer so that it 'autoscrolls' to an items exact position\n * Sizes are uniform/static, we round to the nearest item on long scrolls\n * On short scrolls, we will go at minimum to the next/previous item so that arrow pagination works\n * All VirtualizerStaticPaginationProps can be grabbed from Virtualizer hooks externally and passed in\n */ export const useStaticVirtualizerPagination = (virtualizerProps, paginationEnabled = true)=>{\n 'use no memo';\n const { itemSize, axis = 'vertical' } = virtualizerProps;\n const [setScrollTimer, clearScrollTimer] = useTimeout();\n const lastScrollPos = useRef(0);\n const lastIndexScrolled = useRef(0);\n const scrollContainer = React.useRef(null);\n const clearListeners = ()=>{\n if (scrollContainer.current) {\n scrollContainer.current.removeEventListener('scroll', onScroll);\n scrollContainer.current = null;\n clearScrollTimer();\n }\n };\n React.useEffect(()=>{\n return ()=>{\n clearListeners();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n /**\n * Handle scroll stop event and paginate to the closest item\n * If the closest item is the same as the previous scroll end\n * we paginate to the next/previous one based on direction\n */ const onScrollEnd = React.useCallback(()=>{\n if (!scrollContainer.current || !paginationEnabled) {\n // No container found\n return;\n }\n const currentScrollPos = Math.round(axis === 'vertical' ? scrollContainer.current.scrollTop : scrollContainer.current.scrollLeft);\n const closestItem = Math.round(currentScrollPos / itemSize);\n let nextItem = 0;\n if (Math.round(closestItem - lastIndexScrolled.current) === 0) {\n // Special case for go to next/previous with minimum amount of scroll needed\n const nextTarget = lastScrollPos.current < currentScrollPos ? 1 : -1;\n const isSecondaryScroll = lastScrollPos.current === currentScrollPos;\n const posMod = isSecondaryScroll ? 0 : nextTarget;\n nextItem = closestItem + posMod;\n } else {\n // Pagination for anything else can just jump to the closest!\n nextItem = closestItem;\n }\n const nextItemPos = nextItem * itemSize;\n if (axis === 'vertical') {\n scrollContainer.current.scrollTo({\n top: nextItemPos,\n behavior: 'smooth'\n });\n } else {\n scrollContainer.current.scrollTo({\n left: nextItemPos,\n behavior: 'smooth'\n });\n }\n lastScrollPos.current = nextItemPos;\n lastIndexScrolled.current = nextItem;\n }, [\n paginationEnabled,\n axis,\n itemSize\n ]);\n /**\n * On scroll timer that will continuously delay callback until scrolling stops\n */ const onScroll = React.useCallback((event)=>{\n clearScrollTimer();\n setScrollTimer(onScrollEnd, 100);\n }, [\n onScrollEnd,\n clearScrollTimer,\n setScrollTimer\n ]);\n /**\n * Pagination ref will ensure we attach listeners to containers on change\n * It is returned from hook and merged into the scroll container externally\n */ const paginationRef = React.useCallback((instance)=>{\n if (!paginationEnabled) {\n clearListeners();\n scrollContainer.current = null;\n return;\n }\n if (scrollContainer.current !== instance) {\n clearListeners();\n scrollContainer.current = instance;\n if (scrollContainer.current) {\n scrollContainer.current.addEventListener('scroll', onScroll);\n }\n }\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n onScroll,\n onScrollEnd,\n paginationEnabled\n ]);\n return paginationRef;\n};\n"],"names":["useStaticVirtualizerPagination","virtualizerProps","paginationEnabled","itemSize","axis","setScrollTimer","clearScrollTimer","useTimeout","lastScrollPos","useRef","lastIndexScrolled","scrollContainer","React","clearListeners","current","removeEventListener","onScroll","useEffect","onScrollEnd","useCallback","currentScrollPos","Math","round","scrollTop","scrollLeft","closestItem","nextItem","nextTarget","isSecondaryScroll","posMod","nextItemPos","scrollTo","top","behavior","left","event","paginationRef","instance","addEventListener"],"mappings":";;;;+BAQiBA;;;eAAAA;;;;iEARM;gCAEI;AAMhB,MAAMA,iCAAiC,CAACC,kBAAkBC,oBAAoB,IAAI;IACzF;IACA,MAAM,EAAEC,QAAQ,EAAEC,OAAO,UAAU,EAAE,GAAGH;IACxC,MAAM,CAACI,gBAAgBC,iBAAiB,GAAGC,IAAAA,0BAAU;IACrD,MAAMC,gBAAgBC,IAAAA,aAAM,EAAC;IAC7B,MAAMC,oBAAoBD,IAAAA,aAAM,EAAC;IACjC,MAAME,kBAAkBC,OAAMH,MAAM,CAAC;IACrC,MAAMI,iBAAiB;QACnB,IAAIF,gBAAgBG,OAAO,EAAE;YACzBH,gBAAgBG,OAAO,CAACC,mBAAmB,CAAC,UAAUC;YACtDL,gBAAgBG,OAAO,GAAG;YAC1BR;QACJ;IACJ;IACAM,OAAMK,SAAS,CAAC;QACZ,OAAO;YACHJ;QACJ;IACJ,uDAAuD;IACvD,GAAG,EAAE;IACL;;;;GAID,GA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AU;YACtCxB;YACAF,gBAAgBG,OAAO,GAAGuB;YAC1B,IAAI1B,gBAAgBG,OAAO,EAAE;gBACzBH,gBAAgBG,OAAO,CAACwB,gBAAgB,CAAC,UAAUtB;YACvD;QACJ;IACJ,GACA;QACIA;QACAE;QACAhB;KACH;IACD,OAAOkC;AACX"}
1
+ {"version":3,"sources":["useStaticPagination.ts"],"sourcesContent":["import * as React from 'react';\nimport { VirtualizerStaticPaginationProps } from './hooks.types';\nimport { useRef } from 'react';\nimport { useTimeout } from '@fluentui/react-utilities';\n\n/**\n * Optional hook that will enable pagination on the virtualizer so that it 'autoscrolls' to an items exact position\n * Sizes are uniform/static, we round to the nearest item on long scrolls\n * On short scrolls, we will go at minimum to the next/previous item so that arrow pagination works\n * All VirtualizerStaticPaginationProps can be grabbed from Virtualizer hooks externally and passed in\n */\nexport const useStaticVirtualizerPagination = (\n virtualizerProps: VirtualizerStaticPaginationProps,\n paginationEnabled: Boolean = true,\n) => {\n 'use no memo';\n\n const { itemSize, axis = 'vertical' } = virtualizerProps;\n\n const [setScrollTimer, clearScrollTimer] = useTimeout();\n const lastScrollPos = useRef<number>(0);\n const lastIndexScrolled = useRef<number>(0);\n\n const scrollContainer = React.useRef<HTMLElement | null>(null);\n\n const clearListeners = () => {\n if (scrollContainer.current) {\n scrollContainer.current.removeEventListener('scroll', onScroll);\n\n scrollContainer.current = null;\n clearScrollTimer();\n }\n };\n\n React.useEffect(() => {\n return () => {\n clearListeners();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n /**\n * Handle scroll stop event and paginate to the closest item\n * If the closest item is the same as the previous scroll end\n * we paginate to the next/previous one based on direction\n */\n const onScrollEnd = React.useCallback(() => {\n if (!scrollContainer.current || !paginationEnabled) {\n // No container found\n return;\n }\n\n const currentScrollPos = Math.round(\n axis === 'vertical' ? scrollContainer.current.scrollTop : scrollContainer.current.scrollLeft,\n );\n const closestItem = Math.round(currentScrollPos / itemSize);\n\n let nextItem = 0;\n if (Math.round(closestItem - lastIndexScrolled.current) === 0) {\n // Special case for go to next/previous with minimum amount of scroll needed\n const nextTarget = lastScrollPos.current < currentScrollPos ? 1 : -1;\n const isSecondaryScroll = lastScrollPos.current === currentScrollPos;\n const posMod = isSecondaryScroll ? 0 : nextTarget;\n\n nextItem = closestItem + posMod;\n } else {\n // Pagination for anything else can just jump to the closest!\n nextItem = closestItem;\n }\n\n const nextItemPos = nextItem * itemSize;\n\n if (axis === 'vertical') {\n scrollContainer.current.scrollTo({ top: nextItemPos, behavior: 'smooth' });\n } else {\n scrollContainer.current.scrollTo({ left: nextItemPos, behavior: 'smooth' });\n }\n lastScrollPos.current = nextItemPos;\n lastIndexScrolled.current = nextItem;\n }, [paginationEnabled, axis, itemSize]);\n\n /**\n * On scroll timer that will continuously delay callback until scrolling stops\n */\n const onScroll = React.useCallback(\n event => {\n clearScrollTimer();\n setScrollTimer(onScrollEnd, 100);\n },\n [onScrollEnd, clearScrollTimer, setScrollTimer],\n );\n\n /**\n * Pagination ref will ensure we attach listeners to containers on change\n * It is returned from hook and merged into the scroll container externally\n */\n const paginationRef = React.useCallback(\n (instance: HTMLElement | HTMLDivElement | null) => {\n if (!paginationEnabled) {\n clearListeners();\n scrollContainer.current = null;\n return;\n }\n if (scrollContainer.current !== instance) {\n clearListeners();\n\n scrollContainer.current = instance;\n if (scrollContainer.current) {\n scrollContainer.current.addEventListener('scroll', onScroll);\n }\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [onScroll, onScrollEnd, paginationEnabled],\n );\n\n return paginationRef;\n};\n"],"names":["useStaticVirtualizerPagination","virtualizerProps","paginationEnabled","itemSize","axis","setScrollTimer","clearScrollTimer","useTimeout","lastScrollPos","useRef","lastIndexScrolled","scrollContainer","React","clearListeners","current","removeEventListener","onScroll","useEffect","onScrollEnd","useCallback","currentScrollPos","Math","round","scrollTop","scrollLeft","closestItem","nextItem","nextTarget","isSecondaryScroll","posMod","nextItemPos","scrollTo","top","behavior","left","event","paginationR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,oBAAoBpB,cAAcM,OAAO,KAAKM;YACpD,MAAMS,SAASD,oBAAoB,IAAID;YAEvCD,WAAWD,cAAcI;QAC3B,OAAO;YACL,6DAA6D;YAC7DH,WAAWD;QACb;QAEA,MAAMK,cAAcJ,WAAWvB;QAE/B,IAAIC,SAAS,YAAY;YACvBO,gBAAgBG,OAAO,CAACiB,QAAQ,CAAC;gBAAEC,KAAKF;gBAAaG,UAAU;YAAS;QAC1E,OAAO;YACLtB,gBAAgBG,OAAO,CAACiB,QAAQ,CAAC;gBAAEG,MAAMJ;gBAAaG,UAAU;YAAS;QAC3E;QACAzB,cAAcM,OAAO,GAAGgB;QACxBpB,kBAAkBI,OAAO,GAAGY;IAC9B,GAAG;QAACxB;QAAmBE;QAAMD;KAAS;IAEtC;;GAEC,GACD,MAAMa,WAAWJ,OAAMO,WAAW,CAChCgB,CAAAA;QACE7B;QACAD,eAAea,aAAa;IAC9B,GACA;QAACA;QAAaZ;QAAkBD;KAAe;IAGjD;;;GAGC,GACD,MAAM+B,gBAAgBxB,OAAMO,WAAW,CACrC,CAACkB;QACC,IAAI,CAACnC,mBAAmB;YACtBW;YACAF,gBAAgBG,OAAO,GAAG;YAC1B;QACF;QACA,IAAIH,gBAAgBG,OAAO,KAAKuB,UAAU;YACxCxB;YAEAF,gBAAgBG,OAAO,GAAGuB;YAC1B,IAAI1B,gBAAgBG,OAAO,EAAE;gBAC3BH,gBAAgBG,OAAO,CAACwB,gBAAgB,CAAC,UAAUtB;YACrD;QACF;IACF,GAEA;QAACA;QAAUE;QAAahB;KAAkB;IAG5C,OAAOkC;AACT"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useVirtualizerMeasure.js"],"sourcesContent":["import * as React from 'react';\nimport { useResizeObserverRef_unstable } from './useResizeObserverRef';\n/**\n * React hook that measures virtualized space based on a static size to ensure optimized virtualization length.\n */ export const useStaticVirtualizerMeasure = (virtualizerProps)=>{\n const { defaultItemSize, direction = 'vertical' } = virtualizerProps;\n const [state, setState] = React.useState({\n virtualizerLength: 0,\n bufferSize: 0,\n bufferItems: 0\n });\n const { virtualizerLength, bufferItems, bufferSize } = state;\n const resizeCallback = React.useCallback((_entries, // TODO: exclude types from this lint rule: https://github.com/microsoft/fluentui/issues/31286\n // eslint-disable-next-line no-restricted-globals\n _observer, scrollRef)=>{\n if (!(scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current)) {\n return;\n }\n const containerSize = direction === 'vertical' ? scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current.getBoundingClientRect().height : scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current.getBoundingClientRect().width;\n /*\n * Number of items required to cover viewport.\n */ const length = Math.ceil(containerSize / defaultItemSize + 1);\n /*\n * Number of items to append at each end, i.e. 'preload' each side before entering view.\n */ const newBufferItems = Math.max(Math.floor(length / 4), 2);\n /*\n * This is how far we deviate into the bufferItems to detect a redraw.\n */ const newBufferSize = Math.max(Math.floor(length / 8 * defaultItemSize), 1);\n const totalLength = length + newBufferItems * 2 + 1;\n setState({\n virtualizerLength: totalLength,\n bufferItems: newBufferItems,\n bufferSize: newBufferSize\n });\n }, [\n defaultItemSize,\n direction\n ]);\n const scrollRef = useResizeObserverRef_unstable(resizeCallback);\n return {\n virtualizerLength,\n bufferItems,\n bufferSize,\n scrollRef\n };\n};\n"],"names":["useStaticVirtualizerMeasure","virtualizerProps","defaultItemSize","direction","state","setState","React","useState","virtualizerLength","bufferSize","bufferItems","resizeCallback","useCallback","_entries","_observer","scrollRef","current","containerSize","getBoundingClientRect","height","width","length","Math","ceil","newBufferItems","max","floor","newBufferSize","totalLength","useResizeObserverRef_unstable"],"mappings":";;;;+BAIiBA;;;eAAAA;;;;iEAJM;sCACuB;AAGnC,MAAMA,8BAA8B,CAACC;IAC5C,MAAM,EAAEC,eAAe,EAAEC,YAAY,UAAU,EAAE,GAAGF;IACpD,MAAM,CAACG,OAAOC,SAAS,GAAGC,OAAMC,QAAQ,CAAC;QACrCC,mBAAmB;QACnBC,YAAY;QACZC,aAAa;IACjB;IACA,MAAM,EAAEF,iBAAiB,EAAEE,WAAW,EAAED,UAAU,EAAE,GAAGL;IACvD,MAAMO,iBAAiBL,OAAMM,WAAW,CAAC,CAACC,UAC1C,iDAAiD;IACjDC,WAAWC;QACP,IAAI,CAAEA,CAAAA,cAAc,QAAQA,cAAc,KAAK,IAAI,KAAK,IAAIA,UAAUC,OAAO,AAAD,GAAI;YAC5E;QACJ;QACA,MAAMC,gBAAgBd,cAAc,aAAaY,cAAc,QAAQA,cAAc,KAAK,IAAI,KAAK,IAAIA,UAAUC,OAAO,CAACE,qBAAqB,GAAGC,MAAM,GAAGJ,cAAc,QAAQA,cAAc,KAAK,IAAI,KAAK,IAAIA,UAAUC,OAAO,CAACE,qBAAqB,GAAGE,KAAK;QAC/P;;OAED,GAAG,MAAMC,SAASC,KAAKC,IAAI,CAACN,gBAAgBf,kBAAkB;QAC7D;;OAED,GAAG,MAAMsB,iBAAiBF,KAAKG,GAAG,CAACH,KAAKI,KAAK,CAACL,SAAS,IAAI;QAC1D;;OAED,GAAG,MAAMM,gBAAgBL,KAAKG,GAAG,CAACH,KAAKI,KAAK,CAACL,SAAS,IAAInB,kBAAkB;QAC3E,MAAM0B,cAAcP,SAASG,iBAAiB,IAAI;QAClDnB,SAAS;YACLG,mBAAmBoB;YACnBlB,aAAac;YACbf,YAAYkB;QAChB;IACJ,GAAG;QACCzB;QACAC;KACH;IACD,MAAMY,YAAYc,IAAAA,mDAA6B,EAAClB;IAChD,OAAO;QACHH;QACAE;QACAD;QACAM;IACJ;AACJ"}
1
+ {"version":3,"sources":["useVirtualizerMeasure.ts"],"sourcesContent":["import * as React from 'react';\nimport { VirtualizerMeasureProps } from './hooks.types';\nimport { useResizeObserverRef_unstable } from './useResizeObserverRef';\n\n/**\n * React hook that measures virtualized space based on a static size to ensure optimized virtualization length.\n */\nexport const useStaticVirtualizerMeasure = <TElement extends HTMLElement>(\n virtualizerProps: VirtualizerMeasureProps,\n): {\n virtualizerLength: number;\n bufferItems: number;\n bufferSize: number;\n scrollRef: (instance: TElement | null) => void;\n} => {\n const { defaultItemSize, direction = 'vertical' } = virtualizerProps;\n\n const [state, setState] = React.useState({\n virtualizerLength: 0,\n bufferSize: 0,\n bufferItems: 0,\n });\n\n const { virtualizerLength, bufferItems, bufferSize } = state;\n\n const resizeCallback = React.useCallback(\n (\n _entries: ResizeObserverEntry[],\n // TODO: exclude types from this lint rule: https://github.com/microsoft/fluentui/issues/31286\n // eslint-disable-next-line no-restricted-globals\n _observer: ResizeObserver,\n scrollRef?: React.MutableRefObject<HTMLElement | null>,\n ) => {\n if (!scrollRef?.current) {\n return;\n }\n\n const containerSize =\n direction === 'vertical'\n ? scrollRef?.current.getBoundingClientRect().height\n : scrollRef?.current.getBoundingClientRect().width;\n\n /*\n * Number of items required to cover viewport.\n */\n const length = Math.ceil(containerSize / defaultItemSize + 1);\n\n /*\n * Number of items to append at each end, i.e. 'preload' each side before entering view.\n */\n const newBufferItems = Math.max(Math.floor(length / 4), 2);\n\n /*\n * This is how far we deviate into the bufferItems to detect a redraw.\n */\n const newBufferSize = Math.max(Math.floor((length / 8) * defaultItemSize), 1);\n\n const totalLength = length + newBufferItems * 2 + 1;\n\n setState({\n virtualizerLength: totalLength,\n bufferItems: newBufferItems,\n bufferSize: newBufferSize,\n });\n },\n [defaultItemSize, direction],\n );\n\n const scrollRef = useResizeObserverRef_unstable(resizeCallback);\n\n return {\n virtualizerLength,\n bufferItems,\n bufferSize,\n scrollRef,\n };\n};\n"],"names":["useStaticVirtualizerMeasure","virtualizerProps","defaultItemSize","direction","state","setState","React","useState","virtualizerLength","bufferSize","bufferItems","resizeCallback","useCallback","_entries","_observer","scrollRef","current","containerSize","getBoundingClientRect","height","width","length","Math","ceil","newBufferItems","max","floor","newBufferSize","totalLength","useResizeObserverRef_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAOaA;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izer: function() {
13
13
  return _Virtualizer.Virtualizer;
14
14
  },
15
- virtualizerClassNames: function() {
16
- return _Virtualizer.virtualizerClassNames;
15
+ VirtualizerContextProvider: function() {
16
+ return _Utilities.VirtualizerContextProvider;
17
17
  },
18
- useVirtualizer_unstable: function() {
19
- return _Virtualizer.useVirtualizer_unstable;
18
+ VirtualizerScrollView: function() {
19
+ return _VirtualizerScrollView.VirtualizerScrollView;
20
+ },
21
+ VirtualizerScrollViewDynamic: function() {
22
+ return _VirtualizerScrollViewDynamic.VirtualizerScrollViewDynamic;
23
+ },
24
+ renderVirtualizerScrollViewDynamic_unstable: function() {
25
+ return _VirtualizerScrollViewDynamic.renderVirtualizerScrollViewDynamic_unstable;
26
+ },
27
+ renderVirtualizerScrollView_unstable: function() {
28
+ return _VirtualizerScrollView.renderVirtualizerScrollView_unstable;
20
29
  },
21
30
  renderVirtualizer_unstable: function() {
22
31
  return _Virtualizer.renderVirtualizer_unstable;
23
32
  },
24
- useVirtualizerStyles_unstable: function() {
25
- return _Virtualizer.useVirtualizerStyles_unstable;
26
- },
27
- useIntersectionObserver: function() {
28
- return _Hooks.useIntersectionObserver;
33
+ scrollToItemDynamic: function() {
34
+ return _Utilities.scrollToItemDynamic;
29
35
  },
30
- useStaticVirtualizerMeasure: function() {
31
- return _Hooks.useStaticVirtualizerMeasure;
36
+ scrollToItemStatic: function() {
37
+ return _Utilities.scrollToItemStatic;
32
38
  },
33
39
  useDynamicVirtualizerMeasure: function() {
34
40
  return _Hooks.useDynamicVirtualizerMeasure;
35
41
  },
42
+ useIntersectionObserver: function() {
43
+ return _Hooks.useIntersectionObserver;
44
+ },
36
45
  useResizeObserverRef_unstable: function() {
37
46
  return _Hooks.useResizeObserverRef_unstable;
38
47
  },
39
- VirtualizerContextProvider: function() {
40
- return _Utilities.VirtualizerContextProvider;
48
+ useStaticVirtualizerMeasure: function() {
49
+ return _Hooks.useStaticVirtualizerMeasure;
41
50
  },
42
51
  useVirtualizerContext_unstable: function() {
43
52
  return _Utilities.useVirtualizerContext_unstable;
44
53
  },
45
- scrollToItemStatic: function() {
46
- return _Utilities.scrollToItemStatic;
47
- },
48
- scrollToItemDynamic: function() {
49
- return _Utilities.scrollToItemDynamic;
54
+ useVirtualizerScrollViewDynamicStyles_unstable: function() {
55
+ return _VirtualizerScrollViewDynamic.useVirtualizerScrollViewDynamicStyles_unstable;
50
56
  },
51
- VirtualizerScrollView: function() {
52
- return _VirtualizerScrollView.VirtualizerScrollView;
57
+ useVirtualizerScrollViewDynamic_unstable: function() {
58
+ return _VirtualizerScrollViewDynamic.useVirtualizerScrollViewDynamic_unstable;
53
59
  },
54
- virtualizerScrollViewClassNames: function() {
55
- return _VirtualizerScrollView.virtualizerScrollViewClassNames;
60
+ useVirtualizerScrollViewStyles_unstable: function() {
61
+ return _VirtualizerScrollView.useVirtualizerScrollViewStyles_unstable;
56
62
  },
57
63
  useVirtualizerScrollView_unstable: function() {
58
64
  return _VirtualizerScrollView.useVirtualizerScrollView_unstable;
59
65
  },
60
- renderVirtualizerScrollView_unstable: function() {
61
- return _VirtualizerScrollView.renderVirtualizerScrollView_unstable;
66
+ useVirtualizerStyles_unstable: function() {
67
+ return _Virtualizer.useVirtualizerStyles_unstable;
62
68
  },
63
- useVirtualizerScrollViewStyles_unstable: function() {
64
- return _VirtualizerScrollView.useVirtualizerScrollViewStyles_unstable;
69
+ useVirtualizer_unstable: function() {
70
+ return _Virtualizer.useVirtualizer_unstable;
65
71
  },
66
- VirtualizerScrollViewDynamic: function() {
67
- return _VirtualizerScrollViewDynamic.VirtualizerScrollViewDynamic;
72
+ virtualizerClassNames: function() {
73
+ return _Virtualizer.virtualizerClassNames;
74
+ },
75
+ virtualizerScrollViewClassNames: function() {
76
+ return _VirtualizerScrollView.virtualizerScrollViewClassNames;
68
77
  },
69
78
  virtualizerScrollViewDynamicClassNames: function() {
70
79
  return _VirtualizerScrollViewDynamic.virtualizerScrollViewDynamicClassNames;
71
- },
72
- useVirtualizerScrollViewDynamic_unstable: function() {
73
- return _VirtualizerScrollViewDynamic.useVirtualizerScrollViewDynamic_unstable;
74
- },
75
- renderVirtualizerScrollViewDynamic_unstable: function() {
76
- return _VirtualizerScrollViewDynamic.renderVirtualizerScrollViewDynamic_unstable;
77
- },
78
- useVirtualizerScrollViewDynamicStyles_unstable: function() {
79
- return _VirtualizerScrollViewDynamic.useVirtualizerScrollViewDynamicStyles_unstable;
80
80
  }
81
81
  });
82
82
  const _Virtualizer = require("./Virtualizer");
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export { Virtualizer, virtualizerClassNames, useVirtualizer_unstable, renderVirtualizer_unstable, useVirtualizerStyles_unstable } from './Virtualizer';\nexport { useIntersectionObserver, useStaticVirtualizerMeasure, useDynamicVirtualizerMeasure, useResizeObserverRef_unstable } from './Hooks';\nexport { VirtualizerContextProvider, useVirtualizerContext_unstable, scrollToItemStatic, scrollToItemDynamic } from './Utilities';\nexport { VirtualizerScrollView, virtualizerScrollViewClassNames, useVirtualizerScrollView_unstable, renderVirtualizerScrollView_unstable, useVirtualizerScrollViewStyles_unstable } from './VirtualizerScrollView';\nexport { VirtualizerScrollViewDynamic, virtualizerScrollViewDynamicClassNames, useVirtualizerScrollViewDynamic_unstable, renderVirtualizerScrollViewDynamic_unstable, useVirtualizerScrollViewDynamicStyles_unstable } from './VirtualizerScrollViewDynamic';\n"],"names":["Virtualizer","virtualizerClassNames","useVirtualizer_unstable","renderVirtualizer_unstable","useVirtualizerStyles_unstable","useIntersectionObserver","useStaticVirtualizerMeasure","useDynamicVirtualizerMeasure","useResizeObserverRef_unstable","VirtualizerContextProvider","useVirtualizerContext_unstable","scrollToItemStatic","scrollToItemDynamic","VirtualizerScrollView","virtualizerScrollViewClassNames","useVirtualizerScrollView_unstable","renderVirtualizerScrollView_unstable","useVirtualizerScrollViewStyles_unstable","VirtualizerScrollViewDynamic","virtualizerScrollViewDynamicClassNames","useVirtualizerScrollViewDynamic_unstable","renderVirtualizerScrollViewDynamic_unstable","useVirtualizerScrollViewDynamicStyles_unstable"],"mappings":";;;;;;;;;;;IAASA,WAAW;eAAXA,wBAAW;;IAAEC,qBAAqB;eAArBA,kCAAqB;;IAAEC,uBAAuB;eAAvBA,oCAAuB;;IAAEC,0BAA0B;eAA1BA,uCAA0B;;IAAEC,6BAA6B;eAA7BA,0CAA6B;;IACtHC,uBAAuB;eAAvBA,8BAAuB;;IAAEC,2BAA2B;eAA3BA,kCAA2B;;IAAEC,4BAA4B;eAA5BA,mCAA4B;;IAAEC,6BAA6B;eAA7BA,oCAA6B;;IACjHC,0BAA0B;eAA1BA,qCAA0B;;IAAEC,8BAA8B;eAA9BA,yCAA8B;;IAAEC,kBAAkB;eAAlBA,6BAAkB;;IAAEC,mBAAmB;eAAnBA,8BAAmB;;IACnGC,qBAAqB;eAArBA,4CAAqB;;IAAEC,+BAA+B;eAA/BA,sDAA+B;;IAAEC,iCAAiC;eAAjCA,wDAAiC;;IAAEC,oCAAoC;eAApCA,2DAAoC;;IAAEC,uCAAuC;eAAvCA,8DAAuC;;IACxKC,4BAA4B;eAA5BA,0DAA4B;;IAAEC,sCAAsC;eAAtCA,oEAAsC;;IAAEC,wCAAwC;eAAxCA,sEAAwC;;IAAEC,2CAA2C;eAA3CA,yEAA2C;;IAAEC,8CAA8C;eAA9CA,4EAA8C;;;6BAJ7E;uBACL;2BACd;uCACqE;8CACmC"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export {\n Virtualizer,\n virtualizerClassNames,\n useVirtualizer_unstable,\n renderVirtualizer_unstable,\n useVirtualizerStyles_unstable,\n} from './Virtualizer';\n\nexport type {\n VirtualizerProps,\n VirtualizerState,\n VirtualizerSlots,\n VirtualizerChildRenderFunction,\n VirtualizerDataRef,\n} from './Virtualizer';\n\nexport {\n useIntersectionObserver,\n useStaticVirtualizerMeasure,\n useDynamicVirtualizerMeasure,\n useResizeObserverRef_unstable,\n} from './Hooks';\n\nexport type { ResizeCallbackWithRef, VirtualizerMeasureDynamicProps, VirtualizerMeasureProps } from './Hooks';\n\nexport type { ScrollToItemDynamicParams, ScrollToItemStaticParams, ScrollToInterface } from './Utilities';\n\nexport {\n VirtualizerContextProvider,\n useVirtualizerContext_unstable,\n scrollToItemStatic,\n scrollToItemDynamic,\n} from './Utilities';\n\nexport type { VirtualizerContextProps } from './Utilities';\n\nexport {\n VirtualizerScrollView,\n virtualizerScrollViewClassNames,\n useVirtualizerScrollView_unstable,\n renderVirtualizerScrollView_unstable,\n useVirtualizerScrollViewStyles_unstable,\n} from './VirtualizerScrollView';\n\nexport type {\n VirtualizerScrollViewProps,\n VirtualizerScrollViewState,\n VirtualizerScrollViewSlots,\n} from './VirtualizerScrollView';\n\nexport {\n VirtualizerScrollViewDynamic,\n virtualizerScrollViewDynamicClassNames,\n useVirtualizerScrollViewDynamic_unstable,\n renderVirtualizerScrollViewDynamic_unstable,\n useVirtualizerScrollViewDynamicStyles_unstable,\n} from './VirtualizerScrollViewDynamic';\n\nexport type {\n VirtualizerScrollViewDynamicProps,\n VirtualizerScrollViewDynamicState,\n VirtualizerScrollViewDynamicSlots,\n} from './VirtualizerScrollViewDynamic';\n"],"names":["Virtualizer","VirtualizerContextProvider","VirtualizerScrollView","VirtualizerScrollViewDynamic","renderVirtualizerScrollViewDynamic_unstable","renderVirtualizerScrollView_unstable","renderVirtualizer_unstable","scrollToItemDynamic","scrollToItemStatic","useDynamicVirtualizerMeasure","useIntersectionObserver","useResizeObserverRef_unstable","useStaticVirtualizerMeasure","useVirtualizerContext_unstable","useVirtualizerScrollViewDynamicStyles_unstable","useVirtualizerScrollViewDynamic_unstable","useVirtualizerScrollViewStyles_unstable","useVirtualizerScrollView_unstable","useVirtualizerStyles_unstable","useVirtualizer_unstable","virtualizerClassNames","virtualizerScrollViewClassNames","virtualizerScrollViewDynamicClassNames"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACEA,WAAW;eAAXA,wBAAW;;IA2BXC,0BAA0B;eAA1BA,qCAA0B;;IAS1BC,qBAAqB;eAArBA,4CAAqB;;IAcrBC,4BAA4B;eAA5BA,0DAA4B;;IAG5BC,2CAA2C;eAA3CA,yEAA2C;;IAd3CC,oCAAoC;eAApCA,2DAAoC;;IApCpCC,0BAA0B;eAA1BA,uCAA0B;;IA2B1BC,mBAAmB;eAAnBA,8BAAmB;;IADnBC,kBAAkB;eAAlBA,6BAAkB;;IAXlBC,4BAA4B;eAA5BA,mCAA4B;;IAF5BC,uBAAuB;eAAvBA,8BAAuB;;IAGvBC,6BAA6B;eAA7BA,oCAA6B;;IAF7BC,2BAA2B;eAA3BA,kCAA2B;;IAW3BC,8BAA8B;eAA9BA,yCAA8B;;IA0B9BC,8CAA8C;eAA9CA,4EAA8C;;IAF9CC,wCAAwC;eAAxCA,sEAAwC;;IAZxCC,uCAAuC;eAAvCA,8DAAuC;;IAFvCC,iCAAiC;eAAjCA,wDAAiC;;IAlCjCC,6BAA6B;eAA7BA,0CAA6B;;IAF7BC,uBAAuB;eAAvBA,oCAAuB;;IADvBC,qBAAqB;eAArBA,kCAAqB;;IAoCrBC,+BAA+B;eAA/BA,sDAA+B;;IAc/BC,sCAAsC;eAAtCA,oEAAsC;;;6BA9CjC;uBAeA;2BAWA;uCAUA;8CAcA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["imperativeScrolling.js"],"sourcesContent":["export const scrollToItemStatic = (params)=>{\n const { index, itemSize, totalItems, scrollViewRef, axis = 'vertical', reversed = false, behavior = 'auto' } = params;\n if (axis === 'horizontal') {\n if (reversed) {\n var _scrollViewRef_current;\n (_scrollViewRef_current = scrollViewRef.current) === null || _scrollViewRef_current === void 0 ? void 0 : _scrollViewRef_current.scrollTo({\n left: totalItems * itemSize - itemSize * index,\n behavior\n });\n } else {\n var _scrollViewRef_current1;\n (_scrollViewRef_current1 = scrollViewRef.current) === null || _scrollViewRef_current1 === void 0 ? void 0 : _scrollViewRef_current1.scrollTo({\n left: itemSize * index,\n behavior\n });\n }\n } else {\n if (reversed) {\n var _scrollViewRef_current2;\n (_scrollViewRef_current2 = scrollViewRef.current) === null || _scrollViewRef_current2 === void 0 ? void 0 : _scrollViewRef_current2.scrollTo({\n top: totalItems * itemSize - itemSize * index,\n behavior\n });\n } else {\n var _scrollViewRef_current3;\n (_scrollViewRef_current3 = scrollViewRef.current) === null || _scrollViewRef_current3 === void 0 ? void 0 : _scrollViewRef_current3.scrollTo({\n top: itemSize * index,\n behavior\n });\n }\n }\n};\n"],"names":["scrollToItemStatic","params","index","itemSize","totalItems","scrollViewRef","axis","reversed","behavior","_scrollViewRef_current","current","scrollTo","left","_scrollViewRef_current1","_scrollViewRef_current2","top","_scrollViewRef_current3"],"mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,MAAMA,qBAAqB,CAACC;IAC/B,MAAM,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,aAAa,EAAEC,OAAO,UAAU,EAAEC,WAAW,KAAK,EAAEC,WAAW,MAAM,EAAE,GAAGP;IAC/G,IAAIK,SAAS,cAAc;QACvB,IAAIC,UAAU;YACV,IAAIE;YACHA,CAAAA,yBAAyBJ,cAAcK,OAAO,AAAD,MAAO,QAAQD,2BAA2B,KAAK,IAAI,KAAK,IAAIA,uBAAuBE,QAAQ,CAAC;gBACtIC,MAAMR,aAAaD,WAAWA,WAAWD;gBACzCM;YACJ;QACJ,OAAO;YACH,IAAIK;YACHA,CAAAA,0BAA0BR,cAAcK,OAAO,AAAD,MAAO,QAAQG,4BAA4B,KAAK,IAAI,KAAK,IAAIA,wBAAwBF,QAAQ,CAAC;gBACzIC,MAAMT,WAAWD;gBACjBM;YACJ;QACJ;IACJ,OAAO;QACH,IAAID,UAAU;YACV,IAAIO;YACHA,CAAAA,0BAA0BT,cAAcK,OAAO,AAAD,MAAO,QAAQI,4BAA4B,KAAK,IAAI,KAAK,IAAIA,wBAAwBH,QAAQ,CAAC;gBACzII,KAAKX,aAAaD,WAAWA,WAAWD;gBACxCM;YACJ;QACJ,OAAO;YACH,IAAIQ;YACHA,CAAAA,0BAA0BX,cAAcK,OAAO,AAAD,MAAO,QAAQM,4BAA4B,KAAK,IAAI,KAAK,IAAIA,wBAAwBL,QAAQ,CAAC;gBACzII,KAAKZ,WAAWD;gBAChBM;YACJ;QACJ;IACJ;AACJ"}
1
+ {"version":3,"sources":["imperativeScrolling.ts"],"sourcesContent":["import { ScrollToItemStaticParams } from './imperativeScrolling.types';\n\nexport const scrollToItemStatic = (params: ScrollToItemStaticParams) => {\n const { index, itemSize, totalItems, scrollViewRef, axis = 'vertical', reversed = false, behavior = 'auto' } = params;\n\n if (axis === 'horizontal') {\n if (reversed) {\n scrollViewRef.current?.scrollTo({\n left: totalItems * itemSize - itemSize * index,\n behavior,\n });\n } else {\n scrollViewRef.current?.scrollTo({\n left: itemSize * index,\n behavior,\n });\n }\n } else {\n if (reversed) {\n scrollViewRef.current?.scrollTo({\n top: totalItems * itemSize - itemSize * index,\n behavior,\n });\n } else {\n scrollViewRef.current?.scrollTo({\n top: itemSize * index,\n behavior,\n });\n }\n }\n};\n"],"names":["scrollToItemStatic","params","index","itemSize","totalItems","scrollViewRef","axis","reversed","behavior","current","scrollTo","left","top"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAEaA;;;eAAAA;;;AAAN,MAAMA,qBAAqB,CAACC;IACjC,MAAM,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,aAAa,EAAEC,OAAO,UAAU,EAAEC,WAAW,KAAK,EAAEC,WAAW,MAAM,EAAE,GAAGP;IAE/G,IAAIK,SAAS,cAAc;QACzB,IAAIC,UAAU;gBACZF;YAAAA,CAAAA,yBAAAA,cAAcI,OAAO,AAAPA,MAAO,QAArBJ,2BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,uBAAuBK,QAAQ,CAAC;gBAC9BC,MAAMP,aAAaD,WAAWA,WAAWD;gBACzCM;YACF;QACF,OAAO;gBACLH;YAAAA,CAAAA,0BAAAA,cAAcI,OAAO,AAAPA,MAAO,QAArBJ,4BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,wBAAuBK,QAAQ,CAAC;gBAC9BC,MAAMR,WAAWD;gBACjBM;YACF;QACF;IACF,OAAO;QACL,IAAID,UAAU;gBACZF;YAAAA,CAAAA,0BAAAA,cAAcI,OAAO,AAAPA,MAAO,QAArBJ,4BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,wBAAuBK,QAAQ,CAAC;gBAC9BE,KAAKR,aAAaD,WAAWA,WAAWD;gBACxCM;YACF;QACF,OAAO;gBACLH;YAAAA,CAAAA,0BAAAA,cAAcI,OAAO,AAAPA,MAAO,QAArBJ,4BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,wBAAuBK,QAAQ,CAAC;gBAC9BE,KAAKT,WAAWD;gBAChBM;YACF;QACF;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
1
+ {"version":3,"sources":["imperativeScrolling.types.ts"],"sourcesContent":["import type { RefObject } from 'react';\n\nexport type ScrollToItemStaticParams = {\n index: number;\n itemSize: number;\n totalItems: number;\n scrollViewRef: RefObject<HTMLDivElement>;\n axis?: 'horizontal' | 'vertical';\n reversed?: boolean;\n behavior?: ScrollBehavior;\n};\n\nexport type ScrollToItemDynamicParams = {\n index: number;\n itemSizes: RefObject<number[]>;\n totalSize: number;\n scrollViewRef: RefObject<HTMLDivElement>;\n axis?: 'horizontal' | 'vertical';\n reversed?: boolean;\n behavior?: ScrollBehavior;\n};\n\nexport type ScrollToInterface = {\n scrollTo: (index: number, behavior?: ScrollBehavior, callback?: (index: number) => void) => void;\n virtualizerLength: RefObject<number>;\n currentIndex: RefObject<number> | undefined;\n};\n"],"names":[],"rangeMappings":"","mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["imperativeScrollingDynamic.js"],"sourcesContent":["export const scrollToItemDynamic = (params)=>{\n const { index, itemSizes, totalSize, scrollViewRef, axis = 'vertical', reversed = false, behavior = 'auto' } = params;\n if (!itemSizes.current) {\n return;\n }\n if (itemSizes.current === null || itemSizes.current.length < index) {\n // null check - abort\n return;\n }\n let itemDepth = 0;\n for(let i = 0; i < index; i++){\n if (i < index) {\n itemDepth += itemSizes.current[i];\n }\n }\n if (axis === 'horizontal') {\n if (reversed) {\n var _scrollViewRef_current;\n (_scrollViewRef_current = scrollViewRef.current) === null || _scrollViewRef_current === void 0 ? void 0 : _scrollViewRef_current.scrollTo({\n left: totalSize - itemDepth,\n behavior\n });\n } else {\n var _scrollViewRef_current1;\n (_scrollViewRef_current1 = scrollViewRef.current) === null || _scrollViewRef_current1 === void 0 ? void 0 : _scrollViewRef_current1.scrollTo({\n left: itemDepth,\n behavior\n });\n }\n } else {\n if (reversed) {\n var _scrollViewRef_current2;\n (_scrollViewRef_current2 = scrollViewRef.current) === null || _scrollViewRef_current2 === void 0 ? void 0 : _scrollViewRef_current2.scrollTo({\n top: totalSize - itemDepth,\n behavior\n });\n } else {\n var _scrollViewRef_current3;\n (_scrollViewRef_current3 = scrollViewRef.current) === null || _scrollViewRef_current3 === void 0 ? void 0 : _scrollViewRef_current3.scrollTo({\n top: itemDepth,\n behavior\n });\n }\n }\n};\n"],"names":["scrollToItemDynamic","params","index","itemSizes","totalSize","scrollViewRef","axis","reversed","behavior","current","length","itemDepth","i","_scrollViewRef_current","scrollTo","left","_scrollViewRef_current1","_scrollViewRef_current2","top","_scrollViewRef_current3"],"mappings":";;;;+BAAaA;;;eAAAA;;;AAAN,MAAMA,sBAAsB,CAACC;IAChC,MAAM,EAAEC,KAAK,EAAEC,SAAS,EAAEC,SAAS,EAAEC,aAAa,EAAEC,OAAO,UAAU,EAAEC,WAAW,KAAK,EAAEC,WAAW,MAAM,EAAE,GAAGP;IAC/G,IAAI,CAACE,UAAUM,OAAO,EAAE;QACpB;IACJ;IACA,IAAIN,UAAUM,OAAO,KAAK,QAAQN,UAAUM,OAAO,CAACC,MAAM,GAAGR,OAAO;QAChE,qBAAqB;QACrB;IACJ;IACA,IAAIS,YAAY;IAChB,IAAI,IAAIC,IAAI,GAAGA,IAAIV,OAAOU,IAAI;QAC1B,IAAIA,IAAIV,OAAO;YACXS,aAAaR,UAAUM,OAAO,CAACG,EAAE;QACrC;IACJ;IACA,IAAIN,SAAS,cAAc;QACvB,IAAIC,UAAU;YACV,IAAIM;YACHA,CAAAA,yBAAyBR,cAAcI,OAAO,AAAD,MAAO,QAAQI,2BAA2B,KAAK,IAAI,KAAK,IAAIA,uBAAuBC,QAAQ,CAAC;gBACtIC,MAAMX,YAAYO;gBAClBH;YACJ;QACJ,OAAO;YACH,IAAIQ;YACHA,CAAAA,0BAA0BX,cAAcI,OAAO,AAAD,MAAO,QAAQO,4BAA4B,KAAK,IAAI,KAAK,IAAIA,wBAAwBF,QAAQ,CAAC;gBACzIC,MAAMJ;gBACNH;YACJ;QACJ;IACJ,OAAO;QACH,IAAID,UAAU;YACV,IAAIU;YACHA,CAAAA,0BAA0BZ,cAAcI,OAAO,AAAD,MAAO,QAAQQ,4BAA4B,KAAK,IAAI,KAAK,IAAIA,wBAAwBH,QAAQ,CAAC;gBACzII,KAAKd,YAAYO;gBACjBH;YACJ;QACJ,OAAO;YACH,IAAIW;YACHA,CAAAA,0BAA0Bd,cAAcI,OAAO,AAAD,MAAO,QAAQU,4BAA4B,KAAK,IAAI,KAAK,IAAIA,wBAAwBL,QAAQ,CAAC;gBACzII,KAAKP;gBACLH;YACJ;QACJ;IACJ;AACJ"}
1
+ {"version":3,"sources":["imperativeScrollingDynamic.ts"],"sourcesContent":["import { ScrollToItemDynamicParams } from './imperativeScrolling.types';\n\nexport const scrollToItemDynamic = (params: ScrollToItemDynamicParams) => {\n const { index, itemSizes, totalSize, scrollViewRef, axis = 'vertical', reversed = false, behavior = 'auto' } = params;\n if (!itemSizes.current) {\n return;\n }\n\n if (itemSizes.current === null || itemSizes.current.length < index) {\n // null check - abort\n return;\n }\n\n let itemDepth = 0;\n for (let i = 0; i < index; i++) {\n if (i < index) {\n itemDepth += itemSizes.current[i];\n }\n }\n\n if (axis === 'horizontal') {\n if (reversed) {\n scrollViewRef.current?.scrollTo({\n left: totalSize - itemDepth,\n behavior,\n });\n } else {\n scrollViewRef.current?.scrollTo({\n left: itemDepth,\n behavior,\n });\n }\n } else {\n if (reversed) {\n scrollViewRef.current?.scrollTo({\n top: totalSize - itemDepth,\n behavior,\n });\n } else {\n scrollViewRef.current?.scrollTo({\n top: itemDepth,\n behavior,\n });\n }\n }\n};\n"],"names":["scrollToItemDynamic","params","index","itemSizes","totalSize","scrollViewRef","axis","reversed","behavior","current","length","itemDepth","i","scrollTo","left","top"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAEaA;;;eAAAA;;;AAAN,MAAMA,sBAAsB,CAACC;IAClC,MAAM,EAAEC,KAAK,EAAEC,SAAS,EAAEC,SAAS,EAAEC,aAAa,EAAEC,OAAO,UAAU,EAAEC,WAAW,KAAK,EAAEC,WAAW,MAAM,EAAE,GAAGP;IAC/G,IAAI,CAACE,UAAUM,OAAO,EAAE;QACtB;IACF;IAEA,IAAIN,UAAUM,OAAO,KAAK,QAAQN,UAAUM,OAAO,CAACC,MAAM,GAAGR,OAAO;QAClE,qBAAqB;QACrB;IACF;IAEA,IAAIS,YAAY;IAChB,IAAK,IAAIC,IAAI,GAAGA,IAAIV,OAAOU,IAAK;QAC9B,IAAIA,IAAIV,OAAO;YACbS,aAAaR,UAAUM,OAAO,CAACG,EAAE;QACnC;IACF;IAEA,IAAIN,SAAS,cAAc;QACzB,IAAIC,UAAU;gBACZF;YAAAA,CAAAA,yBAAAA,cAAcI,OAAO,AAAPA,MAAO,QAArBJ,2BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,uBAAuBQ,QAAQ,CAAC;gBAC9BC,MAAMV,YAAYO;gBAClBH;YACF;QACF,OAAO;gBACLH;YAAAA,CAAAA,0BAAAA,cAAcI,OAAO,AAAPA,MAAO,QAArBJ,4BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,wBAAuBQ,QAAQ,CAAC;gBAC9BC,MAAMH;gBACNH;YACF;QACF;IACF,OAAO;QACL,IAAID,UAAU;gBACZF;YAAAA,CAAAA,0BAAAA,cAAcI,OAAO,AAAPA,MAAO,QAArBJ,4BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,wBAAuBQ,QAAQ,CAAC;gBAC9BE,KAAKX,YAAYO;gBACjBH;YACF;QACF,OAAO;gBACLH;YAAAA,CAAAA,0BAAAA,cAAcI,OAAO,AAAPA,MAAO,QAArBJ,4BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,wBAAuBQ,QAAQ,CAAC;gBAC9BE,KAAKJ;gBACLH;YACF;QACF;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './imperativeScrolling';\nexport * from './imperativeScrolling.types';\nexport * from './imperativeScrollingDynamic';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './imperativeScrolling';\nexport * from './imperativeScrolling.types';\nexport * from './imperativeScrollingDynamic';\n"],"names":[],"rangeMappings":";;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA"}
@@ -12,11 +12,11 @@ _export(exports, {
12
12
  VirtualizerContextProvider: function() {
13
13
  return VirtualizerContextProvider;
14
14
  },
15
- useVirtualizerContext_unstable: function() {
16
- return useVirtualizerContext_unstable;
17
- },
18
15
  useVirtualizerContextState_unstable: function() {
19
16
  return useVirtualizerContextState_unstable;
17
+ },
18
+ useVirtualizerContext_unstable: function() {
19
+ return useVirtualizerContext_unstable;
20
20
  }
21
21
  });
22
22
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
@@ -1 +1 @@
1
- {"version":3,"sources":["VirtualizerContext.js"],"sourcesContent":["import * as React from 'react';\nimport { useMemo, useState } from 'react';\nconst VirtualizerContext = React.createContext(undefined);\nexport const VirtualizerContextProvider = VirtualizerContext.Provider;\nexport const useVirtualizerContext_unstable = ()=>{\n return React.useContext(VirtualizerContext);\n};\nexport const useVirtualizerContextState_unstable = (passedContext)=>{\n const virtualizerContext = useVirtualizerContext_unstable();\n const [_contextIndex, _setContextIndex] = useState(-1);\n /* We respect any wrapped providers while also ensuring defaults or passed through\n * Order of usage -> Passed Prop -> Provider Context -> Internal State default\n */ const _context = useMemo(()=>{\n var _ref;\n return (_ref = passedContext !== null && passedContext !== void 0 ? passedContext : virtualizerContext) !== null && _ref !== void 0 ? _ref : {\n contextIndex: _contextIndex,\n setContextIndex: _setContextIndex\n };\n }, [\n _contextIndex,\n passedContext,\n virtualizerContext\n ]);\n const context = useMemo(()=>{\n return {\n contextIndex: _context.contextIndex,\n setContextIndex: _context.setContextIndex\n };\n }, [\n _context\n ]);\n return context;\n};\n"],"names":["VirtualizerContextProvider","useVirtualizerContext_unstable","useVirtualizerContextState_unstable","VirtualizerContext","React","createContext","undefined","Provider","useContext","passedContext","virtualizerContext","_contextIndex","_setContextIndex","useState","_context","useMemo","_ref","contextIndex","setContextIndex","context"],"mappings":";;;;;;;;;;;IAGaA,0BAA0B;eAA1BA;;IACAC,8BAA8B;eAA9BA;;IAGAC,mCAAmC;eAAnCA;;;;iEAPU;AAEvB,MAAMC,mCAAqBC,OAAMC,aAAa,CAACC;AACxC,MAAMN,6BAA6BG,mBAAmBI,QAAQ;AAC9D,MAAMN,iCAAiC;IAC1C,OAAOG,OAAMI,UAAU,CAACL;AAC5B;AACO,MAAMD,sCAAsC,CAACO;IAChD,MAAMC,qBAAqBT;IAC3B,MAAM,CAACU,eAAeC,iBAAiB,GAAGC,IAAAA,eAAQ,EAAC,CAAC;IACpD;;GAED,GAAG,MAAMC,WAAWC,IAAAA,cAAO,EAAC;QACvB,IAAIC;QACJ,OAAO,AAACA,CAAAA,OAAOP,kBAAkB,QAAQA,kBAAkB,KAAK,IAAIA,gBAAgBC,kBAAiB,MAAO,QAAQM,SAAS,KAAK,IAAIA,OAAO;YACzIC,cAAcN;YACdO,iBAAiBN;QACrB;IACJ,GAAG;QACCD;QACAF;QACAC;KACH;IACD,MAAMS,UAAUJ,IAAAA,cAAO,EAAC;QACpB,OAAO;YACHE,cAAcH,SAASG,YAAY;YACnCC,iBAAiBJ,SAASI,eAAe;QAC7C;IACJ,GAAG;QACCJ;KACH;IACD,OAAOK;AACX"}
1
+ {"version":3,"sources":["VirtualizerContext.ts"],"sourcesContent":["import * as React from 'react';\nimport type { VirtualizerContextProps } from './types';\nimport { useMemo, useState } from 'react';\n\nconst VirtualizerContext = React.createContext<VirtualizerContextProps | undefined>(\n undefined,\n) as React.Context<VirtualizerContextProps>;\n\nexport const VirtualizerContextProvider = VirtualizerContext.Provider;\n\nexport const useVirtualizerContext_unstable = () => {\n return React.useContext(VirtualizerContext);\n};\n\nexport const useVirtualizerContextState_unstable = (\n passedContext?: VirtualizerContextProps,\n): VirtualizerContextProps => {\n const virtualizerContext = useVirtualizerContext_unstable();\n const [_contextIndex, _setContextIndex] = useState<number>(-1);\n\n /* We respect any wrapped providers while also ensuring defaults or passed through\n * Order of usage -> Passed Prop -> Provider Context -> Internal State default\n */\n const _context = useMemo(\n () => passedContext ?? virtualizerContext ?? { contextIndex: _contextIndex, setContextIndex: _setContextIndex },\n [_contextIndex, passedContext, virtualizerContext],\n );\n const context = useMemo(() => {\n return { contextIndex: _context.contextIndex, setContextIndex: _context.setContextIndex };\n }, [_context]);\n\n return context;\n};\n"],"names":["VirtualizerContextProvider","useVirtualizerContextState_unstable","useVirtualizerContext_unstable","VirtualizerContext","React","createContext","undefined","Provider","useContext","passedContext","virtualizerContext","_contextIndex","_setContextIndex","useState","_context","useMemo","contextIndex","setContextIndex","context"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAQaA,0BAAAA;eAAAA;;IAMAC,mCAAAA;eAAAA;;IAJAC,8BAAAA;eAAAA;;;;iEAVU;AAIvB,MAAMC,mCAAqBC,OAAMC,aAAa,CAC5CC;AAGK,MAAMN,6BAA6BG,mBAAmBI,QAAQ;AAE9D,MAAML,iCAAiC;IAC5C,OAAOE,OAAMI,UAAU,CAACL;AAC1B;AAEO,MAAMF,sCAAsC,CACjDQ;IAEA,MAAMC,qBAAqBR;IAC3B,MAAM,CAACS,eAAeC,iBAAiB,GAAGC,IAAAA,eAAAA,EAAiB,CAAC;IAE5D;;GAEC,GACD,MAAMC,WAAWC,IAAAA,cAAAA,EACf;YAAMN;eAAAA,CAAAA,OAAAA,kBAAAA,QAAAA,kBAAAA,KAAAA,IAAAA,gBAAiBC,kBAAAA,MAAAA,QAAjBD,SAAAA,KAAAA,IAAAA,OAAuC;YAAEO,cAAcL;YAAeM,iBAAiBL;QAAiB;IAAA,GAC9G;QAACD;QAAeF;QAAeC;KAAmB;IAEpD,MAAMQ,UAAUH,IAAAA,cAAAA,EAAQ;QACtB,OAAO;YAAEC,cAAcF,SAASE,YAAY;YAAEC,iBAAiBH,SAASG,eAAe;QAAC;IAC1F,GAAG;QAACH;KAAS;IAEb,OAAOI;AACT"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './VirtualizerContext';\nexport * from './types';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './VirtualizerContext';\nexport * from './types';\n"],"names":[],"rangeMappings":";;;;;;","mappings":";;;;;uBAAc;uBACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["types.js"],"sourcesContent":["/**\n * {@docCategory Virtualizer}\n */ export { };\n"],"names":[],"mappings":"AAAA;;CAEC"}
1
+ {"version":3,"sources":["types.ts"],"sourcesContent":["/**\n * {@docCategory Virtualizer}\n */\nexport type VirtualizerContextProps = {\n contextIndex: number;\n setContextIndex: (index: number) => void;\n};\n"],"names":[],"rangeMappings":";;","mappings":"AAAA;;CAEC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["createResizeObserverFromDocument.js"],"sourcesContent":["/**\n * FIXME - TS 3.8/3.9 don't have ResizeObserver types by default, move this to a shared utility once we bump the minbar\n * A utility method that creates a ResizeObserver from a target document\n * @param targetDocument - document to use to create the ResizeObserver\n * @param callback - https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback\n * @returns a ResizeObserver instance or null if the global does not exist on the document\n */ export function createResizeObserverFromDocument(targetDocument, callback) {\n var _targetDocument_defaultView;\n if (!(targetDocument === null || targetDocument === void 0 ? void 0 : (_targetDocument_defaultView = targetDocument.defaultView) === null || _targetDocument_defaultView === void 0 ? void 0 : _targetDocument_defaultView.ResizeObserver)) {\n return null;\n }\n return new targetDocument.defaultView.ResizeObserver(callback);\n}\n"],"names":["createResizeObserverFromDocument","targetDocument","callback","_targetDocument_defaultView","defaultView","ResizeObserver"],"mappings":"AAAA;;;;;;CAMC;;;;+BAAmBA;;;eAAAA;;;AAAT,SAASA,iCAAiCC,cAAc,EAAEC,QAAQ;IACzE,IAAIC;IACJ,IAAI,CAAEF,CAAAA,mBAAmB,QAAQA,mBAAmB,KAAK,IAAI,KAAK,IAAI,AAACE,CAAAA,8BAA8BF,eAAeG,WAAW,AAAD,MAAO,QAAQD,gCAAgC,KAAK,IAAI,KAAK,IAAIA,4BAA4BE,cAAc,AAAD,GAAI;QACxO,OAAO;IACX;IACA,OAAO,IAAIJ,eAAeG,WAAW,CAACC,cAAc,CAACH;AACzD"}
1
+ {"version":3,"sources":["createResizeObserverFromDocument.ts"],"sourcesContent":["/**\n * FIXME - TS 3.8/3.9 don't have ResizeObserver types by default, move this to a shared utility once we bump the minbar\n * A utility method that creates a ResizeObserver from a target document\n * @param targetDocument - document to use to create the ResizeObserver\n * @param callback - https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback\n * @returns a ResizeObserver instance or null if the global does not exist on the document\n */\nexport function createResizeObserverFromDocument(\n targetDocument: Document | null | undefined,\n callback: ResizeObserverCallback,\n) {\n if (!targetDocument?.defaultView?.ResizeObserver) {\n return null;\n }\n\n return new targetDocument.defaultView.ResizeObserver(callback);\n}\n"],"names":["createResizeObserverFromDocument","targetDocument","callback","defaultView","ResizeObserver"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;;;;;CAMC;;;;+BACeA;;;eAAAA;;;AAAT,SAASA,iCACdC,cAA2C,EAC3CC,QAAgC;QAE3BD;IAAL,IAAI,CAACA,CAAAA,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,CAAAA,8BAAAA,eAAgBE,WAAW,AAAXA,MAAW,QAA3BF,gCAAAA,KAAAA,IAAAA,KAAAA,IAAAA,4BAA6BG,cAAc,AAAdA,GAAgB;QAChD,OAAO;IACT;IAEA,OAAO,IAAIH,eAAeE,WAAW,CAACC,cAAc,CAACF;AACvD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["debounce.js"],"sourcesContent":["/**\n * Microtask debouncer\n * https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API/Microtask_guide\n * @param fn - Function to debounce\n * @returns debounced function\n */ export function debounce(fn) {\n let pending;\n return ()=>{\n if (!pending) {\n pending = true;\n queueMicrotask(()=>{\n // Need to set pending to `false` before the debounced function is run.\n // React can actually interrupt the function while it's running!\n pending = false;\n fn();\n });\n }\n };\n}\n"],"names":["debounce","fn","pending","queueMicrotask"],"mappings":"AAAA;;;;;CAKC;;;;+BAAmBA;;;eAAAA;;;AAAT,SAASA,SAASC,EAAE;IAC3B,IAAIC;IACJ,OAAO;QACH,IAAI,CAACA,SAAS;YACVA,UAAU;YACVC,eAAe;gBACX,uEAAuE;gBACvE,gEAAgE;gBAChED,UAAU;gBACVD;YACJ;QACJ;IACJ;AACJ"}
1
+ {"version":3,"sources":["debounce.ts"],"sourcesContent":["/**\n * Microtask debouncer\n * https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API/Microtask_guide\n * @param fn - Function to debounce\n * @returns debounced function\n */\nexport function debounce(fn: Function) {\n let pending: boolean;\n return () => {\n if (!pending) {\n pending = true;\n queueMicrotask(() => {\n // Need to set pending to `false` before the debounced function is run.\n // React can actually interrupt the function while it's running!\n pending = false;\n fn();\n });\n }\n };\n}\n"],"names":["debounce","fn","pending","queueMicrotask"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;;;;CAKC;;;;+BACeA;;;eAAAA;;;AAAT,SAASA,SAASC,EAAY;IACnC,IAAIC;IACJ,OAAO;QACL,IAAI,CAACA,SAAS;YACZA,UAAU;YACVC,eAAe;gBACb,uEAAuE;gBACvE,gEAAgE;gBAChED,UAAU;gBACVD;YACF;QACF;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './VirtualizerContext';\nexport * from './ImperativeScrolling';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './VirtualizerContext';\nexport * from './ImperativeScrolling';\n"],"names":[],"rangeMappings":";;;;;;","mappings":";;;;;uBAAc;uBACA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-virtualizer",
3
- "version": "9.0.0-alpha.80",
3
+ "version": "9.0.0-alpha.81",
4
4
  "description": "Generic and composable virtualizer framework built on browser intersection observer",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -31,9 +31,9 @@
31
31
  "@fluentui/scripts-tasks": "*"
32
32
  },
33
33
  "dependencies": {
34
- "@fluentui/react-jsx-runtime": "^9.0.40",
35
- "@fluentui/react-utilities": "^9.18.11",
36
- "@fluentui/react-shared-contexts": "^9.19.0",
34
+ "@fluentui/react-jsx-runtime": "^9.0.41",
35
+ "@fluentui/react-utilities": "^9.18.12",
36
+ "@fluentui/react-shared-contexts": "^9.19.1",
37
37
  "@griffel/react": "^1.5.22",
38
38
  "@swc/helpers": "^0.5.1"
39
39
  },