Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

updated-type-definitions

Aswin Asok95dcd593185a
diff --git a/web/apps/albums/src/app/hooks/useNotification.ts b/web/apps/albums/src/app/hooks/useNotification.ts
index 5d3dc23ae7..0ace4417ed 100644
--- a/web/apps/albums/src/app/hooks/useNotification.ts
+++ b/web/apps/albums/src/app/hooks/useNotification.ts
@@ -1,4 +1,4 @@
-import { type NotificationAttributes } from "@/shared/ui/feedback/Notification";
+import type { NotificationAttributes } from "@/shared/ui/feedback/Notification";
import { useCallback, useState } from "react";
/**
diff --git a/web/apps/albums/src/public-album/components/FileList.tsx b/web/apps/albums/src/public-album/components/FileList.tsx
index 9c3f5baff2..60cac7ec54 100644
--- a/web/apps/albums/src/public-album/components/FileList.tsx
+++ b/web/apps/albums/src/public-album/components/FileList.tsx
@@ -1,6 +1,6 @@
import { AddPhotosIcon } from "@/public-album/components/ActionIcons";
import { thumbnailManager } from "@/public-album/media/thumbnails/thumbnail-manager";
-import { type SelectedState } from "@/public-album/utils/file";
+import type { SelectedState } from "@/public-album/utils/file";
import {
handleSelectCreator,
handleSelectCreatorMulti,
diff --git a/web/apps/albums/src/public-album/components/FileListWithViewer.tsx b/web/apps/albums/src/public-album/components/FileListWithViewer.tsx
index e224d59dab..5aecdb2f6d 100644
--- a/web/apps/albums/src/public-album/components/FileListWithViewer.tsx
+++ b/web/apps/albums/src/public-album/components/FileListWithViewer.tsx
@@ -1,6 +1,6 @@
-import {
- type FileViewerInitialSidebar,
- type FileViewerProps,
+import type {
+ FileViewerInitialSidebar,
+ FileViewerProps,
} from "@/public-album/viewer/components/FileViewer";
import {
LazyFileViewer,
diff --git a/web/apps/albums/src/public-album/components/TripLayout/hooks/useDataProcessing.ts b/web/apps/albums/src/public-album/components/TripLayout/hooks/useDataProcessing.ts
index 40625e1f0f..810ead6bab 100644
--- a/web/apps/albums/src/public-album/components/TripLayout/hooks/useDataProcessing.ts
+++ b/web/apps/albums/src/public-album/components/TripLayout/hooks/useDataProcessing.ts
@@ -1,5 +1,5 @@
-import { type Collection } from "ente-media/collection";
-import { type EnteFile } from "ente-media/file";
+import type { Collection } from "ente-media/collection";
+import type { EnteFile } from "ente-media/file";
import { useEffect } from "react";
import type { JourneyPoint } from "../types";
diff --git a/web/apps/albums/src/public-album/components/TripLayout/hooks/useFileViewer.ts b/web/apps/albums/src/public-album/components/TripLayout/hooks/useFileViewer.ts
index ec5a7936a7..30580e313d 100644
--- a/web/apps/albums/src/public-album/components/TripLayout/hooks/useFileViewer.ts
+++ b/web/apps/albums/src/public-album/components/TripLayout/hooks/useFileViewer.ts
@@ -1,4 +1,4 @@
-import { type EnteFile } from "ente-media/file";
+import type { EnteFile } from "ente-media/file";
import { fileCreationPhotoSortTime } from "ente-media/file-metadata";
import { useCallback, useState } from "react";
import type { JourneyPoint } from "../types";
diff --git a/web/apps/albums/src/public-album/components/TripLayout/hooks/useThumbnailGeneration.ts b/web/apps/albums/src/public-album/components/TripLayout/hooks/useThumbnailGeneration.ts
index d999859dd9..49991195c0 100644
--- a/web/apps/albums/src/public-album/components/TripLayout/hooks/useThumbnailGeneration.ts
+++ b/web/apps/albums/src/public-album/components/TripLayout/hooks/useThumbnailGeneration.ts
@@ -1,4 +1,4 @@
-import { type EnteFile } from "ente-media/file";
+import type { EnteFile } from "ente-media/file";
import { useEffect, useRef } from "react";
import type { JourneyPoint } from "../types";
diff --git a/web/apps/albums/src/public-album/components/TripLayout/index.tsx b/web/apps/albums/src/public-album/components/TripLayout/index.tsx
index c721b021a7..e6c7d3c130 100644
--- a/web/apps/albums/src/public-album/components/TripLayout/index.tsx
+++ b/web/apps/albums/src/public-album/components/TripLayout/index.tsx
@@ -1,7 +1,7 @@
import { useJoinAlbum } from "@/public-album/access/hooks/useJoinAlbum";
import { ActiveDownloadStatusNotifications } from "@/public-album/download/components/ActiveDownloadStatusNotifications";
-import { type FileViewerInitialSidebar } from "@/public-album/viewer/components/FileViewer";
-import { type PublicFeedItemClickInfo } from "@/public-album/viewer/components/PublicFeedSidebar";
+import type { FileViewerInitialSidebar } from "@/public-album/viewer/components/FileViewer";
+import type { PublicFeedItemClickInfo } from "@/public-album/viewer/components/PublicFeedSidebar";
import {
LazyFileViewer,
LazyPublicFeedSidebar,
@@ -11,8 +11,8 @@ import { Box, styled, useMediaQuery, useTheme } from "@mui/material";
import { useModalVisibility } from "ente-base/components/utils/modal";
import type { PublicAlbumsCredentials } from "ente-base/http";
import { useSaveGroupsActions } from "ente-gallery/components/utils/save-groups";
-import { type Collection } from "ente-media/collection";
-import { type EnteFile } from "ente-media/file";
+import type { Collection } from "ente-media/collection";
+import type { EnteFile } from "ente-media/file";
import { useCallback, useEffect, useRef, useState } from "react";
// Import extracted components
diff --git a/web/apps/albums/src/public-album/components/TripLayout/utils/dataProcessing.ts b/web/apps/albums/src/public-album/components/TripLayout/utils/dataProcessing.ts
index fd2f3a9700..4b0d1f5773 100644
--- a/web/apps/albums/src/public-album/components/TripLayout/utils/dataProcessing.ts
+++ b/web/apps/albums/src/public-album/components/TripLayout/utils/dataProcessing.ts
@@ -1,5 +1,5 @@
import { downloadManager } from "@/public-album/download/services/download-manager";
-import { type EnteFile } from "ente-media/file";
+import type { EnteFile } from "ente-media/file";
import {
fileCreationPhotoSortTime,
fileFileName,
diff --git a/web/apps/albums/src/public-album/data/storage/public-albums-fdb.ts b/web/apps/albums/src/public-album/data/storage/public-albums-fdb.ts
index c7fd2ac2be..18a3dd0cc4 100644
--- a/web/apps/albums/src/public-album/data/storage/public-albums-fdb.ts
+++ b/web/apps/albums/src/public-album/data/storage/public-albums-fdb.ts
@@ -9,7 +9,7 @@ import {
LocalTimestamp,
transformFilesIfNeeded,
} from "ente-gallery/services/files-db";
-import { type Collection } from "ente-media/collection";
+import type { Collection } from "ente-media/collection";
import type { EnteFile } from "ente-media/file";
import { nullToUndefined } from "ente-utils/transform";
import { z } from "zod";
diff --git a/web/apps/albums/src/public-album/download/components/ActiveDownloadStatusNotifications.tsx b/web/apps/albums/src/public-album/download/components/ActiveDownloadStatusNotifications.tsx
index f82c8dd49b..798317892f 100644
--- a/web/apps/albums/src/public-album/download/components/ActiveDownloadStatusNotifications.tsx
+++ b/web/apps/albums/src/public-album/download/components/ActiveDownloadStatusNotifications.tsx
@@ -1,6 +1,6 @@
import { useSaveGroups } from "ente-gallery/components/utils/save-groups";
import dynamic from "next/dynamic";
-import { type DownloadStatusNotificationsProps } from "./DownloadStatusNotifications";
+import type { DownloadStatusNotificationsProps } from "./DownloadStatusNotifications";
const LazyDownloadStatusNotifications =
dynamic<DownloadStatusNotificationsProps>(
diff --git a/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx b/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx
index 8e8bdb44d3..70dbe27f4e 100644
--- a/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx
+++ b/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx
@@ -13,7 +13,7 @@ import {
FeedIcon,
ShareIcon,
} from "@/public-album/components/ActionIcons";
-import { type FileListHeaderOrFooter } from "@/public-album/components/FileList";
+import type { FileListHeaderOrFooter } from "@/public-album/components/FileList";
import { FileListWithViewer } from "@/public-album/components/FileListWithViewer";
import type { TripLayoutProps } from "@/public-album/components/TripLayout";
import { setPublicAlbumsCredentials } from "@/public-album/data/auth/public-link-credentials";
@@ -28,9 +28,9 @@ import {
getSelectedFiles,
type SelectedState,
} from "@/public-album/utils/file";
-import { type FileViewerInitialSidebar } from "@/public-album/viewer/components/FileViewer";
+import type { FileViewerInitialSidebar } from "@/public-album/viewer/components/FileViewer";
import type { PublicAlbumSingleFileViewerProps } from "@/public-album/viewer/components/PublicAlbumSingleFileViewer";
-import { type PublicFeedItemClickInfo } from "@/public-album/viewer/components/PublicFeedSidebar";
+import type { PublicFeedItemClickInfo } from "@/public-album/viewer/components/PublicFeedSidebar";
import { LazyPublicFeedSidebar } from "@/public-album/viewer/lib/lazy";
import CheckIcon from "@mui/icons-material/Check";
import CloseIcon from "@mui/icons-material/Close";
@@ -67,7 +67,7 @@ import {
type AddSaveGroup,
} from "ente-gallery/components/utils/save-groups";
import type { Collection } from "ente-media/collection";
-import { type EnteFile } from "ente-media/file";
+import type { EnteFile } from "ente-media/file";
import { fileFileName } from "ente-media/file-metadata";
import { FileType } from "ente-media/file-type";
import {
@@ -91,7 +91,7 @@ import {
type ComponentType,
type PropsWithChildren,
} from "react";
-import { type FileWithPath } from "react-dropzone";
+import type { FileWithPath } from "react-dropzone";
const LazyPublicAlbumSingleFileViewer =
dynamic<PublicAlbumSingleFileViewerProps>(
diff --git a/web/apps/albums/src/public-album/upload/components/Upload.tsx b/web/apps/albums/src/public-album/upload/components/Upload.tsx
index 4e194abc04..5477fa5118 100644
--- a/web/apps/albums/src/public-album/upload/components/Upload.tsx
+++ b/web/apps/albums/src/public-album/upload/components/Upload.tsx
@@ -53,7 +53,7 @@ import { CanvasReadbackBlockedDialog } from "ente-gallery/components/upload/Canv
import { UploadProgress } from "ente-gallery/components/UploadProgress";
import { useFileInput } from "ente-gallery/components/utils/use-file-input";
import { hasReliableCanvasReadback } from "ente-gallery/utils/upload/canvas-integrity";
-import { type Collection } from "ente-media/collection";
+import type { Collection } from "ente-media/collection";
import type { EnteFile } from "ente-media/file";
import { firstNonEmpty } from "ente-utils/array";
import { t } from "i18next";
diff --git a/web/apps/albums/src/public-album/upload/pipeline/metadata-json.ts b/web/apps/albums/src/public-album/upload/pipeline/metadata-json.ts
index 4c28cbceb4..cee7318790 100644
--- a/web/apps/albums/src/public-album/upload/pipeline/metadata-json.ts
+++ b/web/apps/albums/src/public-album/upload/pipeline/metadata-json.ts
@@ -6,7 +6,7 @@ import type {
} from "@/public-album/upload/pipeline";
import { nameAndExtension } from "ente-base/file-name";
import log from "ente-base/log";
-import { type Location } from "ente-base/types";
+import type { Location } from "ente-base/types";
/**
* The data we read from the JSON metadata sidecar files.
diff --git a/web/apps/albums/src/public-album/upload/pipeline/upload-service.ts b/web/apps/albums/src/public-album/upload/pipeline/upload-service.ts
index 2c182f6807..725902dd72 100644
--- a/web/apps/albums/src/public-album/upload/pipeline/upload-service.ts
+++ b/web/apps/albums/src/public-album/upload/pipeline/upload-service.ts
@@ -7,7 +7,7 @@ import {
} from "@/public-album/media/processing/ffmpeg";
import type { BytesOrB64 } from "ente-base/crypto/types";
import { streamEncryptionChunkSize } from "ente-base/crypto/types";
-import { type CryptoWorker } from "ente-base/crypto/worker";
+import type { CryptoWorker } from "ente-base/crypto/worker";
import { nameAndExtension } from "ente-base/file-name";
import {
ensureOk,
diff --git a/web/apps/albums/src/public-album/upload/services/upload-manager.ts b/web/apps/albums/src/public-album/upload/services/upload-manager.ts
index 0ecc5ede51..540c50c78e 100644
--- a/web/apps/albums/src/public-album/upload/services/upload-manager.ts
+++ b/web/apps/albums/src/public-album/upload/services/upload-manager.ts
@@ -23,13 +23,13 @@ import UploadService, {
type UploadAsset,
} from "@/public-album/upload/pipeline/upload-service";
import { createComlinkCryptoWorker } from "ente-base/crypto";
-import { type CryptoWorker } from "ente-base/crypto/worker";
+import type { CryptoWorker } from "ente-base/crypto/worker";
import { lowercaseExtension, nameAndExtension } from "ente-base/file-name";
import type { PublicAlbumsCredentials } from "ente-base/http";
import log from "ente-base/log";
import { ComlinkWorker } from "ente-base/worker/comlink-worker";
import type { Collection } from "ente-media/collection";
-import { type EnteFile } from "ente-media/file";
+import type { EnteFile } from "ente-media/file";
import { FileType } from "ente-media/file-type";
import { potentialFileTypeFromExtension } from "ente-media/live-photo";
import { wait } from "ente-utils/promise";
diff --git a/web/apps/albums/src/public-album/viewer/components/AddNameModal.tsx b/web/apps/albums/src/public-album/viewer/components/AddNameModal.tsx
index dbd5d5548f..40d2139a82 100644
--- a/web/apps/albums/src/public-album/viewer/components/AddNameModal.tsx
+++ b/web/apps/albums/src/public-album/viewer/components/AddNameModal.tsx
@@ -9,7 +9,7 @@ import {
TextField,
Typography,
} from "@mui/material";
-import { type ModalVisibilityProps } from "ente-base/components/utils/modal";
+import type { ModalVisibilityProps } from "ente-base/components/utils/modal";
import { t } from "i18next";
import React, { useRef, useState } from "react";
diff --git a/web/apps/albums/src/public-album/viewer/components/CommentsSidebar.tsx b/web/apps/albums/src/public-album/viewer/components/CommentsSidebar.tsx
index 2746e48a57..790d6017f2 100644
--- a/web/apps/albums/src/public-album/viewer/components/CommentsSidebar.tsx
+++ b/web/apps/albums/src/public-album/viewer/components/CommentsSidebar.tsx
@@ -24,7 +24,7 @@ import {
TextField,
Typography,
} from "@mui/material";
-import { type ModalVisibilityProps } from "ente-base/components/utils/modal";
+import type { ModalVisibilityProps } from "ente-base/components/utils/modal";
import type { PublicAlbumsCredentials } from "ente-base/http";
import log from "ente-base/log";
import { getAvatarColor } from "ente-gallery/utils/avatar-colors";
@@ -37,7 +37,7 @@ import React, {
useRef,
useState,
} from "react";
-import { type Comment, type UnifiedReaction } from "../lib/social-types";
+import type { Comment, UnifiedReaction } from "../lib/social-types";
import { AddNameModal } from "./AddNameModal";
import { PublicCommentModal } from "./PublicCommentModal";
import { PublicLikeModal } from "./PublicLikeModal";
diff --git a/web/apps/albums/src/public-album/viewer/components/FileViewer.tsx b/web/apps/albums/src/public-album/viewer/components/FileViewer.tsx
index 8f738f977b..7f7af560a0 100644
--- a/web/apps/albums/src/public-album/viewer/components/FileViewer.tsx
+++ b/web/apps/albums/src/public-album/viewer/components/FileViewer.tsx
@@ -22,7 +22,7 @@ import {
import { SpacedRow } from "ente-base/components/containers";
import { DialogCloseIconButton } from "ente-base/components/mui/DialogCloseIconButton";
import { useInterval, useIsSmallWidth } from "ente-base/components/utils/hooks";
-import { type ModalVisibilityProps } from "ente-base/components/utils/modal";
+import type { ModalVisibilityProps } from "ente-base/components/utils/modal";
import { useBaseContext } from "ente-base/context";
import type { PublicAlbumsCredentials } from "ente-base/http";
import { formattedListJoin, ut } from "ente-base/i18n";
@@ -39,7 +39,7 @@ import {
resetMoreMenuButtonOnMenuClose,
type FileViewerPhotoSwipeDelegate,
} from "../lib/photoswipe";
-import { type Comment, type UnifiedReaction } from "../lib/social-types";
+import type { Comment, UnifiedReaction } from "../lib/social-types";
import { AddNameModal } from "./AddNameModal";
import { CommentsSidebar } from "./CommentsSidebar";
import { FileInfo, type FileInfoExif } from "./FileInfo";
diff --git a/web/apps/albums/src/public-album/viewer/components/LikesSidebar.tsx b/web/apps/albums/src/public-album/viewer/components/LikesSidebar.tsx
index 0920d7a693..3080885eea 100644
--- a/web/apps/albums/src/public-album/viewer/components/LikesSidebar.tsx
+++ b/web/apps/albums/src/public-album/viewer/components/LikesSidebar.tsx
@@ -12,7 +12,7 @@ import {
styled,
Typography,
} from "@mui/material";
-import { type ModalVisibilityProps } from "ente-base/components/utils/modal";
+import type { ModalVisibilityProps } from "ente-base/components/utils/modal";
import log from "ente-base/log";
import { getAvatarColor } from "ente-gallery/utils/avatar-colors";
import type { EnteFile } from "ente-media/file";
@@ -24,7 +24,7 @@ import React, {
useRef,
useState,
} from "react";
-import { type UnifiedReaction } from "../lib/social-types";
+import type { UnifiedReaction } from "../lib/social-types";
// =============================================================================
// Icons
diff --git a/web/apps/albums/src/public-album/viewer/components/PublicCommentModal.tsx b/web/apps/albums/src/public-album/viewer/components/PublicCommentModal.tsx
index b3590af12b..5c7963269e 100644
--- a/web/apps/albums/src/public-album/viewer/components/PublicCommentModal.tsx
+++ b/web/apps/albums/src/public-album/viewer/components/PublicCommentModal.tsx
@@ -7,7 +7,7 @@ import {
styled,
Typography,
} from "@mui/material";
-import { type ModalVisibilityProps } from "ente-base/components/utils/modal";
+import type { ModalVisibilityProps } from "ente-base/components/utils/modal";
import { t } from "i18next";
import React from "react";
diff --git a/web/apps/albums/src/public-album/viewer/components/PublicFeedSidebar.tsx b/web/apps/albums/src/public-album/viewer/components/PublicFeedSidebar.tsx
index c81719034c..84f4ea1f0e 100644
--- a/web/apps/albums/src/public-album/viewer/components/PublicFeedSidebar.tsx
+++ b/web/apps/albums/src/public-album/viewer/components/PublicFeedSidebar.tsx
@@ -20,7 +20,7 @@ import {
} from "@mui/material";
import { useColorScheme } from "@mui/material/styles";
import { useInterval } from "ente-base/components/utils/hooks";
-import { type ModalVisibilityProps } from "ente-base/components/utils/modal";
+import type { ModalVisibilityProps } from "ente-base/components/utils/modal";
import type { PublicAlbumsCredentials } from "ente-base/http";
import log from "ente-base/log";
import { getAvatarColor } from "ente-gallery/utils/avatar-colors";
diff --git a/web/apps/albums/src/public-album/viewer/components/PublicLikeModal.tsx b/web/apps/albums/src/public-album/viewer/components/PublicLikeModal.tsx
index 9ac5430118..64d3006b09 100644
--- a/web/apps/albums/src/public-album/viewer/components/PublicLikeModal.tsx
+++ b/web/apps/albums/src/public-album/viewer/components/PublicLikeModal.tsx
@@ -7,7 +7,7 @@ import {
styled,
Typography,
} from "@mui/material";
-import { type ModalVisibilityProps } from "ente-base/components/utils/modal";
+import type { ModalVisibilityProps } from "ente-base/components/utils/modal";
import { t } from "i18next";
import React from "react";
diff --git a/web/apps/albums/src/shared/hooks/useLoadingBar.ts b/web/apps/albums/src/shared/hooks/useLoadingBar.ts
index c5c7152fed..f0742bb17d 100644
--- a/web/apps/albums/src/shared/hooks/useLoadingBar.ts
+++ b/web/apps/albums/src/shared/hooks/useLoadingBar.ts
@@ -1,5 +1,5 @@
import { useCallback, useRef } from "react";
-import { type LoadingBarRef } from "react-top-loading-bar";
+import type { LoadingBarRef } from "react-top-loading-bar";
/**
* A convenience hook for returning stable functions tied to a
diff --git a/web/apps/embed/src/pages/index.tsx b/web/apps/embed/src/pages/index.tsx
index 0456b556ce..2326f7b50d 100644
--- a/web/apps/embed/src/pages/index.tsx
+++ b/web/apps/embed/src/pages/index.tsx
@@ -18,7 +18,7 @@ import { downloadManager } from "ente-gallery/services/download";
import { extractCollectionKeyFromShareURL } from "ente-gallery/services/share";
import { sortFiles } from "ente-gallery/utils/file";
import type { Collection } from "ente-media/collection";
-import { type EnteFile } from "ente-media/file";
+import type { EnteFile } from "ente-media/file";
import { usePhotosAppContext } from "ente-new/photos/types/context";
import { t } from "i18next";
import { useCallback, useEffect, useRef, useState } from "react";
diff --git a/web/apps/embed/src/services/public-albums-storage.ts b/web/apps/embed/src/services/public-albums-storage.ts
index 4784717c9a..0ab9d7aa5b 100644
--- a/web/apps/embed/src/services/public-albums-storage.ts
+++ b/web/apps/embed/src/services/public-albums-storage.ts
@@ -12,7 +12,7 @@ import {
LocalTimestamp,
transformFilesIfNeeded,
} from "ente-gallery/services/files-db";
-import { type Collection } from "ente-media/collection";
+import type { Collection } from "ente-media/collection";
import type { EnteFile } from "ente-media/file";
import { nullToUndefined } from "ente-utils/transform";
import { z } from "zod";
diff --git a/web/apps/ensu/src/pages/chat.tsx b/web/apps/ensu/src/pages/chat.tsx
index c7ffe9ba61..233b2bad54 100644
--- a/web/apps/ensu/src/pages/chat.tsx
+++ b/web/apps/ensu/src/pages/chat.tsx
@@ -65,7 +65,7 @@ import { getKV, removeKV, setKV } from "ente-base/kv";
import log from "ente-base/log";
import { savedLogs } from "ente-base/log-web";
import { saveStringAsFile } from "ente-base/utils/web";
-import { type NotificationAttributes } from "ente-new/photos/components/Notification";
+import type { NotificationAttributes } from "ente-new/photos/components/Notification";
import { useRouter } from "next/router";
import React, {
useCallback,
diff --git a/web/apps/photos/src/components/ActiveDownloadStatusNotifications.tsx b/web/apps/photos/src/components/ActiveDownloadStatusNotifications.tsx
index 78daab7ee0..6f5d639a02 100644
--- a/web/apps/photos/src/components/ActiveDownloadStatusNotifications.tsx
+++ b/web/apps/photos/src/components/ActiveDownloadStatusNotifications.tsx
@@ -1,5 +1,5 @@
import { useSaveGroups } from "ente-gallery/components/utils/save-groups";
-import { type ComponentProps } from "react";
+import type { ComponentProps } from "react";
import { DownloadStatusNotifications } from "./DownloadStatusNotifications";
type ActiveDownloadStatusNotificationsProps = Omit<
diff --git a/web/apps/photos/src/components/Avatar.tsx b/web/apps/photos/src/components/Avatar.tsx
index 4662428353..b09ddbb49a 100644
--- a/web/apps/photos/src/components/Avatar.tsx
+++ b/web/apps/photos/src/components/Avatar.tsx
@@ -2,7 +2,7 @@
import { styled } from "@mui/material";
import type { LocalUser } from "ente-accounts/services/user";
import { useResolvedContactAvatar } from "ente-contacts-web";
-import { type EnteFile } from "ente-media/file";
+import type { EnteFile } from "ente-media/file";
import {
avatarBackgroundColor,
avatarBackgroundColorPublicCollectedFile,
diff --git a/web/apps/photos/src/components/Collections/CollectionMapDialog.tsx b/web/apps/photos/src/components/Collections/CollectionMapDialog.tsx
index 0325aba626..58a04968e7 100644
--- a/web/apps/photos/src/components/Collections/CollectionMapDialog.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionMapDialog.tsx
@@ -21,8 +21,8 @@ import type { ModalVisibilityProps } from "ente-base/components/utils/modal";
import { useBaseContext } from "ente-base/context";
import { downloadManager } from "ente-gallery/services/download";
import { uniqueFilesByID } from "ente-gallery/utils/file";
-import { type Collection } from "ente-media/collection";
-import { type EnteFile } from "ente-media/file";
+import type { Collection } from "ente-media/collection";
+import type { EnteFile } from "ente-media/file";
import {
fileCreationPhotoSortTime,
fileLocation,
@@ -34,7 +34,7 @@ import {
addToFavoritesCollection,
removeFromFavoritesCollection,
} from "ente-new/photos/services/collection";
-import { type CollectionSummary } from "ente-new/photos/services/collection-summary";
+import type { CollectionSummary } from "ente-new/photos/services/collection-summary";
import { updateFilesVisibility } from "ente-new/photos/services/file";
import {
savedCollectionFiles,
diff --git a/web/apps/photos/src/components/Collections/CollectionShare.tsx b/web/apps/photos/src/components/Collections/CollectionShare.tsx
index 9af8b27c14..faee9d9587 100644
--- a/web/apps/photos/src/components/Collections/CollectionShare.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionShare.tsx
@@ -19,7 +19,7 @@ import WorkspacesIcon from "@mui/icons-material/Workspaces";
import { Dialog, Stack, styled, Typography } from "@mui/material";
import NumberAvatar from "@mui/material/Avatar";
import TextField from "@mui/material/TextField";
-import { type LocalUser } from "ente-accounts/services/user";
+import type { LocalUser } from "ente-accounts/services/user";
import { LoadingButton } from "ente-base/components/mui/LoadingButton";
import {
SidebarDrawer,
diff --git a/web/apps/photos/src/components/Collections/PickCoverPhotoDialog.tsx b/web/apps/photos/src/components/Collections/PickCoverPhotoDialog.tsx
index d18f3ade06..a70f7131a6 100644
--- a/web/apps/photos/src/components/Collections/PickCoverPhotoDialog.tsx
+++ b/web/apps/photos/src/components/Collections/PickCoverPhotoDialog.tsx
@@ -1,4 +1,4 @@
-import { type SelectedState } from "@/utils/file";
+import type { SelectedState } from "@/utils/file";
import CloseIcon from "@mui/icons-material/Close";
import {
Box,
diff --git a/web/apps/photos/src/components/FileList.tsx b/web/apps/photos/src/components/FileList.tsx
index f4e60d85f8..5de8745c3b 100644
--- a/web/apps/photos/src/components/FileList.tsx
+++ b/web/apps/photos/src/components/FileList.tsx
@@ -1,5 +1,5 @@
import Avatar from "@/components/Avatar";
-import { type SelectedState } from "@/utils/file";
+import type { SelectedState } from "@/utils/file";
import {
handleSelectCreator,
handleSelectCreatorMulti,
diff --git a/web/apps/photos/src/components/Upload.tsx b/web/apps/photos/src/components/Upload.tsx
index b3aa3297cc..0273d0c96b 100644
--- a/web/apps/photos/src/components/Upload.tsx
+++ b/web/apps/photos/src/components/Upload.tsx
@@ -53,7 +53,7 @@ import type {
SkippedFile,
ZipItem,
} from "ente-base/types/ipc";
-import { type UploadTypeSelectorIntent } from "ente-gallery/components/Upload";
+import type { UploadTypeSelectorIntent } from "ente-gallery/components/Upload";
import { CanvasReadbackBlockedDialog } from "ente-gallery/components/upload/CanvasReadbackBlockedDialog";
import { UploadProgress } from "ente-gallery/components/UploadProgress";
import { useFileInput } from "ente-gallery/components/utils/use-file-input";
diff --git a/web/apps/photos/src/components/utils/hooks-app.ts b/web/apps/photos/src/components/utils/hooks-app.ts
index 966be39c1d..9f2b1ffc88 100644
--- a/web/apps/photos/src/components/utils/hooks-app.ts
+++ b/web/apps/photos/src/components/utils/hooks-app.ts
@@ -1,4 +1,4 @@
-import { type NotificationAttributes } from "ente-new/photos/components/Notification";
+import type { NotificationAttributes } from "ente-new/photos/components/Notification";
import { useCallback, useState } from "react";
/**
diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsx
index e1302f842f..c73a4ed4c8 100644
--- a/web/apps/photos/src/pages/gallery.tsx
+++ b/web/apps/photos/src/pages/gallery.tsx
@@ -53,11 +53,11 @@ import { savedAuthToken } from "ente-base/token";
import type { Location } from "ente-base/types";
import { ensureContactsReady } from "ente-contacts-web";
import { FullScreenDropZone } from "ente-gallery/components/FullScreenDropZone";
-import { type UploadTypeSelectorIntent } from "ente-gallery/components/Upload";
+import type { UploadTypeSelectorIntent } from "ente-gallery/components/Upload";
import { useSaveGroups } from "ente-gallery/components/utils/save-groups";
-import { type FileViewerInitialSidebar } from "ente-gallery/components/viewer/FileViewer";
+import type { FileViewerInitialSidebar } from "ente-gallery/components/viewer/FileViewer";
import { CollectionSubType, type Collection } from "ente-media/collection";
-import { type EnteFile } from "ente-media/file";
+import type { EnteFile } from "ente-media/file";
import { ItemVisibility, metadataHash } from "ente-media/file-metadata";
import { AssignPersonDialog } from "ente-new/photos/components/AssignPersonDialog";
import {
@@ -151,9 +151,9 @@ import {
filterSearchableFiles,
updateSearchCollectionsAndFiles,
} from "ente-new/photos/services/search";
-import {
- type SearchOption,
- type SidebarActionID,
+import type {
+ SearchOption,
+ SidebarActionID,
} from "ente-new/photos/services/search/types";
import { initSettings } from "ente-new/photos/services/settings";
import {
diff --git a/web/apps/photos/src/services/upload-manager.ts b/web/apps/photos/src/services/upload-manager.ts
index 54a246a927..a2a84faf0e 100644
--- a/web/apps/photos/src/services/upload-manager.ts
+++ b/web/apps/photos/src/services/upload-manager.ts
@@ -3,7 +3,7 @@
import { ensureLocalUser } from "ente-accounts/services/user";
import { isDesktop } from "ente-base/app";
import { createComlinkCryptoWorker } from "ente-base/crypto";
-import { type CryptoWorker } from "ente-base/crypto/worker";
+import type { CryptoWorker } from "ente-base/crypto/worker";
import { lowercaseExtension, nameAndExtension } from "ente-base/file-name";
import log from "ente-base/log";
import { ComlinkWorker } from "ente-base/worker/comlink-worker";
@@ -33,7 +33,7 @@ import UploadService, {
} from "ente-gallery/services/upload/upload-service";
import { processVideoNewUpload } from "ente-gallery/services/video";
import type { Collection } from "ente-media/collection";
-import { type EnteFile } from "ente-media/file";
+import type { EnteFile } from "ente-media/file";
import {
fileCreationTime,
fileLocation,
diff --git a/web/apps/photos/src/services/watch.ts b/web/apps/photos/src/services/watch.ts
index 8785bd645f..bbc87e8c9d 100644
--- a/web/apps/photos/src/services/watch.ts
+++ b/web/apps/photos/src/services/watch.ts
@@ -12,7 +12,7 @@ import type {
FolderWatch,
FolderWatchSyncedFile,
} from "ente-base/types/ipc";
-import { type UploadResult } from "ente-gallery/services/upload";
+import type { UploadResult } from "ente-gallery/services/upload";
import type { UploadAsset } from "ente-gallery/services/upload/upload-service";
import { groupFilesByCollectionID } from "ente-gallery/utils/file";
import type { EnteFile } from "ente-media/file";
diff --git a/web/apps/photos/src/utils/file/index.ts b/web/apps/photos/src/utils/file/index.ts
index b1821fd676..c9c9474916 100644
--- a/web/apps/photos/src/utils/file/index.ts
+++ b/web/apps/photos/src/utils/file/index.ts
@@ -3,8 +3,8 @@ import { downloadAndSaveFiles } from "ente-gallery/services/save";
import type { EnteFile } from "ente-media/file";
import { fileFileName, ItemVisibility } from "ente-media/file-metadata";
import { FileType } from "ente-media/file-type";
-import { type SelectionContext } from "ente-new/photos/components/gallery";
-import { type FileOp } from "ente-new/photos/components/SelectedFileOptions";
+import type { SelectionContext } from "ente-new/photos/components/gallery";
+import type { FileOp } from "ente-new/photos/components/SelectedFileOptions";
import {
addToFavoritesCollection,
deleteFromTrash,
diff --git a/web/apps/share/src/components/file-share/CollectionShareView.tsx b/web/apps/share/src/components/file-share/CollectionShareView.tsx
index 9cddad8217..bf931fde6b 100644
--- a/web/apps/share/src/components/file-share/CollectionShareView.tsx
+++ b/web/apps/share/src/components/file-share/CollectionShareView.tsx
@@ -11,7 +11,7 @@ import { Notification } from "ente-new/photos/components/Notification";
import { t } from "i18next";
import React from "react";
import { useCollectionShare } from "../../hooks/useCollectionShare";
-import { type SharedCollectionItemInfo } from "../../services/collection-share";
+import type { SharedCollectionItemInfo } from "../../services/collection-share";
import { formatFileSize } from "../../services/file-share";
import { getLockerFileIcon } from "../../utils/file-type";
import { PublicShareScaffold } from "./PublicShareScaffold";
diff --git a/web/packages/accounts-rs/components/RecoveryKey.tsx b/web/packages/accounts-rs/components/RecoveryKey.tsx
index 16c8899736..11211a14bf 100644
--- a/web/packages/accounts-rs/components/RecoveryKey.tsx
+++ b/web/packages/accounts-rs/components/RecoveryKey.tsx
@@ -6,7 +6,7 @@ import {
Stack,
Typography,
} from "@mui/material";
-import { type MiniDialogAttributes } from "ente-base/components/MiniDialog";
+import type { MiniDialogAttributes } from "ente-base/components/MiniDialog";
import { SpacedRow } from "ente-base/components/containers";
import { DialogCloseIconButton } from "ente-base/components/mui/DialogCloseIconButton";
import { FocusVisibleButton } from "ente-base/components/mui/FocusVisibleButton";
diff --git a/web/packages/accounts/components/RecoveryKey.tsx b/web/packages/accounts/components/RecoveryKey.tsx
index 16c8899736..11211a14bf 100644
--- a/web/packages/accounts/components/RecoveryKey.tsx
+++ b/web/packages/accounts/components/RecoveryKey.tsx
@@ -6,7 +6,7 @@ import {
Stack,
Typography,
} from "@mui/material";
-import { type MiniDialogAttributes } from "ente-base/components/MiniDialog";
+import type { MiniDialogAttributes } from "ente-base/components/MiniDialog";
import { SpacedRow } from "ente-base/components/containers";
import { DialogCloseIconButton } from "ente-base/components/mui/DialogCloseIconButton";
import { FocusVisibleButton } from "ente-base/components/mui/FocusVisibleButton";
diff --git a/web/packages/base/components/utils/sx.ts b/web/packages/base/components/utils/sx.ts
index e3f0cf301e..ea837681b5 100644
--- a/web/packages/base/components/utils/sx.ts
+++ b/web/packages/base/components/utils/sx.ts
@@ -1,5 +1,5 @@
-import { type SxProps, type Theme } from "@mui/material";
-import { type SystemStyleObject } from "@mui/system";
+import type { SxProps, Theme } from "@mui/material";
+import type { SystemStyleObject } from "@mui/system";
/**
* Wrapper over Array.isArray that retains the TypeScript type for SxProps when
diff --git a/web/packages/base/crypto/types.ts b/web/packages/base/crypto/types.ts
index 55dfe7a79b..049fe45a47 100644
--- a/web/packages/base/crypto/types.ts
+++ b/web/packages/base/crypto/types.ts
@@ -2,7 +2,7 @@
* @file types shared between the public API (main thread) and implementation
* (worker thread). Also some constants, but no code.
*/
-import { type StateAddress } from "libsodium-wrappers-sumo";
+import type { StateAddress } from "libsodium-wrappers-sumo";
/**
* An opaque object meant to be threaded through various functions that deal
diff --git a/web/packages/build-config/eslintrc-base.mjs b/web/packages/build-config/eslintrc-base.mjs
index 7bdaf512d3..487a7d7ec2 100644
--- a/web/packages/build-config/eslintrc-base.mjs
+++ b/web/packages/build-config/eslintrc-base.mjs
@@ -14,6 +14,7 @@ export default tseslint.config(
{ ignores: ["eslint.config.mjs"] },
{
rules: {
+ "@typescript-eslint/no-import-type-side-effects": "error",
// Allow numbers to be used in template literals.
"@typescript-eslint/restrict-template-expressions": [
"error",
diff --git a/web/packages/contacts/legacy/components/ActionButton.tsx b/web/packages/contacts/legacy/components/ActionButton.tsx
index d2305b6e1c..3477369cc4 100644
--- a/web/packages/contacts/legacy/components/ActionButton.tsx
+++ b/web/packages/contacts/legacy/components/ActionButton.tsx
@@ -1,4 +1,4 @@
-import { type ButtonProps } from "@mui/material";
+import type { ButtonProps } from "@mui/material";
import { LoadingButton } from "ente-base/components/mui/LoadingButton";
import { isSxArray } from "ente-base/components/utils/sx";
import React from "react";
diff --git a/web/packages/gallery/components/FileInfo.tsx b/web/packages/gallery/components/FileInfo.tsx
index 79704a968f..e1e91d19b4 100644
--- a/web/packages/gallery/components/FileInfo.tsx
+++ b/web/packages/gallery/components/FileInfo.tsx
@@ -38,7 +38,7 @@ import {
type DialogProps,
} from "@mui/material";
import { LinkButtonUndecorated } from "ente-base/components/LinkButton";
-import { type ButtonishProps } from "ente-base/components/mui";
+import type { ButtonishProps } from "ente-base/components/mui";
import { ActivityIndicator } from "ente-base/components/mui/ActivityIndicator";
import {
SidebarDrawer,
@@ -59,7 +59,7 @@ import type { Location } from "ente-base/types";
import { CopyButton } from "ente-gallery/components/FileInfoComponents";
import { tagNumericValue, type RawExifTags } from "ente-gallery/services/exif";
import { formattedByteSize } from "ente-gallery/utils/units";
-import { type EnteFile } from "ente-media/file";
+import type { EnteFile } from "ente-media/file";
import {
fileCreationPhotoDate,
fileFileName,
diff --git a/web/packages/gallery/components/upload/CanvasReadbackBlockedDialog.tsx b/web/packages/gallery/components/upload/CanvasReadbackBlockedDialog.tsx
index 24aaed5ffe..5c01cade8f 100644
--- a/web/packages/gallery/components/upload/CanvasReadbackBlockedDialog.tsx
+++ b/web/packages/gallery/components/upload/CanvasReadbackBlockedDialog.tsx
@@ -9,7 +9,7 @@ import {
Typography,
type DialogProps,
} from "@mui/material";
-import { type ModalVisibilityProps } from "ente-base/components/utils/modal";
+import type { ModalVisibilityProps } from "ente-base/components/utils/modal";
import { t } from "i18next";
import React from "react";
diff --git a/web/packages/gallery/components/viewer/CommentsSidebar.tsx b/web/packages/gallery/components/viewer/CommentsSidebar.tsx
index 40da21a733..7e5b3c795f 100644
--- a/web/packages/gallery/components/viewer/CommentsSidebar.tsx
+++ b/web/packages/gallery/components/viewer/CommentsSidebar.tsx
@@ -12,7 +12,7 @@ import {
TextField,
Typography,
} from "@mui/material";
-import { type ModalVisibilityProps } from "ente-base/components/utils/modal";
+import type { ModalVisibilityProps } from "ente-base/components/utils/modal";
import log from "ente-base/log";
import {
useResolvedContactAvatar,
@@ -32,7 +32,7 @@ import {
addCommentReaction,
deleteReaction,
} from "ente-new/photos/services/reaction";
-import { type UnifiedReaction } from "ente-new/photos/services/social";
+import type { UnifiedReaction } from "ente-new/photos/services/social";
import i18n, { t } from "i18next";
import React, {
useCallback,
diff --git a/web/packages/gallery/components/viewer/FileViewer.tsx b/web/packages/gallery/components/viewer/FileViewer.tsx
index 3df9e7d21f..28297e7260 100644
--- a/web/packages/gallery/components/viewer/FileViewer.tsx
+++ b/web/packages/gallery/components/viewer/FileViewer.tsx
@@ -29,7 +29,7 @@ import { DialogCloseIconButton } from "ente-base/components/mui/DialogCloseIconB
import { FocusVisibleButton } from "ente-base/components/mui/FocusVisibleButton";
import { LoadingButton } from "ente-base/components/mui/LoadingButton";
import { useInterval, useIsSmallWidth } from "ente-base/components/utils/hooks";
-import { type ModalVisibilityProps } from "ente-base/components/utils/modal";
+import type { ModalVisibilityProps } from "ente-base/components/utils/modal";
import { useBaseContext } from "ente-base/context";
import { lowercaseExtension } from "ente-base/file-name";
import { formattedListJoin, ut } from "ente-base/i18n";
@@ -54,7 +54,7 @@ import {
} from "ente-new/photos/components/ImageEditorOverlay";
import { getCollectionByID } from "ente-new/photos/services/collection";
import type { CollectionSummaries } from "ente-new/photos/services/collection-summary";
-import { type Comment } from "ente-new/photos/services/comment";
+import type { Comment } from "ente-new/photos/services/comment";
import { addReaction, deleteReaction } from "ente-new/photos/services/reaction";
import {
getAnonProfiles,
diff --git a/web/packages/gallery/components/viewer/LikeAlbumSelectorModal.tsx b/web/packages/gallery/components/viewer/LikeAlbumSelectorModal.tsx
index d76f41d9dc..264e8310c8 100644
--- a/web/packages/gallery/components/viewer/LikeAlbumSelectorModal.tsx
+++ b/web/packages/gallery/components/viewer/LikeAlbumSelectorModal.tsx
@@ -1,6 +1,6 @@
import CloseIcon from "@mui/icons-material/Close";
import { Box, Dialog, IconButton, styled, Typography } from "@mui/material";
-import { type ModalVisibilityProps } from "ente-base/components/utils/modal";
+import type { ModalVisibilityProps } from "ente-base/components/utils/modal";
import { t } from "i18next";
import React from "react";
diff --git a/web/packages/gallery/components/viewer/LikesSidebar.tsx b/web/packages/gallery/components/viewer/LikesSidebar.tsx
index 7aa0d69a7a..2424f38d51 100644
--- a/web/packages/gallery/components/viewer/LikesSidebar.tsx
+++ b/web/packages/gallery/components/viewer/LikesSidebar.tsx
@@ -9,14 +9,14 @@ import {
styled,
Typography,
} from "@mui/material";
-import { type ModalVisibilityProps } from "ente-base/components/utils/modal";
+import type { ModalVisibilityProps } from "ente-base/components/utils/modal";
import log from "ente-base/log";
import { useResolvedContactAvatar } from "ente-contacts-web";
import { downloadManager } from "ente-gallery/services/download";
import { getAvatarColor } from "ente-gallery/utils/avatar-colors";
import type { EnteFile } from "ente-media/file";
import type { CollectionSummaries } from "ente-new/photos/services/collection-summary";
-import { type UnifiedReaction } from "ente-new/photos/services/social";
+import type { UnifiedReaction } from "ente-new/photos/services/social";
import { t } from "i18next";
import React, {
useCallback,
diff --git a/web/packages/gallery/components/viewer/photoswipe-core.ts b/web/packages/gallery/components/viewer/photoswipe-core.ts
index 9b72a9104f..79987486bc 100644
--- a/web/packages/gallery/components/viewer/photoswipe-core.ts
+++ b/web/packages/gallery/components/viewer/photoswipe-core.ts
@@ -8,7 +8,7 @@ import { MediaMuteButton } from "media-chrome";
import "media-chrome/menu";
import { MediaChromeMenu, MediaChromeMenuButton } from "media-chrome/menu";
import PhotoSwipe, { type SlideData } from "photoswipe";
-import { type ItemData, type ItemDataOpts } from "./data-source-core";
+import type { ItemData, ItemDataOpts } from "./data-source-core";
import {
commentSVGPath,
createPSRegisterElementIconHTML,
diff --git a/web/packages/gallery/services/save.ts b/web/packages/gallery/services/save.ts
index 2062922b62..ffb922d571 100644
--- a/web/packages/gallery/services/save.ts
+++ b/web/packages/gallery/services/save.ts
@@ -2,7 +2,7 @@ import { assertionFailed } from "ente-base/assert";
import { suppressMainWindowBlurForTrustedPrompt } from "ente-base/electron";
import { joinPath } from "ente-base/file-name";
import log from "ente-base/log";
-import { type Electron } from "ente-base/types/ipc";
+import type { Electron } from "ente-base/types/ipc";
import { downloadManager } from "ente-gallery/services/download";
import { writeStream } from "ente-gallery/utils/native-stream";
import type { EnteFile } from "ente-media/file";
diff --git a/web/packages/gallery/services/upload/metadata-json.ts b/web/packages/gallery/services/upload/metadata-json.ts
index 17b348e865..fa3192a9e0 100644
--- a/web/packages/gallery/services/upload/metadata-json.ts
+++ b/web/packages/gallery/services/upload/metadata-json.ts
@@ -3,7 +3,7 @@
import { ensureElectron } from "ente-base/electron";
import { nameAndExtension } from "ente-base/file-name";
import log from "ente-base/log";
-import { type Location } from "ente-base/types";
+import type { Location } from "ente-base/types";
import type {
UploadItem,
UploadPathPrefix,
diff --git a/web/packages/gallery/services/upload/thumbnail.ts b/web/packages/gallery/services/upload/thumbnail.ts
index 67e5df36af..178b9fa2df 100644
--- a/web/packages/gallery/services/upload/thumbnail.ts
+++ b/web/packages/gallery/services/upload/thumbnail.ts
@@ -1,5 +1,5 @@
import log from "ente-base/log";
-import { type Electron } from "ente-base/types/ipc";
+import type { Electron } from "ente-base/types/ipc";
import * as ffmpeg from "ente-gallery/services/ffmpeg";
import {
toPathOrZipEntry,
diff --git a/web/packages/gallery/services/upload/upload-service.ts b/web/packages/gallery/services/upload/upload-service.ts
index f8d784b6dd..c2b2d09ccd 100644
--- a/web/packages/gallery/services/upload/upload-service.ts
+++ b/web/packages/gallery/services/upload/upload-service.ts
@@ -3,7 +3,7 @@
import type { BytesOrB64 } from "ente-base/crypto/types";
import { streamEncryptionChunkSize } from "ente-base/crypto/types";
-import { type CryptoWorker } from "ente-base/crypto/worker";
+import type { CryptoWorker } from "ente-base/crypto/worker";
import { ensureElectron } from "ente-base/electron";
import { basename, nameAndExtension } from "ente-base/file-name";
import {
diff --git a/web/packages/media/file-metadata.ts b/web/packages/media/file-metadata.ts
index 233e3cc4bd..2abdaa3e03 100644
--- a/web/packages/media/file-metadata.ts
+++ b/web/packages/media/file-metadata.ts
@@ -1,5 +1,5 @@
-import { type Location } from "ente-base/types";
-import { type EnteFile } from "ente-media/file";
+import type { Location } from "ente-base/types";
+import type { EnteFile } from "ente-media/file";
import { nullToUndefined } from "ente-utils/transform";
import { z } from "zod";
import { FileType } from "./file-type";
diff --git a/web/packages/new/photos/components/Export.tsx b/web/packages/new/photos/components/Export.tsx
index 0d14aac739..0815c2238b 100644
--- a/web/packages/new/photos/components/Export.tsx
+++ b/web/packages/new/photos/components/Export.tsx
@@ -35,7 +35,7 @@ import { ensureElectron } from "ente-base/electron";
import { formattedNumber } from "ente-base/i18n";
import { formattedDateTime } from "ente-base/i18n-date";
import log from "ente-base/log";
-import { type EnteFile } from "ente-media/file";
+import type { EnteFile } from "ente-media/file";
import { fileFileName } from "ente-media/file-metadata";
import { ItemCard, PreviewItemTile } from "ente-new/photos/components/Tiles";
import { t } from "i18next";
diff --git a/web/packages/new/photos/components/Tiles.tsx b/web/packages/new/photos/components/Tiles.tsx
index f2b4e83286..30c3782c00 100644
--- a/web/packages/new/photos/components/Tiles.tsx
+++ b/web/packages/new/photos/components/Tiles.tsx
@@ -4,7 +4,7 @@ import { CenteredFill, Overlay } from "ente-base/components/containers";
import type { ButtonishProps } from "ente-base/components/mui";
import log from "ente-base/log";
import { downloadManager } from "ente-gallery/services/download";
-import { type EnteFile } from "ente-media/file";
+import type { EnteFile } from "ente-media/file";
import {
LoadingThumbnail,
StaticThumbnail,
diff --git a/web/packages/new/photos/components/gallery/PeopleHeader.tsx b/web/packages/new/photos/components/gallery/PeopleHeader.tsx
index ea5eba62ed..d194766790 100644
--- a/web/packages/new/photos/components/gallery/PeopleHeader.tsx
+++ b/web/packages/new/photos/components/gallery/PeopleHeader.tsx
@@ -53,13 +53,13 @@ import {
suggestionsAndChoicesForPerson,
unpinCGroup,
} from "ente-new/photos/services/ml";
-import {
- type CGroupPerson,
- type ClusterPerson,
- type Person,
- type PersonSuggestionsAndChoices,
- type PersonSuggestionUpdates,
- type PreviewableCluster,
+import type {
+ CGroupPerson,
+ ClusterPerson,
+ Person,
+ PersonSuggestionsAndChoices,
+ PersonSuggestionUpdates,
+ PreviewableCluster,
} from "ente-new/photos/services/ml/people";
import { t } from "i18next";
import React, { useEffect, useReducer, useState } from "react";
diff --git a/web/packages/new/photos/components/gallery/helpers.ts b/web/packages/new/photos/components/gallery/helpers.ts
index 2af67edd10..5328d581c2 100644
--- a/web/packages/new/photos/components/gallery/helpers.ts
+++ b/web/packages/new/photos/components/gallery/helpers.ts
@@ -12,9 +12,9 @@
import { getUserRecoveryKey } from "ente-accounts/services/recovery-key";
import log from "ente-base/log";
-import { type Collection } from "ente-media/collection";
-import { type EnteFile } from "ente-media/file";
-import { type CollectionOp } from "ente-new/photos/components/SelectedFileOptions";
+import type { Collection } from "ente-media/collection";
+import type { EnteFile } from "ente-media/file";
+import type { CollectionOp } from "ente-new/photos/components/SelectedFileOptions";
import {
addOrCopyToCollection,
moveFromCollection,
diff --git a/web/packages/new/photos/components/gallery/index.tsx b/web/packages/new/photos/components/gallery/index.tsx
index c2c66e2c87..aead92422a 100644
--- a/web/packages/new/photos/components/gallery/index.tsx
+++ b/web/packages/new/photos/components/gallery/index.tsx
@@ -25,7 +25,7 @@ import { EnteLogo } from "ente-base/components/EnteLogo";
import { FocusVisibleButton } from "ente-base/components/mui/FocusVisibleButton";
import { OverflowMenuOption } from "ente-base/components/OverflowMenu";
import { useModalVisibility } from "ente-base/components/utils/modal";
-import { type UploadTypeSelectorIntent } from "ente-gallery/components/Upload";
+import type { UploadTypeSelectorIntent } from "ente-gallery/components/Upload";
import type { SearchSuggestion } from "ente-new/photos/services/search/types";
import { t } from "i18next";
import React, { useRef, useState } from "react";
diff --git a/web/packages/new/photos/components/gallery/reducer.ts b/web/packages/new/photos/components/gallery/reducer.ts
index 5e5f60cc2b..086a78f21a 100644
--- a/web/packages/new/photos/components/gallery/reducer.ts
+++ b/web/packages/new/photos/components/gallery/reducer.ts
@@ -1,4 +1,4 @@
-import { type LocalUser } from "ente-accounts/services/user";
+import type { LocalUser } from "ente-accounts/services/user";
import {
groupFilesByCollectionID,
sortFiles,
diff --git a/web/packages/new/photos/components/utils/use-loading-bar.ts b/web/packages/new/photos/components/utils/use-loading-bar.ts
index c5c7152fed..f0742bb17d 100644
--- a/web/packages/new/photos/components/utils/use-loading-bar.ts
+++ b/web/packages/new/photos/components/utils/use-loading-bar.ts
@@ -1,5 +1,5 @@
import { useCallback, useRef } from "react";
-import { type LoadingBarRef } from "react-top-loading-bar";
+import type { LoadingBarRef } from "react-top-loading-bar";
/**
* A convenience hook for returning stable functions tied to a
diff --git a/web/packages/new/photos/services/ml/crop.ts b/web/packages/new/photos/services/ml/crop.ts
index b6dcf31cfe..b9b939b945 100644
--- a/web/packages/new/photos/services/ml/crop.ts
+++ b/web/packages/new/photos/services/ml/crop.ts
@@ -1,7 +1,7 @@
import { blobCache } from "ente-base/blob-cache";
import type { EnteFile } from "ente-media/file";
import { fetchRenderableEnteFileBlob } from "./blob";
-import { type Box, type FaceIndex } from "./face";
+import type { Box, FaceIndex } from "./face";
import { clamp } from "./math";
/**
diff --git a/web/packages/new/photos/services/ml/index.ts b/web/packages/new/photos/services/ml/index.ts
index e866a6dc50..c2421f0c12 100644
--- a/web/packages/new/photos/services/ml/index.ts
+++ b/web/packages/new/photos/services/ml/index.ts
@@ -10,7 +10,7 @@ import { ensureElectron } from "ente-base/electron";
import log from "ente-base/log";
import { ensureMasterKeyFromSession } from "ente-base/session";
import { ComlinkWorker } from "ente-base/worker/comlink-worker";
-import { type ProcessableUploadItem } from "ente-gallery/services/upload";
+import type { ProcessableUploadItem } from "ente-gallery/services/upload";
import { createUtilityProcess } from "ente-gallery/utils/native-worker";
import type { EnteFile } from "ente-media/file";
import { FileType } from "ente-media/file-type";
diff --git a/web/packages/new/photos/services/ml/ml-data.ts b/web/packages/new/photos/services/ml/ml-data.ts
index 6d04b619f9..ab2801be2f 100644
--- a/web/packages/new/photos/services/ml/ml-data.ts
+++ b/web/packages/new/photos/services/ml/ml-data.ts
@@ -5,8 +5,8 @@ import type { EnteFile } from "ente-media/file";
import { nullToUndefined } from "ente-utils/transform";
import { z } from "zod";
import { gunzip, gzip } from "../../utils/gzip";
-import { type RemoteCLIPIndex } from "./clip";
-import { type RemoteFaceIndex } from "./face";
+import type { RemoteCLIPIndex } from "./clip";
+import type { RemoteFaceIndex } from "./face";
/**
* The decrypted payload of a {@link RemoteFileData} for the "mldata"
diff --git a/web/packages/new/photos/services/photos-fdb.ts b/web/packages/new/photos/services/photos-fdb.ts
index 2b49a16bfd..2324558aa7 100644
--- a/web/packages/new/photos/services/photos-fdb.ts
+++ b/web/packages/new/photos/services/photos-fdb.ts
@@ -9,8 +9,8 @@ import {
LocalTimestamp,
transformFilesIfNeeded,
} from "ente-gallery/services/files-db";
-import { type Collection } from "ente-media/collection";
-import { type EnteFile } from "ente-media/file";
+import type { Collection } from "ente-media/collection";
+import type { EnteFile } from "ente-media/file";
import { z } from "zod";
import type { TrashItem } from "./trash";
diff --git a/web/packages/new/photos/services/user-entity/db.ts b/web/packages/new/photos/services/user-entity/db.ts
index 7558acee55..1b2e37a7cb 100644
--- a/web/packages/new/photos/services/user-entity/db.ts
+++ b/web/packages/new/photos/services/user-entity/db.ts
@@ -1,6 +1,6 @@
import { getKV, getKVN, setKV } from "ente-base/kv";
import { z } from "zod";
-import { type EntityType } from ".";
+import type { EntityType } from ".";
import { RemoteUserEntityKey } from "./remote";
// Our DB footprint---
diff --git a/web/packages/new/photos/types/context.ts b/web/packages/new/photos/types/context.ts
index 15ced6b718..39190a8d78 100644
--- a/web/packages/new/photos/types/context.ts
+++ b/web/packages/new/photos/types/context.ts
@@ -1,4 +1,4 @@
-import { type NotificationAttributes } from "ente-new/photos/components/Notification";
+import type { NotificationAttributes } from "ente-new/photos/components/Notification";
import { createContext, useContext } from "react";
/**