@nekm/svelte-core 1.9.1 → 1.9.3

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/seo.svelte CHANGED
@@ -30,7 +30,7 @@
30
30
  readonly description: string;
31
31
  readonly origin?: string;
32
32
  readonly icon: SeoIcon;
33
- readonly additionalIcons: ReadonlyArray<SeoIcon>;
33
+ readonly additionalIcons?: ReadonlyArray<SeoIcon>;
34
34
  readonly canonical?: SeoCanonical;
35
35
  readonly next?: SeoCanonical;
36
36
  readonly twitter?: SeoTwitter;
@@ -41,7 +41,7 @@
41
41
  pageTitle,
42
42
  description,
43
43
  icon,
44
- additionalIcons,
44
+ additionalIcons = [],
45
45
  canonical,
46
46
  next,
47
47
  origin: propsOrigin,
@@ -65,12 +65,20 @@
65
65
  !canonical ? origin : createCanonical(canonical),
66
66
  );
67
67
  const nextUrl = $derived(!next ? undefined : createCanonical(next));
68
+ const additionalAppleIcons = $derived(
69
+ additionalIcons.filter((i) => i.mimeContentType === "image/png"),
70
+ );
68
71
  </script>
69
72
 
70
73
  <svelte:head>
71
74
  <title>{pageTitle} | {siteTitle}</title>
72
75
  <meta name="description" content={description} />
76
+
73
77
  <link rel="canonical" href={canonicalUrl} />
78
+ {#if nextUrl}
79
+ <link rel="next" href={nextUrl} />
80
+ {/if}
81
+
74
82
  <link
75
83
  rel="icon"
76
84
  type={icon.mimeContentType}
@@ -78,6 +86,14 @@
78
86
  href={icon.href}
79
87
  />
80
88
 
89
+ {#if icon.mimeContentType === "image/png"}
90
+ <link
91
+ rel="apple-touch-icon"
92
+ sizes="{icon.width}x{icon.height}"
93
+ href={icon.href}
94
+ />
95
+ {/if}
96
+
81
97
  {#each additionalIcons as icon}
82
98
  <link
83
99
  rel="icon"
@@ -87,9 +103,13 @@
87
103
  />
88
104
  {/each}
89
105
 
90
- {#if nextUrl}
91
- <link rel="next" href={nextUrl} />
92
- {/if}
106
+ {#each additionalAppleIcons as icon}
107
+ <link
108
+ rel="apple-touch-icon"
109
+ sizes="{icon.width}x{icon.height}"
110
+ href={icon.href}
111
+ />
112
+ {/each}
93
113
 
94
114
  <meta property="og:site_name" content={siteTitle} />
95
115
  <meta property="og:title" content={pageTitle} />
@@ -19,7 +19,7 @@ export interface SeoProps {
19
19
  readonly description: string;
20
20
  readonly origin?: string;
21
21
  readonly icon: SeoIcon;
22
- readonly additionalIcons: ReadonlyArray<SeoIcon>;
22
+ readonly additionalIcons?: ReadonlyArray<SeoIcon>;
23
23
  readonly canonical?: SeoCanonical;
24
24
  readonly next?: SeoCanonical;
25
25
  readonly twitter?: SeoTwitter;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@nekm/svelte-core",
3
3
  "description": "Code I find myself re-writing over-and-over, Svelte edition.",
4
4
  "license": "MIT",
5
- "version": "1.9.1",
5
+ "version": "1.9.3",
6
6
  "scripts": {
7
7
  "dev": "vite dev",
8
8
  "build": "vite build && npm run prepack",