refactor: move old libs and components to old folder

This commit is contained in:
2026-09-10 12:01:54 +05:00
parent bf2f8e57c8
commit 3834dadd03
64 changed files with 111 additions and 110 deletions
+1 -3
View File
@@ -159,9 +159,7 @@ scoped-путям (`kit/**`, `preview/**`).
классифицирует стороны по фактическому пути, поэтому относительным импортом классифицирует стороны по фактическому пути, поэтому относительным импортом
правило не обойти. правило не обойти.
- Старое: `routes/(old)/**`, `lib/registry.ts`, `lib/registry/**`, - Старое: `routes/(old)/**`, `lib/old/**`.
`lib/registry-helpers.ts`, `lib/categories.ts`, `lib/tools/**`,
`lib/components/**` (кроме `kit/`).
- Новое: `routes/preview/**`, `lib/registry-new/**`, `lib/preview/**`, - Новое: `routes/preview/**`, `lib/registry-new/**`, `lib/preview/**`,
`lib/registry-schema.ts`, `lib/registry-schema.test.ts`, `lib/components/kit/**`. `lib/registry-schema.ts`, `lib/registry-schema.test.ts`, `lib/components/kit/**`.
- Общее (разрешено обоим): `core/`, `i18n/`, `theme`, `assets/`, корневой `lib`. - Общее (разрешено обоим): `core/`, `i18n/`, `theme`, `assets/`, корневой `lib`.
+5 -8
View File
@@ -176,14 +176,11 @@
13. **HARD-серия** (glitch, barcode, signature-extract, handwritten-digital). Из 13. **HARD-серия** (glitch, barcode, signature-extract, handwritten-digital). Из
`archive/plan-gap-waves.md`. `archive/plan-gap-waves.md`.
14. **Переезд старых файлов в папки `old/`** — оценка M. Шаг 37 закрытого 14. ~~**Переезд старых файлов в папки `old/`**~~**ЗАКРЫТО.** Старые файлы
`archive/plan-composite-params.md``archive/plan-migrate-remaining.md`): (`lib/registry.ts`, `lib/registry/`, `lib/registry-helpers.ts`,
перенос `lib/registry.ts`, `lib/registry/**`, `lib/registry-helpers.ts`, `lib/categories.ts`, `lib/tools/`, `lib/components/` кроме `kit/`) перенесены
`lib/categories.ts`, `lib/tools/**`, `lib/components/**` (кроме `kit/`) в в `lib/old/`. Isolation-плагин упрощён до `lib/old/**`. Все импорты обновлены.
`lib/old/**`; в настройке isolation-плагина — один glob-паттерн svelte-check 0, тесты 618/618, lint:all чист, билд проходит.
(`lib/old/**`), «новое»/«общее» не меняются. Предшествует C17
(`plan-redesign.md`, Шаг 5). Гейты: svelte-check 0, тесты зелёные, prettier
чист, `lint:all` = задокументированный остаток, обе ветки открываются.
15. ~~**Техдолг (чинить по заведённым задачам, не игнорировать правила)**~~ 15. ~~**Техдолг (чинить по заведённым задачам, не игнорировать правила)**~~
ЗАКРЫТО. Подробности: `docs/archive/plan-tech-debt.md`. ЗАКРЫТО. Подробности: `docs/archive/plan-tech-debt.md`.
+2 -2
View File
@@ -358,8 +358,8 @@ src/routes/preview/tools/[id]/+page.svelte
### Шаг 5. Сделать новый дизайн основным — СЛЕДУЮЩИЙ ЭТАП ### Шаг 5. Сделать новый дизайн основным — СЛЕДУЮЩИЙ ЭТАП
> Tech debt закрыт. Перед стартом C17: переезд старых файлов в `old/` > Tech debt закрыт. Перед стартом C17: покупка домена (`plan-domain.local.md`).
> (backlog №14) и покупка домена (`plan-domain.local.md`). > Переезд старых файлов в `lib/old/` (backlog №14) — **выполнено**.
- [ ] **[C17]** Перенести `preview/*` → реальные маршруты (move), удалить - [ ] **[C17]** Перенести `preview/*` → реальные маршруты (move), удалить
`(old)/`, корневой `+layout.svelte` импортирует `design2.css` + новый `(old)/`, корневой `+layout.svelte` импортирует `design2.css` + новый
@@ -17,16 +17,7 @@
import fs from "node:fs"; import fs from "node:fs";
import path from "node:path"; import path from "node:path";
const DEFAULT_OLD = [ const DEFAULT_OLD = ["routes/(old)/**", "lib/old/**"];
"routes/(old)/**",
"lib/registry/**",
"lib/registry.ts",
"lib/registry-helpers.ts",
"lib/categories.ts",
"lib/tools/**",
"lib/components/**",
"!lib/components/kit/**",
];
const DEFAULT_NEW = [ const DEFAULT_NEW = [
"routes/preview/**", "routes/preview/**",
+1 -1
View File
@@ -1,4 +1,4 @@
import type { CategoryId } from "../categories"; import type { CategoryId } from "../old/categories";
export const LOCALES = ["ru", "en"] as const; export const LOCALES = ["ru", "en"] as const;
export type Locale = (typeof LOCALES)[number]; export type Locale = (typeof LOCALES)[number];
+1 -1
View File
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { TOOLS } from "../registry"; import { TOOLS } from "../old/registry";
import { normalizeForSearch, scoreDoc, type SearchDoc } from "./matching"; import { normalizeForSearch, scoreDoc, type SearchDoc } from "./matching";
import { setLocale } from "./locale.svelte"; import { setLocale } from "./locale.svelte";
import { toolSearchDoc } from "./tool-strings"; import { toolSearchDoc } from "./tool-strings";
+2 -2
View File
@@ -1,8 +1,8 @@
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { TOOLS } from "../registry"; import { TOOLS } from "../old/registry";
import { normalizeForSearch, scoreDoc } from "./matching"; import { normalizeForSearch, scoreDoc } from "./matching";
import { toolSearchDoc } from "./tool-strings"; import { toolSearchDoc } from "./tool-strings";
import { isChainable } from "../registry"; import { isChainable } from "../old/registry";
function hits(q: string): string[] { function hits(q: string): string[] {
const nq = normalizeForSearch(q); const nq = normalizeForSearch(q);
+1 -1
View File
@@ -4,7 +4,7 @@ import { t } from "./t";
import { LOCALE_TAGS } from "./dict"; import { LOCALE_TAGS } from "./dict";
import { normalizeForSearch, scoreDoc } from "./matching"; import { normalizeForSearch, scoreDoc } from "./matching";
import { toolSearchDoc } from "./tool-strings"; import { toolSearchDoc } from "./tool-strings";
import { TOOLS } from "../registry"; import { TOOLS } from "../old/registry";
afterEach(() => { afterEach(() => {
setLocale("ru"); setLocale("ru");
+1 -1
View File
@@ -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 type { SearchDoc } from "./matching";
import { getMergedDict } from "./locale.svelte"; import { getMergedDict } from "./locale.svelte";
import { ru } from "./ru"; import { ru } from "./ru";
+1 -1
View File
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { TOOLS } from "../registry"; import { TOOLS } from "../old/registry";
import { en } from "./en"; import { en } from "./en";
import { ru } from "./ru"; import { ru } from "./ru";
@@ -2,7 +2,7 @@
import Button from "./ui/Button.svelte"; import Button from "./ui/Button.svelte";
import { downloadBlob, encode } from "$lib/core/io"; import { downloadBlob, encode } from "$lib/core/io";
import type { PixelImage } from "$lib/core/types"; 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"; import { t } from "$lib/i18n/t";
interface Props { interface Props {
@@ -4,7 +4,7 @@
import SelectField from "./ui/SelectField.svelte"; import SelectField from "./ui/SelectField.svelte";
import SliderField from "./ui/SliderField.svelte"; import SliderField from "./ui/SliderField.svelte";
import TextField from "./ui/TextField.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 { optionLabel, paramLabel } from "$lib/i18n/tool-strings";
import { t } from "$lib/i18n/t"; import { t } from "$lib/i18n/t";
@@ -13,21 +13,24 @@
outputOf, outputOf,
sanitizeParams, sanitizeParams,
type ToolEntry, type ToolEntry,
} from "$lib/registry"; } from "$lib/old/registry";
import { import {
loadStoredSteps, loadStoredSteps,
newStepId, newStepId,
saveSteps, saveSteps,
type PipelineStep, type PipelineStep,
} from "$lib/tools/pipeline"; } from "$lib/old/tools/pipeline";
import { TOOL_ICONS } from "$lib/tools/tool-icons"; import { TOOL_ICONS } from "$lib/old/tools/tool-icons";
import DownloadButton from "./DownloadButton.svelte"; import DownloadButton from "./DownloadButton.svelte";
import ParamForm from "./ParamForm.svelte"; import ParamForm from "./ParamForm.svelte";
import Preview from "./Preview.svelte"; import Preview from "./Preview.svelte";
import ToolSearch from "./search/ToolSearch.svelte"; import ToolSearch from "./search/ToolSearch.svelte";
import { createAutoRunner } from "$lib/tools/auto-run"; import { createAutoRunner } from "$lib/old/tools/auto-run";
import { executeStep } from "$lib/tools/executor"; import { executeStep } from "$lib/old/tools/executor";
import { clearOverlay, setOverlay } from "$lib/tools/overlay-store.svelte"; import {
clearOverlay,
setOverlay,
} from "$lib/old/tools/overlay-store.svelte";
import { t } from "$lib/i18n/t"; import { t } from "$lib/i18n/t";
import { toolDescription, toolTitle } from "$lib/i18n/tool-strings"; import { toolDescription, toolTitle } from "$lib/i18n/tool-strings";
import type { StageStatus } from "./stage/stage-props"; import type { StageStatus } from "./stage/stage-props";
@@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import { outputOf, sanitizeParams, type ToolEntry } from "$lib/registry"; import { outputOf, sanitizeParams, type ToolEntry } from "$lib/old/registry";
import type { PixelImage } from "$lib/core/types"; import type { PixelImage } from "$lib/core/types";
import { t } from "$lib/i18n/t"; import { t } from "$lib/i18n/t";
import { toolTitle } from "$lib/i18n/tool-strings"; import { toolTitle } from "$lib/i18n/tool-strings";
@@ -8,7 +8,7 @@
import EmptyState from "../ui/EmptyState.svelte"; import EmptyState from "../ui/EmptyState.svelte";
import ParamsCard from "../tool/ParamsCard.svelte"; import ParamsCard from "../tool/ParamsCard.svelte";
import Preview from "../Preview.svelte"; import Preview from "../Preview.svelte";
import { TOOL_ICONS } from "$lib/tools/tool-icons"; import { TOOL_ICONS } from "$lib/old/tools/tool-icons";
interface Props { interface Props {
index: number; index: number;
@@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import { TOOL_ICONS } from "$lib/tools/tool-icons"; import { TOOL_ICONS } from "$lib/old/tools/tool-icons";
interface Props { interface Props {
toolId: string; toolId: string;
@@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import { isChainable, TOOLS } from "$lib/registry"; import { isChainable, TOOLS } from "$lib/old/registry";
import { LOCALE_TAGS } from "$lib/i18n/dict"; import { LOCALE_TAGS } from "$lib/i18n/dict";
import { getLocale } from "$lib/i18n/locale.svelte"; import { getLocale } from "$lib/i18n/locale.svelte";
import { normalizeForSearch, scoreDoc } from "$lib/i18n/matching"; import { normalizeForSearch, scoreDoc } from "$lib/i18n/matching";
@@ -1,11 +1,11 @@
<script lang="ts"> <script lang="ts">
import type { Snippet } from "svelte"; import type { Snippet } from "svelte";
import { outputOf, sanitizeParams, type ToolEntry } from "$lib/registry"; import { outputOf, sanitizeParams, type ToolEntry } from "$lib/old/registry";
import type { ImageInfo } from "$lib/core/analyze"; import type { ImageInfo } from "$lib/core/analyze";
import type { PixelImage } from "$lib/core/types"; import type { PixelImage } from "$lib/core/types";
import { t } from "$lib/i18n/t"; import { t } from "$lib/i18n/t";
import { toolTitle } from "$lib/i18n/tool-strings"; import { toolTitle } from "$lib/i18n/tool-strings";
import { TOOL_ICONS } from "$lib/tools/tool-icons"; import { TOOL_ICONS } from "$lib/old/tools/tool-icons";
import DownloadButton from "../DownloadButton.svelte"; import DownloadButton from "../DownloadButton.svelte";
import Button from "../ui/Button.svelte"; import Button from "../ui/Button.svelte";
import EmptyState from "../ui/EmptyState.svelte"; import EmptyState from "../ui/EmptyState.svelte";
@@ -1,6 +1,6 @@
import type { ImageInfo } from "$lib/core/analyze"; import type { ImageInfo } from "$lib/core/analyze";
import type { PixelImage } from "$lib/core/types"; import type { PixelImage } from "$lib/core/types";
import type { ToolEntry } from "$lib/registry"; import type { ToolEntry } from "$lib/old/registry";
export type StageStatus = "idle" | "loaded" | "processing" | "error"; export type StageStatus = "idle" | "loaded" | "processing" | "error";
@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import ParamForm from "../ParamForm.svelte"; import ParamForm from "../ParamForm.svelte";
import type { ParamDef, ToolEntry } from "$lib/registry"; import type { ParamDef, ToolEntry } from "$lib/old/registry";
import { t } from "$lib/i18n/t"; import { t } from "$lib/i18n/t";
interface Props { interface Props {
@@ -7,7 +7,7 @@
import TextResult from "./TextResult.svelte"; import TextResult from "./TextResult.svelte";
import type { ImageInfo } from "$lib/core/analyze"; import type { ImageInfo } from "$lib/core/analyze";
import type { PixelImage } from "$lib/core/types"; import type { PixelImage } from "$lib/core/types";
import { outputOf, type ToolEntry } from "$lib/registry"; import { outputOf, type ToolEntry } from "$lib/old/registry";
import { t } from "$lib/i18n/t"; import { t } from "$lib/i18n/t";
type Status = "idle" | "loaded" | "processing" | "error"; type Status = "idle" | "loaded" | "processing" | "error";
@@ -1,4 +1,4 @@
import { ToolError } from "./core/errors"; import { ToolError } from "../core/errors";
export function num(params: Record<string, unknown>, id: string): number { export function num(params: Record<string, unknown>, id: string): number {
const v = params[id]; const v = params[id];
@@ -1,6 +1,6 @@
import type { CategoryId } from "./categories"; import type { CategoryId } from "./categories";
import type { OutputMime } from "./core/io"; import type { OutputMime } from "../core/io";
import type { PixelImage } from "./core/types"; import type { PixelImage } from "../core/types";
import { alphaEntries } from "./registry/alpha"; import { alphaEntries } from "./registry/alpha";
import { analyzeEntries } from "./registry/analyze"; import { analyzeEntries } from "./registry/analyze";
@@ -1,5 +1,5 @@
import type { ToolEntry } from "../registry"; import type { ToolEntry } from "../registry";
import { ToolError } from "../core/errors"; import { ToolError } from "../../core/errors";
import { import {
colorMask, colorMask,
extractAlphaMask, extractAlphaMask,
@@ -9,8 +9,8 @@ import {
removeColorToAlpha, removeColorToAlpha,
roundCorners, roundCorners,
setAlphaChannel, setAlphaChannel,
} from "../core/alpha"; } from "../../core/alpha";
import { backgroundMaskPreview, removeBackground } from "../core/background"; import { backgroundMaskPreview, removeBackground } from "../../core/background";
import { import {
closingImage, closingImage,
contourImage, contourImage,
@@ -18,9 +18,9 @@ import {
erodeImage, erodeImage,
openingImage, openingImage,
strokeImage, strokeImage,
} from "../core/morphology"; } from "../../core/morphology";
import { featherAlpha, defringe } from "../core/pixel-fx"; import { featherAlpha, defringe } from "../../core/pixel-fx";
import { drawImageWatermark } from "../core/domText"; import { drawImageWatermark } from "../../core/domText";
import { getOverlay } from "../tools/overlay-store.svelte"; import { getOverlay } from "../tools/overlay-store.svelte";
import { import {
renderShape, renderShape,
@@ -28,8 +28,8 @@ import {
boxTest, boxTest,
starTest, starTest,
wavyTest, wavyTest,
} from "../core/shapes"; } from "../../core/shapes";
import type { Position9 } from "../core/textdraw"; import type { Position9 } from "../../core/textdraw";
import { num, str } from "../registry-helpers"; import { num, str } from "../registry-helpers";
export function alphaEntries(): ToolEntry[] { export function alphaEntries(): ToolEntry[] {
@@ -5,12 +5,16 @@ import {
luma01, luma01,
rarityPredicate, rarityPredicate,
renderPredicateMask, renderPredicateMask,
} from "../core/masks"; } from "../../core/masks";
import { hasTransparency, isGrayscale, orientationOf } from "../core/analyze"; import {
import { looksLikePng, base64ToBytes, stripDataUri } from "../core/textio"; hasTransparency,
import { clonePixelImage, type PixelImage } from "../core/types"; isGrayscale,
import { encode } from "../core/io"; orientationOf,
import { t } from "../i18n/t"; } from "../../core/analyze";
import { looksLikePng, base64ToBytes, stripDataUri } from "../../core/textio";
import { clonePixelImage, type PixelImage } from "../../core/types";
import { encode } from "../../core/io";
import { t } from "../../i18n/t";
import { num, str } from "../registry-helpers"; import { num, str } from "../registry-helpers";
type MaskToolSpec = { type MaskToolSpec = {
@@ -17,10 +17,10 @@ import {
twoColors, twoColors,
type ChannelSwapPair, type ChannelSwapPair,
type RgbChannel, type RgbChannel,
} from "../core/color"; } from "../../core/color";
import { renderSpace, SPACES, type SpaceId } from "../core/channels"; import { renderSpace, SPACES, type SpaceId } from "../../core/channels";
import { quantizeImage, ditherImage, mapToNearest } from "../core/quantize"; import { quantizeImage, ditherImage, mapToNearest } from "../../core/quantize";
import { parseHexList } from "../core/palette"; import { parseHexList } from "../../core/palette";
import { num, str } from "../registry-helpers"; import { num, str } from "../registry-helpers";
type SpaceEntry = { type SpaceEntry = {
@@ -1,20 +1,20 @@
import type { ToolEntry } from "../registry"; import type { ToolEntry } from "../registry";
import { clonePixelImage } from "../core/types"; import { clonePixelImage } from "../../core/types";
import { flattenOntoColor } from "../core/alpha"; import { flattenOntoColor } from "../../core/alpha";
import { toBase64, toDataUrl, decodeSvgText, encode } from "../core/io"; import { toBase64, toDataUrl, decodeSvgText, encode } from "../../core/io";
import { pixelsToHex, hexToPixels } from "../core/text"; import { pixelsToHex, hexToPixels } from "../../core/text";
import { import {
imageToByteRows, imageToByteRows,
bytesToImage, bytesToImage,
imageToRgbValues, imageToRgbValues,
rgbValuesToImage, rgbValuesToImage,
} from "../core/textio"; } from "../../core/textio";
import { import {
COMPRESSION_LEVELS, COMPRESSION_LEVELS,
findMaxColorsWithin, findMaxColorsWithin,
type CompressionLevel, type CompressionLevel,
} from "../core/compress"; } from "../../core/compress";
import { quantizeImage } from "../core/quantize"; import { quantizeImage } from "../../core/quantize";
import { num, str } from "../registry-helpers"; import { num, str } from "../registry-helpers";
function decodeToPng( function decodeToPng(
@@ -1,13 +1,13 @@
import type { ToolEntry } from "../registry"; import type { ToolEntry } from "../registry";
import { gaussianBlur, sharpen as sharpenImage } from "../core/convolution"; import { gaussianBlur, sharpen as sharpenImage } from "../../core/convolution";
import { vignette } from "../core/effects"; import { vignette } from "../../core/effects";
import { import {
pixelate, pixelate,
shuffleBlocks, shuffleBlocks,
addNoise, addNoise,
silhouette, silhouette,
} from "../core/pixel-fx"; } from "../../core/pixel-fx";
import { jpegRoundtrip } from "../core/io"; import { jpegRoundtrip } from "../../core/io";
import { num, str } from "../registry-helpers"; import { num, str } from "../registry-helpers";
export function filterEntries(): ToolEntry[] { export function filterEntries(): ToolEntry[] {
@@ -1,9 +1,17 @@
import type { ToolEntry } from "../registry"; import type { ToolEntry } from "../registry";
import { ToolError } from "../core/errors"; import { ToolError } from "../../core/errors";
import { solidImage, noiseImage, gradientImage } from "../core/generate"; import { solidImage, noiseImage, gradientImage } from "../../core/generate";
import { colorSpectrum, drawGrid, randomColorBlocks } from "../core/gen-tools"; import {
import { renderTextToImage, renderEmoji, type TextFont } from "../core/domText"; colorSpectrum,
import { changeCanvasSize } from "../core/geometry"; drawGrid,
randomColorBlocks,
} from "../../core/gen-tools";
import {
renderTextToImage,
renderEmoji,
type TextFont,
} from "../../core/domText";
import { changeCanvasSize } from "../../core/geometry";
import { import {
renderWheel, renderWheel,
renderSwatches, renderSwatches,
@@ -19,7 +27,7 @@ import {
stepColors, stepColors,
sortPalette, sortPalette,
type SortKey, type SortKey,
} from "../core/palette"; } from "../../core/palette";
import { num, str, bool } from "../registry-helpers"; import { num, str, bool } from "../registry-helpers";
function hexToRgba(hex: string, alpha = 255): [number, number, number, number] { function hexToRgba(hex: string, alpha = 255): [number, number, number, number] {
@@ -1,5 +1,5 @@
import type { ToolEntry } from "../registry"; import type { ToolEntry } from "../registry";
import { ToolError } from "../core/errors"; import { ToolError } from "../../core/errors";
import { import {
crop, crop,
expandCanvas, expandCanvas,
@@ -15,13 +15,13 @@ import {
symmetricCopy, symmetricCopy,
trimToContent, trimToContent,
type Anchor9, type Anchor9,
} from "../core/geometry"; } from "../../core/geometry";
import { import {
rotateFreeImage, rotateFreeImage,
skewImage, skewImage,
transformImage, transformImage,
zoomImage, zoomImage,
} from "../core/affine"; } from "../../core/affine";
import { num, str } from "../registry-helpers"; import { num, str } from "../registry-helpers";
export function geometryEntries(): ToolEntry[] { export function geometryEntries(): ToolEntry[] {
@@ -1,7 +1,7 @@
import type { ToolEntry } from "../registry"; import type { ToolEntry } from "../registry";
import { drawTextBlock, drawTextTile, type TextFont } from "../core/domText"; import { drawTextBlock, drawTextTile, type TextFont } from "../../core/domText";
import { formatStamp } from "../core/datefmt"; import { formatStamp } from "../../core/datefmt";
import type { Position9 } from "../core/textdraw"; import type { Position9 } from "../../core/textdraw";
import { num, str, bool } from "../registry-helpers"; import { num, str, bool } from "../registry-helpers";
export function textEntries(): ToolEntry[] { export function textEntries(): ToolEntry[] {
@@ -1,7 +1,7 @@
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { executeStep } from "./executor"; import { executeStep } from "./executor";
import { makeImage } from "../core/test-helpers"; import { makeImage } from "../../core/test-helpers";
import type { PixelImage } from "../core/types"; import type { PixelImage } from "../../core/types";
function cloneOf(img: PixelImage): PixelImage { function cloneOf(img: PixelImage): PixelImage {
return { return {
@@ -1,5 +1,5 @@
import type { PixelImage } from "../core/types"; import type { PixelImage } from "../../core/types";
import { ToolError } from "../core/errors"; import { ToolError } from "../../core/errors";
type MaybeRunnable = { type MaybeRunnable = {
id: string; id: string;
@@ -1,6 +1,6 @@
/// <reference lib="webworker" /> /// <reference lib="webworker" />
import type { PixelImage } from "../core/types"; import type { PixelImage } from "../../core/types";
import { ToolError } from "../core/errors"; import { ToolError } from "../../core/errors";
import { getTool, sanitizeParams } from "../registry"; import { getTool, sanitizeParams } from "../registry";
type WorkerRequest = { type WorkerRequest = {
@@ -1,5 +1,5 @@
import { getTool, sanitizeParams } from "../registry"; import { getTool, sanitizeParams } from "../registry";
import { ToolError } from "../core/errors"; import { ToolError } from "../../core/errors";
export type PipelineStep = { export type PipelineStep = {
id: string; id: string;
+4 -4
View File
@@ -1,10 +1,10 @@
<script lang="ts"> <script lang="ts">
import { getTool } from "$lib/registry"; import { getTool } from "$lib/old/registry";
import { t } from "$lib/i18n/t"; import { t } from "$lib/i18n/t";
import { toolTitle } from "$lib/i18n/tool-strings"; import { toolTitle } from "$lib/i18n/tool-strings";
import ToolPage from "$lib/components/ToolPage.svelte"; import ToolPage from "$lib/old/components/ToolPage.svelte";
import ToolSearch from "$lib/components/search/ToolSearch.svelte"; import ToolSearch from "$lib/old/components/search/ToolSearch.svelte";
import Button from "$lib/components/ui/Button.svelte"; import Button from "$lib/old/components/ui/Button.svelte";
const LAST_TOOL_KEY = "last-tool-id"; const LAST_TOOL_KEY = "last-tool-id";
+2 -2
View File
@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import ToolPage from "$lib/components/ToolPage.svelte"; import ToolPage from "$lib/old/components/ToolPage.svelte";
import { getTool } from "$lib/registry"; import { getTool } from "$lib/old/registry";
const base = getTool("linear-gradient-png")!; const base = getTool("linear-gradient-png")!;
</script> </script>
+3 -3
View File
@@ -1,10 +1,10 @@
<script lang="ts"> <script lang="ts">
import { CATEGORIES } from "$lib/categories"; import { CATEGORIES } from "$lib/old/categories";
import { resolve } from "$app/paths"; import { resolve } from "$app/paths";
import { t } from "$lib/i18n/t"; import { t } from "$lib/i18n/t";
import { toolDescription, toolTitle } from "$lib/i18n/tool-strings"; import { toolDescription, toolTitle } from "$lib/i18n/tool-strings";
import ToolCard from "$lib/components/search/ToolCard.svelte"; import ToolCard from "$lib/old/components/search/ToolCard.svelte";
import { TOOLS } from "$lib/registry"; import { TOOLS } from "$lib/old/registry";
</script> </script>
<svelte:head> <svelte:head>
+2 -2
View File
@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import ToolPage from "$lib/components/ToolPage.svelte"; import ToolPage from "$lib/old/components/ToolPage.svelte";
import { getTool } from "$lib/registry"; import { getTool } from "$lib/old/registry";
import { t } from "$lib/i18n/t"; import { t } from "$lib/i18n/t";
import { toolDescription, toolTitle } from "$lib/i18n/tool-strings"; import { toolDescription, toolTitle } from "$lib/i18n/tool-strings";
+1 -1
View File
@@ -1,5 +1,5 @@
import { error } from "@sveltejs/kit"; import { error } from "@sveltejs/kit";
import { getTool, TOOLS } from "$lib/registry"; import { getTool, TOOLS } from "$lib/old/registry";
import { t } from "$lib/i18n/t"; import { t } from "$lib/i18n/t";
import type { EntryGenerator, PageLoad } from "./$types"; import type { EntryGenerator, PageLoad } from "./$types";