diff --git a/AGENTS.md b/AGENTS.md index 4761052..bc58cac 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -159,9 +159,7 @@ scoped-путям (`kit/**`, `preview/**`). классифицирует стороны по фактическому пути, поэтому относительным импортом правило не обойти. -- Старое: `routes/(old)/**`, `lib/registry.ts`, `lib/registry/**`, - `lib/registry-helpers.ts`, `lib/categories.ts`, `lib/tools/**`, - `lib/components/**` (кроме `kit/`). +- Старое: `routes/(old)/**`, `lib/old/**`. - Новое: `routes/preview/**`, `lib/registry-new/**`, `lib/preview/**`, `lib/registry-schema.ts`, `lib/registry-schema.test.ts`, `lib/components/kit/**`. - Общее (разрешено обоим): `core/`, `i18n/`, `theme`, `assets/`, корневой `lib`. diff --git a/docs/backlog.md b/docs/backlog.md index db6022f..5eea2d1 100644 --- a/docs/backlog.md +++ b/docs/backlog.md @@ -176,14 +176,11 @@ 13. **HARD-серия** (glitch, barcode, signature-extract, handwritten-digital). Из `archive/plan-gap-waves.md`. -14. **Переезд старых файлов в папки `old/`** — оценка M. Шаг 37 закрытого - `archive/plan-composite-params.md` (и `archive/plan-migrate-remaining.md`): - перенос `lib/registry.ts`, `lib/registry/**`, `lib/registry-helpers.ts`, - `lib/categories.ts`, `lib/tools/**`, `lib/components/**` (кроме `kit/`) в - `lib/old/**`; в настройке isolation-плагина — один glob-паттерн - (`lib/old/**`), «новое»/«общее» не меняются. Предшествует C17 - (`plan-redesign.md`, Шаг 5). Гейты: svelte-check 0, тесты зелёные, prettier - чист, `lint:all` = задокументированный остаток, обе ветки открываются. +14. ~~**Переезд старых файлов в папки `old/`**~~ — **ЗАКРЫТО.** Старые файлы + (`lib/registry.ts`, `lib/registry/`, `lib/registry-helpers.ts`, + `lib/categories.ts`, `lib/tools/`, `lib/components/` кроме `kit/`) перенесены + в `lib/old/`. Isolation-плагин упрощён до `lib/old/**`. Все импорты обновлены. + svelte-check 0, тесты 618/618, lint:all чист, билд проходит. 15. ~~**Техдолг (чинить по заведённым задачам, не игнорировать правила)**~~ ЗАКРЫТО. Подробности: `docs/archive/plan-tech-debt.md`. diff --git a/docs/plan-redesign.md b/docs/plan-redesign.md index 5737693..a04b621 100644 --- a/docs/plan-redesign.md +++ b/docs/plan-redesign.md @@ -358,8 +358,8 @@ src/routes/preview/tools/[id]/+page.svelte ### Шаг 5. Сделать новый дизайн основным — СЛЕДУЮЩИЙ ЭТАП -> Tech debt закрыт. Перед стартом C17: переезд старых файлов в `old/` -> (backlog №14) и покупка домена (`plan-domain.local.md`). +> Tech debt закрыт. Перед стартом C17: покупка домена (`plan-domain.local.md`). +> Переезд старых файлов в `lib/old/` (backlog №14) — **выполнено**. - [ ] **[C17]** Перенести `preview/*` → реальные маршруты (move), удалить `(old)/`, корневой `+layout.svelte` импортирует `design2.css` + новый diff --git a/web/eslint-plugins/isolation/no-mixed-imports.js b/web/eslint-plugins/isolation/no-mixed-imports.js index c27a01c..8f44453 100644 --- a/web/eslint-plugins/isolation/no-mixed-imports.js +++ b/web/eslint-plugins/isolation/no-mixed-imports.js @@ -17,16 +17,7 @@ import fs from "node:fs"; import path from "node:path"; -const DEFAULT_OLD = [ - "routes/(old)/**", - "lib/registry/**", - "lib/registry.ts", - "lib/registry-helpers.ts", - "lib/categories.ts", - "lib/tools/**", - "lib/components/**", - "!lib/components/kit/**", -]; +const DEFAULT_OLD = ["routes/(old)/**", "lib/old/**"]; const DEFAULT_NEW = [ "routes/preview/**", diff --git a/web/src/lib/i18n/dict.ts b/web/src/lib/i18n/dict.ts index 382ddc3..a8a6ce9 100644 --- a/web/src/lib/i18n/dict.ts +++ b/web/src/lib/i18n/dict.ts @@ -1,4 +1,4 @@ -import type { CategoryId } from "../categories"; +import type { CategoryId } from "../old/categories"; export const LOCALES = ["ru", "en"] as const; export type Locale = (typeof LOCALES)[number]; diff --git a/web/src/lib/i18n/matching.test.ts b/web/src/lib/i18n/matching.test.ts index 64fb969..cc5ad15 100644 --- a/web/src/lib/i18n/matching.test.ts +++ b/web/src/lib/i18n/matching.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import { TOOLS } from "../registry"; +import { TOOLS } from "../old/registry"; import { normalizeForSearch, scoreDoc, type SearchDoc } from "./matching"; import { setLocale } from "./locale.svelte"; import { toolSearchDoc } from "./tool-strings"; diff --git a/web/src/lib/i18n/search-coverage.test.ts b/web/src/lib/i18n/search-coverage.test.ts index acd40cf..dbab1a8 100644 --- a/web/src/lib/i18n/search-coverage.test.ts +++ b/web/src/lib/i18n/search-coverage.test.ts @@ -1,8 +1,8 @@ import { describe, expect, it } from "vitest"; -import { TOOLS } from "../registry"; +import { TOOLS } from "../old/registry"; import { normalizeForSearch, scoreDoc } from "./matching"; import { toolSearchDoc } from "./tool-strings"; -import { isChainable } from "../registry"; +import { isChainable } from "../old/registry"; function hits(q: string): string[] { const nq = normalizeForSearch(q); diff --git a/web/src/lib/i18n/smoke-i18n.test.ts b/web/src/lib/i18n/smoke-i18n.test.ts index 76883e3..1b31e93 100644 --- a/web/src/lib/i18n/smoke-i18n.test.ts +++ b/web/src/lib/i18n/smoke-i18n.test.ts @@ -4,7 +4,7 @@ import { t } from "./t"; import { LOCALE_TAGS } from "./dict"; import { normalizeForSearch, scoreDoc } from "./matching"; import { toolSearchDoc } from "./tool-strings"; -import { TOOLS } from "../registry"; +import { TOOLS } from "../old/registry"; afterEach(() => { setLocale("ru"); diff --git a/web/src/lib/i18n/tool-strings.ts b/web/src/lib/i18n/tool-strings.ts index d32891f..7f376a2 100644 --- a/web/src/lib/i18n/tool-strings.ts +++ b/web/src/lib/i18n/tool-strings.ts @@ -1,4 +1,4 @@ -import type { ParamDef, ToolEntry } from "$lib/registry"; +import type { ParamDef, ToolEntry } from "$lib/old/registry"; import type { SearchDoc } from "./matching"; import { getMergedDict } from "./locale.svelte"; import { ru } from "./ru"; diff --git a/web/src/lib/i18n/tools-i18n.test.ts b/web/src/lib/i18n/tools-i18n.test.ts index 8adb4ed..a152ed0 100644 --- a/web/src/lib/i18n/tools-i18n.test.ts +++ b/web/src/lib/i18n/tools-i18n.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import { TOOLS } from "../registry"; +import { TOOLS } from "../old/registry"; import { en } from "./en"; import { ru } from "./ru"; diff --git a/web/src/lib/categories.ts b/web/src/lib/old/categories.ts similarity index 100% rename from web/src/lib/categories.ts rename to web/src/lib/old/categories.ts diff --git a/web/src/lib/components/DownloadButton.svelte b/web/src/lib/old/components/DownloadButton.svelte similarity index 95% rename from web/src/lib/components/DownloadButton.svelte rename to web/src/lib/old/components/DownloadButton.svelte index 9b8a46d..b9d222a 100644 --- a/web/src/lib/components/DownloadButton.svelte +++ b/web/src/lib/old/components/DownloadButton.svelte @@ -2,7 +2,7 @@ import Button from "./ui/Button.svelte"; import { downloadBlob, encode } from "$lib/core/io"; import type { PixelImage } from "$lib/core/types"; - import type { OutputFormat } from "$lib/registry"; + import type { OutputFormat } from "$lib/old/registry"; import { t } from "$lib/i18n/t"; interface Props { diff --git a/web/src/lib/components/DropOverlay.svelte b/web/src/lib/old/components/DropOverlay.svelte similarity index 100% rename from web/src/lib/components/DropOverlay.svelte rename to web/src/lib/old/components/DropOverlay.svelte diff --git a/web/src/lib/components/DropZone.svelte b/web/src/lib/old/components/DropZone.svelte similarity index 100% rename from web/src/lib/components/DropZone.svelte rename to web/src/lib/old/components/DropZone.svelte diff --git a/web/src/lib/components/InfoPanel.svelte b/web/src/lib/old/components/InfoPanel.svelte similarity index 100% rename from web/src/lib/components/InfoPanel.svelte rename to web/src/lib/old/components/InfoPanel.svelte diff --git a/web/src/lib/components/ParamForm.svelte b/web/src/lib/old/components/ParamForm.svelte similarity index 97% rename from web/src/lib/components/ParamForm.svelte rename to web/src/lib/old/components/ParamForm.svelte index 57a76b5..dbdf97d 100644 --- a/web/src/lib/components/ParamForm.svelte +++ b/web/src/lib/old/components/ParamForm.svelte @@ -4,7 +4,7 @@ import SelectField from "./ui/SelectField.svelte"; import SliderField from "./ui/SliderField.svelte"; import TextField from "./ui/TextField.svelte"; - import type { ParamDef, ToolEntry } from "$lib/registry"; + import type { ParamDef, ToolEntry } from "$lib/old/registry"; import { optionLabel, paramLabel } from "$lib/i18n/tool-strings"; import { t } from "$lib/i18n/t"; diff --git a/web/src/lib/components/Preview.svelte b/web/src/lib/old/components/Preview.svelte similarity index 100% rename from web/src/lib/components/Preview.svelte rename to web/src/lib/old/components/Preview.svelte diff --git a/web/src/lib/components/ToolPage.svelte b/web/src/lib/old/components/ToolPage.svelte similarity index 97% rename from web/src/lib/components/ToolPage.svelte rename to web/src/lib/old/components/ToolPage.svelte index f8d2577..a85414c 100644 --- a/web/src/lib/components/ToolPage.svelte +++ b/web/src/lib/old/components/ToolPage.svelte @@ -13,21 +13,24 @@ outputOf, sanitizeParams, type ToolEntry, - } from "$lib/registry"; + } from "$lib/old/registry"; import { loadStoredSteps, newStepId, saveSteps, type PipelineStep, - } from "$lib/tools/pipeline"; - import { TOOL_ICONS } from "$lib/tools/tool-icons"; + } from "$lib/old/tools/pipeline"; + import { TOOL_ICONS } from "$lib/old/tools/tool-icons"; import DownloadButton from "./DownloadButton.svelte"; import ParamForm from "./ParamForm.svelte"; import Preview from "./Preview.svelte"; import ToolSearch from "./search/ToolSearch.svelte"; - import { createAutoRunner } from "$lib/tools/auto-run"; - import { executeStep } from "$lib/tools/executor"; - import { clearOverlay, setOverlay } from "$lib/tools/overlay-store.svelte"; + import { createAutoRunner } from "$lib/old/tools/auto-run"; + import { executeStep } from "$lib/old/tools/executor"; + import { + clearOverlay, + setOverlay, + } from "$lib/old/tools/overlay-store.svelte"; import { t } from "$lib/i18n/t"; import { toolDescription, toolTitle } from "$lib/i18n/tool-strings"; import type { StageStatus } from "./stage/stage-props"; diff --git a/web/src/lib/components/chain/ChainToolBlock.svelte b/web/src/lib/old/components/chain/ChainToolBlock.svelte similarity index 98% rename from web/src/lib/components/chain/ChainToolBlock.svelte rename to web/src/lib/old/components/chain/ChainToolBlock.svelte index 05fd1ba..0ee5668 100644 --- a/web/src/lib/components/chain/ChainToolBlock.svelte +++ b/web/src/lib/old/components/chain/ChainToolBlock.svelte @@ -1,5 +1,5 @@ diff --git a/web/src/routes/(old)/list-tools/+page.svelte b/web/src/routes/(old)/list-tools/+page.svelte index 0449e52..8e496d9 100644 --- a/web/src/routes/(old)/list-tools/+page.svelte +++ b/web/src/routes/(old)/list-tools/+page.svelte @@ -1,10 +1,10 @@ diff --git a/web/src/routes/(old)/tools/[id]/+page.svelte b/web/src/routes/(old)/tools/[id]/+page.svelte index 6d9913b..73f5478 100644 --- a/web/src/routes/(old)/tools/[id]/+page.svelte +++ b/web/src/routes/(old)/tools/[id]/+page.svelte @@ -1,6 +1,6 @@