react-native-tree-multi-select 3.0.0-beta.1 → 3.0.0-beta.2

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.
@@ -54,7 +54,8 @@ export type TreeViewState<ID> = {
54
54
  // Drop target state (used by nodes to render their own indicator)
55
55
  dropTargetNodeId: ID | null;
56
56
  dropPosition: DropPosition | null;
57
- updateDropTarget: (nodeId: ID | null, position: DropPosition | null) => void;
57
+ dropLevel: number | null;
58
+ updateDropTarget: (nodeId: ID | null, position: DropPosition | null, level?: number | null) => void;
58
59
 
59
60
  // Cleanup all states in this store
60
61
  cleanUpTreeViewStore: () => void;
@@ -120,9 +121,11 @@ export function getTreeViewStore<ID>(id: string): UseBoundStore<StoreApi<TreeVie
120
121
 
121
122
  dropTargetNodeId: null,
122
123
  dropPosition: null,
123
- updateDropTarget: (nodeId, position) => set({
124
+ dropLevel: null,
125
+ updateDropTarget: (nodeId, position, level) => set({
124
126
  dropTargetNodeId: nodeId,
125
127
  dropPosition: position,
128
+ dropLevel: level ?? null,
126
129
  }),
127
130
 
128
131
  cleanUpTreeViewStore: () =>
@@ -141,6 +144,7 @@ export function getTreeViewStore<ID>(id: string): UseBoundStore<StoreApi<TreeVie
141
144
  invalidDragTargetIds: new Set<ID>(),
142
145
  dropTargetNodeId: null,
143
146
  dropPosition: null,
147
+ dropLevel: null,
144
148
  }),
145
149
  }));
146
150
 
@@ -194,6 +194,10 @@ export interface SelectionPropagation {
194
194
  export interface DropIndicatorComponentProps {
195
195
  /** Whether the indicator is above, below, or inside the target node */
196
196
  position: DropPosition;
197
+ /** The nesting level of the target node (useful for indenting the indicator) */
198
+ level: number;
199
+ /** The indentation multiplier used for each level (pixels per level) */
200
+ indentationMultiplier: number;
197
201
  }
198
202
 
199
203
  /** Style props for customizing the built-in drop indicator appearance */