feat: rename old -> v1 folder

This commit is contained in:
2026-09-10 20:23:45 +05:00
parent 1e5e096d5d
commit 33e3f3c4f0
60 changed files with 60 additions and 69 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
import type { CategoryId } from "../old/categories";
import type { CategoryId } from "../v1/categories";
export const LOCALES = ["ru", "en"] as const;
export type Locale = (typeof LOCALES)[number];
+2 -2
View File
@@ -1,7 +1,7 @@
import { describe, expect, it } from "vitest";
import { TOOLS } from "../old/registry";
import { normalizeForSearch, scoreDoc, type SearchDoc } from "./matching";
import { TOOLS } from "../v1/registry";
import { setLocale } from "./locale.svelte";
import { normalizeForSearch, scoreDoc, type SearchDoc } from "./matching";
import { toolSearchDoc } from "./tool-strings";
describe("normalizeForSearch", () => {
+1 -2
View File
@@ -1,8 +1,7 @@
import { describe, expect, it } from "vitest";
import { TOOLS } from "../old/registry";
import { isChainable, TOOLS } from "../v1/registry";
import { normalizeForSearch, scoreDoc } from "./matching";
import { toolSearchDoc } from "./tool-strings";
import { isChainable } from "../old/registry";
function hits(q: string): string[] {
const nq = normalizeForSearch(q);
+3 -3
View File
@@ -1,10 +1,10 @@
import { afterEach, describe, expect, it, vi } from "vitest";
import { setLocale } from "./locale.svelte";
import { t } from "./t";
import { TOOLS } from "../v1/registry";
import { LOCALE_TAGS } from "./dict";
import { setLocale } from "./locale.svelte";
import { normalizeForSearch, scoreDoc } from "./matching";
import { t } from "./t";
import { toolSearchDoc } from "./tool-strings";
import { TOOLS } from "../old/registry";
afterEach(() => {
setLocale("ru");
+2 -2
View File
@@ -1,6 +1,6 @@
import type { ParamDef, ToolEntry } from "$lib/old/registry";
import type { SearchDoc } from "./matching";
import type { ParamDef, ToolEntry } from "$lib/v1/registry";
import { getMergedDict } from "./locale.svelte";
import type { SearchDoc } from "./matching";
import { ru } from "./ru";
/**
+1 -1
View File
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { TOOLS } from "../old/registry";
import { TOOLS } from "../v1/registry";
import { en } from "./en";
import { ru } from "./ru";
@@ -1,9 +1,9 @@
<script lang="ts">
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/old/registry";
import { t } from "$lib/i18n/t";
import type { OutputFormat } from "$lib/v1/registry";
import Button from "./ui/Button.svelte";
interface Props {
image: PixelImage | null;
@@ -1,12 +1,12 @@
<script lang="ts">
import { t } from "$lib/i18n/t";
import { optionLabel, paramLabel } from "$lib/i18n/tool-strings";
import type { ParamDef, ToolEntry } from "$lib/v1/registry";
import CheckboxField from "./ui/CheckboxField.svelte";
import ColorField from "./ui/ColorField.svelte";
import SelectField from "./ui/SelectField.svelte";
import SliderField from "./ui/SliderField.svelte";
import TextField from "./ui/TextField.svelte";
import type { ParamDef, ToolEntry } from "$lib/old/registry";
import { optionLabel, paramLabel } from "$lib/i18n/tool-strings";
import { t } from "$lib/i18n/t";
interface Props {
tool: ToolEntry;
@@ -7,34 +7,27 @@
unsupportedImageError,
} from "$lib/core/io";
import type { PixelImage } from "$lib/core/types";
import { t } from "$lib/i18n/t";
import { toolDescription, toolTitle } from "$lib/i18n/tool-strings";
import {
defaultParams,
getTool,
outputOf,
sanitizeParams,
type ToolEntry,
} from "$lib/old/registry";
} from "$lib/v1/registry";
import { createAutoRunner } from "$lib/v1/tools/auto-run";
import { executeStep } from "$lib/v1/tools/executor";
import { clearOverlay, setOverlay } from "$lib/v1/tools/overlay-store.svelte";
import {
loadStoredSteps,
newStepId,
saveSteps,
type PipelineStep,
} 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/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";
} from "$lib/v1/tools/pipeline";
import { TOOL_ICONS } from "$lib/v1/tools/tool-icons";
import ChainToolBlock from "./chain/ChainToolBlock.svelte";
import ToolSearch from "./search/ToolSearch.svelte";
import type { StageStatus } from "./stage/stage-props";
import ToolStage from "./stage/ToolStage.svelte";
import ToolStageClassic from "./stage/ToolStageClassic.svelte";
@@ -1,14 +1,14 @@
<script lang="ts">
import { outputOf, sanitizeParams, type ToolEntry } from "$lib/old/registry";
import type { PixelImage } from "$lib/core/types";
import { t } from "$lib/i18n/t";
import { toolTitle } from "$lib/i18n/tool-strings";
import { outputOf, sanitizeParams, type ToolEntry } from "$lib/v1/registry";
import { TOOL_ICONS } from "$lib/v1/tools/tool-icons";
import DownloadButton from "../DownloadButton.svelte";
import Preview from "../Preview.svelte";
import ParamsCard from "../tool/ParamsCard.svelte";
import Button from "../ui/Button.svelte";
import EmptyState from "../ui/EmptyState.svelte";
import ParamsCard from "../tool/ParamsCard.svelte";
import Preview from "../Preview.svelte";
import { TOOL_ICONS } from "$lib/old/tools/tool-icons";
interface Props {
index: number;
@@ -1,5 +1,5 @@
<script lang="ts">
import { TOOL_ICONS } from "$lib/old/tools/tool-icons";
import { TOOL_ICONS } from "$lib/v1/tools/tool-icons";
interface Props {
toolId: string;
@@ -1,5 +1,4 @@
<script lang="ts">
import { isChainable, TOOLS } from "$lib/old/registry";
import { LOCALE_TAGS } from "$lib/i18n/dict";
import { getLocale } from "$lib/i18n/locale.svelte";
import { normalizeForSearch, scoreDoc } from "$lib/i18n/matching";
@@ -9,6 +8,7 @@
toolSearchDoc,
toolTitle,
} from "$lib/i18n/tool-strings";
import { isChainable, TOOLS } from "$lib/v1/registry";
import ToolCard from "./ToolCard.svelte";
interface Props {
@@ -1,20 +1,19 @@
<script lang="ts">
import type { Snippet } from "svelte";
import { outputOf, sanitizeParams, type ToolEntry } from "$lib/old/registry";
import type { ImageInfo } from "$lib/core/analyze";
import type { PixelImage } from "$lib/core/types";
import { t } from "$lib/i18n/t";
import { toolTitle } from "$lib/i18n/tool-strings";
import { TOOL_ICONS } from "$lib/old/tools/tool-icons";
import { outputOf, sanitizeParams, type ToolEntry } from "$lib/v1/registry";
import { TOOL_ICONS } from "$lib/v1/tools/tool-icons";
import type { Snippet } from "svelte";
import DownloadButton from "../DownloadButton.svelte";
import Button from "../ui/Button.svelte";
import EmptyState from "../ui/EmptyState.svelte";
import Preview from "../Preview.svelte";
import OverlayCard from "../tool/OverlayCard.svelte";
import ParamsCard from "../tool/ParamsCard.svelte";
import ResultCard from "../tool/ResultCard.svelte";
import SourceCard from "../tool/SourceCard.svelte";
import TextInputCard from "../tool/TextInputCard.svelte";
import Preview from "../Preview.svelte";
import Button from "../ui/Button.svelte";
import EmptyState from "../ui/EmptyState.svelte";
import type { StageStatus } from "./stage-props";
interface Props {
@@ -1,6 +1,6 @@
import type { ImageInfo } from "$lib/core/analyze";
import type { PixelImage } from "$lib/core/types";
import type { ToolEntry } from "$lib/old/registry";
import type { ToolEntry } from "$lib/v1/registry";
export type StageStatus = "idle" | "loaded" | "processing" | "error";
@@ -1,7 +1,7 @@
<script lang="ts">
import ParamForm from "../ParamForm.svelte";
import type { ParamDef, ToolEntry } from "$lib/old/registry";
import { t } from "$lib/i18n/t";
import type { ParamDef, ToolEntry } from "$lib/v1/registry";
import ParamForm from "../ParamForm.svelte";
interface Props {
tool: ToolEntry;
@@ -1,14 +1,14 @@
<script lang="ts">
import Button from "../ui/Button.svelte";
import DownloadButton from "../DownloadButton.svelte";
import EmptyState from "../ui/EmptyState.svelte";
import InfoPanel from "../InfoPanel.svelte";
import Preview from "../Preview.svelte";
import TextResult from "./TextResult.svelte";
import type { ImageInfo } from "$lib/core/analyze";
import type { PixelImage } from "$lib/core/types";
import { outputOf, type ToolEntry } from "$lib/old/registry";
import { t } from "$lib/i18n/t";
import { outputOf, type ToolEntry } from "$lib/v1/registry";
import DownloadButton from "../DownloadButton.svelte";
import InfoPanel from "../InfoPanel.svelte";
import Preview from "../Preview.svelte";
import Button from "../ui/Button.svelte";
import EmptyState from "../ui/EmptyState.svelte";
import TextResult from "./TextResult.svelte";
type Status = "idle" | "loaded" | "processing" | "error";