@reuters-graphics/graphics-components 0.0.11 → 0.0.12

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.
@@ -16,27 +16,31 @@ declare const __propDef: {
16
16
  * SEO title
17
17
  * @required
18
18
  * @type {string}
19
- */ seoTitle: any;
19
+ */ seoTitle: string;
20
20
  /**
21
21
  * SEO description
22
22
  * @required
23
23
  * @type {string}
24
- */ seoDescription: any;
24
+ */ seoDescription: string;
25
25
  /**
26
26
  * Share title
27
27
  * @required
28
28
  * @type {string}
29
- */ shareTitle: any;
29
+ */ shareTitle: string;
30
30
  /**
31
31
  * Share description
32
32
  * @required
33
33
  * @type {string}
34
- */ shareDescription: any;
34
+ */ shareDescription: string;
35
35
  /**
36
36
  * Share image path. **Must be an absolute path.**
37
37
  * @required
38
38
  * @type {string}
39
- */ shareImgPath: any;
39
+ */ shareImgPath: string;
40
+ /**
41
+ * Share image alt text, up to 420 characters.
42
+ * @type {string}
43
+ */ shareImgAlt?: string;
40
44
  /**
41
45
  * [HTML lang attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang). **Two-letter code only.**
42
46
  * @type {string}
@@ -44,6 +44,11 @@ export let shareDescription;
44
44
  * @type {string}
45
45
  */
46
46
  export let shareImgPath;
47
+ /**
48
+ * Share image alt text, up to 420 characters.
49
+ * @type {string}
50
+ */
51
+ export let shareImgAlt = '';
47
52
  /**
48
53
  * [HTML lang attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang). **Two-letter code only.**
49
54
  * @type {string}
@@ -181,7 +186,10 @@ const articleLdJson = {
181
186
  <meta name="twitter:domain" content="{origin}" />
182
187
  <meta name="twitter:title" content="{shareTitle}" />
183
188
  <meta name="twitter:description" content="{shareDescription}" />
184
- <meta name="twitter:image:src" content="{shareImgPath}" />
189
+ <meta name="twitter:image" content="{shareImgPath}" />
190
+ {#if shareImgAlt}
191
+ <meta name="twitter:image:alt" content="{shareImgAlt}" />
192
+ {/if}
185
193
 
186
194
  <meta property="fb:app_id" content="319194411438328" />
187
195
  <meta property="fb:admins" content="616167736" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reuters-graphics/graphics-components",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "homepage": "https://reuters-graphics.github.io/graphics-components",