@nekm/svelte-core 1.0.1 → 1.0.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
@@ -1,21 +1,22 @@
1
1
  <script lang="ts">
2
- import icon from "../assets/icon.png";
3
2
  import {assets} from "$app/paths";
3
+ import {type QueryParams, queryParamsCreate} from "@nekm/core";
4
4
 
5
5
  interface Canonical {
6
6
  readonly path?: string;
7
- readonly queryString?: string;
7
+ readonly queryParams?: QueryParams;
8
8
  }
9
9
 
10
10
  interface Props {
11
11
  readonly appName: string;
12
12
  readonly description: string;
13
13
  readonly title: string;
14
+ readonly icon: string;
14
15
  readonly canonical?: Canonical;
15
16
  readonly next?: Canonical;
16
17
  }
17
18
 
18
- const { appName, description, title, canonical, next }: Props = $props();
19
+ const { appName, description, title, icon, canonical, next }: Props = $props();
19
20
 
20
21
  function createCanonical(canonical?: Canonical, includeBaseUrl = false): string | undefined {
21
22
  let url;
@@ -28,8 +29,9 @@
28
29
  url += `/${canonical.path}`;
29
30
  }
30
31
 
31
- if (canonical?.queryString) {
32
- url += `?${canonical.queryString}`;
32
+ if (canonical?.queryParams) {
33
+ const queryParamsStr = queryParamsCreate(canonical.queryParams)
34
+ url += `?${queryParamsStr}`;
33
35
  }
34
36
 
35
37
  return url;
@@ -1,11 +1,13 @@
1
+ import { type QueryParams } from "@nekm/core";
1
2
  interface Canonical {
2
3
  readonly path?: string;
3
- readonly queryString?: string;
4
+ readonly queryParams?: QueryParams;
4
5
  }
5
6
  interface Props {
6
7
  readonly appName: string;
7
8
  readonly description: string;
8
9
  readonly title: string;
10
+ readonly icon: string;
9
11
  readonly canonical?: Canonical;
10
12
  readonly next?: Canonical;
11
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nekm/svelte-core",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",