feat(mobile): swipe to open menu for explorer (#8953)

close AF-1803

- bump theme
- extract `SwipeHelper` and add `speed`, `direction` detection support
- new mobile `SwipeMenu` component
- integrate `SwipeMenu` to open a menu in Explorer
- New `Haptics` module for mobile, implemented in `ios` and `mobile`(`navigator.vibrate()`)

![CleanShot 2024-11-28 at 12.25.14.gif](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/cba36660-f38a-473b-b85c-33540a406835.gif)
This commit is contained in:
CatsJuice
2024-12-02 03:27:01 +00:00
parent b600f2b0a2
commit 11b453f4d8
23 changed files with 457 additions and 45 deletions

View File

@@ -343,7 +343,7 @@ __metadata:
"@storybook/react": "npm:^8.2.9"
"@storybook/react-vite": "npm:^8.2.9"
"@testing-library/react": "npm:^16.0.0"
"@toeverything/theme": "npm:^1.0.18"
"@toeverything/theme": "npm:^1.0.21"
"@types/react": "npm:^18.2.75"
"@types/react-dom": "npm:^18.2.24"
"@vanilla-extract/css": "npm:^1.14.2"
@@ -422,7 +422,7 @@ __metadata:
"@sentry/react": "npm:^8.0.0"
"@testing-library/react": "npm:^16.0.0"
"@toeverything/pdf-viewer": "npm:^0.1.1"
"@toeverything/theme": "npm:^1.0.18"
"@toeverything/theme": "npm:^1.0.21"
"@types/animejs": "npm:^3.1.12"
"@types/bytes": "npm:^3.1.4"
"@types/image-blob-reduce": "npm:^4.1.4"
@@ -618,6 +618,7 @@ __metadata:
"@capacitor/browser": "npm:^6.0.3"
"@capacitor/cli": "npm:^6.1.2"
"@capacitor/core": "npm:^6.1.2"
"@capacitor/haptics": "npm:^6.0.2"
"@capacitor/ios": "npm:^6.1.2"
"@capacitor/keyboard": "npm:^6.0.2"
"@sentry/react": "npm:^8.0.0"
@@ -3006,6 +3007,15 @@ __metadata:
languageName: node
linkType: hard
"@capacitor/haptics@npm:^6.0.2":
version: 6.0.2
resolution: "@capacitor/haptics@npm:6.0.2"
peerDependencies:
"@capacitor/core": ^6.0.0
checksum: 10/986003d8327d914762f5c0a4f4b6e494654fa0c27344c2a1764f06d08895bce035d8105c0f2a571b8b8bd3bd2f72b08bdc2ad4e1167aa186632a7a16bb6118a2
languageName: node
linkType: hard
"@capacitor/ios@npm:^6.1.2":
version: 6.2.0
resolution: "@capacitor/ios@npm:6.2.0"
@@ -12998,7 +13008,7 @@ __metadata:
languageName: node
linkType: hard
"@toeverything/theme@npm:^1.0.18, @toeverything/theme@npm:^1.0.19":
"@toeverything/theme@npm:^1.0.19, @toeverything/theme@npm:^1.0.21":
version: 1.0.21
resolution: "@toeverything/theme@npm:1.0.21"
checksum: 10/31b741d940b77716825abf7b1a4e64372add4ee4b61439fa59920403c5c615ef72f566857900663d2e5250e09a2e7eae031b0465b98d198b83fc754bac4a8c41