diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index b35a5222..52836330 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -32,9 +32,9 @@ jobs: push: true tags: ghcr.io/${{ env.OWNER_LOWERCASE }}/interactive-visuals-web:latest - # - name: Build and push (docs) - # uses: docker/build-push-action@v3 - # with: - # file: 'Dockerfile-docs' - # push: true - # tags: ghcr.io/${{ env.OWNER_LOWERCASE }}/interactive-visuals-docs:latest + - name: Build and push (docs) + uses: docker/build-push-action@v3 + with: + file: 'Dockerfile-docs' + push: true + tags: ghcr.io/${{ env.OWNER_LOWERCASE }}/interactive-visuals-docs:latest diff --git a/components.json b/components.json index dacfd561..97d7ea83 100644 --- a/components.json +++ b/components.json @@ -1,6 +1,6 @@ { - "$schema": "https://shadcn-svelte.com/schema.json", - "style": "default", + "$schema": "https://next.shadcn-svelte.com/schema.json", + "style": "new-york", "tailwind": { "config": "tailwind.config.js", "css": "src/app.css", @@ -8,7 +8,10 @@ }, "aliases": { "components": "$lib/components", - "utils": "$lib/utils/shadcn-utils" + "utils": "$lib/utils/shadcn-utils", + "ui": "$lib/components/ui", + "hooks": "$lib/hooks" }, - "typescript": true + "typescript": true, + "registry": "https://next.shadcn-svelte.com/registry" } diff --git a/eslint.config.js b/eslint.config.js index 8f0faabf..27e1544c 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -40,5 +40,16 @@ export default ts.config( 'src/lib/components/ui/' ] + }, + { + rules: { + '@typescript-eslint/no-unused-vars': [ + 'warn', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^\\$\\$(Props|Events|Slots|Generic)$' + } + ] + } } ); diff --git a/package.json b/package.json index 58cea777..90647809 100644 --- a/package.json +++ b/package.json @@ -34,16 +34,22 @@ "@types/katex": "^0.16.7", "@types/three": "^0.170.0", "autoprefixer": "^10.4.20", + "bits-ui": "1.0.0-next.64", + "clsx": "^2.1.1", "eslint": "^9.7.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-svelte": "^2.36.0", "globals": "^15.0.0", + "lucide-svelte": "^0.456.0", "prettier": "^3.3.2", "prettier-plugin-svelte": "^3.2.6", "storybook": "^8.4.2", "svelte": "^5.0.0", "svelte-check": "^4.0.0", + "tailwind-merge": "^2.5.4", + "tailwind-variants": "^0.3.0", "tailwindcss": "^3.4.9", + "tailwindcss-animate": "^1.0.7", "typescript": "^5.0.0", "typescript-eslint": "^8.0.0", "vite": "^5.0.3" @@ -53,18 +59,12 @@ "@sveltejs/adapter-node": "^5.2.9", "@threlte/core": "8.0.0-next.30", "@threlte/extras": "9.0.0-next.39", - "bits-ui": "^0.21.16", - "clsx": "^2.1.1", - "cmdk-sv": "^0.0.18", "d3": "^7.9.0", "formsnap": "^1.0.1", "katex": "^0.16.11", - "lucide-svelte": "^0.456.0", "screenfull": "^6.0.2", "svelte-confetti": "^2.1.2", "sveltekit-superforms": "^2.20.0", - "tailwind-merge": "^2.5.4", - "tailwind-variants": "^0.3.0", "three": "^0.170.0", "zod": "^3.23.8" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d4a51d4a..1e86ed01 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,15 +20,6 @@ importers: '@threlte/extras': specifier: 9.0.0-next.39 version: 9.0.0-next.39(@types/three@0.170.0)(svelte@5.1.16)(three@0.170.0) - bits-ui: - specifier: ^0.21.16 - version: 0.21.16(svelte@5.1.16) - clsx: - specifier: ^2.1.1 - version: 2.1.1 - cmdk-sv: - specifier: ^0.0.18 - version: 0.0.18(svelte@5.1.16) d3: specifier: ^7.9.0 version: 7.9.0 @@ -38,9 +29,6 @@ importers: katex: specifier: ^0.16.11 version: 0.16.11 - lucide-svelte: - specifier: ^0.456.0 - version: 0.456.0(svelte@5.1.16) screenfull: specifier: ^6.0.2 version: 6.0.2 @@ -50,12 +38,6 @@ importers: sveltekit-superforms: specifier: ^2.20.0 version: 2.20.0(@sveltejs/kit@2.8.0(@sveltejs/vite-plugin-svelte@4.0.0(svelte@5.1.16)(vite@5.4.11(@types/node@22.5.4)))(svelte@5.1.16)(vite@5.4.11(@types/node@22.5.4)))(@types/json-schema@7.0.15)(svelte@5.1.16)(typescript@5.6.3) - tailwind-merge: - specifier: ^2.5.4 - version: 2.5.4 - tailwind-variants: - specifier: ^0.3.0 - version: 0.3.0(tailwindcss@3.4.14) three: specifier: ^0.170.0 version: 0.170.0 @@ -117,6 +99,12 @@ importers: autoprefixer: specifier: ^10.4.20 version: 10.4.20(postcss@8.4.49) + bits-ui: + specifier: 1.0.0-next.64 + version: 1.0.0-next.64(svelte@5.1.16) + clsx: + specifier: ^2.1.1 + version: 2.1.1 eslint: specifier: ^9.7.0 version: 9.14.0(jiti@1.21.6) @@ -129,6 +117,9 @@ importers: globals: specifier: ^15.0.0 version: 15.12.0 + lucide-svelte: + specifier: ^0.456.0 + version: 0.456.0(svelte@5.1.16) prettier: specifier: ^3.3.2 version: 3.3.3 @@ -144,9 +135,18 @@ importers: svelte-check: specifier: ^4.0.0 version: 4.0.7(picomatch@4.0.2)(svelte@5.1.16)(typescript@5.6.3) + tailwind-merge: + specifier: ^2.5.4 + version: 2.5.4 + tailwind-variants: + specifier: ^0.3.0 + version: 0.3.0(tailwindcss@3.4.14) tailwindcss: specifier: ^3.4.9 version: 3.4.14 + tailwindcss-animate: + specifier: ^1.0.7 + version: 1.0.7(tailwindcss@3.4.14) typescript: specifier: ^5.0.0 version: 5.6.3 @@ -604,11 +604,6 @@ packages: '@types/react': '>=16' react: '>=16' - '@melt-ui/svelte@0.76.2': - resolution: {integrity: sha512-7SbOa11tXUS95T3fReL+dwDs5FyJtCEqrqG3inRziDws346SYLsxOQ6HmX+4BkIsQh1R8U3XNa+EMmdMt38lMA==} - peerDependencies: - svelte: '>=3 <5' - '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1394,10 +1389,11 @@ packages: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} - bits-ui@0.21.16: - resolution: {integrity: sha512-XFZ7/bK7j/K+5iktxX/ZpmoFHjYjpPzP5EOO/4bWiaFg5TG1iMcfjDhlBTQnJxD6BoVoHuqeZPHZvaTgF4Iv3Q==} + bits-ui@1.0.0-next.64: + resolution: {integrity: sha512-r1JThjUSKwTkaB1onwIs7ZQoqygSsWhjBaUElCS8m8CCbY1RxmTz0HnbN+Xp2oJgJ4YQgIfiXTG3170l80FEgg==} + engines: {node: '>=18', pnpm: '>=8.7.0'} peerDependencies: - svelte: ^4.0.0 || ^5.0.0-next.118 + svelte: ^5.0.0-next.1 brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} @@ -1486,11 +1482,6 @@ packages: resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} engines: {node: '>=6'} - cmdk-sv@0.0.18: - resolution: {integrity: sha512-istixiQSy9Ez/mQ4VXWB69btqNyDZckbd1XFEwR46Vw+n5zjdmvoWAcOTj0uX3FZXtw9ikwLVmfoW2nwwMClRg==} - peerDependencies: - svelte: ^4.0.0 || ^5.0.0-next.1 - color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} @@ -1993,9 +1984,6 @@ packages: flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} - focus-trap@7.6.1: - resolution: {integrity: sha512-nB8y4nQl8PshahLpGKZOq1sb0xrMVFSn6at7u/qOsBZTlZRzaapISGENcB6mOkoezbClZyiMwEF/dGY8AZ00rA==} - for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} @@ -2133,6 +2121,9 @@ packages: inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + inline-style-parser@0.2.4: + resolution: {integrity: sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==} + internmap@2.0.3: resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} engines: {node: '>=12'} @@ -2687,6 +2678,11 @@ packages: run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + runed@0.15.3: + resolution: {integrity: sha512-HtayB+loDcGdqJDHW8JFdsZzGQMyVzim6+s3052MkjZnwmwDstmF+cusMeTssBe6TCdt5i9D/Tb+KYXN3L0kXA==} + peerDependencies: + svelte: ^5.0.0-next.1 + rw@1.3.3: resolution: {integrity: sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==} @@ -2783,6 +2779,9 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} + style-to-object@1.0.8: + resolution: {integrity: sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g==} + sucrase@3.35.0: resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} engines: {node: '>=16 || 14 >=14.17'} @@ -2865,6 +2864,12 @@ packages: typescript: optional: true + svelte-toolbelt@0.4.6: + resolution: {integrity: sha512-k8OUvXBUifHZcAlWeY/HLg/4J0v5m2iOfOhn8fDmjt4AP8ZluaDh9eBFus9lFiLX6O5l6vKqI1dKL5wy7090NQ==} + engines: {node: '>=18', pnpm: '>=8.7.0'} + peerDependencies: + svelte: ^5.0.0-next.126 + svelte2tsx@0.7.24: resolution: {integrity: sha512-KbKD+5aqTYdRPfAroA72xc3kEz3Dj0Vq7X3IjHLWbwfco7pwioEx4x/V9lOpKmkHlYh9YNPkqXWlbrH7Cc580A==} peerDependencies: @@ -2885,9 +2890,6 @@ packages: '@sveltejs/kit': 1.x || 2.x svelte: 3.x || 4.x || >=5.0.0-next.51 - tabbable@6.2.0: - resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==} - tailwind-merge@2.5.4: resolution: {integrity: sha512-0q8cfZHMu9nuYP/b5Shb7Y7Sh1B7Nnl5GqNr1U+n2p6+mybvRtayrQ+0042Z5byvTA8ihjlP8Odo8/VnHbZu4Q==} @@ -2897,6 +2899,11 @@ packages: peerDependencies: tailwindcss: '*' + tailwindcss-animate@1.0.7: + resolution: {integrity: sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==} + peerDependencies: + tailwindcss: '>=3.0.0 || insiders' + tailwindcss@3.4.14: resolution: {integrity: sha512-IcSvOcTRcUtQQ7ILQL5quRDg7Xs93PdJEk1ZLbhhvJc7uj/OAhYOnruEiwnGgBvUtaUAJ8/mhSw1o8L2jCiENA==} engines: {node: '>=14.0.0'} @@ -3544,16 +3551,6 @@ snapshots: '@types/react': 18.3.5 react: 18.3.1 - '@melt-ui/svelte@0.76.2(svelte@5.1.16)': - dependencies: - '@floating-ui/core': 1.6.8 - '@floating-ui/dom': 1.6.12 - '@internationalized/date': 3.5.6 - dequal: 2.0.3 - focus-trap: 7.6.1 - nanoid: 5.0.8 - svelte: 5.1.16 - '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -4500,12 +4497,15 @@ snapshots: binary-extensions@2.3.0: {} - bits-ui@0.21.16(svelte@5.1.16): + bits-ui@1.0.0-next.64(svelte@5.1.16): dependencies: + '@floating-ui/core': 1.6.8 + '@floating-ui/dom': 1.6.12 '@internationalized/date': 3.5.6 - '@melt-ui/svelte': 0.76.2(svelte@5.1.16) - nanoid: 5.0.8 + esm-env: 1.1.4 + runed: 0.15.3(svelte@5.1.16) svelte: 5.1.16 + svelte-toolbelt: 0.4.6(svelte@5.1.16) brace-expansion@1.1.11: dependencies: @@ -4598,12 +4598,6 @@ snapshots: clsx@2.1.1: {} - cmdk-sv@0.0.18(svelte@5.1.16): - dependencies: - bits-ui: 0.21.16(svelte@5.1.16) - nanoid: 5.0.8 - svelte: 5.1.16 - color-convert@2.0.1: dependencies: color-name: 1.1.4 @@ -5200,10 +5194,6 @@ snapshots: flatted@3.3.1: {} - focus-trap@7.6.1: - dependencies: - tabbable: 6.2.0 - for-each@0.3.3: dependencies: is-callable: 1.2.7 @@ -5335,6 +5325,8 @@ snapshots: inherits@2.0.4: {} + inline-style-parser@0.2.4: {} + internmap@2.0.3: {} is-arguments@1.1.1: @@ -5822,6 +5814,11 @@ snapshots: dependencies: queue-microtask: 1.2.3 + runed@0.15.3(svelte@5.1.16): + dependencies: + esm-env: 1.1.4 + svelte: 5.1.16 + rw@1.3.3: {} sade@1.8.1: @@ -5923,6 +5920,10 @@ snapshots: strip-json-comments@3.1.1: {} + style-to-object@1.0.8: + dependencies: + inline-style-parser: 0.2.4 + sucrase@3.35.0: dependencies: '@jridgewell/gen-mapping': 0.3.5 @@ -5987,6 +5988,12 @@ snapshots: postcss-load-config: 4.0.2(postcss@8.4.49) typescript: 5.6.3 + svelte-toolbelt@0.4.6(svelte@5.1.16): + dependencies: + clsx: 2.1.1 + style-to-object: 1.0.8 + svelte: 5.1.16 + svelte2tsx@0.7.24(svelte@5.1.16)(typescript@5.6.3): dependencies: dedent-js: 1.0.1 @@ -6047,8 +6054,6 @@ snapshots: - '@types/json-schema' - typescript - tabbable@6.2.0: {} - tailwind-merge@2.5.4: {} tailwind-variants@0.3.0(tailwindcss@3.4.14): @@ -6056,6 +6061,10 @@ snapshots: tailwind-merge: 2.5.4 tailwindcss: 3.4.14 + tailwindcss-animate@1.0.7(tailwindcss@3.4.14): + dependencies: + tailwindcss: 3.4.14 + tailwindcss@3.4.14: dependencies: '@alloc/quick-lru': 5.2.0 diff --git a/src/app.css b/src/app.css index 16d01c9e..95927941 100644 --- a/src/app.css +++ b/src/app.css @@ -6,6 +6,7 @@ html, body { height: 100%; + @apply bg-blue-800; } .latex .katex-display { @@ -19,65 +20,62 @@ :root { --background: 0 0% 100%; --foreground: 222.2 84% 4.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%; - --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%; - --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%; - --accent: 210 40% 96.1%; --accent-foreground: 222.2 47.4% 11.2%; - --destructive: 0 72.2% 50.6%; --destructive-foreground: 210 40% 98%; - --ring: 222.2 84% 4.9%; - --radius: 0.5rem; + --sidebar-background: 0 0% 98%; + --sidebar-foreground: 240 5.3% 26.1%; + --sidebar-primary: 240 5.9% 10%; + --sidebar-primary-foreground: 0 0% 98%; + --sidebar-accent: 240 4.8% 95.9%; + --sidebar-accent-foreground: 240 5.9% 10%; + --sidebar-border: 220 13% 91%; + --sidebar-ring: 217.2 91.2% 59.8%; } .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%; - --popover: 222.2 84% 4.9%; --popover-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%; - --primary: 210 40% 98%; --primary-foreground: 222.2 47.4% 11.2%; - --secondary: 217.2 32.6% 17.5%; --secondary-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%; - - --ring: hsl(212.7, 26.8%, 83.9); + --ring: 212.7 26.8% 83.9%; + --sidebar-background: 240 5.9% 10%; + --sidebar-foreground: 240 4.8% 95.9%; + --sidebar-primary: 224.3 76.3% 48%; + --sidebar-primary-foreground: 0 0% 100%; + --sidebar-accent: 240 3.7% 15.9%; + --sidebar-accent-foreground: 240 4.8% 95.9%; + --sidebar-border: 240 3.7% 15.9%; + --sidebar-ring: 217.2 91.2% 59.8%; } } diff --git a/src/lib/components/ActionButtonsAndFormula.svelte b/src/lib/components/ActionButtonsAndFormula.svelte index 175bfca4..b8134305 100644 --- a/src/lib/components/ActionButtonsAndFormula.svelte +++ b/src/lib/components/ActionButtonsAndFormula.svelte @@ -6,7 +6,11 @@ import type { Controller, Controls } from '$lib/controls/Controls'; import { globalState } from '$lib/stores/globalState.svelte'; import type { Formula } from '$lib/utils/Formulas'; - import { Maximize, Minimize, RotateCcw, Share, SquareFunction } from 'lucide-svelte'; + import Maximize from 'lucide-svelte/icons/maximize'; + import Minimize from 'lucide-svelte/icons/minimize'; + import RotateCcw from 'lucide-svelte/icons/rotate-ccw'; + import Share from 'lucide-svelte/icons/share'; + import SquareFunction from 'lucide-svelte/icons/square-function'; import screenfull from 'screenfull'; type G = readonly Controller[]; diff --git a/src/lib/components/ActivityPanel.svelte b/src/lib/components/ActivityPanel.svelte index d8d94f40..57683c5c 100644 --- a/src/lib/components/ActivityPanel.svelte +++ b/src/lib/components/ActivityPanel.svelte @@ -3,7 +3,8 @@ import * as Dialog from '$lib/components/ui/dialog'; import { activityState } from '$lib/stores/activity.svelte'; import { globalState } from '$lib/stores/globalState.svelte'; - import { Lock, Unlock } from 'lucide-svelte'; + import Lock from 'lucide-svelte/icons/lock'; + import Unlock from 'lucide-svelte/icons/lock-open'; type ActivityPanelProps = { onLock: (event: MouseEvent) => void; diff --git a/src/lib/components/Button.svelte b/src/lib/components/Button.svelte index 72149604..afa9fd38 100644 --- a/src/lib/components/Button.svelte +++ b/src/lib/components/Button.svelte @@ -1,5 +1,5 @@
- action()}>{label} action()}>{label}
diff --git a/src/lib/components/ControllerAndActivityPanel.svelte b/src/lib/components/ControllerAndActivityPanel.svelte index c77ee780..4d4e1ff1 100644 --- a/src/lib/components/ControllerAndActivityPanel.svelte +++ b/src/lib/components/ControllerAndActivityPanel.svelte @@ -11,7 +11,9 @@ import { Toggle } from '$lib/controls/Toggle.svelte'; import { activityState } from '$lib/stores/activity.svelte'; import { globalState } from '$lib/stores/globalState.svelte'; - import { Lock, RotateCcw, Unlock } from 'lucide-svelte'; + import Lock from 'lucide-svelte/icons/lock'; + import Unlock from 'lucide-svelte/icons/lock-open'; + import RotateCcw from 'lucide-svelte/icons/rotate-ccw'; import * as C from './controls'; type G = readonly Controller[]; diff --git a/src/lib/components/Embedding.svelte b/src/lib/components/Embedding.svelte index c08162f9..90405e91 100644 --- a/src/lib/components/Embedding.svelte +++ b/src/lib/components/Embedding.svelte @@ -1,7 +1,8 @@ - + Share and embed - + This applet was created for the https://www.openla.ewi.tudelft.nl/applet - + Embed diff --git a/src/lib/components/controls/Dropdown.svelte b/src/lib/components/controls/Dropdown.svelte index 886ef189..0b62191e 100644 --- a/src/lib/components/controls/Dropdown.svelte +++ b/src/lib/components/controls/Dropdown.svelte @@ -1,10 +1,5 @@ - - - - - - - - No items found. - - {#each dropdown.values as value} - { - dropdown.value = currentValue; - closeAndFocusTrigger(ids.trigger); - }} - > - - {value} - - {/each} - - - - + + + {dropdown.value || 'Select item'} + + + + {#if dropdown.label} + {dropdown.label} + {/if} + {#each dropdown.values as item} + + {item} + + {/each} + + + diff --git a/src/lib/components/controls/Matrix.svelte b/src/lib/components/controls/Matrix.svelte index f5f8cf78..ebccbdd5 100644 --- a/src/lib/components/controls/Matrix.svelte +++ b/src/lib/components/controls/Matrix.svelte @@ -1,7 +1,8 @@
- + {@render children?.()}
diff --git a/src/lib/components/ui/accordion/accordion-item.svelte b/src/lib/components/ui/accordion/accordion-item.svelte index 6a54f7bf..f0f46f9c 100644 --- a/src/lib/components/ui/accordion/accordion-item.svelte +++ b/src/lib/components/ui/accordion/accordion-item.svelte @@ -2,13 +2,11 @@ import { Accordion as AccordionPrimitive } from 'bits-ui'; import { cn } from '$lib/utils/shadcn-utils.js'; - type $$Props = AccordionPrimitive.ItemProps; - - let className: $$Props['class'] = undefined; - export let value: $$Props['value']; - export { className as class }; + let { + ref = $bindable(null), + class: className, + ...restProps + }: AccordionPrimitive.ItemProps = $props(); - - - + diff --git a/src/lib/components/ui/accordion/accordion-trigger.svelte b/src/lib/components/ui/accordion/accordion-trigger.svelte index de075bba..c1f6b7db 100644 --- a/src/lib/components/ui/accordion/accordion-trigger.svelte +++ b/src/lib/components/ui/accordion/accordion-trigger.svelte @@ -1,26 +1,29 @@ svg]:rotate-180', + 'flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180', className )} - {...$$restProps} - on:click + {...restProps} > - - + {@render children?.()} + diff --git a/src/lib/components/ui/accordion/index.ts b/src/lib/components/ui/accordion/index.ts index b3d6721a..d0cd9657 100644 --- a/src/lib/components/ui/accordion/index.ts +++ b/src/lib/components/ui/accordion/index.ts @@ -2,8 +2,8 @@ import { Accordion as AccordionPrimitive } from 'bits-ui'; import Content from './accordion-content.svelte'; import Item from './accordion-item.svelte'; import Trigger from './accordion-trigger.svelte'; -const Root = AccordionPrimitive.Root; +const Root = AccordionPrimitive.Root; export { Root, Content, diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-ellipsis.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-ellipsis.svelte index 54e10f03..ce6e8abe 100644 --- a/src/lib/components/ui/breadcrumb/breadcrumb-ellipsis.svelte +++ b/src/lib/components/ui/breadcrumb/breadcrumb-ellipsis.svelte @@ -1,24 +1,23 @@ diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte index ee2e8afc..909cc952 100644 --- a/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte +++ b/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte @@ -1,16 +1,16 @@ -
  • - +
  • + {@render children?.()}
  • diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-link.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-link.svelte index dafdd4e1..456accb6 100644 --- a/src/lib/components/ui/breadcrumb/breadcrumb-link.svelte +++ b/src/lib/components/ui/breadcrumb/breadcrumb-link.svelte @@ -1,31 +1,31 @@ -{#if asChild} - +{#if child} + {@render child({ props: attrs })} {:else} - - + + {@render children?.()} {/if} diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte index cc65ec35..1dd1b45a 100644 --- a/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte +++ b/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte @@ -1,23 +1,23 @@
      - + {@render children?.()}
    diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-page.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-page.svelte index 7398e1a2..e2a35e4e 100644 --- a/src/lib/components/ui/breadcrumb/breadcrumb-page.svelte +++ b/src/lib/components/ui/breadcrumb/breadcrumb-page.svelte @@ -1,23 +1,23 @@ - + {@render children?.()} diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-separator.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-separator.svelte index b162db3d..d262251e 100644 --- a/src/lib/components/ui/breadcrumb/breadcrumb-separator.svelte +++ b/src/lib/components/ui/breadcrumb/breadcrumb-separator.svelte @@ -1,25 +1,27 @@ diff --git a/src/lib/components/ui/breadcrumb/breadcrumb.svelte b/src/lib/components/ui/breadcrumb/breadcrumb.svelte index b3b6635b..14983ce2 100644 --- a/src/lib/components/ui/breadcrumb/breadcrumb.svelte +++ b/src/lib/components/ui/breadcrumb/breadcrumb.svelte @@ -1,15 +1,15 @@ -