style: pretty imports

This commit is contained in:
trev 2025-05-13 17:19:12 -04:00
parent 06dc437033
commit c9dd6d9061
92 changed files with 390 additions and 213 deletions

6
.gitignore vendored
View File

@ -1,5 +1,7 @@
.env
/docker-compose.*
/build/
# Nix
/result*
/.direnv/
/build/
/.direnv/

View File

@ -39,7 +39,7 @@ apps:
- ts
- svelte
onstart: npx prettier --check .
onchange: npx prettier --check . || npx prettier --write .
onchange: npx prettier --check .
revive:
color: "#89dceb"

9
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,9 @@
{
"recommendations": [
"golang.go",
"dorzey.vscode-sqlfluff",
"dbaeumer.vscode-eslint",
"svelte.svelte-vscode",
"esbenp.prettier-vscode"
]
}

42
.vscode/settings.json vendored
View File

@ -1,7 +1,37 @@
{
"go.lintTool": "revive",
"go.lintFlags": [
"--config=server/revive.toml"
],
"sqlfluff.config": "server/db/.sqlfluff",
}
"editor.formatOnSave": true,
// Go
"go.lintTool": "revive",
"go.formatTool": "goimports",
"go.lintFlags": ["--config=server/revive.toml"],
"gopls": { "ui.semanticTokens": true },
"[go]": {
"editor.defaultFormatter": "golang.go"
},
// SQLFluff
"sqlfluff.config": "server/db/.sqlfluff",
// ESLint
"eslint.workingDirectories": ["./client"],
"eslint.validate": ["svelte", "javascript", "typescript"],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
// Svelte
"svelte.enable-ts-plugin": true,
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode"
},
// Prettier
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}

View File

@ -3,8 +3,21 @@
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"plugins": [
"prettier-plugin-svelte",
"prettier-plugin-tailwindcss",
"@ianvs/prettier-plugin-sort-imports"
],
"tailwindFunctions": ["tv", "cn", "clsx"],
"importOrder": [
"<TYPES>^(node:)",
"<TYPES>",
"<TYPES>^[.]",
"<BUILTIN_MODULES>",
"^(\\$lib/ui)(/.*)$",
"<THIRD_PARTY_MODULES>",
"^[.]"
],
"overrides": [
{
"files": "*.svelte",

View File

@ -1,11 +1,12 @@
import prettier from 'eslint-config-prettier';
import js from '@eslint/js';
import { fileURLToPath } from 'node:url';
import { includeIgnoreFile } from '@eslint/compat';
import js from '@eslint/js';
import prettier from 'eslint-config-prettier';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';
const gitignorePath = fileURLToPath(new URL('./.prettierignore', import.meta.url));
export default ts.config(

120
client/package-lock.json generated
View File

@ -13,6 +13,7 @@
"@connectrpc/connect-web": "^2.0.2",
"@eslint/compat": "^1.2.9",
"@eslint/js": "^9.18.0",
"@ianvs/prettier-plugin-sort-imports": "^4.4.1",
"@lucide/svelte": "^0.479.0",
"@scalar/api-reference": "^1.28.32",
"@simplewebauthn/browser": "^13.1.0",
@ -57,6 +58,38 @@
"node": ">=6.0.0"
}
},
"node_modules/@babel/code-frame": {
"version": "7.27.1",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz",
"integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/helper-validator-identifier": "^7.27.1",
"js-tokens": "^4.0.0",
"picocolors": "^1.1.1"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/generator": {
"version": "7.27.1",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.1.tgz",
"integrity": "sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/parser": "^7.27.1",
"@babel/types": "^7.27.1",
"@jridgewell/gen-mapping": "^0.3.5",
"@jridgewell/trace-mapping": "^0.3.25",
"jsesc": "^3.0.2"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-string-parser": {
"version": "7.27.1",
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
@ -93,6 +126,50 @@
"node": ">=6.0.0"
}
},
"node_modules/@babel/template": {
"version": "7.27.2",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz",
"integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/code-frame": "^7.27.1",
"@babel/parser": "^7.27.2",
"@babel/types": "^7.27.1"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/traverse": {
"version": "7.27.1",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.1.tgz",
"integrity": "sha512-ZCYtZciz1IWJB4U61UPu4KEaqyfj+r5T1Q5mqPo+IBpcG9kHv30Z0aD8LXPgC1trYa6rK0orRyAhqUgk4MjmEg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/code-frame": "^7.27.1",
"@babel/generator": "^7.27.1",
"@babel/parser": "^7.27.1",
"@babel/template": "^7.27.1",
"@babel/types": "^7.27.1",
"debug": "^4.3.1",
"globals": "^11.1.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/traverse/node_modules/globals": {
"version": "11.12.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
"integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/@babel/types": {
"version": "7.27.1",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.1.tgz",
@ -1205,6 +1282,29 @@
"url": "https://github.com/sponsors/jdesrosiers"
}
},
"node_modules/@ianvs/prettier-plugin-sort-imports": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/@ianvs/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-4.4.1.tgz",
"integrity": "sha512-F0/Hrcfpy8WuxlQyAWJTEren/uxKhYonOGY4OyWmwRdeTvkh9mMSCxowZLjNkhwi/2ipqCgtXwwOk7tW0mWXkA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@babel/generator": "^7.26.2",
"@babel/parser": "^7.26.2",
"@babel/traverse": "^7.25.9",
"@babel/types": "^7.26.0",
"semver": "^7.5.2"
},
"peerDependencies": {
"@vue/compiler-sfc": "2.7.x || 3.x",
"prettier": "2 || 3"
},
"peerDependenciesMeta": {
"@vue/compiler-sfc": {
"optional": true
}
}
},
"node_modules/@internationalized/date": {
"version": "3.8.0",
"resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.8.0.tgz",
@ -5480,6 +5580,13 @@
"jiti": "lib/jiti-cli.mjs"
}
},
"node_modules/js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
"dev": true,
"license": "MIT"
},
"node_modules/js-yaml": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
@ -5493,6 +5600,19 @@
"js-yaml": "bin/js-yaml.js"
}
},
"node_modules/jsesc": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
"integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
"dev": true,
"license": "MIT",
"bin": {
"jsesc": "bin/jsesc"
},
"engines": {
"node": ">=6"
}
},
"node_modules/json-buffer": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",

View File

@ -19,6 +19,7 @@
"@connectrpc/connect-web": "^2.0.2",
"@eslint/compat": "^1.2.9",
"@eslint/js": "^9.18.0",
"@ianvs/prettier-plugin-sort-imports": "^4.4.1",
"@lucide/svelte": "^0.479.0",
"@scalar/api-reference": "^1.28.32",
"@simplewebauthn/browser": "^13.1.0",

View File

@ -1,14 +1,11 @@
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 { DescMessage, DescService, MessageInitShape, MessageShape } from '@bufbuild/protobuf';
import type { Violation } from '@bufbuild/protovalidate';
import type { Client } from '@connectrpc/connect';
import type { Action } from 'svelte/action';
import { create } from '@bufbuild/protobuf';
import { ValidationError } from '@bufbuild/protovalidate';
import { ConnectError } from '@connectrpc/connect';
import { Validator } from '../transport';
type Options<Input extends DescMessage, Output extends DescMessage> = {
init?: MessageInitShape<Input>;
@ -30,9 +27,7 @@ export function coolForm<Service extends DescService, Method extends Service['me
) {
const input = $state(create(method.input as Method['input'], options?.init));
const output = $state(create(method.output as Method['output']));
const errors: Violations<Method['input']['field']> & {
form?: ConnectError;
} = $state({});
const errors: Violations<Method['input']['field']> & { form?: ConnectError } = $state({});
let loading = $state(false);
const validate = () => {

View File

@ -1,4 +1,4 @@
import { coolForm } from './coolforms.svelte';
import { newState } from './conststate.svelte';
import { coolForm } from './coolforms.svelte';
export { coolForm, newState };

View File

@ -1,11 +1,12 @@
import { createConnectTransport } from '@connectrpc/connect-web';
import type { Interceptor } from '@connectrpc/connect';
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';
import { ItemService } from '$lib/connect/item/v1/item_pb';
import { Code, ConnectError, createClient } from '@connectrpc/connect';
import { createConnectTransport } from '@connectrpc/connect-web';
import { goto } from '$app/navigation';
import { page } from '$app/state';
import { ItemService } from '$lib/connect/item/v1/item_pb';
import { AuthService } from '$lib/connect/user/v1/auth_pb';
import { UserService } from '$lib/connect/user/v1/user_pb';
const redirector: Interceptor = (next) => async (req) => {
try {

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Avatar as AvatarPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { Avatar as AvatarPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Avatar as AvatarPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { Avatar as AvatarPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Avatar as AvatarPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { Avatar as AvatarPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
import Root from './avatar.svelte';
import Image from './avatar-image.svelte';
import Fallback from './avatar-fallback.svelte';
import Image from './avatar-image.svelte';
import Root from './avatar.svelte';
export {
Root,

View File

@ -1,9 +1,10 @@
<script lang="ts" module>
import type { WithElementRef } from 'bits-ui';
import type { HTMLAnchorAttributes, HTMLButtonAttributes } from 'svelte/elements';
import { type VariantProps, tv } from 'tailwind-variants';
import { cn } from '$lib/utils';
import type { VariantProps } from 'tailwind-variants';
import { LoaderCircle } from '@lucide/svelte';
import { cn } from '$lib/utils';
import { tv } from 'tailwind-variants';
export const buttonVariants = tv({
base: cn(

View File

@ -1,9 +1,5 @@
import Root, {
type ButtonProps,
type ButtonSize,
type ButtonVariant,
buttonVariants
} from './button.svelte';
import type { ButtonProps, ButtonSize, ButtonVariant } from './button.svelte';
import Root, { buttonVariants } from './button.svelte';
export {
Root,

View File

@ -1,7 +1,7 @@
<script lang="ts">
import { cn } from '$lib/utils';
import type { WithElementRef } from 'bits-ui';
import type { HTMLAttributes } from 'svelte/elements';
import { cn } from '$lib/utils';
type Props = WithElementRef<HTMLAttributes<HTMLDivElement>>;

View File

@ -1,16 +1,12 @@
<script lang="ts">
import CalendarIcon from '@lucide/svelte/icons/calendar';
import type { DateValue } from '@internationalized/date';
import type { DateRange } from 'bits-ui';
import {
CalendarDate,
DateFormatter,
type DateValue,
getLocalTimeZone
} from '@internationalized/date';
import { cn } from '$lib/utils.js';
import { buttonVariants } from '$lib/ui/button';
import { RangeCalendar } from '$lib/ui/range-calendar';
import * as Popover from '$lib/ui/popover';
import { RangeCalendar } from '$lib/ui/range-calendar';
import { CalendarDate, DateFormatter, getLocalTimeZone } from '@internationalized/date';
import CalendarIcon from '@lucide/svelte/icons/calendar';
import { cn } from '$lib/utils.js';
let {
className,

View File

@ -1,9 +1,10 @@
<script lang="ts">
import { Dialog as DialogPrimitive, type WithoutChildrenOrChild } from 'bits-ui';
import X from '@lucide/svelte/icons/x';
import type { WithoutChildrenOrChild } from 'bits-ui';
import type { Snippet } from 'svelte';
import * as Dialog from './index.js';
import X from '@lucide/svelte/icons/x';
import { cn } from '$lib/utils.js';
import { Dialog as DialogPrimitive } from 'bits-ui';
import * as Dialog from './index.js';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Dialog as DialogPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { Dialog as DialogPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
<script lang="ts">
import type { HTMLAttributes } from 'svelte/elements';
import type { WithElementRef } from 'bits-ui';
import type { HTMLAttributes } from 'svelte/elements';
import { cn } from '$lib/utils.js';
let {

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Dialog as DialogPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { Dialog as DialogPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Dialog as DialogPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { Dialog as DialogPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,14 +1,13 @@
import { Dialog as DialogPrimitive } from 'bits-ui';
import Root from './dialog.svelte';
import Title from './dialog-title.svelte';
import Close from './dialog-close.svelte';
import Content from './dialog-content.svelte';
import Description from './dialog-description.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 Trigger from './dialog-trigger.svelte';
import Close from './dialog-close.svelte';
import Root from './dialog.svelte';
const Portal = DialogPrimitive.Portal;

View File

@ -1,9 +1,10 @@
<script lang="ts">
import { DropdownMenu as DropdownMenuPrimitive, type WithoutChildrenOrChild } from 'bits-ui';
import type { WithoutChildrenOrChild } from 'bits-ui';
import type { Snippet } from 'svelte';
import Check from '@lucide/svelte/icons/check';
import Minus from '@lucide/svelte/icons/minus';
import { cn } from '$lib/utils.js';
import type { Snippet } from 'svelte';
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,7 +1,7 @@
<script lang="ts">
import type { HTMLAttributes } from 'svelte/elements';
import { cn } from '$lib/utils.js';
import { type WithElementRef } from 'bits-ui';
import type { HTMLAttributes } from 'svelte/elements';
let {
ref = $bindable(null),

View File

@ -1,7 +1,8 @@
<script lang="ts">
import { DropdownMenu as DropdownMenuPrimitive, type WithoutChild } from 'bits-ui';
import type { WithoutChild } from 'bits-ui';
import Circle from '@lucide/svelte/icons/circle';
import { cn } from '$lib/utils.js';
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,7 +1,7 @@
<script lang="ts">
import type { HTMLAttributes } from 'svelte/elements';
import { type WithElementRef } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { type WithElementRef } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,7 +1,7 @@
<script lang="ts">
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
import ChevronRight from '@lucide/svelte/icons/chevron-right';
import { cn } from '$lib/utils.js';
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -3,15 +3,15 @@ import CheckboxItem from './dropdown-menu-checkbox-item.svelte';
import Content from './dropdown-menu-content.svelte';
import Group from './dropdown-menu-group.svelte';
import Item from './dropdown-menu-item.svelte';
import Link from './dropdown-menu-link.svelte';
import Label from './dropdown-menu-label.svelte';
import Link from './dropdown-menu-link.svelte';
import RadioGroup from './dropdown-menu-radio-group.svelte';
import RadioItem from './dropdown-menu-radio-item.svelte';
import Separator from './dropdown-menu-separator.svelte';
import Shortcut from './dropdown-menu-shortcut.svelte';
import Trigger from './dropdown-menu-trigger.svelte';
import SubContent from './dropdown-menu-sub-content.svelte';
import SubTrigger from './dropdown-menu-sub-trigger.svelte';
import Trigger from './dropdown-menu-trigger.svelte';
const Sub = DropdownMenuPrimitive.Sub;
const Root = DropdownMenuPrimitive.Root;

View File

@ -1,10 +1,10 @@
<script lang="ts">
import { cn } from '$lib/utils';
import { getFormContext } from './context.svelte';
import type { WithElementRef, WithoutChildren } from 'bits-ui';
import type { HTMLAttributes } from 'svelte/elements';
import type { Violation } from '@bufbuild/protovalidate';
import type { ConnectError } from '@connectrpc/connect';
import type { WithElementRef, WithoutChildren } from 'bits-ui';
import type { HTMLAttributes } from 'svelte/elements';
import { cn } from '$lib/utils';
import { getFormContext } from './context.svelte';
type Props = WithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>> & {
errors?: Violation[] | ConnectError;

View File

@ -1,8 +1,8 @@
<script lang="ts">
import { cn } from '$lib/utils';
import { setFormContext } from './context.svelte';
import type { WithElementRef } from 'bits-ui';
import type { HTMLAttributes } from 'svelte/elements';
import { cn } from '$lib/utils';
import { setFormContext } from './context.svelte';
type Props = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
name?: string;

View File

@ -1,5 +1,5 @@
import Field from './field.svelte';
import Errors from './errors.svelte';
import Field from './field.svelte';
import Label from './label.svelte';
export { Field, Errors, Label };

View File

@ -1,8 +1,8 @@
<script lang="ts">
import { cn } from '$lib/utils';
import { getFormContext } from './context.svelte';
import type { WithElementRef } from 'bits-ui';
import type { HTMLAttributes } from 'svelte/elements';
import { cn } from '$lib/utils';
import { getFormContext } from './context.svelte';
type Props = WithElementRef<HTMLAttributes<HTMLLabelElement>>;
let { ref = $bindable(null), class: className, children, ...restProps }: Props = $props();

View File

@ -1,6 +1,6 @@
<script lang="ts">
import type { HTMLInputAttributes, HTMLInputTypeAttribute } from 'svelte/elements';
import type { WithElementRef } from 'bits-ui';
import type { HTMLInputAttributes, HTMLInputTypeAttribute } from 'svelte/elements';
import { cn } from '$lib/utils.js';
import { getFormContext } from '../form/context.svelte';

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Label as LabelPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { Label as LabelPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,10 +1,10 @@
import Root from './pagination.svelte';
import Content from './pagination-content.svelte';
import Ellipsis from './pagination-ellipsis.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 PrevButton from './pagination-prev-button.svelte';
import Root from './pagination.svelte';
export {
Root,

View File

@ -1,6 +1,6 @@
<script lang="ts">
import type { HTMLAttributes } from 'svelte/elements';
import type { WithElementRef } from 'bits-ui';
import type { HTMLAttributes } from 'svelte/elements';
import { cn } from '$lib/utils.js';
let {

View File

@ -1,7 +1,7 @@
<script lang="ts">
import Ellipsis from '@lucide/svelte/icons/ellipsis';
import type { WithElementRef, WithoutChildren } from 'bits-ui';
import type { HTMLAttributes } from 'svelte/elements';
import Ellipsis from '@lucide/svelte/icons/ellipsis';
import { cn } from '$lib/utils.js';
let {

View File

@ -1,6 +1,6 @@
<script lang="ts">
import type { HTMLLiAttributes } from 'svelte/elements';
import type { WithElementRef } from 'bits-ui';
import type { HTMLLiAttributes } from 'svelte/elements';
let {
ref = $bindable(null),

View File

@ -1,7 +1,8 @@
<script lang="ts">
import { Pagination as PaginationPrimitive } from 'bits-ui';
import type { Props } from '$lib/ui/button';
import { buttonVariants } from '$lib/ui/button';
import { cn } from '$lib/utils.js';
import { type Props, buttonVariants } from '$lib/ui/button';
import { Pagination as PaginationPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,8 +1,8 @@
<script lang="ts">
import { Pagination as PaginationPrimitive } from 'bits-ui';
import ChevronRight from '@lucide/svelte/icons/chevron-right';
import { buttonVariants } from '$lib/ui/button/index.js';
import ChevronRight from '@lucide/svelte/icons/chevron-right';
import { cn } from '$lib/utils.js';
import { Pagination as PaginationPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,8 +1,8 @@
<script lang="ts">
import { Pagination as PaginationPrimitive } from 'bits-ui';
import ChevronLeft from '@lucide/svelte/icons/chevron-left';
import { buttonVariants } from '$lib/ui/button/index.js';
import ChevronLeft from '@lucide/svelte/icons/chevron-left';
import { cn } from '$lib/utils.js';
import { Pagination as PaginationPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,8 +1,7 @@
<script lang="ts">
import { Pagination as PaginationPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { pushState } from '$app/navigation';
import { cn } from '$lib/utils.js';
import { Pagination as PaginationPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,6 +1,7 @@
import { Popover as PopoverPrimitive } from 'bits-ui';
import Content from './popover-content.svelte';
import Trigger from './popover-trigger.svelte';
const Root = PopoverPrimitive.Root;
const Close = PopoverPrimitive.Close;

View File

@ -1,15 +1,15 @@
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
import Root from './range-calendar.svelte';
import Cell from './range-calendar-cell.svelte';
import Day from './range-calendar-day.svelte';
import Grid from './range-calendar-grid.svelte';
import Header from './range-calendar-header.svelte';
import Months from './range-calendar-months.svelte';
import GridRow from './range-calendar-grid-row.svelte';
import Heading from './range-calendar-heading.svelte';
import Grid from './range-calendar-grid.svelte';
import HeadCell from './range-calendar-head-cell.svelte';
import Header from './range-calendar-header.svelte';
import Heading from './range-calendar-heading.svelte';
import Months from './range-calendar-months.svelte';
import NextButton from './range-calendar-next-button.svelte';
import PrevButton from './range-calendar-prev-button.svelte';
import Root from './range-calendar.svelte';
const GridHead = RangeCalendarPrimitive.GridHead;
const GridBody = RangeCalendarPrimitive.GridBody;

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,7 +1,7 @@
<script lang="ts">
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
import { buttonVariants } from '$lib/ui/button/index.js';
import { cn } from '$lib/utils.js';
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,8 +1,8 @@
<script lang="ts">
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
import ChevronRight from '@lucide/svelte/icons/chevron-right';
import { buttonVariants } from '$lib/ui/button/index.js';
import ChevronRight from '@lucide/svelte/icons/chevron-right';
import { cn } from '$lib/utils.js';
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,8 +1,8 @@
<script lang="ts">
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
import ChevronLeft from '@lucide/svelte/icons/chevron-left';
import { buttonVariants } from '$lib/ui/button/index.js';
import ChevronLeft from '@lucide/svelte/icons/chevron-left';
import { cn } from '$lib/utils.js';
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,7 +1,8 @@
<script lang="ts">
import { RangeCalendar as RangeCalendarPrimitive, type WithoutChildrenOrChild } from 'bits-ui';
import * as RangeCalendar from './index.js';
import type { WithoutChildrenOrChild } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { RangeCalendar as RangeCalendarPrimitive } from 'bits-ui';
import * as RangeCalendar from './index.js';
let {
ref = $bindable(null),

View File

@ -1,11 +1,10 @@
import { Select as SelectPrimitive } from 'bits-ui';
import Group from './select-group.svelte';
import Label from './select-label.svelte';
import Item from './select-item.svelte';
import Content from './select-content.svelte';
import Trigger from './select-trigger.svelte';
import Group from './select-group.svelte';
import Item from './select-item.svelte';
import Label from './select-label.svelte';
import Separator from './select-separator.svelte';
import Trigger from './select-trigger.svelte';
const Root = SelectPrimitive.Root;

View File

@ -1,6 +1,7 @@
<script lang="ts">
import { Select as SelectPrimitive, type WithoutChild } from 'bits-ui';
import type { WithoutChild } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { Select as SelectPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,7 +1,8 @@
<script lang="ts">
import type { WithoutChild } from 'bits-ui';
import Check from '@lucide/svelte/icons/check';
import { Select as SelectPrimitive, type WithoutChild } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { Select as SelectPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,7 +1,7 @@
<script lang="ts">
import type { HTMLAttributes } from 'svelte/elements';
import { cn } from '$lib/utils.js';
import { type WithElementRef } from 'bits-ui';
import type { HTMLAttributes } from 'svelte/elements';
let {
ref = $bindable(null),

View File

@ -1,7 +1,8 @@
<script lang="ts">
import { Select as SelectPrimitive, type WithoutChild } from 'bits-ui';
import type { WithoutChild } from 'bits-ui';
import ChevronDown from '@lucide/svelte/icons/chevron-down';
import { cn } from '$lib/utils.js';
import { Select as SelectPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Separator as SeparatorPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { Separator as SeparatorPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,13 +1,13 @@
import { Dialog as SheetPrimitive } from 'bits-ui';
import Root from './sheet.svelte';
import Trigger from './sheet-trigger.svelte';
import Close from './sheet-close.svelte';
import Overlay from './sheet-overlay.svelte';
import Content from './sheet-content.svelte';
import Header from './sheet-header.svelte';
import Footer from './sheet-footer.svelte';
import Title from './sheet-title.svelte';
import Description from './sheet-description.svelte';
import Footer from './sheet-footer.svelte';
import Header from './sheet-header.svelte';
import Overlay from './sheet-overlay.svelte';
import Title from './sheet-title.svelte';
import Trigger from './sheet-trigger.svelte';
import Root from './sheet.svelte';
const Portal = SheetPrimitive.Portal;

View File

@ -1,5 +1,7 @@
<script lang="ts" module>
import { tv, type VariantProps } from 'tailwind-variants';
import type { VariantProps } from 'tailwind-variants';
import { tv } from 'tailwind-variants';
export const sheetVariants = tv({
base: 'bg-mantle border-surface data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 gap-4 p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500',
variants: {
@ -21,11 +23,12 @@
</script>
<script lang="ts">
import { Dialog as SheetPrimitive, type WithoutChildrenOrChild } from 'bits-ui';
import X from '@lucide/svelte/icons/x';
import type { WithoutChildrenOrChild } from 'bits-ui';
import type { Snippet } from 'svelte';
import SheetOverlay from './sheet-overlay.svelte';
import X from '@lucide/svelte/icons/x';
import { cn } from '$lib/utils.js';
import { Dialog as SheetPrimitive } from 'bits-ui';
import SheetOverlay from './sheet-overlay.svelte';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Dialog as SheetPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { Dialog as SheetPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
<script lang="ts">
import type { HTMLAttributes } from 'svelte/elements';
import type { WithElementRef } from 'bits-ui';
import type { HTMLAttributes } from 'svelte/elements';
import { cn } from '$lib/utils.js';
let {

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Dialog as SheetPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { Dialog as SheetPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Dialog as SheetPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { Dialog as SheetPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,5 +1,6 @@
<script lang="ts">
import { Toaster as Sonner, type ToasterProps as SonnerProps } from 'svelte-sonner';
import type { ToasterProps as SonnerProps } from 'svelte-sonner';
import { Toaster as Sonner } from 'svelte-sonner';
let { ...restProps }: SonnerProps = $props();
</script>

View File

@ -1,4 +1,3 @@
import Root from './table.svelte';
import Body from './table-body.svelte';
import Caption from './table-caption.svelte';
import Cell from './table-cell.svelte';
@ -6,6 +5,7 @@ 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';
export {
Root,

View File

@ -1,6 +1,6 @@
<script lang="ts">
import type { HTMLAttributes } from 'svelte/elements';
import type { WithElementRef } from 'bits-ui';
import type { HTMLAttributes } from 'svelte/elements';
import { cn } from '$lib/utils.js';
let {

View File

@ -1,6 +1,6 @@
<script lang="ts">
import type { HTMLAttributes } from 'svelte/elements';
import type { WithElementRef } from 'bits-ui';
import type { HTMLAttributes } from 'svelte/elements';
import { cn } from '$lib/utils.js';
let {

View File

@ -1,6 +1,6 @@
<script lang="ts">
import type { HTMLTdAttributes } from 'svelte/elements';
import type { WithElementRef } from 'bits-ui';
import type { HTMLTdAttributes } from 'svelte/elements';
import { cn } from '$lib/utils.js';
let {

View File

@ -1,6 +1,6 @@
<script lang="ts">
import type { HTMLAttributes } from 'svelte/elements';
import type { WithElementRef } from 'bits-ui';
import type { HTMLAttributes } from 'svelte/elements';
import { cn } from '$lib/utils.js';
let {

View File

@ -1,6 +1,6 @@
<script lang="ts">
import type { HTMLThAttributes } from 'svelte/elements';
import type { WithElementRef } from 'bits-ui';
import type { HTMLThAttributes } from 'svelte/elements';
import { cn } from '$lib/utils.js';
let {

View File

@ -1,6 +1,6 @@
<script lang="ts">
import type { HTMLAttributes } from 'svelte/elements';
import type { WithElementRef } from 'bits-ui';
import type { HTMLAttributes } from 'svelte/elements';
import { cn } from '$lib/utils.js';
let {

View File

@ -1,6 +1,6 @@
<script lang="ts">
import type { HTMLAttributes } from 'svelte/elements';
import type { WithElementRef } from 'bits-ui';
import type { HTMLAttributes } from 'svelte/elements';
import { cn } from '$lib/utils.js';
let {

View File

@ -1,6 +1,6 @@
<script lang="ts">
import type { HTMLTableAttributes } from 'svelte/elements';
import type { WithElementRef } from 'bits-ui';
import type { HTMLTableAttributes } from 'svelte/elements';
import { cn } from '$lib/utils.js';
let {

View File

@ -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';
export {
Root,

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Tabs as TabsPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { Tabs as TabsPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Tabs as TabsPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { Tabs as TabsPrimitive } from 'bits-ui';
let { ref = $bindable(null), class: className, ...restProps }: TabsPrimitive.ListProps = $props();
</script>

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Tabs as TabsPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { Tabs as TabsPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Tabs as TabsPrimitive } from 'bits-ui';
import { cn } from '$lib/utils.js';
import { Tabs as TabsPrimitive } from 'bits-ui';
let {
ref = $bindable(null),

View File

@ -1,4 +1,5 @@
import { type ClassValue, clsx } from 'clsx';
import type { ClassValue } from 'clsx';
import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
export function cn(...inputs: ClassValue[]) {

View File

@ -1,27 +1,27 @@
<script lang="ts">
import pkg from '../../../package.json' with { type: 'json' };
import * as Sheet from '$lib/ui/sheet';
import * as DropdownMenu from '$lib/ui/dropdown-menu';
import * as Avatar from '$lib/ui/avatar';
import {
LayoutGrid,
LogOut,
Menu,
LayoutList,
Book,
House,
Sun,
Moon,
Settings
} from '@lucide/svelte';
import { Button } from '$lib/ui/button';
import { toggleMode } from 'mode-watcher';
import { toast } from 'svelte-sonner';
import { goto } from '$app/navigation';
import { AuthClient, UserClient } from '$lib/transport';
import { userState } from '$lib/sharedState.svelte';
import type { Snippet } from 'svelte';
import type { PageData } from './$types';
import * as Avatar from '$lib/ui/avatar';
import { Button } from '$lib/ui/button';
import * as DropdownMenu from '$lib/ui/dropdown-menu';
import * as Sheet from '$lib/ui/sheet';
import {
Book,
House,
LayoutGrid,
LayoutList,
LogOut,
Menu,
Moon,
Settings,
Sun
} from '@lucide/svelte';
import { goto } from '$app/navigation';
import { userState } from '$lib/sharedState.svelte';
import { AuthClient, UserClient } from '$lib/transport';
import { toggleMode } from 'mode-watcher';
import { toast } from 'svelte-sonner';
import pkg from '../../../package.json' with { type: 'json' };
interface Props {
data: PageData | undefined;

View File

@ -1,19 +1,20 @@
<script lang="ts">
import * as Select from '$lib/ui/select';
import type { Item } from '$lib/connect/item/v1/item_pb';
import { Button } from '$lib/ui/button';
import { Card } from '$lib/ui/card';
import { DateRangePicker } from '$lib/ui/daterangepicker';
import * as Dialog from '$lib/ui/dialog';
import * as Form from '$lib/ui/form';
import * as Table from '$lib/ui/table';
import { ItemClient } from '$lib/transport';
import { Skeleton } from '$lib/ui/skeleton';
import { Plus, Trash, Pencil, LoaderCircle } from '@lucide/svelte';
import { Button } from '$lib/ui/button';
import { timestampFromDate, timestampDate } from '@bufbuild/protobuf/wkt';
import { Input } from '$lib/ui/input';
import { ItemService, type Item } from '$lib/connect/item/v1/item_pb';
import { DateRangePicker } from '$lib/ui/daterangepicker';
import { coolForm, newState } from '$lib/coolforms';
import { Card } from '$lib/ui/card';
import { Pager } from '$lib/ui/pager';
import * as Select from '$lib/ui/select';
import { Skeleton } from '$lib/ui/skeleton';
import * as Table from '$lib/ui/table';
import { timestampDate, timestampFromDate } from '@bufbuild/protobuf/wkt';
import { LoaderCircle, Pencil, Plus, Trash } from '@lucide/svelte';
import { ItemService } from '$lib/connect/item/v1/item_pb';
import { coolForm, newState } from '$lib/coolforms';
import { ItemClient } from '$lib/transport';
import { cn } from '$lib/utils';
const get = coolForm(ItemClient, ItemService.method.getItems, {

View File

@ -1,18 +1,18 @@
<script lang="ts">
import * as Avatar from '$lib/ui/avatar';
import { Button } from '$lib/ui/button';
import { Card } from '$lib/ui/card';
import * as Dialog from '$lib/ui/dialog';
import * as Form from '$lib/ui/form';
import { UserClient } from '$lib/transport';
import { Button } from '$lib/ui/button';
import { Input } from '$lib/ui/input';
import { toast } from 'svelte-sonner';
import { userState } from '$lib/sharedState.svelte';
import { coolForm, newState } from '$lib/coolforms';
import { UserService } from '$lib/connect/user/v1/user_pb';
import { Card } from '$lib/ui/card';
import { Separator } from '$lib/ui/separator';
import { startRegistration } from '@simplewebauthn/browser';
import { ConnectError } from '@connectrpc/connect';
import { startRegistration } from '@simplewebauthn/browser';
import { UserService } from '$lib/connect/user/v1/user_pb';
import { coolForm, newState } from '$lib/coolforms';
import { userState } from '$lib/sharedState.svelte';
import { UserClient } from '$lib/transport';
import { toast } from 'svelte-sonner';
const updatePassword = coolForm(UserClient, UserService.method.updatePassword, {
reset: true,

View File

@ -1,18 +1,18 @@
<script lang="ts">
import * as Tabs from '$lib/ui/tabs';
import { Button } from '$lib/ui/button';
import { Card } from '$lib/ui/card';
import * as Form from '$lib/ui/form';
import { Input } from '$lib/ui/input';
import { Button } from '$lib/ui/button';
import { AuthClient } from '$lib/transport';
import { toast } from 'svelte-sonner';
import { AuthService } from '$lib/connect/user/v1/auth_pb';
import { coolForm } from '$lib/coolforms';
import { Card } from '$lib/ui/card';
import { goto } from '$app/navigation';
import { page } from '$app/state';
import { startAuthentication } from '@simplewebauthn/browser';
import * as Tabs from '$lib/ui/tabs';
import { ConnectError } from '@connectrpc/connect';
import { Fingerprint } from '@lucide/svelte';
import { startAuthentication } from '@simplewebauthn/browser';
import { goto } from '$app/navigation';
import { page } from '$app/state';
import { AuthService } from '$lib/connect/user/v1/auth_pb';
import { coolForm } from '$lib/coolforms';
import { AuthClient } from '$lib/transport';
import { toast } from 'svelte-sonner';
let tabValue = $state('login');

View File

@ -1,6 +1,6 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import tailwindcss from '@tailwindcss/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [tailwindcss(), sveltekit()],