@widgetic/file-browser 0.5.17
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/README.md +131 -0
- package/dist/components/FolderTree.svelte +143 -0
- package/dist/components/FolderTree.svelte.d.ts +32 -0
- package/dist/components/core/FileBrowser.css +79 -0
- package/dist/components/core/FileBrowser.svelte +3989 -0
- package/dist/components/core/FileBrowser.svelte.d.ts +55 -0
- package/dist/components/core/FileUploader.svelte +1152 -0
- package/dist/components/core/FileUploader.svelte.d.ts +43 -0
- package/dist/components/core/Header.svelte +143 -0
- package/dist/components/core/Header.svelte.d.ts +36 -0
- package/dist/components/core/RecentFiles.svelte +753 -0
- package/dist/components/core/RecentFiles.svelte.d.ts +37 -0
- package/dist/components/core/UploadStatus.svelte +133 -0
- package/dist/components/core/UploadStatus.svelte.d.ts +28 -0
- package/dist/components/core/UploadStatusList.svelte +138 -0
- package/dist/components/core/UploadStatusList.svelte.d.ts +33 -0
- package/dist/components/core/index.d.ts +4 -0
- package/dist/components/core/index.js +4 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +8 -0
- package/dist/components/items/FileItem.svelte +684 -0
- package/dist/components/items/FileItem.svelte.d.ts +34 -0
- package/dist/components/items/FolderItem.svelte +77 -0
- package/dist/components/items/FolderItem.svelte.d.ts +27 -0
- package/dist/components/items/index.d.ts +2 -0
- package/dist/components/items/index.js +2 -0
- package/dist/components/modals/MoveDialog.svelte +539 -0
- package/dist/components/modals/MoveDialog.svelte.d.ts +32 -0
- package/dist/components/modals/NewFolderButton.svelte +25 -0
- package/dist/components/modals/NewFolderButton.svelte.d.ts +20 -0
- package/dist/components/modals/README.md +99 -0
- package/dist/components/modals/SearchModal.svelte +500 -0
- package/dist/components/modals/SearchModal.svelte.d.ts +28 -0
- package/dist/components/modals/SelectedFilesModal.svelte +291 -0
- package/dist/components/modals/SelectedFilesModal.svelte.d.ts +32 -0
- package/dist/components/modals/index.d.ts +6 -0
- package/dist/components/modals/index.js +9 -0
- package/dist/components/previews/AudioPlayer.svelte +117 -0
- package/dist/components/previews/AudioPlayer.svelte.d.ts +22 -0
- package/dist/components/previews/ErrorPreview.svelte +12 -0
- package/dist/components/previews/ErrorPreview.svelte.d.ts +20 -0
- package/dist/components/previews/FilePreview.svelte +475 -0
- package/dist/components/previews/FilePreview.svelte.d.ts +31 -0
- package/dist/components/previews/FontPreview.svelte +82 -0
- package/dist/components/previews/FontPreview.svelte.d.ts +22 -0
- package/dist/components/previews/ImagePreview.svelte +551 -0
- package/dist/components/previews/ImagePreview.svelte.d.ts +27 -0
- package/dist/components/previews/TextPreview.svelte +92 -0
- package/dist/components/previews/TextPreview.svelte.d.ts +20 -0
- package/dist/components/previews/VideoPlayer.svelte +268 -0
- package/dist/components/previews/VideoPlayer.svelte.d.ts +22 -0
- package/dist/components/previews/WaveformVisualizer.svelte +240 -0
- package/dist/components/previews/WaveformVisualizer.svelte.d.ts +20 -0
- package/dist/components/previews/index.d.ts +8 -0
- package/dist/components/previews/index.js +8 -0
- package/dist/components/ui/ControlToolbar.svelte +342 -0
- package/dist/components/ui/ControlToolbar.svelte.d.ts +36 -0
- package/dist/components/ui/DragSelect.svelte +815 -0
- package/dist/components/ui/DragSelect.svelte.d.ts +31 -0
- package/dist/components/ui/DropdownMenu.svelte +83 -0
- package/dist/components/ui/DropdownMenu.svelte.d.ts +25 -0
- package/dist/components/ui/FileIcon.svelte +65 -0
- package/dist/components/ui/FileIcon.svelte.d.ts +25 -0
- package/dist/components/ui/FileMetadata.svelte +26 -0
- package/dist/components/ui/FileMetadata.svelte.d.ts +21 -0
- package/dist/components/ui/LoadingSkeleton.svelte +26 -0
- package/dist/components/ui/LoadingSkeleton.svelte.d.ts +22 -0
- package/dist/components/ui/SearchResults.svelte +37 -0
- package/dist/components/ui/SearchResults.svelte.d.ts +21 -0
- package/dist/components/ui/VirtualList.svelte +106 -0
- package/dist/components/ui/VirtualList.svelte.d.ts +45 -0
- package/dist/components/ui/index.d.ts +8 -0
- package/dist/components/ui/index.js +8 -0
- package/dist/config.d.ts +7 -0
- package/dist/config.js +14 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +11 -0
- package/dist/static/favicon.png +0 -0
- package/dist/static/files/audio/audio-file.mp3 +0 -0
- package/dist/static/files/document/-missing-file.txt +1 -0
- package/dist/static/files/document/HeliosDesign Website Project Brief Sample.pdf +0 -0
- package/dist/static/files/document/RFP-NEC_Website-Development_2021-August.pdf +0 -0
- package/dist/static/files/document/The World Before Calculus.pdf +0 -0
- package/dist/static/files/document/specs.txt +15 -0
- package/dist/static/files/font/CooperHewitt/CooperHewitt-Bold.otf +0 -0
- package/dist/static/files/font/CooperHewitt/CooperHewitt-BoldItalic.otf +0 -0
- package/dist/static/files/font/CooperHewitt/CooperHewitt-Book.otf +0 -0
- package/dist/static/files/font/CooperHewitt/CooperHewitt-BookItalic.otf +0 -0
- package/dist/static/files/font/CooperHewitt/CooperHewitt-Heavy.otf +0 -0
- package/dist/static/files/font/CooperHewitt/CooperHewitt-HeavyItalic.otf +0 -0
- package/dist/static/files/font/CooperHewitt/CooperHewitt-Light.otf +0 -0
- package/dist/static/files/font/CooperHewitt/CooperHewitt-LightItalic.otf +0 -0
- package/dist/static/files/font/CooperHewitt/CooperHewitt-Medium.otf +0 -0
- package/dist/static/files/font/CooperHewitt/CooperHewitt-MediumItalic.otf +0 -0
- package/dist/static/files/font/CooperHewitt/CooperHewitt-Semibold.otf +0 -0
- package/dist/static/files/font/CooperHewitt/CooperHewitt-SemiboldItalic.otf +0 -0
- package/dist/static/files/font/CooperHewitt/CooperHewitt-Thin.otf +0 -0
- package/dist/static/files/font/CooperHewitt/CooperHewitt-ThinItalic.otf +0 -0
- package/dist/static/files/font/Kimpo/Kimpo-Bold.otf +0 -0
- package/dist/static/files/font/Kimpo/Kimpo-Regular.otf +0 -0
- package/dist/static/files/image/image 1.jpg +0 -0
- package/dist/static/files/image/image 10.jpg +0 -0
- package/dist/static/files/image/image 11.jpg +0 -0
- package/dist/static/files/image/image 12.jpg +0 -0
- package/dist/static/files/image/image 13.jpg +0 -0
- package/dist/static/files/image/image 14.jpg +0 -0
- package/dist/static/files/image/image 15.jpg +0 -0
- package/dist/static/files/image/image 16.jpg +0 -0
- package/dist/static/files/image/image 17.jpg +0 -0
- package/dist/static/files/image/image 18.jpg +0 -0
- package/dist/static/files/image/image 19.jpg +0 -0
- package/dist/static/files/image/image 2.jpg +0 -0
- package/dist/static/files/image/image 20.jpg +0 -0
- package/dist/static/files/image/image 21.jpg +0 -0
- package/dist/static/files/image/image 22.jpg +0 -0
- package/dist/static/files/image/image 23.jpg +0 -0
- package/dist/static/files/image/image 24.jpg +0 -0
- package/dist/static/files/image/image 25.jpg +0 -0
- package/dist/static/files/image/image 26.jpg +0 -0
- package/dist/static/files/image/image 27.jpg +0 -0
- package/dist/static/files/image/image 28.jpg +0 -0
- package/dist/static/files/image/image 29.jpg +0 -0
- package/dist/static/files/image/image 3.jpg +0 -0
- package/dist/static/files/image/image 30.jpg +0 -0
- package/dist/static/files/image/image 31.jpg +0 -0
- package/dist/static/files/image/image 32.jpg +0 -0
- package/dist/static/files/image/image 33.jpg +0 -0
- package/dist/static/files/image/image 34.jpg +0 -0
- package/dist/static/files/image/image 35.jpg +0 -0
- package/dist/static/files/image/image 36.jpg +0 -0
- package/dist/static/files/image/image 37.jpg +0 -0
- package/dist/static/files/image/image 38.jpg +0 -0
- package/dist/static/files/image/image 39.jpg +0 -0
- package/dist/static/files/image/image 4.jpg +0 -0
- package/dist/static/files/image/image 40.jpg +0 -0
- package/dist/static/files/image/image 41.jpg +0 -0
- package/dist/static/files/image/image 42.jpg +0 -0
- package/dist/static/files/image/image 43.jpg +0 -0
- package/dist/static/files/image/image 44.jpg +0 -0
- package/dist/static/files/image/image 45.jpg +0 -0
- package/dist/static/files/image/image 46.jpg +0 -0
- package/dist/static/files/image/image 47.jpg +0 -0
- package/dist/static/files/image/image 48.jpg +0 -0
- package/dist/static/files/image/image 49.jpg +0 -0
- package/dist/static/files/image/image 5.jpg +0 -0
- package/dist/static/files/image/image 50.jpg +0 -0
- package/dist/static/files/image/image 51.jpg +0 -0
- package/dist/static/files/image/image 52.jpg +0 -0
- package/dist/static/files/image/image 53.jpg +0 -0
- package/dist/static/files/image/image 54.jpg +0 -0
- package/dist/static/files/image/image 55.jpg +0 -0
- package/dist/static/files/image/image 56.jpg +0 -0
- package/dist/static/files/image/image 57.jpg +0 -0
- package/dist/static/files/image/image 58.jpg +0 -0
- package/dist/static/files/image/image 59.jpg +0 -0
- package/dist/static/files/image/image 6.jpg +0 -0
- package/dist/static/files/image/image 60.jpg +0 -0
- package/dist/static/files/image/image 61.jpg +0 -0
- package/dist/static/files/image/image 62.jpg +0 -0
- package/dist/static/files/image/image 63.jpg +0 -0
- package/dist/static/files/image/image 64.jpg +0 -0
- package/dist/static/files/image/image 65.jpg +0 -0
- package/dist/static/files/image/image 66.jpg +0 -0
- package/dist/static/files/image/image 67.jpg +0 -0
- package/dist/static/files/image/image 68.jpg +0 -0
- package/dist/static/files/image/image 7.jpg +0 -0
- package/dist/static/files/image/image 8.jpg +0 -0
- package/dist/static/files/image/image 9.jpg +0 -0
- package/dist/static/files/svg/astronaut.svg +30 -0
- package/dist/static/files/svg/cook.svg +30 -0
- package/dist/static/files/svg/dj.svg +28 -0
- package/dist/static/files/svg/doctor.svg +29 -0
- package/dist/static/files/svg/farmer.svg +43 -0
- package/dist/static/files/svg/fire fighter.svg +40 -0
- package/dist/static/files/svg/plumber.svg +32 -0
- package/dist/static/files/svg/santa.svg +34 -0
- package/dist/static/files/svg/scientist.svg +31 -0
- package/dist/static/files/svg/student.svg +32 -0
- package/dist/static/files/thumbnail/image 1.jpg +0 -0
- package/dist/static/files/thumbnail/image 10.jpg +0 -0
- package/dist/static/files/thumbnail/image 11.jpg +0 -0
- package/dist/static/files/thumbnail/image 12.jpg +0 -0
- package/dist/static/files/thumbnail/image 13.jpg +0 -0
- package/dist/static/files/thumbnail/image 14.jpg +0 -0
- package/dist/static/files/thumbnail/image 15.jpg +0 -0
- package/dist/static/files/thumbnail/image 16.jpg +0 -0
- package/dist/static/files/thumbnail/image 17.jpg +0 -0
- package/dist/static/files/thumbnail/image 18.jpg +0 -0
- package/dist/static/files/thumbnail/image 19.jpg +0 -0
- package/dist/static/files/thumbnail/image 2.jpg +0 -0
- package/dist/static/files/thumbnail/image 20.jpg +0 -0
- package/dist/static/files/thumbnail/image 21.jpg +0 -0
- package/dist/static/files/thumbnail/image 22.jpg +0 -0
- package/dist/static/files/thumbnail/image 23.jpg +0 -0
- package/dist/static/files/thumbnail/image 24.jpg +0 -0
- package/dist/static/files/thumbnail/image 25.jpg +0 -0
- package/dist/static/files/thumbnail/image 26.jpg +0 -0
- package/dist/static/files/thumbnail/image 27.jpg +0 -0
- package/dist/static/files/thumbnail/image 28.jpg +0 -0
- package/dist/static/files/thumbnail/image 29.jpg +0 -0
- package/dist/static/files/thumbnail/image 3.jpg +0 -0
- package/dist/static/files/thumbnail/image 30.jpg +0 -0
- package/dist/static/files/thumbnail/image 31.jpg +0 -0
- package/dist/static/files/thumbnail/image 32.jpg +0 -0
- package/dist/static/files/thumbnail/image 33.jpg +0 -0
- package/dist/static/files/thumbnail/image 34.jpg +0 -0
- package/dist/static/files/thumbnail/image 35.jpg +0 -0
- package/dist/static/files/thumbnail/image 36.jpg +0 -0
- package/dist/static/files/thumbnail/image 37.jpg +0 -0
- package/dist/static/files/thumbnail/image 38.jpg +0 -0
- package/dist/static/files/thumbnail/image 39.jpg +0 -0
- package/dist/static/files/thumbnail/image 4.jpg +0 -0
- package/dist/static/files/thumbnail/image 40.jpg +0 -0
- package/dist/static/files/thumbnail/image 41.jpg +0 -0
- package/dist/static/files/thumbnail/image 42.jpg +0 -0
- package/dist/static/files/thumbnail/image 43.jpg +0 -0
- package/dist/static/files/thumbnail/image 44.jpg +0 -0
- package/dist/static/files/thumbnail/image 45.jpg +0 -0
- package/dist/static/files/thumbnail/image 46.jpg +0 -0
- package/dist/static/files/thumbnail/image 47.jpg +0 -0
- package/dist/static/files/thumbnail/image 48.jpg +0 -0
- package/dist/static/files/thumbnail/image 49.jpg +0 -0
- package/dist/static/files/thumbnail/image 5.jpg +0 -0
- package/dist/static/files/thumbnail/image 50.jpg +0 -0
- package/dist/static/files/thumbnail/image 51.jpg +0 -0
- package/dist/static/files/thumbnail/image 52.jpg +0 -0
- package/dist/static/files/thumbnail/image 53.jpg +0 -0
- package/dist/static/files/thumbnail/image 54.jpg +0 -0
- package/dist/static/files/thumbnail/image 55.jpg +0 -0
- package/dist/static/files/thumbnail/image 56.jpg +0 -0
- package/dist/static/files/thumbnail/image 57.jpg +0 -0
- package/dist/static/files/thumbnail/image 58.jpg +0 -0
- package/dist/static/files/thumbnail/image 59.jpg +0 -0
- package/dist/static/files/thumbnail/image 6.jpg +0 -0
- package/dist/static/files/thumbnail/image 60.jpg +0 -0
- package/dist/static/files/thumbnail/image 61.jpg +0 -0
- package/dist/static/files/thumbnail/image 62.jpg +0 -0
- package/dist/static/files/thumbnail/image 63.jpg +0 -0
- package/dist/static/files/thumbnail/image 64.jpg +0 -0
- package/dist/static/files/thumbnail/image 65.jpg +0 -0
- package/dist/static/files/thumbnail/image 66.jpg +0 -0
- package/dist/static/files/thumbnail/image 67.jpg +0 -0
- package/dist/static/files/thumbnail/image 68.jpg +0 -0
- package/dist/static/files/thumbnail/image 7.jpg +0 -0
- package/dist/static/files/thumbnail/image 8.jpg +0 -0
- package/dist/static/files/thumbnail/image 9.jpg +0 -0
- package/dist/static/files/video/video-file.mp4 +0 -0
- package/dist/static/files/video/video-file.png +0 -0
- package/dist/static/icons/audio.svg +7 -0
- package/dist/static/icons/check.svg +3 -0
- package/dist/static/icons/checked.svg +4 -0
- package/dist/static/icons/close.svg +11 -0
- package/dist/static/icons/document.svg +11 -0
- package/dist/static/icons/dots.svg +1 -0
- package/dist/static/icons/download.svg +1 -0
- package/dist/static/icons/empty-folder.svg +24 -0
- package/dist/static/icons/error.svg +5 -0
- package/dist/static/icons/file-upload.svg +1 -0
- package/dist/static/icons/folder-plus.svg +1 -0
- package/dist/static/icons/folder.svg +28 -0
- package/dist/static/icons/jump-to-folder.svg +1 -0
- package/dist/static/icons/move.svg +1 -0
- package/dist/static/icons/new-folder.svg +5 -0
- package/dist/static/icons/pdf.svg +6 -0
- package/dist/static/icons/player-pause.svg +1 -0
- package/dist/static/icons/player-play.svg +3 -0
- package/dist/static/icons/plus.svg +1 -0
- package/dist/static/icons/rename.svg +1 -0
- package/dist/static/icons/search.svg +1 -0
- package/dist/static/icons/trash.svg +1 -0
- package/dist/static/icons/unorganized-folder.svg +60 -0
- package/dist/stores/dragStore.d.ts +2 -0
- package/dist/stores/dragStore.js +2 -0
- package/dist/stores/fileStore.d.ts +36 -0
- package/dist/stores/fileStore.js +166 -0
- package/dist/stores/folderCountStore.d.ts +5 -0
- package/dist/stores/folderCountStore.js +49 -0
- package/dist/stores/index.d.ts +7 -0
- package/dist/stores/index.js +8 -0
- package/dist/stores/missingFilesStore.d.ts +3 -0
- package/dist/stores/missingFilesStore.js +14 -0
- package/dist/stores/navigationStore.d.ts +36 -0
- package/dist/stores/navigationStore.js +615 -0
- package/dist/stores/persistentSelectStore.d.ts +17 -0
- package/dist/stores/persistentSelectStore.js +170 -0
- package/dist/stores/searchStore.d.ts +1 -0
- package/dist/stores/searchStore.js +2 -0
- package/dist/stores/uploadApiStore.d.ts +13 -0
- package/dist/stores/uploadApiStore.js +36 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/pdf.d.ts +3 -0
- package/dist/types.d.ts +23 -0
- package/dist/types.js +1 -0
- package/dist/utils/apiConfig.d.ts +9 -0
- package/dist/utils/apiConfig.js +19 -0
- package/dist/utils/dateUtils.d.ts +2 -0
- package/dist/utils/dateUtils.js +38 -0
- package/dist/utils/fileOperations.d.ts +36 -0
- package/dist/utils/fileOperations.js +573 -0
- package/dist/utils/fileTypes.d.ts +17 -0
- package/dist/utils/fileTypes.js +110 -0
- package/dist/utils/fileUtils.d.ts +15 -0
- package/dist/utils/fileUtils.js +112 -0
- package/dist/utils/folderUtils.d.ts +4 -0
- package/dist/utils/folderUtils.js +26 -0
- package/dist/utils/imageTransform.d.ts +22 -0
- package/dist/utils/imageTransform.js +60 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/resolveFileUrl.d.ts +6 -0
- package/dist/utils/resolveFileUrl.js +21 -0
- package/dist/utils/userUploadsStorage.d.ts +27 -0
- package/dist/utils/userUploadsStorage.js +168 -0
- package/dist/utils/widgeticTusUpload.d.ts +18 -0
- package/dist/utils/widgeticTusUpload.js +131 -0
- package/dist/utils/widgeticUpload.d.ts +29 -0
- package/dist/utils/widgeticUpload.js +105 -0
- package/package.json +156 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { FileSystemItem } from '../../types';
|
|
2
|
+
import type { FileFilterType } from '../../utils/fileTypes';
|
|
3
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
4
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
5
|
+
$$bindings?: Bindings;
|
|
6
|
+
} & Exports;
|
|
7
|
+
(internal: unknown, props: Props & {
|
|
8
|
+
$$events?: Events;
|
|
9
|
+
$$slots?: Slots;
|
|
10
|
+
}): Exports & {
|
|
11
|
+
$set?: any;
|
|
12
|
+
$on?: any;
|
|
13
|
+
};
|
|
14
|
+
z_$$bindings?: Bindings;
|
|
15
|
+
}
|
|
16
|
+
declare const DragSelect: $$__sveltets_2_IsomorphicComponent<{
|
|
17
|
+
container: HTMLElement;
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
items?: FileSystemItem[];
|
|
20
|
+
scrollContainer?: HTMLElement | null;
|
|
21
|
+
currentFilter?: FileFilterType;
|
|
22
|
+
}, {
|
|
23
|
+
select: CustomEvent<{
|
|
24
|
+
added: FileSystemItem[];
|
|
25
|
+
removed: FileSystemItem[];
|
|
26
|
+
}>;
|
|
27
|
+
} & {
|
|
28
|
+
[evt: string]: CustomEvent<any>;
|
|
29
|
+
}, {}, {}, string>;
|
|
30
|
+
type DragSelect = InstanceType<typeof DragSelect>;
|
|
31
|
+
export default DragSelect;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// Svelte imports
|
|
3
|
+
import { createEventDispatcher } from 'svelte';
|
|
4
|
+
const dispatch = createEventDispatcher();
|
|
5
|
+
|
|
6
|
+
// Design system imports
|
|
7
|
+
import { DropdownMenu, Button } from "@widgetic/design-system/components";
|
|
8
|
+
|
|
9
|
+
// Local utils imports
|
|
10
|
+
import { getAssetUrl } from '../../utils/fileUtils';
|
|
11
|
+
|
|
12
|
+
// Props
|
|
13
|
+
export let isFolder: boolean;
|
|
14
|
+
export let fileUrl: string | undefined = undefined;
|
|
15
|
+
export let isMissing: boolean = false;
|
|
16
|
+
|
|
17
|
+
function handleAction(action: string) {
|
|
18
|
+
if (action === 'download' && fileUrl) {
|
|
19
|
+
window.open(fileUrl, '_blank');
|
|
20
|
+
} else {
|
|
21
|
+
dispatch('action', { action });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<div class="dropdown-wrapper">
|
|
27
|
+
<DropdownMenu.Root>
|
|
28
|
+
<DropdownMenu.Trigger>
|
|
29
|
+
<Button
|
|
30
|
+
variant="ghost"
|
|
31
|
+
class="more-options-button h-6 w-6 p-0 focus-visible:ring-0 focus-visible:ring-offset-0 hover:bg-[hsl(var(--grey1))]"
|
|
32
|
+
onclick={() => console.log('Open More Options Dropdown')}
|
|
33
|
+
>
|
|
34
|
+
<span class="sr-only">Open menu</span>
|
|
35
|
+
<img src={getAssetUrl('/icons/dots.svg')} alt="More options" class="h-4 w-4" />
|
|
36
|
+
</Button>
|
|
37
|
+
</DropdownMenu.Trigger>
|
|
38
|
+
<DropdownMenu.Content
|
|
39
|
+
class="more-options-content"
|
|
40
|
+
align="end"
|
|
41
|
+
sideOffset={5}
|
|
42
|
+
>
|
|
43
|
+
{#if !isMissing}
|
|
44
|
+
<DropdownMenu.Item onclick={() => handleAction('rename')}>
|
|
45
|
+
Rename
|
|
46
|
+
</DropdownMenu.Item>
|
|
47
|
+
<DropdownMenu.Item onclick={() => handleAction('move')}>
|
|
48
|
+
Move
|
|
49
|
+
</DropdownMenu.Item>
|
|
50
|
+
{#if !isFolder && fileUrl}
|
|
51
|
+
<DropdownMenu.Item onclick={() => handleAction('download')}>
|
|
52
|
+
Download
|
|
53
|
+
</DropdownMenu.Item>
|
|
54
|
+
{/if}
|
|
55
|
+
{/if}
|
|
56
|
+
<DropdownMenu.Item onclick={() => handleAction('delete')}>
|
|
57
|
+
Delete
|
|
58
|
+
</DropdownMenu.Item>
|
|
59
|
+
</DropdownMenu.Content>
|
|
60
|
+
</DropdownMenu.Root>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<style>
|
|
64
|
+
.dropdown-wrapper {
|
|
65
|
+
position: relative;
|
|
66
|
+
z-index: 9999;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Target the dropdown content globally to override any existing styles */
|
|
70
|
+
:global(.more-options-content) {
|
|
71
|
+
z-index: 9999 !important;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Target the dropdown wrapper added by radix/shadcn */
|
|
75
|
+
:global([data-radix-popper-content-wrapper]) {
|
|
76
|
+
z-index: 9999 !important;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Ensure our dropdown stays above virtual list elements */
|
|
80
|
+
:global(.virtual-list) {
|
|
81
|
+
z-index: 1;
|
|
82
|
+
}
|
|
83
|
+
</style>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DropdownMenu } from "@widgetic/design-system/components";
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: Props & {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
12
|
+
};
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
14
|
+
}
|
|
15
|
+
declare const DropdownMenu: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
+
isFolder: boolean;
|
|
17
|
+
fileUrl?: string | undefined;
|
|
18
|
+
isMissing?: boolean;
|
|
19
|
+
}, {
|
|
20
|
+
action: CustomEvent<any>;
|
|
21
|
+
} & {
|
|
22
|
+
[evt: string]: CustomEvent<any>;
|
|
23
|
+
}, {}, {}, string>;
|
|
24
|
+
type DropdownMenu = InstanceType<typeof DropdownMenu>;
|
|
25
|
+
export default DropdownMenu;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { onMount } from 'svelte';
|
|
3
|
+
import { getFileType, getFileIcon } from '../../utils/fileUtils';
|
|
4
|
+
|
|
5
|
+
export let file: { url?: string; name: string; thumbnail?: string };
|
|
6
|
+
export let size: 'sm' | 'md' | 'lg' = 'md';
|
|
7
|
+
|
|
8
|
+
let hasError = false;
|
|
9
|
+
let fontLoaded = false;
|
|
10
|
+
let fontFace: FontFace;
|
|
11
|
+
|
|
12
|
+
$: fileType = getFileType(file.url || file.name);
|
|
13
|
+
$: isFont = fileType === 'font';
|
|
14
|
+
$: isSvg = fileType === 'svg';
|
|
15
|
+
$: fontName = file.name.replace(/\.[^/.]+$/, '');
|
|
16
|
+
|
|
17
|
+
$: sizeClasses = {
|
|
18
|
+
sm: 'w-8 h-7',
|
|
19
|
+
md: 'w-[46px] h-10',
|
|
20
|
+
lg: 'w-[62px] h-[54px]'
|
|
21
|
+
}[size];
|
|
22
|
+
|
|
23
|
+
onMount(async () => {
|
|
24
|
+
if (isFont && file.url) {
|
|
25
|
+
try {
|
|
26
|
+
fontFace = new FontFace(fontName, `url(${file.url})`);
|
|
27
|
+
await fontFace.load();
|
|
28
|
+
document.fonts.add(fontFace);
|
|
29
|
+
fontLoaded = true;
|
|
30
|
+
} catch (error) {
|
|
31
|
+
console.error('FileIcon: Error loading font from url:', file.url, error);
|
|
32
|
+
hasError = true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<div class="{sizeClasses} flex items-center justify-center rounded-[15px] overflow-hidden {isFont ? 'bg-gray-100' : ''}">
|
|
39
|
+
{#if isFont}
|
|
40
|
+
<span
|
|
41
|
+
style="font-family: '{fontName}', sans-serif;"
|
|
42
|
+
class="text-2xl text-gray-700 {fontLoaded ? '' : 'opacity-0'} transition-opacity duration-300"
|
|
43
|
+
>
|
|
44
|
+
aA
|
|
45
|
+
</span>
|
|
46
|
+
{:else if isSvg && file.url}
|
|
47
|
+
<img
|
|
48
|
+
src={file.url}
|
|
49
|
+
alt=""
|
|
50
|
+
class="w-full h-full object-contain p-1"
|
|
51
|
+
/>
|
|
52
|
+
{:else if file.thumbnail}
|
|
53
|
+
<img
|
|
54
|
+
src={file.thumbnail}
|
|
55
|
+
alt=""
|
|
56
|
+
class="w-full h-full object-cover"
|
|
57
|
+
/>
|
|
58
|
+
{:else}
|
|
59
|
+
<img
|
|
60
|
+
src={getFileIcon(file.name)}
|
|
61
|
+
alt=""
|
|
62
|
+
class="w-full h-full object-contain"
|
|
63
|
+
/>
|
|
64
|
+
{/if}
|
|
65
|
+
</div>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const FileIcon: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
file: {
|
|
16
|
+
url?: string;
|
|
17
|
+
name: string;
|
|
18
|
+
thumbnail?: string;
|
|
19
|
+
};
|
|
20
|
+
size?: "sm" | "md" | "lg";
|
|
21
|
+
}, {
|
|
22
|
+
[evt: string]: CustomEvent<any>;
|
|
23
|
+
}, {}, {}, string>;
|
|
24
|
+
type FileIcon = InstanceType<typeof FileIcon>;
|
|
25
|
+
export default FileIcon;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { FileSystemItem } from '../../types';
|
|
3
|
+
import { getFileType } from '../../utils/fileUtils';
|
|
4
|
+
|
|
5
|
+
export let file: FileSystemItem;
|
|
6
|
+
|
|
7
|
+
function formatFileSize(bytes: number): string {
|
|
8
|
+
if (bytes === 0) return '0 Bytes';
|
|
9
|
+
const k = 1024;
|
|
10
|
+
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
|
|
11
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
12
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
$: fileType = getFileType(file.url || file.name);
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<div class="bg-gray-100 p-4 rounded-large widgetic-radius widgetic-colors">
|
|
19
|
+
<h3 class="text-lg subtext mb-2">File Information</h3>
|
|
20
|
+
<ul class="space-y-2">
|
|
21
|
+
<li><strong>Name:</strong> {file.name}</li>
|
|
22
|
+
<li><strong>Type:</strong> {fileType}</li>
|
|
23
|
+
<li><strong>Size:</strong> {file.size ? formatFileSize(file.size) : 'N/A'}</li>
|
|
24
|
+
<li><strong>Last Modified:</strong> {file.modified ? new Date(file.modified).toLocaleString() : 'N/A'}</li>
|
|
25
|
+
</ul>
|
|
26
|
+
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { FileSystemItem } from '../../types';
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: Props & {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
12
|
+
};
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
14
|
+
}
|
|
15
|
+
declare const FileMetadata: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
+
file: FileSystemItem;
|
|
17
|
+
}, {
|
|
18
|
+
[evt: string]: CustomEvent<any>;
|
|
19
|
+
}, {}, {}, string>;
|
|
20
|
+
type FileMetadata = InstanceType<typeof FileMetadata>;
|
|
21
|
+
export default FileMetadata;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export let width: string = "100%";
|
|
3
|
+
export let height: string = "100%";
|
|
4
|
+
export let className: string = "";
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<!-- svelte-ignore element_invalid_self_closing_tag -->
|
|
8
|
+
<div
|
|
9
|
+
class="animate-pulse bg-[hsl(var(--grey2))] rounded-large widgetic-radius widgetic-colors {className}"
|
|
10
|
+
style="width: {width}; height: {height};"
|
|
11
|
+
/>
|
|
12
|
+
|
|
13
|
+
<style>
|
|
14
|
+
.animate-pulse {
|
|
15
|
+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@keyframes pulse {
|
|
19
|
+
0%, 100% {
|
|
20
|
+
opacity: 1;
|
|
21
|
+
}
|
|
22
|
+
50% {
|
|
23
|
+
opacity: .5;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const LoadingSkeleton: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
width?: string;
|
|
16
|
+
height?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
}, {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
}, {}, {}, string>;
|
|
21
|
+
type LoadingSkeleton = InstanceType<typeof LoadingSkeleton>;
|
|
22
|
+
export default LoadingSkeleton;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { FileSystemItem, FolderItemWithCount } from '../../types';
|
|
3
|
+
import { FileIcon } from './';
|
|
4
|
+
import { FolderItem } from '../items';
|
|
5
|
+
|
|
6
|
+
// Props
|
|
7
|
+
export let results: FileSystemItem[];
|
|
8
|
+
|
|
9
|
+
// Function to count matching files in a folder (recursive)
|
|
10
|
+
function countMatchingFiles(folder: FileSystemItem): number {
|
|
11
|
+
return folder.children?.reduce((count, item) => {
|
|
12
|
+
if (item.type === 'folder') {
|
|
13
|
+
return count + countMatchingFiles(item);
|
|
14
|
+
} else {
|
|
15
|
+
return count + 1;
|
|
16
|
+
}
|
|
17
|
+
}, 0) ?? 0;
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<!-- Display search results, showing either files or folders -->
|
|
22
|
+
<div class="space-y-2">
|
|
23
|
+
{#if results.length === 0}
|
|
24
|
+
<p class="text-center text-gray-600">No results found</p>
|
|
25
|
+
{:else}
|
|
26
|
+
{#each results as item (item.name)}
|
|
27
|
+
{#if item.type === 'folder'}
|
|
28
|
+
<FolderItem item={{...item, matchingFileCount: countMatchingFiles(item)} as FolderItemWithCount} />
|
|
29
|
+
{:else}
|
|
30
|
+
<div class="flex items-center p-2 hover:bg-[hsl(var(--grey3))] rounded-large widgetic-radius widgetic-colors">
|
|
31
|
+
<FileIcon file={item} size="md" />
|
|
32
|
+
<span class="ml-2">{item.name}</span>
|
|
33
|
+
</div>
|
|
34
|
+
{/if}
|
|
35
|
+
{/each}
|
|
36
|
+
{/if}
|
|
37
|
+
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { FileSystemItem } from '../../types';
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: Props & {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
12
|
+
};
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
14
|
+
}
|
|
15
|
+
declare const SearchResults: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
+
results: FileSystemItem[];
|
|
17
|
+
}, {
|
|
18
|
+
[evt: string]: CustomEvent<any>;
|
|
19
|
+
}, {}, {}, string>;
|
|
20
|
+
type SearchResults = InstanceType<typeof SearchResults>;
|
|
21
|
+
export default SearchResults;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { onMount, createEventDispatcher } from 'svelte';
|
|
3
|
+
const dispatch = createEventDispatcher();
|
|
4
|
+
|
|
5
|
+
let className = '';
|
|
6
|
+
export { className as class };
|
|
7
|
+
export let style: string = '';
|
|
8
|
+
//
|
|
9
|
+
export let items: any[] = [];
|
|
10
|
+
export let itemHeight: number = 54;
|
|
11
|
+
export let overscan: number = 5;
|
|
12
|
+
export let columns: number = 3;
|
|
13
|
+
export let gap: number = 20; // 8 * 4 = 32px for gap-8
|
|
14
|
+
export let scrollContainer: HTMLElement | null = null;
|
|
15
|
+
|
|
16
|
+
export let listElement: HTMLElement | null = null;
|
|
17
|
+
let visibleItems: any[] = [];
|
|
18
|
+
let startIndex = 0;
|
|
19
|
+
let endIndex = 0;
|
|
20
|
+
let totalHeight = 0;
|
|
21
|
+
|
|
22
|
+
$: {
|
|
23
|
+
// Calculate total rows needed
|
|
24
|
+
const totalRows = Math.ceil((items.length || 1) / columns);
|
|
25
|
+
// Only add gaps between rows, not after the last row
|
|
26
|
+
totalHeight = totalRows * itemHeight + (totalRows - 1) * gap;
|
|
27
|
+
// console.log('VirtualList dimensions:', { totalRows, totalHeight, itemCount: items.length });
|
|
28
|
+
updateVisibleItems();
|
|
29
|
+
// console.timeEnd('virtualListUpdate');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function updateVisibleItems() {
|
|
33
|
+
if (!scrollContainer || !listElement) return;
|
|
34
|
+
|
|
35
|
+
const updateStart = performance.now();
|
|
36
|
+
const scrollTop = scrollContainer.scrollTop;
|
|
37
|
+
const containerRect = scrollContainer.getBoundingClientRect();
|
|
38
|
+
|
|
39
|
+
// Calculate visible range based on rows
|
|
40
|
+
const rowHeight = itemHeight + gap;
|
|
41
|
+
const startRow = Math.floor(scrollTop / rowHeight);
|
|
42
|
+
const visibleRows = Math.ceil(containerRect.height / rowHeight) + 1; // Add one more row for partial visibility
|
|
43
|
+
|
|
44
|
+
// Calculate item indices with overscan
|
|
45
|
+
startIndex = Math.max(0, startRow - overscan) * columns;
|
|
46
|
+
const endRow = Math.min(startRow + visibleRows + overscan, Math.ceil(items.length / columns));
|
|
47
|
+
endIndex = Math.min(endRow * columns, items.length);
|
|
48
|
+
|
|
49
|
+
// Update visible items
|
|
50
|
+
visibleItems = items.slice(startIndex, endIndex);
|
|
51
|
+
|
|
52
|
+
// console.log('VirtualList update:', {
|
|
53
|
+
// visibleItems: visibleItems.length,
|
|
54
|
+
// startIndex,
|
|
55
|
+
// endIndex,
|
|
56
|
+
// updateTime: `${(performance.now() - updateStart).toFixed(2)}ms`
|
|
57
|
+
// });
|
|
58
|
+
|
|
59
|
+
dispatch('rangechange', { startIndex, endIndex });
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function handleScroll() {
|
|
63
|
+
updateVisibleItems();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
onMount(() => {
|
|
67
|
+
if (scrollContainer) {
|
|
68
|
+
scrollContainer.addEventListener('scroll', handleScroll);
|
|
69
|
+
updateVisibleItems();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return () => {
|
|
73
|
+
if (scrollContainer) {
|
|
74
|
+
scrollContainer.removeEventListener('scroll', handleScroll);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
</script>
|
|
79
|
+
|
|
80
|
+
<div
|
|
81
|
+
class="{className ? className + ' ' : ''}virtual-list relative flex"
|
|
82
|
+
style={style}
|
|
83
|
+
bind:this={listElement}
|
|
84
|
+
>
|
|
85
|
+
<div
|
|
86
|
+
class="grid w-full"
|
|
87
|
+
style="
|
|
88
|
+
position: relative;
|
|
89
|
+
width: 100%;
|
|
90
|
+
top: {Math.floor(startIndex / columns) * (itemHeight + gap)}px;
|
|
91
|
+
grid-template-columns: repeat({columns}, minmax(0, 1fr));
|
|
92
|
+
gap: {gap}px;
|
|
93
|
+
"
|
|
94
|
+
>
|
|
95
|
+
{#each visibleItems as item, i (item.id)}
|
|
96
|
+
<slot {item} index={startIndex + i} />
|
|
97
|
+
{/each}
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
<style>
|
|
102
|
+
.virtual-list {
|
|
103
|
+
position: relative;
|
|
104
|
+
width: 100%;
|
|
105
|
+
}
|
|
106
|
+
</style>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
15
|
+
default: any;
|
|
16
|
+
} ? Props extends Record<string, never> ? any : {
|
|
17
|
+
children?: any;
|
|
18
|
+
} : {});
|
|
19
|
+
declare const VirtualList: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
20
|
+
class?: string;
|
|
21
|
+
style?: string;
|
|
22
|
+
items?: any[];
|
|
23
|
+
itemHeight?: number;
|
|
24
|
+
overscan?: number;
|
|
25
|
+
columns?: number;
|
|
26
|
+
gap?: number;
|
|
27
|
+
scrollContainer?: HTMLElement | null;
|
|
28
|
+
listElement?: HTMLElement | null;
|
|
29
|
+
}, {
|
|
30
|
+
default: {
|
|
31
|
+
item: any;
|
|
32
|
+
index: any;
|
|
33
|
+
};
|
|
34
|
+
}>, {
|
|
35
|
+
rangechange: CustomEvent<any>;
|
|
36
|
+
} & {
|
|
37
|
+
[evt: string]: CustomEvent<any>;
|
|
38
|
+
}, {
|
|
39
|
+
default: {
|
|
40
|
+
item: any;
|
|
41
|
+
index: any;
|
|
42
|
+
};
|
|
43
|
+
}, {}, string>;
|
|
44
|
+
type VirtualList = InstanceType<typeof VirtualList>;
|
|
45
|
+
export default VirtualList;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as DropdownMenu } from './DropdownMenu.svelte';
|
|
2
|
+
export { default as FileIcon } from './FileIcon.svelte';
|
|
3
|
+
export { default as FileMetadata } from './FileMetadata.svelte';
|
|
4
|
+
export { default as SearchResults } from './SearchResults.svelte';
|
|
5
|
+
export { default as LoadingSkeleton } from './LoadingSkeleton.svelte';
|
|
6
|
+
export { default as VirtualList } from './VirtualList.svelte';
|
|
7
|
+
export { default as DragSelect } from './DragSelect.svelte';
|
|
8
|
+
export { default as ControlToolbar } from './ControlToolbar.svelte';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as DropdownMenu } from './DropdownMenu.svelte';
|
|
2
|
+
export { default as FileIcon } from './FileIcon.svelte';
|
|
3
|
+
export { default as FileMetadata } from './FileMetadata.svelte';
|
|
4
|
+
export { default as SearchResults } from './SearchResults.svelte';
|
|
5
|
+
export { default as LoadingSkeleton } from './LoadingSkeleton.svelte';
|
|
6
|
+
export { default as VirtualList } from './VirtualList.svelte';
|
|
7
|
+
export { default as DragSelect } from './DragSelect.svelte';
|
|
8
|
+
export { default as ControlToolbar } from './ControlToolbar.svelte';
|
package/dist/config.d.ts
ADDED
package/dist/config.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// File Browser Configuration
|
|
2
|
+
// Reads from environment variables with sensible defaults
|
|
3
|
+
const env = process.env;
|
|
4
|
+
export const config = {
|
|
5
|
+
// Parse comma-separated origins or use defaults for development
|
|
6
|
+
ALLOWED_ORIGINS: env.PUBLIC_ALLOWED_ORIGINS?.split(',') || [
|
|
7
|
+
'http://localhost:5173', // Main site dev
|
|
8
|
+
'http://localhost:3000', // API Gateway
|
|
9
|
+
'http://localhost:5174', // Alternative dev port
|
|
10
|
+
],
|
|
11
|
+
APP_URL: env.PUBLIC_APP_URL || 'http://localhost:5173',
|
|
12
|
+
NODE_ENV: env.NODE_ENV || 'development'
|
|
13
|
+
};
|
|
14
|
+
export default config;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as FileBrowser } from './components/core/FileBrowser.svelte';
|
|
2
|
+
export * from './components';
|
|
3
|
+
export * from './stores';
|
|
4
|
+
export { fileBrowserUploadConfig, setFileBrowserUploadConfig, getFileBrowserUploadConfig, type FileBrowserUploadConfig, } from './stores/uploadApiStore';
|
|
5
|
+
export * from './utils';
|
|
6
|
+
export * from './types';
|
|
7
|
+
export type { FileSystemItem, FileSystemRoot, FolderItemWithCount } from './types';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Export specific components for easier imports
|
|
2
|
+
export { default as FileBrowser } from './components/core/FileBrowser.svelte';
|
|
3
|
+
// Export all components
|
|
4
|
+
export * from './components';
|
|
5
|
+
// Export all stores
|
|
6
|
+
export * from './stores';
|
|
7
|
+
export { fileBrowserUploadConfig, setFileBrowserUploadConfig, getFileBrowserUploadConfig, } from './stores/uploadApiStore';
|
|
8
|
+
// Export all utilities
|
|
9
|
+
export * from './utils';
|
|
10
|
+
// Export types
|
|
11
|
+
export * from './types';
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
some text
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
If I had to choose, I’d probably lean toward being European, mainly because of the diversity of cultures, languages, and histories packed into a relatively small area. The ability to travel across multiple countries with distinct traditions, cuisines, and ways of life is pretty appealing. Plus, Europe’s focus on work-life balance, public healthcare, and social policies in many countries seems like a good deal.
|
|
2
|
+
|
|
3
|
+
That said, the U.S. has its own advantages—like its entrepreneurial spirit, vast opportunities, and cultural influence on the world. It really depends on what kind of life experience you’re looking for.
|
|
4
|
+
|
|
5
|
+
Here are 10 widget ideas where users don’t need to provide content:
|
|
6
|
+
1. Calculator – A simple calculator for basic arithmetic or a specialized one (e.g., mortgage, tip, or currency converter).
|
|
7
|
+
2. Countdown Timer – A timer users can start and stop without inputting text.
|
|
8
|
+
3. Clock – Displays the current time in a chosen timezone.
|
|
9
|
+
4. Random Number Generator – Generates random numbers within a predefined range.
|
|
10
|
+
5. Weather Widget – Shows current weather based on the user’s location.
|
|
11
|
+
6. QR Code Generator – Automatically creates a QR code based on a fixed URL or predefined action.
|
|
12
|
+
7. Stock Market Ticker – Displays real-time stock prices or cryptocurrency values.
|
|
13
|
+
8. Step Counter – Tracks steps if integrated with a device’s motion sensors.
|
|
14
|
+
9. Analog Noise Generator – Plays white noise, rain sounds, or other ambient sounds.
|
|
15
|
+
10. Flashlight Widget – Toggles the device flashlight on and off.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|