diff --git a/package.json b/package.json index 89bffa9..c3cefaa 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@tauri-apps/api": "^1.1.0", "clsx": "^1.2.1", "react": "^18.2.0", + "react-async-hook": "^4.0.0", "react-dom": "^18.2.0" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fab2d4c..d657ef8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,12 +1,12 @@ lockfileVersion: 5.4 specifiers: - '@tauri-apps/api': ^1.2.0 - '@tauri-apps/cli': ^1.2.1 - '@types/node': ^18.11.9 - '@types/react': ^18.0.25 - '@types/react-dom': ^18.0.9 - '@vitejs/plugin-react': ^2.2.0 + '@tauri-apps/api': ^1.1.0 + '@tauri-apps/cli': ^1.1.0 + '@types/node': ^18.7.10 + '@types/react': ^18.0.15 + '@types/react-dom': ^18.0.6 + '@vitejs/plugin-react': ^2.0.0 autoprefixer: ^10.4.13 clsx: ^1.2.1 eslint-config-prettier: ^8.5.0 @@ -15,36 +15,38 @@ specifiers: eslint-plugin-prettier: ^4.2.1 eslint-plugin-simple-import-sort: ^8.0.0 postcss: ^8.4.19 - prettier: ^2.8.0 + prettier: ^2.7.1 react: ^18.2.0 + react-async-hook: ^4.0.0 react-dom: ^18.2.0 tailwindcss: ^3.2.4 - typescript: ^4.9.3 - vite: ^3.2.4 + typescript: ^4.6.4 + vite: ^3.0.2 dependencies: '@tauri-apps/api': 1.2.0 clsx: 1.2.1 react: 18.2.0 + react-async-hook: 4.0.0_react@18.2.0 react-dom: 18.2.0_react@18.2.0 devDependencies: - '@tauri-apps/cli': 1.2.1 - '@types/node': 18.11.9 - '@types/react': 18.0.25 + '@tauri-apps/cli': 1.2.2 + '@types/node': 18.11.16 + '@types/react': 18.0.26 '@types/react-dom': 18.0.9 - '@vitejs/plugin-react': 2.2.0_vite@3.2.4 - autoprefixer: 10.4.13_postcss@8.4.19 + '@vitejs/plugin-react': 2.2.0_vite@3.2.5 + autoprefixer: 10.4.13_postcss@8.4.20 eslint-config-prettier: 8.5.0 eslint-plugin-import: 2.26.0 eslint-plugin-jsx-a11y: 6.6.1 - eslint-plugin-prettier: 4.2.1_woggxqa3l645ufel4grhxgids4 + eslint-plugin-prettier: 4.2.1_oixrjny4ajrp742454blm2dh6q eslint-plugin-simple-import-sort: 8.0.0 - postcss: 8.4.19 - prettier: 2.8.0 - tailwindcss: 3.2.4_postcss@8.4.19 - typescript: 4.9.3 - vite: 3.2.4_@types+node@18.11.9 + postcss: 8.4.20 + prettier: 2.8.1 + tailwindcss: 3.2.4_postcss@8.4.20 + typescript: 4.9.4 + vite: 3.2.5_@types+node@18.11.16 packages: @@ -63,39 +65,39 @@ packages: '@babel/highlight': 7.18.6 dev: true - /@babel/compat-data/7.20.1: - resolution: {integrity: sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ==} + /@babel/compat-data/7.20.5: + resolution: {integrity: sha512-KZXo2t10+/jxmkhNXc7pZTqRvSOIvVv/+lJwHS+B2rErwOyjuVRh60yVpb7liQ1U5t7lLJ1bz+t8tSypUZdm0g==} engines: {node: '>=6.9.0'} dev: true - /@babel/core/7.20.2: - resolution: {integrity: sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g==} + /@babel/core/7.20.5: + resolution: {integrity: sha512-UdOWmk4pNWTm/4DlPUl/Pt4Gz4rcEMb7CY0Y3eJl5Yz1vI8ZJGmHWaVE55LoxRjdpx0z259GE9U5STA9atUinQ==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.0 '@babel/code-frame': 7.18.6 - '@babel/generator': 7.20.4 - '@babel/helper-compilation-targets': 7.20.0_@babel+core@7.20.2 + '@babel/generator': 7.20.5 + '@babel/helper-compilation-targets': 7.20.0_@babel+core@7.20.5 '@babel/helper-module-transforms': 7.20.2 - '@babel/helpers': 7.20.1 - '@babel/parser': 7.20.3 + '@babel/helpers': 7.20.6 + '@babel/parser': 7.20.5 '@babel/template': 7.18.10 - '@babel/traverse': 7.20.1 - '@babel/types': 7.20.2 + '@babel/traverse': 7.20.5 + '@babel/types': 7.20.5 convert-source-map: 1.9.0 debug: 4.3.4 gensync: 1.0.0-beta.2 - json5: 2.2.1 + json5: 2.2.2 semver: 6.3.0 transitivePeerDependencies: - supports-color dev: true - /@babel/generator/7.20.4: - resolution: {integrity: sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA==} + /@babel/generator/7.20.5: + resolution: {integrity: sha512-jl7JY2Ykn9S0yj4DQP82sYvPU+T3g0HFcWTqDLqiuA9tGRNIj9VfbtXGAYTTkyNEnQk1jkMGOdYka8aG/lulCA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.20.2 + '@babel/types': 7.20.5 '@jridgewell/gen-mapping': 0.3.2 jsesc: 2.5.2 dev: true @@ -104,17 +106,17 @@ packages: resolution: {integrity: sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.20.2 + '@babel/types': 7.20.5 dev: true - /@babel/helper-compilation-targets/7.20.0_@babel+core@7.20.2: + /@babel/helper-compilation-targets/7.20.0_@babel+core@7.20.5: resolution: {integrity: sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/compat-data': 7.20.1 - '@babel/core': 7.20.2 + '@babel/compat-data': 7.20.5 + '@babel/core': 7.20.5 '@babel/helper-validator-option': 7.18.6 browserslist: 4.21.4 semver: 6.3.0 @@ -130,21 +132,21 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.18.10 - '@babel/types': 7.20.2 + '@babel/types': 7.20.5 dev: true /@babel/helper-hoist-variables/7.18.6: resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.20.2 + '@babel/types': 7.20.5 dev: true /@babel/helper-module-imports/7.18.6: resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.20.2 + '@babel/types': 7.20.5 dev: true /@babel/helper-module-transforms/7.20.2: @@ -157,8 +159,8 @@ packages: '@babel/helper-split-export-declaration': 7.18.6 '@babel/helper-validator-identifier': 7.19.1 '@babel/template': 7.18.10 - '@babel/traverse': 7.20.1 - '@babel/types': 7.20.2 + '@babel/traverse': 7.20.5 + '@babel/types': 7.20.5 transitivePeerDependencies: - supports-color dev: true @@ -172,14 +174,14 @@ packages: resolution: {integrity: sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.20.2 + '@babel/types': 7.20.5 dev: true /@babel/helper-split-export-declaration/7.18.6: resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.20.2 + '@babel/types': 7.20.5 dev: true /@babel/helper-string-parser/7.19.4: @@ -197,13 +199,13 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helpers/7.20.1: - resolution: {integrity: sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg==} + /@babel/helpers/7.20.6: + resolution: {integrity: sha512-Pf/OjgfgFRW5bApskEz5pvidpim7tEDPlFtKcNRXWmfHGn9IEI2W2flqRQXTFb7gIPTyK++N6rVHuwKut4XK6w==} engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.18.10 - '@babel/traverse': 7.20.1 - '@babel/types': 7.20.2 + '@babel/traverse': 7.20.5 + '@babel/types': 7.20.5 transitivePeerDependencies: - supports-color dev: true @@ -217,78 +219,78 @@ packages: js-tokens: 4.0.0 dev: true - /@babel/parser/7.20.3: - resolution: {integrity: sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg==} + /@babel/parser/7.20.5: + resolution: {integrity: sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.20.2 + '@babel/types': 7.20.5 dev: true - /@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.20.2: + /@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.20.5: resolution: {integrity: sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.20.2 + '@babel/core': 7.20.5 '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-transform-react-jsx-development/7.18.6_@babel+core@7.20.2: + /@babel/plugin-transform-react-jsx-development/7.18.6_@babel+core@7.20.5: resolution: {integrity: sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.20.2 - '@babel/plugin-transform-react-jsx': 7.19.0_@babel+core@7.20.2 + '@babel/core': 7.20.5 + '@babel/plugin-transform-react-jsx': 7.19.0_@babel+core@7.20.5 dev: true - /@babel/plugin-transform-react-jsx-self/7.18.6_@babel+core@7.20.2: + /@babel/plugin-transform-react-jsx-self/7.18.6_@babel+core@7.20.5: resolution: {integrity: sha512-A0LQGx4+4Jv7u/tWzoJF7alZwnBDQd6cGLh9P+Ttk4dpiL+J5p7NSNv/9tlEFFJDq3kjxOavWmbm6t0Gk+A3Ig==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.20.2 + '@babel/core': 7.20.5 '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-transform-react-jsx-source/7.19.6_@babel+core@7.20.2: + /@babel/plugin-transform-react-jsx-source/7.19.6_@babel+core@7.20.5: resolution: {integrity: sha512-RpAi004QyMNisst/pvSanoRdJ4q+jMCWyk9zdw/CyLB9j8RXEahodR6l2GyttDRyEVWZtbN+TpLiHJ3t34LbsQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.20.2 + '@babel/core': 7.20.5 '@babel/helper-plugin-utils': 7.20.2 dev: true - /@babel/plugin-transform-react-jsx/7.19.0_@babel+core@7.20.2: + /@babel/plugin-transform-react-jsx/7.19.0_@babel+core@7.20.5: resolution: {integrity: sha512-UVEvX3tXie3Szm3emi1+G63jyw1w5IcMY0FSKM+CRnKRI5Mr1YbCNgsSTwoTwKphQEG9P+QqmuRFneJPZuHNhg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.20.2 + '@babel/core': 7.20.5 '@babel/helper-annotate-as-pure': 7.18.6 '@babel/helper-module-imports': 7.18.6 '@babel/helper-plugin-utils': 7.20.2 - '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.20.2 - '@babel/types': 7.20.2 + '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.20.5 + '@babel/types': 7.20.5 dev: true - /@babel/runtime-corejs3/7.20.1: - resolution: {integrity: sha512-CGulbEDcg/ND1Im7fUNRZdGXmX2MTWVVZacQi/6DiKE5HNwZ3aVTm5PV4lO8HHz0B2h8WQyvKKjbX5XgTtydsg==} + /@babel/runtime-corejs3/7.20.6: + resolution: {integrity: sha512-tqeujPiuEfcH067mx+7otTQWROVMKHXEaOQcAeNV5dDdbPWvPcFA8/W9LXw2NfjNmOetqLl03dfnG2WALPlsRQ==} engines: {node: '>=6.9.0'} dependencies: core-js-pure: 3.26.1 regenerator-runtime: 0.13.11 dev: true - /@babel/runtime/7.20.1: - resolution: {integrity: sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg==} + /@babel/runtime/7.20.6: + resolution: {integrity: sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.13.11 @@ -299,30 +301,30 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.18.6 - '@babel/parser': 7.20.3 - '@babel/types': 7.20.2 + '@babel/parser': 7.20.5 + '@babel/types': 7.20.5 dev: true - /@babel/traverse/7.20.1: - resolution: {integrity: sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA==} + /@babel/traverse/7.20.5: + resolution: {integrity: sha512-WM5ZNN3JITQIq9tFZaw1ojLU3WgWdtkxnhM1AegMS+PvHjkM5IXjmYEGY7yukz5XS4sJyEf2VzWjI8uAavhxBQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.18.6 - '@babel/generator': 7.20.4 + '@babel/generator': 7.20.5 '@babel/helper-environment-visitor': 7.18.9 '@babel/helper-function-name': 7.19.0 '@babel/helper-hoist-variables': 7.18.6 '@babel/helper-split-export-declaration': 7.18.6 - '@babel/parser': 7.20.3 - '@babel/types': 7.20.2 + '@babel/parser': 7.20.5 + '@babel/types': 7.20.5 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color dev: true - /@babel/types/7.20.2: - resolution: {integrity: sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog==} + /@babel/types/7.20.5: + resolution: {integrity: sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.19.4 @@ -330,8 +332,8 @@ packages: to-fast-properties: 2.0.0 dev: true - /@esbuild/android-arm/0.15.15: - resolution: {integrity: sha512-JJjZjJi2eBL01QJuWjfCdZxcIgot+VoK6Fq7eKF9w4YHm9hwl7nhBR1o2Wnt/WcANk5l9SkpvrldW1PLuXxcbw==} + /@esbuild/android-arm/0.15.18: + resolution: {integrity: sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -339,8 +341,8 @@ packages: dev: true optional: true - /@esbuild/linux-loong64/0.15.15: - resolution: {integrity: sha512-lhz6UNPMDXUhtXSulw8XlFAtSYO26WmHQnCi2Lg2p+/TMiJKNLtZCYUxV4wG6rZMzXmr8InGpNwk+DLT2Hm0PA==} + /@esbuild/linux-loong64/0.15.18: + resolution: {integrity: sha512-L4jVKS82XVhw2nvzLg/19ClLWg0y27ulRwuP7lcyL6AbUWB5aPglXY3M21mauDQMDfRLs8cQmeT03r/+X3cZYQ==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -404,7 +406,7 @@ packages: engines: {node: '>= 8'} dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.13.0 + fastq: 1.14.0 dev: true /@tauri-apps/api/1.2.0: @@ -412,8 +414,8 @@ packages: engines: {node: '>= 14.6.0', npm: '>= 6.6.0', yarn: '>= 1.19.1'} dev: false - /@tauri-apps/cli-darwin-arm64/1.2.1: - resolution: {integrity: sha512-WiAxSON52owFI65Whd3NjcKjXdO1zJfafBVZ3v+Y3F2zlXhRPiirXbtefAc3mvN56zDz/pfi018Qb4XesuVzHA==} + /@tauri-apps/cli-darwin-arm64/1.2.2: + resolution: {integrity: sha512-W+Cp2weUMlvmGkRJeUjypbz9Lpl6o98xkgKAtobZSum5SNwpsBQfawJTESakNoD+FXyVg/snIk5sRdHge+tAaA==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -421,8 +423,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-darwin-x64/1.2.1: - resolution: {integrity: sha512-jfumnrn7RYKVtDmHgrQhImoxpqT51bDrO4KxgpIXaYSaf6MdG2JT72dwUovPrURw0JX2Z/Elihq+dYbrsKoV/w==} + /@tauri-apps/cli-darwin-x64/1.2.2: + resolution: {integrity: sha512-vmVAqt+ECH2d6cbcGJ7ddcCAZgmKe5xmxlL5r4xoaphu7OqU4gnv4VFURYkVltOfwzIFQVOPVSqwYyIDToCYNQ==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -430,8 +432,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm-gnueabihf/1.2.1: - resolution: {integrity: sha512-n4p6Ekn6Wa9X/klUGevEGgoWAGApGGsLrJYE4c8bKTbAUfQ9Nyzjh8gK/GDii1dg9oRW0FdXDa6BJa7aEEj9sA==} + /@tauri-apps/cli-linux-arm-gnueabihf/1.2.2: + resolution: {integrity: sha512-yYTdQurgi4QZR8z+fANjl522jdQz/VtesFpw+C/A0+zXg7tiRjicsywBDdPsvNzCqFeGKKkmTR+Lny5qxhGaeQ==} engines: {node: '>= 10'} cpu: [arm] os: [linux] @@ -439,8 +441,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm64-gnu/1.2.1: - resolution: {integrity: sha512-oAHkQQGfNCh8pQQHuDzzqt+S5sOj3tiUkySaquR2z/AQEHeDGAMrRGLZwOiDw9Xvu7qxFiF9H0e5OMK7BkncDw==} + /@tauri-apps/cli-linux-arm64-gnu/1.2.2: + resolution: {integrity: sha512-ZSOVT6Eq1ay2+27B8KfA0MnpO7KYzONU6TjenH7DNcQki6eWGG5JoNu8QQ9Mdn3dAzY0XBP9i1ZHQOFu4iPtEg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -448,8 +450,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm64-musl/1.2.1: - resolution: {integrity: sha512-1dEZ5fdFYkMyB1U7ZkDJUlwYwCeqy9Y3vXmtZ6pCxrvgs844s8+RIFDuMU42pTN+lUxfFeQARmv0LpS4eF/QWQ==} + /@tauri-apps/cli-linux-arm64-musl/1.2.2: + resolution: {integrity: sha512-/NHSkqNQ+Pr4PshvyD1CeNFaPCaCpe1OeuAQgVi0rboSecC9fXN96G5dQbSBoxOUcCo6f8aTVE7zkZ4WchFVog==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -457,8 +459,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-x64-gnu/1.2.1: - resolution: {integrity: sha512-wkgCD3s5P6tgBPnn0/gDx7MXMx2Hx+jdA+JP8zdCq4cIeYXlxdZG/zXbHb5ldPadNh582lzHiGg+Pmc+wDg2fA==} + /@tauri-apps/cli-linux-x64-gnu/1.2.2: + resolution: {integrity: sha512-4YTmfPuyvlHsvCkATDMwhklfuQm3HKxYXv/IOW9H0ra6pS9efVhrFYIC9Vfv6XaKN85Vnn/FYTEGMJLwCxZw2Q==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -466,8 +468,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-x64-musl/1.2.1: - resolution: {integrity: sha512-zD+a+5cSlYVU0ECOojWp71ok/9jE0DJufzb9oky17XIKV/oiOAG60z4OYRe+oqxYS1TcBt+pUa1/2zlu/6SRdA==} + /@tauri-apps/cli-linux-x64-musl/1.2.2: + resolution: {integrity: sha512-wr46tbscwFuCcA931R+ItOiUTT0djMmgKLd1HFCmFF82V9BKE2reIjr6O9l0NCXCo2WeD4pe3jA/Pt1dxDu+JA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -475,8 +477,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-win32-ia32-msvc/1.2.1: - resolution: {integrity: sha512-nEgdRd8czaKL1RQfj946dsfzlk6atmD95Fm7NVTVOe77PFHTS3ztHeWK7X6jirCaOF3h/F7qpJVCU6JMnq2tfA==} + /@tauri-apps/cli-win32-ia32-msvc/1.2.2: + resolution: {integrity: sha512-6VmbVJOWUZJK5/JKhb3mNFKrKGfq0KV7lJGumfN95WJgkHeyL61p8bZit+o6ZgUGUhrOabkAawhDkrRY+ZQhIw==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -484,8 +486,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-win32-x64-msvc/1.2.1: - resolution: {integrity: sha512-ceWiQkmNNRrnfgbLMnndT4QF1IyLK7aOJsMqS/HueshAwmVQWnC1DUE0C58Taetgq38Cavc4gGnZOCHuH6ZuTw==} + /@tauri-apps/cli-win32-x64-msvc/1.2.2: + resolution: {integrity: sha512-YRPJguJma+zSuRZpFoSZqls6+laggG1vqG0FPQWQTi+ywATgMpai2b2RZnffDlpHKp9mt4V/s2dtqOy6bpGZHg==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -493,28 +495,28 @@ packages: dev: true optional: true - /@tauri-apps/cli/1.2.1: - resolution: {integrity: sha512-JrFFT1/4V+AGSRjKdgszZwOr+/a1519LDhNxBkbsIg6D/kFK+3kk1qImaQBY9DvvIWK6IV4whc8OAkgxm+Sl3w==} + /@tauri-apps/cli/1.2.2: + resolution: {integrity: sha512-D8zib3A0vWCvPPSyYLxww/OdDlVcY7fpcDVBH6qUvheOjj2aCyU7H9AYMRBwpgCfz8zY5+vomee+laLeB0H13w==} engines: {node: '>= 10'} hasBin: true optionalDependencies: - '@tauri-apps/cli-darwin-arm64': 1.2.1 - '@tauri-apps/cli-darwin-x64': 1.2.1 - '@tauri-apps/cli-linux-arm-gnueabihf': 1.2.1 - '@tauri-apps/cli-linux-arm64-gnu': 1.2.1 - '@tauri-apps/cli-linux-arm64-musl': 1.2.1 - '@tauri-apps/cli-linux-x64-gnu': 1.2.1 - '@tauri-apps/cli-linux-x64-musl': 1.2.1 - '@tauri-apps/cli-win32-ia32-msvc': 1.2.1 - '@tauri-apps/cli-win32-x64-msvc': 1.2.1 + '@tauri-apps/cli-darwin-arm64': 1.2.2 + '@tauri-apps/cli-darwin-x64': 1.2.2 + '@tauri-apps/cli-linux-arm-gnueabihf': 1.2.2 + '@tauri-apps/cli-linux-arm64-gnu': 1.2.2 + '@tauri-apps/cli-linux-arm64-musl': 1.2.2 + '@tauri-apps/cli-linux-x64-gnu': 1.2.2 + '@tauri-apps/cli-linux-x64-musl': 1.2.2 + '@tauri-apps/cli-win32-ia32-msvc': 1.2.2 + '@tauri-apps/cli-win32-x64-msvc': 1.2.2 dev: true /@types/json5/0.0.29: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true - /@types/node/18.11.9: - resolution: {integrity: sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==} + /@types/node/18.11.16: + resolution: {integrity: sha512-6T7P5bDkRhqRxrQtwj7vru+bWTpelgtcETAZEUSdq0YISKz8WKdoBukQLYQQ6DFHvU9JRsbFq0JH5C51X2ZdnA==} dev: true /@types/prop-types/15.7.5: @@ -524,11 +526,11 @@ packages: /@types/react-dom/18.0.9: resolution: {integrity: sha512-qnVvHxASt/H7i+XG1U1xMiY5t+IHcPGUK7TDMDzom08xa7e86eCeKOiLZezwCKVxJn6NEiiy2ekgX8aQssjIKg==} dependencies: - '@types/react': 18.0.25 + '@types/react': 18.0.26 dev: true - /@types/react/18.0.25: - resolution: {integrity: sha512-xD6c0KDT4m7n9uD4ZHi02lzskaiqcBxf4zi+tXZY98a04wvc0hi/TcCPC2FOESZi51Nd7tlUeOJY8RofL799/g==} + /@types/react/18.0.26: + resolution: {integrity: sha512-hCR3PJQsAIXyxhTNSiDFY//LhnMZWpNNr5etoCqx/iUfGc5gXWtQR2Phl908jVR6uPXacojQWTg4qRpkxTuGug==} dependencies: '@types/prop-types': 15.7.5 '@types/scheduler': 0.16.2 @@ -539,20 +541,20 @@ packages: resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==} dev: true - /@vitejs/plugin-react/2.2.0_vite@3.2.4: + /@vitejs/plugin-react/2.2.0_vite@3.2.5: resolution: {integrity: sha512-FFpefhvExd1toVRlokZgxgy2JtnBOdp4ZDsq7ldCWaqGSGn9UhWMAVm/1lxPL14JfNS5yGz+s9yFrQY6shoStA==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^3.0.0 dependencies: - '@babel/core': 7.20.2 - '@babel/plugin-transform-react-jsx': 7.19.0_@babel+core@7.20.2 - '@babel/plugin-transform-react-jsx-development': 7.18.6_@babel+core@7.20.2 - '@babel/plugin-transform-react-jsx-self': 7.18.6_@babel+core@7.20.2 - '@babel/plugin-transform-react-jsx-source': 7.19.6_@babel+core@7.20.2 + '@babel/core': 7.20.5 + '@babel/plugin-transform-react-jsx': 7.19.0_@babel+core@7.20.5 + '@babel/plugin-transform-react-jsx-development': 7.18.6_@babel+core@7.20.5 + '@babel/plugin-transform-react-jsx-self': 7.18.6_@babel+core@7.20.5 + '@babel/plugin-transform-react-jsx-source': 7.19.6_@babel+core@7.20.5 magic-string: 0.26.7 react-refresh: 0.14.0 - vite: 3.2.4_@types+node@18.11.9 + vite: 3.2.5_@types+node@18.11.16 transitivePeerDependencies: - supports-color dev: true @@ -599,8 +601,8 @@ packages: resolution: {integrity: sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==} engines: {node: '>=6.0'} dependencies: - '@babel/runtime': 7.20.1 - '@babel/runtime-corejs3': 7.20.1 + '@babel/runtime': 7.20.6 + '@babel/runtime-corejs3': 7.20.6 dev: true /array-includes/3.1.6: @@ -609,7 +611,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.4 + es-abstract: 1.20.5 get-intrinsic: 1.1.3 is-string: 1.0.7 dev: true @@ -620,7 +622,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.4 + es-abstract: 1.20.5 es-shim-unscopables: 1.0.0 dev: true @@ -628,7 +630,7 @@ packages: resolution: {integrity: sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==} dev: true - /autoprefixer/10.4.13_postcss@8.4.19: + /autoprefixer/10.4.13_postcss@8.4.20: resolution: {integrity: sha512-49vKpMqcZYsJjwotvt4+h/BCjJVnhGwcLpDt5xkcaOG3eLrG/HUYLagrihYsQ+qrIBgIzX1Rw7a6L8I/ZA1Atg==} engines: {node: ^10 || ^12 || >=14} hasBin: true @@ -636,16 +638,16 @@ packages: postcss: ^8.1.0 dependencies: browserslist: 4.21.4 - caniuse-lite: 1.0.30001434 + caniuse-lite: 1.0.30001439 fraction.js: 4.2.0 normalize-range: 0.1.2 picocolors: 1.0.0 - postcss: 8.4.19 + postcss: 8.4.20 postcss-value-parser: 4.2.0 dev: true - /axe-core/4.5.2: - resolution: {integrity: sha512-u2MVsXfew5HBvjsczCv+xlwdNnB1oQR9HlAcsejZttNjKKSkeDNVwB1vMThIUIFI9GoT57Vtk8iQLwqOfAkboA==} + /axe-core/4.6.1: + resolution: {integrity: sha512-lCZN5XRuOnpG4bpMq8v0khrWtUOn+i8lZSb6wHZH56ZfbIEv6XwJV84AAueh9/zi7qPVJ/E4yz6fmsiyOmXR4w==} engines: {node: '>=4'} dev: true @@ -681,9 +683,9 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001434 + caniuse-lite: 1.0.30001439 electron-to-chromium: 1.4.284 - node-releases: 2.0.6 + node-releases: 2.0.8 update-browserslist-db: 1.0.10_browserslist@4.21.4 dev: true @@ -699,8 +701,8 @@ packages: engines: {node: '>= 6'} dev: true - /caniuse-lite/1.0.30001434: - resolution: {integrity: sha512-aOBHrLmTQw//WFa2rcF1If9fa3ypkC1wzqqiKHgfdrXTWcU8C4gKVZT77eQAPWN1APys3+uQ0Df07rKauXGEYA==} + /caniuse-lite/1.0.30001439: + resolution: {integrity: sha512-1MgUzEkoMO6gKfXflStpYgZDlFM7M/ck/bgfVCACO5vnAf0fXoNVHdWtqGU+MYca+4bL9Z5bpOVmR33cWW9G2A==} dev: true /chalk/2.4.2: @@ -852,8 +854,8 @@ packages: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} dev: true - /es-abstract/1.20.4: - resolution: {integrity: sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==} + /es-abstract/1.20.5: + resolution: {integrity: sha512-7h8MM2EQhsCA7pU/Nv78qOXFpD8Rhqd12gYiSJVkrH9+e8VuA8JlPJK/hQjjlLv6pJvx/z1iRFKzYb0XT/RuAQ==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 @@ -862,10 +864,11 @@ packages: function.prototype.name: 1.1.5 get-intrinsic: 1.1.3 get-symbol-description: 1.0.0 + gopd: 1.0.1 has: 1.0.3 has-property-descriptors: 1.0.0 has-symbols: 1.0.3 - internal-slot: 1.0.3 + internal-slot: 1.0.4 is-callable: 1.2.7 is-negative-zero: 2.0.2 is-regex: 1.1.4 @@ -897,8 +900,8 @@ packages: is-symbol: 1.0.4 dev: true - /esbuild-android-64/0.15.15: - resolution: {integrity: sha512-F+WjjQxO+JQOva3tJWNdVjouFMLK6R6i5gjDvgUthLYJnIZJsp1HlF523k73hELY20WPyEO8xcz7aaYBVkeg5Q==} + /esbuild-android-64/0.15.18: + resolution: {integrity: sha512-wnpt3OXRhcjfIDSZu9bnzT4/TNTDsOUvip0foZOUBG7QbSt//w3QV4FInVJxNhKc/ErhUxc5z4QjHtMi7/TbgA==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -906,8 +909,8 @@ packages: dev: true optional: true - /esbuild-android-arm64/0.15.15: - resolution: {integrity: sha512-attlyhD6Y22jNyQ0fIIQ7mnPvDWKw7k6FKnsXlBvQE6s3z6s6cuEHcSgoirquQc7TmZgVCK5fD/2uxmRN+ZpcQ==} + /esbuild-android-arm64/0.15.18: + resolution: {integrity: sha512-G4xu89B8FCzav9XU8EjsXacCKSG2FT7wW9J6hOc18soEHJdtWu03L3TQDGf0geNxfLTtxENKBzMSq9LlbjS8OQ==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -915,8 +918,8 @@ packages: dev: true optional: true - /esbuild-darwin-64/0.15.15: - resolution: {integrity: sha512-ohZtF8W1SHJ4JWldsPVdk8st0r9ExbAOSrBOh5L+Mq47i696GVwv1ab/KlmbUoikSTNoXEhDzVpxUR/WIO19FQ==} + /esbuild-darwin-64/0.15.18: + resolution: {integrity: sha512-2WAvs95uPnVJPuYKP0Eqx+Dl/jaYseZEUUT1sjg97TJa4oBtbAKnPnl3b5M9l51/nbx7+QAEtuummJZW0sBEmg==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -924,8 +927,8 @@ packages: dev: true optional: true - /esbuild-darwin-arm64/0.15.15: - resolution: {integrity: sha512-P8jOZ5zshCNIuGn+9KehKs/cq5uIniC+BeCykvdVhx/rBXSxmtj3CUIKZz4sDCuESMbitK54drf/2QX9QHG5Ag==} + /esbuild-darwin-arm64/0.15.18: + resolution: {integrity: sha512-tKPSxcTJ5OmNb1btVikATJ8NftlyNlc8BVNtyT/UAr62JFOhwHlnoPrhYWz09akBLHI9nElFVfWSTSRsrZiDUA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -933,8 +936,8 @@ packages: dev: true optional: true - /esbuild-freebsd-64/0.15.15: - resolution: {integrity: sha512-KkTg+AmDXz1IvA9S1gt8dE24C8Thx0X5oM0KGF322DuP+P3evwTL9YyusHAWNsh4qLsR80nvBr/EIYs29VSwuA==} + /esbuild-freebsd-64/0.15.18: + resolution: {integrity: sha512-TT3uBUxkteAjR1QbsmvSsjpKjOX6UkCstr8nMr+q7zi3NuZ1oIpa8U41Y8I8dJH2fJgdC3Dj3CXO5biLQpfdZA==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -942,8 +945,8 @@ packages: dev: true optional: true - /esbuild-freebsd-arm64/0.15.15: - resolution: {integrity: sha512-FUcML0DRsuyqCMfAC+HoeAqvWxMeq0qXvclZZ/lt2kLU6XBnDA5uKTLUd379WYEyVD4KKFctqWd9tTuk8C/96g==} + /esbuild-freebsd-arm64/0.15.18: + resolution: {integrity: sha512-R/oVr+X3Tkh+S0+tL41wRMbdWtpWB8hEAMsOXDumSSa6qJR89U0S/PpLXrGF7Wk/JykfpWNokERUpCeHDl47wA==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -951,8 +954,8 @@ packages: dev: true optional: true - /esbuild-linux-32/0.15.15: - resolution: {integrity: sha512-q28Qn5pZgHNqug02aTkzw5sW9OklSo96b5nm17Mq0pDXrdTBcQ+M6Q9A1B+dalFeynunwh/pvfrNucjzwDXj+Q==} + /esbuild-linux-32/0.15.18: + resolution: {integrity: sha512-lphF3HiCSYtaa9p1DtXndiQEeQDKPl9eN/XNoBf2amEghugNuqXNZA/ZovthNE2aa4EN43WroO0B85xVSjYkbg==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -960,8 +963,8 @@ packages: dev: true optional: true - /esbuild-linux-64/0.15.15: - resolution: {integrity: sha512-217KPmWMirkf8liO+fj2qrPwbIbhNTGNVtvqI1TnOWJgcMjUWvd677Gq3fTzXEjilkx2yWypVnTswM2KbXgoAg==} + /esbuild-linux-64/0.15.18: + resolution: {integrity: sha512-hNSeP97IviD7oxLKFuii5sDPJ+QHeiFTFLoLm7NZQligur8poNOWGIgpQ7Qf8Balb69hptMZzyOBIPtY09GZYw==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -969,8 +972,8 @@ packages: dev: true optional: true - /esbuild-linux-arm/0.15.15: - resolution: {integrity: sha512-RYVW9o2yN8yM7SB1yaWr378CwrjvGCyGybX3SdzPHpikUHkME2AP55Ma20uNwkNyY2eSYFX9D55kDrfQmQBR4w==} + /esbuild-linux-arm/0.15.18: + resolution: {integrity: sha512-UH779gstRblS4aoS2qpMl3wjg7U0j+ygu3GjIeTonCcN79ZvpPee12Qun3vcdxX+37O5LFxz39XeW2I9bybMVA==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -978,8 +981,8 @@ packages: dev: true optional: true - /esbuild-linux-arm64/0.15.15: - resolution: {integrity: sha512-/ltmNFs0FivZkYsTzAsXIfLQX38lFnwJTWCJts0IbCqWZQe+jjj0vYBNbI0kmXLb3y5NljiM5USVAO1NVkdh2g==} + /esbuild-linux-arm64/0.15.18: + resolution: {integrity: sha512-54qr8kg/6ilcxd+0V3h9rjT4qmjc0CccMVWrjOEM/pEcUzt8X62HfBSeZfT2ECpM7104mk4yfQXkosY8Quptug==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -987,8 +990,8 @@ packages: dev: true optional: true - /esbuild-linux-mips64le/0.15.15: - resolution: {integrity: sha512-PksEPb321/28GFFxtvL33yVPfnMZihxkEv5zME2zapXGp7fA1X2jYeiTUK+9tJ/EGgcNWuwvtawPxJG7Mmn86A==} + /esbuild-linux-mips64le/0.15.18: + resolution: {integrity: sha512-Mk6Ppwzzz3YbMl/ZZL2P0q1tnYqh/trYZ1VfNP47C31yT0K8t9s7Z077QrDA/guU60tGNp2GOwCQnp+DYv7bxQ==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -996,8 +999,8 @@ packages: dev: true optional: true - /esbuild-linux-ppc64le/0.15.15: - resolution: {integrity: sha512-ek8gJBEIhcpGI327eAZigBOHl58QqrJrYYIZBWQCnH3UnXoeWMrMZLeeZL8BI2XMBhP+sQ6ERctD5X+ajL/AIA==} + /esbuild-linux-ppc64le/0.15.18: + resolution: {integrity: sha512-b0XkN4pL9WUulPTa/VKHx2wLCgvIAbgwABGnKMY19WhKZPT+8BxhZdqz6EgkqCLld7X5qiCY2F/bfpUUlnFZ9w==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -1005,8 +1008,8 @@ packages: dev: true optional: true - /esbuild-linux-riscv64/0.15.15: - resolution: {integrity: sha512-H5ilTZb33/GnUBrZMNJtBk7/OXzDHDXjIzoLXHSutwwsLxSNaLxzAaMoDGDd/keZoS+GDBqNVxdCkpuiRW4OSw==} + /esbuild-linux-riscv64/0.15.18: + resolution: {integrity: sha512-ba2COaoF5wL6VLZWn04k+ACZjZ6NYniMSQStodFKH/Pu6RxzQqzsmjR1t9QC89VYJxBeyVPTaHuBMCejl3O/xg==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -1014,8 +1017,8 @@ packages: dev: true optional: true - /esbuild-linux-s390x/0.15.15: - resolution: {integrity: sha512-jKaLUg78mua3rrtrkpv4Or2dNTJU7bgHN4bEjT4OX4GR7nLBSA9dfJezQouTxMmIW7opwEC5/iR9mpC18utnxQ==} + /esbuild-linux-s390x/0.15.18: + resolution: {integrity: sha512-VbpGuXEl5FCs1wDVp93O8UIzl3ZrglgnSQ+Hu79g7hZu6te6/YHgVJxCM2SqfIila0J3k0csfnf8VD2W7u2kzQ==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -1023,8 +1026,8 @@ packages: dev: true optional: true - /esbuild-netbsd-64/0.15.15: - resolution: {integrity: sha512-aOvmF/UkjFuW6F36HbIlImJTTx45KUCHJndtKo+KdP8Dhq3mgLRKW9+6Ircpm8bX/RcS3zZMMmaBLkvGY06Gvw==} + /esbuild-netbsd-64/0.15.18: + resolution: {integrity: sha512-98ukeCdvdX7wr1vUYQzKo4kQ0N2p27H7I11maINv73fVEXt2kyh4K4m9f35U1K43Xc2QGXlzAw0K9yoU7JUjOg==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -1032,8 +1035,8 @@ packages: dev: true optional: true - /esbuild-openbsd-64/0.15.15: - resolution: {integrity: sha512-HFFX+WYedx1w2yJ1VyR1Dfo8zyYGQZf1cA69bLdrHzu9svj6KH6ZLK0k3A1/LFPhcEY9idSOhsB2UyU0tHPxgQ==} + /esbuild-openbsd-64/0.15.18: + resolution: {integrity: sha512-yK5NCcH31Uae076AyQAXeJzt/vxIo9+omZRKj1pauhk3ITuADzuOx5N2fdHrAKPxN+zH3w96uFKlY7yIn490xQ==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -1041,8 +1044,8 @@ packages: dev: true optional: true - /esbuild-sunos-64/0.15.15: - resolution: {integrity: sha512-jOPBudffG4HN8yJXcK9rib/ZTFoTA5pvIKbRrt3IKAGMq1EpBi4xoVoSRrq/0d4OgZLaQbmkHp8RO9eZIn5atA==} + /esbuild-sunos-64/0.15.18: + resolution: {integrity: sha512-On22LLFlBeLNj/YF3FT+cXcyKPEI263nflYlAhz5crxtp3yRG1Ugfr7ITyxmCmjm4vbN/dGrb/B7w7U8yJR9yw==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -1050,8 +1053,8 @@ packages: dev: true optional: true - /esbuild-windows-32/0.15.15: - resolution: {integrity: sha512-MDkJ3QkjnCetKF0fKxCyYNBnOq6dmidcwstBVeMtXSgGYTy8XSwBeIE4+HuKiSsG6I/mXEb++px3IGSmTN0XiA==} + /esbuild-windows-32/0.15.18: + resolution: {integrity: sha512-o+eyLu2MjVny/nt+E0uPnBxYuJHBvho8vWsC2lV61A7wwTWC3jkN2w36jtA+yv1UgYkHRihPuQsL23hsCYGcOQ==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -1059,8 +1062,8 @@ packages: dev: true optional: true - /esbuild-windows-64/0.15.15: - resolution: {integrity: sha512-xaAUIB2qllE888SsMU3j9nrqyLbkqqkpQyWVkfwSil6BBPgcPk3zOFitTTncEKCLTQy3XV9RuH7PDj3aJDljWA==} + /esbuild-windows-64/0.15.18: + resolution: {integrity: sha512-qinug1iTTaIIrCorAUjR0fcBk24fjzEedFYhhispP8Oc7SFvs+XeW3YpAKiKp8dRpizl4YYAhxMjlftAMJiaUw==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -1068,8 +1071,8 @@ packages: dev: true optional: true - /esbuild-windows-arm64/0.15.15: - resolution: {integrity: sha512-ttuoCYCIJAFx4UUKKWYnFdrVpoXa3+3WWkXVI6s09U+YjhnyM5h96ewTq/WgQj9LFSIlABQvadHSOQyAVjW5xQ==} + /esbuild-windows-arm64/0.15.18: + resolution: {integrity: sha512-q9bsYzegpZcLziq0zgUi5KqGVtfhjxGbnksaBFYmWLxeV/S1fK4OLdq2DFYnXcLMjlZw2L0jLsk1eGoB522WXQ==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -1077,34 +1080,34 @@ packages: dev: true optional: true - /esbuild/0.15.15: - resolution: {integrity: sha512-TEw/lwK4Zzld9x3FedV6jy8onOUHqcEX3ADFk4k+gzPUwrxn8nWV62tH0udo8jOtjFodlEfc4ypsqX3e+WWO6w==} + /esbuild/0.15.18: + resolution: {integrity: sha512-x/R72SmW3sSFRm5zrrIjAhCeQSAWoni3CmHEqfQrZIQTM3lVCdehdwuIqaOtfC2slvpdlLa62GYoN8SxT23m6Q==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.15.15 - '@esbuild/linux-loong64': 0.15.15 - esbuild-android-64: 0.15.15 - esbuild-android-arm64: 0.15.15 - esbuild-darwin-64: 0.15.15 - esbuild-darwin-arm64: 0.15.15 - esbuild-freebsd-64: 0.15.15 - esbuild-freebsd-arm64: 0.15.15 - esbuild-linux-32: 0.15.15 - esbuild-linux-64: 0.15.15 - esbuild-linux-arm: 0.15.15 - esbuild-linux-arm64: 0.15.15 - esbuild-linux-mips64le: 0.15.15 - esbuild-linux-ppc64le: 0.15.15 - esbuild-linux-riscv64: 0.15.15 - esbuild-linux-s390x: 0.15.15 - esbuild-netbsd-64: 0.15.15 - esbuild-openbsd-64: 0.15.15 - esbuild-sunos-64: 0.15.15 - esbuild-windows-32: 0.15.15 - esbuild-windows-64: 0.15.15 - esbuild-windows-arm64: 0.15.15 + '@esbuild/android-arm': 0.15.18 + '@esbuild/linux-loong64': 0.15.18 + esbuild-android-64: 0.15.18 + esbuild-android-arm64: 0.15.18 + esbuild-darwin-64: 0.15.18 + esbuild-darwin-arm64: 0.15.18 + esbuild-freebsd-64: 0.15.18 + esbuild-freebsd-arm64: 0.15.18 + esbuild-linux-32: 0.15.18 + esbuild-linux-64: 0.15.18 + esbuild-linux-arm: 0.15.18 + esbuild-linux-arm64: 0.15.18 + esbuild-linux-mips64le: 0.15.18 + esbuild-linux-ppc64le: 0.15.18 + esbuild-linux-riscv64: 0.15.18 + esbuild-linux-s390x: 0.15.18 + esbuild-netbsd-64: 0.15.18 + esbuild-openbsd-64: 0.15.18 + esbuild-sunos-64: 0.15.18 + esbuild-windows-32: 0.15.18 + esbuild-windows-64: 0.15.18 + esbuild-windows-arm64: 0.15.18 dev: true /escalade/3.1.1: @@ -1195,22 +1198,22 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: - '@babel/runtime': 7.20.1 + '@babel/runtime': 7.20.6 aria-query: 4.2.2 array-includes: 3.1.6 ast-types-flow: 0.0.7 - axe-core: 4.5.2 + axe-core: 4.6.1 axobject-query: 2.2.0 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 has: 1.0.3 jsx-ast-utils: 3.3.3 - language-tags: 1.0.5 + language-tags: 1.0.7 minimatch: 3.1.2 semver: 6.3.0 dev: true - /eslint-plugin-prettier/4.2.1_woggxqa3l645ufel4grhxgids4: + /eslint-plugin-prettier/4.2.1_oixrjny4ajrp742454blm2dh6q: resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -1222,7 +1225,7 @@ packages: optional: true dependencies: eslint-config-prettier: 8.5.0 - prettier: 2.8.0 + prettier: 2.8.1 prettier-linter-helpers: 1.0.0 dev: true @@ -1252,8 +1255,8 @@ packages: micromatch: 4.0.5 dev: true - /fastq/1.13.0: - resolution: {integrity: sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==} + /fastq/1.14.0: + resolution: {integrity: sha512-eR2D+V9/ExcbF9ls441yIuN6TI2ED1Y2ZcA5BmMtJsOkWOFRJQ0Jt0g1UwqXJJVAb+V+umH5Dfr8oh4EVP7VVg==} dependencies: reusify: 1.0.4 dev: true @@ -1287,7 +1290,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.4 + es-abstract: 1.20.5 functions-have-names: 1.2.3 dev: true @@ -1335,6 +1338,12 @@ packages: engines: {node: '>=4'} dev: true + /gopd/1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + dependencies: + get-intrinsic: 1.1.3 + dev: true + /has-bigints/1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} dev: true @@ -1369,8 +1378,8 @@ packages: function-bind: 1.1.1 dev: true - /internal-slot/1.0.3: - resolution: {integrity: sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==} + /internal-slot/1.0.4: + resolution: {integrity: sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ==} engines: {node: '>= 0.4'} dependencies: get-intrinsic: 1.1.3 @@ -1496,8 +1505,8 @@ packages: minimist: 1.2.7 dev: true - /json5/2.2.1: - resolution: {integrity: sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==} + /json5/2.2.2: + resolution: {integrity: sha512-46Tk9JiOL2z7ytNQWFLpj99RZkVgeHf87yGQKsIkaPz1qSH9UczKH1rO7K3wgRselo0tYMUNfecYpm/p1vC7tQ==} engines: {node: '>=6'} hasBin: true dev: true @@ -1514,8 +1523,8 @@ packages: resolution: {integrity: sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==} dev: true - /language-tags/1.0.5: - resolution: {integrity: sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ==} + /language-tags/1.0.7: + resolution: {integrity: sha512-bSytju1/657hFjgUzPAPqszxH62ouE8nQFoFaVlIQfne4wO/wXC9A4+m8jYve7YBBvi59eq0SUpcshvG8h5Usw==} dependencies: language-subtag-registry: 0.3.22 dev: true @@ -1580,8 +1589,8 @@ packages: hasBin: true dev: true - /node-releases/2.0.6: - resolution: {integrity: sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==} + /node-releases/2.0.8: + resolution: {integrity: sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A==} dev: true /normalize-path/3.0.0: @@ -1624,7 +1633,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.4 + es-abstract: 1.20.5 dev: true /path-parse/1.0.7: @@ -1645,29 +1654,29 @@ packages: engines: {node: '>=0.10.0'} dev: true - /postcss-import/14.1.0_postcss@8.4.19: + /postcss-import/14.1.0_postcss@8.4.20: resolution: {integrity: sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==} engines: {node: '>=10.0.0'} peerDependencies: postcss: ^8.0.0 dependencies: - postcss: 8.4.19 + postcss: 8.4.20 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.1 dev: true - /postcss-js/4.0.0_postcss@8.4.19: + /postcss-js/4.0.0_postcss@8.4.20: resolution: {integrity: sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==} engines: {node: ^12 || ^14 || >= 16} peerDependencies: postcss: ^8.3.3 dependencies: camelcase-css: 2.0.1 - postcss: 8.4.19 + postcss: 8.4.20 dev: true - /postcss-load-config/3.1.4_postcss@8.4.19: + /postcss-load-config/3.1.4_postcss@8.4.20: resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} engines: {node: '>= 10'} peerDependencies: @@ -1680,17 +1689,17 @@ packages: optional: true dependencies: lilconfig: 2.0.6 - postcss: 8.4.19 + postcss: 8.4.20 yaml: 1.10.2 dev: true - /postcss-nested/6.0.0_postcss@8.4.19: + /postcss-nested/6.0.0_postcss@8.4.20: resolution: {integrity: sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w==} engines: {node: '>=12.0'} peerDependencies: postcss: ^8.2.14 dependencies: - postcss: 8.4.19 + postcss: 8.4.20 postcss-selector-parser: 6.0.11 dev: true @@ -1706,8 +1715,8 @@ packages: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} dev: true - /postcss/8.4.19: - resolution: {integrity: sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==} + /postcss/8.4.20: + resolution: {integrity: sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.4 @@ -1722,8 +1731,8 @@ packages: fast-diff: 1.2.0 dev: true - /prettier/2.8.0: - resolution: {integrity: sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==} + /prettier/2.8.1: + resolution: {integrity: sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==} engines: {node: '>=10.13.0'} hasBin: true dev: true @@ -1737,6 +1746,15 @@ packages: engines: {node: '>=10'} dev: true + /react-async-hook/4.0.0_react@18.2.0: + resolution: {integrity: sha512-97lgjFkOcHCTYSrsKBpsXg3iVWM0LnzedB749iP76sb3/8Ouu4nHIkCLEOrQWHVYqrYxjF05NN6GHoXWFkB3Kw==} + engines: {node: '>=8', npm: '>=5'} + peerDependencies: + react: '>=16.8' + dependencies: + react: 18.2.0 + dev: false + /react-dom/18.2.0_react@18.2.0: resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} peerDependencies: @@ -1847,6 +1865,7 @@ packages: /sourcemap-codec/1.4.8: resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} + deprecated: Please use @jridgewell/sourcemap-codec instead dev: true /string.prototype.trimend/1.0.6: @@ -1854,7 +1873,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.4 + es-abstract: 1.20.5 dev: true /string.prototype.trimstart/1.0.6: @@ -1862,7 +1881,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.4 + es-abstract: 1.20.5 dev: true /strip-bom/3.0.0: @@ -1882,7 +1901,7 @@ packages: engines: {node: '>= 0.4'} dev: true - /tailwindcss/3.2.4_postcss@8.4.19: + /tailwindcss/3.2.4_postcss@8.4.20: resolution: {integrity: sha512-AhwtHCKMtR71JgeYDaswmZXhPcW9iuI9Sp2LvZPo9upDZ7231ZJ7eA9RaURbhpXGVlrjX4cFNlB4ieTetEb7hQ==} engines: {node: '>=12.13.0'} hasBin: true @@ -1903,11 +1922,11 @@ packages: normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 - postcss: 8.4.19 - postcss-import: 14.1.0_postcss@8.4.19 - postcss-js: 4.0.0_postcss@8.4.19 - postcss-load-config: 3.1.4_postcss@8.4.19 - postcss-nested: 6.0.0_postcss@8.4.19 + postcss: 8.4.20 + postcss-import: 14.1.0_postcss@8.4.20 + postcss-js: 4.0.0_postcss@8.4.20 + postcss-load-config: 3.1.4_postcss@8.4.20 + postcss-nested: 6.0.0_postcss@8.4.20 postcss-selector-parser: 6.0.11 postcss-value-parser: 4.2.0 quick-lru: 5.1.1 @@ -1937,8 +1956,8 @@ packages: strip-bom: 3.0.0 dev: true - /typescript/4.9.3: - resolution: {integrity: sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==} + /typescript/4.9.4: + resolution: {integrity: sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==} engines: {node: '>=4.2.0'} hasBin: true dev: true @@ -1967,8 +1986,8 @@ packages: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true - /vite/3.2.4_@types+node@18.11.9: - resolution: {integrity: sha512-Z2X6SRAffOUYTa+sLy3NQ7nlHFU100xwanq1WDwqaiFiCe+25zdxP1TfCS5ojPV2oDDcXudHIoPnI1Z/66B7Yw==} + /vite/3.2.5_@types+node@18.11.16: + resolution: {integrity: sha512-4mVEpXpSOgrssFZAOmGIr85wPHKvaDAcXqxVxVRZhljkJOMZi1ibLibzjLHzJvcok8BMguLc7g1W6W/GqZbLdQ==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: @@ -1992,9 +2011,9 @@ packages: terser: optional: true dependencies: - '@types/node': 18.11.9 - esbuild: 0.15.15 - postcss: 8.4.19 + '@types/node': 18.11.16 + esbuild: 0.15.18 + postcss: 8.4.20 resolve: 1.22.1 rollup: 2.79.1 optionalDependencies: diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 033f184..94ca7c4 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -10,20 +10,9 @@ mod rpc; use crate::core::AmbientLightMode; use crate::core::CoreManager; use paris::*; -use picker::led_color::LedColor; use picker::manager::Picker; use std::vec; -#[tauri::command] -async fn refresh_displays() { - match Picker::global().refresh_displays().await { - Ok(_) => {} - Err(error) => { - error!("{}", error) - } - } -} - #[tauri::command] async fn take_snapshot() -> Vec { let manager = Picker::global(); @@ -45,17 +34,10 @@ async fn take_snapshot() -> Vec { } #[tauri::command] -async fn get_led_strip_colors() -> Result, String> { - let colors = Picker::global().get_led_strip_colors().await; - match colors { - Ok(colors) => { - rpc::manager::Manager::global() - .publish_led_colors(&colors.to_vec()) - .await; - Ok(colors) - } - Err(error) => Err(format!("{}", error)), - } +fn get_picker_config() -> picker::config::Configuration { + let configuration = picker::config::Manager::global().get_config(); + info!("configuration: {:?}", configuration); + configuration } #[tauri::command] @@ -71,9 +53,8 @@ async fn main() { tauri::Builder::default() .invoke_handler(tauri::generate_handler![ take_snapshot, - refresh_displays, - get_led_strip_colors, play_mode, + get_picker_config, ]) .run(tauri::generate_context!()) .expect("error while running tauri application"); diff --git a/src-tauri/src/picker/config/display_config.rs b/src-tauri/src/picker/config/display_config.rs index 09586e8..cd2c9eb 100644 --- a/src-tauri/src/picker/config/display_config.rs +++ b/src-tauri/src/picker/config/display_config.rs @@ -1,13 +1,13 @@ use serde::{Deserialize, Serialize}; -#[derive(Clone, Copy, Serialize, Deserialize)] +#[derive(Clone, Copy, Serialize, Deserialize, Debug)] pub struct LedStripConfig { pub index: usize, pub global_start_position: usize, pub global_end_position: usize, } -#[derive(Clone, Copy, Serialize, Deserialize)] +#[derive(Clone, Copy, Serialize, Deserialize, Debug)] pub struct DisplayConfig { pub index_of_display: usize, pub display_width: usize, diff --git a/src-tauri/src/picker/config/manger.rs b/src-tauri/src/picker/config/manger.rs index 25c090d..d21b704 100644 --- a/src-tauri/src/picker/config/manger.rs +++ b/src-tauri/src/picker/config/manger.rs @@ -11,10 +11,10 @@ use tauri::api::path::config_dir; use super::DisplayConfig; -#[derive(Serialize, Deserialize, Clone)] +#[derive(Serialize, Deserialize, Clone, Debug)] pub struct Configuration { - config_version: u8, - display_configs: Vec, + pub config_version: u8, + pub display_configs: Vec, } impl Configuration { @@ -77,6 +77,10 @@ impl Manager { .map_err(|error| anyhow::anyhow!("can not write config file. {}", error))?; Ok(()) } + + pub fn get_config(&self) -> Configuration { + self.config.clone() + } } #[cfg(test)] @@ -114,7 +118,8 @@ mod tests { }) .to_string() .as_bytes(), - ).unwrap(); + ) + .unwrap(); let _manager = crate::picker::config::manger::Manager::read_config_from_disk(config_file_path.clone()) .unwrap(); diff --git a/src-tauri/src/picker/manager.rs b/src-tauri/src/picker/manager.rs index 9157103..1300807 100644 --- a/src-tauri/src/picker/manager.rs +++ b/src-tauri/src/picker/manager.rs @@ -2,15 +2,12 @@ use futures::{stream::FuturesUnordered, StreamExt}; use once_cell::sync::OnceCell; use paris::info; use scrap::Display; -use std::sync::Arc; +use std::{sync::Arc, borrow::Borrow}; use tokio::{sync::Mutex, task}; -use crate::picker::{config::LedStripConfig, screen::Screen}; +use crate::picker::{config, screen::Screen}; -use super::{ - config::DisplayConfig, display_picker::DisplayPicker, led_color::LedColor, - screenshot::Screenshot, -}; +use super::{config::DisplayConfig, display_picker::DisplayPicker, screenshot::Screenshot}; pub struct Picker { pub screens: Arc>>, @@ -25,64 +22,14 @@ impl Picker { SCREEN_COLOR_PICKER.get_or_init(|| Picker { screens: Arc::new(Mutex::new(vec![])), screenshots: Arc::new(Mutex::new(vec![])), - display_configs: Arc::new(Mutex::new(vec![ - DisplayConfig { - index_of_display: 1, - display_width: 1920, - display_height: 1200, - top_led_strip: LedStripConfig { - index: 1, - global_start_position: 59, - global_end_position: 32, - }, - bottom_led_strip: LedStripConfig { - index: 0, - global_start_position: 0, - global_end_position: 0, - }, - left_led_strip: LedStripConfig { - index: 0, - global_start_position: 0, - global_end_position: 0, - }, - right_led_strip: LedStripConfig { - index: 0, - global_start_position: 0, - global_end_position: 0, - }, - }, - DisplayConfig { - index_of_display: 0, - display_width: 3008, - display_height: 1692, - top_led_strip: LedStripConfig { - index: 0, - global_start_position: 31, - global_end_position: 0, - }, - bottom_led_strip: LedStripConfig { - index: 0, - global_start_position: 0, - global_end_position: 0, - }, - left_led_strip: LedStripConfig { - index: 0, - global_start_position: 0, - global_end_position: 0, - }, - right_led_strip: LedStripConfig { - index: 0, - global_start_position: 0, - global_end_position: 0, - }, - }, - ])), + display_configs: Arc::new(Mutex::new( + config::Manager::global().get_config().display_configs, + )), }) } pub async fn list_displays(&self) -> anyhow::Result> { let mut configs = self.display_configs.lock().await; - let screenshots = self.screenshots.lock().await; let displays = Display::all() .map_err(|error| anyhow::anyhow!("Can not get all of displays. {}", error))?; @@ -97,12 +44,9 @@ impl Picker { configs.push(config); } - for (index, display) in displays.iter().enumerate() { - let height = display.height(); - let width = display.width(); - let config = configs[index]; + for config in configs.iter() { futs.push(async move { - let join = task::spawn(Self::preview_display_by_config(config)); + let join = task::spawn(Self::preview_display_by_config(config.clone())); join.await? }); } @@ -128,55 +72,4 @@ impl Picker { anyhow::Ok(screenshot.to_webp_base64().await) } - - pub async fn refresh_displays(&self) -> anyhow::Result<()> { - // let displays = Display::all() - // .map_err(|error| anyhow::anyhow!("Can not get all of displays. {}", error))?; - // let mut screens = self.screens.lock().await; - // let mut screenshots = self.screenshots.lock().await; - // screens.clear(); - // info!("number of displays: {}", displays.len()); - // for display in displays { - // let height = display.height(); - // let width = display.width(); - // match Capturer::new(display) { - // Ok(capturer) => screens.push(Screen::new(capturer, width, height)), - // Err(error) => screens.push(Screen::new_failed( - // anyhow::anyhow!("{}", error), - // width, - // height, - // )), - // }; - // screenshots.push(Screenshot::new(width, height)); - // } - - // screens.reverse(); - // screenshots.reverse(); - - Ok(()) - } - - pub async fn take_screenshots_for_all(&self) -> anyhow::Result> { - let mut screens = self.screens.lock().await; - let screenshots = self.screenshots.lock().await; - for (index, screen) in screens.iter_mut().enumerate() { - let bitmap = screen.take().map_err(|error| { - anyhow::anyhow!("take screenshot for display failed. {}", error) - })?; - } - Ok(screenshots.to_vec()) - } - - pub async fn get_led_strip_colors(&self) -> anyhow::Result> { - let screenshots = self.screenshots.lock().await; - let mut colors = Vec::new(); - for screenshot in screenshots.iter() { - let result = screenshot - .get_top_colors() - .await - .map_err(|error| anyhow::anyhow!("get top colors failed. {}", error))?; - colors.extend_from_slice(&result); - } - Ok(colors) - } } diff --git a/src/App.tsx b/src/App.tsx index 4c6ecde..777144e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,8 +1,9 @@ -import { useCallback, useState } from 'react'; +import { useCallback, useEffect, useState } from 'react'; import reactLogo from './assets/react.svg'; import { invoke } from '@tauri-apps/api/tauri'; import './App.css'; import clsx from 'clsx'; +import { Configurator } from './configurator/configurator'; type Mode = 'Flowing' | 'Follow' | null; @@ -17,10 +18,6 @@ function App() { setScreenshots(base64TextList.map((text) => `data:image/webp;base64,${text}`)); } - const refreshDisplays = useCallback(async () => { - await invoke('refresh_displays'); - }, []); - const getLedStripColors = useCallback(async () => { setLedStripColors(await invoke('get_led_strip_colors')); }, []); @@ -60,7 +57,7 @@ function App() { @@ -99,9 +96,7 @@ function App() {
- Vite logo - Tauri logo - React logo +
); diff --git a/src/configurator/components/display-with-led-strips.tsx b/src/configurator/components/display-with-led-strips.tsx new file mode 100644 index 0000000..18d9c05 --- /dev/null +++ b/src/configurator/components/display-with-led-strips.tsx @@ -0,0 +1,25 @@ +import { HTMLAttributes } from 'react'; +import { FC } from 'react'; +import { DisplayConfig } from '../models/display-config'; +import { LedStrip } from './led-strip'; + +export interface DisplayWithLedStripsProps extends HTMLAttributes { + config: DisplayConfig; + screenshot: string; +} + +export const DisplayWithLedStrips: FC = ({ + config, + screenshot, + ...htmlAttrs +}) => { + return ( +
+ + + + + +
+ ); +}; diff --git a/src/configurator/components/led-strip.tsx b/src/configurator/components/led-strip.tsx new file mode 100644 index 0000000..3293e29 --- /dev/null +++ b/src/configurator/components/led-strip.tsx @@ -0,0 +1,11 @@ +import { HTMLAttributes } from 'react'; +import { FC } from 'react'; +import { LedStripConfig } from '../models/led-strip-config'; + +export interface LedStripProps extends HTMLAttributes { + config: LedStripConfig; +} + +export const LedStrip: FC = ({ config, ...htmlAttrs }) => { + return
...
; +}; diff --git a/src/configurator/configurator.tsx b/src/configurator/configurator.tsx new file mode 100644 index 0000000..7f8c4a2 --- /dev/null +++ b/src/configurator/configurator.tsx @@ -0,0 +1,46 @@ +import { invoke } from '@tauri-apps/api'; +import { FC, useMemo } from 'react'; +import { useAsync } from 'react-async-hook'; +import { DisplayWithLedStrips } from './components/display-with-led-strips'; +import { PickerConfiguration } from './models/picker-configuration'; + +const getPickerConfig = () => invoke('get_picker_config'); +const getScreenshotOfDisplays = () => + invoke('take_snapshot').then((items) => + items?.map((it) => `data:image/webp;base64,${it}`), + ); + +export const Configurator: FC = () => { + const { loading: pendingPickerConfig, result: pickerConfig } = useAsync( + getPickerConfig, + [], + ); + + const { loading: pendingScreenshotOfDisplays, result: screenshotOfDisplays } = useAsync( + getScreenshotOfDisplays, + [], + ); + + const displays = useMemo(() => { + if (pickerConfig && screenshotOfDisplays) { + return screenshotOfDisplays.map((screenshot, index) => ( + + )); + } + }, [pickerConfig, screenshotOfDisplays]); + + if (pendingPickerConfig || pendingScreenshotOfDisplays) { + return ( +
+ 等待 {JSON.stringify({ pendingPickerConfig, pendingScreenshotOfDisplays })} + {displays} +
+ ); + } + + return
{displays}
; +}; diff --git a/src/configurator/models/display-config.ts b/src/configurator/models/display-config.ts new file mode 100644 index 0000000..f98a4fb --- /dev/null +++ b/src/configurator/models/display-config.ts @@ -0,0 +1,11 @@ +import { LedStripConfig } from './led-strip-config'; + +export class DisplayConfig { + index_of_display!: number; + display_width!: number; + display_height!: number; + top_led_strip!: LedStripConfig; + bottom_led_strip!: LedStripConfig; + left_led_strip!: LedStripConfig; + right_led_strip!: LedStripConfig; +} diff --git a/src/configurator/models/led-strip-config.ts b/src/configurator/models/led-strip-config.ts new file mode 100644 index 0000000..5b2ff8f --- /dev/null +++ b/src/configurator/models/led-strip-config.ts @@ -0,0 +1,5 @@ +export class LedStripConfig { + index!: number; + global_start_position!: number; + global_end_position!: number; +} diff --git a/src/configurator/models/picker-configuration.ts b/src/configurator/models/picker-configuration.ts new file mode 100644 index 0000000..4b989d0 --- /dev/null +++ b/src/configurator/models/picker-configuration.ts @@ -0,0 +1,6 @@ +import { DisplayConfig } from './display-config'; + +export class PickerConfiguration { + config_version!: number; + display_configs!: DisplayConfig[]; +}