@mui/x-tree-view 8.12.0 → 8.13.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 (68) hide show
  1. package/CHANGELOG.md +145 -0
  2. package/RichTreeView/RichTreeView.js +5 -5
  3. package/RichTreeView/RichTreeView.types.d.ts +2 -3
  4. package/RichTreeView/index.d.ts +1 -1
  5. package/SimpleTreeView/SimpleTreeView.types.d.ts +2 -3
  6. package/SimpleTreeView/index.d.ts +1 -1
  7. package/esm/RichTreeView/RichTreeView.js +5 -5
  8. package/esm/RichTreeView/RichTreeView.types.d.ts +2 -3
  9. package/esm/RichTreeView/index.d.ts +1 -1
  10. package/esm/SimpleTreeView/SimpleTreeView.types.d.ts +2 -3
  11. package/esm/SimpleTreeView/index.d.ts +1 -1
  12. package/esm/hooks/useApplyPropagationToSelectedItemsOnMount.js +2 -2
  13. package/esm/index.js +1 -1
  14. package/esm/internals/index.d.ts +2 -2
  15. package/esm/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.js +4 -4
  16. package/esm/internals/plugins/useTreeViewFocus/useTreeViewFocus.js +1 -1
  17. package/esm/internals/plugins/useTreeViewItems/useTreeViewItems.js +79 -158
  18. package/esm/internals/plugins/useTreeViewItems/useTreeViewItems.selectors.d.ts +0 -8
  19. package/esm/internals/plugins/useTreeViewItems/useTreeViewItems.selectors.js +0 -8
  20. package/esm/internals/plugins/useTreeViewItems/useTreeViewItems.types.d.ts +12 -26
  21. package/esm/internals/plugins/useTreeViewItems/useTreeViewItems.utils.d.ts +36 -2
  22. package/esm/internals/plugins/useTreeViewItems/useTreeViewItems.utils.js +115 -1
  23. package/esm/internals/plugins/useTreeViewJSXItems/useTreeViewJSXItems.js +6 -6
  24. package/esm/internals/plugins/useTreeViewKeyboardNavigation/useTreeViewKeyboardNavigation.js +1 -1
  25. package/esm/internals/plugins/useTreeViewLabel/useTreeViewLabel.js +2 -2
  26. package/esm/internals/plugins/useTreeViewLazyLoading/index.d.ts +1 -1
  27. package/esm/internals/plugins/useTreeViewLazyLoading/useTreeViewLazyLoading.selectors.d.ts +6 -2
  28. package/esm/internals/plugins/useTreeViewLazyLoading/useTreeViewLazyLoading.selectors.js +7 -2
  29. package/esm/internals/plugins/useTreeViewLazyLoading/useTreeViewLazyLoading.types.d.ts +8 -9
  30. package/esm/internals/plugins/useTreeViewSelection/useTreeViewSelection.itemPlugin.js +12 -3
  31. package/esm/internals/plugins/useTreeViewSelection/useTreeViewSelection.js +2 -2
  32. package/esm/internals/useTreeView/useTreeView.js +2 -2
  33. package/esm/useTreeItem/useTreeItem.js +3 -3
  34. package/hooks/useApplyPropagationToSelectedItemsOnMount.js +2 -3
  35. package/index.js +1 -1
  36. package/internals/index.d.ts +2 -2
  37. package/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.js +8 -8
  38. package/internals/plugins/useTreeViewFocus/useTreeViewFocus.js +4 -4
  39. package/internals/plugins/useTreeViewItems/useTreeViewItems.js +80 -159
  40. package/internals/plugins/useTreeViewItems/useTreeViewItems.selectors.d.ts +0 -8
  41. package/internals/plugins/useTreeViewItems/useTreeViewItems.selectors.js +0 -8
  42. package/internals/plugins/useTreeViewItems/useTreeViewItems.types.d.ts +12 -26
  43. package/internals/plugins/useTreeViewItems/useTreeViewItems.utils.d.ts +36 -2
  44. package/internals/plugins/useTreeViewItems/useTreeViewItems.utils.js +119 -2
  45. package/internals/plugins/useTreeViewJSXItems/useTreeViewJSXItems.js +8 -8
  46. package/internals/plugins/useTreeViewKeyboardNavigation/useTreeViewKeyboardNavigation.js +2 -3
  47. package/internals/plugins/useTreeViewLabel/useTreeViewLabel.js +2 -2
  48. package/internals/plugins/useTreeViewLazyLoading/index.d.ts +1 -1
  49. package/internals/plugins/useTreeViewLazyLoading/useTreeViewLazyLoading.selectors.d.ts +6 -2
  50. package/internals/plugins/useTreeViewLazyLoading/useTreeViewLazyLoading.selectors.js +7 -2
  51. package/internals/plugins/useTreeViewLazyLoading/useTreeViewLazyLoading.types.d.ts +8 -9
  52. package/internals/plugins/useTreeViewSelection/useTreeViewSelection.itemPlugin.js +12 -3
  53. package/internals/plugins/useTreeViewSelection/useTreeViewSelection.js +2 -2
  54. package/internals/useTreeView/useTreeView.js +2 -2
  55. package/package.json +2 -2
  56. package/useTreeItem/useTreeItem.js +3 -3
  57. package/esm/internals/hooks/useLazyRef.d.ts +0 -1
  58. package/esm/internals/hooks/useLazyRef.js +0 -1
  59. package/esm/internals/hooks/useOnMount.d.ts +0 -1
  60. package/esm/internals/hooks/useOnMount.js +0 -1
  61. package/esm/internals/hooks/useTimeout.d.ts +0 -1
  62. package/esm/internals/hooks/useTimeout.js +0 -1
  63. package/internals/hooks/useLazyRef.d.ts +0 -1
  64. package/internals/hooks/useLazyRef.js +0 -13
  65. package/internals/hooks/useOnMount.d.ts +0 -1
  66. package/internals/hooks/useOnMount.js +0 -13
  67. package/internals/hooks/useTimeout.d.ts +0 -1
  68. package/internals/hooks/useTimeout.js +0 -13
package/CHANGELOG.md CHANGED
@@ -5,6 +5,151 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.13.0
9
+
10
+ _Oct 1, 2025_
11
+
12
+ We'd like to extend a big thank you to the 14 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 📊 The chart zoom now supports the `tapAndDrag` gesture. Zoom in/out by tapping twice and dragging vertically.
15
+ - 🔎 Charts now allow [fine-grained control for zoom interactions](https://mui.com/x/react-charts/zoom-and-pan/#zoom-interactions-configuration).
16
+ ```jsx
17
+ <BarChartPro
18
+ zoomInteractionConfig={{
19
+ // Only zoom when Control key is pressed
20
+ zoom: [{ type: 'wheel', keys: ['Control'] }],
21
+ // Only pan when Shift key is pressed
22
+ pan: [{ type: 'drag', keys: ['Shift'] }],
23
+ }}
24
+ />
25
+ ```
26
+ - ➡️ Data Grid grouping rows now persist their expansion state when the rows are updated.
27
+ - 📜 Updated Data Grid vertical scrollbar to include pinned rows and aggregation sections.
28
+ - 📌 Improved the appearance of [pinned columns](https://mui.com/x/react-data-grid/column-pinning/#pinned-columns-appearance) and [pinned rows](https://mui.com/x/react-data-grid/row-pinning/#pinned-rows-appearance) sections in the Data Grid.
29
+ - 🚀 Tree View now fetches the children of expanded items on mount when using lazy loading.
30
+ - 🐞 Bugfixes
31
+ - 📚 Documentation improvements
32
+
33
+ Special thanks go out to the community members for their valuable contributions:
34
+ @sai6855
35
+
36
+ The following are all team members who have contributed to this release:
37
+ @alexfauquette, @arminmeh, @bernardobelchior, @flaviendelangle, @hasdfa, @Janpot, @JCQuintas, @KenanYusuf, @mapache-salvaje, @MBilalShafi, @mnajdova, @rita-codes, @siriwatknp
38
+
39
+ ### Data Grid
40
+
41
+ #### `@mui/x-data-grid@8.13.0`
42
+
43
+ - [DataGrid] Add scroll shadows and fix scrollbar overlap (#16476) @KenanYusuf
44
+ - [DataGrid] Fix row spanning stale state issue (#19733) @MBilalShafi
45
+ - [DataGrid] Fix toolbar `slotProps` not being applied (#19769) @sai6855
46
+ - [DataGrid] Skip calling `fetchRows()` when strategy is not initialized (#19728) @MBilalShafi
47
+
48
+ #### `@mui/x-data-grid-pro@8.13.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
49
+
50
+ Same changes as in `@mui/x-data-grid@8.13.0`, plus:
51
+
52
+ - [DataGridPro] Retain expansion state on rows update (#19697) @MBilalShafi
53
+
54
+ #### `@mui/x-data-grid-premium@8.13.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
55
+
56
+ Same changes as in `@mui/x-data-grid-pro@8.13.0`, plus:
57
+
58
+ - [DataGridPremium] Add `metadata.referenceId` to AI assistant prompt resolver (#19695) @hasdfa
59
+ - [DataGridPremium] Fix aggregation value retrieval (#19724) @arminmeh
60
+ - [DataGridPremium] Get correct active chart id while rebuilding data (#19720) @arminmeh
61
+
62
+ ### Date and Time Pickers
63
+
64
+ #### `@mui/x-date-pickers@8.12.0`
65
+
66
+ Internal changes.
67
+
68
+ #### `@mui/x-date-pickers-pro@8.12.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
69
+
70
+ Same changes as in `@mui/x-date-pickers@8.12.0`.
71
+
72
+ ### Charts
73
+
74
+ #### `@mui/x-charts@8.13.0`
75
+
76
+ - [charts] Add `tapAndDrag` zoom gesture (#19727) @JCQuintas
77
+ - [charts] Add arc focus indicator that follows the arc form (#19696) @mnajdova
78
+ - [charts] Fix outline color (#19752) @alexfauquette
79
+ - [charts] Improve tooltip doc (#19731) @JCQuintas
80
+ - [charts] Make axis highlight reflect the keyboard interaction (#19631) @alexfauquette
81
+ - [charts] Prevent horizontal scroll on keyboard navigation (#19704) @alexfauquette
82
+ - [charts] Simplify gestures by removing bindings (#19767) @JCQuintas
83
+
84
+ #### `@mui/x-charts-pro@8.13.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
85
+
86
+ Same changes as in `@mui/x-charts@8.13.0`, plus:
87
+
88
+ - [charts-pro] Allow zoom interactions to be configured (#18646) @JCQuintas
89
+ - [charts-pro] Fix zoom preview having wrong domain in some cases (#19723) @bernardobelchior
90
+
91
+ #### `@mui/x-charts-premium@8.13.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
92
+
93
+ Same changes as in `@mui/x-charts-pro@8.13.0`.
94
+
95
+ ### Tree View
96
+
97
+ #### `@mui/x-tree-view@8.13.0`
98
+
99
+ - [tree view] Export the `apiRef` type of each Tree View component (#19543) @flaviendelangle
100
+ - [tree view] Fix indeterminate checkbox state (#19544) @flaviendelangle
101
+ - [tree view] Improve the lazy loading initial expansion (#19284) @flaviendelangle
102
+ - [tree view] Use Base UI utils whenever possible (#19502) @flaviendelangle
103
+
104
+ #### `@mui/x-tree-view-pro@8.13.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
105
+
106
+ Same changes as in `@mui/x-tree-view@8.13.0`.
107
+
108
+ ### Codemod
109
+
110
+ #### `@mui/x-codemod@8.12.0`
111
+
112
+ Internal changes.
113
+
114
+ ### Docs
115
+
116
+ - [docs] Add a recipe to customize editing component with Autocomplete (#19651) @siriwatknp
117
+ - [docs] Refine the electricity scatter tooltip (#19689) @alexfauquette
118
+ - [docs] Revise the Axis doc (#19052) @mapache-salvaje
119
+ - [docs] Remove reference to nonexistent `FocusedMark` API page (#19773) @bernardobelchior
120
+
121
+ ### Core
122
+
123
+ - [code-infra] Change charts codspeed integration to use walltime (#19729) @JCQuintas
124
+ - [code-infra] Port stylelint from core repo (#19633) @Janpot
125
+ - [code-infra] Stabilize fake timers in regression tests (#19719) @Janpot
126
+ - [code-infra] Stabilize size for bundles with `releaseInfo` (#19674) @Janpot
127
+ - [code-infra] Fix `pnpm-lock.yaml` broken lockfile (#19755) @bernardobelchior
128
+
129
+ ## 8.12.1
130
+
131
+ _Sep 25, 2025_
132
+
133
+ Release highlight ✨:
134
+
135
+ - 🐞 Hotfix for Grid-Charts integration issue with aggregated values
136
+
137
+ ### Data Grid
138
+
139
+ #### `@mui/x-data-grid@8.12.1`
140
+
141
+ Internal changes.
142
+
143
+ #### `@mui/x-data-grid-pro@8.12.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
144
+
145
+ Same changes as in `@mui/x-data-grid@8.12.1`.
146
+
147
+ #### `@mui/x-data-grid-premium@8.12.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
148
+
149
+ Same changes as in `@mui/x-data-grid-pro@8.12.1`, plus:
150
+
151
+ - [DataGridPremium] Collect aggregated values properly for the charts integration context (#19714) @arminmeh
152
+
8
153
  ## 8.12.0
9
154
 
10
155
  _Sep 25, 2025_
@@ -23,7 +23,7 @@ var _useTreeView = require("../internals/useTreeView");
23
23
  var _TreeViewProvider = require("../internals/TreeViewProvider");
24
24
  var _RichTreeView2 = require("./RichTreeView.plugins");
25
25
  var _RichTreeViewItems = require("../internals/components/RichTreeViewItems");
26
- var _useTreeViewItems = require("../internals/plugins/useTreeViewItems");
26
+ var _useTreeViewLazyLoading = require("../internals/plugins/useTreeViewLazyLoading");
27
27
  var _jsxRuntime = require("react/jsx-runtime");
28
28
  const _excluded = ["slots", "slotProps"];
29
29
  const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiRichTreeView');
@@ -90,8 +90,8 @@ const RichTreeView = exports.RichTreeView = /*#__PURE__*/React.forwardRef(functi
90
90
  rootRef: ref,
91
91
  props: other
92
92
  });
93
- const isLoading = (0, _store.useStore)(contextValue.store, _useTreeViewItems.itemsSelectors.isLoading);
94
- const treeViewError = (0, _store.useStore)(contextValue.store, _useTreeViewItems.itemsSelectors.error);
93
+ const isLoading = (0, _store.useStore)(contextValue.store, _useTreeViewLazyLoading.lazyLoadingSelectors.isItemLoading, null);
94
+ const error = (0, _store.useStore)(contextValue.store, _useTreeViewLazyLoading.lazyLoadingSelectors.itemError, null);
95
95
  const classes = useUtilityClasses(props);
96
96
  const Root = slots?.root ?? RichTreeViewRoot;
97
97
  const rootProps = (0, _useSlotProps.default)({
@@ -106,10 +106,10 @@ const RichTreeView = exports.RichTreeView = /*#__PURE__*/React.forwardRef(functi
106
106
  children: "Loading..."
107
107
  });
108
108
  }
109
- if (treeViewError) {
109
+ if (error) {
110
110
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Alert.default, {
111
111
  severity: "error",
112
- children: treeViewError.message
112
+ children: error.message
113
113
  });
114
114
  }
115
115
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TreeViewProvider.TreeViewProvider, {
@@ -17,7 +17,7 @@ export interface RichTreeViewSlots extends TreeViewSlots, RichTreeViewItemsSlots
17
17
  export interface RichTreeViewSlotProps<R extends {}, Multiple extends boolean | undefined> extends TreeViewSlotProps, RichTreeViewItemsSlotProps {
18
18
  root?: SlotComponentProps<'ul', {}, RichTreeViewProps<R, Multiple>>;
19
19
  }
20
- type RichTreeViewApiRef = React.RefObject<Partial<TreeViewPublicAPI<RichTreeViewPluginSignatures>> | undefined>;
20
+ export type RichTreeViewApiRef = React.RefObject<Partial<TreeViewPublicAPI<RichTreeViewPluginSignatures>> | undefined>;
21
21
  export interface RichTreeViewPropsBase extends React.HTMLAttributes<HTMLUListElement> {
22
22
  className?: string;
23
23
  /**
@@ -44,5 +44,4 @@ export interface RichTreeViewProps<R extends {}, Multiple extends boolean | unde
44
44
  * The ref object that allows Tree View manipulation. Can be instantiated with `useTreeViewApiRef()`.
45
45
  */
46
46
  apiRef?: RichTreeViewApiRef;
47
- }
48
- export {};
47
+ }
@@ -1,5 +1,5 @@
1
1
  export * from "./RichTreeView.js";
2
2
  export * from "./richTreeViewClasses.js";
3
- export type { RichTreeViewProps, RichTreeViewPropsBase, RichTreeViewSlots, RichTreeViewSlotProps } from "./RichTreeView.types.js";
3
+ export type { RichTreeViewProps, RichTreeViewPropsBase, RichTreeViewSlots, RichTreeViewSlotProps, RichTreeViewApiRef } from "./RichTreeView.types.js";
4
4
  export { RICH_TREE_VIEW_PLUGINS } from "./RichTreeView.plugins.js";
5
5
  export type { RichTreeViewPluginParameters } from "./RichTreeView.plugins.js";
@@ -16,7 +16,7 @@ export interface SimpleTreeViewSlots extends TreeViewSlots {
16
16
  export interface SimpleTreeViewSlotProps extends TreeViewSlotProps {
17
17
  root?: SlotComponentProps<'ul', {}, {}>;
18
18
  }
19
- type SimpleTreeViewApiRef = React.RefObject<Partial<TreeViewPublicAPI<SimpleTreeViewPluginSignatures>> | undefined>;
19
+ export type SimpleTreeViewApiRef = React.RefObject<Partial<TreeViewPublicAPI<SimpleTreeViewPluginSignatures>> | undefined>;
20
20
  export interface SimpleTreeViewProps<Multiple extends boolean | undefined> extends SimpleTreeViewPluginParameters<Multiple>, React.HTMLAttributes<HTMLUListElement> {
21
21
  /**
22
22
  * The content of the component.
@@ -43,5 +43,4 @@ export interface SimpleTreeViewProps<Multiple extends boolean | undefined> exten
43
43
  * The ref object that allows Tree View manipulation. Can be instantiated with `useTreeViewApiRef()`.
44
44
  */
45
45
  apiRef?: SimpleTreeViewApiRef;
46
- }
47
- export {};
46
+ }
@@ -1,3 +1,3 @@
1
1
  export * from "./SimpleTreeView.js";
2
2
  export * from "./simpleTreeViewClasses.js";
3
- export type { SimpleTreeViewProps, SimpleTreeViewSlots, SimpleTreeViewSlotProps } from "./SimpleTreeView.types.js";
3
+ export type { SimpleTreeViewProps, SimpleTreeViewSlots, SimpleTreeViewSlotProps, SimpleTreeViewApiRef } from "./SimpleTreeView.types.js";
@@ -17,7 +17,7 @@ import { useTreeView } from "../internals/useTreeView/index.js";
17
17
  import { TreeViewProvider } from "../internals/TreeViewProvider/index.js";
18
18
  import { RICH_TREE_VIEW_PLUGINS } from "./RichTreeView.plugins.js";
19
19
  import { RichTreeViewItems } from "../internals/components/RichTreeViewItems.js";
20
- import { itemsSelectors } from "../internals/plugins/useTreeViewItems/index.js";
20
+ import { lazyLoadingSelectors } from "../internals/plugins/useTreeViewLazyLoading/index.js";
21
21
  import { jsx as _jsx } from "react/jsx-runtime";
22
22
  const useThemeProps = createUseThemeProps('MuiRichTreeView');
23
23
  const useUtilityClasses = ownerState => {
@@ -83,8 +83,8 @@ const RichTreeView = /*#__PURE__*/React.forwardRef(function RichTreeView(inProps
83
83
  rootRef: ref,
84
84
  props: other
85
85
  });
86
- const isLoading = useStore(contextValue.store, itemsSelectors.isLoading);
87
- const treeViewError = useStore(contextValue.store, itemsSelectors.error);
86
+ const isLoading = useStore(contextValue.store, lazyLoadingSelectors.isItemLoading, null);
87
+ const error = useStore(contextValue.store, lazyLoadingSelectors.itemError, null);
88
88
  const classes = useUtilityClasses(props);
89
89
  const Root = slots?.root ?? RichTreeViewRoot;
90
90
  const rootProps = useSlotProps({
@@ -99,10 +99,10 @@ const RichTreeView = /*#__PURE__*/React.forwardRef(function RichTreeView(inProps
99
99
  children: "Loading..."
100
100
  });
101
101
  }
102
- if (treeViewError) {
102
+ if (error) {
103
103
  return /*#__PURE__*/_jsx(Alert, {
104
104
  severity: "error",
105
- children: treeViewError.message
105
+ children: error.message
106
106
  });
107
107
  }
108
108
  return /*#__PURE__*/_jsx(TreeViewProvider, {
@@ -17,7 +17,7 @@ export interface RichTreeViewSlots extends TreeViewSlots, RichTreeViewItemsSlots
17
17
  export interface RichTreeViewSlotProps<R extends {}, Multiple extends boolean | undefined> extends TreeViewSlotProps, RichTreeViewItemsSlotProps {
18
18
  root?: SlotComponentProps<'ul', {}, RichTreeViewProps<R, Multiple>>;
19
19
  }
20
- type RichTreeViewApiRef = React.RefObject<Partial<TreeViewPublicAPI<RichTreeViewPluginSignatures>> | undefined>;
20
+ export type RichTreeViewApiRef = React.RefObject<Partial<TreeViewPublicAPI<RichTreeViewPluginSignatures>> | undefined>;
21
21
  export interface RichTreeViewPropsBase extends React.HTMLAttributes<HTMLUListElement> {
22
22
  className?: string;
23
23
  /**
@@ -44,5 +44,4 @@ export interface RichTreeViewProps<R extends {}, Multiple extends boolean | unde
44
44
  * The ref object that allows Tree View manipulation. Can be instantiated with `useTreeViewApiRef()`.
45
45
  */
46
46
  apiRef?: RichTreeViewApiRef;
47
- }
48
- export {};
47
+ }
@@ -1,5 +1,5 @@
1
1
  export * from "./RichTreeView.js";
2
2
  export * from "./richTreeViewClasses.js";
3
- export type { RichTreeViewProps, RichTreeViewPropsBase, RichTreeViewSlots, RichTreeViewSlotProps } from "./RichTreeView.types.js";
3
+ export type { RichTreeViewProps, RichTreeViewPropsBase, RichTreeViewSlots, RichTreeViewSlotProps, RichTreeViewApiRef } from "./RichTreeView.types.js";
4
4
  export { RICH_TREE_VIEW_PLUGINS } from "./RichTreeView.plugins.js";
5
5
  export type { RichTreeViewPluginParameters } from "./RichTreeView.plugins.js";
@@ -16,7 +16,7 @@ export interface SimpleTreeViewSlots extends TreeViewSlots {
16
16
  export interface SimpleTreeViewSlotProps extends TreeViewSlotProps {
17
17
  root?: SlotComponentProps<'ul', {}, {}>;
18
18
  }
19
- type SimpleTreeViewApiRef = React.RefObject<Partial<TreeViewPublicAPI<SimpleTreeViewPluginSignatures>> | undefined>;
19
+ export type SimpleTreeViewApiRef = React.RefObject<Partial<TreeViewPublicAPI<SimpleTreeViewPluginSignatures>> | undefined>;
20
20
  export interface SimpleTreeViewProps<Multiple extends boolean | undefined> extends SimpleTreeViewPluginParameters<Multiple>, React.HTMLAttributes<HTMLUListElement> {
21
21
  /**
22
22
  * The content of the component.
@@ -43,5 +43,4 @@ export interface SimpleTreeViewProps<Multiple extends boolean | undefined> exten
43
43
  * The ref object that allows Tree View manipulation. Can be instantiated with `useTreeViewApiRef()`.
44
44
  */
45
45
  apiRef?: SimpleTreeViewApiRef;
46
- }
47
- export {};
46
+ }
@@ -1,3 +1,3 @@
1
1
  export * from "./SimpleTreeView.js";
2
2
  export * from "./simpleTreeViewClasses.js";
3
- export type { SimpleTreeViewProps, SimpleTreeViewSlots, SimpleTreeViewSlotProps } from "./SimpleTreeView.types.js";
3
+ export type { SimpleTreeViewProps, SimpleTreeViewSlots, SimpleTreeViewSlotProps, SimpleTreeViewApiRef } from "./SimpleTreeView.types.js";
@@ -1,4 +1,4 @@
1
- import useLazyRef from '@mui/utils/useLazyRef';
1
+ import { useRefWithInit } from '@base-ui-components/utils/useRefWithInit';
2
2
  import { getLookupFromArray } from "../internals/plugins/useTreeViewSelection/useTreeViewSelection.utils.js";
3
3
  const defaultGetItemId = item => item.id;
4
4
  const defaultGetItemChildren = item => item.children;
@@ -52,7 +52,7 @@ export function useApplyPropagationToSelectedItemsOnMount(parameters) {
52
52
  selectedItems,
53
53
  selectionPropagation
54
54
  } = parameters;
55
- return useLazyRef(() => {
55
+ return useRefWithInit(() => {
56
56
  const lookup = getLookupFromArray(selectedItems);
57
57
  function walk(items, isParentSelected) {
58
58
  for (const item of items) {
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-tree-view v8.12.0
2
+ * @mui/x-tree-view v8.13.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -3,7 +3,7 @@ export { TreeViewProvider, useTreeViewContext } from "./TreeViewProvider/index.j
3
3
  export { RichTreeViewItems } from "./components/RichTreeViewItems.js";
4
4
  export type { RichTreeViewItemsSlots, RichTreeViewItemsSlotProps } from "./components/RichTreeViewItems.js";
5
5
  export { unstable_resetCleanupTracking, useInstanceEventHandler } from "./hooks/useInstanceEventHandler.js";
6
- export type { TreeViewPlugin, TreeViewPluginSignature, ConvertPluginsIntoSignatures, MergeSignaturesProperty, TreeViewPublicAPI, TreeViewState, TreeViewItemMeta, TreeViewInstance, TreeViewItemPlugin, TreeViewUsedStore } from "./models/index.js";
6
+ export type { TreeViewPlugin, TreeViewPluginSignature, ConvertPluginsIntoSignatures, MergeSignaturesProperty, TreeViewPublicAPI, TreeViewState, TreeViewItemMeta, TreeViewInstance, TreeViewItemPlugin, TreeViewUsedStore, TreeViewUsedInstance, TreeViewUsedParamsWithDefaults } from "./models/index.js";
7
7
  export type { TreeViewCorePluginParameters } from "./corePlugins/index.js";
8
8
  export { useTreeViewExpansion, expansionSelectors } from "./plugins/useTreeViewExpansion/index.js";
9
9
  export type { UseTreeViewExpansionSignature, UseTreeViewExpansionParameters } from "./plugins/useTreeViewExpansion/index.js";
@@ -17,7 +17,7 @@ export { useTreeViewItems, buildSiblingIndexes, itemsSelectors, TREE_VIEW_ROOT_P
17
17
  export type { UseTreeViewItemsSignature, UseTreeViewItemsParameters, UseTreeViewItemsState } from "./plugins/useTreeViewItems/index.js";
18
18
  export { useTreeViewLabel, labelSelectors } from "./plugins/useTreeViewLabel/index.js";
19
19
  export type { UseTreeViewLabelSignature, UseTreeViewLabelParameters } from "./plugins/useTreeViewLabel/index.js";
20
- export type { UseTreeViewLazyLoadingSignature, UseTreeViewLazyLoadingParameters, UseTreeViewLazyLoadingInstance } from "./plugins/useTreeViewLazyLoading/index.js";
20
+ export type { UseTreeViewLazyLoadingSignature, UseTreeViewLazyLoadingParameters, UseTreeViewLazyLoadingInstance, DataSource } from "./plugins/useTreeViewLazyLoading/index.js";
21
21
  export { lazyLoadingSelectors } from "./plugins/useTreeViewLazyLoading/index.js";
22
22
  export { useTreeViewJSXItems } from "./plugins/useTreeViewJSXItems/index.js";
23
23
  export type { UseTreeViewJSXItemsSignature, UseTreeViewJSXItemsParameters } from "./plugins/useTreeViewJSXItems/index.js";
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { useAssertModelConsistency } from '@mui/x-internals/useAssertModelConsistency';
3
- import useEventCallback from '@mui/utils/useEventCallback';
4
- import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
3
+ import { useEventCallback } from '@base-ui-components/utils/useEventCallback';
4
+ import { useIsoLayoutEffect } from '@base-ui-components/utils/useIsoLayoutEffect';
5
5
  import { expansionSelectors } from "./useTreeViewExpansion.selectors.js";
6
6
  import { getExpansionTrigger } from "./useTreeViewExpansion.utils.js";
7
7
  import { itemsSelectors } from "../useTreeViewItems/useTreeViewItems.selectors.js";
@@ -17,7 +17,7 @@ export const useTreeViewExpansion = ({
17
17
  controlled: params.expandedItems,
18
18
  defaultValue: params.defaultExpandedItems
19
19
  });
20
- useEnhancedEffect(() => {
20
+ useIsoLayoutEffect(() => {
21
21
  const newExpansionTrigger = getExpansionTrigger({
22
22
  isItemEditable: params.isItemEditable,
23
23
  expansionTrigger: params.expansionTrigger
@@ -107,7 +107,7 @@ export const useTreeViewExpansion = ({
107
107
  /**
108
108
  * Update the controlled model when the `expandedItems` prop changes.
109
109
  */
110
- useEnhancedEffect(() => {
110
+ useIsoLayoutEffect(() => {
111
111
  const expandedItems = params.expandedItems;
112
112
  if (expandedItems !== undefined) {
113
113
  store.set('expansion', _extends({}, store.state.expansion, {
@@ -1,5 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import useEventCallback from '@mui/utils/useEventCallback';
2
+ import { useEventCallback } from '@base-ui-components/utils/useEventCallback';
3
3
  import { useStoreEffect } from '@mui/x-internals/store';
4
4
  import { focusSelectors } from "./useTreeViewFocus.selectors.js";
5
5
  import { expansionSelectors } from "../useTreeViewExpansion/useTreeViewExpansion.selectors.js";