diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-04-14 18:17:14 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-04-14 18:17:14 +0200 |
| commit | 6de6c7fd95de1de9d8d3107eaf7ce1dd150ed094 (patch) | |
| tree | 75d5eb387b867449fc2218f5fe9b3acc70731561 /apps/web/src/services/storage/migrations/transformers | |
| parent | 34c67ef8e85eafd6dfe6808280c807aceb00a345 (diff) | |
| download | opencut-6de6c7fd95de1de9d8d3107eaf7ce1dd150ed094.tar.gz | |
refactor: move constants to domain modules
Diffstat (limited to 'apps/web/src/services/storage/migrations/transformers')
3 files changed, 7 insertions, 6 deletions
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, |
