@hyvor/design 1.1.12-beta.1 → 1.1.13

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.
@@ -14,6 +14,7 @@
14
14
  import IconBluesky from '@hyvor/icons/IconBluesky';
15
15
  import { SOCIAL_LINKS, type Socials } from '../social.js';
16
16
  import Affiliate from '../Affiliate/Affiliate.svelte';
17
+ import RecordVisit from './RecordVisit.svelte';
17
18
 
18
19
  const year = new Date().getFullYear();
19
20
 
@@ -22,13 +23,15 @@
22
23
  social?: Partial<Socials>;
23
24
  center?: import('svelte').Snippet;
24
25
  affiliate?: boolean;
26
+ recordVisit?: boolean;
25
27
  }
26
28
 
27
29
  let {
28
30
  email = null,
29
31
  social = $bindable({} as Record<string, string | null>),
30
32
  center,
31
- affiliate = true
33
+ affiliate = true,
34
+ recordVisit = true
32
35
  }: Props = $props();
33
36
 
34
37
  social = {
@@ -117,6 +120,9 @@
117
120
  <Affiliate />
118
121
  {/if}
119
122
 
123
+ {#if recordVisit}
124
+ <RecordVisit />
125
+ {/if}
120
126
  </footer>
121
127
 
122
128
  <style>
@@ -4,6 +4,7 @@ interface Props {
4
4
  social?: Partial<Socials>;
5
5
  center?: import('svelte').Snippet;
6
6
  affiliate?: boolean;
7
+ recordVisit?: boolean;
7
8
  }
8
9
  declare const Footer: import("svelte").Component<Props, {}, "social">;
9
10
  type Footer = ReturnType<typeof Footer>;
@@ -0,0 +1,17 @@
1
+ <script lang="ts">
2
+ import { afterNavigate } from '$app/navigation';
3
+ import { onMount } from 'svelte';
4
+
5
+ onMount(() => {
6
+ const coreUrl = `${location.protocol}//${location.hostname.split('.').slice(-2).join('.')}`;
7
+ const script = document.createElement('script');
8
+ script.src = coreUrl + '/js/visit.js';
9
+ script.async = true;
10
+ document.body.appendChild(script);
11
+ });
12
+
13
+ afterNavigate(() => {
14
+ const event = new CustomEvent('svelte:navigated');
15
+ window.dispatchEvent(event);
16
+ });
17
+ </script>
@@ -0,0 +1,18 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const RecordVisit: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, string>;
17
+ type RecordVisit = InstanceType<typeof RecordVisit>;
18
+ export default RecordVisit;
package/package.json CHANGED
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "version": "1.1.12-beta.1"
62
+ "version": "1.1.13"
63
63
  }