@noya-app/noya-file-explorer 0.0.7 → 0.0.9

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noya-app/noya-file-explorer",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -20,8 +20,8 @@
20
20
  "dev": "npm run build:main -- --watch"
21
21
  },
22
22
  "dependencies": {
23
- "@noya-app/noya-designsystem": "0.1.55",
24
- "@noya-app/noya-icons": "0.1.9",
23
+ "@noya-app/noya-designsystem": "0.1.57",
24
+ "@noya-app/noya-icons": "0.1.10",
25
25
  "@noya-app/noya-multiplayer-react": "0.1.57",
26
26
  "@noya-app/noya-keymap": "0.1.3",
27
27
  "@noya-app/react-utils": "0.1.18",
@@ -232,12 +232,19 @@ type MediaCollectionProps = {
232
232
  sortable?: boolean;
233
233
  } & Pick<
234
234
  CollectionProps<MediaItem, MenuAction>,
235
- "size" | "expandable" | "renamable" | "scrollable" | "renderEmptyState"
235
+ | "sortableId"
236
+ | "size"
237
+ | "expandable"
238
+ | "renamable"
239
+ | "scrollable"
240
+ | "renderEmptyState"
241
+ | "sharedDragProps"
236
242
  >;
237
243
 
238
244
  export const MediaCollection = memo(
239
245
  forwardRef<MediaCollectionRef, MediaCollectionProps>(function MediaCollection(
240
246
  {
247
+ sortableId,
241
248
  onSelectionChange,
242
249
  selectedIds: selectedIdsProp,
243
250
  media,
@@ -261,6 +268,7 @@ export const MediaCollection = memo(
261
268
  scrollable = false,
262
269
  sortable = false,
263
270
  renderEmptyState,
271
+ sharedDragProps,
264
272
  },
265
273
  ref
266
274
  ) {
@@ -772,7 +780,9 @@ export const MediaCollection = memo(
772
780
  >
773
781
  <FileExplorerCollection<MediaItem, MenuAction>
774
782
  ref={collectionRef}
783
+ sortableId={sortableId}
775
784
  scrollable={scrollable}
785
+ sharedDragProps={sharedDragProps}
776
786
  items={visibleItems}
777
787
  viewType={viewType}
778
788
  size={size}
@@ -839,8 +849,14 @@ export const MediaCollection = memo(
839
849
  acceptsDrop={(
840
850
  sourceIndex: number,
841
851
  targetIndex: number,
842
- position: string
852
+ position: string,
853
+ sourceListId: string,
854
+ targetListId: string
843
855
  ) => {
856
+ if (sourceListId !== targetListId) {
857
+ return false;
858
+ }
859
+
844
860
  const sourceItem = visibleItems[sourceIndex];
845
861
  const targetItem = visibleItems[targetIndex];
846
862