@astral/ui 4.100.0 → 4.101.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 (464) hide show
  1. package/components/InfiniteTreeList/InfiniteTreeList.d.ts +18 -0
  2. package/components/InfiniteTreeList/InfiniteTreeList.js +26 -19
  3. package/components/InfiniteTreeList/InfiniteTreeListActions/InfiniteTreeListActions.d.ts +9 -0
  4. package/components/InfiniteTreeList/InfiniteTreeListActions/InfiniteTreeListActions.js +9 -0
  5. package/components/InfiniteTreeList/InfiniteTreeListActions/types.d.ts +5 -0
  6. package/components/InfiniteTreeList/InfiniteTreeListActions/useLogic/useLogic.js +5 -6
  7. package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.d.ts +81 -0
  8. package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.js +21 -0
  9. package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.d.ts +3 -2
  10. package/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.js +69 -13
  11. package/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/ErrorPlaceholder.d.ts +6 -0
  12. package/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/ErrorPlaceholder.js +8 -0
  13. package/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/constants.d.ts +1 -0
  14. package/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/constants.js +1 -0
  15. package/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/index.d.ts +1 -0
  16. package/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/index.js +1 -0
  17. package/components/InfiniteTreeList/{ErrorMessage → InfiniteTreeListItem/ErrorPlaceholder}/styles.d.ts +1 -1
  18. package/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/styles.js +8 -0
  19. package/components/InfiniteTreeList/InfiniteTreeListItem/InfiniteTreeListItem.js +29 -7
  20. package/components/InfiniteTreeList/InfiniteTreeListItem/TreeListItemContext/TreeListItemContext.d.ts +19 -0
  21. package/components/InfiniteTreeList/InfiniteTreeListItem/TreeListItemContext/TreeListItemContext.js +4 -0
  22. package/components/InfiniteTreeList/InfiniteTreeListItem/TreeListItemContext/TreeListItemContextProvider/TreeListItemContextProvider.d.ts +4 -0
  23. package/components/InfiniteTreeList/InfiniteTreeListItem/TreeListItemContext/TreeListItemContextProvider/TreeListItemContextProvider.js +13 -8
  24. package/components/InfiniteTreeList/InfiniteTreeListItem/constants.d.ts +6 -0
  25. package/components/InfiniteTreeList/InfiniteTreeListItem/constants.js +7 -0
  26. package/components/InfiniteTreeList/InfiniteTreeListItem/styles.d.ts +4 -4
  27. package/components/InfiniteTreeList/InfiniteTreeListItem/styles.js +28 -5
  28. package/components/InfiniteTreeList/InfiniteTreeListItem/types.d.ts +20 -3
  29. package/components/InfiniteTreeList/InfiniteTreeListItem/useLogic/useLogic.d.ts +7 -1
  30. package/components/InfiniteTreeList/InfiniteTreeListItem/useLogic/useLogic.js +57 -5
  31. package/components/InfiniteTreeList/{EndData → ListFooter/EndData}/EndData.js +1 -1
  32. package/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/ErrorMessage.js +2 -2
  33. package/components/InfiniteTreeList/ListFooter/ErrorMessage/styles.d.ts +5 -0
  34. package/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/styles.js +1 -1
  35. package/components/InfiniteTreeList/ListFooter/ListFooter.d.ts +10 -0
  36. package/components/InfiniteTreeList/ListFooter/ListFooter.js +25 -0
  37. package/components/InfiniteTreeList/ListFooter/index.d.ts +2 -0
  38. package/components/InfiniteTreeList/ListFooter/index.js +1 -0
  39. package/components/InfiniteTreeList/{styles.d.ts → ListFooter/styles.d.ts} +2 -2
  40. package/components/InfiniteTreeList/{styles.js → ListFooter/styles.js} +1 -1
  41. package/components/InfiniteTreeList/ListFooter/types.d.ts +22 -0
  42. package/components/InfiniteTreeList/ListFooter/types.js +1 -0
  43. package/components/InfiniteTreeList/OnTopButton/OnTopButton.d.ts +8 -2
  44. package/components/InfiniteTreeList/OnTopButton/OnTopButton.js +6 -5
  45. package/components/InfiniteTreeList/OnTopButton/styles.d.ts +4 -0
  46. package/components/InfiniteTreeList/OnTopButton/styles.js +10 -0
  47. package/components/InfiniteTreeList/ParentItems/Item/CustomParentWrapper/CustomParentWrapper.d.ts +23 -0
  48. package/components/InfiniteTreeList/ParentItems/Item/CustomParentWrapper/CustomParentWrapper.js +12 -0
  49. package/components/InfiniteTreeList/ParentItems/Item/CustomParentWrapper/index.d.ts +1 -0
  50. package/components/InfiniteTreeList/ParentItems/Item/CustomParentWrapper/index.js +1 -0
  51. package/components/InfiniteTreeList/ParentItems/Item/Item.d.ts +10 -0
  52. package/components/InfiniteTreeList/ParentItems/Item/Item.js +22 -0
  53. package/components/InfiniteTreeList/ParentItems/Item/index.d.ts +2 -0
  54. package/components/InfiniteTreeList/ParentItems/Item/index.js +2 -0
  55. package/components/InfiniteTreeList/ParentItems/Item/types.d.ts +8 -0
  56. package/components/InfiniteTreeList/ParentItems/Item/types.js +1 -0
  57. package/components/InfiniteTreeList/ParentItems/Item/useLogic/index.d.ts +1 -0
  58. package/components/InfiniteTreeList/ParentItems/Item/useLogic/index.js +1 -0
  59. package/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.d.ts +12 -0
  60. package/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.js +12 -0
  61. package/components/InfiniteTreeList/ParentItems/ParentItems.d.ts +11 -0
  62. package/components/InfiniteTreeList/ParentItems/ParentItems.js +11 -0
  63. package/components/InfiniteTreeList/ParentItems/index.d.ts +3 -0
  64. package/components/InfiniteTreeList/ParentItems/index.js +3 -0
  65. package/components/InfiniteTreeList/ParentItems/types.d.ts +8 -0
  66. package/components/InfiniteTreeList/ParentItems/types.js +1 -0
  67. package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/ChildrenPlaceholder.d.ts +9 -0
  68. package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/ChildrenPlaceholder.js +22 -0
  69. package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/NoDataRow.d.ts +1 -0
  70. package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/NoDataRow.js +5 -0
  71. package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/index.d.ts +1 -0
  72. package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/index.js +1 -0
  73. package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/index.d.ts +1 -0
  74. package/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/index.js +1 -0
  75. package/components/InfiniteTreeList/TreeItem/CustomItemWrapper/CustomItemWrapper.d.ts +20 -0
  76. package/components/InfiniteTreeList/TreeItem/CustomItemWrapper/CustomItemWrapper.js +10 -0
  77. package/components/InfiniteTreeList/TreeItem/CustomItemWrapper/index.d.ts +1 -0
  78. package/components/InfiniteTreeList/TreeItem/CustomItemWrapper/index.js +1 -0
  79. package/components/InfiniteTreeList/TreeItem/ParentSlot/ParentSlot.d.ts +5 -0
  80. package/components/InfiniteTreeList/TreeItem/ParentSlot/ParentSlot.js +38 -0
  81. package/components/InfiniteTreeList/TreeItem/ParentSlot/index.d.ts +2 -0
  82. package/components/InfiniteTreeList/TreeItem/ParentSlot/index.js +2 -0
  83. package/components/InfiniteTreeList/TreeItem/ParentSlot/styles.d.ts +9 -0
  84. package/components/InfiniteTreeList/TreeItem/ParentSlot/styles.js +8 -0
  85. package/components/InfiniteTreeList/TreeItem/ParentSlot/types.d.ts +6 -0
  86. package/components/InfiniteTreeList/TreeItem/ParentSlot/types.js +1 -0
  87. package/components/InfiniteTreeList/TreeItem/TreeItem.d.ts +5 -2
  88. package/components/InfiniteTreeList/TreeItem/TreeItem.js +31 -4
  89. package/components/InfiniteTreeList/TreeItem/constants.d.ts +3 -0
  90. package/components/InfiniteTreeList/TreeItem/constants.js +3 -1
  91. package/components/InfiniteTreeList/TreeItem/styles.d.ts +0 -3
  92. package/components/InfiniteTreeList/TreeItem/styles.js +23 -8
  93. package/components/InfiniteTreeList/TreeItem/types.d.ts +4 -9
  94. package/components/InfiniteTreeList/TreeItem/useLogic/useLogic.d.ts +29 -9
  95. package/components/InfiniteTreeList/TreeItem/useLogic/useLogic.js +61 -19
  96. package/components/InfiniteTreeList/constants.d.ts +14 -2
  97. package/components/InfiniteTreeList/constants.js +14 -2
  98. package/components/InfiniteTreeList/hooks/index.d.ts +5 -0
  99. package/components/InfiniteTreeList/hooks/index.js +5 -0
  100. package/components/InfiniteTreeList/hooks/useChildrenState/index.d.ts +2 -0
  101. package/components/InfiniteTreeList/hooks/useChildrenState/index.js +2 -0
  102. package/components/InfiniteTreeList/hooks/useChildrenState/types.d.ts +43 -0
  103. package/components/InfiniteTreeList/hooks/useChildrenState/types.js +1 -0
  104. package/components/InfiniteTreeList/hooks/useChildrenState/useChildrenState.d.ts +20 -0
  105. package/components/InfiniteTreeList/hooks/useChildrenState/useChildrenState.js +115 -0
  106. package/components/InfiniteTreeList/hooks/useEnterAnimation/index.d.ts +2 -0
  107. package/components/InfiniteTreeList/hooks/useEnterAnimation/index.js +2 -0
  108. package/components/InfiniteTreeList/hooks/useEnterAnimation/types.d.ts +29 -0
  109. package/components/InfiniteTreeList/hooks/useEnterAnimation/types.js +1 -0
  110. package/components/InfiniteTreeList/hooks/useEnterAnimation/useEnterAnimation.d.ts +6 -0
  111. package/components/InfiniteTreeList/hooks/useEnterAnimation/useEnterAnimation.js +35 -0
  112. package/components/InfiniteTreeList/hooks/useExpandNotifier/index.d.ts +1 -0
  113. package/components/InfiniteTreeList/hooks/useExpandNotifier/index.js +1 -0
  114. package/components/InfiniteTreeList/hooks/useExpandNotifier/useExpandNotifier.d.ts +8 -0
  115. package/components/InfiniteTreeList/hooks/useExpandNotifier/useExpandNotifier.js +19 -0
  116. package/components/InfiniteTreeList/hooks/useFlatTree/index.d.ts +2 -0
  117. package/components/InfiniteTreeList/hooks/useFlatTree/index.js +2 -0
  118. package/components/InfiniteTreeList/hooks/useFlatTree/types.d.ts +20 -0
  119. package/components/InfiniteTreeList/hooks/useFlatTree/types.js +1 -0
  120. package/components/InfiniteTreeList/hooks/useFlatTree/useFlatTree.d.ts +15 -0
  121. package/components/InfiniteTreeList/hooks/useFlatTree/useFlatTree.js +88 -0
  122. package/components/InfiniteTreeList/hooks/useListScroll/index.d.ts +2 -0
  123. package/components/InfiniteTreeList/hooks/useListScroll/index.js +2 -0
  124. package/components/InfiniteTreeList/hooks/useListScroll/types.d.ts +25 -0
  125. package/components/InfiniteTreeList/hooks/useListScroll/types.js +1 -0
  126. package/components/InfiniteTreeList/hooks/useListScroll/useListScroll.d.ts +29 -0
  127. package/components/InfiniteTreeList/hooks/useListScroll/useListScroll.js +59 -0
  128. package/components/InfiniteTreeList/index.d.ts +1 -1
  129. package/components/InfiniteTreeList/public.d.ts +1 -1
  130. package/components/InfiniteTreeList/types.d.ts +83 -17
  131. package/components/InfiniteTreeList/useLogic/useLogic.d.ts +22 -12
  132. package/components/InfiniteTreeList/useLogic/useLogic.js +66 -71
  133. package/components/InfiniteTreeList/utils/checkHasSkeletonPlaceholders/checkHasSkeletonPlaceholders.d.ts +5 -0
  134. package/components/InfiniteTreeList/utils/checkHasSkeletonPlaceholders/checkHasSkeletonPlaceholders.js +6 -0
  135. package/components/InfiniteTreeList/utils/checkHasSkeletonPlaceholders/index.d.ts +1 -0
  136. package/components/InfiniteTreeList/utils/checkHasSkeletonPlaceholders/index.js +1 -0
  137. package/components/InfiniteTreeList/utils/checkIsChildrenPlaceholder/checkIsChildrenPlaceholder.d.ts +5 -0
  138. package/components/InfiniteTreeList/utils/checkIsChildrenPlaceholder/checkIsChildrenPlaceholder.js +4 -0
  139. package/components/InfiniteTreeList/utils/checkIsChildrenPlaceholder/index.d.ts +1 -0
  140. package/components/InfiniteTreeList/utils/checkIsChildrenPlaceholder/index.js +1 -0
  141. package/components/InfiniteTreeList/utils/checkIsChildrenPlaceholderOf/checkIsChildrenPlaceholderOf.d.ts +5 -0
  142. package/components/InfiniteTreeList/utils/checkIsChildrenPlaceholderOf/checkIsChildrenPlaceholderOf.js +5 -0
  143. package/components/InfiniteTreeList/utils/checkIsChildrenPlaceholderOf/index.d.ts +1 -0
  144. package/components/InfiniteTreeList/utils/checkIsChildrenPlaceholderOf/index.js +1 -0
  145. package/components/InfiniteTreeList/utils/checkIsDirectChild/checkIsDirectChild.d.ts +6 -0
  146. package/components/InfiniteTreeList/utils/checkIsDirectChild/checkIsDirectChild.js +6 -0
  147. package/components/InfiniteTreeList/utils/checkIsDirectChild/index.d.ts +1 -0
  148. package/components/InfiniteTreeList/utils/checkIsDirectChild/index.js +1 -0
  149. package/components/InfiniteTreeList/utils/checkIsNoDataChildren/checkIsNoDataChildren.d.ts +12 -0
  150. package/components/InfiniteTreeList/utils/checkIsNoDataChildren/checkIsNoDataChildren.js +14 -0
  151. package/components/InfiniteTreeList/utils/checkIsNoDataChildren/index.d.ts +1 -0
  152. package/components/InfiniteTreeList/utils/checkIsNoDataChildren/index.js +1 -0
  153. package/components/InfiniteTreeList/utils/checkIsSameChildren/checkIsSameChildren.d.ts +5 -0
  154. package/components/InfiniteTreeList/utils/checkIsSameChildren/checkIsSameChildren.js +16 -0
  155. package/components/InfiniteTreeList/utils/checkIsSameChildren/index.d.ts +1 -0
  156. package/components/InfiniteTreeList/utils/checkIsSameChildren/index.js +1 -0
  157. package/components/InfiniteTreeList/utils/countDirectChildren/countDirectChildren.d.ts +5 -0
  158. package/components/InfiniteTreeList/utils/countDirectChildren/countDirectChildren.js +5 -0
  159. package/components/InfiniteTreeList/utils/countDirectChildren/index.d.ts +1 -0
  160. package/components/InfiniteTreeList/utils/countDirectChildren/index.js +1 -0
  161. package/components/InfiniteTreeList/utils/createParentSlots/createParentSlots.d.ts +24 -0
  162. package/components/InfiniteTreeList/utils/createParentSlots/createParentSlots.js +35 -0
  163. package/components/InfiniteTreeList/utils/createParentSlots/index.d.ts +1 -0
  164. package/components/InfiniteTreeList/utils/createParentSlots/index.js +1 -0
  165. package/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.d.ts +21 -0
  166. package/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.js +40 -0
  167. package/components/InfiniteTreeList/utils/createTailRegistry/index.d.ts +1 -0
  168. package/components/InfiniteTreeList/utils/createTailRegistry/index.js +1 -0
  169. package/components/InfiniteTreeList/utils/flattenChildren/flattenChildren.d.ts +5 -0
  170. package/components/InfiniteTreeList/utils/flattenChildren/flattenChildren.js +5 -0
  171. package/components/InfiniteTreeList/utils/flattenChildren/index.d.ts +1 -0
  172. package/components/InfiniteTreeList/utils/flattenChildren/index.js +1 -0
  173. package/components/InfiniteTreeList/utils/flattenTree/flattenTree.d.ts +6 -0
  174. package/components/InfiniteTreeList/{useLogic/utils → utils}/flattenTree/flattenTree.js +9 -4
  175. package/components/InfiniteTreeList/utils/getEnteringChildren/getEnteringChildren.d.ts +17 -0
  176. package/components/InfiniteTreeList/utils/getEnteringChildren/getEnteringChildren.js +14 -0
  177. package/components/InfiniteTreeList/utils/getEnteringChildren/index.d.ts +1 -0
  178. package/components/InfiniteTreeList/utils/getEnteringChildren/index.js +1 -0
  179. package/components/InfiniteTreeList/utils/getIdsToKeep/getIdsToKeep.d.ts +10 -0
  180. package/components/InfiniteTreeList/utils/getIdsToKeep/getIdsToKeep.js +27 -0
  181. package/components/InfiniteTreeList/utils/getIdsToKeep/index.d.ts +1 -0
  182. package/components/InfiniteTreeList/utils/getIdsToKeep/index.js +1 -0
  183. package/components/InfiniteTreeList/{useLogic/utils → utils}/getInitialExpandedIds/getInitialExpandedIds.d.ts +4 -2
  184. package/components/InfiniteTreeList/{useLogic/utils → utils}/getInitialExpandedIds/getInitialExpandedIds.js +5 -4
  185. package/components/InfiniteTreeList/utils/getNestedItems/getNestedItems.d.ts +6 -0
  186. package/components/InfiniteTreeList/utils/getNestedItems/getNestedItems.js +18 -0
  187. package/components/InfiniteTreeList/utils/getNestedItems/index.d.ts +1 -0
  188. package/components/InfiniteTreeList/utils/getNestedItems/index.js +1 -0
  189. package/components/InfiniteTreeList/utils/index.d.ts +20 -0
  190. package/components/InfiniteTreeList/utils/index.js +20 -0
  191. package/components/InfiniteTreeList/utils/insertChildren/index.d.ts +1 -0
  192. package/components/InfiniteTreeList/utils/insertChildren/index.js +1 -0
  193. package/components/InfiniteTreeList/utils/insertChildren/insertChildren.d.ts +5 -0
  194. package/components/InfiniteTreeList/utils/insertChildren/insertChildren.js +41 -0
  195. package/components/InfiniteTreeList/utils/removeChildren/index.d.ts +1 -0
  196. package/components/InfiniteTreeList/utils/removeChildren/index.js +1 -0
  197. package/components/InfiniteTreeList/utils/removeChildren/removeChildren.d.ts +5 -0
  198. package/components/InfiniteTreeList/utils/removeChildren/removeChildren.js +12 -0
  199. package/components/InfiniteTreeList/utils/sortCollapsed/sortCollapsed.d.ts +5 -0
  200. package/components/InfiniteTreeList/{useLogic/utils → utils}/sortCollapsed/sortCollapsed.js +1 -6
  201. package/components/InfiniteTreeList/utils/startRemoveAnimation/index.d.ts +1 -0
  202. package/components/InfiniteTreeList/utils/startRemoveAnimation/index.js +1 -0
  203. package/components/InfiniteTreeList/utils/startRemoveAnimation/startRemoveAnimation.d.ts +1 -0
  204. package/components/InfiniteTreeList/utils/startRemoveAnimation/startRemoveAnimation.js +5 -0
  205. package/components/InfiniteTreeList/utils/syncChildrenPlaceholders/index.d.ts +1 -0
  206. package/components/InfiniteTreeList/utils/syncChildrenPlaceholders/index.js +1 -0
  207. package/components/InfiniteTreeList/utils/syncChildrenPlaceholders/syncChildrenPlaceholders.d.ts +11 -0
  208. package/components/InfiniteTreeList/utils/syncChildrenPlaceholders/syncChildrenPlaceholders.js +99 -0
  209. package/node/components/InfiniteTreeList/InfiniteTreeList.d.ts +18 -0
  210. package/node/components/InfiniteTreeList/InfiniteTreeList.js +24 -17
  211. package/node/components/InfiniteTreeList/InfiniteTreeListActions/InfiniteTreeListActions.d.ts +9 -0
  212. package/node/components/InfiniteTreeList/InfiniteTreeListActions/InfiniteTreeListActions.js +9 -0
  213. package/node/components/InfiniteTreeList/InfiniteTreeListActions/types.d.ts +5 -0
  214. package/node/components/InfiniteTreeList/InfiniteTreeListActions/useLogic/useLogic.js +5 -6
  215. package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.d.ts +81 -0
  216. package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContext.js +21 -0
  217. package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.d.ts +3 -2
  218. package/node/components/InfiniteTreeList/InfiniteTreeListContext/InfiniteTreeListContextProvider/InfiniteTreeListContextProvider.js +69 -13
  219. package/node/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/ErrorPlaceholder.d.ts +6 -0
  220. package/node/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/ErrorPlaceholder.js +12 -0
  221. package/node/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/constants.d.ts +1 -0
  222. package/node/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/constants.js +4 -0
  223. package/node/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/index.d.ts +1 -0
  224. package/node/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/index.js +5 -0
  225. package/node/components/InfiniteTreeList/InfiniteTreeListItem/ErrorPlaceholder/styles.js +11 -0
  226. package/node/components/InfiniteTreeList/InfiniteTreeListItem/InfiniteTreeListItem.js +28 -6
  227. package/node/components/InfiniteTreeList/InfiniteTreeListItem/TreeListItemContext/TreeListItemContext.d.ts +19 -0
  228. package/node/components/InfiniteTreeList/InfiniteTreeListItem/TreeListItemContext/TreeListItemContext.js +4 -0
  229. package/node/components/InfiniteTreeList/InfiniteTreeListItem/TreeListItemContext/TreeListItemContextProvider/TreeListItemContextProvider.d.ts +4 -0
  230. package/node/components/InfiniteTreeList/InfiniteTreeListItem/TreeListItemContext/TreeListItemContextProvider/TreeListItemContextProvider.js +13 -8
  231. package/node/components/InfiniteTreeList/InfiniteTreeListItem/constants.d.ts +6 -0
  232. package/node/components/InfiniteTreeList/InfiniteTreeListItem/constants.js +10 -0
  233. package/node/components/InfiniteTreeList/InfiniteTreeListItem/styles.d.ts +4 -4
  234. package/node/components/InfiniteTreeList/InfiniteTreeListItem/styles.js +29 -6
  235. package/node/components/InfiniteTreeList/InfiniteTreeListItem/types.d.ts +20 -3
  236. package/node/components/InfiniteTreeList/InfiniteTreeListItem/useLogic/useLogic.d.ts +7 -1
  237. package/node/components/InfiniteTreeList/InfiniteTreeListItem/useLogic/useLogic.js +56 -4
  238. package/node/components/InfiniteTreeList/{EndData → ListFooter/EndData}/EndData.js +1 -1
  239. package/node/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/ErrorMessage.js +2 -2
  240. package/node/components/InfiniteTreeList/ListFooter/ErrorMessage/styles.d.ts +5 -0
  241. package/node/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/styles.js +1 -1
  242. package/node/components/InfiniteTreeList/ListFooter/ListFooter.d.ts +10 -0
  243. package/node/components/InfiniteTreeList/ListFooter/ListFooter.js +29 -0
  244. package/node/components/InfiniteTreeList/ListFooter/index.d.ts +2 -0
  245. package/node/components/InfiniteTreeList/ListFooter/index.js +17 -0
  246. package/node/components/InfiniteTreeList/{styles.js → ListFooter/styles.js} +1 -1
  247. package/node/components/InfiniteTreeList/ListFooter/types.d.ts +22 -0
  248. package/node/components/InfiniteTreeList/ListFooter/types.js +2 -0
  249. package/node/components/InfiniteTreeList/OnTopButton/OnTopButton.d.ts +8 -2
  250. package/node/components/InfiniteTreeList/OnTopButton/OnTopButton.js +6 -5
  251. package/node/components/InfiniteTreeList/OnTopButton/styles.d.ts +4 -0
  252. package/node/components/InfiniteTreeList/OnTopButton/styles.js +13 -0
  253. package/node/components/InfiniteTreeList/ParentItems/Item/CustomParentWrapper/CustomParentWrapper.d.ts +23 -0
  254. package/node/components/InfiniteTreeList/ParentItems/Item/CustomParentWrapper/CustomParentWrapper.js +15 -0
  255. package/node/components/InfiniteTreeList/ParentItems/Item/CustomParentWrapper/index.d.ts +1 -0
  256. package/node/components/InfiniteTreeList/ParentItems/Item/CustomParentWrapper/index.js +17 -0
  257. package/node/components/InfiniteTreeList/ParentItems/Item/Item.d.ts +10 -0
  258. package/node/components/InfiniteTreeList/ParentItems/Item/Item.js +25 -0
  259. package/node/components/InfiniteTreeList/ParentItems/Item/index.d.ts +2 -0
  260. package/node/components/InfiniteTreeList/ParentItems/Item/index.js +18 -0
  261. package/node/components/InfiniteTreeList/ParentItems/Item/types.d.ts +8 -0
  262. package/node/components/InfiniteTreeList/ParentItems/Item/types.js +2 -0
  263. package/node/components/InfiniteTreeList/ParentItems/Item/useLogic/index.d.ts +1 -0
  264. package/node/components/InfiniteTreeList/ParentItems/Item/useLogic/index.js +17 -0
  265. package/node/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.d.ts +12 -0
  266. package/node/components/InfiniteTreeList/ParentItems/Item/useLogic/useLogic.js +16 -0
  267. package/node/components/InfiniteTreeList/ParentItems/ParentItems.d.ts +11 -0
  268. package/node/components/InfiniteTreeList/ParentItems/ParentItems.js +15 -0
  269. package/node/components/InfiniteTreeList/ParentItems/index.d.ts +3 -0
  270. package/node/components/InfiniteTreeList/ParentItems/index.js +19 -0
  271. package/node/components/InfiniteTreeList/ParentItems/types.d.ts +8 -0
  272. package/node/components/InfiniteTreeList/ParentItems/types.js +2 -0
  273. package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/ChildrenPlaceholder.d.ts +9 -0
  274. package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/ChildrenPlaceholder.js +26 -0
  275. package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/NoDataRow.d.ts +1 -0
  276. package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/NoDataRow.js +9 -0
  277. package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/index.d.ts +1 -0
  278. package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/NoDataRow/index.js +17 -0
  279. package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/index.d.ts +1 -0
  280. package/node/components/InfiniteTreeList/TreeItem/ChildrenPlaceholder/index.js +17 -0
  281. package/node/components/InfiniteTreeList/TreeItem/CustomItemWrapper/CustomItemWrapper.d.ts +20 -0
  282. package/node/components/InfiniteTreeList/TreeItem/CustomItemWrapper/CustomItemWrapper.js +13 -0
  283. package/node/components/InfiniteTreeList/TreeItem/CustomItemWrapper/index.d.ts +1 -0
  284. package/node/components/InfiniteTreeList/TreeItem/CustomItemWrapper/index.js +17 -0
  285. package/node/components/InfiniteTreeList/TreeItem/ParentSlot/ParentSlot.d.ts +5 -0
  286. package/node/components/InfiniteTreeList/TreeItem/ParentSlot/ParentSlot.js +42 -0
  287. package/node/components/InfiniteTreeList/TreeItem/ParentSlot/index.d.ts +2 -0
  288. package/node/components/InfiniteTreeList/TreeItem/ParentSlot/index.js +18 -0
  289. package/node/components/InfiniteTreeList/TreeItem/ParentSlot/styles.d.ts +9 -0
  290. package/node/components/InfiniteTreeList/TreeItem/ParentSlot/styles.js +11 -0
  291. package/node/components/InfiniteTreeList/TreeItem/ParentSlot/types.d.ts +6 -0
  292. package/node/components/InfiniteTreeList/TreeItem/ParentSlot/types.js +2 -0
  293. package/node/components/InfiniteTreeList/TreeItem/TreeItem.d.ts +5 -2
  294. package/node/components/InfiniteTreeList/TreeItem/TreeItem.js +31 -4
  295. package/node/components/InfiniteTreeList/TreeItem/constants.d.ts +3 -0
  296. package/node/components/InfiniteTreeList/TreeItem/constants.js +3 -1
  297. package/node/components/InfiniteTreeList/TreeItem/styles.d.ts +0 -3
  298. package/node/components/InfiniteTreeList/TreeItem/styles.js +23 -8
  299. package/node/components/InfiniteTreeList/TreeItem/types.d.ts +4 -9
  300. package/node/components/InfiniteTreeList/TreeItem/useLogic/useLogic.d.ts +29 -9
  301. package/node/components/InfiniteTreeList/TreeItem/useLogic/useLogic.js +60 -18
  302. package/node/components/InfiniteTreeList/constants.d.ts +14 -2
  303. package/node/components/InfiniteTreeList/constants.js +15 -3
  304. package/node/components/InfiniteTreeList/hooks/index.d.ts +5 -0
  305. package/node/components/InfiniteTreeList/hooks/index.js +21 -0
  306. package/node/components/InfiniteTreeList/hooks/useChildrenState/index.d.ts +2 -0
  307. package/node/components/InfiniteTreeList/hooks/useChildrenState/index.js +18 -0
  308. package/node/components/InfiniteTreeList/hooks/useChildrenState/types.d.ts +43 -0
  309. package/node/components/InfiniteTreeList/hooks/useChildrenState/types.js +2 -0
  310. package/node/components/InfiniteTreeList/hooks/useChildrenState/useChildrenState.d.ts +20 -0
  311. package/node/components/InfiniteTreeList/hooks/useChildrenState/useChildrenState.js +119 -0
  312. package/node/components/InfiniteTreeList/hooks/useEnterAnimation/index.d.ts +2 -0
  313. package/node/components/InfiniteTreeList/hooks/useEnterAnimation/index.js +18 -0
  314. package/node/components/InfiniteTreeList/hooks/useEnterAnimation/types.d.ts +29 -0
  315. package/node/components/InfiniteTreeList/hooks/useEnterAnimation/types.js +2 -0
  316. package/node/components/InfiniteTreeList/hooks/useEnterAnimation/useEnterAnimation.d.ts +6 -0
  317. package/node/components/InfiniteTreeList/hooks/useEnterAnimation/useEnterAnimation.js +39 -0
  318. package/node/components/InfiniteTreeList/hooks/useExpandNotifier/index.d.ts +1 -0
  319. package/node/components/InfiniteTreeList/hooks/useExpandNotifier/index.js +17 -0
  320. package/node/components/InfiniteTreeList/hooks/useExpandNotifier/useExpandNotifier.d.ts +8 -0
  321. package/node/components/InfiniteTreeList/hooks/useExpandNotifier/useExpandNotifier.js +23 -0
  322. package/node/components/InfiniteTreeList/hooks/useFlatTree/index.d.ts +2 -0
  323. package/node/components/InfiniteTreeList/hooks/useFlatTree/index.js +18 -0
  324. package/node/components/InfiniteTreeList/hooks/useFlatTree/types.d.ts +20 -0
  325. package/node/components/InfiniteTreeList/hooks/useFlatTree/types.js +2 -0
  326. package/node/components/InfiniteTreeList/hooks/useFlatTree/useFlatTree.d.ts +15 -0
  327. package/node/components/InfiniteTreeList/hooks/useFlatTree/useFlatTree.js +92 -0
  328. package/node/components/InfiniteTreeList/hooks/useListScroll/index.d.ts +2 -0
  329. package/node/components/InfiniteTreeList/hooks/useListScroll/index.js +18 -0
  330. package/node/components/InfiniteTreeList/hooks/useListScroll/types.d.ts +25 -0
  331. package/node/components/InfiniteTreeList/hooks/useListScroll/types.js +2 -0
  332. package/node/components/InfiniteTreeList/hooks/useListScroll/useListScroll.d.ts +29 -0
  333. package/node/components/InfiniteTreeList/hooks/useListScroll/useListScroll.js +63 -0
  334. package/node/components/InfiniteTreeList/index.d.ts +1 -1
  335. package/node/components/InfiniteTreeList/public.d.ts +1 -1
  336. package/node/components/InfiniteTreeList/types.d.ts +83 -17
  337. package/node/components/InfiniteTreeList/useLogic/useLogic.d.ts +22 -12
  338. package/node/components/InfiniteTreeList/useLogic/useLogic.js +64 -69
  339. package/node/components/InfiniteTreeList/utils/checkHasSkeletonPlaceholders/checkHasSkeletonPlaceholders.d.ts +5 -0
  340. package/node/components/InfiniteTreeList/utils/checkHasSkeletonPlaceholders/checkHasSkeletonPlaceholders.js +10 -0
  341. package/node/components/InfiniteTreeList/utils/checkHasSkeletonPlaceholders/index.d.ts +1 -0
  342. package/node/components/InfiniteTreeList/utils/checkHasSkeletonPlaceholders/index.js +17 -0
  343. package/node/components/InfiniteTreeList/utils/checkIsChildrenPlaceholder/checkIsChildrenPlaceholder.d.ts +5 -0
  344. package/node/components/InfiniteTreeList/utils/checkIsChildrenPlaceholder/checkIsChildrenPlaceholder.js +8 -0
  345. package/node/components/InfiniteTreeList/utils/checkIsChildrenPlaceholder/index.d.ts +1 -0
  346. package/node/components/InfiniteTreeList/utils/checkIsChildrenPlaceholder/index.js +17 -0
  347. package/node/components/InfiniteTreeList/utils/checkIsChildrenPlaceholderOf/checkIsChildrenPlaceholderOf.d.ts +5 -0
  348. package/node/components/InfiniteTreeList/utils/checkIsChildrenPlaceholderOf/checkIsChildrenPlaceholderOf.js +9 -0
  349. package/node/components/InfiniteTreeList/utils/checkIsChildrenPlaceholderOf/index.d.ts +1 -0
  350. package/node/components/InfiniteTreeList/utils/checkIsChildrenPlaceholderOf/index.js +17 -0
  351. package/node/components/InfiniteTreeList/utils/checkIsDirectChild/checkIsDirectChild.d.ts +6 -0
  352. package/node/components/InfiniteTreeList/utils/checkIsDirectChild/checkIsDirectChild.js +10 -0
  353. package/node/components/InfiniteTreeList/utils/checkIsDirectChild/index.d.ts +1 -0
  354. package/node/components/InfiniteTreeList/utils/checkIsDirectChild/index.js +17 -0
  355. package/node/components/InfiniteTreeList/utils/checkIsNoDataChildren/checkIsNoDataChildren.d.ts +12 -0
  356. package/node/components/InfiniteTreeList/utils/checkIsNoDataChildren/checkIsNoDataChildren.js +18 -0
  357. package/node/components/InfiniteTreeList/utils/checkIsNoDataChildren/index.d.ts +1 -0
  358. package/node/components/InfiniteTreeList/utils/checkIsNoDataChildren/index.js +17 -0
  359. package/node/components/InfiniteTreeList/utils/checkIsSameChildren/checkIsSameChildren.d.ts +5 -0
  360. package/node/components/InfiniteTreeList/utils/checkIsSameChildren/checkIsSameChildren.js +20 -0
  361. package/node/components/InfiniteTreeList/utils/checkIsSameChildren/index.d.ts +1 -0
  362. package/node/components/InfiniteTreeList/utils/checkIsSameChildren/index.js +17 -0
  363. package/node/components/InfiniteTreeList/utils/countDirectChildren/countDirectChildren.d.ts +5 -0
  364. package/node/components/InfiniteTreeList/utils/countDirectChildren/countDirectChildren.js +9 -0
  365. package/node/components/InfiniteTreeList/utils/countDirectChildren/index.d.ts +1 -0
  366. package/node/components/InfiniteTreeList/utils/countDirectChildren/index.js +17 -0
  367. package/node/components/InfiniteTreeList/utils/createParentSlots/createParentSlots.d.ts +24 -0
  368. package/node/components/InfiniteTreeList/utils/createParentSlots/createParentSlots.js +39 -0
  369. package/node/components/InfiniteTreeList/utils/createParentSlots/index.d.ts +1 -0
  370. package/node/components/InfiniteTreeList/utils/createParentSlots/index.js +17 -0
  371. package/node/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.d.ts +21 -0
  372. package/node/components/InfiniteTreeList/utils/createTailRegistry/createTailRegistry.js +44 -0
  373. package/node/components/InfiniteTreeList/utils/createTailRegistry/index.d.ts +1 -0
  374. package/node/components/InfiniteTreeList/utils/createTailRegistry/index.js +5 -0
  375. package/node/components/InfiniteTreeList/utils/flattenChildren/flattenChildren.d.ts +5 -0
  376. package/node/components/InfiniteTreeList/utils/flattenChildren/flattenChildren.js +9 -0
  377. package/node/components/InfiniteTreeList/utils/flattenChildren/index.d.ts +1 -0
  378. package/node/components/InfiniteTreeList/utils/flattenChildren/index.js +17 -0
  379. package/node/components/InfiniteTreeList/utils/flattenTree/flattenTree.d.ts +6 -0
  380. package/node/components/InfiniteTreeList/{useLogic/utils → utils}/flattenTree/flattenTree.js +9 -4
  381. package/node/components/InfiniteTreeList/utils/getEnteringChildren/getEnteringChildren.d.ts +17 -0
  382. package/node/components/InfiniteTreeList/utils/getEnteringChildren/getEnteringChildren.js +18 -0
  383. package/node/components/InfiniteTreeList/utils/getEnteringChildren/index.d.ts +1 -0
  384. package/node/components/InfiniteTreeList/utils/getEnteringChildren/index.js +17 -0
  385. package/node/components/InfiniteTreeList/utils/getIdsToKeep/getIdsToKeep.d.ts +10 -0
  386. package/node/components/InfiniteTreeList/utils/getIdsToKeep/getIdsToKeep.js +31 -0
  387. package/node/components/InfiniteTreeList/utils/getIdsToKeep/index.d.ts +1 -0
  388. package/node/components/InfiniteTreeList/utils/getIdsToKeep/index.js +17 -0
  389. package/node/components/InfiniteTreeList/{useLogic/utils → utils}/getInitialExpandedIds/getInitialExpandedIds.d.ts +4 -2
  390. package/node/components/InfiniteTreeList/{useLogic/utils → utils}/getInitialExpandedIds/getInitialExpandedIds.js +5 -4
  391. package/node/components/InfiniteTreeList/utils/getNestedItems/getNestedItems.d.ts +6 -0
  392. package/node/components/InfiniteTreeList/utils/getNestedItems/getNestedItems.js +22 -0
  393. package/node/components/InfiniteTreeList/utils/getNestedItems/index.d.ts +1 -0
  394. package/node/components/InfiniteTreeList/{useLogic/utils/getDescendants → utils/getNestedItems}/index.js +1 -1
  395. package/node/components/InfiniteTreeList/utils/index.d.ts +20 -0
  396. package/node/components/InfiniteTreeList/utils/index.js +36 -0
  397. package/node/components/InfiniteTreeList/utils/insertChildren/index.d.ts +1 -0
  398. package/node/components/InfiniteTreeList/utils/insertChildren/index.js +17 -0
  399. package/node/components/InfiniteTreeList/utils/insertChildren/insertChildren.d.ts +5 -0
  400. package/node/components/InfiniteTreeList/utils/insertChildren/insertChildren.js +45 -0
  401. package/node/components/InfiniteTreeList/utils/removeChildren/index.d.ts +1 -0
  402. package/node/components/InfiniteTreeList/utils/removeChildren/index.js +17 -0
  403. package/node/components/InfiniteTreeList/utils/removeChildren/removeChildren.d.ts +5 -0
  404. package/node/components/InfiniteTreeList/utils/removeChildren/removeChildren.js +16 -0
  405. package/node/components/InfiniteTreeList/utils/sortCollapsed/sortCollapsed.d.ts +5 -0
  406. package/node/components/InfiniteTreeList/{useLogic/utils → utils}/sortCollapsed/sortCollapsed.js +1 -6
  407. package/node/components/InfiniteTreeList/utils/startRemoveAnimation/index.d.ts +1 -0
  408. package/node/components/InfiniteTreeList/utils/startRemoveAnimation/index.js +17 -0
  409. package/node/components/InfiniteTreeList/utils/startRemoveAnimation/startRemoveAnimation.d.ts +1 -0
  410. package/node/components/InfiniteTreeList/utils/startRemoveAnimation/startRemoveAnimation.js +9 -0
  411. package/node/components/InfiniteTreeList/utils/syncChildrenPlaceholders/index.d.ts +1 -0
  412. package/node/components/InfiniteTreeList/utils/syncChildrenPlaceholders/index.js +17 -0
  413. package/node/components/InfiniteTreeList/utils/syncChildrenPlaceholders/syncChildrenPlaceholders.d.ts +11 -0
  414. package/node/components/InfiniteTreeList/utils/syncChildrenPlaceholders/syncChildrenPlaceholders.js +104 -0
  415. package/package.json +1 -1
  416. package/components/InfiniteTreeList/useLogic/utils/flattenTree/flattenTree.d.ts +0 -5
  417. package/components/InfiniteTreeList/useLogic/utils/getDescendants/getDescendants.d.ts +0 -10
  418. package/components/InfiniteTreeList/useLogic/utils/getDescendants/getDescendants.js +0 -22
  419. package/components/InfiniteTreeList/useLogic/utils/getDescendants/index.d.ts +0 -1
  420. package/components/InfiniteTreeList/useLogic/utils/getDescendants/index.js +0 -1
  421. package/components/InfiniteTreeList/useLogic/utils/index.d.ts +0 -4
  422. package/components/InfiniteTreeList/useLogic/utils/index.js +0 -4
  423. package/components/InfiniteTreeList/useLogic/utils/sortCollapsed/sortCollapsed.d.ts +0 -10
  424. package/node/components/InfiniteTreeList/useLogic/utils/flattenTree/flattenTree.d.ts +0 -5
  425. package/node/components/InfiniteTreeList/useLogic/utils/getDescendants/getDescendants.d.ts +0 -10
  426. package/node/components/InfiniteTreeList/useLogic/utils/getDescendants/getDescendants.js +0 -26
  427. package/node/components/InfiniteTreeList/useLogic/utils/getDescendants/index.d.ts +0 -1
  428. package/node/components/InfiniteTreeList/useLogic/utils/index.d.ts +0 -4
  429. package/node/components/InfiniteTreeList/useLogic/utils/index.js +0 -20
  430. package/node/components/InfiniteTreeList/useLogic/utils/sortCollapsed/sortCollapsed.d.ts +0 -10
  431. /package/components/InfiniteTreeList/{EndData → ListFooter/EndData}/EndData.d.ts +0 -0
  432. /package/components/InfiniteTreeList/{EndData → ListFooter/EndData}/constants.d.ts +0 -0
  433. /package/components/InfiniteTreeList/{EndData → ListFooter/EndData}/constants.js +0 -0
  434. /package/components/InfiniteTreeList/{EndData → ListFooter/EndData}/index.d.ts +0 -0
  435. /package/components/InfiniteTreeList/{EndData → ListFooter/EndData}/index.js +0 -0
  436. /package/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/ErrorMessage.d.ts +0 -0
  437. /package/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/constants.d.ts +0 -0
  438. /package/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/constants.js +0 -0
  439. /package/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/index.d.ts +0 -0
  440. /package/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/index.js +0 -0
  441. /package/components/InfiniteTreeList/{useLogic/utils → utils}/flattenTree/index.d.ts +0 -0
  442. /package/components/InfiniteTreeList/{useLogic/utils → utils}/flattenTree/index.js +0 -0
  443. /package/components/InfiniteTreeList/{useLogic/utils → utils}/getInitialExpandedIds/index.d.ts +0 -0
  444. /package/components/InfiniteTreeList/{useLogic/utils → utils}/getInitialExpandedIds/index.js +0 -0
  445. /package/components/InfiniteTreeList/{useLogic/utils → utils}/sortCollapsed/index.d.ts +0 -0
  446. /package/components/InfiniteTreeList/{useLogic/utils → utils}/sortCollapsed/index.js +0 -0
  447. /package/node/components/InfiniteTreeList/{ErrorMessage → InfiniteTreeListItem/ErrorPlaceholder}/styles.d.ts +0 -0
  448. /package/node/components/InfiniteTreeList/{EndData → ListFooter/EndData}/EndData.d.ts +0 -0
  449. /package/node/components/InfiniteTreeList/{EndData → ListFooter/EndData}/constants.d.ts +0 -0
  450. /package/node/components/InfiniteTreeList/{EndData → ListFooter/EndData}/constants.js +0 -0
  451. /package/node/components/InfiniteTreeList/{EndData → ListFooter/EndData}/index.d.ts +0 -0
  452. /package/node/components/InfiniteTreeList/{EndData → ListFooter/EndData}/index.js +0 -0
  453. /package/node/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/ErrorMessage.d.ts +0 -0
  454. /package/node/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/constants.d.ts +0 -0
  455. /package/node/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/constants.js +0 -0
  456. /package/node/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/index.d.ts +0 -0
  457. /package/node/components/InfiniteTreeList/{ErrorMessage → ListFooter/ErrorMessage}/index.js +0 -0
  458. /package/node/components/InfiniteTreeList/{styles.d.ts → ListFooter/styles.d.ts} +0 -0
  459. /package/node/components/InfiniteTreeList/{useLogic/utils → utils}/flattenTree/index.d.ts +0 -0
  460. /package/node/components/InfiniteTreeList/{useLogic/utils → utils}/flattenTree/index.js +0 -0
  461. /package/node/components/InfiniteTreeList/{useLogic/utils → utils}/getInitialExpandedIds/index.d.ts +0 -0
  462. /package/node/components/InfiniteTreeList/{useLogic/utils → utils}/getInitialExpandedIds/index.js +0 -0
  463. /package/node/components/InfiniteTreeList/{useLogic/utils → utils}/sortCollapsed/index.d.ts +0 -0
  464. /package/node/components/InfiniteTreeList/{useLogic/utils → utils}/sortCollapsed/index.js +0 -0
@@ -0,0 +1,6 @@
1
+ import type { EnterAnimationResult } from './types';
2
+ /**
3
+ * Управляет enter-анимацией строк дерева: метка живёт до первого mount строки
4
+ * и потребляется им
5
+ */
6
+ export declare const useEnterAnimation: () => EnterAnimationResult;
@@ -0,0 +1,35 @@
1
+ import { useCallback, useEffect, useMemo, useRef } from 'react';
2
+ import { ENTER_ANIMATION_MOUNT_WINDOW_MS } from '../../constants';
3
+ const NO_ANIMATION = { shouldAnimate: false };
4
+ /**
5
+ * Управляет enter-анимацией строк дерева: метка живёт до первого mount строки
6
+ * и потребляется им
7
+ */
8
+ export const useEnterAnimation = () => {
9
+ const delayIndexes = useRef(new Map());
10
+ const resetTimer = useRef(undefined);
11
+ const reset = useCallback(() => {
12
+ clearTimeout(resetTimer.current);
13
+ delayIndexes.current.clear();
14
+ }, []);
15
+ const schedule = useCallback((itemIds, startDelayIndex = 0) => {
16
+ if (!itemIds.length) {
17
+ return;
18
+ }
19
+ itemIds.forEach((itemId, index) => delayIndexes.current.set(itemId, startDelayIndex + index));
20
+ clearTimeout(resetTimer.current);
21
+ resetTimer.current = setTimeout(reset, ENTER_ANIMATION_MOUNT_WINDOW_MS);
22
+ }, [reset]);
23
+ const read = useCallback((itemId) => {
24
+ const delayIndex = delayIndexes.current.get(itemId);
25
+ if (delayIndex === undefined) {
26
+ return NO_ANIMATION;
27
+ }
28
+ return { shouldAnimate: true, delayIndex };
29
+ }, []);
30
+ const claim = useCallback((itemId) => {
31
+ delayIndexes.current.delete(itemId);
32
+ }, []);
33
+ useEffect(() => () => clearTimeout(resetTimer.current), []);
34
+ return useMemo(() => ({ schedule, read, claim, reset }), [schedule, read, claim, reset]);
35
+ };
@@ -0,0 +1 @@
1
+ export * from './useExpandNotifier';
@@ -0,0 +1 @@
1
+ export * from './useExpandNotifier';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Блокирует повторные вызовы `onOpen`: узел сообщает о раскрытии один
3
+ * раз, пока ветка не свёрнута
4
+ */
5
+ export declare const useExpandNotifier: () => {
6
+ notifyExpand: (itemId: string, onOpen?: () => void) => void;
7
+ resetExpandNotification: (itemIds: string[]) => void;
8
+ };
@@ -0,0 +1,19 @@
1
+ import { useCallback, useRef } from 'react';
2
+ /**
3
+ * Блокирует повторные вызовы `onOpen`: узел сообщает о раскрытии один
4
+ * раз, пока ветка не свёрнута
5
+ */
6
+ export const useExpandNotifier = () => {
7
+ const notifiedIdsRef = useRef(new Set());
8
+ const notifyExpand = useCallback((itemId, onOpen) => {
9
+ if (notifiedIdsRef.current.has(itemId)) {
10
+ return;
11
+ }
12
+ notifiedIdsRef.current.add(itemId);
13
+ onOpen?.();
14
+ }, []);
15
+ const resetExpandNotification = useCallback((itemIds) => {
16
+ itemIds.forEach((itemId) => notifiedIdsRef.current.delete(itemId));
17
+ }, []);
18
+ return { notifyExpand, resetExpandNotification };
19
+ };
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export * from './useFlatTree';
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export * from './useFlatTree';
@@ -0,0 +1,20 @@
1
+ import type { InfiniteTreeListData } from '../../types';
2
+ import type { EnterAnimationResult } from '../useEnterAnimation';
3
+ export type UseFlatTreeParams<TData extends InfiniteTreeListData<TData>> = {
4
+ /**
5
+ * Дерево элементов из props списка
6
+ */
7
+ items: TData[];
8
+ /**
9
+ * Уровень раскрытия дерева по умолчанию
10
+ */
11
+ initialExpandedLevel?: number;
12
+ /**
13
+ * Контроллер enter-анимации: раскрытие узла помечает новые строки
14
+ */
15
+ enterAnimation: EnterAnimationResult;
16
+ /**
17
+ * Вызывается со списком свёрнутых узлов после анимации закрытия ветки
18
+ */
19
+ onCollapse: (itemIds: string[]) => void;
20
+ };
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import type { FlattenTree, InfiniteTreeListData } from '../../types';
3
+ import type { UseFlatTreeParams } from './types';
4
+ /**
5
+ * Управляет плоским списком строк и набором раскрытых узлов
6
+ */
7
+ export declare const useFlatTree: <TData extends InfiniteTreeListData<TData>>({ items, initialExpandedLevel, enterAnimation, onCollapse, }: UseFlatTreeParams<TData>) => {
8
+ flatList: FlattenTree<TData>[];
9
+ flatListRef: import("react").RefObject<FlattenTree<TData>[]>;
10
+ expandedIds: Set<string>;
11
+ expandedIdsRef: import("react").RefObject<Set<string>>;
12
+ insertChildren: (parentId: string, childrenData: TData[]) => void;
13
+ syncChildrenPlaceholders: (parentId: string, isChildrenLoading: boolean, skeletonCount: number, isChildrenError?: boolean, isChildrenNoData?: boolean) => void;
14
+ onToggle: ({ id: itemId }: InfiniteTreeListData) => void;
15
+ };
@@ -0,0 +1,88 @@
1
+ import { useCallback, useEffect, useRef, useState } from 'react';
2
+ import { useTheme } from '../../../theme/hooks';
3
+ import { useSet } from '../../../useSet';
4
+ import { flattenTree, getInitialExpandedIds, getNestedItems, insertChildren as insertChildrenIntoFlatList, removeChildren as removeChildrenFromFlatList, sortCollapsed, startRemoveAnimation, syncChildrenPlaceholders as syncPlaceholdersInFlatList, } from '../../utils';
5
+ /**
6
+ * Управляет плоским списком строк и набором раскрытых узлов
7
+ */
8
+ export const useFlatTree = ({ items, initialExpandedLevel, enterAnimation, onCollapse, }) => {
9
+ const theme = useTheme();
10
+ const [expandedIds, { add: addExpandedId, remove: removeExpandedId }] = useSet(new Set());
11
+ const [flatList, setFlatList] = useState(() => flattenTree(items, new Set()));
12
+ const expandedIdsRef = useRef(expandedIds);
13
+ const flatListRef = useRef(flatList);
14
+ // Синхронизация после коммита: запись в ref во время рендера — side effect,
15
+ // отброшенный рендер оставил бы в ref значение из дерева, которое
16
+ // не попало в коммит.
17
+ // Эффект объявлен первым, поэтому эффекты ниже по списку хуков читают из ref
18
+ // актуальные значения
19
+ useEffect(() => {
20
+ expandedIdsRef.current = expandedIds;
21
+ flatListRef.current = flatList;
22
+ });
23
+ const collapseTimersRef = useRef([]);
24
+ useEffect(() => () => {
25
+ collapseTimersRef.current.forEach(clearTimeout);
26
+ }, []);
27
+ useEffect(() => {
28
+ const next = getInitialExpandedIds(expandedIdsRef.current, items, initialExpandedLevel);
29
+ next.forEach(addExpandedId);
30
+ expandedIdsRef.current = next;
31
+ setFlatList(flattenTree(items, next));
32
+ }, [items]);
33
+ const insertChildren = useCallback((parentId, childrenData) => {
34
+ setFlatList((prev) => insertChildrenIntoFlatList(prev, parentId, childrenData, expandedIdsRef.current));
35
+ }, []);
36
+ const syncChildrenPlaceholders = useCallback((parentId, isChildrenLoading, skeletonCount, isChildrenError, isChildrenNoData) => {
37
+ setFlatList((prev) => syncPlaceholdersInFlatList(prev, parentId, isChildrenLoading, skeletonCount, isChildrenError, isChildrenNoData));
38
+ }, []);
39
+ const expandNode = useCallback((itemId) => {
40
+ const staticChildren = flatListRef.current.find((item) => item.id === itemId)?.children;
41
+ enterAnimation.schedule(staticChildren?.map((child) => child.id) ?? []);
42
+ addExpandedId(itemId);
43
+ expandedIdsRef.current = new Set(expandedIdsRef.current).add(itemId);
44
+ setFlatList((prev) => {
45
+ const withExpanded = prev.map((item) => item.id === itemId
46
+ ? { ...item, meta: { ...item.meta, isExpanded: true } }
47
+ : item);
48
+ if (!staticChildren?.length) {
49
+ return withExpanded;
50
+ }
51
+ return insertChildrenIntoFlatList(withExpanded, itemId, staticChildren, expandedIdsRef.current);
52
+ });
53
+ }, [addExpandedId, enterAnimation]);
54
+ const collapseNode = useCallback((itemId) => {
55
+ const nestedItems = sortCollapsed(getNestedItems(flatListRef.current, itemId));
56
+ nestedItems.forEach(({ meta }) => startRemoveAnimation(meta.nodeId));
57
+ // Ветка уходит из данных только после анимации закрытия
58
+ const timerId = setTimeout(() => {
59
+ collapseTimersRef.current = collapseTimersRef.current.filter((id) => id !== timerId);
60
+ const collapsedIds = [itemId, ...nestedItems.map(({ id }) => id)];
61
+ const nextExpanded = new Set(expandedIdsRef.current);
62
+ collapsedIds.forEach((collapsedId) => {
63
+ removeExpandedId(collapsedId);
64
+ nextExpanded.delete(collapsedId);
65
+ });
66
+ expandedIdsRef.current = nextExpanded;
67
+ onCollapse(collapsedIds);
68
+ setFlatList((prev) => removeChildrenFromFlatList(prev, itemId));
69
+ }, theme.transitions.duration.shorter);
70
+ collapseTimersRef.current.push(timerId);
71
+ }, [onCollapse, removeExpandedId, theme]);
72
+ const onToggle = useCallback(({ id: itemId }) => {
73
+ if (expandedIdsRef.current.has(itemId)) {
74
+ collapseNode(itemId);
75
+ return;
76
+ }
77
+ expandNode(itemId);
78
+ }, [collapseNode, expandNode]);
79
+ return {
80
+ flatList,
81
+ flatListRef,
82
+ expandedIds,
83
+ expandedIdsRef,
84
+ insertChildren,
85
+ syncChildrenPlaceholders,
86
+ onToggle,
87
+ };
88
+ };
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export * from './useListScroll';
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export * from './useListScroll';
@@ -0,0 +1,25 @@
1
+ import type { RefObject } from 'react';
2
+ import type { FlattenTree, InfiniteTreeListData } from '../../types';
3
+ import type { EnterAnimationResult } from '../useEnterAnimation';
4
+ export type UseListScrollParams<TData extends InfiniteTreeListData<TData>> = {
5
+ /**
6
+ * Ref на контейнер, в котором должен быть скролл
7
+ */
8
+ scrollRef: RefObject<HTMLElement | null>;
9
+ /**
10
+ * Флаг достижения конца списка
11
+ */
12
+ isEndReached?: boolean;
13
+ /**
14
+ * Обработчик подгрузки данных
15
+ */
16
+ onLoadMore?: () => void;
17
+ /**
18
+ * Плоский список: реестр хвостов ищет в нём позицию строки
19
+ */
20
+ flatListRef: RefObject<FlattenTree<TData>[]>;
21
+ /**
22
+ * Контроллер enter-анимации: скролл снимает метки со строк
23
+ */
24
+ enterAnimation: EnterAnimationResult;
25
+ };
@@ -0,0 +1,29 @@
1
+ /// <reference types="react" />
2
+ import type { ListRange, VirtuosoHandle } from 'react-virtuoso';
3
+ import type { InfiniteTreeListData } from '../../types';
4
+ import { type TailRegistry } from '../../utils';
5
+ import type { UseListScrollParams } from './types';
6
+ /**
7
+ * Скролл-обвязка списка: props для `Virtuoso`, кнопка «наверх» и реестр хвостов
8
+ * вложенных веток. Хвосты регистрируют сами строки, хук создаёт реестр и на
9
+ * смене видимого диапазона проверяет, попал ли хвост в кадр
10
+ */
11
+ export declare const useListScroll: <TData extends InfiniteTreeListData<TData>>({ scrollRef, isEndReached, onLoadMore, flatListRef, enterAnimation, }: UseListScrollParams<TData>) => {
12
+ scrollParent: HTMLElement | null;
13
+ tailRegistry: TailRegistry;
14
+ isEndReachedWithScroll: boolean | undefined;
15
+ virtuosoProps: {
16
+ id: string;
17
+ ref: import("react").RefObject<VirtuosoHandle | null>;
18
+ overscan: number;
19
+ rangeChanged: (range: ListRange) => void;
20
+ endReached: () => void;
21
+ totalListHeightChanged: () => void;
22
+ isScrolling: (isScrolling: boolean) => void;
23
+ };
24
+ onTopButtonProps: {
25
+ buttonRef: import("react").RefObject<HTMLButtonElement | null>;
26
+ handleScrollToTop: () => void;
27
+ scrollRef: import("react").RefObject<HTMLElement | null>;
28
+ };
29
+ };
@@ -0,0 +1,59 @@
1
+ import { useCallback, useRef } from 'react';
2
+ import { useScrollManagement } from '../../../useScrollManagement';
3
+ import { infiniteTreeListClassnames, OVERSCAN, VIRTUOSO_CONTAINER_ID, } from '../../constants';
4
+ import { createTailRegistry } from '../../utils';
5
+ /**
6
+ * Скролл-обвязка списка: props для `Virtuoso`, кнопка «наверх» и реестр хвостов
7
+ * вложенных веток. Хвосты регистрируют сами строки, хук создаёт реестр и на
8
+ * смене видимого диапазона проверяет, попал ли хвост в кадр
9
+ */
10
+ export const useListScroll = ({ scrollRef, isEndReached, onLoadMore, flatListRef, enterAnimation, }) => {
11
+ const virtuosoRef = useRef(null);
12
+ const scrollToTopButtonRef = useRef(null);
13
+ const tailRegistryRef = useRef(null);
14
+ if (!tailRegistryRef.current) {
15
+ tailRegistryRef.current = createTailRegistry();
16
+ }
17
+ const tailRegistry = tailRegistryRef.current;
18
+ const { scrollParent, recalculateVerticalScroll, handleEndReach, isEndReachedWithScroll, } = useScrollManagement({
19
+ scrollRef,
20
+ isEndReached,
21
+ onLoadMore,
22
+ virtuosoId: VIRTUOSO_CONTAINER_ID,
23
+ });
24
+ // Скролл виртуализации монтирует строки, которые появлением не считаются
25
+ const handleScrollingChange = useCallback((isScrolling) => {
26
+ if (isScrolling) {
27
+ enterAnimation.reset();
28
+ }
29
+ }, [enterAnimation]);
30
+ const handleRangeChanged = useCallback((range) => {
31
+ scrollToTopButtonRef.current?.classList.toggle(infiniteTreeListClassnames.visibleScrollToTopButton, range.startIndex > 2);
32
+ tailRegistry.checkRange(range.endIndex, (itemId) => flatListRef.current.findIndex((item) => item.id === itemId));
33
+ }, [flatListRef, tailRegistry]);
34
+ const handleScrollToTop = useCallback(() => {
35
+ if (scrollRef.current) {
36
+ scrollRef.current.style.scrollBehavior = 'auto';
37
+ }
38
+ virtuosoRef.current?.scrollToIndex(0);
39
+ }, [scrollRef]);
40
+ return {
41
+ scrollParent,
42
+ tailRegistry,
43
+ isEndReachedWithScroll,
44
+ virtuosoProps: {
45
+ id: VIRTUOSO_CONTAINER_ID,
46
+ ref: virtuosoRef,
47
+ overscan: OVERSCAN,
48
+ rangeChanged: handleRangeChanged,
49
+ endReached: handleEndReach,
50
+ totalListHeightChanged: recalculateVerticalScroll,
51
+ isScrolling: handleScrollingChange,
52
+ },
53
+ onTopButtonProps: {
54
+ buttonRef: scrollToTopButtonRef,
55
+ handleScrollToTop,
56
+ scrollRef,
57
+ },
58
+ };
59
+ };
@@ -1,4 +1,4 @@
1
1
  export { InfiniteTreeList } from './InfiniteTreeList';
2
- export type { InfiniteTreeListProps } from './types';
2
+ export type { InfiniteTreeChildrenPagination, InfiniteTreeItemMeta, InfiniteTreeListProps, } from './types';
3
3
  export { InfiniteTreeListItem, type InfiniteTreeListItemProps, } from './InfiniteTreeListItem';
4
4
  export { type InfiniteTreeListActionProps, InfiniteTreeListActions, } from './InfiniteTreeListActions';
@@ -1,4 +1,4 @@
1
1
  export { InfiniteTreeList } from './InfiniteTreeList';
2
2
  export { type InfiniteTreeListActionProps, InfiniteTreeListActions, } from './InfiniteTreeListActions';
3
3
  export { InfiniteTreeListItem, type InfiniteTreeListItemProps, } from './InfiniteTreeListItem';
4
- export type { InfiniteTreeListProps } from './types';
4
+ export type { InfiniteTreeChildrenPagination, InfiniteTreeItemMeta, InfiniteTreeListProps, } from './types';
@@ -1,34 +1,56 @@
1
1
  import type { ReactNode, RefObject } from 'react';
2
- /**
3
- * Базовый тип элемента дерева для InfiniteTreeList
4
- */
5
2
  export type InfiniteTreeListDataBase = {
6
3
  /**
7
4
  * Уникальный идентификатор элемента
8
5
  */
9
6
  id: string;
10
7
  /**
11
- * Дополнительные поля
8
+ * Дочерние элементы узла подгружаются отдельно: список раскрывает такой узел,
9
+ * показывает skeleton-строки и ждёт их из props строки (`childItems`).
10
+ *
11
+ * Статическое дерево описывается полем `children` и флага не требует
12
+ */
13
+ hasChildren?: boolean;
14
+ /**
15
+ * Дополнительные поля
12
16
  */
13
17
  [key: string]: unknown;
14
18
  };
15
- /**
16
- * Тип элемента дерева с возможными дочерними элементами
17
- */
18
19
  export type InfiniteTreeListData<TData extends InfiniteTreeListData<TData> = InfiniteTreeListDataBase> = InfiniteTreeListDataBase & {
19
20
  children?: TData[];
20
21
  };
22
+ /**
23
+ * Состояние пагинации дочерних элементов узла
24
+ */
25
+ export type InfiniteTreeChildrenPagination<TData extends InfiniteTreeListData<TData> = InfiniteTreeListDataBase> = {
26
+ /**
27
+ * Загруженные дочерние элементы узла
28
+ */
29
+ data: TData[];
30
+ /**
31
+ * Дочерние элементы загружаются
32
+ */
33
+ isLoading?: boolean;
34
+ /**
35
+ * Загрузка дочерних элементов завершилась ошибкой
36
+ */
37
+ isError?: boolean;
38
+ /**
39
+ * Все дочерние элементы узла загружены
40
+ */
41
+ isEndReached?: boolean;
42
+ };
21
43
  export type InfiniteTreeListProps<TData extends InfiniteTreeListData<TData> = InfiniteTreeListDataBase> = {
22
44
  /**
23
45
  * Список элементов дерева
24
46
  */
25
47
  items: TData[];
26
48
  /**
27
- * Если true, будет отображаться лоадер
49
+ * Список в состоянии загрузки
28
50
  */
29
51
  isLoading?: boolean;
30
52
  /**
31
- * Если `true`, компонент будет отображаться в состоянии ошибки
53
+ * Список в состоянии ошибки
32
54
  */
33
55
  isError?: boolean;
34
56
  /**
@@ -48,11 +70,11 @@ export type InfiniteTreeListProps<TData extends InfiniteTreeListData<TData> = In
48
70
  */
49
71
  onLoadMore?: () => void;
50
72
  /**
51
- * Реф на контейнер, в котором должен быть скролл
73
+ * Ref на контейнер, в котором должен быть скролл
52
74
  */
53
75
  scrollRef: RefObject<HTMLElement | null>;
54
76
  /**
55
- * Рендер-функция элемента списка
77
+ * Рендер-функция строки без пагинации дочерних элементов.
56
78
  *
57
79
  * @example
58
80
  * renderItem={(item) => (
@@ -66,7 +88,29 @@ export type InfiniteTreeListProps<TData extends InfiniteTreeListData<TData> = In
66
88
  meta: InfiniteTreeItemMeta;
67
89
  }) => ReactNode;
68
90
  /**
69
- * Уровень раскрытия дерева по умолчанию
91
+ * Рендер-функция строки узла с подгружаемыми дочерними элементами (`hasChildren`).
92
+ * Без `renderParent` такие узлы рендерит `renderItem`.
93
+ *
94
+ * @example
95
+ * renderParent={(item) => (
96
+ * <InfiniteTreeListItem
97
+ * isLoading={childrenState?.isLoading}
98
+ * isError={childrenState?.isError}
99
+ * isEndReached={childrenState?.isEndReached}
100
+ * childItems={childrenState?.data}
101
+ * onOpen={() => loadChildren(item.id)}
102
+ * onLoadMore={() => loadChildren(item.id)}
103
+ * >
104
+ * <Avatar>{item.avatarName}</Avatar>
105
+ * <Typography>{item.organization}</Typography>
106
+ * </InfiniteTreeListItem>
107
+ * )}
108
+ */
109
+ renderParent?: (item: TData & {
110
+ meta: InfiniteTreeItemMeta;
111
+ }) => ReactNode;
112
+ /**
113
+ * Уровень раскрытия дерева по умолчанию.
70
114
  */
71
115
  initialExpandedLevel?: number;
72
116
  /**
@@ -74,7 +118,7 @@ export type InfiniteTreeListProps<TData extends InfiniteTreeListData<TData> = In
74
118
  */
75
119
  endOfScrollMsg?: string;
76
120
  /**
77
- * Скелетон для элемента в состоянии загрузки
121
+ * Строка в состоянии загрузки.
78
122
  */
79
123
  itemSkeleton?: ReactNode;
80
124
  /**
@@ -93,7 +137,7 @@ export type InfiniteTreeItemMeta = {
93
137
  */
94
138
  level: number;
95
139
  /**
96
- * Путь до элемента (массив id родителей)
140
+ * Путь до элемента: id всех родителей от корня и id самого элемента
97
141
  */
98
142
  path: string[];
99
143
  /**
@@ -101,22 +145,44 @@ export type InfiniteTreeItemMeta = {
101
145
  */
102
146
  parentId?: string;
103
147
  /**
104
- * Индекс элемента среди siblings (для каскадной анимации)
148
+ * Индекс элемента среди соседей (siblings) для каскадной анимации
105
149
  */
106
150
  siblingIndex: number;
107
151
  /**
108
- * Флаг имеет ли элемент вложенных потомков
152
+ * У элемента есть вложенные элементы: строка получает Chevron
109
153
  */
110
154
  hasNested: boolean;
155
+ /**
156
+ * Дочерние элементы узла подгружаются, а не лежат в `children`
157
+ */
158
+ isChildrenAsync: boolean;
111
159
  /**
112
160
  * Флаг раскрытия узла
113
161
  */
114
162
  isExpanded: boolean;
115
163
  /**
116
- * Id Node элемента. Используется для анимации закрытия
164
+ * Id DOM-узла строки. Используется для анимации закрытия
117
165
  */
118
166
  nodeId: string;
119
167
  };
168
+ /**
169
+ * Вид строки-заглушки, которой список замещает дочерние элементы раскрытого
170
+ * родителя:
171
+ * - `skeleton` — первая загрузка ветки, дочерних элементов ещё нет;
172
+ * - `spinner` — догрузка следующей порции под уже показанными дочерними
173
+ * элементами;
174
+ * - `no-data` — ветка загрузилась пустой;
175
+ * - `error` — загрузка ветки упала
176
+ */
177
+ export type ChildrenPlaceholderKind = 'skeleton' | 'spinner' | 'no-data' | 'error';
120
178
  export type FlattenTree<TData extends InfiniteTreeListData<TData>> = TData & {
121
179
  meta: InfiniteTreeItemMeta;
180
+ /**
181
+ * Вид строки-заглушки. У строк с данными потребителя поля нет
182
+ */
183
+ placeholderKind?: ChildrenPlaceholderKind;
184
+ };
185
+ export type FlattenTreeParent = {
186
+ id: string;
187
+ meta: Pick<InfiniteTreeItemMeta, 'path' | 'level'>;
122
188
  };
@@ -1,38 +1,48 @@
1
1
  /// <reference types="react" />
2
2
  import { type ContentStateProps } from '../../ContentState';
3
- import type { FlattenTree, InfiniteTreeListData, InfiniteTreeListProps } from '../types';
3
+ import type { ListFooterContext } from '../ListFooter';
4
+ import type { InfiniteTreeListData, InfiniteTreeListProps } from '../types';
4
5
  type UseLogicParams<TData extends InfiniteTreeListData<TData>> = InfiniteTreeListProps<TData>;
5
- export declare const useLogic: <TData extends InfiniteTreeListData<TData>>({ initialExpandedLevel, items, onRetry, errorMsg, isError, isLoading, scrollRef, isEndReached, onLoadMore, renderItem, itemSkeleton, endOfScrollMsg, noDataImgSrc, errorImgSrc, }: UseLogicParams<TData>) => {
6
- flatList: FlattenTree<TData>[];
6
+ /**
7
+ * Логика списка: сводит плоский список, данные дочерних элементов, скролл
8
+ * и анимацию появления строк в props для `Virtuoso` и дочерних компонентов
9
+ */
10
+ export declare const useLogic: <TData extends InfiniteTreeListData<TData>>({ initialExpandedLevel, items, onRetry, errorMsg, isError, isLoading, scrollRef, isEndReached, onLoadMore, renderItem, renderParent, itemSkeleton, endOfScrollMsg, noDataImgSrc, errorImgSrc, }: UseLogicParams<TData>) => {
11
+ flatList: import("../types").FlattenTree<TData>[];
7
12
  onToggle: ({ id: itemId }: InfiniteTreeListData) => void;
13
+ nodePaginationMap: Record<string, import("../InfiniteTreeListContext").NodePagination>;
14
+ registerChildren: (itemId: string, childrenState: import("../types").InfiniteTreeChildrenPagination) => void;
15
+ notifyExpand: (itemId: string, onOpen?: (() => void) | undefined) => void;
16
+ parentItems: import("../types").FlattenTree<TData>[];
17
+ acquireParentSlot: (itemId: string) => HTMLDivElement | null;
8
18
  contentStateProps: Omit<ContentStateProps, "children">;
9
19
  scrollParent: HTMLElement | null;
10
20
  virtuosoProps: {
11
21
  id: string;
12
22
  ref: import("react").RefObject<import("react-virtuoso").VirtuosoHandle | null>;
23
+ overscan: number;
13
24
  rangeChanged: (range: import("react-virtuoso").ListRange) => void;
14
25
  endReached: () => void;
15
26
  totalListHeightChanged: () => void;
27
+ isScrolling: (isScrolling: boolean) => void;
16
28
  };
17
- footerProps: {
18
- isError: boolean | undefined;
19
- isLoading: boolean | undefined;
20
- isEndReached: boolean | undefined;
21
- };
29
+ footerContext: ListFooterContext;
22
30
  onTopButtonProps: {
23
- isActive: boolean;
31
+ buttonRef: import("react").RefObject<HTMLButtonElement | null>;
24
32
  handleScrollToTop: () => void;
25
33
  scrollRef: import("react").RefObject<HTMLElement | null>;
26
34
  };
27
- endOfScrollMsg: string | undefined;
28
35
  itemSkeleton: import("react").ReactNode;
29
36
  renderItem: (item: TData & {
30
37
  meta: import("../types").InfiniteTreeItemMeta;
31
38
  }) => import("react").ReactNode;
39
+ renderParent: (item: TData & {
40
+ meta: import("../types").InfiniteTreeItemMeta;
41
+ }) => import("react").ReactNode;
32
42
  items: TData[];
33
- onLoadMore: (() => void) | undefined;
34
43
  onRetry: () => void;
35
44
  noDataImgSrc: string | undefined;
36
- recentlyExpandedIds: import("react").RefObject<Set<string>>;
45
+ enterAnimation: import("../hooks").EnterAnimationResult;
46
+ tailRegistry: import("../utils").TailRegistry;
37
47
  };
38
48
  export {};