@reuters-graphics/graphics-components 0.0.16 → 0.0.18
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/@types/components/PymChild/stores.d.ts +1 -0
- package/dist/@types/components/SEO/SEO.svelte.d.ts +0 -4
- package/dist/@types/index.d.ts +1 -0
- package/dist/components/PymChild/PymChild.svelte +2 -1
- package/dist/components/PymChild/stores.js +3 -0
- package/dist/components/SEO/SEO.svelte +0 -6
- package/dist/components/Scroller/Background.svelte +2 -1
- package/dist/index.js +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const pymChildStore: import("svelte/store").Writable<any>;
|
|
@@ -41,10 +41,6 @@ declare const __propDef: {
|
|
|
41
41
|
* Share image alt text, up to 420 characters.
|
|
42
42
|
* @type {string}
|
|
43
43
|
*/ shareImgAlt?: string;
|
|
44
|
-
/**
|
|
45
|
-
* [HTML lang attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang). **Two-letter code only.**
|
|
46
|
-
* @type {string}
|
|
47
|
-
*/ lang?: string;
|
|
48
44
|
/**
|
|
49
45
|
* Publish time as an [ISO string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
|
|
50
46
|
* @type {string}
|
package/dist/@types/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export { default as NoteText } from "./components/NoteText/NoteText.svelte";
|
|
|
13
13
|
export { default as PaddingReset } from "./components/PaddingReset/PaddingReset.svelte";
|
|
14
14
|
export { default as PhotoPack } from "./components/PhotoPack/PhotoPack.svelte";
|
|
15
15
|
export { default as PymChild } from "./components/PymChild/PymChild.svelte";
|
|
16
|
+
export { pymChildStore } from "./components/PymChild/stores.js";
|
|
16
17
|
export { default as ReutersLogo } from "./components/ReutersLogo/ReutersLogo.svelte";
|
|
17
18
|
export { default as Scroller } from "./components/Scroller/Scroller.svelte";
|
|
18
19
|
export { default as SEO } from "./components/SEO/SEO.svelte";
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
export let polling = 500;
|
|
4
4
|
import { onMount } from 'svelte';
|
|
5
5
|
import pym from 'pym.js';
|
|
6
|
-
|
|
6
|
+
import { pymChildStore } from './stores.js';
|
|
7
7
|
let pymChild;
|
|
8
8
|
onMount(() => {
|
|
9
9
|
pymChild = new pym.Child({ polling });
|
|
10
|
+
pymChildStore.set(pymChild);
|
|
10
11
|
});
|
|
11
12
|
</script>
|
|
@@ -49,11 +49,6 @@ export let shareImgPath;
|
|
|
49
49
|
* @type {string}
|
|
50
50
|
*/
|
|
51
51
|
export let shareImgAlt = '';
|
|
52
|
-
/**
|
|
53
|
-
* [HTML lang attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang). **Two-letter code only.**
|
|
54
|
-
* @type {string}
|
|
55
|
-
*/
|
|
56
|
-
export let lang = 'en';
|
|
57
52
|
/**
|
|
58
53
|
* Publish time as an [ISO string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
|
|
59
54
|
* @type {string}
|
|
@@ -141,7 +136,6 @@ const articleLdJson = {
|
|
|
141
136
|
</script>
|
|
142
137
|
|
|
143
138
|
<svelte:head>
|
|
144
|
-
<html lang="{lang}"></html>
|
|
145
139
|
<title>{seoTitle}</title>
|
|
146
140
|
<meta name="description" content="{seoDescription}" />
|
|
147
141
|
<link rel="canonical" href="{canonicalUrl}" />
|
|
@@ -6,7 +6,8 @@ export let stackBackground = true;
|
|
|
6
6
|
|
|
7
7
|
{#each steps as step, i}
|
|
8
8
|
<!-- Load the step(s) before and after the active one, only -->
|
|
9
|
-
|
|
9
|
+
<!-- Unless stackBackground is true. If so, keep all steps before the current one loaded. -->
|
|
10
|
+
{#if preload === 0 || (i >= (stackBackground ? 0 : index - preload) && i <= index + preload)}
|
|
10
11
|
<div
|
|
11
12
|
class="step-background step-{i + 1}"
|
|
12
13
|
class:visible="{stackBackground ? i <= index : i === index}"
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,7 @@ export { default as NoteText } from './components/NoteText/NoteText.svelte';
|
|
|
14
14
|
export { default as PaddingReset } from './components/PaddingReset/PaddingReset.svelte';
|
|
15
15
|
export { default as PhotoPack } from './components/PhotoPack/PhotoPack.svelte';
|
|
16
16
|
export { default as PymChild } from './components/PymChild/PymChild.svelte';
|
|
17
|
+
export { pymChildStore } from './components/PymChild/stores.js';
|
|
17
18
|
export { default as ReutersLogo } from './components/ReutersLogo/ReutersLogo.svelte';
|
|
18
19
|
export { default as Scroller } from './components/Scroller/Scroller.svelte';
|
|
19
20
|
export { default as SEO } from './components/SEO/SEO.svelte';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reuters-graphics/graphics-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"homepage": "https://reuters-graphics.github.io/graphics-components",
|
|
@@ -122,6 +122,7 @@
|
|
|
122
122
|
"./components/PhotoPack/PhotoPack.svelte": "./dist/components/PhotoPack/PhotoPack.svelte",
|
|
123
123
|
"./components/PhotoPack/docProps.ts": "./dist/components/PhotoPack/docProps.ts",
|
|
124
124
|
"./components/PymChild/PymChild.svelte": "./dist/components/PymChild/PymChild.svelte",
|
|
125
|
+
"./components/PymChild/stores": "./dist/components/PymChild/stores.js",
|
|
125
126
|
"./components/ReutersLogo/ReutersLogo.svelte": "./dist/components/ReutersLogo/ReutersLogo.svelte",
|
|
126
127
|
"./components/SEO/SEO.svelte": "./dist/components/SEO/SEO.svelte",
|
|
127
128
|
"./components/SEO/analytics": "./dist/components/SEO/analytics.js",
|