svas 1.3.0 → 1.5.0
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/dist/async/Async.d.ts +0 -1
- package/dist/async/Async.svelte +9 -3
- package/dist/awaited.js +2 -2
- package/dist/having.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/once.d.ts +2 -0
- package/dist/{waitUntil.js → once.js} +1 -1
- package/package.json +2 -2
- package/dist/waitUntil.d.ts +0 -2
package/dist/async/Async.d.ts
CHANGED
package/dist/async/Async.svelte
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" generics="T">
|
|
2
|
-
import { LoaderCircle } from "@lucide/svelte";
|
|
2
|
+
import { LoaderCircle, RotateCcw } from "@lucide/svelte";
|
|
3
3
|
import type { Props } from "./Async";
|
|
4
4
|
|
|
5
5
|
const {
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
awaited,
|
|
9
9
|
error,
|
|
10
10
|
silent = false,
|
|
11
|
-
class: classes,
|
|
12
11
|
}: Props<T> = $props();
|
|
13
12
|
</script>
|
|
14
13
|
|
|
@@ -22,7 +21,14 @@
|
|
|
22
21
|
{#if error}
|
|
23
22
|
{@render error($store)}
|
|
24
23
|
{:else if !silent}
|
|
25
|
-
<
|
|
24
|
+
<div class="m-auto flex flex-col items-center gap-4">
|
|
25
|
+
<span class="text-destructive">Something went terribly wrong</span>
|
|
26
|
+
<button
|
|
27
|
+
class="p-4 border border-muted-foreground hover:bg-muted cursor-pointer rounded-md flex items-center gap-2"
|
|
28
|
+
onclick={() => window.location.reload()}>
|
|
29
|
+
<RotateCcw size={16} />
|
|
30
|
+
</button>
|
|
31
|
+
</div>
|
|
26
32
|
{/if}
|
|
27
33
|
{:else}
|
|
28
34
|
{@render awaited($store)}
|
package/dist/awaited.js
CHANGED
package/dist/having.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { once } from './once';
|
|
2
2
|
export function having(store) {
|
|
3
|
-
return
|
|
3
|
+
return once(store, (value) => value !== null && !(value instanceof Error));
|
|
4
4
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { values, type Values } from './values';
|
|
|
3
3
|
export { value } from './value';
|
|
4
4
|
export { awaited } from './awaited';
|
|
5
5
|
export { having } from './having';
|
|
6
|
+
export { once } from './once';
|
|
6
7
|
export { ensure } from './ensure';
|
|
7
8
|
export { sync } from './sync';
|
|
8
9
|
export { combined } from './combined';
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export { values } from './values';
|
|
|
3
3
|
export { value } from './value';
|
|
4
4
|
export { awaited } from './awaited';
|
|
5
5
|
export { having } from './having';
|
|
6
|
+
export { once } from './once';
|
|
6
7
|
export { ensure } from './ensure';
|
|
7
8
|
export { sync } from './sync';
|
|
8
9
|
export { combined } from './combined';
|
package/dist/once.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svas",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"repository": "https://github.com/temich/svas",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite dev",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
48
48
|
"eslint": "^9.39.1",
|
|
49
49
|
"eslint-plugin-svelte": "^3.13.1",
|
|
50
|
-
"globals": "^
|
|
50
|
+
"globals": "^17.2.0",
|
|
51
51
|
"publint": "^0.3.15",
|
|
52
52
|
"svelte": "^5.45.8",
|
|
53
53
|
"svelte-check": "^4.3.4",
|
package/dist/waitUntil.d.ts
DELETED