@depup/react-aria-components 1.19.0-depup.27 → 1.20.0-depup.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 (257) hide show
  1. package/PreviewTrigger/package.json +5 -0
  2. package/README.md +2 -2
  3. package/TokenField/package.json +5 -0
  4. package/changes.json +1 -1
  5. package/dist/exports/GridList.cjs.map +1 -1
  6. package/dist/exports/GridList.js.map +1 -1
  7. package/dist/exports/GridList.mjs.map +1 -1
  8. package/dist/exports/PreviewTrigger.cjs +26 -0
  9. package/dist/exports/PreviewTrigger.cjs.map +1 -0
  10. package/dist/exports/PreviewTrigger.js +21 -0
  11. package/dist/exports/PreviewTrigger.js.map +1 -0
  12. package/dist/exports/PreviewTrigger.mjs +21 -0
  13. package/dist/exports/PreviewTrigger.mjs.map +1 -0
  14. package/dist/exports/TokenField.cjs +31 -0
  15. package/dist/exports/TokenField.cjs.map +1 -0
  16. package/dist/exports/TokenField.js +21 -0
  17. package/dist/exports/TokenField.js.map +1 -0
  18. package/dist/exports/TokenField.mjs +21 -0
  19. package/dist/exports/TokenField.mjs.map +1 -0
  20. package/dist/exports/Tree.cjs.map +1 -1
  21. package/dist/exports/Tree.js.map +1 -1
  22. package/dist/exports/Tree.mjs.map +1 -1
  23. package/dist/exports/index.cjs +12 -0
  24. package/dist/exports/index.cjs.map +1 -1
  25. package/dist/exports/index.js +7 -1
  26. package/dist/exports/index.js.map +1 -1
  27. package/dist/exports/index.mjs +7 -1
  28. package/dist/exports/index.mjs.map +1 -1
  29. package/dist/private/Checkbox.cjs.map +1 -1
  30. package/dist/private/Checkbox.js.map +1 -1
  31. package/dist/private/Checkbox.mjs.map +1 -1
  32. package/dist/private/ComboBox.cjs +21 -2
  33. package/dist/private/ComboBox.cjs.map +1 -1
  34. package/dist/private/ComboBox.js +21 -2
  35. package/dist/private/ComboBox.js.map +1 -1
  36. package/dist/private/ComboBox.mjs +21 -2
  37. package/dist/private/ComboBox.mjs.map +1 -1
  38. package/dist/private/Dialog.cjs +15 -1
  39. package/dist/private/Dialog.cjs.map +1 -1
  40. package/dist/private/Dialog.js +15 -1
  41. package/dist/private/Dialog.js.map +1 -1
  42. package/dist/private/Dialog.mjs +15 -1
  43. package/dist/private/Dialog.mjs.map +1 -1
  44. package/dist/private/DragAndDrop.cjs +1 -0
  45. package/dist/private/DragAndDrop.cjs.map +1 -1
  46. package/dist/private/DragAndDrop.js +1 -0
  47. package/dist/private/DragAndDrop.js.map +1 -1
  48. package/dist/private/DragAndDrop.mjs +1 -0
  49. package/dist/private/DragAndDrop.mjs.map +1 -1
  50. package/dist/private/DropZone.cjs +5 -2
  51. package/dist/private/DropZone.cjs.map +1 -1
  52. package/dist/private/DropZone.js +5 -3
  53. package/dist/private/DropZone.js.map +1 -1
  54. package/dist/private/DropZone.mjs +5 -2
  55. package/dist/private/DropZone.mjs.map +1 -1
  56. package/dist/private/FileTrigger.cjs +1 -0
  57. package/dist/private/FileTrigger.cjs.map +1 -1
  58. package/dist/private/FileTrigger.js +1 -0
  59. package/dist/private/FileTrigger.js.map +1 -1
  60. package/dist/private/FileTrigger.mjs +1 -0
  61. package/dist/private/FileTrigger.mjs.map +1 -1
  62. package/dist/private/GridLayout.cjs +3 -1
  63. package/dist/private/GridLayout.cjs.map +1 -1
  64. package/dist/private/GridLayout.js +3 -1
  65. package/dist/private/GridLayout.js.map +1 -1
  66. package/dist/private/GridLayout.mjs +3 -1
  67. package/dist/private/GridLayout.mjs.map +1 -1
  68. package/dist/private/GridList.cjs +12 -1
  69. package/dist/private/GridList.cjs.map +1 -1
  70. package/dist/private/GridList.js +12 -1
  71. package/dist/private/GridList.js.map +1 -1
  72. package/dist/private/GridList.mjs +12 -1
  73. package/dist/private/GridList.mjs.map +1 -1
  74. package/dist/private/ListBox.cjs +9 -1
  75. package/dist/private/ListBox.cjs.map +1 -1
  76. package/dist/private/ListBox.js +9 -1
  77. package/dist/private/ListBox.js.map +1 -1
  78. package/dist/private/ListBox.mjs +9 -1
  79. package/dist/private/ListBox.mjs.map +1 -1
  80. package/dist/private/Menu.cjs +4 -2
  81. package/dist/private/Menu.cjs.map +1 -1
  82. package/dist/private/Menu.js +4 -2
  83. package/dist/private/Menu.js.map +1 -1
  84. package/dist/private/Menu.mjs +4 -2
  85. package/dist/private/Menu.mjs.map +1 -1
  86. package/dist/private/Meter.cjs +2 -1
  87. package/dist/private/Meter.cjs.map +1 -1
  88. package/dist/private/Meter.js +2 -1
  89. package/dist/private/Meter.js.map +1 -1
  90. package/dist/private/Meter.mjs +2 -1
  91. package/dist/private/Meter.mjs.map +1 -1
  92. package/dist/private/Modal.cjs +2 -0
  93. package/dist/private/Modal.cjs.map +1 -1
  94. package/dist/private/Modal.js +2 -0
  95. package/dist/private/Modal.js.map +1 -1
  96. package/dist/private/Modal.mjs +2 -0
  97. package/dist/private/Modal.mjs.map +1 -1
  98. package/dist/private/Popover.cjs +34 -9
  99. package/dist/private/Popover.cjs.map +1 -1
  100. package/dist/private/Popover.js +34 -9
  101. package/dist/private/Popover.js.map +1 -1
  102. package/dist/private/Popover.mjs +34 -9
  103. package/dist/private/Popover.mjs.map +1 -1
  104. package/dist/private/PreviewTrigger.cjs +88 -0
  105. package/dist/private/PreviewTrigger.cjs.map +1 -0
  106. package/dist/private/PreviewTrigger.js +80 -0
  107. package/dist/private/PreviewTrigger.js.map +1 -0
  108. package/dist/private/PreviewTrigger.mjs +79 -0
  109. package/dist/private/PreviewTrigger.mjs.map +1 -0
  110. package/dist/private/ProgressBar.cjs +6 -1
  111. package/dist/private/ProgressBar.cjs.map +1 -1
  112. package/dist/private/ProgressBar.js +6 -1
  113. package/dist/private/ProgressBar.js.map +1 -1
  114. package/dist/private/ProgressBar.mjs +6 -1
  115. package/dist/private/ProgressBar.mjs.map +1 -1
  116. package/dist/private/Select.cjs.map +1 -1
  117. package/dist/private/Select.js.map +1 -1
  118. package/dist/private/Select.mjs.map +1 -1
  119. package/dist/private/Table.cjs +26 -14
  120. package/dist/private/Table.cjs.map +1 -1
  121. package/dist/private/Table.js +26 -14
  122. package/dist/private/Table.js.map +1 -1
  123. package/dist/private/Table.mjs +26 -14
  124. package/dist/private/Table.mjs.map +1 -1
  125. package/dist/private/TableLayout.cjs +3 -1
  126. package/dist/private/TableLayout.cjs.map +1 -1
  127. package/dist/private/TableLayout.js +3 -1
  128. package/dist/private/TableLayout.js.map +1 -1
  129. package/dist/private/TableLayout.mjs +3 -1
  130. package/dist/private/TableLayout.mjs.map +1 -1
  131. package/dist/private/TagGroup.cjs +1 -0
  132. package/dist/private/TagGroup.cjs.map +1 -1
  133. package/dist/private/TagGroup.js +1 -0
  134. package/dist/private/TagGroup.js.map +1 -1
  135. package/dist/private/TagGroup.mjs +1 -0
  136. package/dist/private/TagGroup.mjs.map +1 -1
  137. package/dist/private/ToggleButton.cjs.map +1 -1
  138. package/dist/private/ToggleButton.js.map +1 -1
  139. package/dist/private/ToggleButton.mjs.map +1 -1
  140. package/dist/private/TokenField.cjs +207 -0
  141. package/dist/private/TokenField.cjs.map +1 -0
  142. package/dist/private/TokenField.js +197 -0
  143. package/dist/private/TokenField.js.map +1 -0
  144. package/dist/private/TokenField.mjs +195 -0
  145. package/dist/private/TokenField.mjs.map +1 -0
  146. package/dist/private/Tooltip.cjs +10 -2
  147. package/dist/private/Tooltip.cjs.map +1 -1
  148. package/dist/private/Tooltip.js +10 -2
  149. package/dist/private/Tooltip.js.map +1 -1
  150. package/dist/private/Tooltip.mjs +10 -2
  151. package/dist/private/Tooltip.mjs.map +1 -1
  152. package/dist/private/Tree.cjs +11 -1
  153. package/dist/private/Tree.cjs.map +1 -1
  154. package/dist/private/Tree.js +11 -1
  155. package/dist/private/Tree.js.map +1 -1
  156. package/dist/private/Tree.mjs +11 -1
  157. package/dist/private/Tree.mjs.map +1 -1
  158. package/dist/private/Virtualizer.cjs +18 -16
  159. package/dist/private/Virtualizer.cjs.map +1 -1
  160. package/dist/private/Virtualizer.js +18 -16
  161. package/dist/private/Virtualizer.js.map +1 -1
  162. package/dist/private/Virtualizer.mjs +18 -16
  163. package/dist/private/Virtualizer.mjs.map +1 -1
  164. package/dist/private/useDragAndDrop.cjs +7 -0
  165. package/dist/private/useDragAndDrop.cjs.map +1 -1
  166. package/dist/private/useDragAndDrop.js +7 -0
  167. package/dist/private/useDragAndDrop.js.map +1 -1
  168. package/dist/private/useDragAndDrop.mjs +7 -0
  169. package/dist/private/useDragAndDrop.mjs.map +1 -1
  170. package/dist/private/utils.cjs.map +1 -1
  171. package/dist/private/utils.js.map +1 -1
  172. package/dist/private/utils.mjs.map +1 -1
  173. package/dist/types/exports/GridList.d.ts +1 -1
  174. package/dist/types/exports/PreviewTrigger.d.ts +3 -0
  175. package/dist/types/exports/TokenField.d.ts +5 -0
  176. package/dist/types/exports/Tree.d.ts +1 -1
  177. package/dist/types/exports/index.d.ts +7 -2
  178. package/dist/types/src/ComboBox.d.ts +4 -1
  179. package/dist/types/src/GridList.d.ts +12 -1
  180. package/dist/types/src/ListBox.d.ts +1 -1
  181. package/dist/types/src/Popover.d.ts +7 -0
  182. package/dist/types/src/PreviewTrigger.d.ts +23 -0
  183. package/dist/types/src/Select.d.ts +1 -1
  184. package/dist/types/src/Table.d.ts +24 -0
  185. package/dist/types/src/TokenField.d.ts +111 -0
  186. package/dist/types/src/Tree.d.ts +7 -5
  187. package/dist/types/src/Virtualizer.d.ts +4 -0
  188. package/dist/types/src/utils.d.ts +19 -5
  189. package/i18n/ar-AE.js +1 -1
  190. package/i18n/ar-AE.mjs +1 -1
  191. package/i18n/bg-BG.js +1 -1
  192. package/i18n/bg-BG.mjs +1 -1
  193. package/i18n/cs-CZ.js +1 -1
  194. package/i18n/cs-CZ.mjs +1 -1
  195. package/i18n/da-DK.js +1 -1
  196. package/i18n/da-DK.mjs +1 -1
  197. package/i18n/de-DE.js +1 -1
  198. package/i18n/de-DE.mjs +1 -1
  199. package/i18n/el-GR.js +1 -1
  200. package/i18n/el-GR.mjs +1 -1
  201. package/i18n/en-US.js +1 -1
  202. package/i18n/en-US.mjs +1 -1
  203. package/i18n/es-ES.js +1 -1
  204. package/i18n/es-ES.mjs +1 -1
  205. package/i18n/et-EE.js +1 -1
  206. package/i18n/et-EE.mjs +1 -1
  207. package/i18n/fi-FI.js +1 -1
  208. package/i18n/fi-FI.mjs +1 -1
  209. package/i18n/fr-FR.js +1 -1
  210. package/i18n/fr-FR.mjs +1 -1
  211. package/i18n/he-IL.js +1 -1
  212. package/i18n/he-IL.mjs +1 -1
  213. package/i18n/hr-HR.js +1 -1
  214. package/i18n/hr-HR.mjs +1 -1
  215. package/i18n/hu-HU.js +1 -1
  216. package/i18n/hu-HU.mjs +1 -1
  217. package/i18n/it-IT.js +1 -1
  218. package/i18n/it-IT.mjs +1 -1
  219. package/i18n/ja-JP.js +1 -1
  220. package/i18n/ja-JP.mjs +1 -1
  221. package/i18n/ko-KR.js +1 -1
  222. package/i18n/ko-KR.mjs +1 -1
  223. package/i18n/lt-LT.js +1 -1
  224. package/i18n/lt-LT.mjs +1 -1
  225. package/i18n/lv-LV.js +1 -1
  226. package/i18n/lv-LV.mjs +1 -1
  227. package/i18n/nb-NO.js +1 -1
  228. package/i18n/nb-NO.mjs +1 -1
  229. package/i18n/nl-NL.js +1 -1
  230. package/i18n/nl-NL.mjs +1 -1
  231. package/i18n/pl-PL.js +1 -1
  232. package/i18n/pl-PL.mjs +1 -1
  233. package/i18n/pt-BR.js +1 -1
  234. package/i18n/pt-BR.mjs +1 -1
  235. package/i18n/pt-PT.js +1 -1
  236. package/i18n/pt-PT.mjs +1 -1
  237. package/i18n/ro-RO.js +1 -1
  238. package/i18n/ro-RO.mjs +1 -1
  239. package/i18n/ru-RU.js +1 -1
  240. package/i18n/ru-RU.mjs +1 -1
  241. package/i18n/sk-SK.js +1 -1
  242. package/i18n/sk-SK.mjs +1 -1
  243. package/i18n/sl-SI.js +1 -1
  244. package/i18n/sl-SI.mjs +1 -1
  245. package/i18n/sr-SP.js +1 -1
  246. package/i18n/sr-SP.mjs +1 -1
  247. package/i18n/sv-SE.js +1 -1
  248. package/i18n/sv-SE.mjs +1 -1
  249. package/i18n/tr-TR.js +1 -1
  250. package/i18n/tr-TR.mjs +1 -1
  251. package/i18n/uk-UA.js +1 -1
  252. package/i18n/uk-UA.mjs +1 -1
  253. package/i18n/zh-CN.js +1 -1
  254. package/i18n/zh-CN.mjs +1 -1
  255. package/i18n/zh-TW.js +1 -1
  256. package/i18n/zh-TW.mjs +1 -1
  257. package/package.json +32 -31
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgHD,MAAM,6CAA0B,CAAA,GAAA,+DAAa;IAG3C,iBAAiB,gBAA0B,EAAE,YAAsB,EAAE;QACnE,IAAI,aAAa,IAAI,CAAC,KAAK;QAC3B,WAAW,YAAY,GAAG;QAE1B,mKAAmK;QACnK,6FAA6F;QAC7F,qCAAe,qBAAqB,CAAC,cAAc,kBAAkB;QACrE,qCAAe,qBAAqB,CAAC,kBAAkB,cAAc;QAErE,WAAW,MAAM,GAAG,IAAI,CAAC,MAAM;QAC/B,OAAO;IACT;IAEA,2EAA2E;IAC3E,OAAe,sBACb,IAAmB,EACnB,UAAoB,EACpB,UAA6B,EAC7B;QACA,KAAK,IAAI,OAAO,KACd,IAAI,CAAC,WAAW,GAAG,CAAC,MAAM;YACxB,IAAI,aAAyB;YAC7B,MAAO,cAAc,KAAM;gBACzB,IAAI,OAAO,WAAW,OAAO,CAAC;gBAC9B,IAAI,MAAM,SAAS,WAAW;oBAC5B,WAAW,MAAM,CAAC,GAAG,CAAC,YAAY,KAAK,KAAK;oBAC5C;gBACF,OACE,aAAa,MAAM,aAAa;YAEpC;QACF;IAEJ;IAEA,CAAC,CAAC,OAAO,QAAQ,CAAC,GAAG;QACnB,IAAI,WAAW,IAAI,CAAC,WAAW;QAC/B,IAAI,OAAuB,YA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AAC,CAAA,GAAA,oDAAyB;gBAAG;oBAAC,GAAG,cAAc;gBAAA;aAAE;SAClD;qBACD,0DAAC;QAAiB,YAAY,MAAM,UAAU;QAAE,QAAQ;;AAIhE;AAGK,MAAM,4CAAa,CAAC;IACzB,qBACE,0DAAC,CAAA,GAAA,wCAAa;QAAE,WAAU;QAAyB,GAAG,KAAK;OACxD,MAAM,QAAQ;AAGrB;AAEA,SAAS,mCAAgB,CAAS,EAAE,CAAS;IAC3C,IAAI,EAAE,IAAI,KAAK,EAAE,IAAI,EACnB,OAAO;IAGT,KAAK,IAAI,QAAQ,EAAG;QAClB,IAAI,CAAC,EAAE,GAAG,CAAC,OACT,OAAO;IAEX;IACA,OAAO;AACT","sources":["packages/react-aria-components/src/Tree.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaTreeItemOptions, useTreeItem} from 'react-aria/useTree';\n\nimport {AriaTreeProps, useTree} from 'react-aria/useTree';\nimport {\n BaseCollection,\n CollectionNode,\n LoaderNode,\n SectionNode\n} from 'react-aria/private/collections/BaseCollection';\nimport {ButtonContext} from './Button';\nimport {CheckboxContext, CheckboxFieldContext} from './Checkbox';\nimport {\n ChildrenOrFunction,\n ClassNameOrFunction,\n ContextValue,\n DEFAULT_SLOT,\n dom,\n DOMRenderProps,\n Provider,\n RenderProps,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {\n CollectionBuilder,\n createBranchComponent,\n createLeafComponent\n} from 'react-aria/CollectionBuilder';\nimport {\n CollectionProps,\n CollectionRendererContext,\n DefaultCollectionRenderer,\n ItemRenderProps,\n SectionProps\n} from './Collection';\nimport {\n DisabledBehavior,\n DragPreviewRenderer,\n Expandable,\n forwardRefType,\n GlobalDOMAttributes,\n HoverEvents,\n Key,\n LinkDOMProps,\n MultipleSelection,\n PressEvents,\n RefObject,\n SelectionMode\n} from '@react-types/shared';\nimport {\n DragAndDropContext,\n DropIndicatorContext,\n useDndPersistedKeys,\n useRenderDropIndicator\n} from './DragAndDrop';\nimport {DragAndDropHooks} from './useDragAndDrop';\nimport {DraggableCollectionState} from 'react-stately/useDraggableCollectionState';\nimport {DraggableItemResult} from 'react-aria/useDraggableCollection';\nimport {\n DropIndicatorAria,\n DropIndicatorProps,\n DroppableCollectionResult\n} from 'react-aria/useDroppableCollection';\nimport {DroppableCollectionState} from 'react-stately/useDroppableCollectionState';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FocusScope} from 'react-aria/FocusScope';\nimport {\n GridListHeader,\n GridListHeaderContext,\n GridListHeaderInnerContext,\n GridListHeaderProps\n} from './GridList';\nimport {inertValue} from 'react-aria/private/utils/inertValue';\nimport {ListKeyboardDelegate} from 'react-aria/ListKeyboardDelegate';\nimport {\n LoadMoreSentinelProps,\n useLoadMoreSentinel\n} from 'react-aria/private/utils/useLoadMoreSentinel';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {Node, SelectionBehavior} from '@react-types/shared';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n JSX,\n ReactNode,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState\n} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\nimport {TreeDropTargetDelegate} from './TreeDropTargetDelegate';\nimport {TreeState, useTreeState} from 'react-stately/useTreeState';\nimport {useCachedChildren} from 'react-aria/private/collections/useCachedChildren';\nimport {useCollator} from 'react-aria/useCollator';\nimport {useControlledState} from 'react-stately/useControlledState';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useGridListSection, useGridListSelectionCheckbox} from 'react-aria/useGridList';\nimport {useHover} from 'react-aria/useHover';\nimport {useId} from 'react-aria/useId';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {useVisuallyHidden} from 'react-aria/VisuallyHidden';\n\nclass TreeCollection<T> extends BaseCollection<T> {\n private expandedKeys: Set<Key> = new Set();\n\n withExpandedKeys(lastExpandedKeys: Set<Key>, expandedKeys: Set<Key>) {\n let collection = this.clone();\n collection.expandedKeys = expandedKeys;\n\n // Clone ancestor section nodes so React knows to re-render since the same item won't cause a new render but a clone creating a new object with the same value will\n // Without this change, the items won't expand and collapse when virtualized inside a section\n TreeCollection.cloneAncestorSections(expandedKeys, lastExpandedKeys, collection);\n TreeCollection.cloneAncestorSections(lastExpandedKeys, expandedKeys, collection);\n\n collection.frozen = this.frozen;\n return collection;\n }\n\n // diff lastExpandedKeys and expandedKeys so we only clone what has changed\n private static cloneAncestorSections<T>(\n keys: Iterable<Key>,\n excludeSet: Set<Key>,\n collection: TreeCollection<T>\n ) {\n for (let key of keys) {\n if (!excludeSet.has(key)) {\n let currentKey: Key | null = key;\n while (currentKey != null) {\n let item = collection.getItem(currentKey) as CollectionNode<T>;\n if (item?.type === 'section') {\n collection.keyMap.set(currentKey, item.clone());\n break;\n } else {\n currentKey = item?.parentKey ?? null;\n }\n }\n }\n }\n }\n\n *[Symbol.iterator]() {\n let firstKey = this.getFirstKey();\n let node: Node<T> | null = firstKey != null ? this.getItem(firstKey) : null;\n\n while (node) {\n yield node as Node<T>;\n if (node.type === 'section') {\n node = node.nextKey != null ? this.getItem(node.nextKey) : null;\n } else {\n // This will include both item and content nodes\n // We handle the content nodes in useCollectionRenderer and ListLayout\n let key = this.getKeyAfter(node.key);\n node = key != null ? this.getItem(key) : null;\n }\n }\n }\n\n getLastKey() {\n // Find the deepest expanded child. We don't use collection.getLastKey() here\n // because that will return the deepest child regardless of expandedKeys.\n // Instead, start from the last top-level key and walk down.\n let key = this.lastKey;\n if (key == null) {\n return null;\n }\n\n let node = this.getItem(key) as CollectionNode<T>;\n\n while (\n node?.lastChildKey != null &&\n (node.type !== 'item' || this.expandedKeys.has(node.key))\n ) {\n node = this.getItem(node.lastChildKey) as CollectionNode<T>;\n }\n\n return node?.key;\n }\n\n getKeyAfter(key: Key) {\n let node = this.getItem(key) as CollectionNode<T>;\n if (!node) {\n return null;\n }\n\n if ((this.expandedKeys.has(node.key) || node.type !== 'item') && node.firstChildKey != null) {\n return node.firstChildKey;\n }\n\n while (node) {\n if (node.nextKey != null) {\n return node.nextKey;\n }\n\n if (node.parentKey != null) {\n node = this.getItem(node.parentKey) as CollectionNode<T>;\n } else {\n return null;\n }\n }\n\n return null;\n }\n\n getKeyBefore(key: Key) {\n let node = this.getItem(key) as CollectionNode<T>;\n if (!node) {\n return null;\n }\n\n if (node.prevKey != null) {\n node = this.getItem(node.prevKey) as CollectionNode<T>;\n\n // If the lastChildKey is expanded, check its lastChildKey\n while (\n node &&\n (node.type !== 'item' || this.expandedKeys.has(node.key)) &&\n node.lastChildKey != null\n ) {\n node = this.getItem(node.lastChildKey) as CollectionNode<T>;\n }\n\n return node?.key ?? null;\n }\n\n return node.parentKey;\n }\n\n getChildren(key: Key): Iterable<Node<T>> {\n let self = this;\n return {\n *[Symbol.iterator]() {\n let parent = self.getItem(key) as CollectionNode<T> | null;\n let node =\n parent?.firstChildKey != null\n ? (self.getItem(parent.firstChildKey) as CollectionNode<T>)\n : null;\n if (parent && parent.type === 'section' && node) {\n // Stop once either the node is null or the node is the parent's sibling\n while (node && node.key !== parent.nextKey) {\n yield self.getItem(node.key)!;\n // This will include content nodes which we skip in ListLayout\n let key = self.getKeyAfter(node.key);\n node = key != null ? (self.getItem(key)! as CollectionNode<T>) : null;\n }\n } else {\n while (node) {\n yield node as Node<T>;\n node = node.nextKey != null ? (self.getItem(node.nextKey)! as CollectionNode<T>) : null;\n }\n }\n }\n };\n }\n\n getTextValue(key: Key): string {\n let item = this.getItem(key);\n return item ? item.textValue : '';\n }\n}\n\nexport interface TreeRenderProps {\n /**\n * Whether the tree has no items and should display its empty state.\n *\n * @selector [data-empty]\n */\n isEmpty: boolean;\n /**\n * Whether the tree is currently focused.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the tree is currently keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * The type of selection that is allowed in the collection.\n *\n * @selector [data-selection-mode=\"single | multiple\"]\n */\n selectionMode: SelectionMode;\n /**\n * Whether the tree allows dragging.\n *\n * @selector [data-allows-dragging]\n */\n allowsDragging: boolean;\n /**\n * Whether the tree is currently the active drop target.\n *\n * @selector [data-drop-target]\n */\n isDropTarget: boolean;\n /**\n * State of the tree.\n */\n state: TreeState<unknown>;\n}\n\nexport interface TreeEmptyStateRenderProps extends Omit<TreeRenderProps, 'isEmpty'> {}\n\nexport interface TreeProps<T>\n extends\n Omit<AriaTreeProps<T>, 'children'>,\n MultipleSelection,\n CollectionProps<T>,\n StyleRenderProps<TreeRenderProps>,\n SlotProps,\n Expandable,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-Tree'\n */\n className?: ClassNameOrFunction<TreeRenderProps>;\n /**\n * How multiple selection should behave in the tree.\n *\n * @default 'toggle'\n */\n selectionBehavior?: SelectionBehavior;\n /** Provides content to display when there are no items in the list. */\n renderEmptyState?: (props: TreeEmptyStateRenderProps) => ReactNode;\n /**\n * Whether `disabledKeys` applies to all interactions, or only selection.\n *\n * @default 'all'\n */\n disabledBehavior?: DisabledBehavior;\n /**\n * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for\n * the Tree.\n */\n dragAndDropHooks?: DragAndDropHooks<NoInfer<T>>;\n}\n\nexport const TreeContext = createContext<ContextValue<TreeProps<any>, HTMLDivElement>>(null);\nexport const TreeStateContext = createContext<TreeState<any> | null>(null);\n\n/**\n * A tree provides users with a way to navigate nested hierarchical information, with support for\n * keyboard navigation and selection.\n */\nexport const Tree = /*#__PURE__*/ (forwardRef as forwardRefType)(function Tree<T>(\n props: TreeProps<T>,\n ref: ForwardedRef<HTMLDivElement>\n) {\n // Render the portal first so that we have the collection by the time we render the DOM in SSR.\n [props, ref] = useContextProps(props, ref, TreeContext);\n\n return (\n <CollectionBuilder\n content={<Collection {...props} />}\n createCollection={() => new TreeCollection<T>()}>\n {collection => <TreeInner props={props} collection={collection} treeRef={ref} />}\n </CollectionBuilder>\n );\n});\n\nconst EXPANSION_KEYS = {\n expand: {\n ltr: 'ArrowRight',\n rtl: 'ArrowLeft'\n },\n collapse: {\n ltr: 'ArrowLeft',\n rtl: 'ArrowRight'\n }\n};\n\ninterface TreeInnerProps<T> {\n props: TreeProps<T>;\n collection: TreeCollection<T>;\n treeRef: RefObject<HTMLDivElement | null>;\n}\n\nfunction TreeInner<T>({props, collection, treeRef: ref}: TreeInnerProps<T>) {\n const {dragAndDropHooks} = props;\n let {direction} = useLocale();\n let collator = useCollator({usage: 'search', sensitivity: 'base'});\n let hasDragHooks = !!dragAndDropHooks?.useDraggableCollectionState;\n let hasDropHooks = !!dragAndDropHooks?.useDroppableCollectionState;\n let dragHooksProvided = useRef(hasDragHooks);\n let dropHooksProvided = useRef(hasDropHooks);\n\n useEffect(() => {\n if (dragHooksProvided.current !== hasDragHooks) {\n console.warn(\n 'Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n if (dropHooksProvided.current !== hasDropHooks) {\n console.warn(\n 'Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n }, [hasDragHooks, hasDropHooks]);\n let {\n selectionMode = 'none',\n expandedKeys: propExpandedKeys,\n defaultExpandedKeys: propDefaultExpandedKeys,\n onExpandedChange,\n disabledBehavior = 'all'\n } = props;\n let {\n CollectionRoot,\n isVirtualized,\n layoutDelegate,\n dropTargetDelegate: ctxDropTargetDelegate\n } = useContext(CollectionRendererContext);\n\n // Kinda annoying that we have to replicate this code here as well as in useTreeState, but don't want to add\n // flattenCollection stuff to useTreeState. Think about this later\n let [expandedKeys, setExpandedKeys] = useControlledState(\n propExpandedKeys ? new Set(propExpandedKeys) : undefined,\n propDefaultExpandedKeys ? new Set(propDefaultExpandedKeys) : new Set(),\n onExpandedChange\n );\n\n let [lastCollection, setLastCollection] = useState(collection);\n let [lastExpandedKeys, setLastExpandedKeys] = useState(expandedKeys);\n let [flattenedCollection, setFlattenedCollection] = useState(() =>\n collection.withExpandedKeys(lastExpandedKeys, expandedKeys)\n );\n\n // if the lastExpandedKeys is not the same as the currentExpandedKeys or the collection has changed, then run this\n if (!areSetsEqual(lastExpandedKeys, expandedKeys) || collection !== lastCollection) {\n setFlattenedCollection(collection.withExpandedKeys(lastExpandedKeys, expandedKeys));\n setLastCollection(collection);\n setLastExpandedKeys(expandedKeys);\n }\n\n let state = useTreeState({\n ...props,\n selectionMode,\n expandedKeys,\n onExpandedChange: setExpandedKeys,\n collection: flattenedCollection,\n children: undefined,\n disabledBehavior\n });\n\n let {gridProps} = useTree(\n {\n ...props,\n isVirtualized,\n layoutDelegate\n },\n state,\n ref\n );\n\n let dragState: DraggableCollectionState | undefined = undefined;\n let dropState: DroppableCollectionState | undefined = undefined;\n let droppableCollection: DroppableCollectionResult | undefined = undefined;\n let isRootDropTarget = false;\n let dragPreview: JSX.Element | null = null;\n let preview = useRef<DragPreviewRenderer>(null);\n\n if (hasDragHooks && dragAndDropHooks) {\n dragState = dragAndDropHooks.useDraggableCollectionState!({\n collection: state.collection,\n selectionManager: state.selectionManager,\n preview: dragAndDropHooks.renderDragPreview ? preview : undefined\n });\n dragAndDropHooks.useDraggableCollection!({}, dragState, ref);\n\n let DragPreview = dragAndDropHooks.DragPreview!;\n dragPreview = dragAndDropHooks.renderDragPreview ? (\n <DragPreview ref={preview}>{dragAndDropHooks.renderDragPreview}</DragPreview>\n ) : null;\n }\n\n let [treeDropTargetDelegate] = useState(() => new TreeDropTargetDelegate());\n if (hasDropHooks && dragAndDropHooks) {\n dropState = dragAndDropHooks.useDroppableCollectionState!({\n collection: state.collection,\n selectionManager: state.selectionManager\n });\n let dropTargetDelegate =\n dragAndDropHooks.dropTargetDelegate ||\n ctxDropTargetDelegate ||\n new dragAndDropHooks.ListDropTargetDelegate(state.collection, ref, {direction});\n treeDropTargetDelegate.setup(dropTargetDelegate, state, direction);\n\n let keyboardDelegate = new ListKeyboardDelegate({\n collection: state.collection,\n collator,\n ref,\n disabledKeys: state.selectionManager.disabledKeys,\n disabledBehavior: state.selectionManager.disabledBehavior,\n direction,\n layoutDelegate\n });\n\n droppableCollection = dragAndDropHooks.useDroppableCollection!(\n {\n keyboardDelegate,\n dropTargetDelegate: treeDropTargetDelegate,\n onDropActivate: e => {\n // Expand collapsed item when dragging over. For keyboard, allow collapsing.\n if (e.target.type === 'item') {\n let key = e.target.key;\n let item = state.collection.getItem(key);\n let isExpanded = expandedKeys.has(key);\n if (\n item &&\n item.hasChildNodes &&\n (!isExpanded || dragAndDropHooks?.isVirtualDragging?.())\n ) {\n state.toggleKey(key);\n }\n }\n },\n onKeyDown: e => {\n let target = dropState?.target;\n if (target && target.type === 'item' && target.dropPosition === 'on') {\n let item = state.collection.getItem(target.key);\n if (\n e.key === EXPANSION_KEYS['expand'][direction] &&\n item?.hasChildNodes &&\n !state.expandedKeys.has(target.key)\n ) {\n state.toggleKey(target.key);\n } else if (\n e.key === EXPANSION_KEYS['collapse'][direction] &&\n item?.hasChildNodes &&\n state.expandedKeys.has(target.key)\n ) {\n state.toggleKey(target.key);\n }\n }\n }\n },\n dropState,\n ref\n );\n\n isRootDropTarget = dropState.isDropTarget({type: 'root'});\n }\n\n let isTreeDraggable = !!(hasDragHooks && !dragState?.isDisabled);\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let renderValues = {\n isEmpty: state.collection.size === 0,\n isFocused,\n isFocusVisible,\n isDropTarget: isRootDropTarget,\n selectionMode: state.selectionManager.selectionMode,\n allowsDragging: !!isTreeDraggable,\n state\n };\n\n let renderProps = useRenderProps({\n ...props,\n children: undefined,\n defaultClassName: 'react-aria-Tree',\n values: renderValues\n });\n\n let emptyState: ReactNode = null;\n if (state.collection.size === 0 && props.renderEmptyState) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {isEmpty, ...values} = renderValues;\n let content = props.renderEmptyState({...values});\n let treeGridRowProps = {\n 'aria-level': 1\n };\n\n emptyState = (\n <div role=\"row\" style={{display: 'contents'}} {...treeGridRowProps}>\n <div role=\"gridcell\" style={{display: 'contents'}}>\n {content}\n </div>\n </div>\n );\n }\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <>\n <FocusScope>\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n gridProps,\n focusProps,\n droppableCollection?.collectionProps\n )}\n ref={ref}\n slot={props.slot || undefined}\n data-empty={state.collection.size === 0 || undefined}\n data-focused={isFocused || undefined}\n data-drop-target={isRootDropTarget || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-selection-mode={\n state.selectionManager.selectionMode === 'none'\n ? undefined\n : state.selectionManager.selectionMode\n }\n data-allows-dragging={!!isTreeDraggable || undefined}>\n <Provider\n values={[\n [TreeStateContext, state],\n [DragAndDropContext, {dragAndDropHooks, dragState, dropState}],\n [DropIndicatorContext, {render: TreeDropIndicatorWrapper}]\n ]}>\n {hasDropHooks && <RootDropIndicator />}\n <SharedElementTransition>\n <CollectionRoot\n collection={state.collection}\n persistedKeys={useDndPersistedKeys(\n state.selectionManager,\n dragAndDropHooks,\n dropState\n )}\n scrollRef={ref}\n renderDropIndicator={useRenderDropIndicator(dragAndDropHooks, dropState)}\n />\n </SharedElementTransition>\n </Provider>\n {emptyState}\n </dom.div>\n </FocusScope>\n {dragPreview}\n </>\n );\n}\n\n// TODO: readd the rest of the render props when tree supports them\nexport interface TreeItemRenderProps extends ItemRenderProps {\n /**\n * Whether the tree item is expanded.\n *\n * @selector [data-expanded]\n */\n isExpanded: boolean;\n /**\n * Whether the tree item has child tree items.\n *\n * @selector [data-has-child-items]\n */\n hasChildItems: boolean;\n /**\n * What level the tree item has within the tree.\n *\n * @selector [data-level=\"number\"]\n */\n level: number;\n /**\n * Whether the tree item's children have keyboard focus.\n *\n * @selector [data-focus-visible-within]\n */\n isFocusVisibleWithin: boolean;\n /** The state of the tree. */\n state: TreeState<unknown>;\n /** The unique id of the tree row. */\n id: Key;\n}\n\nexport interface TreeItemContentRenderProps extends TreeItemRenderProps {}\n\n// The TreeItemContent is the one that accepts RenderProps because we would get much more complicated logic in TreeItem otherwise since we'd\n// need to do a bunch of check to figure out what is the Content and what are the actual collection elements (aka child rows) of the TreeItem\nexport interface TreeItemContentProps {\n /**\n * The children of the component. A function may be provided to alter the children based on\n * component state.\n */\n children: ChildrenOrFunction<TreeItemContentRenderProps>;\n}\n\nclass TreeContentNode extends CollectionNode<any> {\n static readonly type = 'content';\n}\n\nexport const TreeItemContent = /*#__PURE__*/ createLeafComponent(\n TreeContentNode,\n function TreeItemContent(props: TreeItemContentProps) {\n let values = useContext(TreeItemContentContext)!;\n let renderProps = useRenderProps({\n children: props.children,\n values\n });\n return (\n <CollectionRendererContext.Provider value={DefaultCollectionRenderer}>\n {renderProps.children}\n </CollectionRendererContext.Provider>\n );\n }\n);\n\nexport const TreeItemContentContext = createContext<TreeItemContentRenderProps | null>(null);\n\nexport interface TreeItemProps<T = object>\n extends\n StyleRenderProps<TreeItemRenderProps>,\n LinkDOMProps,\n HoverEvents,\n PressEvents,\n Pick<AriaTreeItemOptions, 'hasChildItems'>,\n Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-TreeItem'\n */\n className?: ClassNameOrFunction<TreeItemRenderProps>;\n /** The unique id of the tree row. */\n id?: Key;\n /**\n * The object value that this tree item represents. When using dynamic collections, this is set\n * automatically.\n */\n value?: T;\n /** A string representation of the tree item's contents, used for features like typeahead. */\n textValue: string;\n /** An accessibility label for this tree item. */\n 'aria-label'?: string;\n /**\n * The content of the tree item along with any nested children. Supports static nested tree items\n * or use of a Collection to dynamically render nested tree items.\n */\n children: ReactNode;\n /** Whether the item is disabled. */\n isDisabled?: boolean;\n /**\n * Handler that is called when a user performs an action on this tree item. The exact user event\n * depends on the collection's `selectionBehavior` prop and the interaction modality.\n */\n onAction?: () => void;\n}\n\nclass TreeItemNode extends CollectionNode<any> {\n static readonly type = 'item';\n}\n\n/**\n * A TreeItem represents an individual item in a Tree.\n */\nexport const TreeItem = /*#__PURE__*/ createBranchComponent(\n TreeItemNode,\n <T extends any>(props: TreeItemProps<T>, ref: ForwardedRef<HTMLDivElement>, item: Node<T>) => {\n let state = useContext(TreeStateContext)!;\n ref = useObjectRef<HTMLDivElement>(ref);\n let {dragAndDropHooks, dragState, dropState} = useContext(DragAndDropContext)!;\n let isDraggable =\n dragState && !(dragState.isDisabled || dragState.selectionManager.isDisabled(item.key));\n\n // TODO: remove this when we support description in tree row\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {rowProps, gridCellProps, expandButtonProps, descriptionProps, ...states} = useTreeItem(\n {\n node: item,\n shouldSelectOnPressUp: !!dragState\n },\n state,\n ref\n );\n let isExpanded = rowProps['aria-expanded'] === true;\n let hasChildItems =\n props.hasChildItems || [...state.collection.getChildren!(item.key)]?.length > 1;\n let level = rowProps['aria-level'] || 1;\n\n let {hoverProps, isHovered} = useHover({\n // because of https://bugs.webkit.org/show_bug.cgi?id=214609, supporting hover styles when a item is ONLY isDraggable\n // results in hover styles sticking around after a reorder/drop operation...\n isDisabled: !states.allowsSelection && !states.hasAction && !isDraggable,\n onHoverStart: props.onHoverStart,\n onHoverChange: props.onHoverChange,\n onHoverEnd: props.onHoverEnd\n });\n\n let {isFocusVisible, focusProps} = useFocusRing();\n let {isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps} = useFocusRing({\n within: true\n });\n let {checkboxProps} = useGridListSelectionCheckbox({key: item.key}, state);\n\n let draggableItem: DraggableItemResult | null = null;\n if (dragState && dragAndDropHooks) {\n draggableItem = dragAndDropHooks.useDraggableItem!(\n {key: item.key, hasDragButton: true},\n dragState\n );\n }\n\n let dropIndicator: DropIndicatorAria | null = null;\n let expandButtonRef = useRef<HTMLButtonElement>(null);\n let dropIndicatorRef = useRef<HTMLDivElement>(null);\n let activateButtonRef = useRef<HTMLDivElement>(null);\n let {visuallyHiddenProps} = useVisuallyHidden();\n if (dropState && dragAndDropHooks) {\n dropIndicator = dragAndDropHooks.useDropIndicator!(\n {\n target: {type: 'item', key: item.key, dropPosition: 'on'},\n activateButtonRef\n },\n dropState,\n dropIndicatorRef\n );\n }\n\n let isDragging = dragState && dragState.isDragging(item.key);\n let isDropTarget = dropIndicator?.isDropTarget;\n\n let selectionMode = state.selectionManager.selectionMode;\n let selectionBehavior = state.selectionManager.selectionBehavior;\n let renderPropValues = React.useMemo<TreeItemContentRenderProps>(\n () => ({\n ...states,\n isHovered,\n isFocusVisible,\n isExpanded,\n hasChildItems,\n level,\n selectionMode,\n selectionBehavior,\n isFocusVisibleWithin,\n state,\n id: item.key,\n allowsDragging: !!dragState,\n isDragging,\n isDropTarget\n }),\n [\n states,\n isHovered,\n isFocusVisible,\n isExpanded,\n hasChildItems,\n level,\n isFocusVisibleWithin,\n state,\n item.key,\n dragState,\n isDragging,\n isDropTarget,\n selectionBehavior,\n selectionMode\n ]\n );\n\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-TreeItem',\n defaultStyle: {\n // @ts-ignore\n '--tree-item-level': level\n },\n values: renderPropValues\n });\n\n useEffect(() => {\n if (!item.textValue && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'A `textValue` prop is required for <TreeItem> elements in order to support accessibility features such as type to select.'\n );\n }\n }, [item.textValue]);\n\n useEffect(() => {\n if (hasChildItems && !expandButtonRef.current && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'Expandable tree items must contain a expand button so screen reader users can expand/collapse the item.'\n );\n }\n // eslint-disable-next-line\n }, []);\n\n let dragButtonRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (dragState && !dragButtonRef.current && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'Draggable items in a Tree must contain a <Button slot=\"drag\"> element so that keyboard and screen reader users can drag them.'\n );\n }\n // eslint-disable-next-line\n }, []);\n\n let children = useCachedChildren({\n items: state.collection.getChildren!(item.key),\n children: item => {\n switch (item.type) {\n case 'content': {\n return item.render!(item);\n }\n // Skip item since we don't render the nested rows as children of the parent row, the flattened collection\n // will render them each as siblings instead\n case 'loader':\n case 'item':\n return <></>;\n default:\n throw new Error('Unsupported element type in TreeRow: ' + item.type);\n }\n }\n });\n\n let activateButtonId = useId();\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <>\n {dropIndicator && !dropIndicator.isHidden && (\n <div\n role=\"row\"\n aria-level={rowProps['aria-level']}\n aria-expanded={rowProps['aria-expanded']}\n aria-label={dropIndicator.dropIndicatorProps['aria-label']}>\n <div role=\"gridcell\" aria-colindex={1} style={{display: 'contents'}}>\n <div\n role=\"button\"\n {...visuallyHiddenProps}\n {...dropIndicator.dropIndicatorProps}\n ref={dropIndicatorRef}\n />\n {rowProps['aria-expanded'] != null ? (\n // Button to allow touch screen reader users to expand the item while dragging.\n <div\n role=\"button\"\n {...visuallyHiddenProps}\n id={activateButtonId}\n aria-label={expandButtonProps['aria-label']}\n aria-labelledby={`${activateButtonId} ${rowProps.id}`}\n tabIndex={-1}\n ref={activateButtonRef}\n />\n ) : null}\n </div>\n </div>\n )}\n <dom.div\n {...mergeProps(\n DOMProps,\n rowProps,\n focusProps,\n hoverProps,\n focusWithinProps,\n draggableItem?.dragProps\n )}\n {...renderProps}\n ref={ref}\n // TODO: missing selectionBehavior, hasAction and allowsSelection data attribute equivalents (available in renderProps). Do we want those?\n data-expanded={(hasChildItems && isExpanded) || undefined}\n data-has-child-items={hasChildItems || undefined}\n data-level={level}\n data-selected={states.isSelected || undefined}\n data-disabled={states.isDisabled || undefined}\n data-hovered={isHovered || undefined}\n data-focused={states.isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-pressed={states.isPressed || undefined}\n data-selection-mode={\n state.selectionManager.selectionMode === 'none'\n ? undefined\n : state.selectionManager.selectionMode\n }\n data-allows-dragging={!!dragState || undefined}\n data-dragging={isDragging || undefined}\n data-drop-target={isDropTarget || undefined}>\n <div {...gridCellProps} style={{display: 'contents'}}>\n <Provider\n values={[\n [\n CheckboxContext,\n {\n slots: {\n selection: checkboxProps\n }\n }\n ],\n [\n CheckboxFieldContext,\n {\n slots: {\n selection: checkboxProps\n }\n }\n ],\n // TODO: support description in the tree row\n // TODO: don't think I need to pass isExpanded to the button here since it can be sourced from the renderProps? Might be worthwhile passing it down?\n [\n ButtonContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n chevron: {\n ...expandButtonProps,\n ref: expandButtonRef\n },\n drag: {\n ...draggableItem?.dragButtonProps,\n ref: dragButtonRef,\n style: {\n pointerEvents: 'none'\n }\n }\n }\n }\n ],\n [\n TreeItemContentContext,\n {\n ...renderPropValues\n }\n ],\n [SelectionIndicatorContext, {isSelected: states.isSelected}]\n ]}>\n {children}\n </Provider>\n </div>\n </dom.div>\n </>\n );\n }\n);\n\nexport interface TreeLoadMoreItemRenderProps {\n /**\n * What level the tree item has within the tree.\n *\n * @selector [data-level]\n */\n level: number;\n}\n\nexport interface TreeLoadMoreItemProps\n extends Omit<LoadMoreSentinelProps, 'collection'>, RenderProps<TreeLoadMoreItemRenderProps> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-TreeLoadMoreItem'\n */\n className?: ClassNameOrFunction<TreeLoadMoreItemRenderProps>;\n /**\n * The load more spinner to render when loading additional items.\n */\n children?: ChildrenOrFunction<TreeLoadMoreItemRenderProps>;\n /**\n * Whether or not the loading spinner should be rendered or not.\n */\n isLoading?: boolean;\n}\n\nexport const TreeLoadMoreItem = createLeafComponent(LoaderNode, function TreeLoadingSentinel<\n T\n>(props: TreeLoadMoreItemProps, ref: ForwardedRef<HTMLDivElement>, item: Node<T>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n let state = useContext(TreeStateContext)!;\n let {isLoading, onLoadMore, scrollOffset, ...otherProps} = props;\n let sentinelRef = useRef(null);\n let memoedLoadMoreProps = useMemo(\n () => ({\n onLoadMore,\n // this collection will update anytime a row is expanded/collapsed becaused the flattenedRows will change.\n // This means onLoadMore will trigger but that might be ok cause the user should have logic to handle multiple loadMore calls\n collection: state?.collection,\n sentinelRef,\n scrollOffset\n }),\n [onLoadMore, scrollOffset, state?.collection]\n );\n useLoadMoreSentinel(memoedLoadMoreProps, sentinelRef);\n\n ref = useObjectRef<HTMLDivElement>(ref);\n let {rowProps, gridCellProps} = useTreeItem({node: item}, state, ref);\n let level = rowProps['aria-level'] || 1;\n\n // For now don't include aria-posinset and aria-setsize on loader since they aren't keyboard focusable\n // Arguably shouldn't include them ever since it might be confusing to the user to include the loaders as part of the\n // item count\n let ariaProps = {\n role: 'row',\n 'aria-level': rowProps['aria-level']\n };\n\n let renderProps = useRenderProps({\n ...otherProps,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-TreeLoader',\n values: {\n level\n }\n });\n let style = {};\n\n if (isVirtualized) {\n style = {display: 'contents'};\n }\n\n return (\n <>\n {/* Alway render the sentinel. For now onus is on the user for styling when using flex + gap (this would introduce a gap even though it doesn't take room) */}\n {/* @ts-ignore - compatibility with React < 19 */}\n <div style={{position: 'relative', width: 0, height: 0}} inert={inertValue(true)}>\n <div\n data-testid=\"loadMoreSentinel\"\n ref={sentinelRef}\n style={{position: 'absolute', height: 1, width: 1}}\n />\n </div>\n {isLoading && renderProps.children && (\n <dom.div\n ref={ref}\n {...mergeProps(filterDOMProps(props as any), ariaProps)}\n {...renderProps}\n data-level={level}>\n <div {...gridCellProps} style={style}>\n {renderProps.children}\n </div>\n </dom.div>\n )}\n </>\n );\n});\n\nfunction TreeDropIndicatorWrapper(\n props: DropIndicatorProps,\n ref: ForwardedRef<HTMLElement>\n): JSX.Element | null {\n ref = useObjectRef(ref);\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext)!;\n let buttonRef = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps, isHidden, isDropTarget} = dragAndDropHooks!.useDropIndicator!(\n props,\n dropState!,\n buttonRef\n );\n\n if (isHidden) {\n return null;\n }\n\n let level =\n dropState && props.target.type === 'item'\n ? (dropState.collection.getItem(props.target.key)?.level || 0) + 1\n : 1;\n return (\n <TreeDropIndicatorForwardRef\n {...props}\n dropIndicatorProps={dropIndicatorProps}\n isDropTarget={isDropTarget}\n ref={ref}\n buttonRef={buttonRef}\n level={level}\n />\n );\n}\n\ninterface TreeDropIndicatorProps extends DropIndicatorProps {\n dropIndicatorProps: React.HTMLAttributes<HTMLElement>;\n isDropTarget: boolean;\n buttonRef: RefObject<HTMLDivElement | null>;\n level: number;\n}\n\nfunction TreeDropIndicator(props: TreeDropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n let {dropIndicatorProps, isDropTarget, buttonRef, level, ...otherProps} = props;\n let {visuallyHiddenProps} = useVisuallyHidden();\n let renderProps = useRenderProps({\n ...otherProps,\n defaultClassName: 'react-aria-DropIndicator',\n defaultStyle: {\n position: 'relative',\n // @ts-ignore\n '--tree-item-level': level\n },\n values: {\n isDropTarget\n }\n });\n\n return (\n <dom.div\n {...renderProps}\n role=\"row\"\n aria-level={level}\n ref={ref as RefObject<HTMLDivElement | null>}\n data-drop-target={isDropTarget || undefined}>\n <div role=\"gridcell\">\n <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={buttonRef} />\n {renderProps.children}\n </div>\n </dom.div>\n );\n}\n\nconst TreeDropIndicatorForwardRef = forwardRef(TreeDropIndicator);\n\nfunction RootDropIndicator() {\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let ref = useRef<HTMLDivElement>(null);\n let {dropIndicatorProps} = dragAndDropHooks!.useDropIndicator!(\n {\n target: {type: 'root'}\n },\n dropState!,\n ref\n );\n let isDropTarget = dropState!.isDropTarget({type: 'root'});\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <div role=\"row\" aria-hidden={dropIndicatorProps['aria-hidden']} style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicatorProps} ref={ref} />\n </div>\n </div>\n );\n}\n\nexport interface GridListSectionProps<T>\n extends SectionProps<T>, DOMRenderProps<'div', undefined> {}\n\n/**\n * A TreeSection represents a section within a Tree.\n */\nexport const TreeSection = /*#__PURE__*/ createBranchComponent(\n SectionNode,\n <T extends any>(\n props: GridListSectionProps<T>,\n ref: ForwardedRef<HTMLDivElement>,\n item: Node<T>\n ) => {\n let state = useContext(TreeStateContext)!;\n let {CollectionBranch} = useContext(CollectionRendererContext);\n let headingRef = useRef(null);\n ref = useObjectRef<HTMLDivElement>(ref);\n let {rowHeaderProps, rowProps, rowGroupProps} = useGridListSection(\n {\n 'aria-label': props['aria-label'] ?? undefined\n },\n state,\n ref\n );\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: undefined,\n defaultClassName: 'react-aria-TreeSection',\n values: undefined\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div {...mergeProps(DOMProps, renderProps, rowGroupProps)} ref={ref}>\n <Provider\n values={[\n [GridListHeaderContext, {...rowProps, ref: headingRef}],\n [GridListHeaderInnerContext, {...rowHeaderProps}]\n ]}>\n <CollectionBranch collection={state.collection} parent={item} />\n </Provider>\n </dom.div>\n );\n }\n);\n\nexport const TreeHeader = (props: GridListHeaderProps): ReactNode => {\n return (\n <GridListHeader className=\"react-aria-TreeHeader\" {...props}>\n {props.children}\n </GridListHeader>\n );\n};\n\nfunction areSetsEqual<T>(a: Set<T>, b: Set<T>) {\n if (a.size !== b.size) {\n return false;\n }\n\n for (let item of a) {\n if (!b.has(item)) {\n return false;\n }\n }\n return true;\n}\n"],"names":[],"version":3,"file":"Tree.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgHD,MAAM,6CAA0B,CAAA,GAAA,+DAAa;IAG3C,iBAAiB,gBAA0B,EAAE,YAAsB,EAAE;QACnE,IAAI,aAAa,IAAI,CAAC,KAAK;QAC3B,WAAW,YAAY,GAAG;QAE1B,mKAAmK;QACnK,6FAA6F;QAC7F,qCAAe,qBAAqB,CAAC,cAAc,kBAAkB;QACrE,qCAAe,qBAAqB,CAAC,kBAAkB,cAAc;QAErE,WAAW,MAAM,GAAG,IAAI,CAAC,MAAM;QAC/B,OAAO;IACT;IAEA,2EAA2E;IAC3E,OAAe,sBACb,IAAmB,EACnB,UAAoB,EACpB,UAA6B,EAC7B;QACA,KAAK,IAAI,OAAO,KACd,IAAI,CAAC,WAAW,GAAG,CAAC,MAAM;YACxB,IAAI,aAAyB;YAC7B,MAAO,cAAc,KAAM;gBACzB,IAAI,OAAO,WAAW,OAAO,CAAC;gBAC9B,IAAI,MAAM,SAAS,WAAW;oBAC5B,WAAW,MAAM,CAAC,GAAG,CAAC,YAAY,KAAK,KAAK;oBAC5C;gBACF,OACE,aAAa,MAAM,aAAa;YAEpC;QACF;IAEJ;IAEA,CAAC,CAAC,OAAO,QAAQ,CAAC,GAAG;QACnB,IAAI,WAAW,IAAI,CAAC,WAAW;QAC/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S,EAAE;IAElB,qBACE,0DAAC,CAAA,GAAA,6BAAE,EAAE,GAAG;QAAE,GAAG,CAAA,GAAA,qCAAS,EAAE,UAAU,aAAa,cAAc;QAAE,KAAK;qBAClE,0DAAC,CAAA,GAAA,kCAAO;QACN,QAAQ;YACN;gBAAC,CAAA,GAAA,+CAAoB;gBAAG;oBAAC,GAAG,QAAQ;oBAAE,KAAK;gBAAU;aAAE;YACvD;gBAAC,CAAA,GAAA,oDAAyB;gBAAG;oBAAC,GAAG,cAAc;gBAAA;aAAE;SAClD;qBACD,0DAAC;QAAiB,YAAY,MAAM,UAAU;QAAE,QAAQ;;AAIhE;AAKK,MAAM,4CAAa,CAAC;IACzB,qBACE,0DAAC,CAAA,GAAA,wCAAa;QAAE,WAAU;QAAyB,GAAG,KAAK;OACxD,MAAM,QAAQ;AAGrB;AAEA,SAAS,mCAAgB,CAAS,EAAE,CAAS;IAC3C,IAAI,EAAE,IAAI,KAAK,EAAE,IAAI,EACnB,OAAO;IAGT,KAAK,IAAI,QAAQ,EAAG;QAClB,IAAI,CAAC,EAAE,GAAG,CAAC,OACT,OAAO;IAEX;IACA,OAAO;AACT","sources":["packages/react-aria-components/src/Tree.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaTreeItemOptions, useTreeItem} from 'react-aria/useTree';\n\nimport {AriaTreeProps, useTree} from 'react-aria/useTree';\nimport {\n BaseCollection,\n CollectionNode,\n LoaderNode,\n SectionNode\n} from 'react-aria/private/collections/BaseCollection';\nimport {ButtonContext} from './Button';\nimport {CheckboxContext, CheckboxFieldContext} from './Checkbox';\nimport {\n ChildrenOrFunction,\n ClassNameOrFunction,\n ContextValue,\n DEFAULT_SLOT,\n dom,\n DOMRenderProps,\n Provider,\n RenderProps,\n SlotProps,\n StyleRenderProps,\n useContextProps,\n useRenderProps\n} from './utils';\nimport {Collection} from 'react-aria/Collection';\nimport {\n CollectionBuilder,\n createBranchComponent,\n createLeafComponent\n} from 'react-aria/CollectionBuilder';\nimport {\n CollectionProps,\n CollectionRendererContext,\n DefaultCollectionRenderer,\n ItemRenderProps,\n SectionProps\n} from './Collection';\nimport {\n DisabledBehavior,\n DragPreviewRenderer,\n Expandable,\n forwardRefType,\n GlobalDOMAttributes,\n HoverEvents,\n Key,\n LinkDOMProps,\n MultipleSelection,\n PressEvents,\n RefObject,\n SelectionMode\n} from '@react-types/shared';\nimport {\n DragAndDropContext,\n DropIndicatorContext,\n useDndPersistedKeys,\n useRenderDropIndicator\n} from './DragAndDrop';\nimport {DragAndDropHooks} from './useDragAndDrop';\nimport {DraggableCollectionState} from 'react-stately/useDraggableCollectionState';\nimport {DraggableItemResult} from 'react-aria/useDraggableCollection';\nimport {\n DropIndicatorAria,\n DropIndicatorProps,\n DroppableCollectionResult\n} from 'react-aria/useDroppableCollection';\nimport {DroppableCollectionState} from 'react-stately/useDroppableCollectionState';\nimport {filterDOMProps} from 'react-aria/filterDOMProps';\nimport {FocusScope} from 'react-aria/FocusScope';\nimport {\n GridListHeader,\n GridListHeaderContext,\n GridListHeaderInnerContext,\n GridListHeaderProps\n} from './GridList';\nimport {inertValue} from 'react-aria/private/utils/inertValue';\nimport {ListKeyboardDelegate} from 'react-aria/ListKeyboardDelegate';\nimport {\n LoadMoreSentinelProps,\n useLoadMoreSentinel\n} from 'react-aria/private/utils/useLoadMoreSentinel';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {Node, SelectionBehavior} from '@react-types/shared';\nimport React, {\n createContext,\n ForwardedRef,\n forwardRef,\n JSX,\n ReactNode,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState\n} from 'react';\nimport {SelectionIndicatorContext} from './SelectionIndicator';\nimport {SharedElementTransition} from './SharedElementTransition';\nimport {TreeDropTargetDelegate} from './TreeDropTargetDelegate';\nimport {TreeState, useTreeState} from 'react-stately/useTreeState';\nimport {useCachedChildren} from 'react-aria/private/collections/useCachedChildren';\nimport {useCollator} from 'react-aria/useCollator';\nimport {useControlledState} from 'react-stately/useControlledState';\nimport {useFocusRing} from 'react-aria/useFocusRing';\nimport {useGridListSection, useGridListSelectionCheckbox} from 'react-aria/useGridList';\nimport {useHover} from 'react-aria/useHover';\nimport {useId} from 'react-aria/useId';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {useVisuallyHidden} from 'react-aria/VisuallyHidden';\n\nclass TreeCollection<T> extends BaseCollection<T> {\n private expandedKeys: Set<Key> = new Set();\n\n withExpandedKeys(lastExpandedKeys: Set<Key>, expandedKeys: Set<Key>) {\n let collection = this.clone();\n collection.expandedKeys = expandedKeys;\n\n // Clone ancestor section nodes so React knows to re-render since the same item won't cause a new render but a clone creating a new object with the same value will\n // Without this change, the items won't expand and collapse when virtualized inside a section\n TreeCollection.cloneAncestorSections(expandedKeys, lastExpandedKeys, collection);\n TreeCollection.cloneAncestorSections(lastExpandedKeys, expandedKeys, collection);\n\n collection.frozen = this.frozen;\n return collection;\n }\n\n // diff lastExpandedKeys and expandedKeys so we only clone what has changed\n private static cloneAncestorSections<T>(\n keys: Iterable<Key>,\n excludeSet: Set<Key>,\n collection: TreeCollection<T>\n ) {\n for (let key of keys) {\n if (!excludeSet.has(key)) {\n let currentKey: Key | null = key;\n while (currentKey != null) {\n let item = collection.getItem(currentKey) as CollectionNode<T>;\n if (item?.type === 'section') {\n collection.keyMap.set(currentKey, item.clone());\n break;\n } else {\n currentKey = item?.parentKey ?? null;\n }\n }\n }\n }\n }\n\n *[Symbol.iterator]() {\n let firstKey = this.getFirstKey();\n let node: Node<T> | null = firstKey != null ? this.getItem(firstKey) : null;\n\n while (node) {\n yield node as Node<T>;\n if (node.type === 'section') {\n node = node.nextKey != null ? this.getItem(node.nextKey) : null;\n } else {\n // This will include both item and content nodes\n // We handle the content nodes in useCollectionRenderer and ListLayout\n let key = this.getKeyAfter(node.key);\n node = key != null ? this.getItem(key) : null;\n }\n }\n }\n\n getLastKey() {\n // Find the deepest expanded child. We don't use collection.getLastKey() here\n // because that will return the deepest child regardless of expandedKeys.\n // Instead, start from the last top-level key and walk down.\n let key = this.lastKey;\n if (key == null) {\n return null;\n }\n\n let node = this.getItem(key) as CollectionNode<T>;\n\n while (\n node?.lastChildKey != null &&\n (node.type !== 'item' || this.expandedKeys.has(node.key))\n ) {\n node = this.getItem(node.lastChildKey) as CollectionNode<T>;\n }\n\n return node?.key;\n }\n\n getKeyAfter(key: Key) {\n let node = this.getItem(key) as CollectionNode<T>;\n if (!node) {\n return null;\n }\n\n if ((this.expandedKeys.has(node.key) || node.type !== 'item') && node.firstChildKey != null) {\n return node.firstChildKey;\n }\n\n while (node) {\n if (node.nextKey != null) {\n return node.nextKey;\n }\n\n if (node.parentKey != null) {\n node = this.getItem(node.parentKey) as CollectionNode<T>;\n } else {\n return null;\n }\n }\n\n return null;\n }\n\n getKeyBefore(key: Key) {\n let node = this.getItem(key) as CollectionNode<T>;\n if (!node) {\n return null;\n }\n\n if (node.prevKey != null) {\n node = this.getItem(node.prevKey) as CollectionNode<T>;\n\n // If the lastChildKey is expanded, check its lastChildKey\n while (\n node &&\n (node.type !== 'item' || this.expandedKeys.has(node.key)) &&\n node.lastChildKey != null\n ) {\n node = this.getItem(node.lastChildKey) as CollectionNode<T>;\n }\n\n return node?.key ?? null;\n }\n\n return node.parentKey;\n }\n\n getChildren(key: Key): Iterable<Node<T>> {\n let self = this;\n return {\n *[Symbol.iterator]() {\n let parent = self.getItem(key) as CollectionNode<T> | null;\n let node =\n parent?.firstChildKey != null\n ? (self.getItem(parent.firstChildKey) as CollectionNode<T>)\n : null;\n if (parent && parent.type === 'section' && node) {\n // Stop once either the node is null or the node is the parent's sibling\n while (node && node.key !== parent.nextKey) {\n yield self.getItem(node.key)!;\n // This will include content nodes which we skip in ListLayout\n let key = self.getKeyAfter(node.key);\n node = key != null ? (self.getItem(key)! as CollectionNode<T>) : null;\n }\n } else {\n while (node) {\n yield node as Node<T>;\n node = node.nextKey != null ? (self.getItem(node.nextKey)! as CollectionNode<T>) : null;\n }\n }\n }\n };\n }\n\n getTextValue(key: Key): string {\n let item = this.getItem(key);\n return item ? item.textValue : '';\n }\n}\n\nexport interface TreeRenderProps {\n /**\n * Whether the tree has no items and should display its empty state.\n *\n * @selector [data-empty]\n */\n isEmpty: boolean;\n /**\n * Whether the tree is currently focused.\n *\n * @selector [data-focused]\n */\n isFocused: boolean;\n /**\n * Whether the tree is currently keyboard focused.\n *\n * @selector [data-focus-visible]\n */\n isFocusVisible: boolean;\n /**\n * The type of selection that is allowed in the collection.\n *\n * @selector [data-selection-mode=\"single | multiple\"]\n */\n selectionMode: SelectionMode;\n /**\n * Whether the tree allows dragging.\n *\n * @selector [data-allows-dragging]\n */\n allowsDragging: boolean;\n /**\n * Whether the tree is currently the active drop target.\n *\n * @selector [data-drop-target]\n */\n isDropTarget: boolean;\n /**\n * State of the tree.\n */\n state: TreeState<unknown>;\n}\n\nexport interface TreeEmptyStateRenderProps extends Omit<TreeRenderProps, 'isEmpty'> {}\n\nexport interface TreeProps<T>\n extends\n Omit<AriaTreeProps<T>, 'children'>,\n MultipleSelection,\n CollectionProps<T>,\n StyleRenderProps<TreeRenderProps>,\n SlotProps,\n Expandable,\n GlobalDOMAttributes<HTMLDivElement> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-Tree'\n */\n className?: ClassNameOrFunction<TreeRenderProps>;\n /**\n * How multiple selection should behave in the tree.\n *\n * @default 'toggle'\n */\n selectionBehavior?: SelectionBehavior;\n /** Provides content to display when there are no items in the list. */\n renderEmptyState?: (props: TreeEmptyStateRenderProps) => ReactNode;\n /**\n * Whether `disabledKeys` applies to all interactions, or only selection.\n *\n * @default 'all'\n */\n disabledBehavior?: DisabledBehavior;\n /**\n * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for\n * the Tree.\n */\n dragAndDropHooks?: DragAndDropHooks<NoInfer<T>>;\n}\n\nexport const TreeContext = createContext<ContextValue<TreeProps<any>, HTMLDivElement>>(null);\nexport const TreeStateContext = createContext<TreeState<any> | null>(null);\n\n/**\n * A tree provides users with a way to navigate nested hierarchical information, with support for\n * keyboard navigation and selection.\n */\nexport const Tree = /*#__PURE__*/ (forwardRef as forwardRefType)(function Tree<T>(\n props: TreeProps<T>,\n ref: ForwardedRef<HTMLDivElement>\n) {\n // Render the portal first so that we have the collection by the time we render the DOM in SSR.\n [props, ref] = useContextProps(props, ref, TreeContext);\n\n return (\n <CollectionBuilder\n content={<Collection {...props} />}\n createCollection={() => new TreeCollection<T>()}>\n {collection => <TreeInner props={props} collection={collection} treeRef={ref} />}\n </CollectionBuilder>\n );\n});\n\nconst EXPANSION_KEYS = {\n expand: {\n ltr: 'ArrowRight',\n rtl: 'ArrowLeft'\n },\n collapse: {\n ltr: 'ArrowLeft',\n rtl: 'ArrowRight'\n }\n};\n\ninterface TreeInnerProps<T> {\n props: TreeProps<T>;\n collection: TreeCollection<T>;\n treeRef: RefObject<HTMLDivElement | null>;\n}\n\nfunction TreeInner<T>({props, collection, treeRef: ref}: TreeInnerProps<T>) {\n const {dragAndDropHooks} = props;\n let {direction} = useLocale();\n let collator = useCollator({usage: 'search', sensitivity: 'base'});\n let hasDragHooks = !!dragAndDropHooks?.useDraggableCollectionState;\n let hasDropHooks = !!dragAndDropHooks?.useDroppableCollectionState;\n let dragHooksProvided = useRef(hasDragHooks);\n let dropHooksProvided = useRef(hasDropHooks);\n\n useEffect(() => {\n if (dragHooksProvided.current !== hasDragHooks) {\n console.warn(\n 'Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n if (dropHooksProvided.current !== hasDropHooks) {\n console.warn(\n 'Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.'\n );\n }\n }, [hasDragHooks, hasDropHooks]);\n let {\n selectionMode = 'none',\n expandedKeys: propExpandedKeys,\n defaultExpandedKeys: propDefaultExpandedKeys,\n onExpandedChange,\n disabledBehavior = 'all'\n } = props;\n let {\n CollectionRoot,\n isVirtualized,\n layoutDelegate,\n dropTargetDelegate: ctxDropTargetDelegate\n } = useContext(CollectionRendererContext);\n\n // Kinda annoying that we have to replicate this code here as well as in useTreeState, but don't want to add\n // flattenCollection stuff to useTreeState. Think about this later\n let [expandedKeys, setExpandedKeys] = useControlledState(\n propExpandedKeys ? new Set(propExpandedKeys) : undefined,\n propDefaultExpandedKeys ? new Set(propDefaultExpandedKeys) : new Set(),\n onExpandedChange\n );\n\n let [lastCollection, setLastCollection] = useState(collection);\n let [lastExpandedKeys, setLastExpandedKeys] = useState(expandedKeys);\n let [flattenedCollection, setFlattenedCollection] = useState(() =>\n collection.withExpandedKeys(lastExpandedKeys, expandedKeys)\n );\n\n // if the lastExpandedKeys is not the same as the currentExpandedKeys or the collection has changed, then run this\n if (!areSetsEqual(lastExpandedKeys, expandedKeys) || collection !== lastCollection) {\n setFlattenedCollection(collection.withExpandedKeys(lastExpandedKeys, expandedKeys));\n setLastCollection(collection);\n setLastExpandedKeys(expandedKeys);\n }\n\n let state = useTreeState({\n ...props,\n selectionMode,\n expandedKeys,\n onExpandedChange: setExpandedKeys,\n collection: flattenedCollection,\n children: undefined,\n disabledBehavior\n });\n\n let {gridProps} = useTree(\n {\n ...props,\n isVirtualized,\n layoutDelegate\n },\n state,\n ref\n );\n\n let dragState: DraggableCollectionState | undefined = undefined;\n let dropState: DroppableCollectionState | undefined = undefined;\n let droppableCollection: DroppableCollectionResult | undefined = undefined;\n let isRootDropTarget = false;\n let dragPreview: JSX.Element | null = null;\n let preview = useRef<DragPreviewRenderer>(null);\n\n if (hasDragHooks && dragAndDropHooks) {\n // oxlint-disable-next-line react/react-compiler\n dragState = dragAndDropHooks.useDraggableCollectionState!({\n collection: state.collection,\n selectionManager: state.selectionManager,\n preview: dragAndDropHooks.renderDragPreview ? preview : undefined\n });\n // oxlint-disable-next-line react/react-compiler\n dragAndDropHooks.useDraggableCollection!({}, dragState, ref);\n\n let DragPreview = dragAndDropHooks.DragPreview!;\n dragPreview = dragAndDropHooks.renderDragPreview ? (\n <DragPreview ref={preview}>{dragAndDropHooks.renderDragPreview}</DragPreview>\n ) : null;\n }\n\n let [treeDropTargetDelegate] = useState(() => new TreeDropTargetDelegate());\n if (hasDropHooks && dragAndDropHooks) {\n // oxlint-disable-next-line react/react-compiler\n dropState = dragAndDropHooks.useDroppableCollectionState!({\n collection: state.collection,\n selectionManager: state.selectionManager\n });\n let dropTargetDelegate =\n dragAndDropHooks.dropTargetDelegate ||\n ctxDropTargetDelegate ||\n new dragAndDropHooks.ListDropTargetDelegate(state.collection, ref, {direction});\n treeDropTargetDelegate.setup(dropTargetDelegate, state, direction);\n\n let keyboardDelegate = new ListKeyboardDelegate({\n collection: state.collection,\n collator,\n ref,\n disabledKeys: state.selectionManager.disabledKeys,\n disabledBehavior: state.selectionManager.disabledBehavior,\n direction,\n layoutDelegate\n });\n\n // oxlint-disable-next-line react/react-compiler\n droppableCollection = dragAndDropHooks.useDroppableCollection!(\n {\n keyboardDelegate,\n dropTargetDelegate: treeDropTargetDelegate,\n onDropActivate: e => {\n // Expand collapsed item when dragging over. For keyboard, allow collapsing.\n if (e.target.type === 'item') {\n let key = e.target.key;\n let item = state.collection.getItem(key);\n let isExpanded = expandedKeys.has(key);\n if (\n item &&\n item.hasChildNodes &&\n (!isExpanded || dragAndDropHooks?.isVirtualDragging?.())\n ) {\n state.toggleKey(key);\n }\n }\n },\n onKeyDown: e => {\n let target = dropState?.target;\n if (target && target.type === 'item' && target.dropPosition === 'on') {\n let item = state.collection.getItem(target.key);\n if (\n e.key === EXPANSION_KEYS['expand'][direction] &&\n item?.hasChildNodes &&\n !state.expandedKeys.has(target.key)\n ) {\n state.toggleKey(target.key);\n } else if (\n e.key === EXPANSION_KEYS['collapse'][direction] &&\n item?.hasChildNodes &&\n state.expandedKeys.has(target.key)\n ) {\n state.toggleKey(target.key);\n }\n }\n }\n },\n dropState,\n ref\n );\n\n isRootDropTarget = dropState.isDropTarget({type: 'root'});\n }\n\n let isTreeDraggable = !!(hasDragHooks && !dragState?.isDisabled);\n\n let {focusProps, isFocused, isFocusVisible} = useFocusRing();\n let renderValues = {\n isEmpty: state.collection.size === 0,\n isFocused,\n isFocusVisible,\n isDropTarget: isRootDropTarget,\n selectionMode: state.selectionManager.selectionMode,\n allowsDragging: !!isTreeDraggable,\n state\n };\n\n let renderProps = useRenderProps({\n ...props,\n children: undefined,\n defaultClassName: 'react-aria-Tree',\n values: renderValues\n });\n\n let emptyState: ReactNode = null;\n if (state.collection.size === 0 && props.renderEmptyState) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {isEmpty, ...values} = renderValues;\n let content = props.renderEmptyState({...values});\n let treeGridRowProps = {\n 'aria-level': 1\n };\n\n emptyState = (\n <div role=\"row\" style={{display: 'contents'}} {...treeGridRowProps}>\n <div role=\"gridcell\" style={{display: 'contents'}}>\n {content}\n </div>\n </div>\n );\n }\n\n let DOMProps = filterDOMProps(props, {global: true});\n\n return (\n <>\n <FocusScope>\n <dom.div\n {...mergeProps(\n DOMProps,\n renderProps,\n gridProps,\n focusProps,\n droppableCollection?.collectionProps\n )}\n ref={ref}\n slot={props.slot || undefined}\n data-empty={state.collection.size === 0 || undefined}\n data-focused={isFocused || undefined}\n data-drop-target={isRootDropTarget || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-selection-mode={\n state.selectionManager.selectionMode === 'none'\n ? undefined\n : state.selectionManager.selectionMode\n }\n data-allows-dragging={!!isTreeDraggable || undefined}>\n <Provider\n values={[\n [TreeStateContext, state],\n [DragAndDropContext, {dragAndDropHooks, dragState, dropState}],\n [DropIndicatorContext, {render: TreeDropIndicatorWrapper}]\n ]}>\n {hasDropHooks && <RootDropIndicator />}\n <SharedElementTransition>\n <CollectionRoot\n collection={state.collection}\n persistedKeys={useDndPersistedKeys(\n state.selectionManager,\n dragAndDropHooks,\n dropState\n )}\n scrollRef={ref}\n renderDropIndicator={useRenderDropIndicator(dragAndDropHooks, dropState)}\n />\n </SharedElementTransition>\n </Provider>\n {emptyState}\n </dom.div>\n </FocusScope>\n {dragPreview}\n </>\n );\n}\n\n// TODO: readd the rest of the render props when tree supports them\nexport interface TreeItemRenderProps extends ItemRenderProps {\n /**\n * Whether the tree item is expanded.\n *\n * @selector [data-expanded]\n */\n isExpanded: boolean;\n /**\n * Whether the tree item has child tree items.\n *\n * @selector [data-has-child-items]\n */\n hasChildItems: boolean;\n /**\n * What level the tree item has within the tree.\n *\n * @selector [data-level=\"number\"]\n */\n level: number;\n /**\n * Whether the tree item's children have keyboard focus.\n *\n * @selector [data-focus-visible-within]\n */\n isFocusVisibleWithin: boolean;\n /** The state of the tree. */\n state: TreeState<unknown>;\n /** The unique id of the tree row. */\n id: Key;\n}\n\nexport interface TreeItemContentRenderProps extends TreeItemRenderProps {}\n\n// The TreeItemContent is the one that accepts RenderProps because we would get much more complicated logic in TreeItem otherwise since we'd\n// need to do a bunch of check to figure out what is the Content and what are the actual collection elements (aka child rows) of the TreeItem\nexport interface TreeItemContentProps {\n /**\n * The children of the component. A function may be provided to alter the children based on\n * component state.\n */\n children: ChildrenOrFunction<TreeItemContentRenderProps>;\n}\n\nclass TreeContentNode extends CollectionNode<any> {\n static readonly type = 'content';\n}\n\nexport const TreeItemContent = /*#__PURE__*/ createLeafComponent(\n TreeContentNode,\n function TreeItemContent(props: TreeItemContentProps) {\n let values = useContext(TreeItemContentContext)!;\n let renderProps = useRenderProps({\n children: props.children,\n values\n });\n return (\n <CollectionRendererContext.Provider value={DefaultCollectionRenderer}>\n {renderProps.children}\n </CollectionRendererContext.Provider>\n );\n }\n);\n\nexport const TreeItemContentContext = createContext<TreeItemContentRenderProps | null>(null);\n\nexport interface TreeItemProps<T = object>\n extends\n StyleRenderProps<TreeItemRenderProps>,\n LinkDOMProps,\n HoverEvents,\n PressEvents,\n Pick<AriaTreeItemOptions, 'hasChildItems' | 'focusMode' | 'allowsArrowNavigation'>,\n Omit<GlobalDOMAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-TreeItem'\n */\n className?: ClassNameOrFunction<TreeItemRenderProps>;\n /** The unique id of the tree row. */\n id?: Key;\n /**\n * The object value that this tree item represents. When using dynamic collections, this is set\n * automatically.\n */\n value?: T;\n /** A string representation of the tree item's contents, used for features like typeahead. */\n textValue: string;\n /** An accessibility label for this tree item. */\n 'aria-label'?: string;\n /**\n * The content of the tree item along with any nested children. Supports static nested tree items\n * or use of a Collection to dynamically render nested tree items.\n */\n children: ReactNode;\n /** Whether the item is disabled. */\n isDisabled?: boolean;\n /**\n * Handler that is called when a user performs an action on this tree item. The exact user event\n * depends on the collection's `selectionBehavior` prop and the interaction modality.\n */\n onAction?: () => void;\n}\n\nclass TreeItemNode extends CollectionNode<any> {\n static readonly type = 'item';\n}\n\n/**\n * A TreeItem represents an individual item in a Tree.\n */\nexport const TreeItem = /*#__PURE__*/ createBranchComponent(\n TreeItemNode,\n <T extends any>(props: TreeItemProps<T>, ref: ForwardedRef<HTMLDivElement>, item: Node<T>) => {\n let state = useContext(TreeStateContext)!;\n ref = useObjectRef<HTMLDivElement>(ref);\n let {dragAndDropHooks, dragState, dropState} = useContext(DragAndDropContext)!;\n let isDraggable =\n dragState && !(dragState.isDisabled || dragState.selectionManager.isDisabled(item.key));\n\n // TODO: remove this when we support description in tree row\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {rowProps, gridCellProps, expandButtonProps, descriptionProps, ...states} = useTreeItem(\n {\n node: item,\n shouldSelectOnPressUp: !!dragState,\n focusMode: props.focusMode,\n allowsArrowNavigation: props.allowsArrowNavigation\n },\n state,\n ref\n );\n let isExpanded = rowProps['aria-expanded'] === true;\n let hasChildItems =\n props.hasChildItems || [...state.collection.getChildren!(item.key)]?.length > 1;\n let level = rowProps['aria-level'] || 1;\n\n let {hoverProps, isHovered} = useHover({\n // because of https://bugs.webkit.org/show_bug.cgi?id=214609, supporting hover styles when a item is ONLY isDraggable\n // results in hover styles sticking around after a reorder/drop operation...\n isDisabled: !states.allowsSelection && !states.hasAction && !isDraggable,\n onHoverStart: props.onHoverStart,\n onHoverChange: props.onHoverChange,\n onHoverEnd: props.onHoverEnd\n });\n\n let {isFocusVisible, focusProps} = useFocusRing();\n let {isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps} = useFocusRing({\n within: true\n });\n let {checkboxProps} = useGridListSelectionCheckbox({key: item.key}, state);\n\n let draggableItem: DraggableItemResult | null = null;\n if (dragState && dragAndDropHooks) {\n draggableItem = dragAndDropHooks.useDraggableItem!(\n {key: item.key, hasDragButton: true},\n dragState\n );\n }\n\n let dropIndicator: DropIndicatorAria | null = null;\n let expandButtonRef = useRef<HTMLButtonElement>(null);\n let dropIndicatorRef = useRef<HTMLDivElement>(null);\n let activateButtonRef = useRef<HTMLDivElement>(null);\n let {visuallyHiddenProps} = useVisuallyHidden();\n if (dropState && dragAndDropHooks) {\n dropIndicator = dragAndDropHooks.useDropIndicator!(\n {\n target: {type: 'item', key: item.key, dropPosition: 'on'},\n activateButtonRef\n },\n dropState,\n dropIndicatorRef\n );\n }\n\n let isDragging = dragState && dragState.isDragging(item.key);\n let isDropTarget = dropIndicator?.isDropTarget;\n\n let selectionMode = state.selectionManager.selectionMode;\n let selectionBehavior = state.selectionManager.selectionBehavior;\n let renderPropValues = React.useMemo<TreeItemContentRenderProps>(\n () => ({\n ...states,\n isHovered,\n isFocusVisible,\n isExpanded,\n hasChildItems,\n level,\n selectionMode,\n selectionBehavior,\n isFocusVisibleWithin,\n state,\n id: item.key,\n allowsDragging: !!dragState,\n isDragging,\n isDropTarget\n }),\n [\n states,\n isHovered,\n isFocusVisible,\n isExpanded,\n hasChildItems,\n level,\n isFocusVisibleWithin,\n state,\n item.key,\n dragState,\n isDragging,\n isDropTarget,\n selectionBehavior,\n selectionMode\n ]\n );\n\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-TreeItem',\n defaultStyle: {\n // @ts-ignore\n '--tree-item-level': level\n },\n values: renderPropValues\n });\n\n useEffect(() => {\n if (!item.textValue && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'A `textValue` prop is required for <TreeItem> elements in order to support accessibility features such as type to select.'\n );\n }\n }, [item.textValue]);\n\n useEffect(() => {\n if (hasChildItems && !expandButtonRef.current && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'Expandable tree items must contain a expand button so screen reader users can expand/collapse the item.'\n );\n }\n // eslint-disable-next-line\n }, []);\n\n let dragButtonRef = useRef<HTMLButtonElement>(null);\n useEffect(() => {\n if (dragState && !dragButtonRef.current && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'Draggable items in a Tree must contain a <Button slot=\"drag\"> element so that keyboard and screen reader users can drag them.'\n );\n }\n // eslint-disable-next-line\n }, []);\n\n let children = useCachedChildren({\n items: state.collection.getChildren!(item.key),\n children: item => {\n switch (item.type) {\n case 'content': {\n return item.render!(item);\n }\n // Skip item since we don't render the nested rows as children of the parent row, the flattened collection\n // will render them each as siblings instead\n case 'loader':\n case 'item':\n return <></>;\n default:\n throw new Error('Unsupported element type in TreeRow: ' + item.type);\n }\n }\n });\n\n let activateButtonId = useId();\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n delete DOMProps.onClick;\n\n return (\n <>\n {dropIndicator && !dropIndicator.isHidden && (\n <div\n role=\"row\"\n aria-level={rowProps['aria-level']}\n aria-expanded={rowProps['aria-expanded']}\n aria-label={dropIndicator.dropIndicatorProps['aria-label']}>\n <div role=\"gridcell\" aria-colindex={1} style={{display: 'contents'}}>\n <div\n role=\"button\"\n {...visuallyHiddenProps}\n {...dropIndicator.dropIndicatorProps}\n ref={dropIndicatorRef}\n />\n {rowProps['aria-expanded'] != null ? (\n // Button to allow touch screen reader users to expand the item while dragging.\n <div\n role=\"button\"\n {...visuallyHiddenProps}\n id={activateButtonId}\n aria-label={expandButtonProps['aria-label']}\n aria-labelledby={`${activateButtonId} ${rowProps.id}`}\n tabIndex={-1}\n ref={activateButtonRef}\n />\n ) : null}\n </div>\n </div>\n )}\n <dom.div\n {...mergeProps(\n DOMProps,\n rowProps,\n focusProps,\n hoverProps,\n focusWithinProps,\n draggableItem?.dragProps\n )}\n {...renderProps}\n ref={ref}\n // TODO: missing selectionBehavior, hasAction and allowsSelection data attribute equivalents (available in renderProps). Do we want those?\n data-expanded={(hasChildItems && isExpanded) || undefined}\n data-has-child-items={hasChildItems || undefined}\n data-level={level}\n data-selected={states.isSelected || undefined}\n data-disabled={states.isDisabled || undefined}\n data-hovered={isHovered || undefined}\n data-focused={states.isFocused || undefined}\n data-focus-visible={isFocusVisible || undefined}\n data-pressed={states.isPressed || undefined}\n data-selection-mode={\n state.selectionManager.selectionMode === 'none'\n ? undefined\n : state.selectionManager.selectionMode\n }\n data-allows-dragging={!!dragState || undefined}\n data-dragging={isDragging || undefined}\n data-drop-target={isDropTarget || undefined}>\n <div {...gridCellProps} style={{display: 'contents'}}>\n <Provider\n values={[\n [\n CheckboxContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n [\n CheckboxFieldContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n selection: checkboxProps\n }\n }\n ],\n // TODO: support description in the tree row\n // TODO: don't think I need to pass isExpanded to the button here since it can be sourced from the renderProps? Might be worthwhile passing it down?\n [\n ButtonContext,\n {\n slots: {\n [DEFAULT_SLOT]: {},\n chevron: {\n ...expandButtonProps,\n ref: expandButtonRef\n },\n drag: {\n ...draggableItem?.dragButtonProps,\n ref: dragButtonRef,\n style: {\n pointerEvents: 'none'\n }\n }\n }\n }\n ],\n [\n TreeItemContentContext,\n {\n ...renderPropValues\n }\n ],\n [SelectionIndicatorContext, {isSelected: states.isSelected}]\n ]}>\n {children}\n </Provider>\n </div>\n </dom.div>\n </>\n );\n }\n);\n\nexport interface TreeLoadMoreItemRenderProps {\n /**\n * What level the tree item has within the tree.\n *\n * @selector [data-level]\n */\n level: number;\n}\n\nexport interface TreeLoadMoreItemProps\n extends\n Omit<LoadMoreSentinelProps, 'collection' | 'direction'>,\n RenderProps<TreeLoadMoreItemRenderProps> {\n /**\n * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the\n * element. A function may be provided to compute the class based on component state.\n *\n * @default 'react-aria-TreeLoadMoreItem'\n */\n className?: ClassNameOrFunction<TreeLoadMoreItemRenderProps>;\n /**\n * The load more spinner to render when loading additional items.\n */\n children?: ChildrenOrFunction<TreeLoadMoreItemRenderProps>;\n /**\n * Whether or not the loading spinner should be rendered or not.\n */\n isLoading?: boolean;\n}\n\nexport const TreeLoadMoreItem = createLeafComponent(LoaderNode, function TreeLoadingSentinel<\n T\n>(props: TreeLoadMoreItemProps, ref: ForwardedRef<HTMLDivElement>, item: Node<T>) {\n let {isVirtualized} = useContext(CollectionRendererContext);\n let state = useContext(TreeStateContext)!;\n let {isLoading, onLoadMore, scrollOffset, ...otherProps} = props;\n let sentinelRef = useRef(null);\n let memoedLoadMoreProps = useMemo(\n () => ({\n onLoadMore,\n // this collection will update anytime a row is expanded/collapsed becaused the flattenedRows will change.\n // This means onLoadMore will trigger but that might be ok cause the user should have logic to handle multiple loadMore calls\n collection: state?.collection,\n sentinelRef,\n scrollOffset\n }),\n [onLoadMore, scrollOffset, state?.collection]\n );\n useLoadMoreSentinel(memoedLoadMoreProps, sentinelRef);\n\n ref = useObjectRef<HTMLDivElement>(ref);\n let {rowProps, gridCellProps} = useTreeItem({node: item}, state, ref);\n let level = rowProps['aria-level'] || 1;\n\n // For now don't include aria-posinset and aria-setsize on loader since they aren't keyboard focusable\n // Arguably shouldn't include them ever since it might be confusing to the user to include the loaders as part of the\n // item count\n let ariaProps = {\n role: 'row',\n 'aria-level': rowProps['aria-level']\n };\n\n let renderProps = useRenderProps({\n ...otherProps,\n id: undefined,\n children: item.rendered,\n defaultClassName: 'react-aria-TreeLoader',\n values: {\n level\n }\n });\n let style = {};\n\n if (isVirtualized) {\n style = {display: 'contents'};\n }\n\n return (\n <>\n {/* Alway render the sentinel. For now onus is on the user for styling when using flex + gap (this would introduce a gap even though it doesn't take room) */}\n {/* @ts-ignore - compatibility with React < 19 */}\n <div style={{position: 'relative', width: 0, height: 0}} inert={inertValue(true)}>\n <div\n data-testid=\"loadMoreSentinel\"\n ref={sentinelRef}\n style={{position: 'absolute', height: 1, width: 1}}\n />\n </div>\n {isLoading && renderProps.children && (\n <dom.div\n ref={ref}\n {...mergeProps(filterDOMProps(props as any), ariaProps)}\n {...renderProps}\n data-level={level}>\n <div {...gridCellProps} style={style}>\n {renderProps.children}\n </div>\n </dom.div>\n )}\n </>\n );\n});\n\nfunction TreeDropIndicatorWrapper(\n props: DropIndicatorProps,\n ref: ForwardedRef<HTMLElement>\n): JSX.Element | null {\n ref = useObjectRef(ref);\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext)!;\n let buttonRef = useRef<HTMLDivElement>(null);\n // oxlint-disable-next-line react/react-compiler\n let {dropIndicatorProps, isHidden, isDropTarget} = dragAndDropHooks!.useDropIndicator!(\n props,\n dropState!,\n buttonRef\n );\n\n if (isHidden) {\n return null;\n }\n\n let level =\n dropState && props.target.type === 'item'\n ? (dropState.collection.getItem(props.target.key)?.level || 0) + 1\n : 1;\n return (\n <TreeDropIndicatorForwardRef\n {...props}\n dropIndicatorProps={dropIndicatorProps}\n isDropTarget={isDropTarget}\n ref={ref}\n buttonRef={buttonRef}\n level={level}\n />\n );\n}\n\ninterface TreeDropIndicatorProps extends DropIndicatorProps {\n dropIndicatorProps: React.HTMLAttributes<HTMLElement>;\n isDropTarget: boolean;\n buttonRef: RefObject<HTMLDivElement | null>;\n level: number;\n}\n\nfunction TreeDropIndicator(props: TreeDropIndicatorProps, ref: ForwardedRef<HTMLElement>) {\n let {dropIndicatorProps, isDropTarget, buttonRef, level, ...otherProps} = props;\n let {visuallyHiddenProps} = useVisuallyHidden();\n let renderProps = useRenderProps({\n ...otherProps,\n defaultClassName: 'react-aria-DropIndicator',\n defaultStyle: {\n position: 'relative',\n // @ts-ignore\n '--tree-item-level': level\n },\n values: {\n isDropTarget\n }\n });\n\n return (\n <dom.div\n {...renderProps}\n role=\"row\"\n aria-level={level}\n ref={ref as RefObject<HTMLDivElement | null>}\n data-drop-target={isDropTarget || undefined}>\n <div role=\"gridcell\">\n <div {...visuallyHiddenProps} role=\"button\" {...dropIndicatorProps} ref={buttonRef} />\n {renderProps.children}\n </div>\n </dom.div>\n );\n}\n\nconst TreeDropIndicatorForwardRef = forwardRef(TreeDropIndicator);\n\nfunction RootDropIndicator() {\n let {dragAndDropHooks, dropState} = useContext(DragAndDropContext);\n let ref = useRef<HTMLDivElement>(null);\n // oxlint-disable-next-line react/react-compiler\n let {dropIndicatorProps} = dragAndDropHooks!.useDropIndicator!(\n {\n target: {type: 'root'}\n },\n dropState!,\n ref\n );\n let isDropTarget = dropState!.isDropTarget({type: 'root'});\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n if (!isDropTarget && dropIndicatorProps['aria-hidden']) {\n return null;\n }\n\n return (\n <div role=\"row\" aria-hidden={dropIndicatorProps['aria-hidden']} style={{position: 'absolute'}}>\n <div role=\"gridcell\">\n <div role=\"button\" {...visuallyHiddenProps} {...dropIndicatorProps} ref={ref} />\n </div>\n </div>\n );\n}\n\nexport interface TreeSectionProps<T> extends SectionProps<T>, DOMRenderProps<'div', undefined> {}\n\n/**\n * A TreeSection represents a section within a Tree.\n */\nexport const TreeSection = /*#__PURE__*/ createBranchComponent(\n SectionNode,\n <T extends any>(props: TreeSectionProps<T>, ref: ForwardedRef<HTMLDivElement>, item: Node<T>) => {\n let state = useContext(TreeStateContext)!;\n let {CollectionBranch} = useContext(CollectionRendererContext);\n let headingRef = useRef(null);\n ref = useObjectRef<HTMLDivElement>(ref);\n let {rowHeaderProps, rowProps, rowGroupProps} = useGridListSection(\n {\n 'aria-label': props['aria-label'] ?? undefined\n },\n state,\n ref\n );\n let renderProps = useRenderProps({\n ...props,\n id: undefined,\n children: undefined,\n defaultClassName: 'react-aria-TreeSection',\n values: undefined\n });\n\n let DOMProps = filterDOMProps(props as any, {global: true});\n delete DOMProps.id;\n\n return (\n <dom.div {...mergeProps(DOMProps, renderProps, rowGroupProps)} ref={ref}>\n <Provider\n values={[\n [GridListHeaderContext, {...rowProps, ref: headingRef}],\n [GridListHeaderInnerContext, {...rowHeaderProps}]\n ]}>\n <CollectionBranch collection={state.collection} parent={item} />\n </Provider>\n </dom.div>\n );\n }\n);\n\nexport interface TreeHeaderProps extends GridListHeaderProps {}\n\nexport const TreeHeader = (props: TreeHeaderProps): ReactNode => {\n return (\n <GridListHeader className=\"react-aria-TreeHeader\" {...props}>\n {props.children}\n </GridListHeader>\n );\n};\n\nfunction areSetsEqual<T>(a: Set<T>, b: Set<T>) {\n if (a.size !== b.size) {\n return false;\n }\n\n for (let item of a) {\n if (!b.has(item)) {\n return false;\n }\n }\n return true;\n}\n"],"names":[],"version":3,"file":"Tree.cjs.map"}
@@ -248,11 +248,13 @@ function $414e00a610050f48$var$TreeInner({ props: props, collection: collection,
248
248
  let dragPreview = null;
249
249
  let preview = (0, $fwoTU$useRef)(null);
250
250
  if (hasDragHooks && dragAndDropHooks) {
251
+ // oxlint-disable-next-line react/react-compiler
251
252
  dragState = dragAndDropHooks.useDraggableCollectionState({
252
253
  collection: state.collection,
253
254
  selectionManager: state.selectionManager,
254
255
  preview: dragAndDropHooks.renderDragPreview ? preview : undefined
255
256
  });
257
+ // oxlint-disable-next-line react/react-compiler
256
258
  dragAndDropHooks.useDraggableCollection({}, dragState, ref);
257
259
  let DragPreview = dragAndDropHooks.DragPreview;
258
260
  dragPreview = dragAndDropHooks.renderDragPreview ? /*#__PURE__*/ (0, $fwoTU$react).createElement(DragPreview, {
@@ -261,6 +263,7 @@ function $414e00a610050f48$var$TreeInner({ props: props, collection: collection,
261
263
  }
262
264
  let [treeDropTargetDelegate] = (0, $fwoTU$useState)(()=>new (0, $ea71bc38166070b0$export$82c13862611c034e)());
263
265
  if (hasDropHooks && dragAndDropHooks) {
266
+ // oxlint-disable-next-line react/react-compiler
264
267
  dropState = dragAndDropHooks.useDroppableCollectionState({
265
268
  collection: state.collection,
266
269
  selectionManager: state.selectionManager
@@ -278,6 +281,7 @@ function $414e00a610050f48$var$TreeInner({ props: props, collection: collection,
278
281
  direction: direction,
279
282
  layoutDelegate: layoutDelegate
280
283
  });
284
+ // oxlint-disable-next-line react/react-compiler
281
285
  droppableCollection = dragAndDropHooks.useDroppableCollection({
282
286
  keyboardDelegate: keyboardDelegate,
283
287
  dropTargetDelegate: treeDropTargetDelegate,
@@ -412,7 +416,9 @@ const $414e00a610050f48$export$53d36ab85dc89436 = /*#__PURE__*/ (0, $fwoTU$creat
412
416
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
413
417
  let { rowProps: rowProps, gridCellProps: gridCellProps, expandButtonProps: expandButtonProps, descriptionProps: descriptionProps, ...states } = (0, $fwoTU$useTreeItem)({
414
418
  node: item,
415
- shouldSelectOnPressUp: !!dragState
419
+ shouldSelectOnPressUp: !!dragState,
420
+ focusMode: props.focusMode,
421
+ allowsArrowNavigation: props.allowsArrowNavigation
416
422
  }, state, ref);
417
423
  let isExpanded = rowProps['aria-expanded'] === true;
418
424
  let hasChildItems = props.hasChildItems || ((_this = [
@@ -588,6 +594,7 @@ const $414e00a610050f48$export$53d36ab85dc89436 = /*#__PURE__*/ (0, $fwoTU$creat
588
594
  (0, $4bd9daf9bf54cf04$export$b085522c77523c51),
589
595
  {
590
596
  slots: {
597
+ [(0, $b7b7a92703138c9b$export$c62b8e45d58ddad9)]: {},
591
598
  selection: checkboxProps
592
599
  }
593
600
  }
@@ -596,6 +603,7 @@ const $414e00a610050f48$export$53d36ab85dc89436 = /*#__PURE__*/ (0, $fwoTU$creat
596
603
  (0, $4bd9daf9bf54cf04$export$c32003b803b6c22e),
597
604
  {
598
605
  slots: {
606
+ [(0, $b7b7a92703138c9b$export$c62b8e45d58ddad9)]: {},
599
607
  selection: checkboxProps
600
608
  }
601
609
  }
@@ -709,6 +717,7 @@ function $414e00a610050f48$var$TreeDropIndicatorWrapper(props, ref) {
709
717
  ref = (0, $fwoTU$useObjectRef)(ref);
710
718
  let { dragAndDropHooks: dragAndDropHooks, dropState: dropState } = (0, $fwoTU$useContext)((0, $49776fcddfd94ccc$export$d188a835a7bc5783));
711
719
  let buttonRef = (0, $fwoTU$useRef)(null);
720
+ // oxlint-disable-next-line react/react-compiler
712
721
  let { dropIndicatorProps: dropIndicatorProps, isHidden: isHidden, isDropTarget: isDropTarget } = dragAndDropHooks.useDropIndicator(props, dropState, buttonRef);
713
722
  if (isHidden) return null;
714
723
  let level = dropState && props.target.type === 'item' ? (((_dropState_collection_getItem = dropState.collection.getItem(props.target.key)) === null || _dropState_collection_getItem === void 0 ? void 0 : _dropState_collection_getItem.level) || 0) + 1 : 1;
@@ -755,6 +764,7 @@ const $414e00a610050f48$var$TreeDropIndicatorForwardRef = /*#__PURE__*/ (0, $fwo
755
764
  function $414e00a610050f48$var$RootDropIndicator() {
756
765
  let { dragAndDropHooks: dragAndDropHooks, dropState: dropState } = (0, $fwoTU$useContext)((0, $49776fcddfd94ccc$export$d188a835a7bc5783));
757
766
  let ref = (0, $fwoTU$useRef)(null);
767
+ // oxlint-disable-next-line react/react-compiler
758
768
  let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator({
759
769
  target: {
760
770
  type: 'root'