perf: switch to smaller focus trap lib
This commit is contained in:
6 files changed
+10
-3717
No files matched your search
@@ -34,10 +34,10 @@
|
||||
"svelte-adapter-bun-next": "^1.0.3",
|
||||
"svelte-check": "^4.3.1",
|
||||
"svelte-floating-ui": "^1.6.2",
|
||||
"svelte-focus-trap": "^1.2.0",
|
||||
"svelte-infinite-scroll": "^2.0.1",
|
||||
"sveltekit-i18n": "^2.4.2",
|
||||
"tailwindcss": "^4.1.13",
|
||||
"trap-focus-svelte": "^1.1.0",
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.9.2",
|
||||
"typescript-eslint": "^8.44.0",
|
||||
@@ -46,9 +46,6 @@
|
||||
},
|
||||
},
|
||||
},
|
||||
"overrides": {
|
||||
"svelte": "^5.37.3",
|
||||
},
|
||||
"packages": {
|
||||
"@dicebear/converter": ["@dicebear/converter@8.0.2", "", { "dependencies": { "@types/json-schema": "^7.0.11", "tmp-promise": "^3.0.3" }, "peerDependencies": { "@resvg/resvg-js": "^2.4.1", "exiftool-vendored": "^23.0.0", "sharp": "^0.32.6" }, "optionalPeers": ["@resvg/resvg-js", "exiftool-vendored", "sharp"] }, "sha512-mREmyQLIfHnt30Xzjc9ZHgDgIzbF7BXApBCYolnB2kO2Kpb14OdmsyLRsYe/Tt+Vt6sLgiigWoZFcRvbStRhLA=="],
|
||||
|
||||
@@ -582,8 +579,6 @@
|
||||
|
||||
"minizlib": ["minizlib@3.1.0", "", { "dependencies": { "minipass": "^7.1.2" } }, "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw=="],
|
||||
|
||||
"mousetrap": ["mousetrap@1.6.5", "", {}, "sha512-QNo4kEepaIBwiT8CDhP98umTetp+JNfQYBWvC1pc6/OAibuXtRcxZ58Qz8skvEHYvURne/7R8T5VoOI7rDsEUA=="],
|
||||
|
||||
"mri": ["mri@1.2.0", "", {}, "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA=="],
|
||||
|
||||
"mrmime": ["mrmime@2.0.1", "", {}, "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ=="],
|
||||
@@ -696,8 +691,6 @@
|
||||
|
||||
"svelte-floating-ui": ["svelte-floating-ui@1.6.2", "", { "dependencies": { "@floating-ui/dom": "^1.6.13" } }, "sha512-EC+DZtBey50P6l3NSzNQWon3cip8a1bzwdpmCdc45kymqEWL4BKhPemAq7SQ9QLebDPaMECW6YodxFbs2d+O/w=="],
|
||||
|
||||
"svelte-focus-trap": ["svelte-focus-trap@1.2.0", "", { "dependencies": { "mousetrap": "^1.6.5" } }, "sha512-/hIUHgKcFlewsQreq8v7DYNBkQe7rR0c94PNBOCsmeUwoIYAy6iXJ1pH0k3rWpjwZHKtUxeXbX1iRFlFhipbeg=="],
|
||||
|
||||
"svelte-infinite-scroll": ["svelte-infinite-scroll@2.0.1", "", {}, "sha512-goTHCfOHRDCs8C5MeSuIc6LlAQ8zVQ+M4Y3LyvrDjx5rqSSxSrdCuQwIyWYNcO6j6/mnqRro3QB64ClBzfn+Wg=="],
|
||||
|
||||
"sveltekit-i18n": ["sveltekit-i18n@2.4.2", "", { "dependencies": { "@sveltekit-i18n/base": "~1.3.0", "@sveltekit-i18n/parser-default": "~1.1.0" }, "peerDependencies": { "svelte": ">=3.49.0" } }, "sha512-hjRWn4V4DBL8JQKJoJa3MRvn6d32Zo+rWkoSP5bsQ/XIAguPdQUZJ8LMe6Nc1rST8WEVdu9+vZI3aFdKYGR3+Q=="],
|
||||
@@ -724,6 +717,8 @@
|
||||
|
||||
"tr46": ["tr46@4.1.1", "", { "dependencies": { "punycode": "^2.3.0" } }, "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw=="],
|
||||
|
||||
"trap-focus-svelte": ["trap-focus-svelte@1.1.0", "", {}, "sha512-EZW66cASC5lTMH5v3AA8BtN3lzBNnRJDGlyIkRptsmjYgSD2OdsiZ8OOWROrhbfvmx6P4c382ZD39cv5JkCxww=="],
|
||||
|
||||
"ts-api-utils": ["ts-api-utils@2.1.0", "", { "peerDependencies": { "typescript": ">=4.8.4" } }, "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ=="],
|
||||
|
||||
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
Generated
-3702
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -33,10 +33,10 @@
|
||||
"svelte-adapter-bun-next": "^1.0.3",
|
||||
"svelte-check": "^4.3.1",
|
||||
"svelte-floating-ui": "^1.6.2",
|
||||
"svelte-focus-trap": "^1.2.0",
|
||||
"svelte-infinite-scroll": "^2.0.1",
|
||||
"sveltekit-i18n": "^2.4.2",
|
||||
"tailwindcss": "^4.1.13",
|
||||
"trap-focus-svelte": "^1.1.0",
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.9.2",
|
||||
"typescript-eslint": "^8.44.0",
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
import { page } from '$app/state'
|
||||
import { t } from '$lib/i18n/translations'
|
||||
import { Button, Material, toast } from 'mono-svelte'
|
||||
import { focusTrap } from 'svelte-focus-trap'
|
||||
import { Share, XMark } from 'svelte-hero-icons'
|
||||
import { expoOut } from 'svelte/easing'
|
||||
import { fade, scale } from 'svelte/transition'
|
||||
import { trapFocus } from 'trap-focus-svelte'
|
||||
|
||||
interface Props {
|
||||
/**
|
||||
@@ -37,7 +37,7 @@
|
||||
onkeydown={(e) => {
|
||||
if (e.key == 'Escape') history.back()
|
||||
}}
|
||||
use:focusTrap
|
||||
use:trapFocus
|
||||
>
|
||||
<img
|
||||
width={800}
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
import { pushState, replaceState } from '$app/navigation'
|
||||
import { page } from '$app/state'
|
||||
import type { Snippet } from 'svelte'
|
||||
import { focusTrap } from 'svelte-focus-trap'
|
||||
import { XMark } from 'svelte-hero-icons'
|
||||
import { backOut } from 'svelte/easing'
|
||||
import type { ClassValue } from 'svelte/elements'
|
||||
import { fade, scale } from 'svelte/transition'
|
||||
import { trapFocus } from 'trap-focus-svelte'
|
||||
import { Button } from '../index.js'
|
||||
import Portal from '../popover/Portal.svelte'
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
>
|
||||
<div
|
||||
bind:this={el}
|
||||
use:focusTrap
|
||||
use:trapFocus
|
||||
transition:scale|global={{
|
||||
start: 0.97,
|
||||
easing: backOut,
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
import type { Attachment } from 'svelte/attachments'
|
||||
import { expoOut } from 'svelte/easing'
|
||||
import { scale } from 'svelte/transition'
|
||||
import { trapFocus } from 'trap-focus-svelte'
|
||||
import { Material } from '../index'
|
||||
import Portal from './Portal.svelte'
|
||||
import { focusTrap } from 'svelte-focus-trap'
|
||||
|
||||
interface Props {
|
||||
openOnHover?: boolean
|
||||
@@ -143,7 +143,7 @@
|
||||
}}
|
||||
class={['z-150', popoverClass]}
|
||||
use:floatingContent
|
||||
use:focusTrap
|
||||
use:trapFocus
|
||||
bind:this={popoverEl}
|
||||
>
|
||||
{#if popover}
|
||||
|
||||
Reference in new issue
Block a user