commit f1171307cde554d84b7ca9148713bfc80cdd0f1d Author: piexel Date: Fri Nov 6 00:19:18 2026 +0100 Studio map app: Electron studio for the Iris bridge A standalone Electron + React + Tailwind + shadcn/ui app that connects to the localhost bridge `/iris studio map` opens and draws the world map with the v3e studio's views, shortcuts, hover card, legend and styling. - Finds running bridges from ~/.iris/studio/bridges and iris-studio:// links - Biome, region, height and biome layer views from 128-pixel tiles - Coarser previews first, so the screen fills sooner, then sharpens - Hover card with Shift details, legend census with click to highlight - Ctrl+click teleport, Alt+click open file, right-click menu - Light, dark and system themes from the v3e studio palette diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..3794c4269 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +node_modules/ +out/ +dist/ +*.log diff --git a/components.json b/components.json new file mode 100644 index 000000000..7ce205491 --- /dev/null +++ b/components.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": false, + "tsx": true, + "tailwind": { + "config": "", + "css": "src/renderer/src/styles.css", + "baseColor": "neutral", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/ui", + "lib": "@/lib", + "hooks": "@/hooks" + }, + "iconLibrary": "lucide" +} diff --git a/electron.vite.config.ts b/electron.vite.config.ts new file mode 100644 index 000000000..0508e88c4 --- /dev/null +++ b/electron.vite.config.ts @@ -0,0 +1,21 @@ +import { resolve } from 'node:path' +import { defineConfig } from 'electron-vite' +import react from '@vitejs/plugin-react' +import tailwindcss from '@tailwindcss/vite' + +export default defineConfig({ + main: {}, + preload: { + build: { + rollupOptions: { + output: { format: 'cjs', entryFileNames: '[name].cjs' } + } + } + }, + renderer: { + resolve: { + alias: { '@': resolve(import.meta.dirname, 'src/renderer/src') } + }, + plugins: [react(), tailwindcss()] + } +}) diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..c62737202 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,4525 @@ +{ + "name": "iris-studio", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "iris-studio", + "version": "0.1.0", + "dependencies": { + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "cn": "^0.5.2", + "lucide-react": "^1.69.0", + "radix-ui": "^1.8.1", + "react": "^19.3.1", + "react-dom": "^19.3.1", + "tailwind-merge": "^3.7.0" + }, + "devDependencies": { + "@tailwindcss/vite": "^4.3.4", + "@types/node": "^26.6.6", + "@types/react": "^19.3.0", + "@types/react-dom": "^19.3.0", + "@vitejs/plugin-react": "^6.2.1", + "electron": "^45.2.3", + "electron-vite": "^6.0.0", + "tailwindcss": "^4.3.4", + "typescript": "^7.0.2", + "vite": "^8.3.6", + "vitest": "^5.1.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.13.tgz", + "integrity": "sha512-j1nvOQCZYSgp7HLmisnCXFTpVvFODiijQ9QHkORfGKWH6YDtskTEeCJS7eV545GZ9UBzrq0e2xsOd5QQ5PjIqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.13", + "@babel/helper-compilation-targets": "^7.29.13", + "@babel/helper-module-transforms": "^7.29.13", + "@babel/helpers": "^7.29.13", + "@babel/parser": "^7.29.13", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.13", + "@babel/types": "^7.29.11", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.2.tgz", + "integrity": "sha512-GYrCADwpu6yV5OAvchkQ27Z5wwMxWAEMg5NNWjyHh/5DboFFqbdbvYNIvZouQpxXyeMPoTOh0vdPYKlf0ZswdQ==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.13.tgz", + "integrity": "sha512-T5FRo+RzVHvGjWOuF1Ljc44b+NXAOazodHkGUHp4I3zCkQ4/sNVJm56h1S278LMR0bY5xBhztGziSbli8zObIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.13", + "@babel/types": "^7.29.11", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.13.tgz", + "integrity": "sha512-8WxJ4/Vmes3ghacj8VOJy3NW8eyHiFY/4thU/LSBuBE470+igjR/j1ZTNn8fV5VdNrLx6iXUwig526UdOvfP0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.2.tgz", + "integrity": "sha512-GYrCADwpu6yV5OAvchkQ27Z5wwMxWAEMg5NNWjyHh/5DboFFqbdbvYNIvZouQpxXyeMPoTOh0vdPYKlf0ZswdQ==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.13.tgz", + "integrity": "sha512-/U96wOz+SCoZ7Da/8kjDGltcNY280JPQcRNPK0Hk3PTbdpaiBDQImtC6JsbVwb1HGMr3usZQU2WsWVjhYNmRzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.13" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.13.tgz", + "integrity": "sha512-fWegr+WsEsiMVW4KUNdIIzzMTZSzNiqhy0//6+2MRi2d5NFNsL/AYwBQW8eBnRbTBVRnDVzjaJEUqKaCWjMMdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.13.tgz", + "integrity": "sha512-laoRpD/kO/iA4CDlgJbixHekg7oPvWALK0PQyK3Ob2I2njZRvVAD77RfWCIImtqWCq6KijoBoZK7bp/HlTWASQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.11" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.13.tgz", + "integrity": "sha512-fJM50YYjlTiBhgdkGmC1tBpv+FMAyo4annf2X6Aks+0yRlaiVkYW/3f07xAfVVkYIoZ9fFZp+mEThUFnuybhkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.11" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.29.7.tgz", + "integrity": "sha512-N7zArUXWzAMzm+/N0uPBeVB3Fam5lMxtUwMmDK5f/IBBS7a7p1qeUoxd/6CckXoxUdgsntq1Dh8xNW06maZbDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.13.tgz", + "integrity": "sha512-0ve0xMlFA73dgY1oyJRY6RoW+/bncdcOQqg6jjYcVfXBK90OdLXjm9R6lmRetdZVrPjXkKIoMVBqYFPjcAlZ4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.13", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.13", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.11", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.11", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.11.tgz", + "integrity": "sha512-WCsemW40Cpc6gouC1SrY6PBaZ+oLRlEVY9XBvZBI7il/HyUrb2nJ505wE1MHEFyDZNnrWDEuy4jL50WVHfTTSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.11", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@electron-internal/extract-zip": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@electron-internal/extract-zip/-/extract-zip-1.0.8.tgz", + "integrity": "sha512-8iajeLFbzNwM0m3AsQZSZgYREWglAImyGvvFSWU34FgMW8sHlzdwj9QKvv9dgN7jMP591EFUF/sLOC3Jl9YIjQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/@electron/get": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@electron/get/-/get-5.1.0.tgz", + "integrity": "sha512-3kSBtG8ObcTVfXanm5vVJ6UnBLEVmVsRk1M+vGqCuMBV+XLCbJYuWQful+yIy0GQDsSlK0kHEriEHn7SPk4EnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.1", + "env-paths": "^3.0.0", + "graceful-fs": "^4.2.11", + "progress": "^2.0.3", + "semver": "^7.6.3", + "sumchecker": "^3.0.1" + }, + "engines": { + "node": ">=22.12.0" + }, + "optionalDependencies": { + "undici": "^7.24.4" + } + }, + "node_modules/@floating-ui/core": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.8.0.tgz", + "integrity": "sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ==", + "license": "MIT", + "dependencies": { + "@floating-ui/utils": "^0.2.12" + } + }, + "node_modules/@floating-ui/dom": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.8.0.tgz", + "integrity": "sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg==", + "license": "MIT", + "dependencies": { + "@floating-ui/core": "^1.8.0", + "@floating-ui/utils": "^0.2.12" + } + }, + "node_modules/@floating-ui/react-dom": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.9.tgz", + "integrity": "sha512-JDjEFGCpImxDCA7JJKviA0M9+RtmJdj0m/NVU5IMgBK+AmZouAQQ7/+2GLH0GXXY0YMw9oXPB8hKdbPYg5QLYg==", + "license": "MIT", + "dependencies": { + "@floating-ui/dom": "^1.8.0" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, + "node_modules/@floating-ui/utils": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.12.tgz", + "integrity": "sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww==", + "license": "MIT" + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.156.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.156.0.tgz", + "integrity": "sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/oxc-project" + } + }, + "node_modules/@radix-ui/number": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.1.3.tgz", + "integrity": "sha512-Road2bidD0uu/1BGDOWNdPI06g0lIRy6IF9GZcIrDK2KGItfor8IQwQa+yM2ERgHM1MmHxaxpTzk0/Jp42lNfA==", + "license": "MIT" + }, + "node_modules/@radix-ui/primitive": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.2.0.tgz", + "integrity": "sha512-KABY+VMIRPJL+Vyzv/335FEhXXD/xDv8BMb1kl48/aXJZMH0LtHCTx5ga5RnxaEP3nZHtmTLf1P9vanmFX46bw==", + "license": "MIT" + }, + "node_modules/@radix-ui/react-accessible-icon": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-accessible-icon/-/react-accessible-icon-1.2.0.tgz", + "integrity": "sha512-BB4+HHkFl3HipEAhm/mLhrpXV+2kRX7MvY4AaImUcQVeWQt5KhV1JEByNs8NGfJOcr95RcQGijt9+OrCo68xGA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-visually-hidden": "1.2.13" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-accordion": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.3.1.tgz", + "integrity": "sha512-lCZ6sbGS/7WO0j84yx4srIgOf0MRJ/sZ13RonADXxvKBym8xrxNCq5f6DibGcr38sIlwPk8/52uYdXeOPsbEDw==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-collapsible": "1.2.1", + "@radix-ui/react-collection": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-direction": "1.2.0", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-controllable-state": "1.3.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-alert-dialog": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-alert-dialog/-/react-alert-dialog-1.2.1.tgz", + "integrity": "sha512-MWC4N7RY+qsbNrFNo7yQ9ZbdoZEW+B5DtpWxJfUnVCqcQxxqqg3qis3RMPTDbCNaTIdHJSn5XDkl9ZdVWXknLg==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-dialog": "1.3.1", + "@radix-ui/react-primitive": "2.2.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-arrow": { + "version": "1.1.17", + "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.17.tgz", + "integrity": "sha512-67jjcVvxjXCCStnTW3Z+M7jmaFMuMR7M2JgpDzH4w7JSRrikmzhjfYgP/09ECb8n7whnsgh1ifJ+Ie96qEj+pQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-primitive": "2.2.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-aspect-ratio": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-aspect-ratio/-/react-aspect-ratio-1.2.0.tgz", + "integrity": "sha512-gHEU+Lx8DlT/FYIjZQvvBJrFSwUngXTjh7FeL9QvJaNALDLez6pgDj2axCUihBjtPBy82LN0gNb25+sTcSXNmA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-primitive": "2.2.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-avatar": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-avatar/-/react-avatar-1.3.1.tgz", + "integrity": "sha512-ssZOkfQNkFpYVmCPQlr978xSaU7moSrGXdwg4j2Xs2WlGl/1KsSZtfpK+WnLnx0Rwll1BAh6oUrAy/uR31SBvQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-callback-ref": "1.1.5", + "@radix-ui/react-use-is-hydrated": "0.1.3", + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-checkbox": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.4.1.tgz", + "integrity": "sha512-KWtwhh+98ML3seZ9vO9yRY2OwaQG90dCiDAxjpSNY2AaZ3Hik3B0dsk6m0ILywo/no3A9/SozadyPMNweVT8yw==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-size": "1.1.5" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-collapsible": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.2.1.tgz", + "integrity": "sha512-fSzLb/qy1wuZSxQBcxpW0hNXYHDMWiIXDGyJGdA4+FSLknOWZsNRrTCUavxb4PI8b8lvHo/CysO6NVi5zLpo5g==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-collection": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.2.0.tgz", + "integrity": "sha512-+yiQzqcc7Sy7/5s0jrMCjpPRFB3538VNrXPWdTLZhE/SCfgEws4aI6lHWN/vvcnyhHndROWBzqmqB4QBrITZ9Q==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-slot": "1.5.0", + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-compose-refs": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.5.tgz", + "integrity": "sha512-+48PbAAbq3didjJxa+OaWY2ZwgAKsNiRGyeHKszblZMQ+kcpd9pAaT11cMkGEie0vsOi3QdeTE6d5Fe3Gn61kA==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-context": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.3.0.tgz", + "integrity": "sha512-v5AYEocMISkbJ+1fTXzZpiFv7NRr3D2WiYbLIKf+FkmJ8VkP6d503eV2n34MFussHXY1pcoq3yfJiQH77dc4Mg==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-context-menu": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-context-menu/-/react-context-menu-2.4.1.tgz", + "integrity": "sha512-Pddn3Z8lio3/ChxyXaEP3jHTTo1LTHCWwF8+mG1chQlWijP+ttVHBKwezrQTiV6Mj670ojvumqvuGh+mdv33iQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-menu": "2.2.1", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-controllable-state": "1.3.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dialog": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.3.1.tgz", + "integrity": "sha512-+0E4qvVTwjAWra9sEhJ+9BTsvHE00zkUuNw1VGh7S+Gc13dfYk+S1PVQdchWDj+XYHhAai7Z7IpzXVDCGsDplg==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-dismissable-layer": "1.2.1", + "@radix-ui/react-focus-guards": "1.2.0", + "@radix-ui/react-focus-scope": "1.3.1", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-portal": "1.2.0", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-slot": "1.5.0", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-layout-effect": "1.1.4", + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.7.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-direction": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.2.0.tgz", + "integrity": "sha512-FtRA52a/r+LKStFT+neLUm+8vSe7wbzkbQGGeU8ixFiwC8NU14Evoq9ATECqL3eGbcUzJR4fyfA4KkK/q6dfqg==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dismissable-layer": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.2.1.tgz", + "integrity": "sha512-KIfDcAsx+oVylFZ4xryVKusJUrLLhTQmfnJW4kwk4Km5myvhHCrj04hnWWUC166+xD4DHdH8tQGylwYX1h6+Pg==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-callback-ref": "1.1.5", + "@radix-ui/react-use-effect-event": "0.0.5" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-dropdown-menu": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.2.1.tgz", + "integrity": "sha512-XsHcmYG2AcqnvTqrOXXWcMrhquEIlqucizuDH1MV/qMRW+DndpBCMvNeTRXOxqmG1H5j89M/+I0/34Zdd+zDcQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-menu": "2.2.1", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-controllable-state": "1.3.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-focus-guards": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.2.0.tgz", + "integrity": "sha512-MPm5R0iRGUDrDnPNxmLBkv+X7pN4XKzt+MbWJEuJQsH3NFH4omrbpXpucyYCCKTSt+na/ZxGhEWQrWTZ0285cA==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-focus-scope": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.3.1.tgz", + "integrity": "sha512-ugeMhbXt4y5S2T1GnIqbWDKEN962PDwnX1fN0eKOOgf5f63Dh2mn8F1FUySlgW0iF6GiVsRF32DzuDIWTUyQJg==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-callback-ref": "1.1.5" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-form": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-form/-/react-form-0.3.0.tgz", + "integrity": "sha512-KnmrCM27m7Jo1R8S6cFDPrEeq20Jfn5dqde0SZrJr2lVXlj6/QZSUCyFoYh1d8ti0uUrMNK5Lx6dUDuINT+f4Q==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-label": "2.1.17", + "@radix-ui/react-primitive": "2.2.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-hover-card": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-hover-card/-/react-hover-card-1.2.1.tgz", + "integrity": "sha512-4QooHxgmpCKRjj1Pft+hETKidYcrbPKcVwMGtk2Oa5DcWY2IH1fHuQt9LG6q5hUQBBV2MhQxSvtx6B/C1xfiTw==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-dismissable-layer": "1.2.1", + "@radix-ui/react-focus-scope": "1.3.1", + "@radix-ui/react-popper": "1.4.0", + "@radix-ui/react-portal": "1.2.0", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-controllable-state": "1.3.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-id": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.4.tgz", + "integrity": "sha512-TMQp2llA+RYn7JcjnrMnz7wN4pcVttPZnRZo52PLQsoLVKzNlVwUeHmfePgTgRluXFvlD3GD5g5MOVVTJCO0qA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-label": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/@radix-ui/react-label/-/react-label-2.1.17.tgz", + "integrity": "sha512-xmj7MN/drx1oUAXkfiFIvyDmGNUIN/omGobvA5oAoNqu9zO2MkISYGZOkBcqSzs/UZXXwV+/3ACRE7q7mGcmkA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-primitive": "2.2.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-menu": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.2.1.tgz", + "integrity": "sha512-G34BsU90SBj5foYpz8pQqq/Q0Dlfyyl6KitWEfRwXC0QvfwhWNAwS49DWP2+rRJ0iwv20Z2Qx7Sk+T03bGo5JA==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-collection": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-direction": "1.2.0", + "@radix-ui/react-dismissable-layer": "1.2.1", + "@radix-ui/react-focus-guards": "1.2.0", + "@radix-ui/react-focus-scope": "1.3.1", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-popper": "1.4.0", + "@radix-ui/react-portal": "1.2.0", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-roving-focus": "1.2.1", + "@radix-ui/react-slot": "1.5.0", + "@radix-ui/react-use-callback-ref": "1.1.5", + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.7.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-menubar": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-menubar/-/react-menubar-1.2.1.tgz", + "integrity": "sha512-bRTYtS9JITV2dUYqYZb7+N5SooQBkZrNRejfmyrSKe3Y57aXhKgx//kBUP0kY7pEpsWR/U1AHsAJRzjwCrK3PA==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-collection": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-direction": "1.2.0", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-menu": "2.2.1", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-roving-focus": "1.2.1", + "@radix-ui/react-use-controllable-state": "1.3.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-navigation-menu": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-navigation-menu/-/react-navigation-menu-1.4.1.tgz", + "integrity": "sha512-XPPZjkeyCSMNNvt0FyDv/PUauG7Ow4GwHQ/XZSwW36F/TS7rR4HFTsXH8ewLnXTOLn3x96/pmTPNQIVoTX/86g==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-collection": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-direction": "1.2.0", + "@radix-ui/react-dismissable-layer": "1.2.1", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-slot": "1.5.0", + "@radix-ui/react-use-callback-ref": "1.1.5", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-layout-effect": "1.1.4", + "@radix-ui/react-use-previous": "1.1.4", + "@radix-ui/react-visually-hidden": "1.2.13" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-one-time-password-field": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-one-time-password-field/-/react-one-time-password-field-0.2.1.tgz", + "integrity": "sha512-KtHdcgnaAK6rohQ/MMJoGYcbgSRJsIuGBdHrFeTB1/9SaKlDs14oSOniW6BL6M43HqvgCO3u4WuVdFLkuc6sqw==", + "license": "MIT", + "dependencies": { + "@radix-ui/number": "1.1.3", + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-collection": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-direction": "1.2.0", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-roving-focus": "1.2.1", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-effect-event": "0.0.5", + "@radix-ui/react-use-is-hydrated": "0.1.3", + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-password-toggle-field": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-password-toggle-field/-/react-password-toggle-field-0.2.1.tgz", + "integrity": "sha512-vu4+ZoJAaFjdI7l1lDSZRs+4dEv83Jmu7lyzajPrAeQzX74y84n0rUNWbWSgN9XB5NE8IY86Z02kGH6oRrzR+w==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-effect-event": "0.0.5", + "@radix-ui/react-use-is-hydrated": "0.1.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-popover": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.3.1.tgz", + "integrity": "sha512-ZNxvXRx5W2Wos4fXCXb5lpdqN0Z5chf+mStOUOTr4ik7d+62MRvoe9rzCA/eGNg36lxXqSrKEKmwuZEcUrIstw==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-dismissable-layer": "1.2.1", + "@radix-ui/react-focus-guards": "1.2.0", + "@radix-ui/react-focus-scope": "1.3.1", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-popper": "1.4.0", + "@radix-ui/react-portal": "1.2.0", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-slot": "1.5.0", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-layout-effect": "1.1.4", + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.7.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-popper": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.4.0.tgz", + "integrity": "sha512-yCWRvLeGv9Pz3+efwHqGPp70mZ56r3kfIgQVF56Oj2aAa4uP/Tb+IE59wNcc+758rctqbCKx4LbK8II/r7Bn0Q==", + "license": "MIT", + "dependencies": { + "@floating-ui/react-dom": "^2.0.0", + "@radix-ui/react-arrow": "1.1.17", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-callback-ref": "1.1.5", + "@radix-ui/react-use-layout-effect": "1.1.4", + "@radix-ui/react-use-rect": "1.1.4", + "@radix-ui/react-use-size": "1.1.5", + "@radix-ui/rect": "1.1.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-portal": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.2.0.tgz", + "integrity": "sha512-StX7xXnaRU41VvFtMm9zlhVGz8XF6GmWWTXftkQaY+tqVkbs/R9UmAp5mLzHHapk5hM9RMZQvO/3usyIP/g42g==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-presence": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.11.tgz", + "integrity": "sha512-Z7/atlkab36Z8hm+V8zYc79r0W+tiOB1o0tun1By94JyadkekLQmtEAnBSP9XKXBNQsStoStS4+gX10JpS5akA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-primitive": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.2.0.tgz", + "integrity": "sha512-HCTSPMNqv55Qk0IX4geJbpyXazmqulcimwuyjxTkKi29v+QZbG2Zho9BnbBq4YS2PF+KlNb2CXoLz66uUmblkg==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-slot": "1.5.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-progress": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-progress/-/react-progress-1.2.1.tgz", + "integrity": "sha512-yQBiM6J3YM8Ums1orkEFpbznK47geKxa0igikzcaS1xHgdba3DdAQBsGbCTt5BVfR8zhEvgxQ0poGcINaD3lvw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-primitive": "2.2.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-radio-group": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-radio-group/-/react-radio-group-1.5.1.tgz", + "integrity": "sha512-QbyVT1ddnjqB9H+CUYKkNWdU9fIK3QHCYtjf7mS6ekSqiuXkWtWn5UZW9mhA8qtl3vrVyIsmR9gePstAtKrqkw==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-direction": "1.2.0", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-roving-focus": "1.2.1", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-size": "1.1.5" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-roving-focus": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.2.1.tgz", + "integrity": "sha512-UwraORzVUeEPMclhO1p0vz0qI+TbdDLO9i+FiOqhJyHKwdpCRCck9yVEscUnAMIzCiuNoQa8D4A9bIpOPXGt6Q==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-collection": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-direction": "1.2.0", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-callback-ref": "1.1.5", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-is-hydrated": "0.1.3", + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-scroll-area": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-scroll-area/-/react-scroll-area-1.4.0.tgz", + "integrity": "sha512-CFrLqHNejWq5FhKAcj9V/WPGRsol76HBQto81NdOBVFEOqIEkJkKIJt0Z824A/9hHLCtoiR/Kw3euRgzXP2pxg==", + "license": "MIT", + "dependencies": { + "@radix-ui/number": "1.1.3", + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-direction": "1.2.0", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-slot": "1.5.0", + "@radix-ui/react-use-callback-ref": "1.1.5", + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-select": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.4.1.tgz", + "integrity": "sha512-888ZwW0Md6GyptuqYABRX9nLKgoYfcooCyBBvVaX5Jp3e+8Jp2i4Zo/Uy50Hm+Ysn2JfloQXstW4U36w8teVtg==", + "license": "MIT", + "dependencies": { + "@radix-ui/number": "1.1.3", + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-collection": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-direction": "1.2.0", + "@radix-ui/react-dismissable-layer": "1.2.1", + "@radix-ui/react-focus-guards": "1.2.0", + "@radix-ui/react-focus-scope": "1.3.1", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-popper": "1.4.0", + "@radix-ui/react-portal": "1.2.0", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-slot": "1.5.0", + "@radix-ui/react-use-callback-ref": "1.1.5", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-layout-effect": "1.1.4", + "@radix-ui/react-visually-hidden": "1.2.13", + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.7.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-separator": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.2.0.tgz", + "integrity": "sha512-1jUAap0wZEqVP05Ou7kJgRxe/W+Qftng+rUNWGa0qkKbv9r5pWTG3E7a3ELKo2eJoHKMECnzuYrZpSyO1YgcYQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-primitive": "2.2.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-slider": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slider/-/react-slider-1.6.1.tgz", + "integrity": "sha512-IRNRR90moPqxfwCJ0XbMJIxo70W0/1ZExT/sNCxEHMaPx0SF9HoQrcPEC75+H28cFKa0b+KH63anfLYJmwKacw==", + "license": "MIT", + "dependencies": { + "@radix-ui/number": "1.1.3", + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-collection": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-direction": "1.2.0", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-layout-effect": "1.1.4", + "@radix-ui/react-use-size": "1.1.5" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-slot": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.5.0.tgz", + "integrity": "sha512-tyYd9ddPXAysAbdbD9eYxgwpCSv6f3PncqVSNKQFSR5lcJVLz3cb/pANDoYrLiHBpXv7skortyUgGUWsYuPPFQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.5" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-switch": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-switch/-/react-switch-1.4.1.tgz", + "integrity": "sha512-NpBGwc40rY02ZmSvuyeKk0Bvc8ZsNeTMi4qHvJ+ZH4EiYCv0zIXEgdCW4bVdzgIUeP9xxbLJSxKOUfqITYNmkA==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-size": "1.1.5" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-tabs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.2.1.tgz", + "integrity": "sha512-hRoJlode+hg5ZNlR+3tkfkUliIybdTpD5lkAvHQ9yaXseGf7XVO9Ib2GPEIOuaJJbo7YWYbNpDDRfo8Dhf6/xA==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-direction": "1.2.0", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-roving-focus": "1.2.1", + "@radix-ui/react-use-controllable-state": "1.3.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-toast": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-toast/-/react-toast-1.3.1.tgz", + "integrity": "sha512-iQvL0J7XK4HtJNGkkWMyYrboNseI7vtotFeUkIno8YNxVA9oM7B6//fh0Mc6TSKI96+zioLWi98lQLso88yJmQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-collection": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-dismissable-layer": "1.2.1", + "@radix-ui/react-portal": "1.2.0", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-callback-ref": "1.1.5", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-layout-effect": "1.1.4", + "@radix-ui/react-visually-hidden": "1.2.13" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-toggle": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle/-/react-toggle-1.2.1.tgz", + "integrity": "sha512-+3MUq+WyiBplXYqQ0EIYlq8R4sLQ0T5NbOK7DMdDLCKO93pe2uE0DUJTWWfTBprpJJXxfoF3eMW0xpakVZrYsg==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-use-controllable-state": "1.3.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-toggle-group": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle-group/-/react-toggle-group-1.2.1.tgz", + "integrity": "sha512-O8Ldx5ao4p4KoW+DO8/PmkOe5mdKNi3F2SseqjVj88wvDGDHe60cUmO0Zm/uHsKrvNgQGV8Efpuh95Tht/h4vw==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-direction": "1.2.0", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-roving-focus": "1.2.1", + "@radix-ui/react-toggle": "1.2.1", + "@radix-ui/react-use-controllable-state": "1.3.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-toolbar": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-toolbar/-/react-toolbar-1.2.1.tgz", + "integrity": "sha512-Cm8m7JTEeUdbfA6T9xgyu8HfOpyvSx8pB/wj0DlEuWaJe9FilIs4Az9wci/lU9RbthV/UkltszMw5WnnD+m/Ug==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-direction": "1.2.0", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-roving-focus": "1.2.1", + "@radix-ui/react-separator": "1.2.0", + "@radix-ui/react-toggle-group": "1.2.1" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-tooltip": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.4.1.tgz", + "integrity": "sha512-NxLFGSFtZ78zVfcoOhTwR1xwqo5qx1Jh8Pw6FMZ9McCaqfRzz7/gIRahs2Oy5XlPgQ+8QkUcKbN5B0U44J/kCg==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-dismissable-layer": "1.2.1", + "@radix-ui/react-focus-scope": "1.3.1", + "@radix-ui/react-id": "1.1.4", + "@radix-ui/react-popper": "1.4.0", + "@radix-ui/react-portal": "1.2.0", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-slot": "1.5.0", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-layout-effect": "1.1.4", + "@radix-ui/react-visually-hidden": "1.2.13" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-callback-ref": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.5.tgz", + "integrity": "sha512-Y5GBf4NKeADoXI1geiMlMuMoURT3k9MizzzKhGb/m55H94aGigZ01PIpkvsO6lML13BA6XYAXSJ6gza7vTn5nw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-controllable-state": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.3.0.tgz", + "integrity": "sha512-TAcBI7bw2ljYCbv4+zuTSd6zICu8pRt6SDN2vJ/Z06K2MXh6I9WYFe/A9ovlFDtR5HVHGm5iDxDoABm/++dbKg==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-use-effect-event": "0.0.5", + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-effect-event": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.5.tgz", + "integrity": "sha512-7cshFL8HGS/7HEiHH+9kL9HBwp2sa9yX18Knwek6KYWmXwM7pegMgta2AXMQKI+rq3JnfSj9x8wYqFMTdG1Jgg==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-escape-keydown": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.6.tgz", + "integrity": "sha512-9cRullnQRv+kqnRmFlmh0WC3kAPuGmHiQ9VwsXdrYk//sBhgCKEttcpPEPgIQbyx6TGUmooVEHYTyohwz/lSJg==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-callback-ref": "1.1.5" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-is-hydrated": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-is-hydrated/-/react-use-is-hydrated-0.1.3.tgz", + "integrity": "sha512-umO/aJ+82CpOnhDZUTbILCQf7kU/g0iv+oGs/Q8jw7IkhWBzaEP4sA268PhFAJTFetbwp3ICc6ktpI4TqtxcIw==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-layout-effect": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.4.tgz", + "integrity": "sha512-K20DkRkUwDnxEYMBPcg3Y6voLkEy5p5QQmszZgLngKKiC7dzBR/aEuK3w1qlx2JWDUNH6FluahYdgR3BP+QbYw==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-previous": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.4.tgz", + "integrity": "sha512-XoSLhbRbqxFtgJoi2fNHA3C6pDlY34x508vUpUGoFZfvePfHXHbE1lC4FYFMnJWgiCRroSTw6fOsXQoVS9RwZg==", + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-rect": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.4.tgz", + "integrity": "sha512-cSOCh6JlkmfjLyNcLiu2nB4v+nm+dkZ+Q5KHWk/soo4U7ZLiEQFKHK9/YmtBHjfCEaU43IBKQOc4/uJmCaiCTQ==", + "license": "MIT", + "dependencies": { + "@radix-ui/rect": "1.1.3" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-size": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.5.tgz", + "integrity": "sha512-V1McDQkMGzgivwqdu7u96APs7oi0Jvj9LTzgq3WWrDZqxWdAqU9yZnZQqk5OizGFR8badUQwZsrlao7MOlWYOA==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.4" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-visually-hidden": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.2.13.tgz", + "integrity": "sha512-feijiN1oPk4rck4u9Dm9tsU4mT6Wp9oeEEhaz1WUEs1VuqLf8xzsFG+Qk+uWq6TnMH9O+WRECRg0NftyP9E4Fw==", + "license": "MIT", + "dependencies": { + "@radix-ui/react-primitive": "2.2.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/rect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.3.tgz", + "integrity": "sha512-JtyZR+mqgBibTo8xea3B6ZRmzZiM/YeVBtUkas6zMuXjAlfIFIW2FgqeM9eLyvEaYX66vr6DJMK+4U6LV0KhNw==", + "license": "MIT" + }, + "node_modules/@rolldown/binding-android-arm-eabi": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.16.tgz", + "integrity": "sha512-ia3DwAs0OsMGS7+IConptSiyk9pEXkOx/AbJ2n/lAGxH3QkWQus1t8d7gnAT38FCU2sQu8lUbeR6AiZFv4JxaA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.16.tgz", + "integrity": "sha512-kx5wBiMB6E7TEvpl2B9gjLU004BkvEm2Dr941BFjx/SontPwSzNuQUIoVKxHHoSjpFIfHMmcguyLOtyn0hObRg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.16.tgz", + "integrity": "sha512-qslZrXnKJU4cUpjoAmtAo/KQM9e2IRMlmpig6Zpwj+8KWxW8v+nkAf9216Bsek9lOC1jvg2yCjygCFo2f83msQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.16.tgz", + "integrity": "sha512-FdF+y48ND13eAyM2mQn+85kvAqNlvRWROy2rhgA463X/0Gv4vGtazZtfaF1mRBLscYvtOlh4QnLjOWiFzX69OQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.16.tgz", + "integrity": "sha512-ddjqFM5e95AgLbUPtKIS7V1KTVlA0RUgCVr5mn+/IEhsdy3pr+Vuj/HZ7nlMN2FyxIwUktOH1LEPIQXO1v9y1Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.16.tgz", + "integrity": "sha512-tHdKWbFkFBI687iim3LIyIvyL7j66VvQYkDPss5Stn/qyE2tWkR1YD0dXmXPFKKqT/o5ZEJVsaRsWS2meQwGOA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.16.tgz", + "integrity": "sha512-FJiLGAblPBMlBEdbOqw6kW6QcXDWAf/oJu7gYs9ZJZwmg+K+/zjFLxPTIY9izJUzxzc24FHvmseyA0IvJSl17w==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.16.tgz", + "integrity": "sha512-hrJpblMsrQ58U9veWpbXzkhV5zStunds6HWLprqq1qauvgBr1E6P+24kLj6lSLI9vjRn/RYpjprhkHQPKGWpNg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.16.tgz", + "integrity": "sha512-qJd/dC6j6CwLG9/s/RP2nb1RZ0GIgj7Ioj7x/SYa3RzjVrlzrmH0fhIOpfvqQDeIsdP0loi+kHaMhJzY1PBIaA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.16.tgz", + "integrity": "sha512-Vx7Xg5uUJuNcujJjI70OICaH0EYj80BtOLZTSN7uOYg8QOLlyKnaG0IW7Fn/J0IpJsaKzmDKMhOQv1JBM9m9vg==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.16.tgz", + "integrity": "sha512-TNKhgE3uJTsTzatUSSYt0Kgo+Oa2uSlSjz4r1aEIea7HX6ULBym4fAlYUhG1i6pjNf2njfCUAfKwr6C3E9Xg1w==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.16.tgz", + "integrity": "sha512-7chXdpjXZ8qG0+mIxECN3cT9kvhZ3/oZhMX6Pp876P7CDrIy8nJswva6Mq357JR7eYXfuskwZxMeV1SzoZdHrA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.16.tgz", + "integrity": "sha512-Kwjt+7uNTJK5/MDkGWGVO2KQPnj8yAV75dMpfwyHZrJSXWHrniOB0aUEWlVYf3H1hOqFLIStLdM5QXq6bnKmOQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.16.tgz", + "integrity": "sha512-/LH6WfjDRXXJz/p5xl4TmU+jpcnwcxbKEQBW/GZE0JHfN0lGIyTtsUEGaQ/q/GikkGJ2yLKe6pwm7AnEWO8pdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.16.tgz", + "integrity": "sha512-1lv1KvX0Z871zfk7vw+dnXMMnHNyDwMzWG8Kv3HxDXMOhzCX4SHc7HK319fInP0i+0p9D8brkfzL7pJOaGl+tw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tailwindcss/node": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.4.tgz", + "integrity": "sha512-b7QK/QG04v3j04NbpG82XLCedRyulnkuwUDwRa9oK/ypnJIzMapz2Wg+0TltVczjUzDaJJHIa1+jj9aMUOFMTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "^5.24.5", + "jiti": "^2.7.0", + "lightningcss": "1.33.0", + "magic-string": "^1.1.0", + "source-map-js": "^1.2.1", + "tailwindcss": "4.3.4" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.4.tgz", + "integrity": "sha512-riqsRw2sLF7B1sNCCkTl3KYXEqvhTiABzZ/4oxxHfZ3c3Td60bCBfOrUuUGOiHagd3E7V+zG46c+XBDWZGFBcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.3.4", + "@tailwindcss/oxide-darwin-arm64": "4.3.4", + "@tailwindcss/oxide-darwin-x64": "4.3.4", + "@tailwindcss/oxide-freebsd-x64": "4.3.4", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.4", + "@tailwindcss/oxide-linux-arm64-gnu": "4.3.4", + "@tailwindcss/oxide-linux-arm64-musl": "4.3.4", + "@tailwindcss/oxide-linux-x64-gnu": "4.3.4", + "@tailwindcss/oxide-linux-x64-musl": "4.3.4", + "@tailwindcss/oxide-wasm32-wasi": "4.3.4", + "@tailwindcss/oxide-win32-arm64-msvc": "4.3.4", + "@tailwindcss/oxide-win32-x64-msvc": "4.3.4" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.4.tgz", + "integrity": "sha512-qkjxt+EFocOi3mtsUS3ndlj6yj4SHubwBdvBynLnS8T4mvSzX0Enn0CpypJKmBEtczUAXOHVZKA2zTGzSNU2Sg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.4.tgz", + "integrity": "sha512-i/awUA/7mJQAbA3AzCW8aQtUh5goMieUdF1zOoclLaJUCxDvsXQ8VJqpQZY3dfcHS6PJjd3tw25nNneD/mEviQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.4.tgz", + "integrity": "sha512-q56V9U6AnoYz/yj/alkDLhSQ9AZoXQSEl93f7WETa0+32CudbqM57BXdYXfMYPKudueXKaA+MG6L/0KRseF7Jg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.4.tgz", + "integrity": "sha512-r0W7A+Z9HTHh7bwihJl45E/zZKLjxD50/jToVF/E/RZHSl8+EWO+4yKKJpPMcUooT9hdoip3Zx1uWnbMg4N79g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.4.tgz", + "integrity": "sha512-3aih/sRxzeYfi2Bkh+bGYNf2YU9Llamb2mpA7BNF1obYzdgEeWDAMQzK6BSwzLhs/eTdOaSur92qrGfchagUtQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.4.tgz", + "integrity": "sha512-ktJSrPGQou4OqL88rDEx5CkeM9BjzrwZvYo8u7B7VL1zkBa2XBm351o4MQrek95qikb2M++26Y7w7vbH6Mgl8g==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.4.tgz", + "integrity": "sha512-rt3hjUxT7utAtcB+df6wHyaXDyxhE7Zd1x7L/nvB5Jb2qBb8dZwFUoWqeRja1BaF5OlSqkKSjBmVXj9OsevmCQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.4.tgz", + "integrity": "sha512-XE3jO2yOOWjttpeGvpwf3/b274NMi3QapQSAI/EzsgrmYNan1Tw8dXT9JQkN7K0OgvuqiC8mcCyNvGzEkpVJPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.4.tgz", + "integrity": "sha512-PaAZ2FjJaZk9SQLYtKIfQWiFm/xtl7pX2MKPgCzn0mS/VU54yu+vP457AJdB2XFLxU3gO2abLCt8N7Lg4EbKNg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.4.tgz", + "integrity": "sha512-bjO9WmoM687p8AoCIyw1DUqzpAs4JICLvNmIPxIWDmhw8IOsdubtWQLShyJmISnDKtRy1BBApHVOUl6sNFQQJA==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.11.3", + "@emnapi/runtime": "^1.11.3", + "@emnapi/wasi-threads": "^1.2.3", + "@napi-rs/wasm-runtime": "^1.2.2", + "@tybys/wasm-util": "^0.10.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/core": { + "version": "1.11.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.3", + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/runtime": { + "version": "1.11.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/wasi-threads": { + "version": "1.2.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { + "version": "1.2.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.3" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1 || ^2.0.0-alpha.3", + "@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.3" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@tybys/wasm-util": { + "version": "0.10.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/tslib": { + "version": "2.8.1", + "dev": true, + "inBundle": true, + "license": "0BSD", + "optional": true + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.4.tgz", + "integrity": "sha512-jCrwCvWVtt7ruMXp6dFPd5KBNU8o1tWtEdZbTL/w/hvD3lUYZA0E2mmfvTzW4QLHIx5wGQU9HeY7997R1QTrEg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.4.tgz", + "integrity": "sha512-cge1wcedn1FrRSXL22lF5sNDYr8c9+VImk7zFYLPs12jkDmchSrZNfzWqOKub+5Hb/aYRdDEqERGGDKONBlOzQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.4.tgz", + "integrity": "sha512-wGukGWb8SVuN7+FJvSS7M5eSJWDIWwVSvUvj1q41eTIhGPsS2DAgFWjA7YURJNwjHSgty59Hz8iMUiyO+YMHBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.3.4", + "@tailwindcss/oxide": "4.3.4", + "tailwindcss": "4.3.4" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7 || ^8" + } + }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.10.tgz", + "integrity": "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "26.6.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.6.tgz", + "integrity": "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~8.9.0" + } + }, + "node_modules/@types/react": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz", + "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.3.0.tgz", + "integrity": "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==", + "devOptional": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.3.0" + } + }, + "node_modules/@typescript/typescript-aix-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz", + "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz", + "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz", + "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz", + "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz", + "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz", + "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz", + "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-loong64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz", + "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-mips64el": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz", + "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz", + "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-riscv64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz", + "integrity": "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-s390x": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz", + "integrity": "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz", + "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz", + "integrity": "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz", + "integrity": "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz", + "integrity": "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz", + "integrity": "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-sunos-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz", + "integrity": "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz", + "integrity": "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz", + "integrity": "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.2.1.tgz", + "integrity": "sha512-9KyWCij3r0+qLG3Q62vBmv0VyevmYibAtxaCIVK9o0k6CXgaajZRIe8tpfchQcdZArJ5b/7OrIz4W3b2uxVRDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rolldown/pluginutils": "^1.0.1" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0 || ^0.3.0", + "babel-plugin-react-compiler": "^1.0.0", + "oxc-transform-react": ">=0.152.0 <0.157.0", + "vite": "^8.0.0" + }, + "peerDependenciesMeta": { + "@rolldown/plugin-babel": { + "optional": true + }, + "babel-plugin-react-compiler": { + "optional": true + }, + "oxc-transform-react": { + "optional": true + } + } + }, + "node_modules/@vitest/mocker": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-5.1.0.tgz", + "integrity": "sha512-5umB9/jlWcqVS6fsrFmv5Gdnpu6wAUio/lEOwAmvB7v+lFo/IW2B9FhAD0p19GCULTgMzLCdUmuCDCnAzWgppQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.31", + "@vitest/spy": "5.1.0", + "estree-walker": "^3.0.3", + "magic-string": "^1.4.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9 || ^3.0.0", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/spy": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-5.1.0.tgz", + "integrity": "sha512-2DPO5OMHWKrBngC+fCmTQqemNF0gidRhp3lxbBmRhW+M1XJrfgPpqNqWVevXtn2f2ufD5ZaR1B6B641aAlcX5A==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/aria-hidden": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.6.tgz", + "integrity": "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.11.35", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.35.tgz", + "integrity": "sha512-GNk8KX52CHqeNKGk8+7tZnQab/2k1t/BgrUHPKNdijzpEhF1saPQZHVKb6m5loSAxB39gyrTYw34Qf9CQ3u1qQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/browserslist": { + "version": "4.29.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.5.tgz", + "integrity": "sha512-khTmKu5NGYTotqcYo8Bew2k4RAE9PuXRSFRXG2lQBrCEQHyeQ/vX6gKMxfokwywBsLiXZMnHsmWMG1pnO8J7uQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.11.33", + "caniuse-lite": "^1.0.30001819", + "electron-to-chromium": "^1.5.464", + "node-releases": "^2.0.60", + "update-browserslist-db": "^1.3.4" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/cac": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/cac/-/cac-7.1.0.tgz", + "integrity": "sha512-LMDU/U2yA4IPIY8KT0NsNPWEYZvAMkbgyspxJ6btJaYV+WMDOHAZCmB0lsTObiHaRS1V/ztKAl7+TSkTqXyeoA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.19.0" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001822", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001822.tgz", + "integrity": "sha512-Y3fvWQWzc69dlCyr07tuNrEhotv+db5FpMSPD3slZnkPKwRNOKwFBz2dP966XUmWMXLTOt+YShkFoQoom3U7hg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chai": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.3.0.tgz", + "integrity": "sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/class-variance-authority": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.1.tgz", + "integrity": "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==", + "license": "Apache-2.0", + "dependencies": { + "clsx": "^2.1.1" + }, + "funding": { + "url": "https://polar.sh/cva" + } + }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/cn": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/cn/-/cn-0.5.2.tgz", + "integrity": "sha512-wm10E6iuJ37rALOw3D+3cfaXXZSLNMh2uxpQn3dNICqfJM59yXqgbA9/9Iiz155j5kYNLdK6WreNdW3NQtx3OQ==", + "license": "MIT", + "bin": { + "cn": "bin/cn.mjs" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/detect-node-es": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz", + "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==", + "license": "MIT" + }, + "node_modules/electron": { + "version": "45.2.3", + "resolved": "https://registry.npmjs.org/electron/-/electron-45.2.3.tgz", + "integrity": "sha512-Vurzu5UOA5nTGT4LqIwXD16QFGrOZdiXxF+1UP4KNsAOo/YtDcT3/u0jhP4WSwNJ0iLrLDi85hzBJ0arnGDhyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@electron-internal/extract-zip": "^1.0.1", + "@electron/get": "^5.0.0", + "@types/node": "^24.9.0" + }, + "bin": { + "electron": "cli.js", + "install-electron": "install.js" + }, + "engines": { + "node": ">= 22.12.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.477", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.477.tgz", + "integrity": "sha512-PN++F4zWZoVDGWinxMnSCpVqKhqFOJfLXxdU8bYJKudAEsHL/XKVITOKWVbfMt1r276Mi9RDLU9VHx9uKJ4RMQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/electron-vite": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/electron-vite/-/electron-vite-6.0.0.tgz", + "integrity": "sha512-zafg2uizgll7jdx0BNDkkzO/SowsUBsiHqYN3v9Ieq7XPDHreRGZ4G9IRY/+RslgBktpLOjLM4jlP+IVpV0BGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.29.7", + "@babel/plugin-transform-arrow-functions": "^7.29.7", + "cac": "^7.0.0", + "magic-string": "^1.4.2", + "picocolors": "^1.1.1", + "rolldown": "~1.2.10" + }, + "bin": { + "electron-vite": "bin/electron-vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "@swc/core": "^1.0.0", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + } + } + }, + "node_modules/electron/node_modules/@types/node": { + "version": "24.19.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz", + "integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": ">=7.24.0 <7.24.7" + } + }, + "node_modules/electron/node_modules/undici-types": { + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz", + "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", + "dev": true, + "license": "MIT" + }, + "node_modules/enhanced-resolve": { + "version": "5.26.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.26.1.tgz", + "integrity": "sha512-PPnnSJq3azKOIewXR/uppBV/6h98dprBJ/WaQ9Qgj10xX1lJLNfg+XShpbsrSqcDSy2yYYyhfXM1wWhftqgyzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/env-paths": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz", + "integrity": "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/es-module-lexer": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", + "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", + "dev": true, + "license": "MIT" + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/expect-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", + "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-nonce": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz", + "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/jiti": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", + "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", + "dev": true, + "license": "MIT", + "bin": { + "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/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/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/lucide-react": { + "version": "1.69.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-1.69.0.tgz", + "integrity": "sha512-UTFECm4yEgkgMN0kfLuxWcmlk+4u02Jrqehgk3ZXRx/Ud68OpP7hjkp67bvkBHmIpMaZCIveF1QDYeupO7XmYQ==", + "license": "ISC", + "peerDependencies": { + "@types/react": "*", + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/magic-string": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.5.tgz", + "integrity": "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.6.0" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.63", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.63.tgz", + "integrity": "sha512-6li2QanLsAXpIH2R6j77MzRyvOyrvdTqlKtO4CgBdHGNvN99ZZfyxszHc5o5+IZBWD5u6Hzwg83JoGXmqZNG9Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/obug": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/obug/-/obug-3.0.0.tgz", + "integrity": "sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==", + "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT", + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.32.tgz", + "integrity": "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.20", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/radix-ui": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/radix-ui/-/radix-ui-1.8.1.tgz", + "integrity": "sha512-HPfpVGizO9xANlsFSauruLhRe/3+iOt3vPX0MXYle/UQi3gorQrSYtBcdiv0BZYewcl2rvL59qrIuLFMGAmUrw==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.2.0", + "@radix-ui/react-accessible-icon": "1.2.0", + "@radix-ui/react-accordion": "1.3.1", + "@radix-ui/react-alert-dialog": "1.2.1", + "@radix-ui/react-arrow": "1.1.17", + "@radix-ui/react-aspect-ratio": "1.2.0", + "@radix-ui/react-avatar": "1.3.1", + "@radix-ui/react-checkbox": "1.4.1", + "@radix-ui/react-collapsible": "1.2.1", + "@radix-ui/react-collection": "1.2.0", + "@radix-ui/react-compose-refs": "1.1.5", + "@radix-ui/react-context": "1.3.0", + "@radix-ui/react-context-menu": "2.4.1", + "@radix-ui/react-dialog": "1.3.1", + "@radix-ui/react-direction": "1.2.0", + "@radix-ui/react-dismissable-layer": "1.2.1", + "@radix-ui/react-dropdown-menu": "2.2.1", + "@radix-ui/react-focus-guards": "1.2.0", + "@radix-ui/react-focus-scope": "1.3.1", + "@radix-ui/react-form": "0.3.0", + "@radix-ui/react-hover-card": "1.2.1", + "@radix-ui/react-label": "2.1.17", + "@radix-ui/react-menu": "2.2.1", + "@radix-ui/react-menubar": "1.2.1", + "@radix-ui/react-navigation-menu": "1.4.1", + "@radix-ui/react-one-time-password-field": "0.2.1", + "@radix-ui/react-password-toggle-field": "0.2.1", + "@radix-ui/react-popover": "1.3.1", + "@radix-ui/react-popper": "1.4.0", + "@radix-ui/react-portal": "1.2.0", + "@radix-ui/react-presence": "1.1.11", + "@radix-ui/react-primitive": "2.2.0", + "@radix-ui/react-progress": "1.2.1", + "@radix-ui/react-radio-group": "1.5.1", + "@radix-ui/react-roving-focus": "1.2.1", + "@radix-ui/react-scroll-area": "1.4.0", + "@radix-ui/react-select": "2.4.1", + "@radix-ui/react-separator": "1.2.0", + "@radix-ui/react-slider": "1.6.1", + "@radix-ui/react-slot": "1.5.0", + "@radix-ui/react-switch": "1.4.1", + "@radix-ui/react-tabs": "1.2.1", + "@radix-ui/react-toast": "1.3.1", + "@radix-ui/react-toggle": "1.2.1", + "@radix-ui/react-toggle-group": "1.2.1", + "@radix-ui/react-toolbar": "1.2.1", + "@radix-ui/react-tooltip": "1.4.1", + "@radix-ui/react-use-callback-ref": "1.1.5", + "@radix-ui/react-use-controllable-state": "1.3.0", + "@radix-ui/react-use-effect-event": "0.0.5", + "@radix-ui/react-use-escape-keydown": "1.1.6", + "@radix-ui/react-use-is-hydrated": "0.1.3", + "@radix-ui/react-use-layout-effect": "1.1.4", + "@radix-ui/react-use-size": "1.1.5", + "@radix-ui/react-visually-hidden": "1.2.13" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/react": { + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-19.3.1.tgz", + "integrity": "sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.3.1.tgz", + "integrity": "sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.28.0" + }, + "peerDependencies": { + "react": "^19.3.1" + } + }, + "node_modules/react-remove-scroll": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.7.2.tgz", + "integrity": "sha512-Iqb9NjCCTt6Hf+vOdNIZGdTiH1QSqr27H/Ek9sv/a97gfueI/5h1s3yRi1nngzMUaOOToin5dI1dXKdXiF+u0Q==", + "license": "MIT", + "dependencies": { + "react-remove-scroll-bar": "^2.3.7", + "react-style-singleton": "^2.2.3", + "tslib": "^2.1.0", + "use-callback-ref": "^1.3.3", + "use-sidecar": "^1.1.3" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/react-remove-scroll-bar": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.8.tgz", + "integrity": "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==", + "license": "MIT", + "dependencies": { + "react-style-singleton": "^2.2.2", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/react-style-singleton": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.3.tgz", + "integrity": "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==", + "license": "MIT", + "dependencies": { + "get-nonce": "^1.0.0", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/rolldown": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.16.tgz", + "integrity": "sha512-bWvlMpFKiTfDKfnK7FC2MPgPeWCf/Kpwsq49ApdW+FQaBZb6O6dZ4MAPbPUjp7hYQrw/RobqCzn64BRrQecGHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.156.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm-eabi": "1.2.16", + "@rolldown/binding-android-arm64": "1.2.16", + "@rolldown/binding-darwin-arm64": "1.2.16", + "@rolldown/binding-darwin-x64": "1.2.16", + "@rolldown/binding-freebsd-x64": "1.2.16", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.16", + "@rolldown/binding-linux-arm64-gnu": "1.2.16", + "@rolldown/binding-linux-arm64-musl": "1.2.16", + "@rolldown/binding-linux-ppc64-gnu": "1.2.16", + "@rolldown/binding-linux-s390x-gnu": "1.2.16", + "@rolldown/binding-linux-x64-gnu": "1.2.16", + "@rolldown/binding-linux-x64-musl": "1.2.16", + "@rolldown/binding-openharmony-arm64": "1.2.16", + "@rolldown/binding-win32-arm64-msvc": "1.2.16", + "@rolldown/binding-win32-x64-msvc": "1.2.16" + } + }, + "node_modules/scheduler": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.28.0.tgz", + "integrity": "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz", + "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/source-map-js": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/std-env": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.3.0.tgz", + "integrity": "sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==", + "dev": true, + "license": "MIT" + }, + "node_modules/sumchecker": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz", + "integrity": "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "debug": "^4.1.0" + }, + "engines": { + "node": ">= 8.0" + } + }, + "node_modules/tailwind-merge": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.7.0.tgz", + "integrity": "sha512-XPPUyAc+cvspz3lHTcR/QgPfW2A0lv/xQNIjX3HGhLR+Nq2lHaLq5MtTesHn8GUr3W3DguT2KT5x3NVgRtYwmA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, + "node_modules/tailwindcss": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.4.tgz", + "integrity": "sha512-PCJZTFFdG+sL3gvnP1Do9o6GbkvH2q0p04xSs3f7cSvmAeK+sttG+/7ncK1fdRwKFfC7n+wDDJaOMBSefkI9ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/tinybench": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-6.2.3.tgz", + "integrity": "sha512-Al01C2JIBnO2CXCAPbpAl6sUiOZHeThGtHYNTa51JRw9PyWOCdr+9Ong05R4qg/Sk3+H645E8ov1h2c58ityNw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/tinyexec": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.1.tgz", + "integrity": "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tslib": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz", + "integrity": "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==", + "license": "0BSD" + }, + "node_modules/typescript": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz", + "integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc" + }, + "engines": { + "node": ">=16.20.0" + }, + "optionalDependencies": { + "@typescript/typescript-aix-ppc64": "7.0.2", + "@typescript/typescript-darwin-arm64": "7.0.2", + "@typescript/typescript-darwin-x64": "7.0.2", + "@typescript/typescript-freebsd-arm64": "7.0.2", + "@typescript/typescript-freebsd-x64": "7.0.2", + "@typescript/typescript-linux-arm": "7.0.2", + "@typescript/typescript-linux-arm64": "7.0.2", + "@typescript/typescript-linux-loong64": "7.0.2", + "@typescript/typescript-linux-mips64el": "7.0.2", + "@typescript/typescript-linux-ppc64": "7.0.2", + "@typescript/typescript-linux-riscv64": "7.0.2", + "@typescript/typescript-linux-s390x": "7.0.2", + "@typescript/typescript-linux-x64": "7.0.2", + "@typescript/typescript-netbsd-arm64": "7.0.2", + "@typescript/typescript-netbsd-x64": "7.0.2", + "@typescript/typescript-openbsd-arm64": "7.0.2", + "@typescript/typescript-openbsd-x64": "7.0.2", + "@typescript/typescript-sunos-x64": "7.0.2", + "@typescript/typescript-win32-arm64": "7.0.2", + "@typescript/typescript-win32-x64": "7.0.2" + } + }, + "node_modules/undici": { + "version": "7.30.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.30.2.tgz", + "integrity": "sha512-mLyPQnHwUxaM/rideoK/+KL8DaAJLRl4aBCfmX444aCSLnIaomqPLtNRe2jdCYcsk5wZzXrDIQC8ZeYNRAYyIA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=20.18.1" + } + }, + "node_modules/undici-types": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", + "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", + "dev": true, + "license": "MIT" + }, + "node_modules/update-browserslist-db": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.4.tgz", + "integrity": "sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/use-callback-ref": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.3.tgz", + "integrity": "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/use-sidecar": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.3.tgz", + "integrity": "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==", + "license": "MIT", + "dependencies": { + "detect-node-es": "^1.1.0", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/vite": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.6.tgz", + "integrity": "sha512-UI7dK29NnS54Fk+mmo7o+jI6U8Fp7hDl+X5Q1k45WH+d4dSlbLVUETGQ+hfkNgvLQGyoElPj837nZyv4MBc0VA==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.33.0", + "picomatch": "^4.0.7", + "postcss": "^8.5.32", + "rolldown": "~1.2.16", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.7.1 || ^0.8.0", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vitest": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-5.1.0.tgz", + "integrity": "sha512-MzmNFnrwa8v8lF1bLxw3UJ4EREwVOVb75VqJZmUDRjJ6EluK/x9th7qTbaeDk41WxE1GxWqmTXcdsfobfH5sOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/mocker": "5.1.0", + "chai": "^6.3.0", + "es-module-lexer": "^2.3.2", + "expect-type": "^1.4.0", + "magic-string": "^1.4.3", + "obug": "^3.0.0", + "picomatch": "^4.0.7", + "std-env": "^4.3.0", + "tinybench": "^6.2.2", + "tinyexec": "^1.3.1", + "tinyglobby": "^0.2.17", + "why-is-node-running": "3.2.1" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^22.12.0 || ^24.0.0 || >=26.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@opentelemetry/api": "^1.9.0", + "@types/node": "^22.0.0 || >=24.0.0", + "@vitest/browser-playwright": "5.1.0", + "@vitest/browser-preview": "5.1.0", + "@vitest/browser-webdriverio": "^5.0.0-beta.5 || >=5.0.0", + "@vitest/coverage-istanbul": "5.1.0", + "@vitest/coverage-v8": "5.1.0", + "@vitest/ui": "5.1.0", + "happy-dom": "*", + "jsdom": "*", + "vite": "^6.4.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser-playwright": { + "optional": true + }, + "@vitest/browser-preview": { + "optional": true + }, + "@vitest/browser-webdriverio": { + "optional": true + }, + "@vitest/coverage-istanbul": { + "optional": true + }, + "@vitest/coverage-v8": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + }, + "vite": { + "optional": false + } + } + }, + "node_modules/why-is-node-running": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-3.2.1.tgz", + "integrity": "sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==", + "dev": true, + "license": "MIT", + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=20.11" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 000000000..47598774d --- /dev/null +++ b/package.json @@ -0,0 +1,39 @@ +{ + "name": "iris-studio", + "productName": "Iris Studio", + "version": "0.1.0", + "description": "The studio app for Iris worlds: maps, objects and editors, connected to a running server", + "private": true, + "type": "module", + "main": "out/main/index.js", + "scripts": { + "dev": "electron-vite dev", + "build": "electron-vite build", + "start": "electron-vite preview", + "typecheck": "tsc --noEmit -p tsconfig.json", + "test": "vitest run" + }, + "devDependencies": { + "@tailwindcss/vite": "^4.3.4", + "@types/node": "^26.6.6", + "@types/react": "^19.3.0", + "@types/react-dom": "^19.3.0", + "@vitejs/plugin-react": "^6.2.1", + "electron": "^45.2.3", + "electron-vite": "^6.0.0", + "tailwindcss": "^4.3.4", + "typescript": "^7.0.2", + "vite": "^8.3.6", + "vitest": "^5.1.0" + }, + "dependencies": { + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "cn": "^0.5.2", + "lucide-react": "^1.69.0", + "radix-ui": "^1.8.1", + "react": "^19.3.1", + "react-dom": "^19.3.1", + "tailwind-merge": "^3.7.0" + } +} diff --git a/src/main/index.ts b/src/main/index.ts new file mode 100644 index 000000000..4d42f088a --- /dev/null +++ b/src/main/index.ts @@ -0,0 +1,124 @@ +import { app, BrowserWindow, clipboard, ipcMain, nativeTheme, shell } from 'electron' +import { readdir, readFile } from 'node:fs/promises' +import { homedir } from 'node:os' +import { join } from 'node:path' +import type { BridgeConnection, ThemeChoice } from '../shared/bridge' + +const CONNECTION_FOLDER = join(homedir(), '.iris', 'studio', 'bridges') +const LINK_PREFIX = 'iris-studio://' +const DARK_BACKGROUND = '#1e1f22' +const WINDOW_SIZE = { width: 1440, height: 880, minWidth: 820, minHeight: 520 } + +let window: BrowserWindow | null = null +let pendingLink: string | null = findLink(process.argv) + +function findLink(argv: string[]): string | null { + return argv.find((argument) => argument.startsWith(LINK_PREFIX)) ?? null +} + +function isRunning(pid: unknown): boolean { + if (typeof pid !== 'number') { + return true + } + try { + process.kill(pid, 0) + return true + } catch (error) { + return (error as NodeJS.ErrnoException).code === 'EPERM' + } +} + +/** The bridges announced on this machine whose server still runs, newest first. */ +async function listBridges(): Promise { + let files: string[] + try { + files = (await readdir(CONNECTION_FOLDER)).filter((name) => name.endsWith('.json')) + } catch { + return [] + } + const bridges = await Promise.all(files.map(readConnection)) + return bridges + .filter((bridge): bridge is BridgeConnection => bridge !== null) + .sort((first, second) => (second.startedMillis ?? 0) - (first.startedMillis ?? 0)) +} + +async function readConnection(name: string): Promise { + try { + const file = JSON.parse(await readFile(join(CONNECTION_FOLDER, name), 'utf8')) + if (!isRunning(file.pid) || typeof file.port !== 'number' || typeof file.token !== 'string') { + return null + } + return { world: String(file.world ?? ''), port: file.port, token: file.token, startedMillis: file.startedMillis } + } catch { + return null + } +} + +function createWindow(): void { + window = new BrowserWindow({ + ...WINDOW_SIZE, + title: 'Iris Studio', + backgroundColor: DARK_BACKGROUND, + autoHideMenuBar: true, + show: false, + webPreferences: { + preload: join(import.meta.dirname, '../preload/index.cjs'), + sandbox: true, + contextIsolation: true + } + }) + window.once('ready-to-show', () => window?.show()) + window.webContents.setWindowOpenHandler(({ url }) => { + void shell.openExternal(url) + return { action: 'deny' } + }) + if (process.env.ELECTRON_RENDERER_URL) { + void window.loadURL(process.env.ELECTRON_RENDERER_URL) + } else { + void window.loadFile(join(import.meta.dirname, '../renderer/index.html')) + } +} + +function deliverLink(link: string): void { + if (window === null) { + pendingLink = link + return + } + window.webContents.send('studio:link', link) + if (window.isMinimized()) { + window.restore() + } + window.focus() +} + +if (!app.requestSingleInstanceLock()) { + app.quit() +} else { + app.setAsDefaultProtocolClient('iris-studio') + app.on('second-instance', (_event, argv) => { + const link = findLink(argv) + if (link !== null) { + deliverLink(link) + } else { + window?.focus() + } + }) + app.on('open-url', (event, url) => { + event.preventDefault() + deliverLink(url) + }) + + ipcMain.handle('studio:list-bridges', listBridges) + ipcMain.handle('studio:initial-link', () => { + const link = pendingLink + pendingLink = null + return link + }) + ipcMain.on('studio:set-theme', (_event, theme: ThemeChoice) => { + nativeTheme.themeSource = theme + }) + ipcMain.on('studio:copy-text', (_event, text: string) => clipboard.writeText(text)) + + void app.whenReady().then(createWindow) + app.on('window-all-closed', () => app.quit()) +} diff --git a/src/preload/index.ts b/src/preload/index.ts new file mode 100644 index 000000000..04fc0b303 --- /dev/null +++ b/src/preload/index.ts @@ -0,0 +1,16 @@ +import { contextBridge, ipcRenderer, type IpcRendererEvent } from 'electron' +import type { StudioHost, ThemeChoice } from '../shared/bridge' + +const host: StudioHost = { + listBridges: () => ipcRenderer.invoke('studio:list-bridges'), + initialLink: () => ipcRenderer.invoke('studio:initial-link'), + onLink: (listener) => { + const forward = (_event: IpcRendererEvent, link: string): void => listener(link) + ipcRenderer.on('studio:link', forward) + return () => ipcRenderer.removeListener('studio:link', forward) + }, + setTheme: (theme: ThemeChoice) => ipcRenderer.send('studio:set-theme', theme), + copyText: (text: string) => ipcRenderer.send('studio:copy-text', text) +} + +contextBridge.exposeInMainWorld('studio', host) diff --git a/src/renderer/index.html b/src/renderer/index.html new file mode 100644 index 000000000..34d3713d1 --- /dev/null +++ b/src/renderer/index.html @@ -0,0 +1,15 @@ + + + + + + Iris Studio + + +
+ + + diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx new file mode 100644 index 000000000..a611c54bb --- /dev/null +++ b/src/renderer/src/App.tsx @@ -0,0 +1,63 @@ +import { useCallback, useEffect, useState } from 'react' +import { parseStudioLink, type BridgeConnection } from '../../shared/bridge' +import { BridgeClient } from './bridge/BridgeClient' +import type { WorldInfo } from './bridge/types' +import { ConnectScreen } from './studio/ConnectScreen' +import { MapStudio } from './studio/MapStudio' +import { useTheme } from './studio/theme' + +interface Session { + client: BridgeClient + world: WorldInfo +} + +/** The studio: a connect screen until a bridge answers, then the map of its world. */ +export function App(): React.JSX.Element { + const theme = useTheme() + const [session, setSession] = useState(null) + const [error, setError] = useState(null) + const [connecting, setConnecting] = useState(false) + + const connect = useCallback(async (connection: BridgeConnection) => { + setConnecting(true) + setError(null) + const client = new BridgeClient(connection) + try { + setSession({ client, world: await client.world() }) + } catch (failure) { + setError(failure instanceof Error ? failure.message : String(failure)) + } finally { + setConnecting(false) + } + }, []) + + const connectLink = useCallback( + (link: string) => { + const connection = parseStudioLink(link) + if (connection === null) { + setError('That is not a studio link') + return + } + void connect(connection) + }, + [connect] + ) + + useEffect(() => { + void window.studio.initialLink().then((link) => link !== null && connectLink(link)) + return window.studio.onLink(connectLink) + }, [connectLink]) + + if (session === null) { + return + } + return ( + setSession(null)} + /> + ) +} diff --git a/src/renderer/src/bridge/BridgeClient.ts b/src/renderer/src/bridge/BridgeClient.ts new file mode 100644 index 000000000..f98f907e6 --- /dev/null +++ b/src/renderer/src/bridge/BridgeClient.ts @@ -0,0 +1,141 @@ +import type { BridgeConnection } from '../../../shared/bridge' +import { decodeTile } from './tileDecoding' +import type { MapHover, MapTile, Marker, WorldInfo } from './types' + +export class BridgeError extends Error { + constructor( + readonly status: number, + message: string + ) { + super(message) + } +} + +export interface TileRequest { + view: string + tileX: number + tileZ: number + blocksPerPixel: number + size: number + heights: boolean +} + +export interface BridgeEvents { + onWorld(running: boolean): void + onPlayers(players: Marker[]): void + onClosed(): void +} + +const EVENT_SEPARATOR = '\n\n' + +/** One connection to a world's bridge, over HTTP on the loopback interface. */ +export class BridgeClient { + private readonly base: string + private readonly authorization: string + + constructor(readonly connection: BridgeConnection) { + this.base = `http://127.0.0.1:${connection.port}/v1/` + this.authorization = `Bearer ${connection.token}` + } + + world(): Promise { + return this.json('world') + } + + hover(worldX: number, worldZ: number, signal?: AbortSignal): Promise { + return this.json(`hover?x=${worldX}&z=${worldZ}`, { signal }) + } + + entities(): Promise { + return this.json('entities') + } + + async teleport(worldX: number, worldZ: number): Promise { + await this.json(`teleport?x=${worldX}&z=${worldZ}`, { method: 'POST' }) + } + + /** Opens the file of the biome or region at a spot on the server's machine; the server's answer, if any. */ + async openInEditor(worldX: number, worldZ: number, view: string): Promise { + const answer = await this.json<{ message: string | null }>(`open?x=${worldX}&z=${worldZ}&view=${view}`, { method: 'POST' }) + return answer.message + } + + async tile(request: TileRequest, signal: AbortSignal): Promise { + const query = new URLSearchParams({ + view: request.view, + x: String(request.tileX), + z: String(request.tileZ), + scale: String(request.blocksPerPixel), + size: String(request.size), + heights: request.heights ? '1' : '0' + }) + const response = await this.fetch(`tile?${query}`, { signal }) + return decodeTile(await response.arrayBuffer()) + } + + /** Streams the bridge's events until {@code signal} aborts or the bridge goes away. */ + async listen(events: BridgeEvents, signal: AbortSignal): Promise { + try { + const response = await this.fetch('events', { signal }) + const reader = response.body!.pipeThrough(new TextDecoderStream()).getReader() + let pending = '' + for (;;) { + const { value, done } = await reader.read() + if (done) { + break + } + pending += value + let end: number + while ((end = pending.indexOf(EVENT_SEPARATOR)) >= 0) { + dispatch(pending.slice(0, end), events) + pending = pending.slice(end + EVENT_SEPARATOR.length) + } + } + } catch (error) { + if (signal.aborted) { + return + } + console.warn('Studio events stopped', error) + } + if (!signal.aborted) { + events.onClosed() + } + } + + private async json(endpoint: string, init: RequestInit = {}): Promise { + const response = await this.fetch(endpoint, init) + return (await response.json()) as T + } + + private async fetch(endpoint: string, init: RequestInit): Promise { + const response = await fetch(this.base + endpoint, { + ...init, + headers: { Authorization: this.authorization } + }) + if (!response.ok) { + const body = await response.json().catch(() => ({ error: response.statusText })) + throw new BridgeError(response.status, String(body.error ?? response.statusText)) + } + return response + } +} + +function dispatch(block: string, events: BridgeEvents): void { + let name = 'message' + let data = '' + for (const line of block.split('\n')) { + if (line.startsWith('event: ')) { + name = line.slice('event: '.length) + } else if (line.startsWith('data: ')) { + data += line.slice('data: '.length) + } + } + if (data === '') { + return + } + if (name === 'world') { + events.onWorld((JSON.parse(data) as { running: boolean }).running) + } else if (name === 'players') { + events.onPlayers(JSON.parse(data) as Marker[]) + } +} diff --git a/src/renderer/src/bridge/tileDecoding.ts b/src/renderer/src/bridge/tileDecoding.ts new file mode 100644 index 000000000..60b0da3cd --- /dev/null +++ b/src/renderer/src/bridge/tileDecoding.ts @@ -0,0 +1,44 @@ +import type { LabelKind, MapLabel, MapTile } from './types' + +const ALIGNMENT_BYTES = 4 + +interface TileHeader { + size: number + blocksPerPixel: number + subjectKind: LabelKind + labels: MapLabel[] + heights: boolean +} + +function aligned(bytes: number): number { + return Math.ceil(bytes / ALIGNMENT_BYTES) * ALIGNMENT_BYTES +} + +/** + * Reads a tile as the bridge writes it (MapTileEncoding): a u32 header length, the JSON header, then the subject, + * region and height grids, each starting on a multiple of 4 bytes. The grids are views into the buffer, not copies. + */ +export function decodeTile(buffer: ArrayBuffer): MapTile { + const view = new DataView(buffer) + const headerLength = view.getUint32(0, true) + const header = JSON.parse(new TextDecoder().decode(new Uint8Array(buffer, 4, headerLength))) as TileHeader + const gridSize = header.size + 2 + const cells = gridSize * gridSize + const subjectsAt = aligned(4 + headerLength) + const regionsAt = aligned(subjectsAt + cells * Int16Array.BYTES_PER_ELEMENT) + const heightsAt = aligned(regionsAt + cells * Int16Array.BYTES_PER_ELEMENT) + return { + size: header.size, + blocksPerPixel: header.blocksPerPixel, + subjectKind: header.subjectKind, + labels: header.labels, + subjects: new Int16Array(buffer, subjectsAt, cells), + regions: new Int16Array(buffer, regionsAt, cells), + heights: header.heights ? new Float32Array(buffer, heightsAt, cells) : null + } +} + +/** The grid index of a pixel; pixel coordinates run from -1 to size, the ring being the neighbours'. */ +export function gridIndex(tile: MapTile, pixelX: number, pixelZ: number): number { + return (pixelZ + 1) * (tile.size + 2) + pixelX + 1 +} diff --git a/src/renderer/src/bridge/types.ts b/src/renderer/src/bridge/types.ts new file mode 100644 index 000000000..6fd5ee3e3 --- /dev/null +++ b/src/renderer/src/bridge/types.ts @@ -0,0 +1,70 @@ +/** The shapes the Iris bridge answers with (Iris core, art.arcane.iris.core.studio). */ + +export type LabelKind = 'BIOME' | 'REGION' + +export interface MapLabel { + kind: LabelKind + key: string + name: string + /** 0xRRGGBB */ + color: number +} + +export interface ViewInfo { + id: string + label: string + description: string + group: string + groupLabel: string +} + +export interface WorldInfo { + world: string + dimension: string + dimensionName: string + seed: string + minY: number + height: number + fluidHeight: number + tileSize: number + hasPlayers: boolean + views: ViewInfo[] +} + +export interface MapHover { + worldX: number + worldZ: number + biome: MapLabel | null + caveBiome: MapLabel | null + region: MapLabel | null + vanillaBiome: string | null + height: number + fluidHeight: number + slopeDegrees: number + biomeFile: string | null + regionFile: string | null +} + +export interface Marker { + label: string + worldX: number + worldY: number + worldZ: number + health: number + maxHealth: number +} + +/** + * A decoded map tile. Grids hold (size + 2)² cells, the tile's pixels inside a ring of its neighbours' edge pixels. + */ +export interface MapTile { + size: number + blocksPerPixel: number + subjectKind: LabelKind + labels: MapLabel[] + subjects: Int16Array + regions: Int16Array + heights: Float32Array | null +} + +export const NO_LABEL = -1 diff --git a/src/renderer/src/components/ui/button.tsx b/src/renderer/src/components/ui/button.tsx new file mode 100644 index 000000000..0d202d63f --- /dev/null +++ b/src/renderer/src/components/ui/button.tsx @@ -0,0 +1,63 @@ +import * as React from "react" +import { cva, type VariantProps } from "class-variance-authority" +import { cn } from "@/lib/utils" +import { Slot } from "radix-ui" + +const buttonVariants = cva( + "inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", + { + variants: { + variant: { + default: "bg-primary text-primary-foreground hover:bg-primary/90", + destructive: + "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40", + outline: + "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50", + secondary: + "bg-secondary text-secondary-foreground hover:bg-secondary/80", + ghost: + "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50", + link: "text-primary underline-offset-4 hover:underline", + }, + size: { + default: "h-9 px-4 py-2 has-[>svg]:px-3", + xs: "h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3", + sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5", + lg: "h-10 rounded-md px-6 has-[>svg]:px-4", + icon: "size-9", + "icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3", + "icon-sm": "size-8", + "icon-lg": "size-10", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, + } +) + +function Button({ + className, + variant = "default", + size = "default", + asChild = false, + ...props +}: React.ComponentProps<"button"> & + VariantProps & { + asChild?: boolean + }) { + const Comp = asChild ? Slot.Root : "button" + + return ( + + ) +} + +export { Button, buttonVariants } diff --git a/src/renderer/src/components/ui/context-menu.tsx b/src/renderer/src/components/ui/context-menu.tsx new file mode 100644 index 000000000..c8d0ff606 --- /dev/null +++ b/src/renderer/src/components/ui/context-menu.tsx @@ -0,0 +1,249 @@ +import * as React from "react" +import { cn } from "@/lib/utils" +import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react" +import { ContextMenu as ContextMenuPrimitive } from "radix-ui" + +function ContextMenu({ + ...props +}: React.ComponentProps) { + return +} + +function ContextMenuTrigger({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function ContextMenuGroup({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function ContextMenuPortal({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function ContextMenuSub({ + ...props +}: React.ComponentProps) { + return +} + +function ContextMenuRadioGroup({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function ContextMenuSubTrigger({ + className, + inset, + children, + ...props +}: React.ComponentProps & { + inset?: boolean +}) { + return ( + + {children} + + + ) +} + +function ContextMenuSubContent({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function ContextMenuContent({ + className, + ...props +}: React.ComponentProps) { + return ( + + + + ) +} + +function ContextMenuItem({ + className, + inset, + variant = "default", + ...props +}: React.ComponentProps & { + inset?: boolean + variant?: "default" | "destructive" +}) { + return ( + + ) +} + +function ContextMenuCheckboxItem({ + className, + children, + checked, + ...props +}: React.ComponentProps) { + return ( + + + + + + + {children} + + ) +} + +function ContextMenuRadioItem({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + + + + + + + {children} + + ) +} + +function ContextMenuLabel({ + className, + inset, + ...props +}: React.ComponentProps & { + inset?: boolean +}) { + return ( + + ) +} + +function ContextMenuSeparator({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function ContextMenuShortcut({ + className, + ...props +}: React.ComponentProps<"span">) { + return ( + + ) +} + +export { + ContextMenu, + ContextMenuTrigger, + ContextMenuContent, + ContextMenuItem, + ContextMenuCheckboxItem, + ContextMenuRadioItem, + ContextMenuLabel, + ContextMenuSeparator, + ContextMenuShortcut, + ContextMenuGroup, + ContextMenuPortal, + ContextMenuSub, + ContextMenuSubContent, + ContextMenuSubTrigger, + ContextMenuRadioGroup, +} diff --git a/src/renderer/src/components/ui/dialog.tsx b/src/renderer/src/components/ui/dialog.tsx new file mode 100644 index 000000000..92a3c49bb --- /dev/null +++ b/src/renderer/src/components/ui/dialog.tsx @@ -0,0 +1,158 @@ +"use client" + +import * as React from "react" +import { cn } from "@/lib/utils" +import { XIcon } from "lucide-react" +import { Dialog as DialogPrimitive } from "radix-ui" + +import { Button } from "@/components/ui/button" + +function Dialog({ + ...props +}: React.ComponentProps) { + return +} + +function DialogTrigger({ + ...props +}: React.ComponentProps) { + return +} + +function DialogPortal({ + ...props +}: React.ComponentProps) { + return +} + +function DialogClose({ + ...props +}: React.ComponentProps) { + return +} + +function DialogOverlay({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function DialogContent({ + className, + children, + showCloseButton = true, + ...props +}: React.ComponentProps & { + showCloseButton?: boolean +}) { + return ( + + + + {children} + {showCloseButton && ( + + + Close + + )} + + + ) +} + +function DialogHeader({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function DialogFooter({ + className, + showCloseButton = false, + children, + ...props +}: React.ComponentProps<"div"> & { + showCloseButton?: boolean +}) { + return ( +
+ {children} + {showCloseButton && ( + + + + )} +
+ ) +} + +function DialogTitle({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function DialogDescription({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { + Dialog, + DialogClose, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogOverlay, + DialogPortal, + DialogTitle, + DialogTrigger, +} diff --git a/src/renderer/src/components/ui/input.tsx b/src/renderer/src/components/ui/input.tsx new file mode 100644 index 000000000..1e3b93289 --- /dev/null +++ b/src/renderer/src/components/ui/input.tsx @@ -0,0 +1,20 @@ +import * as React from "react" +import { cn } from "@/lib/utils" + +function Input({ className, type, ...props }: React.ComponentProps<"input">) { + return ( + + ) +} + +export { Input } diff --git a/src/renderer/src/components/ui/kbd.tsx b/src/renderer/src/components/ui/kbd.tsx new file mode 100644 index 000000000..2459224fb --- /dev/null +++ b/src/renderer/src/components/ui/kbd.tsx @@ -0,0 +1,28 @@ +import { cn } from "@/lib/utils" + +function Kbd({ className, ...props }: React.ComponentProps<"kbd">) { + return ( + + ) +} + +function KbdGroup({ className, ...props }: React.ComponentProps<"div">) { + return ( + + ) +} + +export { Kbd, KbdGroup } diff --git a/src/renderer/src/components/ui/scroll-area.tsx b/src/renderer/src/components/ui/scroll-area.tsx new file mode 100644 index 000000000..b699a24ff --- /dev/null +++ b/src/renderer/src/components/ui/scroll-area.tsx @@ -0,0 +1,57 @@ +"use client" + +import * as React from "react" +import { cn } from "@/lib/utils" +import { ScrollArea as ScrollAreaPrimitive } from "radix-ui" + +function ScrollArea({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + + + {children} + + + + + ) +} + +function ScrollBar({ + className, + orientation = "vertical", + ...props +}: React.ComponentProps) { + return ( + + + + ) +} + +export { ScrollArea, ScrollBar } diff --git a/src/renderer/src/components/ui/separator.tsx b/src/renderer/src/components/ui/separator.tsx new file mode 100644 index 000000000..056d875a1 --- /dev/null +++ b/src/renderer/src/components/ui/separator.tsx @@ -0,0 +1,25 @@ +import * as React from "react" +import { cn } from "@/lib/utils" +import { Separator as SeparatorPrimitive } from "radix-ui" + +function Separator({ + className, + orientation = "horizontal", + decorative = true, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { Separator } diff --git a/src/renderer/src/components/ui/toggle.tsx b/src/renderer/src/components/ui/toggle.tsx new file mode 100644 index 000000000..137c38510 --- /dev/null +++ b/src/renderer/src/components/ui/toggle.tsx @@ -0,0 +1,44 @@ +import * as React from "react" +import { cva, type VariantProps } from "class-variance-authority" +import { cn } from "@/lib/utils" +import { Toggle as TogglePrimitive } from "radix-ui" + +const toggleVariants = cva( + "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", + { + variants: { + variant: { + default: "bg-transparent", + outline: + "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground", + }, + size: { + default: "h-9 min-w-9 px-2", + sm: "h-8 min-w-8 px-1.5", + lg: "h-10 min-w-10 px-2.5", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, + } +) + +function Toggle({ + className, + variant, + size, + ...props +}: React.ComponentProps & + VariantProps) { + return ( + + ) +} + +export { Toggle, toggleVariants } diff --git a/src/renderer/src/components/ui/tooltip.tsx b/src/renderer/src/components/ui/tooltip.tsx new file mode 100644 index 000000000..d10e766a1 --- /dev/null +++ b/src/renderer/src/components/ui/tooltip.tsx @@ -0,0 +1,56 @@ +"use client" + +import * as React from "react" +import { cn } from "@/lib/utils" +import { Tooltip as TooltipPrimitive } from "radix-ui" + +function TooltipProvider({ + delayDuration = 0, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function Tooltip({ + ...props +}: React.ComponentProps) { + return +} + +function TooltipTrigger({ + ...props +}: React.ComponentProps) { + return +} + +function TooltipContent({ + className, + sideOffset = 0, + children, + ...props +}: React.ComponentProps) { + return ( + + + {children} + + + + ) +} + +export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } diff --git a/src/renderer/src/css.d.ts b/src/renderer/src/css.d.ts new file mode 100644 index 000000000..5894ae0b6 --- /dev/null +++ b/src/renderer/src/css.d.ts @@ -0,0 +1 @@ +declare module '*.css' diff --git a/src/renderer/src/env.d.ts b/src/renderer/src/env.d.ts new file mode 100644 index 000000000..dc2bc14e4 --- /dev/null +++ b/src/renderer/src/env.d.ts @@ -0,0 +1,9 @@ +import type { StudioHost } from '../../shared/bridge' + +declare global { + interface Window { + studio: StudioHost + } +} + +export {} diff --git a/src/renderer/src/lib/utils.ts b/src/renderer/src/lib/utils.ts new file mode 100644 index 000000000..b057456de --- /dev/null +++ b/src/renderer/src/lib/utils.ts @@ -0,0 +1,6 @@ +import { clsx, type ClassValue } from 'clsx' +import { twMerge } from 'tailwind-merge' + +export function cn(...inputs: ClassValue[]): string { + return twMerge(clsx(inputs)) +} diff --git a/src/renderer/src/main.tsx b/src/renderer/src/main.tsx new file mode 100644 index 000000000..3ea6345e0 --- /dev/null +++ b/src/renderer/src/main.tsx @@ -0,0 +1,13 @@ +import { StrictMode } from 'react' +import { createRoot } from 'react-dom/client' +import { TooltipProvider } from '@/components/ui/tooltip' +import { App } from './App' +import './styles.css' + +createRoot(document.getElementById('root')!).render( + + + + + +) diff --git a/src/renderer/src/map/MapController.ts b/src/renderer/src/map/MapController.ts new file mode 100644 index 000000000..1e814b01a --- /dev/null +++ b/src/renderer/src/map/MapController.ts @@ -0,0 +1,406 @@ +import type { BridgeClient } from '../bridge/BridgeClient' +import { gridIndex } from '../bridge/tileDecoding' +import { NO_LABEL, type MapLabel, type Marker, type WorldInfo } from '../bridge/types' +import { countShares, type PlacedTile, type Share } from './census' +import { bandIndexOf, HEIGHT_BANDS } from './heightColors' +import type { Highlight, TileStyle } from './tileStyle' +import { TileStore, type TileLayer } from './TileStore' +import { + clampBlocksPerPixel, + coarserTile, + previewsFor, + DEFAULT_BLOCKS_PER_PIXEL, + renderBlocksPerPixel, + screenToWorldX, + screenToWorldZ, + visibleTiles, + worldToScreenX, + worldToScreenZ, + type TileAddress, + type Viewport +} from './viewport' + +export interface MapStatus { + blocksPerPixel: number + widthBlocks: number + heightBlocks: number + tilesReady: number + tilesTotal: number + cursorX: number + cursorZ: number +} + +export interface MapListener { + onStatus(status: MapStatus): void + onShares(shares: Share[]): void + onError(message: string): void +} + +/** What the map shows at a spot, read from the tiles already drawn. */ +export interface SpotSubjects { + subject: Highlight | null + region: Highlight | null +} + +export interface MapToggles { + shading: boolean + regionBorders: boolean + grid: boolean +} + +// While a tile is on its way, a coarser one already drawn stands in, up to this many zoom levels out. +const COARSER_FALLBACK_LEVELS = 6 +const CENSUS_INTERVAL_MILLIS = 250 +const CHUNK_BLOCKS = 16 +const REGION_BLOCKS = 512 +const SMALLEST_GRID_GAP_PIXELS = 8 +const CHUNK_LINE = 'rgba(255, 255, 255, 0.14)' +const REGION_LINE = 'rgba(255, 255, 255, 0.38)' +const PLAYER_FILL = '#3574f0' +const ENTITY_FILL = '#f75464' +const MARKER_OUTLINE = '#ffffff' +const PLAYER_RADIUS_PIXELS = 6 +const ENTITY_RADIUS_PIXELS = 3 + +/** + * The 2D map on a canvas: which tiles to fetch for the view, drawing them in the current style, and the grid and + * markers on top. Kept outside React, as it redraws on every drag and wheel step. + */ +export class MapController { + private readonly context: CanvasRenderingContext2D + private readonly store: TileStore + private readonly view: Viewport = { centerX: 0, centerZ: 0, blocksPerPixel: DEFAULT_BLOCKS_PER_PIXEL, width: 1, height: 1 } + private layer: TileLayer + private toggles: MapToggles = { shading: true, regionBorders: false, grid: false } + private highlight: Highlight | null = null + private players: Marker[] = [] + private entities: Marker[] = [] + private cursor: { x: number; y: number } | null = null + private frameRequested = false + private lastCensusMillis = 0 + private censusTimer: number | undefined + private closed = false + + constructor( + private readonly canvas: HTMLCanvasElement, + client: BridgeClient, + private readonly world: WorldInfo, + view: string, + private readonly listener: MapListener + ) { + this.context = canvas.getContext('2d')! + this.layer = { view, heights: this.needsHeights(view, this.toggles), revision: 0 } + this.store = new TileStore(client, world.tileSize, () => this.redraw(), (message) => listener.onError(message)) + } + + close(): void { + this.closed = true + window.clearTimeout(this.censusTimer) + this.store.clear() + } + + resize(width: number, height: number): void { + const ratio = window.devicePixelRatio + this.canvas.width = Math.round(width * ratio) + this.canvas.height = Math.round(height * ratio) + this.view.width = width + this.view.height = height + this.redraw() + } + + setView(view: string): void { + this.layer = { ...this.layer, view, heights: this.needsHeights(view, this.toggles) } + this.redraw() + } + + setToggles(toggles: MapToggles): void { + this.toggles = toggles + this.layer = { ...this.layer, heights: this.needsHeights(this.layer.view, toggles) } + this.redraw() + } + + // Heights are the costly part of a tile, so they are only asked for when something draws with them. + private needsHeights(view: string, toggles: MapToggles): boolean { + return toggles.shading || view === 'height' + } + + setHighlight(highlight: Highlight | null): void { + this.highlight = highlight + this.redraw() + } + + setMarkers(players: Marker[], entities: Marker[]): void { + this.players = players + this.entities = entities + this.redraw() + } + + setCursor(cursor: { x: number; y: number } | null): void { + this.cursor = cursor + this.reportStatus() + } + + /** Draws everything again from the server, after the pack changed. */ + refresh(): void { + this.store.clear() + this.layer = { ...this.layer, revision: this.layer.revision + 1 } + this.redraw() + } + + panBy(screenDeltaX: number, screenDeltaZ: number): void { + this.view.centerX -= screenDeltaX * this.view.blocksPerPixel + this.view.centerZ -= screenDeltaZ * this.view.blocksPerPixel + this.redraw() + } + + centerOn(worldX: number, worldZ: number): void { + this.view.centerX = worldX + this.view.centerZ = worldZ + this.redraw() + } + + /** Zooms by {@code factor} (above 1 zooms in) keeping the world spot under the screen point where it is. */ + zoomAt(factor: number, screenX = this.view.width / 2, screenZ = this.view.height / 2): void { + const worldX = screenToWorldX(this.view, screenX) + const worldZ = screenToWorldZ(this.view, screenZ) + this.view.blocksPerPixel = clampBlocksPerPixel(this.view.blocksPerPixel / factor) + this.view.centerX = worldX - (screenX - this.view.width / 2) * this.view.blocksPerPixel + this.view.centerZ = worldZ - (screenZ - this.view.height / 2) * this.view.blocksPerPixel + this.redraw() + } + + resetZoom(): void { + this.view.blocksPerPixel = DEFAULT_BLOCKS_PER_PIXEL + this.redraw() + } + + worldAt(screenX: number, screenZ: number): { x: number; z: number } { + return { x: screenToWorldX(this.view, screenX), z: screenToWorldZ(this.view, screenZ) } + } + + /** The biome or region and the region at a screen point, from the tile drawn there; nulls before it arrived. */ + subjectsAt(screenX: number, screenZ: number): SpotSubjects { + const worldX = screenToWorldX(this.view, screenX) + const worldZ = screenToWorldZ(this.view, screenZ) + const scale = this.renderScale() + const span = this.world.tileSize * scale + const address = { tileX: Math.floor(worldX / span), tileZ: Math.floor(worldZ / span), blocksPerPixel: scale } + const tile = this.store.get(address, this.layer) + if (tile === null) { + return { subject: null, region: null } + } + const pixelX = Math.min(tile.size - 1, Math.floor((worldX - address.tileX * span) / scale)) + const pixelZ = Math.min(tile.size - 1, Math.floor((worldZ - address.tileZ * span) / scale)) + const cell = gridIndex(tile, pixelX, pixelZ) + const region = labelAt(tile.labels, tile.regions[cell]) + if (this.isHeightView() && tile.heights !== null) { + const band = HEIGHT_BANDS[bandIndexOf(tile.heights[cell], this.world.fluidHeight)] + return { subject: { kind: 'HEIGHT', key: band.key, name: band.name }, region } + } + return { subject: labelAt(tile.labels, tile.subjects[cell]), region } + } + + private isHeightView(): boolean { + return this.layer.view === 'height' + } + + private renderScale(): number { + return renderBlocksPerPixel(this.view.blocksPerPixel, window.devicePixelRatio) + } + + private style(): TileStyle { + return { + byHeight: this.isHeightView(), + shading: this.toggles.shading, + regionBorders: this.toggles.regionBorders, + highlight: this.highlight, + seaLevel: this.world.fluidHeight + } + } + + private redraw(): void { + if (this.frameRequested || this.closed) { + return + } + this.frameRequested = true + requestAnimationFrame(() => { + this.frameRequested = false + if (!this.closed) { + this.draw() + } + }) + } + + private draw(): void { + const ratio = window.devicePixelRatio + const context = this.context + context.setTransform(ratio, 0, 0, ratio, 0, 0) + context.fillStyle = getComputedStyle(this.canvas).getPropertyValue('--map-background') || '#16171a' + context.fillRect(0, 0, this.view.width, this.view.height) + + const scale = this.renderScale() + const tiles = visibleTiles(this.view, scale, this.world.tileSize) + const style = this.style() + context.imageSmoothingEnabled = this.view.blocksPerPixel > scale + let ready = 0 + const blank: TileAddress[] = [] + for (const address of tiles) { + const picture = this.store.picture(address, this.layer, style) + if (picture !== null) { + this.drawTile(picture, address, 0, 0, picture.width) + ready++ + } else if (!this.drawFallback(address, style)) { + blank.push(address) + } + } + this.store.want([...previewsFor(blank), ...tiles], this.layer) + if (this.toggles.grid) { + this.drawGrid() + } + this.drawMarkers() + this.reportStatus(ready, tiles.length) + this.scheduleCensus(tiles) + } + + /** Draws the part of a tile picture from (sourceX, sourceZ), {@code sourceSize} pixels wide, over {@code address}. */ + private drawTile(picture: HTMLCanvasElement, address: TileAddress, sourceX: number, sourceZ: number, sourceSize: number): void { + const span = this.world.tileSize * address.blocksPerPixel + const left = Math.round(worldToScreenX(this.view, address.tileX * span)) + const top = Math.round(worldToScreenZ(this.view, address.tileZ * span)) + const right = Math.round(worldToScreenX(this.view, (address.tileX + 1) * span)) + const bottom = Math.round(worldToScreenZ(this.view, (address.tileZ + 1) * span)) + this.context.drawImage(picture, sourceX, sourceZ, sourceSize, sourceSize, left, top, right - left, bottom - top) + } + + /** Draws the part of a coarser tile that covers {@code address}; false when no coarser tile has arrived either. */ + private drawFallback(address: TileAddress, style: TileStyle): boolean { + for (let levels = 1; levels <= COARSER_FALLBACK_LEVELS; levels++) { + const coarser = coarserTile(address, levels) + const picture = this.store.picture(coarser, this.layer, style) + if (picture === null) { + continue + } + const factor = 2 ** levels + const sourceSize = picture.width / factor + const sourceX = (address.tileX - coarser.tileX * factor) * sourceSize + const sourceZ = (address.tileZ - coarser.tileZ * factor) * sourceSize + this.drawTile(picture, address, sourceX, sourceZ, sourceSize) + return true + } + return false + } + + private drawGrid(): void { + this.drawLines(CHUNK_BLOCKS, CHUNK_LINE, 1) + this.drawLines(REGION_BLOCKS, REGION_LINE, 1.5) + } + + private drawLines(gapBlocks: number, color: string, width: number): void { + if (gapBlocks / this.view.blocksPerPixel < SMALLEST_GRID_GAP_PIXELS) { + return + } + const context = this.context + context.strokeStyle = color + context.lineWidth = width + context.beginPath() + const firstX = Math.ceil(screenToWorldX(this.view, 0) / gapBlocks) * gapBlocks + for (let worldX = firstX; worldX <= screenToWorldX(this.view, this.view.width); worldX += gapBlocks) { + const screenX = Math.round(worldToScreenX(this.view, worldX)) + 0.5 + context.moveTo(screenX, 0) + context.lineTo(screenX, this.view.height) + } + const firstZ = Math.ceil(screenToWorldZ(this.view, 0) / gapBlocks) * gapBlocks + for (let worldZ = firstZ; worldZ <= screenToWorldZ(this.view, this.view.height); worldZ += gapBlocks) { + const screenZ = Math.round(worldToScreenZ(this.view, worldZ)) + 0.5 + context.moveTo(0, screenZ) + context.lineTo(this.view.width, screenZ) + } + context.stroke() + } + + private drawMarkers(): void { + for (const entity of this.entities) { + this.drawMarker(entity, ENTITY_FILL, ENTITY_RADIUS_PIXELS, false) + } + for (const player of this.players) { + this.drawMarker(player, PLAYER_FILL, PLAYER_RADIUS_PIXELS, true) + } + } + + private drawMarker(marker: Marker, fill: string, radius: number, named: boolean): void { + const context = this.context + const x = worldToScreenX(this.view, marker.worldX) + const z = worldToScreenZ(this.view, marker.worldZ) + context.beginPath() + context.arc(x, z, radius, 0, Math.PI * 2) + context.fillStyle = fill + context.fill() + context.lineWidth = 2 + context.strokeStyle = MARKER_OUTLINE + context.stroke() + if (!named) { + return + } + context.font = '600 12px Inter, "Segoe UI", system-ui, sans-serif' + context.textAlign = 'center' + context.lineWidth = 3 + context.strokeStyle = 'rgba(0, 0, 0, 0.7)' + context.strokeText(marker.label, x, z - radius - 6) + context.fillStyle = MARKER_OUTLINE + context.fillText(marker.label, x, z - radius - 6) + } + + private lastReady = 0 + private lastTotal = 0 + + private reportStatus(ready = this.lastReady, total = this.lastTotal): void { + this.lastReady = ready + this.lastTotal = total + const cursor = this.cursor === null ? { x: this.view.width / 2, y: this.view.height / 2 } : this.cursor + this.listener.onStatus({ + blocksPerPixel: this.view.blocksPerPixel, + widthBlocks: Math.round(this.view.width * this.view.blocksPerPixel), + heightBlocks: Math.round(this.view.height * this.view.blocksPerPixel), + tilesReady: ready, + tilesTotal: total, + cursorX: Math.floor(screenToWorldX(this.view, cursor.x)), + cursorZ: Math.floor(screenToWorldZ(this.view, cursor.y)) + }) + } + + // Counting what is on screen is cheap but not free, so it runs at most a few times a second and once more at rest. + private scheduleCensus(tiles: TileAddress[]): void { + window.clearTimeout(this.censusTimer) + const wait = Math.max(0, this.lastCensusMillis + CENSUS_INTERVAL_MILLIS - performance.now()) + this.censusTimer = window.setTimeout(() => { + this.lastCensusMillis = performance.now() + this.listener.onShares(this.census(tiles)) + }, wait) + } + + private census(tiles: TileAddress[]): Share[] { + const placed: PlacedTile[] = [] + for (const address of tiles) { + const tile = this.store.get(address, this.layer) + if (tile !== null) { + const span = this.world.tileSize * address.blocksPerPixel + placed.push({ tile, worldX: address.tileX * span, worldZ: address.tileZ * span }) + } + } + const area = { + minimumX: screenToWorldX(this.view, 0), + minimumZ: screenToWorldZ(this.view, 0), + maximumX: screenToWorldX(this.view, this.view.width), + maximumZ: screenToWorldZ(this.view, this.view.height) + } + return countShares(placed, area, this.isHeightView(), this.world.fluidHeight) + } +} + +function labelAt(labels: MapLabel[], index: number): Highlight | null { + if (index === NO_LABEL) { + return null + } + const label = labels[index] + return { kind: label.kind, key: label.key, name: label.name } +} diff --git a/src/renderer/src/map/TileStore.ts b/src/renderer/src/map/TileStore.ts new file mode 100644 index 000000000..56d279562 --- /dev/null +++ b/src/renderer/src/map/TileStore.ts @@ -0,0 +1,167 @@ +import { BridgeError, type BridgeClient } from '../bridge/BridgeClient' +import type { MapTile } from '../bridge/types' +import { stylePixels, styleKey, type TileStyle } from './tileStyle' +import type { TileAddress } from './viewport' + +/** What one tile request needs besides where the tile is. */ +export interface TileLayer { + view: string + heights: boolean + /** Bumped when the pack is hotloaded, so older tiles are not used again. */ + revision: number +} + +interface StoredTile { + tile: MapTile + bytes: number + lastUsed: number + picture: HTMLCanvasElement | null + pictureStyle: string +} + +// Drawing a few hundred tiles at once only queues them on the server; a handful in flight keeps it busy. +const MAXIMUM_IN_FLIGHT = 6 +const CACHE_BYTES = 256 * 1024 * 1024 + +/** + * The map's tiles: fetched from the bridge as the view needs them, kept within a memory budget, and drawn as the + * current style asks. A tile that leaves the view before it arrives is not fetched. + */ +export class TileStore { + private readonly tiles = new Map() + private readonly inFlight = new Map() + /** Asked for again only after a refresh, which changes every key, so a broken tile is not fetched on every frame. */ + private readonly failed = new Set() + private wanted: { key: string; address: TileAddress; layer: TileLayer }[] = [] + private storedBytes = 0 + private useClock = 0 + + constructor( + private readonly client: BridgeClient, + private readonly tileSize: number, + private readonly onChange: () => void, + private readonly onError: (message: string) => void + ) {} + + key(address: TileAddress, layer: TileLayer): string { + return `${layer.revision}/${layer.view}/${layer.heights}/${address.blocksPerPixel}/${address.tileX}/${address.tileZ}` + } + + /** The tile if it has arrived, marked as just used. */ + get(address: TileAddress, layer: TileLayer): MapTile | null { + const stored = this.tiles.get(this.key(address, layer)) + if (stored === undefined) { + return null + } + stored.lastUsed = ++this.useClock + return stored.tile + } + + /** The tile drawn in {@code style}; restyled only when the style changed since it was last drawn. */ + picture(address: TileAddress, layer: TileLayer, style: TileStyle): HTMLCanvasElement | null { + const stored = this.tiles.get(this.key(address, layer)) + if (stored === undefined) { + return null + } + stored.lastUsed = ++this.useClock + const wantedStyle = styleKey(style) + if (stored.picture === null || stored.pictureStyle !== wantedStyle) { + stored.picture = stored.picture ?? document.createElement('canvas') + paint(stored.picture, stored.tile, style) + stored.pictureStyle = wantedStyle + } + return stored.picture + } + + /** Fetches the tiles the view shows, in the order given, and gives up on the ones it no longer shows. */ + want(addresses: TileAddress[], layer: TileLayer): void { + this.wanted = addresses + .map((address) => ({ key: this.key(address, layer), address, layer })) + .filter((entry) => !this.tiles.has(entry.key) && !this.failed.has(entry.key)) + const stillWanted = new Set(this.wanted.map((entry) => entry.key)) + for (const [key, controller] of this.inFlight) { + if (!stillWanted.has(key)) { + controller.abort() + this.inFlight.delete(key) + } + } + this.startRequests() + } + + /** How many of the wanted tiles are still on their way. */ + pending(): number { + return this.wanted.length + } + + clear(): void { + for (const controller of this.inFlight.values()) { + controller.abort() + } + this.inFlight.clear() + this.failed.clear() + this.tiles.clear() + this.wanted = [] + this.storedBytes = 0 + } + + private startRequests(): void { + for (const entry of this.wanted) { + if (this.inFlight.size >= MAXIMUM_IN_FLIGHT) { + return + } + if (!this.inFlight.has(entry.key)) { + this.fetchTile(entry.key, entry.address, entry.layer) + } + } + } + + private fetchTile(key: string, address: TileAddress, layer: TileLayer): void { + const controller = new AbortController() + this.inFlight.set(key, controller) + const request = { view: layer.view, ...address, size: this.tileSize, heights: layer.heights } + this.client + .tile(request, controller.signal) + .then((tile) => this.store(key, tile)) + .catch((error: unknown) => { + if (!controller.signal.aborted) { + this.failed.add(key) + this.onError(error instanceof BridgeError ? error.message : 'The server did not answer') + } + }) + .finally(() => { + if (this.inFlight.get(key) === controller) { + this.inFlight.delete(key) + } + this.wanted = this.wanted.filter((entry) => entry.key !== key) + this.startRequests() + this.onChange() + }) + } + + private store(key: string, tile: MapTile): void { + const bytes = tile.subjects.byteLength * 2 + (tile.heights?.byteLength ?? 0) + tile.size * tile.size * 4 + this.tiles.set(key, { tile, bytes, lastUsed: ++this.useClock, picture: null, pictureStyle: '' }) + this.storedBytes += bytes + this.evictOldest() + } + + private evictOldest(): void { + if (this.storedBytes <= CACHE_BYTES) { + return + } + const byAge = [...this.tiles.entries()].sort((first, second) => first[1].lastUsed - second[1].lastUsed) + for (const [key, stored] of byAge) { + if (this.storedBytes <= CACHE_BYTES * 0.8) { + return + } + this.tiles.delete(key) + this.storedBytes -= stored.bytes + } + } +} + +function paint(canvas: HTMLCanvasElement, tile: MapTile, style: TileStyle): void { + canvas.width = tile.size + canvas.height = tile.size + canvas.getContext('2d')!.putImageData(new ImageData(stylePixels(tile, style), tile.size, tile.size), 0, 0) +} diff --git a/src/renderer/src/map/census.ts b/src/renderer/src/map/census.ts new file mode 100644 index 000000000..83df8b6ee --- /dev/null +++ b/src/renderer/src/map/census.ts @@ -0,0 +1,78 @@ +import { gridIndex } from '../bridge/tileDecoding' +import { NO_LABEL, type MapTile } from '../bridge/types' +import { bandIndexOf, HEIGHT_BANDS } from './heightColors' +import type { Highlight } from './tileStyle' + +/** How much of the screen one biome, region or height band covers. */ +export interface Share { + subject: Highlight + color: number + fraction: number +} + +/** A loaded tile and where its top left pixel lies in the world. */ +export interface PlacedTile { + tile: MapTile + worldX: number + worldZ: number +} + +export interface WorldArea { + minimumX: number + minimumZ: number + maximumX: number + maximumZ: number +} + +// Enough samples that a share is right to a fraction of a percent, few enough to count every frame the map settles. +const MAXIMUM_COUNTED_PIXELS = 250_000 + +/** + * The shares of what the tiles show inside {@code area}, largest first: their subjects (biomes or regions), or their + * height bands when {@code byHeight} is set. + */ +export function countShares(tiles: PlacedTile[], area: WorldArea, byHeight: boolean, seaLevel: number): Share[] { + const counts = new Map() + const totalPixels = tiles.reduce((sum, placed) => sum + placed.tile.size * placed.tile.size, 0) + const stride = Math.max(1, Math.ceil(Math.sqrt(totalPixels / MAXIMUM_COUNTED_PIXELS))) + let counted = 0 + for (const { tile, worldX, worldZ } of tiles) { + const scale = tile.blocksPerPixel + const firstX = Math.max(0, Math.ceil((area.minimumX - worldX) / scale)) + const endX = Math.min(tile.size, Math.ceil((area.maximumX - worldX) / scale)) + const firstZ = Math.max(0, Math.ceil((area.minimumZ - worldZ) / scale)) + const endZ = Math.min(tile.size, Math.ceil((area.maximumZ - worldZ) / scale)) + for (let pixelZ = firstZ; pixelZ < endZ; pixelZ += stride) { + for (let pixelX = firstX; pixelX < endX; pixelX += stride) { + const subject = subjectAt(tile, gridIndex(tile, pixelX, pixelZ), byHeight, seaLevel) + if (subject === null) { + continue + } + const id = `${subject.subject.kind}:${subject.subject.key}` + const entry = counts.get(id) ?? { ...subject, count: 0 } + entry.count++ + counts.set(id, entry) + counted++ + } + } + } + return [...counts.values()] + .map((entry) => ({ subject: entry.subject, color: entry.color, fraction: entry.count / Math.max(1, counted) })) + .sort((first, second) => second.fraction - first.fraction) +} + +function subjectAt(tile: MapTile, cell: number, byHeight: boolean, seaLevel: number): { subject: Highlight; color: number } | null { + if (byHeight) { + if (tile.heights === null) { + return null + } + const band = HEIGHT_BANDS[bandIndexOf(tile.heights[cell], seaLevel)] + return { subject: { kind: 'HEIGHT', key: band.key, name: band.name }, color: band.color } + } + const index = tile.subjects[cell] + if (index === NO_LABEL) { + return null + } + const label = tile.labels[index] + return { subject: { kind: label.kind, key: label.key, name: label.name }, color: label.color } +} diff --git a/src/renderer/src/map/heightColors.ts b/src/renderer/src/map/heightColors.ts new file mode 100644 index 000000000..60c364b0a --- /dev/null +++ b/src/renderer/src/map/heightColors.ts @@ -0,0 +1,76 @@ +/** The height scale of the map, from deep water to snowy peaks, measured from sea level (v3e HeightColors). */ + +const DEEPEST_BELOW_SEA_BLOCKS = 90 +const HIGHEST_ABOVE_SEA_BLOCKS = 300 +const DEPTH_BLOCKS = [0, 10, 40, DEEPEST_BELOW_SEA_BLOCKS] +const DEPTH_COLORS = [0x7db8d8, 0x4c8dba, 0x2a5e8f, 0x15304f] +const ABOVE_SEA_BLOCKS = [0, 8, 30, 70, 130, 200, HIGHEST_ABOVE_SEA_BLOCKS] +const LAND_COLORS = [0x7fa35a, 0x5e8c44, 0x8fa65a, 0xc2ae78, 0x8e7663, 0xa9a6a2, 0xf4f4f4] +// Where each band ends, in blocks above sea; they follow the colour stops, merging the deepest two. +const BAND_TOPS_ABOVE_SEA = [-40, -10, 0, 8, 30, 70, 130, 200, 300, Number.POSITIVE_INFINITY] + +/** A stretch of heights between two of the scale's stops, for telling how much ground lies at each height. */ +export interface HeightBand { + /** The band's place from the deepest, as text that sorts the same way. */ + key: string + name: string + color: number +} + +export function heightColor(height: number, seaLevel: number): number { + if (height <= seaLevel) { + return along(DEPTH_BLOCKS, DEPTH_COLORS, seaLevel - height) + } + return along(ABOVE_SEA_BLOCKS, LAND_COLORS, height - seaLevel) +} + +export const HEIGHT_BANDS: readonly HeightBand[] = createBands() + +export function bandIndexOf(height: number, seaLevel: number): number { + const aboveSea = height - seaLevel + const index = BAND_TOPS_ABOVE_SEA.findIndex((top) => aboveSea <= top) + return index < 0 ? BAND_TOPS_ABOVE_SEA.length - 1 : index +} + +function createBands(): HeightBand[] { + const bands: HeightBand[] = [] + let bottom = -DEEPEST_BELOW_SEA_BLOCKS + BAND_TOPS_ABOVE_SEA.forEach((top, band) => { + const colorHeight = Number.isFinite(top) ? (bottom + top) / 2 : bottom + bands.push({ key: String(band).padStart(2, '0'), name: bandName(band, bottom, top), color: heightColor(colorHeight, 0) }) + bottom = top + }) + return bands +} + +function bandName(band: number, bottom: number, top: number): string { + if (band === 0) { + return `${Math.round(-top)}+ below sea` + } + if (!Number.isFinite(top)) { + return `${Math.round(bottom)}+ above sea` + } + if (top <= 0) { + return `${Math.round(-top)}–${Math.round(-bottom)} below sea` + } + return `${Math.round(bottom)}–${Math.round(top)} above sea` +} + +function along(stops: number[], colors: number[], blocks: number): number { + if (blocks <= stops[0]) { + return colors[0] + } + for (let stop = 1; stop < stops.length; stop++) { + if (blocks <= stops[stop]) { + return blend(colors[stop - 1], colors[stop], (blocks - stops[stop - 1]) / (stops[stop] - stops[stop - 1])) + } + } + return colors[colors.length - 1] +} + +export function blend(first: number, second: number, amount: number): number { + const red = Math.round(((first >> 16) & 0xff) * (1 - amount) + ((second >> 16) & 0xff) * amount) + const green = Math.round(((first >> 8) & 0xff) * (1 - amount) + ((second >> 8) & 0xff) * amount) + const blue = Math.round((first & 0xff) * (1 - amount) + (second & 0xff) * amount) + return (red << 16) | (green << 8) | blue +} diff --git a/src/renderer/src/map/map.test.ts b/src/renderer/src/map/map.test.ts new file mode 100644 index 000000000..555b304b6 --- /dev/null +++ b/src/renderer/src/map/map.test.ts @@ -0,0 +1,178 @@ +import { describe, expect, it } from 'vitest' +import { decodeTile, gridIndex } from '../bridge/tileDecoding' +import type { MapLabel, MapTile } from '../bridge/types' +import { countShares } from './census' +import { bandIndexOf, HEIGHT_BANDS, heightColor } from './heightColors' +import { stylePixels, type TileStyle } from './tileStyle' +import { coarserTile, previewsFor, renderBlocksPerPixel, screenToWorldX, visibleTiles, worldToScreenX, type Viewport } from './viewport' + +const PLAINS: MapLabel = { kind: 'BIOME', key: 'plains', name: 'Plains', color: 0x00ff00 } +const DESERT: MapLabel = { kind: 'BIOME', key: 'desert', name: 'Desert', color: 0xffff00 } +const WARM: MapLabel = { kind: 'REGION', key: 'warm', name: 'Warm', color: 0xff0000 } +const FLAT: TileStyle = { byHeight: false, shading: false, regionBorders: false, highlight: null, seaLevel: 63 } + +/** A tile whose left half is plains and right half desert, all in one region, at height 70. */ +function splitTile(size = 4): MapTile { + const cells = (size + 2) ** 2 + const subjects = new Int16Array(cells) + for (let cell = 0; cell < cells; cell++) { + subjects[cell] = cell % (size + 2) <= size / 2 ? 0 : 1 + } + return { + size, + blocksPerPixel: 1, + subjectKind: 'BIOME', + labels: [PLAINS, DESERT, WARM], + subjects, + regions: new Int16Array(cells).fill(2), + heights: new Float32Array(cells).fill(70) + } +} + +/** A tile as the bridge sends it: u32 header length, JSON header, aligned grids. */ +function encode(size: number, withHeights: boolean): ArrayBuffer { + const header = new TextEncoder().encode(JSON.stringify({ size, blocksPerPixel: 2, subjectKind: 'BIOME', labels: [PLAINS], heights: withHeights })) + const cells = (size + 2) ** 2 + const align = (bytes: number): number => Math.ceil(bytes / 4) * 4 + const subjectsAt = align(4 + header.length) + const regionsAt = align(subjectsAt + cells * 2) + const heightsAt = align(regionsAt + cells * 2) + const buffer = new ArrayBuffer(heightsAt + (withHeights ? cells * 4 : 0)) + new DataView(buffer).setUint32(0, header.length, true) + new Uint8Array(buffer, 4).set(header) + new Int16Array(buffer, subjectsAt, cells).fill(0) + new Int16Array(buffer, regionsAt, cells).fill(-1) + if (withHeights) { + new Float32Array(buffer, heightsAt, cells).fill(81.5) + } + return buffer +} + +describe('tile decoding', () => { + it('reads the header and views each grid where the bridge put it', () => { + const tile = decodeTile(encode(3, true)) + + expect(tile.size).toBe(3) + expect(tile.blocksPerPixel).toBe(2) + expect(tile.labels[0].key).toBe('plains') + expect(tile.subjects.length).toBe(25) + expect(tile.regions[0]).toBe(-1) + expect(tile.heights?.[24]).toBe(81.5) + }) + + it('has no heights when the header says so', () => { + expect(decodeTile(encode(3, false)).heights).toBeNull() + }) +}) + +describe('height colours', () => { + it('runs from deep water to snow and stays at the ends beyond them', () => { + expect(heightColor(63, 63)).toBe(0x7db8d8) + expect(heightColor(-1000, 63)).toBe(0x15304f) + expect(heightColor(1000, 63)).toBe(0xf4f4f4) + }) + + it('puts each height in the band the legend names', () => { + expect(HEIGHT_BANDS[bandIndexOf(63, 63)].name).toBe('0–10 below sea') + expect(HEIGHT_BANDS[bandIndexOf(64, 63)].name).toBe('0–8 above sea') + expect(HEIGHT_BANDS[bandIndexOf(500, 63)].name).toBe('300+ above sea') + expect(HEIGHT_BANDS[bandIndexOf(-500, 63)].name).toBe('40+ below sea') + }) +}) + +describe('tile style', () => { + const pixel = (pixels: Uint8ClampedArray, size: number, x: number, z: number): number => { + const at = (z * size + x) * 4 + return (pixels[at] << 16) | (pixels[at + 1] << 8) | pixels[at + 2] + } + + it('paints each pixel in its label colour', () => { + const pixels = stylePixels(splitTile(), FLAT) + + expect(pixel(pixels, 4, 0, 0)).toBe(PLAINS.color) + expect(pixel(pixels, 4, 3, 3)).toBe(DESERT.color) + }) + + it('dims everything but the highlight, and tints the highlight edge', () => { + const pixels = stylePixels(splitTile(), { ...FLAT, highlight: { kind: 'BIOME', key: 'plains', name: 'Plains' } }) + + expect(pixel(pixels, 4, 3, 3)).not.toBe(DESERT.color) + expect(pixel(pixels, 4, 0, 1)).toBe(PLAINS.color) + expect(pixel(pixels, 4, 1, 1)).not.toBe(PLAINS.color) + }) + + it('leaves flat ground almost as it is when shading', () => { + const pixels = stylePixels(splitTile(), { ...FLAT, shading: true }) + const green = (pixel(pixels, 4, 0, 0) >> 8) & 0xff + + expect(green).toBeGreaterThan(200) + }) +}) + +describe('viewport', () => { + const view: Viewport = { centerX: 100, centerZ: -50, blocksPerPixel: 2, width: 800, height: 600 } + + it('maps screen and world both ways', () => { + expect(screenToWorldX(view, 400)).toBe(100) + expect(worldToScreenX(view, screenToWorldX(view, 123))).toBe(123) + }) + + it('draws tiles at the power of two nearest a device pixel, never finer than a block', () => { + expect(renderBlocksPerPixel(4, 1)).toBe(4) + expect(renderBlocksPerPixel(4, 2)).toBe(2) + expect(renderBlocksPerPixel(0.25, 1)).toBe(1) + expect(renderBlocksPerPixel(5.5, 1)).toBe(4) + }) + + it('covers the screen, starting from the middle', () => { + const tiles = visibleTiles(view, 2, 128) + + // 1600 × 1200 blocks around (100, -50) in tiles of 256 blocks: x -3 to 3, z -3 to 2. + expect(tiles.length).toBe(7 * 6) + expect(tiles[0]).toEqual({ tileX: 0, tileZ: -1, blocksPerPixel: 2 }) + }) + + it('finds the coarser tile that covers a tile', () => { + expect(coarserTile({ tileX: -3, tileZ: 5, blocksPerPixel: 2 }, 2)).toEqual({ tileX: -1, tileZ: 1, blocksPerPixel: 8 }) + }) + + it('previews four blank tiles with one tile a level out, never past the coarsest scale', () => { + const blank = [ + { tileX: 0, tileZ: 0, blocksPerPixel: 2 }, + { tileX: 1, tileZ: 0, blocksPerPixel: 2 }, + { tileX: 0, tileZ: 1, blocksPerPixel: 2 }, + { tileX: -1, tileZ: 0, blocksPerPixel: 2 }, + { tileX: 0, tileZ: 0, blocksPerPixel: 4096 } + ] + + expect(previewsFor(blank)).toEqual([ + { tileX: 0, tileZ: 0, blocksPerPixel: 4 }, + { tileX: -1, tileZ: 0, blocksPerPixel: 4 } + ]) + }) +}) + +describe('census', () => { + it('shares the visible pixels between the labels', () => { + const tile = splitTile(4) + const shares = countShares([{ tile, worldX: 0, worldZ: 0 }], { minimumX: 0, minimumZ: 0, maximumX: 4, maximumZ: 4 }, false, 63) + + expect(shares.map((share) => share.subject.key).sort()).toEqual(['desert', 'plains']) + expect(shares[0].fraction).toBeCloseTo(0.5) + expect(gridIndex(tile, -1, -1)).toBe(0) + }) + + it('counts only the part of a tile inside the area, largest share first', () => { + const shares = countShares([{ tile: splitTile(4), worldX: 0, worldZ: 0 }], { minimumX: 0, minimumZ: 0, maximumX: 3, maximumZ: 4 }, false, 63) + + expect(shares.map((share) => share.subject.key)).toEqual(['plains', 'desert']) + expect(shares[0].fraction).toBeCloseTo(2 / 3) + }) + + it('counts height bands in the height view', () => { + const shares = countShares([{ tile: splitTile(4), worldX: 0, worldZ: 0 }], { minimumX: 0, minimumZ: 0, maximumX: 4, maximumZ: 4 }, true, 63) + + expect(shares).toHaveLength(1) + expect(shares[0].subject).toMatchObject({ kind: 'HEIGHT', name: '0–8 above sea' }) + }) +}) diff --git a/src/renderer/src/map/tileStyle.ts b/src/renderer/src/map/tileStyle.ts new file mode 100644 index 000000000..f3a6bb09f --- /dev/null +++ b/src/renderer/src/map/tileStyle.ts @@ -0,0 +1,150 @@ +import { gridIndex } from '../bridge/tileDecoding' +import { NO_LABEL, type MapTile } from '../bridge/types' +import { bandIndexOf, blend, heightColor } from './heightColors' + +/** What a highlight picks out: a biome or region by key, or a height band in the height view. */ +export interface Highlight { + kind: 'BIOME' | 'REGION' | 'HEIGHT' + key: string + name: string +} + +export interface TileStyle { + /** Colour by height instead of by label. */ + byHeight: boolean + shading: boolean + regionBorders: boolean + highlight: Highlight | null + seaLevel: number +} + +export function styleKey(style: TileStyle): string { + const highlight = style.highlight === null ? '' : `${style.highlight.kind}:${style.highlight.key}` + return `${style.byHeight}|${style.shading}|${style.regionBorders}|${highlight}|${style.seaLevel}` +} + +const UNKNOWN_SUBJECT = 0x5a5c62 +const SHADING_EXAGGERATION = 2 +const LIGHT_X = -0.5 +const LIGHT_Y = 0.7 +const LIGHT_Z = -0.5 +const LIGHT_LENGTH = Math.sqrt(LIGHT_X * LIGHT_X + LIGHT_Y * LIGHT_Y + LIGHT_Z * LIGHT_Z) +const AMBIENT_LIGHT = 0.35 +const DIRECT_LIGHT = 0.75 +const DARKEST_SHADE = 0.25 +const BRIGHTEST_SHADE = 1.15 +// Water lies flat over the seafloor, so only a hint of the relief beneath shows through. +const UNDERWATER_RELIEF = 0.15 +const DIM_TARGET = 0x1e1f22 +const DIM_AMOUNT = 0.72 +const DIM_DESATURATION = 0.6 +const HIGHLIGHT_EDGE = 0xffffff +// A solid outline turns biomes that are scattered pixel by pixel into white noise, so the edge only tints. +const HIGHLIGHT_EDGE_STRENGTH = 0.55 +const REGION_BORDER = 0x101114 +const REGION_BORDER_STRENGTH = 0.6 + +/** The tile's pixels as RGBA, as {@code style} draws them (v3e MapTile.styledPixels). */ +export function stylePixels(tile: MapTile, style: TileStyle): Uint8ClampedArray { + const { size, heights } = tile + const pixels = new Uint8ClampedArray(size * size * 4) + const colors = tile.labels.map((label) => label.color) + const byHeight = style.byHeight && heights !== null + const shading = (style.shading || byHeight) && heights !== null + const highlighted = highlightCells(tile, style) + for (let pixelZ = 0; pixelZ < size; pixelZ++) { + for (let pixelX = 0; pixelX < size; pixelX++) { + const cell = gridIndex(tile, pixelX, pixelZ) + let color = byHeight ? heightColor(heights[cell], style.seaLevel) : labelColor(colors, tile.subjects[cell]) + if (shading) { + color = shade(tile, heights, cell, color, style.seaLevel) + } + if (highlighted !== null) { + color = highlight(tile, highlighted, cell, color) + } + if (style.regionBorders && isRegionEdge(tile, cell)) { + color = blend(color, REGION_BORDER, REGION_BORDER_STRENGTH) + } + const at = (pixelZ * size + pixelX) * 4 + pixels[at] = (color >> 16) & 0xff + pixels[at + 1] = (color >> 8) & 0xff + pixels[at + 2] = color & 0xff + pixels[at + 3] = 0xff + } + } + return pixels +} + +function labelColor(colors: number[], index: number): number { + return index === NO_LABEL ? UNKNOWN_SUBJECT : colors[index] +} + +// Lit from the north west like a relief map, so slopes read as hills and valleys at a glance. +function shade(tile: MapTile, heights: Float32Array, cell: number, color: number, seaLevel: number): number { + const row = tile.size + 2 + const slopeX = (heights[cell + 1] - heights[cell - 1]) / (2 * tile.blocksPerPixel) + const slopeZ = (heights[cell + row] - heights[cell - row]) / (2 * tile.blocksPerPixel) + const normalX = -slopeX * SHADING_EXAGGERATION + const normalZ = -slopeZ * SHADING_EXAGGERATION + const normalLength = Math.sqrt(normalX * normalX + 1 + normalZ * normalZ) + const light = (normalX * LIGHT_X + LIGHT_Y + normalZ * LIGHT_Z) / (normalLength * LIGHT_LENGTH) + let factor = Math.min(BRIGHTEST_SHADE, Math.max(DARKEST_SHADE, AMBIENT_LIGHT + DIRECT_LIGHT * light)) + if (heights[cell] <= seaLevel) { + factor = 1 - (1 - factor) * UNDERWATER_RELIEF + } + return scale(color, factor) +} + +/** Which cells the highlight covers, as one flag per grid cell; null when nothing is highlighted. */ +function highlightCells(tile: MapTile, style: TileStyle): Uint8Array | null { + const target = style.highlight + if (target === null) { + return null + } + const cells = new Uint8Array(tile.subjects.length) + if (target.kind === 'HEIGHT') { + if (tile.heights !== null) { + const band = Number(target.key) + tile.heights.forEach((height, cell) => { + cells[cell] = bandIndexOf(height, style.seaLevel) === band ? 1 : 0 + }) + } + return cells + } + // Every view knows its regions, so a region can be highlighted in a biome view too. + const grid = target.kind === tile.subjectKind ? tile.subjects : target.kind === 'REGION' ? tile.regions : null + const index = tile.labels.findIndex((label) => label.kind === target.kind && label.key === target.key) + if (grid !== null && index >= 0) { + grid.forEach((label, cell) => { + cells[cell] = label === index ? 1 : 0 + }) + } + return cells +} + +function highlight(tile: MapTile, highlighted: Uint8Array, cell: number, color: number): number { + if (highlighted[cell] === 0) { + return dim(color) + } + const row = tile.size + 2 + const edge = highlighted[cell + 1] === 0 || highlighted[cell - 1] === 0 || highlighted[cell + row] === 0 || highlighted[cell - row] === 0 + return edge ? blend(color, HIGHLIGHT_EDGE, HIGHLIGHT_EDGE_STRENGTH) : color +} + +function isRegionEdge(tile: MapTile, cell: number): boolean { + const region = tile.regions[cell] + return tile.regions[cell + 1] !== region || tile.regions[cell + tile.size + 2] !== region +} + +function dim(color: number): number { + const gray = Math.floor((((color >> 16) & 0xff) + ((color >> 8) & 0xff) + (color & 0xff)) / 3) + const desaturated = blend(color, (gray << 16) | (gray << 8) | gray, DIM_DESATURATION) + return blend(desaturated, DIM_TARGET, DIM_AMOUNT) +} + +function scale(color: number, factor: number): number { + const red = Math.min(255, Math.floor(((color >> 16) & 0xff) * factor)) + const green = Math.min(255, Math.floor(((color >> 8) & 0xff) * factor)) + const blue = Math.min(255, Math.floor((color & 0xff) * factor)) + return (red << 16) | (green << 8) | blue +} diff --git a/src/renderer/src/map/viewport.ts b/src/renderer/src/map/viewport.ts new file mode 100644 index 000000000..8fd0a5254 --- /dev/null +++ b/src/renderer/src/map/viewport.ts @@ -0,0 +1,93 @@ +/** Where the map looks and how far it is zoomed; screen sizes are CSS pixels. */ +export interface Viewport { + centerX: number + centerZ: number + blocksPerPixel: number + width: number + height: number +} + +export interface TileAddress { + tileX: number + tileZ: number + blocksPerPixel: number +} + +export const MINIMUM_VIEW_BLOCKS_PER_PIXEL = 1 / 8 +export const MAXIMUM_BLOCKS_PER_PIXEL = 4096 +export const DEFAULT_BLOCKS_PER_PIXEL = 4 +// Iris has nothing finer than a block, so closer views magnify the block-sized tiles. +const MINIMUM_RENDER_BLOCKS_PER_PIXEL = 1 + +export function clampBlocksPerPixel(blocksPerPixel: number): number { + return Math.min(MAXIMUM_BLOCKS_PER_PIXEL, Math.max(MINIMUM_VIEW_BLOCKS_PER_PIXEL, blocksPerPixel)) +} + +export function screenToWorldX(view: Viewport, screenX: number): number { + return view.centerX + (screenX - view.width / 2) * view.blocksPerPixel +} + +export function screenToWorldZ(view: Viewport, screenZ: number): number { + return view.centerZ + (screenZ - view.height / 2) * view.blocksPerPixel +} + +export function worldToScreenX(view: Viewport, worldX: number): number { + return (worldX - view.centerX) / view.blocksPerPixel + view.width / 2 +} + +export function worldToScreenZ(view: Viewport, worldZ: number): number { + return (worldZ - view.centerZ) / view.blocksPerPixel + view.height / 2 +} + +/** + * The scale tiles are drawn at for a view: the nearest power of two to one tile pixel per device pixel, so tiles stay + * sharp on dense screens and every zoom between two levels reuses the same tiles. + */ +export function renderBlocksPerPixel(viewBlocksPerPixel: number, devicePixelRatio: number): number { + const level = 2 ** Math.round(Math.log2(viewBlocksPerPixel / devicePixelRatio)) + return Math.min(MAXIMUM_BLOCKS_PER_PIXEL, Math.max(MINIMUM_RENDER_BLOCKS_PER_PIXEL, level)) +} + +/** The tiles covering the view, nearest the centre first so the middle of the screen fills in first. */ +export function visibleTiles(view: Viewport, renderScale: number, tileSize: number): TileAddress[] { + const span = tileSize * renderScale + const firstX = Math.floor(screenToWorldX(view, 0) / span) + const lastX = Math.floor(screenToWorldX(view, view.width) / span) + const firstZ = Math.floor(screenToWorldZ(view, 0) / span) + const lastZ = Math.floor(screenToWorldZ(view, view.height) / span) + const middleX = view.centerX / span - 0.5 + const middleZ = view.centerZ / span - 0.5 + const tiles: TileAddress[] = [] + for (let tileZ = firstZ; tileZ <= lastZ; tileZ++) { + for (let tileX = firstX; tileX <= lastX; tileX++) { + tiles.push({ tileX, tileZ, blocksPerPixel: renderScale }) + } + } + const distance = (tile: TileAddress): number => (tile.tileX - middleX) ** 2 + (tile.tileZ - middleZ) ** 2 + return tiles.sort((first, second) => distance(first) - distance(second)) +} + +/** + * One tile a level out for each group of blank tiles, in their order: a quarter of the pixels, so the screen fills + * about four times sooner and sharpens as the tiles themselves arrive. + */ +export function previewsFor(blankTiles: TileAddress[]): TileAddress[] { + const previews = new Map() + for (const tile of blankTiles) { + const preview = coarserTile(tile, 1) + if (preview.blocksPerPixel <= MAXIMUM_BLOCKS_PER_PIXEL) { + previews.set(`${preview.tileX}/${preview.tileZ}/${preview.blocksPerPixel}`, preview) + } + } + return [...previews.values()] +} + +/** The coarser tile that covers {@code tile}, {@code levels} zoom levels out. */ +export function coarserTile(tile: TileAddress, levels: number): TileAddress { + const factor = 2 ** levels + return { + tileX: Math.floor(tile.tileX / factor), + tileZ: Math.floor(tile.tileZ / factor), + blocksPerPixel: tile.blocksPerPixel * factor + } +} diff --git a/src/renderer/src/studio/ConnectScreen.tsx b/src/renderer/src/studio/ConnectScreen.tsx new file mode 100644 index 000000000..faf2d5036 --- /dev/null +++ b/src/renderer/src/studio/ConnectScreen.tsx @@ -0,0 +1,93 @@ +import { useEffect, useRef, useState } from 'react' +import { Globe2, Loader2 } from 'lucide-react' +import { Button } from '@/components/ui/button' +import { Input } from '@/components/ui/input' +import type { BridgeConnection } from '../../../shared/bridge' + +const BRIDGE_POLL_MILLIS = 2000 + +interface ConnectScreenProps { + connecting: boolean + error: string | null + onConnect(connection: BridgeConnection): void + onLink(link: string): void +} + +/** + * Lists the worlds servers on this machine opened to the studio, and takes a pasted link for any other. A single + * world is opened right away, once. + */ +export function ConnectScreen({ connecting, error, onConnect, onLink }: ConnectScreenProps): React.JSX.Element { + const [bridges, setBridges] = useState([]) + const [link, setLink] = useState('') + const openedOnItsOwn = useRef(false) + + useEffect(() => { + let active = true + const refresh = (): void => { + void window.studio.listBridges().then((found) => { + if (!active) { + return + } + setBridges(found) + if (found.length === 1 && !openedOnItsOwn.current) { + openedOnItsOwn.current = true + onConnect(found[0]) + } + }) + } + refresh() + const timer = window.setInterval(refresh, BRIDGE_POLL_MILLIS) + return () => { + active = false + window.clearInterval(timer) + } + }, [onConnect]) + + return ( +
+
+

Open a world

+

+ Run /iris studio map in game or in the + server console. +

+ +
+ {bridges.length === 0 ? ( +
+ Waiting for a server on this machine +
+ ) : ( + bridges.map((bridge) => ( + + )) + )} +
+ +
{ + event.preventDefault() + onLink(link) + }} + > + setLink(event.target.value)} placeholder="iris-studio://…" className="h-8" /> + +
+ {error !== null &&

{error}

} +
+
+ ) +} diff --git a/src/renderer/src/studio/HelpDialog.tsx b/src/renderer/src/studio/HelpDialog.tsx new file mode 100644 index 000000000..1544a2876 --- /dev/null +++ b/src/renderer/src/studio/HelpDialog.tsx @@ -0,0 +1,49 @@ +import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog' +import { Kbd } from '@/components/ui/kbd' +import type { ViewInfo } from '../bridge/types' +import { MOUSE_HINTS, SHORTCUTS, VIEW_KEYS } from './shortcuts' + +interface HelpDialogProps { + open: boolean + onOpenChange(open: boolean): void + views: ViewInfo[] +} + +/** Every key and mouse gesture of the map. */ +export function HelpDialog({ open, onOpenChange, views }: HelpDialogProps): React.JSX.Element { + const viewRows = views.filter((view) => VIEW_KEYS[view.id] !== undefined).map((view) => ({ key: VIEW_KEYS[view.id], label: view.label })) + const groups = [ + { title: 'Views', rows: [...viewRows, ...rowsOf('Views')] }, + { title: 'Everywhere', rows: rowsOf('Everywhere') }, + { title: 'Map', rows: rowsOf('Map') }, + { title: 'Mouse', rows: MOUSE_HINTS.map((hint) => ({ key: hint.gesture, label: hint.label })) } + ] + return ( + + + + Shortcuts + +
+ {groups.map((group) => ( +
+

{group.title}

+
    + {group.rows.map((row) => ( +
  • + {row.label} + {row.key} +
  • + ))} +
+
+ ))} +
+
+
+ ) +} + +function rowsOf(group: 'Views' | 'Everywhere' | 'Map'): { key: string; label: string }[] { + return SHORTCUTS.filter((shortcut) => shortcut.group === group).map((shortcut) => ({ key: shortcut.keyText, label: shortcut.label })) +} diff --git a/src/renderer/src/studio/HoverCard.tsx b/src/renderer/src/studio/HoverCard.tsx new file mode 100644 index 000000000..b861b6558 --- /dev/null +++ b/src/renderer/src/studio/HoverCard.tsx @@ -0,0 +1,137 @@ +import { useLayoutEffect, useRef, useState } from 'react' +import { Kbd } from '@/components/ui/kbd' +import type { MapHover, MapLabel } from '../bridge/types' +import { hexColor } from './colors' +import type { CanvasPoint } from './MapCanvas' +import { shortcutFor } from './shortcuts' + +interface HoverCardProps { + hover: MapHover + point: CanvasPoint + viewId: string + detailed: boolean + minY: number +} + +const CURSOR_GAP_PIXELS = 18 +const EDGE_MARGIN_PIXELS = 8 + +interface Row { + label: string + value: string + mono?: boolean +} + +/** The spot under the cursor: its biome and ground, and with Shift held, the rest of what the server knows. */ +export function HoverCard({ hover, point, viewId, detailed, minY }: HoverCardProps): React.JSX.Element { + const card = useRef(null) + const [position, setPosition] = useState({ left: point.x + CURSOR_GAP_PIXELS, top: point.y + CURSOR_GAP_PIXELS }) + + useLayoutEffect(() => { + const element = card.current + const parent = element?.parentElement + if (!element || !parent) { + return + } + const fitsRight = point.x + CURSOR_GAP_PIXELS + element.offsetWidth + EDGE_MARGIN_PIXELS <= parent.clientWidth + const fitsBelow = point.y + CURSOR_GAP_PIXELS + element.offsetHeight + EDGE_MARGIN_PIXELS <= parent.clientHeight + setPosition({ + left: fitsRight ? point.x + CURSOR_GAP_PIXELS : Math.max(EDGE_MARGIN_PIXELS, point.x - CURSOR_GAP_PIXELS - element.offsetWidth), + top: fitsBelow ? point.y + CURSOR_GAP_PIXELS : Math.max(EDGE_MARGIN_PIXELS, point.y - CURSOR_GAP_PIXELS - element.offsetHeight) + }) + }, [point, hover, detailed]) + + const subject = viewId === 'caveBiomes' ? hover.caveBiome : viewId === 'regions' ? hover.region : hover.biome + const groups = detailed ? detailGroups(hover, viewId) : [] + return ( +
+
+

{ground(hover, minY)}

+ {groups.map((group) => ( +
+

{group.title}

+
+ {group.rows.map((row) => ( +
+
{row.label}
+
{row.value}
+
+ ))} +
+
+ ))} +
+ {!detailed && } + + +
+
+ ) +} + +function Header({ subject, region }: { subject: MapLabel | null; region: MapLabel | null }): React.JSX.Element { + return ( +
+ {subject !== null && } + {subject?.name ?? 'Nothing here'} + {region !== null && {region.name}} +
+ ) +} + +function Hint({ keyText, label }: { keyText: string; label: string }): React.JSX.Element { + return ( + + {keyText} + {label} + + ) +} + +/** Height as the world's Y, how far above or below the water, and how steep. */ +function ground(hover: MapHover, minY: number): string { + const aboveWater = Math.round(hover.height - hover.fluidHeight) + const signed = aboveWater > 0 ? `+${aboveWater}` : String(aboveWater) + return `Y ${Math.round(hover.height + minY)} · ${signed} from water · ${Math.round(hover.slopeDegrees)}°` +} + +function detailGroups(hover: MapHover, viewId: string): { title: string; rows: Row[] }[] { + const groups: { title: string; rows: Row[] }[] = [] + const terrain: Row[] = [] + if (viewId === 'caveBiomes' && hover.biome !== null) { + terrain.push({ label: 'Surface biome', value: hover.biome.name }) + } else if (hover.caveBiome !== null && hover.caveBiome.key !== hover.biome?.key) { + terrain.push({ label: 'Cave biome', value: hover.caveBiome.name }) + } + if (hover.vanillaBiome !== null) { + terrain.push({ label: 'Minecraft', value: hover.vanillaBiome.replace('minecraft:', '').replaceAll('_', ' ') }) + } + if (terrain.length > 0) { + groups.push({ title: 'Terrain', rows: terrain }) + } + const blockX = Math.floor(hover.worldX) + const blockZ = Math.floor(hover.worldZ) + groups.push({ + title: 'Location', + rows: [ + { label: 'Block', value: `${blockX}, ${blockZ}` }, + { label: 'Chunk', value: `${blockX >> 4}, ${blockZ >> 4}` }, + { label: 'Region file', value: `r.${blockX >> 9}.${blockZ >> 9}.mca`, mono: true } + ] + }) + const files: Row[] = [] + if (hover.biomeFile !== null) { + files.push({ label: 'Biome', value: hover.biomeFile, mono: true }) + } + if (hover.regionFile !== null) { + files.push({ label: 'Region', value: hover.regionFile, mono: true }) + } + if (files.length > 0) { + groups.push({ title: 'Files', rows: files }) + } + return groups +} diff --git a/src/renderer/src/studio/Legend.tsx b/src/renderer/src/studio/Legend.tsx new file mode 100644 index 000000000..0ce53ae46 --- /dev/null +++ b/src/renderer/src/studio/Legend.tsx @@ -0,0 +1,72 @@ +import { ScrollArea } from '@/components/ui/scroll-area' +import { cn } from '@/lib/utils' +import type { Share } from '../map/census' +import type { Highlight } from '../map/tileStyle' +import { hexColor } from './colors' + +interface LegendProps { + title: string + shares: Share[] + highlight: Highlight | null + onSelect(subject: Highlight): void +} + +/** What is on screen and how much of it each covers; clicking one highlights it on the map. */ +export function Legend({ title, shares, highlight, onSelect }: LegendProps): React.JSX.Element { + const sharedNames = namesUsedMoreThanOnce(shares) + return ( + + ) +} + +function namesUsedMoreThanOnce(shares: Share[]): Set { + const seen = new Set() + const repeated = new Set() + for (const share of shares) { + if (seen.has(share.subject.name)) { + repeated.add(share.subject.name) + } + seen.add(share.subject.name) + } + return repeated +} + +function fileName(key: string): string { + return key.slice(key.lastIndexOf('/') + 1) +} + +function percent(fraction: number): string { + if (fraction < 0.001) { + return '<0.1%' + } + return fraction < 0.1 ? `${(fraction * 100).toFixed(1)}%` : `${Math.round(fraction * 100)}%` +} diff --git a/src/renderer/src/studio/MapCanvas.tsx b/src/renderer/src/studio/MapCanvas.tsx new file mode 100644 index 000000000..3a164ab80 --- /dev/null +++ b/src/renderer/src/studio/MapCanvas.tsx @@ -0,0 +1,203 @@ +import { useEffect, useRef, useState } from 'react' +import { + ContextMenu, + ContextMenuContent, + ContextMenuItem, + ContextMenuSeparator, + ContextMenuTrigger +} from '@/components/ui/context-menu' +import type { BridgeClient } from '../bridge/BridgeClient' +import type { WorldInfo } from '../bridge/types' +import { MapController, type MapListener, type SpotSubjects } from '../map/MapController' +import type { Highlight } from '../map/tileStyle' + +export interface CanvasPoint { + x: number + y: number +} + +interface MapCanvasProps { + client: BridgeClient + world: WorldInfo + viewId: string + controllerRef: React.RefObject + listener: MapListener + highlight: Highlight | null + onPointer(point: CanvasPoint | null): void + onDragged(): void + onTeleport(point: CanvasPoint): void + onOpenFile(point: CanvasPoint): void + onHighlight(subject: Highlight): void + onCopy(text: string): void +} + +// A press that moves less than this is a click, not a drag. +const CLICK_SLOP_PIXELS = 4 +// One wheel notch is about 100; this zooms about 15% per notch, and smoothly on touchpads. +const WHEEL_ZOOM_PER_DELTA = 0.002 + +interface ContextSpot { + point: CanvasPoint + subjects: SpotSubjects + blockX: number + blockZ: number +} + +/** The map canvas and its mouse: drag to move, wheel to zoom, Ctrl+click to teleport, Alt+click to open a file. */ +export function MapCanvas(props: MapCanvasProps): React.JSX.Element { + const { client, world, viewId, controllerRef } = props + const canvasRef = useRef(null) + const latest = useRef(props) + latest.current = props + const [contextSpot, setContextSpot] = useState(null) + + useEffect(() => { + const canvas = canvasRef.current! + const map = new MapController(canvas, client, world, viewId, { + onStatus: (status) => latest.current.listener.onStatus(status), + onShares: (shares) => latest.current.listener.onShares(shares), + onError: (message) => latest.current.listener.onError(message) + }) + controllerRef.current = map + const resize = new ResizeObserver(([entry]) => map.resize(entry.contentRect.width, entry.contentRect.height)) + resize.observe(canvas) + return () => { + resize.disconnect() + map.close() + controllerRef.current = null + } + // The controller lives as long as the connection; later view changes go through setView, not a new controller. + }, [client, world, controllerRef]) + + useMouse(canvasRef, controllerRef, latest) + + return ( + { + if (!open) { + setContextSpot(null) + } + }} + > + + { + const map = controllerRef.current + if (map === null) { + return + } + const point = canvasPoint(event) + const spot = map.worldAt(point.x, point.y) + setContextSpot({ point, subjects: map.subjectsAt(point.x, point.y), blockX: Math.floor(spot.x), blockZ: Math.floor(spot.z) }) + }} + /> + + + {contextSpot !== null && } + + + ) +} + +function SpotMenu({ spot, viewId, props }: { spot: ContextSpot; viewId: string; props: MapCanvasProps }): React.JSX.Element { + const { subject, region } = spot.subjects + const coordinates = `${spot.blockX}, ${spot.blockZ}` + return ( + <> + {subject !== null && props.onHighlight(subject)}>{highlightText(subject, props.highlight)}} + {region !== null && subject?.kind !== 'REGION' && ( + props.onHighlight(region)}>{highlightText(region, props.highlight)} + )} + props.onTeleport(spot.point)}>Teleport here + props.onOpenFile(spot.point)}>{viewId === 'regions' ? 'Open region file' : 'Open biome file'} + + props.onCopy(coordinates)}>Copy coordinates ({coordinates}) + + ) +} + +function highlightText(subject: Highlight, current: Highlight | null): string { + const highlighted = current !== null && current.kind === subject.kind && current.key === subject.key + return `${highlighted ? 'Clear highlight of' : 'Highlight'} ${subject.name}` +} + +function canvasPoint(event: { clientX: number; clientY: number; currentTarget: Element }): CanvasPoint { + const bounds = event.currentTarget.getBoundingClientRect() + return { x: event.clientX - bounds.left, y: event.clientY - bounds.top } +} + +function useMouse( + canvasRef: React.RefObject, + controllerRef: React.RefObject, + latest: React.RefObject +): void { + useEffect(() => { + const canvas = canvasRef.current! + let press: { x: number; y: number; lastX: number; lastY: number; dragged: boolean } | null = null + + const down = (event: PointerEvent): void => { + if (event.button !== 0) { + return + } + canvas.setPointerCapture(event.pointerId) + press = { x: event.clientX, y: event.clientY, lastX: event.clientX, lastY: event.clientY, dragged: false } + } + const move = (event: PointerEvent): void => { + const point = canvasPoint({ clientX: event.clientX, clientY: event.clientY, currentTarget: canvas }) + controllerRef.current?.setCursor(point) + latest.current.onPointer(point) + if (press === null) { + return + } + if (!press.dragged && Math.hypot(event.clientX - press.x, event.clientY - press.y) >= CLICK_SLOP_PIXELS) { + press.dragged = true + latest.current.onDragged() + } + if (press.dragged) { + controllerRef.current?.panBy(event.clientX - press.lastX, event.clientY - press.lastY) + } + press.lastX = event.clientX + press.lastY = event.clientY + } + const up = (event: PointerEvent): void => { + if (press === null || event.button !== 0) { + return + } + const wasClick = !press.dragged + press = null + if (!wasClick) { + return + } + const point = canvasPoint({ clientX: event.clientX, clientY: event.clientY, currentTarget: canvas }) + if (event.ctrlKey || event.metaKey) { + latest.current.onTeleport(point) + } else if (event.altKey) { + latest.current.onOpenFile(point) + } + } + const leave = (): void => { + controllerRef.current?.setCursor(null) + latest.current.onPointer(null) + } + const wheel = (event: WheelEvent): void => { + event.preventDefault() + const point = canvasPoint({ clientX: event.clientX, clientY: event.clientY, currentTarget: canvas }) + controllerRef.current?.zoomAt(2 ** (-event.deltaY * WHEEL_ZOOM_PER_DELTA), point.x, point.y) + } + + canvas.addEventListener('pointerdown', down) + canvas.addEventListener('pointermove', move) + canvas.addEventListener('pointerup', up) + canvas.addEventListener('pointerleave', leave) + canvas.addEventListener('wheel', wheel, { passive: false }) + return () => { + canvas.removeEventListener('pointerdown', down) + canvas.removeEventListener('pointermove', move) + canvas.removeEventListener('pointerup', up) + canvas.removeEventListener('pointerleave', leave) + canvas.removeEventListener('wheel', wheel) + } + }, [canvasRef, controllerRef, latest]) +} diff --git a/src/renderer/src/studio/MapStudio.tsx b/src/renderer/src/studio/MapStudio.tsx new file mode 100644 index 000000000..0cbd10562 --- /dev/null +++ b/src/renderer/src/studio/MapStudio.tsx @@ -0,0 +1,358 @@ +import { useCallback, useEffect, useRef, useState } from 'react' +import type { ThemeChoice } from '../../../shared/bridge' +import type { BridgeClient } from '../bridge/BridgeClient' +import type { MapHover, Marker, WorldInfo } from '../bridge/types' +import type { Share } from '../map/census' +import type { MapController, MapStatus, MapToggles } from '../map/MapController' +import type { Highlight } from '../map/tileStyle' +import { HelpDialog } from './HelpDialog' +import { HoverCard } from './HoverCard' +import { Legend } from './Legend' +import { MapCanvas, type CanvasPoint } from './MapCanvas' +import { actionForKey, viewForKey, type ShortcutAction } from './shortcuts' +import { StatusBar } from './StatusBar' +import { StudioToolbar } from './StudioToolbar' +import { ViewList } from './ViewList' + +const KEYBOARD_ZOOM_FACTOR = 2 ** 0.25 +const ENTITY_POLL_MILLIS = 2000 +const NOTICE_MILLIS = 4000 + +interface MapStudioProps { + client: BridgeClient + world: WorldInfo + theme: { choice: ThemeChoice; next: () => void } + onDisconnect(): void +} + +export interface StudioToggles extends MapToggles { + follow: boolean + entities: boolean +} + +/** The map of one world: views on the left, the map in the middle, what is on screen on the right. */ +export function MapStudio({ client, world, theme, onDisconnect }: MapStudioProps): React.JSX.Element { + const controller = useRef(null) + const [viewId, setViewId] = useState(world.views[0]?.id ?? 'biomes') + const [toggles, setToggles] = useState({ shading: true, regionBorders: false, grid: false, follow: false, entities: false }) + const [highlight, setHighlight] = useState(null) + const [status, setStatus] = useState(null) + const [shares, setShares] = useState([]) + const [players, setPlayers] = useState([]) + const [entities, setEntities] = useState([]) + const [pointer, setPointer] = useState(null) + const [hover, setHover] = useState(null) + const [detailed, setDetailed] = useState(false) + const [helpOpen, setHelpOpen] = useState(false) + const [notice, setNotice] = useState(null) + const [connected, setConnected] = useState(true) + const view = world.views.find((candidate) => candidate.id === viewId) ?? world.views[0] + + const tell = useCallback((message: string) => setNotice(message), []) + + useEffect(() => { + if (notice === null) { + return + } + const timer = window.setTimeout(() => setNotice(null), NOTICE_MILLIS) + return () => window.clearTimeout(timer) + }, [notice]) + + useEffect(() => controller.current?.setView(viewId), [viewId]) + useEffect(() => controller.current?.setToggles(toggles), [toggles]) + useEffect(() => controller.current?.setHighlight(highlight), [highlight]) + useEffect(() => controller.current?.setMarkers(players, toggles.entities ? entities : []), [players, entities, toggles.entities]) + + useEffect(() => { + if (toggles.follow && players.length > 0) { + controller.current?.centerOn(players[0].worldX, players[0].worldZ) + } + }, [players, toggles.follow]) + + useServerEvents(client, controller, setPlayers, tell, setConnected) + useEntities(client, toggles.entities, setEntities) + useHover(client, controller, pointer, setHover) + + const selectView = useCallback((nextViewId: string) => { + setViewId(nextViewId) + setHighlight(null) + }, []) + + const toggle = useCallback((name: keyof StudioToggles) => setToggles((current) => ({ ...current, [name]: !current[name] })), []) + + const highlightUnderCursor = useCallback(() => { + if (pointer === null || controller.current === null) { + return + } + const { subject } = controller.current.subjectsAt(pointer.x, pointer.y) + setHighlight((current) => (subject === null || sameSubject(current, subject) ? null : subject)) + }, [pointer]) + + const runShortcut = useCallback( + (action: ShortcutAction) => { + const map = controller.current + switch (action) { + case 'nextView': + selectView(world.views[(world.views.findIndex((candidate) => candidate.id === viewId) + 1) % world.views.length].id) + return + case 'refresh': + map?.refresh() + tell('Redrawing with the latest pack files') + return + case 'zoomIn': + map?.zoomAt(KEYBOARD_ZOOM_FACTOR) + return + case 'zoomOut': + map?.zoomAt(1 / KEYBOARD_ZOOM_FACTOR) + return + case 'resetZoom': + map?.resetZoom() + return + case 'dismiss': + setHighlight(null) + return + case 'follow': + toggle('follow') + return + case 'grid': + toggle('grid') + return + case 'entities': + toggle('entities') + return + case 'highlight': + highlightUnderCursor() + return + case 'shading': + toggle('shading') + return + case 'borders': + toggle('regionBorders') + return + case 'help': + setHelpOpen((open) => !open) + } + }, + [world.views, viewId, selectView, toggle, highlightUnderCursor, tell] + ) + + useKeyboard(runShortcut, selectView, setDetailed, world) + + const teleport = useCallback( + (point: CanvasPoint) => { + const spot = controller.current?.worldAt(point.x, point.y) + if (spot === undefined) { + return + } + client + .teleport(Math.floor(spot.x), Math.floor(spot.z)) + .then(() => tell(`Teleporting to ${Math.floor(spot.x)}, ${Math.floor(spot.z)}`)) + .catch((failure: Error) => tell(failure.message)) + }, + [client, tell] + ) + + const openFile = useCallback( + (point: CanvasPoint) => { + const spot = controller.current?.worldAt(point.x, point.y) + if (spot === undefined) { + return + } + client + .openInEditor(spot.x, spot.z, viewId) + .then((message) => tell(message ?? 'Opened on the server')) + .catch((failure: Error) => tell(failure.message)) + }, + [client, viewId, tell] + ) + + return ( +
+ runShortcut('refresh')} + onResetZoom={() => runShortcut('resetZoom')} + onHelp={() => setHelpOpen(true)} + onDisconnect={onDisconnect} + /> +
+ +
+ setToggles((current) => (current.follow ? { ...current, follow: false } : current))} + onTeleport={teleport} + onOpenFile={openFile} + onHighlight={(subject) => setHighlight((current) => (sameSubject(current, subject) ? null : subject))} + highlight={highlight} + onCopy={(text) => { + window.studio.copyText(text) + tell(`Copied ${text}`) + }} + /> + {pointer !== null && hover !== null && ( + + )} + {!connected && ( +
+
+

Lost the connection to the server

+ +
+
+ )} +
+ setHighlight((current) => (sameSubject(current, subject) ? null : subject))} + /> +
+ + +
+ ) +} + +function sameSubject(first: Highlight | null, second: Highlight | null): boolean { + return first !== null && second !== null && first.kind === second.kind && first.key === second.key +} + +function legendTitle(viewId: string): string { + if (viewId === 'regions') { + return 'Regions on screen' + } + return viewId === 'height' ? 'Heights on screen' : 'Biomes on screen' +} + +/** Players and hotloads from the server; the first world event only says the world runs, which is known. */ +function useServerEvents( + client: BridgeClient, + controller: React.RefObject, + setPlayers: (players: Marker[]) => void, + tell: (message: string) => void, + setConnected: (connected: boolean) => void +): void { + useEffect(() => { + const stop = new AbortController() + let firstWorldEvent = true + void client.listen( + { + onWorld: (running) => { + if (firstWorldEvent) { + firstWorldEvent = false + return + } + if (running) { + controller.current?.refresh() + tell('Pack reloaded, redrawing') + } else { + tell('The world stopped') + } + }, + onPlayers: setPlayers, + onClosed: () => setConnected(false) + }, + stop.signal + ) + return () => stop.abort() + }, [client, controller, setPlayers, tell, setConnected]) +} + +function useEntities(client: BridgeClient, visible: boolean, setEntities: (entities: Marker[]) => void): void { + useEffect(() => { + if (!visible) { + return + } + let active = true + const refresh = (): void => { + client + .entities() + .then((found) => active && setEntities(found)) + .catch(() => undefined) + } + refresh() + const timer = window.setInterval(refresh, ENTITY_POLL_MILLIS) + return () => { + active = false + window.clearInterval(timer) + } + }, [client, visible, setEntities]) +} + +/** Asks the server about the spot under the cursor; a newer spot aborts the question about an older one. */ +function useHover( + client: BridgeClient, + controller: React.RefObject, + pointer: CanvasPoint | null, + setHover: (hover: MapHover | null) => void +): void { + useEffect(() => { + if (pointer === null || controller.current === null) { + setHover(null) + return + } + const spot = controller.current.worldAt(pointer.x, pointer.y) + const stop = new AbortController() + client + .hover(Math.floor(spot.x), Math.floor(spot.z), stop.signal) + .then(setHover) + .catch(() => undefined) + return () => stop.abort() + }, [client, controller, pointer, setHover]) +} + +function useKeyboard( + runShortcut: (action: ShortcutAction) => void, + selectView: (view: string) => void, + setDetailed: (detailed: boolean) => void, + world: WorldInfo +): void { + useEffect(() => { + const down = (event: KeyboardEvent): void => { + if (event.key === 'Shift') { + setDetailed(true) + } + if (event.ctrlKey || event.metaKey || event.altKey || event.target instanceof HTMLInputElement) { + return + } + const viewId = viewForKey(event.key) + if (viewId !== null && world.views.some((view) => view.id === viewId)) { + selectView(viewId) + return + } + const action = actionForKey(event.key) + if (action !== null) { + event.preventDefault() + runShortcut(action) + } + } + const up = (event: KeyboardEvent): void => { + if (event.key === 'Shift') { + setDetailed(false) + } + } + const blur = (): void => setDetailed(false) + window.addEventListener('keydown', down) + window.addEventListener('keyup', up) + window.addEventListener('blur', blur) + return () => { + window.removeEventListener('keydown', down) + window.removeEventListener('keyup', up) + window.removeEventListener('blur', blur) + } + }, [runShortcut, selectView, setDetailed, world]) +} diff --git a/src/renderer/src/studio/StatusBar.tsx b/src/renderer/src/studio/StatusBar.tsx new file mode 100644 index 000000000..71596ceeb --- /dev/null +++ b/src/renderer/src/studio/StatusBar.tsx @@ -0,0 +1,54 @@ +import type { MapStatus } from '../map/MapController' + +interface StatusBarProps { + viewLabel: string + status: MapStatus | null + notice: string | null +} + +const NUMBER = new Intl.NumberFormat('en-US') + +/** What the map shows, what it is busy with, and where the cursor is (v3e StudioStatusBar). */ +export function StatusBar({ viewLabel, status, notice }: StatusBarProps): React.JSX.Element { + const drawing = status !== null && status.tilesReady < status.tilesTotal + return ( +
+ + {viewLabel} + {status !== null && ( + <> + + {formatScale(status.blocksPerPixel)} blocks/px + + {NUMBER.format(status.widthBlocks)} × {NUMBER.format(status.heightBlocks)} blocks + + )} + + + {notice ?? (drawing ? `Drawing ${status.tilesReady} of ${status.tilesTotal} tiles` : '')} + {notice === null && drawing && ( + + + + )} + + {status !== null && ( + + X {NUMBER.format(status.cursorX)} + Z {NUMBER.format(status.cursorZ)} + + )} +
+ ) +} + +function Gap(): React.JSX.Element { + return +} + +function formatScale(blocksPerPixel: number): string { + if (blocksPerPixel >= 10) { + return String(Math.round(blocksPerPixel)) + } + return blocksPerPixel >= 1 ? blocksPerPixel.toFixed(1) : blocksPerPixel.toFixed(2) +} diff --git a/src/renderer/src/studio/StudioToolbar.tsx b/src/renderer/src/studio/StudioToolbar.tsx new file mode 100644 index 000000000..386013f42 --- /dev/null +++ b/src/renderer/src/studio/StudioToolbar.tsx @@ -0,0 +1,125 @@ +import { CircleHelp, Grid3x3, LocateFixed, LogOut, Monitor, Moon, Mountain, PawPrint, RefreshCw, Spline, Sun, ZoomIn } from 'lucide-react' +import type { ReactNode } from 'react' +import { Button } from '@/components/ui/button' +import { Kbd } from '@/components/ui/kbd' +import { Separator } from '@/components/ui/separator' +import { Toggle } from '@/components/ui/toggle' +import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' +import type { ThemeChoice } from '../../../shared/bridge' +import type { WorldInfo } from '../bridge/types' +import type { StudioToggles } from './MapStudio' +import { shortcutFor, type ShortcutAction } from './shortcuts' + +interface StudioToolbarProps { + title: string + world: WorldInfo + toggles: StudioToggles + hasPlayers: boolean + theme: { choice: ThemeChoice; next: () => void } + onToggle(name: keyof StudioToggles): void + onRefresh(): void + onResetZoom(): void + onHelp(): void + onDisconnect(): void +} + +const THEME_ICONS: Record = { system: , light: , dark: } +const THEME_NAMES: Record = { system: 'Theme: system', light: 'Theme: light', dark: 'Theme: dark' } + +export function StudioToolbar(props: StudioToolbarProps): React.JSX.Element { + const { toggles, onToggle } = props + return ( +
+ {props.title} + + + + + + + onToggle('grid')}> + Grid + + onToggle('entities')}> + Entities + + onToggle('follow')}> + Follow + + + onToggle('shading')}> + Shading + + onToggle('regionBorders')}> + Borders + + +
+ + {props.world.world} + + + + + + + + + + +
+ ) +} + +function IconHint({ hint, keyText, children }: { hint: string; keyText?: string; children: ReactNode }): React.JSX.Element { + return ( + + {children} + + {hint} + {keyText !== undefined && {keyText}} + + + ) +} + +function ToolButton({ action, hint, onClick, children }: { action: ShortcutAction; hint: string; onClick(): void; children: ReactNode }): React.JSX.Element { + return ( + + + + ) +} + +interface ToolToggleProps { + action: ShortcutAction + hint: string + pressed: boolean + disabled?: boolean + onPressed(): void + children: ReactNode +} + +function ToolToggle({ action, hint, pressed, disabled, onPressed, children }: ToolToggleProps): React.JSX.Element { + return ( + + + + {children} + + + + ) +} diff --git a/src/renderer/src/studio/ViewList.tsx b/src/renderer/src/studio/ViewList.tsx new file mode 100644 index 000000000..43a57b869 --- /dev/null +++ b/src/renderer/src/studio/ViewList.tsx @@ -0,0 +1,61 @@ +import { Gem, Map as MapIcon, Mountain, Sprout, Trees, Waves, type LucideIcon } from 'lucide-react' +import { Kbd } from '@/components/ui/kbd' +import { ScrollArea } from '@/components/ui/scroll-area' +import { cn } from '@/lib/utils' +import type { ViewInfo } from '../bridge/types' +import { VIEW_KEYS } from './shortcuts' + +const VIEW_ICONS: Record = { + biomes: Trees, + regions: MapIcon, + height: Mountain, + landBiomes: Sprout, + seaBiomes: Waves, + caveBiomes: Gem +} + +interface ViewListProps { + views: ViewInfo[] + current: string + onSelect(view: string): void +} + +/** The views the server offers, in its groups, each with what it shows and its key. */ +export function ViewList({ views, current, onSelect }: ViewListProps): React.JSX.Element { + const groups = [...new Set(views.map((view) => view.groupLabel))] + return ( + + ) +} + +function ViewRow({ view, selected, onSelect }: { view: ViewInfo; selected: boolean; onSelect(): void }): React.JSX.Element { + const Icon = VIEW_ICONS[view.id] ?? MapIcon + return ( + + ) +} diff --git a/src/renderer/src/studio/colors.ts b/src/renderer/src/studio/colors.ts new file mode 100644 index 000000000..79e9ca266 --- /dev/null +++ b/src/renderer/src/studio/colors.ts @@ -0,0 +1,4 @@ +/** A 0xRRGGBB colour as CSS. */ +export function hexColor(color: number): string { + return `#${color.toString(16).padStart(6, '0')}` +} diff --git a/src/renderer/src/studio/shortcuts.ts b/src/renderer/src/studio/shortcuts.ts new file mode 100644 index 000000000..14bd71831 --- /dev/null +++ b/src/renderer/src/studio/shortcuts.ts @@ -0,0 +1,72 @@ +/** The studio's keys, as v3e's studio had them (StudioShortcut). */ +export type ShortcutAction = + | 'nextView' + | 'refresh' + | 'zoomIn' + | 'zoomOut' + | 'resetZoom' + | 'dismiss' + | 'follow' + | 'grid' + | 'entities' + | 'highlight' + | 'shading' + | 'borders' + | 'help' + +export interface Shortcut { + action: ShortcutAction + label: string + group: 'Views' | 'Everywhere' | 'Map' + /** The key as shown, then every KeyboardEvent.key that triggers it. */ + keyText: string + keys: string[] +} + +export const SHORTCUTS: Shortcut[] = [ + { action: 'nextView', label: 'Next view', group: 'Views', keyText: 'M', keys: ['m'] }, + { action: 'refresh', label: 'Redraw the map with the latest pack files', group: 'Everywhere', keyText: 'R', keys: ['r'] }, + { action: 'zoomIn', label: 'Zoom in', group: 'Everywhere', keyText: '=', keys: ['=', '+'] }, + { action: 'zoomOut', label: 'Zoom out', group: 'Everywhere', keyText: '-', keys: ['-'] }, + { action: 'resetZoom', label: 'Reset zoom', group: 'Everywhere', keyText: '\\', keys: ['\\'] }, + { action: 'dismiss', label: 'Clear the highlight', group: 'Everywhere', keyText: 'Esc', keys: ['Escape'] }, + { action: 'follow', label: 'Follow your player', group: 'Map', keyText: 'F', keys: ['f'] }, + { action: 'grid', label: 'Chunk and region grid', group: 'Map', keyText: 'G', keys: ['g'] }, + { action: 'entities', label: 'Show entities', group: 'Map', keyText: 'E', keys: ['e'] }, + { action: 'highlight', label: 'Highlight what is under the cursor', group: 'Map', keyText: 'H', keys: ['h'] }, + { action: 'shading', label: 'Terrain shading', group: 'Map', keyText: 'S', keys: ['s'] }, + { action: 'borders', label: 'Region borders', group: 'Map', keyText: 'B', keys: ['b'] }, + { action: 'help', label: 'Show the shortcuts', group: 'Map', keyText: '/', keys: ['/', '?'] } +] + +/** The key of each view; 4 stays free for the 3D world, as in v3e. */ +export const VIEW_KEYS: Record = { + biomes: '1', + regions: '2', + height: '3', + landBiomes: '5', + seaBiomes: '6', + caveBiomes: '7' +} + +export const MOUSE_HINTS: { gesture: string; label: string }[] = [ + { gesture: 'Drag', label: 'Move the map' }, + { gesture: 'Wheel', label: 'Zoom around the cursor' }, + { gesture: 'Shift', label: 'More about the spot under the cursor' }, + { gesture: 'Ctrl+Click', label: 'Teleport there' }, + { gesture: 'Alt+Click', label: 'Open the biome or region file' }, + { gesture: 'Right click', label: 'Highlight, teleport, open or copy' } +] + +export function shortcutFor(action: ShortcutAction): Shortcut { + return SHORTCUTS.find((shortcut) => shortcut.action === action)! +} + +export function actionForKey(key: string): ShortcutAction | null { + const pressed = key.length === 1 ? key.toLowerCase() : key + return SHORTCUTS.find((shortcut) => shortcut.keys.includes(pressed))?.action ?? null +} + +export function viewForKey(key: string): string | null { + return Object.entries(VIEW_KEYS).find(([, viewKey]) => viewKey === key)?.[0] ?? null +} diff --git a/src/renderer/src/studio/theme.ts b/src/renderer/src/studio/theme.ts new file mode 100644 index 000000000..2302a2cca --- /dev/null +++ b/src/renderer/src/studio/theme.ts @@ -0,0 +1,33 @@ +import { useEffect, useState } from 'react' +import type { ThemeChoice } from '../../../shared/bridge' + +const STORAGE_KEY = 'iris-studio.theme' +const DARK_QUERY = '(prefers-color-scheme: dark)' +const ORDER: ThemeChoice[] = ['system', 'light', 'dark'] + +function storedChoice(): ThemeChoice { + const stored = localStorage.getItem(STORAGE_KEY) + return stored === 'light' || stored === 'dark' ? stored : 'system' +} + +function apply(choice: ThemeChoice): void { + const dark = choice === 'dark' || (choice === 'system' && matchMedia(DARK_QUERY).matches) + document.documentElement.classList.toggle('dark', dark) +} + +/** The light or dark look, following the system unless chosen; the choice outlives the window. */ +export function useTheme(): { choice: ThemeChoice; next: () => void } { + const [choice, setChoice] = useState(storedChoice) + + useEffect(() => { + apply(choice) + window.studio.setTheme(choice) + localStorage.setItem(STORAGE_KEY, choice) + const media = matchMedia(DARK_QUERY) + const follow = (): void => apply(choice) + media.addEventListener('change', follow) + return () => media.removeEventListener('change', follow) + }, [choice]) + + return { choice, next: () => setChoice(ORDER[(ORDER.indexOf(choice) + 1) % ORDER.length]) } +} diff --git a/src/renderer/src/styles.css b/src/renderer/src/styles.css new file mode 100644 index 000000000..78fffb682 --- /dev/null +++ b/src/renderer/src/styles.css @@ -0,0 +1,111 @@ +@import "tailwindcss"; + +@custom-variant dark (&:is(.dark *)); + +/* The studio's colours, taken from the Swing studio (StudioTheme) so both look alike. */ +:root { + --background: #ffffff; + --foreground: #000000; + --card: #f7f8fa; + --card-foreground: #000000; + --popover: rgb(255 255 255 / 0.94); + --popover-foreground: #000000; + --primary: #3574f0; + --primary-foreground: #ffffff; + --secondary: #dfe1e5; + --secondary-foreground: #000000; + --muted: #f7f8fa; + --muted-foreground: #818594; + --secondary-text: #6c707e; + --accent: #dfe1e5; + --accent-foreground: #000000; + --selection: #d4e2ff; + --destructive: #db3b4b; + --warning: #c27d04; + --success: #208a3c; + --link: #315fbd; + --border: #ebecf0; + --input: #c9ccd6; + --ring: #3574f0; + --overlay-border: #dfe1e5; + --map-background: #e4e6eb; + --radius: 10px; +} + +.dark { + --background: #1e1f22; + --foreground: #dfe1e5; + --card: #2b2d30; + --card-foreground: #dfe1e5; + --popover: rgb(43 45 48 / 0.93); + --popover-foreground: #dfe1e5; + --primary: #3574f0; + --primary-foreground: #ffffff; + --secondary: #393b40; + --secondary-foreground: #dfe1e5; + --muted: #2b2d30; + --muted-foreground: #6f737a; + --secondary-text: #9da0a8; + --accent: #393b40; + --accent-foreground: #dfe1e5; + --selection: #2e436e; + --destructive: #f75464; + --warning: #f2c55c; + --success: #5fb865; + --link: #548af7; + --border: #1e1f22; + --input: #4e5157; + --ring: #3574f0; + --overlay-border: #43454a; + --map-background: #16171a; +} + +@theme inline { + --color-background: var(--background); + --color-foreground: var(--foreground); + --color-card: var(--card); + --color-card-foreground: var(--card-foreground); + --color-popover: var(--popover); + --color-popover-foreground: var(--popover-foreground); + --color-primary: var(--primary); + --color-primary-foreground: var(--primary-foreground); + --color-secondary: var(--secondary); + --color-secondary-foreground: var(--secondary-foreground); + --color-muted: var(--muted); + --color-muted-foreground: var(--muted-foreground); + --color-secondary-text: var(--secondary-text); + --color-accent: var(--accent); + --color-accent-foreground: var(--accent-foreground); + --color-selection: var(--selection); + --color-destructive: var(--destructive); + --color-warning: var(--warning); + --color-success: var(--success); + --color-link: var(--link); + --color-border: var(--border); + --color-input: var(--input); + --color-ring: var(--ring); + --color-overlay-border: var(--overlay-border); + --color-map-background: var(--map-background); + --radius-sm: calc(var(--radius) - 4px); + --radius-md: calc(var(--radius) - 2px); + --radius-lg: var(--radius); + --radius-xl: calc(var(--radius) + 4px); + --font-sans: "Inter", "Segoe UI", system-ui, sans-serif; + --font-mono: "JetBrains Mono", ui-monospace, monospace; +} + +@layer base { + * { + @apply border-border outline-ring/50; + } + + html, + body, + #root { + @apply h-full overflow-hidden; + } + + body { + @apply bg-background text-foreground text-[13px] antialiased select-none; + } +} diff --git a/src/shared/bridge.ts b/src/shared/bridge.ts new file mode 100644 index 000000000..3f1e1d68a --- /dev/null +++ b/src/shared/bridge.ts @@ -0,0 +1,37 @@ +/** A bridge a running Iris server opened, as its connection file or a studio link describes it. */ +export interface BridgeConnection { + world: string + port: number + token: string + startedMillis?: number +} + +export type ThemeChoice = 'system' | 'light' | 'dark' + +/** What the preload script hands the renderer. */ +export interface StudioHost { + listBridges(): Promise + /** The studio link the app was started with, if any. */ + initialLink(): Promise + onLink(listener: (link: string) => void): () => void + setTheme(theme: ThemeChoice): void + copyText(text: string): void +} + +const LINK_PROTOCOL = 'iris-studio:' + +/** The bridge a link such as {@code iris-studio://127.0.0.1:44503/?token=...} names; null for anything else. */ +export function parseStudioLink(text: string): BridgeConnection | null { + let url: URL + try { + url = new URL(text.trim()) + } catch { + return null + } + const port = Number(url.port) + const token = url.searchParams.get('token') + if (url.protocol !== LINK_PROTOCOL || !Number.isInteger(port) || port <= 0 || !token) { + return null + } + return { world: url.searchParams.get('world') ?? '', port, token } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..434c40bb5 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "ES2023", + "module": "ESNext", + "moduleResolution": "Bundler", + "lib": ["ES2023", "DOM", "DOM.Iterable"], + "jsx": "react-jsx", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "skipLibCheck": true, + "isolatedModules": true, + "resolveJsonModule": true, + "types": ["node"], + "paths": { "@/*": ["./src/renderer/src/*"] } + }, + "include": ["src", "electron.vite.config.ts"] +}