@useupup/vue 3.3.0

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.
Files changed (175) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +67 -0
  3. package/dist/AudioUploader-6ZMGQ3GT.cjs +376 -0
  4. package/dist/AudioUploader-6ZMGQ3GT.cjs.map +1 -0
  5. package/dist/AudioUploader-IEWPI3TS.js +376 -0
  6. package/dist/AudioUploader-IEWPI3TS.js.map +1 -0
  7. package/dist/BoxUploader-S6CGJLO7.cjs +214 -0
  8. package/dist/BoxUploader-S6CGJLO7.cjs.map +1 -0
  9. package/dist/BoxUploader-TIDCYWMC.js +214 -0
  10. package/dist/BoxUploader-TIDCYWMC.js.map +1 -0
  11. package/dist/CameraUploader-575RARRY.js +258 -0
  12. package/dist/CameraUploader-575RARRY.js.map +1 -0
  13. package/dist/CameraUploader-LBIVBECB.cjs +258 -0
  14. package/dist/CameraUploader-LBIVBECB.cjs.map +1 -0
  15. package/dist/DropboxUploader-HTGDBDTB.cjs +216 -0
  16. package/dist/DropboxUploader-HTGDBDTB.cjs.map +1 -0
  17. package/dist/DropboxUploader-M2LY2Q32.js +216 -0
  18. package/dist/DropboxUploader-M2LY2Q32.js.map +1 -0
  19. package/dist/GoogleDriveUploader-R3WJYLW7.cjs +220 -0
  20. package/dist/GoogleDriveUploader-R3WJYLW7.cjs.map +1 -0
  21. package/dist/GoogleDriveUploader-SAY4C2QY.js +220 -0
  22. package/dist/GoogleDriveUploader-SAY4C2QY.js.map +1 -0
  23. package/dist/OneDriveUploader-EDB3RJA4.js +219 -0
  24. package/dist/OneDriveUploader-EDB3RJA4.js.map +1 -0
  25. package/dist/OneDriveUploader-WYALTOCQ.cjs +219 -0
  26. package/dist/OneDriveUploader-WYALTOCQ.cjs.map +1 -0
  27. package/dist/ScreenCaptureUploader-F65CM6OA.js +334 -0
  28. package/dist/ScreenCaptureUploader-F65CM6OA.js.map +1 -0
  29. package/dist/ScreenCaptureUploader-TZ74W7WQ.cjs +334 -0
  30. package/dist/ScreenCaptureUploader-TZ74W7WQ.cjs.map +1 -0
  31. package/dist/UrlUploader-PXEGUBQ4.js +143 -0
  32. package/dist/UrlUploader-PXEGUBQ4.js.map +1 -0
  33. package/dist/UrlUploader-TLYGV433.cjs +143 -0
  34. package/dist/UrlUploader-TLYGV433.cjs.map +1 -0
  35. package/dist/assets/logos.d.ts +5 -0
  36. package/dist/assets/logos.d.ts.map +1 -0
  37. package/dist/chunk-D32QOALR.cjs +1083 -0
  38. package/dist/chunk-D32QOALR.cjs.map +1 -0
  39. package/dist/chunk-GG4ABGXB.cjs +62 -0
  40. package/dist/chunk-GG4ABGXB.cjs.map +1 -0
  41. package/dist/chunk-GVB7IFRP.cjs +0 -0
  42. package/dist/chunk-GVB7IFRP.cjs.map +1 -0
  43. package/dist/chunk-IXLKUMV2.cjs +55 -0
  44. package/dist/chunk-IXLKUMV2.cjs.map +1 -0
  45. package/dist/chunk-M6AHIQ3M.js +62 -0
  46. package/dist/chunk-M6AHIQ3M.js.map +1 -0
  47. package/dist/chunk-PPPFIWFQ.js +1083 -0
  48. package/dist/chunk-PPPFIWFQ.js.map +1 -0
  49. package/dist/chunk-RZ7RTSRZ.js +55 -0
  50. package/dist/chunk-RZ7RTSRZ.js.map +1 -0
  51. package/dist/chunk-X6FZTCNT.js +0 -0
  52. package/dist/chunk-X6FZTCNT.js.map +1 -0
  53. package/dist/components/AudioUploader.vue.d.ts +3 -0
  54. package/dist/components/AudioUploader.vue.d.ts.map +1 -0
  55. package/dist/components/AudioWaveform.vue.d.ts +16 -0
  56. package/dist/components/AudioWaveform.vue.d.ts.map +1 -0
  57. package/dist/components/BoxUploader.vue.d.ts +3 -0
  58. package/dist/components/BoxUploader.vue.d.ts.map +1 -0
  59. package/dist/components/CameraUploader.vue.d.ts +3 -0
  60. package/dist/components/CameraUploader.vue.d.ts.map +1 -0
  61. package/dist/components/ClientBoxUploader.vue.d.ts +3 -0
  62. package/dist/components/ClientBoxUploader.vue.d.ts.map +1 -0
  63. package/dist/components/ClientDropboxUploader.vue.d.ts +3 -0
  64. package/dist/components/ClientDropboxUploader.vue.d.ts.map +1 -0
  65. package/dist/components/ClientGoogleDriveUploader.vue.d.ts +3 -0
  66. package/dist/components/ClientGoogleDriveUploader.vue.d.ts.map +1 -0
  67. package/dist/components/ClientOneDriveUploader.vue.d.ts +3 -0
  68. package/dist/components/ClientOneDriveUploader.vue.d.ts.map +1 -0
  69. package/dist/components/DefaultLoaderIcon.vue.d.ts +3 -0
  70. package/dist/components/DefaultLoaderIcon.vue.d.ts.map +1 -0
  71. package/dist/components/DropboxUploader.vue.d.ts +3 -0
  72. package/dist/components/DropboxUploader.vue.d.ts.map +1 -0
  73. package/dist/components/FileHero.vue.d.ts +13 -0
  74. package/dist/components/FileHero.vue.d.ts.map +1 -0
  75. package/dist/components/FileIcon.vue.d.ts +9 -0
  76. package/dist/components/FileIcon.vue.d.ts.map +1 -0
  77. package/dist/components/FileItem.vue.d.ts +14 -0
  78. package/dist/components/FileItem.vue.d.ts.map +1 -0
  79. package/dist/components/FileList.vue.d.ts +3 -0
  80. package/dist/components/FileList.vue.d.ts.map +1 -0
  81. package/dist/components/FilePreview.vue.d.ts +22 -0
  82. package/dist/components/FilePreview.vue.d.ts.map +1 -0
  83. package/dist/components/FilePreviewPortal.vue.d.ts +15 -0
  84. package/dist/components/FilePreviewPortal.vue.d.ts.map +1 -0
  85. package/dist/components/FilePreviewThumbnail.vue.d.ts +19 -0
  86. package/dist/components/FilePreviewThumbnail.vue.d.ts.map +1 -0
  87. package/dist/components/FileRow.vue.d.ts +17 -0
  88. package/dist/components/FileRow.vue.d.ts.map +1 -0
  89. package/dist/components/GoogleDriveUploader.vue.d.ts +3 -0
  90. package/dist/components/GoogleDriveUploader.vue.d.ts.map +1 -0
  91. package/dist/components/Icon.d.ts +36 -0
  92. package/dist/components/Icon.d.ts.map +1 -0
  93. package/dist/components/Icons.d.ts +10 -0
  94. package/dist/components/Icons.d.ts.map +1 -0
  95. package/dist/components/ImageEditorStub.vue.d.ts +3 -0
  96. package/dist/components/ImageEditorStub.vue.d.ts.map +1 -0
  97. package/dist/components/OneDriveUploader.vue.d.ts +3 -0
  98. package/dist/components/OneDriveUploader.vue.d.ts.map +1 -0
  99. package/dist/components/ScreenCaptureUploader.vue.d.ts +3 -0
  100. package/dist/components/ScreenCaptureUploader.vue.d.ts.map +1 -0
  101. package/dist/components/ServerModeDriveUploader.vue.d.ts +9 -0
  102. package/dist/components/ServerModeDriveUploader.vue.d.ts.map +1 -0
  103. package/dist/components/SourceSelector.vue.d.ts +3 -0
  104. package/dist/components/SourceSelector.vue.d.ts.map +1 -0
  105. package/dist/components/SourceView.vue.d.ts +3 -0
  106. package/dist/components/SourceView.vue.d.ts.map +1 -0
  107. package/dist/components/UploaderPanel.vue.d.ts +3 -0
  108. package/dist/components/UploaderPanel.vue.d.ts.map +1 -0
  109. package/dist/components/UrlUploader.vue.d.ts +3 -0
  110. package/dist/components/UrlUploader.vue.d.ts.map +1 -0
  111. package/dist/components/shared/DriveAuthFallback.vue.d.ts +12 -0
  112. package/dist/components/shared/DriveAuthFallback.vue.d.ts.map +1 -0
  113. package/dist/components/shared/DriveBrowser.vue.d.ts +28 -0
  114. package/dist/components/shared/DriveBrowser.vue.d.ts.map +1 -0
  115. package/dist/components/shared/DriveBrowserHeader.vue.d.ts +13 -0
  116. package/dist/components/shared/DriveBrowserHeader.vue.d.ts.map +1 -0
  117. package/dist/components/shared/DriveBrowserIcon.vue.d.ts +7 -0
  118. package/dist/components/shared/DriveBrowserIcon.vue.d.ts.map +1 -0
  119. package/dist/components/shared/DriveBrowserItem.vue.d.ts +9 -0
  120. package/dist/components/shared/DriveBrowserItem.vue.d.ts.map +1 -0
  121. package/dist/components/shared/FileSuccessCheck.vue.d.ts +20 -0
  122. package/dist/components/shared/FileSuccessCheck.vue.d.ts.map +1 -0
  123. package/dist/components/shared/ProgressBar.vue.d.ts +11 -0
  124. package/dist/components/shared/ProgressBar.vue.d.ts.map +1 -0
  125. package/dist/components/shared/SourceViewContainer.vue.d.ts +18 -0
  126. package/dist/components/shared/SourceViewContainer.vue.d.ts.map +1 -0
  127. package/dist/components/shared/UploaderHeader.vue.d.ts +15 -0
  128. package/dist/components/shared/UploaderHeader.vue.d.ts.map +1 -0
  129. package/dist/composables/use-tiles-per-row.d.ts +10 -0
  130. package/dist/composables/use-tiles-per-row.d.ts.map +1 -0
  131. package/dist/composables/useBox.d.ts +28 -0
  132. package/dist/composables/useBox.d.ts.map +1 -0
  133. package/dist/composables/useCameraUploader.d.ts +25 -0
  134. package/dist/composables/useCameraUploader.d.ts.map +1 -0
  135. package/dist/composables/useDropbox.d.ts +28 -0
  136. package/dist/composables/useDropbox.d.ts.map +1 -0
  137. package/dist/composables/useFetchFileByUrl.d.ts +8 -0
  138. package/dist/composables/useFetchFileByUrl.d.ts.map +1 -0
  139. package/dist/composables/useGoogleDrive.d.ts +28 -0
  140. package/dist/composables/useGoogleDrive.d.ts.map +1 -0
  141. package/dist/composables/useOneDrive.d.ts +29 -0
  142. package/dist/composables/useOneDrive.d.ts.map +1 -0
  143. package/dist/composables/useSSEProcessing.d.ts +19 -0
  144. package/dist/composables/useSSEProcessing.d.ts.map +1 -0
  145. package/dist/composables/useServerModeDrive.d.ts +17 -0
  146. package/dist/composables/useServerModeDrive.d.ts.map +1 -0
  147. package/dist/composables/useSourceSelector.d.ts +13 -0
  148. package/dist/composables/useSourceSelector.d.ts.map +1 -0
  149. package/dist/composables/useUploaderController.d.ts +4 -0
  150. package/dist/composables/useUploaderController.d.ts.map +1 -0
  151. package/dist/composables/useUploaderPanel.d.ts +13 -0
  152. package/dist/composables/useUploaderPanel.d.ts.map +1 -0
  153. package/dist/context/source-view-header-extra.d.ts +4 -0
  154. package/dist/context/source-view-header-extra.d.ts.map +1 -0
  155. package/dist/context/uploader-context.d.ts +95 -0
  156. package/dist/context/uploader-context.d.ts.map +1 -0
  157. package/dist/index.cjs +4405 -0
  158. package/dist/index.cjs.map +1 -0
  159. package/dist/index.d.ts +9 -0
  160. package/dist/index.d.ts.map +1 -0
  161. package/dist/index.js +4405 -0
  162. package/dist/index.js.map +1 -0
  163. package/dist/lib/constants.d.ts +11 -0
  164. package/dist/lib/constants.d.ts.map +1 -0
  165. package/dist/lib/view-mode.d.ts +24 -0
  166. package/dist/lib/view-mode.d.ts.map +1 -0
  167. package/dist/shared/types.d.ts +15 -0
  168. package/dist/shared/types.d.ts.map +1 -0
  169. package/dist/styles.d.ts +4 -0
  170. package/dist/tailwind-prefixed.css +2508 -0
  171. package/dist/upup-uploader.vue.d.ts +18 -0
  172. package/dist/upup-uploader.vue.d.ts.map +1 -0
  173. package/dist/use-upup-upload.d.ts +38 -0
  174. package/dist/use-upup-upload.d.ts.map +1 -0
  175. package/package.json +100 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ServerModeDriveUploader.vue","../src/components/ServerModeDriveUploader.vue","../src/composables/useServerModeDrive.ts","../src/components/shared/DriveAuthFallback.vue","../src/components/shared/DriveAuthFallback.vue","../src/components/shared/DriveBrowser.vue","../src/components/shared/DriveBrowser.vue","../src/components/shared/DriveBrowserHeader.vue","../src/components/shared/DriveBrowserHeader.vue","../src/components/shared/DriveBrowserItem.vue","../src/components/shared/DriveBrowserItem.vue","../src/components/shared/DriveBrowserIcon.vue","../src/components/shared/DriveBrowserIcon.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport { ref, computed } from 'vue'\r\nimport {\r\n useUploaderI18n,\r\n useUploaderOptions,\r\n useUploaderTheme,\r\n} from '../context/uploader-context'\r\nimport {\r\n useServerModeDrive,\r\n type ServerDriveFile,\r\n type ServerModeProvider,\r\n} from '../composables/useServerModeDrive'\r\nimport SourceViewContainer from './shared/SourceViewContainer.vue'\r\nimport DriveAuthFallback from './shared/DriveAuthFallback.vue'\r\nimport { errorCodeToMessageKey } from '@useupup/core'\r\nimport { cn } from '@useupup/core/internal'\r\n\r\nconst props = defineProps<{\r\n provider: ServerModeProvider\r\n onBack?: () => void\r\n dataUpupSlot?: string | undefined\r\n}>()\r\n\r\nconst PROVIDER_LABEL: Record<ServerModeProvider, string> = {\r\n 'google-drive': 'Google Drive',\r\n 'one-drive': 'OneDrive',\r\n 'dropbox': 'Dropbox',\r\n 'box': 'Box',\r\n}\r\n\r\nconst resolvedSlot = computed(() => props.dataUpupSlot ?? `drive-browser-${props.provider}`)\r\n\r\nconst { icons } = useUploaderOptions()\r\nconst { isDark: dark } = useUploaderTheme()\r\nconst { translator } = useUploaderI18n()\r\nconst { state, search, setSearch, refresh, transfer, startAuth } =\r\n useServerModeDrive(props.provider)\r\n\r\nconst errorText = computed(() => {\r\n if (state.value.status !== 'error') return ''\r\n return state.value.code && translator\r\n ? translator(`errors.${errorCodeToMessageKey(state.value.code)}`, {\r\n code: state.value.code,\r\n })\r\n : state.value.message\r\n})\r\nconst selected = ref<Set<string>>(new Set())\r\nconst transferring = ref(false)\r\n\r\nconst isLoading = computed(() =>\r\n state.value.status === 'loading' || state.value.status === 'idle',\r\n)\r\nconst files = computed<ServerDriveFile[]>(() =>\r\n state.value.status === 'ready' ? state.value.files : [],\r\n)\r\n\r\nfunction toggle(id: string) {\r\n const next = new Set(selected.value)\r\n if (next.has(id)) next.delete(id)\r\n else next.add(id)\r\n selected.value = next\r\n}\r\n\r\nasync function handleTransfer() {\r\n transferring.value = true\r\n try {\r\n for (const file of files.value.filter(f => selected.value.has(f.id))) {\r\n const result = await transfer(file)\r\n if (result.status === 'reauth') {\r\n startAuth()\r\n return\r\n }\r\n }\r\n selected.value = new Set()\r\n props.onBack?.()\r\n } finally {\r\n transferring.value = false\r\n }\r\n}\r\n\r\nfunction formatBytes(bytes: number): string {\r\n if (bytes < 1024) return `${bytes} B`\r\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`\r\n if (bytes < 1024 * 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(1)} MB`\r\n return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`\r\n}\r\n</script>\r\n\r\n<template>\r\n <DriveAuthFallback\r\n v-if=\"state.status === 'reauth'\"\r\n :provider-name=\"PROVIDER_LABEL[props.provider]\"\r\n :on-retry=\"startAuth\"\r\n />\r\n <SourceViewContainer\r\n v-else\r\n :is-loading=\"isLoading\"\r\n :data-upup-slot=\"resolvedSlot\"\r\n >\r\n <component :is=\"icons.LoaderIcon\" v-if=\"isLoading\" />\r\n <template v-else>\r\n <div\r\n data-testid=\"upup-server-drive-browser\"\r\n class=\"upup-grid upup-h-full upup-w-full upup-grid-rows-[auto,1fr,auto] upup-overflow-auto\"\r\n >\r\n <div\r\n :class=\"cn(\r\n 'upup-flex upup-items-center upup-gap-2 upup-border-b upup-px-3 upup-py-2.5',\r\n dark\r\n ? 'upup-border-white/[0.06] upup-text-[#e2e8f0]'\r\n : 'upup-border-black/[0.06] upup-text-gray-800',\r\n )\"\r\n data-upup-slot=\"drive-browser-header\"\r\n >\r\n <span class=\"upup-text-sm upup-font-medium\">\r\n {{ PROVIDER_LABEL[props.provider] }}\r\n </span>\r\n <input\r\n type=\"search\"\r\n name=\"upup-drive-search\"\r\n aria-label=\"Search\"\r\n :value=\"search\"\r\n @input=\"setSearch(($event.target as HTMLInputElement).value)\"\r\n @keydown.enter=\"refresh({ search: ($event.target as HTMLInputElement).value })\"\r\n placeholder=\"Search…\"\r\n :class=\"cn(\r\n 'upup-ml-auto upup-rounded upup-border upup-px-2 upup-py-1 upup-text-xs',\r\n dark\r\n ? 'upup-border-gray-700 upup-bg-gray-800 upup-text-gray-100'\r\n : 'upup-border-gray-300 upup-bg-white',\r\n )\"\r\n />\r\n </div>\r\n <div class=\"upup-overflow-auto upup-p-2\">\r\n <p\r\n v-if=\"state.status === 'error'\"\r\n data-testid=\"upup-drive-error\"\r\n data-upup-slot=\"drive-error\"\r\n role=\"alert\"\r\n :class=\"cn(\r\n 'upup-p-4 upup-text-sm',\r\n dark ? 'upup-text-red-400' : 'upup-text-red-600',\r\n )\"\r\n >\r\n {{ errorText }}\r\n </p>\r\n <button\r\n v-for=\"file in files\"\r\n :key=\"file.id\"\r\n type=\"button\"\r\n data-upup-slot=\"drive-browser-item\"\r\n :data-selected=\"selected.has(file.id)\"\r\n :class=\"cn(\r\n 'upup-fx-hover-lift upup-mb-1.5 upup-flex upup-w-full upup-items-center upup-gap-3 upup-rounded-[11px] upup-px-3 upup-py-2.5 upup-text-left upup-text-sm upup-ring-1',\r\n selected.has(file.id)\r\n ? 'upup-bg-[#0ea5e9]/10 upup-ring-[#38bdf8]/35'\r\n : dark\r\n ? 'upup-bg-white/[0.04] upup-text-[#e2e8f0] upup-ring-white/[0.06] hover:upup-bg-white/[0.07]'\r\n : 'upup-bg-black/[0.03] upup-text-gray-800 upup-ring-black/[0.06] hover:upup-bg-black/[0.05]',\r\n )\"\r\n @click=\"file.isFolder ? refresh({ folderId: file.id }) : toggle(file.id)\"\r\n >\r\n <span\r\n class=\"upup-flex upup-h-[30px] upup-w-[30px] upup-flex-none upup-items-center upup-justify-center upup-rounded-[8px] upup-bg-white/[0.05]\"\r\n aria-hidden=\"true\"\r\n >\r\n <svg\r\n v-if=\"file.isFolder\"\r\n viewBox=\"0 0 24 24\"\r\n width=\"17\"\r\n height=\"17\"\r\n fill=\"none\"\r\n stroke=\"#38bdf8\"\r\n stroke-width=\"1.7\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <path d=\"M3 7a2 2 0 0 1 2-2h4l2 2h6a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\" />\r\n </svg>\r\n <svg\r\n v-else\r\n viewBox=\"0 0 24 24\"\r\n width=\"17\"\r\n height=\"17\"\r\n fill=\"none\"\r\n :stroke=\"dark ? '#94a3b8' : '#64748b'\"\r\n stroke-width=\"1.6\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <path d=\"M6 3h8l4 4v13a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z\" />\r\n <path d=\"M14 3v4h4\" />\r\n </svg>\r\n </span>\r\n <span class=\"upup-flex-1 upup-truncate\">{{ file.name }}</span>\r\n <span\r\n v-if=\"file.size != null && !file.isFolder\"\r\n class=\"upup-text-xs upup-opacity-60\"\r\n >\r\n {{ formatBytes(file.size) }}\r\n </span>\r\n </button>\r\n </div>\r\n <div\r\n :class=\"cn(\r\n 'upup-flex upup-items-center upup-justify-between upup-gap-2 upup-border-t upup-p-3',\r\n dark ? 'upup-border-white/[0.06]' : 'upup-border-black/[0.06]',\r\n )\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"upup-text-sm upup-opacity-70 hover:upup-opacity-100\"\r\n @click=\"props.onBack?.()\"\r\n >\r\n Cancel\r\n </button>\r\n <button\r\n type=\"button\"\r\n :disabled=\"selected.size === 0 || transferring\"\r\n class=\"upup-fx-press upup-rounded-lg upup-bg-[#0ea5e9] upup-px-3 upup-py-1.5 upup-text-sm upup-font-medium upup-text-white hover:upup-bg-[#0284c7] disabled:upup-opacity-50\"\r\n @click=\"handleTransfer()\"\r\n >\r\n {{ transferring\r\n ? 'Uploading…'\r\n : `Add files${selected.size ? ` (${selected.size})` : ''}` }}\r\n </button>\r\n </div>\r\n </div>\r\n </template>\r\n </SourceViewContainer>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { ref, computed } from 'vue'\r\nimport {\r\n useUploaderI18n,\r\n useUploaderOptions,\r\n useUploaderTheme,\r\n} from '../context/uploader-context'\r\nimport {\r\n useServerModeDrive,\r\n type ServerDriveFile,\r\n type ServerModeProvider,\r\n} from '../composables/useServerModeDrive'\r\nimport SourceViewContainer from './shared/SourceViewContainer.vue'\r\nimport DriveAuthFallback from './shared/DriveAuthFallback.vue'\r\nimport { errorCodeToMessageKey } from '@useupup/core'\r\nimport { cn } from '@useupup/core/internal'\r\n\r\nconst props = defineProps<{\r\n provider: ServerModeProvider\r\n onBack?: () => void\r\n dataUpupSlot?: string | undefined\r\n}>()\r\n\r\nconst PROVIDER_LABEL: Record<ServerModeProvider, string> = {\r\n 'google-drive': 'Google Drive',\r\n 'one-drive': 'OneDrive',\r\n 'dropbox': 'Dropbox',\r\n 'box': 'Box',\r\n}\r\n\r\nconst resolvedSlot = computed(() => props.dataUpupSlot ?? `drive-browser-${props.provider}`)\r\n\r\nconst { icons } = useUploaderOptions()\r\nconst { isDark: dark } = useUploaderTheme()\r\nconst { translator } = useUploaderI18n()\r\nconst { state, search, setSearch, refresh, transfer, startAuth } =\r\n useServerModeDrive(props.provider)\r\n\r\nconst errorText = computed(() => {\r\n if (state.value.status !== 'error') return ''\r\n return state.value.code && translator\r\n ? translator(`errors.${errorCodeToMessageKey(state.value.code)}`, {\r\n code: state.value.code,\r\n })\r\n : state.value.message\r\n})\r\nconst selected = ref<Set<string>>(new Set())\r\nconst transferring = ref(false)\r\n\r\nconst isLoading = computed(() =>\r\n state.value.status === 'loading' || state.value.status === 'idle',\r\n)\r\nconst files = computed<ServerDriveFile[]>(() =>\r\n state.value.status === 'ready' ? state.value.files : [],\r\n)\r\n\r\nfunction toggle(id: string) {\r\n const next = new Set(selected.value)\r\n if (next.has(id)) next.delete(id)\r\n else next.add(id)\r\n selected.value = next\r\n}\r\n\r\nasync function handleTransfer() {\r\n transferring.value = true\r\n try {\r\n for (const file of files.value.filter(f => selected.value.has(f.id))) {\r\n const result = await transfer(file)\r\n if (result.status === 'reauth') {\r\n startAuth()\r\n return\r\n }\r\n }\r\n selected.value = new Set()\r\n props.onBack?.()\r\n } finally {\r\n transferring.value = false\r\n }\r\n}\r\n\r\nfunction formatBytes(bytes: number): string {\r\n if (bytes < 1024) return `${bytes} B`\r\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`\r\n if (bytes < 1024 * 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(1)} MB`\r\n return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`\r\n}\r\n</script>\r\n\r\n<template>\r\n <DriveAuthFallback\r\n v-if=\"state.status === 'reauth'\"\r\n :provider-name=\"PROVIDER_LABEL[props.provider]\"\r\n :on-retry=\"startAuth\"\r\n />\r\n <SourceViewContainer\r\n v-else\r\n :is-loading=\"isLoading\"\r\n :data-upup-slot=\"resolvedSlot\"\r\n >\r\n <component :is=\"icons.LoaderIcon\" v-if=\"isLoading\" />\r\n <template v-else>\r\n <div\r\n data-testid=\"upup-server-drive-browser\"\r\n class=\"upup-grid upup-h-full upup-w-full upup-grid-rows-[auto,1fr,auto] upup-overflow-auto\"\r\n >\r\n <div\r\n :class=\"cn(\r\n 'upup-flex upup-items-center upup-gap-2 upup-border-b upup-px-3 upup-py-2.5',\r\n dark\r\n ? 'upup-border-white/[0.06] upup-text-[#e2e8f0]'\r\n : 'upup-border-black/[0.06] upup-text-gray-800',\r\n )\"\r\n data-upup-slot=\"drive-browser-header\"\r\n >\r\n <span class=\"upup-text-sm upup-font-medium\">\r\n {{ PROVIDER_LABEL[props.provider] }}\r\n </span>\r\n <input\r\n type=\"search\"\r\n name=\"upup-drive-search\"\r\n aria-label=\"Search\"\r\n :value=\"search\"\r\n @input=\"setSearch(($event.target as HTMLInputElement).value)\"\r\n @keydown.enter=\"refresh({ search: ($event.target as HTMLInputElement).value })\"\r\n placeholder=\"Search…\"\r\n :class=\"cn(\r\n 'upup-ml-auto upup-rounded upup-border upup-px-2 upup-py-1 upup-text-xs',\r\n dark\r\n ? 'upup-border-gray-700 upup-bg-gray-800 upup-text-gray-100'\r\n : 'upup-border-gray-300 upup-bg-white',\r\n )\"\r\n />\r\n </div>\r\n <div class=\"upup-overflow-auto upup-p-2\">\r\n <p\r\n v-if=\"state.status === 'error'\"\r\n data-testid=\"upup-drive-error\"\r\n data-upup-slot=\"drive-error\"\r\n role=\"alert\"\r\n :class=\"cn(\r\n 'upup-p-4 upup-text-sm',\r\n dark ? 'upup-text-red-400' : 'upup-text-red-600',\r\n )\"\r\n >\r\n {{ errorText }}\r\n </p>\r\n <button\r\n v-for=\"file in files\"\r\n :key=\"file.id\"\r\n type=\"button\"\r\n data-upup-slot=\"drive-browser-item\"\r\n :data-selected=\"selected.has(file.id)\"\r\n :class=\"cn(\r\n 'upup-fx-hover-lift upup-mb-1.5 upup-flex upup-w-full upup-items-center upup-gap-3 upup-rounded-[11px] upup-px-3 upup-py-2.5 upup-text-left upup-text-sm upup-ring-1',\r\n selected.has(file.id)\r\n ? 'upup-bg-[#0ea5e9]/10 upup-ring-[#38bdf8]/35'\r\n : dark\r\n ? 'upup-bg-white/[0.04] upup-text-[#e2e8f0] upup-ring-white/[0.06] hover:upup-bg-white/[0.07]'\r\n : 'upup-bg-black/[0.03] upup-text-gray-800 upup-ring-black/[0.06] hover:upup-bg-black/[0.05]',\r\n )\"\r\n @click=\"file.isFolder ? refresh({ folderId: file.id }) : toggle(file.id)\"\r\n >\r\n <span\r\n class=\"upup-flex upup-h-[30px] upup-w-[30px] upup-flex-none upup-items-center upup-justify-center upup-rounded-[8px] upup-bg-white/[0.05]\"\r\n aria-hidden=\"true\"\r\n >\r\n <svg\r\n v-if=\"file.isFolder\"\r\n viewBox=\"0 0 24 24\"\r\n width=\"17\"\r\n height=\"17\"\r\n fill=\"none\"\r\n stroke=\"#38bdf8\"\r\n stroke-width=\"1.7\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <path d=\"M3 7a2 2 0 0 1 2-2h4l2 2h6a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\" />\r\n </svg>\r\n <svg\r\n v-else\r\n viewBox=\"0 0 24 24\"\r\n width=\"17\"\r\n height=\"17\"\r\n fill=\"none\"\r\n :stroke=\"dark ? '#94a3b8' : '#64748b'\"\r\n stroke-width=\"1.6\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <path d=\"M6 3h8l4 4v13a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z\" />\r\n <path d=\"M14 3v4h4\" />\r\n </svg>\r\n </span>\r\n <span class=\"upup-flex-1 upup-truncate\">{{ file.name }}</span>\r\n <span\r\n v-if=\"file.size != null && !file.isFolder\"\r\n class=\"upup-text-xs upup-opacity-60\"\r\n >\r\n {{ formatBytes(file.size) }}\r\n </span>\r\n </button>\r\n </div>\r\n <div\r\n :class=\"cn(\r\n 'upup-flex upup-items-center upup-justify-between upup-gap-2 upup-border-t upup-p-3',\r\n dark ? 'upup-border-white/[0.06]' : 'upup-border-black/[0.06]',\r\n )\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"upup-text-sm upup-opacity-70 hover:upup-opacity-100\"\r\n @click=\"props.onBack?.()\"\r\n >\r\n Cancel\r\n </button>\r\n <button\r\n type=\"button\"\r\n :disabled=\"selected.size === 0 || transferring\"\r\n class=\"upup-fx-press upup-rounded-lg upup-bg-[#0ea5e9] upup-px-3 upup-py-1.5 upup-text-sm upup-font-medium upup-text-white hover:upup-bg-[#0284c7] disabled:upup-opacity-50\"\r\n @click=\"handleTransfer()\"\r\n >\r\n {{ transferring\r\n ? 'Uploading…'\r\n : `Add files${selected.size ? ` (${selected.size})` : ''}` }}\r\n </button>\r\n </div>\r\n </div>\r\n </template>\r\n </SourceViewContainer>\r\n</template>\r\n","import {\r\n computed,\r\n shallowRef,\r\n onMounted,\r\n onUnmounted,\r\n type ComputedRef,\r\n} from 'vue'\r\nimport { ServerModeDriveController } from '@useupup/core/internal'\r\nimport type { ServerModeProvider, ServerDriveFile } from '@useupup/core'\r\nimport { useUploaderRuntime } from '../context/uploader-context'\r\n\r\nexport type { ServerModeProvider, ServerDriveFile }\r\n\r\ntype ServerDriveSnapshot = ReturnType<ServerModeDriveController['getSnapshot']>\r\n\r\ninterface UseServerModeDriveReturn {\r\n state: ComputedRef<ServerDriveSnapshot['state']>\r\n folderId: ComputedRef<ServerDriveSnapshot['folderId']>\r\n setFolderId: (id: string | undefined) => void\r\n search: ComputedRef<ServerDriveSnapshot['search']>\r\n setSearch: (s: string) => void\r\n refresh: ServerModeDriveController['refresh']\r\n transfer: ServerModeDriveController['transfer']\r\n startAuth: ServerModeDriveController['startAuth']\r\n}\r\n\r\nexport function useServerModeDrive(\r\n provider: ServerModeProvider,\r\n): UseServerModeDriveReturn {\r\n const { serverUrl } = useUploaderRuntime()\r\n const controller = new ServerModeDriveController({\r\n provider,\r\n serverUrl: () => serverUrl,\r\n })\r\n\r\n const snap = shallowRef(controller.getSnapshot())\r\n let unsub: (() => void) | null = null\r\n onMounted(() => {\r\n unsub = controller.subscribe(() => {\r\n snap.value = controller.getSnapshot()\r\n })\r\n controller.init()\r\n })\r\n onUnmounted(() => {\r\n controller.destroy()\r\n unsub?.()\r\n })\r\n\r\n return {\r\n state: computed(() => snap.value.state),\r\n folderId: computed(() => snap.value.folderId),\r\n setFolderId(id: string | undefined) {\r\n controller.setFolderId(id)\r\n void controller.refresh()\r\n },\r\n search: computed(() => snap.value.search),\r\n setSearch(s: string) {\r\n controller.setSearch(s)\r\n void controller.refresh()\r\n },\r\n refresh: opts => controller.refresh(opts),\r\n transfer: file => controller.transfer(file),\r\n startAuth: () => {\r\n controller.startAuth()\r\n },\r\n }\r\n}\r\n","<script setup lang=\"ts\">\r\nimport { type DriveBrowserError, formatUiMessage as t } from '@useupup/core'\r\nimport { cn } from '@useupup/core/internal'\r\nimport { useUploaderI18n, useUploaderTheme } from '../../context/uploader-context'\r\nimport SourceViewContainer from './SourceViewContainer.vue'\r\n\r\nconst props = withDefaults(defineProps<{\r\n providerName: string\r\n onRetry: () => void\r\n error?: DriveBrowserError | undefined\r\n dataUpupSlot?: string\r\n}>(), {\r\n dataUpupSlot: 'drive-auth-fallback',\r\n})\r\n\r\nconst { isDark: dark, slotOverrides: slotClasses } = useUploaderTheme()\r\nconst { translations: tr } = useUploaderI18n()\r\n</script>\r\n\r\n<template>\r\n <SourceViewContainer :data-upup-slot=\"props.dataUpupSlot\">\r\n <div class=\"upup-flex upup-h-full upup-w-full upup-flex-col upup-items-center upup-justify-center upup-gap-4 upup-p-6 upup-text-center\">\r\n <p\r\n v-if=\"!!props.error\"\r\n data-testid=\"upup-drive-error\"\r\n data-upup-slot=\"drive-error\"\r\n role=\"alert\"\r\n class=\"upup-p-4 upup-text-sm upup-text-red-600 dark:upup-text-red-400\"\r\n >\r\n {{ t(tr.driveLoadError, { message: props.error.message }) }}\r\n </p>\r\n <p\r\n :class=\"cn(\r\n 'upup-text-sm upup-text-[#333]',\r\n {\r\n 'upup-text-[#FAFAFA] dark:upup-text-[#FAFAFA]': dark,\r\n },\r\n slotClasses.sourceView,\r\n )\"\r\n >\r\n {{ t(tr.authenticatePrompt, { provider: props.providerName }) }}\r\n </p>\r\n <button\r\n type=\"button\"\r\n :class=\"cn(\r\n 'upup-rounded-md upup-bg-[#0ea5e9] upup-px-4 upup-py-2 upup-text-sm upup-font-medium upup-text-white upup-transition-all upup-duration-300 hover:upup-bg-[#0284c7]',\r\n {\r\n 'upup-bg-[#38bdf8] hover:upup-bg-[#0ea5e9] dark:upup-bg-[#38bdf8] dark:hover:upup-bg-[#0ea5e9]': dark,\r\n },\r\n )\"\r\n @click=\"props.onRetry\"\r\n >\r\n {{ t(tr.signInWith, { provider: props.providerName }) }}\r\n </button>\r\n </div>\r\n </SourceViewContainer>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { type DriveBrowserError, formatUiMessage as t } from '@useupup/core'\r\nimport { cn } from '@useupup/core/internal'\r\nimport { useUploaderI18n, useUploaderTheme } from '../../context/uploader-context'\r\nimport SourceViewContainer from './SourceViewContainer.vue'\r\n\r\nconst props = withDefaults(defineProps<{\r\n providerName: string\r\n onRetry: () => void\r\n error?: DriveBrowserError | undefined\r\n dataUpupSlot?: string\r\n}>(), {\r\n dataUpupSlot: 'drive-auth-fallback',\r\n})\r\n\r\nconst { isDark: dark, slotOverrides: slotClasses } = useUploaderTheme()\r\nconst { translations: tr } = useUploaderI18n()\r\n</script>\r\n\r\n<template>\r\n <SourceViewContainer :data-upup-slot=\"props.dataUpupSlot\">\r\n <div class=\"upup-flex upup-h-full upup-w-full upup-flex-col upup-items-center upup-justify-center upup-gap-4 upup-p-6 upup-text-center\">\r\n <p\r\n v-if=\"!!props.error\"\r\n data-testid=\"upup-drive-error\"\r\n data-upup-slot=\"drive-error\"\r\n role=\"alert\"\r\n class=\"upup-p-4 upup-text-sm upup-text-red-600 dark:upup-text-red-400\"\r\n >\r\n {{ t(tr.driveLoadError, { message: props.error.message }) }}\r\n </p>\r\n <p\r\n :class=\"cn(\r\n 'upup-text-sm upup-text-[#333]',\r\n {\r\n 'upup-text-[#FAFAFA] dark:upup-text-[#FAFAFA]': dark,\r\n },\r\n slotClasses.sourceView,\r\n )\"\r\n >\r\n {{ t(tr.authenticatePrompt, { provider: props.providerName }) }}\r\n </p>\r\n <button\r\n type=\"button\"\r\n :class=\"cn(\r\n 'upup-rounded-md upup-bg-[#0ea5e9] upup-px-4 upup-py-2 upup-text-sm upup-font-medium upup-text-white upup-transition-all upup-duration-300 hover:upup-bg-[#0284c7]',\r\n {\r\n 'upup-bg-[#38bdf8] hover:upup-bg-[#0ea5e9] dark:upup-bg-[#38bdf8] dark:hover:upup-bg-[#0ea5e9]': dark,\r\n },\r\n )\"\r\n @click=\"props.onRetry\"\r\n >\r\n {{ t(tr.signInWith, { provider: props.providerName }) }}\r\n </button>\r\n </div>\r\n </SourceViewContainer>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { ref, computed } from 'vue'\r\nimport {\r\n type DriveBrowserError,\r\n type DriveFile,\r\n type DriveFolder,\r\n type DriveUser,\r\n formatUiMessage as t,\r\n pluralUiMessage as plural,\r\n} from '@useupup/core'\r\nimport {\r\n useUploaderI18n,\r\n useUploaderOptions,\r\n useUploaderTheme,\r\n} from '../../context/uploader-context'\r\nimport { searchDriveFiles } from '@useupup/core/internal'\r\nimport { cn } from '@useupup/core/internal'\r\nimport SourceViewContainer from './SourceViewContainer.vue'\r\nimport DriveBrowserHeader from './DriveBrowserHeader.vue'\r\nimport DriveBrowserItem from './DriveBrowserItem.vue'\r\n\r\nconst props = withDefaults(defineProps<{\r\n isClickLoading?: boolean\r\n driveFiles?: DriveFolder | undefined\r\n path: DriveFolder[]\r\n setPath: (newPath: DriveFolder[]) => void\r\n user?: DriveUser | undefined\r\n handleSignOut: () => Promise<void>\r\n handleClick: (file: DriveFile) => void | Promise<void>\r\n selectedFiles: DriveFile[]\r\n showLoader: boolean\r\n handleSubmit: () => Promise<void>\r\n handleCancelDownload: () => void\r\n onSelectCurrentFolder?: () => Promise<void> | void\r\n error?: DriveBrowserError | undefined\r\n hasMore?: boolean\r\n isLoadingMore?: boolean\r\n loadMore?: () => void | Promise<void>\r\n dataUpupSlot?: string\r\n}>(), {\r\n isClickLoading: false,\r\n hasMore: false,\r\n isLoadingMore: false,\r\n dataUpupSlot: 'drive-browser',\r\n})\r\n\r\nconst { allowedFileTypes, icons } = useUploaderOptions()\r\nconst { isDark: dark, slotOverrides: slotClasses } = useUploaderTheme()\r\nconst { translations: tr } = useUploaderI18n()\r\nconst searchTerm = ref('')\r\n\r\nfunction filterItems(item: DriveFile, accept: string) {\r\n if (item.isFolder) return true\r\n if (!accept || accept === '*') return true\r\n return accept.split(',').some(pattern => {\r\n const p = pattern.trim()\r\n if (p.startsWith('.')) return item.name.endsWith(p)\r\n if (p.endsWith('/*')) return item.mimeType.startsWith(p.replace('/*', '/'))\r\n return item.mimeType === p\r\n })\r\n}\r\n\r\nconst items = computed(() =>\r\n props.path[props.path.length - 1]?.children?.filter(\r\n item => filterItems(item, allowedFileTypes),\r\n ),\r\n)\r\n\r\nconst displayedItems = computed(() =>\r\n searchDriveFiles(items.value ?? [], searchTerm.value) || [],\r\n)\r\n\r\n// error short-circuits the perpetual loader — the exact F-123/F-124 symptom.\r\nconst isLoading = computed(() => !props.error && (props.isClickLoading || !props.driveFiles))\r\n\r\nfunction noopClick() { /* disabled click */ }\r\n</script>\r\n\r\n<template>\r\n <SourceViewContainer :is-loading=\"isLoading\" :data-upup-slot=\"props.dataUpupSlot\">\r\n <component :is=\"icons.LoaderIcon\" v-if=\"isLoading\" />\r\n <template v-else>\r\n <div data-testid=\"upup-drive-browser\" class=\"upup-grid upup-h-full upup-w-full upup-grid-rows-[auto,1fr,auto] upup-overflow-auto\">\r\n <DriveBrowserHeader\r\n :show-search=\"!!items?.length\"\r\n :path=\"props.path\"\r\n :set-path=\"props.setPath\"\r\n :search-term=\"searchTerm\"\r\n :on-search=\"(v: string) => searchTerm = v\"\r\n :user=\"props.user\"\r\n :handle-sign-out=\"props.handleSignOut\"\r\n />\r\n <template v-if=\"!!props.path\">\r\n <div\r\n :class=\"cn(\r\n 'upup-h-full upup-overflow-y-auto upup-pt-2',\r\n {\r\n 'upup-text-[#fafafa] dark:upup-text-[#fafafa]': dark,\r\n },\r\n slotClasses.driveBody,\r\n )\"\r\n >\r\n <template v-if=\"!!props.error\">\r\n <div class=\"upup-flex upup-h-full upup-flex-col upup-items-center upup-justify-center upup-px-6 upup-text-center\">\r\n <p\r\n data-testid=\"upup-drive-error\"\r\n data-upup-slot=\"drive-error\"\r\n role=\"alert\"\r\n class=\"upup-text-sm upup-text-red-600 dark:upup-text-red-400\"\r\n >\r\n {{ t(tr.driveLoadError, { message: props.error.message }) }}\r\n </p>\r\n </div>\r\n </template>\r\n <template v-if=\"!!displayedItems.length\">\r\n <ul class=\"upup-p-2\">\r\n <DriveBrowserItem\r\n v-for=\"file in displayedItems\"\r\n :key=\"file.id\"\r\n :file=\"file\"\r\n :handle-click=\"props.isClickLoading || props.showLoader ? noopClick : props.handleClick\"\r\n :selected-files=\"props.selectedFiles\"\r\n />\r\n </ul>\r\n </template>\r\n <template v-if=\"!displayedItems.length && !props.error\">\r\n <div class=\"upup-flex upup-h-full upup-flex-col upup-items-center upup-justify-center\">\r\n <p class=\"upup-text-xs upup-opacity-70\">\r\n {{ tr.noAcceptedFilesFound }}\r\n </p>\r\n </div>\r\n </template>\r\n <template v-if=\"!!props.hasMore\">\r\n <button\r\n data-testid=\"upup-drive-load-more\"\r\n data-upup-slot=\"drive-load-more\"\r\n class=\"upup-mx-auto upup-my-2 upup-block upup-rounded-md upup-px-3 upup-py-1.5 upup-text-sm upup-text-[#0284c7] disabled:upup-opacity-50\"\r\n :disabled=\"props.isLoadingMore\"\r\n @click=\"props.loadMore?.()\"\r\n >\r\n {{ props.isLoadingMore ? tr.loading : tr.loadMore }}\r\n </button>\r\n </template>\r\n </div>\r\n </template>\r\n\r\n <template v-if=\"(!!props.selectedFiles.length || !!props.onSelectCurrentFolder) && !props.error\">\r\n <div\r\n :class=\"cn(\r\n 'upup-flex upup-origin-bottom upup-items-center upup-justify-start upup-gap-4 upup-border-t upup-px-3 upup-py-2',\r\n dark\r\n ? 'upup-border-white/[0.08] upup-text-[#fafafa]'\r\n : 'upup-border-black/[0.06]',\r\n slotClasses.driveFooter,\r\n )\"\r\n >\r\n <template v-if=\"!!props.onSelectCurrentFolder\">\r\n <button\r\n :class=\"cn(\r\n 'upup-rounded-md upup-bg-transparent upup-px-3 upup-py-2 upup-text-sm upup-font-medium upup-text-[#0284c7] upup-transition-all upup-duration-300',\r\n {\r\n 'upup-text-[#38bdf8] dark:upup-text-[#38bdf8]': dark,\r\n },\r\n )\"\r\n :disabled=\"props.showLoader\"\r\n @click=\"props.onSelectCurrentFolder?.()\"\r\n >\r\n {{ tr.selectThisFolder }}\r\n </button>\r\n </template>\r\n <button\r\n :class=\"cn(\r\n 'upup-rounded-md upup-bg-[#0ea5e9] upup-px-3 upup-py-2 upup-text-sm upup-font-medium upup-text-white upup-transition-all upup-duration-300',\r\n {\r\n 'upup-animate-pulse': props.showLoader,\r\n 'upup-bg-[#38bdf8] dark:upup-bg-[#38bdf8]': dark,\r\n },\r\n slotClasses.driveAddFilesButton,\r\n )\"\r\n :disabled=\"props.showLoader\"\r\n @click=\"props.handleSubmit\"\r\n >\r\n {{ t(\r\n plural(\r\n tr,\r\n 'addFiles',\r\n props.selectedFiles.length,\r\n ),\r\n { count: props.selectedFiles.length },\r\n ) }}\r\n </button>\r\n <button\r\n :class=\"cn(\r\n 'upup-ml-auto upup-rounded-md upup-p-1 upup-text-sm upup-text-[#0284c7] upup-transition-all upup-duration-300',\r\n {\r\n 'upup-text-[#38bdf8] dark:upup-text-[#38bdf8]': dark,\r\n },\r\n slotClasses.driveCancelFilesButton,\r\n )\"\r\n :disabled=\"props.showLoader\"\r\n @click=\"props.handleCancelDownload\"\r\n >\r\n {{ tr.cancel }}\r\n </button>\r\n </div>\r\n </template>\r\n </div>\r\n </template>\r\n </SourceViewContainer>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { ref, computed } from 'vue'\r\nimport {\r\n type DriveBrowserError,\r\n type DriveFile,\r\n type DriveFolder,\r\n type DriveUser,\r\n formatUiMessage as t,\r\n pluralUiMessage as plural,\r\n} from '@useupup/core'\r\nimport {\r\n useUploaderI18n,\r\n useUploaderOptions,\r\n useUploaderTheme,\r\n} from '../../context/uploader-context'\r\nimport { searchDriveFiles } from '@useupup/core/internal'\r\nimport { cn } from '@useupup/core/internal'\r\nimport SourceViewContainer from './SourceViewContainer.vue'\r\nimport DriveBrowserHeader from './DriveBrowserHeader.vue'\r\nimport DriveBrowserItem from './DriveBrowserItem.vue'\r\n\r\nconst props = withDefaults(defineProps<{\r\n isClickLoading?: boolean\r\n driveFiles?: DriveFolder | undefined\r\n path: DriveFolder[]\r\n setPath: (newPath: DriveFolder[]) => void\r\n user?: DriveUser | undefined\r\n handleSignOut: () => Promise<void>\r\n handleClick: (file: DriveFile) => void | Promise<void>\r\n selectedFiles: DriveFile[]\r\n showLoader: boolean\r\n handleSubmit: () => Promise<void>\r\n handleCancelDownload: () => void\r\n onSelectCurrentFolder?: () => Promise<void> | void\r\n error?: DriveBrowserError | undefined\r\n hasMore?: boolean\r\n isLoadingMore?: boolean\r\n loadMore?: () => void | Promise<void>\r\n dataUpupSlot?: string\r\n}>(), {\r\n isClickLoading: false,\r\n hasMore: false,\r\n isLoadingMore: false,\r\n dataUpupSlot: 'drive-browser',\r\n})\r\n\r\nconst { allowedFileTypes, icons } = useUploaderOptions()\r\nconst { isDark: dark, slotOverrides: slotClasses } = useUploaderTheme()\r\nconst { translations: tr } = useUploaderI18n()\r\nconst searchTerm = ref('')\r\n\r\nfunction filterItems(item: DriveFile, accept: string) {\r\n if (item.isFolder) return true\r\n if (!accept || accept === '*') return true\r\n return accept.split(',').some(pattern => {\r\n const p = pattern.trim()\r\n if (p.startsWith('.')) return item.name.endsWith(p)\r\n if (p.endsWith('/*')) return item.mimeType.startsWith(p.replace('/*', '/'))\r\n return item.mimeType === p\r\n })\r\n}\r\n\r\nconst items = computed(() =>\r\n props.path[props.path.length - 1]?.children?.filter(\r\n item => filterItems(item, allowedFileTypes),\r\n ),\r\n)\r\n\r\nconst displayedItems = computed(() =>\r\n searchDriveFiles(items.value ?? [], searchTerm.value) || [],\r\n)\r\n\r\n// error short-circuits the perpetual loader — the exact F-123/F-124 symptom.\r\nconst isLoading = computed(() => !props.error && (props.isClickLoading || !props.driveFiles))\r\n\r\nfunction noopClick() { /* disabled click */ }\r\n</script>\r\n\r\n<template>\r\n <SourceViewContainer :is-loading=\"isLoading\" :data-upup-slot=\"props.dataUpupSlot\">\r\n <component :is=\"icons.LoaderIcon\" v-if=\"isLoading\" />\r\n <template v-else>\r\n <div data-testid=\"upup-drive-browser\" class=\"upup-grid upup-h-full upup-w-full upup-grid-rows-[auto,1fr,auto] upup-overflow-auto\">\r\n <DriveBrowserHeader\r\n :show-search=\"!!items?.length\"\r\n :path=\"props.path\"\r\n :set-path=\"props.setPath\"\r\n :search-term=\"searchTerm\"\r\n :on-search=\"(v: string) => searchTerm = v\"\r\n :user=\"props.user\"\r\n :handle-sign-out=\"props.handleSignOut\"\r\n />\r\n <template v-if=\"!!props.path\">\r\n <div\r\n :class=\"cn(\r\n 'upup-h-full upup-overflow-y-auto upup-pt-2',\r\n {\r\n 'upup-text-[#fafafa] dark:upup-text-[#fafafa]': dark,\r\n },\r\n slotClasses.driveBody,\r\n )\"\r\n >\r\n <template v-if=\"!!props.error\">\r\n <div class=\"upup-flex upup-h-full upup-flex-col upup-items-center upup-justify-center upup-px-6 upup-text-center\">\r\n <p\r\n data-testid=\"upup-drive-error\"\r\n data-upup-slot=\"drive-error\"\r\n role=\"alert\"\r\n class=\"upup-text-sm upup-text-red-600 dark:upup-text-red-400\"\r\n >\r\n {{ t(tr.driveLoadError, { message: props.error.message }) }}\r\n </p>\r\n </div>\r\n </template>\r\n <template v-if=\"!!displayedItems.length\">\r\n <ul class=\"upup-p-2\">\r\n <DriveBrowserItem\r\n v-for=\"file in displayedItems\"\r\n :key=\"file.id\"\r\n :file=\"file\"\r\n :handle-click=\"props.isClickLoading || props.showLoader ? noopClick : props.handleClick\"\r\n :selected-files=\"props.selectedFiles\"\r\n />\r\n </ul>\r\n </template>\r\n <template v-if=\"!displayedItems.length && !props.error\">\r\n <div class=\"upup-flex upup-h-full upup-flex-col upup-items-center upup-justify-center\">\r\n <p class=\"upup-text-xs upup-opacity-70\">\r\n {{ tr.noAcceptedFilesFound }}\r\n </p>\r\n </div>\r\n </template>\r\n <template v-if=\"!!props.hasMore\">\r\n <button\r\n data-testid=\"upup-drive-load-more\"\r\n data-upup-slot=\"drive-load-more\"\r\n class=\"upup-mx-auto upup-my-2 upup-block upup-rounded-md upup-px-3 upup-py-1.5 upup-text-sm upup-text-[#0284c7] disabled:upup-opacity-50\"\r\n :disabled=\"props.isLoadingMore\"\r\n @click=\"props.loadMore?.()\"\r\n >\r\n {{ props.isLoadingMore ? tr.loading : tr.loadMore }}\r\n </button>\r\n </template>\r\n </div>\r\n </template>\r\n\r\n <template v-if=\"(!!props.selectedFiles.length || !!props.onSelectCurrentFolder) && !props.error\">\r\n <div\r\n :class=\"cn(\r\n 'upup-flex upup-origin-bottom upup-items-center upup-justify-start upup-gap-4 upup-border-t upup-px-3 upup-py-2',\r\n dark\r\n ? 'upup-border-white/[0.08] upup-text-[#fafafa]'\r\n : 'upup-border-black/[0.06]',\r\n slotClasses.driveFooter,\r\n )\"\r\n >\r\n <template v-if=\"!!props.onSelectCurrentFolder\">\r\n <button\r\n :class=\"cn(\r\n 'upup-rounded-md upup-bg-transparent upup-px-3 upup-py-2 upup-text-sm upup-font-medium upup-text-[#0284c7] upup-transition-all upup-duration-300',\r\n {\r\n 'upup-text-[#38bdf8] dark:upup-text-[#38bdf8]': dark,\r\n },\r\n )\"\r\n :disabled=\"props.showLoader\"\r\n @click=\"props.onSelectCurrentFolder?.()\"\r\n >\r\n {{ tr.selectThisFolder }}\r\n </button>\r\n </template>\r\n <button\r\n :class=\"cn(\r\n 'upup-rounded-md upup-bg-[#0ea5e9] upup-px-3 upup-py-2 upup-text-sm upup-font-medium upup-text-white upup-transition-all upup-duration-300',\r\n {\r\n 'upup-animate-pulse': props.showLoader,\r\n 'upup-bg-[#38bdf8] dark:upup-bg-[#38bdf8]': dark,\r\n },\r\n slotClasses.driveAddFilesButton,\r\n )\"\r\n :disabled=\"props.showLoader\"\r\n @click=\"props.handleSubmit\"\r\n >\r\n {{ t(\r\n plural(\r\n tr,\r\n 'addFiles',\r\n props.selectedFiles.length,\r\n ),\r\n { count: props.selectedFiles.length },\r\n ) }}\r\n </button>\r\n <button\r\n :class=\"cn(\r\n 'upup-ml-auto upup-rounded-md upup-p-1 upup-text-sm upup-text-[#0284c7] upup-transition-all upup-duration-300',\r\n {\r\n 'upup-text-[#38bdf8] dark:upup-text-[#38bdf8]': dark,\r\n },\r\n slotClasses.driveCancelFilesButton,\r\n )\"\r\n :disabled=\"props.showLoader\"\r\n @click=\"props.handleCancelDownload\"\r\n >\r\n {{ tr.cancel }}\r\n </button>\r\n </div>\r\n </template>\r\n </div>\r\n </template>\r\n </SourceViewContainer>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { computed, nextTick, ref, watch } from 'vue'\r\nimport { type DriveFolder, type DriveUser } from '@useupup/core'\r\nimport {\r\n useUploaderI18n,\r\n useUploaderSource,\r\n useUploaderTheme,\r\n} from '../../context/uploader-context'\r\nimport { useSourceViewHeaderExtra } from '../../context/source-view-header-extra'\r\nimport { cn } from '@useupup/core/internal'\r\nimport Icon from '../Icon'\r\n\r\nconst props = defineProps<{\r\n path: DriveFolder[]\r\n setPath: (newPath: DriveFolder[]) => void\r\n handleSignOut: () => Promise<void>\r\n showSearch: boolean\r\n searchTerm: string\r\n onSearch: (value: string) => void\r\n user?: DriveUser | undefined\r\n}>()\r\n\r\nconst { setActiveSource } = useUploaderSource()\r\nconst { translations: tr } = useUploaderI18n()\r\nconst { isDark: dark, slotOverrides: slotClasses } = useUploaderTheme()\r\n\r\nconst headerExtraHostRef = useSourceViewHeaderExtra()\r\nconst headerExtraHost = computed(() => headerExtraHostRef?.value ?? null)\r\n\r\n// Once navigated into a folder we show a Back affordance + the current folder\r\n// name, not a full breadcrumb trail (long provider folder names blew the row\r\n// up, and multi-level jumps weren't worth the fragility).\r\nconst navigated = computed(() => props.path.length > 1)\r\nconst currentFolder = computed(() => props.path[props.path.length - 1])\r\nconst hasFilter = computed(() => props.searchTerm.trim().length > 0)\r\n\r\n// Collapsed/expanded search lives here; the term itself stays in DriveBrowser.\r\nconst searchOpen = ref(false)\r\nconst searchInputRef = ref<HTMLInputElement | null>(null)\r\n\r\n// Focus the field the moment it expands.\r\nwatch(searchOpen, open => {\r\n if (open) void nextTick(() => searchInputRef.value?.focus())\r\n})\r\n\r\nfunction onLogout() {\r\n void props.handleSignOut()\r\n setActiveSource(undefined)\r\n}\r\n</script>\r\n\r\n<template>\r\n <div v-if=\"props.user\" data-upup-slot=\"drive-browser-header\">\r\n <!-- Account controls live in the SourceView header row (portal), next\r\n to Back, separated by a hairline — not in their own strip. -->\r\n <Teleport v-if=\"headerExtraHost\" :to=\"headerExtraHost\">\r\n <div\r\n class=\"upup-relative upup-flex upup-h-6 upup-w-6 upup-items-center upup-justify-center upup-overflow-hidden upup-rounded-full\"\r\n >\r\n <img\r\n v-if=\"!!props.user.picture\"\r\n :alt=\"props.user.name\"\r\n :src=\"props.user.picture\"\r\n class=\"upup-bg-center upup-object-cover\"\r\n />\r\n <Icon v-else name=\"user\" class=\"upup-text-xl\" />\r\n </div>\r\n <button\r\n :class=\"\r\n cn(\r\n 'upup-hover:upup-underline upup-text-xs upup-font-medium upup-text-[#0284c7]',\r\n {\r\n 'upup-text-[#38bdf8] dark:upup-text-[#38bdf8]': dark,\r\n },\r\n slotClasses.driveLogoutButton,\r\n )\r\n \"\r\n @click=\"onLogout\"\r\n >\r\n {{ tr.logOut }}\r\n </button>\r\n <span\r\n aria-hidden=\"true\"\r\n :class=\"\r\n cn(\r\n 'upup-h-4 upup-w-px',\r\n dark ? 'upup-bg-white/15' : 'upup-bg-black/15',\r\n )\r\n \"\r\n />\r\n </Teleport>\r\n <div\r\n v-if=\"props.showSearch || navigated\"\r\n :class=\"\r\n cn(\r\n 'upup-flex upup-items-center upup-gap-2.5 upup-px-3 upup-py-2 upup-text-xs upup-font-medium upup-text-[#333]',\r\n {\r\n 'upup-text-[#FAFAFA] dark:upup-text-[#FAFAFA]': dark,\r\n },\r\n slotClasses.driveHeader,\r\n )\r\n \"\r\n >\r\n <button\r\n v-if=\"navigated\"\r\n type=\"button\"\r\n data-testid=\"upup-drive-back\"\r\n data-upup-slot=\"drive-back\"\r\n :aria-label=\"tr.overlayBack\"\r\n :class=\"\r\n cn(\r\n 'upup-fx-hover-lift upup-fx-press upup-flex upup-h-7 upup-w-7 upup-shrink-0 upup-items-center upup-justify-center upup-rounded-lg',\r\n dark\r\n ? 'upup-text-[#e2e8f0] hover:upup-bg-white/[0.08]'\r\n : 'upup-text-[#334155] hover:upup-bg-black/[0.05]',\r\n )\r\n \"\r\n @click=\"props.setPath(props.path.slice(0, -1))\"\r\n >\r\n <Icon name=\"chevron-left\" />\r\n </button>\r\n <span\r\n v-if=\"navigated && !searchOpen\"\r\n data-upup-slot=\"drive-current-folder\"\r\n :title=\"currentFolder?.name\"\r\n class=\"upup-min-w-0 upup-flex-1 upup-truncate upup-font-medium\"\r\n >\r\n {{ currentFolder?.name }}\r\n </span>\r\n <button\r\n v-if=\"navigated && props.showSearch && !searchOpen\"\r\n type=\"button\"\r\n data-testid=\"upup-drive-search-toggle\"\r\n data-upup-slot=\"drive-search-toggle\"\r\n :aria-label=\"tr.search\"\r\n :aria-expanded=\"false\"\r\n :class=\"\r\n cn(\r\n 'upup-fx-hover-lift upup-fx-press upup-ml-auto upup-flex upup-h-7 upup-w-7 upup-shrink-0 upup-items-center upup-justify-center upup-rounded-lg',\r\n hasFilter\r\n ? 'upup-text-[#0ea5e9]'\r\n : dark\r\n ? 'upup-text-[#94a3b8] hover:upup-bg-white/[0.08]'\r\n : 'upup-text-[#64748b] hover:upup-bg-black/[0.05]',\r\n )\r\n \"\r\n @click=\"searchOpen = true\"\r\n >\r\n <Icon name=\"search\" />\r\n </button>\r\n <div\r\n v-if=\"props.showSearch && (!navigated || searchOpen)\"\r\n :class=\"\r\n cn(\r\n 'upup-relative upup-min-w-0 upup-flex-1',\r\n navigated && 'upup-fx-search-expand',\r\n slotClasses.driveSearchContainer,\r\n )\r\n \"\r\n >\r\n <input\r\n ref=\"searchInputRef\"\r\n type=\"search\"\r\n name=\"upup-drive-search\"\r\n data-testid=\"upup-drive-search-input\"\r\n data-upup-slot=\"drive-search-input\"\r\n :aria-label=\"tr.search\"\r\n :class=\"\r\n cn(\r\n 'upup-w-full upup-rounded-lg upup-px-3 upup-py-1.5 upup-pl-8 upup-text-xs upup-outline-none upup-ring-1 upup-transition-shadow focus:upup-ring-2 focus:upup-ring-[#38bdf8]',\r\n dark\r\n ? 'upup-bg-white/[0.06] upup-text-[#e2e8f0] upup-ring-white/[0.1] placeholder:upup-text-[#64748b]'\r\n : 'upup-bg-white upup-text-[#0f172a] upup-ring-black/[0.08] placeholder:upup-text-[#94a3b8]',\r\n slotClasses.driveSearchInput,\r\n )\r\n \"\r\n :placeholder=\"tr.search\"\r\n :value=\"props.searchTerm\"\r\n @input=\"\r\n props.onSearch(($event.target as HTMLInputElement).value)\r\n \"\r\n @keydown.esc=\"searchOpen = false\"\r\n @blur=\"\r\n () => {\r\n if (!props.searchTerm) searchOpen = false\r\n }\r\n \"\r\n />\r\n <Icon\r\n name=\"search\"\r\n class=\"upup-absolute upup-left-2.5 upup-top-1/2 upup--translate-y-1/2 upup-text-[#939393]\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { computed, nextTick, ref, watch } from 'vue'\r\nimport { type DriveFolder, type DriveUser } from '@useupup/core'\r\nimport {\r\n useUploaderI18n,\r\n useUploaderSource,\r\n useUploaderTheme,\r\n} from '../../context/uploader-context'\r\nimport { useSourceViewHeaderExtra } from '../../context/source-view-header-extra'\r\nimport { cn } from '@useupup/core/internal'\r\nimport Icon from '../Icon'\r\n\r\nconst props = defineProps<{\r\n path: DriveFolder[]\r\n setPath: (newPath: DriveFolder[]) => void\r\n handleSignOut: () => Promise<void>\r\n showSearch: boolean\r\n searchTerm: string\r\n onSearch: (value: string) => void\r\n user?: DriveUser | undefined\r\n}>()\r\n\r\nconst { setActiveSource } = useUploaderSource()\r\nconst { translations: tr } = useUploaderI18n()\r\nconst { isDark: dark, slotOverrides: slotClasses } = useUploaderTheme()\r\n\r\nconst headerExtraHostRef = useSourceViewHeaderExtra()\r\nconst headerExtraHost = computed(() => headerExtraHostRef?.value ?? null)\r\n\r\n// Once navigated into a folder we show a Back affordance + the current folder\r\n// name, not a full breadcrumb trail (long provider folder names blew the row\r\n// up, and multi-level jumps weren't worth the fragility).\r\nconst navigated = computed(() => props.path.length > 1)\r\nconst currentFolder = computed(() => props.path[props.path.length - 1])\r\nconst hasFilter = computed(() => props.searchTerm.trim().length > 0)\r\n\r\n// Collapsed/expanded search lives here; the term itself stays in DriveBrowser.\r\nconst searchOpen = ref(false)\r\nconst searchInputRef = ref<HTMLInputElement | null>(null)\r\n\r\n// Focus the field the moment it expands.\r\nwatch(searchOpen, open => {\r\n if (open) void nextTick(() => searchInputRef.value?.focus())\r\n})\r\n\r\nfunction onLogout() {\r\n void props.handleSignOut()\r\n setActiveSource(undefined)\r\n}\r\n</script>\r\n\r\n<template>\r\n <div v-if=\"props.user\" data-upup-slot=\"drive-browser-header\">\r\n <!-- Account controls live in the SourceView header row (portal), next\r\n to Back, separated by a hairline — not in their own strip. -->\r\n <Teleport v-if=\"headerExtraHost\" :to=\"headerExtraHost\">\r\n <div\r\n class=\"upup-relative upup-flex upup-h-6 upup-w-6 upup-items-center upup-justify-center upup-overflow-hidden upup-rounded-full\"\r\n >\r\n <img\r\n v-if=\"!!props.user.picture\"\r\n :alt=\"props.user.name\"\r\n :src=\"props.user.picture\"\r\n class=\"upup-bg-center upup-object-cover\"\r\n />\r\n <Icon v-else name=\"user\" class=\"upup-text-xl\" />\r\n </div>\r\n <button\r\n :class=\"\r\n cn(\r\n 'upup-hover:upup-underline upup-text-xs upup-font-medium upup-text-[#0284c7]',\r\n {\r\n 'upup-text-[#38bdf8] dark:upup-text-[#38bdf8]': dark,\r\n },\r\n slotClasses.driveLogoutButton,\r\n )\r\n \"\r\n @click=\"onLogout\"\r\n >\r\n {{ tr.logOut }}\r\n </button>\r\n <span\r\n aria-hidden=\"true\"\r\n :class=\"\r\n cn(\r\n 'upup-h-4 upup-w-px',\r\n dark ? 'upup-bg-white/15' : 'upup-bg-black/15',\r\n )\r\n \"\r\n />\r\n </Teleport>\r\n <div\r\n v-if=\"props.showSearch || navigated\"\r\n :class=\"\r\n cn(\r\n 'upup-flex upup-items-center upup-gap-2.5 upup-px-3 upup-py-2 upup-text-xs upup-font-medium upup-text-[#333]',\r\n {\r\n 'upup-text-[#FAFAFA] dark:upup-text-[#FAFAFA]': dark,\r\n },\r\n slotClasses.driveHeader,\r\n )\r\n \"\r\n >\r\n <button\r\n v-if=\"navigated\"\r\n type=\"button\"\r\n data-testid=\"upup-drive-back\"\r\n data-upup-slot=\"drive-back\"\r\n :aria-label=\"tr.overlayBack\"\r\n :class=\"\r\n cn(\r\n 'upup-fx-hover-lift upup-fx-press upup-flex upup-h-7 upup-w-7 upup-shrink-0 upup-items-center upup-justify-center upup-rounded-lg',\r\n dark\r\n ? 'upup-text-[#e2e8f0] hover:upup-bg-white/[0.08]'\r\n : 'upup-text-[#334155] hover:upup-bg-black/[0.05]',\r\n )\r\n \"\r\n @click=\"props.setPath(props.path.slice(0, -1))\"\r\n >\r\n <Icon name=\"chevron-left\" />\r\n </button>\r\n <span\r\n v-if=\"navigated && !searchOpen\"\r\n data-upup-slot=\"drive-current-folder\"\r\n :title=\"currentFolder?.name\"\r\n class=\"upup-min-w-0 upup-flex-1 upup-truncate upup-font-medium\"\r\n >\r\n {{ currentFolder?.name }}\r\n </span>\r\n <button\r\n v-if=\"navigated && props.showSearch && !searchOpen\"\r\n type=\"button\"\r\n data-testid=\"upup-drive-search-toggle\"\r\n data-upup-slot=\"drive-search-toggle\"\r\n :aria-label=\"tr.search\"\r\n :aria-expanded=\"false\"\r\n :class=\"\r\n cn(\r\n 'upup-fx-hover-lift upup-fx-press upup-ml-auto upup-flex upup-h-7 upup-w-7 upup-shrink-0 upup-items-center upup-justify-center upup-rounded-lg',\r\n hasFilter\r\n ? 'upup-text-[#0ea5e9]'\r\n : dark\r\n ? 'upup-text-[#94a3b8] hover:upup-bg-white/[0.08]'\r\n : 'upup-text-[#64748b] hover:upup-bg-black/[0.05]',\r\n )\r\n \"\r\n @click=\"searchOpen = true\"\r\n >\r\n <Icon name=\"search\" />\r\n </button>\r\n <div\r\n v-if=\"props.showSearch && (!navigated || searchOpen)\"\r\n :class=\"\r\n cn(\r\n 'upup-relative upup-min-w-0 upup-flex-1',\r\n navigated && 'upup-fx-search-expand',\r\n slotClasses.driveSearchContainer,\r\n )\r\n \"\r\n >\r\n <input\r\n ref=\"searchInputRef\"\r\n type=\"search\"\r\n name=\"upup-drive-search\"\r\n data-testid=\"upup-drive-search-input\"\r\n data-upup-slot=\"drive-search-input\"\r\n :aria-label=\"tr.search\"\r\n :class=\"\r\n cn(\r\n 'upup-w-full upup-rounded-lg upup-px-3 upup-py-1.5 upup-pl-8 upup-text-xs upup-outline-none upup-ring-1 upup-transition-shadow focus:upup-ring-2 focus:upup-ring-[#38bdf8]',\r\n dark\r\n ? 'upup-bg-white/[0.06] upup-text-[#e2e8f0] upup-ring-white/[0.1] placeholder:upup-text-[#64748b]'\r\n : 'upup-bg-white upup-text-[#0f172a] upup-ring-black/[0.08] placeholder:upup-text-[#94a3b8]',\r\n slotClasses.driveSearchInput,\r\n )\r\n \"\r\n :placeholder=\"tr.search\"\r\n :value=\"props.searchTerm\"\r\n @input=\"\r\n props.onSearch(($event.target as HTMLInputElement).value)\r\n \"\r\n @keydown.esc=\"searchOpen = false\"\r\n @blur=\"\r\n () => {\r\n if (!props.searchTerm) searchOpen = false\r\n }\r\n \"\r\n />\r\n <Icon\r\n name=\"search\"\r\n class=\"upup-absolute upup-left-2.5 upup-top-1/2 upup--translate-y-1/2 upup-text-[#939393]\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { computed } from 'vue'\r\nimport { type DriveFile } from '@useupup/core'\r\nimport { useUploaderTheme } from '../../context/uploader-context'\r\nimport { cn } from '@useupup/core/internal'\r\nimport DriveBrowserIcon from './DriveBrowserIcon.vue'\r\n\r\nconst props = defineProps<{\r\n file: DriveFile\r\n handleClick: (file: DriveFile) => void | Promise<void>\r\n selectedFiles: DriveFile[]\r\n}>()\r\n\r\nconst { isDark: dark, slotOverrides: slotClasses } = useUploaderTheme()\r\n\r\nconst isFolder = computed(() => props.file.isFolder)\r\nconst isFileSelected = computed(\r\n () => props.selectedFiles.filter(f => f.id === props.file.id).length,\r\n)\r\n</script>\r\n\r\n<template>\r\n <div\r\n data-upup-slot=\"drive-browser-item\"\r\n :class=\"cn(\r\n 'upup-fx-hover-lift upup-group upup-mb-1.5 upup-flex upup-cursor-pointer upup-items-center upup-justify-between upup-gap-2 upup-rounded-[11px] upup-px-3 upup-py-2.5 upup-ring-1',\r\n {\r\n 'upup-font-medium': isFolder,\r\n },\r\n isFileSelected\r\n ? dark\r\n ? 'upup-bg-[#0ea5e9]/10 upup-ring-[#38bdf8]/35'\r\n : 'upup-bg-[#0ea5e9]/10 upup-ring-[#0ea5e9]/40'\r\n : dark\r\n ? 'upup-bg-white/[0.04] upup-ring-white/[0.06] hover:upup-bg-white/[0.07]'\r\n : 'upup-bg-black/[0.03] upup-ring-black/[0.06] hover:upup-bg-black/[0.05]',\r\n {\r\n [slotClasses.driveItemContainerDefault!]:\r\n !isFileSelected &&\r\n slotClasses.driveItemContainerDefault,\r\n [slotClasses.driveItemContainerSelected!]:\r\n isFileSelected &&\r\n slotClasses.driveItemContainerSelected,\r\n },\r\n )\"\r\n @click=\"props.handleClick(props.file)\"\r\n >\r\n <div\r\n :class=\"cn(\r\n 'upup-flex upup-items-center upup-gap-2',\r\n slotClasses.driveItemContainerInner,\r\n )\"\r\n >\r\n <DriveBrowserIcon :file=\"props.file\" />\r\n <h1\r\n :class=\"cn(\r\n 'upup-text-wrap upup-break-all upup-text-xs',\r\n {\r\n 'upup-text-[#e0e0e0] dark:upup-text-[#e0e0e0]': dark,\r\n },\r\n slotClasses.driveItemInnerText,\r\n )\"\r\n >\r\n {{ props.file.name }}\r\n </h1>\r\n </div>\r\n </div>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { computed } from 'vue'\r\nimport { type DriveFile } from '@useupup/core'\r\nimport { useUploaderTheme } from '../../context/uploader-context'\r\nimport { cn } from '@useupup/core/internal'\r\nimport DriveBrowserIcon from './DriveBrowserIcon.vue'\r\n\r\nconst props = defineProps<{\r\n file: DriveFile\r\n handleClick: (file: DriveFile) => void | Promise<void>\r\n selectedFiles: DriveFile[]\r\n}>()\r\n\r\nconst { isDark: dark, slotOverrides: slotClasses } = useUploaderTheme()\r\n\r\nconst isFolder = computed(() => props.file.isFolder)\r\nconst isFileSelected = computed(\r\n () => props.selectedFiles.filter(f => f.id === props.file.id).length,\r\n)\r\n</script>\r\n\r\n<template>\r\n <div\r\n data-upup-slot=\"drive-browser-item\"\r\n :class=\"cn(\r\n 'upup-fx-hover-lift upup-group upup-mb-1.5 upup-flex upup-cursor-pointer upup-items-center upup-justify-between upup-gap-2 upup-rounded-[11px] upup-px-3 upup-py-2.5 upup-ring-1',\r\n {\r\n 'upup-font-medium': isFolder,\r\n },\r\n isFileSelected\r\n ? dark\r\n ? 'upup-bg-[#0ea5e9]/10 upup-ring-[#38bdf8]/35'\r\n : 'upup-bg-[#0ea5e9]/10 upup-ring-[#0ea5e9]/40'\r\n : dark\r\n ? 'upup-bg-white/[0.04] upup-ring-white/[0.06] hover:upup-bg-white/[0.07]'\r\n : 'upup-bg-black/[0.03] upup-ring-black/[0.06] hover:upup-bg-black/[0.05]',\r\n {\r\n [slotClasses.driveItemContainerDefault!]:\r\n !isFileSelected &&\r\n slotClasses.driveItemContainerDefault,\r\n [slotClasses.driveItemContainerSelected!]:\r\n isFileSelected &&\r\n slotClasses.driveItemContainerSelected,\r\n },\r\n )\"\r\n @click=\"props.handleClick(props.file)\"\r\n >\r\n <div\r\n :class=\"cn(\r\n 'upup-flex upup-items-center upup-gap-2',\r\n slotClasses.driveItemContainerInner,\r\n )\"\r\n >\r\n <DriveBrowserIcon :file=\"props.file\" />\r\n <h1\r\n :class=\"cn(\r\n 'upup-text-wrap upup-break-all upup-text-xs',\r\n {\r\n 'upup-text-[#e0e0e0] dark:upup-text-[#e0e0e0]': dark,\r\n },\r\n slotClasses.driveItemInnerText,\r\n )\"\r\n >\r\n {{ props.file.name }}\r\n </h1>\r\n </div>\r\n </div>\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { type DriveFile } from '@useupup/core'\r\nimport { cn, b64EncodeUnicode } from '@useupup/core/internal'\r\nimport { useUploaderTheme } from '../../context/uploader-context'\r\nimport Icon from '../Icon'\r\n\r\nconst props = defineProps<{ file: DriveFile }>()\r\nconst { isDark: dark } = useUploaderTheme()\r\n\r\nfunction handleImgError(e: Event) {\r\n const img = e.target as HTMLImageElement\r\n const svg = `<svg stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\" viewBox=\"0 0 24 24\" stroke-linecap=\"round\" stroke-linejoin=\"round\" height=\"1em\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M14 3v4a1 1 0 0 0 1 1h4\"></path><path d=\"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z\"></path></svg>`\r\n img.src = `data:image/svg+xml;base64,${b64EncodeUnicode(svg)}`\r\n img.onerror = null\r\n}\r\n</script>\r\n\r\n<template>\r\n <i v-if=\"props.file.isFolder\" class=\"upup-flex-grow upup-text-lg\">\r\n <!-- Amber filled folder in both themes — folders read\r\n unmistakably as folders. -->\r\n <Icon name=\"folder-filled\" class=\"upup-text-[#fbbf24]\" />\r\n </i>\r\n <i v-else-if=\"!props.file.thumbnail\" class=\"upup-flex-grow upup-text-lg\">\r\n <Icon\r\n name=\"file\"\r\n :class=\"cn({\r\n 'upup-text-[#6D6D6D] dark:upup-text-[#6D6D6D]': dark,\r\n })\"\r\n />\r\n </i>\r\n <img\r\n v-else\r\n :src=\"props.file.thumbnail\"\r\n :alt=\"props.file.name\"\r\n class=\"upup-h-5 upup-w-5 upup-flex-grow upup-rounded-md upup-shadow\"\r\n @error=\"handleImgError\"\r\n />\r\n</template>\r\n","<script setup lang=\"ts\">\r\nimport { type DriveFile } from '@useupup/core'\r\nimport { cn, b64EncodeUnicode } from '@useupup/core/internal'\r\nimport { useUploaderTheme } from '../../context/uploader-context'\r\nimport Icon from '../Icon'\r\n\r\nconst props = defineProps<{ file: DriveFile }>()\r\nconst { isDark: dark } = useUploaderTheme()\r\n\r\nfunction handleImgError(e: Event) {\r\n const img = e.target as HTMLImageElement\r\n const svg = `<svg stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\" viewBox=\"0 0 24 24\" stroke-linecap=\"round\" stroke-linejoin=\"round\" height=\"1em\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M14 3v4a1 1 0 0 0 1 1h4\"></path><path d=\"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z\"></path></svg>`\r\n img.src = `data:image/svg+xml;base64,${b64EncodeUnicode(svg)}`\r\n img.onerror = null\r\n}\r\n</script>\r\n\r\n<template>\r\n <i v-if=\"props.file.isFolder\" class=\"upup-flex-grow upup-text-lg\">\r\n <!-- Amber filled folder in both themes — folders read\r\n unmistakably as folders. -->\r\n <Icon name=\"folder-filled\" class=\"upup-text-[#fbbf24]\" />\r\n </i>\r\n <i v-else-if=\"!props.file.thumbnail\" class=\"upup-flex-grow upup-text-lg\">\r\n <Icon\r\n name=\"file\"\r\n :class=\"cn({\r\n 'upup-text-[#6D6D6D] dark:upup-text-[#6D6D6D]': dark,\r\n })\"\r\n />\r\n </i>\r\n <img\r\n v-else\r\n :src=\"props.file.thumbnail\"\r\n :alt=\"props.file.name\"\r\n class=\"upup-h-5 upup-w-5 upup-flex-grow upup-rounded-md upup-shadow\"\r\n @error=\"handleImgError\"\r\n />\r\n</template>\r\n"],"mappings":";;;;;;;;;;;;;;;;;;AACA,SAAS,KAAK,YAAAA,iBAAgB;;;AED9B;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEG;AACP,SAAS,iCAAiC;AAmBnC,SAAS,mBACZ,UACwB;AACxB,QAAM,EAAE,UAAU,IAAI,mBAAmB;AACzC,QAAM,aAAa,IAAI,0BAA0B;AAAA,IAC7C;AAAA,IACA,WAAW,MAAM;AAAA,EACrB,CAAC;AAED,QAAM,OAAO,WAAW,WAAW,YAAY,CAAC;AAChD,MAAI,QAA6B;AACjC,YAAU,MAAM;AACZ,YAAQ,WAAW,UAAU,MAAM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Node","_normalizeClass","_toDisplayString","_createCommentVNode","ref","computed","t","cn","computed","ref","cn","computed","ref","_hoisted_2","_openBlock","_createElementBlock","_hoisted_1","_createCommentVNode","_createBlock","_createElementVNode","_normalizeClass","_toDisplayString","_hoisted_4","_hoisted_5","_hoisted_6","_withKeys","computed","cn","cn","_openBlock","_createElementBlock","_hoisted_1","_createCommentVNode","_createVNode","_hoisted_2","_normalizeClass","computed","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_createVNode","_toDisplayString","ref","computed","_hoisted_6","_openBlock","_createBlock","_withCtx","_resolveDynamicComponent","_createElementBlock","_hoisted_1","_createVNode","_normalizeClass","_hoisted_2","_createElementVNode","_hoisted_3","_toDisplayString","_createCommentVNode","_hoisted_4","_Fragment","_renderList","_hoisted_5","_a","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10"]}
@@ -0,0 +1,55 @@
1
+ // src/components/Icon.ts
2
+ import { defineComponent, h } from "vue";
3
+ import { ICONS } from "@useupup/core";
4
+ import { cn } from "@useupup/core/internal";
5
+ var Icon = defineComponent({
6
+ name: "UpupIcon",
7
+ props: {
8
+ name: { type: String, required: true },
9
+ size: {
10
+ type: Number,
11
+ default: void 0
12
+ },
13
+ class: {
14
+ type: String,
15
+ default: void 0
16
+ }
17
+ },
18
+ setup(props) {
19
+ return () => {
20
+ var _a;
21
+ const def = ICONS[props.name];
22
+ const px = (_a = props.size) != null ? _a : def.defaultSize;
23
+ return h("svg", {
24
+ xmlns: "http://www.w3.org/2000/svg",
25
+ viewBox: def.viewBox,
26
+ width: px,
27
+ height: px,
28
+ ...def.attrs,
29
+ class: cn(def.className, props.class),
30
+ innerHTML: def.inner
31
+ });
32
+ };
33
+ }
34
+ });
35
+ var Icon_default = Icon;
36
+
37
+ // src/context/source-view-header-extra.ts
38
+ import { inject, provide } from "vue";
39
+ var SourceViewHeaderExtraKey = /* @__PURE__ */ Symbol(
40
+ "upup-source-view-header-extra"
41
+ );
42
+ function provideSourceViewHeaderExtra(host) {
43
+ provide(SourceViewHeaderExtraKey, host);
44
+ }
45
+ function useSourceViewHeaderExtra() {
46
+ return inject(SourceViewHeaderExtraKey, null);
47
+ }
48
+
49
+ export {
50
+ Icon,
51
+ Icon_default,
52
+ provideSourceViewHeaderExtra,
53
+ useSourceViewHeaderExtra
54
+ };
55
+ //# sourceMappingURL=chunk-RZ7RTSRZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Icon.ts","../src/context/source-view-header-extra.ts"],"sourcesContent":["import { defineComponent, h, type PropType } from 'vue'\r\nimport { ICONS, type IconName } from '@useupup/core'\r\nimport { cn } from '@useupup/core/internal'\r\n\r\nexport const Icon = defineComponent({\r\n name: 'UpupIcon',\r\n props: {\r\n name: { type: String as PropType<IconName>, required: true },\r\n size: {\r\n type: Number as PropType<number | undefined>,\r\n default: undefined,\r\n },\r\n class: {\r\n type: String as PropType<string | undefined>,\r\n default: undefined,\r\n },\r\n },\r\n setup(props) {\r\n return () => {\r\n const def = ICONS[props.name]\r\n const px = props.size ?? def.defaultSize\r\n return h('svg', {\r\n xmlns: 'http://www.w3.org/2000/svg',\r\n viewBox: def.viewBox,\r\n width: px,\r\n height: px,\r\n ...def.attrs,\r\n class: cn(def.className, props.class),\r\n innerHTML: def.inner,\r\n })\r\n }\r\n },\r\n})\r\n\r\nexport default Icon\r\n","import { inject, provide, type InjectionKey, type Ref } from 'vue'\r\n\r\n/**\r\n * DOM host inside the SourceView header row, just before the Back button.\r\n * A source view teleports its right-side header extras into it (e.g. the drive\r\n * browser's avatar + log out + separator) so account controls share the top\r\n * row instead of occupying their own strip. The provided ref is null until the\r\n * host span mounts; consumers guard their <Teleport> on it. Mirrors React's\r\n * SourceViewHeaderExtraContext (createPortal → <Teleport> is the Vue idiom).\r\n */\r\nconst SourceViewHeaderExtraKey: InjectionKey<Ref<HTMLElement | null>> = Symbol(\r\n 'upup-source-view-header-extra',\r\n)\r\n\r\nexport function provideSourceViewHeaderExtra(\r\n host: Ref<HTMLElement | null>,\r\n): void {\r\n provide(SourceViewHeaderExtraKey, host)\r\n}\r\n\r\nexport function useSourceViewHeaderExtra(): Ref<HTMLElement | null> | null {\r\n return inject(SourceViewHeaderExtraKey, null)\r\n}\r\n"],"mappings":";AAAA,SAAS,iBAAiB,SAAwB;AAClD,SAAS,aAA4B;AACrC,SAAS,UAAU;AAEZ,IAAM,OAAO,gBAAgB;AAAA,EAChC,MAAM;AAAA,EACN,OAAO;AAAA,IACH,MAAM,EAAE,MAAM,QAA8B,UAAU,KAAK;AAAA,IAC3D,MAAM;AAAA,MACF,MAAM;AAAA,MACN,SAAS;AAAA,IACb;AAAA,IACA,OAAO;AAAA,MACH,MAAM;AAAA,MACN,SAAS;AAAA,IACb;AAAA,EACJ;AAAA,EACA,MAAM,OAAO;AACT,WAAO,MAAM;AAlBrB;AAmBY,YAAM,MAAM,MAAM,MAAM,IAAI;AAC5B,YAAM,MAAK,WAAM,SAAN,YAAc,IAAI;AAC7B,aAAO,EAAE,OAAO;AAAA,QACZ,OAAO;AAAA,QACP,SAAS,IAAI;AAAA,QACb,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,GAAG,IAAI;AAAA,QACP,OAAO,GAAG,IAAI,WAAW,MAAM,KAAK;AAAA,QACpC,WAAW,IAAI;AAAA,MACnB,CAAC;AAAA,IACL;AAAA,EACJ;AACJ,CAAC;AAED,IAAO,eAAQ;;;AClCf,SAAS,QAAQ,eAA4C;AAU7D,IAAM,2BAAkE;AAAA,EACpE;AACJ;AAEO,SAAS,6BACZ,MACI;AACJ,UAAQ,0BAA0B,IAAI;AAC1C;AAEO,SAAS,2BAA2D;AACvE,SAAO,OAAO,0BAA0B,IAAI;AAChD;","names":[]}
Binary file
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/context/uploader-context.ts","unplugin-vue:\u0000/plugin-vue/export-helper"],"sourcesContent":["import {\r\n inject,\r\n provide,\r\n type ComputedRef,\r\n type InjectionKey,\r\n type Ref,\r\n} from 'vue'\r\nimport type {\r\n FileSource,\r\n UploadFile,\r\n UpupThemeMode,\r\n ResolvedImageEditorOptions,\r\n FilesProgressMap,\r\n} from '@useupup/core'\r\nimport type {\r\n BaseContextUpload,\r\n BaseContextRuntime,\r\n BaseContextSource,\r\n BaseContextI18n,\r\n BaseContextFiles,\r\n BaseContextUploadControls,\r\n BaseContextView,\r\n BaseContextEditor,\r\n BaseContextTheme,\r\n MotionMode,\r\n} from '@useupup/core/internal'\r\nimport { UploadStatus } from '@useupup/core'\r\nimport type { UploaderProps, UploaderIcons } from '../shared/types'\r\n\r\nexport { UploadStatus }\r\n\r\n// ─── Context type shapes ───────────────────────────────────\r\n\r\n// Reactive so upload progress / status changes reach consumers post-mount.\r\nexport type ContextUpload = Omit<\r\n BaseContextUpload,\r\n | 'uploadStatus'\r\n | 'uploadError'\r\n | 'uploadErrorCode'\r\n | 'totalProgress'\r\n | 'filesProgressMap'\r\n | 'uploadSpeed'\r\n | 'uploadEta'\r\n | 'uploadedBytes'\r\n | 'totalBytes'\r\n> & {\r\n uploadStatus: ComputedRef<UploadStatus>\r\n uploadError: ComputedRef<string | undefined>\r\n uploadErrorCode: ComputedRef<string | undefined>\r\n totalProgress: ComputedRef<number>\r\n filesProgressMap: ComputedRef<FilesProgressMap>\r\n uploadSpeed: ComputedRef<number>\r\n uploadEta: ComputedRef<number>\r\n uploadedBytes: ComputedRef<number>\r\n totalBytes: ComputedRef<number>\r\n}\r\n\r\nexport type ContextRuntime = Omit<BaseContextRuntime, 'isOnline'> & {\r\n inputRef: Ref<HTMLInputElement | null>\r\n isOnline: ComputedRef<boolean>\r\n /** Resolved `data-motion` value ('on' | 'off') from the core motion gate. */\r\n motionMode: ComputedRef<MotionMode>\r\n}\r\n\r\n// Vue exposes activeSource as a reactive ComputedRef (React uses a plain value\r\n// + re-render). Consumers read it via `.value` in script; templates auto-unwrap.\r\nexport type ContextSource = Omit<BaseContextSource, 'activeSource'> & {\r\n activeSource: ComputedRef<FileSource | undefined>\r\n}\r\n\r\nexport type ContextI18n = BaseContextI18n\r\n\r\n// Reactive so the file list / dropzone re-render as files are added or removed.\r\nexport type ContextFiles = Omit<BaseContextFiles, 'files'> & {\r\n files: ComputedRef<Map<string, UploadFile>>\r\n /** Transient: file ids currently playing their exit animation. Read by\r\n * FileList (hero) and FileItem (cards) to render `upup-fx-exit`. Sourced\r\n * from the core transient-UI store (deferred removal). */\r\n leavingFileIds: ComputedRef<ReadonlySet<string>>\r\n}\r\n\r\nexport type ContextUploadControls = Omit<\r\n BaseContextUploadControls,\r\n 'upload'\r\n> & {\r\n upload: ContextUpload\r\n}\r\n\r\n// Reactive so view switching (add-more, grid/list) reaches consumers post-mount.\r\nexport type ContextView = Omit<BaseContextView, 'isAddingMore' | 'viewMode'> & {\r\n isAddingMore: ComputedRef<boolean>\r\n viewMode: ComputedRef<'grid' | 'list'>\r\n /** Add-more source overlay: source surface mounted above the dimmed,\r\n * still-mounted file list. Sourced from the core transient-UI store. */\r\n sourceOverlayOpen: ComputedRef<boolean>\r\n /** Overlay is playing its reverse close-slide before it unmounts. */\r\n sourceOverlayClosing: ComputedRef<boolean>\r\n openSourceOverlay: () => void\r\n closeSourceOverlay: () => void\r\n /** Human provider label whose read-only picker just rejected an OS drop —\r\n * drives the drop-rejection toast. Null when no rejection is showing.\r\n * Auto-clears via the core transient-UI store's 3s window. */\r\n dropRejected: ComputedRef<string | null>\r\n /** Raise the drop-rejection toast for a read-only drive source (resolves the\r\n * provider label, then flags the core store). Wired to core's\r\n * DragDropController.onReadonlyDropRejected. */\r\n flagDriveDropRejected: (source: FileSource) => void\r\n}\r\n\r\n// Reactive so opening/closing the image editor re-renders consumers.\r\nexport type ContextEditor = Omit<BaseContextEditor, 'editingFile'> & {\r\n editingFile: ComputedRef<UploadFile | null>\r\n}\r\n\r\n// Mode-driven theme fields are reactive so `themeMode:'system'` resolves live.\r\nexport type ContextTheme = Omit<BaseContextTheme, 'themeMode' | 'isDark'> & {\r\n themeMode: ComputedRef<Exclude<UpupThemeMode, 'system'>>\r\n isDark: ComputedRef<boolean>\r\n}\r\n\r\n// Under `exactOptionalPropertyTypes`, `Required<Pick<T, K>>` strips the `?`\r\n// modifier but keeps the explicit `| undefined` from the widened base props.\r\n// These fields are always assigned with defaults by the controller, so\r\n// consumers see non-undefined values — strip both `?` and `undefined`.\r\ntype RequiredDefined<T, K extends keyof T> = {\r\n [P in K]-?: NonNullable<T[P]>\r\n}\r\n\r\nexport type ContextProps = RequiredDefined<\r\n UploaderProps,\r\n | 'sources'\r\n | 'isProcessing'\r\n | 'allowPreview'\r\n | 'mini'\r\n | 'onFileClick'\r\n | 'onIntegrationClick'\r\n | 'onFilesDragOver'\r\n | 'onFilesDragLeave'\r\n | 'onFilesDrop'\r\n | 'onWarn'\r\n | 'enablePaste'\r\n | 'onError'\r\n | 'showBranding'\r\n | 'quietCompletion'\r\n | 'className'\r\n | 'style'\r\n | 'disableDragDrop'\r\n> &\r\n // Explicit `| undefined` (via indexed access) rather than `Pick`: under\r\n // `exactOptionalPropertyTypes` the controller assigns these from destructured\r\n // props (each `T | undefined`), so the target must accept undefined.\r\n {\r\n maxFileSize?: UploaderProps['maxFileSize']\r\n maxRetries?: UploaderProps['maxRetries']\r\n resumable?: UploaderProps['resumable']\r\n } & {\r\n allowedFileTypes: string\r\n limit: number\r\n folderUploadAllowDrop: boolean\r\n folderPickerButtonVisible: boolean\r\n multiple: boolean\r\n icons: Required<UploaderIcons>\r\n imageEditor: ResolvedImageEditorOptions\r\n}\r\n\r\nexport interface IUploaderContext\r\n extends\r\n ContextRuntime,\r\n ContextSource,\r\n ContextI18n,\r\n ContextFiles,\r\n ContextUploadControls,\r\n ContextView,\r\n ContextEditor {\r\n props: ContextProps\r\n theme: ContextTheme\r\n}\r\n\r\n// ─── Injection keys ────────────────────────────────────────\r\n\r\nconst RuntimeKey: InjectionKey<ContextRuntime> = Symbol('upup-runtime')\r\nconst SourceKey: InjectionKey<ContextSource> = Symbol('upup-source')\r\nconst I18nKey: InjectionKey<ContextI18n> = Symbol('upup-i18n')\r\nconst FilesKey: InjectionKey<ContextFiles> = Symbol('upup-files')\r\nconst UploadControlsKey: InjectionKey<ContextUploadControls> = Symbol(\r\n 'upup-upload-controls',\r\n)\r\nconst ViewKey: InjectionKey<ContextView> = Symbol('upup-view')\r\nconst EditorKey: InjectionKey<ContextEditor> = Symbol('upup-editor')\r\nconst OptionsKey: InjectionKey<ContextProps> = Symbol('upup-options')\r\nconst ThemeKey: InjectionKey<ContextTheme> = Symbol('upup-theme')\r\nconst RootKey: InjectionKey<IUploaderContext> = Symbol('upup-root')\r\n\r\n// ─── Provider function ─────────────────────────────────────\r\n\r\nexport function provideUploaderContext(value: IUploaderContext): void {\r\n provide(RootKey, value)\r\n provide(RuntimeKey, {\r\n core: value.core,\r\n orchestrator: value.orchestrator,\r\n mode: value.mode,\r\n serverUrl: value.serverUrl,\r\n inputRef: value.inputRef,\r\n openFilePicker: value.openFilePicker,\r\n isOnline: value.isOnline,\r\n motionMode: value.motionMode,\r\n })\r\n provide(SourceKey, {\r\n activeSource: value.activeSource,\r\n setActiveSource: value.setActiveSource,\r\n cloudDrives: value.cloudDrives,\r\n })\r\n provide(I18nKey, {\r\n translations: value.translations,\r\n translator: value.translator,\r\n lang: value.lang,\r\n dir: value.dir,\r\n })\r\n provide(FilesKey, {\r\n files: value.files,\r\n leavingFileIds: value.leavingFileIds,\r\n setFiles: value.setFiles,\r\n replaceFiles: value.replaceFiles,\r\n resetState: value.resetState,\r\n uploadFiles: value.uploadFiles,\r\n handleFileRemove: value.handleFileRemove,\r\n })\r\n provide(UploadControlsKey, {\r\n upload: value.upload,\r\n handleDone: value.handleDone,\r\n handleCancel: value.handleCancel,\r\n handlePause: value.handlePause,\r\n handleResume: value.handleResume,\r\n })\r\n provide(ViewKey, {\r\n isAddingMore: value.isAddingMore,\r\n setIsAddingMore: value.setIsAddingMore,\r\n viewMode: value.viewMode,\r\n setViewMode: value.setViewMode,\r\n sourceOverlayOpen: value.sourceOverlayOpen,\r\n sourceOverlayClosing: value.sourceOverlayClosing,\r\n openSourceOverlay: value.openSourceOverlay,\r\n closeSourceOverlay: value.closeSourceOverlay,\r\n dropRejected: value.dropRejected,\r\n flagDriveDropRejected: value.flagDriveDropRejected,\r\n })\r\n provide(EditorKey, {\r\n editingFile: value.editingFile,\r\n openImageEditor: value.openImageEditor,\r\n closeImageEditor: value.closeImageEditor,\r\n saveImageEdit: value.saveImageEdit,\r\n replaceFile: value.replaceFile,\r\n })\r\n provide(OptionsKey, value.props)\r\n provide(ThemeKey, value.theme)\r\n}\r\n\r\n// ─── Consumer composables ──────────────────────────────────\r\n\r\nfunction readInjection<T>(key: InjectionKey<T>, name: string): T {\r\n const value = inject(key)\r\n if (!value) throw new Error(`${name} must be used inside <UpupUploader />`)\r\n return value\r\n}\r\n\r\nexport function useUploaderContext(): IUploaderContext {\r\n return readInjection(RootKey, 'useUploaderContext')\r\n}\r\nexport function useUploaderRuntime(): ContextRuntime {\r\n return readInjection(RuntimeKey, 'useUploaderRuntime')\r\n}\r\nexport function useUploaderSource(): ContextSource {\r\n return readInjection(SourceKey, 'useUploaderSource')\r\n}\r\nexport function useUploaderI18n(): ContextI18n {\r\n return readInjection(I18nKey, 'useUploaderI18n')\r\n}\r\nexport function useUploaderFiles(): ContextFiles {\r\n return readInjection(FilesKey, 'useUploaderFiles')\r\n}\r\nexport function useUploaderUploadControls(): ContextUploadControls {\r\n return readInjection(UploadControlsKey, 'useUploaderUploadControls')\r\n}\r\nexport function useUploaderView(): ContextView {\r\n return readInjection(ViewKey, 'useUploaderView')\r\n}\r\nexport function useUploaderEditor(): ContextEditor {\r\n return readInjection(EditorKey, 'useUploaderEditor')\r\n}\r\nexport function useUploaderOptions(): ContextProps {\r\n return readInjection(OptionsKey, 'useUploaderOptions')\r\n}\r\nexport function useUploaderTheme(): ContextTheme {\r\n return readInjection(ThemeKey, 'useUploaderTheme')\r\n}\r\n","\nexport default (sfc, props) => {\n const target = sfc.__vccOpts || sfc;\n for (const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BAAmB;AACvD;AACO,SAAS,qBAAmC;AAC/C,SAAO,cAAc,YAAY,oBAAoB;AACzD;AACO,SAAS,mBAAiC;AAC7C,SAAO,cAAc,UAAU,kBAAkB;AACrD;;;ACrSA,IAAO,wBAAQ,CAAC,KAAK,UAAU;AAC7B,QAAM,SAAS,IAAI,aAAa;AAChC,aAAW,CAAC,KAAK,GAAG,KAAK,OAAO;AAC9B,WAAO,GAAG,IAAI;AAAA,EAChB;AACA,SAAO;AACT;","names":[]}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=AudioUploader.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioUploader.vue.d.ts","sourceRoot":"","sources":["../../src/components/AudioUploader.vue"],"names":[],"mappings":";AAshBA,wBAKG"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Live recording waveform (states-tour-3 state D): sky bars whose heights track
3
+ * the microphone's live frequency data via a Web Audio AnalyserNode.
4
+ *
5
+ * This is the ONE place JS-driven visuals are sanctioned — the bars render REAL
6
+ * audio data, not fx decoration, so (a) they are NOT classed `upup-fx-*` (the
7
+ * motion gate must not freeze live data) and (b) the rAF read loop is
8
+ * legitimate. Heights are written straight to the DOM (no per-frame render).
9
+ * The AnalyserNode + AudioContext are torn down on unmount/stop.
10
+ */
11
+ type __VLS_Props = {
12
+ stream: MediaStream;
13
+ };
14
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ export default _default;
16
+ //# sourceMappingURL=AudioWaveform.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioWaveform.vue.d.ts","sourceRoot":"","sources":["../../src/components/AudioWaveform.vue"],"names":[],"mappings":"AAoFA;;;;;;;;;GASG;AACH,KAAK,WAAW,GAAG;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,CAAC;;AAmG3C,wBAMG"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=BoxUploader.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoxUploader.vue.d.ts","sourceRoot":"","sources":["../../src/components/BoxUploader.vue"],"names":[],"mappings":";AAiFA,wBAKG"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=CameraUploader.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CameraUploader.vue.d.ts","sourceRoot":"","sources":["../../src/components/CameraUploader.vue"],"names":[],"mappings":";AAmVA,wBAKG"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=ClientBoxUploader.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientBoxUploader.vue.d.ts","sourceRoot":"","sources":["../../src/components/ClientBoxUploader.vue"],"names":[],"mappings":";AA2MA,wBAKG"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=ClientDropboxUploader.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientDropboxUploader.vue.d.ts","sourceRoot":"","sources":["../../src/components/ClientDropboxUploader.vue"],"names":[],"mappings":";AA2MA,wBAKG"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=ClientGoogleDriveUploader.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientGoogleDriveUploader.vue.d.ts","sourceRoot":"","sources":["../../src/components/ClientGoogleDriveUploader.vue"],"names":[],"mappings":";AAsMA,wBAKG"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=ClientOneDriveUploader.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientOneDriveUploader.vue.d.ts","sourceRoot":"","sources":["../../src/components/ClientOneDriveUploader.vue"],"names":[],"mappings":";AA2MA,wBAKG"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=DefaultLoaderIcon.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultLoaderIcon.vue.d.ts","sourceRoot":"","sources":["../../src/components/DefaultLoaderIcon.vue"],"names":[],"mappings":";AAsDA,wBAKG"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=DropboxUploader.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropboxUploader.vue.d.ts","sourceRoot":"","sources":["../../src/components/DropboxUploader.vue"],"names":[],"mappings":";AAiFA,wBAKG"}
@@ -0,0 +1,13 @@
1
+ import { type UploadFile } from '@useupup/core';
2
+ /**
3
+ * Single-file HERO preview (spec §4 state 3, states-tour-v2.html "single file").
4
+ * One visual fills the fixed-height content area with a bottom scrim caption.
5
+ * The panel is fixed-height by ruling, so the media MUST stay bounded with
6
+ * `min-h-0 flex-1 object-contain` — the repo's #1 visual trap.
7
+ */
8
+ type __VLS_Props = {
9
+ file: UploadFile;
10
+ };
11
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ export default _default;
13
+ //# sourceMappingURL=FileHero.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileHero.vue.d.ts","sourceRoot":"","sources":["../../src/components/FileHero.vue"],"names":[],"mappings":"AAmLA,OAAO,EAAgB,KAAK,UAAU,EAAqB,MAAM,eAAe,CAAA;AAahF;;;;;GAKG;AACH,KAAK,WAAW,GAAG;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC;;AA0OxC,wBAMG"}
@@ -0,0 +1,9 @@
1
+ type __VLS_Props = {
2
+ extension?: string;
3
+ class?: string | undefined;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
6
+ extension: string;
7
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ export default _default;
9
+ //# sourceMappingURL=FileIcon.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileIcon.vue.d.ts","sourceRoot":"","sources":["../../src/components/FileIcon.vue"],"names":[],"mappings":"AAwCA,KAAK,WAAW,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC7B,CAAC;;eAFc,MAAM;;AAoE1B,wBAOG"}
@@ -0,0 +1,14 @@
1
+ import type { UploadFile } from '@useupup/core';
2
+ type __VLS_Props = {
3
+ file: UploadFile;
4
+ /** Position in the sorted list — drives the entrance stagger. */
5
+ index?: number;
6
+ /** True when the panel forces the row list (tiles don't fit one row). */
7
+ forcedList?: boolean;
8
+ };
9
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
10
+ index: number;
11
+ forcedList: boolean;
12
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
14
+ //# sourceMappingURL=FileItem.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileItem.vue.d.ts","sourceRoot":"","sources":["../../src/components/FileItem.vue"],"names":[],"mappings":"AAqGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAa/C,KAAK,WAAW,GAAG;IACX,IAAI,EAAE,UAAU,CAAA;IAChB,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,yEAAyE;IACzE,UAAU,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;;WAHU,MAAM;gBAED,OAAO;;AA4K5B,wBAOG"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=FileList.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileList.vue.d.ts","sourceRoot":"","sources":["../../src/components/FileList.vue"],"names":[],"mappings":";AA+mCA,wBAKG"}
@@ -0,0 +1,22 @@
1
+ type __VLS_Props = {
2
+ fileName: string;
3
+ fileType: string;
4
+ fileId: string;
5
+ fileUrl: string;
6
+ fileSize?: number;
7
+ canPreview: boolean;
8
+ onRequestPreview?: () => void;
9
+ /** Position in the sorted list — drives the completion-check stagger. */
10
+ index?: number;
11
+ };
12
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
+ click: () => any;
14
+ "update:canPreview": (value: boolean) => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ onClick?: () => any;
17
+ "onUpdate:canPreview"?: (value: boolean) => any;
18
+ }>, {
19
+ index: number;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ export default _default;
22
+ //# sourceMappingURL=FilePreview.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilePreview.vue.d.ts","sourceRoot":"","sources":["../../src/components/FilePreview.vue"],"names":[],"mappings":"AAyRA,KAAK,WAAW,GAAG;IACX,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,OAAO,CAAA;IACnB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC7B,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAA;CACjB,CAAC;;;;;;;;WADU,MAAM;;AAuVtB,wBAQG"}
@@ -0,0 +1,15 @@
1
+ type __VLS_Props = {
2
+ fileUrl: string;
3
+ fileName: string;
4
+ fileType: string;
5
+ fileSize?: number;
6
+ };
7
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ close: () => any;
9
+ stopPropagation: (e: MouseEvent) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ onClose?: () => any;
12
+ onStopPropagation?: (e: MouseEvent) => any;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ export default _default;
15
+ //# sourceMappingURL=FilePreviewPortal.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilePreviewPortal.vue.d.ts","sourceRoot":"","sources":["../../src/components/FilePreviewPortal.vue"],"names":[],"mappings":"AA6LA,KAAK,WAAW,GAAG;IACf,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;CACpB,CAAC;;;;;;;;AA0RF,wBAOG"}
@@ -0,0 +1,19 @@
1
+ import type { Translations } from '@useupup/core';
2
+ import type { InternalFlatClassNames } from '@useupup/core/internal';
3
+ type __VLS_Props = {
4
+ canPreview: boolean;
5
+ fileType: string;
6
+ fileName: string;
7
+ fileUrl: string;
8
+ fileSize?: number | undefined;
9
+ slotClasses: InternalFlatClassNames;
10
+ allowPreview: boolean;
11
+ labels: Translations;
12
+ };
13
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ "update:canPreview": (value: boolean) => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ "onUpdate:canPreview"?: (value: boolean) => any;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ export default _default;
19
+ //# sourceMappingURL=FilePreviewThumbnail.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilePreviewThumbnail.vue.d.ts","sourceRoot":"","sources":["../../src/components/FilePreviewThumbnail.vue"],"names":[],"mappings":"AAuFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAKpE,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,WAAW,EAAE,sBAAsB,CAAA;IACnC,YAAY,EAAE,OAAO,CAAA;IACrB,MAAM,EAAE,YAAY,CAAA;CACvB,CAAC;;;;;;AAmIF,wBAOG"}