Yarn Updates, Conde cleanup

This commit is contained in:
Neshura 2025-04-04 23:55:56 +02:00
parent d7c7db0ef9
commit 6646d3b075
Signed by: Neshura
GPG key ID: 4E2D47B1374C297D
15 changed files with 966 additions and 963 deletions

View file

@ -20,6 +20,7 @@
"@sveltejs/kit": "^2.0.0", "@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0", "@sveltejs/vite-plugin-svelte": "^3.0.0",
"@types/eslint": "8.56.0", "@types/eslint": "8.56.0",
"@types/sanitize-html": "^2.15.0",
"@types/socket.io": "^3.0.2", "@types/socket.io": "^3.0.2",
"@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0", "@typescript-eslint/parser": "^6.0.0",
@ -32,7 +33,7 @@
"prettier": "^3.1.1", "prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2", "prettier-plugin-svelte": "^3.1.2",
"prettier-plugin-tailwindcss": "^0.5.9", "prettier-plugin-tailwindcss": "^0.5.9",
"svelte": "^5.0.0-next.1", "svelte": "^5.0.0",
"svelte-check": "^3.6.0", "svelte-check": "^3.6.0",
"tailwindcss": "^3.3.6", "tailwindcss": "^3.3.6",
"tslib": "^2.4.1", "tslib": "^2.4.1",
@ -41,7 +42,7 @@
}, },
"type": "module", "type": "module",
"dependencies": { "dependencies": {
"bits-ui": "^0.13.2", "bits-ui": "0.22.0",
"clsx": "^2.1.0", "clsx": "^2.1.0",
"radix-icons-svelte": "^1.2.1", "radix-icons-svelte": "^1.2.1",
"sanitize-html": "^2.11.0", "sanitize-html": "^2.11.0",

View file

@ -1,14 +1,14 @@
<svelte:options runes={true} /> <svelte:options runes={true} />
<script lang="ts"> <script lang="ts">
import { Clipboard, Copy, OpenInNewWindow } from 'radix-icons-svelte'; import { Copy, OpenInNewWindow } from 'radix-icons-svelte';
import { quintInOut } from 'svelte/easing'; import { quintInOut } from 'svelte/easing';
import { slide } from 'svelte/transition'; import { slide } from 'svelte/transition';
import { IconType, type Server } from '$lib/types/data-types'; import { IconType, type Server } from '$lib/types/data-types';
import { Skeleton } from '$lib/components/ui/skeleton'; import { Skeleton } from '$lib/components/ui/skeleton';
import { Button } from '$lib/components/ui/button'; import { Button } from '$lib/components/ui/button';
let { server, icons, monitor } = $props<{ let { server, icons } = $props<{
server: Server; server: Server;
icons: Array<string>; icons: Array<string>;
}>(); }>();
@ -37,12 +37,6 @@
} }
$effect(() => { $effect(() => {
if (typeof server.id === 'undefined') {
status = 99;
}
if (typeof monitor !== 'undefined') {
status = monitor.status;
}
if (icons.length != 0 && typeof server.icon !== 'undefined') { if (icons.length != 0 && typeof server.icon !== 'undefined') {
const rootSplit = server.icon.split('/'); const rootSplit = server.icon.split('/');
const root = rootSplit[rootSplit.length - 1]; const root = rootSplit[rootSplit.length - 1];
@ -66,8 +60,9 @@
<div class="flex flex-row justify-between"> <div class="flex flex-row justify-between">
<div <div
class="flex flex-row items-center gap-1" class="flex flex-row items-center gap-1"
on:mouseover={() => (hover.title = true)} onmouseover={() => (hover.title = true)}
on:mouseleave={() => (hover.title = false)} onfocus={() => (hover.title = true)}
onmouseleave={() => (hover.title = false)}
> >
{#if typeof server.icon !== 'undefined'} {#if typeof server.icon !== 'undefined'}
{#if img_source != ''} {#if img_source != ''}
@ -119,8 +114,9 @@
<a <a
class="flex flex-row rounded-md border-x-2 px-2 text-sm hover:border-secondary hover:text-secondary" class="flex flex-row rounded-md border-x-2 px-2 text-sm hover:border-secondary hover:text-secondary"
href={server.href} href={server.href}
on:mouseover={() => (hover.link = true)} onmouseover={() => (hover.link = true)}
on:mouseleave={() => (hover.link = false)} onfocus={() => (hover.title = true)}
onmouseleave={() => (hover.link = false)}
> >
Open Open
{#if hover.link} {#if hover.link}
@ -140,8 +136,9 @@
<a <a
class="flex flex-row rounded-md border-x-2 px-2 text-sm hover:border-secondary hover:text-secondary" class="flex flex-row rounded-md border-x-2 px-2 text-sm hover:border-secondary hover:text-secondary"
href={server.extLink} href={server.extLink}
on:mouseover={() => (hover.ext = true)} onmouseover={() => (hover.ext = true)}
on:mouseleave={() => (hover.ext = false)} onfocus={() => (hover.title = true)}
onmouseleave={() => (hover.ext = false)}
> >
Official Site Official Site
{#if hover.ext} {#if hover.ext}

View file

@ -10,11 +10,8 @@
let { service, icons, monitor } = $props<{ let { service, icons, monitor } = $props<{
service: Service; service: Service;
icons: Array<string>; icons: Array<string>;
monitor: Heartbeat;
}>(); }>();
let status = $state(4);
let hover = $state({ let hover = $state({
title: false, title: false,
link: false, link: false,
@ -35,9 +32,6 @@
} }
$effect(() => { $effect(() => {
if (typeof monitor !== 'undefined') {
status = monitor.status;
}
if (icons.length != 0) { if (icons.length != 0) {
const rootSplit = service.icon.split('/'); const rootSplit = service.icon.split('/');
const root = rootSplit[rootSplit.length - 1]; const root = rootSplit[rootSplit.length - 1];
@ -61,8 +55,9 @@
<div class="flex flex-row justify-between"> <div class="flex flex-row justify-between">
<div <div
class="flex flex-row items-center gap-1" class="flex flex-row items-center gap-1"
on:mouseover={() => (hover.title = true)} onmouseover={() => (hover.title = true)}
on:mouseleave={() => (hover.title = false)} onfocus={() => (hover.title = true)}
onmouseleave={() => (hover.title = false)}
> >
{#if service.icon} {#if service.icon}
{#if img_source != ''} {#if img_source != ''}
@ -96,8 +91,9 @@
<a <a
class="flex flex-row rounded-md border-x-2 px-2 text-sm hover:border-secondary hover:text-secondary" class="flex flex-row rounded-md border-x-2 px-2 text-sm hover:border-secondary hover:text-secondary"
href={service.href} href={service.href}
on:mouseover={() => (hover.link = true)} onmouseover={() => (hover.link = true)}
on:mouseleave={() => (hover.link = false)} onfocus={() => (hover.title = true)}
onmouseleave={() => (hover.link = false)}
> >
Open Open
{#if hover.link} {#if hover.link}
@ -116,8 +112,9 @@
<a <a
class="flex flex-row rounded-md border-x-2 px-2 text-sm hover:border-secondary hover:text-secondary" class="flex flex-row rounded-md border-x-2 px-2 text-sm hover:border-secondary hover:text-secondary"
href={service.extLink} href={service.extLink}
on:mouseover={() => (hover.ext = true)} onmouseover={() => (hover.ext = true)}
on:mouseleave={() => (hover.ext = false)} onfocus={() => (hover.title = true)}
onmouseleave={() => (hover.ext = false)}
> >
Official Site Official Site
{#if hover.ext} {#if hover.ext}

View file

@ -1,15 +1,15 @@
<script lang="ts"> <script lang="ts">
import { Button as ButtonPrimitive } from 'bits-ui'; import { Button as ButtonPrimitive } from "bits-ui";
import { cn } from '$lib/utils'; import { type Events, type Props, buttonVariants } from "./index.js";
import { buttonVariants, type Props, type Events } from '.'; import { cn } from "$lib/utils.js";
type $$Props = Props; type $$Props = Props;
type $$Events = Events; type $$Events = Events;
let className: $$Props['class'] = undefined; let className: $$Props["class"] = undefined;
export let variant: $$Props['variant'] = 'default'; export let variant: $$Props["variant"] = "default";
export let size: $$Props['size'] = 'default'; export let size: $$Props["size"] = "default";
export let builders: $$Props['builders'] = []; export let builders: $$Props["builders"] = [];
export { className as class }; export { className as class };
</script> </script>

View file

@ -1,34 +1,35 @@
import type { Button as ButtonPrimitive } from 'bits-ui'; import type { Button as ButtonPrimitive } from "bits-ui";
import { tv, type VariantProps } from 'tailwind-variants'; import { type VariantProps, tv } from "tailwind-variants";
import Root from './button.svelte'; import Root from "./button.svelte";
const buttonVariants = tv({ const buttonVariants = tv({
base: 'inline-flex items-center justify-center rounded-md text-sm font-medium whitespace-nowrap transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50', base: "focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 disabled:pointer-events-none disabled:opacity-50",
variants: { variants: {
variant: { variant: {
default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90', default: "bg-primary text-primary-foreground hover:bg-primary/90 shadow",
destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90', destructive:
"bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm",
outline: outline:
'border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground', "border-input bg-background hover:bg-accent hover:text-accent-foreground border shadow-sm",
secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80', secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm",
ghost: 'hover:bg-accent hover:text-accent-foreground', ghost: "hover:bg-accent hover:text-accent-foreground",
link: 'text-primary underline-offset-4 hover:underline' link: "text-primary underline-offset-4 hover:underline",
}, },
size: { size: {
default: 'h-9 px-4 py-2', default: "h-9 px-4 py-2",
sm: 'h-8 rounded-md px-3 text-xs', sm: "h-8 rounded-md px-3 text-xs",
lg: 'h-10 rounded-md px-8', lg: "h-10 rounded-md px-8",
icon: 'h-9 w-9' icon: "h-9 w-9",
} },
}, },
defaultVariants: { defaultVariants: {
variant: 'default', variant: "default",
size: 'default' size: "default",
} },
}); });
type Variant = VariantProps<typeof buttonVariants>['variant']; type Variant = VariantProps<typeof buttonVariants>["variant"];
type Size = VariantProps<typeof buttonVariants>['size']; type Size = VariantProps<typeof buttonVariants>["size"];
type Props = ButtonPrimitive.Props & { type Props = ButtonPrimitive.Props & {
variant?: Variant; variant?: Variant;
@ -45,5 +46,5 @@ export {
Root as Button, Root as Button,
type Props as ButtonProps, type Props as ButtonProps,
type Events as ButtonEvents, type Events as ButtonEvents,
buttonVariants buttonVariants,
}; };

View file

@ -1,7 +1,7 @@
import Root from './separator.svelte'; import Root from "./separator.svelte";
export { export {
Root, Root,
// //
Root as Separator Root as Separator,
}; };

View file

@ -1,19 +1,19 @@
<script lang="ts"> <script lang="ts">
import { Separator as SeparatorPrimitive } from 'bits-ui'; import { Separator as SeparatorPrimitive } from "bits-ui";
import { cn } from '$lib/utils'; import { cn } from "$lib/utils.js";
type $$Props = SeparatorPrimitive.Props; type $$Props = SeparatorPrimitive.Props;
let className: $$Props['class'] = undefined; let className: $$Props["class"] = undefined;
export let orientation: $$Props['orientation'] = 'horizontal'; export let orientation: $$Props["orientation"] = "horizontal";
export let decorative: $$Props['decorative'] = undefined; export let decorative: $$Props["decorative"] = undefined;
export { className as class }; export { className as class };
</script> </script>
<SeparatorPrimitive.Root <SeparatorPrimitive.Root
class={cn( class={cn(
'shrink-0 bg-border', "bg-border shrink-0",
orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]', orientation === "horizontal" ? "h-[1px] w-full" : "min-h-full w-[1px]",
className className
)} )}
{orientation} {orientation}

View file

@ -1,7 +1,7 @@
import Root from './skeleton.svelte'; import Root from "./skeleton.svelte";
export { export {
Root, Root,
// //
Root as Skeleton Root as Skeleton,
}; };

View file

@ -1,11 +1,11 @@
<script lang="ts"> <script lang="ts">
import { cn } from '$lib/utils'; import type { HTMLAttributes } from "svelte/elements";
import type { HTMLAttributes } from 'svelte/elements'; import { cn } from "$lib/utils.js";
type $$Props = HTMLAttributes<HTMLDivElement>; type $$Props = HTMLAttributes<HTMLDivElement>;
let className: $$Props['class'] = undefined; let className: $$Props["class"] = undefined;
export { className as class }; export { className as class };
</script> </script>
<div class={cn('animate-pulse rounded-md bg-primary/10', className)} {...$$restProps} /> <div class={cn("bg-primary/10 animate-pulse rounded-md", className)} {...$$restProps}></div>

View file

@ -1,7 +1,7 @@
import { type ClassValue, clsx } from 'clsx'; import { type ClassValue, clsx } from "clsx";
import { twMerge } from 'tailwind-merge'; import { twMerge } from "tailwind-merge";
import { cubicOut } from 'svelte/easing'; import { cubicOut } from "svelte/easing";
import type { TransitionConfig } from 'svelte/transition'; import type { TransitionConfig } from "svelte/transition";
export function cn(...inputs: ClassValue[]) { export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs)); return twMerge(clsx(inputs));
@ -19,9 +19,13 @@ export const flyAndScale = (
params: FlyAndScaleParams = { y: -8, x: 0, start: 0.95, duration: 150 } params: FlyAndScaleParams = { y: -8, x: 0, start: 0.95, duration: 150 }
): TransitionConfig => { ): TransitionConfig => {
const style = getComputedStyle(node); const style = getComputedStyle(node);
const transform = style.transform === 'none' ? '' : style.transform; const transform = style.transform === "none" ? "" : style.transform;
const scaleConversion = (valueA: number, scaleA: [number, number], scaleB: [number, number]) => { const scaleConversion = (
valueA: number,
scaleA: [number, number],
scaleB: [number, number]
) => {
const [minA, maxA] = scaleA; const [minA, maxA] = scaleA;
const [minB, maxB] = scaleB; const [minB, maxB] = scaleB;
@ -31,11 +35,13 @@ export const flyAndScale = (
return valueB; return valueB;
}; };
const styleToString = (style: Record<string, number | string | undefined>): string => { const styleToString = (
style: Record<string, number | string | undefined>
): string => {
return Object.keys(style).reduce((str, key) => { return Object.keys(style).reduce((str, key) => {
if (style[key] === undefined) return str; if (style[key] === undefined) return str;
return str + `${key}:${style[key]};`; return str + `${key}:${style[key]};`;
}, ''); }, "");
}; };
return { return {
@ -53,4 +59,4 @@ export const flyAndScale = (
}, },
easing: cubicOut easing: cubicOut
}; };
}; };

View file

@ -5,12 +5,13 @@
import Header from './Header.svelte'; import Header from './Header.svelte';
import Footer from './Footer.svelte'; import Footer from './Footer.svelte';
let { children } = $props();
</script> </script>
<Header /> <Header />
<div class="h-full pb-8 pt-16"> <div class="h-full pb-8 pt-16">
<slot /> {@render children()}
</div> </div>
<Footer /> <Footer />

View file

@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import { page } from '$app/stores'; import { page } from '$app/state';
import { Button } from '$lib/components/ui/button'; import { Button } from '$lib/components/ui/button';
const button = 'border-t-2 bg-black/55 hover:bg-black/70 hover:border-secondary w-28'; const button = 'border-t-2 bg-black/55 hover:bg-black/70 hover:border-secondary w-28';
@ -12,7 +12,7 @@
<Button <Button
variant="ghost" variant="ghost"
href="/" href="/"
class="{button} + {!($page.url.pathname === '/') || 'border-secondary text-secondary'}" class="{button} + {!(page.url.pathname === '/') || 'border-secondary text-secondary'}"
> >
Home Home
</Button> </Button>
@ -21,7 +21,7 @@
<Button <Button
variant="ghost" variant="ghost"
href="/servers" href="/servers"
class="{button} + {!$page.url.pathname.startsWith('/servers') || class="{button} + {!page.url.pathname.startsWith('/servers') ||
'border-secondary text-secondary'}" 'border-secondary text-secondary'}"
> >
Servers Servers
@ -31,7 +31,7 @@
<Button <Button
variant="ghost" variant="ghost"
href="/services" href="/services"
class="{button} + {!$page.url.pathname.startsWith('/services') || class="{button} + {!page.url.pathname.startsWith('/services') ||
'border-secondary text-secondary'}" 'border-secondary text-secondary'}"
> >
Services Services
@ -41,7 +41,7 @@
<Button <Button
variant="ghost" variant="ghost"
href="/about" href="/about"
class="{button} + {!$page.url.pathname.startsWith('/about') || class="{button} + {!page.url.pathname.startsWith('/about') ||
'border-secondary text-secondary'}" 'border-secondary text-secondary'}"
> >
About About

View file

@ -4,9 +4,9 @@
import type { Server } from '$lib/types/data-types'; import type { Server } from '$lib/types/data-types';
import ServerCard from '$lib/components/ServerCard.svelte'; import ServerCard from '$lib/components/ServerCard.svelte';
let servers: readonly Server[] = $state.frozen([]); let servers: readonly Server[] = $state.raw([]);
let icons: readonly string[] = $state.frozen([]); let icons: readonly string[] = $state.raw([]);
async function get(url: string): Promise<any> { async function get(url: string): Promise<any> {
let res = await fetch(url); let res = await fetch(url);

View file

@ -3,12 +3,10 @@
<script lang="ts"> <script lang="ts">
import ServiceCard from '$lib/components/ServiceCard.svelte'; import ServiceCard from '$lib/components/ServiceCard.svelte';
import type { Service } from '$lib/types/data-types'; import type { Service } from '$lib/types/data-types';
import { io } from 'socket.io-client';
import { onDestroy } from 'svelte';
let services: readonly Service[] = $state.frozen([]); let services: readonly Service[] = $state.raw([]);
let icons: readonly string[] = $state.frozen([]); let icons: readonly string[] = $state.raw([]);
async function get(url: string): Promise<any> { async function get(url: string): Promise<any> {
let res = await fetch(url); let res = await fetch(url);

1744
yarn.lock

File diff suppressed because it is too large Load diff