From 6de6c7fd95de1de9d8d3107eaf7ce1dd150ed094 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Tue, 14 Apr 2026 18:17:14 +0200 Subject: refactor: move constants to domain modules --- apps/web/src/services/storage/migrations/transformers/v1-to-v2.ts | 6 +++--- apps/web/src/services/storage/migrations/transformers/v14-to-v15.ts | 2 +- apps/web/src/services/storage/migrations/transformers/v20-to-v21.ts | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'apps/web/src/services/storage/migrations/transformers') diff --git a/apps/web/src/services/storage/migrations/transformers/v1-to-v2.ts b/apps/web/src/services/storage/migrations/transformers/v1-to-v2.ts index 6313c311..b6b38f3c 100644 --- a/apps/web/src/services/storage/migrations/transformers/v1-to-v2.ts +++ b/apps/web/src/services/storage/migrations/transformers/v1-to-v2.ts @@ -1,8 +1,8 @@ import { DEFAULT_BACKGROUND_BLUR_INTENSITY, - DEFAULT_BACKGROUND_COLOR, -} from "@/lib/background/constants"; -import { DEFAULT_CANVAS_SIZE } from "@/lib/canvas/constants"; +} from "@/lib/background/blur"; +import { DEFAULT_BACKGROUND_COLOR } from "@/lib/background/color"; +import { DEFAULT_CANVAS_SIZE } from "@/lib/canvas/sizes"; const DEFAULT_FPS = 30; import { IndexedDBAdapter } from "@/services/storage/indexeddb-adapter"; import type { MediaAssetData } from "@/services/storage/types"; diff --git a/apps/web/src/services/storage/migrations/transformers/v14-to-v15.ts b/apps/web/src/services/storage/migrations/transformers/v14-to-v15.ts index e75c541b..36e3d9a8 100644 --- a/apps/web/src/services/storage/migrations/transformers/v14-to-v15.ts +++ b/apps/web/src/services/storage/migrations/transformers/v14-to-v15.ts @@ -1,4 +1,4 @@ -import { STICKER_INTRINSIC_SIZE_FALLBACK } from "@/constants/sticker-constants"; +import { STICKER_INTRINSIC_SIZE_FALLBACK } from "@/lib/stickers/intrinsic-size"; import type { MigrationResult, ProjectRecord } from "./types"; import { getProjectId, isRecord } from "./utils"; diff --git a/apps/web/src/services/storage/migrations/transformers/v20-to-v21.ts b/apps/web/src/services/storage/migrations/transformers/v20-to-v21.ts index 63ad24de..f5194bda 100644 --- a/apps/web/src/services/storage/migrations/transformers/v20-to-v21.ts +++ b/apps/web/src/services/storage/migrations/transformers/v20-to-v21.ts @@ -1,8 +1,9 @@ -import { DEFAULT_BLUR_INTENSITY } from "@/constants/project-constants"; import { INTENSITY_TO_SIGMA_DIVISOR } from "@/lib/effects/definitions/blur"; import type { MigrationResult, ProjectRecord } from "./types"; import { getProjectId, isRecord } from "./utils"; +const LEGACY_DEFAULT_BACKGROUND_BLUR_INTENSITY = 50; + export function transformProjectV20ToV21({ project, }: { @@ -51,7 +52,7 @@ function migrateBackgroundBlurScale({ const blurIntensity = typeof raw === "number" && Number.isFinite(raw) ? raw * INTENSITY_TO_SIGMA_DIVISOR - : DEFAULT_BLUR_INTENSITY; + : LEGACY_DEFAULT_BACKGROUND_BLUR_INTENSITY; return { ...project, -- cgit v1.3.1