diff --git a/platforms/pictique/package.json b/platforms/pictique/package.json index 48a2f1d5c..3b0d487dc 100644 --- a/platforms/pictique/package.json +++ b/platforms/pictique/package.json @@ -50,9 +50,7 @@ "vite": "^6.2.6" }, "dependencies": { - "-": "^0.0.1", "@sveltejs/adapter-node": "^5.2.12", - "D": "^1.0.0", "axios": "^1.6.7", "moment": "^2.30.1", "svelte-qrcode": "^1.0.1", diff --git a/platforms/pictique/src/lib/fragments/Drawer/Drawer.svelte b/platforms/pictique/src/lib/fragments/Drawer/Drawer.svelte index e01b1ad40..c31d82e97 100644 --- a/platforms/pictique/src/lib/fragments/Drawer/Drawer.svelte +++ b/platforms/pictique/src/lib/fragments/Drawer/Drawer.svelte @@ -3,8 +3,7 @@ import { CupertinoPane } from 'cupertino-pane'; import type { HTMLAttributes } from 'svelte/elements'; import { cn } from '$lib/utils'; - import { swipe } from 'svelte-gestures'; - import type { SwipeCustomEvent } from 'svelte-gestures'; + import { useSwipe, type GestureCustomEvent, type SwipeCustomEvent } from 'svelte-gestures'; interface IDrawerProps extends HTMLAttributes { drawer?: CupertinoPane; @@ -19,11 +18,9 @@ if (drawer) drawer.destroy({ animate: true }); } - const handleDrawerSwipe = (event: SwipeCustomEvent) => { - if (event.detail.direction === ('down' as string)) { - drawer?.destroy({ animate: true }); - } - }; + function downSwipeHandler() { + drawer?.destroy({ animate: true }); + } onMount(() => { if (!drawerElement) return; @@ -48,11 +45,16 @@
({ - timeframe: 300, - minSwipeDistance: 60 - })} - onswipe={handleDrawerSwipe} + {...useSwipe( + () => {}, + () => ({ + timeframe: 300, + minSwipeDistance: 60 + }), + { + onswipedown: downSwipeHandler + } + )} class={cn(restProps.class)} >
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eb767fb36..b5c5e05c2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2020,15 +2020,9 @@ importers: platforms/pictique: dependencies: - '-': - specifier: ^0.0.1 - version: 0.0.1 '@sveltejs/adapter-node': specifier: ^5.2.12 version: 5.3.3(@sveltejs/kit@2.46.5(@opentelemetry/api@1.9.0)(@sveltejs/vite-plugin-svelte@5.1.1(svelte@5.39.11)(vite@6.3.6(@types/node@24.7.2)(jiti@2.6.1)(lightningcss@1.30.1)(sass@1.93.2)(tsx@4.20.6)(yaml@2.8.1)))(svelte@5.39.11)(vite@6.3.6(@types/node@24.7.2)(jiti@2.6.1)(lightningcss@1.30.1)(sass@1.93.2)(tsx@4.20.6)(yaml@2.8.1))) - D: - specifier: ^1.0.0 - version: 1.0.0 axios: specifier: ^1.6.7 version: 1.12.2 @@ -2275,9 +2269,6 @@ importers: packages: - '-@0.0.1': - resolution: {integrity: sha512-3HfneK3DGAm05fpyj20sT3apkNcvPpCuccOThOPdzz8sY7GgQGe0l93XH9bt+YzibcTIgUAIMoyVJI740RtgyQ==} - '@adobe/css-tools@4.4.4': resolution: {integrity: sha512-Elp+iwUx5rN5+Y8xLt5/GRoG20WGoDCQ/1Fb+1LiGtvwbDavuSk0jhD/eZdckHAuzcDzccnkv+rEjyWfRx18gg==} @@ -7175,10 +7166,6 @@ packages: '@yr/monotone-cubic-spline@1.0.3': resolution: {integrity: sha512-FQXkOta0XBSUPHndIKON2Y9JeQz5ZeMqLYZVVK93FliNBFm7LNMIZmY6FrMEB9XPcDbE2bekMbZD6kzDkxwYjA==} - D@1.0.0: - resolution: {integrity: sha512-nQvrCBu7K2pSSEtIM0EEF03FVjcczCXInMt3moLNFbjlWx6bZrX72uT6/1uAXDbnzGUAx9gTyDiQ+vrFi663oA==} - deprecated: Package no longer supported. Contact support@npmjs.com for more info. - abab@2.0.6: resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} deprecated: Use your platform's native atob() and btoa() methods instead @@ -14350,8 +14337,6 @@ packages: snapshots: - '-@0.0.1': {} - '@adobe/css-tools@4.4.4': {} '@alloc/quick-lru@5.2.0': {} @@ -20639,8 +20624,6 @@ snapshots: '@yr/monotone-cubic-spline@1.0.3': {} - D@1.0.0: {} - abab@2.0.6: {} abbrev@1.1.1: