This commit is contained in:
Prasanta Kumar Dutta 2023-09-08 17:38:39 +05:30
parent 753458250a
commit c523f6e003
664 changed files with 8822 additions and 4054 deletions

View file

@ -0,0 +1,65 @@
import{S as J,i as P,s as U,G as F,C as A,g as f,y as h,m as d,d as p,t as y,h as $,f as m,j as v,o as E,n as q}from"./index-df681c7c.js";import{g as K,a as W}from"./spread-8a54911c.js";import{p as Q,M as X,T as z,S as b}from"./collect-stories-a6a786e2.js";import{w as H,b as T}from"./withParams-47e2ab71.js";const V=`Add Google and Chartbeat analytics to your page.
\`\`\`svelte
<script>
import { Analytics } from '@reuters-graphics/graphics-components';
const authors = [{ name: 'Jane Doe' }, { name: 'John Doe' }];
<\/script>
<Analytics authors="{authors}" />
\`\`\`
`,Y=`Generally, you only want to send page analytics in production environments.
In a SvelteKit context, you can use \`$app\` stores to restrict when you send analytics.
For example, the following excludes analytics from pages in development or hosted on our preview server:
\`\`\`svelte
<script>
import { Analytics } from '@reuters-graphics/graphics-components';
import { dev } from '$app/environment';
import { page } from '$app/stores';
<\/script>
{#if !dev && $page.url?.hostname !== 'graphics.thomsonreuters.com'}
<Analytics />
{/if}
\`\`\`
`,Z=`If you're using analytics to measure a multipage newsapp that uses [client-side routing](https://kit.svelte.dev/docs/glossary#routing), then you may need to trigger analytics after virtual page navigation.
This component also exports a function you can call to register pageviews.
For example, here's how you can use SvelteKit's [\`afterNavigate\`](https://kit.svelte.dev/docs/modules#$app-navigation-afternavigate) lifecycle to capture additional pageviews:
\`\`\`svelte
<script>
import {
Analytics,
registerPageview,
} from '@reuters-graphics/graphics-components';
import { afterNavigate } from '$app/navigation';
import { onMount } from 'svelte';
let hasMounted = false;
onMount(() => {
hasMounted = true;
});
afterNavigate(() => {
// We shouldn't fire on initial page load because the Analytics component
// already registers a reader's first pageview. After this component
// has mounted, we can be sure that further navigation is virtual and
// register pageviews using this function.
if (hasMounted) registerPageview();
});
<\/script>
<Analytics />
\`\`\`
`,O="G-W3Q2X6NTNM",L=`https://www.googletagmanager.com/gtag/js?id=${O}`,ee=()=>{if(document.querySelector(`script[src="${L}"]`))return;const a=document.createElement("script"),t=document.getElementsByTagName("script")[0];a.type="text/javascript",a.async=!0,a.src=L,t.parentNode.insertBefore(a,t)},te=()=>{try{window.dataLayer=window.dataLayer||[],window.gtag||(ee(),window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date),window.gtag("config",O,{send_page_view:!1}),ne())}catch(a){console.warn(`Error initialising Google Analytics: ${a}`)}},ne=()=>{typeof window>"u"||!window.gtag||window.gtag("event","page_view",{page_location:window.location.origin+window.location.pathname,page_title:document==null?void 0:document.title})},se=52639,B="//static.chartbeat.com/js/chartbeat.js",ae=()=>{if(document.querySelector(`script[src="${B}"]`))return;const a=document.createElement("script"),t=document.getElementsByTagName("script")[0];a.type="text/javascript",a.async=!0,a.src=B,t.parentNode.insertBefore(a,t)},oe=a=>{window._sf_async_config={uid:se,domain:"reuters.com",flickerControl:!1,useCanonical:!0,useCanonicalDomain:!0,sections:"Graphics",authors:a.map(t=>(t==null?void 0:t.name)||"").join(","),...window._sf_async_config||{}};try{ae()}catch(t){console.warn(`Error initialising Chartbeat Analytics: ${t}`)}};function re(a,t,i){let{authors:s=[]}=t;return F(()=>{te(),oe(s)}),a.$$set=r=>{"authors"in r&&i(0,s=r.authors)},[s]}class w extends J{constructor(t){super(),P(this,t,re,null,U,{authors:0})}}w.__docgen={version:3,name:"Analytics.svelte",data:[{keywords:[],visibility:"public",description:"Used to associate a page with its author(s) in Chartbeat.",name:"authors",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"array",type:"array"}}],computed:[],methods:[{keywords:[],visibility:"public",description:"Register virtual pageviews when using client-side routing in multipage applications.",name:"registerPageview",static:!0}],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};function ie(a){let t,i,s,r;const n=[a[0]];let l={};for(let o=0;o<n.length;o+=1)l=A(l,n[o]);return t=new w({props:l}),{c(){f(t.$$.fragment),i=h(),s=E("div"),s.textContent="Nothing to see here"},m(o,u){d(t,o,u),p(o,i,u),p(o,s,u),r=!0},p(o,u){const g=u&1?K(n,[W(o[0])]):{};t.$set(g)},i(o){r||(y(t.$$.fragment,o),r=!0)},o(o){$(t.$$.fragment,o),r=!1},d(o){o&&(m(i),m(s)),v(t,o)}}}function ce(a){let t,i,s,r;return t=new w({}),{c(){f(t.$$.fragment),i=h(),s=E("div"),s.textContent="Nothing to see here"},m(n,l){d(t,n,l),p(n,i,l),p(n,s,l),r=!0},p:q,i(n){r||(y(t.$$.fragment,n),r=!0)},o(n){$(t.$$.fragment,n),r=!1},d(n){n&&(m(i),m(s)),v(t,n)}}}function le(a){let t,i,s,r;return t=new w({}),{c(){f(t.$$.fragment),i=h(),s=E("div"),s.textContent="Nothing to see here"},m(n,l){d(t,n,l),p(n,i,l),p(n,s,l),r=!0},p:q,i(n){r||(y(t.$$.fragment,n),r=!0)},o(n){$(t.$$.fragment,n),r=!1},d(n){n&&(m(i),m(s)),v(t,n)}}}function pe(a){let t,i,s,r,n,l,o,u,g,_;const x=[{title:"Components/Analytics"},{component:w},H(V)];let M={};for(let e=0;e<x.length;e+=1)M=A(M,x[e]);t=new X({props:M}),s=new z({props:{$$slots:{default:[ie,({args:e})=>({0:e}),({args:e})=>e?1:0]},$$scope:{ctx:a}}}),n=new b({props:{name:"Default",args:{authors:[{name:"Jane Doe"},{name:"John Doe"}]}}});const S=[{name:"Environments"},T(Y)];let C={$$slots:{default:[ce]},$$scope:{ctx:a}};for(let e=0;e<S.length;e+=1)C=A(C,S[e]);o=new b({props:C});const j=[{name:"Multipage apps"},T(Z)];let N={$$slots:{default:[le]},$$scope:{ctx:a}};for(let e=0;e<j.length;e+=1)N=A(N,j[e]);return g=new b({props:N}),{c(){f(t.$$.fragment),i=h(),f(s.$$.fragment),r=h(),f(n.$$.fragment),l=h(),f(o.$$.fragment),u=h(),f(g.$$.fragment)},m(e,c){d(t,e,c),p(e,i,c),d(s,e,c),p(e,r,c),d(n,e,c),p(e,l,c),d(o,e,c),p(e,u,c),d(g,e,c),_=!0},p(e,[c]){const R={};t.$set(R);const G={};c&3&&(G.$$scope={dirty:c,ctx:e}),s.$set(G);const I={};c&2&&(I.$$scope={dirty:c,ctx:e}),o.$set(I);const k={};c&2&&(k.$$scope={dirty:c,ctx:e}),g.$set(k)},i(e){_||(y(t.$$.fragment,e),y(s.$$.fragment,e),y(n.$$.fragment,e),y(o.$$.fragment,e),y(g.$$.fragment,e),_=!0)},o(e){$(t.$$.fragment,e),$(s.$$.fragment,e),$(n.$$.fragment,e),$(o.$$.fragment,e),$(g.$$.fragment,e),_=!1},d(e){e&&(m(i),m(r),m(l),m(u)),v(t,e),v(s,e),v(n,e),v(o,e),v(g,e)}}}class me extends J{constructor(t){super(),P(this,t,null,pe,U,{})}}const D=Q(me,{meta:{title:"Components/Analytics"},stories:{"tpl:default":{storyId:"components-analytics--default",name:"default",template:!0,source:`<Analytics {...args} />
<div>Nothing to see here</div>`,hasArgs:!0},Default:{storyId:"components-analytics--default",name:"Default",template:!1,source:"",hasArgs:!1},Environments:{storyId:"components-analytics--environments",name:"Environments",template:!1,source:`<Analytics />
<div>Nothing to see here</div>`,hasArgs:!1},MultipageApps:{storyId:"components-analytics--multipage-apps",name:"Multipage apps",template:!1,source:`<Analytics />
<div>Nothing to see here</div>`,hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","environmentsDocs","multipageDocs","Analytics","withComponentDocs","withStoryDocs"]}),ye=D.meta,$e=["Default","Environments","MultipageApps"],ve=D.stories.Default,he=D.stories.Environments,we=D.stories.MultipageApps;export{ve as Default,he as Environments,we as MultipageApps,$e as __namedExportsOrder,ye as default};
//# sourceMappingURL=Analytics.stories-10a134d3.js.map

File diff suppressed because one or more lines are too long

View file

@ -1,65 +0,0 @@
import{S as F,i as K,s as W,o as H,p as N,j as g,D as v,m as d,a as p,k as b,l as C,b as $,t as y,n as w,d as m,w as G,E as Q}from"./index-25af778d.js";import{p as V,M as Y,T as Z,S as I}from"./collect-stories-cce06d4a.js";import{w as J,a as E}from"./withParams-90715500.js";const P=`Add Google and Chartbeat analytics to your page.
\`\`\`html
<script>
import { Analytics } from '@reuters-graphics/graphics-components';
const authors = [{ name: 'Jane Doe' }, { name: 'John Doe' }];
<\/script>
<Analytics authors="{authors}" />
\`\`\`
`,U=`Generally, you only want to send page analytics in production environments.
In a SvelteKit context, you can use \`$app\` stores to restrict when you send analytics.
For example, the following excludes analytics from pages in development or hosted on our preview server:
\`\`\`html
<script>
import { Analytics } from '@reuters-graphics/graphics-components';
import { dev } from '$app/environment';
import { page } from '$app/stores';
<\/script>
{#if !dev && $page.url?.hostname !== 'graphics.thomsonreuters.com'}
<Analytics />
{/if}
\`\`\`
`,q=`If you're using analytics to measure a multipage newsapp that uses [client-side routing](https://kit.svelte.dev/docs/glossary#routing), then you may need to trigger analytics after virtual page navigation.
This component also exports a function you can call to register pageviews.
For example, here's how you can use SvelteKit's [\`afterNavigate\`](https://kit.svelte.dev/docs/modules#$app-navigation-afternavigate) lifecycle to capture additional pageviews:
\`\`\`html
<script>
import {
Analytics,
registerPageview,
} from '@reuters-graphics/graphics-components';
import { afterNavigate } from '$app/navigation';
import { onMount } from 'svelte';
let hasMounted = false;
onMount(() => {
hasMounted = true;
});
afterNavigate(() => {
// We shouldn't fire on initial page load because the Analytics component
// already registers a reader's first pageview. After this component
// has mounted, we can be sure that further navigation is virtual and
// register pageviews using this function.
if (hasMounted) registerPageview();
});
<\/script>
<Analytics />
\`\`\`
`,X="G-W3Q2X6NTNM",O=`https://www.googletagmanager.com/gtag/js?id=${X}`,ee=()=>{if(document.querySelector(`script[src="${O}"]`))return;const a=document.createElement("script"),t=document.getElementsByTagName("script")[0];a.type="text/javascript",a.async=!0,a.src=O,t.parentNode.insertBefore(a,t)},te=()=>{try{window.dataLayer=window.dataLayer||[],window.gtag||(ee(),window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date),window.gtag("config",X,{send_page_view:!1}),ne())}catch(a){console.warn(`Error initialising Google Analytics: ${a}`)}},ne=()=>{typeof window>"u"||!window.gtag||window.gtag("event","page_view",{page_location:window.location.origin+window.location.pathname,page_title:document==null?void 0:document.title})},se=52639,R="//static.chartbeat.com/js/chartbeat.js",ae=()=>{if(document.querySelector(`script[src="${R}"]`))return;const a=document.createElement("script"),t=document.getElementsByTagName("script")[0];a.type="text/javascript",a.async=!0,a.src=R,t.parentNode.insertBefore(a,t)},oe=a=>{window._sf_async_config={uid:se,domain:"reuters.com",flickerControl:!1,useCanonical:!0,useCanonicalDomain:!0,sections:"Graphics",authors:a.map(t=>(t==null?void 0:t.name)||"").join(","),...window._sf_async_config||{}};try{ae()}catch(t){console.warn(`Error initialising Chartbeat Analytics: ${t}`)}};function re(a,t,l){let{authors:s=[]}=t;return H(()=>{te(),oe(s)}),a.$$set=r=>{"authors"in r&&l(0,s=r.authors)},[s]}class h extends F{constructor(t){super(),K(this,t,re,null,W,{authors:0})}}h.__docgen={version:3,name:"Analytics.svelte",data:[{keywords:[],visibility:"public",description:"Used to associate a page with its author(s) in Chartbeat.",name:"authors",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"array",type:"array"}}],computed:[],methods:[{keywords:[],visibility:"public",description:"Register virtual pageviews when using client-side routing in multipage applications.",name:"registerPageview",static:!0}],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};function ie(a){let t,l,s,r;const n=[a[0]];let c={};for(let o=0;o<n.length;o+=1)c=N(c,n[o]);return t=new h({props:c}),{c(){g(t.$$.fragment),l=v(),s=G("div"),s.textContent="Nothing to see here"},m(o,u){d(t,o,u),p(o,l,u),p(o,s,u),r=!0},p(o,u){const f=u&1?b(n,[C(o[0])]):{};t.$set(f)},i(o){r||($(t.$$.fragment,o),r=!0)},o(o){y(t.$$.fragment,o),r=!1},d(o){w(t,o),o&&m(l),o&&m(s)}}}function le(a){let t,l,s,r;return t=new h({}),{c(){g(t.$$.fragment),l=v(),s=G("div"),s.textContent="Nothing to see here"},m(n,c){d(t,n,c),p(n,l,c),p(n,s,c),r=!0},p:Q,i(n){r||($(t.$$.fragment,n),r=!0)},o(n){y(t.$$.fragment,n),r=!1},d(n){w(t,n),n&&m(l),n&&m(s)}}}function ce(a){let t,l,s,r;return t=new h({}),{c(){g(t.$$.fragment),l=v(),s=G("div"),s.textContent="Nothing to see here"},m(n,c){d(t,n,c),p(n,l,c),p(n,s,c),r=!0},p:Q,i(n){r||($(t.$$.fragment,n),r=!0)},o(n){y(t.$$.fragment,n),r=!1},d(n){w(t,n),n&&m(l),n&&m(s)}}}function pe(a){let t,l,s,r,n,c,o,u,f,_;const A=[{title:"Components/Analytics"},{component:h},J(P)];let S={};for(let e=0;e<A.length;e+=1)S=N(S,A[e]);t=new Y({props:S}),s=new Z({props:{$$slots:{default:[ie,({args:e})=>({0:e}),({args:e})=>e?1:0]},$$scope:{ctx:a}}}),n=new I({props:{name:"Default",args:{authors:[{name:"Jane Doe"},{name:"John Doe"}]}}});const D=[{name:"Environments"},E(U)];let j={$$slots:{default:[le]},$$scope:{ctx:a}};for(let e=0;e<D.length;e+=1)j=N(j,D[e]);o=new I({props:j});const M=[{name:"Multipage apps"},E(q)];let k={$$slots:{default:[ce]},$$scope:{ctx:a}};for(let e=0;e<M.length;e+=1)k=N(k,M[e]);return f=new I({props:k}),{c(){g(t.$$.fragment),l=v(),g(s.$$.fragment),r=v(),g(n.$$.fragment),c=v(),g(o.$$.fragment),u=v(),g(f.$$.fragment)},m(e,i){d(t,e,i),p(e,l,i),d(s,e,i),p(e,r,i),d(n,e,i),p(e,c,i),d(o,e,i),p(e,u,i),d(f,e,i),_=!0},p(e,[i]){const z=i&0?b(A,[A[0],i&0&&{component:h},i&0&&C(J(P))]):{};t.$set(z);const T={};i&3&&(T.$$scope={dirty:i,ctx:e}),s.$set(T);const L=i&0?b(D,[D[0],C(E(U))]):{};i&2&&(L.$$scope={dirty:i,ctx:e}),o.$set(L);const B=i&0?b(M,[M[0],C(E(q))]):{};i&2&&(B.$$scope={dirty:i,ctx:e}),f.$set(B)},i(e){_||($(t.$$.fragment,e),$(s.$$.fragment,e),$(n.$$.fragment,e),$(o.$$.fragment,e),$(f.$$.fragment,e),_=!0)},o(e){y(t.$$.fragment,e),y(s.$$.fragment,e),y(n.$$.fragment,e),y(o.$$.fragment,e),y(f.$$.fragment,e),_=!1},d(e){w(t,e),e&&m(l),w(s,e),e&&m(r),w(n,e),e&&m(c),w(o,e),e&&m(u),w(f,e)}}}class me extends F{constructor(t){super(),K(this,t,null,pe,W,{})}}const x=V(me,{meta:{title:"Components/Analytics"},stories:{"tpl:default":{storyId:"components-analytics--default",name:"default",template:!0,source:`<Analytics {...args} />
<div>Nothing to see here</div>`,hasArgs:!0},Default:{storyId:"components-analytics--default",name:"Default",template:!1,hasArgs:!1},Environments:{storyId:"components-analytics--environments",name:"Environments",template:!1,source:`<Analytics />
<div>Nothing to see here</div>`,hasArgs:!1},MultipageApps:{storyId:"components-analytics--multipage-apps",name:"Multipage apps",template:!1,source:`<Analytics />
<div>Nothing to see here</div>`,hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","environmentsDocs","multipageDocs","Analytics","withComponentDocs","withStoryDocs"]}),de=x.meta,$e=["Default","Environments","MultipageApps"],ye=x.stories.Default,we=x.stories.Environments,ve=x.stories.MultipageApps;export{ye as Default,we as Environments,ve as MultipageApps,$e as __namedExportsOrder,de as default};
//# sourceMappingURL=Analytics.stories-b8768512.js.map

File diff suppressed because one or more lines are too long

View file

@ -1,2 +0,0 @@
import{S as b,i as y,s as _,q as w,w as f,x as u,y as m,a as h,z as p,A as k,u as j,r as g,v,B as A,b as S,t as V,d as W}from"./index-25af778d.js";const E=(s,i)=>(Object.entries(i).forEach(([t,n])=>{s.style.setProperty(`--${t}`,n)}),{update(t){Object.entries(t).forEach(([n,o])=>{s.style.setProperty(`--${n}`,o),delete i[n]}),Object.keys(i).forEach(n=>{s.style.removeProperty(`--${n}`)}),i=t}});function O(s){let i,t,n,o,d,c;const r=s[6].default,a=w(r,s,s[5],null);return{c(){i=f("main"),t=f("article"),a&&a.c(),u(t,"id",s[1]),u(t,"role",s[2]),u(t,"class","svelte-jd0c2r"),m(t,"embedded",s[0])},m(e,l){h(e,i,l),p(i,t),a&&a.m(t,null),o=!0,d||(c=k(n=E.call(null,t,s[3])),d=!0)},p(e,[l]){a&&a.p&&(!o||l&32)&&j(a,r,e,e[5],o?v(r,e[5],l,null):g(e[5]),null),(!o||l&2)&&u(t,"id",e[1]),(!o||l&4)&&u(t,"role",e[2]),n&&A(n.update)&&l&8&&n.update.call(null,e[3]),(!o||l&1)&&m(t,"embedded",e[0])},i(e){o||(S(a,e),o=!0)},o(e){V(a,e),o=!1},d(e){e&&W(i),a&&a.d(e),d=!1,c()}}}function q(s,i,t){let n,{$$slots:o={},$$scope:d}=i,{embedded:c=!1}=i,{id:r=null}=i,{role:a=null}=i,{columnWidths:e={narrower:330,narrow:510,normal:660,wide:930,wider:1200}}=i;return s.$$set=l=>{"embedded"in l&&t(0,c=l.embedded),"id"in l&&t(1,r=l.id),"role"in l&&t(2,a=l.role),"columnWidths"in l&&t(4,e=l.columnWidths),"$$scope"in l&&t(5,d=l.$$scope)},s.$$.update=()=>{s.$$.dirty&16&&t(3,n={"narrower-column-width":e.narrower+"px","narrow-column-width":e.narrow+"px","normal-column-width":e.normal+"px","wide-column-width":e.wide+"px","wider-column-width":e.wider+"px"})},[c,r,a,n,e,d,o]}class C extends b{constructor(i){super(),y(this,i,q,O,_,{embedded:0,id:1,role:2,columnWidths:4})}}C.__docgen={version:3,name:"Article.svelte",data:[{keywords:[],visibility:"public",description:"Set to true for embeddables.",name:"embedded",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"boolean",type:"boolean"},defaultValue:!1},{keywords:[],visibility:"public",description:"Add an id to the article tag to target it with custom CSS.",name:"id",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"},defaultValue:null},{keywords:[],visibility:"public",description:"ARIA role of the article",name:"role",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"},defaultValue:null},{keywords:[],visibility:"public",description:"Set custom widths for the normal, wide and wider column dimensions",name:"columnWidths",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"}}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[{keywords:[],visibility:"public",description:"Article content",name:"default"}],refs:[]};export{C as A};
//# sourceMappingURL=Article-06c782e7.js.map

View file

@ -0,0 +1,2 @@
import{S as b,i as y,s as _,l as w,o as f,b as u,p as m,d as h,e as p,D as k,u as j,q as g,r as v,E as A,t as S,h as V,f as W}from"./index-df681c7c.js";const E=(s,i)=>(Object.entries(i).forEach(([t,n])=>{s.style.setProperty(`--${t}`,n)}),{update(t){Object.entries(t).forEach(([n,o])=>{s.style.setProperty(`--${n}`,o),delete i[n]}),Object.keys(i).forEach(n=>{s.style.removeProperty(`--${n}`)}),i=t}});function O(s){let i,t,n,o,d,c;const r=s[6].default,a=w(r,s,s[5],null);return{c(){i=f("main"),t=f("article"),a&&a.c(),u(t,"id",s[1]),u(t,"role",s[2]),u(t,"class","svelte-jd0c2r"),m(t,"embedded",s[0])},m(e,l){h(e,i,l),p(i,t),a&&a.m(t,null),o=!0,d||(c=k(n=E.call(null,t,s[3])),d=!0)},p(e,[l]){a&&a.p&&(!o||l&32)&&j(a,r,e,e[5],o?v(r,e[5],l,null):g(e[5]),null),(!o||l&2)&&u(t,"id",e[1]),(!o||l&4)&&u(t,"role",e[2]),n&&A(n.update)&&l&8&&n.update.call(null,e[3]),(!o||l&1)&&m(t,"embedded",e[0])},i(e){o||(S(a,e),o=!0)},o(e){V(a,e),o=!1},d(e){e&&W(i),a&&a.d(e),d=!1,c()}}}function q(s,i,t){let n,{$$slots:o={},$$scope:d}=i,{embedded:c=!1}=i,{id:r=null}=i,{role:a=null}=i,{columnWidths:e={narrower:330,narrow:510,normal:660,wide:930,wider:1200}}=i;return s.$$set=l=>{"embedded"in l&&t(0,c=l.embedded),"id"in l&&t(1,r=l.id),"role"in l&&t(2,a=l.role),"columnWidths"in l&&t(4,e=l.columnWidths),"$$scope"in l&&t(5,d=l.$$scope)},s.$$.update=()=>{s.$$.dirty&16&&t(3,n={"narrower-column-width":e.narrower+"px","narrow-column-width":e.narrow+"px","normal-column-width":e.normal+"px","wide-column-width":e.wide+"px","wider-column-width":e.wider+"px"})},[c,r,a,n,e,d,o]}class C extends b{constructor(i){super(),y(this,i,q,O,_,{embedded:0,id:1,role:2,columnWidths:4})}}C.__docgen={version:3,name:"Article.svelte",data:[{keywords:[],visibility:"public",description:"Set to true for embeddables.",name:"embedded",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"boolean",type:"boolean"},defaultValue:!1},{keywords:[],visibility:"public",description:"Add an id to the article tag to target it with custom CSS.",name:"id",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"},defaultValue:null},{keywords:[],visibility:"public",description:"ARIA role of the article",name:"role",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"},defaultValue:null},{keywords:[],visibility:"public",description:"Set custom widths for the normal, wide and wider column dimensions",name:"columnWidths",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"}}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[{keywords:[],visibility:"public",description:"Article content",name:"default"}],refs:[]};export{C as A};
//# sourceMappingURL=Article-6674aca3.js.map

View file

@ -1 +1 @@
{"version":3,"file":"Article-06c782e7.js","sources":["../../src/actions/cssVariables/index.js","../../src/components/Article/Article.svelte"],"sourcesContent":["// Shamelessly stolen from: https://github.com/kaisermann/svelte-css-vars\nexport default (node, props) => {\n Object.entries(props).forEach(([key, value]) => {\n node.style.setProperty(`--${key}`, value);\n });\n\n return {\n update(newProps) {\n Object.entries(newProps).forEach(([key, value]) => {\n node.style.setProperty(`--${key}`, value);\n delete props[key];\n });\n\n Object.keys(props).forEach((name) => {\n node.style.removeProperty(`--${name}`);\n });\n props = newProps;\n },\n };\n};\n","<!-- @component `Article` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/layout-article--default) -->\n<script lang=\"ts\">\n /** Set to true for embeddables. */\n export let embedded: boolean = false;\n\n /** Add an id to the article tag to target it with custom CSS. */\n export let id: string | null = null;\n\n /** ARIA role of the article */\n export let role: string | null = null;\n\n interface ColumnWidths {\n /** Narrower column width */\n narrower: number;\n /** Narrow column width */\n narrow: number;\n /** Normal column width */\n normal: number;\n /** Wide column width */\n wide: number;\n /** Wider column width */\n wider: number;\n }\n\n /** Set custom widths for the normal, wide and wider column dimensions */\n export let columnWidths: ColumnWidths = {\n narrower: 330,\n narrow: 510,\n normal: 660,\n wide: 930,\n wider: 1200,\n };\n\n import cssVariables from '../../actions/cssVariables/index.js';\n\n $: columnWidthVars = {\n 'narrower-column-width': columnWidths.narrower + 'px',\n 'narrow-column-width': columnWidths.narrow + 'px',\n 'normal-column-width': columnWidths.normal + 'px',\n 'wide-column-width': columnWidths.wide + 'px',\n 'wider-column-width': columnWidths.wider + 'px',\n };\n</script>\n\n<main>\n <article\n id=\"{id}\"\n class:embedded\n role=\"{role}\"\n use:cssVariables=\"{columnWidthVars}\"\n >\n <!-- Article content -->\n <slot />\n </article>\n</main>\n\n<style lang=\"scss\">\n article {\n width: 100%;\n display: block;\n margin: 0;\n padding: 0 15px;\n background-color: var(--theme-colour-background, transparent);\n &.embedded {\n overflow: auto;\n }\n }\n</style>\n"],"names":["cssVariables","node","props","key","value","newProps","name","ctx","insert","target","main","anchor","append","article","embedded","$$props","id","role","columnWidths","columnWidthVars"],"mappings":"mJACA,MAAAA,EAAe,CAACC,EAAMC,KACpB,OAAO,QAAQA,CAAK,EAAE,QAAQ,CAAC,CAACC,EAAKC,CAAK,IAAM,CAC9CH,EAAK,MAAM,YAAY,KAAKE,IAAOC,CAAK,CAC5C,CAAG,EAEM,CACL,OAAOC,EAAU,CACf,OAAO,QAAQA,CAAQ,EAAE,QAAQ,CAAC,CAACF,EAAKC,CAAK,IAAM,CACjDH,EAAK,MAAM,YAAY,KAAKE,IAAOC,CAAK,EACxC,OAAOF,EAAMC,CAAG,CACxB,CAAO,EAED,OAAO,KAAKD,CAAK,EAAE,QAASI,GAAS,CACnCL,EAAK,MAAM,eAAe,KAAKK,GAAM,CAC7C,CAAO,EACDJ,EAAQG,CACT,CACL,iIC4BSE,EAAE,CAAA,CAAA,aAEAA,EAAI,CAAA,CAAA,4DAJfC,EAUMC,EAAAC,EAAAC,CAAA,EATJC,EAQSF,EAAAG,CAAA,8CAJYN,EAAe,CAAA,CAAA,CAAA,wGAH7BA,EAAE,CAAA,CAAA,wBAEAA,EAAI,CAAA,CAAA,0CACQA,EAAe,CAAA,CAAA,iKA9CzB,CAAA,SAAAO,EAAoB,EAAK,EAAAC,EAGzB,CAAA,GAAAC,EAAoB,IAAI,EAAAD,EAGxB,CAAA,KAAAE,EAAsB,IAAI,EAAAF,GAgB1B,aAAAG,EAAY,CACrB,SAAU,IACV,OAAQ,IACR,OAAQ,IACR,KAAM,IACN,MAAO,6NAKNC,EAAe,CAChB,wBAAyBD,EAAa,SAAW,KACjD,sBAAuBA,EAAa,OAAS,KAC7C,sBAAuBA,EAAa,OAAS,KAC7C,oBAAqBA,EAAa,KAAO,KACzC,qBAAsBA,EAAa,MAAQ"}
{"version":3,"file":"Article-6674aca3.js","sources":["../../src/actions/cssVariables/index.js","../../src/components/Article/Article.svelte"],"sourcesContent":["// Shamelessly stolen from: https://github.com/kaisermann/svelte-css-vars\nexport default (node, props) => {\n Object.entries(props).forEach(([key, value]) => {\n node.style.setProperty(`--${key}`, value);\n });\n\n return {\n update(newProps) {\n Object.entries(newProps).forEach(([key, value]) => {\n node.style.setProperty(`--${key}`, value);\n delete props[key];\n });\n\n Object.keys(props).forEach((name) => {\n node.style.removeProperty(`--${name}`);\n });\n props = newProps;\n },\n };\n};\n","<!-- @component `Article` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/layout-article--default) -->\n<script lang=\"ts\">\n /** Set to true for embeddables. */\n export let embedded: boolean = false;\n\n /** Add an id to the article tag to target it with custom CSS. */\n export let id: string | null = null;\n\n /** ARIA role of the article */\n export let role: string | null = null;\n\n interface ColumnWidths {\n /** Narrower column width */\n narrower: number;\n /** Narrow column width */\n narrow: number;\n /** Normal column width */\n normal: number;\n /** Wide column width */\n wide: number;\n /** Wider column width */\n wider: number;\n }\n\n /** Set custom widths for the normal, wide and wider column dimensions */\n export let columnWidths: ColumnWidths = {\n narrower: 330,\n narrow: 510,\n normal: 660,\n wide: 930,\n wider: 1200,\n };\n\n import cssVariables from '../../actions/cssVariables/index.js';\n\n $: columnWidthVars = {\n 'narrower-column-width': columnWidths.narrower + 'px',\n 'narrow-column-width': columnWidths.narrow + 'px',\n 'normal-column-width': columnWidths.normal + 'px',\n 'wide-column-width': columnWidths.wide + 'px',\n 'wider-column-width': columnWidths.wider + 'px',\n };\n</script>\n\n<main>\n <article\n id=\"{id}\"\n class:embedded=\"{embedded}\"\n role=\"{role}\"\n use:cssVariables=\"{columnWidthVars}\"\n >\n <!-- Article content -->\n <slot />\n </article>\n</main>\n\n<style lang=\"scss\">\n article {\n width: 100%;\n display: block;\n margin: 0;\n padding: 0 15px;\n background-color: var(--theme-colour-background, transparent);\n &.embedded {\n overflow: auto;\n }\n }\n</style>\n"],"names":["cssVariables","node","props","key","value","newProps","name","ctx","insert","target","main","anchor","append","article","embedded","$$props","id","role","columnWidths","columnWidthVars"],"mappings":"wJACA,MAAAA,EAAe,CAACC,EAAMC,KACpB,OAAO,QAAQA,CAAK,EAAE,QAAQ,CAAC,CAACC,EAAKC,CAAK,IAAM,CAC9CH,EAAK,MAAM,YAAY,KAAKE,CAAG,GAAIC,CAAK,CAC5C,CAAG,EAEM,CACL,OAAOC,EAAU,CACf,OAAO,QAAQA,CAAQ,EAAE,QAAQ,CAAC,CAACF,EAAKC,CAAK,IAAM,CACjDH,EAAK,MAAM,YAAY,KAAKE,CAAG,GAAIC,CAAK,EACxC,OAAOF,EAAMC,CAAG,CACxB,CAAO,EAED,OAAO,KAAKD,CAAK,EAAE,QAASI,GAAS,CACnCL,EAAK,MAAM,eAAe,KAAKK,CAAI,EAAE,CAC7C,CAAO,EACDJ,EAAQG,CACT,CACL,iIC4BSE,EAAE,CAAA,CAAA,aAEAA,EAAI,CAAA,CAAA,8CADMA,EAAQ,CAAA,CAAA,UAH7BC,EAUMC,EAAAC,EAAAC,CAAA,EATJC,EAQSF,EAAAG,CAAA,8CAJYN,EAAe,CAAA,CAAA,CAAA,wGAH7BA,EAAE,CAAA,CAAA,wBAEAA,EAAI,CAAA,CAAA,0CACQA,EAAe,CAAA,CAAA,4BAFjBA,EAAQ,CAAA,CAAA,iIA5ChB,CAAA,SAAAO,EAAoB,EAAK,EAAAC,EAGzB,CAAA,GAAAC,EAAoB,IAAI,EAAAD,EAGxB,CAAA,KAAAE,EAAsB,IAAI,EAAAF,GAgB1B,aAAAG,EAAY,CACrB,SAAU,IACV,OAAQ,IACR,OAAQ,IACR,KAAM,IACN,MAAO,6NAKNC,EAAe,CAChB,wBAAyBD,EAAa,SAAW,KACjD,sBAAuBA,EAAa,OAAS,KAC7C,sBAAuBA,EAAa,OAAS,KAC7C,oBAAqBA,EAAa,KAAO,KACzC,qBAAsBA,EAAa,MAAQ"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
figure.before-after-container.svelte-176e7ma.svelte-176e7ma{box-sizing:content-box}figure.before-after-container.svelte-176e7ma img.svelte-176e7ma{top:0;left:0;z-index:20;-webkit-user-select:none;-moz-user-select:none;user-select:none}figure.before-after-container.svelte-176e7ma img.after.svelte-176e7ma{z-index:21}figure.before-after-container.svelte-176e7ma img.before.svelte-176e7ma{z-index:22}figure.before-after-container.svelte-176e7ma .overlay-container.svelte-176e7ma{position:absolute}figure.before-after-container.svelte-176e7ma .overlay-container.svelte-176e7ma :first-child{margin-top:0}figure.before-after-container.svelte-176e7ma .overlay-container.svelte-176e7ma :last-child{margin-bottom:0}figure.before-after-container.svelte-176e7ma .overlay-container.before.svelte-176e7ma{left:0;z-index:23}figure.before-after-container.svelte-176e7ma .overlay-container.after.svelte-176e7ma{right:0;z-index:21}.handle.svelte-176e7ma.svelte-176e7ma{z-index:30;width:40px;height:40px;cursor:move;background:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:absolute;border-radius:50px;top:calc(50% - 20px);border:4px solid var(--before-after-handle-colour);opacity:var(--before-after-handle-inactive-opacity, .6);box-shadow:1px 1px 3px #333}.handle.svelte-176e7ma.svelte-176e7ma:hover,.handle.svelte-176e7ma.svelte-176e7ma:active,.handle.svelte-176e7ma.svelte-176e7ma:focus{opacity:1}.handle.svelte-176e7ma.svelte-176e7ma:before,.handle.svelte-176e7ma.svelte-176e7ma:after{content:"";box-shadow:0 0 3px #333;height:9999px;position:absolute;left:calc(50% - 2px);border:2px solid var(--before-after-handle-colour)}.handle.svelte-176e7ma.svelte-176e7ma:before{top:40px}.handle.svelte-176e7ma.svelte-176e7ma:after{bottom:40px}.handle.svelte-176e7ma .arrow-right.svelte-176e7ma,.handle.svelte-176e7ma .arrow-left.svelte-176e7ma{width:0;height:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;border-top:10px solid transparent;border-bottom:10px solid transparent}.handle.svelte-176e7ma .arrow-right.svelte-176e7ma{left:19px;bottom:14px;border-left:10px solid var(--before-after-handle-colour)}.handle.svelte-176e7ma .arrow-left.svelte-176e7ma{left:3px;top:6px;border-right:10px solid var(--before-after-handle-colour)}aside.before-after-caption.svelte-176e7ma p{font-family:var(--theme-font-family-note);color:var(--theme-colour-text-secondary);font-size:var(--theme-font-size-xs);line-height:1.15;font-weight:400;margin-top:clamp(.31rem,.29rem + .1vw,.38rem);margin-bottom:clamp(.31rem,.29rem + .1vw,.38rem)}

View file

@ -1 +0,0 @@
figure.before-after-container.svelte-35dp01.svelte-35dp01{overflow:hidden;position:relative;box-sizing:content-box;margin:0 auto}figure.before-after-container.svelte-35dp01 img.svelte-35dp01{top:0;left:0;z-index:20;margin:0;display:block;max-width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:cover;object-fit:cover;position:absolute}figure.before-after-container.svelte-35dp01 img.after.svelte-35dp01{z-index:21}figure.before-after-container.svelte-35dp01 img.before.svelte-35dp01{z-index:22}figure.before-after-container.svelte-35dp01 .overlay-container.svelte-35dp01{position:absolute}figure.before-after-container.svelte-35dp01 .overlay-container.svelte-35dp01 p{font-family:var(--theme-font-family-note, "Knowledge", "Source Sans Pro", Arial, sans-serif);font-size:1rem;line-height:1.2rem}figure.before-after-container.svelte-35dp01 .overlay-container.svelte-35dp01 p:last-child{margin-bottom:0}figure.before-after-container.svelte-35dp01 .overlay-container.before.svelte-35dp01{left:0;z-index:23}figure.before-after-container.svelte-35dp01 .overlay-container.after.svelte-35dp01{right:0;z-index:21}.handle.svelte-35dp01.svelte-35dp01{z-index:30;width:40px;height:40px;cursor:move;background:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:absolute;border-radius:50px;top:calc(50% - 20px);border:4px solid var(--before-after-handle-colour);opacity:var(--before-after-handle-inactive-opacity, .6)}.handle.svelte-35dp01.svelte-35dp01:hover,.handle.svelte-35dp01.svelte-35dp01:active,.handle.svelte-35dp01.svelte-35dp01:focus{opacity:1}.handle.svelte-35dp01.svelte-35dp01:before,.handle.svelte-35dp01.svelte-35dp01:after{content:"";height:9999px;position:absolute;left:calc(50% - 2px);border:2px solid var(--before-after-handle-colour)}.handle.svelte-35dp01.svelte-35dp01:before{top:40px}.handle.svelte-35dp01.svelte-35dp01:after{bottom:40px}.handle.svelte-35dp01 .arrow-right.svelte-35dp01,.handle.svelte-35dp01 .arrow-left.svelte-35dp01{width:0;height:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;border-top:10px solid transparent;border-bottom:10px solid transparent}.handle.svelte-35dp01 .arrow-right.svelte-35dp01{left:19px;bottom:14px;border-left:10px solid var(--before-after-handle-colour)}.handle.svelte-35dp01 .arrow-left.svelte-35dp01{left:3px;top:6px;border-right:10px solid var(--before-after-handle-colour)}aside.before-after-caption.svelte-35dp01.svelte-35dp01{margin:0 auto;font-family:var(--theme-font-family-note, "Knowledge", "Source Sans Pro", Arial, sans-serif);color:var(--theme-colour-text-secondary, #666666)}aside.before-after-caption.svelte-35dp01 p{font-family:var(--theme-font-family-note, "Knowledge", "Source Sans Pro", Arial, sans-serif);color:var(--theme-colour-text-secondary, #666666);font-size:.9rem;line-height:1.2rem}aside.before-after-caption.svelte-35dp01 p:last-of-type{margin-bottom:0}@media (max-width: 540px){aside.before-after-caption.svelte-35dp01 p{font-size:.8rem;line-height:1.1rem}}aside.before-after-caption.svelte-35dp01 p a{color:currentColor;text-decoration:underline}aside.before-after-caption.svelte-35dp01 p a:hover{text-decoration:underline}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
.paragraph-size.svelte-1dum52o{font-size:1.3rem;line-height:2.1rem}.paragraph-size.font-sans.svelte-1dum52o{font-size:1.1rem;line-height:1.75rem}@media (max-width: 540px){.paragraph-size.svelte-1dum52o{font-size:1.1rem;line-height:1.8rem}.paragraph-size.font-sans.svelte-1dum52o{font-size:1rem;line-height:1.6rem}}.paragraph-size.important.svelte-1dum52o{font-size:1.3rem!important;line-height:2.1rem!important}.paragraph-size.important.font-sans.svelte-1dum52o{font-size:1.1rem!important;line-height:1.8rem!important}@media (max-width: 540px){.paragraph-size.important.svelte-1dum52o{font-size:1.1rem!important;line-height:1.8rem!important}.paragraph-size.important.font-sans.svelte-1dum52o{font-size:1rem!important;line-height:1.6rem!important}}.small-size.svelte-1dum52o{font-size:.9rem;line-height:1.2rem}@media (max-width: 540px){.small-size.svelte-1dum52o{font-size:.8rem;line-height:1.1rem}}.small-size.important.svelte-1dum52o{font-size:.9rem!important;line-height:1.2rem!important}@media (max-width: 540px){.small-size.important.svelte-1dum52o{font-size:.8rem!important;line-height:1.1rem!important}}.blockquote-size.svelte-1dum52o{font-size:1.6rem;line-height:2.1rem}@media (max-width: 540px){.blockquote-size.svelte-1dum52o{font-size:1.3rem;line-height:1.9rem}}.blockquote-size.important.svelte-1dum52o{font-size:1.6rem!important;line-height:2rem!important}@media (max-width: 540px){.blockquote-size.important.svelte-1dum52o{font-size:1.3rem!important;line-height:1.8rem!important}}div.article-block.svelte-1dum52o{max-width:var(--normal-column-width, 660px);margin-left:auto;margin-right:auto;margin-top:0}div.article-block.svelte-1dum52o:not(:last-child){margin-bottom:3rem}div.article-block.narrower.svelte-1dum52o{max-width:var(--narrower-column-width, 330px)}div.article-block.narrow.svelte-1dum52o{max-width:var(--narrow-column-width, 510px)}div.article-block.wide.svelte-1dum52o{max-width:var(--wide-column-width, 930px)}div.article-block.wider.svelte-1dum52o{max-width:var(--wider-column-width, 1200px)}div.article-block.widest.svelte-1dum52o{max-width:100%}div.article-block.fluid.svelte-1dum52o{width:calc(100% + 30px);margin-left:-15px;max-width:none}div.article-block.snap.svelte-1dum52o{width:330px}@media (min-width: 540px){div.article-block.snap.svelte-1dum52o:not(.skip-narrow){width:510px}}@media (min-width: 690px){div.article-block.snap.svelte-1dum52o:not(.skip-normal){width:660px}}@media (min-width: 360px){div.article-block.snap.narrower.svelte-1dum52o{width:330px}}@media (min-width: 540px){div.article-block.snap.narrow.svelte-1dum52o{width:510px}}@media (min-width: 960px){div.article-block.snap.wide.svelte-1dum52o{width:930px}}@media (min-width: 960px){div.article-block.snap.wider.svelte-1dum52o:not(.skip-wide){width:930px}}@media (min-width: 1230px){div.article-block.snap.wider.svelte-1dum52o:not(.skip-wider){width:1200px}}div.article-block.snap.widest.svelte-1dum52o,div.article-block.snap.fluid.svelte-1dum52o{width:inherit}div.article-block.snap.fluid.svelte-1dum52o{width:calc(100% + 30px)}

View file

@ -0,0 +1 @@
.article-block.svelte-qq8g3k{max-width:var(--normal-column-width, 660px)}.article-block.narrower.svelte-qq8g3k{max-width:var(--narrower-column-width, 330px)}.article-block.narrow.svelte-qq8g3k{max-width:var(--narrow-column-width, 510px)}.article-block.wide.svelte-qq8g3k{max-width:var(--wide-column-width, 930px)}.article-block.wider.svelte-qq8g3k{max-width:var(--wider-column-width, 1200px)}.article-block.widest.svelte-qq8g3k{max-width:100%}.article-block.fluid.svelte-qq8g3k{width:calc(100% + 30px);margin-left:-15px;max-width:none}.article-block.snap.svelte-qq8g3k{width:330px}@media (min-width: 540px){.article-block.snap.svelte-qq8g3k:not(.skip-narrow){width:510px}}@media (min-width: 690px){.article-block.snap.svelte-qq8g3k:not(.skip-normal){width:660px}}@media (min-width: 360px){.article-block.snap.narrower.svelte-qq8g3k{width:330px}}@media (min-width: 540px){.article-block.snap.narrow.svelte-qq8g3k{width:510px}}@media (min-width: 960px){.article-block.snap.wide.svelte-qq8g3k{width:930px}}@media (min-width: 960px){.article-block.snap.wider.svelte-qq8g3k:not(.skip-wide){width:930px}}@media (min-width: 1230px){.article-block.snap.wider.svelte-qq8g3k:not(.skip-wider){width:1200px}}.article-block.snap.widest.svelte-qq8g3k,.article-block.snap.fluid.svelte-qq8g3k{width:inherit}.article-block.snap.fluid.svelte-qq8g3k{width:calc(100% + 30px)}

View file

@ -1,2 +0,0 @@
import{S as y,i as k,s as m,q as _,w as h,x as d,y as b,a as p,u as w,r as g,v,b as A,t as S,d as V}from"./index-25af778d.js";function L(l){let e,n,s;const r=l[7].default,i=_(r,l,l[6],null);return{c(){e=h("div"),i&&i.c(),d(e,"id",l[1]),d(e,"class",n="article-block "+l[0]+" "+l[2]+" svelte-1dum52o"),d(e,"role",l[4]),d(e,"aria-label",l[5]),b(e,"snap",l[3]&&l[0]!=="fluid"&&l[0]!=="widest")},m(t,o){p(t,e,o),i&&i.m(e,null),s=!0},p(t,[o]){i&&i.p&&(!s||o&64)&&w(i,r,t,t[6],s?v(r,t[6],o,null):g(t[6]),null),(!s||o&2)&&d(e,"id",t[1]),(!s||o&5&&n!==(n="article-block "+t[0]+" "+t[2]+" svelte-1dum52o"))&&d(e,"class",n),(!s||o&16)&&d(e,"role",t[4]),(!s||o&32)&&d(e,"aria-label",t[5]),(!s||o&13)&&b(e,"snap",t[3]&&t[0]!=="fluid"&&t[0]!=="widest")},i(t){s||(A(i,t),s=!0)},o(t){S(i,t),s=!1},d(t){t&&V(e),i&&i.d(t)}}}function R(l,e,n){let{$$slots:s={},$$scope:r}=e,{width:i="normal"}=e,{id:t=""}=e,{cls:o=""}=e,{snap:c=!1}=e,{role:f=null}=e,{ariaLabel:u=null}=e;return l.$$set=a=>{"width"in a&&n(0,i=a.width),"id"in a&&n(1,t=a.id),"cls"in a&&n(2,o=a.cls),"snap"in a&&n(3,c=a.snap),"role"in a&&n(4,f=a.role),"ariaLabel"in a&&n(5,u=a.ariaLabel),"$$scope"in a&&n(6,r=a.$$scope)},[i,t,o,c,f,u,r,s]}class j extends y{constructor(e){super(),k(this,e,R,L,m,{width:0,id:1,cls:2,snap:3,role:4,ariaLabel:5})}}j.__docgen={version:3,name:"Block.svelte",data:[{keywords:[],visibility:"public",description:"Width of the block within the article well.",name:"width",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:"normal"},{keywords:[],visibility:"public",description:"Add an id to the block tag to target it with custom CSS.",name:"id",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:""},{keywords:[],visibility:"public",description:"Add extra classes to the block tag to target it with custom CSS.",name:"cls",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:""},{keywords:[],visibility:"public",description:"Snap block to column widths, rather than fluidly resizing them.",name:"snap",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"boolean",type:"boolean"},defaultValue:!1},{keywords:[],visibility:"public",description:"ARIA [role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles) for the block",name:"role",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"},defaultValue:null},{keywords:[],visibility:"public",description:"ARIA [label](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) for the block",name:"ariaLabel",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"},defaultValue:null}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[{keywords:[],visibility:"public",description:"block content",name:"default"}],refs:[]};export{j as B};
//# sourceMappingURL=Block-9c89ee1a.js.map

View file

@ -1 +0,0 @@
{"version":3,"file":"Block-9c89ee1a.js","sources":["../../src/components/Block/Block.svelte"],"sourcesContent":["<!-- @component `Block` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/layout-block--default) -->\n<script lang=\"ts\">\n import type { ContainerWidth } from '../@types/global';\n\n /** Width of the block within the article well. */\n export let width: ContainerWidth = 'normal';\n\n /** Add an id to the block tag to target it with custom CSS. */\n export let id: string = '';\n /** Add extra classes to the block tag to target it with custom CSS. */\n export let cls: string = '';\n\n /** Snap block to column widths, rather than fluidly resizing them. */\n export let snap: boolean = false;\n\n /** ARIA [role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles) for the block */\n export let role: string | null = null;\n\n /** ARIA [label](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) for the block */\n export let ariaLabel: string | null = null;\n</script>\n\n<div\n id=\"{id}\"\n class=\"article-block {width} {cls}\"\n class:snap=\"{snap && width !== 'fluid' && width !== 'widest'}\"\n role=\"{role}\"\n aria-label=\"{ariaLabel}\"\n>\n <!-- block content -->\n <slot />\n</div>\n\n<style lang=\"scss\">\n @import '../../scss/mixins';\n\n div.article-block {\n max-width: var(--normal-column-width, 660px);\n margin-left: auto;\n margin-right: auto;\n margin-top: 0;\n &:not(:last-child) {\n margin-bottom: 3rem;\n }\n\n &.narrower {\n max-width: var(--narrower-column-width, 330px);\n }\n\n &.narrow {\n max-width: var(--narrow-column-width, 510px);\n }\n\n &.wide {\n max-width: var(--wide-column-width, 930px);\n }\n\n &.wider {\n max-width: var(--wider-column-width, 1200px);\n }\n\n &.widest {\n max-width: 100%;\n }\n\n &.fluid {\n width: calc(100% + 30px);\n margin-left: -15px;\n max-width: none;\n }\n\n // Only setup for the default column widths, b/c can't use\n // CSS vars in media queries.\n &.snap {\n @include block-snap-widths;\n }\n }\n</style>\n"],"names":["ctx","attr","div","div_class_value","toggle_class","insert","target","anchor","current","dirty","width","$$props","id","cls","snap","role","ariaLabel"],"mappings":"sOAuBOA,EAAE,CAAA,CAAA,EACeC,EAAAC,EAAA,QAAAC,EAAA,iBAAAH,SAAQA,EAAG,CAAA,EAAA,iBAAA,aAE1BA,EAAI,CAAA,CAAA,mBACEA,EAAS,CAAA,CAAA,EAFTI,EAAAF,EAAA,OAAAF,MAAQA,EAAK,CAAA,IAAK,SAAWA,OAAU,QAAQ,UAH9DK,EASKC,EAAAJ,EAAAK,CAAA,sHAREP,EAAE,CAAA,CAAA,GACe,CAAAQ,GAAAC,EAAA,GAAAN,KAAAA,EAAA,iBAAAH,SAAQA,EAAG,CAAA,EAAA,2DAE1BA,EAAI,CAAA,CAAA,+BACEA,EAAS,CAAA,CAAA,cAFTI,EAAAF,EAAA,OAAAF,MAAQA,EAAK,CAAA,IAAK,SAAWA,OAAU,QAAQ,qHApBjD,CAAA,MAAAU,EAAwB,QAAQ,EAAAC,EAGhC,CAAA,GAAAC,EAAa,EAAE,EAAAD,EAEf,CAAA,IAAAE,EAAc,EAAE,EAAAF,EAGhB,CAAA,KAAAG,EAAgB,EAAK,EAAAH,EAGrB,CAAA,KAAAI,EAAsB,IAAI,EAAAJ,EAG1B,CAAA,UAAAK,EAA2B,IAAI,EAAAL"}

View file

@ -0,0 +1,2 @@
import{S as y,i as k,s as m,l as _,o as h,b as d,p as b,d as p,u as g,q as w,r as v,t as A,h as S,f as q}from"./index-df681c7c.js";function V(l){let e,n,s;const r=l[7].default,i=_(r,l,l[6],null);return{c(){e=h("div"),i&&i.c(),d(e,"id",l[1]),d(e,"class",n="article-block fmx-auto "+l[0]+" "+l[2]+" svelte-qq8g3k"),d(e,"role",l[4]),d(e,"aria-label",l[5]),b(e,"snap",l[3]&&l[0]!=="fluid"&&l[0]!=="widest")},m(t,o){p(t,e,o),i&&i.m(e,null),s=!0},p(t,[o]){i&&i.p&&(!s||o&64)&&g(i,r,t,t[6],s?v(r,t[6],o,null):w(t[6]),null),(!s||o&2)&&d(e,"id",t[1]),(!s||o&5&&n!==(n="article-block fmx-auto "+t[0]+" "+t[2]+" svelte-qq8g3k"))&&d(e,"class",n),(!s||o&16)&&d(e,"role",t[4]),(!s||o&32)&&d(e,"aria-label",t[5]),(!s||o&13)&&b(e,"snap",t[3]&&t[0]!=="fluid"&&t[0]!=="widest")},i(t){s||(A(i,t),s=!0)},o(t){S(i,t),s=!1},d(t){t&&q(e),i&&i.d(t)}}}function L(l,e,n){let{$$slots:s={},$$scope:r}=e,{width:i="normal"}=e,{id:t=""}=e,{class:o=""}=e,{snap:c=!1}=e,{role:f=null}=e,{ariaLabel:u=null}=e;return l.$$set=a=>{"width"in a&&n(0,i=a.width),"id"in a&&n(1,t=a.id),"class"in a&&n(2,o=a.class),"snap"in a&&n(3,c=a.snap),"role"in a&&n(4,f=a.role),"ariaLabel"in a&&n(5,u=a.ariaLabel),"$$scope"in a&&n(6,r=a.$$scope)},[i,t,o,c,f,u,r,s]}class R extends y{constructor(e){super(),k(this,e,L,V,m,{width:0,id:1,class:2,snap:3,role:4,ariaLabel:5})}}R.__docgen={version:3,name:"Block.svelte",data:[{keywords:[],visibility:"public",description:"Width of the block within the article well.",name:"width",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:"normal"},{keywords:[],visibility:"public",description:"Add an id to the block tag to target it with custom CSS.",name:"id",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:""},{visibility:"public",description:"Add extra classes to the block tag to target it with custom CSS.",keywords:[],name:"class",kind:"const",static:!1,readonly:!0,type:{kind:"type",text:"string",type:"string"},localName:"cls",defaultValue:""},{keywords:[],visibility:"public",description:"Snap block to column widths, rather than fluidly resizing them.",name:"snap",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"boolean",type:"boolean"},defaultValue:!1},{keywords:[],visibility:"public",description:"ARIA [role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles) for the block",name:"role",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"},defaultValue:null},{keywords:[],visibility:"public",description:"ARIA [label](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) for the block",name:"ariaLabel",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"object",type:"object"},defaultValue:null}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[{keywords:[],visibility:"public",description:"block content",name:"default"}],refs:[]};export{R as B};
//# sourceMappingURL=Block-f95db830.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"Block-f95db830.js","sources":["../../src/components/Block/Block.svelte"],"sourcesContent":["<!-- @component `Block` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/layout-block--default) -->\n<script lang=\"ts\">\n import type { ContainerWidth } from '../@types/global';\n\n /** Width of the block within the article well. */\n export let width: ContainerWidth = 'normal';\n\n /** Add an id to the block tag to target it with custom CSS. */\n export let id: string = '';\n\n /** Add extra classes to the block tag to target it with custom CSS. */\n let cls: string = '';\n export { cls as class };\n\n /** Snap block to column widths, rather than fluidly resizing them. */\n export let snap: boolean = false;\n\n /** ARIA [role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles) for the block */\n export let role: string | null = null;\n\n /** ARIA [label](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) for the block */\n export let ariaLabel: string | null = null;\n</script>\n\n<div\n id=\"{id}\"\n class=\"article-block fmx-auto {width} {cls}\"\n class:snap=\"{snap && width !== 'fluid' && width !== 'widest'}\"\n role=\"{role}\"\n aria-label=\"{ariaLabel}\"\n>\n <!-- block content -->\n <slot />\n</div>\n\n<style lang=\"scss\">\n @import '../../scss/mixins';\n\n .article-block {\n max-width: var(--normal-column-width, 660px);\n\n &.narrower {\n max-width: var(--narrower-column-width, 330px);\n }\n\n &.narrow {\n max-width: var(--narrow-column-width, 510px);\n }\n\n &.wide {\n max-width: var(--wide-column-width, 930px);\n }\n\n &.wider {\n max-width: var(--wider-column-width, 1200px);\n }\n\n &.widest {\n max-width: 100%;\n }\n\n &.fluid {\n width: calc(100% + 30px);\n margin-left: -15px;\n max-width: none;\n }\n\n // Only setup for the default column widths, b/c can't use\n // CSS vars in media queries.\n &.snap {\n @include block-snap-widths;\n }\n }\n</style>\n"],"names":["ctx","attr","div","div_class_value","toggle_class","insert","target","anchor","current","dirty","width","$$props","id","cls","snap","role","ariaLabel"],"mappings":"2OAyBOA,EAAE,CAAA,CAAA,EACwBC,EAAAC,EAAA,QAAAC,EAAA,0BAAAH,SAAQA,EAAG,CAAA,EAAA,gBAAA,aAEnCA,EAAI,CAAA,CAAA,mBACEA,EAAS,CAAA,CAAA,EAFTI,EAAAF,EAAA,OAAAF,MAAQA,EAAK,CAAA,IAAK,SAAWA,OAAU,QAAQ,UAH9DK,EASKC,EAAAJ,EAAAK,CAAA,sHAREP,EAAE,CAAA,CAAA,GACwB,CAAAQ,GAAAC,EAAA,GAAAN,KAAAA,EAAA,0BAAAH,SAAQA,EAAG,CAAA,EAAA,0DAEnCA,EAAI,CAAA,CAAA,+BACEA,EAAS,CAAA,CAAA,cAFTI,EAAAF,EAAA,OAAAF,MAAQA,EAAK,CAAA,IAAK,SAAWA,OAAU,QAAQ,qHAtBjD,CAAA,MAAAU,EAAwB,QAAQ,EAAAC,EAGhC,CAAA,GAAAC,EAAa,EAAE,EAAAD,EAGtB,CAAA,MAAAE,EAAc,EAAE,EAAAF,EAIT,CAAA,KAAAG,EAAgB,EAAK,EAAAH,EAGrB,CAAA,KAAAI,EAAsB,IAAI,EAAAJ,EAG1B,CAAA,UAAAK,EAA2B,IAAI,EAAAL"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
#block-demo-article{background-color:#ddd;position:relative;width:calc(100% + 30px);margin-left:-15px}#block-demo-article .article-boundaries{padding:0 0 18px;width:100%;height:100%;background-color:#bbb}#block-demo-article div.article-block{height:100px;background:#81a1c1}#block-demo-article div.article-block.block-snap-widths-demo{margin-bottom:2px;height:40px;font-size:11px}#block-demo-article div.article-block.block-snap-widths-demo.even{background:rgb(211,132,123)}#block-demo-article .label,#block-demo-article div.article-block.block-snap-widths-demo{padding-left:3px;color:#fff}div.container-fluid.svelte-ku86hf.svelte-ku86hf.svelte-ku86hf{padding:25px 0}div.container-fluid.svelte-ku86hf div.row.svelte-ku86hf>div.svelte-ku86hf{background-color:#d3847b;border:1px solid white;border-radius:4px;padding:20px;color:#fff;text-align:center}div.container-fluid.svelte-ku86hf div.row:first-child div.svelte-ku86hf.svelte-ku86hf{background:#81a1c1}
#block-demo-article{background-color:#ddd;position:relative;width:calc(100% + 30px);margin-left:-15px}#block-demo-article .article-boundaries{padding:0 0 18px;width:100%;height:100%;background-color:#bbb}#block-demo-article div.article-block{height:100px;background:#81a1c1}#block-demo-article div.article-block.block-snap-widths-demo{margin-bottom:2px;height:40px;font-size:11px}#block-demo-article div.article-block.block-snap-widths-demo.even{background:rgb(211,132,123)}#block-demo-article .label,#block-demo-article div.article-block.block-snap-widths-demo{padding-left:3px;color:#fff}div#block-flex-example.svelte-1s74e5w.svelte-1s74e5w.svelte-1s74e5w{padding:25px 0}div#block-flex-example.svelte-1s74e5w div.row.svelte-1s74e5w.svelte-1s74e5w{display:flex}div#block-flex-example.svelte-1s74e5w div.row.svelte-1s74e5w>div.svelte-1s74e5w{background-color:#d3847b;border:1px solid white;border-radius:4px;padding:20px;color:#fff;text-align:center;flex-grow:1}div#block-flex-example.svelte-1s74e5w div.row:first-child div.svelte-1s74e5w.svelte-1s74e5w{background:#81a1c1}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,2 @@
import{S as m,i as u,s as p,g as y,m as _,t as k,h as g,j as b,k as c,d,f,H as w}from"./index-df681c7c.js";import{m as o}from"./marked.esm-76161808.js";import{B as h}from"./Block-f95db830.js";function r(a){let s,t=o.parse(a[0])+"",e;return{c(){s=new w(!1),e=c(),s.a=e},m(i,n){s.m(t,i,n),d(i,e,n)},p(i,n){n&1&&t!==(t=o.parse(i[0])+"")&&s.p(t)},d(i){i&&(f(e),s.d())}}}function S(a){let s,t=a[0]&&r(a);return{c(){t&&t.c(),s=c()},m(e,i){t&&t.m(e,i),d(e,s,i)},p(e,i){e[0]?t?t.p(e,i):(t=r(e),t.c(),t.m(s.parentNode,s)):t&&(t.d(1),t=null)},d(e){e&&f(s),t&&t.d(e)}}}function v(a){let s,t;return s=new h({props:{id:a[2],class:"fmy-6 "+a[1],$$slots:{default:[S]},$$scope:{ctx:a}}}),{c(){y(s.$$.fragment)},m(e,i){_(s,e,i),t=!0},p(e,[i]){const n={};i&4&&(n.id=e[2]),i&2&&(n.class="fmy-6 "+e[1]),i&9&&(n.$$scope={dirty:i,ctx:e}),s.$set(n)},i(e){t||(k(s.$$.fragment,e),t=!0)},o(e){g(s.$$.fragment,e),t=!1},d(e){b(s,e)}}}function x(a,s,t){let{text:e}=s,{class:i=""}=s,{id:n=""}=s;return a.$$set=l=>{"text"in l&&t(0,e=l.text),"class"in l&&t(1,i=l.class),"id"in l&&t(2,n=l.id)},[e,i,n]}class B extends m{constructor(s){super(),u(this,s,x,v,p,{text:0,class:1,id:2})}}B.__docgen={version:3,name:"BodyText.svelte",data:[{keywords:[{name:"type",description:"{string}"},{name:"required",description:""}],visibility:"public",description:"A markdown text string.",name:"text",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"}},{visibility:"public",description:"Add a class to target with SCSS.",keywords:[],name:"class",kind:"const",static:!1,readonly:!0,type:{kind:"type",text:"string",type:"string"},localName:"cls",defaultValue:""},{keywords:[],visibility:"public",description:"Add an id to the block tag to target it with custom CSS.",name:"id",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:""}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};export{B};
//# sourceMappingURL=BodyText-a03ab6b1.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"BodyText-a03ab6b1.js","sources":["../../src/components/BodyText/BodyText.svelte"],"sourcesContent":["<!-- @component `BodyText` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-bodytext--default) -->\n<script lang=\"ts\">\n /**\n * A markdown text string.\n * @type {string}\n * @required\n */\n export let text: string;\n\n /** Add a class to target with SCSS. */\n let cls: string = '';\n export { cls as class };\n\n /** Add an id to the block tag to target it with custom CSS. */\n export let id: string = '';\n\n import { marked } from 'marked';\n import Block from '../Block/Block.svelte';\n</script>\n\n<Block id=\"{id}\" class=\"fmy-6 {cls}\">\n {#if text}\n {@html marked.parse(text)}\n {/if}\n</Block>\n"],"names":["marked","ctx","html_tag","raw_value","create_if_block","text","$$props","cls","id"],"mappings":"sNAsBWA,EAAO,MAAMC,EAAI,CAAA,CAAA,EAAA,wFAAjBD,EAAO,MAAMC,EAAI,CAAA,CAAA,EAAA,KAAAC,EAAA,EAAAC,CAAA,gDADrBF,EAAI,CAAA,GAAAG,EAAAH,CAAA,iEAAJA,EAAI,CAAA,6IADCA,EAAE,CAAA,iBAAiBA,EAAG,CAAA,uHAAtBA,EAAE,CAAA,0BAAiBA,EAAG,CAAA,oJAbrB,KAAAI,CAAY,EAAAC,EAGnB,CAAA,MAAAC,EAAc,EAAE,EAAAD,EAIT,CAAA,GAAAE,EAAa,EAAE,EAAAF"}

View file

@ -1,2 +0,0 @@
import{S as f,i as p,s as d,j as _,m as u,b as y,t as $,n as k,e as l,a as c,d as m,W as x}from"./index-25af778d.js";import{m as r}from"./marked.esm-76161808.js";import{B as b}from"./Block-9c89ee1a.js";function a(o){let s,t=r.parse(o[0])+"",e;return{c(){s=new x(!1),e=l(),s.a=e},m(n,i){s.m(t,n,i),c(n,e,i)},p(n,i){i&1&&t!==(t=r.parse(n[0])+"")&&s.p(t)},d(n){n&&m(e),n&&s.d()}}}function g(o){let s,t=o[0]&&a(o);return{c(){t&&t.c(),s=l()},m(e,n){t&&t.m(e,n),c(e,s,n)},p(e,n){e[0]?t?t.p(e,n):(t=a(e),t.c(),t.m(s.parentNode,s)):t&&(t.d(1),t=null)},d(e){t&&t.d(e),e&&m(s)}}}function v(o){let s,t;return s=new b({props:{cls:"body-text",$$slots:{default:[g]},$$scope:{ctx:o}}}),{c(){_(s.$$.fragment)},m(e,n){u(s,e,n),t=!0},p(e,[n]){const i={};n&3&&(i.$$scope={dirty:n,ctx:e}),s.$set(i)},i(e){t||(y(s.$$.fragment,e),t=!0)},o(e){$(s.$$.fragment,e),t=!1},d(e){k(s,e)}}}function w(o,s,t){let{text:e}=s;return o.$$set=n=>{"text"in n&&t(0,e=n.text)},[e]}class B extends f{constructor(s){super(),p(this,s,w,v,d,{text:0})}}B.__docgen={version:3,name:"BodyText.svelte",data:[{keywords:[{name:"type",description:"{string}"},{name:"required",description:""}],visibility:"public",description:"A markdown text string.",name:"text",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"}}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};export{B};
//# sourceMappingURL=BodyText-a712211f.js.map

View file

@ -1 +0,0 @@
{"version":3,"file":"BodyText-a712211f.js","sources":["../../src/components/BodyText/BodyText.svelte"],"sourcesContent":["<!-- @component `BodyText` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-bodytext--default) -->\n<script lang=\"ts\">\n /**\n * A markdown text string.\n * @type {string}\n * @required\n */\n export let text: string;\n\n import { marked } from 'marked';\n import Block from '../Block/Block.svelte';\n</script>\n\n<Block cls=\"body-text\">\n {#if text}\n {@html marked.parse(text)}\n {/if}\n</Block>\n\n<!-- svelte-ignore css-unused-selector -->\n<style lang=\"scss\" global>\n // Technically... we probably should unbind these styles from the component\n // and import them in the app through a separate scss file.\n @import '../../scss/mixins';\n\n div.article-block.body-text {\n @include body-text;\n }\n</style>\n"],"names":["marked","ctx","html_tag","raw_value","create_if_block","text","$$props"],"mappings":"gOAeWA,EAAO,MAAMC,EAAI,CAAA,CAAA,EAAA,wFAAjBD,EAAO,MAAMC,EAAI,CAAA,CAAA,EAAA,KAAAC,EAAA,EAAAC,CAAA,iDADrBF,EAAI,CAAA,GAAAG,EAAAH,CAAA,iEAAJA,EAAI,CAAA,qZAPE,KAAAI,CAAY,EAAAC"}

View file

@ -0,0 +1 @@
@charset "UTF-8";.body-text-typography-example-story blockquote:before,.body-text-typography-example-story h6:before,.body-text-typography-example-story h5:before,.body-text-typography-example-story h4:before,.body-text-typography-example-story h3:before,.body-text-typography-example-story h2:before{position:absolute;top:0;left:-50px;text-align:right;display:block;width:40px;color:#ddd;padding:2px 5px;border-radius:4px;font-weight:800;line-height:1}.body-text-typography-example-story blockquote:hover:before,.body-text-typography-example-story h6:hover:before,.body-text-typography-example-story h5:hover:before,.body-text-typography-example-story h4:hover:before,.body-text-typography-example-story h3:hover:before,.body-text-typography-example-story h2:hover:before{color:#999}@media (max-width: 800px){.body-text-typography-example-story blockquote:before,.body-text-typography-example-story h6:before,.body-text-typography-example-story h5:before,.body-text-typography-example-story h4:before,.body-text-typography-example-story h3:before,.body-text-typography-example-story h2:before{color:#fff!important}}.body-text-typography-example-story h2{position:relative}.body-text-typography-example-story h2:before{content:"H2";font-size:22px}.body-text-typography-example-story h3{position:relative}.body-text-typography-example-story h3:before{content:"H3";font-size:19px}.body-text-typography-example-story h4{position:relative}.body-text-typography-example-story h4:before{content:"H4";font-size:16px}.body-text-typography-example-story h5{position:relative}.body-text-typography-example-story h5:before{content:"H5";font-size:15px}.body-text-typography-example-story h6{position:relative}.body-text-typography-example-story h6:before{content:"H6";font-size:12px}.body-text-typography-example-story blockquote{position:relative}.body-text-typography-example-story blockquote:before{content:"“";font-size:3rem;line-height:3rem}.body-text-typography-example-story blockquote blockquote:before{display:none}

View file

@ -1,41 +0,0 @@
import{S as C,i as S,s as j,p as w,j as c,D as k,m as i,a as x,k as T,l as B,b as u,t as d,n as f,d as y}from"./index-25af778d.js";import{p as M,M as F,T as I,S as q}from"./collect-stories-cce06d4a.js";import{B as g}from"./BodyText-a712211f.js";import{w as _}from"./withParams-90715500.js";import"./marked.esm-76161808.js";import"./Block-9c89ee1a.js";const b=`The \`BodyText\` creates the main text of your page. You can pass the \`text\` prop a [markdown-formatted](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) string, which will be parsed into paragraphs, headers, lists, blockquotes or whatever else you need.
Use it like this:
\`\`\`html
<script>
import { BodyText } from '@reuters-graphics/graphics-components';
const markdownText = \`Bacon ipsum **dolor amet** cow tongue tri-tip.
Biltong turducken ground round kevin [hamburger turkey](https://reuters.com) pig.
Venison shoulder *ham hock ham leberkas*. Flank beef ribs fatback, jerky meatball ham hock.\`;
<\/script>
<BodyText text="{markdownText}" />
\`\`\`
... or more commonly, you'll use it with a Google doc in the Graphics Kit like this:
\`\`\`html
<script>
import { BodyText } from '@reuters-graphics/graphics-components';
import content from '$locales/en/content.json';
<\/script>
{#each content.blocks as block} {#if block.Type === 'text'}
<BodyText text="{block.Text}" />
{/if} {/each}
\`\`\`
`;function A(l){let o,a;const n=[l[0]];let m={};for(let e=0;e<n.length;e+=1)m=w(m,n[e]);return o=new g({props:m}),{c(){c(o.$$.fragment)},m(e,r){i(o,e,r),a=!0},p(e,r){const p=r&1?T(n,[B(e[0])]):{};o.$set(p)},i(e){a||(u(o.$$.fragment,e),a=!0)},o(e){d(o.$$.fragment,e),a=!1},d(e){f(o,e)}}}function G(l){let o,a,n,m,e,r;const p=[{title:"Components/BodyText"},{component:g},_(b)];let h={};for(let t=0;t<p.length;t+=1)h=w(h,p[t]);return o=new F({props:h}),n=new I({props:{$$slots:{default:[A,({args:t})=>({0:t}),({args:t})=>t?1:0]},$$scope:{ctx:l}}}),e=new q({props:{name:"Default",args:{text:`Bacon ipsum **dolor amet** cow tongue tri-tip.
Biltong turducken ground round kevin [hamburger turkey](https://reuters.com) pig.
- Steak
- [Pork chop](https://www.google.com)
- Fillet
Venison shoulder *ham hock ham leberkas*. Flank beef ribs fatback, jerky meatball ham hock.`}}}),{c(){c(o.$$.fragment),a=k(),c(n.$$.fragment),m=k(),c(e.$$.fragment)},m(t,s){i(o,t,s),x(t,a,s),i(n,t,s),x(t,m,s),i(e,t,s),r=!0},p(t,[s]){const v=s&0?T(p,[p[0],s&0&&{component:g},s&0&&B(_(b))]):{};o.$set(v);const $={};s&3&&($.$$scope={dirty:s,ctx:t}),n.$set($)},i(t){r||(u(o.$$.fragment,t),u(n.$$.fragment,t),u(e.$$.fragment,t),r=!0)},o(t){d(o.$$.fragment,t),d(n.$$.fragment,t),d(e.$$.fragment,t),r=!1},d(t){f(o,t),t&&y(a),f(n,t),t&&y(m),f(e,t)}}}class V extends C{constructor(o){super(),S(this,o,null,G,j,{})}}const D=M(V,{meta:{title:"Components/BodyText"},stories:{"tpl:default":{storyId:"components-bodytext--default",name:"default",template:!0,source:"<BodyText {...args} />",hasArgs:!0},Default:{storyId:"components-bodytext--default",name:"Default",template:!1,hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","BodyText","withComponentDocs"]}),z=D.meta,H=["Default"],J=D.stories.Default;export{J as Default,H as __namedExportsOrder,z as default};
//# sourceMappingURL=BodyText.stories-bcc1a2cb.js.map

View file

@ -1 +0,0 @@
{"version":3,"file":"BodyText.stories-bcc1a2cb.js","sources":["../../src/components/BodyText/stories/docs/component.md?raw","../../src/components/BodyText/BodyText.stories.svelte"],"sourcesContent":["export default \"The `BodyText` creates the main text of your page. You can pass the `text` prop a [markdown-formatted](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) string, which will be parsed into paragraphs, headers, lists, blockquotes or whatever else you need.\\n\\nUse it like this:\\n\\n```html\\n<script>\\n import { BodyText } from '@reuters-graphics/graphics-components';\\n\\n const markdownText = `Bacon ipsum **dolor amet** cow tongue tri-tip.\\n \\n Biltong turducken ground round kevin [hamburger turkey](https://reuters.com) pig.\\n \\n Venison shoulder *ham hock ham leberkas*. Flank beef ribs fatback, jerky meatball ham hock.`;\\n</script>\\n\\n<BodyText text=\\\"{markdownText}\\\" />\\n```\\n\\n... or more commonly, you'll use it with a Google doc in the Graphics Kit like this:\\n\\n```html\\n<script>\\n import { BodyText } from '@reuters-graphics/graphics-components';\\n\\n import content from '$locales/en/content.json';\\n</script>\\n\\n{#each content.blocks as block} {#if block.Type === 'text'}\\n<BodyText text=\\\"{block.Text}\\\" />\\n{/if} {/each}\\n```\\n\"","<script>\n import { Meta, Template, Story } from '@storybook/addon-svelte-csf';\n\n // @ts-ignore\n import componentDocs from './stories/docs/component.md?raw';\n\n import BodyText from './BodyText.svelte';\n\n import { withComponentDocs } from '$lib/docs/utils/withParams.js';\n</script>\n\n<Meta\n title=\"Components/BodyText\"\n component=\"{BodyText}\"\n {...withComponentDocs(componentDocs)}\n/>\n\n<Template let:args>\n <BodyText {...args} />\n</Template>\n\n<Story\n name=\"Default\"\n args=\"{{\n text: `Bacon ipsum **dolor amet** cow tongue tri-tip.\n \n Biltong turducken ground round kevin [hamburger turkey](https://reuters.com) pig.\n\n - Steak\n - [Pork chop](https://www.google.com)\n - Fillet\n \n Venison shoulder *ham hock ham leberkas*. Flank beef ribs fatback, jerky meatball ham hock.`,\n }}\"\n/>\n"],"names":["componentDocs","ctx","BodyText","withComponentDocs","dirty","get_spread_object"],"mappings":"+VAAA,MAAeA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCCkBCC,EAAI,CAAA,CAAA,oJAAJA,EAAI,CAAA,CAAA,CAAA,CAAA,+KALNC,CAAQ,EAChBC,EAAkBH,CAAa,kNAUjC,KAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iRAXME,CAAQ,EAChBE,EAAA,GAAAC,EAAAF,EAAkBH,CAAa,CAAA"}

View file

@ -0,0 +1,92 @@
import{S as D,i as j,s as C,C as T,g as c,y as k,m,d as g,t as p,h as u,f as y,j as d}from"./index-df681c7c.js";import{g as q,a as A}from"./spread-8a54911c.js";import{p as M,M as F,T as V,S as w}from"./collect-stories-a6a786e2.js";import{B}from"./BodyText-a03ab6b1.js";import{w as I}from"./withParams-47e2ab71.js";import"./marked.esm-76161808.js";import"./Block-f95db830.js";const P=`The \`BodyText\` creates the main text of your page. You can pass the \`text\` prop a [markdown-formatted](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) string, which will be parsed into paragraphs, headers, lists, blockquotes or whatever else you need.
Use it like this:
\`\`\`svelte
<script>
import { BodyText } from '@reuters-graphics/graphics-components';
const markdownText = \`Bacon ipsum **dolor amet** cow tongue tri-tip.
Biltong turducken ground round kevin [hamburger turkey](https://reuters.com) pig.
Venison shoulder *ham hock ham leberkas*. Flank beef ribs fatback, jerky meatball ham hock.\`;
<\/script>
<BodyText text="{markdownText}" />
\`\`\`
... or more commonly, you'll use it with a Google doc in the Graphics Kit like this:
\`\`\`svelte
<script>
import { BodyText } from '@reuters-graphics/graphics-components';
import content from '$locales/en/content.json';
<\/script>
{#each content.blocks as block}
{#if block.Type === 'text'}
<BodyText text="{block.Text}" />
{/if}
{/each}
\`\`\`
`;function E(h){let o,n;const a=[h[0]];let l={};for(let t=0;t<a.length;t+=1)l=T(l,a[t]);return o=new B({props:l}),{c(){c(o.$$.fragment)},m(t,i){m(o,t,i),n=!0},p(t,i){const s=i&1?q(a,[A(t[0])]):{};o.$set(s)},i(t){n||(p(o.$$.fragment,t),n=!0)},o(t){u(o.$$.fragment,t),n=!1},d(t){d(o,t)}}}function G(h){let o,n,a,l,t,i,s,f;const x=[{title:"Components/BodyText"},{component:B},I(P)];let b={};for(let e=0;e<x.length;e+=1)b=T(b,x[e]);return o=new F({props:b}),a=new V({props:{$$slots:{default:[E,({args:e})=>({0:e}),({args:e})=>e?1:0]},$$scope:{ctx:h}}}),t=new w({props:{name:"Default",args:{text:`Bacon ipsum **dolor amet** cow tongue tri-tip.
Biltong turducken ground round kevin [hamburger turkey](https://reuters.com) pig.
- Steak
- [Pork chop](https://www.google.com)
- Fillet
Venison shoulder *ham hock ham leberkas*. Flank beef ribs fatback, jerky meatball ham hock.`}}}),s=new w({props:{name:"Typography sample",args:{class:"body-text-typography-example-story",text:`Reprehenderit hamburger pork bresaola, dolore chuck sirloin landjaeger ham hock [tempor meatball](https://baconipsum.com/) alcatra nostrud pork belly. Culpa pork belly doner ea jowl, elit deserunt leberkas cow shoulder ham hock dolore.
## Biltong turducken ground round kevin
Pig est irure buffalo ullamco. Sunt beef ribs tri-tip, chislic officia sint dolor. Spare ribs drumstick ground round, irure duis cillum id chicken est ipsum ut.
Qui cupidatat chislic buffalo consequat deserunt.
Andouille sint shankle quis velit nostrud chislic meatloaf culpa labore corned beef chuck spare ribs. Filet mignon eu shankle in, meatloaf ut dolor ham hock ut.
### Venison shoulder ham hock ham leberkas flank beef ribs fatback, jerky meatball ham hock
Biltong turducken ground round kevin [hamburger turkey](https://reuters.com) pig. Veniam laboris sunt chislic. Aute doner porchetta nulla, tongue venison ad ex in do.
- Steak
- Capicola
- [Pork chop](https://www.google.com)
- Fillet landjaeger commodo
Venison shoulder *ham hock ham leberkas*. Flank beef ribs fatback, jerky meatball ham hock.
Minim id buffalo dolore ad, **boudin chicken laboris** excepteur qui eiusmod.
#### Jerky prosciutto burgdoggen
Sirloin beef flank labore cillum venison pariatur cow nulla ut irure in consequat proident velit. Jerky meatball pig nulla irure laboris fatback et rump ut dolore.
Biltong enim consequat pork chop, flank ea.
> Officia ball tip sed tenderloin dolore. Est magna enim, turkey in turducken flank jowl ad lorem buffalo ground
> > Ronald McDonald
Flank bacon sint dolore porchetta strip steak. Tail capicola flank nostrud meatball consequat pastrami lorem cupidatat chuck drumstick ham hock bresaola sint.
##### Venison pork chop
Alcatra bacon mollit boudin. Capicola ut tongue biltong, cow cillum pariatur sausage.
1. Minim ribeye
2. Prosciutto laborum
3. Salami doner irure
Consectetur ribeye consequat pork capicola. T-bone ad laborum beef ribs picanha.
###### Alcatra bacon mollit boudin
Tempor tail doner chicken incididunt beef ribs. Ad ullamco in cupim venison. Leberkas rump ullamco adipisicing, laboris excepteur voluptate.
Ham hock id porchetta elit. Sint spare ribs aute buffalo.
`}}}),{c(){c(o.$$.fragment),n=k(),c(a.$$.fragment),l=k(),c(t.$$.fragment),i=k(),c(s.$$.fragment)},m(e,r){m(o,e,r),g(e,n,r),m(a,e,r),g(e,l,r),m(t,e,r),g(e,i,r),m(s,e,r),f=!0},p(e,[r]){const S={};o.$set(S);const _={};r&3&&(_.$$scope={dirty:r,ctx:e}),a.$set(_)},i(e){f||(p(o.$$.fragment,e),p(a.$$.fragment,e),p(t.$$.fragment,e),p(s.$$.fragment,e),f=!0)},o(e){u(o.$$.fragment,e),u(a.$$.fragment,e),u(t.$$.fragment,e),u(s.$$.fragment,e),f=!1},d(e){e&&(y(n),y(l),y(i)),d(o,e),d(a,e),d(t,e),d(s,e)}}}class v extends D{constructor(o){super(),j(this,o,null,G,C,{})}}v.__docgen={version:3,name:"BodyText.stories.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const $=M(v,{meta:{title:"Components/BodyText"},stories:{"tpl:default":{storyId:"components-bodytext--default",name:"default",template:!0,source:"<BodyText {...args} />",hasArgs:!0},Default:{storyId:"components-bodytext--default",name:"Default",template:!1,source:"",hasArgs:!1},TypographySample:{storyId:"components-bodytext--typography-sample",name:"Typography sample",template:!1,source:"",hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","BodyText","withComponentDocs"]}),U=$.meta,Y=["Default","TypographySample"],z=$.stories.Default,N=$.stories.TypographySample;export{z as Default,N as TypographySample,Y as __namedExportsOrder,U as default};
//# sourceMappingURL=BodyText.stories-ef49ba6a.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
@charset "UTF-8";@media (min-width: 330px){.dateline.svelte-fldifj div.svelte-fldifj:not(:last-child):after{content:"·";margin:0 2px 0 5px}}

View file

@ -0,0 +1,21 @@
import{S as v,i as A,s as C,C as B,g as p,y as d,m as f,d as y,t as u,h as c,f as D,j as $}from"./index-df681c7c.js";import{g as h,a as T}from"./spread-8a54911c.js";import{p as M,M as I,T as P,S as Z}from"./collect-stories-a6a786e2.js";import{B as b}from"./Byline-14f2730d.js";import{w as O}from"./withParams-47e2ab71.js";import"./each-e59479a4.js";import"./Block-f95db830.js";import"./_commonjsHelpers-de833af9.js";import"./journalize-07958dc6.js";const j=`Byline and dateline.
\`\`\`svelte
<script>
import { Byline } from '@reuters-graphics/graphics-components';
<\/script>
<Byline
authors="{[
'Dea Bankova',
'Aditi Bhandari',
'Prasanta Kumar Dutta',
'Anurag Rao',
'Mariano Zafra',
]}"
publishTime="2021-09-12T00:00:00.000Z"
updateTime="2021-09-12T12:57:00.000Z"
/>
\`\`\`
`;function k(m){let n,r;const a=[m[1]];let i={};for(let t=0;t<a.length;t+=1)i=B(i,a[t]);return n=new b({props:i}),{c(){p(n.$$.fragment)},m(t,o){f(n,t,o),r=!0},p(t,o){const l=o&2?h(a,[T(t[1])]):{};n.$set(l)},i(t){r||(u(n.$$.fragment,t),r=!0)},o(t){c(n.$$.fragment,t),r=!1},d(t){$(n,t)}}}function K(m){let n,r,a,i,t,o;const l=[{title:"Components/Byline"},{component:b},m[0]];let g={};for(let e=0;e<l.length;e+=1)g=B(g,l[e]);return n=new I({props:g}),a=new P({props:{$$slots:{default:[k,({args:e})=>({1:e}),({args:e})=>e?2:0]},$$scope:{ctx:m}}}),t=new Z({props:{name:"Default",args:{align:"left",authors:["Dea Bankova","Aditi Bhandari","Prasanta Kumar Dutta","Anurag Rao","Mariano Zafra"],publishTime:new Date("2021-09-12").toISOString(),updateTime:new Date("2021-09-12T13:57:00").toISOString()}}}),{c(){p(n.$$.fragment),r=d(),p(a.$$.fragment),i=d(),p(t.$$.fragment)},m(e,s){f(n,e,s),y(e,r,s),f(a,e,s),y(e,i,s),f(t,e,s),o=!0},p(e,[s]){const S=s&1?h(l,[l[0],l[1],T(e[0])]):{};n.$set(S);const _={};s&6&&(_.$$scope={dirty:s,ctx:e}),a.$set(_)},i(e){o||(u(n.$$.fragment,e),u(a.$$.fragment,e),u(t.$$.fragment,e),o=!0)},o(e){c(n.$$.fragment,e),c(a.$$.fragment,e),c(t.$$.fragment,e),o=!1},d(e){e&&(D(r),D(i)),$(n,e),$(a,e),$(t,e)}}}function R(m){return[{...O(j),argTypes:{align:{control:"select",options:["left","center"]}}}]}class q extends v{constructor(n){super(),A(this,n,R,K,C,{})}}const w=M(q,{meta:{title:"Components/Byline"},stories:{"tpl:default":{storyId:"components-byline--default",name:"default",template:!0,source:"<Byline {...args} />",hasArgs:!0},Default:{storyId:"components-byline--default",name:"Default",template:!1,source:"",hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","Byline","withComponentDocs"]}),Q=w.meta,U=["Default"],V=w.stories.Default;export{V as Default,U as __namedExportsOrder,Q as default};
//# sourceMappingURL=Byline.stories-1e0eb60d.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"Byline.stories-1e0eb60d.js","sources":["../../src/components/Byline/stories/docs/component.md?raw","../../src/components/Byline/Byline.stories.svelte"],"sourcesContent":["export default \"Byline and dateline.\\n\\n```svelte\\n<script>\\n import { Byline } from '@reuters-graphics/graphics-components';\\n</script>\\n\\n<Byline\\n authors=\\\"{[\\n 'Dea Bankova',\\n 'Aditi Bhandari',\\n 'Prasanta Kumar Dutta',\\n 'Anurag Rao',\\n 'Mariano Zafra',\\n ]}\\\"\\n publishTime=\\\"2021-09-12T00:00:00.000Z\\\"\\n updateTime=\\\"2021-09-12T12:57:00.000Z\\\"\\n/>\\n```\\n\"","<script>\n import { Meta, Template, Story } from '@storybook/addon-svelte-csf';\n\n // @ts-ignore\n import componentDocs from './stories/docs/component.md?raw';\n\n import Byline from './Byline.svelte';\n\n import { withComponentDocs } from '$lib/docs/utils/withParams.js';\n\n const metaProps = {\n ...withComponentDocs(componentDocs),\n // https://storybook.js.org/docs/svelte/essentials/controls\n argTypes: {\n align: {\n control: 'select',\n options: ['left', 'center'],\n },\n },\n };\n</script>\n\n<Meta title=\"Components/Byline\" component=\"{Byline}\" {...metaProps} />\n\n<Template let:args>\n <Byline {...args} />\n</Template>\n\n<Story\n name=\"Default\"\n args=\"{{\n align: 'left',\n authors: [\n 'Dea Bankova',\n 'Aditi Bhandari',\n 'Prasanta Kumar Dutta',\n 'Anurag Rao',\n 'Mariano Zafra',\n ],\n publishTime: new Date('2021-09-12').toISOString(),\n updateTime: new Date('2021-09-12T13:57:00').toISOString(),\n }}\"\n/>\n"],"names":["componentDocs","ctx","meta_spread_levels","Byline","withComponentDocs"],"mappings":"icAAA,MAAeA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCCyBDC,EAAI,CAAA,CAAA,oJAAJA,EAAI,CAAA,CAAA,CAAA,CAAA,6HAH0B,MAAAC,EAAA,CAAA,CAAA,MAAA,mBAAA,EAAA,CAAA,UAAAC,GAAaF,EAAS,CAAA,CAAA,iNAS9D,MAAO,OACP,QAAO,CACL,cACA,iBACA,uBACA,aACA,iBAEF,YAAiB,IAAA,KAAK,YAAY,EAAE,YAAW,EAC/C,WAAgB,IAAA,KAAK,qBAAqB,EAAE,YAAW,2KAlBFA,EAAS,CAAA,CAAA,qRAZjD,CACV,GAAAG,EAAkBJ,CAAa,EAElC,SAAQ,CACN,MAAK,CACH,QAAS,SACT,QAAO,CAAG,OAAQ,QAAQ"}

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
.datawrapper-chart.svelte-13ejpv3{margin:auto}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,2 @@
import{D as n,d as f}from"./chunk-S4VUQJ4A-b5ca7ac2.js";import"./iframe-bb3bbc4f.js";import"../sb-preview/runtime.js";import"./index-5e8d4308.js";import"./_commonjsHelpers-de833af9.js";import"./index-d475d2ea.js";import"./index-d37d4223.js";import"./index-e04ae519.js";import"./index-356e4a49.js";export{n as DocsRenderer,f as defaultComponents};
//# sourceMappingURL=DocsRenderer-3PUGWF3O-cc1d9aaa.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"DocsRenderer-3PUGWF3O-cc1d9aaa.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}

View file

@ -1,2 +0,0 @@
import{D as n,d as f}from"./chunk-PCJTTTQV-8ea8b36c.js";import"./iframe-647e33a7.js";import"../sb-preview/runtime.js";import"./extends-b40c5bac.js";import"./_commonjsHelpers-725317a4.js";import"./index-d475d2ea.js";import"./index-d37d4223.js";import"./index-1a79a776.js";import"./index-356e4a49.js";export{n as DocsRenderer,f as defaultComponents};
//# sourceMappingURL=DocsRenderer-EYKKDMVH-16ba02f7.js.map

View file

@ -1 +0,0 @@
{"version":3,"file":"DocsRenderer-EYKKDMVH-16ba02f7.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}

View file

@ -1,19 +0,0 @@
import{S as $,i as C,s as x,j as m,m as p,b as f,t as g,n as h,w as R,Q as D,x as d,C as w,a as y,d as b,p as v,D as k,k as A,l as S}from"./index-25af778d.js";import{p as M,M as V,T as j,S as B}from"./collect-stories-cce06d4a.js";import{B as E}from"./Block-9c89ee1a.js";import{w as H}from"./withParams-90715500.js";const P=`Embed a document hosted by [DocumentCloud](https://documentcloud.org)
---
The document must have its access level set to public before it can be embedded. The \`slug\` argument can be found after the final slash in the document's URL. For instance, the document included in the example is found at [documentcloud.org/documents/3259984-Trump-Intelligence-Allegations](https://www.documentcloud.org/documents/3259984-Trump-Intelligence-Allegations). The slug is "3259984-Trump-Intelligence-Allegations".
\`\`\`html
<script>
import { DocumentCloud } from '@reuters-graphics/graphics-components';
<\/script>
<DocumentCloud
slug="3259984-Trump-Intelligence-Allegations"
altText="These Reports Allege Trump Has Deep Ties To Russia"
width="normal"
/>
\`\`\`
`;function F(a){let e,o;return{c(){e=R("iframe"),D(e.src,o="https://embed.documentcloud.org/documents/"+a[1]+"/?embed=1&responsive=1&title=1")||d(e,"src",o),d(e,"title",a[2]),d(e,"width","700"),d(e,"height","540"),w(e,"border","1px solid #aaa"),w(e,"width","100%"),w(e,"height","800px"),w(e,"height","calc(100vh - 100px)"),d(e,"sandbox","allow-scripts allow-same-origin allow-popups allow-forms allow-popups-to-escape-sandbox")},m(t,l){y(t,e,l)},p(t,l){l&2&&!D(e.src,o="https://embed.documentcloud.org/documents/"+t[1]+"/?embed=1&responsive=1&title=1")&&d(e,"src",o),l&4&&d(e,"title",t[2])},d(t){t&&b(e)}}}function L(a){let e,o;return e=new E({props:{width:a[0],id:a[3],cls:"photo "+a[4],$$slots:{default:[F]},$$scope:{ctx:a}}}),{c(){m(e.$$.fragment)},m(t,l){p(e,t,l),o=!0},p(t,[l]){const n={};l&1&&(n.width=t[0]),l&8&&(n.id=t[3]),l&16&&(n.cls="photo "+t[4]),l&38&&(n.$$scope={dirty:l,ctx:t}),e.$set(n)},i(t){o||(f(e.$$.fragment,t),o=!0)},o(t){g(e.$$.fragment,t),o=!1},d(t){h(e,t)}}}function O(a,e,o){let{width:t="normal"}=e,{slug:l}=e,{altText:n}=e,{id:r=""}=e,{cls:c=""}=e;return a.$$set=i=>{"width"in i&&o(0,t=i.width),"slug"in i&&o(1,l=i.slug),"altText"in i&&o(2,n=i.altText),"id"in i&&o(3,r=i.id),"cls"in i&&o(4,c=i.cls)},[t,l,n,r,c]}class _ extends ${constructor(e){super(),C(this,e,O,L,x,{width:0,slug:1,altText:2,id:3,cls:4})}}_.__docgen={version:3,name:"DocumentCloud.svelte",data:[{keywords:[],visibility:"public",description:"Width of the container, one of: normal, wide, wider, widest or fluid",name:"width",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:"normal"},{keywords:[{name:"required",description:""}],visibility:"public",description:"The unique identifier for the document.",name:"slug",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{keywords:[{name:"required",description:""}],visibility:"public",description:"Alt text for the document.",name:"altText",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{keywords:[],visibility:"public",description:"Add an ID to target with SCSS.",name:"id",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:""},{keywords:[],visibility:"public",description:"Add a class to target with SCSS.",name:"cls",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:""}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};function Q(a){let e,o;const t=[a[1]];let l={};for(let n=0;n<t.length;n+=1)l=v(l,t[n]);return e=new _({props:l}),{c(){m(e.$$.fragment)},m(n,r){p(e,n,r),o=!0},p(n,r){const c=r&2?A(t,[S(n[1])]):{};e.$set(c)},i(n){o||(f(e.$$.fragment,n),o=!0)},o(n){g(e.$$.fragment,n),o=!1},d(n){h(e,n)}}}function U(a){let e,o,t,l,n,r;const c=[{title:"Components/DocumentCloud"},{component:_},a[0]];let i={};for(let s=0;s<c.length;s+=1)i=v(i,c[s]);return e=new V({props:i}),t=new j({props:{$$slots:{default:[Q,({args:s})=>({1:s}),({args:s})=>s?2:0]},$$scope:{ctx:a}}}),n=new B({props:{name:"Default",args:{width:"normal",slug:"3259984-Trump-Intelligence-Allegations",altText:"These Reports Allege Trump Has Deep Ties To Russia"}}}),{c(){m(e.$$.fragment),o=k(),m(t.$$.fragment),l=k(),m(n.$$.fragment)},m(s,u){p(e,s,u),y(s,o,u),p(t,s,u),y(s,l,u),p(n,s,u),r=!0},p(s,[u]){const q=u&1?A(c,[c[0],u&0&&{component:_},u&1&&S(s[0])]):{};e.$set(q);const T={};u&6&&(T.$$scope={dirty:u,ctx:s}),t.$set(T)},i(s){r||(f(e.$$.fragment,s),f(t.$$.fragment,s),f(n.$$.fragment,s),r=!0)},o(s){g(e.$$.fragment,s),g(t.$$.fragment,s),g(n.$$.fragment,s),r=!1},d(s){h(e,s),s&&b(o),h(t,s),s&&b(l),h(n,s)}}}function W(a){return[{...H(P),argTypes:{width:{control:"select",options:["normal","wide","wider","widest","fluid"]}}}]}class z extends ${constructor(e){super(),C(this,e,W,U,x,{})}}const I=M(z,{meta:{title:"Components/DocumentCloud"},stories:{"tpl:default":{storyId:"components-documentcloud--default",name:"default",template:!0,source:"<DocumentCloud {...args} />",hasArgs:!0},Default:{storyId:"components-documentcloud--default",name:"Default",template:!1,hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","DocumentCloud","withComponentDocs"]}),X=I.meta,Y=["Default"],Z=I.stories.Default;export{Z as Default,Y as __namedExportsOrder,X as default};
//# sourceMappingURL=DocumentCloud.stories-3407d178.js.map

View file

@ -1 +0,0 @@
{"version":3,"file":"DocumentCloud.stories-3407d178.js","sources":["../../src/components/DocumentCloud/stories/docs/component.md?raw","../../src/components/DocumentCloud/DocumentCloud.svelte","../../src/components/DocumentCloud/DocumentCloud.stories.svelte"],"sourcesContent":["export default \"Embed a document hosted by [DocumentCloud](https://documentcloud.org)\\n\\n---\\n\\nThe document must have its access level set to public before it can be embedded. The `slug` argument can be found after the final slash in the document's URL. For instance, the document included in the example is found at [documentcloud.org/documents/3259984-Trump-Intelligence-Allegations](https://www.documentcloud.org/documents/3259984-Trump-Intelligence-Allegations). The slug is \\\"3259984-Trump-Intelligence-Allegations\\\".\\n\\n```html\\n<script>\\n import { DocumentCloud } from '@reuters-graphics/graphics-components';\\n</script>\\n\\n<DocumentCloud\\n slug=\\\"3259984-Trump-Intelligence-Allegations\\\"\\n altText=\\\"These Reports Allege Trump Has Deep Ties To Russia\\\"\\n width=\\\"normal\\\"\\n/>\\n```\\n\"","<!-- @component `DocumentCloud` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-DocumentCloud--default) -->\n<script lang=\"ts\">\n import type { ContainerWidth } from '../@types/global';\n /** ✏️ DOCUMENT your chart's props using TypeScript and JSDoc comments like below! */\n\n /**\n * Width of the container, one of: normal, wide, wider, widest or fluid\n */\n export let width: ContainerWidth = 'normal';\n\n /**\n * The unique identifier for the document.\n * @required\n */\n export let slug: string;\n\n /**\n * Alt text for the document.\n * @required\n */\n export let altText: string;\n\n /** Add an ID to target with SCSS. */\n export let id: string = '';\n\n /** Add a class to target with SCSS. */\n export let cls: string = '';\n\n import Block from '../Block/Block.svelte';\n</script>\n\n<Block width=\"{width}\" id=\"{id}\" cls=\"photo {cls}\">\n <iframe\n src=\"https://embed.documentcloud.org/documents/{slug}/?embed=1&amp;responsive=1&amp;title=1\"\n title=\"{altText}\"\n width=\"700\"\n height=\"540\"\n style=\"border: 1px solid #aaa; width: 100%; height: 800px; height: calc(100vh - 100px);\"\n sandbox=\"allow-scripts allow-same-origin allow-popups allow-forms allow-popups-to-escape-sandbox\"\n ></iframe>\n</Block>\n","<script>\n import { Meta, Template, Story } from '@storybook/addon-svelte-csf';\n\n // Don't lose the \"?raw\" in markdown imports!\n // @ts-ignore\n import componentDocs from './stories/docs/component.md?raw';\n\n import DocumentCloud from './DocumentCloud.svelte';\n\n import { withComponentDocs } from '$docs/utils/withParams.js';\n\n const metaProps = {\n ...withComponentDocs(componentDocs),\n argTypes: {\n width: {\n control: 'select',\n options: ['normal', 'wide', 'wider', 'widest', 'fluid'],\n },\n },\n };\n</script>\n\n<Meta\n title=\"Components/DocumentCloud\"\n component=\"{DocumentCloud}\"\n {...metaProps}\n/>\n\n<Template let:args>\n <DocumentCloud {...args} />\n</Template>\n\n<Story\n name=\"Default\"\n args=\"{{\n width: 'normal',\n slug: '3259984-Trump-Intelligence-Allegations',\n altText: 'These Reports Allege Trump Has Deep Ties To Russia',\n }}\"\n/>\n"],"names":["componentDocs","ctx","attr","iframe","iframe_src_value","insert","target","anchor","width","$$props","slug","altText","id","cls","DocumentCloud","withComponentDocs"],"mappings":"2TAAA,MAAeA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wGCiCqCC,EAAI,CAAA,EAAA,gCAAA,GAAAC,EAAAC,EAAA,MAAAC,CAAA,cAC5CH,EAAO,CAAA,CAAA,uQAFjBI,EAOSC,EAAAH,EAAAI,CAAA,uEANyCN,EAAI,CAAA,EAAA,gCAAA,iCAC5CA,EAAO,CAAA,CAAA,qEAHJA,EAAK,CAAA,KAAQA,EAAE,CAAA,eAAeA,EAAG,CAAA,0HAAjCA,EAAK,CAAA,cAAQA,EAAE,CAAA,yBAAeA,EAAG,CAAA,iJAvBnC,GAAA,CAAA,MAAAO,EAAwB,QAAQ,EAAAC,GAMhC,KAAAC,CAAY,EAAAD,GAMZ,QAAAE,CAAe,EAAAF,EAGf,CAAA,GAAAG,EAAa,EAAE,EAAAH,EAGf,CAAA,IAAAI,EAAc,EAAE,EAAAJ,26CCGRR,EAAI,CAAA,CAAA,oJAAJA,EAAI,CAAA,CAAA,CAAA,CAAA,oLALXa,CAAa,EACrBb,EAAS,CAAA,kNAUX,MAAO,SACP,KAAM,yCACN,QAAS,uOAbCa,CAAa,SACrBb,EAAS,CAAA,CAAA,sRAdE,CACV,GAAAc,EAAkBf,CAAa,EAClC,SAAQ,CACN,MAAK,CACH,QAAS,SACT,QAAO,CAAG,SAAU,OAAQ,QAAS,SAAU,OAAO"}

View file

@ -0,0 +1,19 @@
import{S as $,i as k,s as C,g as m,m as f,t as p,h as g,j as h,o as q,b as d,F as b,d as w,f as y,C as v,y as D}from"./index-df681c7c.js";import{g as A,a as S}from"./spread-8a54911c.js";import{p as R,M,T as V,S as j}from"./collect-stories-a6a786e2.js";import{B}from"./Block-f95db830.js";import{w as E}from"./withParams-47e2ab71.js";const F=`Embed a document hosted by [DocumentCloud](https://documentcloud.org)
---
The document must have its access level set to public before it can be embedded. The \`slug\` argument can be found after the final slash in the document's URL. For instance, the document included in the example is found at [documentcloud.org/documents/3259984-Trump-Intelligence-Allegations](https://www.documentcloud.org/documents/3259984-Trump-Intelligence-Allegations). The slug is "3259984-Trump-Intelligence-Allegations".
\`\`\`svelte
<script>
import { DocumentCloud } from '@reuters-graphics/graphics-components';
<\/script>
<DocumentCloud
slug="3259984-Trump-Intelligence-Allegations"
altText="These Reports Allege Trump Has Deep Ties To Russia"
width="normal"
/>
\`\`\`
`;function H(a){let e,o;return{c(){e=q("iframe"),d(e,"class","h-screen"),b(e.src,o="https://embed.documentcloud.org/documents/"+a[1]+"/?embed=1&responsive=1&title=1")||d(e,"src",o),d(e,"title",a[2]),d(e,"width","700"),d(e,"height","540"),d(e,"sandbox","allow-scripts allow-same-origin allow-popups allow-forms allow-popups-to-escape-sandbox")},m(t,l){w(t,e,l)},p(t,l){l&2&&!b(e.src,o="https://embed.documentcloud.org/documents/"+t[1]+"/?embed=1&responsive=1&title=1")&&d(e,"src",o),l&4&&d(e,"title",t[2])},d(t){t&&y(e)}}}function P(a){let e,o;return e=new B({props:{width:a[0],id:a[3],class:"photo fmy-6 "+a[4],$$slots:{default:[H]},$$scope:{ctx:a}}}),{c(){m(e.$$.fragment)},m(t,l){f(e,t,l),o=!0},p(t,[l]){const s={};l&1&&(s.width=t[0]),l&8&&(s.id=t[3]),l&16&&(s.class="photo fmy-6 "+t[4]),l&38&&(s.$$scope={dirty:l,ctx:t}),e.$set(s)},i(t){o||(p(e.$$.fragment,t),o=!0)},o(t){g(e.$$.fragment,t),o=!1},d(t){h(e,t)}}}function L(a,e,o){let{width:t="normal"}=e,{slug:l}=e,{altText:s}=e,{id:r=""}=e,{class:u=""}=e;return a.$$set=i=>{"width"in i&&o(0,t=i.width),"slug"in i&&o(1,l=i.slug),"altText"in i&&o(2,s=i.altText),"id"in i&&o(3,r=i.id),"class"in i&&o(4,u=i.class)},[t,l,s,r,u]}class _ extends ${constructor(e){super(),k(this,e,L,P,C,{width:0,slug:1,altText:2,id:3,class:4})}}_.__docgen={version:3,name:"DocumentCloud.svelte",data:[{keywords:[],visibility:"public",description:"Width of the container, one of: normal, wide, wider, widest or fluid",name:"width",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:"normal"},{keywords:[{name:"required",description:""}],visibility:"public",description:"The unique identifier for the document.",name:"slug",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{keywords:[{name:"required",description:""}],visibility:"public",description:"Alt text for the document.",name:"altText",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"any",type:"any"}},{keywords:[],visibility:"public",description:"Add an ID to target with SCSS.",name:"id",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"string",type:"string"},defaultValue:""},{visibility:"public",description:"Add a class to target with SCSS.",keywords:[],name:"class",kind:"const",static:!1,readonly:!0,type:{kind:"type",text:"string",type:"string"},localName:"cls",defaultValue:""}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};function N(a){let e,o;const t=[a[1]];let l={};for(let s=0;s<t.length;s+=1)l=v(l,t[s]);return e=new _({props:l}),{c(){m(e.$$.fragment)},m(s,r){f(e,s,r),o=!0},p(s,r){const u=r&2?A(t,[S(s[1])]):{};e.$set(u)},i(s){o||(p(e.$$.fragment,s),o=!0)},o(s){g(e.$$.fragment,s),o=!1},d(s){h(e,s)}}}function O(a){let e,o,t,l,s,r;const u=[{title:"Components/DocumentCloud"},{component:_},a[0]];let i={};for(let n=0;n<u.length;n+=1)i=v(i,u[n]);return e=new M({props:i}),t=new V({props:{$$slots:{default:[N,({args:n})=>({1:n}),({args:n})=>n?2:0]},$$scope:{ctx:a}}}),s=new j({props:{name:"Default",args:{width:"normal",slug:"3259984-Trump-Intelligence-Allegations",altText:"These Reports Allege Trump Has Deep Ties To Russia"}}}),{c(){m(e.$$.fragment),o=D(),m(t.$$.fragment),l=D(),m(s.$$.fragment)},m(n,c){f(e,n,c),w(n,o,c),f(t,n,c),w(n,l,c),f(s,n,c),r=!0},p(n,[c]){const I=c&1?A(u,[u[0],u[1],S(n[0])]):{};e.$set(I);const T={};c&6&&(T.$$scope={dirty:c,ctx:n}),t.$set(T)},i(n){r||(p(e.$$.fragment,n),p(t.$$.fragment,n),p(s.$$.fragment,n),r=!0)},o(n){g(e.$$.fragment,n),g(t.$$.fragment,n),g(s.$$.fragment,n),r=!1},d(n){n&&(y(o),y(l)),h(e,n),h(t,n),h(s,n)}}}function U(a){return[{...E(F),argTypes:{width:{control:"select",options:["normal","wide","wider","widest","fluid"]}}}]}class W extends ${constructor(e){super(),k(this,e,U,O,C,{})}}const x=R(W,{meta:{title:"Components/DocumentCloud"},stories:{"tpl:default":{storyId:"components-documentcloud--default",name:"default",template:!0,source:"<DocumentCloud {...args} />",hasArgs:!0},Default:{storyId:"components-documentcloud--default",name:"Default",template:!1,source:"",hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","DocumentCloud","withComponentDocs"]}),X=x.meta,Y=["Default"],Z=x.stories.Default;export{Z as Default,Y as __namedExportsOrder,X as default};
//# sourceMappingURL=DocumentCloud.stories-c067bd8b.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"DocumentCloud.stories-c067bd8b.js","sources":["../../src/components/DocumentCloud/stories/docs/component.md?raw","../../src/components/DocumentCloud/DocumentCloud.svelte","../../src/components/DocumentCloud/DocumentCloud.stories.svelte"],"sourcesContent":["export default \"Embed a document hosted by [DocumentCloud](https://documentcloud.org)\\n\\n---\\n\\nThe document must have its access level set to public before it can be embedded. The `slug` argument can be found after the final slash in the document's URL. For instance, the document included in the example is found at [documentcloud.org/documents/3259984-Trump-Intelligence-Allegations](https://www.documentcloud.org/documents/3259984-Trump-Intelligence-Allegations). The slug is \\\"3259984-Trump-Intelligence-Allegations\\\".\\n\\n```svelte\\n<script>\\n import { DocumentCloud } from '@reuters-graphics/graphics-components';\\n</script>\\n\\n<DocumentCloud\\n slug=\\\"3259984-Trump-Intelligence-Allegations\\\"\\n altText=\\\"These Reports Allege Trump Has Deep Ties To Russia\\\"\\n width=\\\"normal\\\"\\n/>\\n```\\n\"","<!-- @component `DocumentCloud` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-DocumentCloud--default) -->\n<script lang=\"ts\">\n import type { ContainerWidth } from '../@types/global';\n /** ✏️ DOCUMENT your chart's props using TypeScript and JSDoc comments like below! */\n\n /**\n * Width of the container, one of: normal, wide, wider, widest or fluid\n */\n export let width: ContainerWidth = 'normal';\n\n /**\n * The unique identifier for the document.\n * @required\n */\n export let slug: string;\n\n /**\n * Alt text for the document.\n * @required\n */\n export let altText: string;\n\n /** Add an ID to target with SCSS. */\n export let id: string = '';\n\n /** Add a class to target with SCSS. */\n let cls: string = '';\n export { cls as class };\n\n import Block from '../Block/Block.svelte';\n</script>\n\n<Block width=\"{width}\" id=\"{id}\" class=\"photo fmy-6 {cls}\">\n <iframe\n class=\"h-screen\"\n src=\"https://embed.documentcloud.org/documents/{slug}/?embed=1&amp;responsive=1&amp;title=1\"\n title=\"{altText}\"\n width=\"700\"\n height=\"540\"\n sandbox=\"allow-scripts allow-same-origin allow-popups allow-forms allow-popups-to-escape-sandbox\"\n ></iframe>\n</Block>\n","<script>\n import { Meta, Template, Story } from '@storybook/addon-svelte-csf';\n\n // Don't lose the \"?raw\" in markdown imports!\n // @ts-ignore\n import componentDocs from './stories/docs/component.md?raw';\n\n import DocumentCloud from './DocumentCloud.svelte';\n\n import { withComponentDocs } from '$docs/utils/withParams.js';\n\n const metaProps = {\n ...withComponentDocs(componentDocs),\n argTypes: {\n width: {\n control: 'select',\n options: ['normal', 'wide', 'wider', 'widest', 'fluid'],\n },\n },\n };\n</script>\n\n<Meta\n title=\"Components/DocumentCloud\"\n component=\"{DocumentCloud}\"\n {...metaProps}\n/>\n\n<Template let:args>\n <DocumentCloud {...args} />\n</Template>\n\n<Story\n name=\"Default\"\n args=\"{{\n width: 'normal',\n slug: '3259984-Trump-Intelligence-Allegations',\n altText: 'These Reports Allege Trump Has Deep Ties To Russia',\n }}\"\n/>\n"],"names":["componentDocs","ctx","attr","iframe","iframe_src_value","insert","target","anchor","width","$$props","slug","altText","id","cls","DocumentCloud","withComponentDocs"],"mappings":"4UAAA,MAAeA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gICmCqCC,EAAI,CAAA,EAAA,gCAAA,GAAAC,EAAAC,EAAA,MAAAC,CAAA,cAC5CH,EAAO,CAAA,CAAA,0JAHjBI,EAOSC,EAAAH,EAAAI,CAAA,uEALyCN,EAAI,CAAA,EAAA,gCAAA,iCAC5CA,EAAO,CAAA,CAAA,qEAJJA,EAAK,CAAA,KAAQA,EAAE,CAAA,uBAAuBA,EAAG,CAAA,0HAAzCA,EAAK,CAAA,cAAQA,EAAE,CAAA,iCAAuBA,EAAG,CAAA,iJAxB3C,GAAA,CAAA,MAAAO,EAAwB,QAAQ,EAAAC,GAMhC,KAAAC,CAAY,EAAAD,GAMZ,QAAAE,CAAe,EAAAF,EAGf,CAAA,GAAAG,EAAa,EAAE,EAAAH,EAGtB,CAAA,MAAAI,EAAc,EAAE,EAAAJ,q8CCGDR,EAAI,CAAA,CAAA,oJAAJA,EAAI,CAAA,CAAA,CAAA,CAAA,oLALXa,CAAa,EACrBb,EAAS,CAAA,kNAUX,MAAO,SACP,KAAM,yCACN,QAAS,8NAZPA,EAAS,CAAA,CAAA,qRAdE,CACV,GAAAc,EAAkBf,CAAa,EAClC,SAAQ,CACN,MAAK,CACH,QAAS,SACT,QAAO,CAAG,SAAU,OAAQ,QAAS,SAAU,OAAO"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,2 @@
import{I as a}from"./chunk-MSDTXLE7-0739f1ad.js";import{r as e}from"./index-5e8d4308.js";import"./iframe-bb3bbc4f.js";import"../sb-preview/runtime.js";import"./_commonjsHelpers-de833af9.js";import"./index-d475d2ea.js";import"./index-d37d4223.js";var c=r=>{const{svgProps:t,...l}=r;return e.createElement(a,{icon:e.createElement("svg",{width:"100%",height:"100%",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{d:"M8.982 1.632a.5.5 0 00-.964-.263l-3 11a.5.5 0 10.964.263l3-11zM3.32 3.616a.5.5 0 01.064.704L1.151 7l2.233 2.68a.5.5 0 11-.768.64l-2.5-3a.5.5 0 010-.64l2.5-3a.5.5 0 01.704-.064zM10.68 3.616a.5.5 0 00-.064.704L12.849 7l-2.233 2.68a.5.5 0 00.768.64l2.5-3a.5.5 0 000-.64l-2.5-3a.5.5 0 00-.704-.064z",fill:"currentColor"})),...l})},w=r=>{const{svgProps:t,...l}=r;return e.createElement(a,{icon:e.createElement("svg",{width:"100%",height:"100%",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 2v1.5h1v7H3V12h5a3 3 0 001.791-5.407A2.75 2.75 0 008 2.011V2H3zm5 5.5H5.5v3H8a1.5 1.5 0 100-3zm-.25-4H5.5V6h2.25a1.25 1.25 0 100-2.5z",fill:"currentColor"})),...l})},m=r=>{const{svgProps:t,...l}=r;return e.createElement(a,{icon:e.createElement("svg",{width:"100%",height:"100%",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{d:"M5 2h6v1H8.5l-2 8H9v1H3v-1h2.5l2-8H5V2z",fill:"currentColor"})),...l})},g=r=>{const{svgProps:t,...l}=r;return e.createElement(a,{icon:e.createElement("svg",{width:"100%",height:"100%",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{d:"M10.553 2.268a1.5 1.5 0 00-2.12 0L2.774 7.925a2.5 2.5 0 003.536 3.535l3.535-3.535a.5.5 0 11.707.707l-3.535 3.536-.002.002a3.5 3.5 0 01-4.959-4.941l.011-.011L7.725 1.56l.007-.008a2.5 2.5 0 013.53 3.541l-.002.002-5.656 5.657-.003.003a1.5 1.5 0 01-2.119-2.124l3.536-3.536a.5.5 0 11.707.707L4.189 9.34a.5.5 0 00.707.707l5.657-5.657a1.5 1.5 0 000-2.121z",fill:"currentColor"})),...l})},d=r=>{const{svgProps:t,...l}=r;return e.createElement(a,{icon:e.createElement("svg",{width:"100%",height:"100%",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{d:"M5 2.5a.5.5 0 01.5-.5h7a.5.5 0 010 1h-7a.5.5 0 01-.5-.5zM5 7a.5.5 0 01.5-.5h7a.5.5 0 010 1h-7A.5.5 0 015 7zM5.5 11a.5.5 0 000 1h7a.5.5 0 000-1h-7zM2.5 2H1v1h1v3h1V2.5a.5.5 0 00-.5-.5zM3 8.5v1a.5.5 0 01-1 0V9h-.5a.5.5 0 010-1h1a.5.5 0 01.5.5zM2 10.5a.5.5 0 00-1 0V12h2v-1H2v-.5z",fill:"currentColor"})),...l})},E=r=>{const{svgProps:t,...l}=r;return e.createElement(a,{icon:e.createElement("svg",{width:"100%",height:"100%",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{d:"M2.75 2.5a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM5.5 2a.5.5 0 000 1h7a.5.5 0 000-1h-7zM5.5 11a.5.5 0 000 1h7a.5.5 0 000-1h-7zM2 12.25a.75.75 0 100-1.5.75.75 0 000 1.5zM5 7a.5.5 0 01.5-.5h7a.5.5 0 010 1h-7A.5.5 0 015 7zM2 7.75a.75.75 0 100-1.5.75.75 0 000 1.5z",fill:"currentColor"})),...l})},z=r=>{const{svgProps:t,...l}=r;return e.createElement(a,{icon:e.createElement("svg",{width:"100%",height:"100%",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{d:"M6 7a3 3 0 110-6h5.5a.5.5 0 010 1H10v10.5a.5.5 0 01-1 0V2H7v10.5a.5.5 0 01-1 0V7z",fill:"currentColor"})),...l})},M=r=>{const{svgProps:t,...l}=r;return e.createElement(a,{icon:e.createElement("svg",{width:"100%",height:"100%",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{d:"M2 4.5h1.5L5 6.375 6.5 4.5H8v5H6.5V7L5 8.875 3.5 7v2.5H2v-5zM9.75 4.5h1.5V7h1.25l-2 2.5-2-2.5h1.25V4.5z",fill:"currentColor"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.5 2a.5.5 0 00-.5.5v9a.5.5 0 00.5.5h13a.5.5 0 00.5-.5v-9a.5.5 0 00-.5-.5H.5zM1 3v8h12V3H1z",fill:"currentColor"})),...l})};export{w as Bold,m as Italic,d as ListOrdered,E as ListUnordered,M as Markdown,c as Markup,g as PaperClip,z as Paragraph};
//# sourceMappingURL=Editing-7QFB6ZMG-aba6f591.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,16 @@
import{S as E,i as D,s as L,k as M,d as _,t as m,v as S,h as p,w as V,f as $,o as k,g as f,b as v,e as H,m as c,j as d,C as P,y as h}from"./index-df681c7c.js";import{g as z,a as A}from"./spread-8a54911c.js";import{p as I,M as T,T as j,S as F}from"./collect-stories-a6a786e2.js";import{F as N}from"./fa-8c2107fb.js";import{w as q}from"./withParams-47e2ab71.js";const O=`An embed tool for development in graphics kit.
\`\`\`svelte
<script>
import { EmbedPreviewerLink } from '@reuters-graphics/graphics-components';
import { dev } from '$app/env';
<\/script>
<EmbedPreviewerLink dev="{dev}" />
\`\`\`
`;/*!
* Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
*/var R={prefix:"far",iconName:"window-restore",icon:[512,512,[],"f2d2","M464 0H144c-26.5 0-48 21.5-48 48v48H48c-26.5 0-48 21.5-48 48v320c0 26.5 21.5 48 48 48h320c26.5 0 48-21.5 48-48v-48h48c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm-96 464H48V256h320v208zm96-96h-48V144c0-26.5-21.5-48-48-48H144V48h320v320z"]};function y(a){let t,o,e,s;return e=new N({props:{icon:R}}),{c(){t=k("div"),o=k("a"),f(e.$$.fragment),v(o,"rel","external"),v(o,"href","/embed-previewer"),v(o,"class","svelte-715e2e"),v(t,"class","svelte-715e2e")},m(r,i){_(r,t,i),H(t,o),c(e,o,null),s=!0},i(r){s||(m(e.$$.fragment,r),s=!0)},o(r){p(e.$$.fragment,r),s=!1},d(r){r&&$(t),d(e)}}}function W(a){let t,o,e=a[0]&&y();return{c(){e&&e.c(),t=M()},m(s,r){e&&e.m(s,r),_(s,t,r),o=!0},p(s,[r]){s[0]?e?r&1&&m(e,1):(e=y(),e.c(),m(e,1),e.m(t.parentNode,t)):e&&(S(),p(e,1,1,()=>{e=null}),V())},i(s){o||(m(e),o=!0)},o(s){p(e),o=!1},d(s){s&&$(t),e&&e.d(s)}}}function B(a,t,o){let{dev:e=!1}=t;return a.$$set=s=>{"dev"in s&&o(0,e=s.dev)},[e]}class b extends E{constructor(t){super(),D(this,t,B,W,L,{dev:0})}}b.__docgen={version:3,name:"EmbedPreviewerLink.svelte",data:[{visibility:"public",description:null,keywords:[],name:"dev",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"boolean",type:"boolean"},defaultValue:!1}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};function G(a){let t,o;const e=[a[0]];let s={};for(let r=0;r<e.length;r+=1)s=P(s,e[r]);return t=new b({props:s}),{c(){f(t.$$.fragment)},m(r,i){c(t,r,i),o=!0},p(r,i){const u=i&1?z(e,[A(r[0])]):{};t.$set(u)},i(r){o||(m(t.$$.fragment,r),o=!0)},o(r){p(t.$$.fragment,r),o=!1},d(r){d(t,r)}}}function J(a){let t,o,e,s,r,i;const u=[{title:"Components/EmbedPreviewerLink"},{component:b},q(O)];let w={};for(let n=0;n<u.length;n+=1)w=P(w,u[n]);return t=new T({props:w}),e=new j({props:{$$slots:{default:[G,({args:n})=>({0:n}),({args:n})=>n?1:0]},$$scope:{ctx:a}}}),r=new F({props:{name:"Default",args:{dev:!0}}}),{c(){f(t.$$.fragment),o=h(),f(e.$$.fragment),s=h(),f(r.$$.fragment)},m(n,l){c(t,n,l),_(n,o,l),c(e,n,l),_(n,s,l),c(r,n,l),i=!0},p(n,[l]){const C={};t.$set(C);const g={};l&3&&(g.$$scope={dirty:l,ctx:n}),e.$set(g)},i(n){i||(m(t.$$.fragment,n),m(e.$$.fragment,n),m(r.$$.fragment,n),i=!0)},o(n){p(t.$$.fragment,n),p(e.$$.fragment,n),p(r.$$.fragment,n),i=!1},d(n){n&&($(o),$(s)),d(t,n),d(e,n),d(r,n)}}}class K extends E{constructor(t){super(),D(this,t,null,J,L,{})}}const x=I(K,{meta:{title:"Components/EmbedPreviewerLink"},stories:{"tpl:default":{storyId:"components-embedpreviewerlink--default",name:"default",template:!0,source:"<EmbedPreviewerLink {...args} />",hasArgs:!0},Default:{storyId:"components-embedpreviewerlink--default",name:"Default",template:!1,source:"",hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","EmbedPreviewerLink","withComponentDocs"]}),ee=x.meta,te=["Default"],re=x.stories.Default;export{re as Default,te as __namedExportsOrder,ee as default};
//# sourceMappingURL=EmbedPreviewerLink.stories-1246d16f.js.map

File diff suppressed because one or more lines are too long

View file

@ -1,16 +0,0 @@
import{S as L,i as P,s as x,e as A,a as _,b as m,g as C,t as p,c as I,d as $,w as g,j as c,x as v,z as T,m as d,E as j,n as u,p as M,D as h,k as S,l as V}from"./index-25af778d.js";import{p as F,M as N,T as U,S as q}from"./collect-stories-cce06d4a.js";import{F as O}from"./fa-0c534c9e.js";import{w as E}from"./withParams-90715500.js";const D=`An embed tool for development in graphics kit.
\`\`\`html
<script>
import { EmbedPreviewerLink } from '@reuters-graphics/graphics-components';
import { dev } from '$app/env';
<\/script>
<EmbedPreviewerLink dev="{dev}" />
\`\`\`
`;/*!
* Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
*/var R={prefix:"far",iconName:"window-restore",icon:[512,512,[],"f2d2","M464 0H144c-26.5 0-48 21.5-48 48v48H48c-26.5 0-48 21.5-48 48v320c0 26.5 21.5 48 48 48h320c26.5 0 48-21.5 48-48v-48h48c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm-96 464H48V256h320v208zm96-96h-48V144c0-26.5-21.5-48-48-48H144V48h320v320z"]};function y(i){let r,a,e,n;return e=new O({props:{icon:R}}),{c(){r=g("div"),a=g("a"),c(e.$$.fragment),v(a,"rel","external"),v(a,"href","/embed-previewer"),v(a,"class","svelte-715e2e"),v(r,"class","svelte-715e2e")},m(t,l){_(t,r,l),T(r,a),d(e,a,null),n=!0},p:j,i(t){n||(m(e.$$.fragment,t),n=!0)},o(t){p(e.$$.fragment,t),n=!1},d(t){t&&$(r),u(e)}}}function W(i){let r,a,e=i[0]&&y();return{c(){e&&e.c(),r=A()},m(n,t){e&&e.m(n,t),_(n,r,t),a=!0},p(n,[t]){n[0]?e?(e.p(n,t),t&1&&m(e,1)):(e=y(),e.c(),m(e,1),e.m(r.parentNode,r)):e&&(C(),p(e,1,1,()=>{e=null}),I())},i(n){a||(m(e),a=!0)},o(n){p(e),a=!1},d(n){e&&e.d(n),n&&$(r)}}}function B(i,r,a){let{dev:e=!1}=r;return i.$$set=n=>{"dev"in n&&a(0,e=n.dev)},[e]}class w extends L{constructor(r){super(),P(this,r,B,W,x,{dev:0})}}w.__docgen={version:3,name:"EmbedPreviewerLink.svelte",data:[{visibility:"public",description:null,keywords:[],name:"dev",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"boolean",type:"boolean"},defaultValue:!1}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};function G(i){let r,a;const e=[i[0]];let n={};for(let t=0;t<e.length;t+=1)n=M(n,e[t]);return r=new w({props:n}),{c(){c(r.$$.fragment)},m(t,l){d(r,t,l),a=!0},p(t,l){const f=l&1?S(e,[V(t[0])]):{};r.$set(f)},i(t){a||(m(r.$$.fragment,t),a=!0)},o(t){p(r.$$.fragment,t),a=!1},d(t){u(r,t)}}}function J(i){let r,a,e,n,t,l;const f=[{title:"Utilities/EmbedPreviewerLink"},{component:w},E(D)];let b={};for(let s=0;s<f.length;s+=1)b=M(b,f[s]);return r=new N({props:b}),e=new U({props:{$$slots:{default:[G,({args:s})=>({0:s}),({args:s})=>s?1:0]},$$scope:{ctx:i}}}),t=new q({props:{name:"Default",args:{dev:!0}}}),{c(){c(r.$$.fragment),a=h(),c(e.$$.fragment),n=h(),c(t.$$.fragment)},m(s,o){d(r,s,o),_(s,a,o),d(e,s,o),_(s,n,o),d(t,s,o),l=!0},p(s,[o]){const H=o&0?S(f,[f[0],o&0&&{component:w},o&0&&V(E(D))]):{};r.$set(H);const k={};o&3&&(k.$$scope={dirty:o,ctx:s}),e.$set(k)},i(s){l||(m(r.$$.fragment,s),m(e.$$.fragment,s),m(t.$$.fragment,s),l=!0)},o(s){p(r.$$.fragment,s),p(e.$$.fragment,s),p(t.$$.fragment,s),l=!1},d(s){u(r,s),s&&$(a),u(e,s),s&&$(n),u(t,s)}}}class K extends L{constructor(r){super(),P(this,r,null,J,x,{})}}const z=F(K,{meta:{title:"Utilities/EmbedPreviewerLink"},stories:{"tpl:default":{storyId:"utilities-embedpreviewerlink--default",name:"default",template:!0,source:"<EmbedPreviewerLink {...args} />",hasArgs:!0},Default:{storyId:"utilities-embedpreviewerlink--default",name:"Default",template:!1,hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","EmbedPreviewerLink","withComponentDocs"]}),ee=z.meta,te=["Default"],re=z.stories.Default;export{re as Default,te as __namedExportsOrder,ee as default};
//# sourceMappingURL=EmbedPreviewerLink.stories-e14b4f26.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
.note-title.svelte-zsnzox p{font-family:var(--theme-font-family-note);color:var(--theme-colour-text-secondary);font-size:var(--theme-font-size-xs);line-height:1.15;font-weight:400;margin-top:clamp(.31rem,.29rem + .1vw,.38rem);margin-bottom:clamp(.31rem,.29rem + .1vw,.38rem);color:var(--theme-colour-text-primary);font-weight:500;letter-spacing:0em;margin-top:clamp(.88rem,.81rem + .31vw,1.06rem);margin-bottom:.125rem;text-transform:none}.note-content.svelte-zsnzox p{font-family:var(--theme-font-family-note);color:var(--theme-colour-text-secondary);font-size:var(--theme-font-size-xs);line-height:1.15;font-weight:400;margin-top:clamp(.31rem,.29rem + .1vw,.38rem);margin-bottom:clamp(.31rem,.29rem + .1vw,.38rem);margin-top:0;margin-bottom:clamp(.56rem,.52rem + .21vw,.69rem)}

View file

@ -0,0 +1,28 @@
import{S as T,i as C,s as M,g as p,m as d,t as u,h as _,j as $,k as S,d as f,f as m,K as L,o as k,y,b as N,C as z}from"./index-df681c7c.js";import{g as A,a as j}from"./spread-8a54911c.js";import{p as q,M as B,T as F,S as K}from"./collect-stories-a6a786e2.js";import{e as b}from"./each-e59479a4.js";import{m as g}from"./marked.esm-76161808.js";import{B as O}from"./Block-f95db830.js";import{w as G}from"./withParams-47e2ab71.js";const J=`Note text includes notes to the main article — usually things like sources, clarifiying notes and minor corrections at the end of a story.
Note text can be fed a markdown string, but text styling is intentionally restricted in this component. For example, all heading tags are forced to a single font size and weight.
\`\`\`svelte
<script>
import { NoteText } from '@reuters-graphics/graphics-components';
const notes = [
{
title: 'Note',
text: 'Data is current as of today.',
},
{
title: 'Sources',
text: 'Data, Inc.',
},
{
title: 'Edited by',
text: '<a href="https://www.reuters.com/graphics/">Editor</a>, Copyeditor',
},
];
<\/script>
<NoteText notes="{notes}" />
\`\`\`
`;function x(i,t,s){const e=i.slice();return e[1]=t[s],e}function D(i){let t,s=b(i[0]),e=[];for(let n=0;n<s.length;n+=1)e[n]=E(x(i,s,n));return{c(){for(let n=0;n<e.length;n+=1)e[n].c();t=S()},m(n,r){for(let o=0;o<e.length;o+=1)e[o]&&e[o].m(n,r);f(n,t,r)},p(n,r){if(r&1){s=b(n[0]);let o;for(o=0;o<s.length;o+=1){const l=x(n,s,o);e[o]?e[o].p(l,r):(e[o]=E(l),e[o].c(),e[o].m(t.parentNode,t))}for(;o<e.length;o+=1)e[o].d(1);e.length=s.length}},d(n){n&&m(t),L(e,n)}}}function E(i){let t,s=g.parse(i[1].title)+"",e,n,r=g.parse(i[1].text)+"";return{c(){t=k("div"),e=y(),n=k("div"),N(t,"class","note-title svelte-zsnzox"),N(n,"class","note-content svelte-zsnzox")},m(o,l){f(o,t,l),t.innerHTML=s,f(o,e,l),f(o,n,l),n.innerHTML=r},p(o,l){l&1&&s!==(s=g.parse(o[1].title)+"")&&(t.innerHTML=s),l&1&&r!==(r=g.parse(o[1].text)+"")&&(n.innerHTML=r)},d(o){o&&(m(t),m(e),m(n))}}}function P(i){let t,s=i[0]&&D(i);return{c(){s&&s.c(),t=S()},m(e,n){s&&s.m(e,n),f(e,t,n)},p(e,n){e[0]?s?s.p(e,n):(s=D(e),s.c(),s.m(t.parentNode,t)):s&&(s.d(1),s=null)},d(e){e&&m(t),s&&s.d(e)}}}function Q(i){let t,s;return t=new O({props:{class:"notes fmt-6 fmb-8",$$slots:{default:[P]},$$scope:{ctx:i}}}),{c(){p(t.$$.fragment)},m(e,n){d(t,e,n),s=!0},p(e,[n]){const r={};n&17&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){s||(u(t.$$.fragment,e),s=!0)},o(e){_(t.$$.fragment,e),s=!1},d(e){$(t,e)}}}function R(i,t,s){let{notes:e=[]}=t;return i.$$set=n=>{"notes"in n&&s(0,e=n.notes)},[e]}class w extends T{constructor(t){super(),C(this,t,R,Q,M,{notes:0})}}w.__docgen={version:3,name:"EndNotes.svelte",data:[{keywords:[{name:"required",description:""}],visibility:"public",description:"An array of endnote items.",name:"notes",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"array",type:"array"}}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};function U(i){let t,s;const e=[i[1]];let n={};for(let r=0;r<e.length;r+=1)n=z(n,e[r]);return t=new w({props:n}),{c(){p(t.$$.fragment)},m(r,o){d(t,r,o),s=!0},p(r,o){const l=o&2?A(e,[j(r[1])]):{};t.$set(l)},i(r){s||(u(t.$$.fragment,r),s=!0)},o(r){_(t.$$.fragment,r),s=!1},d(r){$(t,r)}}}function V(i){let t,s,e,n,r,o;const l=[{title:"Components/EndNotes"},{component:w},G(J)];let h={};for(let a=0;a<l.length;a+=1)h=z(h,l[a]);return t=new B({props:h}),e=new F({props:{$$slots:{default:[U,({args:a})=>({1:a}),({args:a})=>a?2:0]},$$scope:{ctx:i}}}),r=new K({props:{name:"Default",args:{notes:i[0]}}}),{c(){p(t.$$.fragment),s=y(),p(e.$$.fragment),n=y(),p(r.$$.fragment)},m(a,c){d(t,a,c),f(a,s,c),d(e,a,c),f(a,n,c),d(r,a,c),o=!0},p(a,[c]){const H={};t.$set(H);const v={};c&6&&(v.$$scope={dirty:c,ctx:a}),e.$set(v)},i(a){o||(u(t.$$.fragment,a),u(e.$$.fragment,a),u(r.$$.fragment,a),o=!0)},o(a){_(t.$$.fragment,a),_(e.$$.fragment,a),_(r.$$.fragment,a),o=!1},d(a){a&&(m(s),m(n)),$(t,a),$(e,a),$(r,a)}}}function W(i){return[[{title:"Note",text:"Data is current as of today."},{title:"Sources",text:"Data, Inc."},{title:"Edited by",text:'<a href="https://www.reuters.com/graphics/">Editor</a>, Copyeditor'}]]}class X extends T{constructor(t){super(),C(this,t,W,V,M,{})}}const I=q(X,{meta:{title:"Components/EndNotes"},stories:{"tpl:default":{storyId:"components-endnotes--default",name:"default",template:!0,source:"<EndNotes {...args} />",hasArgs:!0},Default:{storyId:"components-endnotes--default",name:"Default",template:!1,source:"",hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","EndNotes","withComponentDocs"]}),re=I.meta,ae=["Default"],ie=I.stories.Default;export{ie as Default,ae as __namedExportsOrder,re as default};
//# sourceMappingURL=EndNotes.stories-4319b895.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"EndNotes.stories-4319b895.js","sources":["../../src/components/EndNotes/stories/docs/component.md?raw","../../src/components/EndNotes/EndNotes.svelte","../../src/components/EndNotes/EndNotes.stories.svelte"],"sourcesContent":["export default \"Note text includes notes to the main article — usually things like sources, clarifiying notes and minor corrections at the end of a story.\\n\\nNote text can be fed a markdown string, but text styling is intentionally restricted in this component. For example, all heading tags are forced to a single font size and weight.\\n\\n```svelte\\n<script>\\n import { NoteText } from '@reuters-graphics/graphics-components';\\n\\n const notes = [\\n {\\n title: 'Note',\\n text: 'Data is current as of today.',\\n },\\n {\\n title: 'Sources',\\n text: 'Data, Inc.',\\n },\\n {\\n title: 'Edited by',\\n text: '<a href=\\\"https://www.reuters.com/graphics/\\\">Editor</a>, Copyeditor',\\n },\\n ];\\n</script>\\n\\n<NoteText notes=\\\"{notes}\\\" />\\n```\\n\"","<!-- @component `EndNotes` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-EndNotes--default) -->\n<script lang=\"ts\">\n interface EndNote {\n /**\n * Title of the note item\n * @required\n */\n title: String;\n /**\n * Contents of the note as a markdown string\n * @required\n */\n text: String;\n }\n\n /**\n * An array of endnote items.\n * @required\n */\n export let notes: EndNote[] = [];\n\n import { marked } from 'marked';\n import Block from '../Block/Block.svelte';\n</script>\n\n<Block class=\"notes fmt-6 fmb-8\">\n {#if notes}\n {#each notes as note}\n <div class=\"note-title\">{@html marked.parse(note.title)}</div>\n <div class=\"note-content\">{@html marked.parse(note.text)}</div>\n {/each}\n {/if}\n</Block>\n\n<!-- svelte-ignore css-unused-selector -->\n<style lang=\"scss\">\n @import '../../scss/mixins';\n\n .note-title {\n :global(p) {\n @include body-caption;\n @include text-primary;\n @include font-medium;\n @include tracking-normal;\n @include fmt-3;\n margin-bottom: 0.125rem;\n text-transform: none;\n }\n }\n\n .note-content {\n :global(p) {\n @include body-caption;\n @include fmt-0;\n @include fmb-2;\n }\n }\n</style>\n","<script>\n import { Meta, Template, Story } from '@storybook/addon-svelte-csf';\n\n // @ts-ignore\n import componentDocs from './stories/docs/component.md?raw';\n\n import EndNotes from './EndNotes.svelte';\n\n import { withComponentDocs } from '$lib/docs/utils/withParams.js';\n\n const notes = [\n {\n title: 'Note',\n text: 'Data is current as of today.',\n },\n {\n title: 'Sources',\n text: 'Data, Inc.',\n },\n {\n title: 'Edited by',\n text: '<a href=\"https://www.reuters.com/graphics/\">Editor</a>, Copyeditor',\n },\n ];\n</script>\n\n<Meta\n title=\"Components/EndNotes\"\n component=\"{EndNotes}\"\n {...withComponentDocs(componentDocs)}\n/>\n\n<Template let:args>\n <EndNotes {...args} />\n</Template>\n\n<Story\n name=\"Default\"\n args=\"{{\n notes,\n }}\"\n/>\n"],"names":["componentDocs","ctx","i","raw0_value","marked","raw1_value","insert","target","div0","anchor","div1","dirty","create_if_block","notes","$$props","EndNotes","withComponentDocs"],"mappings":"4aAAA,MAAeA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;iFC2BJC,EAAK,CAAA,CAAA,uBAAV,OAAIC,GAAA,4JAACD,EAAK,CAAA,CAAA,oBAAV,OAAIC,GAAA,EAAA,yHAAJ,mDAC+BC,EAAAC,EAAO,MAAMH,KAAK,KAAK,EAAA,OACrBI,EAAAD,EAAO,MAAMH,KAAK,IAAI,EAAA,oIADvDK,EAA6DC,EAAAC,EAAAC,CAAA,yBAC7DH,EAA8DC,EAAAG,EAAAD,CAAA,wBAD/BE,EAAA,GAAAR,KAAAA,EAAAC,EAAO,MAAMH,KAAK,KAAK,EAAA,MAAAO,EAAA,UAAAL,GACrBQ,EAAA,GAAAN,KAAAA,EAAAD,EAAO,MAAMH,KAAK,IAAI,EAAA,MAAAS,EAAA,UAAAL,qDAHtDJ,EAAK,CAAA,GAAAW,EAAAX,CAAA,iEAALA,EAAK,CAAA,gaAPC,MAAAY,EAAK,EAAA,EAAAC,ifCcFb,EAAI,CAAA,CAAA,oJAAJA,EAAI,CAAA,CAAA,CAAA,CAAA,+KALNc,CAAQ,EAChBC,EAAkBhB,CAAa,4MAUjC,KAAA,CAAA,MAAAC,EAAK,CAAA,CAAA,saA7BI,EAEP,MAAO,OACP,KAAM,gCAGN,CAAA,MAAO,UACP,KAAM,YAAY,GAGlB,MAAO,YACP,KAAM"}

View file

@ -0,0 +1 @@
.placeholder.svelte-g9m2b0{background-color:#ccc}div.alt-warning.svelte-g9m2b0{background-color:red;color:#fff;top:0;right:0}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
figure.svelte-1wfjqh7.svelte-1wfjqh7{width:100%;position:relative}figure.svelte-1wfjqh7 img.svelte-1wfjqh7{width:100%;margin:0}figure.svelte-1wfjqh7 .placeholder.svelte-1wfjqh7{background-color:#ccc;width:100%}figure.svelte-1wfjqh7 div.alt-warning.svelte-1wfjqh7{font-family:Knowledge,Source Sans Pro,Arial,sans-serif;padding:5px 10px;background-color:red;color:#fff;position:absolute;top:0;right:0;font-size:14px;line-height:16px}figure.svelte-1wfjqh7 figcaption.svelte-1wfjqh7{font-weight:400;font-size:.8rem;font-family:var(--theme-font-family-note, "Knowledge", "Source Sans Pro", Arial, sans-serif);color:var(--theme-colour-text-secondary, #666666)}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,2 @@
import{I as o}from"./chunk-MSDTXLE7-0739f1ad.js";import{r as e}from"./index-5e8d4308.js";import"./iframe-bb3bbc4f.js";import"../sb-preview/runtime.js";import"./_commonjsHelpers-de833af9.js";import"./index-d475d2ea.js";import"./index-d37d4223.js";var m=r=>{const{svgProps:t,...l}=r;return e.createElement(o,{icon:e.createElement("svg",{width:"100%",height:"100%",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{d:"M5 2.5a.5.5 0 11-1 0 .5.5 0 011 0zM4.5 5a.5.5 0 100-1 .5.5 0 000 1zM5 6.5a.5.5 0 11-1 0 .5.5 0 011 0z",fill:"currentColor"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 0a2 2 0 012 2v10a2 2 0 01-2 2H1.5a.5.5 0 01-.5-.5V.5a.5.5 0 01.5-.5H11zm0 1H3v12h8a1 1 0 001-1V2a1 1 0 00-1-1z",fill:"currentColor"})),...l})},d=r=>{const{svgProps:t,...l}=r;return e.createElement(o,{icon:e.createElement("svg",{width:"100%",height:"100%",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.031 7.5a4 4 0 007.938 0H13.5a.5.5 0 000-1h-2.53a4 4 0 00-7.94 0H.501a.5.5 0 000 1h2.531zM7 10a3 3 0 100-6 3 3 0 000 6z",fill:"currentColor"})),...l})},h=r=>{const{svgProps:t,...l}=r;return e.createElement(o,{icon:e.createElement("svg",{width:"100%",height:"100%",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2.5a1.5 1.5 0 01-1 1.415v4.053C5.554 7.4 6.367 7 7.5 7c.89 0 1.453-.252 1.812-.557.218-.184.374-.4.482-.62a1.5 1.5 0 111.026.143c-.155.423-.425.87-.86 1.24C9.394 7.685 8.59 8 7.5 8c-1.037 0-1.637.42-1.994.917a2.81 2.81 0 00-.472 1.18A1.5 1.5 0 114 10.086v-6.17A1.5 1.5 0 116 2.5zm-2 9a.5.5 0 111 0 .5.5 0 01-1 0zm1-9a.5.5 0 11-1 0 .5.5 0 011 0zm6 2a.5.5 0 11-1 0 .5.5 0 011 0z",fill:"currentColor"})),...l})},w=r=>{const{svgProps:t,...l}=r;return e.createElement(o,{icon:e.createElement("svg",{width:"100%",height:"100%",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.354 1.354L7.707 2H8.5A2.5 2.5 0 0111 4.5v5.585a1.5 1.5 0 11-1 0V4.5A1.5 1.5 0 008.5 3h-.793l.647.646a.5.5 0 11-.708.708l-1.5-1.5a.5.5 0 010-.708l1.5-1.5a.5.5 0 11.708.708zM11 11.5a.5.5 0 11-1 0 .5.5 0 011 0zM4 3.915a1.5 1.5 0 10-1 0v6.17a1.5 1.5 0 101 0v-6.17zM3.5 11a.5.5 0 100 1 .5.5 0 000-1zm0-8a.5.5 0 100-1 .5.5 0 000 1z",fill:"currentColor"})),...l})},g=r=>{const{svgProps:t,...l}=r;return e.createElement(o,{icon:e.createElement("svg",{width:"100%",height:"100%",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.108 3.872A1.5 1.5 0 103 3.915v6.17a1.5 1.5 0 101 0V6.41c.263.41.573.77.926 1.083 1.108.98 2.579 1.433 4.156 1.5A1.5 1.5 0 109.09 7.99c-1.405-.065-2.62-.468-3.5-1.248-.723-.64-1.262-1.569-1.481-2.871zM3.5 11a.5.5 0 100 1 .5.5 0 000-1zM4 2.5a.5.5 0 11-1 0 .5.5 0 011 0zm7 6a.5.5 0 11-1 0 .5.5 0 011 0z",fill:"currentColor"})),...l})};export{h as Branch,d as Commit,g as Merge,w as PullRequest,m as Repo};
//# sourceMappingURL=Git-DZ2D5ZUL-8f523b5e.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show more