svelte-meta-tags 2.5.5 → 2.6.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ # [2.6.2](https://github.com/oekazuma/svelte-meta-tags/compare/v2.6.1...v2.6.2) (2022-08-11)
2
+
3
+ - trim production dependencies([2008183](https://github.com/oekazuma/svelte-meta-tags/commit/2008183b0a712cc6288e188cabdb14c85f93b0ee))
4
+
5
+ # [2.6.1](https://github.com/oekazuma/svelte-meta-tags/compare/v2.6.0...v2.6.1) (2022-05-27)
6
+
7
+ - clean up JSON-LD ([16d107c](https://github.com/oekazuma/svelte-meta-tags/commit/16d107c09546ffd6b2f8312a6851d46bd0da6ae1))
8
+
9
+ # [2.6.0](https://github.com/oekazuma/svelte-meta-tags/compare/v2.5.5...v2.6.0) (2022-05-16)
10
+
11
+ ### Features
12
+
13
+ - allow all public type definitions to be retrieved ([3e04e2f](https://github.com/oekazuma/svelte-meta-tags/commit/3e04e2fd8ff8446709a7d015b5819971cb42765d))
14
+
15
+ ## [2.5.5](https://github.com/oekazuma/svelte-meta-tags/compare/v2.5.4...v2.5.5) (2022-05-06)
16
+
17
+ ### Bug Fixes
18
+
19
+ - revert JSON.stringify options back to previous ([5160cec](https://github.com/oekazuma/svelte-meta-tags/commit/5160cec32f50a29a8e59aa87f851557444ad26a3))
20
+
1
21
  ## [2.5.4](https://github.com/oekazuma/svelte-meta-tags/compare/v2.5.3...v2.5.4) (2022-05-06)
2
22
 
3
23
  ### Bug Fixes
package/JsonLd.svelte CHANGED
@@ -1,16 +1,20 @@
1
1
  <script>
2
2
  export let output = 'head';
3
- export let schema = undefined;
3
+ export let schema = {};
4
4
 
5
- const jsonSchema = (schema) => JSON.stringify({ '@context': 'https://schema.org', ...schema });
5
+ $: isValid = schema && typeof schema === 'object';
6
+ $: json = `${'<scri' + 'pt type="application/ld+json">'}${JSON.stringify({
7
+ '@context': 'https://schema.org',
8
+ ...schema,
9
+ })}${'</scri' + 'pt>'}`;
6
10
  </script>
7
11
 
8
12
  <svelte:head>
9
- {#if schema && output === 'head'}
10
- {@html `${'<scri' + 'pt type="application/ld+json">'}${jsonSchema(schema)}${'</scri' + 'pt>'}`}
13
+ {#if isValid && output === 'head'}
14
+ {@html json}
11
15
  {/if}
12
16
  </svelte:head>
13
17
 
14
- {#if schema && output === 'body'}
15
- {@html `${'<scri' + 'pt type="application/ld+json">'}${jsonSchema(schema)}${'</scri' + 'pt>'}`}
18
+ {#if isValid && output === 'body'}
19
+ {@html json}
16
20
  {/if}
package/MetaTags.svelte CHANGED
@@ -26,28 +26,21 @@
26
26
  noarchive,
27
27
  noimageindex,
28
28
  notranslate,
29
- unavailableAfter
29
+ unavailableAfter,
30
30
  } = robotsProps;
31
31
 
32
- robotsParams = `${nosnippet ? ',nosnippet' : ''}${
33
- maxSnippet ? `,max-snippet:${maxSnippet}` : ''
34
- }${maxImagePreview ? `,max-image-preview:${maxImagePreview}` : ''}${
35
- noarchive ? ',noarchive' : ''
36
- }${unavailableAfter ? `,unavailable_after:${unavailableAfter}` : ''}${
32
+ robotsParams = `${nosnippet ? ',nosnippet' : ''}${maxSnippet ? `,max-snippet:${maxSnippet}` : ''}${
33
+ maxImagePreview ? `,max-image-preview:${maxImagePreview}` : ''
34
+ }${noarchive ? ',noarchive' : ''}${unavailableAfter ? `,unavailable_after:${unavailableAfter}` : ''}${
37
35
  noimageindex ? ',noimageindex' : ''
38
- }${maxVideoPreview ? `,max-video-preview:${maxVideoPreview}` : ''}${
39
- notranslate ? ',notranslate' : ''
40
- }`;
36
+ }${maxVideoPreview ? `,max-video-preview:${maxVideoPreview}` : ''}${notranslate ? ',notranslate' : ''}`;
41
37
  }
42
38
  </script>
43
39
 
44
40
  <svelte:head>
45
41
  <title>{updatedTitle}</title>
46
42
 
47
- <meta
48
- name="robots"
49
- content={`${noindex ? 'noindex' : 'index'},${nofollow ? 'nofollow' : 'follow'}${robotsParams}`}
50
- />
43
+ <meta name="robots" content={`${noindex ? 'noindex' : 'index'},${nofollow ? 'nofollow' : 'follow'}${robotsParams}`} />
51
44
  <meta
52
45
  name="googlebot"
53
46
  content={`${noindex ? 'noindex' : 'index'},${nofollow ? 'nofollow' : 'follow'}${robotsParams}`}
package/README.md CHANGED
@@ -44,8 +44,8 @@ This library is inspired by [next-seo](https://github.com/garmeeh/next-seo)
44
44
  - [Course](#course)
45
45
  - [DataSet](#dataset)
46
46
  - [FAQ](#faq)
47
- - [Types Import](#types-import)
48
- - [Types Import Examples](#types-import-examples)
47
+ - [Types](#types)
48
+ - [Additional types](#additional-types)
49
49
 
50
50
  ### 📦 Installing
51
51
 
@@ -98,18 +98,18 @@ pnpm add -D svelte-meta-tags
98
98
  url: 'https://www.example.ie/og-image-01.jpg',
99
99
  width: 800,
100
100
  height: 600,
101
- alt: 'Og Image Alt'
101
+ alt: 'Og Image Alt',
102
102
  },
103
103
  {
104
104
  url: 'https://www.example.ie/og-image-02.jpg',
105
105
  width: 900,
106
106
  height: 800,
107
- alt: 'Og Image Alt Second'
107
+ alt: 'Og Image Alt Second',
108
108
  },
109
109
  { url: 'https://www.example.ie/og-image-03.jpg' },
110
- { url: 'https://www.example.ie/og-image-04.jpg' }
110
+ { url: 'https://www.example.ie/og-image-04.jpg' },
111
111
  ],
112
- site_name: 'SiteName'
112
+ site_name: 'SiteName',
113
113
  }}
114
114
  twitter={{
115
115
  handle: '@handle',
@@ -118,10 +118,10 @@ pnpm add -D svelte-meta-tags
118
118
  title: 'Using More of Config',
119
119
  description: 'This example uses more of the available config options.',
120
120
  image: 'https://www.example.ie/twitter-image.jpg',
121
- imageAlt: 'Twitter image alt'
121
+ imageAlt: 'Twitter image alt',
122
122
  }}
123
123
  facebook={{
124
- appId: '1234567890'
124
+ appId: '1234567890',
125
125
  }}
126
126
  />
127
127
  ```
@@ -235,7 +235,7 @@ Example:
235
235
  maxVideoPreview: -1,
236
236
  notranslate: true,
237
237
  noimageindex: true,
238
- unavailableAfter: '25 Jun 2010 15:00:00 PST'
238
+ unavailableAfter: '25 Jun 2010 15:00:00 PST',
239
239
  }}
240
240
  />
241
241
  ```
@@ -413,15 +413,15 @@ Svelte Meta Tags currently supports:
413
413
  url: 'https://www.example.ie/og-image.jpg',
414
414
  width: 800,
415
415
  height: 600,
416
- alt: 'Og Image Alt'
416
+ alt: 'Og Image Alt',
417
417
  },
418
418
  {
419
419
  url: 'https://www.example.ie/og-image-2.jpg',
420
420
  width: 800,
421
421
  height: 600,
422
- alt: 'Og Image Alt 2'
423
- }
424
- ]
422
+ alt: 'Og Image Alt 2',
423
+ },
424
+ ],
425
425
  }}
426
426
  />
427
427
  ```
@@ -447,26 +447,26 @@ Full info on [http://ogp.me/](http://ogp.me/#type_video)
447
447
  actors: [
448
448
  {
449
449
  profile: 'https://www.example.com/actors/@firstnameA-lastnameA',
450
- role: 'Protagonist'
450
+ role: 'Protagonist',
451
451
  },
452
452
  {
453
453
  profile: 'https://www.example.com/actors/@firstnameB-lastnameB',
454
- role: 'Antagonist'
455
- }
454
+ role: 'Antagonist',
455
+ },
456
456
  ],
457
457
  directors: [
458
458
  'https://www.example.com/directors/@firstnameA-lastnameA',
459
- 'https://www.example.com/directors/@firstnameB-lastnameB'
459
+ 'https://www.example.com/directors/@firstnameB-lastnameB',
460
460
  ],
461
461
  writers: [
462
462
  'https://www.example.com/writers/@firstnameA-lastnameA',
463
- 'https://www.example.com/writers/@firstnameB-lastnameB'
463
+ 'https://www.example.com/writers/@firstnameB-lastnameB',
464
464
  ],
465
465
  duration: 680000,
466
466
  releaseDate: '2022-12-21T22:04:11Z',
467
- tags: ['Tag A', 'Tag B', 'Tag C']
467
+ tags: ['Tag A', 'Tag B', 'Tag C'],
468
468
  },
469
- site_name: 'SiteName'
469
+ site_name: 'SiteName',
470
470
  }}
471
471
  />
472
472
  ```
@@ -491,18 +491,18 @@ Full info on [http://ogp.me/](http://ogp.me/#type_video)
491
491
  section: 'Section II',
492
492
  authors: [
493
493
  'https://www.example.com/authors/@firstnameA-lastnameA',
494
- 'https://www.example.com/authors/@firstnameB-lastnameB'
494
+ 'https://www.example.com/authors/@firstnameB-lastnameB',
495
495
  ],
496
- tags: ['Tag A', 'Tag B', 'Tag C']
496
+ tags: ['Tag A', 'Tag B', 'Tag C'],
497
497
  },
498
498
  images: [
499
499
  {
500
500
  url: 'https://www.test.ie/images/cover.jpg',
501
501
  width: 850,
502
502
  height: 650,
503
- alt: 'Photo of text'
504
- }
505
- ]
503
+ alt: 'Photo of text',
504
+ },
505
+ ],
506
506
  }}
507
507
  />
508
508
  ```
@@ -525,18 +525,18 @@ Full info on [http://ogp.me/](http://ogp.me/#type_video)
525
525
  isbn: '978-3-16-148410-0',
526
526
  authors: [
527
527
  'https://www.example.com/authors/@firstnameA-lastnameA',
528
- 'https://www.example.com/authors/@firstnameB-lastnameB'
528
+ 'https://www.example.com/authors/@firstnameB-lastnameB',
529
529
  ],
530
- tags: ['Tag A', 'Tag B', 'Tag C']
530
+ tags: ['Tag A', 'Tag B', 'Tag C'],
531
531
  },
532
532
  images: [
533
533
  {
534
534
  url: 'https://www.test.ie/images/book.jpg',
535
535
  width: 850,
536
536
  height: 650,
537
- alt: 'Cover of the book'
538
- }
539
- ]
537
+ alt: 'Cover of the book',
538
+ },
539
+ ],
540
540
  }}
541
541
  />
542
542
  ```
@@ -558,16 +558,16 @@ Full info on [http://ogp.me/](http://ogp.me/#type_video)
558
558
  firstName: 'First',
559
559
  lastName: 'Last',
560
560
  username: 'firstlast123',
561
- gender: 'female'
561
+ gender: 'female',
562
562
  },
563
563
  images: [
564
564
  {
565
565
  url: 'https://www.test.ie/images/profile.jpg',
566
566
  width: 850,
567
567
  height: 650,
568
- alt: 'Profile Photo'
569
- }
570
- ]
568
+ alt: 'Profile Photo',
569
+ },
570
+ ],
571
571
  }}
572
572
  />
573
573
  ```
@@ -605,28 +605,28 @@ This plugin uses [schema-dts](https://github.com/google/schema-dts), so it also
605
605
  '@type': 'Article',
606
606
  mainEntityOfPage: {
607
607
  '@type': 'WebPage',
608
- '@id': 'https://example.com/article'
608
+ '@id': 'https://example.com/article',
609
609
  },
610
610
  headline: 'Article headline',
611
611
  image: [
612
612
  'https://example.com/photos/1x1/photo.jpg',
613
613
  'https://example.com/photos/4x3/photo.jpg',
614
- 'https://example.com/photos/16x9/photo.jpg'
614
+ 'https://example.com/photos/16x9/photo.jpg',
615
615
  ],
616
616
  datePublished: '2015-02-05T08:00:00+08:00',
617
617
  dateModified: '2015-02-05T09:20:00+08:00',
618
618
  author: {
619
619
  '@type': 'Person',
620
- name: 'John Doe'
620
+ name: 'John Doe',
621
621
  },
622
622
  publisher: {
623
623
  '@type': 'Organization',
624
624
  name: 'Google',
625
625
  logo: {
626
626
  '@type': 'ImageObject',
627
- url: 'https://example.com/logo.jpg'
628
- }
629
- }
627
+ url: 'https://example.com/logo.jpg',
628
+ },
629
+ },
630
630
  }}
631
631
  />
632
632
  ```
@@ -646,20 +646,20 @@ This plugin uses [schema-dts](https://github.com/google/schema-dts), so it also
646
646
  '@type': 'ListItem',
647
647
  position: 1,
648
648
  name: 'Books',
649
- item: 'https://example.com/books'
649
+ item: 'https://example.com/books',
650
650
  },
651
651
  {
652
652
  '@type': 'ListItem',
653
653
  position: 2,
654
654
  name: 'Science Fiction',
655
- item: 'https://example.com/books/sciencefiction'
655
+ item: 'https://example.com/books/sciencefiction',
656
656
  },
657
657
  {
658
658
  '@type': 'ListItem',
659
659
  position: 3,
660
- name: 'Award Winners'
661
- }
662
- ]
660
+ name: 'Award Winners',
661
+ },
662
+ ],
663
663
  }}
664
664
  />
665
665
  ```
@@ -678,7 +678,7 @@ This plugin uses [schema-dts](https://github.com/google/schema-dts), so it also
678
678
  image: [
679
679
  'https://example.com/photos/1x1/photo.jpg',
680
680
  'https://example.com/photos/4x3/photo.jpg',
681
- 'https://example.com/photos/16x9/photo.jpg'
681
+ 'https://example.com/photos/16x9/photo.jpg',
682
682
  ],
683
683
  description:
684
684
  "Sleeker than ACME's Classic Anvil, the Executive Anvil is perfect for the business traveler looking for something to drop from a height.",
@@ -686,24 +686,24 @@ This plugin uses [schema-dts](https://github.com/google/schema-dts), so it also
686
686
  mpn: '925872',
687
687
  brand: {
688
688
  '@type': 'Brand',
689
- name: 'ACME'
689
+ name: 'ACME',
690
690
  },
691
691
  review: {
692
692
  '@type': 'Review',
693
693
  reviewRating: {
694
694
  '@type': 'Rating',
695
695
  ratingValue: '4',
696
- bestRating: '5'
696
+ bestRating: '5',
697
697
  },
698
698
  author: {
699
699
  '@type': 'Person',
700
- name: 'Fred Benson'
701
- }
700
+ name: 'Fred Benson',
701
+ },
702
702
  },
703
703
  aggregateRating: {
704
704
  '@type': 'AggregateRating',
705
705
  ratingValue: '4.4',
706
- reviewCount: '89'
706
+ reviewCount: '89',
707
707
  },
708
708
  offers: {
709
709
  '@type': 'Offer',
@@ -712,8 +712,8 @@ This plugin uses [schema-dts](https://github.com/google/schema-dts), so it also
712
712
  price: '119.99',
713
713
  priceValidUntil: '2020-11-20',
714
714
  itemCondition: 'https://schema.org/UsedCondition',
715
- availability: 'https://schema.org/InStock'
716
- }
715
+ availability: 'https://schema.org/InStock',
716
+ },
717
717
  }}
718
718
  />
719
719
  ```
@@ -733,8 +733,8 @@ This plugin uses [schema-dts](https://github.com/google/schema-dts), so it also
733
733
  provider: {
734
734
  '@type': 'Organization',
735
735
  name: 'University of Technology - Eureka',
736
- sameAs: 'http://www.ut-eureka.edu'
737
- }
736
+ sameAs: 'http://www.ut-eureka.edu',
737
+ },
738
738
  }}
739
739
  />
740
740
  ```
@@ -751,7 +751,7 @@ This plugin uses [schema-dts](https://github.com/google/schema-dts), so it also
751
751
  '@type': 'Dataset',
752
752
  name: 'name of the dataset',
753
753
  description: 'The description needs to be at least 50 characters long',
754
- license: 'https//www.example.com'
754
+ license: 'https//www.example.com',
755
755
  }}
756
756
  />
757
757
  ```
@@ -772,101 +772,270 @@ This plugin uses [schema-dts](https://github.com/google/schema-dts), so it also
772
772
  name: 'How long is the delivery time?',
773
773
  acceptedAnswer: {
774
774
  '@type': 'Answer',
775
- text: '3-5 business days.'
776
- }
775
+ text: '3-5 business days.',
776
+ },
777
777
  },
778
778
  {
779
779
  '@type': 'Question',
780
780
  name: 'Where can I find information about product recalls?',
781
781
  acceptedAnswer: {
782
782
  '@type': 'Answer',
783
- text: 'Read more on under information.'
784
- }
785
- }
786
- ]
783
+ text: 'Read more on under information.',
784
+ },
785
+ },
786
+ ],
787
787
  }}
788
788
  />
789
789
  ```
790
790
 
791
- ## Types Import
791
+ ## Types
792
+
793
+ The following types can be imported from `svelte-meta-tags`
794
+
795
+ ### MetaTagsProps
796
+
797
+ ```ts
798
+ interface MetaTagsProps {
799
+ title?: string;
800
+ titleTemplate?: string;
801
+ noindex?: boolean;
802
+ nofollow?: boolean;
803
+ robotsProps?: AdditionalRobotsProps;
804
+ description?: string;
805
+ canonical?: string;
806
+ mobileAlternate?: MobileAlternate;
807
+ languageAlternates?: ReadonlyArray<LanguageAlternate>;
808
+ twitter?: Twitter;
809
+ facebook?: Facebook;
810
+ openGraph?: OpenGraph;
811
+ additionalMetaTags?: ReadonlyArray<MetaTag>;
812
+ additionalLinkTags?: ReadonlyArray<LinkTag>;
813
+ }
814
+ ```
792
815
 
793
- You can import and use the types `MetaTagsProps` and `JsonLdProps`.
816
+ ### JsonLdProps
794
817
 
795
- ### Types Import Examples
818
+ ```ts
819
+ interface JsonLdProps {
820
+ output?: 'head' | 'body';
821
+ schema?: Thing | WithContext<Thing>;
822
+ }
823
+ ```
796
824
 
797
- ```svelte
798
- <script lang="ts">
799
- import { MetaTags, JsonLd } from 'svelte-meta-tags';
800
- import type { MetaTagsProps, JsonLdProps } from 'svelte-meta-tags';
801
-
802
- const metatags: MetaTagsProps = {
803
- title: 'Types Page Title | Svelte Meta Tags',
804
- description: 'Description of Types page',
805
- canonical: 'https://www.canonical.ie/',
806
- openGraph: {
807
- type: 'website',
808
- url: 'https://www.example.com/page',
809
- locale: 'en_IE',
810
- title: 'Open Graph Title',
811
- description: 'Open Graph Description',
812
- images: [
813
- {
814
- url: 'https://www.example.ie/og-image.jpg',
815
- width: 800,
816
- height: 600,
817
- alt: 'Og Image Alt'
818
- }
819
- ],
820
- site_name: 'SiteName'
821
- },
822
- twitter: {
823
- handle: '@handle',
824
- site: '@site',
825
- cardType: 'summary_large_image',
826
- title: 'Types Page Title | Svelte Meta Tags',
827
- description: 'Description of Types page',
828
- image: 'https://www.example.ie/twitter-image.jpg',
829
- imageAlt: 'Twitter image alt'
830
- },
831
- facebook: {
832
- appId: '1234567890'
833
- }
834
- };
835
-
836
- const jsonld: JsonLdProps = {
837
- schema: {
838
- '@type': 'NewsArticle',
839
- mainEntityOfPage: {
840
- '@type': 'WebPage',
841
- '@id': 'https://google.com/article'
842
- },
843
- headline: 'Article headline',
844
- image: [
845
- 'https://example.com/photos/1x1/photo.jpg',
846
- 'https://example.com/photos/4x3/photo.jpg',
847
- 'https://example.com/photos/16x9/photo.jpg'
848
- ],
849
- datePublished: '2015-02-05T08:00:00+08:00',
850
- dateModified: '2015-02-05T09:20:00+08:00',
851
- author: {
852
- '@type': 'Person',
853
- name: 'John Doe'
854
- },
855
- publisher: {
856
- '@type': 'Organization',
857
- name: 'Google',
858
- logo: {
859
- '@type': 'ImageObject',
860
- url: 'https://google.com/logo.jpg'
861
- }
862
- }
863
- }
864
- };
865
- </script>
825
+ ### AdditionalRobotsProps
826
+
827
+ ```ts
828
+ interface AdditionalRobotsProps {
829
+ nosnippet?: boolean;
830
+ maxSnippet?: number;
831
+ maxImagePreview?: 'none' | 'standard' | 'large';
832
+ maxVideoPreview?: number;
833
+ noarchive?: boolean;
834
+ unavailableAfter?: string;
835
+ noimageindex?: boolean;
836
+ notranslate?: boolean;
837
+ }
838
+ ```
839
+
840
+ ### MobileAlternate
841
+
842
+ ```ts
843
+ interface MobileAlternate {
844
+ media: string;
845
+ href: string;
846
+ }
847
+ ```
848
+
849
+ ### LanguageAlternate
850
+
851
+ ```ts
852
+ interface LanguageAlternate {
853
+ hrefLang: string;
854
+ href: string;
855
+ }
856
+ ```
857
+
858
+ ### Twitter
859
+
860
+ ```ts
861
+ interface Twitter {
862
+ cardType?: 'summary' | 'summary_large_image' | 'app' | 'player';
863
+ site?: string;
864
+ handle?: string;
865
+ title?: string;
866
+ description?: string;
867
+ image?: string;
868
+ imageAlt?: string;
869
+ }
870
+ ```
871
+
872
+ ### Facebook
873
+
874
+ ```ts
875
+ interface Facebook {
876
+ appId?: string;
877
+ }
878
+ ```
879
+
880
+ ### OpenGraph
881
+
882
+ ```ts
883
+ interface OpenGraph {
884
+ url?: string;
885
+ type?: string;
886
+ title?: string;
887
+ description?: string;
888
+ images?: ReadonlyArray<OpenGraphImages>;
889
+ videos?: ReadonlyArray<OpenGraphVideos>;
890
+ locale?: string;
891
+ site_name?: string;
892
+ profile?: OpenGraphProfile;
893
+ book?: OpenGraphBook;
894
+ article?: OpenGraphArticle;
895
+ video?: OpenGraphVideo;
896
+ }
897
+ ```
898
+
899
+ ### MetaTag
900
+
901
+ ```ts
902
+ type MetaTag = HTML5MetaTag | RDFaMetaTag | HTTPEquivMetaTag;
903
+ ```
904
+
905
+ ### LinkTag
906
+
907
+ ```ts
908
+ interface LinkTag {
909
+ rel: string;
910
+ href: string;
911
+ sizes?: string;
912
+ type?: string;
913
+ color?: string;
914
+ }
915
+ ```
916
+
917
+ ## Additional types
918
+
919
+ The following are referenced by the public types documented above, but cannot be imported directly
920
+
921
+ ### OpenGraphImages
922
+
923
+ ```ts
924
+ interface OpenGraphImages {
925
+ url: string;
926
+ alt?: string;
927
+ width?: number;
928
+ height?: number;
929
+ }
930
+ ```
931
+
932
+ ### OpenGraphVideos
933
+
934
+ ```ts
935
+ interface OpenGraphVideos {
936
+ url: string;
937
+ alt?: string;
938
+ width?: number;
939
+ height?: number;
940
+ secureUrl?: string;
941
+ type?: string;
942
+ }
943
+ ```
944
+
945
+ ### OpenGraphProfile
946
+
947
+ ```ts
948
+ interface OpenGraphProfile {
949
+ firstName?: string;
950
+ lastName?: string;
951
+ username?: string;
952
+ gender?: string;
953
+ }
954
+ ```
955
+
956
+ ### OpenGraphBook
957
+
958
+ ```ts
959
+ interface OpenGraphBook {
960
+ authors?: ReadonlyArray<string>;
961
+ isbn?: string;
962
+ releaseDate?: string;
963
+ tags?: ReadonlyArray<string>;
964
+ }
965
+ ```
966
+
967
+ ### OpenGraphArticle
968
+
969
+ ```ts
970
+ interface OpenGraphArticle {
971
+ publishedTime?: string;
972
+ modifiedTime?: string;
973
+ expirationTime?: string;
974
+ authors?: ReadonlyArray<string>;
975
+ section?: string;
976
+ tags?: ReadonlyArray<string>;
977
+ }
978
+ ```
979
+
980
+ ### OpenGraphVideo
981
+
982
+ ```ts
983
+ interface OpenGraphVideo {
984
+ actors?: ReadonlyArray<OpenGraphVideoActors>;
985
+ directors?: ReadonlyArray<string>;
986
+ writers?: ReadonlyArray<string>;
987
+ duration?: number;
988
+ releaseDate?: string;
989
+ tags?: ReadonlyArray<string>;
990
+ series?: string;
991
+ }
992
+ ```
993
+
994
+ ### OpenGraphVideoActors
995
+
996
+ ```ts
997
+ interface OpenGraphVideoActors {
998
+ profile: string;
999
+ role?: string;
1000
+ }
1001
+ ```
1002
+
1003
+ ### BaseMetaTag
1004
+
1005
+ ```ts
1006
+ interface BaseMetaTag {
1007
+ content: string;
1008
+ }
1009
+ ```
1010
+
1011
+ ### HTML5MetaTag
1012
+
1013
+ ```ts
1014
+ interface HTML5MetaTag extends BaseMetaTag {
1015
+ name: string;
1016
+ property?: undefined;
1017
+ httpEquiv?: undefined;
1018
+ }
1019
+ ```
1020
+
1021
+ ### RDFaMetaTag
1022
+
1023
+ ```ts
1024
+ interface RDFaMetaTag extends BaseMetaTag {
1025
+ property: string;
1026
+ name?: undefined;
1027
+ httpEquiv?: undefined;
1028
+ }
1029
+ ```
866
1030
 
867
- <MetaTags {...metatags} />
1031
+ ### HTTPEquivMetaTag
868
1032
 
869
- <JsonLd {...jsonld} />
1033
+ ```ts
1034
+ interface HTTPEquivMetaTag extends BaseMetaTag {
1035
+ httpEquiv: 'content-security-policy' | 'content-type' | 'default-style' | 'x-ua-compatible' | 'refresh';
1036
+ name?: undefined;
1037
+ property?: undefined;
1038
+ }
870
1039
  ```
871
1040
 
872
1041
  ## License
package/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { default as MetaTags } from './MetaTags.svelte';
2
2
  export { default as JsonLd } from './JsonLd.svelte';
3
- export type { MetaTagsProps, JsonLdProps } from './types';
3
+ export type { MetaTagsProps, JsonLdProps, AdditionalRobotsProps, MobileAlternate, LanguageAlternate, Twitter, Facebook, OpenGraph, MetaTag, LinkTag, } from './types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-meta-tags",
3
- "version": "2.5.5",
3
+ "version": "2.6.2",
4
4
  "description": "Svelte Meta Tags is a plugin that makes managing your SEO easier in Svelte projects.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -17,37 +17,33 @@
17
17
  "type": "git",
18
18
  "url": "https://github.com/oekazuma/svelte-meta-tags"
19
19
  },
20
- "dependencies": {
21
- "schema-dts": "1.1.0"
22
- },
23
20
  "devDependencies": {
24
- "@commitlint/cli": "16.2.4",
25
- "@commitlint/config-conventional": "16.2.4",
26
- "@semantic-release/changelog": "6.0.1",
27
- "@semantic-release/git": "10.0.1",
28
- "@sveltejs/adapter-auto": "1.0.0-next.40",
29
- "@sveltejs/kit": "1.0.0-next.326",
30
- "@typescript-eslint/eslint-plugin": "5.22.0",
31
- "@typescript-eslint/parser": "5.22.0",
32
- "cypress": "9.6.0",
33
- "eslint": "8.14.0",
34
- "eslint-config-prettier": "8.5.0",
35
- "eslint-plugin-cypress": "2.12.1",
36
- "eslint-plugin-svelte3": "4.0.0",
37
- "husky": "7.0.4",
38
- "lint-staged": "12.4.1",
39
- "prettier": "2.6.2",
40
- "prettier-plugin-svelte": "2.7.0",
41
- "semantic-release": "19.0.2",
42
- "svelte": "3.48.0",
43
- "svelte-check": "2.7.0",
44
- "svelte-preprocess": "4.10.6",
45
- "svelte2tsx": "0.5.9",
46
- "tslib": "2.4.0",
47
- "typescript": "4.6.4"
48
- },
49
- "peerDependencies": {
50
- "svelte": "^3.39.0"
21
+ "@commitlint/cli": "^17.0.3",
22
+ "@commitlint/config-conventional": "^17.0.3",
23
+ "@semantic-release/changelog": "^6.0.1",
24
+ "@semantic-release/git": "^10.0.1",
25
+ "@sveltejs/adapter-auto": "^1.0.0-next.64",
26
+ "@sveltejs/kit": "^1.0.0-next.405",
27
+ "@typescript-eslint/eslint-plugin": "^5.33.0",
28
+ "@typescript-eslint/parser": "^5.33.0",
29
+ "cypress": "^10.4.0",
30
+ "eslint": "^8.21.0",
31
+ "eslint-config-prettier": "^8.5.0",
32
+ "eslint-plugin-cypress": "^2.12.1",
33
+ "eslint-plugin-svelte3": "^4.0.0",
34
+ "husky": "^8.0.1",
35
+ "lint-staged": "^13.0.3",
36
+ "prettier": "^2.7.1",
37
+ "prettier-plugin-svelte": "^2.7.0",
38
+ "schema-dts": "^1.1.0",
39
+ "semantic-release": "^19.0.3",
40
+ "svelte": "^3.49.0",
41
+ "svelte-check": "^2.8.0",
42
+ "svelte-preprocess": "^4.10.7",
43
+ "svelte2tsx": "^0.5.13",
44
+ "tslib": "^2.4.0",
45
+ "typescript": "^4.7.4",
46
+ "vite": "^3.0.5"
51
47
  },
52
48
  "exports": {
53
49
  "./package.json": "./package.json",
@@ -56,4 +52,4 @@
56
52
  ".": "./index.js"
57
53
  },
58
54
  "svelte": "./index.js"
59
- }
55
+ }
package/types.d.ts CHANGED
@@ -116,12 +116,7 @@ interface RDFaMetaTag extends BaseMetaTag {
116
116
  }
117
117
 
118
118
  interface HTTPEquivMetaTag extends BaseMetaTag {
119
- httpEquiv:
120
- | 'content-security-policy'
121
- | 'content-type'
122
- | 'default-style'
123
- | 'x-ua-compatible'
124
- | 'refresh';
119
+ httpEquiv: 'content-security-policy' | 'content-type' | 'default-style' | 'x-ua-compatible' | 'refresh';
125
120
  name?: undefined;
126
121
  property?: undefined;
127
122
  }