mirror of
https://github.com/Ku6epXBOCTuK/easy-png-tools.git
synced 2026-09-14 13:36:36 +00:00
feat: flatten lib/preview -> lib folder
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { CATEGORY_IDS } from "./categories";
|
import { CATEGORY_IDS } from "./categories";
|
||||||
import { TOOLS, type ToolEntry } from "../registry-new";
|
import { TOOLS, type ToolEntry } from "./registry-new";
|
||||||
|
|
||||||
export type PreviewGroup = {
|
export type PreviewGroup = {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -5,8 +5,8 @@
|
|||||||
import { ToolError } from "$lib/core/errors";
|
import { ToolError } from "$lib/core/errors";
|
||||||
import { decodeFile, encode } from "$lib/core/io";
|
import { decodeFile, encode } from "$lib/core/io";
|
||||||
import type { PixelImage } from "$lib/core/types";
|
import type { PixelImage } from "$lib/core/types";
|
||||||
|
import { execute } from "$lib/executor";
|
||||||
import { t } from "$lib/i18n/t";
|
import { t } from "$lib/i18n/t";
|
||||||
import { execute } from "$lib/preview/executor";
|
|
||||||
import type { ToolEntry } from "$lib/registry-new";
|
import type { ToolEntry } from "$lib/registry-new";
|
||||||
import {
|
import {
|
||||||
defaultSchemaParams,
|
defaultSchemaParams,
|
||||||
|
|||||||
@@ -35,10 +35,6 @@
|
|||||||
padding: var(--space-s) var(--space-m);
|
padding: var(--space-s) var(--space-m);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.lang-div {
|
|
||||||
color: var(--color-text);
|
|
||||||
font-family: var(--font-sans);
|
|
||||||
}
|
|
||||||
.lang-btn.active {
|
.lang-btn.active {
|
||||||
background: var(--color-text);
|
background: var(--color-text);
|
||||||
color: var(--color-background);
|
color: var(--color-background);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { describe, expect, it } from "vitest";
|
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 { TOOLS } from "../registry-new";
|
||||||
import { defaultSchemaParams, sanitizeSchemaParams } from "../registry-schema";
|
import { defaultSchemaParams, sanitizeSchemaParams } from "../registry-schema";
|
||||||
import type { PixelImage } from "../core/types";
|
|
||||||
import type { ToolResult } from "./types";
|
import type { ToolResult } from "./types";
|
||||||
|
|
||||||
function asImage(result: ToolResult): PixelImage {
|
function asImage(result: ToolResult): PixelImage {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
import type { CategoryId } from "../categories";
|
||||||
import { ToolError } from "../core/errors";
|
import { ToolError } from "../core/errors";
|
||||||
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 type { CategoryId } from "../preview/categories";
|
|
||||||
import type { ToolSchema } from "../registry-schema";
|
import type { ToolSchema } from "../registry-schema";
|
||||||
|
|
||||||
/** Формат скачивания, отличный от PNG (bmp/jpeg/webp). */
|
/** Формат скачивания, отличный от PNG (bmp/jpeg/webp). */
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { PREVIEW_GROUPS, PREVIEW_TOTAL } from "$lib/catalog";
|
||||||
import CatalogGroup from "$lib/components/CatalogGroup.svelte";
|
import CatalogGroup from "$lib/components/CatalogGroup.svelte";
|
||||||
import CatalogHeader from "$lib/components/CatalogHeader.svelte";
|
import CatalogHeader from "$lib/components/CatalogHeader.svelte";
|
||||||
import CatalogToolbar from "$lib/components/CatalogToolbar.svelte";
|
import CatalogToolbar from "$lib/components/CatalogToolbar.svelte";
|
||||||
import ToolCard from "$lib/components/ToolCard.svelte";
|
import ToolCard from "$lib/components/ToolCard.svelte";
|
||||||
import { PREVIEW_GROUPS, PREVIEW_TOTAL } from "$lib/preview/catalog";
|
import { TOOL_ICONS } from "$lib/tool-icons";
|
||||||
import { TOOL_ICONS } from "$lib/preview/tool-icons";
|
|
||||||
|
|
||||||
let query = $state("");
|
let query = $state("");
|
||||||
let category = $state<string>("all");
|
let category = $state<string>("all");
|
||||||
|
|||||||
@@ -23,8 +23,8 @@
|
|||||||
import Toggle from "$lib/components/ui/Toggle.svelte";
|
import Toggle from "$lib/components/ui/Toggle.svelte";
|
||||||
import { Download, ImageOff, Plus, Trash2 } from "@lucide/svelte";
|
import { Download, ImageOff, Plus, Trash2 } from "@lucide/svelte";
|
||||||
|
|
||||||
import { TOOL_ICONS } from "$lib/preview/tool-icons";
|
|
||||||
import { TOOLS } from "$lib/registry-new";
|
import { TOOLS } from "$lib/registry-new";
|
||||||
|
import { TOOL_ICONS } from "$lib/tool-icons";
|
||||||
|
|
||||||
let mode = $state("preview");
|
let mode = $state("preview");
|
||||||
let radius = $state(8);
|
let radius = $state(8);
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { PREVIEW_GROUPS, PREVIEW_TOTAL } from "$lib/catalog";
|
||||||
import CatalogGroup from "$lib/components/CatalogGroup.svelte";
|
import CatalogGroup from "$lib/components/CatalogGroup.svelte";
|
||||||
import CatalogHeader from "$lib/components/CatalogHeader.svelte";
|
import CatalogHeader from "$lib/components/CatalogHeader.svelte";
|
||||||
import CatalogToolbar from "$lib/components/CatalogToolbar.svelte";
|
import CatalogToolbar from "$lib/components/CatalogToolbar.svelte";
|
||||||
import ToolCard from "$lib/components/ToolCard.svelte";
|
import ToolCard from "$lib/components/ToolCard.svelte";
|
||||||
import { PREVIEW_GROUPS, PREVIEW_TOTAL } from "$lib/preview/catalog";
|
import { TOOL_ICONS } from "$lib/tool-icons";
|
||||||
import { TOOL_ICONS } from "$lib/preview/tool-icons";
|
|
||||||
|
|
||||||
let query = $state("");
|
let query = $state("");
|
||||||
let category = $state<string>("all");
|
let category = $state<string>("all");
|
||||||
|
|||||||
Reference in New Issue
Block a user