svelte-meta-tags 3.1.2 → 3.1.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.
@@ -1,7 +1,6 @@
1
1
  <script>export let output = "head";
2
2
  export let schema = void 0;
3
- $:
4
- isValid = schema && typeof schema === "object";
3
+ $: isValid = schema && typeof schema === "object";
5
4
  const createSchema = (schema2) => {
6
5
  const addContext = (context) => ({
7
6
  "@context": "https://schema.org",
@@ -9,8 +8,7 @@ const createSchema = (schema2) => {
9
8
  });
10
9
  return Array.isArray(schema2) ? schema2.map((context) => addContext(context)) : addContext(schema2);
11
10
  };
12
- $:
13
- json = `${'<script type="application/ld+json">'}${JSON.stringify(createSchema(schema))}${"<\/script>"}`;
11
+ $: json = `${'<script type="application/ld+json">'}${JSON.stringify(createSchema(schema))}${"<\/script>"}`;
14
12
  </script>
15
13
 
16
14
  <svelte:head>
@@ -2,8 +2,8 @@ import { SvelteComponentTyped } from "svelte";
2
2
  import type { JsonLdProps } from './types';
3
3
  declare const __propDef: {
4
4
  props: {
5
- output?: JsonLdProps['output'];
6
- schema?: JsonLdProps['schema'];
5
+ output?: JsonLdProps["output"];
6
+ schema?: JsonLdProps["schema"];
7
7
  };
8
8
  events: {
9
9
  [evt: string]: CustomEvent<any>;
@@ -12,8 +12,7 @@ export let canonical = void 0;
12
12
  export let keywords = void 0;
13
13
  export let additionalMetaTags = void 0;
14
14
  export let additionalLinkTags = void 0;
15
- $:
16
- updatedTitle = titleTemplate ? title ? titleTemplate.replace(/%s/g, title) : title : title;
15
+ $: updatedTitle = titleTemplate ? title ? titleTemplate.replace(/%s/g, title) : title : title;
17
16
  let robotsParams = "";
18
17
  if (additionalRobotsProps) {
19
18
  const {
@@ -28,10 +27,9 @@ if (additionalRobotsProps) {
28
27
  } = additionalRobotsProps;
29
28
  robotsParams = `${nosnippet ? ",nosnippet" : ""}${maxSnippet ? `,max-snippet:${maxSnippet}` : ""}${maxImagePreview ? `,max-image-preview:${maxImagePreview}` : ""}${noarchive ? ",noarchive" : ""}${unavailableAfter ? `,unavailable_after:${unavailableAfter}` : ""}${noimageindex ? ",noimageindex" : ""}${maxVideoPreview ? `,max-video-preview:${maxVideoPreview}` : ""}${notranslate ? ",notranslate" : ""}`;
30
29
  }
31
- $:
32
- if (!robots && additionalRobotsProps) {
33
- console.warn("additionalRobotsProps cannot be used when robots is set to false");
34
- }
30
+ $: if (!robots && additionalRobotsProps) {
31
+ console.warn("additionalRobotsProps cannot be used when robots is set to false");
32
+ }
35
33
  </script>
36
34
 
37
35
  <svelte:head>
@@ -2,20 +2,20 @@ import { SvelteComponentTyped } from "svelte";
2
2
  import type { MetaTagsProps } from './types';
3
3
  declare const __propDef: {
4
4
  props: {
5
- title?: MetaTagsProps['title'];
6
- titleTemplate?: MetaTagsProps['titleTemplate'];
7
- robots?: MetaTagsProps['robots'];
8
- additionalRobotsProps?: MetaTagsProps['additionalRobotsProps'];
9
- description?: MetaTagsProps['description'];
10
- mobileAlternate?: MetaTagsProps['mobileAlternate'];
11
- languageAlternates?: MetaTagsProps['languageAlternates'];
12
- twitter?: MetaTagsProps['twitter'];
13
- facebook?: MetaTagsProps['facebook'];
14
- openGraph?: MetaTagsProps['openGraph'];
15
- canonical?: MetaTagsProps['canonical'];
16
- keywords?: MetaTagsProps['keywords'];
17
- additionalMetaTags?: MetaTagsProps['additionalMetaTags'];
18
- additionalLinkTags?: MetaTagsProps['additionalLinkTags'];
5
+ title?: MetaTagsProps["title"];
6
+ titleTemplate?: MetaTagsProps["titleTemplate"];
7
+ robots?: MetaTagsProps["robots"];
8
+ additionalRobotsProps?: MetaTagsProps["additionalRobotsProps"];
9
+ description?: MetaTagsProps["description"];
10
+ mobileAlternate?: MetaTagsProps["mobileAlternate"];
11
+ languageAlternates?: MetaTagsProps["languageAlternates"];
12
+ twitter?: MetaTagsProps["twitter"];
13
+ facebook?: MetaTagsProps["facebook"];
14
+ openGraph?: MetaTagsProps["openGraph"];
15
+ canonical?: MetaTagsProps["canonical"];
16
+ keywords?: MetaTagsProps["keywords"];
17
+ additionalMetaTags?: MetaTagsProps["additionalMetaTags"];
18
+ additionalLinkTags?: MetaTagsProps["additionalLinkTags"];
19
19
  };
20
20
  events: {
21
21
  [evt: string]: CustomEvent<any>;
package/dist/types.d.ts CHANGED
@@ -140,6 +140,7 @@ export interface LinkTag {
140
140
  rel: string;
141
141
  href: string;
142
142
  hrefLang?: string;
143
+ title?: string;
143
144
  media?: string;
144
145
  sizes?: string;
145
146
  type?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-meta-tags",
3
- "version": "3.1.2",
3
+ "version": "3.1.4",
4
4
  "description": "Svelte Meta Tags provides components designed to help you manage SEO for Svelte projects",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -21,16 +21,16 @@
21
21
  "schema-dts": "^1.1.2"
22
22
  },
23
23
  "devDependencies": {
24
- "@sveltejs/adapter-auto": "^3.2.0",
25
- "@sveltejs/kit": "^2.5.5",
26
- "@sveltejs/package": "^2.3.1",
27
- "@sveltejs/vite-plugin-svelte": "^3.0.2",
28
- "publint": "^0.2.7",
29
- "svelte": "^4.2.12",
30
- "svelte-check": "^3.6.9",
31
- "tslib": "^2.6.2",
32
- "typescript": "^5.4.4",
33
- "vite": "^5.2.8"
24
+ "@sveltejs/adapter-auto": "^3.2.4",
25
+ "@sveltejs/kit": "^2.5.24",
26
+ "@sveltejs/package": "^2.3.4",
27
+ "@sveltejs/vite-plugin-svelte": "^3.1.2",
28
+ "publint": "^0.2.10",
29
+ "svelte": "^4.2.19",
30
+ "svelte-check": "^3.8.6",
31
+ "tslib": "^2.7.0",
32
+ "typescript": "^5.5.4",
33
+ "vite": "^5.4.2"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "svelte": "^3.55.0 || ^4.0.0"