@astral/ui 4.105.0 → 4.106.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 (247) hide show
  1. package/components/ActionCellBase/ActionCellBase.js +10 -1
  2. package/components/ActionCellBase/MainAction/MainAction.js +6 -0
  3. package/components/ActionCellBase/MainAction/MainIconButton/MainIconButton.js +7 -4
  4. package/components/ActionCellBase/MainAction/MainIconButton/constants.d.ts +3 -0
  5. package/components/ActionCellBase/MainAction/MainIconButton/constants.js +4 -0
  6. package/components/ActionCellBase/MainAction/MainIconButton/styles.d.ts +11 -0
  7. package/components/ActionCellBase/MainAction/MainIconButton/styles.js +9 -0
  8. package/components/ActionCellBase/MainAction/MobileMainButton/MobileMainButton.d.ts +14 -0
  9. package/components/ActionCellBase/MainAction/MobileMainButton/MobileMainButton.js +17 -0
  10. package/components/ActionCellBase/MainAction/MobileMainButton/index.d.ts +1 -0
  11. package/components/ActionCellBase/MainAction/MobileMainButton/index.js +1 -0
  12. package/components/ActionCellBase/MainAction/MobileMainButton/styles.d.ts +11 -0
  13. package/components/ActionCellBase/MainAction/MobileMainButton/styles.js +7 -0
  14. package/components/ActionCellBase/SecondaryAction/SecondaryAction.js +2 -2
  15. package/components/ActionCellBase/SecondaryAction/styles.d.ts +4 -0
  16. package/components/ActionCellBase/SecondaryAction/styles.js +9 -0
  17. package/components/ActionCellBase/constants.d.ts +4 -0
  18. package/components/ActionCellBase/constants.js +5 -0
  19. package/components/ActionCellBase/styles.js +11 -0
  20. package/components/ActionCellBase/types.d.ts +25 -0
  21. package/components/InfiniteTreeList/InfiniteTreeList.js +16 -2
  22. package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.d.ts +4 -0
  23. package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.js +1 -0
  24. package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.d.ts +2 -2
  25. package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.js +3 -1
  26. package/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/styles.js +8 -0
  27. package/components/InfiniteTreeList/InfiniteTreeListItem/InfiniteTreeListItem.js +7 -4
  28. package/components/InfiniteTreeList/InfiniteTreeListItem/constants.d.ts +2 -0
  29. package/components/InfiniteTreeList/InfiniteTreeListItem/constants.js +2 -0
  30. package/components/InfiniteTreeList/InfiniteTreeListItem/index.d.ts +1 -0
  31. package/components/InfiniteTreeList/InfiniteTreeListItem/index.js +1 -0
  32. package/components/InfiniteTreeList/InfiniteTreeListItem/styles.d.ts +14 -0
  33. package/components/InfiniteTreeList/InfiniteTreeListItem/styles.js +66 -2
  34. package/components/InfiniteTreeList/LevelHeader/LevelHeader.d.ts +5 -0
  35. package/components/InfiniteTreeList/LevelHeader/LevelHeader.js +17 -0
  36. package/components/InfiniteTreeList/LevelHeader/constants.d.ts +3 -0
  37. package/components/InfiniteTreeList/LevelHeader/constants.js +3 -0
  38. package/components/InfiniteTreeList/LevelHeader/index.d.ts +2 -0
  39. package/components/InfiniteTreeList/LevelHeader/index.js +2 -0
  40. package/components/InfiniteTreeList/LevelHeader/styles.d.ts +365 -0
  41. package/components/InfiniteTreeList/LevelHeader/styles.js +51 -0
  42. package/components/InfiniteTreeList/LevelHeader/types.d.ts +14 -0
  43. package/components/InfiniteTreeList/LevelHeader/types.js +1 -0
  44. package/components/InfiniteTreeList/ListFooter/styles.js +8 -0
  45. package/components/InfiniteTreeList/OnTopButton/styles.js +7 -0
  46. package/components/InfiniteTreeList/ParentItems/Item/Item.js +10 -2
  47. package/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.d.ts +1 -0
  48. package/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.js +10 -2
  49. package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/NoDataRow.js +2 -2
  50. package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/styles.d.ts +3 -0
  51. package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/styles.js +11 -0
  52. package/components/InfiniteTreeList/TreeItem/TreeItem.js +6 -3
  53. package/components/InfiniteTreeList/TreeItem/styles.js +19 -0
  54. package/components/InfiniteTreeList/TreeItem/useLogic/useLogic.d.ts +2 -1
  55. package/components/InfiniteTreeList/TreeItem/useLogic/useLogic.js +5 -4
  56. package/components/InfiniteTreeList/constants.d.ts +21 -0
  57. package/components/InfiniteTreeList/constants.js +21 -0
  58. package/components/InfiniteTreeList/hooks/index.d.ts +2 -0
  59. package/components/InfiniteTreeList/hooks/index.js +2 -0
  60. package/components/InfiniteTreeList/hooks/useLevelNavigation/index.d.ts +2 -0
  61. package/components/InfiniteTreeList/hooks/useLevelNavigation/index.js +2 -0
  62. package/components/InfiniteTreeList/hooks/useLevelNavigation/types.d.ts +15 -0
  63. package/components/InfiniteTreeList/hooks/useLevelNavigation/types.js +1 -0
  64. package/components/InfiniteTreeList/hooks/useLevelNavigation/useLevelNavigation.d.ts +15 -0
  65. package/components/InfiniteTreeList/hooks/useLevelNavigation/useLevelNavigation.js +48 -0
  66. package/components/InfiniteTreeList/hooks/useListScroll/hooks/index.d.ts +3 -0
  67. package/components/InfiniteTreeList/hooks/useListScroll/hooks/index.js +3 -0
  68. package/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/index.d.ts +2 -0
  69. package/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/index.js +2 -0
  70. package/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/types.d.ts +16 -0
  71. package/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/types.js +1 -0
  72. package/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/useLevelSnapshots.d.ts +12 -0
  73. package/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/useLevelSnapshots.js +42 -0
  74. package/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/index.d.ts +2 -0
  75. package/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/index.js +2 -0
  76. package/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/types.d.ts +12 -0
  77. package/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/types.js +1 -0
  78. package/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/useScrollToTopButton.d.ts +15 -0
  79. package/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/useScrollToTopButton.js +27 -0
  80. package/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/index.d.ts +2 -0
  81. package/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/index.js +2 -0
  82. package/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/types.d.ts +11 -0
  83. package/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/types.js +1 -0
  84. package/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/useTailWatcher.d.ts +12 -0
  85. package/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/useTailWatcher.js +39 -0
  86. package/components/InfiniteTreeList/hooks/useListScroll/types.d.ts +14 -2
  87. package/components/InfiniteTreeList/hooks/useListScroll/useListScroll.d.ts +9 -6
  88. package/components/InfiniteTreeList/hooks/useListScroll/useListScroll.js +192 -28
  89. package/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/getOffsetTop.d.ts +4 -0
  90. package/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/getOffsetTop.js +6 -0
  91. package/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/index.d.ts +1 -0
  92. package/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/index.js +1 -0
  93. package/components/InfiniteTreeList/hooks/useListScroll/utils/index.d.ts +1 -0
  94. package/components/InfiniteTreeList/hooks/useListScroll/utils/index.js +1 -0
  95. package/components/InfiniteTreeList/hooks/useNodeTitleValidation/index.d.ts +2 -0
  96. package/components/InfiniteTreeList/hooks/useNodeTitleValidation/index.js +2 -0
  97. package/components/InfiniteTreeList/hooks/useNodeTitleValidation/types.d.ts +14 -0
  98. package/components/InfiniteTreeList/hooks/useNodeTitleValidation/types.js +1 -0
  99. package/components/InfiniteTreeList/hooks/useNodeTitleValidation/useNodeTitleValidation.d.ts +5 -0
  100. package/components/InfiniteTreeList/hooks/useNodeTitleValidation/useNodeTitleValidation.js +18 -0
  101. package/components/InfiniteTreeList/styles.d.ts +5 -0
  102. package/components/InfiniteTreeList/styles.js +41 -0
  103. package/components/InfiniteTreeList/types.d.ts +4 -0
  104. package/components/InfiniteTreeList/useLogic/useLogic.d.ts +13 -5
  105. package/components/InfiniteTreeList/useLogic/useLogic.js +165 -27
  106. package/components/InfiniteTreeList/utils/checkHasFooterContent/checkHasFooterContent.d.ts +5 -0
  107. package/components/InfiniteTreeList/utils/checkHasFooterContent/checkHasFooterContent.js +4 -0
  108. package/components/InfiniteTreeList/utils/checkHasFooterContent/index.d.ts +1 -0
  109. package/components/InfiniteTreeList/utils/checkHasFooterContent/index.js +1 -0
  110. package/components/InfiniteTreeList/utils/checkHasNested/checkHasNested.d.ts +6 -0
  111. package/components/InfiniteTreeList/utils/checkHasNested/checkHasNested.js +5 -0
  112. package/components/InfiniteTreeList/utils/checkHasNested/index.d.ts +1 -0
  113. package/components/InfiniteTreeList/utils/checkHasNested/index.js +1 -0
  114. package/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.d.ts +8 -3
  115. package/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.js +30 -12
  116. package/components/InfiniteTreeList/utils/flattenTree/flattenTree.js +2 -1
  117. package/components/InfiniteTreeList/utils/getLevelKey/getLevelKey.d.ts +4 -0
  118. package/components/InfiniteTreeList/utils/getLevelKey/getLevelKey.js +5 -0
  119. package/components/InfiniteTreeList/utils/getLevelKey/index.d.ts +1 -0
  120. package/components/InfiniteTreeList/utils/getLevelKey/index.js +1 -0
  121. package/components/InfiniteTreeList/utils/index.d.ts +3 -0
  122. package/components/InfiniteTreeList/utils/index.js +3 -0
  123. package/components/useScrollManagement/useScrollManagement.js +7 -6
  124. package/node/components/ActionCellBase/ActionCellBase.js +10 -1
  125. package/node/components/ActionCellBase/MainAction/MainAction.js +6 -0
  126. package/node/components/ActionCellBase/MainAction/MainIconButton/MainIconButton.js +7 -4
  127. package/node/components/ActionCellBase/MainAction/MainIconButton/constants.d.ts +3 -0
  128. package/node/components/ActionCellBase/MainAction/MainIconButton/constants.js +7 -0
  129. package/node/components/ActionCellBase/MainAction/MainIconButton/styles.d.ts +11 -0
  130. package/node/components/ActionCellBase/MainAction/MainIconButton/styles.js +12 -0
  131. package/node/components/ActionCellBase/MainAction/MobileMainButton/MobileMainButton.d.ts +14 -0
  132. package/node/components/ActionCellBase/MainAction/MobileMainButton/MobileMainButton.js +21 -0
  133. package/node/components/ActionCellBase/MainAction/MobileMainButton/index.d.ts +1 -0
  134. package/node/components/ActionCellBase/MainAction/MobileMainButton/index.js +17 -0
  135. package/node/components/ActionCellBase/MainAction/MobileMainButton/styles.d.ts +11 -0
  136. package/node/components/ActionCellBase/MainAction/MobileMainButton/styles.js +10 -0
  137. package/node/components/ActionCellBase/SecondaryAction/SecondaryAction.js +2 -2
  138. package/node/components/ActionCellBase/SecondaryAction/styles.d.ts +4 -0
  139. package/node/components/ActionCellBase/SecondaryAction/styles.js +12 -0
  140. package/node/components/ActionCellBase/constants.d.ts +4 -0
  141. package/node/components/ActionCellBase/constants.js +8 -0
  142. package/node/components/ActionCellBase/styles.js +11 -0
  143. package/node/components/ActionCellBase/types.d.ts +25 -0
  144. package/node/components/InfiniteTreeList/InfiniteTreeList.js +16 -2
  145. package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.d.ts +4 -0
  146. package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.js +1 -0
  147. package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.d.ts +2 -2
  148. package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.js +3 -1
  149. package/node/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/styles.js +8 -0
  150. package/node/components/InfiniteTreeList/InfiniteTreeListItem/InfiniteTreeListItem.js +6 -3
  151. package/node/components/InfiniteTreeList/InfiniteTreeListItem/constants.d.ts +2 -0
  152. package/node/components/InfiniteTreeList/InfiniteTreeListItem/constants.js +2 -0
  153. package/node/components/InfiniteTreeList/InfiniteTreeListItem/index.d.ts +1 -0
  154. package/node/components/InfiniteTreeList/InfiniteTreeListItem/index.js +3 -0
  155. package/node/components/InfiniteTreeList/InfiniteTreeListItem/styles.d.ts +14 -0
  156. package/node/components/InfiniteTreeList/InfiniteTreeListItem/styles.js +67 -3
  157. package/node/components/InfiniteTreeList/LevelHeader/LevelHeader.d.ts +5 -0
  158. package/node/components/InfiniteTreeList/LevelHeader/LevelHeader.js +21 -0
  159. package/node/components/InfiniteTreeList/LevelHeader/constants.d.ts +3 -0
  160. package/node/components/InfiniteTreeList/LevelHeader/constants.js +6 -0
  161. package/node/components/InfiniteTreeList/LevelHeader/index.d.ts +2 -0
  162. package/node/components/InfiniteTreeList/LevelHeader/index.js +18 -0
  163. package/node/components/InfiniteTreeList/LevelHeader/styles.d.ts +365 -0
  164. package/node/components/InfiniteTreeList/LevelHeader/styles.js +54 -0
  165. package/node/components/InfiniteTreeList/LevelHeader/types.d.ts +14 -0
  166. package/node/components/InfiniteTreeList/LevelHeader/types.js +2 -0
  167. package/node/components/InfiniteTreeList/ListFooter/styles.js +8 -0
  168. package/node/components/InfiniteTreeList/OnTopButton/styles.js +7 -0
  169. package/node/components/InfiniteTreeList/ParentItems/Item/Item.js +10 -2
  170. package/node/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.d.ts +1 -0
  171. package/node/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.js +10 -2
  172. package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/NoDataRow.js +2 -2
  173. package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/styles.d.ts +3 -0
  174. package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/styles.js +14 -0
  175. package/node/components/InfiniteTreeList/TreeItem/TreeItem.js +6 -3
  176. package/node/components/InfiniteTreeList/TreeItem/styles.js +19 -0
  177. package/node/components/InfiniteTreeList/TreeItem/useLogic/useLogic.d.ts +2 -1
  178. package/node/components/InfiniteTreeList/TreeItem/useLogic/useLogic.js +4 -3
  179. package/node/components/InfiniteTreeList/constants.d.ts +21 -0
  180. package/node/components/InfiniteTreeList/constants.js +22 -1
  181. package/node/components/InfiniteTreeList/hooks/index.d.ts +2 -0
  182. package/node/components/InfiniteTreeList/hooks/index.js +2 -0
  183. package/node/components/InfiniteTreeList/hooks/useLevelNavigation/index.d.ts +2 -0
  184. package/node/components/InfiniteTreeList/hooks/useLevelNavigation/index.js +18 -0
  185. package/node/components/InfiniteTreeList/hooks/useLevelNavigation/types.d.ts +15 -0
  186. package/node/components/InfiniteTreeList/hooks/useLevelNavigation/types.js +2 -0
  187. package/node/components/InfiniteTreeList/hooks/useLevelNavigation/useLevelNavigation.d.ts +15 -0
  188. package/node/components/InfiniteTreeList/hooks/useLevelNavigation/useLevelNavigation.js +52 -0
  189. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/index.d.ts +3 -0
  190. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/index.js +19 -0
  191. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/index.d.ts +2 -0
  192. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/index.js +18 -0
  193. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/types.d.ts +16 -0
  194. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/types.js +2 -0
  195. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/useLevelSnapshots.d.ts +12 -0
  196. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useLevelSnapshots/useLevelSnapshots.js +46 -0
  197. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/index.d.ts +2 -0
  198. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/index.js +18 -0
  199. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/types.d.ts +12 -0
  200. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/types.js +2 -0
  201. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/useScrollToTopButton.d.ts +15 -0
  202. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useScrollToTopButton/useScrollToTopButton.js +31 -0
  203. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/index.d.ts +2 -0
  204. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/index.js +18 -0
  205. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/types.d.ts +11 -0
  206. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/types.js +2 -0
  207. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/useTailWatcher.d.ts +12 -0
  208. package/node/components/InfiniteTreeList/hooks/useListScroll/hooks/useTailWatcher/useTailWatcher.js +43 -0
  209. package/node/components/InfiniteTreeList/hooks/useListScroll/types.d.ts +14 -2
  210. package/node/components/InfiniteTreeList/hooks/useListScroll/useListScroll.d.ts +9 -6
  211. package/node/components/InfiniteTreeList/hooks/useListScroll/useListScroll.js +190 -26
  212. package/node/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/getOffsetTop.d.ts +4 -0
  213. package/node/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/getOffsetTop.js +10 -0
  214. package/node/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/index.d.ts +1 -0
  215. package/node/components/InfiniteTreeList/hooks/useListScroll/utils/getOffsetTop/index.js +17 -0
  216. package/node/components/InfiniteTreeList/hooks/useListScroll/utils/index.d.ts +1 -0
  217. package/node/components/InfiniteTreeList/hooks/useListScroll/utils/index.js +17 -0
  218. package/node/components/InfiniteTreeList/hooks/useNodeTitleValidation/index.d.ts +2 -0
  219. package/node/components/InfiniteTreeList/hooks/useNodeTitleValidation/index.js +18 -0
  220. package/node/components/InfiniteTreeList/hooks/useNodeTitleValidation/types.d.ts +14 -0
  221. package/node/components/InfiniteTreeList/hooks/useNodeTitleValidation/types.js +2 -0
  222. package/node/components/InfiniteTreeList/hooks/useNodeTitleValidation/useNodeTitleValidation.d.ts +5 -0
  223. package/node/components/InfiniteTreeList/hooks/useNodeTitleValidation/useNodeTitleValidation.js +22 -0
  224. package/node/components/InfiniteTreeList/styles.d.ts +5 -0
  225. package/node/components/InfiniteTreeList/styles.js +44 -0
  226. package/node/components/InfiniteTreeList/types.d.ts +4 -0
  227. package/node/components/InfiniteTreeList/useLogic/useLogic.d.ts +13 -5
  228. package/node/components/InfiniteTreeList/useLogic/useLogic.js +162 -24
  229. package/node/components/InfiniteTreeList/utils/checkHasFooterContent/checkHasFooterContent.d.ts +5 -0
  230. package/node/components/InfiniteTreeList/utils/checkHasFooterContent/checkHasFooterContent.js +8 -0
  231. package/node/components/InfiniteTreeList/utils/checkHasFooterContent/index.d.ts +1 -0
  232. package/node/components/InfiniteTreeList/utils/checkHasFooterContent/index.js +17 -0
  233. package/node/components/InfiniteTreeList/utils/checkHasNested/checkHasNested.d.ts +6 -0
  234. package/node/components/InfiniteTreeList/utils/checkHasNested/checkHasNested.js +9 -0
  235. package/node/components/InfiniteTreeList/utils/checkHasNested/index.d.ts +1 -0
  236. package/node/components/InfiniteTreeList/utils/checkHasNested/index.js +17 -0
  237. package/node/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.d.ts +8 -3
  238. package/node/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.js +30 -12
  239. package/node/components/InfiniteTreeList/utils/flattenTree/flattenTree.js +2 -1
  240. package/node/components/InfiniteTreeList/utils/getLevelKey/getLevelKey.d.ts +4 -0
  241. package/node/components/InfiniteTreeList/utils/getLevelKey/getLevelKey.js +9 -0
  242. package/node/components/InfiniteTreeList/utils/getLevelKey/index.d.ts +1 -0
  243. package/node/components/InfiniteTreeList/utils/getLevelKey/index.js +17 -0
  244. package/node/components/InfiniteTreeList/utils/index.d.ts +3 -0
  245. package/node/components/InfiniteTreeList/utils/index.js +3 -0
  246. package/node/components/useScrollManagement/useScrollManagement.js +6 -5
  247. package/package.json +1 -1
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useLogic = void 0;
4
4
  const react_1 = require("react");
5
5
  const ConfigProvider_1 = require("../../ConfigProvider");
6
+ const useViewportType_1 = require("../../useViewportType");
6
7
  const constants_1 = require("../constants");
7
8
  const hooks_1 = require("../hooks");
8
9
  const utils_1 = require("../utils");
@@ -12,6 +13,7 @@ const utils_1 = require("../utils");
12
13
  */
13
14
  const useLogic = ({ initialExpandedLevel, items, onRetry, errorMsg, isError, isLoading, scrollRef, isEndReached, onLoadMore, renderItem, renderParent, itemSkeleton, endOfScrollMsg, noDataImgSrc, errorImgSrc, }) => {
14
15
  const { imagesMap } = (0, react_1.useContext)(ConfigProvider_1.ConfigContext);
16
+ const { isMobile } = (0, useViewportType_1.useViewportType)();
15
17
  const enterAnimation = (0, hooks_1.useEnterAnimation)();
16
18
  const parentSlotsRef = (0, react_1.useRef)(null);
17
19
  if (!parentSlotsRef.current) {
@@ -28,6 +30,7 @@ const useLogic = ({ initialExpandedLevel, items, onRetry, errorMsg, isError, isL
28
30
  enterAnimation,
29
31
  onCollapse: resetExpandNotification,
30
32
  });
33
+ const skeletonCount = itemSkeleton ? constants_1.CHILDREN_SKELETON_COUNT : 1;
31
34
  const { registerChildren, nodePaginationMap, parentItems } = (0, hooks_1.useChildrenState)({
32
35
  items,
33
36
  flatList,
@@ -37,49 +40,185 @@ const useLogic = ({ initialExpandedLevel, items, onRetry, errorMsg, isError, isL
37
40
  enterAnimation,
38
41
  insertChildren,
39
42
  syncChildrenPlaceholders,
40
- skeletonCount: itemSkeleton ? constants_1.CHILDREN_SKELETON_COUNT : 1,
43
+ skeletonCount,
41
44
  releaseParentSlot,
42
45
  });
43
- const { scrollParent, tailRegistry, isEndReachedWithScroll, virtuosoProps, onTopButtonProps, } = (0, hooks_1.useListScroll)({
46
+ const checkNodeExists = (0, react_1.useCallback)((nodeId) => flatList.some(({ id }) => id === nodeId), [flatList]);
47
+ const { currentNodeId, baseNodeId, activeLevelKeys, hasUpperLevel, isRootLevel, enterNode, leaveNode, } = (0, hooks_1.useLevelNavigation)({ items, isMobile, checkNodeExists });
48
+ const isBaseNodeExpanded = Boolean(baseNodeId && expandedIds.has(baseNodeId));
49
+ // Если корневой узел 1, то базовым уровнем становятся его дочерние элементы на
50
+ // мобильных устройствах
51
+ (0, react_1.useEffect)(() => {
52
+ if (!isMobile || !baseNodeId || isBaseNodeExpanded) {
53
+ return;
54
+ }
55
+ onToggle({ id: baseNodeId });
56
+ }, [isMobile, baseNodeId, isBaseNodeExpanded, onToggle]);
57
+ const currentNode = (0, react_1.useMemo)(() => {
58
+ if (!currentNodeId) {
59
+ return undefined;
60
+ }
61
+ return flatList.find(({ id }) => id === currentNodeId);
62
+ }, [currentNodeId, flatList]);
63
+ const levelTitle = currentNode?.title;
64
+ (0, hooks_1.useNodeTitleValidation)({
65
+ isMobile,
66
+ currentNodeId: currentNode?.id,
67
+ title: levelTitle,
68
+ });
69
+ const displayedList = (0, react_1.useMemo)(() => {
70
+ if (!isMobile) {
71
+ return flatList;
72
+ }
73
+ if (!currentNodeId) {
74
+ return flatList.filter((item) => item.meta.level === 0);
75
+ }
76
+ return flatList.filter((item) => item.meta.parentId === currentNodeId);
77
+ }, [isMobile, flatList, currentNodeId]);
78
+ // Уровни живут только на мобильной ширине
79
+ const levelKey = (0, utils_1.getLevelKey)(isMobile ? currentNodeId : undefined);
80
+ const { scrollParent, listRef, tailRegistry, isEndReachedWithScroll, virtuosoProps, onTopButtonProps, saveLevelSnapshot, dropLevelSnapshot, } = (0, hooks_1.useListScroll)({
44
81
  scrollRef,
45
82
  isEndReached,
46
83
  onLoadMore,
47
- flatListRef,
84
+ displayedList,
48
85
  enterAnimation,
86
+ isRootLevel,
87
+ levelKey,
88
+ activeLevelKeys,
49
89
  });
50
- const contentStateProps = (0, react_1.useMemo)(() => {
51
- const isNoData = !items?.length;
52
- return {
53
- // Проверка на текущие элементы списка необходима для рендера loading состояния при подгрузке данных
54
- // вместо общего LoadingPlaceholder на всю страницу
55
- isLoading: isNoData && isLoading,
56
- isError: isNoData && isError,
57
- loadingTitle: 'Загрузка данных',
58
- errorState: {
59
- imgAlt: 'Что-то пошло не так',
60
- errorList: [errorMsg || ''],
61
- imgSrc: errorImgSrc ?? imagesMap.defaultErrorImgSrc,
62
- onRetry,
63
- },
64
- };
65
- }, [items, isLoading, isError, errorMsg, errorImgSrc, onRetry, imagesMap]);
90
+ // Смена уровня — не появление строк, анимировать их не нужно
91
+ const prevLevelKeyRef = (0, react_1.useRef)(levelKey);
92
+ (0, react_1.useEffect)(() => {
93
+ if (prevLevelKeyRef.current === levelKey) {
94
+ return;
95
+ }
96
+ prevLevelKeyRef.current = levelKey;
97
+ enterAnimation.reset();
98
+ }, [levelKey, enterAnimation]);
99
+ const prepareNodeChildren = (0, react_1.useCallback)((listItem) => {
100
+ if (!expandedIdsRef.current.has(listItem.id)) {
101
+ onToggle(listItem);
102
+ }
103
+ const hasChildrenInList = Boolean(listItem.children?.length) ||
104
+ (0, utils_1.countDirectChildren)(flatListRef.current, listItem.id) > 0;
105
+ if (!hasChildrenInList) {
106
+ syncChildrenPlaceholders(listItem.id, true, skeletonCount);
107
+ }
108
+ }, [
109
+ onToggle,
110
+ flatListRef,
111
+ expandedIdsRef,
112
+ syncChildrenPlaceholders,
113
+ skeletonCount,
114
+ ]);
115
+ // На мобильной ширине дети узла открываются отдельным уровнем
116
+ const handleEnterNode = (0, react_1.useCallback)((item) => {
117
+ const listItem = flatListRef.current.find(({ id }) => id === item.id);
118
+ if (!listItem?.meta.hasNested) {
119
+ return;
120
+ }
121
+ prepareNodeChildren(listItem);
122
+ // Открытие уровня — не появление строк, анимировать их не нужно
123
+ enterAnimation.reset();
124
+ saveLevelSnapshot();
125
+ // Переход внутрь узла показывает уровень с начала
126
+ dropLevelSnapshot((0, utils_1.getLevelKey)(item.id));
127
+ enterNode(item.id);
128
+ }, [
129
+ flatListRef,
130
+ prepareNodeChildren,
131
+ enterAnimation,
132
+ saveLevelSnapshot,
133
+ dropLevelSnapshot,
134
+ enterNode,
135
+ ]);
136
+ const handleToggle = (0, react_1.useCallback)((item) => {
137
+ if (isMobile) {
138
+ handleEnterNode(item);
139
+ return;
140
+ }
141
+ onToggle(item);
142
+ }, [isMobile, handleEnterNode, onToggle]);
143
+ const handleLeaveLevel = (0, react_1.useCallback)(() => {
144
+ enterAnimation.reset();
145
+ saveLevelSnapshot();
146
+ leaveNode();
147
+ }, [saveLevelSnapshot, leaveNode, enterAnimation]);
148
+ const isNoData = !items?.length;
149
+ const state = (0, react_1.useMemo)(() => {
150
+ if (!isNoData) {
151
+ return undefined;
152
+ }
153
+ if (isLoading) {
154
+ return 'loading';
155
+ }
156
+ if (isError) {
157
+ return 'error';
158
+ }
159
+ return 'noData';
160
+ }, [isNoData, isLoading, isError]);
161
+ const contentStateProps = (0, react_1.useMemo)(() => ({
162
+ isLoading: state === 'loading',
163
+ isError: state === 'error',
164
+ loadingTitle: 'Загрузка данных',
165
+ errorState: {
166
+ imgAlt: 'Что-то пошло не так',
167
+ errorList: [errorMsg || ''],
168
+ imgSrc: errorImgSrc ?? imagesMap.defaultErrorImgSrc,
169
+ onRetry,
170
+ },
171
+ }), [state, errorMsg, errorImgSrc, onRetry, imagesMap]);
172
+ // Футер отвечает за корневой список
66
173
  const footerContext = (0, react_1.useMemo)(() => ({
174
+ isLoading: isRootLevel && isLoading,
175
+ isError: isRootLevel && isError,
176
+ isEndReached: isRootLevel && isEndReachedWithScroll,
177
+ endOfScrollMsg,
178
+ onRetry,
179
+ }), [
180
+ isRootLevel,
67
181
  isLoading,
68
182
  isError,
69
- isEndReached: isEndReachedWithScroll,
183
+ isEndReachedWithScroll,
70
184
  endOfScrollMsg,
71
185
  onRetry,
72
- }), [isLoading, isError, isEndReachedWithScroll, endOfScrollMsg, onRetry]);
186
+ ]);
187
+ const lastRowId = (0, react_1.useMemo)(() => {
188
+ if ((0, utils_1.checkHasFooterContent)(footerContext)) {
189
+ return undefined;
190
+ }
191
+ return displayedList[displayedList.length - 1]?.id;
192
+ }, [footerContext, displayedList]);
193
+ const levelHeaderProps = (0, react_1.useMemo)(() => {
194
+ if (!isMobile || !currentNodeId) {
195
+ return undefined;
196
+ }
197
+ if (!levelTitle && !hasUpperLevel) {
198
+ return undefined;
199
+ }
200
+ return {
201
+ title: levelTitle,
202
+ hasBackButton: hasUpperLevel,
203
+ onBack: handleLeaveLevel,
204
+ };
205
+ }, [isMobile, currentNodeId, levelTitle, hasUpperLevel, handleLeaveLevel]);
73
206
  return {
74
- flatList,
75
- onToggle,
207
+ displayedList,
208
+ levelKey,
209
+ lastRowId,
210
+ levelHeaderProps,
211
+ onToggle: handleToggle,
76
212
  nodePaginationMap,
77
213
  registerChildren,
78
214
  notifyExpand,
79
215
  parentItems,
80
216
  acquireParentSlot,
81
217
  contentStateProps,
218
+ isNoData,
219
+ state,
82
220
  scrollParent,
221
+ listRef,
83
222
  virtuosoProps,
84
223
  footerContext,
85
224
  onTopButtonProps,
@@ -88,7 +227,6 @@ const useLogic = ({ initialExpandedLevel, items, onRetry, errorMsg, isError, isL
88
227
  // Fallback подставляется один раз: ниже по дереву строка выбирает функцию по
89
228
  // типу узла, не проверяя, передал ли потребитель renderParent
90
229
  renderParent: renderParent ?? renderItem,
91
- items,
92
230
  onRetry,
93
231
  noDataImgSrc,
94
232
  enterAnimation,
@@ -0,0 +1,5 @@
1
+ import type { ListFooterContext } from '../../ListFooter';
2
+ /**
3
+ * Проверяет, покажет ли футер списка placeholder
4
+ */
5
+ export declare const checkHasFooterContent: ({ isLoading, isError, isEndReached, }: ListFooterContext) => boolean;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkHasFooterContent = void 0;
4
+ /**
5
+ * Проверяет, покажет ли футер списка placeholder
6
+ */
7
+ const checkHasFooterContent = ({ isLoading, isError, isEndReached, }) => Boolean(isLoading || isError || isEndReached);
8
+ exports.checkHasFooterContent = checkHasFooterContent;
@@ -0,0 +1 @@
1
+ export * from './checkHasFooterContent';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./checkHasFooterContent"), exports);
@@ -0,0 +1,6 @@
1
+ import type { InfiniteTreeListData } from '../../types';
2
+ /**
3
+ * Проверяет, есть ли у элемента вложенность: тем же признаком список решает,
4
+ * рисовать ли строке Chevron, а мобильный режим — уводит ли строка внутрь узла
5
+ */
6
+ export declare const checkHasNested: <TData extends InfiniteTreeListData<TData>>(item: TData) => boolean;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkHasNested = void 0;
4
+ /**
5
+ * Проверяет, есть ли у элемента вложенность: тем же признаком список решает,
6
+ * рисовать ли строке Chevron, а мобильный режим — уводит ли строка внутрь узла
7
+ */
8
+ const checkHasNested = (item) => Boolean(item.children) || item.hasChildren === true;
9
+ exports.checkHasNested = checkHasNested;
@@ -0,0 +1 @@
1
+ export * from './checkHasNested';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./checkHasNested"), exports);
@@ -1,7 +1,8 @@
1
1
  export type TailRegistry = {
2
2
  /**
3
3
  * Регистрирует хвост ветки. Тот же `parentId` и `itemId` — обновляет callback.
4
- * Новый `itemId` сбрасывает `isLoadMoreRequested`
4
+ * Новый `itemId` сбрасывает `isLoadMoreRequested` и сразу проверяет хвост
5
+ * по последнему известному диапазону
5
6
  */
6
7
  register: (parentId: string, itemId: string, endReached: () => void) => void;
7
8
  /**
@@ -9,10 +10,14 @@ export type TailRegistry = {
9
10
  */
10
11
  unregister: (parentId: string, itemId?: string) => void;
11
12
  /**
12
- * Вызывает `endReached` для хвостов, чей индекс попадает в видимый диапазон.
13
- * `getIndex === -1` пропускает запись
13
+ * Запоминает видимый диапазон и вызывает `endReached` для хвостов, чей индекс
14
+ * в него попадает. `getIndex === -1` пропускает запись
14
15
  */
15
16
  checkRange: (endIndex: number, getIndex: (itemId: string) => number) => void;
17
+ /**
18
+ * Забывает запомненный диапазон: он относится к прежнему набору строк
19
+ */
20
+ forgetRange: () => void;
16
21
  };
17
22
  /**
18
23
  * Реестр хвостов вложенных веток. Живёт на экземпляре списка и переживает
@@ -7,6 +7,22 @@ exports.createTailRegistry = void 0;
7
7
  */
8
8
  const createTailRegistry = () => {
9
9
  const entries = new Map();
10
+ // Диапазон приходит от виртуализации раньше, чем монтируется строка хвоста:
11
+ // без запоминания диапазона хвост, видимый с первого кадра уровня, не
12
+ // сработал бы вовсе
13
+ let lastEndIndex = null;
14
+ let lastGetIndex = null;
15
+ const checkEntry = (entry) => {
16
+ if (entry.isLoadMoreRequested || lastEndIndex === null || !lastGetIndex) {
17
+ return;
18
+ }
19
+ const index = lastGetIndex(entry.itemId);
20
+ if (index === -1 || lastEndIndex < index) {
21
+ return;
22
+ }
23
+ entry.isLoadMoreRequested = true;
24
+ entry.endReached();
25
+ };
10
26
  return {
11
27
  register(parentId, itemId, endReached) {
12
28
  const existing = entries.get(parentId);
@@ -14,7 +30,13 @@ const createTailRegistry = () => {
14
30
  existing.endReached = endReached;
15
31
  return;
16
32
  }
17
- entries.set(parentId, { itemId, endReached, isLoadMoreRequested: false });
33
+ const entry = {
34
+ itemId,
35
+ endReached,
36
+ isLoadMoreRequested: false,
37
+ };
38
+ entries.set(parentId, entry);
39
+ checkEntry(entry);
18
40
  },
19
41
  unregister(parentId, itemId) {
20
42
  if (itemId === undefined) {
@@ -27,17 +49,13 @@ const createTailRegistry = () => {
27
49
  }
28
50
  },
29
51
  checkRange(endIndex, getIndex) {
30
- entries.forEach((entry) => {
31
- if (entry.isLoadMoreRequested) {
32
- return;
33
- }
34
- const index = getIndex(entry.itemId);
35
- if (index === -1 || endIndex < index) {
36
- return;
37
- }
38
- entry.isLoadMoreRequested = true;
39
- entry.endReached();
40
- });
52
+ lastEndIndex = endIndex;
53
+ lastGetIndex = getIndex;
54
+ entries.forEach(checkEntry);
55
+ },
56
+ forgetRange() {
57
+ lastEndIndex = null;
58
+ lastGetIndex = null;
41
59
  },
42
60
  };
43
61
  };
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.flattenTree = void 0;
4
+ const checkHasNested_1 = require("../checkHasNested");
4
5
  /**
5
6
  * Проверяет, подгружаются ли дочерние элементы узла отдельно.
6
7
  */
@@ -18,7 +19,7 @@ const flattenTree = (items, expandedIds, parentPath = [], level = 0, parentId) =
18
19
  const flattenedItem = {
19
20
  ...item,
20
21
  meta: {
21
- hasNested: Boolean(item.children) || item.hasChildren === true,
22
+ hasNested: (0, checkHasNested_1.checkHasNested)(item),
22
23
  isChildrenAsync,
23
24
  level,
24
25
  path,
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Ключ уровня для снимков скролла и пересоздания списка
3
+ */
4
+ export declare const getLevelKey: (nodeId?: string) => string;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getLevelKey = void 0;
4
+ const constants_1 = require("../../constants");
5
+ /**
6
+ * Ключ уровня для снимков скролла и пересоздания списка
7
+ */
8
+ const getLevelKey = (nodeId) => nodeId === undefined ? constants_1.ROOT_LEVEL_KEY : `${constants_1.NODE_LEVEL_KEY_PREFIX}${nodeId}`;
9
+ exports.getLevelKey = getLevelKey;
@@ -0,0 +1 @@
1
+ export * from './getLevelKey';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./getLevelKey"), exports);
@@ -1,3 +1,5 @@
1
+ export * from './checkHasFooterContent';
2
+ export * from './checkHasNested';
1
3
  export * from './checkHasSkeletonPlaceholders';
2
4
  export * from './checkIsChildrenPlaceholder';
3
5
  export * from './checkIsChildrenPlaceholderOf';
@@ -12,6 +14,7 @@ export * from './flattenTree';
12
14
  export * from './getEnteringChildren';
13
15
  export * from './getIdsToKeep';
14
16
  export * from './getInitialExpandedIds';
17
+ export * from './getLevelKey';
15
18
  export * from './getNestedItems';
16
19
  export * from './insertChildren';
17
20
  export * from './removeChildren';
@@ -14,6 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./checkHasFooterContent"), exports);
18
+ __exportStar(require("./checkHasNested"), exports);
17
19
  __exportStar(require("./checkHasSkeletonPlaceholders"), exports);
18
20
  __exportStar(require("./checkIsChildrenPlaceholder"), exports);
19
21
  __exportStar(require("./checkIsChildrenPlaceholderOf"), exports);
@@ -28,6 +30,7 @@ __exportStar(require("./flattenTree"), exports);
28
30
  __exportStar(require("./getEnteringChildren"), exports);
29
31
  __exportStar(require("./getIdsToKeep"), exports);
30
32
  __exportStar(require("./getInitialExpandedIds"), exports);
33
+ __exportStar(require("./getLevelKey"), exports);
31
34
  __exportStar(require("./getNestedItems"), exports);
32
35
  __exportStar(require("./insertChildren"), exports);
33
36
  __exportStar(require("./removeChildren"), exports);
@@ -26,13 +26,14 @@ const useScrollManagement = ({ scrollRef, isEndReached, onLoadMore, virtuosoId,
26
26
  if (scrollRef?.current?.parentElement) {
27
27
  scrollRef.current.parentElement.style.position = 'relative';
28
28
  }
29
- }, [scrollRef]);
30
- const recalculateVerticalScroll = () => {
29
+ }, [scrollRef, isMobile]);
30
+ const recalculateVerticalScroll = (0, react_1.useCallback)(() => {
31
31
  const list = document.getElementById(virtuosoId);
32
- if (scrollRef?.current && list) {
33
- setHasVerticalScroll(list?.clientHeight > scrollRef.current?.clientHeight);
32
+ if (!scrollParent || !list) {
33
+ return;
34
34
  }
35
- };
35
+ setHasVerticalScroll(list.clientHeight > scrollParent.clientHeight);
36
+ }, [scrollParent, virtuosoId]);
36
37
  const handleEndReach = () => {
37
38
  if (!isEndReached && onLoadMore) {
38
39
  onLoadMore();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "4.105.0",
3
+ "version": "4.106.0",
4
4
  "browser": "./index.js",
5
5
  "main": "./node/index.js",
6
6
  "dependencies": {