diff --git a/__tests__/set.test.ts b/__tests__/set.test.ts index 0e0a8b9c..f0c06520 100644 --- a/__tests__/set.test.ts +++ b/__tests__/set.test.ts @@ -1,7 +1,7 @@ import { DEFAULT_CATEGORY_KEYS, getOrderedCategoriesFromString, -} from '@/category/set'; +} from '@/category'; describe('set', () => { it('parses from string', () => { diff --git a/app/film/[simulation]/image/route.tsx b/app/film/[simulation]/image/route.tsx index af58b864..6b522eb5 100644 --- a/app/film/[simulation]/image/route.tsx +++ b/app/film/[simulation]/image/route.tsx @@ -11,7 +11,7 @@ import { ImageResponse } from 'next/og'; import { getImageResponseCacheControlHeaders } from '@/image-response/cache'; import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db'; import { getUniqueFilmSimulations } from '@/photo/db/query'; -import { shouldGenerateStaticParamsForCategory } from '@/category/set'; +import { shouldGenerateStaticParamsForCategory } from '@/category'; export let generateStaticParams: (() => Promise<{ simulation: FilmSimulation }[]>) | undefined = undefined; diff --git a/app/film/[simulation]/page.tsx b/app/film/[simulation]/page.tsx index eebe848a..f66c28f6 100644 --- a/app/film/[simulation]/page.tsx +++ b/app/film/[simulation]/page.tsx @@ -7,7 +7,7 @@ import { Metadata } from 'next/types'; import { cache } from 'react'; import { PATH_ROOT } from '@/app/paths'; import { redirect } from 'next/navigation'; -import { shouldGenerateStaticParamsForCategory } from '@/category/set'; +import { shouldGenerateStaticParamsForCategory } from '@/category'; import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db'; const getPhotosFilmSimulationDataCachedCached = cache(getPhotosFilmSimulationDataCached); diff --git a/app/focal/[focal]/image/route.tsx b/app/focal/[focal]/image/route.tsx index b2a3d261..e5904c4a 100644 --- a/app/focal/[focal]/image/route.tsx +++ b/app/focal/[focal]/image/route.tsx @@ -11,7 +11,7 @@ import FocalLengthImageResponse from import { formatFocalLength, getFocalLengthFromString } from '@/focal'; import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db'; import { getUniqueFocalLengths } from '@/photo/db/query'; -import { shouldGenerateStaticParamsForCategory } from '@/category/set'; +import { shouldGenerateStaticParamsForCategory } from '@/category'; export let generateStaticParams: (() => Promise<{ focal: string }[]>) | undefined = undefined; diff --git a/app/focal/[focal]/page.tsx b/app/focal/[focal]/page.tsx index ab7fa33c..b08b496c 100644 --- a/app/focal/[focal]/page.tsx +++ b/app/focal/[focal]/page.tsx @@ -7,7 +7,7 @@ import { PATH_ROOT } from '@/app/paths'; import type { Metadata } from 'next'; import { redirect } from 'next/navigation'; import { cache } from 'react'; -import { shouldGenerateStaticParamsForCategory } from '@/category/set'; +import { shouldGenerateStaticParamsForCategory } from '@/category'; import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db'; const getPhotosFocalDataCachedCached = cache((focal: number) => diff --git a/app/lens/[make]/[model]/image/route.tsx b/app/lens/[make]/[model]/image/route.tsx index 50da7014..bc2621f8 100644 --- a/app/lens/[make]/[model]/image/route.tsx +++ b/app/lens/[make]/[model]/image/route.tsx @@ -15,7 +15,7 @@ import { safelyGenerateLensStaticParams, } from '@/lens'; import LensImageResponse from '@/image-response/LensImageResponse'; -import { shouldGenerateStaticParamsForCategory } from '@/category/set'; +import { shouldGenerateStaticParamsForCategory } from '@/category'; export let generateStaticParams: (() => Promise) | undefined = undefined; diff --git a/app/lens/[make]/[model]/page.tsx b/app/lens/[make]/[model]/page.tsx index d37f4423..2eca315b 100644 --- a/app/lens/[make]/[model]/page.tsx +++ b/app/lens/[make]/[model]/page.tsx @@ -12,7 +12,7 @@ import { safelyGenerateLensStaticParams, } from '@/lens'; import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db'; -import { shouldGenerateStaticParamsForCategory } from '@/category/set'; +import { shouldGenerateStaticParamsForCategory } from '@/category'; const getPhotosLensDataCachedCached = cache(( make: string | undefined, diff --git a/app/recipe/[recipe]/image/route.tsx b/app/recipe/[recipe]/image/route.tsx index f0a1c757..c95767e4 100644 --- a/app/recipe/[recipe]/image/route.tsx +++ b/app/recipe/[recipe]/image/route.tsx @@ -9,7 +9,7 @@ import { getImageResponseCacheControlHeaders } from '@/image-response/cache'; import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db'; import { getUniqueRecipes } from '@/photo/db/query'; import RecipeImageResponse from '@/image-response/RecipeImageResponse'; -import { shouldGenerateStaticParamsForCategory } from '@/category/set'; +import { shouldGenerateStaticParamsForCategory } from '@/category'; export let generateStaticParams: (() => Promise<{ recipe: string }[]>) | undefined = undefined; diff --git a/app/recipe/[recipe]/page.tsx b/app/recipe/[recipe]/page.tsx index 559da2c0..c9bfa2db 100644 --- a/app/recipe/[recipe]/page.tsx +++ b/app/recipe/[recipe]/page.tsx @@ -7,7 +7,7 @@ import { cache } from 'react'; import { generateMetaForRecipe } from '@/recipe'; import RecipeOverview from '@/recipe/RecipeOverview'; import { getPhotosRecipeDataCached } from '@/recipe/data'; -import { shouldGenerateStaticParamsForCategory } from '@/category/set'; +import { shouldGenerateStaticParamsForCategory } from '@/category'; import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db'; const getPhotosRecipeDataCachedCached = cache(getPhotosRecipeDataCached); diff --git a/app/shot-on/[make]/[model]/image/route.tsx b/app/shot-on/[make]/[model]/image/route.tsx index dcb4278b..946c0f38 100644 --- a/app/shot-on/[make]/[model]/image/route.tsx +++ b/app/shot-on/[make]/[model]/image/route.tsx @@ -10,7 +10,7 @@ import { ImageResponse } from 'next/og'; import { getImageResponseCacheControlHeaders } from '@/image-response/cache'; import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db'; import { getUniqueCameras } from '@/photo/db/query'; -import { shouldGenerateStaticParamsForCategory } from '@/category/set'; +import { shouldGenerateStaticParamsForCategory } from '@/category'; export let generateStaticParams: (() => Promise<{ camera: Camera }[]>) | undefined = undefined; diff --git a/app/shot-on/[make]/[model]/page.tsx b/app/shot-on/[make]/[model]/page.tsx index f2f3733d..e4680731 100644 --- a/app/shot-on/[make]/[model]/page.tsx +++ b/app/shot-on/[make]/[model]/page.tsx @@ -6,7 +6,7 @@ import { getPhotosCameraDataCached } from '@/camera/data'; import CameraOverview from '@/camera/CameraOverview'; import { cache } from 'react'; import { getUniqueCameras } from '@/photo/db/query'; -import { shouldGenerateStaticParamsForCategory } from '@/category/set'; +import { shouldGenerateStaticParamsForCategory } from '@/category'; import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db'; const getPhotosCameraDataCachedCached = cache(( diff --git a/app/tag/[tag]/image/route.tsx b/app/tag/[tag]/image/route.tsx index 16df27c6..1016c71b 100644 --- a/app/tag/[tag]/image/route.tsx +++ b/app/tag/[tag]/image/route.tsx @@ -9,7 +9,7 @@ import { ImageResponse } from 'next/og'; import { getImageResponseCacheControlHeaders } from '@/image-response/cache'; import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db'; import { getUniqueTags } from '@/photo/db/query'; -import { shouldGenerateStaticParamsForCategory } from '@/category/set'; +import { shouldGenerateStaticParamsForCategory } from '@/category'; export let generateStaticParams: (() => Promise<{ tag: string }[]>) | undefined = undefined; diff --git a/app/tag/[tag]/page.tsx b/app/tag/[tag]/page.tsx index bc358c1b..b1d003ba 100644 --- a/app/tag/[tag]/page.tsx +++ b/app/tag/[tag]/page.tsx @@ -7,7 +7,7 @@ import { getPhotosTagDataCached } from '@/tag/data'; import type { Metadata } from 'next'; import { redirect } from 'next/navigation'; import { cache } from 'react'; -import { shouldGenerateStaticParamsForCategory } from '@/category/set'; +import { shouldGenerateStaticParamsForCategory } from '@/category'; import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db'; const getPhotosTagDataCachedCached = cache((tag: string) => diff --git a/src/admin/AdminAppConfigurationClient.tsx b/src/admin/AdminAppConfigurationClient.tsx index c3381b23..e286e57c 100644 --- a/src/admin/AdminAppConfigurationClient.tsx +++ b/src/admin/AdminAppConfigurationClient.tsx @@ -30,7 +30,7 @@ import EnvVar from '@/components/EnvVar'; import AdminLink from './AdminLink'; import ScoreCardContainer from '@/components/ScoreCardContainer'; import { capitalize, deparameterize } from '@/utility/string'; -import { DEFAULT_CATEGORY_KEYS, getHiddenCategories } from '@/category/set'; +import { DEFAULT_CATEGORY_KEYS, getHiddenCategories } from '@/category'; export default function AdminAppConfigurationClient({ // Storage diff --git a/src/app/config.ts b/src/app/config.ts index 2173616f..3b27af06 100644 --- a/src/app/config.ts +++ b/src/app/config.ts @@ -2,7 +2,7 @@ import { AI_AUTO_GENERATED_FIELDS_DEFAULT, parseAiAutoGeneratedFieldsString, } from '@/photo/ai'; -import { getOrderedCategoriesFromString } from '@/category/set'; +import { getOrderedCategoriesFromString } from '@/category'; import type { StorageType } from '@/platforms/storage'; import { makeUrlAbsolute, shortenUrl } from '@/utility/url'; diff --git a/src/app/paths.ts b/src/app/paths.ts index 59867eeb..95e6dd0d 100644 --- a/src/app/paths.ts +++ b/src/app/paths.ts @@ -1,5 +1,5 @@ import { Photo } from '@/photo'; -import { PhotoSetCategory } from '@/category/set'; +import { PhotoSetCategory } from '@/category'; import { BASE_URL, GRID_HOMEPAGE_ENABLED } from './config'; import { Camera } from '@/camera'; import { FilmSimulation } from '@/simulation'; diff --git a/src/camera/CameraShareModal.tsx b/src/camera/CameraShareModal.tsx index a6837f0b..a4d0d532 100644 --- a/src/camera/CameraShareModal.tsx +++ b/src/camera/CameraShareModal.tsx @@ -1,5 +1,5 @@ import { absolutePathForCamera } from '@/app/paths'; -import { PhotoSetAttributes } from '../category/set'; +import { PhotoSetAttributes } from '../category'; import ShareModal from '@/share/ShareModal'; import CameraOGTile from './CameraOGTile'; import { Camera } from '.'; diff --git a/src/category/set.ts b/src/category/index.ts similarity index 100% rename from src/category/set.ts rename to src/category/index.ts diff --git a/src/components/cmdk/CommandKClient.tsx b/src/components/cmdk/CommandKClient.tsx index aad35eb8..33bb41cb 100644 --- a/src/components/cmdk/CommandKClient.tsx +++ b/src/components/cmdk/CommandKClient.tsx @@ -56,7 +56,7 @@ import { CATEGORY_VISIBILITY, GRID_HOMEPAGE_ENABLED } from '@/app/config'; import { DialogDescription, DialogTitle } from '@radix-ui/react-dialog'; import * as VisuallyHidden from '@radix-ui/react-visually-hidden'; import InsightsIndicatorDot from '@/admin/insights/InsightsIndicatorDot'; -import { PhotoSetCategories } from '@/category/set'; +import { PhotoSetCategories } from '@/category'; import { formatCameraText } from '@/camera'; import { labelForFilmSimulation } from '@/platforms/fujifilm/simulation'; import { formatFocalLength } from '@/focal'; diff --git a/src/focal/FocalLengthShareModal.tsx b/src/focal/FocalLengthShareModal.tsx index 58e95834..5a8028e4 100644 --- a/src/focal/FocalLengthShareModal.tsx +++ b/src/focal/FocalLengthShareModal.tsx @@ -1,5 +1,5 @@ import { absolutePathForFocalLength } from '@/app/paths'; -import { PhotoSetAttributes } from '../category/set'; +import { PhotoSetAttributes } from '../category'; import ShareModal from '@/share/ShareModal'; import FocalLengthOGTile from './FocalLengthOGTile'; import { shareTextFocalLength } from '.'; diff --git a/src/lens/LensShareModal.tsx b/src/lens/LensShareModal.tsx index 4c32cfad..5e0705f4 100644 --- a/src/lens/LensShareModal.tsx +++ b/src/lens/LensShareModal.tsx @@ -1,5 +1,5 @@ import { absolutePathForLens } from '@/app/paths'; -import { PhotoSetAttributes } from '../category/set'; +import { PhotoSetAttributes } from '../category'; import ShareModal from '@/share/ShareModal'; import { Lens } from '.'; import { shareTextForLens } from './meta'; diff --git a/src/photo/InfinitePhotoScroll.tsx b/src/photo/InfinitePhotoScroll.tsx index bc9621f3..e0de4f00 100644 --- a/src/photo/InfinitePhotoScroll.tsx +++ b/src/photo/InfinitePhotoScroll.tsx @@ -12,7 +12,7 @@ import SiteGrid from '@/components/SiteGrid'; import Spinner from '@/components/Spinner'; import { getPhotosCachedAction, getPhotosAction } from '@/photo/actions'; import { Photo } from '.'; -import { PhotoSetCategory } from '../category/set'; +import { PhotoSetCategory } from '../category'; import { clsx } from 'clsx/lite'; import { useAppState } from '@/state/AppState'; import { GetPhotosOptions } from './db'; diff --git a/src/photo/PhotoDetailPage.tsx b/src/photo/PhotoDetailPage.tsx index 56847847..6f32765e 100644 --- a/src/photo/PhotoDetailPage.tsx +++ b/src/photo/PhotoDetailPage.tsx @@ -1,6 +1,6 @@ import AnimateItems from '@/components/AnimateItems'; import { Photo, PhotoDateRange } from '.'; -import { PhotoSetCategory } from '../category/set'; +import { PhotoSetCategory } from '../category'; import PhotoLarge from './PhotoLarge'; import SiteGrid from '@/components/SiteGrid'; import PhotoGrid from './PhotoGrid'; diff --git a/src/photo/PhotoGrid.tsx b/src/photo/PhotoGrid.tsx index 8aef261e..7c0846ad 100644 --- a/src/photo/PhotoGrid.tsx +++ b/src/photo/PhotoGrid.tsx @@ -1,7 +1,7 @@ 'use client'; import { Photo } from '.'; -import { PhotoSetCategory } from '../category/set'; +import { PhotoSetCategory } from '../category'; import PhotoMedium from './PhotoMedium'; import { clsx } from 'clsx/lite'; import AnimateItems from '@/components/AnimateItems'; diff --git a/src/photo/PhotoHeader.tsx b/src/photo/PhotoHeader.tsx index e1fd1a4c..3bcedd71 100644 --- a/src/photo/PhotoHeader.tsx +++ b/src/photo/PhotoHeader.tsx @@ -7,7 +7,7 @@ import { dateRangeForPhotos, titleForPhoto, } from '.'; -import { PhotoSetCategory } from '../category/set'; +import { PhotoSetCategory } from '../category'; import ShareButton from '@/share/ShareButton'; import AnimateItems from '@/components/AnimateItems'; import { ReactNode } from 'react'; diff --git a/src/photo/PhotoLightbox.tsx b/src/photo/PhotoLightbox.tsx index 0c5de017..3d888bfb 100644 --- a/src/photo/PhotoLightbox.tsx +++ b/src/photo/PhotoLightbox.tsx @@ -1,6 +1,6 @@ import { clsx } from 'clsx/lite'; import { Photo } from '.'; -import { PhotoSetCategory } from '../category/set'; +import { PhotoSetCategory } from '../category'; import PhotoGrid from './PhotoGrid'; import Link from 'next/link'; diff --git a/src/photo/PhotoLink.tsx b/src/photo/PhotoLink.tsx index 230e5ae2..803760fb 100644 --- a/src/photo/PhotoLink.tsx +++ b/src/photo/PhotoLink.tsx @@ -2,7 +2,7 @@ import { ReactNode } from 'react'; import { Photo, titleForPhoto } from '@/photo'; -import { PhotoSetCategory } from '@/category/set'; +import { PhotoSetCategory } from '@/category'; import Link from 'next/link'; import { AnimationConfig } from '../components/AnimateItems'; import { useAppState } from '@/state/AppState'; diff --git a/src/photo/PhotoMedium.tsx b/src/photo/PhotoMedium.tsx index 1d90e1d1..e101a213 100644 --- a/src/photo/PhotoMedium.tsx +++ b/src/photo/PhotoMedium.tsx @@ -5,7 +5,7 @@ import { altTextForPhoto, doesPhotoNeedBlurCompatibility, } from '.'; -import { PhotoSetCategory } from '../category/set'; +import { PhotoSetCategory } from '../category'; import ImageMedium from '@/components/image/ImageMedium'; import { clsx } from 'clsx/lite'; import { pathForPhoto } from '@/app/paths'; diff --git a/src/photo/PhotoOGTile.tsx b/src/photo/PhotoOGTile.tsx index 9f8150c0..aa4e2803 100644 --- a/src/photo/PhotoOGTile.tsx +++ b/src/photo/PhotoOGTile.tsx @@ -3,7 +3,7 @@ import { descriptionForPhoto, titleForPhoto, } from '@/photo'; -import { PhotoSetCategory } from '../category/set'; +import { PhotoSetCategory } from '../category'; import { absolutePathForPhotoImage, pathForPhoto } from '@/app/paths'; import OGTile from '@/components/OGTile'; diff --git a/src/photo/PhotoPrevNext.tsx b/src/photo/PhotoPrevNext.tsx index 53587854..861c4d8c 100644 --- a/src/photo/PhotoPrevNext.tsx +++ b/src/photo/PhotoPrevNext.tsx @@ -6,7 +6,7 @@ import { getNextPhoto, getPreviousPhoto, } from '@/photo'; -import { PhotoSetCategory } from '../category/set'; +import { PhotoSetCategory } from '../category'; import PhotoLink from './PhotoLink'; import { useRouter } from 'next/navigation'; import { pathForPhoto } from '@/app/paths'; diff --git a/src/photo/PhotoShareModal.tsx b/src/photo/PhotoShareModal.tsx index bcf5167c..a72f4504 100644 --- a/src/photo/PhotoShareModal.tsx +++ b/src/photo/PhotoShareModal.tsx @@ -1,7 +1,7 @@ import PhotoOGTile from '@/photo/PhotoOGTile'; import { absolutePathForPhoto } from '@/app/paths'; import { Photo } from '.'; -import { PhotoSetCategory } from '../category/set'; +import { PhotoSetCategory } from '../category'; import ShareModal from '@/share/ShareModal'; export default function PhotoShareModal( diff --git a/src/photo/PhotoSmall.tsx b/src/photo/PhotoSmall.tsx index e1e1f594..19a18eed 100644 --- a/src/photo/PhotoSmall.tsx +++ b/src/photo/PhotoSmall.tsx @@ -3,7 +3,7 @@ import { altTextForPhoto, doesPhotoNeedBlurCompatibility, } from '.'; -import { PhotoSetCategory } from '../category/set'; +import { PhotoSetCategory } from '../category'; import ImageSmall from '@/components/image/ImageSmall'; import Link from 'next/link'; import { clsx } from 'clsx/lite'; diff --git a/src/photo/db/index.ts b/src/photo/db/index.ts index c58aaa48..cff5255a 100644 --- a/src/photo/db/index.ts +++ b/src/photo/db/index.ts @@ -1,6 +1,6 @@ import { PRIORITY_ORDER_ENABLED } from '@/app/config'; import { parameterize } from '@/utility/string'; -import { PhotoSetCategory } from '../../category/set'; +import { PhotoSetCategory } from '../../category'; import { Camera } from '@/camera'; import { Lens } from '@/lens'; diff --git a/src/recipe/RecipeShareModal.tsx b/src/recipe/RecipeShareModal.tsx index caf0f18d..28e04189 100644 --- a/src/recipe/RecipeShareModal.tsx +++ b/src/recipe/RecipeShareModal.tsx @@ -1,5 +1,5 @@ import { absolutePathForRecipe } from '@/app/paths'; -import { PhotoSetAttributes } from '../category/set'; +import { PhotoSetAttributes } from '../category'; import ShareModal from '@/share/ShareModal'; import { shareTextForRecipe } from '.'; import RecipeOGTile from './RecipeOGTile'; diff --git a/src/share/index.ts b/src/share/index.ts index faffbe84..5e8165b0 100644 --- a/src/share/index.ts +++ b/src/share/index.ts @@ -1,5 +1,5 @@ import { Photo } from '@/photo'; -import { PhotoSetAttributes, PhotoSetCategory } from '@/category/set'; +import { PhotoSetAttributes, PhotoSetCategory } from '@/category'; import { absolutePathForCameraImage, absolutePathForFilmSimulationImage, diff --git a/src/simulation/FilmSimulationShareModal.tsx b/src/simulation/FilmSimulationShareModal.tsx index 1cdd98df..b02c7723 100644 --- a/src/simulation/FilmSimulationShareModal.tsx +++ b/src/simulation/FilmSimulationShareModal.tsx @@ -1,5 +1,5 @@ import { absolutePathForFilmSimulation } from '@/app/paths'; -import { PhotoSetAttributes } from '../category/set'; +import { PhotoSetAttributes } from '../category'; import ShareModal from '@/share/ShareModal'; import FilmSimulationOGTile from './FilmSimulationOGTile'; import { FilmSimulation, shareTextForFilmSimulation } from '.'; diff --git a/src/tag/TagShareModal.tsx b/src/tag/TagShareModal.tsx index 3c38fc3c..66c6ed77 100644 --- a/src/tag/TagShareModal.tsx +++ b/src/tag/TagShareModal.tsx @@ -1,5 +1,5 @@ import { absolutePathForTag } from '@/app/paths'; -import { PhotoSetAttributes } from '../category/set'; +import { PhotoSetAttributes } from '../category'; import ShareModal from '@/share/ShareModal'; import TagOGTile from './TagOGTile'; import { shareTextForTag } from '.';