diff --git a/README.md b/README.md
index b111762..3a3bb71 100644
--- a/README.md
+++ b/README.md
@@ -3,12 +3,21 @@
# OMP - OneDrive Media Player

-
+
+
+
+
+
+
[](https://ko-fi.com/nini22p)
English | [中文](./README_CN.md)
-**[Now Playing](https://nini22p.github.io/omp/)**
+**Try OMP Now:**
+
+* **[Web Version](https://nini22p.github.io/omp/)**
+* **[Microsoft Store (PWA)](https://apps.microsoft.com/detail/9p6w6x16q7l9)**
+* **[Download Android APK (PWA)](https://github.com/nini22P/omp/releases/latest/download/OMP-android.apk)**
## Features
diff --git a/README_CN.md b/README_CN.md
index b591d4f..edd5b0c 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -3,12 +3,21 @@
# OMP - OneDrive 媒体播放器

-
+
+
+
+
+
+
[](https://ko-fi.com/nini22p)
[English](./README.md) | 中文
-**[立即播放](https://nini22p.github.io/omp/)**
+**立即体验 OMP:**
+
+* **[网页版](https://nini22p.github.io/omp/)**
+* **[微软商店 (PWA)](https://apps.microsoft.com/detail/9p6w6x16q7l9)**
+* **[下载 Android APK (PWA)](https://github.com/nini22P/omp/releases/latest/download/OMP-android.apk)**
## 功能
diff --git a/package-lock.json b/package-lock.json
index 17cf2ff..28e5fd5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -16,6 +16,7 @@
"@lingui/react": "^5.4.1",
"@mui/icons-material": "7.3.1",
"@mui/material": "7.3.1",
+ "@react-spring/web": "10.0.1",
"@react-spring/web": "9.7.5",
"@tauri-apps/api": "^2.7.0",
"@use-gesture/react": "^10.3.1",
@@ -2753,7 +2754,8 @@
},
"node_modules/@swc/core": {
"version": "1.13.3",
- "dev": true,
+ "resolved": "https://registry.npmmirror.com/@swc/core/-/core-1.13.3.tgz",
+ "integrity": "sha512-ZaDETVWnm6FE0fc+c2UE8MHYVS3Fe91o5vkmGfgwGXFbxYvAjKSqxM/j4cRc9T7VZNSJjriXq58XkfCp3Y6f+w==",
"hasInstallScript": true,
"license": "Apache-2.0",
"dependencies": {
@@ -2788,29 +2790,13 @@
}
}
},
- "node_modules/@swc/core-win32-x64-msvc": {
- "version": "1.13.3",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0 AND MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/@swc/core/node_modules/@swc/core-darwin-arm64": {
+ "node_modules/@swc/core-darwin-arm64": {
"version": "1.13.3",
- "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.13.3.tgz",
+ "resolved": "https://registry.npmmirror.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.13.3.tgz",
"integrity": "sha512-ux0Ws4pSpBTqbDS9GlVP354MekB1DwYlbxXU3VhnDr4GBcCOimpocx62x7cFJkSpEBF8bmX8+/TTCGKh4PbyXw==",
"cpu": [
"arm64"
],
- "dev": true,
"license": "Apache-2.0 AND MIT",
"optional": true,
"os": [
@@ -2820,14 +2806,13 @@
"node": ">=10"
}
},
- "node_modules/@swc/core/node_modules/@swc/core-darwin-x64": {
+ "node_modules/@swc/core-darwin-x64": {
"version": "1.13.3",
- "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.13.3.tgz",
+ "resolved": "https://registry.npmmirror.com/@swc/core-darwin-x64/-/core-darwin-x64-1.13.3.tgz",
"integrity": "sha512-p0X6yhxmNUOMZrbeZ3ZNsPige8lSlSe1llllXvpCLkKKxN/k5vZt1sULoq6Nj4eQ7KeHQVm81/+AwKZyf/e0TA==",
"cpu": [
"x64"
],
- "dev": true,
"license": "Apache-2.0 AND MIT",
"optional": true,
"os": [
@@ -2837,14 +2822,13 @@
"node": ">=10"
}
},
- "node_modules/@swc/core/node_modules/@swc/core-linux-arm-gnueabihf": {
+ "node_modules/@swc/core-linux-arm-gnueabihf": {
"version": "1.13.3",
- "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.13.3.tgz",
+ "resolved": "https://registry.npmmirror.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.13.3.tgz",
"integrity": "sha512-OmDoiexL2fVWvQTCtoh0xHMyEkZweQAlh4dRyvl8ugqIPEVARSYtaj55TBMUJIP44mSUOJ5tytjzhn2KFxFcBA==",
"cpu": [
"arm"
],
- "dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -2854,14 +2838,13 @@
"node": ">=10"
}
},
- "node_modules/@swc/core/node_modules/@swc/core-linux-arm64-gnu": {
+ "node_modules/@swc/core-linux-arm64-gnu": {
"version": "1.13.3",
- "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.13.3.tgz",
+ "resolved": "https://registry.npmmirror.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.13.3.tgz",
"integrity": "sha512-STfKku3QfnuUj6k3g9ld4vwhtgCGYIFQmsGPPgT9MK/dI3Lwnpe5Gs5t1inoUIoGNP8sIOLlBB4HV4MmBjQuhw==",
"cpu": [
"arm64"
],
- "dev": true,
"license": "Apache-2.0 AND MIT",
"optional": true,
"os": [
@@ -2871,14 +2854,13 @@
"node": ">=10"
}
},
- "node_modules/@swc/core/node_modules/@swc/core-linux-arm64-musl": {
+ "node_modules/@swc/core-linux-arm64-musl": {
"version": "1.13.3",
- "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.13.3.tgz",
+ "resolved": "https://registry.npmmirror.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.13.3.tgz",
"integrity": "sha512-bc+CXYlFc1t8pv9yZJGus372ldzOVscBl7encUBlU1m/Sig0+NDJLz6cXXRcFyl6ABNOApWeR4Yl7iUWx6C8og==",
"cpu": [
"arm64"
],
- "dev": true,
"license": "Apache-2.0 AND MIT",
"optional": true,
"os": [
@@ -2888,14 +2870,13 @@
"node": ">=10"
}
},
- "node_modules/@swc/core/node_modules/@swc/core-linux-x64-gnu": {
+ "node_modules/@swc/core-linux-x64-gnu": {
"version": "1.13.3",
- "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.13.3.tgz",
+ "resolved": "https://registry.npmmirror.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.13.3.tgz",
"integrity": "sha512-dFXoa0TEhohrKcxn/54YKs1iwNeW6tUkHJgXW33H381SvjKFUV53WR231jh1sWVJETjA3vsAwxKwR23s7UCmUA==",
"cpu": [
"x64"
],
- "dev": true,
"license": "Apache-2.0 AND MIT",
"optional": true,
"os": [
@@ -2905,14 +2886,13 @@
"node": ">=10"
}
},
- "node_modules/@swc/core/node_modules/@swc/core-linux-x64-musl": {
+ "node_modules/@swc/core-linux-x64-musl": {
"version": "1.13.3",
- "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.13.3.tgz",
+ "resolved": "https://registry.npmmirror.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.13.3.tgz",
"integrity": "sha512-ieyjisLB+ldexiE/yD8uomaZuZIbTc8tjquYln9Quh5ykOBY7LpJJYBWvWtm1g3pHv6AXlBI8Jay7Fffb6aLfA==",
"cpu": [
"x64"
],
- "dev": true,
"license": "Apache-2.0 AND MIT",
"optional": true,
"os": [
@@ -2922,14 +2902,13 @@
"node": ">=10"
}
},
- "node_modules/@swc/core/node_modules/@swc/core-win32-arm64-msvc": {
+ "node_modules/@swc/core-win32-arm64-msvc": {
"version": "1.13.3",
- "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.13.3.tgz",
+ "resolved": "https://registry.npmmirror.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.13.3.tgz",
"integrity": "sha512-elTQpnaX5vESSbhCEgcwXjpMsnUbqqHfEpB7ewpkAsLzKEXZaK67ihSRYAuAx6ewRQTo7DS5iTT6X5aQD3MzMw==",
"cpu": [
"arm64"
],
- "dev": true,
"license": "Apache-2.0 AND MIT",
"optional": true,
"os": [
@@ -2939,14 +2918,27 @@
"node": ">=10"
}
},
- "node_modules/@swc/core/node_modules/@swc/core-win32-ia32-msvc": {
+ "node_modules/@swc/core-win32-ia32-msvc": {
"version": "1.13.3",
- "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.13.3.tgz",
+ "resolved": "https://registry.npmmirror.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.13.3.tgz",
"integrity": "sha512-nvehQVEOdI1BleJpuUgPLrclJ0TzbEMc+MarXDmmiRFwEUGqj+pnfkTSb7RZyS1puU74IXdK/YhTirHurtbI9w==",
"cpu": [
"ia32"
],
- "dev": true,
+ "license": "Apache-2.0 AND MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@swc/core-win32-x64-msvc": {
+ "version": "1.13.3",
+ "cpu": [
+ "x64"
+ ],
"license": "Apache-2.0 AND MIT",
"optional": true,
"os": [
@@ -2958,12 +2950,10 @@
},
"node_modules/@swc/counter": {
"version": "0.1.3",
- "dev": true,
"license": "Apache-2.0"
},
"node_modules/@swc/types": {
"version": "0.1.24",
- "dev": true,
"license": "Apache-2.0",
"dependencies": {
"@swc/counter": "^0.1.3"
@@ -3020,176 +3010,6 @@
"node": ">= 10"
}
},
- "node_modules/@tauri-apps/cli/node_modules/@tauri-apps/cli-darwin-arm64": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.7.1.tgz",
- "integrity": "sha512-j2NXQN6+08G03xYiyKDKqbCV2Txt+hUKg0a8hYr92AmoCU8fgCjHyva/p16lGFGUG3P2Yu0xiNe1hXL9ZuRMzA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "Apache-2.0 OR MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tauri-apps/cli/node_modules/@tauri-apps/cli-darwin-x64": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.7.1.tgz",
- "integrity": "sha512-CdYAefeM35zKsc91qIyKzbaO7FhzTyWKsE8hj7tEJ1INYpoh1NeNNyL/NSEA3Nebi5ilugioJ5tRK8ZXG8y3gw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0 OR MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tauri-apps/cli/node_modules/@tauri-apps/cli-linux-arm-gnueabihf": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.7.1.tgz",
- "integrity": "sha512-dnvyJrTA1UJxJjQ8q1N/gWomjP8Twij1BUQu2fdcT3OPpqlrbOk5R1yT0oD/721xoKNjroB5BXCsmmlykllxNg==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "Apache-2.0 OR MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tauri-apps/cli/node_modules/@tauri-apps/cli-linux-arm64-gnu": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.7.1.tgz",
- "integrity": "sha512-FtBW6LJPNRTws3qyUc294AqCWU91l/H0SsFKq6q4Q45MSS4x6wxLxou8zB53tLDGEPx3JSoPLcDaSfPlSbyujQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "Apache-2.0 OR MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tauri-apps/cli/node_modules/@tauri-apps/cli-linux-arm64-musl": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.7.1.tgz",
- "integrity": "sha512-/HXY0t4FHkpFzjeYS5c16mlA6z0kzn5uKLWptTLTdFSnYpr8FCnOP4Sdkvm2TDQPF2ERxXtNCd+WR/jQugbGnA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "Apache-2.0 OR MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tauri-apps/cli/node_modules/@tauri-apps/cli-linux-riscv64-gnu": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.7.1.tgz",
- "integrity": "sha512-GeW5lVI2GhhnaYckiDzstG2j2Jwlud5d2XefRGwlOK+C/bVGLT1le8MNPYK8wgRlpeK8fG1WnJJYD6Ke7YQ8bg==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "license": "Apache-2.0 OR MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tauri-apps/cli/node_modules/@tauri-apps/cli-linux-x64-gnu": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.7.1.tgz",
- "integrity": "sha512-DprxKQkPxIPYwUgg+cscpv2lcIUhn2nxEPlk0UeaiV9vATxCXyytxr1gLcj3xgjGyNPlM0MlJyYaPy1JmRg1cA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0 OR MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tauri-apps/cli/node_modules/@tauri-apps/cli-linux-x64-musl": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.7.1.tgz",
- "integrity": "sha512-KLlq3kOK7OUyDR757c0zQjPULpGZpLhNB0lZmZpHXvoOUcqZoCXJHh4dT/mryWZJp5ilrem5l8o9ngrDo0X1AA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "Apache-2.0 OR MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tauri-apps/cli/node_modules/@tauri-apps/cli-win32-arm64-msvc": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.7.1.tgz",
- "integrity": "sha512-dH7KUjKkSypCeWPiainHyXoES3obS+JIZVoSwSZfKq2gWgs48FY3oT0hQNYrWveE+VR4VoR3b/F3CPGbgFvksA==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "Apache-2.0 OR MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/@tauri-apps/cli/node_modules/@tauri-apps/cli-win32-ia32-msvc": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.7.1.tgz",
- "integrity": "sha512-1oeibfyWQPVcijOrTg709qhbXArjX3x1MPjrmA5anlygwrbByxLBcLXvotcOeULFcnH2FYUMMLLant8kgvwE5A==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "Apache-2.0 OR MIT",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">= 10"
- }
- },
"node_modules/@tokenizer/token": {
"version": "0.3.0",
"license": "MIT"
@@ -4669,21 +4489,6 @@
"fsevents": "~2.3.1"
}
},
- "node_modules/chokidar/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/chrome-trace-event": {
"version": "1.0.4",
"dev": true,
@@ -5538,627 +5343,202 @@
"dev": true,
"license": "MIT",
"engines": {
- "node": ">=6"
- }
- },
- "node_modules/envinfo": {
- "version": "7.14.0",
- "dev": true,
- "license": "MIT",
- "bin": {
- "envinfo": "dist/cli.js"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/error-ex": {
- "version": "1.3.2",
- "license": "MIT",
- "dependencies": {
- "is-arrayish": "^0.2.1"
- }
- },
- "node_modules/error-stack-parser": {
- "version": "2.1.4",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "stackframe": "^1.3.4"
- }
- },
- "node_modules/es-abstract": {
- "version": "1.24.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "array-buffer-byte-length": "^1.0.2",
- "arraybuffer.prototype.slice": "^1.0.4",
- "available-typed-arrays": "^1.0.7",
- "call-bind": "^1.0.8",
- "call-bound": "^1.0.4",
- "data-view-buffer": "^1.0.2",
- "data-view-byte-length": "^1.0.2",
- "data-view-byte-offset": "^1.0.1",
- "es-define-property": "^1.0.1",
- "es-errors": "^1.3.0",
- "es-object-atoms": "^1.1.1",
- "es-set-tostringtag": "^2.1.0",
- "es-to-primitive": "^1.3.0",
- "function.prototype.name": "^1.1.8",
- "get-intrinsic": "^1.3.0",
- "get-proto": "^1.0.1",
- "get-symbol-description": "^1.1.0",
- "globalthis": "^1.0.4",
- "gopd": "^1.2.0",
- "has-property-descriptors": "^1.0.2",
- "has-proto": "^1.2.0",
- "has-symbols": "^1.1.0",
- "hasown": "^2.0.2",
- "internal-slot": "^1.1.0",
- "is-array-buffer": "^3.0.5",
- "is-callable": "^1.2.7",
- "is-data-view": "^1.0.2",
- "is-negative-zero": "^2.0.3",
- "is-regex": "^1.2.1",
- "is-set": "^2.0.3",
- "is-shared-array-buffer": "^1.0.4",
- "is-string": "^1.1.1",
- "is-typed-array": "^1.1.15",
- "is-weakref": "^1.1.1",
- "math-intrinsics": "^1.1.0",
- "object-inspect": "^1.13.4",
- "object-keys": "^1.1.1",
- "object.assign": "^4.1.7",
- "own-keys": "^1.0.1",
- "regexp.prototype.flags": "^1.5.4",
- "safe-array-concat": "^1.1.3",
- "safe-push-apply": "^1.0.0",
- "safe-regex-test": "^1.1.0",
- "set-proto": "^1.0.0",
- "stop-iteration-iterator": "^1.1.0",
- "string.prototype.trim": "^1.2.10",
- "string.prototype.trimend": "^1.0.9",
- "string.prototype.trimstart": "^1.0.8",
- "typed-array-buffer": "^1.0.3",
- "typed-array-byte-length": "^1.0.3",
- "typed-array-byte-offset": "^1.0.4",
- "typed-array-length": "^1.0.7",
- "unbox-primitive": "^1.1.0",
- "which-typed-array": "^1.1.19"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/es-define-property": {
- "version": "1.0.1",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/es-errors": {
- "version": "1.3.0",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/es-module-lexer": {
- "version": "1.7.0",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/es-object-atoms": {
- "version": "1.1.1",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "es-errors": "^1.3.0"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/es-set-tostringtag": {
- "version": "2.1.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "es-errors": "^1.3.0",
- "get-intrinsic": "^1.2.6",
- "has-tostringtag": "^1.0.2",
- "hasown": "^2.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/es-to-primitive": {
- "version": "1.3.0",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "is-callable": "^1.2.7",
- "is-date-object": "^1.0.5",
- "is-symbol": "^1.0.4"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/esbuild": {
- "version": "0.25.9",
- "dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "bin": {
- "esbuild": "bin/esbuild"
- },
- "engines": {
- "node": ">=18"
- },
- "optionalDependencies": {
- "@esbuild/aix-ppc64": "0.25.9",
- "@esbuild/android-arm": "0.25.9",
- "@esbuild/android-arm64": "0.25.9",
- "@esbuild/android-x64": "0.25.9",
- "@esbuild/darwin-arm64": "0.25.9",
- "@esbuild/darwin-x64": "0.25.9",
- "@esbuild/freebsd-arm64": "0.25.9",
- "@esbuild/freebsd-x64": "0.25.9",
- "@esbuild/linux-arm": "0.25.9",
- "@esbuild/linux-arm64": "0.25.9",
- "@esbuild/linux-ia32": "0.25.9",
- "@esbuild/linux-loong64": "0.25.9",
- "@esbuild/linux-mips64el": "0.25.9",
- "@esbuild/linux-ppc64": "0.25.9",
- "@esbuild/linux-riscv64": "0.25.9",
- "@esbuild/linux-s390x": "0.25.9",
- "@esbuild/linux-x64": "0.25.9",
- "@esbuild/netbsd-arm64": "0.25.9",
- "@esbuild/netbsd-x64": "0.25.9",
- "@esbuild/openbsd-arm64": "0.25.9",
- "@esbuild/openbsd-x64": "0.25.9",
- "@esbuild/openharmony-arm64": "0.25.9",
- "@esbuild/sunos-x64": "0.25.9",
- "@esbuild/win32-arm64": "0.25.9",
- "@esbuild/win32-ia32": "0.25.9",
- "@esbuild/win32-x64": "0.25.9"
- }
- },
- "node_modules/esbuild/node_modules/@esbuild/aix-ppc64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz",
- "integrity": "sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "aix"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/esbuild/node_modules/@esbuild/android-arm": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.9.tgz",
- "integrity": "sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/esbuild/node_modules/@esbuild/android-arm64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz",
- "integrity": "sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/esbuild/node_modules/@esbuild/android-x64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.9.tgz",
- "integrity": "sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/esbuild/node_modules/@esbuild/darwin-arm64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz",
- "integrity": "sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/esbuild/node_modules/@esbuild/darwin-x64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz",
- "integrity": "sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/esbuild/node_modules/@esbuild/freebsd-arm64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz",
- "integrity": "sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/esbuild/node_modules/@esbuild/freebsd-x64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz",
- "integrity": "sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/esbuild/node_modules/@esbuild/linux-arm": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz",
- "integrity": "sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==",
- "cpu": [
- "arm"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/esbuild/node_modules/@esbuild/linux-arm64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz",
- "integrity": "sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/esbuild/node_modules/@esbuild/linux-ia32": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz",
- "integrity": "sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==",
- "cpu": [
- "ia32"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/esbuild/node_modules/@esbuild/linux-loong64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz",
- "integrity": "sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==",
- "cpu": [
- "loong64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/esbuild/node_modules/@esbuild/linux-mips64el": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz",
- "integrity": "sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==",
- "cpu": [
- "mips64el"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/esbuild/node_modules/@esbuild/linux-ppc64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz",
- "integrity": "sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==",
- "cpu": [
- "ppc64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/esbuild/node_modules/@esbuild/linux-riscv64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz",
- "integrity": "sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==",
- "cpu": [
- "riscv64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
+ "node": ">=6"
}
},
- "node_modules/esbuild/node_modules/@esbuild/linux-s390x": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz",
- "integrity": "sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==",
- "cpu": [
- "s390x"
- ],
+ "node_modules/envinfo": {
+ "version": "7.14.0",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
+ "bin": {
+ "envinfo": "dist/cli.js"
+ },
"engines": {
- "node": ">=18"
+ "node": ">=4"
}
},
- "node_modules/esbuild/node_modules/@esbuild/linux-x64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz",
- "integrity": "sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==",
- "cpu": [
- "x64"
- ],
- "dev": true,
+ "node_modules/error-ex": {
+ "version": "1.3.2",
"license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=18"
+ "dependencies": {
+ "is-arrayish": "^0.2.1"
}
},
- "node_modules/esbuild/node_modules/@esbuild/netbsd-arm64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz",
- "integrity": "sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==",
- "cpu": [
- "arm64"
- ],
+ "node_modules/error-stack-parser": {
+ "version": "2.1.4",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "netbsd"
- ],
- "engines": {
- "node": ">=18"
+ "dependencies": {
+ "stackframe": "^1.3.4"
}
},
- "node_modules/esbuild/node_modules/@esbuild/netbsd-x64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz",
- "integrity": "sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==",
- "cpu": [
- "x64"
- ],
+ "node_modules/es-abstract": {
+ "version": "1.24.0",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "netbsd"
- ],
+ "dependencies": {
+ "array-buffer-byte-length": "^1.0.2",
+ "arraybuffer.prototype.slice": "^1.0.4",
+ "available-typed-arrays": "^1.0.7",
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.4",
+ "data-view-buffer": "^1.0.2",
+ "data-view-byte-length": "^1.0.2",
+ "data-view-byte-offset": "^1.0.1",
+ "es-define-property": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "es-set-tostringtag": "^2.1.0",
+ "es-to-primitive": "^1.3.0",
+ "function.prototype.name": "^1.1.8",
+ "get-intrinsic": "^1.3.0",
+ "get-proto": "^1.0.1",
+ "get-symbol-description": "^1.1.0",
+ "globalthis": "^1.0.4",
+ "gopd": "^1.2.0",
+ "has-property-descriptors": "^1.0.2",
+ "has-proto": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "internal-slot": "^1.1.0",
+ "is-array-buffer": "^3.0.5",
+ "is-callable": "^1.2.7",
+ "is-data-view": "^1.0.2",
+ "is-negative-zero": "^2.0.3",
+ "is-regex": "^1.2.1",
+ "is-set": "^2.0.3",
+ "is-shared-array-buffer": "^1.0.4",
+ "is-string": "^1.1.1",
+ "is-typed-array": "^1.1.15",
+ "is-weakref": "^1.1.1",
+ "math-intrinsics": "^1.1.0",
+ "object-inspect": "^1.13.4",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.7",
+ "own-keys": "^1.0.1",
+ "regexp.prototype.flags": "^1.5.4",
+ "safe-array-concat": "^1.1.3",
+ "safe-push-apply": "^1.0.0",
+ "safe-regex-test": "^1.1.0",
+ "set-proto": "^1.0.0",
+ "stop-iteration-iterator": "^1.1.0",
+ "string.prototype.trim": "^1.2.10",
+ "string.prototype.trimend": "^1.0.9",
+ "string.prototype.trimstart": "^1.0.8",
+ "typed-array-buffer": "^1.0.3",
+ "typed-array-byte-length": "^1.0.3",
+ "typed-array-byte-offset": "^1.0.4",
+ "typed-array-length": "^1.0.7",
+ "unbox-primitive": "^1.1.0",
+ "which-typed-array": "^1.1.19"
+ },
"engines": {
- "node": ">=18"
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/esbuild/node_modules/@esbuild/openbsd-arm64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz",
- "integrity": "sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==",
- "cpu": [
- "arm64"
- ],
+ "node_modules/es-define-property": {
+ "version": "1.0.1",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "openbsd"
- ],
"engines": {
- "node": ">=18"
+ "node": ">= 0.4"
}
},
- "node_modules/esbuild/node_modules/@esbuild/openbsd-x64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz",
- "integrity": "sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==",
- "cpu": [
- "x64"
- ],
+ "node_modules/es-errors": {
+ "version": "1.3.0",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "openbsd"
- ],
"engines": {
- "node": ">=18"
+ "node": ">= 0.4"
}
},
- "node_modules/esbuild/node_modules/@esbuild/openharmony-arm64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz",
- "integrity": "sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==",
- "cpu": [
- "arm64"
- ],
+ "node_modules/es-module-lexer": {
+ "version": "1.7.0",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/es-object-atoms": {
+ "version": "1.1.1",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "openharmony"
- ],
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
"engines": {
- "node": ">=18"
+ "node": ">= 0.4"
}
},
- "node_modules/esbuild/node_modules/@esbuild/sunos-x64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz",
- "integrity": "sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==",
- "cpu": [
- "x64"
- ],
+ "node_modules/es-set-tostringtag": {
+ "version": "2.1.0",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "sunos"
- ],
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.6",
+ "has-tostringtag": "^1.0.2",
+ "hasown": "^2.0.2"
+ },
"engines": {
- "node": ">=18"
+ "node": ">= 0.4"
}
},
- "node_modules/esbuild/node_modules/@esbuild/win32-arm64": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz",
- "integrity": "sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==",
- "cpu": [
- "arm64"
- ],
+ "node_modules/es-to-primitive": {
+ "version": "1.3.0",
"dev": true,
"license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
+ "dependencies": {
+ "is-callable": "^1.2.7",
+ "is-date-object": "^1.0.5",
+ "is-symbol": "^1.0.4"
+ },
"engines": {
- "node": ">=18"
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/esbuild/node_modules/@esbuild/win32-ia32": {
+ "node_modules/esbuild": {
"version": "0.25.9",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz",
- "integrity": "sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==",
- "cpu": [
- "ia32"
- ],
"dev": true,
+ "hasInstallScript": true,
"license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ],
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
"engines": {
"node": ">=18"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.25.9",
+ "@esbuild/android-arm": "0.25.9",
+ "@esbuild/android-arm64": "0.25.9",
+ "@esbuild/android-x64": "0.25.9",
+ "@esbuild/darwin-arm64": "0.25.9",
+ "@esbuild/darwin-x64": "0.25.9",
+ "@esbuild/freebsd-arm64": "0.25.9",
+ "@esbuild/freebsd-x64": "0.25.9",
+ "@esbuild/linux-arm": "0.25.9",
+ "@esbuild/linux-arm64": "0.25.9",
+ "@esbuild/linux-ia32": "0.25.9",
+ "@esbuild/linux-loong64": "0.25.9",
+ "@esbuild/linux-mips64el": "0.25.9",
+ "@esbuild/linux-ppc64": "0.25.9",
+ "@esbuild/linux-riscv64": "0.25.9",
+ "@esbuild/linux-s390x": "0.25.9",
+ "@esbuild/linux-x64": "0.25.9",
+ "@esbuild/netbsd-arm64": "0.25.9",
+ "@esbuild/netbsd-x64": "0.25.9",
+ "@esbuild/openbsd-arm64": "0.25.9",
+ "@esbuild/openbsd-x64": "0.25.9",
+ "@esbuild/openharmony-arm64": "0.25.9",
+ "@esbuild/sunos-x64": "0.25.9",
+ "@esbuild/win32-arm64": "0.25.9",
+ "@esbuild/win32-ia32": "0.25.9",
+ "@esbuild/win32-x64": "0.25.9"
}
},
"node_modules/escalade": {
@@ -9782,21 +9162,6 @@
"fsevents": "~2.3.2"
}
},
- "node_modules/rollup/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/run-applescript": {
"version": "7.0.0",
"dev": true,
@@ -11554,21 +10919,6 @@
"fsevents": "~2.3.2"
}
},
- "node_modules/webpack-dev-server/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/webpack-dev-server/node_modules/readdirp": {
"version": "3.6.0",
"dev": true,
diff --git a/package.json b/package.json
index a4340bb..ce346b5 100644
--- a/package.json
+++ b/package.json
@@ -49,7 +49,7 @@
"@lingui/cli": "^5.4.1",
"@lingui/swc-plugin": "5.6.0",
"@pmmmwh/react-refresh-webpack-plugin": "0.6.1",
- "@swc/core": "1.13.3",
+ "@swc/core": "^1.13.3",
"@tauri-apps/cli": "^2.7.1",
"@types/color": "4.2.0",
"@types/extract-colors": "^1.1.4",
@@ -83,4 +83,4 @@
"webpack-merge": "6.0.1",
"workbox-webpack-plugin": "7.3.0"
}
-}
\ No newline at end of file
+}
diff --git a/src/components/CommonList/CommonList.tsx b/src/components/CommonList/CommonList.tsx
index add4bf8..834c202 100644
--- a/src/components/CommonList/CommonList.tsx
+++ b/src/components/CommonList/CommonList.tsx
@@ -7,7 +7,7 @@ import { shufflePlayQueue } from '../../utils'
import CommonMenu from './CommonMenu'
import { FileItem } from '../../types/file'
import CommonListItem from './CommonListItem'
-import { Box, Fab, List, useMediaQuery, useTheme } from '@mui/material'
+import { Box, CircularProgress, Fab, List, useMediaQuery, useTheme } from '@mui/material'
import { AutoSizer, List as VirtualList } from 'react-virtualized'
import CommonListItemCard from './CommonListItemCard'
import ShuffleRoundedIcon from '@mui/icons-material/ShuffleRounded'
@@ -35,6 +35,7 @@ const CommonList = (
func?: {
open?: (index: number) => void,
remove?: (indexArray: number[]) => void,
+ deltaListFetcher?:() => Promise,
},
}) => {
const { t } = useLingui()
@@ -51,9 +52,10 @@ const CommonList = (
const [dialogOpen, setDialogOpen] = useState(false)
const [selectIndex, setSelectIndex] = useState(null)
const [selectIndexArray, setSelectIndexArray] = useState([])
+ const [shuffleLoading, setShuffleLoading] = useState(false)
const isSelectMode = selectIndexArray.length > 0
- const shuffleDisplay = listData.filter(item => item.fileType === 'audio' || item.fileType === 'video').length > 0
+ const shuffleDisplay = true
const playAllDisplay = shuffleDisplay || listData.filter(item => item.fileType === 'folder' && /^(disc|disk)\s*\d+$/.test(item.fileName.toLocaleLowerCase())).length > 0
const addSelectIndex = (index: number) => { setSelectIndexArray([...selectIndexArray, index].sort()) }
@@ -76,9 +78,22 @@ const CommonList = (
}
// 点击随机播放全部
- const handleClickShuffleAll = () => {
- if (listData) {
- const list = listData
+ const handleClickShuffleAll = async () => {
+ setShuffleLoading(true)
+ let dataToUse = listData
+ if (func?.deltaListFetcher) {
+ try {
+ const deltaData = await func.deltaListFetcher()
+ if (deltaData && deltaData.length > 0) {
+ dataToUse = deltaData
+ }
+ } catch (error) {
+ console.error('Error fetching delta data:', error)
+ }
+ }
+
+ if (dataToUse) {
+ const list = dataToUse
.filter((item) => item.fileType === 'audio' || item.fileType === 'video')
.map((item, index) => { return { index, ...item } })
if (!shuffle)
@@ -88,6 +103,7 @@ const CommonList = (
updateCurrentIndex(shuffleList[0].index)
updateAutoPlay(true)
}
+ setShuffleLoading(false)
}
const openMenu = (event: React.MouseEvent) => {
@@ -373,8 +389,16 @@ const CommonList = (
<>
{
shuffleDisplay &&
-
-
+
+ {shuffleLoading ? (
+
+ ) : (
+
+ )}
}
{
diff --git a/src/components/CommonList/ShuffleAll.tsx b/src/components/CommonList/ShuffleAll.tsx
index c24c890..a1faec6 100644
--- a/src/components/CommonList/ShuffleAll.tsx
+++ b/src/components/CommonList/ShuffleAll.tsx
@@ -1,8 +1,8 @@
-import { ListItem, ListItemButton, ListItemIcon, ListItemText } from '@mui/material'
+import { CircularProgress, ListItem, ListItemButton, ListItemIcon, ListItemText } from '@mui/material'
import ShuffleRoundedIcon from '@mui/icons-material/ShuffleRounded'
import { useLingui } from '@lingui/react/macro'
-const ShuffleAll = ({ handleClickShuffleAll }: { handleClickShuffleAll: () => void }) => {
+const ShuffleAll = ({ handleClickShuffleAll, loading = false }: { handleClickShuffleAll: () => void, loading?: boolean }) => {
const { t } = useLingui()
return (
@@ -18,9 +18,13 @@ const ShuffleAll = ({ handleClickShuffleAll }: { handleClickShuffleAll: () => vo
},
}}
>
-
+
-
+ {loading ? (
+
+ ) : (
+
+ )}
diff --git a/src/graph/graph.ts b/src/graph/graph.ts
index 23e5477..afe4629 100644
--- a/src/graph/graph.ts
+++ b/src/graph/graph.ts
@@ -112,4 +112,22 @@ export const search = async (path: string, searchQuery: string, accessToken: str
return fetch(`${graphConfig.graphMeEndpoint}/me/drive/root:/${encodeURIComponent(path)}:/search(q='${searchQuery}')`, options)
.then(response => response.json())
.catch(error => console.log(error))
+}
+
+export const getDelta = async (path: string, accessToken: string, nextLink?: string) => {
+ const headers = new Headers()
+ const bearer = `Bearer ${accessToken}`
+
+ headers.append('Authorization', bearer)
+
+ const options = {
+ method: 'GET',
+ headers: headers
+ }
+
+ const param = '?$top=2147483647&$select=name, parentReference, size, folder, lastModifiedDateTime, id, @microsoft.graph.downloadUrl'
+
+ return fetch(nextLink || `${graphConfig.graphMeEndpoint}/me/drive/root:/${encodeURIComponent(path)}:/delta${param}`, options)
+ .then(response => response.json())
+ .catch(error => console.log(error))
}
\ No newline at end of file
diff --git a/src/hooks/graph/useFilesData.ts b/src/hooks/graph/useFilesData.ts
index b4690ea..082439f 100644
--- a/src/hooks/graph/useFilesData.ts
+++ b/src/hooks/graph/useFilesData.ts
@@ -1,10 +1,13 @@
-import { getAppRootFiles, getFile, getFiles, search, uploadAppRootJson } from '@/graph/graph'
+import { getAppRootFiles, getFile, getFiles, search, uploadAppRootJson, getDelta } from '@/graph/graph'
import { loginRequest } from '@/graph/authConfig'
import { useMsal } from '@azure/msal-react'
import { AccountInfo } from '@azure/msal-browser'
+import useLocalDeltaDataStore, { deltaDataCache } from '@/store/useLocalDeltaDataStore'
+import { RemoteItem } from '@/types/file'
const useFilesData = () => {
const { instance } = useMsal()
+ const { setLocalDeltaData, getLocalDeltaData } = useLocalDeltaDataStore()
/**
* 获取文件夹数据
@@ -51,12 +54,52 @@ const useFilesData = () => {
return response.value
}
+ const getRemoteDeltaData = async (account: AccountInfo, path: string, url?: string) => {
+ await instance.initialize()
+ const acquireToken = await instance.acquireTokenSilent({ ...loginRequest, account: account })
+ let response = await getDelta(path, acquireToken.accessToken, url)
+ const result:RemoteItem[] = response.value
+ while (response['@odata.nextLink']) {
+ const nextResponse = await getDelta(path, acquireToken.accessToken, response['@odata.nextLink'])
+ result.push(...nextResponse.value)
+ response = nextResponse
+ }
+ const deltaData: deltaDataCache = {items: result, url: response['@odata.deltaLink']}
+ return deltaData
+ }
+
+ const getDeltaData = async(account: AccountInfo, path: string) => {
+ const localData = await getLocalDeltaData(path)
+ if (localData && localData.url) {
+ try {
+ const response = await getRemoteDeltaData(account, path, localData.url)
+ const result = localData.items
+ response.items.forEach((item: RemoteItem) => {
+ const index = result.findIndex(i => i.id === item.id)
+ if (item.deleted) {
+ if (index !== -1) result.splice(index, 1)
+ } else {
+ if (index === -1) result.push(item)
+ }
+ })
+ setLocalDeltaData(path, {items: result, url: response.url})
+ return result
+ } catch (error) {
+ console.error('Get delta data error:', error)
+ }
+ }
+ const response = await getRemoteDeltaData(account, path)
+ setLocalDeltaData(path, response)
+ return response.items
+ }
+
return {
getFilesData,
getFileData,
getAppRootFilesData,
uploadAppRootJsonData,
getSearchData,
+ getDeltaData,
}
}
diff --git a/src/locales/en/messages.po b/src/locales/en/messages.po
index addfc63..c74036f 100644
--- a/src/locales/en/messages.po
+++ b/src/locales/en/messages.po
@@ -13,15 +13,15 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
-#: src/pages/Setting.tsx:162
+#: src/pages/Setting.tsx:174
msgid "About"
msgstr "About"
-#: src/pages/Setting.tsx:96
+#: src/pages/Setting.tsx:98
msgid "Account"
msgstr "Account"
-#: src/pages/Setting.tsx:226
+#: src/pages/Setting.tsx:238
msgid "Add account"
msgstr "Add account"
@@ -46,11 +46,11 @@ msgstr "Add to playlist"
msgid "Ascending"
msgstr "Ascending"
-#: src/pages/Setting.tsx:138
+#: src/pages/Setting.tsx:150
msgid "Auto"
msgstr "Auto"
-#: src/pages/Setting.tsx:177
+#: src/pages/Setting.tsx:189
msgid "Build time"
msgstr "Build time"
@@ -58,7 +58,7 @@ msgstr "Build time"
#: src/pages/Player/PlayerMenu.tsx:364
#: src/pages/Playlist/Playlist.tsx:219
#: src/pages/Playlist/Playlist.tsx:242
-#: src/pages/Setting.tsx:231
+#: src/pages/Setting.tsx:243
msgid "Cancel"
msgstr "Cancel"
@@ -70,7 +70,8 @@ msgstr "Cancel select"
msgid "Classic"
msgstr "Classic"
-#: src/pages/Setting.tsx:119
+#: src/pages/Setting.tsx:121
+#: src/pages/Setting.tsx:131
msgid "Clear"
msgstr "Clear"
@@ -80,11 +81,11 @@ msgstr "Clear"
msgid "Close"
msgstr "Close"
-#: src/pages/Setting.tsx:145
+#: src/pages/Setting.tsx:157
msgid "Color mode"
msgstr "Color mode"
-#: src/pages/Search.tsx:187
+#: src/pages/Search.tsx:183
#~ msgid "Current"
#~ msgstr "Current"
@@ -92,15 +93,15 @@ msgstr "Color mode"
msgid "Currently using a development version, please be careful with your data!"
msgstr "Currently using a development version, please be careful with your data!"
-#: src/pages/Setting.tsx:128
+#: src/pages/Setting.tsx:140
msgid "Customize"
msgstr "Customize"
-#: src/pages/Setting.tsx:140
+#: src/pages/Setting.tsx:152
msgid "Dark"
msgstr "Dark"
-#: src/pages/Setting.tsx:115
+#: src/pages/Setting.tsx:117
msgid "Data"
msgstr "Data"
@@ -129,7 +130,7 @@ msgstr "Folders first"
msgid "Fullscreen"
msgstr "Fullscreen"
-#: src/pages/Search.tsx:186
+#: src/pages/Search.tsx:182
#~ msgid "Global"
#~ msgstr "Global"
@@ -149,7 +150,7 @@ msgstr "History"
msgid "Last modified"
msgstr "Last modified"
-#: src/pages/Setting.tsx:139
+#: src/pages/Setting.tsx:151
msgid "Light"
msgstr "Light"
@@ -157,7 +158,11 @@ msgstr "Light"
msgid "List"
msgstr "List"
-#: src/pages/Setting.tsx:123
+#: src/pages/Setting.tsx:135
+msgid "Local file index cache"
+msgstr "Local file index cache"
+
+#: src/pages/Setting.tsx:125
msgid "Local metaData cache"
msgstr "Local metaData cache"
@@ -165,7 +170,7 @@ msgstr "Local metaData cache"
msgid "Lyrics"
msgstr "Lyrics"
-#: src/pages/Setting.tsx:99
+#: src/pages/Setting.tsx:101
msgid "Manage"
msgstr "Manage"
@@ -216,11 +221,11 @@ msgstr "OK"
msgid "Open in folder"
msgstr "Open in folder"
-#: src/pages/Setting.tsx:183
+#: src/pages/Setting.tsx:195
msgid "Open source dependencies"
msgstr "Open source dependencies"
-#: src/components/CommonList/CommonList.tsx:384
+#: src/components/CommonList/CommonList.tsx:408
msgid "Play all"
msgstr "Play all"
@@ -236,7 +241,7 @@ msgid "Playback rate"
msgstr "Playback rate"
#: src/pages/LogIn.tsx:26
-#: src/pages/Setting.tsx:108
+#: src/pages/Setting.tsx:110
msgid "Please use Microsoft account authorization to log in"
msgstr "Please use Microsoft account authorization to log in"
@@ -264,7 +269,7 @@ msgstr "Search"
msgid "Select"
msgstr "Select"
-#: src/pages/Setting.tsx:197
+#: src/pages/Setting.tsx:209
msgid "Select account"
msgstr "Select account"
@@ -276,7 +281,7 @@ msgstr "Select all"
msgid "Setting"
msgstr "Setting"
-#: src/components/CommonList/ShuffleAll.tsx:25
+#: src/components/CommonList/ShuffleAll.tsx:29
msgid "Shuffle all"
msgstr "Shuffle all"
@@ -284,7 +289,7 @@ msgstr "Shuffle all"
msgid "Sign in"
msgstr "登录"
-#: src/pages/Setting.tsx:205
+#: src/pages/Setting.tsx:217
msgid "Sign out"
msgstr "Sign out"
@@ -305,10 +310,10 @@ msgstr "Switch theme"
msgid "The playlist will be deleted"
msgstr "The playlist will be deleted"
-#: src/pages/Setting.tsx:157
+#: src/pages/Setting.tsx:169
msgid "Use album cover theme color"
msgstr "Use album cover theme color"
-#: src/pages/Setting.tsx:171
+#: src/pages/Setting.tsx:183
msgid "Version"
msgstr "Version"
diff --git a/src/locales/zh-CN/messages.po b/src/locales/zh-CN/messages.po
index 143216a..02137ea 100644
--- a/src/locales/zh-CN/messages.po
+++ b/src/locales/zh-CN/messages.po
@@ -13,15 +13,15 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"
-#: src/pages/Setting.tsx:162
+#: src/pages/Setting.tsx:174
msgid "About"
msgstr "关于"
-#: src/pages/Setting.tsx:96
+#: src/pages/Setting.tsx:98
msgid "Account"
msgstr "账户"
-#: src/pages/Setting.tsx:226
+#: src/pages/Setting.tsx:238
msgid "Add account"
msgstr "添加账户"
@@ -46,11 +46,11 @@ msgstr "添加到播放列表"
msgid "Ascending"
msgstr "正序"
-#: src/pages/Setting.tsx:138
+#: src/pages/Setting.tsx:150
msgid "Auto"
msgstr "自动"
-#: src/pages/Setting.tsx:177
+#: src/pages/Setting.tsx:189
msgid "Build time"
msgstr "编译日期"
@@ -58,7 +58,7 @@ msgstr "编译日期"
#: src/pages/Player/PlayerMenu.tsx:364
#: src/pages/Playlist/Playlist.tsx:219
#: src/pages/Playlist/Playlist.tsx:242
-#: src/pages/Setting.tsx:231
+#: src/pages/Setting.tsx:243
msgid "Cancel"
msgstr "取消"
@@ -70,7 +70,8 @@ msgstr "取消选择"
msgid "Classic"
msgstr "经典"
-#: src/pages/Setting.tsx:119
+#: src/pages/Setting.tsx:121
+#: src/pages/Setting.tsx:131
msgid "Clear"
msgstr "清除"
@@ -80,11 +81,11 @@ msgstr "清除"
msgid "Close"
msgstr "关闭"
-#: src/pages/Setting.tsx:145
+#: src/pages/Setting.tsx:157
msgid "Color mode"
msgstr "颜色模式"
-#: src/pages/Search.tsx:187
+#: src/pages/Search.tsx:183
#~ msgid "Current"
#~ msgstr "当前"
@@ -92,15 +93,15 @@ msgstr "颜色模式"
msgid "Currently using a development version, please be careful with your data!"
msgstr "当前正在使用开发版本,请注意数据安全!"
-#: src/pages/Setting.tsx:128
+#: src/pages/Setting.tsx:140
msgid "Customize"
msgstr "定制"
-#: src/pages/Setting.tsx:140
+#: src/pages/Setting.tsx:152
msgid "Dark"
msgstr "深色"
-#: src/pages/Setting.tsx:115
+#: src/pages/Setting.tsx:117
msgid "Data"
msgstr "数据"
@@ -129,7 +130,7 @@ msgstr "文件夹优先"
msgid "Fullscreen"
msgstr "全屏"
-#: src/pages/Search.tsx:186
+#: src/pages/Search.tsx:182
#~ msgid "Global"
#~ msgstr "全局"
@@ -149,7 +150,7 @@ msgstr "历史"
msgid "Last modified"
msgstr "最后修改"
-#: src/pages/Setting.tsx:139
+#: src/pages/Setting.tsx:151
msgid "Light"
msgstr "浅色"
@@ -157,7 +158,11 @@ msgstr "浅色"
msgid "List"
msgstr "列表"
-#: src/pages/Setting.tsx:123
+#: src/pages/Setting.tsx:135
+msgid "Local file index cache"
+msgstr "本地文件索引缓存"
+
+#: src/pages/Setting.tsx:125
msgid "Local metaData cache"
msgstr "本地元数据缓存"
@@ -165,7 +170,7 @@ msgstr "本地元数据缓存"
msgid "Lyrics"
msgstr "歌词"
-#: src/pages/Setting.tsx:99
+#: src/pages/Setting.tsx:101
msgid "Manage"
msgstr "管理"
@@ -216,11 +221,11 @@ msgstr "确定"
msgid "Open in folder"
msgstr "打开所在文件夹"
-#: src/pages/Setting.tsx:183
+#: src/pages/Setting.tsx:195
msgid "Open source dependencies"
msgstr "开源库"
-#: src/components/CommonList/CommonList.tsx:384
+#: src/components/CommonList/CommonList.tsx:408
msgid "Play all"
msgstr "全部播放"
@@ -236,7 +241,7 @@ msgid "Playback rate"
msgstr "播放速度"
#: src/pages/LogIn.tsx:26
-#: src/pages/Setting.tsx:108
+#: src/pages/Setting.tsx:110
msgid "Please use Microsoft account authorization to log in"
msgstr "请使用微软账户授权登录"
@@ -264,7 +269,7 @@ msgstr "搜索"
msgid "Select"
msgstr "选择"
-#: src/pages/Setting.tsx:197
+#: src/pages/Setting.tsx:209
msgid "Select account"
msgstr "选择账户"
@@ -276,7 +281,7 @@ msgstr "全选"
msgid "Setting"
msgstr "设置"
-#: src/components/CommonList/ShuffleAll.tsx:25
+#: src/components/CommonList/ShuffleAll.tsx:29
msgid "Shuffle all"
msgstr "全部随机播放"
@@ -284,7 +289,7 @@ msgstr "全部随机播放"
msgid "Sign in"
msgstr "登录"
-#: src/pages/Setting.tsx:205
+#: src/pages/Setting.tsx:217
msgid "Sign out"
msgstr "注销"
@@ -305,10 +310,10 @@ msgstr "切换主题"
msgid "The playlist will be deleted"
msgstr "播放列表将会被删除"
-#: src/pages/Setting.tsx:157
+#: src/pages/Setting.tsx:169
msgid "Use album cover theme color"
msgstr "使用专辑封面主题色"
-#: src/pages/Setting.tsx:171
+#: src/pages/Setting.tsx:183
msgid "Version"
msgstr "版本号"
diff --git a/src/pages/Files/Files.tsx b/src/pages/Files/Files.tsx
index b08c08a..121fe51 100644
--- a/src/pages/Files/Files.tsx
+++ b/src/pages/Files/Files.tsx
@@ -57,7 +57,7 @@ const Files = () => {
const updateAutoPlay = usePlayerStore(state => state.updateAutoPlay)
- const { getFilesData } = useFilesData()
+ const { getFilesData, getDeltaData } = useFilesData()
const navigate = useNavigate()
const { account } = useUser()
@@ -69,6 +69,42 @@ const Files = () => {
return remoteItemToFile(res)
}
+ const deltaListFetcher = async () => {
+ const res: RemoteItem[] = await getDeltaData(account, path)
+ const deltaListData = remoteItemToFile(res)
+ const filteredDeltaList = deltaListData.filter((item) => mediaOnly ? item.fileType !== 'other' : true)
+ const sortedDeltaList = filteredDeltaList.sort((a, b) => {
+ if (foldersFirst) {
+ if (a.fileType === 'folder' && b.fileType !== 'folder') {
+ return -1
+ } else if (a.fileType !== 'folder' && b.fileType === 'folder') {
+ return 1
+ }
+ }
+
+ if (sortBy === 'name') {
+ if (orderBy === 'asc') {
+ return (a.fileName).localeCompare(b.fileName)
+ } else {
+ return (b.fileName).localeCompare(a.fileName)
+ }
+ } else if (sortBy === 'size') {
+ if (orderBy === 'asc') {
+ return a.fileSize - b.fileSize
+ } else {
+ return b.fileSize - a.fileSize
+ }
+ } else if (sortBy === 'datetime' && a.lastModifiedDateTime && b.lastModifiedDateTime) {
+ if (orderBy === 'asc') {
+ return new Date(a.lastModifiedDateTime).getTime() - new Date(b.lastModifiedDateTime).getTime()
+ } else {
+ return new Date(b.lastModifiedDateTime).getTime() - new Date(a.lastModifiedDateTime).getTime()
+ }
+ } else return 0
+ })
+ return sortedDeltaList
+ }
+
const { data: fileListData, error: fileListError, isLoading: fileListIsLoading } =
useSWR(
`${account.username}/${path}`,
@@ -210,7 +246,7 @@ const Files = () => {
listData={sortedFileList}
listType='files'
scrollIndex={scrollIndex}
- func={{ open }}
+ func={{ open, deltaListFetcher }}
/>
}
diff --git a/src/pages/Setting.tsx b/src/pages/Setting.tsx
index c1eaa43..f443e44 100644
--- a/src/pages/Setting.tsx
+++ b/src/pages/Setting.tsx
@@ -2,6 +2,7 @@ import { Avatar, Button, Checkbox, Dialog, DialogActions, DialogTitle, Divider,
import useUser from '../hooks/graph/useUser'
import { licenses } from '../data/licenses'
import useLocalMetaDataStore from '../store/useLocalMetaDataStore'
+import useLocalDeltaDataStore from '../store/useLocalDeltaDataStore'
import useUiStore from '@/store/useUiStore'
import { UiStatus } from '@/types/ui'
import { useState } from 'react'
@@ -31,6 +32,7 @@ const Setting = () => {
const { accounts, account, login, logout } = useUser()
const { clearLocalMetaData } = useLocalMetaDataStore()
+ const { clearLocalDeltaData } = useLocalDeltaDataStore()
const [
currentAccount,
@@ -122,6 +124,16 @@ const Setting = () => {
>
+
+ clearLocalDeltaData()}>
+ {t`Clear`}
+
+ }
+ >
+
+
diff --git a/src/store/useLocalDeltaDataStore.ts b/src/store/useLocalDeltaDataStore.ts
new file mode 100644
index 0000000..3e740c2
--- /dev/null
+++ b/src/store/useLocalDeltaDataStore.ts
@@ -0,0 +1,41 @@
+import { get, getMany, set, clear, entries, createStore } from 'idb-keyval'
+import { RemoteItem } from '../types/file'
+
+export interface deltaDataCache {
+ items: RemoteItem[];
+ url?: string; // @odata.deltaLink
+}
+
+const useLocalDeltaDataStore = () => {
+
+ const deltaDataStore = createStore('deltadata', 'deltadata-store')
+
+ const getLocalDeltaData = async (filePath: string) => {
+ if (!filePath || filePath.length === 0) return null
+ else {
+ const deltaData = await get(filePath, deltaDataStore)
+ return deltaData ? JSON.parse(deltaData) as deltaDataCache : null
+ }
+ }
+
+ const getManyLocalDeltaData = async (filePaths: string[]) => {
+ if (!filePaths || filePaths.length === 0) return null
+ else {
+ const deltaData = await getMany(filePaths, deltaDataStore)
+ return deltaData.map(deltaData => deltaData ? JSON.parse(deltaData) as deltaDataCache : null)
+ }
+ }
+
+ const setLocalDeltaData = async (path: string, deltaData: deltaDataCache) => {
+ await set(path, JSON.stringify(deltaData), deltaDataStore)
+ }
+
+ const getAllLocalDeltaData = async () => await entries(deltaDataStore)
+
+ const clearLocalDeltaData = async () => await clear(deltaDataStore)
+
+ return { getLocalDeltaData, getManyLocalDeltaData, setLocalDeltaData, getAllLocalDeltaData, clearLocalDeltaData }
+
+}
+
+export default useLocalDeltaDataStore
\ No newline at end of file
diff --git a/src/types/file.ts b/src/types/file.ts
index c488514..40c0487 100644
--- a/src/types/file.ts
+++ b/src/types/file.ts
@@ -9,7 +9,8 @@ export interface RemoteItem {
parentReference: {
name: string,
path: string,
- }
+ },
+ deleted?: object
}
export interface FileItem {