From 89e4cf836448009607ffed9881038e3729d2d027 Mon Sep 17 00:00:00 2001 From: Max Richter Date: Tue, 3 Feb 2026 12:14:58 +0100 Subject: [PATCH 1/5] chore: use vite for auto building @nodarium/ui instead of chokidar We already use vite for building and during dev. Can use a custom vite plugin to automatically package ui after every change, so no need for chokidar. --- packages/ui/package.json | 6 +- packages/ui/vite.config.ts | 18 +++- pnpm-lock.yaml | 202 ++----------------------------------- pnpm-workspace.yaml | 3 - 4 files changed, 26 insertions(+), 203 deletions(-) diff --git a/packages/ui/package.json b/packages/ui/package.json index d754f1f..14241c9 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -2,8 +2,7 @@ "name": "@nodarium/ui", "version": "0.0.1", "scripts": { - "dev": "chokidar './src/**' --initial -c 'pnpm build'", - "dev:ui": "vite", + "dev": "vite", "build": "vite build && npm run package", "preview": "vite preview", "package": "svelte-kit sync && svelte-package && publint", @@ -43,7 +42,6 @@ "@types/three": "^0.182.0", "@typescript-eslint/eslint-plugin": "^8.53.0", "@typescript-eslint/parser": "^8.53.0", - "chokidar-cli": "^3.0.0", "dprint": "^0.51.1", "eslint": "^9.39.2", "eslint-plugin-svelte": "^3.14.0", @@ -62,6 +60,8 @@ "types": "./dist/index.d.ts", "type": "module", "dependencies": { + "@iconify-json/tabler": "^1.2.26", + "@iconify/tailwind4": "^1.2.1", "@tailwindcss/vite": "^4.1.18", "@threlte/core": "^8.3.1", "@threlte/extras": "^9.7.1", diff --git a/packages/ui/vite.config.ts b/packages/ui/vite.config.ts index 1a8026e..71c336a 100644 --- a/packages/ui/vite.config.ts +++ b/packages/ui/vite.config.ts @@ -1,9 +1,25 @@ import { sveltekit } from '@sveltejs/kit/vite'; import tailwindcss from '@tailwindcss/vite'; +import { exec } from 'node:child_process'; +import { readFileSync } from 'node:fs'; import { defineConfig } from 'vitest/config'; +const postDevPackagePlugin = () => { + const packageContent = JSON.parse(readFileSync('./package.json', { encoding: 'utf8' })); + let timeout: ReturnType | undefined; + return { + name: 'run-command-on-change', + handleHotUpdate: () => { + clearTimeout(timeout); + timeout = setTimeout(function() { + exec(packageContent.scripts.package); + }, 200); + } + } as const; +}; + export default defineConfig({ - plugins: [tailwindcss(), sveltekit()], + plugins: [tailwindcss(), sveltekit(), postDevPackagePlugin()], test: { include: ['src/**/*.{test,spec}.{js,ts}'] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b52ce5f..95b9b48 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -148,6 +148,12 @@ importers: packages/ui: dependencies: + '@iconify-json/tabler': + specifier: ^1.2.26 + version: 1.2.26 + '@iconify/tailwind4': + specifier: ^1.2.1 + version: 1.2.1(tailwindcss@4.1.18) '@tailwindcss/vite': specifier: ^4.1.18 version: 4.1.18(vite@7.3.1(@types/node@22.8.6)(jiti@2.6.1)(less@4.2.0)(lightningcss@1.30.2)(sass@1.80.6)(terser@5.36.0)(tsx@4.19.2)) @@ -197,9 +203,6 @@ importers: '@typescript-eslint/parser': specifier: ^8.53.0 version: 8.53.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3) - chokidar-cli: - specifier: ^3.0.0 - version: 3.0.0 dprint: specifier: ^0.51.1 version: 0.51.1 @@ -1369,18 +1372,10 @@ packages: ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - ansi-regex@4.1.1: - resolution: {integrity: sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==} - engines: {node: '>=6'} - ansi-regex@6.2.2: resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} engines: {node: '>=12'} - ansi-styles@3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} - ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} @@ -1448,10 +1443,6 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - camelcase@5.3.1: - resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} - engines: {node: '>=6'} - camera-controls@3.1.2: resolution: {integrity: sha512-xkxfpG2ECZ6Ww5/9+kf4mfg1VEYAoe9aDSY+IwF0UEs7qEzwy0aVRfs2grImIECs/PoBtWFrh7RXsQkwG922JA==} engines: {node: '>=22.0.0', npm: '>=10.5.1'} @@ -1466,11 +1457,6 @@ packages: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} - chokidar-cli@3.0.0: - resolution: {integrity: sha512-xVW+Qeh7z15uZRxHOkP93Ux8A0xbPzwK4GaqD8dQOYc34TlkqUhVSS59fK36DOp5WdJlrRzlYSy02Ht99FjZqQ==} - engines: {node: '>= 8.10.0'} - hasBin: true - chokidar-cli@https://codeload.github.com/open-cli-tools/chokidar-cli/tar.gz/8dd8a1e8631d377de600f628d819a0cda46c102f: resolution: {tarball: https://codeload.github.com/open-cli-tools/chokidar-cli/tar.gz/8dd8a1e8631d377de600f628d819a0cda46c102f} version: 4.0.0 @@ -1489,9 +1475,6 @@ packages: resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==} engines: {node: '>= 20.19.0'} - cliui@5.0.0: - resolution: {integrity: sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==} - cliui@9.0.1: resolution: {integrity: sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==} engines: {node: '>=20'} @@ -1500,16 +1483,10 @@ packages: resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} engines: {node: '>=6'} - color-convert@1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} - color-name@1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} @@ -1588,10 +1565,6 @@ packages: supports-color: optional: true - decamelize@1.2.0: - resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} - engines: {node: '>=0.10.0'} - decimal.js@10.6.0: resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} @@ -1650,9 +1623,6 @@ packages: emoji-regex@10.6.0: resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==} - emoji-regex@7.0.3: - resolution: {integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==} - enhanced-resolve@5.18.4: resolution: {integrity: sha512-LgQMM4WXU3QI+SYgEc2liRgznaD5ojbmY3sb8LxyguVkIg5FxdpTkvk72te2R38/TGKxH634oLxXRGY6d7AP+Q==} engines: {node: '>=10.13.0'} @@ -1806,10 +1776,6 @@ packages: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} - find-up@3.0.0: - resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} - engines: {node: '>=6'} - find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} @@ -1946,10 +1912,6 @@ packages: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} - is-fullwidth-code-point@2.0.0: - resolution: {integrity: sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==} - engines: {node: '>=4'} - is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -2102,10 +2064,6 @@ packages: locate-character@3.0.0: resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} - locate-path@3.0.0: - resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} - engines: {node: '>=6'} - locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -2228,26 +2186,14 @@ packages: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} - p-limit@2.3.0: - resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} - engines: {node: '>=6'} - p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} - p-locate@3.0.0: - resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} - engines: {node: '>=6'} - p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} - p-try@2.2.0: - resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} - engines: {node: '>=6'} - package-manager-detector@1.6.0: resolution: {integrity: sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA==} @@ -2262,10 +2208,6 @@ packages: parse5@7.3.0: resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==} - path-exists@3.0.0: - resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} - engines: {node: '>=4'} - path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -2355,17 +2297,10 @@ packages: resolution: {integrity: sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==} engines: {node: '>= 20.19.0'} - require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} - require-main-filename@2.0.0: - resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} - resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -2416,9 +2351,6 @@ packages: engines: {node: '>=10'} hasBin: true - set-blocking@2.0.0: - resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - set-cookie-parser@2.7.2: resolution: {integrity: sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==} @@ -2458,18 +2390,10 @@ packages: std-env@3.10.0: resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} - string-width@3.1.0: - resolution: {integrity: sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==} - engines: {node: '>=6'} - string-width@7.2.0: resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} engines: {node: '>=18'} - strip-ansi@5.2.0: - resolution: {integrity: sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==} - engines: {node: '>=6'} - strip-ansi@7.1.2: resolution: {integrity: sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==} engines: {node: '>=12'} @@ -2799,9 +2723,6 @@ packages: resolution: {integrity: sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==} engines: {node: '>=18'} - which-module@2.0.1: - resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} - which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -2816,10 +2737,6 @@ packages: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} - wrap-ansi@5.1.0: - resolution: {integrity: sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==} - engines: {node: '>=6'} - wrap-ansi@9.0.2: resolution: {integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==} engines: {node: '>=18'} @@ -2843,9 +2760,6 @@ packages: xmlchars@2.2.0: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} - y18n@4.0.3: - resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} - y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -2854,16 +2768,10 @@ packages: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} - yargs-parser@13.1.2: - resolution: {integrity: sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==} - yargs-parser@22.0.0: resolution: {integrity: sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==} engines: {node: ^20.19.0 || ^22.12.0 || >=23} - yargs@13.3.2: - resolution: {integrity: sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==} - yargs@18.0.0: resolution: {integrity: sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==} engines: {node: ^20.19.0 || ^22.12.0 || >=23} @@ -3851,14 +3759,8 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 - ansi-regex@4.1.1: {} - ansi-regex@6.2.2: {} - ansi-styles@3.2.1: - dependencies: - color-convert: 1.9.3 - ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 @@ -3918,8 +3820,6 @@ snapshots: callsites@3.1.0: {} - camelcase@5.3.1: {} - camera-controls@3.1.2(three@0.182.0): dependencies: three: 0.182.0 @@ -3931,13 +3831,6 @@ snapshots: ansi-styles: 4.3.0 supports-color: 7.2.0 - chokidar-cli@3.0.0: - dependencies: - chokidar: 3.6.0 - lodash.debounce: 4.0.8 - lodash.throttle: 4.1.1 - yargs: 13.3.2 - chokidar-cli@https://codeload.github.com/open-cli-tools/chokidar-cli/tar.gz/8dd8a1e8631d377de600f628d819a0cda46c102f: dependencies: chokidar: 3.6.0 @@ -3965,12 +3858,6 @@ snapshots: dependencies: readdirp: 5.0.0 - cliui@5.0.0: - dependencies: - string-width: 3.1.0 - strip-ansi: 5.2.0 - wrap-ansi: 5.1.0 - cliui@9.0.1: dependencies: string-width: 7.2.0 @@ -3979,16 +3866,10 @@ snapshots: clsx@2.1.1: {} - color-convert@1.9.3: - dependencies: - color-name: 1.1.3 - color-convert@2.0.1: dependencies: color-name: 1.1.4 - color-name@1.1.3: {} - color-name@1.1.4: {} combined-stream@1.0.8: @@ -4065,8 +3946,6 @@ snapshots: dependencies: ms: 2.1.3 - decamelize@1.2.0: {} - decimal.js@10.6.0: optional: true @@ -4131,8 +4010,6 @@ snapshots: emoji-regex@10.6.0: {} - emoji-regex@7.0.3: {} - enhanced-resolve@5.18.4: dependencies: graceful-fs: 4.2.11 @@ -4353,10 +4230,6 @@ snapshots: dependencies: to-regex-range: 5.0.1 - find-up@3.0.0: - dependencies: - locate-path: 3.0.0 - find-up@5.0.0: dependencies: locate-path: 6.0.0 @@ -4498,8 +4371,6 @@ snapshots: is-extglob@2.1.1: {} - is-fullwidth-code-point@2.0.0: {} - is-glob@4.0.3: dependencies: is-extglob: 2.1.1 @@ -4646,11 +4517,6 @@ snapshots: locate-character@3.0.0: {} - locate-path@3.0.0: - dependencies: - p-locate: 3.0.0 - path-exists: 3.0.0 - locate-path@6.0.0: dependencies: p-locate: 5.0.0 @@ -4764,24 +4630,14 @@ snapshots: type-check: 0.4.0 word-wrap: 1.2.5 - p-limit@2.3.0: - dependencies: - p-try: 2.2.0 - p-limit@3.1.0: dependencies: yocto-queue: 0.1.0 - p-locate@3.0.0: - dependencies: - p-limit: 2.3.0 - p-locate@5.0.0: dependencies: p-limit: 3.1.0 - p-try@2.2.0: {} - package-manager-detector@1.6.0: {} parent-module@1.0.1: @@ -4796,8 +4652,6 @@ snapshots: entities: 6.0.1 optional: true - path-exists@3.0.0: {} - path-exists@4.0.0: {} path-key@3.1.1: {} @@ -4868,12 +4722,8 @@ snapshots: readdirp@5.0.0: {} - require-directory@2.1.1: {} - require-from-string@2.0.2: {} - require-main-filename@2.0.0: {} - resolve-from@4.0.0: {} resolve-pkg-maps@1.0.0: @@ -4946,8 +4796,6 @@ snapshots: semver@7.7.3: {} - set-blocking@2.0.0: {} - set-cookie-parser@2.7.2: {} shebang-command@2.0.0: @@ -4981,22 +4829,12 @@ snapshots: std-env@3.10.0: {} - string-width@3.1.0: - dependencies: - emoji-regex: 7.0.3 - is-fullwidth-code-point: 2.0.0 - strip-ansi: 5.2.0 - string-width@7.2.0: dependencies: emoji-regex: 10.6.0 get-east-asian-width: 1.4.0 strip-ansi: 7.1.2 - strip-ansi@5.2.0: - dependencies: - ansi-regex: 4.1.1 - strip-ansi@7.1.2: dependencies: ansi-regex: 6.2.2 @@ -5321,8 +5159,6 @@ snapshots: webidl-conversions: 7.0.0 optional: true - which-module@2.0.1: {} - which@2.0.2: dependencies: isexe: 2.0.0 @@ -5334,12 +5170,6 @@ snapshots: word-wrap@1.2.5: {} - wrap-ansi@5.1.0: - dependencies: - ansi-styles: 3.2.1 - string-width: 3.1.0 - strip-ansi: 5.2.0 - wrap-ansi@9.0.2: dependencies: ansi-styles: 6.2.3 @@ -5355,32 +5185,12 @@ snapshots: xmlchars@2.2.0: optional: true - y18n@4.0.3: {} - y18n@5.0.8: {} yaml@1.10.2: {} - yargs-parser@13.1.2: - dependencies: - camelcase: 5.3.1 - decamelize: 1.2.0 - yargs-parser@22.0.0: {} - yargs@13.3.2: - dependencies: - cliui: 5.0.0 - find-up: 3.0.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - require-main-filename: 2.0.0 - set-blocking: 2.0.0 - string-width: 3.1.0 - which-module: 2.0.1 - y18n: 4.0.3 - yargs-parser: 13.1.2 - yargs@18.0.0: dependencies: cliui: 9.0.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 30f8899..1a8ade6 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -7,6 +7,3 @@ packages: catalog: chokidar-cli: github:open-cli-tools/chokidar-cli#semver:v4.0.0 - -onlyBuiltDependencies: - - dprint -- 2.49.1 From b19da950a65859690d88b242a2bcaa86aebe4d8c Mon Sep 17 00:00:00 2001 From: Max Richter Date: Tue, 3 Feb 2026 12:16:12 +0100 Subject: [PATCH 2/5] refactor: use tailwind custom colors for themes Use tailwind v4 @theme block so we can use bg-layer-0 instead of bg-[--layer-0] for theme colors. --- app/src/app.css | 4 + .../graph-interface/components/AddMenu.svelte | 10 +- .../components/BoxSelection.svelte | 2 +- .../components/HelpView.svelte | 4 +- .../lib/graph-interface/graph/Graph.svelte | 6 +- .../graph-interface/graph/colors.svelte.ts | 4 +- .../lib/graph-interface/node/NodeHTML.svelte | 8 +- .../graph-interface/node/NodeHeader.svelte | 2 +- .../graph-interface/node/NodeParameter.svelte | 2 +- app/src/lib/grid/Cell.svelte | 2 +- app/src/lib/node-store/BreadCrumbs.svelte | 8 +- app/src/lib/node-store/DraggableNode.svelte | 2 +- app/src/lib/performance/Monitor.svelte | 8 +- .../lib/performance/PerformanceViewer.svelte | 4 +- app/src/lib/performance/SmallGraph.svelte | 2 +- .../performance/SmallPerformanceViewer.svelte | 6 +- .../lib/project-manager/ProjectManager.svelte | 6 +- app/src/lib/settings/NestedSettings.svelte | 2 +- app/src/lib/sidebar/Panel.svelte | 2 +- app/src/lib/sidebar/Sidebar.svelte | 13 +- .../lib/sidebar/panels/BenchmarkPanel.svelte | 6 +- app/src/routes/+page.svelte | 2 +- packages/ui/src/lib/Details.svelte | 9 +- packages/ui/src/lib/Input.svelte | 12 +- packages/ui/src/lib/ShortCut.svelte | 4 +- packages/ui/src/lib/app.css | 149 ++++++------- packages/ui/src/lib/index.ts | 8 +- packages/ui/src/lib/inputs/Float.svelte | 199 ------------------ .../{Checkbox.svelte => InputCheckbox.svelte} | 4 +- packages/ui/src/lib/inputs/InputNumber.svelte | 174 +++++++++++++++ .../{Search.svelte => InputSearch.svelte} | 0 .../{Select.svelte => InputSelect.svelte} | 6 +- .../inputs/{Vec3.svelte => InputVec3.svelte} | 14 +- packages/ui/src/routes/+page.svelte | 65 ++++-- packages/ui/src/routes/Section.svelte | 5 +- 35 files changed, 379 insertions(+), 375 deletions(-) delete mode 100644 packages/ui/src/lib/inputs/Float.svelte rename packages/ui/src/lib/inputs/{Checkbox.svelte => InputCheckbox.svelte} (84%) create mode 100644 packages/ui/src/lib/inputs/InputNumber.svelte rename packages/ui/src/lib/inputs/{Search.svelte => InputSearch.svelte} (100%) rename packages/ui/src/lib/inputs/{Select.svelte => InputSelect.svelte} (77%) rename packages/ui/src/lib/inputs/{Vec3.svelte => InputVec3.svelte} (57%) diff --git a/app/src/app.css b/app/src/app.css index 563075f..731a79f 100644 --- a/app/src/app.css +++ b/app/src/app.css @@ -4,3 +4,7 @@ prefix: "i"; icon-sets: from-folder(custom, "./src/lib/icons"); } + +body * { + color: var(--color-text); +} diff --git a/app/src/lib/graph-interface/components/AddMenu.svelte b/app/src/lib/graph-interface/components/AddMenu.svelte index 0c6b6b9..d355ed7 100644 --- a/app/src/lib/graph-interface/components/AddMenu.svelte +++ b/app/src/lib/graph-interface/components/AddMenu.svelte @@ -149,7 +149,7 @@ } input { - background: var(--layer-0); + background: var(--color-layer-0); font-family: var(--font-family); border: none; border-radius: 5px; @@ -168,10 +168,10 @@ .add-menu-wrapper { position: absolute; - background: var(--layer-1); + background: var(--color-layer-1); border-radius: 7px; overflow: hidden; - border: solid 2px var(--layer-2); + border: solid 2px var(--color-layer-2); width: 150px; } .content { @@ -184,14 +184,14 @@ .result { padding: 1em 0.9em; - border-bottom: solid 1px var(--layer-2); + border-bottom: solid 1px var(--color-layer-2); opacity: 0.7; font-size: 0.9em; cursor: pointer; } .result[aria-selected="true"] { - background: var(--layer-2); + background: var(--color-layer-2); opacity: 1; } diff --git a/app/src/lib/graph-interface/components/BoxSelection.svelte b/app/src/lib/graph-interface/components/BoxSelection.svelte index eb17343..9e10b83 100644 --- a/app/src/lib/graph-interface/components/BoxSelection.svelte +++ b/app/src/lib/graph-interface/components/BoxSelection.svelte @@ -32,7 +32,7 @@ .box-selection { width: 40px; height: 20px; - border: solid 2px var(--outline); + border: solid 2px var(--color-outline); border-style: dashed; border-radius: 2px; } diff --git a/app/src/lib/graph-interface/components/HelpView.svelte b/app/src/lib/graph-interface/components/HelpView.svelte index 61dd8fb..1a62a66 100644 --- a/app/src/lib/graph-interface/components/HelpView.svelte +++ b/app/src/lib/graph-interface/components/HelpView.svelte @@ -88,12 +88,12 @@ position: fixed; pointer-events: none; transform: translate(var(--mx), var(--my)); - background: var(--layer-1); + background: var(--color-layer-1); border-radius: 5px; top: 10px; left: 10px; max-width: 250px; - border: 1px solid var(--outline); + border: 1px solid var(--color-outline); z-index: 10000; display: none; } diff --git a/app/src/lib/graph-interface/graph/Graph.svelte b/app/src/lib/graph-interface/graph/Graph.svelte index 6f14be2..bc36434 100644 --- a/app/src/lib/graph-interface/graph/Graph.svelte +++ b/app/src/lib/graph-interface/graph/Graph.svelte @@ -244,7 +244,7 @@ z-index: 1; width: 100%; height: 100%; - background: var(--layer-2); + background: var(--color-layer-2); opacity: 0; } input:disabled { @@ -264,8 +264,8 @@ border-radius: 5px; width: calc(100% - 20px); height: calc(100% - 25px); - border: dashed 4px var(--layer-2); - background: var(--layer-1); + border: dashed 4px var(--color-layer-2); + background: var(--color-layer-1); opacity: 0.5; } diff --git a/app/src/lib/graph-interface/graph/colors.svelte.ts b/app/src/lib/graph-interface/graph/colors.svelte.ts index e53647c..6f1f5a9 100644 --- a/app/src/lib/graph-interface/graph/colors.svelte.ts +++ b/app/src/lib/graph-interface/graph/colors.svelte.ts @@ -14,7 +14,7 @@ const variables = [ function getColor(variable: (typeof variables)[number]) { const style = getComputedStyle(document.body.parentElement!); - const color = style.getPropertyValue(`--${variable}`); + const color = style.getPropertyValue(`--color-${variable}`); return new Color().setStyle(color, LinearSRGBColorSpace); } @@ -27,7 +27,7 @@ $effect.root(() => { if (!appSettings.value.theme || !('getComputedStyle' in globalThis)) return; const style = getComputedStyle(document.body.parentElement!); for (const v of variables) { - const hex = style.getPropertyValue(`--${v}`); + const hex = style.getPropertyValue(`--color-${v}`); colors[v].setStyle(hex, LinearSRGBColorSpace); } }); diff --git a/app/src/lib/graph-interface/node/NodeHTML.svelte b/app/src/lib/graph-interface/node/NodeHTML.svelte index 51dca40..8cb2b8d 100644 --- a/app/src/lib/graph-interface/node/NodeHTML.svelte +++ b/app/src/lib/graph-interface/node/NodeHTML.svelte @@ -71,22 +71,22 @@ user-select: none !important; cursor: pointer; width: 200px; - color: var(--text-color); + color: var(--color-text); transform: translate3d(var(--nx), var(--ny), 0); z-index: 1; opacity: calc((var(--cz) - 2.5) / 3.5); font-weight: 300; - --stroke: var(--outline); + --stroke: var(--color-outline); --stroke-width: 2px; } .node.active { - --stroke: var(--active); + --stroke: var(--color-active); --stroke-width: 2px; } .node.selected { - --stroke: var(--selected); + --stroke: var(--color-selected); --stroke-width: 2px; } diff --git a/app/src/lib/graph-interface/node/NodeHeader.svelte b/app/src/lib/graph-interface/node/NodeHeader.svelte index 6652d55..9809ec0 100644 --- a/app/src/lib/graph-interface/node/NodeHeader.svelte +++ b/app/src/lib/graph-interface/node/NodeHeader.svelte @@ -109,7 +109,7 @@ svg path { stroke-width: 0.2px; transition: d 0.3s ease, fill 0.3s ease; - fill: var(--layer-2); + fill: var(--color-layer-2); stroke: var(--stroke); stroke-width: var(--stroke-width); d: var(--path); diff --git a/app/src/lib/graph-interface/node/NodeParameter.svelte b/app/src/lib/graph-interface/node/NodeParameter.svelte index 8581a51..e5fcd3e 100644 --- a/app/src/lib/graph-interface/node/NodeParameter.svelte +++ b/app/src/lib/graph-interface/node/NodeParameter.svelte @@ -175,7 +175,7 @@ svg path { transition: d 0.3s ease, fill 0.3s ease; - fill: var(--layer-1); + fill: var(--color-layer-1); stroke: var(--stroke); stroke-width: var(--stroke-width); d: var(--path); diff --git a/app/src/lib/grid/Cell.svelte b/app/src/lib/grid/Cell.svelte index 49911fa..83d775b 100644 --- a/app/src/lib/grid/Cell.svelte +++ b/app/src/lib/grid/Cell.svelte @@ -62,7 +62,7 @@ cursor: ew-resize; height: 100%; width: 1px; - background: var(--outline); + background: var(--color-outline); } .seperator::before { content: ""; diff --git a/app/src/lib/node-store/BreadCrumbs.svelte b/app/src/lib/node-store/BreadCrumbs.svelte index c1a639e..d2fff15 100644 --- a/app/src/lib/node-store/BreadCrumbs.svelte +++ b/app/src/lib/node-store/BreadCrumbs.svelte @@ -1,5 +1,5 @@ -
+

Project

{#if showNewProject} -
+
diff --git a/app/src/lib/sidebar/Panel.svelte b/app/src/lib/sidebar/Panel.svelte index 19b0bc0..77cd354 100644 --- a/app/src/lib/sidebar/Panel.svelte +++ b/app/src/lib/sidebar/Panel.svelte @@ -43,7 +43,7 @@ diff --git a/packages/ui/src/lib/inputs/Checkbox.svelte b/packages/ui/src/lib/inputs/InputCheckbox.svelte similarity index 84% rename from packages/ui/src/lib/inputs/Checkbox.svelte rename to packages/ui/src/lib/inputs/InputCheckbox.svelte index f2c2185..1435b91 100644 --- a/packages/ui/src/lib/inputs/Checkbox.svelte +++ b/packages/ui/src/lib/inputs/InputCheckbox.svelte @@ -18,7 +18,7 @@