@myunisoft/design-system 1.3.1-rev157-8 → 1.3.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.
|
@@ -3,7 +3,7 @@ import type { DocumentSection } from '../types';
|
|
|
3
3
|
type UseDragVisualFeedbackParams = {
|
|
4
4
|
containerRef: RefObject<HTMLDivElement | null>;
|
|
5
5
|
getSectionById: (sectionId: string) => DocumentSection | null;
|
|
6
|
-
isValidDropTarget?: (draggedSection: DocumentSection, targetSection: DocumentSection | null, newIndex: number) => boolean;
|
|
6
|
+
isValidDropTarget?: (draggedSection: DocumentSection, targetSection: DocumentSection | null, newIndex: number, isNesting: boolean) => boolean;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Provides visual feedback during drag-and-drop by graying out invalid drop targets.
|
|
@@ -44,9 +44,11 @@ export type DocumentComposerCustomProps = {
|
|
|
44
44
|
* Determines valid drop targets during drag. Invalid targets are greyed out.
|
|
45
45
|
* `targetSection` is `null` when dropping at root level.
|
|
46
46
|
* `newIndex` is the position where the item would be inserted in the target's children.
|
|
47
|
+
* `isNesting` is `true` when the section is being moved to a new parent (dropped "on" a section),
|
|
48
|
+
* `false` when reordering within the same parent.
|
|
47
49
|
* Defaults to `() => true`.
|
|
48
50
|
*/
|
|
49
|
-
isValidDropTarget?: (draggedSection: DocumentSection, targetSection: DocumentSection | null, newIndex: number) => boolean;
|
|
51
|
+
isValidDropTarget?: (draggedSection: DocumentSection, targetSection: DocumentSection | null, newIndex: number, isNesting: boolean) => boolean;
|
|
50
52
|
sectionContent?: SectionContent;
|
|
51
53
|
isLoadingSectionContent?: boolean;
|
|
52
54
|
selectedSectionId?: string | null;
|