diff --git a/client/src/app.css b/client/src/app.css index 95d5dff..ab346d9 100644 --- a/client/src/app.css +++ b/client/src/app.css @@ -1,99 +1,99 @@ @import 'tailwindcss'; -@import "tw-animate-css"; +@import 'tw-animate-css'; @custom-variant dark (&:where(.dark, .dark *)); @theme inline { - --spacing-body: calc(100vh - 180px); + --spacing-body: calc(100vh - 180px); - --color-accent: var(--sky); + --color-accent: var(--sky); - --color-rosewater: var(--rosewater); - --color-flamingo: var(--flamingo); - --color-pink: var(--pink); - --color-mauve: var(--mauve); - --color-red: var(--red); - --color-maroon: var(--maroon); - --color-peach: var(--peach); - --color-yellow: var(--yellow); - --color-green: var(--green); - --color-teal: var(--teal); - --color-sky: var(--sky); - --color-sapphire: var(--sapphire); - --color-blue: var(--blue); - --color-lavender: var(--lavender); - --color-text: var(--text); - --color-subtext-1: var(--subtext-1); - --color-subtext: var(--subtext); - --color-overlay-2: var(--overlay-2); - --color-overlay-1: var(--overlay-1); - --color-overlay: var(--overlay); - --color-surface-2: var(--surface-2); - --color-surface-1: var(--surface-1); - --color-surface: var(--surface); - --color-based: var(--based); - --color-mantle: var(--mantle); - --color-crust: var(--crust); + --color-rosewater: var(--rosewater); + --color-flamingo: var(--flamingo); + --color-pink: var(--pink); + --color-mauve: var(--mauve); + --color-red: var(--red); + --color-maroon: var(--maroon); + --color-peach: var(--peach); + --color-yellow: var(--yellow); + --color-green: var(--green); + --color-teal: var(--teal); + --color-sky: var(--sky); + --color-sapphire: var(--sapphire); + --color-blue: var(--blue); + --color-lavender: var(--lavender); + --color-text: var(--text); + --color-subtext-1: var(--subtext-1); + --color-subtext: var(--subtext); + --color-overlay-2: var(--overlay-2); + --color-overlay-1: var(--overlay-1); + --color-overlay: var(--overlay); + --color-surface-2: var(--surface-2); + --color-surface-1: var(--surface-1); + --color-surface: var(--surface); + --color-based: var(--based); + --color-mantle: var(--mantle); + --color-crust: var(--crust); } @layer base { - :root { - --rosewater: hsl(11deg, 59%, 67%); - --flamingo: hsl(0deg, 60%, 67%); - --pink: hsl(316deg, 73%, 69%); - --mauve: hsl(266deg, 85%, 58%); - --red: hsl(347deg, 87%, 44%); - --maroon: hsl(355deg, 76%, 59%); - --peach: hsl(22deg, 99%, 52%); - --yellow: hsl(35deg, 77%, 49%); - --green: hsl(109deg, 58%, 40%); - --teal: hsl(183deg, 74%, 35%); - --sky: hsl(197deg, 97%, 46%); - --sapphire: hsl(189deg, 70%, 42%); - --blue: hsl(220deg, 91%, 54%); - --lavender: hsl(231deg, 97%, 72%); - --text: hsl(234deg, 16%, 35%); - --subtext-1: hsl(233deg, 13%, 41%); - --subtext: hsl(233deg, 10%, 47%); - --overlay-2: hsl(232deg, 10%, 53%); - --overlay-1: hsl(231deg, 10%, 59%); - --overlay: hsl(228deg, 11%, 65%); - --surface-2: hsl(227deg, 12%, 71%); - --surface-1: hsl(225deg, 14%, 77%); - --surface: hsl(223deg, 16%, 83%); - --based: hsl(220deg, 23%, 95%); - --mantle: hsl(220deg, 22%, 92%); - --crust: hsl(220deg, 21%, 89%); - } + :root { + --rosewater: hsl(11deg, 59%, 67%); + --flamingo: hsl(0deg, 60%, 67%); + --pink: hsl(316deg, 73%, 69%); + --mauve: hsl(266deg, 85%, 58%); + --red: hsl(347deg, 87%, 44%); + --maroon: hsl(355deg, 76%, 59%); + --peach: hsl(22deg, 99%, 52%); + --yellow: hsl(35deg, 77%, 49%); + --green: hsl(109deg, 58%, 40%); + --teal: hsl(183deg, 74%, 35%); + --sky: hsl(197deg, 97%, 46%); + --sapphire: hsl(189deg, 70%, 42%); + --blue: hsl(220deg, 91%, 54%); + --lavender: hsl(231deg, 97%, 72%); + --text: hsl(234deg, 16%, 35%); + --subtext-1: hsl(233deg, 13%, 41%); + --subtext: hsl(233deg, 10%, 47%); + --overlay-2: hsl(232deg, 10%, 53%); + --overlay-1: hsl(231deg, 10%, 59%); + --overlay: hsl(228deg, 11%, 65%); + --surface-2: hsl(227deg, 12%, 71%); + --surface-1: hsl(225deg, 14%, 77%); + --surface: hsl(223deg, 16%, 83%); + --based: hsl(220deg, 23%, 95%); + --mantle: hsl(220deg, 22%, 92%); + --crust: hsl(220deg, 21%, 89%); + } - .dark { - --rosewater: hsl(10deg, 56%, 91%); - --flamingo: hsl(0deg, 59%, 88%); - --pink: hsl(316deg, 72%, 86%); - --mauve: hsl(267deg, 84%, 81%); - --red: hsl(343deg, 81%, 75%); - --maroon: hsl(350deg, 65%, 77%); - --peach: hsl(23deg, 92%, 75%); - --yellow: hsl(41deg, 86%, 83%); - --green: hsl(115deg, 54%, 76%); - --teal: hsl(170deg, 57%, 73%); - --sky: hsl(189deg, 71%, 73%); - --sapphire: hsl(199deg, 76%, 69%); - --blue: hsl(217deg, 92%, 76%); - --lavender: hsl(232deg, 97%, 85%); - --text: hsl(226deg, 64%, 88%); - --subtext-1: hsl(227deg, 35%, 80%); - --subtext: hsl(228deg, 24%, 72%); - --overlay-2: hsl(228deg, 17%, 64%); - --overlay-1: hsl(230deg, 13%, 55%); - --overlay: hsl(231deg, 11%, 47%); - --surface-2: hsl(233deg, 12%, 39%); - --surface-1: hsl(234deg, 13%, 31%); - --surface: hsl(237deg, 16%, 23%); - --based: hsl(240deg, 21%, 15%); - --mantle: hsl(240deg, 21%, 12%); - --crust: hsl(240deg, 23%, 9%); - } + .dark { + --rosewater: hsl(10deg, 56%, 91%); + --flamingo: hsl(0deg, 59%, 88%); + --pink: hsl(316deg, 72%, 86%); + --mauve: hsl(267deg, 84%, 81%); + --red: hsl(343deg, 81%, 75%); + --maroon: hsl(350deg, 65%, 77%); + --peach: hsl(23deg, 92%, 75%); + --yellow: hsl(41deg, 86%, 83%); + --green: hsl(115deg, 54%, 76%); + --teal: hsl(170deg, 57%, 73%); + --sky: hsl(189deg, 71%, 73%); + --sapphire: hsl(199deg, 76%, 69%); + --blue: hsl(217deg, 92%, 76%); + --lavender: hsl(232deg, 97%, 85%); + --text: hsl(226deg, 64%, 88%); + --subtext-1: hsl(227deg, 35%, 80%); + --subtext: hsl(228deg, 24%, 72%); + --overlay-2: hsl(228deg, 17%, 64%); + --overlay-1: hsl(230deg, 13%, 55%); + --overlay: hsl(231deg, 11%, 47%); + --surface-2: hsl(233deg, 12%, 39%); + --surface-1: hsl(234deg, 13%, 31%); + --surface: hsl(237deg, 16%, 23%); + --based: hsl(240deg, 21%, 15%); + --mantle: hsl(240deg, 21%, 12%); + --crust: hsl(240deg, 23%, 9%); + } } /* @@ -102,4 +102,4 @@ Focus Outline: blue Border: surface-1 Hover: bump color by 2 (eg crust -> based), if accent color drop opacity (eg blue -> blue/90) -*/ \ No newline at end of file +*/ diff --git a/client/src/lib/coolforms/conststate.svelte.ts b/client/src/lib/coolforms/conststate.svelte.ts index 3925550..6b15dd8 100644 --- a/client/src/lib/coolforms/conststate.svelte.ts +++ b/client/src/lib/coolforms/conststate.svelte.ts @@ -1,7 +1,5 @@ - - export function newState(s: T) { - const state = $state(s); + const state = $state(s); - return state; -} \ No newline at end of file + return state; +} diff --git a/client/src/lib/coolforms/coolforms.svelte.ts b/client/src/lib/coolforms/coolforms.svelte.ts index 779fa3e..a652bf3 100644 --- a/client/src/lib/coolforms/coolforms.svelte.ts +++ b/client/src/lib/coolforms/coolforms.svelte.ts @@ -1,175 +1,181 @@ -import { create, type DescMessage, type DescService, type MessageShape, type MessageInitShape } from "@bufbuild/protobuf"; -import { ValidationError, type Violation } from "@bufbuild/protovalidate"; -import { Validator } from "../transport"; -import { ConnectError, type Client } from "@connectrpc/connect"; -import type { Action } from "svelte/action"; +import { + create, + type DescMessage, + type DescService, + type MessageShape, + type MessageInitShape +} from '@bufbuild/protobuf'; +import { ValidationError, type Violation } from '@bufbuild/protovalidate'; +import { Validator } from '../transport'; +import { ConnectError, type Client } from '@connectrpc/connect'; +import type { Action } from 'svelte/action'; type Options = { - init?: MessageInitShape, - start?: boolean, - reset?: boolean, - onSubmit?: (formData: FormData, input: MessageShape) => Promise>, - onResult?: (result: MessageShape) => void, - onError?: (err: Violation[] | ConnectError) => void -} - -type Violations = { - [field in keyof Field]?: Violation[]; + init?: MessageInitShape; + start?: boolean; + reset?: boolean; + onSubmit?: (formData: FormData, input: MessageShape) => Promise>; + onResult?: (result: MessageShape) => void; + onError?: (err: Violation[] | ConnectError) => void; }; -export function coolForm< - Service extends DescService, - Method extends Service['methods'][number] ->( - client: Client, - method: Method, - options?: Options +type Violations = { + [field in keyof Field]?: Violation[]; +}; + +export function coolForm( + client: Client, + method: Method, + options?: Options ) { - const input = $state(create(method.input as Method['input'], options?.init)); - const output = $state(create(method.output as Method['output'])); - const errors: Violations & { - form?: ConnectError - } = $state({}); - let loading = $state(false); + const input = $state(create(method.input as Method['input'], options?.init)); + const output = $state(create(method.output as Method['output'])); + const errors: Violations & { + form?: ConnectError; + } = $state({}); + let loading = $state(false); - const validate = () => { - // Delete existing errors - for (const key in errors) { - delete errors[key]; - } + const validate = () => { + // Delete existing errors + for (const key in errors) { + delete errors[key]; + } - try { - Validator.validate(method['input'], input); - } catch (e) { - if (!(e instanceof ValidationError)) { - throw e; - } + try { + Validator.validate(method['input'], input); + } catch (e) { + if (!(e instanceof ValidationError)) { + throw e; + } - // Map violation errors to errors rune - for (const violation of e.violations) { - for (const field of violation.field) { - if (!("localName" in field)) { - continue; - } + // Map violation errors to errors rune + for (const violation of e.violations) { + for (const field of violation.field) { + if (!('localName' in field)) { + continue; + } - // Create localName property if it doesn't exist - if (!errors[field.localName]) { - Object.assign(errors, { - [field.localName]: [violation] - }) - } else { - errors[field.localName]?.push(violation); - } - } - } + // Create localName property if it doesn't exist + if (!errors[field.localName]) { + Object.assign(errors, { + [field.localName]: [violation] + }); + } else { + errors[field.localName]?.push(violation); + } + } + } - return e.violations; - } + return e.violations; + } - return []; - }; + return []; + }; - // When a request is successful - const success = (response: MessageShape) => { - loading = false; + // When a request is successful + const success = (response: MessageShape) => { + loading = false; - // Send the response up - options?.onResult?.(response); + // Send the response up + options?.onResult?.(response); - // Set the response - Object.assign(output, response); + // Set the response + Object.assign(output, response); - // If we want to reset the input - if (options && (options.reset == undefined || options.reset)) { - const cleared = create(method.input as Method['input'], options?.init) - Object.assign(input, cleared); - } - } + // If we want to reset the input + if (options && (options.reset == undefined || options.reset)) { + const cleared = create(method.input as Method['input'], options?.init); + Object.assign(input, cleared); + } + }; - // When a request fails - const fail = (err: Violation[] | ConnectError | any) => { - loading = false; + // When a request fails + const fail = (err: Violation[] | ConnectError | Error) => { + loading = false; - // It's a Violation[] - if (Array.isArray(err)) { - // Send the error up - options?.onError?.(err); - return; - } + // It's a Violation[] + if (Array.isArray(err)) { + // Send the error up + options?.onError?.(err); + return; + } - // It's a ConnectError - if (err instanceof ConnectError) { - // Assign it to the form - errors.form = err; + // It's a ConnectError + if (err instanceof ConnectError) { + // Assign it to the form + errors.form = err; - // Send the error up - options?.onError?.(err); - return; - } + // Send the error up + options?.onError?.(err); + return; + } - throw err; - } + throw err; + }; - const submit = () => { - loading = true; + const submit = () => { + loading = true; - // Validate - const validationErrors = validate(); - if (validationErrors.length > 0) { - fail(validationErrors); - return; - } + // Validate + const validationErrors = validate(); + if (validationErrors.length > 0) { + fail(validationErrors); + return; + } - // Send response - if (method.methodKind == "unary") { - // @ts-ignore I can't figure out how to make this typescript compliant - const response = client[method.localName]($state.snapshot(input)) as Promise> + // Send response + if (method.methodKind == 'unary') { + // @ts-expect-error I can't figure out how to make this typescript compliant + const response = client[method.localName]($state.snapshot(input)) as Promise< + MessageShape + >; - response - .then((resp) => { - success(resp); - }).catch(err => { - fail(err); - }); - } - } + response + .then((resp) => { + success(resp); + }) + .catch((err) => { + fail(err); + }); + } + }; - // A nice action to give to forms to run submit() on submit - const impair: Action = (form) => { - $effect(() => { - form.onsubmit = (event) => { - event.preventDefault(); + // A nice action to give to forms to run submit() on submit + const impair: Action = (form) => { + $effect(() => { + form.onsubmit = (event) => { + event.preventDefault(); - if (options?.onSubmit) { - const formData = new FormData(form); - options.onSubmit(formData, input).then((i) => { - Object.assign(input, i); - submit(); - }); + if (options?.onSubmit) { + const formData = new FormData(form); + options.onSubmit(formData, input).then((i) => { + Object.assign(input, i); + submit(); + }); - return; - } + return; + } - submit(); - } + submit(); + }; - return () => { - form.onsubmit = () => { }; - }; - }); - }; + return () => { + form.onsubmit = () => {}; + }; + }); + }; - if (options?.start) { - submit(); - } + if (options?.start) { + submit(); + } - return { - input, - output, - errors, - loading: () => loading, - submit, - validate, - impair - } -} \ No newline at end of file + return { + input, + output, + errors, + loading: () => loading, + submit, + validate, + impair + }; +} diff --git a/client/src/lib/coolforms/index.ts b/client/src/lib/coolforms/index.ts index 4525399..5179a09 100644 --- a/client/src/lib/coolforms/index.ts +++ b/client/src/lib/coolforms/index.ts @@ -1,7 +1,4 @@ -import { coolForm } from "./coolforms.svelte"; -import { newState } from "./conststate.svelte"; +import { coolForm } from './coolforms.svelte'; +import { newState } from './conststate.svelte'; -export { - coolForm, - newState -}; \ No newline at end of file +export { coolForm, newState }; diff --git a/client/src/lib/transport.ts b/client/src/lib/transport.ts index 47c2583..1ae2cf5 100644 --- a/client/src/lib/transport.ts +++ b/client/src/lib/transport.ts @@ -1,5 +1,5 @@ import { createConnectTransport } from '@connectrpc/connect-web'; -import { createValidator } from "@bufbuild/protovalidate"; +import { createValidator } from '@bufbuild/protovalidate'; import { Code, ConnectError, createClient, type Interceptor } from '@connectrpc/connect'; import { AuthService } from '$lib/connect/user/v1/auth_pb'; import { UserService } from '$lib/connect/user/v1/user_pb'; @@ -15,7 +15,10 @@ const redirector: Interceptor = (next) => async (req) => { if (error.code === Code.Unauthenticated) { const redirectURL = new URL(page.url); redirectURL.pathname = '/auth'; - redirectURL.searchParams.append('redir', encodeURIComponent(page.url.pathname + page.url.search)); + redirectURL.searchParams.append( + 'redir', + encodeURIComponent(page.url.pathname + page.url.search) + ); await goto(redirectURL); } diff --git a/client/src/lib/ui/avatar/avatar-fallback.svelte b/client/src/lib/ui/avatar/avatar-fallback.svelte index f4d0873..ad1e73c 100644 --- a/client/src/lib/ui/avatar/avatar-fallback.svelte +++ b/client/src/lib/ui/avatar/avatar-fallback.svelte @@ -13,7 +13,7 @@ bind:ref data-slot="avatar-fallback" class={cn( - 'bg-surface outline-surface-2 flex size-full select-none items-center justify-center rounded-full text-sm transition-all', + 'bg-surface outline-surface-2 flex size-full items-center justify-center rounded-full text-sm transition-all select-none', className )} {...restProps} diff --git a/client/src/lib/ui/avatar/avatar-image.svelte b/client/src/lib/ui/avatar/avatar-image.svelte index 2bb9db4..7ccc3ce 100644 --- a/client/src/lib/ui/avatar/avatar-image.svelte +++ b/client/src/lib/ui/avatar/avatar-image.svelte @@ -1,6 +1,6 @@ @@ -60,7 +59,6 @@ href = undefined, type = 'button', loading, - scan, children, ...restProps }: ButtonProps = $props(); diff --git a/client/src/lib/ui/button/index.ts b/client/src/lib/ui/button/index.ts index 74b5c1d..5414d9d 100644 --- a/client/src/lib/ui/button/index.ts +++ b/client/src/lib/ui/button/index.ts @@ -2,8 +2,8 @@ import Root, { type ButtonProps, type ButtonSize, type ButtonVariant, - buttonVariants, -} from "./button.svelte"; + buttonVariants +} from './button.svelte'; export { Root, @@ -13,5 +13,5 @@ export { buttonVariants, type ButtonProps, type ButtonSize, - type ButtonVariant, -}; \ No newline at end of file + type ButtonVariant +}; diff --git a/client/src/lib/ui/card/index.ts b/client/src/lib/ui/card/index.ts index 837ce24..61a5f0d 100644 --- a/client/src/lib/ui/card/index.ts +++ b/client/src/lib/ui/card/index.ts @@ -1,7 +1,7 @@ -import Root from "./card.svelte"; +import Root from './card.svelte'; export { Root, // - Root as Card, -}; \ No newline at end of file + Root as Card +}; diff --git a/client/src/lib/ui/daterangepicker/daterangepicker.svelte b/client/src/lib/ui/daterangepicker/daterangepicker.svelte index eab4df8..a702244 100644 --- a/client/src/lib/ui/daterangepicker/daterangepicker.svelte +++ b/client/src/lib/ui/daterangepicker/daterangepicker.svelte @@ -58,7 +58,7 @@ Pick a date range {/if} - + { diff --git a/client/src/lib/ui/daterangepicker/index.ts b/client/src/lib/ui/daterangepicker/index.ts index 7e2815f..002d45d 100644 --- a/client/src/lib/ui/daterangepicker/index.ts +++ b/client/src/lib/ui/daterangepicker/index.ts @@ -1,6 +1,3 @@ -import Root from "./daterangepicker.svelte"; +import Root from './daterangepicker.svelte'; -export { - Root, - Root as DateRangePicker -}; +export { Root, Root as DateRangePicker }; diff --git a/client/src/lib/ui/dialog/dialog-close.svelte b/client/src/lib/ui/dialog/dialog-close.svelte index 840b2f6..e8a96a7 100644 --- a/client/src/lib/ui/dialog/dialog-close.svelte +++ b/client/src/lib/ui/dialog/dialog-close.svelte @@ -1,5 +1,5 @@ diff --git a/client/src/lib/ui/dialog/dialog-content.svelte b/client/src/lib/ui/dialog/dialog-content.svelte index 9ba844a..653a9b2 100644 --- a/client/src/lib/ui/dialog/dialog-content.svelte +++ b/client/src/lib/ui/dialog/dialog-content.svelte @@ -34,7 +34,7 @@ {@render children?.()} - import { Dialog as DialogPrimitive } from "bits-ui"; - import { cn } from "$lib/utils.js"; + import { Dialog as DialogPrimitive } from 'bits-ui'; + import { cn } from '$lib/utils.js'; let { ref = $bindable(null), @@ -12,6 +12,6 @@ diff --git a/client/src/lib/ui/dialog/dialog-footer.svelte b/client/src/lib/ui/dialog/dialog-footer.svelte index dac58f5..e9ccd41 100644 --- a/client/src/lib/ui/dialog/dialog-footer.svelte +++ b/client/src/lib/ui/dialog/dialog-footer.svelte @@ -1,7 +1,7 @@ diff --git a/client/src/lib/ui/dialog/index.ts b/client/src/lib/ui/dialog/index.ts index ac0961a..2fb1a9c 100644 --- a/client/src/lib/ui/dialog/index.ts +++ b/client/src/lib/ui/dialog/index.ts @@ -1,14 +1,14 @@ -import { Dialog as DialogPrimitive } from "bits-ui"; +import { Dialog as DialogPrimitive } from 'bits-ui'; import Root from './dialog.svelte'; -import Title from "./dialog-title.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 Trigger from "./dialog-trigger.svelte"; -import Close from "./dialog-close.svelte"; +import Title from './dialog-title.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 Trigger from './dialog-trigger.svelte'; +import Close from './dialog-close.svelte'; const Portal = DialogPrimitive.Portal; @@ -33,5 +33,5 @@ export { Overlay as DialogOverlay, Content as DialogContent, Description as DialogDescription, - Close as DialogClose, + Close as DialogClose }; diff --git a/client/src/lib/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte b/client/src/lib/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte index 9cc218c..2e21533 100644 --- a/client/src/lib/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +++ b/client/src/lib/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte @@ -1,9 +1,9 @@ -
+
{@render children?.()}
diff --git a/client/src/lib/ui/form/index.ts b/client/src/lib/ui/form/index.ts index 5cb0d5d..fb08aa0 100644 --- a/client/src/lib/ui/form/index.ts +++ b/client/src/lib/ui/form/index.ts @@ -2,8 +2,4 @@ import Field from './field.svelte'; import Errors from './errors.svelte'; import Label from './label.svelte'; -export { - Field, - Errors, - Label -}; +export { Field, Errors, Label }; diff --git a/client/src/lib/ui/input/index.ts b/client/src/lib/ui/input/index.ts index 0750b46..15c0933 100644 --- a/client/src/lib/ui/input/index.ts +++ b/client/src/lib/ui/input/index.ts @@ -1,7 +1,7 @@ -import Root from "./input.svelte"; +import Root from './input.svelte'; export { Root, // - Root as Input, -}; \ No newline at end of file + Root as Input +}; diff --git a/client/src/lib/ui/input/input.svelte b/client/src/lib/ui/input/input.svelte index f52daea..9df85e2 100644 --- a/client/src/lib/ui/input/input.svelte +++ b/client/src/lib/ui/input/input.svelte @@ -8,9 +8,7 @@ type Props = WithElementRef< Omit & - ({ type: 'file'; files?: FileList } | { type?: InputType; files?: undefined }) & { - scan?: boolean; - } + ({ type: 'file'; files?: FileList } | { type?: InputType; files?: undefined }) >; let { @@ -19,7 +17,6 @@ type, files = $bindable(), class: className, - scan, id, name, ...restProps @@ -40,7 +37,7 @@ {name} bind:this={ref} class={cn( - 'border-surface-1 file:bg-surface hover:border-overlay placeholder:text-subtext text-text shadow-xs flex h-9 w-full min-w-0 cursor-pointer rounded-md border text-sm font-medium transition-all file:mr-2 file:px-3 file:py-2 md:text-sm', + 'border-surface-1 file:bg-surface hover:border-overlay placeholder:text-subtext text-text flex h-9 w-full min-w-0 cursor-pointer rounded-md border text-sm font-medium shadow-xs transition-all file:mr-2 file:px-3 file:py-2 md:text-sm', // Focus 'focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2', @@ -61,7 +58,7 @@ {name} bind:this={ref} class={cn( - 'border-surface-1 hover:border-overlay placeholder:text-subtext text-text shadow-xs flex h-9 w-full min-w-0 rounded-md border px-3 py-1 transition-all md:text-sm', + 'border-surface-1 hover:border-overlay placeholder:text-subtext text-text flex h-9 w-full min-w-0 rounded-md border px-3 py-1 shadow-xs transition-all md:text-sm', // Focus 'focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2', diff --git a/client/src/lib/ui/label/index.ts b/client/src/lib/ui/label/index.ts index 8bfca0b..808d141 100644 --- a/client/src/lib/ui/label/index.ts +++ b/client/src/lib/ui/label/index.ts @@ -1,7 +1,7 @@ -import Root from "./label.svelte"; +import Root from './label.svelte'; export { Root, // - Root as Label, + Root as Label }; diff --git a/client/src/lib/ui/label/label.svelte b/client/src/lib/ui/label/label.svelte index b91e6db..d280f69 100644 --- a/client/src/lib/ui/label/label.svelte +++ b/client/src/lib/ui/label/label.svelte @@ -13,7 +13,7 @@ bind:ref data-slot="label" class={cn( - 'flex items-center gap-2 text-sm text-text leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50', + 'text-text flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50', className )} {...restProps} diff --git a/client/src/lib/ui/pager/index.ts b/client/src/lib/ui/pager/index.ts index 0f92404..549ad8e 100644 --- a/client/src/lib/ui/pager/index.ts +++ b/client/src/lib/ui/pager/index.ts @@ -1,5 +1,3 @@ -import Pager from './pager.svelte' +import Pager from './pager.svelte'; -export { - Pager -} \ No newline at end of file +export { Pager }; diff --git a/client/src/lib/ui/pagination/index.ts b/client/src/lib/ui/pagination/index.ts index d83c7a9..2f5532a 100644 --- a/client/src/lib/ui/pagination/index.ts +++ b/client/src/lib/ui/pagination/index.ts @@ -1,10 +1,10 @@ -import Root from "./pagination.svelte"; -import Content from "./pagination-content.svelte"; -import Item from "./pagination-item.svelte"; -import Link from "./pagination-link.svelte"; -import PrevButton from "./pagination-prev-button.svelte"; -import NextButton from "./pagination-next-button.svelte"; -import Ellipsis from "./pagination-ellipsis.svelte"; +import Root from './pagination.svelte'; +import Content from './pagination-content.svelte'; +import Item from './pagination-item.svelte'; +import Link from './pagination-link.svelte'; +import PrevButton from './pagination-prev-button.svelte'; +import NextButton from './pagination-next-button.svelte'; +import Ellipsis from './pagination-ellipsis.svelte'; export { Root, @@ -21,5 +21,5 @@ export { Link as PaginationLink, PrevButton as PaginationPrevButton, NextButton as PaginationNextButton, - Ellipsis as PaginationEllipsis, + Ellipsis as PaginationEllipsis }; diff --git a/client/src/lib/ui/pagination/pagination-content.svelte b/client/src/lib/ui/pagination/pagination-content.svelte index 4dc822e..6d0b019 100644 --- a/client/src/lib/ui/pagination/pagination-content.svelte +++ b/client/src/lib/ui/pagination/pagination-content.svelte @@ -1,7 +1,7 @@ - + diff --git a/client/src/lib/ui/range-calendar/range-calendar-grid.svelte b/client/src/lib/ui/range-calendar/range-calendar-grid.svelte index 7379a71..a36ea66 100644 --- a/client/src/lib/ui/range-calendar/range-calendar-grid.svelte +++ b/client/src/lib/ui/range-calendar/range-calendar-grid.svelte @@ -1,6 +1,6 @@ diff --git a/client/src/lib/ui/select/select-label.svelte b/client/src/lib/ui/select/select-label.svelte index 3ce6b9c..8962e7a 100644 --- a/client/src/lib/ui/select/select-label.svelte +++ b/client/src/lib/ui/select/select-label.svelte @@ -1,7 +1,7 @@ diff --git a/client/src/lib/ui/sheet/sheet-content.svelte b/client/src/lib/ui/sheet/sheet-content.svelte index 26d3112..9e30238 100644 --- a/client/src/lib/ui/sheet/sheet-content.svelte +++ b/client/src/lib/ui/sheet/sheet-content.svelte @@ -9,7 +9,7 @@ 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 border-t', left: 'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm', right: - 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right max-w-2xs inset-y-0 right-0 h-full w-3/4 border-l' + 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 max-w-2xs border-l' } }, defaultVariants: { @@ -51,7 +51,7 @@ > {@render children?.()} Close diff --git a/client/src/lib/ui/sheet/sheet-description.svelte b/client/src/lib/ui/sheet/sheet-description.svelte index 1098b74..032dcb9 100644 --- a/client/src/lib/ui/sheet/sheet-description.svelte +++ b/client/src/lib/ui/sheet/sheet-description.svelte @@ -1,6 +1,6 @@ diff --git a/client/src/lib/ui/skeleton/index.ts b/client/src/lib/ui/skeleton/index.ts index 186db21..3120ce1 100644 --- a/client/src/lib/ui/skeleton/index.ts +++ b/client/src/lib/ui/skeleton/index.ts @@ -1,7 +1,7 @@ -import Root from "./skeleton.svelte"; +import Root from './skeleton.svelte'; export { Root, // - Root as Skeleton, + Root as Skeleton }; diff --git a/client/src/lib/ui/skeleton/skeleton.svelte b/client/src/lib/ui/skeleton/skeleton.svelte index 74c5b9a..4ec6597 100644 --- a/client/src/lib/ui/skeleton/skeleton.svelte +++ b/client/src/lib/ui/skeleton/skeleton.svelte @@ -1,7 +1,7 @@ diff --git a/client/src/lib/ui/table/index.ts b/client/src/lib/ui/table/index.ts index 14695c8..99239ae 100644 --- a/client/src/lib/ui/table/index.ts +++ b/client/src/lib/ui/table/index.ts @@ -1,11 +1,11 @@ -import Root from "./table.svelte"; -import Body from "./table-body.svelte"; -import Caption from "./table-caption.svelte"; -import Cell from "./table-cell.svelte"; -import Footer from "./table-footer.svelte"; -import Head from "./table-head.svelte"; -import Header from "./table-header.svelte"; -import Row from "./table-row.svelte"; +import Root from './table.svelte'; +import Body from './table-body.svelte'; +import Caption from './table-caption.svelte'; +import Cell from './table-cell.svelte'; +import Footer from './table-footer.svelte'; +import Head from './table-head.svelte'; +import Header from './table-header.svelte'; +import Row from './table-row.svelte'; export { Root, @@ -24,5 +24,5 @@ export { Footer as TableFooter, Head as TableHead, Header as TableHeader, - Row as TableRow, + Row as TableRow }; diff --git a/client/src/lib/ui/table/table-body.svelte b/client/src/lib/ui/table/table-body.svelte index 624888c..b5fa553 100644 --- a/client/src/lib/ui/table/table-body.svelte +++ b/client/src/lib/ui/table/table-body.svelte @@ -1,7 +1,7 @@ -
+
{@render children?.()} diff --git a/client/src/lib/ui/tabs/index.ts b/client/src/lib/ui/tabs/index.ts index 12d4327..d2a7939 100644 --- a/client/src/lib/ui/tabs/index.ts +++ b/client/src/lib/ui/tabs/index.ts @@ -1,7 +1,7 @@ -import Root from "./tabs.svelte"; -import Content from "./tabs-content.svelte"; -import List from "./tabs-list.svelte"; -import Trigger from "./tabs-trigger.svelte"; +import Root from './tabs.svelte'; +import Content from './tabs-content.svelte'; +import List from './tabs-list.svelte'; +import Trigger from './tabs-trigger.svelte'; export { Root, @@ -12,5 +12,5 @@ export { Root as Tabs, Content as TabsContent, List as TabsList, - Trigger as TabsTrigger, + Trigger as TabsTrigger }; diff --git a/client/src/lib/ui/tabs/tabs-content.svelte b/client/src/lib/ui/tabs/tabs-content.svelte index 340d65c..92044c8 100644 --- a/client/src/lib/ui/tabs/tabs-content.svelte +++ b/client/src/lib/ui/tabs/tabs-content.svelte @@ -1,6 +1,6 @@ - import { Tabs as TabsPrimitive } from "bits-ui"; - import { cn } from "$lib/utils.js"; + import { Tabs as TabsPrimitive } from 'bits-ui'; + import { cn } from '$lib/utils.js'; let { ref = $bindable(null), @@ -13,7 +13,7 @@ bind:ref data-slot="tabs-trigger" class={cn( - "data-[state=active]:bg-surface hover:bg-surface cursor-pointer text-text inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md border border-transparent px-2 py-1 text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", + "data-[state=active]:bg-surface hover:bg-surface text-text inline-flex h-[calc(100%-1px)] flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className )} {...restProps} diff --git a/client/src/lib/ui/tabs/tabs.svelte b/client/src/lib/ui/tabs/tabs.svelte index 9bbf345..20af2fc 100644 --- a/client/src/lib/ui/tabs/tabs.svelte +++ b/client/src/lib/ui/tabs/tabs.svelte @@ -1,6 +1,6 @@
- + Log In Sign Up diff --git a/client/svelte.config.js b/client/svelte.config.js index f3074ca..4fbc867 100644 --- a/client/svelte.config.js +++ b/client/svelte.config.js @@ -11,7 +11,7 @@ const config = { // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list. // If your environment is not supported, or you settled on a specific environment, switch out the adapter. // See https://svelte.dev/docs/kit/adapters for more information about adapters. - adapter: adapter(), + adapter: adapter() } }; diff --git a/flake.nix b/flake.nix index e71a503..420722b 100644 --- a/flake.nix +++ b/flake.nix @@ -110,18 +110,6 @@ }); checks = forSystem ({pkgs, ...}: { - buf = with pkgs; - runCommandLocal "check-buf" { - nativeBuildInputs = with pkgs; [ - buf - ]; - } '' - export HOME=$(pwd) - cd ${./.} - buf lint - touch $out - ''; - nix = with pkgs; runCommandLocal "check-nix" { nativeBuildInputs = with pkgs; [ diff --git a/server/internal/interceptors/auth.go b/server/internal/interceptors/auth.go index 4fbc156..1f4633c 100644 --- a/server/internal/interceptors/auth.go +++ b/server/internal/interceptors/auth.go @@ -96,13 +96,7 @@ func (i *AuthInterceptor) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc { ctx, err = newUserContext(ctx, subject) if err == nil { return next(ctx, req) - } else { - log.Println("huh") - log.Println(err) } - } else { - log.Println("what") - log.Println(err) } } }