1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-04 13:21:45 +00:00

refactor: run formatter

This commit is contained in:
Elias Schneider
2026-01-02 17:45:53 +01:00
parent 386add08c4
commit e4a8ca476c
19 changed files with 139 additions and 138 deletions

View File

@@ -484,5 +484,5 @@
"yes": "Yes", "yes": "Yes",
"no": "No", "no": "No",
"restricted": "Restricted", "restricted": "Restricted",
"scopes": "Scopes" "scopes": "Scopes"
} }

View File

@@ -1,63 +1,63 @@
{ {
"name": "pocket-id-frontend", "name": "pocket-id-frontend",
"version": "1.16.0", "version": "1.16.0",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm", "preinstall": "npx only-allow pnpm",
"dev": "vite dev --port 3000", "dev": "vite dev --port 3000",
"build": "vite build", "build": "vite build",
"preview": "vite preview --port 3000", "preview": "vite preview --port 3000",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .", "lint": "prettier --check . && eslint .",
"format": "prettier --write ." "format": "prettier --write ."
}, },
"dependencies": { "dependencies": {
"@simplewebauthn/browser": "^13.2.2", "@simplewebauthn/browser": "^13.2.2",
"@tailwindcss/vite": "^4.1.17", "@tailwindcss/vite": "^4.1.17",
"axios": "^1.13.2", "axios": "^1.13.2",
"clsx": "^2.1.1", "clsx": "^2.1.1",
"date-fns": "^4.1.0", "date-fns": "^4.1.0",
"jose": "^6.1.3", "jose": "^6.1.3",
"qrcode": "^1.5.4", "qrcode": "^1.5.4",
"runed": "^0.37.0", "runed": "^0.37.0",
"sveltekit-superforms": "^2.28.1", "sveltekit-superforms": "^2.28.1",
"tailwind-merge": "^3.4.0", "tailwind-merge": "^3.4.0",
"zod": "^4.1.13" "zod": "^4.1.13"
}, },
"devDependencies": { "devDependencies": {
"@inlang/paraglide-js": "^2.6.0", "@inlang/paraglide-js": "^2.6.0",
"@inlang/plugin-m-function-matcher": "^2.1.0", "@inlang/plugin-m-function-matcher": "^2.1.0",
"@inlang/plugin-message-format": "^4.0.0", "@inlang/plugin-message-format": "^4.0.0",
"@internationalized/date": "^3.10.0", "@internationalized/date": "^3.10.0",
"@lucide/svelte": "^0.559.0", "@lucide/svelte": "^0.559.0",
"@sveltejs/adapter-static": "^3.0.10", "@sveltejs/adapter-static": "^3.0.10",
"@sveltejs/kit": "^2.49.2", "@sveltejs/kit": "^2.49.2",
"@sveltejs/vite-plugin-svelte": "^6.2.1", "@sveltejs/vite-plugin-svelte": "^6.2.1",
"@types/eslint": "^9.6.1", "@types/eslint": "^9.6.1",
"@types/node": "^24.10.2", "@types/node": "^24.10.2",
"@types/qrcode": "^1.5.6", "@types/qrcode": "^1.5.6",
"bits-ui": "^2.14.4", "bits-ui": "^2.14.4",
"eslint": "^9.39.1", "eslint": "^9.39.1",
"eslint-config-prettier": "^10.1.8", "eslint-config-prettier": "^10.1.8",
"eslint-plugin-svelte": "^3.13.1", "eslint-plugin-svelte": "^3.13.1",
"formsnap": "^2.0.1", "formsnap": "^2.0.1",
"globals": "^16.5.0", "globals": "^16.5.0",
"mode-watcher": "^1.1.0", "mode-watcher": "^1.1.0",
"prettier": "^3.7.4", "prettier": "^3.7.4",
"prettier-plugin-svelte": "^3.4.0", "prettier-plugin-svelte": "^3.4.0",
"prettier-plugin-tailwindcss": "^0.7.2", "prettier-plugin-tailwindcss": "^0.7.2",
"rollup": "^4.53.3", "rollup": "^4.53.3",
"svelte": "^5.45.8", "svelte": "^5.45.8",
"svelte-check": "^4.3.4", "svelte-check": "^4.3.4",
"svelte-sonner": "^1.0.7", "svelte-sonner": "^1.0.7",
"tailwind-variants": "^3.2.2", "tailwind-variants": "^3.2.2",
"tailwindcss": "^4.1.17", "tailwindcss": "^4.1.17",
"tslib": "^2.8.1", "tslib": "^2.8.1",
"tw-animate-css": "^1.4.0", "tw-animate-css": "^1.4.0",
"typescript": "^5.9.3", "typescript": "^5.9.3",
"typescript-eslint": "^8.49.0", "typescript-eslint": "^8.49.0",
"vite": "^7.2.7" "vite": "^7.2.7"
} }
} }

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -13,7 +13,7 @@
<div <div
bind:this={ref} bind:this={ref}
data-slot="field-content" data-slot="field-content"
class={cn("group/field-content flex flex-1 flex-col gap-1.5 leading-snug", className)} class={cn('group/field-content flex flex-1 flex-col gap-1.5 leading-snug', className)}
{...restProps} {...restProps}
> >
{@render children?.()} {@render children?.()}

View File

@@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
import type { Snippet } from "svelte"; import type { Snippet } from 'svelte';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -38,7 +38,7 @@
bind:this={ref} bind:this={ref}
role="alert" role="alert"
data-slot="field-error" data-slot="field-error"
class={cn("text-destructive text-sm font-normal", className)} class={cn('text-destructive text-sm font-normal', className)}
{...restProps} {...restProps}
> >
{#if children} {#if children}

View File

@@ -1,15 +1,15 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
let { let {
ref = $bindable(null), ref = $bindable(null),
class: className, class: className,
variant = "legend", variant = 'legend',
children, children,
...restProps ...restProps
}: WithElementRef<HTMLAttributes<HTMLLegendElement>> & { }: WithElementRef<HTMLAttributes<HTMLLegendElement>> & {
variant?: "legend" | "label"; variant?: 'legend' | 'label';
} = $props(); } = $props();
</script> </script>
@@ -18,9 +18,9 @@
data-slot="field-legend" data-slot="field-legend"
data-variant={variant} data-variant={variant}
class={cn( class={cn(
"mb-3 font-medium", 'mb-3 font-medium',
"data-[variant=legend]:text-base", 'data-[variant=legend]:text-base',
"data-[variant=label]:text-sm", 'data-[variant=label]:text-sm',
className className
)} )}
{...restProps} {...restProps}

View File

@@ -1,8 +1,8 @@
<script lang="ts"> <script lang="ts">
import { Separator } from "$lib/components/ui/separator/index.js"; import { Separator } from '$lib/components/ui/separator/index.js';
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
import type { Snippet } from "svelte"; import type { Snippet } from 'svelte';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -20,10 +20,7 @@
bind:this={ref} bind:this={ref}
data-slot="field-separator" data-slot="field-separator"
data-content={hasContent} data-content={hasContent}
class={cn( class={cn('relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2', className)}
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
className
)}
{...restProps} {...restProps}
> >
<Separator class="absolute inset-0 top-1/2" /> <Separator class="absolute inset-0 top-1/2" />

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -14,7 +14,7 @@
bind:this={ref} bind:this={ref}
data-slot="field-title" data-slot="field-title"
class={cn( class={cn(
"flex w-fit items-center gap-2 text-sm font-medium leading-snug group-data-[disabled=true]/field:opacity-50", 'flex w-fit items-center gap-2 text-sm font-medium leading-snug group-data-[disabled=true]/field:opacity-50',
className className
)} )}
{...restProps} {...restProps}

View File

@@ -1,13 +1,13 @@
import Field from "./field.svelte"; import Field from './field.svelte';
import Set from "./field-set.svelte"; import Set from './field-set.svelte';
import Legend from "./field-legend.svelte"; import Legend from './field-legend.svelte';
import Group from "./field-group.svelte"; import Group from './field-group.svelte';
import Content from "./field-content.svelte"; import Content from './field-content.svelte';
import Label from "./field-label.svelte"; import Label from './field-label.svelte';
import Title from "./field-title.svelte"; import Title from './field-title.svelte';
import Description from "./field-description.svelte"; import Description from './field-description.svelte';
import Separator from "./field-separator.svelte"; import Separator from './field-separator.svelte';
import Error from "./field-error.svelte"; import Error from './field-error.svelte';
export { export {
Field, Field,
@@ -29,5 +29,5 @@ export {
Title as FieldTitle, Title as FieldTitle,
Description as FieldDescription, Description as FieldDescription,
Separator as FieldSeparator, Separator as FieldSeparator,
Error as FieldError, Error as FieldError
}; };

View File

@@ -1,13 +1,13 @@
import Root from "./item.svelte"; import Root from './item.svelte';
import Group from "./item-group.svelte"; import Group from './item-group.svelte';
import Separator from "./item-separator.svelte"; import Separator from './item-separator.svelte';
import Header from "./item-header.svelte"; import Header from './item-header.svelte';
import Footer from "./item-footer.svelte"; import Footer from './item-footer.svelte';
import Content from "./item-content.svelte"; import Content from './item-content.svelte';
import Title from "./item-title.svelte"; import Title from './item-title.svelte';
import Description from "./item-description.svelte"; import Description from './item-description.svelte';
import Actions from "./item-actions.svelte"; import Actions from './item-actions.svelte';
import Media from "./item-media.svelte"; import Media from './item-media.svelte';
export { export {
Root, Root,
@@ -30,5 +30,5 @@ export {
Title as ItemTitle, Title as ItemTitle,
Description as ItemDescription, Description as ItemDescription,
Actions as ItemActions, Actions as ItemActions,
Media as ItemMedia, Media as ItemMedia
}; };

View File

@@ -16,7 +16,11 @@
<div <div
bind:this={ref} bind:this={ref}
data-slot="item-actions" data-slot="item-actions"
class={cn('flex items-center gap-2', wrapOnMobile && 'w-full pl-8 sm:w-auto sm:pl-0 pt-1', className)} class={cn(
'flex items-center gap-2',
wrapOnMobile && 'w-full pl-8 sm:w-auto sm:pl-0 pt-1',
className
)}
{...restProps} {...restProps}
> >
{@render children?.()} {@render children?.()}

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -13,7 +13,7 @@
<div <div
bind:this={ref} bind:this={ref}
data-slot="item-content" data-slot="item-content"
class={cn("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none", className)} class={cn('flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none', className)}
{...restProps} {...restProps}
> >
{@render children?.()} {@render children?.()}

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -14,8 +14,8 @@
bind:this={ref} bind:this={ref}
data-slot="item-description" data-slot="item-description"
class={cn( class={cn(
"text-muted-foreground text-balance text-sm font-normal leading-normal", 'text-muted-foreground text-balance text-sm font-normal leading-normal',
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4", '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',
className className
)} )}
{...restProps} {...restProps}

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -13,7 +13,7 @@
<div <div
bind:this={ref} bind:this={ref}
data-slot="item-footer" data-slot="item-footer"
class={cn("flex basis-full items-center justify-between gap-2", className)} class={cn('flex basis-full items-center justify-between gap-2', className)}
{...restProps} {...restProps}
> >
{@render children?.()} {@render children?.()}

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -14,7 +14,7 @@
bind:this={ref} bind:this={ref}
role="list" role="list"
data-slot="item-group" data-slot="item-group"
class={cn("group/item-group flex flex-col", className)} class={cn('group/item-group flex flex-col', className)}
{...restProps} {...restProps}
> >
{@render children?.()} {@render children?.()}

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -13,7 +13,7 @@
<div <div
bind:this={ref} bind:this={ref}
data-slot="item-header" data-slot="item-header"
class={cn("flex basis-full items-center justify-between gap-2", className)} class={cn('flex basis-full items-center justify-between gap-2', className)}
{...restProps} {...restProps}
> >
{@render children?.()} {@render children?.()}

View File

@@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import { Separator } from "$lib/components/ui/separator/index.js"; import { Separator } from '$lib/components/ui/separator/index.js';
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
import type { ComponentProps } from "svelte"; import type { ComponentProps } from 'svelte';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -14,6 +14,6 @@
bind:ref bind:ref
data-slot="item-separator" data-slot="item-separator"
orientation="horizontal" orientation="horizontal"
class={cn("my-0", className)} class={cn('my-0', className)}
{...restProps} {...restProps}
/> />

View File

@@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { cn, type WithElementRef } from "$lib/utils/style.js"; import { cn, type WithElementRef } from '$lib/utils/style.js';
import type { HTMLAttributes } from "svelte/elements"; import type { HTMLAttributes } from 'svelte/elements';
let { let {
ref = $bindable(null), ref = $bindable(null),
@@ -15,7 +15,7 @@
role="heading" role="heading"
aria-level="3" aria-level="3"
data-slot="item-title" data-slot="item-title"
class={cn("flex w-fit items-center gap-2 font-semibold leading-snug", className)} class={cn('flex w-fit items-center gap-2 font-semibold leading-snug', className)}
{...restProps} {...restProps}
> >
{@render children?.()} {@render children?.()}

View File

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

View File

@@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import { cn } from "$lib/utils/style.js"; import { cn } from '$lib/utils/style.js';
import Loader2Icon from "@lucide/svelte/icons/loader-2"; import Loader2Icon from '@lucide/svelte/icons/loader-2';
import type { ComponentProps } from "svelte"; import type { ComponentProps } from 'svelte';
let { class: className, ...restProps }: ComponentProps<typeof Loader2Icon> = $props(); let { class: className, ...restProps }: ComponentProps<typeof Loader2Icon> = $props();
</script> </script>
@@ -9,6 +9,6 @@
<Loader2Icon <Loader2Icon
role="status" role="status"
aria-label="Loading" aria-label="Loading"
class={cn("size-4 animate-spin", className)} class={cn('size-4 animate-spin', className)}
{...restProps} {...restProps}
/> />