Create top-level category directory

This commit is contained in:
Sam Becker 2025-03-18 09:26:56 -05:00
parent e317d44593
commit e3a39b1a3f
37 changed files with 38 additions and 38 deletions

View File

@ -1,7 +1,7 @@
import {
DEFAULT_CATEGORY_KEYS,
getOrderedCategoriesFromString,
} from '@/photo/set';
} from '@/category/set';
describe('set', () => {
it('parses from string', () => {

View File

@ -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 '@/photo/set';
import { shouldGenerateStaticParamsForCategory } from '@/category/set';
export let generateStaticParams:
(() => Promise<{ simulation: FilmSimulation }[]>) | undefined = undefined;

View File

@ -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 '@/photo/set';
import { shouldGenerateStaticParamsForCategory } from '@/category/set';
import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db';
const getPhotosFilmSimulationDataCachedCached =
cache(getPhotosFilmSimulationDataCached);

View File

@ -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 '@/photo/set';
import { shouldGenerateStaticParamsForCategory } from '@/category/set';
export let generateStaticParams:
(() => Promise<{ focal: string }[]>) | undefined = undefined;

View File

@ -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 '@/photo/set';
import { shouldGenerateStaticParamsForCategory } from '@/category/set';
import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db';
const getPhotosFocalDataCachedCached = cache((focal: number) =>

View File

@ -15,7 +15,7 @@ import {
safelyGenerateLensStaticParams,
} from '@/lens';
import LensImageResponse from '@/image-response/LensImageResponse';
import { shouldGenerateStaticParamsForCategory } from '@/photo/set';
import { shouldGenerateStaticParamsForCategory } from '@/category/set';
export let generateStaticParams:
(() => Promise<Lens[]>) | undefined = undefined;

View File

@ -12,7 +12,7 @@ import {
safelyGenerateLensStaticParams,
} from '@/lens';
import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db';
import { shouldGenerateStaticParamsForCategory } from '@/photo/set';
import { shouldGenerateStaticParamsForCategory } from '@/category/set';
const getPhotosLensDataCachedCached = cache((
make: string | undefined,

View File

@ -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 '@/photo/set';
import { shouldGenerateStaticParamsForCategory } from '@/category/set';
export let generateStaticParams:
(() => Promise<{ recipe: string }[]>) | undefined = undefined;

View File

@ -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 '@/photo/set';
import { shouldGenerateStaticParamsForCategory } from '@/category/set';
import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db';
const getPhotosRecipeDataCachedCached = cache(getPhotosRecipeDataCached);

View File

@ -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 '@/photo/set';
import { shouldGenerateStaticParamsForCategory } from '@/category/set';
export let generateStaticParams:
(() => Promise<{ camera: Camera }[]>) | undefined = undefined;

View File

@ -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 '@/photo/set';
import { shouldGenerateStaticParamsForCategory } from '@/category/set';
import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db';
const getPhotosCameraDataCachedCached = cache((

View File

@ -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 '@/photo/set';
import { shouldGenerateStaticParamsForCategory } from '@/category/set';
export let generateStaticParams:
(() => Promise<{ tag: string }[]>) | undefined = undefined;

View File

@ -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 '@/photo/set';
import { shouldGenerateStaticParamsForCategory } from '@/category/set';
import { GENERATE_STATIC_PARAMS_LIMIT } from '@/photo/db';
const getPhotosTagDataCachedCached = cache((tag: string) =>

View File

@ -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 '@/photo/set';
import { DEFAULT_CATEGORY_KEYS, getHiddenCategories } from '@/category/set';
export default function AdminAppConfigurationClient({
// Storage

View File

@ -2,7 +2,7 @@ import {
AI_AUTO_GENERATED_FIELDS_DEFAULT,
parseAiAutoGeneratedFieldsString,
} from '@/photo/ai';
import { getOrderedCategoriesFromString } from '@/photo/set';
import { getOrderedCategoriesFromString } from '@/category/set';
import type { StorageType } from '@/platforms/storage';
import { makeUrlAbsolute, shortenUrl } from '@/utility/url';

View File

@ -1,5 +1,5 @@
import { Photo } from '@/photo';
import { PhotoSetCategory } from '@/photo/set';
import { PhotoSetCategory } from '@/category/set';
import { BASE_URL, GRID_HOMEPAGE_ENABLED } from './config';
import { Camera } from '@/camera';
import { FilmSimulation } from '@/simulation';

View File

@ -1,5 +1,5 @@
import { absolutePathForCamera } from '@/app/paths';
import { PhotoSetAttributes } from '../photo/set';
import { PhotoSetAttributes } from '../category/set';
import ShareModal from '@/share/ShareModal';
import CameraOGTile from './CameraOGTile';
import { Camera } from '.';

View File

@ -1,6 +1,6 @@
import { Photo } from '.';
import { Photo } from '../photo';
import { Camera, Cameras } from '@/camera';
import { PhotoDateRange } from '.';
import { PhotoDateRange } from '../photo';
import { FilmSimulation, FilmSimulations } from '@/simulation';
import { Lens, Lenses } from '@/lens';
import { Tags } from '@/tag';

View File

@ -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 '@/photo/set';
import { PhotoSetCategories } from '@/category/set';
import { formatCameraText } from '@/camera';
import { labelForFilmSimulation } from '@/platforms/fujifilm/simulation';
import { formatFocalLength } from '@/focal';

View File

@ -1,5 +1,5 @@
import { absolutePathForFocalLength } from '@/app/paths';
import { PhotoSetAttributes } from '../photo/set';
import { PhotoSetAttributes } from '../category/set';
import ShareModal from '@/share/ShareModal';
import FocalLengthOGTile from './FocalLengthOGTile';
import { shareTextFocalLength } from '.';

View File

@ -1,5 +1,5 @@
import { absolutePathForLens } from '@/app/paths';
import { PhotoSetAttributes } from '../photo/set';
import { PhotoSetAttributes } from '../category/set';
import ShareModal from '@/share/ShareModal';
import { Lens } from '.';
import { shareTextForLens } from './meta';

View File

@ -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 './set';
import { PhotoSetCategory } from '../category/set';
import { clsx } from 'clsx/lite';
import { useAppState } from '@/state/AppState';
import { GetPhotosOptions } from './db';

View File

@ -1,6 +1,6 @@
import AnimateItems from '@/components/AnimateItems';
import { Photo, PhotoDateRange } from '.';
import { PhotoSetCategory } from './set';
import { PhotoSetCategory } from '../category/set';
import PhotoLarge from './PhotoLarge';
import SiteGrid from '@/components/SiteGrid';
import PhotoGrid from './PhotoGrid';

View File

@ -1,7 +1,7 @@
'use client';
import { Photo } from '.';
import { PhotoSetCategory } from './set';
import { PhotoSetCategory } from '../category/set';
import PhotoMedium from './PhotoMedium';
import { clsx } from 'clsx/lite';
import AnimateItems from '@/components/AnimateItems';

View File

@ -7,7 +7,7 @@ import {
dateRangeForPhotos,
titleForPhoto,
} from '.';
import { PhotoSetCategory } from './set';
import { PhotoSetCategory } from '../category/set';
import ShareButton from '@/share/ShareButton';
import AnimateItems from '@/components/AnimateItems';
import { ReactNode } from 'react';

View File

@ -1,6 +1,6 @@
import { clsx } from 'clsx/lite';
import { Photo } from '.';
import { PhotoSetCategory } from './set';
import { PhotoSetCategory } from '../category/set';
import PhotoGrid from './PhotoGrid';
import Link from 'next/link';

View File

@ -2,7 +2,7 @@
import { ReactNode } from 'react';
import { Photo, titleForPhoto } from '@/photo';
import { PhotoSetCategory } from '@/photo/set';
import { PhotoSetCategory } from '@/category/set';
import Link from 'next/link';
import { AnimationConfig } from '../components/AnimateItems';
import { useAppState } from '@/state/AppState';

View File

@ -5,7 +5,7 @@ import {
altTextForPhoto,
doesPhotoNeedBlurCompatibility,
} from '.';
import { PhotoSetCategory } from './set';
import { PhotoSetCategory } from '../category/set';
import ImageMedium from '@/components/image/ImageMedium';
import { clsx } from 'clsx/lite';
import { pathForPhoto } from '@/app/paths';

View File

@ -3,7 +3,7 @@ import {
descriptionForPhoto,
titleForPhoto,
} from '@/photo';
import { PhotoSetCategory } from './set';
import { PhotoSetCategory } from '../category/set';
import { absolutePathForPhotoImage, pathForPhoto } from '@/app/paths';
import OGTile from '@/components/OGTile';

View File

@ -6,7 +6,7 @@ import {
getNextPhoto,
getPreviousPhoto,
} from '@/photo';
import { PhotoSetCategory } from './set';
import { PhotoSetCategory } from '../category/set';
import PhotoLink from './PhotoLink';
import { useRouter } from 'next/navigation';
import { pathForPhoto } from '@/app/paths';

View File

@ -1,7 +1,7 @@
import PhotoOGTile from '@/photo/PhotoOGTile';
import { absolutePathForPhoto } from '@/app/paths';
import { Photo } from '.';
import { PhotoSetCategory } from './set';
import { PhotoSetCategory } from '../category/set';
import ShareModal from '@/share/ShareModal';
export default function PhotoShareModal(

View File

@ -3,7 +3,7 @@ import {
altTextForPhoto,
doesPhotoNeedBlurCompatibility,
} from '.';
import { PhotoSetCategory } from './set';
import { PhotoSetCategory } from '../category/set';
import ImageSmall from '@/components/image/ImageSmall';
import Link from 'next/link';
import { clsx } from 'clsx/lite';

View File

@ -1,6 +1,6 @@
import { PRIORITY_ORDER_ENABLED } from '@/app/config';
import { parameterize } from '@/utility/string';
import { PhotoSetCategory } from '../set';
import { PhotoSetCategory } from '../../category/set';
import { Camera } from '@/camera';
import { Lens } from '@/lens';

View File

@ -1,5 +1,5 @@
import { absolutePathForRecipe } from '@/app/paths';
import { PhotoSetAttributes } from '../photo/set';
import { PhotoSetAttributes } from '../category/set';
import ShareModal from '@/share/ShareModal';
import { shareTextForRecipe } from '.';
import RecipeOGTile from './RecipeOGTile';

View File

@ -1,5 +1,5 @@
import { Photo } from '@/photo';
import { PhotoSetAttributes, PhotoSetCategory } from '@/photo/set';
import { PhotoSetAttributes, PhotoSetCategory } from '@/category/set';
import {
absolutePathForCameraImage,
absolutePathForFilmSimulationImage,

View File

@ -1,5 +1,5 @@
import { absolutePathForFilmSimulation } from '@/app/paths';
import { PhotoSetAttributes } from '../photo/set';
import { PhotoSetAttributes } from '../category/set';
import ShareModal from '@/share/ShareModal';
import FilmSimulationOGTile from './FilmSimulationOGTile';
import { FilmSimulation, shareTextForFilmSimulation } from '.';

View File

@ -1,5 +1,5 @@
import { absolutePathForTag } from '@/app/paths';
import { PhotoSetAttributes } from '../photo/set';
import { PhotoSetAttributes } from '../category/set';
import ShareModal from '@/share/ShareModal';
import TagOGTile from './TagOGTile';
import { shareTextForTag } from '.';