Skip to content

Instantly share code, notes, and snippets.

View W2Wizard's full-sized avatar
๐Ÿ‡ซ๐Ÿ‡ฎ
๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซโ€ฆ

W2Wizard W2Wizard

๐Ÿ‡ซ๐Ÿ‡ฎ
๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซ๐’ซโ€ฆ
View GitHub Profile
@W2Wizard
W2Wizard / form.svelte.ts
Created February 3, 2025 16:38
My own small custom version of svelte-superforms
import { applyAction, enhance } from "$app/forms";
import { error, fail, type RequestEvent } from "@sveltejs/kit";
import { toast } from "svelte-sonner";
import { ZodType, type z, type ZodObject, type ZodRawShape, type ZodTypeAny } from "zod";
import {
dialog as useDialog,
type ConfirmProps,
} from "$lib/components/dialog/state.svelte";
interface FormResult<T> {
@W2Wizard
W2Wizard / File-system-like.svelte
Last active August 28, 2024 14:27
Example of doing file drag and drop using the Drag and Drop API in a svelte component.
<script lang="ts">
import type { Item } from './type-r';
interface Props {
childItems: Item[];
}
const { childItems }: Props = $props();
</script>