@reuters-graphics/graphics-components 1.1.5 → 1.1.7
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/components/Analytics/Analytics.svelte +4 -1
- package/dist/components/Analytics/providers/index.d.ts +1 -0
- package/dist/components/Analytics/providers/index.js +1 -0
- package/dist/components/Analytics/providers/parsely.d.ts +3 -0
- package/dist/components/Analytics/providers/parsely.js +29 -0
- package/dist/components/SEO/SEO.svelte +2 -2
- package/dist/components/Video/stories/videos/silent-video.mp4 +0 -0
- package/dist/components/Video/stories/videos/sound-video.mp4 +0 -0
- package/dist/docs/docs-components/CopyColourTable/ImportSnippet.d.ts +1 -2
- package/dist/docs/docs-components/CopyColourTable/Table.d.ts +1 -2
- package/dist/docs/docs-components/CopyTable/Table.d.ts +1 -2
- package/dist/docs/docs-components/MdxTheme/Theme.d.ts +1 -2
- package/dist/docs/docs-components/Mermaid/Mermaid.d.ts +1 -2
- package/dist/docs/docs-components/ThemeBuilder/CSSVariables/VariableTable.d.ts +1 -2
- package/dist/docs/docs-components/ThemeBuilder/Customiser/ColourPicker.d.ts +1 -2
- package/dist/docs/docs-components/ThemeBuilder/Customiser/Customiser.d.ts +1 -2
- package/dist/docs/docs-components/ThemeBuilder/Customiser/Key.d.ts +1 -2
- package/dist/docs/docs-components/ThemeBuilder/Customiser/Value.d.ts +1 -2
- package/dist/docs/docs-components/ThemeBuilder/NewTheme/NewTheme.d.ts +1 -2
- package/dist/docs/docs-components/ThemeBuilder/ThemeBuilder.d.ts +1 -2
- package/dist/docs/docs-components/ThemeBuilder/ThemeSwitch/Switch.d.ts +1 -2
- package/dist/globals.d.ts +8 -0
- package/package.json +13 -17
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
<script context="module">
|
|
2
2
|
import { registerPageview as registerChartbeatPageview } from './providers/chartbeat';
|
|
3
3
|
import { registerPageview as registerGAPageview } from './providers/ga';
|
|
4
|
+
import { registerPageview as registerParselyPageview } from './providers/parsely';
|
|
4
5
|
|
|
5
6
|
/** Register virtual pageviews when using client-side routing in multipage applications. */
|
|
6
7
|
export function registerPageview() {
|
|
7
8
|
registerChartbeatPageview();
|
|
8
9
|
registerGAPageview();
|
|
10
|
+
registerParselyPageview();
|
|
9
11
|
}
|
|
10
12
|
</script>
|
|
11
13
|
|
|
12
14
|
<!-- @component `Analytics` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-Analytics--default) -->
|
|
13
15
|
<script>export let authors = [];
|
|
14
16
|
import { onMount } from "svelte";
|
|
15
|
-
import { ga, chartbeat } from "./providers";
|
|
17
|
+
import { ga, chartbeat, parsely } from "./providers";
|
|
16
18
|
onMount(() => {
|
|
17
19
|
ga();
|
|
18
20
|
chartbeat(authors);
|
|
21
|
+
parsely();
|
|
19
22
|
});
|
|
20
23
|
</script>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const SITE_ID = 'reuters.com';
|
|
2
|
+
const attachScript = () => {
|
|
3
|
+
const b = document.body;
|
|
4
|
+
const e = document.createElement('script');
|
|
5
|
+
e.id = 'parsely-cfg';
|
|
6
|
+
e.src = `//cdn.parsely.com/keys/${SITE_ID}/p.js`;
|
|
7
|
+
e.setAttribute('async', '');
|
|
8
|
+
e.setAttribute('defer', '');
|
|
9
|
+
b.appendChild(e);
|
|
10
|
+
};
|
|
11
|
+
export default () => {
|
|
12
|
+
window.PARSELY = window.PARSELY || {
|
|
13
|
+
autotrack: false,
|
|
14
|
+
onReady() {
|
|
15
|
+
window.PARSELY.updateDefaults({
|
|
16
|
+
data: {
|
|
17
|
+
is_logged_in: false,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
window.PARSELY.beacon.trackPageView();
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
attachScript();
|
|
24
|
+
};
|
|
25
|
+
export const registerPageview = () => {
|
|
26
|
+
if (typeof window === 'undefined' || !window.PARSELY)
|
|
27
|
+
return;
|
|
28
|
+
window.PARSELY.beacon.trackPageView();
|
|
29
|
+
};
|
|
@@ -19,7 +19,7 @@ const getOrigin = (baseUrl2) => {
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
$: origin = getOrigin(baseUrl);
|
|
22
|
-
$: canonicalUrl = (origin + pageUrl
|
|
22
|
+
$: canonicalUrl = (origin + pageUrl?.pathname).replace(/index\.html\/$/, "");
|
|
23
23
|
const orgLdJson = {
|
|
24
24
|
"@context": "http://schema.org",
|
|
25
25
|
"@type": "NewsMediaOrganization",
|
|
@@ -62,9 +62,9 @@ $: articleLdJson = {
|
|
|
62
62
|
name,
|
|
63
63
|
url
|
|
64
64
|
})),
|
|
65
|
+
creator: authors.map(({ name }) => name),
|
|
65
66
|
articleSection: "Graphics",
|
|
66
67
|
isAccessibleForFree: true,
|
|
67
|
-
creator: ["Reuters Graphics"],
|
|
68
68
|
keywords: ["Reuters graphics", "Reuters", "graphics", "Interactives"]
|
|
69
69
|
};
|
|
70
70
|
</script>
|
|
File without changes
|
|
File without changes
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export default function Mermaid(props: any):
|
|
2
|
-
import React from 'react';
|
|
1
|
+
export default function Mermaid(props: any): JSX.Element;
|
package/dist/globals.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reuters-graphics/graphics-components",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"homepage": "https://reuters-graphics.github.io/graphics-components",
|
|
@@ -12,21 +12,6 @@
|
|
|
12
12
|
"registry": "https://registry.npmjs.org/",
|
|
13
13
|
"access": "public"
|
|
14
14
|
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"start": "storybook dev -p 3000",
|
|
17
|
-
"new": "node ./bin/newComponent/index.cjs",
|
|
18
|
-
"lint": "eslint --fix",
|
|
19
|
-
"lint:check": "eslint",
|
|
20
|
-
"format": "prettier . --write",
|
|
21
|
-
"format:check": "prettier . --check",
|
|
22
|
-
"build:package": "rimraf ./dist && svelte-package -i ./src && publint",
|
|
23
|
-
"build:chromatic": "storybook build -o docs",
|
|
24
|
-
"build:docs": "storybook build -o docs && touch ./docs/.nojekyll",
|
|
25
|
-
"build": "npm-run-all build:package build:docs",
|
|
26
|
-
"changeset:version": "changeset version",
|
|
27
|
-
"changeset:publish": "git add --all && changeset publish",
|
|
28
|
-
"knip": "knip"
|
|
29
|
-
},
|
|
30
15
|
"license": "MIT",
|
|
31
16
|
"files": [
|
|
32
17
|
"dist"
|
|
@@ -133,5 +118,16 @@
|
|
|
133
118
|
"types": "./dist/index.d.ts",
|
|
134
119
|
"bugs": {
|
|
135
120
|
"url": "https://github.com/reuters-graphics/graphics-components/issues"
|
|
121
|
+
},
|
|
122
|
+
"scripts": {
|
|
123
|
+
"start": "storybook dev -p 3000",
|
|
124
|
+
"new": "node ./bin/newComponent/index.cjs",
|
|
125
|
+
"lint": "eslint --fix",
|
|
126
|
+
"format": "prettier . --write",
|
|
127
|
+
"build": "rimraf ./dist && svelte-package -i ./src && publint",
|
|
128
|
+
"build:docs": "storybook build -o docs",
|
|
129
|
+
"changeset:version": "changeset version",
|
|
130
|
+
"changeset:publish": "git add --all && changeset publish",
|
|
131
|
+
"knip": "knip"
|
|
136
132
|
}
|
|
137
|
-
}
|
|
133
|
+
}
|