update prettierrc

pull/3/head
TZGyn 2 years ago
parent a67fefd36e
commit 9d4e7d3df7
Signed by: TZGyn
GPG Key ID: 122EAF77AE81FD4A

@ -4,9 +4,7 @@
"semi": false,
"trailingComma": "all",
"printWidth": 80,
"plugins": [
"prettier-plugin-svelte",
"prettier-plugin-tailwindcss"
],
"bracketSameLine": true,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}

@ -1,181 +1,179 @@
{
"id": "548a0489-b083-464f-800c-4dee6f1ff161",
"prevId": "9d44b46b-3e93-4782-8750-dbf39513bb0c",
"version": "5",
"dialect": "pg",
"tables": {
"session": {
"name": "session",
"schema": "",
"columns": {
"token": {
"name": "token",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"expires": {
"name": "expires",
"type": "timestamp",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"shortener": {
"name": "shortener",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"link": {
"name": "link",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"code": {
"name": "code",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"user_id": {
"name": "user_id",
"type": "integer",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"user": {
"name": "user",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"uuid": {
"name": "uuid",
"type": "uuid",
"primaryKey": false,
"notNull": false,
"default": "gen_random_uuid()"
},
"email": {
"name": "email",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"username": {
"name": "username",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"password": {
"name": "password",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"user_email_unique": {
"name": "user_email_unique",
"nullsNotDistinct": false,
"columns": [
"email"
]
}
}
},
"visitor": {
"name": "visitor",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"shortener_id": {
"name": "shortener_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"country_code": {
"name": "country_code",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"country": {
"name": "country",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
}
},
"enums": {},
"schemas": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
}
"id": "548a0489-b083-464f-800c-4dee6f1ff161",
"prevId": "9d44b46b-3e93-4782-8750-dbf39513bb0c",
"version": "5",
"dialect": "pg",
"tables": {
"session": {
"name": "session",
"schema": "",
"columns": {
"token": {
"name": "token",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"expires": {
"name": "expires",
"type": "timestamp",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"shortener": {
"name": "shortener",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"link": {
"name": "link",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"code": {
"name": "code",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"user_id": {
"name": "user_id",
"type": "integer",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"user": {
"name": "user",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"uuid": {
"name": "uuid",
"type": "uuid",
"primaryKey": false,
"notNull": false,
"default": "gen_random_uuid()"
},
"email": {
"name": "email",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"username": {
"name": "username",
"type": "varchar(255)",
"primaryKey": false,
"notNull": false
},
"password": {
"name": "password",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"user_email_unique": {
"name": "user_email_unique",
"nullsNotDistinct": false,
"columns": ["email"]
}
}
},
"visitor": {
"name": "visitor",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"shortener_id": {
"name": "shortener_id",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"country_code": {
"name": "country_code",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
},
"country": {
"name": "country",
"type": "varchar(255)",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
}
},
"enums": {},
"schemas": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
}
}

@ -1,20 +1,20 @@
{
"version": "5",
"dialect": "pg",
"entries": [
{
"idx": 0,
"version": "5",
"when": 1699851315914,
"tag": "0000_nebulous_energizer",
"breakpoints": true
},
{
"idx": 1,
"version": "5",
"when": 1700134783172,
"tag": "0001_regular_microchip",
"breakpoints": true
}
]
"version": "5",
"dialect": "pg",
"entries": [
{
"idx": 0,
"version": "5",
"when": 1699851315914,
"tag": "0000_nebulous_energizer",
"breakpoints": true
},
{
"idx": 1,
"version": "5",
"when": 1700134783172,
"tag": "0001_regular_microchip",
"breakpoints": true
}
]
}

@ -1,49 +1,49 @@
{
"name": "link-shortener-svelte",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check .",
"format": "prettier --write ."
},
"devDependencies": {
"@sveltejs/adapter-node": "^1.3.1",
"@sveltejs/kit": "^1.20.4",
"autoprefixer": "^10.4.14",
"bun-types": "^1.0.11",
"drizzle-kit": "^0.20.1",
"postcss": "^8.4.24",
"postcss-load-config": "^4.0.1",
"prettier": "^3.1.0",
"prettier-plugin-svelte": "^3.1.0",
"prettier-plugin-tailwindcss": "^0.5.7",
"svelte": "^4.0.5",
"svelte-adapter-bun": "^0.5.1",
"svelte-check": "^3.4.3",
"tailwindcss": "^3.3.2",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^4.4.2"
},
"type": "module",
"dependencies": {
"argon2": "^0.31.2",
"bits-ui": "^0.9.8",
"clsx": "^2.0.0",
"drizzle-orm": "^0.29.0",
"formsnap": "^0.4.1",
"lucide-svelte": "^0.292.0",
"mode-watcher": "^0.0.7",
"nanoid": "^5.0.3",
"postgres": "^3.4.3",
"sveltekit-superforms": "^1.10.1",
"tailwind-merge": "^2.0.0",
"tailwind-variants": "^0.1.18",
"zod": "^3.22.4"
}
"name": "link-shortener-svelte",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check .",
"format": "prettier --write ."
},
"devDependencies": {
"@sveltejs/adapter-node": "^1.3.1",
"@sveltejs/kit": "^1.20.4",
"autoprefixer": "^10.4.14",
"bun-types": "^1.0.11",
"drizzle-kit": "^0.20.1",
"postcss": "^8.4.24",
"postcss-load-config": "^4.0.1",
"prettier": "^3.1.0",
"prettier-plugin-svelte": "^3.1.0",
"prettier-plugin-tailwindcss": "^0.5.7",
"svelte": "^4.0.5",
"svelte-adapter-bun": "^0.5.1",
"svelte-check": "^3.4.3",
"tailwindcss": "^3.3.2",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^4.4.2"
},
"type": "module",
"dependencies": {
"argon2": "^0.31.2",
"bits-ui": "^0.9.8",
"clsx": "^2.0.0",
"drizzle-orm": "^0.29.0",
"formsnap": "^0.4.1",
"lucide-svelte": "^0.292.0",
"mode-watcher": "^0.0.7",
"nanoid": "^5.0.3",
"postgres": "^3.4.3",
"sveltekit-superforms": "^1.10.1",
"tailwind-merge": "^2.0.0",
"tailwind-variants": "^0.1.18",
"zod": "^3.22.4"
}
}

@ -31,11 +31,9 @@
<div class="flex flex-col gap-4">
<Button variant="ghost" href="/links" class="justify-start text-base"
>Links</Button
>
>Links</Button>
<Button variant="ghost" href="/projects" class="justify-start text-base "
>Projects</Button
>
>Projects</Button>
</div>
</div>
@ -54,8 +52,7 @@
<DropdownMenu.Label>My Account</DropdownMenu.Label>
<DropdownMenu.Separator />
<DropdownMenu.Item on:click={() => goto('/profile')}
>Profile</DropdownMenu.Item
>
>Profile</DropdownMenu.Item>
</DropdownMenu.Group>
</DropdownMenu.Content>
</DropdownMenu.Root>
@ -63,8 +60,7 @@
<AlertDialog.Root bind:open={dialogOpen}>
<AlertDialog.Trigger asChild let:builder>
<Button variant="destructive" builders={[builder]} type="submit"
>Sign Out</Button
>
>Sign Out</Button>
</AlertDialog.Trigger>
<AlertDialog.Content>
<AlertDialog.Header>
@ -75,8 +71,7 @@
</AlertDialog.Header>
<AlertDialog.Footer>
<AlertDialog.Cancel disabled={isLoading}
>Cancel</AlertDialog.Cancel
>
>Cancel</AlertDialog.Cancel>
<Button on:click={logout} class="flex gap-2" disabled={isLoading}>
{#if isLoading}
<Loader2 class="animate-spin" />

@ -10,18 +10,15 @@
<DropdownMenu.Trigger asChild let:builder>
<Button builders={[builder]} variant="outline" size="icon">
<Sun
class="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"
/>
class="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
<Moon
class="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"
/>
class="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
<span class="sr-only">Toggle theme</span>
</Button>
</DropdownMenu.Trigger>
<DropdownMenu.Content>
<DropdownMenu.Item on:click={() => setMode('light')}
>Light</DropdownMenu.Item
>
>Light</DropdownMenu.Item>
<DropdownMenu.Item on:click={() => setMode('dark')}>Dark</DropdownMenu.Item>
<DropdownMenu.Item on:click={() => resetMode()}>System</DropdownMenu.Item>
</DropdownMenu.Content>

@ -1,13 +1,13 @@
<script lang="ts">
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
import { buttonVariants } from "$lib/components/ui/button";
import { cn } from "$lib/utils";
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
import { buttonVariants } from '$lib/components/ui/button'
import { cn } from '$lib/utils'
type $$Props = AlertDialogPrimitive.ActionProps;
type $$Events = AlertDialogPrimitive.ActionEvents;
type $$Props = AlertDialogPrimitive.ActionProps
type $$Events = AlertDialogPrimitive.ActionEvents
let className: $$Props["class"] = undefined;
export { className as class };
let className: $$Props['class'] = undefined
export { className as class }
</script>
<AlertDialogPrimitive.Action
@ -15,7 +15,6 @@
{...$$restProps}
on:click
on:keydown
let:builder
>
let:builder>
<slot {builder} />
</AlertDialogPrimitive.Action>

@ -1,25 +1,20 @@
<script lang="ts">
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
import { buttonVariants } from "$lib/components/ui/button";
import { cn } from "$lib/utils";
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
import { buttonVariants } from '$lib/components/ui/button'
import { cn } from '$lib/utils'
type $$Props = AlertDialogPrimitive.CancelProps;
type $$Events = AlertDialogPrimitive.CancelEvents;
type $$Props = AlertDialogPrimitive.CancelProps
type $$Events = AlertDialogPrimitive.CancelEvents
let className: $$Props["class"] = undefined;
export { className as class };
let className: $$Props['class'] = undefined
export { className as class }
</script>
<AlertDialogPrimitive.Cancel
class={cn(
buttonVariants({ variant: "outline" }),
"mt-2 sm:mt-0",
className
)}
class={cn(buttonVariants({ variant: 'outline' }), 'mt-2 sm:mt-0', className)}
{...$$restProps}
on:click
on:keydown
let:builder
>
let:builder>
<slot {builder} />
</AlertDialogPrimitive.Cancel>

@ -1,15 +1,15 @@
<script lang="ts">
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
import * as AlertDialog from ".";
import { cn, flyAndScale } from "$lib/utils";
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
import * as AlertDialog from '.'
import { cn, flyAndScale } from '$lib/utils'
type $$Props = AlertDialogPrimitive.ContentProps;
type $$Props = AlertDialogPrimitive.ContentProps
export let transition: $$Props["transition"] = flyAndScale;
export let transitionConfig: $$Props["transitionConfig"] = undefined;
export let transition: $$Props['transition'] = flyAndScale
export let transitionConfig: $$Props['transitionConfig'] = undefined
let className: $$Props["class"] = undefined;
export { className as class };
let className: $$Props['class'] = undefined
export { className as class }
</script>
<AlertDialog.Portal>
@ -18,11 +18,10 @@
{transition}
{transitionConfig}
class={cn(
"fixed left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%] z-50 grid w-full max-w-lg gap-4 border bg-background p-6 shadow-lg sm:rounded-lg md:w-full",
className
'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg sm:rounded-lg md:w-full',
className,
)}
{...$$restProps}
>
{...$$restProps}>
<slot />
</AlertDialogPrimitive.Content>
</AlertDialog.Portal>

@ -1,16 +1,15 @@
<script lang="ts">
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
import { cn } from "$lib/utils";
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
import { cn } from '$lib/utils'
type $$Props = AlertDialogPrimitive.DescriptionProps;
type $$Props = AlertDialogPrimitive.DescriptionProps
let className: $$Props["class"] = undefined;
export { className as class };
let className: $$Props['class'] = undefined
export { className as class }
</script>
<AlertDialogPrimitive.Description
class={cn("text-sm text-muted-foreground", className)}
{...$$restProps}
>
class={cn('text-sm text-muted-foreground', className)}
{...$$restProps}>
<slot />
</AlertDialogPrimitive.Description>

@ -1,19 +1,18 @@
<script lang="ts">
import { cn } from "$lib/utils";
import type { HTMLAttributes } from "svelte/elements";
import { cn } from '$lib/utils'
import type { HTMLAttributes } from 'svelte/elements'
type $$Props = HTMLAttributes<HTMLDivElement>;
type $$Props = HTMLAttributes<HTMLDivElement>
let className: $$Props["class"] = undefined;
export { className as class };
let className: $$Props['class'] = undefined
export { className as class }
</script>
<div
class={cn(
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
className
'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',
className,
)}
{...$$restProps}
>
{...$$restProps}>
<slot />
</div>

@ -1,16 +1,15 @@
<script lang="ts">
import { cn } from "$lib/utils";
import type { HTMLAttributes } from "svelte/elements";
import { cn } from '$lib/utils'
import type { HTMLAttributes } from 'svelte/elements'
type $$Props = HTMLAttributes<HTMLDivElement>;
type $$Props = HTMLAttributes<HTMLDivElement>
let className: $$Props["class"] = undefined;
export { className as class };
let className: $$Props['class'] = undefined
export { className as class }
</script>
<div
class={cn("flex flex-col space-y-2 text-center sm:text-left", className)}
{...$$restProps}
>
class={cn('flex flex-col space-y-2 text-center sm:text-left', className)}
{...$$restProps}>
<slot />
</div>

@ -1,24 +1,20 @@
<script lang="ts">
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
import { cn } from "$lib/utils";
import { fade } from "svelte/transition";
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
import { cn } from '$lib/utils'
import { fade } from 'svelte/transition'
type $$Props = AlertDialogPrimitive.OverlayProps;
type $$Props = AlertDialogPrimitive.OverlayProps
let className: $$Props["class"] = undefined;
export let transition: $$Props["transition"] = fade;
export let transitionConfig: $$Props["transitionConfig"] = {
duration: 150
};
export { className as class };
let className: $$Props['class'] = undefined
export let transition: $$Props['transition'] = fade
export let transitionConfig: $$Props['transitionConfig'] = {
duration: 150,
}
export { className as class }
</script>
<AlertDialogPrimitive.Overlay
{transition}
{transitionConfig}
class={cn(
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm ",
className
)}
{...$$restProps}
/>
class={cn('fixed inset-0 z-50 bg-background/80 backdrop-blur-sm ', className)}
{...$$restProps} />

@ -1,7 +1,7 @@
<script lang="ts">
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
type $$Props = AlertDialogPrimitive.PortalProps;
type $$Props = AlertDialogPrimitive.PortalProps
</script>
<AlertDialogPrimitive.Portal {...$$restProps}>

@ -1,18 +1,17 @@
<script lang="ts">
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
import { cn } from "$lib/utils";
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
import { cn } from '$lib/utils'
type $$Props = AlertDialogPrimitive.TitleProps;
type $$Props = AlertDialogPrimitive.TitleProps
let className: $$Props["class"] = undefined;
export let level: $$Props["level"] = "h3";
export { className as class };
let className: $$Props['class'] = undefined
export let level: $$Props['level'] = 'h3'
export { className as class }
</script>
<AlertDialogPrimitive.Title
class={cn("text-lg font-semibold", className)}
class={cn('text-lg font-semibold', className)}
{level}
{...$$restProps}
>
{...$$restProps}>
<slot />
</AlertDialogPrimitive.Title>

@ -1,17 +1,17 @@
import { AlertDialog as AlertDialogPrimitive } from "bits-ui";
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'
const Root = AlertDialogPrimitive.Root;
const Trigger = AlertDialogPrimitive.Trigger;
const Root = AlertDialogPrimitive.Root
const Trigger = AlertDialogPrimitive.Trigger
import Title from "./alert-dialog-title.svelte";
import Action from "./alert-dialog-action.svelte";
import Cancel from "./alert-dialog-cancel.svelte";
import Portal from "./alert-dialog-portal.svelte";
import Footer from "./alert-dialog-footer.svelte";
import Header from "./alert-dialog-header.svelte";
import Overlay from "./alert-dialog-overlay.svelte";
import Content from "./alert-dialog-content.svelte";
import Description from "./alert-dialog-description.svelte";
import Title from './alert-dialog-title.svelte'
import Action from './alert-dialog-action.svelte'
import Cancel from './alert-dialog-cancel.svelte'
import Portal from './alert-dialog-portal.svelte'
import Footer from './alert-dialog-footer.svelte'
import Header from './alert-dialog-header.svelte'
import Overlay from './alert-dialog-overlay.svelte'
import Content from './alert-dialog-content.svelte'
import Description from './alert-dialog-description.svelte'
export {
Root,
@ -36,5 +36,5 @@ export {
Trigger as AlertDialogTrigger,
Overlay as AlertDialogOverlay,
Content as AlertDialogContent,
Description as AlertDialogDescription
};
Description as AlertDialogDescription,
}

@ -13,7 +13,6 @@
'flex h-full w-full items-center justify-center rounded-full bg-muted',
className,
)}
{...$$restProps}
>
{...$$restProps}>
<slot />
</AvatarPrimitive.Fallback>

@ -14,5 +14,4 @@
{src}
{alt}
class={cn('aspect-square h-full w-full', className)}
{...$$restProps}
/>
{...$$restProps} />

@ -15,7 +15,6 @@
'relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full',
className,
)}
{...$$restProps}
>
{...$$restProps}>
<slot />
</AvatarPrimitive.Root>

@ -19,7 +19,6 @@
type="button"
{...$$restProps}
on:click
on:keydown
>
on:keydown>
<slot />
</ButtonPrimitive.Root>

@ -1,13 +1,13 @@
<script lang="ts">
import { cn } from "$lib/utils";
import type { HTMLAttributes } from "svelte/elements";
import { cn } from '$lib/utils'
import type { HTMLAttributes } from 'svelte/elements'
type $$Props = HTMLAttributes<HTMLDivElement>;
type $$Props = HTMLAttributes<HTMLDivElement>
let className: $$Props["class"] = undefined;
export { className as class };
let className: $$Props['class'] = undefined
export { className as class }
</script>
<div class={cn("p-6 pt-0", className)} {...$$restProps}>
<div class={cn('p-6 pt-0', className)} {...$$restProps}>
<slot />
</div>

@ -1,13 +1,13 @@
<script lang="ts">
import type { HTMLAttributes } from "svelte/elements";
import { cn } from "$lib/utils";
import type { HTMLAttributes } from 'svelte/elements'
import { cn } from '$lib/utils'
type $$Props = HTMLAttributes<HTMLParagraphElement>;
type $$Props = HTMLAttributes<HTMLParagraphElement>
let className: $$Props["class"] = undefined;
export { className as class };
let className: $$Props['class'] = undefined
export { className as class }
</script>
<p class={cn("text-sm text-muted-foreground", className)} {...$$restProps}>
<p class={cn('text-sm text-muted-foreground', className)} {...$$restProps}>
<slot />
</p>

@ -1,13 +1,13 @@
<script lang="ts">
import type { HTMLAttributes } from "svelte/elements";
import { cn } from "$lib/utils";
import type { HTMLAttributes } from 'svelte/elements'
import { cn } from '$lib/utils'
type $$Props = HTMLAttributes<HTMLDivElement>;
type $$Props = HTMLAttributes<HTMLDivElement>
let className: $$Props["class"] = undefined;
export { className as class };
let className: $$Props['class'] = undefined
export { className as class }
</script>
<div class={cn("flex items-center p-6 pt-0", className)} {...$$restProps}>
<div class={cn('flex items-center p-6 pt-0', className)} {...$$restProps}>
<slot />
</div>

@ -1,13 +1,13 @@
<script lang="ts">
import type { HTMLAttributes } from "svelte/elements";
import { cn } from "$lib/utils";
import type { HTMLAttributes } from 'svelte/elements'
import { cn } from '$lib/utils'
type $$Props = HTMLAttributes<HTMLDivElement>;
type $$Props = HTMLAttributes<HTMLDivElement>
let className: $$Props["class"] = undefined;
export { className as class };
let className: $$Props['class'] = undefined
export { className as class }
</script>
<div class={cn("flex flex-col space-y-1.5 p-6", className)} {...$$restProps}>
<div class={cn('flex flex-col space-y-1.5 p-6', className)} {...$$restProps}>
<slot />
</div>

@ -1,21 +1,20 @@
<script lang="ts">
import type { HTMLAttributes } from "svelte/elements";
import { cn } from "$lib/utils";
import type { HeadingLevel } from ".";
import type { HTMLAttributes } from 'svelte/elements'
import { cn } from '$lib/utils'
import type { HeadingLevel } from '.'
type $$Props = HTMLAttributes<HTMLHeadingElement> & {
tag?: HeadingLevel;
};
tag?: HeadingLevel
}
let className: $$Props["class"] = undefined;
export let tag: $$Props["tag"] = "h3";
export { className as class };
let className: $$Props['class'] = undefined
export let tag: $$Props['tag'] = 'h3'
export { className as class }
</script>
<svelte:element
this={tag}
class={cn("text-lg font-semibold leading-none tracking-tight", className)}
{...$$restProps}
>
class={cn('text-lg font-semibold leading-none tracking-tight', className)}
{...$$restProps}>
<slot />
</svelte:element>

@ -1,19 +1,18 @@
<script lang="ts">
import type { HTMLAttributes } from "svelte/elements";
import { cn } from "$lib/utils";
import type { HTMLAttributes } from 'svelte/elements'
import { cn } from '$lib/utils'
type $$Props = HTMLAttributes<HTMLDivElement>;
type $$Props = HTMLAttributes<HTMLDivElement>
let className: $$Props["class"] = undefined;
export { className as class };
let className: $$Props['class'] = undefined
export { className as class }
</script>
<div
class={cn(
"rounded-lg border bg-card text-card-foreground shadow-sm",
className
'rounded-lg border bg-card text-card-foreground shadow-sm',
className,
)}
{...$$restProps}
>
{...$$restProps}>
<slot />
</div>

@ -1,9 +1,9 @@
import Root from "./card.svelte";
import Content from "./card-content.svelte";
import Description from "./card-description.svelte";
import Footer from "./card-footer.svelte";
import Header from "./card-header.svelte";
import Title from "./card-title.svelte";
import Root from './card.svelte'
import Content from './card-content.svelte'
import Description from './card-description.svelte'
import Footer from './card-footer.svelte'
import Header from './card-header.svelte'
import Title from './card-title.svelte'
export {
Root,
@ -18,7 +18,7 @@ export {
Description as CardDescription,
Footer as CardFooter,
Header as CardHeader,
Title as CardTitle
};
Title as CardTitle,
}
export type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
export type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'

@ -18,13 +18,11 @@
)}
bind:checked
{...$$restProps}
on:click
>
on:click>
<CheckboxPrimitive.Indicator
class={cn('flex h-4 w-4 items-center justify-center text-current')}
let:isChecked
let:isIndeterminate
>
let:isIndeterminate>
{#if isChecked}
<Check class="h-3.5 w-3.5" />
{:else if isIndeterminate}

@ -1,17 +1,17 @@
<script lang="ts">
import { Dialog as DialogPrimitive } from "bits-ui";
import * as Dialog from ".";
import { cn, flyAndScale } from "$lib/utils";
import { X } from "lucide-svelte";
import { Dialog as DialogPrimitive } from 'bits-ui'
import * as Dialog from '.'
import { cn, flyAndScale } from '$lib/utils'
import { X } from 'lucide-svelte'
type $$Props = DialogPrimitive.ContentProps;
type $$Props = DialogPrimitive.ContentProps
let className: $$Props["class"] = undefined;
export let transition: $$Props["transition"] = flyAndScale;
export let transitionConfig: $$Props["transitionConfig"] = {
duration: 200
};
export { className as class };
let className: $$Props['class'] = undefined
export let transition: $$Props['transition'] = flyAndScale
export let transitionConfig: $$Props['transitionConfig'] = {
duration: 200,
}
export { className as class }
</script>
<Dialog.Portal>
@ -20,15 +20,13 @@
{transition}
{transitionConfig}
class={cn(
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg sm:rounded-lg md:w-full",
className
'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg sm:rounded-lg md:w-full',
className,
)}
{...$$restProps}
>
{...$$restProps}>
<slot />
<DialogPrimitive.Close
class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
>
class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
<X class="h-4 w-4" />
<span class="sr-only">Close</span>
</DialogPrimitive.Close>

@ -1,16 +1,15 @@
<script lang="ts">
import { Dialog as DialogPrimitive } from "bits-ui";
import { cn } from "$lib/utils";
import { Dialog as DialogPrimitive } from 'bits-ui'
import { cn } from '$lib/utils'
type $$Props = DialogPrimitive.DescriptionProps;
type $$Props = DialogPrimitive.DescriptionProps
let className: $$Props["class"] = undefined;
export { className as class };
let className: $$Props['class'] = undefined
export { className as class }
</script>
<DialogPrimitive.Description
class={cn("text-sm text-muted-foreground", className)}
{...$$restProps}
>
class={cn('text-sm text-muted-foreground', className)}
{...$$restProps}>
<slot />
</DialogPrimitive.Description>

@ -1,19 +1,18 @@
<script lang="ts">
import { cn } from "$lib/utils";
import type { HTMLAttributes } from "svelte/elements";
import { cn } from '$lib/utils'
import type { HTMLAttributes } from 'svelte/elements'
type $$Props = HTMLAttributes<HTMLDivElement>;
type $$Props = HTMLAttributes<HTMLDivElement>
let className: $$Props["class"] = undefined;
export { className as class };
let className: $$Props['class'] = undefined
export { className as class }
</script>
<div
class={cn(
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
className
'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',
className,
)}
{...$$restProps}
>
{...$$restProps}>
<slot />
</div>

@ -1,16 +1,15 @@
<script lang="ts">
import { cn } from "$lib/utils";
import type { HTMLAttributes } from "svelte/elements";
import { cn } from '$lib/utils'
import type { HTMLAttributes } from 'svelte/elements'
type $$Props = HTMLAttributes<HTMLDivElement>;
type $$Props = HTMLAttributes<HTMLDivElement>
let className: $$Props["class"] = undefined;
export { className as class };
let className: $$Props['class'] = undefined
export { className as class }
</script>
<div
class={cn("flex flex-col space-y-1.5 text-center sm:text-left", className)}
{...$$restProps}
>
class={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)}
{...$$restProps}>
<slot />
</div>

@ -1,24 +1,20 @@
<script lang="ts">
import { Dialog as DialogPrimitive } from "bits-ui";
import { cn } from "$lib/utils";
import { fade } from "svelte/transition";
import { Dialog as DialogPrimitive } from 'bits-ui'
import { cn } from '$lib/utils'
import { fade } from 'svelte/transition'
type $$Props = DialogPrimitive.OverlayProps;
type $$Props = DialogPrimitive.OverlayProps
let className: $$Props["class"] = undefined;
export let transition: $$Props["transition"] = fade;
export let transitionConfig: $$Props["transitionConfig"] = {
duration: 150
};
export { className as class };
let className: $$Props['class'] = undefined
export let transition: $$Props['transition'] = fade
export let transitionConfig: $$Props['transitionConfig'] = {
duration: 150,
}
export { className as class }
</script>
<DialogPrimitive.Overlay
{transition}
{transitionConfig}
class={cn(
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",
className
)}
{...$$restProps}
/>
class={cn('fixed inset-0 z-50 bg-background/80 backdrop-blur-sm', className)}
{...$$restProps} />

@ -1,6 +1,6 @@
<script lang="ts">
import { Dialog as DialogPrimitive } from "bits-ui";
type $$Props = DialogPrimitive.PortalProps;
import { Dialog as DialogPrimitive } from 'bits-ui'
type $$Props = DialogPrimitive.PortalProps
</script>
<DialogPrimitive.Portal {...$$restProps}>

@ -1,16 +1,15 @@
<script lang="ts">
import { Dialog as DialogPrimitive } from "bits-ui";
import { cn } from "$lib/utils";
import { Dialog as DialogPrimitive } from 'bits-ui'
import { cn } from '$lib/utils'
type $$Props = DialogPrimitive.TitleProps;
type $$Props = DialogPrimitive.TitleProps
let className: $$Props["class"] = undefined;
export { className as class };
let className: $$Props['class'] = undefined
export { className as class }
</script>
<DialogPrimitive.Title
class={cn("text-lg font-semibold leading-none tracking-tight", className)}
{...$$restProps}
>
class={cn('text-lg font-semibold leading-none tracking-tight', className)}
{...$$restProps}>
<slot />
</DialogPrimitive.Title>

@ -1,15 +1,15 @@
import { Dialog as DialogPrimitive } from "bits-ui";
import { Dialog as DialogPrimitive } from 'bits-ui'
const Root = DialogPrimitive.Root;
const Trigger = DialogPrimitive.Trigger;
const Root = DialogPrimitive.Root
const Trigger = DialogPrimitive.Trigger
import Title from "./dialog-title.svelte";
import Portal from "./dialog-portal.svelte";
import Footer from "./dialog-footer.svelte";
import Header from "./dialog-header.svelte";
import Overlay from "./dialog-overlay.svelte";
import Content from "./dialog-content.svelte";
import Description from "./dialog-description.svelte";
import Title from './dialog-title.svelte'
import Portal from './dialog-portal.svelte'
import Footer from './dialog-footer.svelte'
import Header from './dialog-header.svelte'
import Overlay from './dialog-overlay.svelte'
import Content from './dialog-content.svelte'
import Description from './dialog-description.svelte'
export {
Root,
@ -30,5 +30,5 @@ export {
Trigger as DialogTrigger,
Overlay as DialogOverlay,
Content as DialogContent,
Description as DialogDescription
};
Description as DialogDescription,
}

@ -24,8 +24,7 @@
on:focusout
on:pointerdown
on:pointerleave
on:pointermove
>
on:pointermove>
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<DropdownMenuPrimitive.CheckboxIndicator>
<Check class="h-4 w-4" />

@ -19,7 +19,6 @@
className,
)}
{...$$restProps}
on:keydown
>
on:keydown>
<slot />
</DropdownMenuPrimitive.Content>

@ -25,7 +25,6 @@
on:focusout
on:pointerdown
on:pointerleave
on:pointermove
>
on:pointermove>
<slot />
</DropdownMenuPrimitive.Item>

@ -13,7 +13,6 @@
<DropdownMenuPrimitive.Label
class={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}
{...$$restProps}
>
{...$$restProps}>
<slot />
</DropdownMenuPrimitive.Label>

@ -24,8 +24,7 @@
on:focusout
on:pointerdown
on:pointerleave
on:pointermove
>
on:pointermove>
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<DropdownMenuPrimitive.RadioIndicator>
<Circle class="h-2 w-2 fill-current" />

@ -10,5 +10,4 @@
<DropdownMenuPrimitive.Separator
class={cn('-mx-1 my-1 h-px bg-muted', className)}
{...$$restProps}
/>
{...$$restProps} />

@ -10,7 +10,6 @@
<span
class={cn('ml-auto text-xs tracking-widest opacity-60', className)}
{...$$restProps}
>
{...$$restProps}>
<slot />
</span>

@ -24,7 +24,6 @@
{...$$restProps}
on:keydown
on:focusout
on:pointermove
>
on:pointermove>
<slot />
</DropdownMenuPrimitive.SubContent>

@ -25,8 +25,7 @@
on:focusin
on:focusout
on:pointerleave
on:pointermove
>
on:pointermove>
<slot />
<ChevronRight class="ml-auto h-4 w-4" />
</DropdownMenuPrimitive.SubTrigger>

@ -21,6 +21,5 @@
}}
{...$$restProps}
on:click
on:keydown
/>
on:keydown />
<input hidden {name} value={$value} />

@ -10,7 +10,6 @@
<FormPrimitive.Description
class={cn('text-sm text-muted-foreground', className)}
{...$$restProps}
>
{...$$restProps}>
<slot />
</FormPrimitive.Description>

@ -24,5 +24,4 @@
on:mouseenter
on:mouseleave
on:paste
on:input
/>
on:input />

@ -15,7 +15,6 @@
<Label
for={$ids.input}
class={cn($errors && 'text-destructive', className)}
{...$$restProps}
>
{...$$restProps}>
<slot />
</Label>

@ -17,8 +17,7 @@
'appearance-none bg-transparent font-normal',
className,
)}
{...$$restProps}
>
{...$$restProps}>
<slot />
</FormPrimitive.Select>
<ChevronDown class="absolute right-3 top-2.5 h-4 w-4 opacity-50" />

@ -15,8 +15,7 @@
onValueChange?.(v)
setValue(v)
}}
{...$$restProps}
>
{...$$restProps}>
<slot />
<input hidden {name} value={$value} />
</RadioGroup.Root>

@ -13,8 +13,7 @@
onSelectedChange?.(v)
setValue(v ? v.value : undefined)
}}
{...$$restProps}
>
{...$$restProps}>
<slot />
<input hidden {name} value={$value} />
</Select.Root>

@ -19,6 +19,5 @@
}}
{...$$restProps}
on:click
on:keydown
/>
on:keydown />
<input hidden {name} value={$value} />

@ -25,5 +25,4 @@
on:mouseenter
on:mouseleave
on:paste
on:input
/>
on:input />

@ -10,5 +10,4 @@
<FormPrimitive.Validation
class={cn('text-sm font-medium text-destructive', className)}
{...$$restProps}
/>
{...$$restProps} />

@ -29,5 +29,4 @@
on:mouseleave
on:paste
on:input
{...$$restProps}
/>
{...$$restProps} />

@ -15,7 +15,6 @@
className,
)}
{...$$restProps}
on:mousedown
>
on:mousedown>
<slot />
</LabelPrimitive.Root>

@ -18,8 +18,7 @@
className,
)}
{...$$restProps}
on:click
>
on:click>
<div class="flex items-center justify-center">
<RadioGroupPrimitive.ItemIndicator>
<Circle class="h-2.5 w-2.5 fill-current text-current" />

@ -12,7 +12,6 @@
<RadioGroupPrimitive.Root
bind:value
class={cn('grid gap-2', className)}
{...$$restProps}
>
{...$$restProps}>
<slot />
</RadioGroupPrimitive.Root>

@ -28,8 +28,7 @@
className,
)}
{...$$restProps}
on:keydown
>
on:keydown>
<div class="w-full p-1">
<slot />
</div>

@ -27,8 +27,7 @@
on:focusin
on:focusout
on:pointerleave
on:pointermove
>
on:pointermove>
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<SelectPrimitive.ItemIndicator>
<Check class="h-4 w-4" />

@ -10,7 +10,6 @@
<SelectPrimitive.Label
class={cn('py-1.5 pl-8 pr-2 text-sm font-semibold', className)}
{...$$restProps}
>
{...$$restProps}>
<slot />
</SelectPrimitive.Label>

@ -10,5 +10,4 @@
<SelectPrimitive.Separator
class={cn('-mx-1 my-1 h-px bg-muted', className)}
{...$$restProps}
/>
{...$$restProps} />

@ -18,8 +18,7 @@
{...$$restProps}
let:builder
on:click
on:keydown
>
on:keydown>
<slot {builder} />
<div>
<ChevronDown class="h-4 w-4 opacity-50" />

@ -18,5 +18,4 @@
)}
{orientation}
{decorative}
{...$$restProps}
/>
{...$$restProps} />

@ -15,11 +15,9 @@
'peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input',
className,
)}
{...$$restProps}
>
{...$$restProps}>
<SwitchPrimitive.Thumb
class={cn(
'pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0',
)}
/>
)} />
</SwitchPrimitive.Root>

@ -27,5 +27,4 @@
on:mouseleave
on:paste
on:input
{...$$restProps}
/>
{...$$restProps} />

@ -0,0 +1,5 @@
import type { LayoutServerLoad } from './$types'
export const load = (async () => {
return { shortener_url: process.env.SHORTENER_URL ?? 's.tzgyn.com' }
}) satisfies LayoutServerLoad

@ -6,7 +6,7 @@
import * as Card from '$lib/components/ui/card'
import { Input } from '$lib/components/ui/input'
import { Label } from '$lib/components/ui/label'
import { Loader2, PlusCircle } from 'lucide-svelte'
import { Link2, Loader2, PlusCircle } from 'lucide-svelte'
import { invalidateAll } from '$app/navigation'
export let data: PageData
@ -33,8 +33,7 @@
<div class="text-4xl font-bold">Links</div>
<Dialog.Root bind:open={dialogOpen}>
<Dialog.Trigger
class={buttonVariants({ variant: 'default' }) + 'flex gap-2'}
>
class={buttonVariants({ variant: 'default' }) + 'flex gap-2'}>
<PlusCircle />
Add Shortner
</Dialog.Trigger>
@ -56,8 +55,7 @@
{#if isLoading}
<Loader2 class="animate-spin" />
{/if}
Add</Button
>
Add</Button>
</Dialog.Footer>
</Dialog.Content>
</Dialog.Root>

@ -18,24 +18,20 @@
</script>
<div
class="container relative h-screen flex-col items-center justify-center md:grid lg:max-w-none lg:grid-cols-2 lg:px-0"
>
class="container relative h-screen flex-col items-center justify-center md:grid lg:max-w-none lg:grid-cols-2 lg:px-0">
<div class="absolute right-4 top-4 md:right-8 md:top-8">
<ThemeToggle />
</div>
<div
class="relative hidden h-full flex-col bg-primary-foreground p-10 text-white dark:border-r lg:flex"
>
class="relative hidden h-full flex-col bg-primary-foreground p-10 text-white dark:border-r lg:flex">
<div
class="relative z-20 flex items-center text-lg font-medium text-primary"
>
class="relative z-20 flex items-center text-lg font-medium text-primary">
Shortener
</div>
</div>
<div class="p-8">
<div
class="mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]"
>
class="mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]">
<div class="flex flex-col space-y-2 text-center">
<h1 class="text-2xl font-semibold tracking-tight">
Login to your account
@ -49,8 +45,7 @@
Don't Have An Account? Signup{' '}
<a
href="/signup"
class="underline underline-offset-4 hover:text-primary"
>
class="underline underline-offset-4 hover:text-primary">
Here
</a>
</p>

@ -7,24 +7,20 @@
</script>
<div
class="container relative h-screen flex-col items-center justify-center md:grid lg:max-w-none lg:grid-cols-2 lg:px-0"
>
class="container relative h-screen flex-col items-center justify-center md:grid lg:max-w-none lg:grid-cols-2 lg:px-0">
<div class="absolute right-4 top-4 md:right-8 md:top-8">
<ThemeToggle />
</div>
<div
class="relative hidden h-full flex-col bg-primary-foreground p-10 text-white dark:border-r lg:flex"
>
class="relative hidden h-full flex-col bg-primary-foreground p-10 text-white dark:border-r lg:flex">
<div
class="relative z-20 flex items-center text-lg font-medium text-primary"
>
class="relative z-20 flex items-center text-lg font-medium text-primary">
Shortener
</div>
</div>
<div class="p-8">
<div
class="mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]"
>
class="mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]">
<div class="flex flex-col space-y-2 text-center">
<h1 class="text-2xl font-semibold tracking-tight">Create an account</h1>
<p class="text-sm text-muted-foreground">
@ -36,8 +32,7 @@
Already Have An Account? Login{' '}
<a
href="/login"
class="underline underline-offset-4 hover:text-primary"
>
class="underline underline-offset-4 hover:text-primary">
Here
</a>{' '}
</p>

Loading…
Cancel
Save