sveltekit-ui 1.1.81 → 1.1.82
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/README.md +8 -0
- package/dist/Components/Alert/index.svelte +16 -7
- package/package.json +2 -2
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);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sveltekit-ui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.82",
|
|
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",
|