sveltekit-ui 1.1.81 → 1.1.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
### Component fixes
|
|
6
6
|
|
|
7
|
+
- Preserve natural popover height in Safari by giving the scrolling content container a content-based flex basis, while retaining fixed-height and scrolling layouts.
|
|
8
|
+
- Focus the image comparison slider before starting a drag so focus changes cannot cancel the new drag.
|
|
7
9
|
- Preserve native button activation, including popover toggles and form submission, when an `on_click` callback starts an async loading state, while still blocking repeated actions until it settles.
|
|
8
10
|
- Accept Apple's domain-restricted, non-expiring MapKit JS tokens while continuing to reject malformed and expired tokens.
|
|
9
11
|
|
package/README.md
CHANGED
|
@@ -55,6 +55,14 @@ npm run verify
|
|
|
55
55
|
|
|
56
56
|
This checks the Svelte source, runs tests, generates and verifies the distributable package, and builds the documentation site.
|
|
57
57
|
|
|
58
|
+
Publish with `npm run publish:npm`. It checks npm for the newest published release, selects the next patch version when needed, keeps `package.json` and `package-lock.json` in sync, and runs verification before publishing. A prepared version that is newer than the published releases is reused, so retrying a failed publish does not skip another version.
|
|
59
|
+
|
|
60
|
+
Preview the version without changing files or publishing:
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
npm run version:available -- --dry-run
|
|
64
|
+
```
|
|
65
|
+
|
|
58
66
|
## Compatibility and releases
|
|
59
67
|
|
|
60
68
|
- Svelte 5 is required.
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import SuccessCheck from "../SuccessCheck/index.svelte"
|
|
3
3
|
import ErrorX from "../ErrorX/index.svelte"
|
|
4
|
-
import Icon from "../Icon/index.svelte"
|
|
5
4
|
import Button from "../Button/index.svelte"
|
|
5
|
+
import { untrack } from "svelte"
|
|
6
|
+
import { flip } from "svelte/animate"
|
|
6
7
|
import { fly } from "svelte/transition"
|
|
7
8
|
|
|
8
9
|
let { manager = null, options = null, on_alert_added } = $props()
|
|
9
10
|
|
|
10
11
|
$effect(() => {
|
|
11
12
|
const current_manager = manager
|
|
12
|
-
|
|
13
|
+
// Only manager replacement should restart the lifecycle, not timer or queue updates.
|
|
14
|
+
untrack(() => current_manager?.run_auto_delete?.())
|
|
13
15
|
return () => current_manager?.destroy?.()
|
|
14
16
|
})
|
|
15
17
|
</script>
|
|
16
18
|
|
|
17
19
|
<div class="alerts_container" role="region" aria-label="Notifications" aria-live="polite">
|
|
18
20
|
{#if Array.isArray(manager?.alerts) && manager?.alerts.length > 0}
|
|
19
|
-
{#each manager?.alerts as alert
|
|
21
|
+
{#each manager?.alerts as alert (alert.id)}
|
|
20
22
|
<div
|
|
21
23
|
class="card alert_box"
|
|
22
24
|
role="status"
|
|
@@ -24,6 +26,7 @@
|
|
|
24
26
|
class:small_alert_container={manager?.is_small_screen}
|
|
25
27
|
style="--br: {manager?.border_radius}rem;"
|
|
26
28
|
transition:fly={{ x: 300, duration: 400 }}
|
|
29
|
+
animate:flip={{ duration: 250 }}
|
|
27
30
|
>
|
|
28
31
|
<div class="icon">
|
|
29
32
|
{#if alert.icon === "check"}
|
|
@@ -46,11 +49,17 @@
|
|
|
46
49
|
|
|
47
50
|
<style>
|
|
48
51
|
.alerts_container {
|
|
49
|
-
position:
|
|
52
|
+
position: fixed;
|
|
53
|
+
top: 0;
|
|
50
54
|
right: 0;
|
|
51
|
-
|
|
55
|
+
width: 32rem;
|
|
56
|
+
max-width: 100%;
|
|
57
|
+
overflow-x: hidden;
|
|
58
|
+
overflow-y: auto;
|
|
52
59
|
max-height: 100vh;
|
|
53
|
-
|
|
60
|
+
max-height: 100dvh;
|
|
61
|
+
z-index: 11;
|
|
62
|
+
pointer-events: none;
|
|
54
63
|
}
|
|
55
64
|
.alerts_container h3 {
|
|
56
65
|
font-size: clamp(2.2rem, 4.2vw, 2.4rem);
|
|
@@ -58,7 +67,6 @@
|
|
|
58
67
|
}
|
|
59
68
|
.alert_container {
|
|
60
69
|
position: relative;
|
|
61
|
-
width: 30rem;
|
|
62
70
|
height: 7rem;
|
|
63
71
|
display: flex;
|
|
64
72
|
align-items: center;
|
|
@@ -70,6 +78,7 @@
|
|
|
70
78
|
align-items: center;
|
|
71
79
|
}
|
|
72
80
|
.alert_box {
|
|
81
|
+
pointer-events: auto;
|
|
73
82
|
border-radius: var(--br);
|
|
74
83
|
border: 1px solid var(--g15-t);
|
|
75
84
|
box-shadow: 0 0.2rem 1rem var(--shadow3);
|
|
@@ -79,9 +79,9 @@ export function create_image_slider_manager(config) {
|
|
|
79
79
|
const container_rect = container_el?.getBoundingClientRect()
|
|
80
80
|
if (!container_rect?.width) return
|
|
81
81
|
if (type == "down") {
|
|
82
|
+
event.currentTarget?.focus?.({ preventScroll: true })
|
|
82
83
|
is_dragging = true
|
|
83
84
|
active_pointer_id = event.pointerId ?? null
|
|
84
|
-
event.currentTarget?.focus?.({ preventScroll: true })
|
|
85
85
|
}
|
|
86
86
|
event.preventDefault()
|
|
87
87
|
touch_start_x = event.clientX
|
package/dist/client/mapkit.js
CHANGED
|
@@ -43,6 +43,25 @@ export function get_mapkit_api() {
|
|
|
43
43
|
return Reflect.get(globalThis, "mapkit") ?? Reflect.get(globalThis.window ?? {}, "mapkit") ?? null
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
function mapkit_libraries_are_ready(mapkit_api) {
|
|
47
|
+
// The core SDK's unloaded constructor getters throw. Its library list is safe to read.
|
|
48
|
+
const loaded_libraries = mapkit_api?.loadedLibraries
|
|
49
|
+
if (Array.isArray(loaded_libraries)) {
|
|
50
|
+
const has_full_map = loaded_libraries.includes("full-map") ||
|
|
51
|
+
["map", "annotations", "overlays", "user-location"].every((name) => loaded_libraries.includes(name))
|
|
52
|
+
return has_full_map && loaded_libraries.includes("services")
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// The full SDK has no library list; inspect values without invoking property getters.
|
|
56
|
+
return ["Map", "Search", "PlaceLookup"].every((name) => {
|
|
57
|
+
for (let object = mapkit_api; object; object = Object.getPrototypeOf(object)) {
|
|
58
|
+
const descriptor = Object.getOwnPropertyDescriptor(object, name)
|
|
59
|
+
if (descriptor) return typeof descriptor.value === "function"
|
|
60
|
+
}
|
|
61
|
+
return false
|
|
62
|
+
})
|
|
63
|
+
}
|
|
64
|
+
|
|
46
65
|
export function load_mapkit_script(token) {
|
|
47
66
|
const window_ref = globalThis.window
|
|
48
67
|
const document_ref = globalThis.document
|
|
@@ -51,7 +70,7 @@ export function load_mapkit_script(token) {
|
|
|
51
70
|
}
|
|
52
71
|
|
|
53
72
|
const ready_api = get_mapkit_api()
|
|
54
|
-
if (ready_api) return Promise.resolve(ready_api)
|
|
73
|
+
if (mapkit_libraries_are_ready(ready_api)) return Promise.resolve(ready_api)
|
|
55
74
|
if (shared_mapkit_load_promise) return shared_mapkit_load_promise
|
|
56
75
|
|
|
57
76
|
const token_error = get_mapkit_token_error(token)
|
|
@@ -74,7 +93,7 @@ export function load_mapkit_script(token) {
|
|
|
74
93
|
|
|
75
94
|
const finish_if_ready = () => {
|
|
76
95
|
const mapkit_api = get_mapkit_api()
|
|
77
|
-
if (!mapkit_api) return false
|
|
96
|
+
if (!mapkit_libraries_are_ready(mapkit_api)) return false
|
|
78
97
|
window_ref.init_map_kit_loaded = true
|
|
79
98
|
cleanup()
|
|
80
99
|
resolve(mapkit_api)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sveltekit-ui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.83",
|
|
4
4
|
"description": "A SvelteKit UI component library for building modern web applications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"version:available": "node ./scripts/use-next-npm-version.js",
|
|
42
42
|
"postpublish": "npm run clean:dist",
|
|
43
43
|
"prepublishOnly": "npm run verify",
|
|
44
|
-
"publish:npm": "npm run
|
|
44
|
+
"publish:npm": "npm run version:available && (npm whoami >/dev/null 2>&1 || npm login --auth-type=web) && npm publish"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"context-filter-polyfill": "^0.3.23",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"@sveltejs/package": "^2.5.8",
|
|
58
58
|
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|
|
59
59
|
"@vercel/analytics": "^2.0.1",
|
|
60
|
-
"jsdom": "^30.0
|
|
61
|
-
"svelte": "^5.57.
|
|
60
|
+
"jsdom": "^30.1.0",
|
|
61
|
+
"svelte": "^5.57.1",
|
|
62
62
|
"svelte-check": "^4.7.6",
|
|
63
63
|
"typescript": "^6.0.3",
|
|
64
|
-
"vite": "^8.
|
|
65
|
-
"vitest": "^5.0.
|
|
64
|
+
"vite": "^8.3.0",
|
|
65
|
+
"vitest": "^5.0.1"
|
|
66
66
|
},
|
|
67
67
|
"homepage": "https://www.sveltekit-ui.com",
|
|
68
68
|
"keywords": [
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"access": "public"
|
|
80
80
|
},
|
|
81
81
|
"overrides": {
|
|
82
|
-
"brace-expansion": "^5.0.
|
|
82
|
+
"brace-expansion": "^5.0.12",
|
|
83
83
|
"cookie": "^0.7.2",
|
|
84
84
|
"tar": "^7.5.22"
|
|
85
85
|
}
|