@axium/contacts 0.2.8 → 0.2.10
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/client/api.js +2 -2
- package/lib/Field.svelte +1 -5
- package/package.json +2 -2
package/dist/client/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fetchAPI,
|
|
1
|
+
import { fetchAPI, cache } from '@axium/client';
|
|
2
2
|
export async function getContact(id) {
|
|
3
|
-
return await
|
|
3
|
+
return await cache.use('contact', id, () => fetchAPI('GET', 'contacts/:id', {}, id));
|
|
4
4
|
}
|
package/lib/Field.svelte
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { invalidate } from '$app/navigation';
|
|
3
|
-
|
|
4
2
|
interface Props {
|
|
5
3
|
text: string;
|
|
6
4
|
isDefault?: boolean;
|
|
@@ -9,8 +7,6 @@
|
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
const { text, isDefault, label, link }: Props = $props();
|
|
12
|
-
|
|
13
|
-
const invalidatePattern = /^\/contacts\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i;
|
|
14
10
|
</script>
|
|
15
11
|
|
|
16
12
|
{#snippet content()}
|
|
@@ -23,7 +19,7 @@
|
|
|
23
19
|
<span>
|
|
24
20
|
{#if link}
|
|
25
21
|
{#if link[0] == '/' && link[1] != '/'}
|
|
26
|
-
<a href={link}
|
|
22
|
+
<a href={link} data-sveltekit-reload>{@render content()}</a>
|
|
27
23
|
{:else}
|
|
28
24
|
<a href={link} target="_blank" rel="noopener noreferrer">{@render content()}</a>
|
|
29
25
|
{/if}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axium/contacts",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"author": "James Prevett <axium@jamespre.dev>",
|
|
5
5
|
"description": "Contacts for Axium",
|
|
6
6
|
"funding": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"build": "tsc"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@axium/client": ">=0.
|
|
41
|
+
"@axium/client": ">=0.27.0",
|
|
42
42
|
"@axium/core": ">=0.26.0",
|
|
43
43
|
"@axium/server": ">=0.43.0",
|
|
44
44
|
"@sveltejs/kit": "^2.27.3",
|