@noya-app/noya-file-explorer 0.0.8 → 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/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +8 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/MediaCollection.tsx +18 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noya-app/noya-file-explorer",
|
|
3
|
-
"version": "0.0.
|
|
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,7 +20,7 @@
|
|
|
20
20
|
"dev": "npm run build:main -- --watch"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@noya-app/noya-designsystem": "0.1.
|
|
23
|
+
"@noya-app/noya-designsystem": "0.1.57",
|
|
24
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",
|
package/src/MediaCollection.tsx
CHANGED
|
@@ -232,12 +232,19 @@ type MediaCollectionProps = {
|
|
|
232
232
|
sortable?: boolean;
|
|
233
233
|
} & Pick<
|
|
234
234
|
CollectionProps<MediaItem, MenuAction>,
|
|
235
|
-
|
|
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
|
|