feat: flatten lib/preview -> lib folder

This commit is contained in:
2026-09-10 20:15:21 +05:00
parent f8a1da6ff7
commit 1e5e096d5d
13 changed files with 10 additions and 14 deletions
@@ -1,5 +1,5 @@
import { CATEGORY_IDS } from "./categories";
import { TOOLS, type ToolEntry } from "../registry-new";
import { TOOLS, type ToolEntry } from "./registry-new";
export type PreviewGroup = {
id: string;
+1 -1
View File
@@ -5,8 +5,8 @@
import { ToolError } from "$lib/core/errors";
import { decodeFile, encode } from "$lib/core/io";
import type { PixelImage } from "$lib/core/types";
import { execute } from "$lib/executor";
import { t } from "$lib/i18n/t";
import { execute } from "$lib/preview/executor";
import type { ToolEntry } from "$lib/registry-new";
import {
defaultSchemaParams,
@@ -35,10 +35,6 @@
padding: var(--space-s) var(--space-m);
cursor: pointer;
}
.lang-div {
color: var(--color-text);
font-family: var(--font-sans);
}
.lang-btn.active {
background: var(--color-text);
color: var(--color-background);
@@ -1,8 +1,8 @@
import { describe, expect, it } from "vitest";
import { PREVIEW_GROUPS } from "../preview/catalog";
import { PREVIEW_GROUPS } from "../catalog";
import type { PixelImage } from "../core/types";
import { TOOLS } from "../registry-new";
import { defaultSchemaParams, sanitizeSchemaParams } from "../registry-schema";
import type { PixelImage } from "../core/types";
import type { ToolResult } from "./types";
function asImage(result: ToolResult): PixelImage {
+1 -1
View File
@@ -1,7 +1,7 @@
import type { CategoryId } from "../categories";
import { ToolError } from "../core/errors";
import type { OutputMime } from "../core/io";
import type { PixelImage } from "../core/types";
import type { CategoryId } from "../preview/categories";
import type { ToolSchema } from "../registry-schema";
/** Формат скачивания, отличный от PNG (bmp/jpeg/webp). */