format and fix eslint

This commit is contained in:
Huakun Shen 2025-03-13 21:06:11 -04:00
parent cc08b07a2c
commit 761954e722
No known key found for this signature in database
5 changed files with 17 additions and 14 deletions

View File

@ -14,7 +14,7 @@
// export { className as class } // export { className as class }
let { locations = [], class: className }: { class?: string; locations?: [number, number][] } = let { locations = [], class: className }: { class?: string; locations?: [number, number][] } =
$props() $props()
let pointerInteracting: any = null let pointerInteracting: number | null = null
let pointerInteractionMovement = 0 let pointerInteractionMovement = 0
let canvas: HTMLCanvasElement let canvas: HTMLCanvasElement
@ -25,7 +25,8 @@
width = canvas.offsetWidth width = canvas.offsetWidth
} }
let onRender = (state: any) => { // eslint-disable-next-line @typescript-eslint/no-explicit-any
let onRender = (state: Record<string, any>) => {
if (!pointerInteracting) { if (!pointerInteracting) {
phi += 0.005 phi += 0.005
} }

View File

@ -29,6 +29,8 @@
<!-- Background Gradient --> <!-- Background Gradient -->
<div <div
class={cn("absolute inset-0 bg-gradient-to-t from-white to-transparent to-90% dark:from-background")} class={cn(
"dark:from-background absolute inset-0 bg-gradient-to-t from-white to-transparent to-90%"
)}
></div> ></div>
</div> </div>

View File

@ -1,15 +1,15 @@
<script lang="ts"> <script lang="ts">
import { Button } from '@kksh/svelte5'; import { Button } from "@kksh/svelte5"
import { CopyIcon } from 'lucide-svelte'; import { CopyIcon } from "lucide-svelte"
import type { Snippet } from 'svelte'; import type { Snippet } from "svelte"
let pre: HTMLPreElement; let pre: HTMLPreElement
let { let {
children, children,
class: className, class: className,
style style
}: { children: Snippet; class?: string; style?: string } = $props(); }: { children: Snippet; class?: string; style?: string } = $props()
</script> </script>
<div class="relative"> <div class="relative">
@ -17,7 +17,7 @@
<Button <Button
size="icon" size="icon"
variant="outline" variant="outline"
onclick={() => navigator.clipboard.writeText(pre.textContent ?? '')} onclick={() => navigator.clipboard.writeText(pre.textContent ?? "")}
class="absolute right-2 top-2" class="absolute right-2 top-2"
> >
<CopyIcon /> <CopyIcon />

View File

@ -1 +1 @@
export {default as Markdown} from './Markdown.svelte'; export { default as Markdown } from "./Markdown.svelte"

View File

@ -1,10 +1,10 @@
import Scrollbar from "./scroll-area-scrollbar.svelte"; import Scrollbar from "./scroll-area-scrollbar.svelte"
import Root from "./scroll-area.svelte"; import Root from "./scroll-area.svelte"
export { export {
Root, Root,
Scrollbar, Scrollbar,
//, //,
Root as ScrollArea, Root as ScrollArea,
Scrollbar as ScrollAreaScrollbar, Scrollbar as ScrollAreaScrollbar
}; }