diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000..4b6a99a Binary files /dev/null and b/bun.lockb differ diff --git a/package.json b/package.json index 9ddf654..b74c5b1 100644 --- a/package.json +++ b/package.json @@ -1,57 +1,60 @@ { - "name": "visualization", - "version": "0.0.1", - "private": true, - "scripts": { - "dev": "vite dev", - "build": "vite build", - "preview": "vite preview", - "test": "playwright test", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "deploy": "pnpm build && pnpx gh-pages -d build -t true", - "test:unit": "vitest", - "lint": "prettier --plugin-search-dir . --check . && eslint .", - "format": "prettier --plugin-search-dir . --write ." - }, - "devDependencies": { - "@playwright/test": "^1.35.1", - "@sveltejs/adapter-auto": "^2.1.0", - "@sveltejs/kit": "^1.20.5", - "@typescript-eslint/eslint-plugin": "^5.60.0", - "@typescript-eslint/parser": "^5.60.0", - "eslint": "^8.43.0", - "eslint-config-prettier": "^8.8.0", - "eslint-plugin-svelte3": "^4.0.0", - "gh-pages": "^6.0.0", - "prettier": "^2.8.8", - "prettier-plugin-svelte": "^2.10.1", - "svelte": "^3.59.2", - "svelte-check": "^3.4.4", - "tslib": "^2.5.3", - "typescript": "^5.1.3", - "vite": "^4.3.9", - "vitest": "^0.25.8" - }, - "type": "module", - "dependencies": { - "@duckdb/duckdb-wasm": "^1.27.0", - "@sveltejs/adapter-static": "^2.0.2", - "@types/papaparse": "^5.3.7", - "@types/three": "^0.152.1", - "apache-arrow": "^12.0.1", - "autoprefixer": "^10.4.14", - "feather-icons": "^4.29.0", - "monaco-editor": "^0.40.0", - "monaco-sql-languages": "0.12.0-beta.1", - "papaparse": "^5.4.1", - "postcss": "^8.4.24", - "sass": "^1.63.6", - "stats.js": "^0.17.0", - "svelte-feather-icons": "^4.0.1", - "tailwindcss": "^3.3.2", - "three": "^0.154.0", - "three.meshline": "^1.4.0", - "web-worker": "^1.2.0" - } + "name": "visualization", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "test": "playwright test", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "deploy": "pnpm build && pnpx gh-pages -d build -t true", + "test:unit": "vitest", + "lint": "prettier --plugin-search-dir . --check . && eslint .", + "format": "prettier --plugin-search-dir . --write ." + }, + "devDependencies": { + "@playwright/test": "^1.35.1", + "@sveltejs/adapter-auto": "^2.1.0", + "@sveltejs/kit": "^1.20.5", + "@typescript-eslint/eslint-plugin": "^5.60.0", + "@typescript-eslint/parser": "^5.60.0", + "eslint": "^8.43.0", + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-svelte3": "^4.0.0", + "gh-pages": "^6.0.0", + "prettier": "^2.8.8", + "prettier-plugin-svelte": "^2.10.1", + "svelte": "^3.59.2", + "svelte-check": "^3.4.4", + "tslib": "^2.5.3", + "typescript": "^5.1.3", + "vite": "^4.3.9", + "vitest": "^0.25.8" + }, + "type": "module", + "dependencies": { + "@duckdb/duckdb-wasm": "^1.27.0", + "@fontsource/inter": "^5.0.8", + "@sveltejs/adapter-static": "^2.0.2", + "@tweenjs/tween.js": "^21.0.0", + "@types/papaparse": "^5.3.7", + "@types/three": "^0.152.1", + "apache-arrow": "^12.0.1", + "autoprefixer": "^10.4.14", + "feather-icons": "^4.29.0", + "monaco-editor": "^0.40.0", + "monaco-sql-languages": "0.12.0-beta.1", + "papaparse": "^5.4.1", + "postcss": "^8.4.24", + "sass": "^1.63.6", + "stats.js": "^0.17.0", + "svelte-feather-icons": "^4.0.1", + "svelte-icons-pack": "^2.1.0", + "tailwindcss": "^3.3.2", + "three": "^0.154.0", + "three.meshline": "^1.4.0", + "web-worker": "^1.2.0" + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8041285..c3214fc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ dependencies: '@duckdb/duckdb-wasm': specifier: ^1.27.0 version: 1.27.0 + '@fontsource/inter': + specifier: ^5.0.8 + version: 5.0.8 '@sveltejs/adapter-static': specifier: ^2.0.2 version: 2.0.2(@sveltejs/kit@1.20.5) @@ -339,6 +342,10 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@fontsource/inter@5.0.8: + resolution: {integrity: sha512-28knWH1BfOiRalfLs90U4sge5mpQ8ZH6FS0PTT+IZMKrZ7wNHDHRuKa1kQJg+uHcc6axBppnxll+HXM4c7zo/Q==} + dev: false + /@humanwhocodes/config-array@0.11.10: resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} engines: {node: '>=10.10.0'} diff --git a/src/lib/components/BasicGraph.svelte b/src/lib/components/BasicGraph.svelte index a85a429..6584aee 100644 --- a/src/lib/components/BasicGraph.svelte +++ b/src/lib/components/BasicGraph.svelte @@ -1,6 +1,7 @@ -
+
- import type { Action } from '@sveltejs/kit'; - - export let size: 'sm' | 'md' | 'lg' = 'md'; - export let disabled: boolean = false; - export let color: 'primary' | 'secondary' = 'secondary'; - - let className: string | undefined = undefined; - - export { className as class }; - - function classForSize() { - switch (size) { - case 'sm': - return 'px-2.5 py-1.5 text-xs shadow-sm rounded-md'; - case 'md': - return 'px-4 py-2 text-sm shadow-mg rounded-lg'; - case 'lg': - return 'px-4 py-2 text-base shadow-lg rounded-xl'; - } - } - - function classForColors(): string { - switch (color) { - case 'primary': - return 'text-white bg-primary-600 hover:bg-primary-700 border-primary-700 hover:border-primary-700'; - case 'secondary': - return 'text-secondary-600 dark:text-background-50 bg-white border-secondary-300 dark:border-background-950 dark:bg-background-900 hover:bg-gray-50 dark:hover:bg-background-800 dark:hover:border-background-900'; - } - } - - function classForDisabledState(): string { - if (disabled) { - return 'cursor-not-allowed opacity-50 pointer-events-none'; - } - return ''; - } - - - - - diff --git a/src/lib/components/Dialog.svelte b/src/lib/components/Dialog.svelte index 2e433f5..f4dc6e2 100644 --- a/src/lib/components/Dialog.svelte +++ b/src/lib/components/Dialog.svelte @@ -3,8 +3,9 @@ import { onMount, onDestroy } from 'svelte'; import { fade, fly } from 'svelte/transition'; - export let large = false; + type DialogSize = 'small' | 'medium' | 'large'; + export let size: DialogSize = 'medium'; export let dialogOpen = false; let className: string | undefined = undefined; export { className as class }; @@ -48,8 +49,7 @@ >