use reka splitter config api

This commit is contained in:
pa
2026-02-01 02:44:07 +09:00
parent 564f5bc73c
commit a33faf6b1a
4 changed files with 142 additions and 299 deletions

248
package-lock.json generated
View File

@@ -11,7 +11,7 @@
"node-api-dotnet": "^0.9.19"
},
"devDependencies": {
"@electron/rebuild": "^4.0.2",
"@electron/rebuild": "^4.0.3",
"@eslint/js": "^9.39.2",
"@fontsource-variable/inter": "^5.2.8",
"@fontsource-variable/noto-sans-jp": "^5.2.10",
@@ -20,17 +20,17 @@
"@fontsource-variable/noto-sans-tc": "^5.2.10",
"@internationalized/date": "^3.10.1",
"@kamiya4047/eslint-plugin-pretty-import": "^0.1.6",
"@sentry/vite-plugin": "^4.7.0",
"@sentry/vue": "^10.36.0",
"@sentry/vite-plugin": "^4.8.0",
"@sentry/vue": "^10.38.0",
"@tailwindcss/vite": "^4.1.18",
"@tanstack/vue-table": "^8.21.3",
"@tanstack/vue-virtual": "^3.13.18",
"@types/jest": "^30.0.0",
"@types/node": "^25.0.10",
"@types/node": "^25.1.0",
"@vee-validate/zod": "^4.15.1",
"@vitejs/plugin-vue": "^6.0.3",
"@vitejs/plugin-vue-jsx": "^5.1.3",
"@vueuse/core": "^14.1.0",
"@vueuse/core": "^14.2.0",
"animate.css": "^4.1.1",
"babel-runtime": "^6.26.0",
"class-variance-authority": "^0.7.1",
@@ -39,7 +39,7 @@
"cross-env": "^10.1.0",
"dayjs": "^1.11.19",
"echarts": "^6.0.0",
"electron": "^39.3.0",
"electron": "^39.4.0",
"electron-builder": "^26.4.0",
"embla-carousel-vue": "^8.6.0",
"esbuild-jest": "^0.5.0",
@@ -47,15 +47,15 @@
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-vue": "^9.33.0",
"globals": "^17.1.0",
"globals": "^17.2.0",
"jest": "^30.2.0",
"lightningcss": "^1.31.1",
"lucide-vue-next": "^0.562.0",
"noty": "^3.2.0-beta-deprecated",
"pinia": "^3.0.4",
"prettier": "^3.8.1",
"reka-ui": "^2.7.0",
"remixicon": "^4.8.0",
"reka-ui": "^2.8.0",
"remixicon": "^4.9.1",
"sass-embedded": "^1.97.3",
"tailwind-merge": "^3.4.0",
"tailwindcss": "^4.1.18",
@@ -1051,9 +1051,9 @@
}
},
"node_modules/@electron/rebuild": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/@electron/rebuild/-/rebuild-4.0.2.tgz",
"integrity": "sha512-8iZWVPvOpCdIc5Pj5udQV3PeO7liJVC7BBUSizl1HCfP7ZxYc9Kqz0c3PDNj2HQ5cQfJ5JaBeJIYKPjAvLn2Rg==",
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/@electron/rebuild/-/rebuild-4.0.3.tgz",
"integrity": "sha512-u9vpTHRMkOYCs/1FLiSVAFZ7FbjsXK+bQuzviJZa+lG7BHZl1nz52/IcGvwa3sk80/fc3llutBkbCq10Vh8WQA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1068,7 +1068,7 @@
"ora": "^5.1.0",
"read-binary-file-arch": "^1.0.6",
"semver": "^7.3.5",
"tar": "^6.0.5",
"tar": "^7.5.6",
"yargs": "^17.0.1"
},
"bin": {
@@ -1088,6 +1088,16 @@
"node": ">=8"
}
},
"node_modules/@electron/rebuild/node_modules/chownr": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz",
"integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==",
"dev": true,
"license": "BlueOak-1.0.0",
"engines": {
"node": ">=18"
}
},
"node_modules/@electron/rebuild/node_modules/cliui": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
@@ -1116,6 +1126,23 @@
"node": ">=8"
}
},
"node_modules/@electron/rebuild/node_modules/tar": {
"version": "7.5.7",
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.7.tgz",
"integrity": "sha512-fov56fJiRuThVFXD6o6/Q354S7pnWMJIVlDBYijsTNx6jKSE4pvrDTs6lUnmGvNyfJwFQQwWy3owKz1ucIhveQ==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"@isaacs/fs-minipass": "^4.0.0",
"chownr": "^3.0.0",
"minipass": "^7.1.2",
"minizlib": "^3.1.0",
"yallist": "^5.0.0"
},
"engines": {
"node": ">=18"
}
},
"node_modules/@electron/rebuild/node_modules/wrap-ansi": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
@@ -1134,6 +1161,16 @@
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
"node_modules/@electron/rebuild/node_modules/yallist": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz",
"integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==",
"dev": true,
"license": "BlueOak-1.0.0",
"engines": {
"node": ">=18"
}
},
"node_modules/@electron/rebuild/node_modules/yargs": {
"version": "17.7.2",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
@@ -4339,63 +4376,63 @@
]
},
"node_modules/@sentry-internal/browser-utils": {
"version": "10.36.0",
"resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-10.36.0.tgz",
"integrity": "sha512-WILVR8HQBWOxbqLRuTxjzRCMIACGsDTo6jXvzA8rz6ezElElLmIrn3CFAswrESLqEEUa4CQHl5bLgSVJCRNweA==",
"version": "10.38.0",
"resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-10.38.0.tgz",
"integrity": "sha512-UOJtYmdcxHCcV0NPfXFff/a95iXl/E0EhuQ1y0uE0BuZDMupWSF5t2BgC4HaE5Aw3RTjDF3XkSHWoIF6ohy7eA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@sentry/core": "10.36.0"
"@sentry/core": "10.38.0"
},
"engines": {
"node": ">=18"
}
},
"node_modules/@sentry-internal/feedback": {
"version": "10.36.0",
"resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-10.36.0.tgz",
"integrity": "sha512-zPjz7AbcxEyx8AHj8xvp28fYtPTPWU1XcNtymhAHJLS9CXOblqSC7W02Jxz6eo3eR1/pLyOo6kJBUjvLe9EoFA==",
"version": "10.38.0",
"resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-10.38.0.tgz",
"integrity": "sha512-JXneg9zRftyfy1Fyfc39bBlF/Qd8g4UDublFFkVvdc1S6JQPlK+P6q22DKz3Pc8w3ySby+xlIq/eTu9Pzqi4KA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@sentry/core": "10.36.0"
"@sentry/core": "10.38.0"
},
"engines": {
"node": ">=18"
}
},
"node_modules/@sentry-internal/replay": {
"version": "10.36.0",
"resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-10.36.0.tgz",
"integrity": "sha512-nLMkJgvHq+uCCrQKV2KgSdVHxTsmDk0r2hsAoTcKCbzUpXyW5UhCziMRS6ULjBlzt5sbxoIIplE25ZpmIEeNgg==",
"version": "10.38.0",
"resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-10.38.0.tgz",
"integrity": "sha512-YWIkL6/dnaiQyFiZXJ/nN+NXGv/15z45ia86bE/TMq01CubX/DUOilgsFz0pk2v/pg3tp/U2MskLO9Hz0cnqeg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@sentry-internal/browser-utils": "10.36.0",
"@sentry/core": "10.36.0"
"@sentry-internal/browser-utils": "10.38.0",
"@sentry/core": "10.38.0"
},
"engines": {
"node": ">=18"
}
},
"node_modules/@sentry-internal/replay-canvas": {
"version": "10.36.0",
"resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-10.36.0.tgz",
"integrity": "sha512-DLGIwmT2LX+O6TyYPtOQL5GiTm2rN0taJPDJ/Lzg2KEJZrdd5sKkzTckhh2x+vr4JQyeaLmnb8M40Ch1hvG/vQ==",
"version": "10.38.0",
"resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-10.38.0.tgz",
"integrity": "sha512-OXWM9jEqNYh4VTvrMu7v+z1anz+QKQ/fZXIZdsO7JTT2lGNZe58UUMeoq386M+Saxen8F9SUH7yTORy/8KI5qw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@sentry-internal/replay": "10.36.0",
"@sentry/core": "10.36.0"
"@sentry-internal/replay": "10.38.0",
"@sentry/core": "10.38.0"
},
"engines": {
"node": ">=18"
}
},
"node_modules/@sentry/babel-plugin-component-annotate": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-4.7.0.tgz",
"integrity": "sha512-MkyajDiO17/GaHHFgOmh05ZtOwF5hmm9KRjVgn9PXHIdpz+TFM5mkp1dABmR6Y75TyNU98Z1aOwPOgyaR5etJw==",
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-4.8.0.tgz",
"integrity": "sha512-cy/9Eipkv23MsEJ4IuB4dNlVwS9UqOzI3Eu+QPake5BVFgPYCX0uP0Tr3Z43Ime6Rb+BiDnWC51AJK9i9afHYw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -4403,31 +4440,31 @@
}
},
"node_modules/@sentry/browser": {
"version": "10.36.0",
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-10.36.0.tgz",
"integrity": "sha512-yHhXbgdGY1s+m8CdILC9U/II7gb6+s99S2Eh8VneEn/JG9wHc+UOzrQCeFN0phFP51QbLkjkiQbbanjT1HP8UQ==",
"version": "10.38.0",
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-10.38.0.tgz",
"integrity": "sha512-3phzp1YX4wcQr9mocGWKbjv0jwtuoDBv7+Y6Yfrys/kwyaL84mDLjjQhRf4gL5SX7JdYkhBp4WaiNlR0UC4kTA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@sentry-internal/browser-utils": "10.36.0",
"@sentry-internal/feedback": "10.36.0",
"@sentry-internal/replay": "10.36.0",
"@sentry-internal/replay-canvas": "10.36.0",
"@sentry/core": "10.36.0"
"@sentry-internal/browser-utils": "10.38.0",
"@sentry-internal/feedback": "10.38.0",
"@sentry-internal/replay": "10.38.0",
"@sentry-internal/replay-canvas": "10.38.0",
"@sentry/core": "10.38.0"
},
"engines": {
"node": ">=18"
}
},
"node_modules/@sentry/bundler-plugin-core": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/@sentry/bundler-plugin-core/-/bundler-plugin-core-4.7.0.tgz",
"integrity": "sha512-gFdEtiup/7qYhN3vp1v2f0WL9AG9OorWLtIpfSBYbWjtzklVNg1sizvNyZ8nEiwtnb25LzvvCUbOP1SyP6IodQ==",
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/@sentry/bundler-plugin-core/-/bundler-plugin-core-4.8.0.tgz",
"integrity": "sha512-QaXd/NzaZ2vmiA2FNu2nBkgQU+17N3fE+zVOTzG0YK54QDSJMd4n3AeJIEyPhSzkOob+GqtO22nbYf6AATFMAw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/core": "^7.18.5",
"@sentry/babel-plugin-component-annotate": "4.7.0",
"@sentry/babel-plugin-component-annotate": "4.8.0",
"@sentry/cli": "^2.57.0",
"dotenv": "^16.3.1",
"find-up": "^5.0.0",
@@ -4614,9 +4651,9 @@
}
},
"node_modules/@sentry/core": {
"version": "10.36.0",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-10.36.0.tgz",
"integrity": "sha512-EYJjZvofI+D93eUsPLDIUV0zQocYqiBRyXS6CCV6dHz64P/Hob5NJQOwPa8/v6nD+UvJXvwsFfvXOHhYZhZJOQ==",
"version": "10.38.0",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-10.38.0.tgz",
"integrity": "sha512-1pubWDZE5y5HZEPMAZERP4fVl2NH3Ihp1A+vMoVkb3Qc66Diqj1WierAnStlZP7tCx0TBa0dK85GTW/ZFYyB9g==",
"dev": true,
"license": "MIT",
"engines": {
@@ -4624,13 +4661,13 @@
}
},
"node_modules/@sentry/vite-plugin": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/@sentry/vite-plugin/-/vite-plugin-4.7.0.tgz",
"integrity": "sha512-eQXDghOQLsYwnHutJo8TCzhG4gp0KLNq3h96iqFMhsbjnNnfYeCX1lIw1pJEh/az3cDwSyPI/KGkvf8hr0dZmQ==",
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/@sentry/vite-plugin/-/vite-plugin-4.8.0.tgz",
"integrity": "sha512-/YZJitGsx/o72FFQYy3tucUfs4w3COvSI1d2NYyAhIzay4tjLLRjpM5PdwFnoBT7Uj/7jSbuHkg87PAliLiu2g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@sentry/bundler-plugin-core": "4.7.0",
"@sentry/bundler-plugin-core": "4.8.0",
"unplugin": "1.0.1"
},
"engines": {
@@ -4638,14 +4675,14 @@
}
},
"node_modules/@sentry/vue": {
"version": "10.36.0",
"resolved": "https://registry.npmjs.org/@sentry/vue/-/vue-10.36.0.tgz",
"integrity": "sha512-pGED21QngK1ulqGsNn1NyBKgay8Cf7qZBnaxQXvnm9RaIlTGYdqg7TeooQru45We/8f0DzM6n59YykAsUu21kw==",
"version": "10.38.0",
"resolved": "https://registry.npmjs.org/@sentry/vue/-/vue-10.38.0.tgz",
"integrity": "sha512-fmgZxB9LCoX8Os/Vlk8w3vpfO+GbocnyFv0+DCfKnKhO0ApxxJQ7K6Q9GDzgoDVc8FM5GYbdymbgzOF9h7BpRw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@sentry/browser": "10.36.0",
"@sentry/core": "10.36.0"
"@sentry/browser": "10.38.0",
"@sentry/core": "10.38.0"
},
"engines": {
"node": ">=18"
@@ -5523,9 +5560,9 @@
"license": "MIT"
},
"node_modules/@types/node": {
"version": "25.0.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.10.tgz",
"integrity": "sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg==",
"version": "25.1.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.1.0.tgz",
"integrity": "sha512-t7frlewr6+cbx+9Ohpl0NOTKXZNV9xHRmNOvql47BFJKcEG1CxtxlPEEe+gR9uhVWM4DwhnvTF110mIL4yP9RA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6182,15 +6219,15 @@
"license": "MIT"
},
"node_modules/@vueuse/core": {
"version": "14.1.0",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-14.1.0.tgz",
"integrity": "sha512-rgBinKs07hAYyPF834mDTigH7BtPqvZ3Pryuzt1SD/lg5wEcWqvwzXXYGEDb2/cP0Sj5zSvHl3WkmMELr5kfWw==",
"version": "14.2.0",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-14.2.0.tgz",
"integrity": "sha512-tpjzVl7KCQNVd/qcaCE9XbejL38V6KJAEq/tVXj7mDPtl6JtzmUdnXelSS+ULRkkrDgzYVK7EerQJvd2jR794Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/web-bluetooth": "^0.0.21",
"@vueuse/metadata": "14.1.0",
"@vueuse/shared": "14.1.0"
"@vueuse/metadata": "14.2.0",
"@vueuse/shared": "14.2.0"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
@@ -6200,9 +6237,9 @@
}
},
"node_modules/@vueuse/metadata": {
"version": "14.1.0",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-14.1.0.tgz",
"integrity": "sha512-7hK4g015rWn2PhKcZ99NyT+ZD9sbwm7SGvp7k+k+rKGWnLjS/oQozoIZzWfCewSUeBmnJkIb+CNr7Zc/EyRnnA==",
"version": "14.2.0",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-14.2.0.tgz",
"integrity": "sha512-i3axTGjU8b13FtyR4Keeama+43iD+BwX9C2TmzBVKqjSHArF03hjkp2SBZ1m72Jk2UtrX0aYCugBq2R1fhkuAQ==",
"dev": true,
"license": "MIT",
"funding": {
@@ -6210,9 +6247,9 @@
}
},
"node_modules/@vueuse/shared": {
"version": "14.1.0",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-14.1.0.tgz",
"integrity": "sha512-EcKxtYvn6gx1F8z9J5/rsg3+lTQnvOruQd8fUecW99DCK04BkWD7z5KQ/wTAx+DazyoEE9dJt/zV8OIEQbM6kw==",
"version": "14.2.0",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-14.2.0.tgz",
"integrity": "sha512-Z0bmluZTlAXgUcJ4uAFaML16JcD8V0QG00Db3quR642I99JXIDRa2MI2LGxiLVhcBjVnL1jOzIvT5TT2lqJlkA==",
"dev": true,
"license": "MIT",
"funding": {
@@ -8446,9 +8483,9 @@
}
},
"node_modules/electron": {
"version": "39.3.0",
"resolved": "https://registry.npmjs.org/electron/-/electron-39.3.0.tgz",
"integrity": "sha512-ZA2Cmu5Vs8zeuZBr71XWZ5vgm7lRDB9N50oV6ee7YocITyxRxx/apWFKY48Sxyn0gzVlX+6YQc3CS1PtYIkGUg==",
"version": "39.4.0",
"resolved": "https://registry.npmjs.org/electron/-/electron-39.4.0.tgz",
"integrity": "sha512-NCK/FTAqgG/N+09OXFES6bubamgPZs7TEPIjWZIrbEnm8GzEwxC22ZG6SEPid2DmJnJmBurJ6M0G4EShdSc28Q==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
@@ -10089,9 +10126,9 @@
}
},
"node_modules/globals": {
"version": "17.1.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-17.1.0.tgz",
"integrity": "sha512-8HoIcWI5fCvG5NADj4bDav+er9B9JMj2vyL2pI8D0eismKyUvPLTSs+Ln3wqhwcp306i73iyVnEKx3F6T47TGw==",
"version": "17.2.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-17.2.0.tgz",
"integrity": "sha512-tovnCz/fEq+Ripoq+p/gN1u7l6A7wwkoBT9pRCzTHzsD/LvADIzXZdjmRymh5Ztf0DYC3Rwg5cZRYjxzBmzbWg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -15157,9 +15194,9 @@
}
},
"node_modules/reka-ui": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/reka-ui/-/reka-ui-2.7.0.tgz",
"integrity": "sha512-m+XmxQN2xtFzBP3OAdIafKq7C8OETo2fqfxcIIxYmNN2Ch3r5oAf6yEYCIJg5tL/yJU2mHqF70dCCekUkrAnXA==",
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/reka-ui/-/reka-ui-2.8.0.tgz",
"integrity": "sha512-N4JOyIrmDE7w2i06WytqcV2QICubtS2PsK5Uo8FIMAgmO13KhUAgAByP26cXjjm2oF/w7rTyRs8YaqtvaBT+SA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -15168,8 +15205,8 @@
"@internationalized/date": "^3.5.0",
"@internationalized/number": "^3.5.0",
"@tanstack/vue-virtual": "^3.12.0",
"@vueuse/core": "^12.5.0",
"@vueuse/shared": "^12.5.0",
"@vueuse/core": "^14.1.0",
"@vueuse/shared": "^14.1.0",
"aria-hidden": "^1.2.4",
"defu": "^6.1.4",
"ohash": "^2.0.11"
@@ -15178,49 +15215,10 @@
"vue": ">= 3.2.0"
}
},
"node_modules/reka-ui/node_modules/@vueuse/core": {
"version": "12.8.2",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-12.8.2.tgz",
"integrity": "sha512-HbvCmZdzAu3VGi/pWYm5Ut+Kd9mn1ZHnn4L5G8kOQTPs/IwIAmJoBrmYk2ckLArgMXZj0AW3n5CAejLUO+PhdQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/web-bluetooth": "^0.0.21",
"@vueuse/metadata": "12.8.2",
"@vueuse/shared": "12.8.2",
"vue": "^3.5.13"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/reka-ui/node_modules/@vueuse/metadata": {
"version": "12.8.2",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-12.8.2.tgz",
"integrity": "sha512-rAyLGEuoBJ/Il5AmFHiziCPdQzRt88VxR+Y/A/QhJ1EWtWqPBBAxTAFaSkviwEuOEZNtW8pvkPgoCZQ+HxqW1A==",
"dev": true,
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/reka-ui/node_modules/@vueuse/shared": {
"version": "12.8.2",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-12.8.2.tgz",
"integrity": "sha512-dznP38YzxZoNloI0qpEfpkms8knDtaoQ6Y/sfS0L7Yki4zh40LFHEhur0odJC6xTHG5dxWVPiUWBXn+wCG2s5w==",
"dev": true,
"license": "MIT",
"dependencies": {
"vue": "^3.5.13"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/remixicon": {
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/remixicon/-/remixicon-4.8.0.tgz",
"integrity": "sha512-8qTM/bWkmsAWitvcL9XrVPVdqHRrdmnNp4zCFBdmIHBygxfHWwoK6NzitbiMyRzjcXKBMlS/ab5M65/ZlxJTVA==",
"version": "4.9.1",
"resolved": "https://registry.npmjs.org/remixicon/-/remixicon-4.9.1.tgz",
"integrity": "sha512-36gLSoujkabnCFZFDyP17VNh9piuBA/rsXUb4auSJWLGsHVXtmxLj/EM5FjaEAGnk8oIAj1Azob/DZ2N+90lAQ==",
"dev": true,
"license": "Apache-2.0"
},

View File

@@ -1,173 +1,43 @@
import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
import { computed, ref } from 'vue';
import { storeToRefs } from 'pinia';
import { useAppearanceSettingsStore } from '../stores';
export function useMainLayoutResizable() {
const asideMaxPx = 700;
const mainMinPx = 320;
const appearanceStore = useAppearanceSettingsStore();
const { setAsideWidth } = appearanceStore;
const { asideWidth, isSideBarTabShow, isNavCollapsed } =
storeToRefs(appearanceStore);
const { isSideBarTabShow } = storeToRefs(appearanceStore);
const fallbackWidth =
typeof window !== 'undefined' && window.innerWidth
? window.innerWidth
: 1200;
const asideDefaultSize = 25;
const mainDefaultSize = 75;
const asideMinSize = 12;
const asideMaxPx = 700;
const panelGroupRef = ref(null);
const asidePanelRef = ref(null);
const groupWidth = ref(fallbackWidth);
let resizeObserver = null;
// size helpers: panelGroupRef, groupWidth, fallbackWidth
const getGroupWidthRaw = () => {
const element = panelGroupRef.value?.$el ?? panelGroupRef.value;
const width = element?.getBoundingClientRect?.().width;
return Number.isFinite(width) ? width : null;
};
const getGroupWidth = () => {
const width = getGroupWidthRaw();
return Number.isFinite(width) && width > 0 ? width : fallbackWidth;
};
const pxToPercent = (px, width, min = 1) => {
const w = Number.isFinite(width) && width > 0 ? width : getGroupWidth();
return Math.min(100, Math.max(min, (px / w) * 100));
};
const percentToPx = (percent, groupWidth) => (percent / 100) * groupWidth;
const getMaxAsidePx = (width) =>
Math.min(asideMaxPx, Math.max(0, width - mainMinPx));
const clampAsidePx = (px, width) =>
Math.min(getMaxAsidePx(width), Math.max(0, px));
// layout state: isAsideCollapsed, asideMaxSize, asideDefaultSize, mainDefaultSize
const isAsideCollapsed = (layout) =>
Array.isArray(layout) &&
layout.length >= 2 &&
layout[layout.length - 1] <= 1;
const asideMaxSize = computed(() =>
pxToPercent(getMaxAsidePx(groupWidth.value), groupWidth.value, 0)
);
const asideDefaultSize = computed(() => {
if (!isSideBarTabShow.value) {
return 0;
}
const percent = pxToPercent(asideWidth.value, groupWidth.value, 0);
return Math.min(asideMaxSize.value, percent);
});
const mainDefaultSize = computed(
() => 100 - (isSideBarTabShow.value ? asideDefaultSize.value : 0)
);
// drag -> store: handleLayout, asideWidth
const isAsideCollapsedState = ref(false);
const handleLayout = (sizes) => {
if (!Array.isArray(sizes) || sizes.length < 1) {
if (!Array.isArray(sizes) || sizes.length < 2) {
isAsideCollapsedState.value = false;
return;
}
if (!isSideBarTabShow.value || sizes.length < 2) {
return;
}
const rawWidth = getGroupWidthRaw();
if (!Number.isFinite(rawWidth) || rawWidth <= 0) {
return;
}
const width = rawWidth;
const asideSize = sizes[sizes.length - 1];
if (!Number.isFinite(asideSize)) {
return;
}
const nextAsidePx =
asideSize <= 1
? 0
: clampAsidePx(
Math.round(percentToPx(asideSize, width)),
width
);
if (nextAsidePx === asideWidth.value) {
return;
}
setAsideWidth(nextAsidePx);
isAsideCollapsedState.value = isAsideCollapsed(sizes);
};
// sync store -> panel: resizeAsidePanel, syncAsidePanelSize
const resizeAsidePanel = (targetSize) =>
asidePanelRef.value?.resize?.(targetSize);
const syncAsidePanelSize = (width) => {
if (!isSideBarTabShow.value) {
return;
}
const maxAsidePx = getMaxAsidePx(width);
const clampedAsidePx = Math.min(
maxAsidePx,
Math.max(0, asideWidth.value)
);
if (maxAsidePx > 0 && clampedAsidePx !== asideWidth.value) {
setAsideWidth(clampedAsidePx);
}
const asideTargetSize =
maxAsidePx > 0 && clampedAsidePx > 0
? pxToPercent(clampedAsidePx, width, 0)
: 0;
resizeAsidePanel(asideTargetSize);
};
// window resize: updateGroupWidth, resizeObserver
const updateGroupWidth = () => {
const width = getGroupWidth();
groupWidth.value = width;
syncAsidePanelSize(width);
};
onMounted(async () => {
await nextTick();
updateGroupWidth();
const element = panelGroupRef.value?.$el ?? panelGroupRef.value;
if (element && typeof ResizeObserver !== 'undefined') {
resizeObserver = new ResizeObserver(updateGroupWidth);
resizeObserver.observe(element);
}
});
watch(
() => [isSideBarTabShow.value, asideWidth.value],
() => {
syncAsidePanelSize(groupWidth.value);
}
const isAsideCollapsedStatic = computed(
() => !isSideBarTabShow.value || isAsideCollapsedState.value
);
onUnmounted(() => {
if (resizeObserver) {
resizeObserver.disconnect();
resizeObserver = null;
}
});
return {
panelGroupRef,
asidePanelRef,
asideDefaultSize,
asideMaxSize,
asideMinSize,
asideMaxPx,
mainDefaultSize,
handleLayout,
isAsideCollapsed,
isNavCollapsed,
isAsideCollapsedStatic,
isSideBarTabShow
};
}

View File

@@ -73,7 +73,6 @@ export const useAppearanceSettingsStore = defineStore(
'Sort by Time in Instance',
'Sort by Last Active'
]);
const asideWidth = ref(300);
const navWidth = ref(240);
const isSidebarGroupByInstance = ref(true);
const isHideFriendsInSameInstance = ref(false);
@@ -145,7 +144,6 @@ export const useAppearanceSettingsStore = defineStore(
dtHour12Config,
dtIsoFormatConfig,
sidebarSortMethodsConfig,
asideWidthConfig,
navWidthConfig,
isSidebarGroupByInstanceConfig,
isHideFriendsInSameInstanceConfig,
@@ -195,7 +193,6 @@ export const useAppearanceSettingsStore = defineStore(
'Sort by Last Active'
])
),
configRepository.getInt('VRCX_sidePanelWidth', 300),
configRepository.getInt('VRCX_navPanelWidth', 240),
configRepository.getBool('VRCX_sidebarGroupByInstance', true),
configRepository.getBool(
@@ -288,7 +285,6 @@ export const useAppearanceSettingsStore = defineStore(
);
}
trustColor.value = { ...TRUST_COLOR_DEFAULTS };
asideWidth.value = asideWidthConfig;
navWidth.value = clampInt(navWidthConfig, 64, 480);
isSidebarGroupByInstance.value = isSidebarGroupByInstanceConfig;
isHideFriendsInSameInstance.value =
@@ -680,22 +676,6 @@ export const useAppearanceSettingsStore = defineStore(
});
}
}
function setAsideWidth(widthOrArray) {
let width = null;
if (Array.isArray(widthOrArray) && widthOrArray.length) {
width = widthOrArray[widthOrArray.length - 1];
} else if (typeof widthOrArray === 'number') {
width = widthOrArray;
}
if (!Number.isFinite(width) || width === null) {
return;
}
const normalized = Math.max(0, Math.round(width));
requestAnimationFrame(() => {
asideWidth.value = normalized;
configRepository.setInt('VRCX_sidePanelWidth', normalized);
});
}
function setIsSidebarGroupByInstance() {
isSidebarGroupByInstance.value = !isSidebarGroupByInstance.value;
configRepository.setBool(
@@ -972,7 +952,6 @@ export const useAppearanceSettingsStore = defineStore(
sidebarSortMethod2,
sidebarSortMethod3,
sidebarSortMethods,
asideWidth,
navWidth,
isSidebarGroupByInstance,
isHideFriendsInSameInstance,
@@ -1011,7 +990,6 @@ export const useAppearanceSettingsStore = defineStore(
setSidebarSortMethod3,
setSidebarSortMethods,
setNavWidth,
setAsideWidth,
setIsSidebarGroupByInstance,
setIsHideFriendsInSameInstance,
setIsSidebarDivideByFriendGroup,

View File

@@ -16,8 +16,8 @@
<SidebarInset class="min-w-0 bg-sidebar">
<ResizablePanelGroup
ref="panelGroupRef"
direction="horizontal"
auto-save-id="vrcx-main-layout-right-sidebar"
:class="['group/main-layout flex-1 h-full min-w-0', { 'aside-collapsed': isAsideCollapsedStatic }]"
@layout="handleLayout">
<template #default="{ layout }">
@@ -37,9 +37,8 @@
'z-20 [&>div]:-translate-x-1/2'
]"></ResizableHandle>
<ResizablePanel
ref="asidePanelRef"
:default-size="asideDefaultSize"
:max-size="asideMaxSize"
:min-size="asideMinSize"
:collapsed-size="0"
collapsible
:order="2"
@@ -114,7 +113,7 @@
const router = useRouter();
const appearanceSettingsStore = useAppearanceSettingsStore();
const { navWidth, isNavCollapsed, asideWidth } = storeToRefs(appearanceSettingsStore);
const { navWidth, isNavCollapsed } = storeToRefs(appearanceSettingsStore);
const sidebarOpen = computed(() => !isNavCollapsed.value);
@@ -163,18 +162,16 @@
});
const {
panelGroupRef,
asideDefaultSize,
asideMaxSize,
asideMinSize,
asideMaxPx,
mainDefaultSize,
handleLayout,
isAsideCollapsed,
isAsideCollapsedStatic,
isSideBarTabShow
} = useMainLayoutResizable();
const isAsideCollapsedStatic = computed(() => !isSideBarTabShow.value || asideWidth.value === 0);
watch(
() => watchState.isLoggedIn,
(isLoggedIn) => {