sveltekit-ui 1.1.82 → 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
|
|
|
@@ -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": {
|
|
@@ -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
|
}
|