From a6576a92ed1a5e06eed6e0cfb45f9b4852af8932 Mon Sep 17 00:00:00 2001 From: d3rpp Date: Fri, 2 Aug 2024 10:03:34 +1200 Subject: [PATCH] changed prettier configuration --- .prettierrc.js | 39 +++---- components.json | 24 ++--- drizzle/meta/_journal.json | 6 +- eslint.config.js | 60 +++++------ package.json | 100 +++++++++--------- postcss.config.js | 8 +- src/app.css | 98 +++++++++--------- src/app.d.ts | 14 +-- src/app.html | 18 ++-- src/lib/components/ui/button/button.svelte | 34 +++--- src/lib/components/ui/button/index.ts | 66 ++++++------ src/lib/utils.ts | 96 ++++++++--------- src/routes/+layout.svelte | 2 +- src/routes/+page.svelte | 6 +- src/test/index.test.ts | 6 +- svelte.config.js | 26 ++--- tailwind.config.js | 114 ++++++++++----------- tsconfig.json | 36 +++---- vite.config.ts | 2 +- 19 files changed, 378 insertions(+), 377 deletions(-) diff --git a/.prettierrc.js b/.prettierrc.js index 879666a..2c0364e 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,31 +1,32 @@ /** @type {import("prettier").Config} */ export default { - /** + /** Global Config */ - plugins: [ - "prettier-plugin-svelte", + plugins: [ + "prettier-plugin-svelte", - // must come last - "prettier-plugin-tailwindcss", - ], - overrides: [ - { - files: "*.svelte", - options: { - parser: "svelte", - }, - }, - ], + // must come last + "prettier-plugin-tailwindcss", + ], + useTabs: true, + overrides: [ + { + files: "*.svelte", + options: { + parser: "svelte", + }, + }, + ], - /** + /** Default Config */ - htmlWhitespaceSensitivity: "ignore", - bracketSameLine: false, + htmlWhitespaceSensitivity: "ignore", + bracketSameLine: false, - /** + /** Svelte Config */ - // nothing here yet + // nothing here yet }; diff --git a/components.json b/components.json index b08f7c3..905ce0e 100644 --- a/components.json +++ b/components.json @@ -1,14 +1,14 @@ { - "$schema": "https://shadcn-svelte.com/schema.json", - "style": "default", - "tailwind": { - "config": "tailwind.config.js", - "css": "src/app.css", - "baseColor": "slate" - }, - "aliases": { - "components": "$lib/components", - "utils": "$lib/utils" - }, - "typescript": true + "$schema": "https://shadcn-svelte.com/schema.json", + "style": "default", + "tailwind": { + "config": "tailwind.config.js", + "css": "src/app.css", + "baseColor": "slate" + }, + "aliases": { + "components": "$lib/components", + "utils": "$lib/utils" + }, + "typescript": true } diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index 4377507..64ed1b0 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -1,5 +1,5 @@ { - "version": "7", - "dialect": "sqlite", - "entries": [] + "version": "7", + "dialect": "sqlite", + "entries": [] } diff --git a/eslint.config.js b/eslint.config.js index 972b0ba..5c6a84f 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -5,34 +5,34 @@ import globals from "globals"; /** @type {import('eslint').Linter.Config[]} */ export default [ - js.configs.recommended, - ...ts.configs.recommended, - ...svelte.configs["flat/recommended"], - { - languageOptions: { - globals: { - ...globals.browser, - ...globals.node, - }, - }, - }, - { - files: ["**/*.svelte"], - languageOptions: { - parserOptions: { - parser: ts.parser, - }, - }, - }, - { - ignores: ["build/", ".svelte-kit/", "dist/"], - }, - // the generated components have the `$$Events` prop that always goes unused, - // but we wanna keep them, so I'm putting this here to ignore them - { - files: ["src/lib/components/**/*.svelte"], - rules: { - "@typescript-eslint/no-unused-vars": ["off"], - }, - }, + js.configs.recommended, + ...ts.configs.recommended, + ...svelte.configs["flat/recommended"], + { + languageOptions: { + globals: { + ...globals.browser, + ...globals.node, + }, + }, + }, + { + files: ["**/*.svelte"], + languageOptions: { + parserOptions: { + parser: ts.parser, + }, + }, + }, + { + ignores: ["build/", ".svelte-kit/", "dist/"], + }, + // the generated components have the `$$Events` prop that always goes unused, + // but we wanna keep them, so I'm putting this here to ignore them + { + files: ["src/lib/components/**/*.svelte"], + rules: { + "@typescript-eslint/no-unused-vars": ["off"], + }, + }, ]; diff --git a/package.json b/package.json index ff78610..9a55064 100644 --- a/package.json +++ b/package.json @@ -1,52 +1,52 @@ { - "name": "bse-205-elective-project", - "version": "0.0.1", - "private": true, - "scripts": { - "dev": "vite dev", - "build": "vite build", - "preview": "vite preview", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "lint": "eslint .", - "fmt": "prettier --write .", - "fmt:check": "prettier --check .", - "generate": "drizzle-kit generate --dialect sqlite --schema ./src/contrib/schema.ts", - "migrate": "bun ./src/contrib/migrate.ts" - }, - "devDependencies": { - "@sveltejs/kit": "^2.0.0", - "@sveltejs/vite-plugin-svelte": "^3.0.0", - "@types/eslint": "^9.6.0", - "autoprefixer": "^10.4.19", - "bun-types": "^1.1.21", - "drizzle-kit": "^0.23.0", - "eslint": "^9.0.0", - "eslint-plugin-svelte": "^2.36.0", - "globals": "^15.0.0", - "postcss": "^8.4.40", - "prettier": "^3.3.3", - "prettier-plugin-svelte": "3", - "prettier-plugin-tailwindcss": "^0.6.5", - "svelte": "^4.2.7", - "svelte-adapter-bun": "^0.5.2", - "svelte-check": "^3.6.0", - "tailwindcss": "^3.4.7", - "typescript": "^5.0.0", - "typescript-eslint": "^8.0.0-alpha.20", - "vite": "^5.0.3" - }, - "type": "module", - "trustedDependencies": [ - "@sveltejs/kit", - "esbuild", - "svelte-preprocess" - ], - "dependencies": { - "bits-ui": "^0.21.13", - "clsx": "^2.1.1", - "drizzle-orm": "^0.32.1", - "tailwind-merge": "^2.4.0", - "tailwind-variants": "^0.2.1" - } + "name": "bse-205-elective-project", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "lint": "eslint .", + "fmt": "prettier --write .", + "fmt:check": "prettier --check .", + "generate": "drizzle-kit generate --dialect sqlite --schema ./src/contrib/schema.ts", + "migrate": "bun ./src/contrib/migrate.ts" + }, + "devDependencies": { + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@types/eslint": "^9.6.0", + "autoprefixer": "^10.4.19", + "bun-types": "^1.1.21", + "drizzle-kit": "^0.23.0", + "eslint": "^9.0.0", + "eslint-plugin-svelte": "^2.36.0", + "globals": "^15.0.0", + "postcss": "^8.4.40", + "prettier": "^3.3.3", + "prettier-plugin-svelte": "3", + "prettier-plugin-tailwindcss": "^0.6.5", + "svelte": "^4.2.7", + "svelte-adapter-bun": "^0.5.2", + "svelte-check": "^3.6.0", + "tailwindcss": "^3.4.7", + "typescript": "^5.0.0", + "typescript-eslint": "^8.0.0-alpha.20", + "vite": "^5.0.3" + }, + "type": "module", + "trustedDependencies": [ + "@sveltejs/kit", + "esbuild", + "svelte-preprocess" + ], + "dependencies": { + "bits-ui": "^0.21.13", + "clsx": "^2.1.1", + "drizzle-orm": "^0.32.1", + "tailwind-merge": "^2.4.0", + "tailwind-variants": "^0.2.1" + } } diff --git a/postcss.config.js b/postcss.config.js index 2aa7205..7b75c83 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,6 +1,6 @@ export default { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, }; diff --git a/src/app.css b/src/app.css index d5d1389..83f2661 100644 --- a/src/app.css +++ b/src/app.css @@ -3,76 +3,76 @@ @tailwind utilities; @layer base { - :root { - --background: 0 0% 100%; - --foreground: 222.2 84% 4.9%; + :root { + --background: 0 0% 100%; + --foreground: 222.2 84% 4.9%; - --muted: 210 40% 96.1%; - --muted-foreground: 215.4 16.3% 46.9%; + --muted: 210 40% 96.1%; + --muted-foreground: 215.4 16.3% 46.9%; - --popover: 0 0% 100%; - --popover-foreground: 222.2 84% 4.9%; + --popover: 0 0% 100%; + --popover-foreground: 222.2 84% 4.9%; - --card: 0 0% 100%; - --card-foreground: 222.2 84% 4.9%; + --card: 0 0% 100%; + --card-foreground: 222.2 84% 4.9%; - --border: 214.3 31.8% 91.4%; - --input: 214.3 31.8% 91.4%; + --border: 214.3 31.8% 91.4%; + --input: 214.3 31.8% 91.4%; - --primary: 222.2 47.4% 11.2%; - --primary-foreground: 210 40% 98%; + --primary: 222.2 47.4% 11.2%; + --primary-foreground: 210 40% 98%; - --secondary: 210 40% 96.1%; - --secondary-foreground: 222.2 47.4% 11.2%; + --secondary: 210 40% 96.1%; + --secondary-foreground: 222.2 47.4% 11.2%; - --accent: 210 40% 96.1%; - --accent-foreground: 222.2 47.4% 11.2%; + --accent: 210 40% 96.1%; + --accent-foreground: 222.2 47.4% 11.2%; - --destructive: 0 72.2% 50.6%; - --destructive-foreground: 210 40% 98%; + --destructive: 0 72.2% 50.6%; + --destructive-foreground: 210 40% 98%; - --ring: 222.2 84% 4.9%; + --ring: 222.2 84% 4.9%; - --radius: 0.5rem; - } + --radius: 0.5rem; + } - .dark { - --background: 222.2 84% 4.9%; - --foreground: 210 40% 98%; + .dark { + --background: 222.2 84% 4.9%; + --foreground: 210 40% 98%; - --muted: 217.2 32.6% 17.5%; - --muted-foreground: 215 20.2% 65.1%; + --muted: 217.2 32.6% 17.5%; + --muted-foreground: 215 20.2% 65.1%; - --popover: 222.2 84% 4.9%; - --popover-foreground: 210 40% 98%; + --popover: 222.2 84% 4.9%; + --popover-foreground: 210 40% 98%; - --card: 222.2 84% 4.9%; - --card-foreground: 210 40% 98%; + --card: 222.2 84% 4.9%; + --card-foreground: 210 40% 98%; - --border: 217.2 32.6% 17.5%; - --input: 217.2 32.6% 17.5%; + --border: 217.2 32.6% 17.5%; + --input: 217.2 32.6% 17.5%; - --primary: 210 40% 98%; - --primary-foreground: 222.2 47.4% 11.2%; + --primary: 210 40% 98%; + --primary-foreground: 222.2 47.4% 11.2%; - --secondary: 217.2 32.6% 17.5%; - --secondary-foreground: 210 40% 98%; + --secondary: 217.2 32.6% 17.5%; + --secondary-foreground: 210 40% 98%; - --accent: 217.2 32.6% 17.5%; - --accent-foreground: 210 40% 98%; + --accent: 217.2 32.6% 17.5%; + --accent-foreground: 210 40% 98%; - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 210 40% 98%; + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 210 40% 98%; - --ring: hsl(212.7, 26.8%, 83.9); - } + --ring: hsl(212.7, 26.8%, 83.9); + } } @layer base { - * { - @apply border-border; - } - body { - @apply bg-background text-foreground; - } + * { + @apply border-border; + } + body { + @apply bg-background text-foreground; + } } diff --git a/src/app.d.ts b/src/app.d.ts index ede601a..743f07b 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -1,13 +1,13 @@ // See https://kit.svelte.dev/docs/types#app // for information about these interfaces declare global { - namespace App { - // interface Error {} - // interface Locals {} - // interface PageData {} - // interface PageState {} - // interface Platform {} - } + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface PageState {} + // interface Platform {} + } } export {}; diff --git a/src/app.html b/src/app.html index e272930..f73bdf6 100644 --- a/src/app.html +++ b/src/app.html @@ -1,12 +1,12 @@ - - - - - %sveltekit.head% - - -
%sveltekit.body%
- + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ diff --git a/src/lib/components/ui/button/button.svelte b/src/lib/components/ui/button/button.svelte index 0d4bcfb..86827f3 100644 --- a/src/lib/components/ui/button/button.svelte +++ b/src/lib/components/ui/button/button.svelte @@ -1,25 +1,25 @@ - + diff --git a/src/lib/components/ui/button/index.ts b/src/lib/components/ui/button/index.ts index f52a9cc..4dd41ed 100644 --- a/src/lib/components/ui/button/index.ts +++ b/src/lib/components/ui/button/index.ts @@ -3,48 +3,48 @@ import type { Button as ButtonPrimitive } from "bits-ui"; import Root from "./button.svelte"; const buttonVariants = tv({ - base: "ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", - variants: { - variant: { - default: "bg-primary text-primary-foreground hover:bg-primary/90", - destructive: - "bg-destructive text-destructive-foreground hover:bg-destructive/90", - outline: - "border-input bg-background hover:bg-accent hover:text-accent-foreground border", - secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80", - ghost: "hover:bg-accent hover:text-accent-foreground", - link: "text-primary underline-offset-4 hover:underline", - }, - size: { - default: "h-10 px-4 py-2", - sm: "h-9 rounded-md px-3", - lg: "h-11 rounded-md px-8", - icon: "h-10 w-10", - }, - }, - defaultVariants: { - variant: "default", - size: "default", - }, + base: "ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", + variants: { + variant: { + default: "bg-primary text-primary-foreground hover:bg-primary/90", + destructive: + "bg-destructive text-destructive-foreground hover:bg-destructive/90", + outline: + "border-input bg-background hover:bg-accent hover:text-accent-foreground border", + secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80", + ghost: "hover:bg-accent hover:text-accent-foreground", + link: "text-primary underline-offset-4 hover:underline", + }, + size: { + default: "h-10 px-4 py-2", + sm: "h-9 rounded-md px-3", + lg: "h-11 rounded-md px-8", + icon: "h-10 w-10", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, }); type Variant = VariantProps["variant"]; type Size = VariantProps["size"]; type Props = ButtonPrimitive.Props & { - variant?: Variant; - size?: Size; + variant?: Variant; + size?: Size; }; type Events = ButtonPrimitive.Events; export { - Root, - type Props, - type Events, - // - Root as Button, - type Props as ButtonProps, - type Events as ButtonEvents, - buttonVariants, + Root, + type Props, + type Events, + // + Root as Button, + type Props as ButtonProps, + type Events as ButtonEvents, + buttonVariants, }; diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 5e50069..af04128 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -4,59 +4,59 @@ import { cubicOut } from "svelte/easing"; import type { TransitionConfig } from "svelte/transition"; export function cn(...inputs: ClassValue[]) { - return twMerge(clsx(inputs)); + return twMerge(clsx(inputs)); } type FlyAndScaleParams = { - y?: number; - x?: number; - start?: number; - duration?: number; + y?: number; + x?: number; + start?: number; + duration?: number; }; export const flyAndScale = ( - node: Element, - params: FlyAndScaleParams = { y: -8, x: 0, start: 0.95, duration: 150 }, + node: Element, + params: FlyAndScaleParams = { y: -8, x: 0, start: 0.95, duration: 150 }, ): TransitionConfig => { - const style = getComputedStyle(node); - const transform = style.transform === "none" ? "" : style.transform; - - const scaleConversion = ( - valueA: number, - scaleA: [number, number], - scaleB: [number, number], - ) => { - const [minA, maxA] = scaleA; - const [minB, maxB] = scaleB; - - const percentage = (valueA - minA) / (maxA - minA); - const valueB = percentage * (maxB - minB) + minB; - - return valueB; - }; - - const styleToString = ( - style: Record, - ): string => { - return Object.keys(style).reduce((str, key) => { - if (style[key] === undefined) return str; - return str + `${key}:${style[key]};`; - }, ""); - }; - - return { - duration: params.duration ?? 200, - delay: 0, - css: (t) => { - const y = scaleConversion(t, [0, 1], [params.y ?? 5, 0]); - const x = scaleConversion(t, [0, 1], [params.x ?? 0, 0]); - const scale = scaleConversion(t, [0, 1], [params.start ?? 0.95, 1]); - - return styleToString({ - transform: `${transform} translate3d(${x}px, ${y}px, 0) scale(${scale})`, - opacity: t, - }); - }, - easing: cubicOut, - }; + const style = getComputedStyle(node); + const transform = style.transform === "none" ? "" : style.transform; + + const scaleConversion = ( + valueA: number, + scaleA: [number, number], + scaleB: [number, number], + ) => { + const [minA, maxA] = scaleA; + const [minB, maxB] = scaleB; + + const percentage = (valueA - minA) / (maxA - minA); + const valueB = percentage * (maxB - minB) + minB; + + return valueB; + }; + + const styleToString = ( + style: Record, + ): string => { + return Object.keys(style).reduce((str, key) => { + if (style[key] === undefined) return str; + return str + `${key}:${style[key]};`; + }, ""); + }; + + return { + duration: params.duration ?? 200, + delay: 0, + css: (t) => { + const y = scaleConversion(t, [0, 1], [params.y ?? 5, 0]); + const x = scaleConversion(t, [0, 1], [params.x ?? 0, 0]); + const scale = scaleConversion(t, [0, 1], [params.start ?? 0.95, 1]); + + return styleToString({ + transform: `${transform} translate3d(${x}px, ${y}px, 0) scale(${scale})`, + opacity: t, + }); + }, + easing: cubicOut, + }; }; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 331a303..74b06de 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,5 +1,5 @@ diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 06b3f6f..901b4cb 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,12 +1,12 @@

Welcome to SvelteKit

- Visit kit.svelte.dev - to read the documentation + Visit kit.svelte.dev + to read the documentation

diff --git a/src/test/index.test.ts b/src/test/index.test.ts index 3c74f7d..56c8290 100644 --- a/src/test/index.test.ts +++ b/src/test/index.test.ts @@ -1,7 +1,7 @@ import { expect, test, describe } from "bun:test"; describe("Ensure Bun is Functioning", () => { - test("Basic addition", () => { - expect(1 + 1).toEqual(2); - }) + test("Basic addition", () => { + expect(1 + 1).toEqual(2); + }); }); diff --git a/svelte.config.js b/svelte.config.js index 09aa647..cd9968a 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -3,20 +3,20 @@ import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; /** @type {import('@sveltejs/kit').Config} */ const config = { - // Consult https://kit.svelte.dev/docs/integrations#preprocessors - // for more information about preprocessors - preprocess: vitePreprocess(), + // Consult https://kit.svelte.dev/docs/integrations#preprocessors + // for more information about preprocessors + preprocess: vitePreprocess(), - kit: { - // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. - // If your environment is not supported, or you settled on a specific environment, switch out the adapter. - // See https://kit.svelte.dev/docs/adapters for more information about adapters. - adapter: adapter(), - // aliases, used primarily for properly setting up ther shadcn components - alias: { - "@/": "./src/lib/*", - }, - }, + kit: { + // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. + // If your environment is not supported, or you settled on a specific environment, switch out the adapter. + // See https://kit.svelte.dev/docs/adapters for more information about adapters. + adapter: adapter(), + // aliases, used primarily for properly setting up ther shadcn components + alias: { + "@/": "./src/lib/*", + }, + }, }; export default config; diff --git a/tailwind.config.js b/tailwind.config.js index 9726c2c..3b231cc 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -2,63 +2,63 @@ import { fontFamily } from "tailwindcss/defaultTheme"; /** @type {import('tailwindcss').Config} */ const config = { - darkMode: ["class"], - content: ["./src/**/*.{html,js,svelte,ts}"], - safelist: ["dark"], - theme: { - container: { - center: true, - padding: "2rem", - screens: { - "2xl": "1400px", - }, - }, - extend: { - colors: { - border: "hsl(var(--border) / )", - input: "hsl(var(--input) / )", - ring: "hsl(var(--ring) / )", - background: "hsl(var(--background) / )", - foreground: "hsl(var(--foreground) / )", - primary: { - DEFAULT: "hsl(var(--primary) / )", - foreground: "hsl(var(--primary-foreground) / )", - }, - secondary: { - DEFAULT: "hsl(var(--secondary) / )", - foreground: "hsl(var(--secondary-foreground) / )", - }, - destructive: { - DEFAULT: "hsl(var(--destructive) / )", - foreground: "hsl(var(--destructive-foreground) / )", - }, - muted: { - DEFAULT: "hsl(var(--muted) / )", - foreground: "hsl(var(--muted-foreground) / )", - }, - accent: { - DEFAULT: "hsl(var(--accent) / )", - foreground: "hsl(var(--accent-foreground) / )", - }, - popover: { - DEFAULT: "hsl(var(--popover) / )", - foreground: "hsl(var(--popover-foreground) / )", - }, - card: { - DEFAULT: "hsl(var(--card) / )", - foreground: "hsl(var(--card-foreground) / )", - }, - }, - borderRadius: { - lg: "var(--radius)", - md: "calc(var(--radius) - 2px)", - sm: "calc(var(--radius) - 4px)", - }, - fontFamily: { - sans: [...fontFamily.sans], - }, - }, - }, + darkMode: ["class"], + content: ["./src/**/*.{html,js,svelte,ts}"], + safelist: ["dark"], + theme: { + container: { + center: true, + padding: "2rem", + screens: { + "2xl": "1400px", + }, + }, + extend: { + colors: { + border: "hsl(var(--border) / )", + input: "hsl(var(--input) / )", + ring: "hsl(var(--ring) / )", + background: "hsl(var(--background) / )", + foreground: "hsl(var(--foreground) / )", + primary: { + DEFAULT: "hsl(var(--primary) / )", + foreground: "hsl(var(--primary-foreground) / )", + }, + secondary: { + DEFAULT: "hsl(var(--secondary) / )", + foreground: "hsl(var(--secondary-foreground) / )", + }, + destructive: { + DEFAULT: "hsl(var(--destructive) / )", + foreground: "hsl(var(--destructive-foreground) / )", + }, + muted: { + DEFAULT: "hsl(var(--muted) / )", + foreground: "hsl(var(--muted-foreground) / )", + }, + accent: { + DEFAULT: "hsl(var(--accent) / )", + foreground: "hsl(var(--accent-foreground) / )", + }, + popover: { + DEFAULT: "hsl(var(--popover) / )", + foreground: "hsl(var(--popover-foreground) / )", + }, + card: { + DEFAULT: "hsl(var(--card) / )", + foreground: "hsl(var(--card-foreground) / )", + }, + }, + borderRadius: { + lg: "var(--radius)", + md: "calc(var(--radius) - 2px)", + sm: "calc(var(--radius) - 4px)", + }, + fontFamily: { + sans: [...fontFamily.sans], + }, + }, + }, }; export default config; diff --git a/tsconfig.json b/tsconfig.json index 5d6c108..16b7a9a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,20 +1,20 @@ { - "extends": "./.svelte-kit/tsconfig.json", - "compilerOptions": { - "allowJs": true, - "checkJs": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true, - "moduleResolution": "bundler", - "types": ["bun-types"] - } - // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias - // except $lib which is handled by https://kit.svelte.dev/docs/configuration#files - // - // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes - // from the referenced tsconfig.json - TypeScript does not merge them in + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "moduleResolution": "bundler", + "types": ["bun-types"] + } + // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias + // except $lib which is handled by https://kit.svelte.dev/docs/configuration#files + // + // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes + // from the referenced tsconfig.json - TypeScript does not merge them in } diff --git a/vite.config.ts b/vite.config.ts index 80864b9..6b9eb5d 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,5 +2,5 @@ import { sveltekit } from "@sveltejs/kit/vite"; import { defineConfig } from "vite"; export default defineConfig({ - plugins: [sveltekit()], + plugins: [sveltekit()], });