├── docs ├── .nojekyll ├── favicon.ico ├── _app │ ├── env.js │ ├── version.json │ └── immutable │ │ ├── nodes │ │ ├── 6.DUcV82Gi.js │ │ ├── 1.Qh7DPxM0.js │ │ ├── 2.lXA7VpVS.js │ │ └── 5.Bozl_rDw.js │ │ ├── entry │ │ └── start.3zWGZb7n.js │ │ ├── chunks │ │ ├── CWj6FrbW.js │ │ ├── Cdd2vc2j.js │ │ ├── DpoC0QzE.js │ │ ├── D6iY2F4E.js │ │ ├── CZjA61F2.js │ │ ├── B7mm1rr4.js │ │ ├── CY5piJI4.js │ │ ├── CWT9bnGQ.js │ │ ├── DnXbvXxH.js │ │ ├── CkxHW-tX.js │ │ └── DfLy1BuI.js │ │ └── assets │ │ ├── 4.BosP74pi.css │ │ ├── _page.BosP74pi.css │ │ ├── _page.BbtFu9-w.css │ │ ├── 3.CO4jlTh2.css │ │ ├── 5.B-mGqUsL.css │ │ └── _page.B-mGqUsL.css ├── assets │ ├── demo │ │ ├── test.csv │ │ ├── test.jpg │ │ └── fonts │ │ │ ├── cozette.css │ │ │ ├── jamboree.css │ │ │ ├── jersey.css │ │ │ ├── recoleta.css │ │ │ ├── lyon.css │ │ │ ├── atlas-typewriter.css │ │ │ ├── canela.css │ │ │ ├── spacemono.css │ │ │ ├── publico.css │ │ │ ├── baloo-bhai.css │ │ │ ├── atkinson.css │ │ │ ├── computer-modern.css │ │ │ ├── tiempos.css │ │ │ ├── inter.css │ │ │ ├── rubik.css │ │ │ ├── metropolis.css │ │ │ ├── atlas.css │ │ │ ├── inconsolata.css │ │ │ └── national.css │ └── branding │ │ ├── cloud.jpg │ │ ├── donate.jpg │ │ └── subscribe.png └── __data.json ├── static ├── favicon.ico └── assets │ ├── demo │ ├── test.csv │ ├── test.jpg │ └── fonts │ │ ├── jamboree.css │ │ ├── jersey.css │ │ ├── recoleta.css │ │ ├── cozette.css │ │ ├── lyon.css │ │ ├── atlas-typewriter.css │ │ ├── canela.css │ │ ├── spacemono.css │ │ ├── publico.css │ │ ├── atkinson.css │ │ ├── baloo-bhai.css │ │ ├── computer-modern.css │ │ ├── tiempos.css │ │ ├── inter.css │ │ ├── rubik.css │ │ ├── metropolis.css │ │ ├── atlas.css │ │ ├── inconsolata.css │ │ └── national.css │ └── branding │ ├── cloud.jpg │ ├── donate.jpg │ └── subscribe.png ├── src ├── runes │ ├── misc.svelte.js │ ├── useWindowFocus.svelte.js │ ├── useWindowDimensions.svelte.js │ ├── useFetcher.svelte.js │ └── useClipboard.svelte.js ├── data │ ├── test.csv │ ├── copy.json │ └── variables.json ├── routes │ ├── +page.server.js │ ├── +layout.js │ ├── demo │ │ ├── +page.svelte │ │ ├── fonts │ │ │ └── +page.svelte │ │ ├── elements │ │ │ └── +page.svelte │ │ └── ig-story │ │ │ └── +page.svelte │ ├── +error.svelte │ ├── +layout.svelte │ └── +page.svelte ├── utils │ ├── translate.js │ ├── mapToArray.js │ ├── loadJson.js │ ├── csvDownload.js │ ├── loadCsv.js │ ├── version.js │ ├── loadImage.js │ ├── generateId.js │ ├── checkScrollDir.js │ ├── transformSvg.js │ ├── localStorage.js │ ├── locate.js │ ├── loadPixels.js │ └── urlParams.js ├── components │ ├── demo │ │ ├── Demo.SvelteComponent.B.svelte │ │ ├── Demo.SvelteComponent.A.svelte │ │ ├── Demo.MicroCMSTest.svelte │ │ ├── migrate │ │ │ ├── Demo.Tip.svelte │ │ │ ├── Demo.Range.svelte │ │ │ ├── Demo.Figure.svelte │ │ │ ├── Demo.Select.svelte │ │ │ ├── Demo.ButtonSet.svelte │ │ │ ├── Demo.Toggle.svelte │ │ │ ├── Demo.SortTable.svelte │ │ │ ├── Demo.Slider.svelte │ │ │ ├── Demo.LayerCake.svelte │ │ │ ├── Demo.IgStory.Figure.svelte │ │ │ ├── Demo.IgStory.Chapters.svelte │ │ │ └── Demo.IgStory.svelte │ │ ├── Demo.Link.svelte │ │ ├── Demo.SvelteElement.svelte │ │ ├── Demo.Img.svelte │ │ ├── Demo.MicroCMS.svelte │ │ ├── Demo.SvelteComponent.svelte │ │ ├── Demo.LoadData.svelte │ │ ├── Demo.Scrolly.svelte │ │ ├── Demo.svelte │ │ ├── Demo.Fonts.svelte │ │ ├── demo-fonts.json │ │ ├── Demo.Fonts.Sample.svelte │ │ └── Demo.Svelte5.svelte │ ├── figure │ │ └── migrate │ │ │ ├── Figure.Template.svelte │ │ │ ├── Figure.Tooltip.svelte │ │ │ ├── Figure.MapPoints.svelte │ │ │ ├── Figure.MapSvg.svelte │ │ │ ├── Figure.MapPath.svelte │ │ │ ├── Figure.MapCanvas.svelte │ │ │ ├── Figure.MapLabels.svelte │ │ │ └── Figure.svelte │ ├── Index.svelte │ ├── layercake │ │ ├── migrate │ │ │ ├── Area.svelte │ │ │ ├── Bar.svelte │ │ │ ├── Scatter.svg.svelte │ │ │ ├── ColumnStacked.svelte │ │ │ ├── Line.svelte │ │ │ ├── Tooltip.html.svelte │ │ │ ├── Scatter.canvas.svelte │ │ │ ├── Scatter.html.svelte │ │ │ ├── Column.svelte │ │ │ ├── Voronoi.svelte │ │ │ ├── AxisY.svg.svelte │ │ │ ├── AxisY.html.svelte │ │ │ ├── AxisX.html.svelte │ │ │ └── AxisX.svg.svelte │ │ └── future │ │ │ ├── MultiLine.svelte │ │ │ ├── ClevelandDotPlot.svelte │ │ │ ├── MapPoints.svelte │ │ │ ├── MapPoints.canvas.svelte │ │ │ ├── MapPoints.html.svelte │ │ │ ├── Map.canvas.svelte │ │ │ ├── MapLabels.svg.svelte │ │ │ ├── BeeswarmForce.svelte │ │ │ ├── MapLabels.html.svelte │ │ │ ├── Beeswarm.svg.svelte │ │ │ ├── BeeswarmForce.html.svelte │ │ │ ├── Map.svg.svelte │ │ │ └── Beeswarm.html.svelte │ ├── Header.svelte │ ├── helpers │ │ ├── migrate │ │ │ ├── Slider.Slide.svelte │ │ │ ├── ShareLink.svelte │ │ │ ├── Tip.svelte │ │ │ ├── Toggle.svelte │ │ │ └── Slider.svelte │ │ ├── CMS.svelte │ │ └── Scrolly.svelte │ ├── Meta.svelte │ └── Footer.Story.svelte ├── svg │ ├── arrow-footer.svg │ ├── arrow-up-right.svg │ ├── play.svg │ ├── logo-white.svg │ └── logo-black.svg ├── app.html ├── actions │ ├── canTab.js │ ├── keepWithinBox.js │ ├── checkOverlap.js │ ├── resize.js │ ├── inView.js │ └── focusTrap.js └── styles │ ├── font.css │ ├── variables.css │ └── app.css ├── .npmrc ├── .gitignore ├── tsconfig.json ├── .prettierignore ├── google.config.js ├── .prettierrc ├── properties ├── category.json ├── font-size.json └── color.json ├── svelte.config.js ├── jsconfig.json ├── tasks ├── style-dictionary.js └── fetch-google.js ├── Makefile ├── vite.config.js ├── LICENSE └── package.json /docs/.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/runes/misc.svelte.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /docs/_app/env.js: -------------------------------------------------------------------------------- 1 | export const env={} -------------------------------------------------------------------------------- /docs/_app/version.json: -------------------------------------------------------------------------------- 1 | {"version":"1751985803593"} -------------------------------------------------------------------------------- /src/data/test.csv: -------------------------------------------------------------------------------- 1 | name,value 2 | test,2 3 | more,3 -------------------------------------------------------------------------------- /docs/assets/demo/test.csv: -------------------------------------------------------------------------------- 1 | name,value 2 | russell,2 3 | samora,3 -------------------------------------------------------------------------------- /static/assets/demo/test.csv: -------------------------------------------------------------------------------- 1 | name,value 2 | russell,2 3 | samora,3 -------------------------------------------------------------------------------- /src/routes/+page.server.js: -------------------------------------------------------------------------------- 1 | export async function load() { 2 | return {}; 3 | } 4 | -------------------------------------------------------------------------------- /docs/__data.json: -------------------------------------------------------------------------------- 1 | {"type":"data","nodes":[null,{"type":"data","data":[{}],"uses":{}}]} 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | .svelte 4 | .svelte-kit 5 | build 6 | functions 7 | .env -------------------------------------------------------------------------------- /src/routes/+layout.js: -------------------------------------------------------------------------------- 1 | export const prerender = true; 2 | export const trailingSlash = "always"; -------------------------------------------------------------------------------- /docs/_app/immutable/nodes/6.DUcV82Gi.js: -------------------------------------------------------------------------------- 1 | import"../chunks/CWj6FrbW.js";function p(o){}export{p as component}; 2 | -------------------------------------------------------------------------------- /docs/assets/demo/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-pudding/svelte-starter/HEAD/docs/assets/demo/test.jpg -------------------------------------------------------------------------------- /src/utils/translate.js: -------------------------------------------------------------------------------- 1 | export default function (x, y) { 2 | return `transform: translate(${x}px, ${y}px);`; 3 | } 4 | -------------------------------------------------------------------------------- /static/assets/demo/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-pudding/svelte-starter/HEAD/static/assets/demo/test.jpg -------------------------------------------------------------------------------- /docs/assets/branding/cloud.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-pudding/svelte-starter/HEAD/docs/assets/branding/cloud.jpg -------------------------------------------------------------------------------- /docs/assets/branding/donate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-pudding/svelte-starter/HEAD/docs/assets/branding/donate.jpg -------------------------------------------------------------------------------- /static/assets/branding/cloud.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-pudding/svelte-starter/HEAD/static/assets/branding/cloud.jpg -------------------------------------------------------------------------------- /static/assets/branding/donate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-pudding/svelte-starter/HEAD/static/assets/branding/donate.jpg -------------------------------------------------------------------------------- /docs/_app/immutable/entry/start.3zWGZb7n.js: -------------------------------------------------------------------------------- 1 | import{l as o,a as r}from"../chunks/BASgGI1b.js";export{o as load_css,r as start}; 2 | -------------------------------------------------------------------------------- /docs/assets/branding/subscribe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-pudding/svelte-starter/HEAD/docs/assets/branding/subscribe.png -------------------------------------------------------------------------------- /src/routes/demo/+page.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /static/assets/branding/subscribe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-pudding/svelte-starter/HEAD/static/assets/branding/subscribe.png -------------------------------------------------------------------------------- /src/utils/mapToArray.js: -------------------------------------------------------------------------------- 1 | export default function mapToArray(map) { 2 | return Array.from(map, ([key, value]) => ({ key, value })); 3 | } 4 | -------------------------------------------------------------------------------- /docs/_app/immutable/chunks/CWj6FrbW.js: -------------------------------------------------------------------------------- 1 | const d="5";var e;typeof window<"u"&&((e=window.__svelte??(window.__svelte={})).v??(e.v=new Set)).add(d); 2 | -------------------------------------------------------------------------------- /src/routes/+error.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |

{$page.status}: {$page.error.message}

6 | -------------------------------------------------------------------------------- /src/routes/demo/fonts/+page.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/components/demo/Demo.SvelteComponent.B.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |

I am component B and my name is {name}.

6 | -------------------------------------------------------------------------------- /src/routes/demo/elements/+page.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/routes/demo/ig-story/+page.svelte: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /src/components/demo/Demo.SvelteComponent.A.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |

I am component A and my favorite number is {number}.

6 | -------------------------------------------------------------------------------- /src/utils/loadJson.js: -------------------------------------------------------------------------------- 1 | export default async function loadJson(url) { 2 | const response = await fetch(url); 3 | const data = await response.json(); 4 | return data; 5 | } 6 | -------------------------------------------------------------------------------- /src/components/demo/Demo.MicroCMSTest.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |

{label}

6 | 7 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "verbatimModuleSyntax": true, 4 | "moduleResolution": "bundler", 5 | "module": "ESNext", 6 | "target": "ESNext" 7 | }, 8 | "include": ["src/**/*"] 9 | } -------------------------------------------------------------------------------- /src/components/demo/migrate/Demo.Tip.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |

Tip

7 | 8 |
9 | -------------------------------------------------------------------------------- /docs/_app/immutable/chunks/Cdd2vc2j.js: -------------------------------------------------------------------------------- 1 | var s;const e=((s=globalThis.__sveltekit_117h6s7)==null?void 0:s.base)??"";var a;const t=((a=globalThis.__sveltekit_117h6s7)==null?void 0:a.assets)??e;export{t as a,e as b}; 2 | -------------------------------------------------------------------------------- /docs/_app/immutable/assets/4.BosP74pi.css: -------------------------------------------------------------------------------- 1 | .wrapper.svelte-p95kjz{padding:1rem;max-width:60rem;margin:0 auto}article.svelte-p95kjz>h2:where(.svelte-p95kjz){background:var(--color-fg);color:var(--color-bg);padding:0 16px} 2 | -------------------------------------------------------------------------------- /src/components/demo/Demo.Link.svelte: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /src/utils/csvDownload.js: -------------------------------------------------------------------------------- 1 | import { csvFormat } from "d3"; 2 | 3 | export default function csvDownload(data) { 4 | const content = `data:text/csv;charset=utf-8,${csvFormat(data)}`; 5 | return encodeURI(content); 6 | } 7 | -------------------------------------------------------------------------------- /docs/_app/immutable/assets/_page.BosP74pi.css: -------------------------------------------------------------------------------- 1 | .wrapper.svelte-p95kjz{padding:1rem;max-width:60rem;margin:0 auto}article.svelte-p95kjz>h2:where(.svelte-p95kjz){background:var(--color-fg);color:var(--color-bg);padding:0 16px} 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | /static 7 | .env 8 | .env.* 9 | !.env.example 10 | 11 | # Ignore files for PNPM, NPM and YARN 12 | pnpm-lock.yaml 13 | package-lock.json 14 | yarn.lock -------------------------------------------------------------------------------- /src/svg/arrow-footer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/utils/loadCsv.js: -------------------------------------------------------------------------------- 1 | import { csvParse } from "d3"; 2 | 3 | export default async function loadCsv(url) { 4 | const response = await fetch(url); 5 | const csv = await response.text(); 6 | const data = csvParse(csv); 7 | return data; 8 | } 9 | -------------------------------------------------------------------------------- /src/utils/version.js: -------------------------------------------------------------------------------- 1 | export default function version() { 2 | console.log("--- --- --- --- --- ---"); 3 | console.log(`svelte-starter: ${__VERSION__}`); 4 | console.log(`build: ${__TIMESTAMP__}`); 5 | console.log("--- --- --- --- --- ---"); 6 | } 7 | -------------------------------------------------------------------------------- /src/components/figure/migrate/Figure.Template.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/routes/+layout.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 |
10 | {@render children?.()} 11 |
12 | -------------------------------------------------------------------------------- /docs/assets/demo/fonts/cozette.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Cozette"; 3 | src: url("https://pudding.cool/assets/fonts/cozette/CozetteVector.woff2") format("woff2"); 4 | font-weight: 400; 5 | font-style: normal; 6 | font-stretch: normal; 7 | font-display: swap; 8 | } -------------------------------------------------------------------------------- /docs/assets/demo/fonts/jamboree.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Jamboree"; 3 | src: url("https://pudding.cool/assets/fonts/jamboree/Jamboree.woff2") format("woff2"); 4 | font-weight: 400; 5 | font-style: normal; 6 | font-stretch: normal; 7 | font-display: swap; 8 | } -------------------------------------------------------------------------------- /docs/assets/demo/fonts/jersey.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Jersey M54"; 3 | src: url("https://pudding.cool/assets/fonts/jersey/Jersey-M54.woff2") format("woff2"); 4 | font-weight: 400; 5 | font-style: normal; 6 | font-stretch: normal; 7 | font-display: swap; 8 | } -------------------------------------------------------------------------------- /docs/assets/demo/fonts/recoleta.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Recoleta"; 3 | src: url("https://pudding.cool/assets/fonts/recoleta/recoleta.woff2") format("woff2"); 4 | font-weight: 400; 5 | font-style: normal; 6 | font-stretch: normal; 7 | font-display: swap; 8 | } -------------------------------------------------------------------------------- /src/utils/loadImage.js: -------------------------------------------------------------------------------- 1 | export default function loadImage(url) { 2 | return new Promise((resolve, reject) => { 3 | const img = new Image(); 4 | img.onload = () => resolve(img); 5 | img.onerror = () => reject(`error loading ${url}`); 6 | img.src = url; 7 | }); 8 | } 9 | -------------------------------------------------------------------------------- /static/assets/demo/fonts/jamboree.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Jamboree"; 3 | src: url("https://pudding.cool/assets/fonts/jamboree/Jamboree.woff2") format("woff2"); 4 | font-weight: 400; 5 | font-style: normal; 6 | font-stretch: normal; 7 | font-display: swap; 8 | } -------------------------------------------------------------------------------- /static/assets/demo/fonts/jersey.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Jersey M54"; 3 | src: url("https://pudding.cool/assets/fonts/jersey/Jersey-M54.woff2") format("woff2"); 4 | font-weight: 400; 5 | font-style: normal; 6 | font-stretch: normal; 7 | font-display: swap; 8 | } -------------------------------------------------------------------------------- /static/assets/demo/fonts/recoleta.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Recoleta"; 3 | src: url("https://pudding.cool/assets/fonts/recoleta/recoleta.woff2") format("woff2"); 4 | font-weight: 400; 5 | font-style: normal; 6 | font-stretch: normal; 7 | font-display: swap; 8 | } -------------------------------------------------------------------------------- /static/assets/demo/fonts/cozette.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Cozette"; 3 | src: url("https://pudding.cool/assets/fonts/cozette/CozetteVector.woff2") format("woff2"); 4 | font-weight: 400; 5 | font-style: normal; 6 | font-stretch: normal; 7 | font-display: swap; 8 | } -------------------------------------------------------------------------------- /docs/assets/demo/fonts/lyon.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Lyon Display"; 3 | src: url("https://pudding.cool/assets/fonts/lyon/LyonDisplay-Regular-Web.woff2") format("woff2"); 4 | font-weight: 400; 5 | font-style: normal; 6 | font-stretch: normal; 7 | font-display: swap; 8 | } -------------------------------------------------------------------------------- /static/assets/demo/fonts/lyon.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Lyon Display"; 3 | src: url("https://pudding.cool/assets/fonts/lyon/LyonDisplay-Regular-Web.woff2") format("woff2"); 4 | font-weight: 400; 5 | font-style: normal; 6 | font-stretch: normal; 7 | font-display: swap; 8 | } -------------------------------------------------------------------------------- /google.config.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | "id": "1352iFuTSDDFPNAXBbOaEXkF8mCdjPu6B43hpUF2P3C4", 4 | "filepath": "src/data/copy.json" 5 | }, 6 | { 7 | "id": "1te65h_nywgXVAzvV-9E5fmHGblcKvctf_cNZgeam9Tk", 8 | "gid": "0", 9 | "filepath": "src/data/test.csv" 10 | } 11 | ] -------------------------------------------------------------------------------- /src/svg/arrow-up-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/assets/demo/fonts/atlas-typewriter.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Atlas Typewriter"; 3 | src: url("https://pudding.cool/assets/fonts/atlas/AtlasTypewriter-Medium-Web.woff2") format("woff2"); 4 | font-weight: 500; 5 | font-style: normal; 6 | font-stretch: normal; 7 | font-display: swap; 8 | } 9 | -------------------------------------------------------------------------------- /static/assets/demo/fonts/atlas-typewriter.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Atlas Typewriter"; 3 | src: url("https://pudding.cool/assets/fonts/atlas/AtlasTypewriter-Medium-Web.woff2") format("woff2"); 4 | font-weight: 500; 5 | font-style: normal; 6 | font-stretch: normal; 7 | font-display: swap; 8 | } 9 | -------------------------------------------------------------------------------- /src/utils/generateId.js: -------------------------------------------------------------------------------- 1 | import { range } from "d3"; 2 | 3 | export default function generateId(len = 4) { 4 | const vals = "0123456789abcdefghijklmnopqrstuvwxyz".split(""); 5 | const id = range(len) 6 | .map(() => vals[Math.floor(Math.random() * vals.length)]) 7 | .join(""); 8 | return id; 9 | } 10 | -------------------------------------------------------------------------------- /src/components/demo/migrate/Demo.Range.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 |

Range {value}

9 | 10 |
11 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "useTabs": true, 3 | "trailingComma": "none", 4 | "printWidth": 80, 5 | "svelteSortOrder": "options-scripts-markup-styles", 6 | "plugins": ["prettier-plugin-svelte"], 7 | "overrides": [ 8 | { 9 | "files": "*.svelte", 10 | "options": { 11 | "parser": "svelte" 12 | } 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /src/components/Index.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 | console.error(e)}> 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/svg/play.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/_app/immutable/chunks/DpoC0QzE.js: -------------------------------------------------------------------------------- 1 | const t={title:"Title TK",description:"Description tk."},e=[{section:"intro",content:[{type:"h4",value:"An h4 element with no attributes"},{type:"text",value:"Some random text here, followed by an img tag."},{type:"img",value:{src:"../assets/demo/test.jpg",alt:"A cat"}},{type:"Test",value:{label:"I’m a custom component!",value:"50"}}]}],o={meta:t,body:e};export{o as c}; 2 | -------------------------------------------------------------------------------- /src/components/demo/migrate/Demo.Figure.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |

Figure

7 |
8 | 9 | 10 |
Figure caption
11 |
12 |
13 | -------------------------------------------------------------------------------- /properties/category.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": { 3 | "blue": { 4 | "value": "#4477AA" 5 | }, 6 | "red": { 7 | "value": "#EE6677" 8 | }, 9 | "green": { 10 | "value": "#228833" 11 | }, 12 | "yellow": { 13 | "value": "#CCBB44" 14 | }, 15 | "cyan": { 16 | "value": "#66CCEE" 17 | }, 18 | "purple": { 19 | "value": "#AA3377" 20 | }, 21 | "gray": { 22 | "value": "#BBBBBB" 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | %sveltekit.head% 9 | 10 | 11 | 12 | Skip to main content 13 |
%sveltekit.body%
14 | 15 | 16 | -------------------------------------------------------------------------------- /src/components/demo/Demo.SvelteElement.svelte: -------------------------------------------------------------------------------- 1 | 13 | 14 |
15 |

Dynamic Svelte Element

16 | {#each items as { tag, text }} 17 | 18 | {text} 19 | 20 | {/each} 21 |
22 | -------------------------------------------------------------------------------- /src/components/demo/migrate/Demo.Select.svelte: -------------------------------------------------------------------------------- 1 | 13 | 14 |
15 |

Select {value}

16 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | {#each grouped as [type, fonts]} 27 |

{type}

28 |
29 | {#each fonts as { family, id }} 30 | 31 | {/each} 32 |
33 | {/each} 34 |
35 | 36 | 57 | -------------------------------------------------------------------------------- /docs/_app/immutable/chunks/DnXbvXxH.js: -------------------------------------------------------------------------------- 1 | import{A as m,i as A,C as T,B as L,g as M,H as p,D as c,s as R,a as C,c as _,E as H,d as I,F as Y,G as S,I as V,J as $,K as j,L as k,M as B,m as F,h as E,e as G,b as J,N as K}from"./-0kCmqra.js";import{a as P,r as D,h,i as W,b as q}from"./DfLy1BuI.js";function X(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r+"")}function z(t,e){return O(t,e)}function Z(t,e){m(),e.intro=e.intro??!1;const r=e.target,l=E,u=_;try{for(var a=A(r);a&&(a.nodeType!==T||a.data!==L);)a=M(a);if(!a)throw p;c(!0),R(a),C();const o=O(t,{...e,anchor:a});if(_===null||_.nodeType!==T||_.data!==H)throw I(),p;return c(!1),o}catch(o){if(o===p)return e.recover===!1&&Y(),m(),S(r),c(!1),z(t,e);throw o}finally{c(l),R(u),q()}}const i=new Map;function O(t,{target:e,anchor:r,props:l={},events:u,context:a,intro:o=!0}){m();var v=new Set,y=d=>{for(var s=0;s{var d=r??e.appendChild(j());return k(()=>{if(a){B({});var s=F;s.c=a}u&&(l.$$events=u),E&&G(d,null),g=t(d,l)||{},E&&(J.nodes_end=_),a&&K()}),()=>{var f;for(var s of v){e.removeEventListener(s,h);var n=i.get(s);--n===0?(document.removeEventListener(s,h),i.delete(s)):i.set(s,n)}D.delete(y),d!==r&&((f=d.parentNode)==null||f.removeChild(d))}});return w.set(g,b),g}let w=new WeakMap;function x(t,e){const r=w.get(t);return r?(w.delete(t),r(e)):Promise.resolve()}export{Z as h,z as m,X as s,x as u}; 2 | -------------------------------------------------------------------------------- /src/actions/resize.js: -------------------------------------------------------------------------------- 1 | import debounce from "lodash.debounce"; 2 | 3 | /** 4 | * This action triggers a resize event on node resizing, with optional debounce for performance. 5 | * example: 6 | *

console.log("enter")} 9 | * > 10 | * 11 | * optional params { debounce, exclude } 12 | * // debounce: ms to debounce resize event 13 | * // exclude: "width" or "height" to exclude from triggering resize event 14 | * use:resize={{ debounce: 250, exclude: "height" }} 15 | * 16 | */ 17 | 18 | export default function resize(node, params = {}) { 19 | let observer; 20 | let w; 21 | let h; 22 | 23 | const handleResize = (entries) => { 24 | const firstTime = w === undefined; 25 | 26 | for (const entry of entries) { 27 | const { width, height } = entry.contentRect; 28 | const widthTrigger = params.exclude !== "width" && width !== w; 29 | const heightTrigger = params.exclude !== "height" && height !== h; 30 | if (widthTrigger || heightTrigger) { 31 | w = width; 32 | h = height; 33 | if (!firstTime) node.dispatchEvent(new CustomEvent("resize")); 34 | } 35 | } 36 | }; 37 | 38 | const setObserver = () => { 39 | if (observer) observer.disconnect(); 40 | const cb = params.debounce 41 | ? debounce(handleResize, params.debounce) 42 | : handleResize; 43 | observer = new ResizeObserver(cb); 44 | observer.observe(node); 45 | }; 46 | 47 | setObserver(params); 48 | 49 | return { 50 | update(params) { 51 | setObserver(params); 52 | }, 53 | 54 | destroy() { 55 | if (observer) observer.disconnect(); 56 | } 57 | }; 58 | } 59 | -------------------------------------------------------------------------------- /src/utils/urlParams.js: -------------------------------------------------------------------------------- 1 | function get(key) { 2 | const name = key.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); 3 | const regex = new RegExp(`[\\?&]${name}=([^&#]*)`); 4 | const results = regex.exec(window.location.search); 5 | return results === null 6 | ? "" 7 | : decodeURIComponent(results[1].replace(/\+/g, " ")); 8 | } 9 | 10 | function set(key, value) { 11 | const baseUrl = [ 12 | window.location.protocol, 13 | "//", 14 | window.location.host, 15 | window.location.pathname 16 | ].join(""); 17 | const urlQueryString = document.location.search; 18 | const newParam = `${key}=${value}`; 19 | let params = `?${newParam}`; 20 | 21 | // If the "search" string exists, then build params from it 22 | if (urlQueryString) { 23 | const updateRegex = new RegExp(`([\?&])${key}[^&]*`); 24 | const removeRegex = new RegExp(`([\?&])${key}=[^&;]+[&;]?`); 25 | 26 | // Remove param if value is empty 27 | if (typeof value === "undefined" || value === null || value === "") { 28 | params = urlQueryString.replace(removeRegex, "$1"); 29 | params = params.replace(/[&;]$/, ""); 30 | } else if (urlQueryString.match(updateRegex) !== null) { 31 | // If param exists already, update it 32 | params = urlQueryString.replace(updateRegex, `$1${newParam}`); 33 | } else { 34 | // Otherwise, add it to end of query string 35 | params = `${urlQueryString}&${newParam}`; 36 | } 37 | } 38 | 39 | // no parameter was set so we don't need the question mark 40 | params = params === "?" ? "" : params; 41 | 42 | window.history.replaceState({}, "", `${baseUrl}${params}`); 43 | } 44 | 45 | export default { get, set }; 46 | -------------------------------------------------------------------------------- /src/actions/inView.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This action triggers a custom event on node entering/exiting the viewport. 3 | * example: 4 | *

console.log("enter")} 7 | * on:exit={() => console.log("exit")} 8 | * > 9 | * 10 | * optional params { root, top, bottom, progress } 11 | * top and bottom are numbers 12 | * use:inView={{ bottom: 100 }} // 100 pixels from bottom of viewport 13 | * 14 | * progress is a boolean for incremental updates 15 | * use:inView={{ progres: true }} 16 | */ 17 | 18 | export default function inView(node, params = {}) { 19 | let observer; 20 | 21 | const handleIntersect = (e) => { 22 | const intersecting = e[0].isIntersecting; 23 | const v = intersecting ? "enter" : "exit"; 24 | node.dispatchEvent(new CustomEvent(v)); 25 | if (params.progress && intersecting) { 26 | const ratio = e[0].intersectionRatio; 27 | const detail = { ratio }; 28 | node.dispatchEvent(new CustomEvent("progress", { detail })); 29 | } 30 | }; 31 | 32 | const setObserver = ({ root, top, bottom }) => { 33 | const marginTop = top ? top * -1 : 0; 34 | const marginBottom = bottom ? bottom * -1 : 0; 35 | const rootMargin = `${marginTop}px 0px ${marginBottom}px 0px`; 36 | const options = { root, rootMargin }; 37 | if (observer) observer.disconnect(); 38 | observer = new IntersectionObserver(handleIntersect, options); 39 | observer.observe(node); 40 | }; 41 | 42 | setObserver(params); 43 | 44 | return { 45 | update(params) { 46 | setObserver(params); 47 | }, 48 | 49 | destroy() { 50 | if (observer) observer.disconnect(); 51 | } 52 | }; 53 | } 54 | -------------------------------------------------------------------------------- /src/components/Meta.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | {title} 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | {#each preloadFont as href} 41 | 42 | {/each} 43 | 44 | -------------------------------------------------------------------------------- /docs/_app/immutable/chunks/CkxHW-tX.js: -------------------------------------------------------------------------------- 1 | import{T as P,U as A,V as y,W as v,X as L,Y as T,Z as x,_ as E,$ as R,p as B,a0 as D,a1 as Y,a2 as I,a3 as O,a4 as _}from"./-0kCmqra.js";import{c as j}from"./B7mm1rr4.js";const M={get(n,r){let t=n.props.length;for(;t--;){let e=n.props[t];if(_(e)&&(e=e()),typeof e=="object"&&e!==null&&r in e)return e[r]}},set(n,r,t){let e=n.props.length;for(;e--;){let i=n.props[e];_(i)&&(i=i());const a=P(i,r);if(a&&a.set)return a.set(t),!0}return!1},getOwnPropertyDescriptor(n,r){let t=n.props.length;for(;t--;){let e=n.props[t];if(_(e)&&(e=e()),typeof e=="object"&&e!==null&&r in e){const i=P(e,r);return i&&!i.configurable&&(i.configurable=!0),i}}},has(n,r){if(r===I||r===O)return!1;for(let t of n.props)if(_(t)&&(t=t()),t!=null&&r in t)return!0;return!1},ownKeys(n){const r=[];for(let t of n.props)if(_(t)&&(t=t()),!!t){for(const e in t)r.includes(e)||r.push(e);for(const e of Object.getOwnPropertySymbols(t))r.includes(e)||r.push(e)}return r}};function Z(...n){return new Proxy({props:n},M)}function U(n){var r;return((r=n.ctx)==null?void 0:r.d)??!1}function q(n,r,t,e){var S;var i=(t&R)!==0,a=(t&Y)!==0,c=e,d=!0,h=()=>(d&&(d=!1,c=a?B(e):e),c),u;if(i){var w=I in n||O in n;u=((S=P(n,r))==null?void 0:S.set)??(w&&r in n?s=>n[r]=s:void 0)}var o,g=!1;i?[o,g]=j(()=>n[r]):o=n[r],o===void 0&&e!==void 0&&(o=h(),u&&(A(),u(o)));var l;if(l=()=>{var s=n[r];return s===void 0?h():(d=!0,s)},(t&y)===0)return l;if(u){var m=n.$$legacy;return function(s,p){return arguments.length>0?((!p||m||g)&&u(p?l():s),s):l()}}var f=((t&D)!==0?x:E)(l);return i&&v(f),function(s,p){if(arguments.length>0){const b=p?v(f):i?L(s):s;return T(f,b),c!==void 0&&(c=b),s}return U(f)?f.v:v(f)}}export{q as p,Z as s}; 2 | -------------------------------------------------------------------------------- /src/components/figure/migrate/Figure.MapPath.svelte: -------------------------------------------------------------------------------- 1 | 24 | 25 | 30 | {#if mesh} 31 | 37 | {:else} 38 | {#each features as feature (feature.id)} 39 | 40 | dispatch("mouseleave")} 47 | on:mouseenter={(e) => onMouseEnter(e, feature)} 48 | /> 49 | {/each} 50 | {/if} 51 | 52 | 53 | 67 | -------------------------------------------------------------------------------- /docs/assets/demo/fonts/inconsolata.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Inconsolata"; 3 | src: url("https://pudding.cool/assets/fonts/inconsolata/inconsolata-v32-latin-regular.woff2") format("woff2"); 4 | font-weight: 400; 5 | font-style: normal; 6 | font-stretch: normal; 7 | font-display: swap; 8 | } 9 | 10 | @font-face { 11 | font-family: "Inconsolata"; 12 | src: url("https://pudding.cool/assets/fonts/inconsolata/inconsolata-v32-latin-300.woff2") format("woff2"); 13 | font-weight: 300; 14 | font-style: normal; 15 | font-stretch: normal; 16 | font-display: swap; 17 | } 18 | 19 | @font-face { 20 | font-family: "Inconsolata"; 21 | src: url("https://pudding.cool/assets/fonts/inconsolata/inconsolata-v32-latin-500.woff2") format("woff2"); 22 | font-weight: 500; 23 | font-style: normal; 24 | font-stretch: normal; 25 | font-display: swap; 26 | } 27 | 28 | @font-face { 29 | font-family: "Inconsolata"; 30 | src: url("https://pudding.cool/assets/fonts/inconsolata/inconsolata-v32-latin-600.woff2") format("woff2"); 31 | font-weight: 600; 32 | font-style: normal; 33 | font-stretch: normal; 34 | font-display: swap; 35 | } 36 | 37 | @font-face { 38 | font-family: "Inconsolata"; 39 | src: url("https://pudding.cool/assets/fonts/inconsolata/inconsolata-v32-latin-700.woff2") format("woff2"); 40 | font-weight: 700; 41 | font-style: normal; 42 | font-stretch: normal; 43 | font-display: swap; 44 | } 45 | 46 | @font-face { 47 | font-family: "Inconsolata"; 48 | src: url("https://pudding.cool/assets/fonts/inconsolata/inconsolata-v32-latin-800.woff2") format("woff2"); 49 | font-weight: 800; 50 | font-style: normal; 51 | font-stretch: normal; 52 | font-display: swap; 53 | } -------------------------------------------------------------------------------- /static/assets/demo/fonts/inconsolata.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Inconsolata"; 3 | src: url("https://pudding.cool/assets/fonts/inconsolata/inconsolata-v32-latin-regular.woff2") format("woff2"); 4 | font-weight: 400; 5 | font-style: normal; 6 | font-stretch: normal; 7 | font-display: swap; 8 | } 9 | 10 | @font-face { 11 | font-family: "Inconsolata"; 12 | src: url("https://pudding.cool/assets/fonts/inconsolata/inconsolata-v32-latin-300.woff2") format("woff2"); 13 | font-weight: 300; 14 | font-style: normal; 15 | font-stretch: normal; 16 | font-display: swap; 17 | } 18 | 19 | @font-face { 20 | font-family: "Inconsolata"; 21 | src: url("https://pudding.cool/assets/fonts/inconsolata/inconsolata-v32-latin-500.woff2") format("woff2"); 22 | font-weight: 500; 23 | font-style: normal; 24 | font-stretch: normal; 25 | font-display: swap; 26 | } 27 | 28 | @font-face { 29 | font-family: "Inconsolata"; 30 | src: url("https://pudding.cool/assets/fonts/inconsolata/inconsolata-v32-latin-600.woff2") format("woff2"); 31 | font-weight: 600; 32 | font-style: normal; 33 | font-stretch: normal; 34 | font-display: swap; 35 | } 36 | 37 | @font-face { 38 | font-family: "Inconsolata"; 39 | src: url("https://pudding.cool/assets/fonts/inconsolata/inconsolata-v32-latin-700.woff2") format("woff2"); 40 | font-weight: 700; 41 | font-style: normal; 42 | font-stretch: normal; 43 | font-display: swap; 44 | } 45 | 46 | @font-face { 47 | font-family: "Inconsolata"; 48 | src: url("https://pudding.cool/assets/fonts/inconsolata/inconsolata-v32-latin-800.woff2") format("woff2"); 49 | font-weight: 800; 50 | font-style: normal; 51 | font-stretch: normal; 52 | font-display: swap; 53 | } -------------------------------------------------------------------------------- /docs/assets/demo/fonts/national.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "National 2 Web"; 3 | src: url("https://pudding.cool/assets/fonts/national/National2Web-Regular.woff2") format("woff2"); 4 | font-weight: 400; 5 | font-style: normal; 6 | font-stretch: normal; 7 | font-display: swap; 8 | } 9 | 10 | @font-face { 11 | font-family: "National 2 Web"; 12 | src: url("https://pudding.cool/assets/fonts/national/National2Web-Bold.woff2") format("woff2"); 13 | font-weight: 700; 14 | font-style: normal; 15 | font-stretch: normal; 16 | font-display: swap; 17 | } 18 | 19 | @font-face { 20 | font-family: "National 2 Narrow Web"; 21 | src: url("https://pudding.cool/assets/fonts/national/National2NarrowWeb-Regular.woff2") format("woff2"); 22 | font-weight: 400; 23 | font-style: normal; 24 | font-stretch: normal; 25 | font-display: swap; 26 | } 27 | 28 | @font-face { 29 | font-family: "National 2 Narrow Web"; 30 | src: url("https://pudding.cool/assets/fonts/national/National2NarrowWeb-Bold.woff2") format("woff2"); 31 | font-weight: 700; 32 | font-style: normal; 33 | font-stretch: normal; 34 | font-display: swap; 35 | } 36 | 37 | @font-face { 38 | font-family: "National 2 Narrow Web"; 39 | src: url("https://pudding.cool/assets/fonts/national/National2NarrowWeb-ExtraLight.woff2") format("woff2"); 40 | font-weight: 200; 41 | font-style: normal; 42 | font-stretch: normal; 43 | font-display: swap; 44 | } 45 | 46 | @font-face { 47 | font-family: "National 2 Narrow Web"; 48 | src: url("https://pudding.cool/assets/fonts/national/National2NarrowWeb-Black.woff2") format("woff2"); 49 | font-weight: 900; 50 | font-style: normal; 51 | font-stretch: normal; 52 | font-display: swap; 53 | } -------------------------------------------------------------------------------- /static/assets/demo/fonts/national.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "National 2 Web"; 3 | src: url("https://pudding.cool/assets/fonts/national/National2Web-Regular.woff2") format("woff2"); 4 | font-weight: 400; 5 | font-style: normal; 6 | font-stretch: normal; 7 | font-display: swap; 8 | } 9 | 10 | @font-face { 11 | font-family: "National 2 Web"; 12 | src: url("https://pudding.cool/assets/fonts/national/National2Web-Bold.woff2") format("woff2"); 13 | font-weight: 700; 14 | font-style: normal; 15 | font-stretch: normal; 16 | font-display: swap; 17 | } 18 | 19 | @font-face { 20 | font-family: "National 2 Narrow Web"; 21 | src: url("https://pudding.cool/assets/fonts/national/National2NarrowWeb-Regular.woff2") format("woff2"); 22 | font-weight: 400; 23 | font-style: normal; 24 | font-stretch: normal; 25 | font-display: swap; 26 | } 27 | 28 | @font-face { 29 | font-family: "National 2 Narrow Web"; 30 | src: url("https://pudding.cool/assets/fonts/national/National2NarrowWeb-Bold.woff2") format("woff2"); 31 | font-weight: 700; 32 | font-style: normal; 33 | font-stretch: normal; 34 | font-display: swap; 35 | } 36 | 37 | @font-face { 38 | font-family: "National 2 Narrow Web"; 39 | src: url("https://pudding.cool/assets/fonts/national/National2NarrowWeb-ExtraLight.woff2") format("woff2"); 40 | font-weight: 200; 41 | font-style: normal; 42 | font-stretch: normal; 43 | font-display: swap; 44 | } 45 | 46 | @font-face { 47 | font-family: "National 2 Narrow Web"; 48 | src: url("https://pudding.cool/assets/fonts/national/National2NarrowWeb-Black.woff2") format("woff2"); 49 | font-weight: 900; 50 | font-style: normal; 51 | font-stretch: normal; 52 | font-display: swap; 53 | } -------------------------------------------------------------------------------- /src/actions/focusTrap.js: -------------------------------------------------------------------------------- 1 | // params = { disable: false } 2 | 3 | export default function focusTrap(node, params) { 4 | const elements = [ 5 | "a", 6 | "button", 7 | "input", 8 | "textarea", 9 | "select", 10 | "details", 11 | "[tabindex]:not([tabindex='-1'])" 12 | ]; 13 | let firstFocusable; 14 | let lastFocusable; 15 | let active; 16 | 17 | const moveFocusToTop = (e) => { 18 | if (e.key === "Tab" && !e.shiftKey) { 19 | e.preventDefault(); 20 | firstFocusable.focus(); 21 | } 22 | }; 23 | 24 | const moveFocusToBottom = (e) => { 25 | if (e.key === "Tab" && e.shiftKey) { 26 | e.preventDefault(); 27 | lastFocusable.focus(); 28 | } 29 | }; 30 | 31 | const add = () => { 32 | if (firstFocusable) 33 | firstFocusable.addEventListener("keydown", moveFocusToBottom); 34 | if (lastFocusable) 35 | lastFocusable.addEventListener("keydown", moveFocusToTop); 36 | active = true; 37 | }; 38 | 39 | const remove = () => { 40 | if (firstFocusable) 41 | firstFocusable.removeEventListener("keydown", moveFocusToBottom); 42 | if (lastFocusable) 43 | lastFocusable.removeEventListener("keydown", moveFocusToTop); 44 | active = false; 45 | }; 46 | 47 | const setup = (p) => { 48 | if (active && p && p.disable) remove(); 49 | else if ((!active && !p) || (p && !p.disable)) add(); 50 | }; 51 | 52 | const query = elements.join(", "); 53 | const focusableElements = [...node.querySelectorAll(query)]; 54 | 55 | firstFocusable = focusableElements.shift(); 56 | lastFocusable = focusableElements.pop(); 57 | 58 | setup(params); 59 | 60 | return { 61 | update(params) { 62 | setup(params); 63 | }, 64 | 65 | destroy() { 66 | remove(); 67 | } 68 | }; 69 | } 70 | -------------------------------------------------------------------------------- /src/components/figure/migrate/Figure.MapCanvas.svelte: -------------------------------------------------------------------------------- 1 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /src/components/demo/demo-fonts.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "atkinson", 4 | "family": "Atkinson", 5 | "type": "sans-serif" 6 | }, 7 | { 8 | "id": "atlas", 9 | "family": "Atlas Grotesk", 10 | "type": "sans-serif" 11 | }, 12 | { 13 | "id": "baloo-bhai", 14 | "family": "Baloo Bhai", 15 | "type": "sans-serif" 16 | }, 17 | { 18 | "id": "canela", 19 | "family": "Canela", 20 | "type": "serif" 21 | }, 22 | { 23 | "id": "computer-modern", 24 | "family": "Computer Modern", 25 | "type": "serif" 26 | }, 27 | { 28 | "id": "cozette", 29 | "family": "Cozette", 30 | "type": "other" 31 | }, 32 | { 33 | "id": "inter", 34 | "family": "Inter", 35 | "type": "sans-serif" 36 | }, 37 | { 38 | "id": "jamboree", 39 | "family": "Jamboree", 40 | "type": "other" 41 | }, 42 | { 43 | "id": "jersey", 44 | "family": "Jersey M54", 45 | "type": "other" 46 | }, 47 | { 48 | "id": "lyon", 49 | "family": "Lyon Display", 50 | "type": "serif" 51 | }, 52 | { 53 | "id": "metropolis", 54 | "family": "Metropolis", 55 | "type": "sans-serif" 56 | }, 57 | { 58 | "id": "national", 59 | "family": "National 2 Web", 60 | "type": "sans-serif" 61 | }, 62 | { 63 | "id": "publico", 64 | "family": "Publico Text", 65 | "type": "serif" 66 | }, 67 | { 68 | "id": "recoleta", 69 | "family": "Recoleta", 70 | "type": "serif" 71 | }, 72 | { 73 | "id": "rubik", 74 | "family": "Rubik", 75 | "type": "sans-serif" 76 | }, 77 | { 78 | "id": "inconsolata", 79 | "family": "Inconsolata", 80 | "type": "mono" 81 | }, 82 | { 83 | "id": "spacemono", 84 | "family": "Space Mono", 85 | "type": "mono" 86 | }, 87 | { 88 | "id": "tiempos", 89 | "family": "Tiempos Text", 90 | "type": "serif" 91 | } 92 | ] 93 | -------------------------------------------------------------------------------- /src/runes/useFetcher.svelte.js: -------------------------------------------------------------------------------- 1 | //adapted from https://userunes.com/usefetcher 2 | import { csvParse } from "d3"; 3 | 4 | export const useFetcher = (initialUrl, options) => { 5 | let url = $state(initialUrl); 6 | let data = $state(null); 7 | let loading = $state(true); 8 | let error = $state(); 9 | 10 | const setLoading = (isLoading = true) => { 11 | loading = isLoading; 12 | if (isLoading === true) { 13 | error = null; 14 | data = null; 15 | } 16 | }; 17 | 18 | const fetchData = async () => { 19 | try { 20 | const res = await fetch(url, options); 21 | if (!res.ok) 22 | throw new Error(`Unexpected error occurred (status ${res.status})`); 23 | 24 | let data; 25 | if (url.includes(".csv")) { 26 | const csv = await res.text(); 27 | data = csvParse(csv); 28 | } else data = await res.json(); 29 | return [null, data]; 30 | } catch (e) { 31 | const { errorMessage = "Unexpected error eccurred" } = e; 32 | return [errorMessage, null]; 33 | } 34 | }; 35 | 36 | const handleUrlChange = async (currentUrl) => { 37 | setLoading(true); 38 | 39 | const [err, response] = await fetchData(); 40 | if (currentUrl !== url) return; 41 | 42 | if (err) { 43 | setLoading(false); 44 | error = err; 45 | return; 46 | } 47 | 48 | setLoading(false); 49 | data = response; 50 | }; 51 | 52 | $effect(() => { 53 | handleUrlChange(url); 54 | }); 55 | 56 | return { 57 | get data() { 58 | return data; 59 | }, 60 | get loading() { 61 | return loading; 62 | }, 63 | get error() { 64 | return error; 65 | }, 66 | get url() { 67 | return url; 68 | }, 69 | set url(newUrl) { 70 | if (url !== newUrl) url = newUrl; 71 | } 72 | }; 73 | }; 74 | 75 | export default useFetcher; 76 | -------------------------------------------------------------------------------- /src/runes/useClipboard.svelte.js: -------------------------------------------------------------------------------- 1 | // https://userunes.com/useclipboard 2 | const copyMethods = [ 3 | async (str) => { 4 | await navigator.clipboard.writeText(str); 5 | }, 6 | async (str) => { 7 | const textarea = document.createElement("textarea"); 8 | textarea.value = str; 9 | textarea.style.position = "fixed"; 10 | textarea.style.opacity = "0"; 11 | document.body.appendChild(textarea); 12 | textarea.focus(); 13 | textarea.select(); 14 | document.execCommand("copy"); 15 | document.body.removeChild(textarea); 16 | } 17 | ]; 18 | 19 | const useClipboard = (copyString, config = {}) => { 20 | const { delay = 1000 } = config; 21 | 22 | let lastCopied = $state(null); 23 | let copied = $derived(lastCopied !== null); 24 | 25 | const copyToClipboard = async (overwriteCopyStr) => { 26 | const strToCopy = String( 27 | overwriteCopyStr === undefined ? copyString : overwriteCopyStr 28 | ); 29 | 30 | for (const method of copyMethods) { 31 | try { 32 | await method(strToCopy); 33 | return; 34 | } catch (error) { 35 | console.error("Copy method failed:", error); 36 | } 37 | } 38 | throw new Error("Copy failed, browser not supported."); 39 | }; 40 | 41 | const copy = async (newCopyString) => { 42 | if (!["string", "number"].includes(typeof newCopyString)) { 43 | throw new Error( 44 | "Invalid copy type: Only string and number are supported." 45 | ); 46 | } 47 | 48 | const time = Date.now(); 49 | lastCopied = time; 50 | await copyToClipboard(newCopyString); 51 | await new Promise((res) => setTimeout(res, delay)); 52 | if (time !== lastCopied) return; 53 | lastCopied = null; 54 | }; 55 | 56 | return { 57 | get copied() { 58 | return copied; 59 | }, 60 | copy 61 | }; 62 | }; 63 | 64 | export default useClipboard; 65 | -------------------------------------------------------------------------------- /src/components/layercake/future/MapPoints.svelte: -------------------------------------------------------------------------------- 1 | 5 | 37 | 38 | 39 | {#each (features || $data.features) as d} 40 | 41 | 50 | {/each} 51 | 52 | -------------------------------------------------------------------------------- /src/components/layercake/migrate/AxisY.svg.svelte: -------------------------------------------------------------------------------- 1 | 23 | 24 | 25 | {#each tickVals as tick} 26 | 30 | {#if gridlines !== false} 31 | 32 | {/if} 33 | {#if tickMarks === true} 34 | 35 | {/if} 36 | {formatTick(tick)} 43 | 44 | {/each} 45 | 46 | 47 | 64 | -------------------------------------------------------------------------------- /src/components/layercake/future/MapPoints.canvas.svelte: -------------------------------------------------------------------------------- 1 | 5 | 54 | -------------------------------------------------------------------------------- /src/components/demo/Demo.Fonts.Sample.svelte: -------------------------------------------------------------------------------- 1 | 27 | 28 | 29 | 30 | 31 | 32 |

33 |

{family}

34 |

{text}

35 |
36 | CSS Snippet 37 | 38 | {source} 39 | 40 |
41 | 42 | 47 |
48 | 49 | 89 | -------------------------------------------------------------------------------- /src/components/demo/migrate/Demo.IgStory.Chapters.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 | {#each sections as { title, slides }, i} 9 | {@const chapterActive = allSlides[activeSlide].section === i} 10 |
11 | 12 | {i + 1} — {title} 13 | 14 | {#if chapterActive} 15 | {#each slides as slide} 16 | {@const active = slide.i === activeSlide} 17 |
18 | {/each} 19 | {:else} 20 |
21 | {/if} 22 |
23 | {/each} 24 |
25 | 26 | 92 | -------------------------------------------------------------------------------- /src/components/layercake/future/MapPoints.html.svelte: -------------------------------------------------------------------------------- 1 | 5 | 34 | 35 |
36 | 37 | {#each (features || $data.features) as d} 38 |
51 |
52 | {/each} 53 |
54 | 55 | 62 | -------------------------------------------------------------------------------- /src/components/demo/Demo.Svelte5.svelte: -------------------------------------------------------------------------------- 1 | 38 | 39 |

Svelte5

40 | 41 |

Reactive variables 3 ways:

42 | 43 | 44 |

{count} doubled is {result1} (derived)

45 |

{count} doubled is {result2} (derived by)

46 |

{count} doubled is {result3} ($effect)

47 | 48 | 49 |

Children (previously slots):

50 |
51 | {@render children?.()} 52 |
53 | 54 |

Dispatch Event

55 | 56 | 57 | 58 | {#snippet person(p)} 59 |
60 |

{p.name}

61 |

{p.age}

62 |
63 | {/snippet} 64 | 65 |

Snippets

66 | 67 |
68 | {#each people as p} 69 | {@render person(p)} 70 | {/each} 71 |
72 | 73 | -------------------------------------------------------------------------------- /src/components/figure/migrate/Figure.MapLabels.svelte: -------------------------------------------------------------------------------- 1 | 15 | 16 | 20 | {#each features as feature} 21 | {@const coords = $custom.projectionFn(feature.geometry.coordinates)} 22 | {@const hasCoords = coords} 23 | {@const x = hasCoords ? coords[0] : 0} 24 | {@const y = hasCoords ? coords[1] : 0} 25 | {@const transform = `translate(${x}, ${y})`} 26 | {@const className = feature.properties.className} 27 | {#if hasCoords} 28 | 29 | {#each [0, 1] as i} 30 | {@const isStroke = i === 0 && stroke !== "none"} 31 | {@const isRender = isStroke || i > 0} 32 | {#if isRender} 33 | {feature.properties.label} 44 | {/if} 45 | {/each} 46 | 47 | {/if} 48 | {/each} 49 | 50 | 51 | 69 | -------------------------------------------------------------------------------- /src/styles/app.css: -------------------------------------------------------------------------------- 1 | @import "variables.css"; 2 | @import "normalize.css"; 3 | @import "font.css"; 4 | @import "reset.css"; 5 | 6 | /* colors defined in variables.css */ 7 | :root { 8 | /* font */ 9 | --sans: "Atlas Grotesk", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif; 10 | --serif: "Tiempos Text", Iowan Old Style, Times New Roman, Times, serif; 11 | --mono: Menlo, Consolas, Monaco, monospace; 12 | 13 | /* z-index */ 14 | --z-bottom: -100; 15 | --z-middle: 0; 16 | --z-top: 100; 17 | --z-overlay: 1000; 18 | 19 | /* presets (used in reset.css) */ 20 | --border-radius: 2px; 21 | --font-body: var(--serif); 22 | --font-form: var(--sans); 23 | --color-bg: var(--color-white); 24 | --color-fg: var(--color-gray-900); 25 | --color-primary: var(--color-black); 26 | --color-link: var(--color-black); 27 | --color-link-hover: var(--color-black); 28 | --color-focus: var(--color-red); 29 | --color-mark: var(--color-yellow); 30 | --color-selection: var(--color-gray-300); 31 | --color-border: var(--color-gray-300); 32 | --color-button-bg: var(--color-gray-300); 33 | --color-button-fg: var(--color-gray-900); 34 | --color-button-hover: var(--color-gray-400); 35 | --color-input-bg: var(--color-gray-50); 36 | --color-input-fg: var(--color-gray-900); 37 | --color-placeholder: var(--color-gray-500); 38 | 39 | /* "1" second duration */ 40 | --1s: 1ms; 41 | } 42 | 43 | /* dark theme */ 44 | /* @media screen and (prefers-color-scheme:dark) { 45 | :root { 46 | 47 | } 48 | } */ 49 | 50 | @media screen and (prefers-reduced-motion: no-preference) { 51 | :root { 52 | --1s: 1s; 53 | } 54 | } 55 | 56 | h1 { 57 | font-size: var(--48px, 48px); 58 | } 59 | 60 | h2 { 61 | font-size: var(--36px, 36px); 62 | } 63 | 64 | h3 { 65 | font-size: var(--28px, 28px); 66 | } 67 | 68 | h4 { 69 | font-size: var(--24px, 24px); 70 | } 71 | 72 | h5 { 73 | font-size: var(--22px, 22px); 74 | } 75 | 76 | h6 { 77 | font-size: var(--20px, 20px); 78 | } 79 | 80 | svg { 81 | display: block; 82 | width: 100%; 83 | height: auto; 84 | } -------------------------------------------------------------------------------- /src/components/layercake/future/Map.canvas.svelte: -------------------------------------------------------------------------------- 1 | 5 | 57 | -------------------------------------------------------------------------------- /src/components/layercake/future/MapLabels.svg.svelte: -------------------------------------------------------------------------------- 1 | 5 | 30 | 31 | 32 | {#each (features || $data.features) as d} 33 | {@const coords = projectionFn(getCoordinates(d))} 34 | {getLabel(d)} 39 | {/each} 40 | 41 | 42 | 56 | -------------------------------------------------------------------------------- /src/components/figure/migrate/Figure.svelte: -------------------------------------------------------------------------------- 1 | 19 | 56 | 57 |
58 |
65 | 66 |
67 | 68 |
69 | 70 | 91 | -------------------------------------------------------------------------------- /src/components/layercake/future/BeeswarmForce.svelte: -------------------------------------------------------------------------------- 1 | 5 | 46 | 47 | 48 | {#each simulation.nodes() as node} 49 | 57 | {#if getTitle} 58 | {getTitle(node)} 59 | {/if} 60 | 61 | {/each} 62 | 63 | -------------------------------------------------------------------------------- /src/components/helpers/Scrolly.svelte: -------------------------------------------------------------------------------- 1 | 84 | 85 |
86 | {@render children?.()} 87 |
88 | -------------------------------------------------------------------------------- /src/components/layercake/future/MapLabels.html.svelte: -------------------------------------------------------------------------------- 1 | 5 | 32 | 33 |
37 | {#each (features || $data.features) as d} 38 | {@const coords = projectionFn(getCoordinates(d))} 39 |
{getLabel(d)}
46 | {/each} 47 |
48 | 49 | 63 | -------------------------------------------------------------------------------- /src/components/layercake/migrate/AxisY.html.svelte: -------------------------------------------------------------------------------- 1 | 20 | 21 |
22 | {#each tickVals as tick, i} 23 |
24 | {#if gridlines !== false} 25 |
29 | {/if} 30 | {#if baseline !== false && i === 0} 31 |
35 | {/if} 36 | {#if tickMarks === true} 37 |
38 | {/if} 39 |
47 | {formatTick(tick)} 48 |
49 |
50 | {/each} 51 |
52 | 53 | 89 | -------------------------------------------------------------------------------- /src/components/layercake/migrate/AxisX.html.svelte: -------------------------------------------------------------------------------- 1 | 21 | 22 |
23 | {#each tickVals as tick, i} 24 | {#if gridlines !== false} 25 |
26 | {/if} 27 | {#if tickMarks === true} 28 |
32 | {/if} 33 |
34 |
{formatTick(tick)}
35 |
36 | {/each} 37 | {#if baseline === true} 38 |
39 | {/if} 40 |
41 | 42 | 84 | -------------------------------------------------------------------------------- /src/components/layercake/migrate/AxisX.svg.svelte: -------------------------------------------------------------------------------- 1 | 32 | 33 | 34 | {#each tickVals as tick, i} 35 | 39 | {#if gridlines !== false} 40 | 41 | {/if} 42 | {#if tickMarks === true} 43 | 44 | {/if} 45 | {formatTick(tick)} 48 | 49 | {/each} 50 | {#if baseline === true} 51 | 58 | {/if} 59 | 60 | 61 | 90 | -------------------------------------------------------------------------------- /src/components/layercake/future/Beeswarm.svg.svelte: -------------------------------------------------------------------------------- 1 | 5 | 71 | 72 | 73 | {#each circles as d} 74 | 82 | {#if getTitle} 83 | {getTitle(d)} 84 | {/if} 85 | 86 | {/each} 87 | 88 | -------------------------------------------------------------------------------- /src/components/helpers/migrate/Toggle.svelte: -------------------------------------------------------------------------------- 1 | 18 | 19 |
20 | {label} 21 | 32 |
33 | 34 | 107 | -------------------------------------------------------------------------------- /src/components/layercake/future/BeeswarmForce.html.svelte: -------------------------------------------------------------------------------- 1 | 5 | 46 | 47 |
48 | {#each simulation.nodes() as node} 49 |
61 | {#if getTitle} 62 |
{getTitle(node)}
63 | {/if} 64 |
65 | {/each} 66 |
67 | 68 | 91 | -------------------------------------------------------------------------------- /src/components/demo/migrate/Demo.IgStory.svelte: -------------------------------------------------------------------------------- 1 | 76 | 77 | 78 | 79 |
80 | 81 | {#each allSlides as slide, i} 82 | 83 | {#each slide.text as { type, text }} 84 | 85 | {@html text} 86 | 87 | {/each} 88 | 89 | {/each} 90 | 91 |
92 | 93 |
94 | 95 | 104 | 105 | 122 | -------------------------------------------------------------------------------- /src/components/layercake/future/Map.svg.svelte: -------------------------------------------------------------------------------- 1 | 5 | 52 | 53 | dispatch('mouseout')} 56 | on:blur={(e) => dispatch('mouseout')} 57 | > 58 | {#each (features || $data.features) as feature} 59 | dispatch('mousemove', { e, props: feature.properties })} 66 | on:focus={(e) => dispatch('mousemove', { e, props: feature.properties })} 67 | on:mousemove={handleMousemove(feature)} 68 | > 69 | {/each} 70 | 71 | 72 | 92 | -------------------------------------------------------------------------------- /src/components/layercake/future/Beeswarm.html.svelte: -------------------------------------------------------------------------------- 1 | 5 | 71 | 72 |
73 | {#each circles as d} 74 |
86 | {#if getTitle} 87 |
{getTitle(d)}
88 | {/if} 89 |
90 | {/each} 91 |
92 | 93 | 116 | -------------------------------------------------------------------------------- /docs/_app/immutable/chunks/DfLy1BuI.js: -------------------------------------------------------------------------------- 1 | import{aj as L,as as b,ar as v,j as N,b as O,a5 as M,n as R,K as V,O as j,az as q,h as g,C as z,B,g as w,D as T,s as k,c as S,i as W,R as h,p as F,aA as H}from"./-0kCmqra.js";function te(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const G=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function re(e){return G.includes(e)}const K={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function ae(e){return e=e.toLowerCase(),K[e]??e}const U=["touchstart","touchmove"];function ne(e){return U.includes(e)}const X=["textarea","script","style","title"];function se(e){return X.includes(e)}function oe(e,t){if(t){const r=document.body;e.autofocus=!0,L(()=>{document.activeElement===r&&e.focus()})}}let A=!1;function Y(){A||(A=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function x(e){var t=N,r=O;b(null),v(null);try{return e()}finally{b(t),v(r)}}function ie(e,t,r,a=r){e.addEventListener(t,()=>x(r));const s=e.__on_r;s?e.__on_r=()=>{s(),a(!0)}:e.__on_r=()=>a(!0),Y()}const J=new Set,Q=new Set;function ue(e,t,r,a={}){function s(n){if(a.capture||Z.call(t,n),!n.cancelBubble)return x(()=>r==null?void 0:r.call(this,n))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?L(()=>{t.addEventListener(e,s,a)}):t.addEventListener(e,s,a),s}function ce(e){for(var t=0;t{throw p});throw d}}finally{e.__root=t,delete e.currentTarget,b(D),v(P)}}}let i;function le(){i=void 0}function fe(e){let t=null,r=g;var a;if(g){for(t=S,i===void 0&&(i=W(document.head));i!==null&&(i.nodeType!==z||i.data!==B);)i=w(i);i===null?T(!1):i=k(w(i))}g||(a=document.head.appendChild(V()));try{j(()=>e(a),q)}finally{r&&(T(!0),i=S,k(t))}}function $(e,t,r){if(e==null)return t(void 0),h;const a=F(()=>e.subscribe(t,r));return a.unsubscribe?()=>a.unsubscribe():a}const l=[];function de(e,t=h){let r=null;const a=new Set;function s(u){if(H(e,u)&&(e=u,r)){const c=!l.length;for(const o of a)o[1](),l.push(o,e);if(c){for(let o=0;o{a.delete(o),a.size===0&&r&&(r(),r=null)}}return{set:s,update:n,subscribe:f}}function _e(e){let t;return $(e,r=>t=r)(),t}export{J as a,le as b,fe as c,se as d,ce as e,Y as f,_e as g,Z as h,ne as i,te as j,ue as k,ie as l,oe as m,ae as n,re as o,Q as r,$ as s,de as w}; 2 | -------------------------------------------------------------------------------- /src/svg/logo-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/svg/logo-black.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/components/helpers/migrate/Slider.svelte: -------------------------------------------------------------------------------- 1 | 26 | 108 | 109 |
116 |
117 | 118 |
119 |
120 | 121 | 150 | -------------------------------------------------------------------------------- /docs/_app/immutable/nodes/2.lXA7VpVS.js: -------------------------------------------------------------------------------- 1 | var I=a=>{throw TypeError(a)};var R=(a,t,e)=>t.has(a)||I("Cannot "+e);var r=(a,t,e)=>(R(a,t,"read from private field"),e?e.call(a):t.get(a)),l=(a,t,e)=>t.has(a)?I("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(a):t.set(a,e),n=(a,t,e,o)=>(R(a,t,"write to private field"),o?o.call(a,e):t.set(a,e),e),j=(a,t,e)=>(R(a,t,"access private method"),e);import"../chunks/CWj6FrbW.js";import{c as L,O as rt,b as Q,L as A,ar as V,as as E,at as Y,j as H,m as nt,S as J,aj as st,h as W,a as it,af as ct,s as X,au as lt,ad as mt,Q as pt,av as ft,aw as ht,ax as dt,a7 as C,am as N,an as c,t as Z,ay as ut,a8 as F,W as gt,ao as _t,M as vt,y as $,N as yt}from"../chunks/-0kCmqra.js";import{c as wt}from"../chunks/DfLy1BuI.js";import{e as bt,i as kt,s as i}from"../chunks/CMUBZgSg.js";import{p as y}from"../chunks/CkxHW-tX.js";import{c as tt}from"../chunks/DpoC0QzE.js";var xt=pt|ft|ht;function Tt(a,t,e){new Et(a,t,e)}var p,w,u,b,f,h,m,d,k,B;class Et{constructor(t,e,o){l(this,k);l(this,p);l(this,w);l(this,u);l(this,b);l(this,f);l(this,h,null);l(this,m,null);l(this,d,!1);n(this,p,t),n(this,u,e),n(this,b,o),n(this,w,L),n(this,f,rt(()=>{Q.b=this,W&&it();try{n(this,h,A(()=>o(r(this,p))))}catch(s){this.error(s)}},xt)),W&&n(this,p,L)}error(t){var e=r(this,u).onerror;let o=r(this,u).failed;const s=()=>{r(this,m)!==null&&ct(r(this,m),()=>{n(this,m,null)}),n(this,h,j(this,k,B).call(this,()=>(n(this,d,!1),A(()=>r(this,b).call(this,r(this,p))))))};if(r(this,d)||!e&&!o)throw t;var g=H;try{E(null),e==null||e(t,s)}finally{E(g)}r(this,h)&&(J(r(this,h)),n(this,h,null)),r(this,m)&&(J(r(this,m)),n(this,m,null)),W&&(X(r(this,w)),lt(),X(mt())),o&&st(()=>{n(this,m,j(this,k,B).call(this,()=>{n(this,d,!0);try{return A(()=>{o(r(this,p),()=>t,()=>s)})}catch(_){return dt(_,r(this,f).parent),null}finally{n(this,d,!1)}}))})}}p=new WeakMap,w=new WeakMap,u=new WeakMap,b=new WeakMap,f=new WeakMap,h=new WeakMap,m=new WeakMap,d=new WeakMap,k=new WeakSet,B=function(t){var e=Q,o=H,s=nt;V(r(this,f)),E(r(this,f)),Y(r(this,f).ctx);try{return t()}finally{V(e),E(o),Y(s)}};var Ft=C(''),Rt=C(' ',1);function jt(a,t){let e=y(t,"title",3,"Title TK"),o=y(t,"description",3,"Description TK"),s=y(t,"url",3,"https://pudding.cool"),g=y(t,"keywords",3,""),_=y(t,"preloadFont",19,()=>[]);wt(x=>{var v=Rt(),T=N(v),P=c(T,4),S=c(P,2),D=c(S,4),G=c(D,2),K=c(G,6),M=c(K,14),O=c(M,2),U=c(O,2),q=c(U,4),et=c(q,2);bt(et,17,_,kt,(at,ot)=>{var z=Ft();Z(()=>i(z,"href",gt(ot))),F(at,z)}),Z(()=>{ut.title=e(),i(T,"content",o()),i(P,"content",g()),i(S,"content",e()),i(D,"content",s()),i(G,"content",o()),i(K,"content",`${s()??""}/assets/social-facebook.jpg`),i(M,"content",e()),i(O,"content",o()),i(U,"content",`${s()??""}/assets/social-twitter.jpg`),i(q,"href",`${s()??""}/`)}),F(x,v)})}function At(a){var t=_t(),e=N(t);Tt(e,{onerror:o=>console.error(o)},o=>{}),F(a,t)}function Wt(){console.log("--- --- --- --- --- ---"),console.log("svelte-starter: 6.14.0"),console.log("build: 2025-07-08-10:43"),console.log("--- --- --- --- --- ---")}var Bt=C(" ",1);function Mt(a,t){vt(t,!0),Wt();const e=["https://pudding.cool/assets/fonts/tiempos/TiemposTextWeb-Regular.woff2","https://pudding.cool/assets/fonts/tiempos/TiemposTextWeb-Bold.woff2","https://pudding.cool/assets/fonts/atlas/AtlasGrotesk-Regular-Web.woff2","https://pudding.cool/assets/fonts/atlas/AtlasGrotesk-Bold-Web.woff2"],{title:o,description:s,url:g,keywords:_}=tt;$("copy",tt),$("data",t.data);var x=Bt(),v=N(x);jt(v,{get title(){return o},get description(){return s},get url(){return g},get preloadFont(){return e},get keywords(){return _}});var T=c(v,2);At(T),F(a,x),yt()}export{Mt as component}; 2 | -------------------------------------------------------------------------------- /src/components/Footer.Story.svelte: -------------------------------------------------------------------------------- 1 | 14 | 15 |
16 | {#if !resource && !footer} 17 |
18 |

#{id}

19 |

{month}

20 |
21 | {/if} 22 | 23 |
24 | thumbnail for story 29 | {#if youtube} 30 | {@html playSvg} 31 | {/if} 32 |
33 |
34 |

35 | {@html short} 36 |

37 |

38 | {@html tease} 39 |

40 |
41 |
42 |
43 | 44 | 169 | -------------------------------------------------------------------------------- /docs/_app/immutable/nodes/5.Bozl_rDw.js: -------------------------------------------------------------------------------- 1 | import"../chunks/CWj6FrbW.js";import{p as Y,ai as K,h as Q,M as R,Y as U,al as X,a7 as w,t as M,a8 as S,a9 as m,aa as f,an as d,W as _,ap as V,N as W,am as A,aB as Z}from"../chunks/-0kCmqra.js";import{s as k}from"../chunks/DnXbvXxH.js";import{s as $,a as B,e as F,r as I,i as E}from"../chunks/CMUBZgSg.js";import{l as ee,c as te}from"../chunks/DfLy1BuI.js";import{p as z}from"../chunks/CkxHW-tX.js";import{o as ae}from"../chunks/CWT9bnGQ.js";import{b as se}from"../chunks/Cdd2vc2j.js";function J(e,t,s=t){ee(e,"input",a=>{var r=a?e.defaultValue:e.value;if(r=j(e)?D(r):r,s(r),r!==(r=t())){var u=e.selectionStart,n=e.selectionEnd;e.value=r??"",n!==null&&(e.selectionStart=u,e.selectionEnd=Math.min(n,e.value.length))}}),(Q&&e.defaultValue!==e.value||Y(t)==null&&e.value)&&s(j(e)?D(e.value):e.value),K(()=>{var a=t();j(e)&&a===D(e.value)||e.type==="date"&&!a&&!e.value||a!==e.value&&(e.value=a??"")})}function j(e){var t=e.type;return t==="number"||t==="range"}function D(e){return e===""?null:+e}function re(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}class ne extends Map{constructor(t,s=le){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:s}}),t!=null)for(const[a,r]of t)this.set(a,r)}get(t){return super.get(O(this,t))}has(t){return super.has(O(this,t))}set(t,s){return super.set(ie(this,t),s)}delete(t){return super.delete(oe(this,t))}}function O({_intern:e,_key:t},s){const a=t(s);return e.has(a)?e.get(a):s}function ie({_intern:e,_key:t},s){const a=t(s);return e.has(a)?e.get(a):(e.set(a,s),s)}function oe({_intern:e,_key:t},s){const a=t(s);return e.has(a)&&(s=e.get(a),e.delete(a)),s}function le(e){return e!==null&&typeof e=="object"?e.valueOf():e}function fe(e){return e}function ue(e,...t){return ce(e,Array.from,fe,t)}function ce(e,t,s,a){return function r(u,n){if(n>=a.length)return s(u);const o=new ne,c=a[n++];let p=-1;for(const l of u){const i=c(l,++p,u),y=o.get(i);y?y.push(l):o.set(i,[l])}for(const[l,i]of o)o.set(l,r(i,n));return t(o)}(e,0)}var me=w(''),ye=w('

CSS Snippet
');function de(e,t){R(t,!0);let s=z(t,"id",3,""),a=z(t,"family",3,""),r=z(t,"size",3,16),u=V(()=>`${r()}px`),n=X("");const o=`${se}/assets/demo/fonts/${s()}.css`;ae(async()=>{const h=await fetch(o);U(n,await h.text(),!0)});var c=ye();te(h=>{var b=me();M(()=>$(b,"href",o)),S(h,b)});var p=m(c),l=m(p,!0);f(p);var i=d(p,2);let y;var v=m(i,!0);f(i);var x=d(i,2),g=d(m(x),2),N=m(g,!0);f(g),f(x),f(c),M(h=>{B(c,`font-family: '${a()??""}';`),k(l,a()),y=B(i,"",y,h),k(v,t.text),k(N,_(n))},[()=>({"font-size":_(u)})]),S(e,c),W()}const pe=[{id:"atkinson",family:"Atkinson",type:"sans-serif"},{id:"atlas",family:"Atlas Grotesk",type:"sans-serif"},{id:"baloo-bhai",family:"Baloo Bhai",type:"sans-serif"},{id:"canela",family:"Canela",type:"serif"},{id:"computer-modern",family:"Computer Modern",type:"serif"},{id:"cozette",family:"Cozette",type:"other"},{id:"inter",family:"Inter",type:"sans-serif"},{id:"jamboree",family:"Jamboree",type:"other"},{id:"jersey",family:"Jersey M54",type:"other"},{id:"lyon",family:"Lyon Display",type:"serif"},{id:"metropolis",family:"Metropolis",type:"sans-serif"},{id:"national",family:"National 2 Web",type:"sans-serif"},{id:"publico",family:"Publico Text",type:"serif"},{id:"recoleta",family:"Recoleta",type:"serif"},{id:"rubik",family:"Rubik",type:"sans-serif"},{id:"inconsolata",family:"Inconsolata",type:"mono"},{id:"spacemono",family:"Space Mono",type:"mono"},{id:"tiempos",family:"Tiempos Text",type:"serif"}];var ve=w('

',1),he=w('

Hosted Fonts on The Pudding

Do not use fonts hosted by The Pudding without written permission.

',1);function _e(e,t){R(t,!0);let s=z(t,"size",7,18),a=z(t,"text",7,"The quick brown fox jumps over the lazy dog.");const r=ue(pe,v=>v.type);r.sort((v,x)=>re(v[1].length,x[1].length));var u=he(),n=A(u),o=d(m(n),4),c=m(o),p=m(c);f(c);var l=d(c,2);I(l);var i=d(l,4);I(i),f(o),f(n);var y=d(n,2);F(y,21,()=>r,E,(v,x)=>{var g=V(()=>Z(_(x),2));let N=()=>_(g)[0],h=()=>_(g)[1];var b=ve(),T=A(b),q=m(T,!0);f(T);var C=d(T,2);F(C,21,h,E,(G,P)=>{let H=()=>_(P).family,L=()=>_(P).id;de(G,{get id(){return L()},get family(){return H()},get size(){return s()},get text(){return a()}})}),f(C),M(()=>k(q,N())),S(v,b)}),f(y),M(()=>k(p,`font-size: ${s()??""}px`)),J(l,s),J(i,a),S(e,u),W()}function Ne(e){_e(e,{})}export{Ne as component}; 2 | --------------------------------------------------------------------------------