@nekm/svelte-core 1.0.2 → 1.0.4
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.
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import {browserImportScript} from "@nekm/core";
|
|
5
5
|
import {page} from "$app/state";
|
|
6
6
|
|
|
7
|
-
interface
|
|
7
|
+
export interface GoogleAnalyticsProps {
|
|
8
8
|
/**
|
|
9
9
|
* Google Analytics tracking ID.
|
|
10
10
|
*/
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
readonly baseUrl?: URL;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
const { id, baseUrl: baseUrlProps }:
|
|
20
|
+
const { id, baseUrl: baseUrlProps }: GoogleAnalyticsProps = $props();
|
|
21
21
|
const baseUrl = baseUrlProps ?? new URL(assets);
|
|
22
22
|
|
|
23
23
|
onMount(() => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface
|
|
1
|
+
export interface GoogleAnalyticsProps {
|
|
2
2
|
/**
|
|
3
3
|
* Google Analytics tracking ID.
|
|
4
4
|
*/
|
|
@@ -9,6 +9,6 @@ interface Props {
|
|
|
9
9
|
*/
|
|
10
10
|
readonly baseUrl?: URL;
|
|
11
11
|
}
|
|
12
|
-
declare const GoogleAnalytics: import("svelte").Component<
|
|
12
|
+
declare const GoogleAnalytics: import("svelte").Component<GoogleAnalyticsProps, {}, "">;
|
|
13
13
|
type GoogleAnalytics = ReturnType<typeof GoogleAnalytics>;
|
|
14
14
|
export default GoogleAnalytics;
|
package/dist/seo.svelte
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import icon from "../assets/icon.png";
|
|
3
2
|
import {assets} from "$app/paths";
|
|
4
3
|
import {type QueryParams, queryParamsCreate} from "@nekm/core";
|
|
5
4
|
|
|
6
|
-
interface
|
|
5
|
+
export interface SeoCanonical {
|
|
7
6
|
readonly path?: string;
|
|
8
7
|
readonly queryParams?: QueryParams;
|
|
9
8
|
}
|
|
10
9
|
|
|
11
|
-
interface
|
|
10
|
+
export interface SeoProps {
|
|
12
11
|
readonly appName: string;
|
|
13
12
|
readonly description: string;
|
|
14
13
|
readonly title: string;
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
14
|
+
readonly icon: string;
|
|
15
|
+
readonly canonical?: SeoCanonical;
|
|
16
|
+
readonly next?: SeoCanonical;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
const { appName, description, title, canonical, next }:
|
|
19
|
+
const { appName, description, title, icon, canonical, next }: SeoProps = $props();
|
|
20
20
|
|
|
21
|
-
function createCanonical(canonical?:
|
|
21
|
+
function createCanonical(canonical?: SeoCanonical, includeBaseUrl = false): string | undefined {
|
|
22
22
|
let url;
|
|
23
23
|
|
|
24
24
|
if (canonical || includeBaseUrl) {
|
package/dist/seo.svelte.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { type QueryParams } from "@nekm/core";
|
|
2
|
-
interface
|
|
2
|
+
export interface SeoCanonical {
|
|
3
3
|
readonly path?: string;
|
|
4
4
|
readonly queryParams?: QueryParams;
|
|
5
5
|
}
|
|
6
|
-
interface
|
|
6
|
+
export interface SeoProps {
|
|
7
7
|
readonly appName: string;
|
|
8
8
|
readonly description: string;
|
|
9
9
|
readonly title: string;
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
10
|
+
readonly icon: string;
|
|
11
|
+
readonly canonical?: SeoCanonical;
|
|
12
|
+
readonly next?: SeoCanonical;
|
|
12
13
|
}
|
|
13
|
-
declare const Seo: import("svelte").Component<
|
|
14
|
+
declare const Seo: import("svelte").Component<SeoProps, {}, "">;
|
|
14
15
|
type Seo = ReturnType<typeof Seo>;
|
|
15
16
|
export default Seo;
|