This commit is contained in:
github-actions[bot] 2024-08-28 08:09:11 +00:00
parent 3a57c4b7a0
commit 6874523868
692 changed files with 83377 additions and 7574 deletions

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
import{S as F,i as I,s as J,D as O,C as A,g as f,z as w,m as d,d as p,t as $,h as y,f as m,j as v,o as x,n as R}from"./index-85f88930.js";import{g as W,a as K}from"./spread-8a54911c.js";import{p as z,M as H,T as Q,S}from"./collect-stories-fa95313f.js";import{w as V,b as L}from"./withParams-47e2ab71.js";const X=`Add Google and Chartbeat analytics to your page.
import{S as F,i as I,s as q,p as O,l as A,c as f,o as w,m as d,h as p,t as $,a as y,k as u,d as v,q as x,n as J}from"./index-C9aKRT5A.js";import{g as W,a as K}from"./spread-CgU5AtxT.js";import{p as z,w as H,M as Q,T as V,S as b,a as L}from"./collect-stories-ceFdpR5E.js";const X=`Add Google and Chartbeat analytics to your page.
\`\`\`svelte
<script>
@ -57,8 +57,7 @@ For example, here's how you can use SvelteKit's [\`afterNavigate\`](https://kit.
<Analytics />
\`\`\`
`,U="G-WBSR7WLTGD",P=`https://www.googletagmanager.com/gtag/js?id=${U}`,ee=()=>{if(document.querySelector(`script[src="${P}"]`))return;const a=document.createElement("script"),t=document.getElementsByTagName("script")[0];a.type="text/javascript",a.async=!0,a.src=P,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",U,{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 ie(a,t,r){let{authors:s=[]}=t;return O(()=>{te(),oe(s)}),a.$$set=i=>{"authors"in i&&r(0,s=i.authors)},[s]}class h extends F{constructor(t){super(),I(this,t,ie,null,J,{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 re(a){let t,r,s,i;const n=[a[0]];let l={};for(let o=0;o<n.length;o+=1)l=A(l,n[o]);return t=new h({props:l}),{c(){f(t.$$.fragment),r=w(),s=x("div"),s.textContent="Nothing to see here"},m(o,u){d(t,o,u),p(o,r,u),p(o,s,u),i=!0},p(o,u){const g=u&1?W(n,[K(o[0])]):{};t.$set(g)},i(o){i||($(t.$$.fragment,o),i=!0)},o(o){y(t.$$.fragment,o),i=!1},d(o){o&&(m(r),m(s)),v(t,o)}}}function ce(a){let t,r,s,i;return t=new h({}),{c(){f(t.$$.fragment),r=w(),s=x("div"),s.textContent="Nothing to see here"},m(n,l){d(t,n,l),p(n,r,l),p(n,s,l),i=!0},p:R,i(n){i||($(t.$$.fragment,n),i=!0)},o(n){y(t.$$.fragment,n),i=!1},d(n){n&&(m(r),m(s)),v(t,n)}}}function le(a){let t,r,s,i;return t=new h({}),{c(){f(t.$$.fragment),r=w(),s=x("div"),s.textContent="Nothing to see here"},m(n,l){d(t,n,l),p(n,r,l),p(n,s,l),i=!0},p:R,i(n){i||($(t.$$.fragment,n),i=!0)},o(n){y(t.$$.fragment,n),i=!1},d(n){n&&(m(r),m(s)),v(t,n)}}}function pe(a){let t,r,s,i,n,l,o,u,g,_;const N=[{title:"Components/Analytics"},{component:h},V(X)];let C={};for(let e=0;e<N.length;e+=1)C=A(C,N[e]);t=new H({props:C}),s=new Q({props:{$$slots:{default:[re,({args:e})=>({0:e}),({args:e})=>e?1:0]},$$scope:{ctx:a}}}),n=new S({props:{name:"Default",args:{authors:[{name:"Jane Doe"},{name:"John Doe"}]}}});const M=[{name:"Environments"},L(Y)];let b={$$slots:{default:[ce]},$$scope:{ctx:a}};for(let e=0;e<M.length;e+=1)b=A(b,M[e]);o=new S({props:b});const j=[{name:"Multipage apps"},L(Z)];let E={$$slots:{default:[le]},$$scope:{ctx:a}};for(let e=0;e<j.length;e+=1)E=A(E,j[e]);return g=new S({props:E}),{c(){f(t.$$.fragment),r=w(),f(s.$$.fragment),i=w(),f(n.$$.fragment),l=w(),f(o.$$.fragment),u=w(),f(g.$$.fragment)},m(e,c){d(t,e,c),p(e,r,c),d(s,e,c),p(e,i,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 q={};t.$set(q);const G={};c&3&&(G.$$scope={dirty:c,ctx:e}),s.$set(G);const k={};c&2&&(k.$$scope={dirty:c,ctx:e}),o.$set(k);const T={};c&2&&(T.$$scope={dirty:c,ctx:e}),g.$set(T)},i(e){_||($(t.$$.fragment,e),$(s.$$.fragment,e),$(n.$$.fragment,e),$(o.$$.fragment,e),$(g.$$.fragment,e),_=!0)},o(e){y(t.$$.fragment,e),y(s.$$.fragment,e),y(n.$$.fragment,e),y(o.$$.fragment,e),y(g.$$.fragment,e),_=!1},d(e){e&&(m(r),m(i),m(l),m(u)),v(t,e),v(s,e),v(n,e),v(o,e),v(g,e)}}}class me extends F{constructor(t){super(),I(this,t,null,pe,J,{})}}const D=z(me,{meta:{title:"Components/Analytics"},stories:{"tpl:default":{name:"default",template:!0,source:`<Analytics {...args} />
`,R="G-WBSR7WLTGD",P=`https://www.googletagmanager.com/gtag/js?id=${R}`,ee=()=>{if(document.querySelector(`script[src="${P}"]`))return;const a=document.createElement("script"),t=document.getElementsByTagName("script")[0];a.type="text/javascript",a.async=!0,a.src=P,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",R,{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 ie(a,t,r){let{authors:s=[]}=t;return O(()=>{te(),oe(s)}),a.$$set=i=>{"authors"in i&&r(0,s=i.authors)},[s]}class h extends F{constructor(t){super(),I(this,t,ie,null,q,{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 re(a){let t,r,s,i;const n=[a[0]];let l={};for(let o=0;o<n.length;o+=1)l=A(l,n[o]);return t=new h({props:l}),{c(){f(t.$$.fragment),r=w(),s=x("div"),s.textContent="Nothing to see here"},m(o,m){d(t,o,m),p(o,r,m),p(o,s,m),i=!0},p(o,m){const g=m&1?W(n,[K(o[0])]):{};t.$set(g)},i(o){i||($(t.$$.fragment,o),i=!0)},o(o){y(t.$$.fragment,o),i=!1},d(o){o&&(u(r),u(s)),v(t,o)}}}function ce(a){let t,r,s,i;return t=new h({}),{c(){f(t.$$.fragment),r=w(),s=x("div"),s.textContent="Nothing to see here"},m(n,l){d(t,n,l),p(n,r,l),p(n,s,l),i=!0},p:J,i(n){i||($(t.$$.fragment,n),i=!0)},o(n){y(t.$$.fragment,n),i=!1},d(n){n&&(u(r),u(s)),v(t,n)}}}function le(a){let t,r,s,i;return t=new h({}),{c(){f(t.$$.fragment),r=w(),s=x("div"),s.textContent="Nothing to see here"},m(n,l){d(t,n,l),p(n,r,l),p(n,s,l),i=!0},p:J,i(n){i||($(t.$$.fragment,n),i=!0)},o(n){y(t.$$.fragment,n),i=!1},d(n){n&&(u(r),u(s)),v(t,n)}}}function pe(a){let t,r,s,i,n,l,o,m,g,_;const N=[{title:"Components/Analytics"},{component:h},H(X)];let C={};for(let e=0;e<N.length;e+=1)C=A(C,N[e]);t=new Q({props:C}),s=new V({props:{$$slots:{default:[re,({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 M=[{name:"Environments"},L(Y)];let E={$$slots:{default:[ce]},$$scope:{ctx:a}};for(let e=0;e<M.length;e+=1)E=A(E,M[e]);o=new b({props:E});const k=[{name:"Multipage apps"},L(Z)];let S={$$slots:{default:[le]},$$scope:{ctx:a}};for(let e=0;e<k.length;e+=1)S=A(S,k[e]);return g=new b({props:S}),{c(){f(t.$$.fragment),r=w(),f(s.$$.fragment),i=w(),f(n.$$.fragment),l=w(),f(o.$$.fragment),m=w(),f(g.$$.fragment)},m(e,c){d(t,e,c),p(e,r,c),d(s,e,c),p(e,i,c),d(n,e,c),p(e,l,c),d(o,e,c),p(e,m,c),d(g,e,c),_=!0},p(e,[c]){const U={};t.$set(U);const G={};c&3&&(G.$$scope={dirty:c,ctx:e}),s.$set(G);const j={};c&2&&(j.$$scope={dirty:c,ctx:e}),o.$set(j);const T={};c&2&&(T.$$scope={dirty:c,ctx:e}),g.$set(T)},i(e){_||($(t.$$.fragment,e),$(s.$$.fragment,e),$(n.$$.fragment,e),$(o.$$.fragment,e),$(g.$$.fragment,e),_=!0)},o(e){y(t.$$.fragment,e),y(s.$$.fragment,e),y(n.$$.fragment,e),y(o.$$.fragment,e),y(g.$$.fragment,e),_=!1},d(e){e&&(u(r),u(i),u(l),u(m)),v(t,e),v(s,e),v(n,e),v(o,e),v(g,e)}}}class ue extends F{constructor(t){super(),I(this,t,null,pe,q,{})}}const D=z(ue,{meta:{title:"Components/Analytics"},stories:{"tpl:default":{name:"default",template:!0,source:`<Analytics {...args} />
<div>Nothing to see here</div>`,hasArgs:!0},Default:{name:"Default",template:!1,source:"",hasArgs:!1},Environments:{name:"Environments",template:!1,source:`<Analytics />
<div>Nothing to see here</div>`,hasArgs:!1},MultipageApps:{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"]}),$e=D.meta,ye=["Default","Environments","MultipageApps"],ve=D.stories.Default,we=D.stories.Environments,he=D.stories.MultipageApps;export{ve as Default,we as Environments,he as MultipageApps,ye as __namedExportsOrder,$e as default};
//# sourceMappingURL=Analytics.stories-9286c9af.js.map
<div>Nothing to see here</div>`,hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","environmentsDocs","multipageDocs","Analytics","withComponentDocs","withStoryDocs"]}),de=D.meta,$e=["Default","Environments","MultipageApps"],ye=D.stories.Default,ve=D.stories.Environments,we=D.stories.MultipageApps;export{ye as Default,ve as Environments,we as MultipageApps,$e as __namedExportsOrder,de as default};

View file

@ -1,2 +1 @@
import{S as b,i as y,s as _,l as w,o as f,b as u,r as m,d as h,e as p,G as k,u as j,p as g,q as v,H as A,t as S,h as V,f as W}from"./index-85f88930.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-f160dc82.js.map
import{S as b,i as y,s as w,y as h,q as f,f as u,C as m,h as _,j as p,G as k,z as j,A as g,B as A,H as v,t as S,a as V,k as W}from"./index-C9aKRT5A.js";const C=(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 E(s){let i,t,n,o,d,c;const r=s[6].default,a=h(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){_(e,i,l),p(i,t),a&&a.m(t,null),o=!0,d||(c=k(n=C.call(null,t,s[3])),d=!0)},p(e,[l]){a&&a.p&&(!o||l&32)&&j(a,r,e,e[5],o?A(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&&v(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 O(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 q extends b{constructor(i){super(),y(this,i,O,E,w,{embedded:0,id:1,role:2,columnWidths:4})}}q.__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{q as A};

View file

@ -0,0 +1 @@
#article-story-basic,#article-column-widths-demo{width:calc(100% + 30px);margin-left:-15px}#article-column-widths-demo{background-color:#ddd;position:relative;margin-bottom:10px}#article-column-widths-demo .article-boundaries{padding:0;width:100%;height:100%;background-color:#bbb}#article-column-widths-demo .article-boundaries.custom div.article-block{background:#d3847b}#article-column-widths-demo div.article-block{height:300px;background:#81a1c1;margin-bottom:2px;height:50px;padding-left:3px;color:#fff;font-size:12px}div.demo-container.svelte-1wzc5ei.svelte-1wzc5ei{height:300px;background:#ccc;position:relative;font-size:12px}div.demo-container.svelte-1wzc5ei .background-label.svelte-1wzc5ei{position:absolute;bottom:0;left:5px;color:#666}div.demo-container.svelte-1wzc5ei .padding-label.svelte-1wzc5ei{position:absolute;top:0;left:-17px}div.demo-container.svelte-1wzc5ei .padding-label span.svelte-1wzc5ei{font-size:18px}

View file

@ -1 +0,0 @@
{"version":3,"file":"Article-f160dc82.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":"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,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"}

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
div.demo-container.svelte-12ka7xw.svelte-12ka7xw{height:300px;background:#ccc;position:relative;font-size:12px}div.demo-container.svelte-12ka7xw .background-label.svelte-12ka7xw{position:absolute;bottom:0;left:5px;color:#666}div.demo-container.svelte-12ka7xw .padding-label.svelte-12ka7xw{position:absolute;top:0;left:-17px}div.demo-container.svelte-12ka7xw .padding-label span.svelte-12ka7xw{font-size:18px}

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-1aeavb4.svelte-1aeavb4{box-sizing:content-box}figure.before-after-container.svelte-1aeavb4 img.svelte-1aeavb4{top:0;left:0;z-index:20;-webkit-user-select:none;user-select:none}figure.before-after-container.svelte-1aeavb4 img.after.svelte-1aeavb4{z-index:21}figure.before-after-container.svelte-1aeavb4 img.before.svelte-1aeavb4{z-index:22}figure.before-after-container.svelte-1aeavb4 .overlay-container.svelte-1aeavb4{position:absolute}figure.before-after-container.svelte-1aeavb4 .overlay-container.svelte-1aeavb4 :first-child{margin-top:0}figure.before-after-container.svelte-1aeavb4 .overlay-container.svelte-1aeavb4 :last-child{margin-bottom:0}figure.before-after-container.svelte-1aeavb4 .overlay-container.before.svelte-1aeavb4{left:0;z-index:23}figure.before-after-container.svelte-1aeavb4 .overlay-container.after.svelte-1aeavb4{right:0;z-index:21}.handle.svelte-1aeavb4.svelte-1aeavb4{z-index:30;width:40px;height:40px;cursor:move;background:none;-webkit-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-1aeavb4.svelte-1aeavb4:hover,.handle.svelte-1aeavb4.svelte-1aeavb4:active,.handle.svelte-1aeavb4.svelte-1aeavb4:focus{opacity:1}.handle.svelte-1aeavb4.svelte-1aeavb4:before,.handle.svelte-1aeavb4.svelte-1aeavb4: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-1aeavb4.svelte-1aeavb4:before{top:40px}.handle.svelte-1aeavb4.svelte-1aeavb4:after{bottom:40px}.handle.svelte-1aeavb4 .arrow-right.svelte-1aeavb4,.handle.svelte-1aeavb4 .arrow-left.svelte-1aeavb4{width:0;height:0;-webkit-user-select:none;user-select:none;position:relative;border-top:10px solid transparent;border-bottom:10px solid transparent}.handle.svelte-1aeavb4 .arrow-right.svelte-1aeavb4{left:19px;bottom:14px;border-left:10px solid var(--before-after-handle-colour)}.handle.svelte-1aeavb4 .arrow-left.svelte-1aeavb4{left:3px;top:6px;border-right:10px solid var(--before-after-handle-colour)}aside.before-after-caption.svelte-1aeavb4 p{font-family:var(--theme-font-family-note);color:var(--theme-colour-text-secondary);font-size:var(--theme-font-size-xs);line-height:1.3;font-weight:400;margin-top:clamp(.31rem,.31rem + 0vw,.31rem);margin-bottom:clamp(.56rem,.52rem + .21vw,.69rem)}

View file

@ -1 +0,0 @@
figure.before-after-container.svelte-ira01o.svelte-ira01o{box-sizing:content-box}figure.before-after-container.svelte-ira01o img.svelte-ira01o{top:0;left:0;z-index:20;-webkit-user-select:none;-moz-user-select:none;user-select:none}figure.before-after-container.svelte-ira01o img.after.svelte-ira01o{z-index:21}figure.before-after-container.svelte-ira01o img.before.svelte-ira01o{z-index:22}figure.before-after-container.svelte-ira01o .overlay-container.svelte-ira01o{position:absolute}figure.before-after-container.svelte-ira01o .overlay-container.svelte-ira01o :first-child{margin-top:0}figure.before-after-container.svelte-ira01o .overlay-container.svelte-ira01o :last-child{margin-bottom:0}figure.before-after-container.svelte-ira01o .overlay-container.before.svelte-ira01o{left:0;z-index:23}figure.before-after-container.svelte-ira01o .overlay-container.after.svelte-ira01o{right:0;z-index:21}.handle.svelte-ira01o.svelte-ira01o{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-ira01o.svelte-ira01o:hover,.handle.svelte-ira01o.svelte-ira01o:active,.handle.svelte-ira01o.svelte-ira01o:focus{opacity:1}.handle.svelte-ira01o.svelte-ira01o:before,.handle.svelte-ira01o.svelte-ira01o: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-ira01o.svelte-ira01o:before{top:40px}.handle.svelte-ira01o.svelte-ira01o:after{bottom:40px}.handle.svelte-ira01o .arrow-right.svelte-ira01o,.handle.svelte-ira01o .arrow-left.svelte-ira01o{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-ira01o .arrow-right.svelte-ira01o{left:19px;bottom:14px;border-left:10px solid var(--before-after-handle-colour)}.handle.svelte-ira01o .arrow-left.svelte-ira01o{left:3px;top:6px;border-right:10px solid var(--before-after-handle-colour)}aside.before-after-caption.svelte-ira01o p{font-family:var(--theme-font-family-note);color:var(--theme-colour-text-secondary);font-size:var(--theme-font-size-xs);line-height:1.3;font-weight:400;margin-top:clamp(.31rem,.31rem + 0vw,.31rem);margin-bottom:clamp(.56rem,.52rem + .21vw,.69rem)}

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 @@
#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:#d3847b}#block-demo-article .label,#block-demo-article div.article-block.block-snap-widths-demo{padding-left:3px;color:#fff}div#block-flex-example.svelte-1asvcos.svelte-1asvcos.svelte-1asvcos{padding:25px 0}div#block-flex-example.svelte-1asvcos div.row.svelte-1asvcos.svelte-1asvcos{display:flex}div#block-flex-example.svelte-1asvcos div.row.svelte-1asvcos>div.svelte-1asvcos{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-1asvcos div.row:first-child div.svelte-1asvcos.svelte-1asvcos{background:#81a1c1}

View file

@ -1,2 +1 @@
import{S as y,i as k,s as m,l as _,o as h,b as d,r as b,d as p,u as g,p as w,q as v,t as A,h as S,f as V}from"./index-85f88930.js";function z(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-1bpn7zi"),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-1bpn7zi"))&&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 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,z,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-d1b8152c.js.map
import{S as y,i as k,s as m,y as h,q as p,f as d,C as b,h as _,z as w,A as g,B as A,t as v,a as S,k as z}from"./index-C9aKRT5A.js";function V(l){let e,n,s;const r=l[7].default,i=h(r,l,l[6],null);return{c(){e=p("div"),i&&i.c(),d(e,"id",l[1]),d(e,"class",n="article-block fmx-auto "+l[0]+" "+l[2]+" svelte-1bpn7zi"),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){_(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?A(r,t[6],o,null):g(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-1bpn7zi"))&&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||(v(i,t),s=!0)},o(t){S(i,t),s=!1},d(t){t&&z(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};

View file

@ -1 +0,0 @@
{"version":3,"file":"Block-d1b8152c.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-inline-start: -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,iBAAA,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,2DAEnCA,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

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
div#block-flex-example.svelte-iixsdp.svelte-iixsdp.svelte-iixsdp{padding:25px 0}div#block-flex-example.svelte-iixsdp div.row.svelte-iixsdp.svelte-iixsdp{display:flex}div#block-flex-example.svelte-iixsdp div.row.svelte-iixsdp>div.svelte-iixsdp{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-iixsdp div.row:first-child div.svelte-iixsdp.svelte-iixsdp{background:#81a1c1}

View file

@ -1 +0,0 @@
{"version":3,"file":"BodyText-4b324c0f.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 import Markdown from '../Markdown/Markdown.svelte';\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 Block from '../Block/Block.svelte';\n</script>\n\n<Block id=\"{id}\" class=\"fmy-6 {cls}\">\n <Markdown source=\"{text}\" />\n</Block>\n"],"names":["ctx","text","$$props","cls","id"],"mappings":"gOAqBqBA,EAAI,CAAA,CAAA,CAAA,CAAA,gFAAJA,EAAI,CAAA,6IADbA,EAAE,CAAA,iBAAiBA,EAAG,CAAA,uHAAtBA,EAAE,CAAA,0BAAiBA,EAAG,CAAA,oJAZrB,KAAAC,CAAY,EAAAC,EAGnB,CAAA,MAAAC,EAAc,EAAE,EAAAD,EAIT,CAAA,GAAAE,EAAa,EAAE,EAAAF"}

View file

@ -0,0 +1 @@
@charset "UTF-8";

View file

@ -1,2 +1 @@
import{S as m,i as u,s as p,g as r,m as l,t as c,h as d,j as f}from"./index-85f88930.js";import{M as g}from"./Markdown-e31fd5d7.js";import{B as y}from"./Block-d1b8152c.js";function k(a){let e,s;return e=new g({props:{source:a[0]}}),{c(){r(e.$$.fragment)},m(t,n){l(e,t,n),s=!0},p(t,n){const i={};n&1&&(i.source=t[0]),e.$set(i)},i(t){s||(c(e.$$.fragment,t),s=!0)},o(t){d(e.$$.fragment,t),s=!1},d(t){f(e,t)}}}function _(a){let e,s;return e=new y({props:{id:a[2],class:"fmy-6 "+a[1],$$slots:{default:[k]},$$scope:{ctx:a}}}),{c(){r(e.$$.fragment)},m(t,n){l(e,t,n),s=!0},p(t,[n]){const i={};n&4&&(i.id=t[2]),n&2&&(i.class="fmy-6 "+t[1]),n&9&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){s||(c(e.$$.fragment,t),s=!0)},o(t){d(e.$$.fragment,t),s=!1},d(t){f(e,t)}}}function w(a,e,s){let{text:t}=e,{class:n=""}=e,{id:i=""}=e;return a.$$set=o=>{"text"in o&&s(0,t=o.text),"class"in o&&s(1,n=o.class),"id"in o&&s(2,i=o.id)},[t,n,i]}class b extends m{constructor(e){super(),u(this,e,w,_,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 as B};
//# sourceMappingURL=BodyText-4b324c0f.js.map
import{S as m,i as u,s as p,c as r,m as c,t as l,a as d,d as f}from"./index-C9aKRT5A.js";import{M as y}from"./Markdown-BNYiGaXJ.js";import{B as g}from"./Block-C7biTRWl.js";function k(a){let e,s;return e=new y({props:{source:a[0]}}),{c(){r(e.$$.fragment)},m(t,n){c(e,t,n),s=!0},p(t,n){const i={};n&1&&(i.source=t[0]),e.$set(i)},i(t){s||(l(e.$$.fragment,t),s=!0)},o(t){d(e.$$.fragment,t),s=!1},d(t){f(e,t)}}}function _(a){let e,s;return e=new g({props:{id:a[2],class:"fmy-6 "+a[1],$$slots:{default:[k]},$$scope:{ctx:a}}}),{c(){r(e.$$.fragment)},m(t,n){c(e,t,n),s=!0},p(t,[n]){const i={};n&4&&(i.id=t[2]),n&2&&(i.class="fmy-6 "+t[1]),n&9&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){s||(l(e.$$.fragment,t),s=!0)},o(t){d(e.$$.fragment,t),s=!1},d(t){f(e,t)}}}function w(a,e,s){let{text:t}=e,{class:n=""}=e,{id:i=""}=e;return a.$$set=o=>{"text"in o&&s(0,t=o.text),"class"in o&&s(1,n=o.class),"id"in o&&s(2,i=o.id)},[t,n,i]}class b extends m{constructor(e){super(),u(this,e,w,_,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 as B};

View file

@ -1 +0,0 @@
@charset "UTF-8";.body-text-typography-example-story h2{position:relative}.body-text-typography-example-story h2:before{content:"H2";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;font-size:22px}.body-text-typography-example-story h2:before:hover{color:#999}@media (max-width: 800px){.body-text-typography-example-story h2:before{color:#fff!important}}.body-text-typography-example-story h3{position:relative}.body-text-typography-example-story h3:before{content:"H3";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;font-size:19px}.body-text-typography-example-story h3:before:hover{color:#999}@media (max-width: 800px){.body-text-typography-example-story h3:before{color:#fff!important}}.body-text-typography-example-story h4{position:relative}.body-text-typography-example-story h4:before{content:"H4";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;font-size:16px}.body-text-typography-example-story h4:before:hover{color:#999}@media (max-width: 800px){.body-text-typography-example-story h4:before{color:#fff!important}}.body-text-typography-example-story h5{position:relative}.body-text-typography-example-story h5:before{content:"H5";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;font-size:15px}.body-text-typography-example-story h5:before:hover{color:#999}@media (max-width: 800px){.body-text-typography-example-story h5:before{color:#fff!important}}.body-text-typography-example-story h6{position:relative}.body-text-typography-example-story h6:before{content:"H6";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;font-size:12px}.body-text-typography-example-story h6:before:hover{color:#999}@media (max-width: 800px){.body-text-typography-example-story h6:before{color:#fff!important}}.body-text-typography-example-story blockquote{position:relative}.body-text-typography-example-story blockquote: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;content:"“";font-size:3rem;line-height:3rem}.body-text-typography-example-story blockquote:before:hover{color:#999}@media (max-width: 800px){.body-text-typography-example-story blockquote:before{color:#fff!important}}.body-text-typography-example-story blockquote blockquote:before{display:none}

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
import{S as C,i as D,s as j,C as T,g as c,z as b,m,d as g,t as p,h as u,f as y,j as d}from"./index-85f88930.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-fa95313f.js";import{B}from"./BodyText-4b324c0f.js";import{w as P}from"./withParams-47e2ab71.js";import"./Markdown-e31fd5d7.js";import"./Block-d1b8152c.js";const E=`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.
import{S as D,i as C,s as j,l as T,c,o as b,m,h as g,t as p,a as u,k as y,d}from"./index-C9aKRT5A.js";import{g as q,a as A}from"./spread-CgU5AtxT.js";import{p as M,w as F,M as V,T as P,S as _}from"./collect-stories-ceFdpR5E.js";import{B}from"./BodyText-DOLlE-fm.js";import"./Markdown-BNYiGaXJ.js";import"./Block-C7biTRWl.js";const E=`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:
@ -31,7 +31,7 @@ Use it like this:
{/if}
{/each}
\`\`\`
`;function G(h){let o,n;const a=[h[0]];let i={};for(let t=0;t<a.length;t+=1)i=T(i,a[t]);return o=new B({props:i}),{c(){c(o.$$.fragment)},m(t,l){m(o,t,l),n=!0},p(t,l){const s=l&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 J(h){let o,n,a,i,t,l,s,f;const _=[{title:"Components/BodyText"},{component:B},P(E)];let k={};for(let e=0;e<_.length;e+=1)k=T(k,_[e]);return o=new F({props:k}),a=new V({props:{$$slots:{default:[G,({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.
`;function G(h){let o,n;const a=[h[0]];let i={};for(let t=0;t<a.length;t+=1)i=T(i,a[t]);return o=new B({props:i}),{c(){c(o.$$.fragment)},m(t,l){m(o,t,l),n=!0},p(t,l){const s=l&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 J(h){let o,n,a,i,t,l,s,f;const x=[{title:"Components/BodyText"},{component:B},F(E)];let k={};for(let e=0;e<x.length;e+=1)k=T(k,x[e]);return o=new V({props:k}),a=new P({props:{$$slots:{default:[G,({args:e})=>({0:e}),({args:e})=>e?1:0]},$$scope:{ctx:h}}}),t=new _({props:{name:"Default",args:{text:`Bacon ipsum **dolor amet** cow tongue tri-tip.
Biltong turducken ground round kevin [hamburger turkey](https://reuters.com) pig.
@ -39,7 +39,7 @@ Use it like this:
- [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:`<span class='drop-cap'>R</span>eprehenderit 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.
Venison shoulder *ham hock ham leberkas*. Flank beef ribs fatback, jerky meatball ham hock.`}}}),s=new _({props:{name:"Typography sample",args:{class:"body-text-typography-example-story",text:`<span class='drop-cap'>R</span>eprehenderit 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
@ -90,5 +90,4 @@ Tempor tail doner chicken incididunt beef ribs. Ad ullamco in cupim venison. Leb
Ham hock id porchetta elit. Sint spare ribs aute buffalo.
<p class='body-correction'>Correction: Lorem ispsum dolor sit amet ameno dorime.</p>
`}}}),{c(){c(o.$$.fragment),n=b(),c(a.$$.fragment),i=b(),c(t.$$.fragment),l=b(),c(s.$$.fragment)},m(e,r){m(o,e,r),g(e,n,r),m(a,e,r),g(e,i,r),m(t,e,r),g(e,l,r),m(s,e,r),f=!0},p(e,[r]){const S={};o.$set(S);const x={};r&3&&(x.$$scope={dirty:r,ctx:e}),a.$set(x)},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(i),y(l)),d(o,e),d(a,e),d(t,e),d(s,e)}}}class v extends C{constructor(o){super(),D(this,o,null,J,j,{})}}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":{name:"default",template:!0,source:"<BodyText {...args} />",hasArgs:!0},Default:{name:"Default",template:!1,source:"",hasArgs:!1},TypographySample:{name:"Typography sample",template:!1,source:"",hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","BodyText","withComponentDocs"]}),Q=$.meta,U=["Default","TypographySample"],Y=$.stories.Default,N=$.stories.TypographySample;export{Y as Default,N as TypographySample,U as __namedExportsOrder,Q as default};
//# sourceMappingURL=BodyText.stories-52ea43ea.js.map
`}}}),{c(){c(o.$$.fragment),n=b(),c(a.$$.fragment),i=b(),c(t.$$.fragment),l=b(),c(s.$$.fragment)},m(e,r){m(o,e,r),g(e,n,r),m(a,e,r),g(e,i,r),m(t,e,r),g(e,l,r),m(s,e,r),f=!0},p(e,[r]){const S={};o.$set(S);const w={};r&3&&(w.$$scope={dirty:r,ctx:e}),a.$set(w)},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(i),y(l)),d(o,e),d(a,e),d(t,e),d(s,e)}}}class v extends D{constructor(o){super(),C(this,o,null,J,j,{})}}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":{name:"default",template:!0,source:"<BodyText {...args} />",hasArgs:!0},Default:{name:"Default",template:!1,source:"",hasArgs:!1},TypographySample:{name:"Typography sample",template:!1,source:"",hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","BodyText","withComponentDocs"]}),Q=$.meta,U=["Default","TypographySample"],Y=$.stories.Default,z=$.stories.TypographySample;export{Y as Default,z as TypographySample,U as __namedExportsOrder,Q as default};

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,21 +0,0 @@
import{S as v,i as A,s as C,C as B,g as l,z as d,m as f,d as y,t as u,h as c,f as D,j as $}from"./index-85f88930.js";import{g as h,a as T}from"./spread-8a54911c.js";import{p as M,M as P,T as Z,S as I}from"./collect-stories-fa95313f.js";import{B as w}from"./Byline-bc75d557.js";import{w as O}from"./withParams-47e2ab71.js";import"./each-e59479a4.js";import"./Block-d1b8152c.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(p){let n,r;const a=[p[1]];let i={};for(let t=0;t<a.length;t+=1)i=B(i,a[t]);return n=new w({props:i}),{c(){l(n.$$.fragment)},m(t,o){f(n,t,o),r=!0},p(t,o){const m=o&2?h(a,[T(t[1])]):{};n.$set(m)},i(t){r||(u(n.$$.fragment,t),r=!0)},o(t){c(n.$$.fragment,t),r=!1},d(t){$(n,t)}}}function K(p){let n,r,a,i,t,o;const m=[{title:"Components/Byline"},{component:w},p[0]];let g={};for(let e=0;e<m.length;e+=1)g=B(g,m[e]);return n=new P({props:g}),a=new Z({props:{$$slots:{default:[k,({args:e})=>({1:e}),({args:e})=>e?2:0]},$$scope:{ctx:p}}}),t=new I({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(){l(n.$$.fragment),r=d(),l(a.$$.fragment),i=d(),l(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 b=s&1?h(m,[m[0],m[1],T(e[0])]):{};n.$set(b);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(p){return[{...O(j),argTypes:{align:{control:"select",options:["left","center"]}}}]}class q extends v{constructor(n){super(),A(this,n,R,K,C,{})}}const S=M(q,{meta:{title:"Components/Byline"},stories:{"tpl:default":{name:"default",template:!0,source:"<Byline {...args} />",hasArgs:!0},Default:{name:"Default",template:!1,source:"",hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","Byline","withComponentDocs"]}),Q=S.meta,U=["Default"],V=S.stories.Default;export{V as Default,U as __namedExportsOrder,Q as default};
//# sourceMappingURL=Byline.stories-793f887f.js.map

View file

@ -1 +0,0 @@
{"version":3,"file":"Byline.stories-793f887f.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"}

View file

@ -0,0 +1,20 @@
import{S as v,i as A,s as M,l as B,c as p,o as d,m as f,h as y,t as u,a as c,k as D,d as $}from"./index-C9aKRT5A.js";import{g as h,a as T}from"./spread-CgU5AtxT.js";import{p as C,M as P,T as Z,S as k,w as I}from"./collect-stories-ceFdpR5E.js";import{B as w}from"./Byline-CgwnbxHA.js";import"./each-D6YF6ztN.js";import"./Block-C7biTRWl.js";import"./_commonjsHelpers-BosuxZz1.js";import"./journalize-K6hK94UL.js";const O=`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 w({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 R(m){let n,r,a,i,t,o;const l=[{title:"Components/Byline"},{component:w},m[0]];let _={};for(let e=0;e<l.length;e+=1)_=B(_,l[e]);return n=new P({props:_}),a=new Z({props:{$$slots:{default:[K,({args:e})=>({1:e}),({args:e})=>e?2:0]},$$scope:{ctx:m}}}),t=new k({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 b=s&1?h(l,[l[0],l[1],T(e[0])]):{};n.$set(b);const g={};s&6&&(g.$$scope={dirty:s,ctx:e}),a.$set(g)},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 j(m){return[{...I(O),argTypes:{align:{control:"select",options:["left","center"]}}}]}class q extends v{constructor(n){super(),A(this,n,j,R,M,{})}}const S=C(q,{meta:{title:"Components/Byline"},stories:{"tpl:default":{name:"default",template:!0,source:"<Byline {...args} />",hasArgs:!0},Default:{name:"Default",template:!1,source:"",hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","Byline","withComponentDocs"]}),N=S.meta,Q=["Default"],U=S.stories.Default;export{U as Default,Q as __namedExportsOrder,N as default};

View file

Before

Width:  |  Height:  |  Size: 497 KiB

After

Width:  |  Height:  |  Size: 497 KiB

View file

Before

Width:  |  Height:  |  Size: 303 KiB

After

Width:  |  Height:  |  Size: 303 KiB

View file

Before

Width:  |  Height:  |  Size: 216 KiB

After

Width:  |  Height:  |  Size: 216 KiB

View file

Before

Width:  |  Height:  |  Size: 628 KiB

After

Width:  |  Height:  |  Size: 628 KiB

View file

Before

Width:  |  Height:  |  Size: 787 KiB

After

Width:  |  Height:  |  Size: 787 KiB

View file

Before

Width:  |  Height:  |  Size: 118 KiB

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

View file

@ -1,2 +0,0 @@
import{D as d,d as n}from"./chunk-S4VUQJ4A-e77a1bf8.js";import"./iframe-3532bc3f.js";import"../sb-preview/runtime.js";import"./index-33b6ba46.js";import"./_commonjsHelpers-de833af9.js";import"./index-d37d4223.js";import"./index-e04ae519.js";import"./index-356e4a49.js";export{d as DocsRenderer,n as defaultComponents};
//# sourceMappingURL=DocsRenderer-3PUGWF3O-36f09151.js.map

View file

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

View file

@ -0,0 +1,2 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CswL0fy2.js","./index-DwChlhAQ.js","./_commonjsHelpers-BosuxZz1.js","./index-D-8MO0q_.js"])))=>i.map(i=>d[i]);
import{_ as d}from"./iframe-DpI0ciXx.js";import{a as h,R as o,r as i}from"./index-DwChlhAQ.js";import{C as E,A as R,H as x,D as y}from"./index-lnWGua5u.js";import"../sb-preview/runtime.js";import"./_commonjsHelpers-BosuxZz1.js";import"./index-D-8MO0q_.js";import"./index-DxKRhftL.js";import"./index-DrFu-skq.js";var m={},u=h;m.createRoot=u.createRoot,m.hydrateRoot=u.hydrateRoot;var n=new Map,D=({callback:t,children:e})=>{let r=i.useRef();return i.useLayoutEffect(()=>{r.current!==t&&(r.current=t,t())},[t]),e},v=async(t,e,r)=>{let s=await _(e,r);return new Promise(a=>{s.render(o.createElement(D,{callback:()=>a(null)},t))})},w=(t,e)=>{let r=n.get(t);r&&(r.unmount(),n.delete(t))},_=async(t,e)=>{let r=n.get(t);return r||(r=m.createRoot(t,e),n.set(t,r)),r},f={code:E,a:R,...x},g=class extends i.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){let{showException:e}=this.props;e(t)}render(){let{hasError:t}=this.state,{children:e}=this.props;return t?null:o.createElement(o.Fragment,null,e)}},T=class{constructor(){this.render=async(t,e,r)=>{let s={...f,...e==null?void 0:e.components},a=y;return new Promise((p,l)=>{d(async()=>{const{MDXProvider:c}=await import("./index-CswL0fy2.js");return{MDXProvider:c}},__vite__mapDeps([0,1,2,3]),import.meta.url).then(({MDXProvider:c})=>v(o.createElement(g,{showException:l,key:Math.random()},o.createElement(c,{components:s},o.createElement(a,{context:t,docsParameter:e}))),r)).then(()=>p())})},this.unmount=t=>{w(t)}}};export{T as DocsRenderer,f as defaultComponents};

View file

@ -1 +0,0 @@
{"version":3,"file":"DocumentCloud.stories-50f94283.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"}

View file

@ -1,4 +1,4 @@
import{S as $,i as k,s as C,g as d,m as f,t as p,h as g,j as h,o as q,b as m,F as b,d as w,f as _,C as v,z as D}from"./index-85f88930.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-fa95313f.js";import{B}from"./Block-d1b8152c.js";import{w as E}from"./withParams-47e2ab71.js";const F=`Embed a document hosted by [DocumentCloud](https://documentcloud.org)
import{S as k,i as $,s as C,c as m,m as f,t as p,a as g,d as h,q,f as d,w as b,h as w,k as _,l as v,o as D}from"./index-C9aKRT5A.js";import{g as A,a as S}from"./spread-CgU5AtxT.js";import{p as R,M,T as V,S as B,w as E}from"./collect-stories-ceFdpR5E.js";import{B as H}from"./Block-C7biTRWl.js";const P=`Embed a document hosted by [DocumentCloud](https://documentcloud.org)
---
@ -15,5 +15,4 @@ The document must have its access level set to public before it can be embedded.
width="normal"
/>
\`\`\`
`;function H(a){let e,o;return{c(){e=q("iframe"),m(e,"class","h-screen"),b(e.src,o="https://embed.documentcloud.org/documents/"+a[1]+"/?embed=1&responsive=1&title=1")||m(e,"src",o),m(e,"title",a[2]),m(e,"width","700"),m(e,"height","540"),m(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")&&m(e,"src",o),l&4&&m(e,"title",t[2])},d(t){t&&_(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(){d(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 z(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 y extends ${constructor(e){super(),k(this,e,z,P,C,{width:0,slug:1,altText:2,id:3,class:4})}}y.__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 L(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 y({props:l}),{c(){d(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 N(a){let e,o,t,l,s,r;const u=[{title:"Components/DocumentCloud"},{component:y},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:[L,({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(){d(e.$$.fragment),o=D(),d(t.$$.fragment),l=D(),d(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&&(_(o),_(l)),h(e,n),h(t,n),h(s,n)}}}function O(a){return[{...E(F),argTypes:{width:{control:"select",options:["normal","wide","wider","widest","fluid"]}}}]}class U extends ${constructor(e){super(),k(this,e,O,N,C,{})}}const x=R(U,{meta:{title:"Components/DocumentCloud"},stories:{"tpl:default":{name:"default",template:!0,source:"<DocumentCloud {...args} />",hasArgs:!0},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-50f94283.js.map
`;function j(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&&_(e)}}}function F(a){let e,o;return e=new H({props:{width:a[0],id:a[3],class:"photo fmy-6 "+a[4],$$slots:{default:[j]},$$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 y extends k{constructor(e){super(),$(this,e,L,F,C,{width:0,slug:1,altText:2,id:3,class:4})}}y.__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 y({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:y},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 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=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&&(_(o),_(l)),h(e,n),h(t,n),h(s,n)}}}function U(a){return[{...E(P),argTypes:{width:{control:"select",options:["normal","wide","wider","widest","fluid"]}}}]}class W extends k{constructor(e){super(),$(this,e,U,O,C,{})}}const x=R(W,{meta:{title:"Components/DocumentCloud"},stories:{"tpl:default":{name:"default",template:!0,source:"<DocumentCloud {...args} />",hasArgs:!0},Default:{name:"Default",template:!1,source:"",hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","DocumentCloud","withComponentDocs"]}),Q=x.meta,X=["Default"],Y=x.stories.Default;export{Y as Default,X as __namedExportsOrder,Q as default};

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
import{S as E,i as D,s as L,v as M,d as _,t as m,w as S,h as f,x as V,f as $,o as k,g as p,b as v,e as z,m as c,j as d,C as P,z as h}from"./index-85f88930.js";import{g as H,a as A}from"./spread-8a54911c.js";import{p as T,M as j,T as F,S as N}from"./collect-stories-fa95313f.js";import{F as q}from"./fa-95fa679c.js";import{w as I}from"./withParams-47e2ab71.js";const O=`An embed tool for development in graphics kit.
import{S as y,i as E,s as L,D as M,h as $,t as m,r as S,a as f,u as V,k as _,q as k,c as p,f as v,j as H,m as c,d,l as P,o as h}from"./index-C9aKRT5A.js";import{g as z,a as A}from"./spread-CgU5AtxT.js";import{p as T,w as j,M as q,T as F,S as N}from"./collect-stories-ceFdpR5E.js";import{F as I}from"./fa-DMEUqF6U.js";const O=`An embed tool for development in graphics kit.
\`\`\`svelte
<script>
@ -12,5 +12,4 @@ import{S as E,i as D,s as L,v as M,d as _,t as m,w as S,h as f,x as V,f as $,o a
`;/*!
* 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(o){let t,a,e,n;return e=new q({props:{icon:R}}),{c(){t=k("div"),a=k("a"),p(e.$$.fragment),v(a,"rel","external"),v(a,"href","/embed-previewer"),v(a,"class","svelte-715e2e"),v(t,"class","svelte-715e2e")},m(r,i){_(r,t,i),z(t,a),c(e,a,null),n=!0},i(r){n||(m(e.$$.fragment,r),n=!0)},o(r){f(e.$$.fragment,r),n=!1},d(r){r&&$(t),d(e)}}}function W(o){let t,a,e=o[0]&&y();return{c(){e&&e.c(),t=M()},m(n,r){e&&e.m(n,r),_(n,t,r),a=!0},p(n,[r]){n[0]?e?r&1&&m(e,1):(e=y(),e.c(),m(e,1),e.m(t.parentNode,t)):e&&(S(),f(e,1,1,()=>{e=null}),V())},i(n){a||(m(e),a=!0)},o(n){f(e),a=!1},d(n){n&&$(t),e&&e.d(n)}}}function B(o,t,a){let{dev:e=!1}=t;return o.$$set=n=>{"dev"in n&&a(0,e=n.dev)},[e]}class g extends E{constructor(t){super(),D(this,t,B,W,L,{dev:0})}}g.__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(o){let t,a;const e=[o[0]];let n={};for(let r=0;r<e.length;r+=1)n=P(n,e[r]);return t=new g({props:n}),{c(){p(t.$$.fragment)},m(r,i){c(t,r,i),a=!0},p(r,i){const u=i&1?H(e,[A(r[0])]):{};t.$set(u)},i(r){a||(m(t.$$.fragment,r),a=!0)},o(r){f(t.$$.fragment,r),a=!1},d(r){d(t,r)}}}function J(o){let t,a,e,n,r,i;const u=[{title:"Components/EmbedPreviewerLink"},{component:g},I(O)];let w={};for(let s=0;s<u.length;s+=1)w=P(w,u[s]);return t=new j({props:w}),e=new F({props:{$$slots:{default:[G,({args:s})=>({0:s}),({args:s})=>s?1:0]},$$scope:{ctx:o}}}),r=new N({props:{name:"Default",args:{dev:!0}}}),{c(){p(t.$$.fragment),a=h(),p(e.$$.fragment),n=h(),p(r.$$.fragment)},m(s,l){c(t,s,l),_(s,a,l),c(e,s,l),_(s,n,l),c(r,s,l),i=!0},p(s,[l]){const C={};t.$set(C);const b={};l&3&&(b.$$scope={dirty:l,ctx:s}),e.$set(b)},i(s){i||(m(t.$$.fragment,s),m(e.$$.fragment,s),m(r.$$.fragment,s),i=!0)},o(s){f(t.$$.fragment,s),f(e.$$.fragment,s),f(r.$$.fragment,s),i=!1},d(s){s&&($(a),$(n)),d(t,s),d(e,s),d(r,s)}}}class K extends E{constructor(t){super(),D(this,t,null,J,L,{})}}const x=T(K,{meta:{title:"Components/EmbedPreviewerLink"},stories:{"tpl:default":{name:"default",template:!0,source:"<EmbedPreviewerLink {...args} />",hasArgs:!0},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-7baa81d6.js.map
*/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 D(o){let t,a,e,n;return e=new I({props:{icon:R}}),{c(){t=k("div"),a=k("a"),p(e.$$.fragment),v(a,"rel","external"),v(a,"href","/embed-previewer"),v(a,"class","svelte-715e2e"),v(t,"class","svelte-715e2e")},m(r,i){$(r,t,i),H(t,a),c(e,a,null),n=!0},i(r){n||(m(e.$$.fragment,r),n=!0)},o(r){f(e.$$.fragment,r),n=!1},d(r){r&&_(t),d(e)}}}function W(o){let t,a,e=o[0]&&D();return{c(){e&&e.c(),t=M()},m(n,r){e&&e.m(n,r),$(n,t,r),a=!0},p(n,[r]){n[0]?e?r&1&&m(e,1):(e=D(),e.c(),m(e,1),e.m(t.parentNode,t)):e&&(S(),f(e,1,1,()=>{e=null}),V())},i(n){a||(m(e),a=!0)},o(n){f(e),a=!1},d(n){n&&_(t),e&&e.d(n)}}}function B(o,t,a){let{dev:e=!1}=t;return o.$$set=n=>{"dev"in n&&a(0,e=n.dev)},[e]}class g extends y{constructor(t){super(),E(this,t,B,W,L,{dev:0})}}g.__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(o){let t,a;const e=[o[0]];let n={};for(let r=0;r<e.length;r+=1)n=P(n,e[r]);return t=new g({props:n}),{c(){p(t.$$.fragment)},m(r,i){c(t,r,i),a=!0},p(r,i){const u=i&1?z(e,[A(r[0])]):{};t.$set(u)},i(r){a||(m(t.$$.fragment,r),a=!0)},o(r){f(t.$$.fragment,r),a=!1},d(r){d(t,r)}}}function J(o){let t,a,e,n,r,i;const u=[{title:"Components/EmbedPreviewerLink"},{component:g},j(O)];let w={};for(let s=0;s<u.length;s+=1)w=P(w,u[s]);return t=new q({props:w}),e=new F({props:{$$slots:{default:[G,({args:s})=>({0:s}),({args:s})=>s?1:0]},$$scope:{ctx:o}}}),r=new N({props:{name:"Default",args:{dev:!0}}}),{c(){p(t.$$.fragment),a=h(),p(e.$$.fragment),n=h(),p(r.$$.fragment)},m(s,l){c(t,s,l),$(s,a,l),c(e,s,l),$(s,n,l),c(r,s,l),i=!0},p(s,[l]){const C={};t.$set(C);const b={};l&3&&(b.$$scope={dirty:l,ctx:s}),e.$set(b)},i(s){i||(m(t.$$.fragment,s),m(e.$$.fragment,s),m(r.$$.fragment,s),i=!0)},o(s){f(t.$$.fragment,s),f(e.$$.fragment,s),f(r.$$.fragment,s),i=!1},d(s){s&&(_(a),_(n)),d(t,s),d(e,s),d(r,s)}}}class K extends y{constructor(t){super(),E(this,t,null,J,L,{})}}const x=T(K,{meta:{title:"Components/EmbedPreviewerLink"},stories:{"tpl:default":{name:"default",template:!0,source:"<EmbedPreviewerLink {...args} />",hasArgs:!0},Default:{name:"Default",template:!1,source:"",hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","EmbedPreviewerLink","withComponentDocs"]}),Z=x.meta,ee=["Default"],te=x.stories.Default;export{te as Default,ee as __namedExportsOrder,Z as default};

View file

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

View file

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

View file

@ -0,0 +1,25 @@
import{S as C,i as S,s as M,c as p,m as d,t as f,a as m,d as $,D as q,h as _,r as A,u as B,k as g,K as F,q as D,o as w,f as E,j as P,l as I}from"./index-C9aKRT5A.js";import{g as K,a as O}from"./spread-CgU5AtxT.js";import{p as z,w as G,M as H,T as J,S as L}from"./collect-stories-ceFdpR5E.js";import{e as N}from"./each-D6YF6ztN.js";import{B as Q}from"./Block-C7biTRWl.js";import{M as v}from"./Markdown-BNYiGaXJ.js";const R=`End notes includes notes to the main article — usually things like sources, clarifiying notes and minor corrections at the end of a story.
\`\`\`svelte
<script>
import { EndNotes } 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>
<EndNotes notes="{notes}" />
\`\`\`
`;function b(i,n,a){const e=i.slice();return e[1]=n[a],e}function T(i){let n,a,e=N(i[0]),t=[];for(let l=0;l<e.length;l+=1)t[l]=x(b(i,e,l));const s=l=>m(t[l],1,1,()=>{t[l]=null});return{c(){for(let l=0;l<t.length;l+=1)t[l].c();n=q()},m(l,c){for(let o=0;o<t.length;o+=1)t[o]&&t[o].m(l,c);_(l,n,c),a=!0},p(l,c){if(c&1){e=N(l[0]);let o;for(o=0;o<e.length;o+=1){const r=b(l,e,o);t[o]?(t[o].p(r,c),f(t[o],1)):(t[o]=x(r),t[o].c(),f(t[o],1),t[o].m(n.parentNode,n))}for(A(),o=e.length;o<t.length;o+=1)s(o);B()}},i(l){if(!a){for(let c=0;c<e.length;c+=1)f(t[c]);a=!0}},o(l){t=t.filter(Boolean);for(let c=0;c<t.length;c+=1)m(t[c]);a=!1},d(l){l&&g(n),F(t,l)}}}function x(i){let n,a,e,t,s,l,c;return a=new v({props:{source:i[1].title}}),s=new v({props:{source:i[1].text}}),{c(){n=D("div"),p(a.$$.fragment),e=w(),t=D("div"),p(s.$$.fragment),l=w(),E(n,"class","note-title svelte-1rn1hl4"),E(t,"class","note-content svelte-1rn1hl4")},m(o,r){_(o,n,r),d(a,n,null),_(o,e,r),_(o,t,r),d(s,t,null),P(t,l),c=!0},p(o,r){const u={};r&1&&(u.source=o[1].title),a.$set(u);const h={};r&1&&(h.source=o[1].text),s.$set(h)},i(o){c||(f(a.$$.fragment,o),f(s.$$.fragment,o),c=!0)},o(o){m(a.$$.fragment,o),m(s.$$.fragment,o),c=!1},d(o){o&&(g(n),g(e),g(t)),$(a),$(s)}}}function U(i){let n,a,e=i[0]&&T(i);return{c(){e&&e.c(),n=q()},m(t,s){e&&e.m(t,s),_(t,n,s),a=!0},p(t,s){t[0]?e?(e.p(t,s),s&1&&f(e,1)):(e=T(t),e.c(),f(e,1),e.m(n.parentNode,n)):e&&(A(),m(e,1,1,()=>{e=null}),B())},i(t){a||(f(e),a=!0)},o(t){m(e),a=!1},d(t){t&&g(n),e&&e.d(t)}}}function V(i){let n,a;return n=new Q({props:{class:"notes fmt-6 fmb-8",$$slots:{default:[U]},$$scope:{ctx:i}}}),{c(){p(n.$$.fragment)},m(e,t){d(n,e,t),a=!0},p(e,[t]){const s={};t&17&&(s.$$scope={dirty:t,ctx:e}),n.$set(s)},i(e){a||(f(n.$$.fragment,e),a=!0)},o(e){m(n.$$.fragment,e),a=!1},d(e){$(n,e)}}}function W(i,n,a){let{notes:e=[]}=n;return i.$$set=t=>{"notes"in t&&a(0,e=t.notes)},[e]}class k extends C{constructor(n){super(),S(this,n,W,V,M,{notes:0})}}k.__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:[]};const X=i=>i.map(n=>({title:n.Title,text:n.Text}));function Y(i){let n,a;const e=[i[1]];let t={};for(let s=0;s<e.length;s+=1)t=I(t,e[s]);return n=new k({props:t}),{c(){p(n.$$.fragment)},m(s,l){d(n,s,l),a=!0},p(s,l){const c=l&2?K(e,[O(s[1])]):{};n.$set(c)},i(s){a||(f(n.$$.fragment,s),a=!0)},o(s){m(n.$$.fragment,s),a=!1},d(s){$(n,s)}}}function Z(i){let n,a,e,t,s,l;const c=[{title:"Components/EndNotes"},{component:k},G(R)];let o={};for(let r=0;r<c.length;r+=1)o=I(o,c[r]);return n=new H({props:o}),e=new J({props:{$$slots:{default:[Y,({args:r})=>({1:r}),({args:r})=>r?2:0]},$$scope:{ctx:i}}}),s=new L({props:{name:"Default",args:{notes:X(i[0])}}}),{c(){p(n.$$.fragment),a=w(),p(e.$$.fragment),t=w(),p(s.$$.fragment)},m(r,u){d(n,r,u),_(r,a,u),d(e,r,u),_(r,t,u),d(s,r,u),l=!0},p(r,[u]){const h={};n.$set(h);const y={};u&6&&(y.$$scope={dirty:u,ctx:r}),e.$set(y)},i(r){l||(f(n.$$.fragment,r),f(e.$$.fragment,r),f(s.$$.fragment,r),l=!0)},o(r){m(n.$$.fragment,r),m(e.$$.fragment,r),m(s.$$.fragment,r),l=!1},d(r){r&&(g(a),g(t)),$(n,r),$(e,r),$(s,r)}}}function ee(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 te extends C{constructor(n){super(),S(this,n,ee,Z,M,{})}}const j=z(te,{meta:{title:"Components/EndNotes"},stories:{"tpl:default":{name:"default",template:!0,source:"<EndNotes {...args} />",hasArgs:!0},Default:{name:"Default",template:!1,source:"",hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","EndNotes","getEndNotesPropsFromDoc","withComponentDocs"]}),ie=j.meta,ce=["Default"],fe=j.stories.Default;export{fe as Default,ce as __namedExportsOrder,ie as default};

View file

@ -1,26 +0,0 @@
import{S as C,i as S,s as M,g as p,m as d,t as f,h as u,j as $,v as A,d as _,w as B,x as I,f as g,V as F,o as E,z as w,b as v,e as P,C as j}from"./index-85f88930.js";import{g as z,a as O}from"./spread-8a54911c.js";import{p as V,M as G,T as H,S as J}from"./collect-stories-fa95313f.js";import{e as D}from"./each-e59479a4.js";import{B as K}from"./Block-d1b8152c.js";import{M as N}from"./Markdown-e31fd5d7.js";import{w as L}from"./withParams-47e2ab71.js";const Q=`End notes includes notes to the main article — usually things like sources, clarifiying notes and minor corrections at the end of a story.
\`\`\`svelte
<script>
import { EndNotes } 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>
<EndNotes notes="{notes}" />
\`\`\`
`;function b(i,n,a){const e=i.slice();return e[1]=n[a],e}function x(i){let n,a,e=D(i[0]),t=[];for(let l=0;l<e.length;l+=1)t[l]=T(b(i,e,l));const s=l=>u(t[l],1,1,()=>{t[l]=null});return{c(){for(let l=0;l<t.length;l+=1)t[l].c();n=A()},m(l,c){for(let o=0;o<t.length;o+=1)t[o]&&t[o].m(l,c);_(l,n,c),a=!0},p(l,c){if(c&1){e=D(l[0]);let o;for(o=0;o<e.length;o+=1){const r=b(l,e,o);t[o]?(t[o].p(r,c),f(t[o],1)):(t[o]=T(r),t[o].c(),f(t[o],1),t[o].m(n.parentNode,n))}for(B(),o=e.length;o<t.length;o+=1)s(o);I()}},i(l){if(!a){for(let c=0;c<e.length;c+=1)f(t[c]);a=!0}},o(l){t=t.filter(Boolean);for(let c=0;c<t.length;c+=1)u(t[c]);a=!1},d(l){l&&g(n),F(t,l)}}}function T(i){let n,a,e,t,s,l,c;return a=new N({props:{source:i[1].title}}),s=new N({props:{source:i[1].text}}),{c(){n=E("div"),p(a.$$.fragment),e=w(),t=E("div"),p(s.$$.fragment),l=w(),v(n,"class","note-title svelte-as9r96"),v(t,"class","note-content svelte-as9r96")},m(o,r){_(o,n,r),d(a,n,null),_(o,e,r),_(o,t,r),d(s,t,null),P(t,l),c=!0},p(o,r){const m={};r&1&&(m.source=o[1].title),a.$set(m);const h={};r&1&&(h.source=o[1].text),s.$set(h)},i(o){c||(f(a.$$.fragment,o),f(s.$$.fragment,o),c=!0)},o(o){u(a.$$.fragment,o),u(s.$$.fragment,o),c=!1},d(o){o&&(g(n),g(e),g(t)),$(a),$(s)}}}function R(i){let n,a,e=i[0]&&x(i);return{c(){e&&e.c(),n=A()},m(t,s){e&&e.m(t,s),_(t,n,s),a=!0},p(t,s){t[0]?e?(e.p(t,s),s&1&&f(e,1)):(e=x(t),e.c(),f(e,1),e.m(n.parentNode,n)):e&&(B(),u(e,1,1,()=>{e=null}),I())},i(t){a||(f(e),a=!0)},o(t){u(e),a=!1},d(t){t&&g(n),e&&e.d(t)}}}function U(i){let n,a;return n=new K({props:{class:"notes fmt-6 fmb-8",$$slots:{default:[R]},$$scope:{ctx:i}}}),{c(){p(n.$$.fragment)},m(e,t){d(n,e,t),a=!0},p(e,[t]){const s={};t&17&&(s.$$scope={dirty:t,ctx:e}),n.$set(s)},i(e){a||(f(n.$$.fragment,e),a=!0)},o(e){u(n.$$.fragment,e),a=!1},d(e){$(n,e)}}}function W(i,n,a){let{notes:e=[]}=n;return i.$$set=t=>{"notes"in t&&a(0,e=t.notes)},[e]}class y extends C{constructor(n){super(),S(this,n,W,U,M,{notes:0})}}y.__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:[]};const X=i=>i.map(n=>({title:n.Title,text:n.Text}));function Y(i){let n,a;const e=[i[1]];let t={};for(let s=0;s<e.length;s+=1)t=j(t,e[s]);return n=new y({props:t}),{c(){p(n.$$.fragment)},m(s,l){d(n,s,l),a=!0},p(s,l){const c=l&2?z(e,[O(s[1])]):{};n.$set(c)},i(s){a||(f(n.$$.fragment,s),a=!0)},o(s){u(n.$$.fragment,s),a=!1},d(s){$(n,s)}}}function Z(i){let n,a,e,t,s,l;const c=[{title:"Components/EndNotes"},{component:y},L(Q)];let o={};for(let r=0;r<c.length;r+=1)o=j(o,c[r]);return n=new G({props:o}),e=new H({props:{$$slots:{default:[Y,({args:r})=>({1:r}),({args:r})=>r?2:0]},$$scope:{ctx:i}}}),s=new J({props:{name:"Default",args:{notes:X(i[0])}}}),{c(){p(n.$$.fragment),a=w(),p(e.$$.fragment),t=w(),p(s.$$.fragment)},m(r,m){d(n,r,m),_(r,a,m),d(e,r,m),_(r,t,m),d(s,r,m),l=!0},p(r,[m]){const h={};n.$set(h);const k={};m&6&&(k.$$scope={dirty:m,ctx:r}),e.$set(k)},i(r){l||(f(n.$$.fragment,r),f(e.$$.fragment,r),f(s.$$.fragment,r),l=!0)},o(r){u(n.$$.fragment,r),u(e.$$.fragment,r),u(s.$$.fragment,r),l=!1},d(r){r&&(g(a),g(t)),$(n,r),$(e,r),$(s,r)}}}function ee(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 te extends C{constructor(n){super(),S(this,n,ee,Z,M,{})}}const q=V(te,{meta:{title:"Components/EndNotes"},stories:{"tpl:default":{name:"default",template:!0,source:"<EndNotes {...args} />",hasArgs:!0},Default:{name:"Default",template:!1,source:"",hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","EndNotes","getEndNotesPropsFromDoc","withComponentDocs"]}),ce=q.meta,fe=["Default"],me=q.stories.Default;export{me as Default,fe as __namedExportsOrder,ce as default};
//# sourceMappingURL=EndNotes.stories-fa5fa1c9.js.map

View file

@ -1 +0,0 @@
{"version":3,"file":"EndNotes.stories-fa5fa1c9.js","sources":["../../src/components/EndNotes/stories/docs/component.md?raw","../../src/components/EndNotes/EndNotes.svelte","../../src/components/EndNotes/docProps.ts","../../src/components/EndNotes/EndNotes.stories.svelte"],"sourcesContent":["export default \"End notes includes notes to the main article — usually things like sources, clarifiying notes and minor corrections at the end of a story.\\n\\n```svelte\\n<script>\\n import { EndNotes } 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<EndNotes 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 */\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 Block from '../Block/Block.svelte';\n import Markdown from '../Markdown/Markdown.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\">\n <Markdown source=\"{note.title}\" />\n </div>\n <div class=\"note-content\">\n <Markdown source=\"{note.text}\" />\n </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 }\n }\n</style>\n","interface EndNote {\n Title: String;\n Text: String;\n}\n\ntype EndNotes = EndNote[];\n\nexport const getEndNotesPropsFromDoc = (endNotes: EndNotes) => {\n return endNotes.map((d) => {\n return {\n title: d.Title,\n text: d.Text,\n };\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 EndNotes from './EndNotes.svelte';\n import { getEndNotesPropsFromDoc } from './docProps';\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 name=\"Default\" args=\"{{ notes: getEndNotesPropsFromDoc(notes) }}\" />\n"],"names":["componentDocs","ctx","i","each_blocks","markdown0","Markdown","markdown1","insert","target","div0","anchor","div1","dirty","markdown0_changes","markdown1_changes","create_if_block","notes","$$props","getEndNotesPropsFromDoc","endNotes","d","EndNotes","withComponentDocs"],"mappings":"ocAAA,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;mFC0BJC,EAAK,CAAA,CAAA,uBAAV,OAAIC,GAAA,wMAACD,EAAK,CAAA,CAAA,oBAAV,OAAIC,GAAA,EAAA,iHAAJ,OAAIA,EAAAC,EAAA,OAAAD,GAAA,yCAAJ,OAAIA,GAAA,0IAEiB,OAAAE,EAAA,IAAAC,EAAA,CAAA,MAAA,CAAA,OAAAJ,KAAK,KAAK,CAAA,CAAA,EAGVK,EAAA,IAAAD,EAAA,CAAA,MAAA,CAAA,OAAAJ,KAAK,IAAI,CAAA,CAAA,qKAJ9BM,EAEKC,EAAAC,EAAAC,CAAA,uBACLH,EAEKC,EAAAG,EAAAD,CAAA,6CAJgBE,EAAA,IAAAC,EAAA,OAAAZ,KAAK,4BAGLW,EAAA,IAAAE,EAAA,OAAAb,KAAK,qLANzBA,EAAK,CAAA,GAAAc,EAAAd,CAAA,sEAALA,EAAK,CAAA,0eAPC,MAAAe,EAAK,EAAA,EAAAC,kdCXL,MAAAC,EAA2BC,GAC/BA,EAAS,IAAKC,IACZ,CACL,MAAOA,EAAE,MACT,KAAMA,EAAE,IAAA,EAEX,iCCoBanB,EAAI,CAAA,CAAA,oJAAJA,EAAI,CAAA,CAAA,CAAA,CAAA,+KALNoB,CAAQ,EAChBC,EAAkBtB,CAAa,kNAON,MAAOkB,EAAwBjB,EAAK,CAAA,CAAA,waA1BtD,EAEP,MAAO,OACP,KAAM,gCAGN,CAAA,MAAO,UACP,KAAM,YAAY,GAGlB,MAAO,YACP,KAAM"}

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,4 +1,4 @@
import{S as Q,i as G,s as q,C as y,g as m,z as _,m as f,d as T,t as h,h as u,f as w,j as g}from"./index-85f88930.js";import{g as E,a as M}from"./spread-8a54911c.js";import{p as W,M as z,T as L,S as I}from"./collect-stories-fa95313f.js";import{F as v}from"./FeaturePhoto-5db06745.js";import{b as U,w as N}from"./withParams-47e2ab71.js";import"./Block-d1b8152c.js";import"./PaddingReset-c34038dd.js";const O=`A full-width photo inside the text well.
import{S as j,i as G,s as q,l as y,c as m,o as _,m as f,h as T,t as h,a as u,k as w,d as g}from"./index-C9aKRT5A.js";import{g as U,a as v}from"./spread-CgU5AtxT.js";import{p as W,M as z,T as O,S as I,a as M,w as B}from"./collect-stories-ceFdpR5E.js";import{F as E}from"./FeaturePhoto-DrqYCojc.js";import"./Block-C7biTRWl.js";import"./PaddingReset-CiOBBFtT.js";const L=`A full-width photo inside the text well.
\`\`\`svelte
<script>
@ -14,7 +14,7 @@ import{S as Q,i as G,s as q,C as y,g as m,z as _,m as f,d as T,t as h,h as u,f a
width="normal"
/>
\`\`\`
`,B=`An example of using \`FeaturePhoto\` in the Graphics Kit with a Google Doc.
`,N=`An example of using \`FeaturePhoto\` in the Graphics Kit with a Google Doc.
\`\`\`yaml
# Google doc block
@ -52,5 +52,4 @@ Caption: Carcharodon carcharias - REUTERS
{/if}
{/each}
\`\`\`
`,H="If your photo is missing `altText` a small warning will overlay the image.\n",S=""+new URL("shark-f4201fc0.jpg",import.meta.url).href;function J(c){let s,r;const n=[c[1]];let i={};for(let e=0;e<n.length;e+=1)i=y(i,n[e]);return s=new v({props:i}),{c(){m(s.$$.fragment)},m(e,p){f(s,e,p),r=!0},p(e,p){const a=p&2?E(n,[M(e[1])]):{};s.$set(a)},i(e){r||(h(s.$$.fragment,e),r=!0)},o(e){u(s.$$.fragment,e),r=!1},d(e){g(s,e)}}}function V(c){let s,r,n,i,e,p,a,k,l,d;const $=[{title:"Components/FeaturePhoto"},{component:v},c[0]];let A={};for(let t=0;t<$.length;t+=1)A=y(A,$[t]);s=new z({props:A}),n=new L({props:{$$slots:{default:[J,({args:t})=>({1:t}),({args:t})=>t?2:0]},$$scope:{ctx:c}}}),e=new I({props:{name:"Default",args:{src:S,altText:"A shark!",width:"normal",caption:"Carcharodon carcharias - REUTERS"}}});const P=[{name:"🚀 QUICKIT"},{args:{src:S,altText:"A shark!",width:"normal",caption:"Carcharodon carcharias - REUTERS"}},U(B)];let C={};for(let t=0;t<P.length;t+=1)C=y(C,P[t]);a=new I({props:C});const b=[{name:"Missing altText"},{args:{src:S,width:"normal",caption:"Carcharodon carcharias - REUTERS"}},U(H)];let D={};for(let t=0;t<b.length;t+=1)D=y(D,b[t]);return l=new I({props:D}),{c(){m(s.$$.fragment),r=_(),m(n.$$.fragment),i=_(),m(e.$$.fragment),p=_(),m(a.$$.fragment),k=_(),m(l.$$.fragment)},m(t,o){f(s,t,o),T(t,r,o),f(n,t,o),T(t,i,o),f(e,t,o),T(t,p,o),f(a,t,o),T(t,k,o),f(l,t,o),d=!0},p(t,[o]){const R=o&1?E($,[$[0],$[1],M(t[0])]):{};s.$set(R);const F={};o&6&&(F.$$scope={dirty:o,ctx:t}),n.$set(F);const K={};a.$set(K);const j={};l.$set(j)},i(t){d||(h(s.$$.fragment,t),h(n.$$.fragment,t),h(e.$$.fragment,t),h(a.$$.fragment,t),h(l.$$.fragment,t),d=!0)},o(t){u(s.$$.fragment,t),u(n.$$.fragment,t),u(e.$$.fragment,t),u(a.$$.fragment,t),u(l.$$.fragment,t),d=!1},d(t){t&&(w(r),w(i),w(p),w(k)),g(s,t),g(n,t),g(e,t),g(a,t),g(l,t)}}}function X(c){return[{...N(O),argTypes:{width:{control:"select",options:["normal","wide","wider","widest","fluid"]},textWidth:{control:"select",options:["normal","wide","wider","widest","fluid"]}}}]}class Y extends Q{constructor(s){super(),G(this,s,X,V,q,{})}}const x=W(Y,{meta:{title:"Components/FeaturePhoto"},stories:{"tpl:default":{name:"default",template:!0,source:"<FeaturePhoto {...args} />",hasArgs:!0},Default:{name:"Default",template:!1,source:"",hasArgs:!1},QUICKIT:{name:"🚀 QUICKIT",template:!1,source:"",hasArgs:!1},MissingAltText:{name:"Missing altText",template:!1,source:"",hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","quickitDocs","missingAltTextDocs","FeaturePhoto","sharkSrc","withComponentDocs","withStoryDocs"]}),rt=x.meta,it=["Default","QUICKIT","MissingAltText"],pt=x.stories.Default,lt=x.stories.QUICKIT,ct=x.stories.MissingAltText;export{pt as Default,ct as MissingAltText,lt as QUICKIT,it as __namedExportsOrder,rt as default};
//# sourceMappingURL=FeaturePhoto.stories-f81bc16e.js.map
`,H="If your photo is missing `altText` a small warning will overlay the image.\n",S=""+new URL("shark-BvMOz9gh.jpg",import.meta.url).href;function J(c){let s,r;const n=[c[1]];let i={};for(let e=0;e<n.length;e+=1)i=y(i,n[e]);return s=new E({props:i}),{c(){m(s.$$.fragment)},m(e,p){f(s,e,p),r=!0},p(e,p){const a=p&2?U(n,[v(e[1])]):{};s.$set(a)},i(e){r||(h(s.$$.fragment,e),r=!0)},o(e){u(s.$$.fragment,e),r=!1},d(e){g(s,e)}}}function V(c){let s,r,n,i,e,p,a,x,l,d;const $=[{title:"Components/FeaturePhoto"},{component:E},c[0]];let A={};for(let t=0;t<$.length;t+=1)A=y(A,$[t]);s=new z({props:A}),n=new O({props:{$$slots:{default:[J,({args:t})=>({1:t}),({args:t})=>t?2:0]},$$scope:{ctx:c}}}),e=new I({props:{name:"Default",args:{src:S,altText:"A shark!",width:"normal",caption:"Carcharodon carcharias - REUTERS"}}});const P=[{name:"🚀 QUICKIT"},{args:{src:S,altText:"A shark!",width:"normal",caption:"Carcharodon carcharias - REUTERS"}},M(N)];let D={};for(let t=0;t<P.length;t+=1)D=y(D,P[t]);a=new I({props:D});const F=[{name:"Missing altText"},{args:{src:S,width:"normal",caption:"Carcharodon carcharias - REUTERS"}},M(H)];let C={};for(let t=0;t<F.length;t+=1)C=y(C,F[t]);return l=new I({props:C}),{c(){m(s.$$.fragment),r=_(),m(n.$$.fragment),i=_(),m(e.$$.fragment),p=_(),m(a.$$.fragment),x=_(),m(l.$$.fragment)},m(t,o){f(s,t,o),T(t,r,o),f(n,t,o),T(t,i,o),f(e,t,o),T(t,p,o),f(a,t,o),T(t,x,o),f(l,t,o),d=!0},p(t,[o]){const R=o&1?U($,[$[0],$[1],v(t[0])]):{};s.$set(R);const b={};o&6&&(b.$$scope={dirty:o,ctx:t}),n.$set(b);const K={};a.$set(K);const Q={};l.$set(Q)},i(t){d||(h(s.$$.fragment,t),h(n.$$.fragment,t),h(e.$$.fragment,t),h(a.$$.fragment,t),h(l.$$.fragment,t),d=!0)},o(t){u(s.$$.fragment,t),u(n.$$.fragment,t),u(e.$$.fragment,t),u(a.$$.fragment,t),u(l.$$.fragment,t),d=!1},d(t){t&&(w(r),w(i),w(p),w(x)),g(s,t),g(n,t),g(e,t),g(a,t),g(l,t)}}}function X(c){return[{...B(L),argTypes:{width:{control:"select",options:["normal","wide","wider","widest","fluid"]},textWidth:{control:"select",options:["normal","wide","wider","widest","fluid"]}}}]}class Y extends j{constructor(s){super(),G(this,s,X,V,q,{})}}const k=W(Y,{meta:{title:"Components/FeaturePhoto"},stories:{"tpl:default":{name:"default",template:!0,source:"<FeaturePhoto {...args} />",hasArgs:!0},Default:{name:"Default",template:!1,source:"",hasArgs:!1},QUICKIT:{name:"🚀 QUICKIT",template:!1,source:"",hasArgs:!1},MissingAltText:{name:"Missing altText",template:!1,source:"",hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","componentDocs","quickitDocs","missingAltTextDocs","FeaturePhoto","sharkSrc","withComponentDocs","withStoryDocs"]}),at=k.meta,rt=["Default","QUICKIT","MissingAltText"],it=k.stories.Default,pt=k.stories.QUICKIT,lt=k.stories.MissingAltText;export{it as Default,lt as MissingAltText,pt as QUICKIT,rt as __namedExportsOrder,at as default};

View file

@ -1 +0,0 @@
{"version":3,"file":"FeaturePhoto.stories-f81bc16e.js","sources":["../../src/components/FeaturePhoto/stories/docs/component.md?raw","../../src/components/FeaturePhoto/stories/docs/quickit.md?raw","../../src/components/FeaturePhoto/stories/docs/missingAltText.md?raw","../../src/components/FeaturePhoto/stories/shark.jpg","../../src/components/FeaturePhoto/FeaturePhoto.stories.svelte"],"sourcesContent":["export default \"A full-width photo inside the text well.\\n\\n```svelte\\n<script>\\n import { FeaturePhoto } from '@reuters-graphics/graphics-components';\\n import { assets } from '$app/paths'; // 👈 If using in the Graphics Kit...\\n</script>\\n\\n<FeaturePhoto\\n src=\\\"{`${assets}/images/myImage.jpg`}\\\"\\n altText=\\\"Some alt text\\\"\\n caption=\\\"A caption\\\"\\n lazy=\\\"{false}\\\"\\n width=\\\"normal\\\"\\n/>\\n```\\n\"","export default \"An example of using `FeaturePhoto` in the Graphics Kit with a Google Doc.\\n\\n```yaml\\n# Google doc block\\nType: photo\\nWidth: normal\\nSrc: images/shark.jpg\\nAltText: The king of the sea\\nCaption: Carcharodon carcharias - REUTERS\\n```\\n\\n```svelte\\n<!-- App.svelte -->\\n<script>\\n // Add FeaturePhoto to imports from graphics-components\\n import { FeaturePhoto } from '@reuters-graphics/graphics-components';\\n\\n // These should be already imported for you.\\n import content from '$locales/en/content.json';\\n import { assets } from '$app/paths';\\n</script>\\n\\n{#each content.blocks as block}\\n {#if block.Type === 'text'}\\n <!-- ... other blocks -->\\n\\n <!-- Copy/paste into your blocks loop! -->\\n {:else if block.Type === 'photo'}\\n <FeaturePhoto\\n width=\\\"{block.Width}\\\"\\n src=\\\"{`${assets}/${block.Src}`}\\\"\\n altText=\\\"{block.AltText}\\\"\\n caption=\\\"{block.Caption}\\\"\\n />\\n <!-- END copy/paste -->\\n {/if}\\n{/each}\\n```\\n\"","export default \"If your photo is missing `altText` a small warning will overlay the image.\\n\"","export default \"__VITE_ASSET__d597932c__\"","<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 // @ts-ignore\n import quickitDocs from './stories/docs/quickit.md?raw';\n // @ts-ignore\n import missingAltTextDocs from './stories/docs/missingAltText.md?raw';\n\n import FeaturePhoto from './FeaturePhoto.svelte';\n\n // @ts-ignore\n import sharkSrc from './stories/shark.jpg';\n\n import {\n withComponentDocs,\n withStoryDocs,\n } from '$lib/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 textWidth: {\n control: 'select',\n options: ['normal', 'wide', 'wider', 'widest', 'fluid'],\n },\n },\n };\n</script>\n\n<Meta\n title=\"Components/FeaturePhoto\"\n component=\"{FeaturePhoto}\"\n {...metaProps}\n/>\n\n<Template let:args>\n <FeaturePhoto {...args} />\n</Template>\n\n<Story\n name=\"Default\"\n args=\"{{\n src: sharkSrc,\n altText: 'A shark!',\n width: 'normal',\n caption: 'Carcharodon carcharias - REUTERS',\n }}\"\n/>\n\n<Story\n name=\"🚀 QUICKIT\"\n args=\"{{\n src: sharkSrc,\n altText: 'A shark!',\n width: 'normal',\n caption: 'Carcharodon carcharias - REUTERS',\n }}\"\n {...withStoryDocs(quickitDocs)}\n/>\n\n<Story\n name=\"Missing altText\"\n args=\"{{\n src: sharkSrc,\n width: 'normal',\n caption: 'Carcharodon carcharias - REUTERS',\n }}\"\n {...withStoryDocs(missingAltTextDocs)}\n/>\n"],"names":["componentDocs","quickitDocs","missingAltTextDocs","sharkSrc","ctx","FeaturePhoto","withStoryDocs","withComponentDocs"],"mappings":"8YAAA,MAAeA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECAAC,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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECAAC,EAAA,+ECAAC,EAAA,GAAA,IAAA,IAAA,qBAAA,YAAA,GAAA,EAAA,oCC0CKC,EAAI,CAAA,CAAA,oJAAJA,EAAI,CAAA,CAAA,CAAA,CAAA,2LALVC,CAAY,EACpBD,EAAS,CAAA,2MAUX,IAAKD,EACL,QAAS,WACT,MAAO,SACP,QAAS,2EAOT,IAAKA,EACL,QAAS,WACT,MAAO,SACP,QAAS,qCAEPG,EAAcL,CAAW,gHAM3B,IAAKE,EACL,MAAO,SACP,QAAS,qCAEPG,EAAcJ,CAAkB,qUAnChCE,EAAS,CAAA,CAAA,maAlBE,CACV,GAAAG,EAAkBP,CAAa,EAClC,SAAQ,CACN,MAAK,CACH,QAAS,SACT,QAAO,CAAG,SAAU,OAAQ,QAAS,SAAU,OAAO,GAExD,UAAS,CACP,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

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 @@
.article-block.graphic p{margin-top:0;margin-bottom:clamp(.56rem,.52rem + .21vw,.69rem);font-family:var(--theme-font-family-note);font-size:calc(.9 * var(--theme-font-size-base));color:var(--theme-colour-text-primary);line-height:1.3;font-weight:300}.article-block.graphic aside p{font-family:var(--theme-font-family-note);color:var(--theme-colour-text-secondary);font-size:var(--theme-font-size-xs);line-height:1.3;font-weight:400;margin-bottom:clamp(.56rem,.52rem + .21vw,.69rem);margin-top:clamp(.31rem,.31rem + 0vw,.31rem);margin-bottom:clamp(.31rem,.31rem + 0vw,.31rem)}

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

File diff suppressed because one or more lines are too long

View file

@ -1,3 +0,0 @@
import{R as e,r}from"./index-33b6ba46.js";import{S as n,p as u}from"./prism-36d9c89b.js";import{s as g}from"./scss-efc2351e.js";const d="_title_daft4_1",f="_table_daft4_20",_="_importsnippet_daft4_125",o={title:d,table:f,importsnippet:_};n.registerLanguage("scss",g);const p=t=>t.replace(/\/_/,"/").replace(/\.scss$/,""),E=t=>{const[s,c]=r.useState(!1);let a;r.useEffect(()=>{a&&clearTimeout(a),a=setTimeout(()=>{c(!1)},1500)},[s]);const i=async({partial:l})=>{const m=`@import "@reuters-graphics/graphics-components/scss/colours/${p(l)}";`;await navigator.clipboard.writeText(m),c(!0)};return e.createElement("button",{className:"copy-btn",onClick:()=>i(t)},e.createElement("span",{className:"material-symbols-outlined"},"content_copy"),s&&e.createElement("span",{className:"copy-tag"},"Copied"))},x=({included:t=!1,partial:s="thematic/_tr.scss"})=>t?e.createElement("div",{className:o.importsnippet},e.createElement("p",null,"Included")):e.createElement("div",{className:o.importsnippet},e.createElement(n,{language:"scss",style:u},`// global.scss
@import "@reuters-graphics/graphics-components/scss/colours/${p(s)}";`),e.createElement(E,{partial:s}));export{x as I,o as c};
//# sourceMappingURL=ImportSnippet-5ad55b07.js.map

View file

@ -1 +0,0 @@
{"version":3,"file":"ImportSnippet-5ad55b07.js","sources":["../../src/docs/docs-components/CopyColourTable/ImportSnippet.jsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\n\nimport SyntaxHighlighter from 'react-syntax-highlighter/dist/esm/prism-light';\n// @ts-ignore\nimport classes from './styles.module.scss';\nimport prism from 'react-syntax-highlighter/dist/esm/styles/prism/prism';\nimport scss from 'react-syntax-highlighter/dist/esm/languages/prism/scss';\n\nSyntaxHighlighter.registerLanguage('scss', scss);\n\nconst formatPartial = (partial) => {\n return partial.replace(/\\/_/, '/').replace(/\\.scss$/, '');\n};\n\nconst Copyable = (props) => {\n const [copied, setCopied] = useState(false);\n\n let timeout;\n\n useEffect(() => {\n if(timeout) clearTimeout(timeout);\n timeout = setTimeout(() => { setCopied(false); }, 1500);\n }, [copied]);\n\n const handleClick = async({ partial }) => {\n const copyText = `@import \"@reuters-graphics/graphics-components/scss/colours/${formatPartial(partial)}\";`\n await navigator.clipboard.writeText(copyText);\n setCopied(true);\n }\n\n return (\n <button className=\"copy-btn\" onClick={() => handleClick(props)}>\n <span className=\"material-symbols-outlined\">content_copy</span>\n {copied && <span className=\"copy-tag\">Copied</span>}\n </button>\n );\n}\n\nconst ImportSnippet = ({ included = false, partial = 'thematic/_tr.scss' }) => {\n return included ? (\n <div className={classes.importsnippet}>\n <p>Included</p>\n </div>\n ) : (\n <div className={classes.importsnippet}>\n <SyntaxHighlighter language=\"scss\" style={prism}>\n {`// global.scss \\n@import \"@reuters-graphics/graphics-components/scss/colours/${formatPartial(partial)}\";`}\n </SyntaxHighlighter>\n <Copyable partial={partial} />\n </div>\n )\n};\n\nexport default ImportSnippet;"],"names":["SyntaxHighlighter","scss","formatPartial","partial","Copyable","props","copied","setCopied","useState","timeout","useEffect","handleClick","copyText","React","ImportSnippet","included","classes","prism"],"mappings":"8OAQAA,EAAkB,iBAAiB,OAAQC,CAAI,EAE/C,MAAMC,EAAiBC,GACdA,EAAQ,QAAQ,MAAO,GAAG,EAAE,QAAQ,UAAW,EAAE,EAGpDC,EAAYC,GAAU,CAC1B,KAAM,CAACC,EAAQC,CAAS,EAAIC,WAAS,EAAK,EAEtC,IAAAC,EAEJC,EAAAA,UAAU,IAAM,CACXD,GAAS,aAAaA,CAAO,EAChCA,EAAU,WAAW,IAAM,CAAEF,EAAU,EAAK,GAAM,IAAI,CAAA,EACrD,CAACD,CAAM,CAAC,EAEX,MAAMK,EAAc,MAAM,CAAE,QAAAR,KAAc,CACxC,MAAMS,EAAW,+DAA+DV,EAAcC,CAAO,CAAC,KAChG,MAAA,UAAU,UAAU,UAAUS,CAAQ,EAC5CL,EAAU,EAAI,CAAA,EAId,OAAAM,EAAA,cAAC,UAAO,UAAU,WAAW,QAAS,IAAMF,EAAYN,CAAK,GAC3DQ,EAAA,cAAC,QAAK,UAAU,2BAAA,EAA4B,cAAY,EACvDP,mBAAW,OAAK,CAAA,UAAU,UAAW,EAAA,QAAM,CAC9C,CAEJ,EAEMQ,EAAgB,CAAC,CAAE,SAAAC,EAAW,GAAO,QAAAZ,EAAU,uBAC5CY,kBACJ,MAAI,CAAA,UAAWC,EAAQ,aACtB,EAAAH,EAAA,cAAC,SAAE,UAAQ,CACb,EAECA,EAAA,cAAA,MAAA,CAAI,UAAWG,EAAQ,aAAA,kBACrBhB,EAAkB,CAAA,SAAS,OAAO,MAAOiB,CACvC,EAAA;AAAA,8DAAgFf,EAAcC,CAAO,CAAC,IACzG,EACCU,EAAA,cAAAT,EAAA,CAAS,QAAAD,EAAkB,CAC9B"}

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,51 @@
import{S as I,i as S,s as w,c,m as p,t as f,a as u,d as $,q as _,o as A,f as v,h as k,j as g,n as D,k as y,l as N}from"./index-C9aKRT5A.js";import{g as T,a as x}from"./spread-CgU5AtxT.js";import{p as q,M as O,T as P,S as R,w as V}from"./collect-stories-ceFdpR5E.js";import{R as j,A as B}from"./ResponsiveAd-D2N0K2xq.js";import{B as E}from"./Block-C7biTRWl.js";import"./throttle-cOUaFLOV.js";import"./isObject-C3e4t58V.js";import"./isSymbol-Br3Fhm6g.js";import"./toNumber-BrygkUtK.js";const F=`Add programmatic ads inline on your page.
> **IMPORTANT!** Make sure ads are only used on dotcom pages, never on embeds.
\`\`\`svelte
<!-- +page.svelte -->
<script>
import { AdScripts } from '@reuters-graphics/graphics-components';
<\/script>
<!-- Include AdScripts only ONCE per page for any type of ad -->
<AdScripts />
\`\`\`
\`\`\`svelte
<!-- App.svelte -->
<script>
import { InlineAd } from '@reuters-graphics/graphics-components';
export let embedded = false;
<\/script>
{#each content.blocks as block}
<!-- ... -->
{#if block.Type === 'inline-ad'}
<!-- Check if in an embed context! -->
{#if !embedded}
<InlineAd />
{/if}
{/if}
<!-- ... -->
{/each}
\`\`\`
You may add **up to three** inline ads per page, but must set the \`n\` prop on multiple ads in sequential order, 1 - 3.
\`\`\`svelte
<!-- First inline ad on the page -->
<InlineAd n="{1}" />
<!-- ... second ... -->
<InlineAd n="{2}" />
<!-- ... third and final. -->
<InlineAd n="{3}" />
\`\`\`
`;function U(d){let e,a,n,s,r,o,i,l;return i=new j({props:{desktopPlacementName:d[2]}}),{c(){e=_("div"),a=_("div"),a.textContent="Advertisement · Scroll to continue",n=A(),s=_("div"),r=_("div"),o=_("div"),c(i.$$.fragment),v(a,"class","ad-label svelte-1fg4mkm"),v(o,"class","svelte-1fg4mkm"),v(r,"class","ad-slot__inner svelte-1fg4mkm"),v(s,"class","ad-container svelte-1fg4mkm"),v(e,"class","ad-block svelte-1fg4mkm")},m(t,m){k(t,e,m),g(e,a),g(e,n),g(e,s),g(s,r),g(r,o),p(i,o,null),l=!0},p:D,i(t){l||(f(i.$$.fragment,t),l=!0)},o(t){u(i.$$.fragment,t),l=!1},d(t){t&&y(e),$(i)}}}function Y(d){let e,a;return e=new E({props:{id:d[0],class:"freestar-adslot "+d[1],$$slots:{default:[U]},$$scope:{ctx:d}}}),{c(){c(e.$$.fragment)},m(n,s){p(e,n,s),a=!0},p(n,[s]){const r={};s&1&&(r.id=n[0]),s&2&&(r.class="freestar-adslot "+n[1]),s&16&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){a||(f(e.$$.fragment,n),a=!0)},o(n){u(e.$$.fragment,n),a=!1},d(n){$(e,n)}}}function z(d,e,a){let{id:n=""}=e,{n:s=1}=e,{class:r="my-12"}=e;const o=`reuters_desktop_native_${s}`;return d.$$set=i=>{"id"in i&&a(0,n=i.id),"n"in i&&a(3,s=i.n),"class"in i&&a(1,r=i.class)},[n,r,o,s]}class b extends I{constructor(e){super(),S(this,e,z,Y,w,{id:0,n:3,class:1})}}b.__docgen={version:3,name:"InlineAd.svelte",data:[{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:"Number of the inline ad in sequence. Use to add multiple inline ads to a page.",name:"n",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"number",type:"number"},defaultValue:1},{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:"my-12"}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};function G(d){let e,a,n,s,r,o,i;return a=new B({}),s=new b({}),o=new b({}),{c(){e=_("div"),c(a.$$.fragment),n=A(),c(s.$$.fragment),r=A(),c(o.$$.fragment)},m(l,t){k(l,e,t),p(a,e,null),g(e,n),p(s,e,null),g(e,r),p(o,e,null),i=!0},p:D,i(l){i||(f(a.$$.fragment,l),f(s.$$.fragment,l),f(o.$$.fragment,l),i=!0)},o(l){u(a.$$.fragment,l),u(s.$$.fragment,l),u(o.$$.fragment,l),i=!1},d(l){l&&y(e),$(a),$(s),$(o)}}}function H(d){let e,a,n,s,r,o;const i=[{title:"Components/InlineAd"},{component:b},d[0]];let l={};for(let t=0;t<i.length;t+=1)l=N(l,i[t]);return e=new O({props:l}),n=new P({props:{$$slots:{default:[G]},$$scope:{ctx:d}}}),r=new R({props:{name:"Default"}}),{c(){c(e.$$.fragment),a=A(),c(n.$$.fragment),s=A(),c(r.$$.fragment)},m(t,m){p(e,t,m),k(t,a,m),p(n,t,m),k(t,s,m),p(r,t,m),o=!0},p(t,[m]){const M=m&1?T(i,[i[0],i[1],x(t[0])]):{};e.$set(M);const h={};m&2&&(h.$$scope={dirty:m,ctx:t}),n.$set(h)},i(t){o||(f(e.$$.fragment,t),f(n.$$.fragment,t),f(r.$$.fragment,t),o=!0)},o(t){u(e.$$.fragment,t),u(n.$$.fragment,t),u(r.$$.fragment,t),o=!1},d(t){t&&(y(a),y(s)),$(e,t),$(n,t),$(r,t)}}}function J(d){return[{...V(F)}]}class K extends I{constructor(e){super(),S(this,e,J,H,w,{})}}const C=q(K,{meta:{title:"Components/InlineAd"},stories:{"tpl:default":{name:"default",template:!0,source:`<div>
<AdScripts />
<InlineAd />
<InlineAd />
</div>`,hasArgs:!1},Default:{name:"Default",template:!1,source:"",hasArgs:!1}},allocatedIds:["default","Template","Story","Meta","adDocs","AdScripts","InlineAd","withComponentDocs"]}),ae=C.meta,ie=["Default"],re=C.stories.Default;export{re as Default,ie as __namedExportsOrder,ae as default};

View file

@ -1,52 +0,0 @@
import{S as I,i as S,s as w,g as p,m as c,t as f,h as u,j as g,o as _,z as A,b as v,d as y,e as $,n as C,f as k,C as N}from"./index-85f88930.js";import{g as T,a as x}from"./spread-8a54911c.js";import{p as q,M as O,T as P,S as R}from"./collect-stories-fa95313f.js";import{R as V,A as j}from"./ResponsiveAd-c5f27562.js";import{B}from"./Block-d1b8152c.js";import{w as E}from"./withParams-47e2ab71.js";import"./throttle-dfed7c30.js";import"./isObject-32699ff3.js";import"./now-bd49f550.js";import"./isSymbol-50749e90.js";const z=`Add programmatic ads inline on your page.
> **IMPORTANT!** Make sure ads are only used on dotcom pages, never on embeds.
\`\`\`svelte
<!-- +page.svelte -->
<script>
import { AdScripts } from '@reuters-graphics/graphics-components';
<\/script>
<!-- Include AdScripts only ONCE per page for any type of ad -->
<AdScripts />
\`\`\`
\`\`\`svelte
<!-- App.svelte -->
<script>
import { InlineAd } from '@reuters-graphics/graphics-components';
export let embedded = false;
<\/script>
{#each content.blocks as block}
<!-- ... -->
{#if block.Type === 'inline-ad'}
<!-- Check if in an embed context! -->
{#if !embedded}
<InlineAd />
{/if}
{/if}
<!-- ... -->
{/each}
\`\`\`
You may add **up to three** inline ads per page, but must set the \`n\` prop on multiple ads in sequential order, 1 - 3.
\`\`\`svelte
<!-- First inline ad on the page -->
<InlineAd n="{1}" />
<!-- ... second ... -->
<InlineAd n="{2}" />
<!-- ... third and final. -->
<InlineAd n="{3}" />
\`\`\`
`;function F(d){let e,a,n,s,r,o,i,l;return i=new V({props:{desktopPlacementName:d[2]}}),{c(){e=_("div"),a=_("div"),a.textContent="Advertisement · Scroll to continue",n=A(),s=_("div"),r=_("div"),o=_("div"),p(i.$$.fragment),v(a,"class","ad-label svelte-1fg4mkm"),v(o,"class","svelte-1fg4mkm"),v(r,"class","ad-slot__inner svelte-1fg4mkm"),v(s,"class","ad-container svelte-1fg4mkm"),v(e,"class","ad-block svelte-1fg4mkm")},m(t,m){y(t,e,m),$(e,a),$(e,n),$(e,s),$(s,r),$(r,o),c(i,o,null),l=!0},p:C,i(t){l||(f(i.$$.fragment,t),l=!0)},o(t){u(i.$$.fragment,t),l=!1},d(t){t&&k(e),g(i)}}}function U(d){let e,a;return e=new B({props:{id:d[0],class:"freestar-adslot "+d[1],$$slots:{default:[F]},$$scope:{ctx:d}}}),{c(){p(e.$$.fragment)},m(n,s){c(e,n,s),a=!0},p(n,[s]){const r={};s&1&&(r.id=n[0]),s&2&&(r.class="freestar-adslot "+n[1]),s&16&&(r.$$scope={dirty:s,ctx:n}),e.$set(r)},i(n){a||(f(e.$$.fragment,n),a=!0)},o(n){u(e.$$.fragment,n),a=!1},d(n){g(e,n)}}}function Y(d,e,a){let{id:n=""}=e,{n:s=1}=e,{class:r="my-12"}=e;const o=`reuters_desktop_native_${s}`;return d.$$set=i=>{"id"in i&&a(0,n=i.id),"n"in i&&a(3,s=i.n),"class"in i&&a(1,r=i.class)},[n,r,o,s]}class b extends I{constructor(e){super(),S(this,e,Y,U,w,{id:0,n:3,class:1})}}b.__docgen={version:3,name:"InlineAd.svelte",data:[{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:"Number of the inline ad in sequence. Use to add multiple inline ads to a page.",name:"n",kind:"let",static:!1,readonly:!1,type:{kind:"type",text:"number",type:"number"},defaultValue:1},{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:"my-12"}],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};function G(d){let e,a,n,s,r,o,i;return a=new j({}),s=new b({}),o=new b({}),{c(){e=_("div"),p(a.$$.fragment),n=A(),p(s.$$.fragment),r=A(),p(o.$$.fragment)},m(l,t){y(l,e,t),c(a,e,null),$(e,n),c(s,e,null),$(e,r),c(o,e,null),i=!0},p:C,i(l){i||(f(a.$$.fragment,l),f(s.$$.fragment,l),f(o.$$.fragment,l),i=!0)},o(l){u(a.$$.fragment,l),u(s.$$.fragment,l),u(o.$$.fragment,l),i=!1},d(l){l&&k(e),g(a),g(s),g(o)}}}function H(d){let e,a,n,s,r,o;const i=[{title:"Components/InlineAd"},d[0]];let l={};for(let t=0;t<i.length;t+=1)l=N(l,i[t]);return e=new O({props:l}),n=new P({props:{$$slots:{default:[G,({args:t})=>({1:t}),({args:t})=>t?2:0]},$$scope:{ctx:d}}}),r=new R({props:{name:"Default"}}),{c(){p(e.$$.fragment),a=A(),p(n.$$.fragment),s=A(),p(r.$$.fragment)},m(t,m){c(e,t,m),y(t,a,m),c(n,t,m),y(t,s,m),c(r,t,m),o=!0},p(t,[m]){const M=m&1?T(i,[i[0],x(t[0])]):{};e.$set(M);const h={};m&4&&(h.$$scope={dirty:m,ctx:t}),n.$set(h)},i(t){o||(f(e.$$.fragment,t),f(n.$$.fragment,t),f(r.$$.fragment,t),o=!0)},o(t){u(e.$$.fragment,t),u(n.$$.fragment,t),u(r.$$.fragment,t),o=!1},d(t){t&&(k(a),k(s)),g(e,t),g(n,t),g(r,t)}}}function J(d){return[{title:"Components/InlineAd",component:b,...E(z)}]}class K extends I{constructor(e){super(),S(this,e,J,H,w,{})}}const D=q(K,{meta:{title:"Components/InlineAd"},stories:{"tpl:default":{name:"default",template:!0,source:`<div>
<AdScripts />
<InlineAd />
<InlineAd />
</div>`,hasArgs:!0},Default:{name:"Default",template:!1,source:"",hasArgs:!1}},allocatedIds:["default","Meta","Template","Story","adDocs","AdScripts","InlineAd","withComponentDocs"]}),ie=D.meta,re=["Default"],le=D.stories.Default;export{le as Default,re as __namedExportsOrder,ie as default};
//# sourceMappingURL=InlineAd.stories-fea0250c.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
.leaderboard__sticky.svelte-g0kawd.svelte-g0kawd{position:initial;top:-275px;transition:top .4s ease-in-out;z-index:1030}.leaderboard__sticky.sticky.svelte-g0kawd.svelte-g0kawd{position:sticky;top:0}.leaderboard__sticky.unstick.svelte-g0kawd.svelte-g0kawd{top:-275px}div.ad-block.svelte-g0kawd.svelte-g0kawd{width:100%;background:#f4f4f4;display:flex;justify-content:center;flex-direction:column;align-items:center;height:var(--height)}div.ad-block.svelte-g0kawd .ad-slot__container.svelte-g0kawd{height:0px;min-height:var(--height);align-items:center;display:flex;justify-content:center}div.ad-block.svelte-g0kawd .ad-slot__container .ad-slot__inner.svelte-g0kawd{max-width:100%}div.svelte-9hmzs6{min-height:200vh;background-size:40px 40px;background-image:linear-gradient(to right,lightgrey 1px,transparent 1px),linear-gradient(to bottom,lightgrey 1px,transparent 1px)}

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