chore: clean up $lib folder

idk why we had a million folders containing one file lol. scary looking change
This commit is contained in:
Maya 2025-11-21 20:09:47 +03:00
parent 7ad8619780
commit 3b15fb1d30
No known key found for this signature in database
43 changed files with 60 additions and 60 deletions

View File

@ -1,5 +1,5 @@
<script lang="ts">
import { duration, fade, fly } from "$lib/animation";
import { duration, fade, fly } from "$lib/util/animation";
import { removeDialog } from "$lib/store/DialogProvider";
import { BanIcon, CheckIcon, InfoIcon, TriangleAlert } from "lucide-svelte";
import { quintOut } from "svelte/easing";

View File

@ -1,5 +1,5 @@
<script lang="ts">
import { duration, fade, transition } from "$lib/animation";
import { duration, fade, transition } from "$lib/util/animation";
import { ChevronDown } from "lucide-svelte";
import { onMount } from "svelte";
import { quintOut } from "svelte/easing";

View File

@ -1,7 +1,7 @@
<script lang="ts">
import { browser } from "$app/environment";
import { page } from "$app/stores";
import { duration, fly } from "$lib/animation";
import { duration, fly } from "$lib/util/animation";
import clsx from "clsx";
import { onMount, tick } from "svelte";
import { quintOut } from "svelte/easing";

View File

@ -1,5 +1,5 @@
<script lang="ts">
import { duration, fade, transition } from "$lib/animation";
import { duration, fade, transition } from "$lib/util/animation";
import { m } from "$lib/paraglide/messages";
import { isMobile, files, dropdownStates } from "$lib/store/index.svelte";
import type { Categories } from "$lib/types";

View File

@ -13,7 +13,7 @@
import { vertdFetch } from "$lib/converters/vertd.svelte";
import { m } from "$lib/paraglide/messages";
import { ToastManager, type ToastProps } from "$lib/toast/index.svelte";
import { ToastManager, type ToastProps } from "$lib/util/toast.svelte";
import { addDialog } from "$lib/store/DialogProvider";
import VertdErrorDetails from "./VertdErrorDetails.svelte";

View File

@ -1,5 +1,5 @@
<script lang="ts">
import { duration, fade } from "$lib/animation";
import { duration, fade } from "$lib/util/animation";
import { quintOut } from "svelte/easing";
import Dialog from "../functional/Dialog.svelte";
import {

View File

@ -1,5 +1,5 @@
<script lang="ts">
import { GITHUB_URL_VERT, DISCORD_URL } from "$lib/consts";
import { GITHUB_URL_VERT, DISCORD_URL } from "$lib/util/consts";
import { m } from "$lib/paraglide/messages";
const items = $derived([

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { page } from "$app/state";
import { duration, transition } from "$lib/animation";
import { duration, transition } from "$lib/util/animation";
import VertVBig from "$lib/assets/vert-bg.svg?component";
import {
files,
@ -8,7 +8,7 @@
showGradient,
} from "$lib/store/index.svelte";
import { quintOut } from "svelte/easing";
import { fade } from "$lib/animation";
import { fade } from "$lib/util/animation";
import { Tween } from "svelte/motion";
const colors: {

View File

@ -1,7 +1,7 @@
<script lang="ts">
import { browser } from "$app/environment";
import { page } from "$app/state";
import { duration, fade } from "$lib/animation";
import { duration, fade } from "$lib/util/animation";
import {
effects,
files,

View File

@ -1,9 +1,9 @@
<script lang="ts">
import { page } from "$app/state";
import { duration } from "$lib/animation";
import { duration } from "$lib/util/animation";
import { goingLeft, isMobile } from "$lib/store/index.svelte";
import { quintOut } from "svelte/easing";
import { fly, fade } from "$lib/animation";
import { fly, fade } from "$lib/util/animation";
let { children } = $props();
</script>

View File

@ -1,6 +1,6 @@
<script lang="ts">
import Toast from "$lib/components/visual/Toast.svelte";
import { ToastManager } from "$lib/toast/index.svelte";
import { ToastManager } from "$lib/util/toast.svelte";
</script>
<div

View File

@ -1,5 +1,5 @@
<script lang="ts">
import { duration, fade } from "$lib/animation";
import { duration, fade } from "$lib/util/animation";
import { dropping, effects } from "$lib/store/index.svelte";
import { quintOut } from "svelte/easing";
</script>

View File

@ -1,5 +1,5 @@
<script lang="ts">
import { fade, fly } from "$lib/animation";
import { fade, fly } from "$lib/util/animation";
import {
BanIcon,
CheckIcon,
@ -8,11 +8,11 @@
XIcon,
} from "lucide-svelte";
import { quintOut } from "svelte/easing";
import { ToastManager } from "$lib/toast/index.svelte";
import type { ToastProps } from "$lib/toast/index.svelte";
import { ToastManager } from "$lib/util/toast.svelte";
import type { ToastProps } from "$lib/util/toast.svelte";
import type { SvelteComponent } from "svelte";
import clsx from "clsx";
import type { Toast as ToastType } from "$lib/toast/index.svelte";
import type { Toast as ToastType } from "$lib/util/toast.svelte";
const props: {
toast: ToastType<unknown>;

View File

@ -1,5 +1,5 @@
<script lang="ts">
import { fade } from "$lib/animation";
import { fade } from "$lib/util/animation";
interface Props {
children: () => any;
text: string;

View File

@ -2,10 +2,10 @@ import { VertFile } from "$lib/types";
import { Converter, FormatInfo } from "./converter.svelte";
import { FFmpeg } from "@ffmpeg/ffmpeg";
import { browser } from "$app/environment";
import { error, log } from "$lib/logger";
import { error, log } from "$lib/util/logger";
import { m } from "$lib/paraglide/messages";
import { Settings } from "$lib/sections/settings/index.svelte";
import { ToastManager } from "$lib/toast/index.svelte";
import { ToastManager } from "$lib/util/toast.svelte";
// TODO: differentiate in UI? (not native formats)
const videoFormats = [

View File

@ -4,7 +4,7 @@ import { FFmpegConverter } from "./ffmpeg.svelte";
import { PandocConverter } from "./pandoc.svelte";
import { VertdConverter } from "./vertd.svelte";
import { MagickConverter } from "./magick.svelte";
import { DISABLE_ALL_EXTERNAL_REQUESTS } from "$lib/consts";
import { DISABLE_ALL_EXTERNAL_REQUESTS } from "$lib/util/consts";
const getConverters = (): Converter[] => {
const converters: Converter[] = [

View File

@ -1,5 +1,5 @@
import { browser } from "$app/environment";
import { error, log } from "$lib/logger";
import { error, log } from "$lib/util/logger";
import { m } from "$lib/paraglide/messages";
import { VertFile, type WorkerMessage } from "$lib/types";
import MagickWorker from "$lib/workers/magick?worker&url";
@ -7,7 +7,7 @@ import { Converter, FormatInfo } from "./converter.svelte";
import { imageFormats } from "./magick-automated";
import { Settings } from "$lib/sections/settings/index.svelte";
import magickWasm from "@imagemagick/magick-wasm/magick.wasm?url";
import { ToastManager } from "$lib/toast/index.svelte";
import { ToastManager } from "$lib/util/toast.svelte";
export class MagickConverter extends Converter {
public name = "imagemagick";

View File

@ -2,8 +2,8 @@ import { VertFile, type WorkerMessage } from "$lib/types";
import { Converter, FormatInfo } from "./converter.svelte";
import { browser } from "$app/environment";
import PandocWorker from "$lib/workers/pandoc?worker&url";
import { error, log } from "$lib/logger";
import { ToastManager } from "$lib/toast/index.svelte";
import { error, log } from "$lib/util/logger";
import { ToastManager } from "$lib/util/toast.svelte";
import { m } from "$lib/paraglide/messages";
export class PandocConverter extends Converter {

View File

@ -1,5 +1,5 @@
import VertdErrorComponent from "$lib/components/functional/VertdError.svelte";
import { error, log } from "$lib/logger";
import { error, log } from "$lib/util/logger";
import { m } from "$lib/paraglide/messages";
import { Settings } from "$lib/sections/settings/index.svelte";
import { VertdInstance } from "$lib/sections/settings/vertdSettings.svelte";

View File

@ -4,7 +4,7 @@
import {
DISABLE_ALL_EXTERNAL_REQUESTS,
GITHUB_URL_VERT,
} from "$lib/consts";
} from "$lib/util/consts";
import { m } from "$lib/paraglide/messages";
import { link, sanitize } from "$lib/store/index.svelte";

View File

@ -18,7 +18,7 @@
PUB_STRIPE_KEY === OFFICIAL_STRIPE_KEY;
// import { PUB_STRIPE_KEY, PUB_DONATION_API } from "$env/static/public";
import { fade } from "$lib/animation";
import { fade } from "$lib/util/animation";
import FancyInput from "$lib/components/functional/FancyInput.svelte";
import Panel from "$lib/components/visual/Panel.svelte";
import { effects, link, sanitize } from "$lib/store/index.svelte";
@ -35,8 +35,8 @@
import { Elements, PaymentElement } from "svelte-stripe";
import { quintOut } from "svelte/easing";
import { m } from "$lib/paraglide/messages";
import { ToastManager } from "$lib/toast/index.svelte";
import { log } from "$lib/logger";
import { ToastManager } from "$lib/util/toast.svelte";
import { log } from "$lib/util/logger";
let amount = $state(1);
let customAmount = $state("");

View File

@ -1,6 +1,6 @@
<script lang="ts">
import Panel from "$lib/components/visual/Panel.svelte";
import { CONTACT_EMAIL, DISCORD_URL, GITHUB_URL_VERT } from "$lib/consts";
import { CONTACT_EMAIL, DISCORD_URL, GITHUB_URL_VERT } from "$lib/util/consts";
import { effects } from "$lib/store/index.svelte";
import {
GithubIcon,

View File

@ -2,11 +2,11 @@
import Panel from "$lib/components/visual/Panel.svelte";
import { PiggyBankIcon, CopyIcon, CheckIcon } from "lucide-svelte";
import HotMilk from "$lib/assets/hotmilk.svg?component";
import { DISCORD_URL } from "$lib/consts";
import { error } from "$lib/logger";
import { DISCORD_URL } from "$lib/util/consts";
import { error } from "$lib/util/logger";
import { m } from "$lib/paraglide/messages";
import { link, sanitize } from "$lib/store/index.svelte";
import { ToastManager } from "$lib/toast/index.svelte";
import { ToastManager } from "$lib/util/toast.svelte";
let copied = false;
let timeoutId: NodeJS.Timeout | null = null;

View File

@ -11,11 +11,11 @@
import { effects } from "$lib/store/index.svelte";
import { m } from "$lib/paraglide/messages";
import { link, sanitize } from "$lib/store/index.svelte";
import { swManager, type CacheInfo } from "$lib/sw/register";
import { swManager, type CacheInfo } from "$lib/util/sw";
import { onMount } from "svelte";
import { error } from "$lib/logger";
import { ToastManager } from "$lib/toast/index.svelte";
import { DISABLE_ALL_EXTERNAL_REQUESTS } from "$lib/consts";
import { error } from "$lib/util/logger";
import { ToastManager } from "$lib/util/toast.svelte";
import { DISABLE_ALL_EXTERNAL_REQUESTS } from "$lib/util/consts";
import { addDialog } from "$lib/store/DialogProvider";
const { settings = $bindable() }: { settings: ISettings } = $props();

View File

@ -1,6 +1,6 @@
<script lang="ts">
import Panel from "$lib/components/visual/Panel.svelte";
import { GITHUB_URL_VERTD } from "$lib/consts";
import { GITHUB_URL_VERTD } from "$lib/util/consts";
import { ServerIcon } from "lucide-svelte";
import type { ISettings } from "./index.svelte";
import clsx from "clsx";

View File

@ -1,4 +1,4 @@
import { ip, type IpInfo } from "$lib/ip";
import { ip, type IpInfo } from "$lib/util/ip";
import { Settings } from "./index.svelte";
import { PUB_VERTD_URL } from "$env/static/public";

View File

@ -1,6 +1,6 @@
import { browser } from "$app/environment";
import { byNative, converters } from "$lib/converters";
import { error, log } from "$lib/logger";
import { error, log } from "$lib/util/logger";
import { VertFile } from "$lib/types";
import { parseBlob, selectCover } from "music-metadata";
import { writable } from "svelte/store";
@ -9,8 +9,8 @@ import PQueue from "p-queue";
import { getLocale, setLocale } from "$lib/paraglide/runtime";
import { m } from "$lib/paraglide/messages";
import sanitizeHtml from "sanitize-html";
import { ToastManager } from "$lib/toast/index.svelte";
import { GB } from "$lib/consts";
import { ToastManager } from "$lib/util/toast.svelte";
import { GB } from "$lib/util/consts";
class Files {
public files = $state<VertFile[]>([]);
@ -151,7 +151,7 @@ class Files {
}),
});
const { extractZip } = await import("$lib/zip");
const { extractZip } = await import("$lib/util/zip");
const entries = await extractZip(file);
const totalEntries = entries.length;

View File

@ -1,7 +1,7 @@
import { byNative, converters } from "$lib/converters";
import type { Converter } from "$lib/converters/converter.svelte";
import { m } from "$lib/paraglide/messages";
import { ToastManager } from "$lib/toast/index.svelte";
import { ToastManager } from "$lib/util/toast.svelte";
import type { Component } from "svelte";
import { MAX_ARRAY_BUFFER_SIZE } from "$lib/store/index.svelte";
@ -121,7 +121,7 @@ export class VertFile {
}
private async convertZip(converter: Converter): Promise<VertFile> {
const { extractZip, createZip } = await import("$lib/zip");
const { extractZip, createZip } = await import("$lib/util/zip");
const entries = await extractZip(this.file);
const totalFiles = entries.length;

View File

@ -1,4 +1,4 @@
import { error, log } from "$lib/logger";
import { error, log } from "$lib/util/logger";
import { unzip } from "fflate";
import { downloadZip } from "client-zip";

View File

@ -7,7 +7,7 @@ import {
type IMagickImage,
} from "@imagemagick/magick-wasm";
import { makeZip } from "client-zip";
import { parseAni } from "$lib/parse/ani";
import { parseAni } from "$lib/util/parse/ani";
import { parseIcns } from "vert-wasm";
import type { WorkerMessage } from "$lib/types";

View File

@ -3,7 +3,7 @@
import { goto, beforeNavigate, afterNavigate } from "$app/navigation";
import { PUB_PLAUSIBLE_URL, PUB_HOSTNAME } from "$env/static/public";
import { DISABLE_ALL_EXTERNAL_REQUESTS, VERT_NAME } from "$lib/consts";
import { DISABLE_ALL_EXTERNAL_REQUESTS, VERT_NAME } from "$lib/util/consts.js";
import * as Layout from "$lib/components/layout";
import * as Navbar from "$lib/components/layout/Navbar";
import featuredImage from "$lib/assets/VERT_Feature.webp";
@ -20,7 +20,7 @@
} from "$lib/store/index.svelte";
import "$lib/css/app.scss";
import { browser } from "$app/environment";
import { initStores as initAnimStores } from "$lib/animation/index.js";
import { initStores as initAnimStores } from "$lib/util/animation.js";
import { VertdInstance } from "$lib/sections/settings/vertdSettings.svelte.js";
let { children, data } = $props();

View File

@ -12,7 +12,7 @@
import { onMount } from "svelte";
import type { WorkerStatus } from "$lib/converters/converter.svelte";
import { sanitize } from "$lib/store/index.svelte";
import { DISABLE_ALL_EXTERNAL_REQUESTS } from "$lib/consts";
import { DISABLE_ALL_EXTERNAL_REQUESTS } from "$lib/util/consts";
const getSupportedFormats = (name: string) =>
converters

View File

@ -1,5 +1,5 @@
<script lang="ts">
import { error } from "$lib/logger";
import { error } from "$lib/util/logger";
import * as About from "$lib/sections/about";
import { InfoIcon } from "lucide-svelte";
import { onMount } from "svelte";
@ -9,9 +9,9 @@
import avatarRealmy from "$lib/assets/avatars/realmy.jpg";
import avatarAzurejelly from "$lib/assets/avatars/azurejelly.jpg";
import { PUB_DONATION_URL, PUB_STRIPE_KEY } from "$env/static/public";
import { DISABLE_ALL_EXTERNAL_REQUESTS, GITHUB_API_URL } from "$lib/consts";
import { DISABLE_ALL_EXTERNAL_REQUESTS, GITHUB_API_URL } from "$lib/util/consts";
import { m } from "$lib/paraglide/messages";
import { ToastManager } from "$lib/toast/index.svelte";
import { ToastManager } from "$lib/util/toast.svelte";
// import { dev } from "$app/environment";
// import { page } from "$app/state";

View File

@ -31,8 +31,8 @@
import { m } from "$lib/paraglide/messages";
import { Settings } from "$lib/sections/settings/index.svelte";
import { MAX_ARRAY_BUFFER_SIZE } from "$lib/store/index.svelte";
import { GB } from "$lib/consts";
import { log } from "$lib/logger";
import { GB } from "$lib/util/consts";
import { log } from "$lib/util/logger";
let processedFileIds = $state(new Set<string>());

View File

@ -1,13 +1,13 @@
<script lang="ts">
import { browser } from "$app/environment";
import { log } from "$lib/logger";
import { log } from "$lib/util/logger";
import * as Settings from "$lib/sections/settings/index.svelte";
import { PUB_PLAUSIBLE_URL } from "$env/static/public";
import { SettingsIcon } from "lucide-svelte";
import { onMount } from "svelte";
import { m } from "$lib/paraglide/messages";
import { ToastManager } from "$lib/toast/index.svelte";
import { DISABLE_ALL_EXTERNAL_REQUESTS } from "$lib/consts";
import { ToastManager } from "$lib/util/toast.svelte";
import { DISABLE_ALL_EXTERNAL_REQUESTS } from "$lib/util/consts";
let settings = $state(Settings.Settings.instance.settings);