contour-ds 1.1.2 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +30 -2
  2. package/dist/agent-rules.json +5 -1
  3. package/dist/build-manifest.json +94 -93
  4. package/dist/contour-wc.esm.js +4443 -534
  5. package/dist/contour-wc.esm.min.js +1 -1
  6. package/dist/contour-wc.js +4441 -528
  7. package/dist/contour-wc.min.js +1 -1
  8. package/dist/contour.components.json +4054 -171
  9. package/dist/contour.css +1325 -565
  10. package/dist/contour.d.ts +119 -62
  11. package/dist/contour.esm.js +23 -0
  12. package/dist/contour.esm.min.js +1 -1
  13. package/dist/contour.js +23 -0
  14. package/dist/contour.min.css +1 -1
  15. package/dist/contour.min.js +1 -1
  16. package/dist/contour.tokens.json +47 -2
  17. package/dist/docs/actions.md +6 -2
  18. package/dist/docs/affordances.md +19 -3
  19. package/dist/docs/apireference.md +30 -0
  20. package/dist/docs/colour.md +2 -2
  21. package/dist/docs/componentindex.md +39 -0
  22. package/dist/docs/data.md +38 -3
  23. package/dist/docs/docs.md +6 -2
  24. package/dist/docs/feedback.md +13 -3
  25. package/dist/docs/field.md +7 -2
  26. package/dist/docs/forms.md +35 -3
  27. package/dist/docs/index.json +44 -75
  28. package/dist/docs/install.md +4 -2
  29. package/dist/docs/landing.md +3 -2
  30. package/dist/docs/mapengine.md +9 -3
  31. package/dist/docs/motion.md +5 -2
  32. package/dist/docs/navigation.md +10 -3
  33. package/dist/docs/overlays.md +26 -3
  34. package/dist/docs/overview.md +2 -2
  35. package/dist/docs/patterns.md +38 -3
  36. package/dist/docs/playground.md +5 -2
  37. package/dist/docs/principles.md +2 -2
  38. package/dist/docs/recipes.md +7 -3
  39. package/dist/docs/space.md +2 -2
  40. package/dist/docs/status.md +19 -3
  41. package/dist/docs/surfaces.md +7 -3
  42. package/dist/docs/theming.md +5 -2
  43. package/dist/docs/type.md +2 -2
  44. package/dist/docs/webcomponents.md +26 -7
  45. package/dist/map-chrome.mapbox.css +4 -4
  46. package/dist/map-chrome.maplibre.css +4 -4
  47. package/dist/registry/items/contour-core.json +2 -2
  48. package/dist/registry/items/contour-data.json +2 -2
  49. package/dist/registry/items/contour-docs.json +2 -2
  50. package/dist/registry/items/contour-landing.json +2 -2
  51. package/dist/registry/registry.json +8 -8
  52. package/dist/surfaces/contour-core.min.css +1 -1
  53. package/dist/surfaces/contour-data.min.css +1 -1
  54. package/dist/surfaces/contour-docs.min.css +1 -1
  55. package/dist/surfaces/contour-landing.min.css +1 -1
  56. package/dist/wc/behaviours.mjs +69 -11
  57. package/dist/wc/content.mjs +163 -8
  58. package/dist/wc/core.mjs +177 -36
  59. package/dist/wc/dashboard.mjs +69 -4
  60. package/dist/wc/data.mjs +933 -128
  61. package/dist/wc/docs.mjs +118 -0
  62. package/dist/wc/feedback.mjs +75 -13
  63. package/dist/wc/forms.mjs +371 -34
  64. package/dist/wc/index.mjs +31 -3
  65. package/dist/wc/interaction.mjs +11 -6
  66. package/dist/wc/map.mjs +142 -38
  67. package/dist/wc/misc.mjs +29 -1
  68. package/dist/wc/navigation.mjs +424 -75
  69. package/dist/wc/registration.mjs +8 -4
  70. package/dist/wc/shadow.mjs +29 -12
  71. package/dist/wc/states.mjs +15 -0
  72. package/dist/wc/svg.mjs +10 -0
  73. package/dist/wc/ui.mjs +1767 -129
  74. package/package.json +39 -6
@@ -1 +1 @@
1
- (()=>{"use strict";if(window.Contour&&window.Contour.__loaded)return;const $=(sel,root=document)=>root.querySelector(sel);const $$=(sel,root=document)=>Array.from((root||document).querySelectorAll(sel));const isTyping=(el)=>!!el&&(el.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(el.tagName));const reducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)");const goTo=(el)=>{if(!el)return;if(el.id&&location.hash!=="#"+el.id){history.replaceState(null,"","#"+el.id)}el.scrollIntoView({behavior:reducedMotion.matches?"auto":"smooth",block:"start",})};const schemeMeta=()=>$('meta[name="color-scheme"]');const storedScheme=()=>{try{return localStorage.getItem("contour-scheme")??"light dark"}catch{return"light dark"}};const applyScheme=(value)=>{document.documentElement.classList.add("is-theme-switching");const meta=schemeMeta();if(meta)meta.setAttribute("content",value);requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.documentElement.classList.remove("is-theme-switching")})});try{if(value==="light dark")localStorage.removeItem("contour-scheme");else localStorage.setItem("contour-scheme",value)}catch{}syncSchemeControls(value)};const resolvedScheme=()=>window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";function syncSchemeControls(value){const resolved=resolvedScheme();const rendered=value==="light dark"?resolved:value;const target=rendered==="dark"?"light":"dark";$$("[data-scheme-toggle]").forEach((btn)=>{btn.dataset.schemeNext=target;btn.setAttribute("aria-label",target==="dark"?"Switch to dark theme":"Switch to light theme",);btn.setAttribute("title",value==="light dark"?`Following the system (${resolved}). Activate to switch to ${target}.`:`Manual: ${value}. Activate to switch to ${target}.`,)});$$("[data-scheme-option]").forEach((el)=>{const active=el.dataset.schemeOption===value;if(el.type==="radio"){el.checked=active}else{el.setAttribute("aria-checked",String(active));el.tabIndex=active?0:-1}})}$$("[data-scheme-toggle]").forEach((btn)=>{btn.addEventListener("click",()=>{const current=storedScheme();const rendered=current==="light dark"?resolvedScheme():current;const target=rendered==="dark"?"light":"dark";const system=resolvedScheme();applyScheme(target===system?"light dark":target)})});$$("[data-scheme-option]").forEach((el)=>{if(el.type==="radio"){el.addEventListener("change",()=>applyScheme(el.dataset.schemeOption));return}el.addEventListener("click",()=>applyScheme(el.dataset.schemeOption));el.addEventListener("keydown",(event)=>{const options=$$("[data-scheme-option]").filter((o)=>o.type!=="radio");const index=options.indexOf(el);if(event.key==="ArrowRight"||event.key==="ArrowDown"){event.preventDefault();options[(index+1)%options.length].focus();options[(index+1)%options.length].click()}if(event.key==="ArrowLeft"||event.key==="ArrowUp"){event.preventDefault();const prev=options[(index-1+options.length)%options.length];prev.focus();prev.click()}})});window.addEventListener("storage",(event)=>{if(event.key==="contour-scheme")syncSchemeControls(storedScheme())});window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{syncSchemeControls(storedScheme())});syncSchemeControls(storedScheme());$$("[data-tabs]").forEach((group)=>{const list=$("[role='tablist']",group);const tabs=$$("[role='tab']",list);if(!tabs.length)return;const activate=(tab,focus=true)=>{tabs.forEach((t)=>{const selected=t===tab;t.setAttribute("aria-selected",String(selected));t.tabIndex=selected?0:-1;const panel=document.getElementById(t.getAttribute("aria-controls"));if(panel)panel.hidden=!selected});if(focus)tab.focus()};tabs.forEach((tab,index)=>{tab.addEventListener("click",()=>activate(tab,false));tab.addEventListener("keydown",(event)=>{const map={ArrowRight:index+1,ArrowLeft:index-1,Home:0,End:tabs.length-1,};if(!(event.key in map))return;event.preventDefault();const next=tabs[(map[event.key]+tabs.length)%tabs.length];activate(next)})});if(tabs[0])activate(tabs[0],false)});$$("[data-segmented]").forEach((group)=>{const options=$$("button",group);options.forEach((option)=>{option.addEventListener("click",()=>{options.forEach((o)=>o.setAttribute("aria-pressed",String(o===option)));group.dispatchEvent(new CustomEvent("contour:change",{detail:{value:option.dataset.value}}),)})})});const paintRange=(input)=>{const min=Number(input.min||0);const max=Number(input.max||100);const value=Number(input.value);const pct=max===min?0:((value-min)/(max-min))*100;input.style.setProperty("--fill",`${pct}%`);const output=document.getElementById(input.getAttribute("aria-describedby")||"");if(output)output.textContent=input.dataset.format?formatValue(input,value):value};const formatValue=(input,value)=>{const format=input.dataset.format||"";if(format==="deg")return`${value}°`;if(format==="ms")return`${value} ms`;if(format==="km")return`${value.toFixed(1)} km`;if(format==="pct")return`${value}%`;return String(value)};$$('input[type="range"].c-range').forEach((input)=>{paintRange(input);input.addEventListener("input",()=>{paintRange(input);input.dispatchEvent(new CustomEvent("contour:input",{bubbles:true,detail:{value:Number(input.value)}}))})});$$('.c-time-slider__play').forEach((btn)=>{btn.addEventListener('click',()=>{const playing=btn.getAttribute('data-state')==='play';btn.setAttribute('data-state',playing?'pause':'play');btn.setAttribute('aria-label',playing?'Pause':'Play');const use=btn.querySelector('use');if(use)use.setAttribute('href',playing?'#i-pause':'#i-play')})});const railLinks=$$("[data-spy] a");if(railLinks.length){const sections=railLinks.map((link)=>document.getElementById(link.getAttribute("href")?.slice(1))).filter(Boolean);const setActive=(id)=>{railLinks.forEach((link)=>{const active=link.getAttribute("href")===`#${id}`;link.setAttribute("aria-current",active?"true":"false")})};if(sections[0])setActive(sections[0].id);if("IntersectionObserver"in window){const spy=new IntersectionObserver((entries)=>{const visible=entries.filter((e)=>e.isIntersecting).sort((a,b)=>a.boundingClientRect.top-b.boundingClientRect.top);if(visible[0])setActive(visible[0].target.id)},{rootMargin:"-20% 0px -70% 0px"},);sections.forEach((section)=>spy.observe(section))}}const copyText=async(text)=>{try{await navigator.clipboard.writeText(text);return true}catch{try{const ta=document.createElement("textarea");ta.value=text;ta.setAttribute("readonly","");ta.style.position="fixed";ta.style.top="-9999px";ta.style.opacity="0";document.body.append(ta);ta.select();const ok=document.execCommand("copy");ta.remove();return ok}catch{return false}}};document.addEventListener("click",async(event)=>{const trigger=event.target.closest("[data-copy]");if(!trigger)return;if(trigger.closest("summary"))event.preventDefault();const selector=trigger.dataset.copy;const source=selector?$(selector):trigger.previousElementSibling;const text=source?.textContent?.trim()??"";if(!text)return;const ok=await copyText(text);const icon=trigger.querySelector("use");const originalHref=icon?.getAttribute("href");const originalLabel=trigger.getAttribute("aria-label")||trigger.title;if(ok&&icon)icon.setAttribute("href","#i-check");trigger.setAttribute("aria-label",ok?"Copied":"Copy failed");trigger.dataset.copied=String(ok);const timer=setTimeout(()=>{if(!trigger.isConnected)return;if(icon&&originalHref)icon.setAttribute("href",originalHref);trigger.setAttribute("aria-label",originalLabel);delete trigger.dataset.copied},1600)});let toastHost=$("#toast-host");const ensureToastHost=()=>{if(!toastHost||!document.contains(toastHost)){toastHost=document.createElement("div");toastHost.id="toast-host";toastHost.className="c-toast-host";document.body.append(toastHost)}if(!toastHost.getAttribute("role"))toastHost.setAttribute("role","status");if(!toastHost.hasAttribute("aria-live"))toastHost.setAttribute("aria-live","polite");return toastHost};ensureToastHost();const showToast=(message,variant="success")=>{const host=ensureToastHost();if(!host)return;const toast=document.createElement("div");toast.className=`c-toast c-toast--${variant}`;toast.innerHTML=`<span class="c-dot c-dot--${variant === "danger" ? "danger" : "success"}"></span><span></span>`;toast.querySelector("span:last-child").textContent=message;host.append(toast);requestAnimationFrame(()=>{toast.animate([{opacity:0,transform:"translateY(0.75rem) scale(0.98)"},{opacity:1,transform:"none"},],{duration:240,easing:"cubic-bezier(0.16, 1, 0.3, 1)"},)});setTimeout(()=>{toast.animate([{opacity:1},{opacity:0}],{duration:200}).onfinish=()=>toast.remove()},3200)};$$("[data-toast]").forEach((btn)=>btn.addEventListener("click",()=>showToast(btn.dataset.toast,btn.dataset.toastVariant)),);const counters=$$("[data-count]");if(counters.length){const run=(el)=>{const target=Number(el.dataset.count);const decimals=Number(el.dataset.countDecimals||0);const suffix=el.dataset.countSuffix||"";if(reducedMotion.matches){el.textContent=target.toFixed(decimals)+suffix;return}const duration=1100;const start=performance.now();const tick=(now)=>{const t=Math.min(1,(now-start)/duration);const eased=1-Math.pow(1-t,4);el.textContent=(target*eased).toFixed(decimals)+suffix;if(t<1)requestAnimationFrame(tick)};requestAnimationFrame(tick)};if("IntersectionObserver"in window){const obs=new IntersectionObserver((entries)=>{entries.forEach((entry)=>{if(!entry.isIntersecting)return;run(entry.target);obs.unobserve(entry.target)})},{threshold:0.4},);counters.forEach((el)=>obs.observe(el))}else{counters.forEach(run)}}const playground=$("[data-playground]");if(playground){const scope=$("[data-playground-scope]",playground)||document.documentElement;const outputs=$$("[data-playground-out]",playground);const write=(key,value)=>{scope.style.setProperty(key,value);outputs.forEach((out)=>{if(out.dataset.playgroundOut===key)out.textContent=value})};$$("[data-playground-input]",playground).forEach((input)=>{const key=input.dataset.playgroundInput;const unit=input.dataset.playgroundUnit||"";const divisor=Number(input.dataset.playgroundDivisor||1);const handler=()=>{const raw=Number(input.value);write(key,divisor===1?`${raw}${unit}`:`${raw / divisor}`)};input.addEventListener("input",handler);handler()});const reset=$("[data-playground-reset]",playground);reset?.addEventListener("click",()=>{$$("[data-playground-input]",playground).forEach((input)=>{input.value=input.defaultValue;input.dispatchEvent(new Event("input",{bubbles:true}))})})}const navToggle=$("[data-nav-toggle]");const nav=$("#primary-nav");if(navToggle&&nav){navToggle.addEventListener("click",()=>{const open=navToggle.getAttribute("aria-expanded")==="true";navToggle.setAttribute("aria-expanded",String(!open));nav.classList.toggle("is-open",!open)})}$$("[data-dialog-open]").forEach((btn)=>{const dialog=document.getElementById(btn.dataset.dialogOpen);btn.addEventListener("click",()=>dialog?.showModal())});$$("[data-dialog-close]").forEach((btn)=>{const dialog=btn.closest("dialog");btn.addEventListener("click",()=>dialog?.close())});$$("[data-menu-toggle]").forEach((btn)=>{const menu=document.getElementById(btn.dataset.menuToggle);if(!menu)return;btn.setAttribute("popovertarget",menu.id);menu.addEventListener("toggle",(e)=>{btn.setAttribute("aria-expanded",String(e.newState==="open"))})});$$("[data-drawer-toggle]").forEach((btn)=>{const drawer=document.getElementById(btn.dataset.drawerToggle);if(!drawer)return;btn.setAttribute("popovertarget",drawer.id);drawer.addEventListener("toggle",(e)=>{btn.setAttribute("aria-expanded",String(e.newState==="open"))})});$$("[data-alert-close]").forEach((btn)=>{btn.addEventListener("click",()=>{const alertEl=btn.closest(".c-alert");if(!alertEl)return;const animation=alertEl.animate([{opacity:1},{opacity:0,transform:"translateX(-8px)"}],{duration:180,easing:"ease-in"},);animation.onfinish=()=>alertEl.remove()})});if("popover"in HTMLElement.prototype){$$("[data-tooltip]").forEach((trigger)=>{const tip=document.getElementById(trigger.dataset.tooltip);if(!tip)return;trigger.setAttribute("popovertarget",tip.id);trigger.setAttribute("aria-describedby",tip.id)})}else{$$("[data-tooltip]").forEach((trigger)=>{const tip=document.getElementById(trigger.dataset.tooltip);if(!tip)return;trigger.setAttribute("title",tip.textContent.trim())})}const palette=$("[data-command-palette]");if(palette){const field=$("[data-command-field]",palette);const list=$("[data-command-list]",palette);const empty=$("[data-command-empty]",palette);const supportsPopover=typeof palette.showPopover==="function";let index=[];let filtered=[];let active=0;const fuzzy=(query,text)=>{if(!query)return{score:0,hits:[]};const q=query.toLowerCase();const t=text.toLowerCase();const hits=[];let ti=0;let score=0;let streak=0;for(const ch of q){if(ch===" ")continue;const found=t.indexOf(ch,ti);if(found===-1)return null;hits.push(found);streak=found===ti?streak+1:0;score+=10+streak*6-Math.min(found-ti,8);ti=found+1}if(t.startsWith(q))score+=40;else if(t.includes(q))score+=25;score-=text.length*0.12;return{score,hits}};const buildIndex=()=>{const found=[];const push=(group,title,hint,icon,run)=>{if(!title)return;found.push({group,title,hint,icon,run})};$$("[data-command-nav] a[href]").forEach((a)=>{const clone=a.cloneNode(true);clone.querySelectorAll(".c-docs-nav__badge, .c-badge, .c-tag, .c-kbd").forEach((n)=>n.remove());push(a.dataset.commandGroup||"Navigate",clone.textContent.trim(),a.dataset.commandHint||"",a.dataset.commandIcon||"i-file",()=>{location.hash=a.getAttribute("href")},)});$$("main section[id]").forEach((section)=>{const heading=$(".c-section-head__title",section)||$("h2",section)||$("h3",section);push("Sections",heading?heading.textContent.replace(/[\u00b6#]/g,"").trim():"",section.id,"i-hash",()=>goTo(section),)});$$("main h2[id], main h3[id]").forEach((h)=>{push("Sections",h.textContent.replace(/[\u00b6#]/g,"").trim(),h.tagName==="H2"?"Section":"Subsection","i-hash",()=>goTo(h),)});$$("[data-command-action]").forEach((b)=>{push("Actions",b.dataset.commandAction,b.dataset.commandHint||"",b.dataset.commandIcon||"i-zap",()=>b.click(),)});commandRegistry.forEach((cmd)=>{push("Commands",cmd.label,cmd.shortcut||"","i-zap",()=>cmd.run(),)});return found};const escapeHtml=(text)=>text.replace(/[&<>"]/g,(c)=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;",})[c]);const highlight=(text,hits)=>{if(!hits?.length)return escapeHtml(text);const set=new Set(hits);let html="";for(let i=0;i<text.length;i++){html+=set.has(i)?'<mark class="c-command__mark">'+escapeHtml(text[i])+"</mark>":escapeHtml(text[i])}return html};const matchCommand=(query,cmd)=>{const title=fuzzy(query,cmd.title);if(title)return{score:title.score+24,hits:title.hits,hintHits:[]};const hint=fuzzy(query,cmd.hint);if(hint)return{score:hint.score+8,hits:[],hintHits:hint.hits};const group=fuzzy(query,cmd.group);if(group)return{score:group.score,hits:[],hintHits:[]};return null};const items=()=>$$(".c-command__item",list);function setActive(position){const all=items();if(!all.length){field.removeAttribute("aria-activedescendant");return}active=(position+all.length)%all.length;all.forEach((el,i)=>el.setAttribute("aria-selected",String(i===active)));const activeEl=all[active];if(activeEl&&!activeEl.id)activeEl.id="command-item-"+active;if(activeEl)field.setAttribute("aria-activedescendant",activeEl.id);all[active].scrollIntoView({block:"nearest"})}const render=()=>{const query=field.value.trim();filtered=index.map((cmd)=>{const match=matchCommand(query,cmd);return match?Object.assign({},cmd,match):null}).filter(Boolean).sort((a,b)=>b.score-a.score);if(!filtered.length){list.innerHTML="";if(empty)empty.hidden=false;return}if(empty)empty.hidden=true;const groups=new Map();filtered.forEach((cmd)=>{if(!groups.has(cmd.group))groups.set(cmd.group,[]);groups.get(cmd.group).push(cmd)});list.innerHTML=Array.from(groups,([group,cmds])=>{const rows=cmds.map((cmd)=>{const position=filtered.indexOf(cmd);const safeGroup=escapeHtml(group);const hint=cmd.hint?safeGroup+" \u00b7 "+highlight(cmd.hint,cmd.hintHits):safeGroup;return('<button class="c-command__item" role="option" aria-selected="false" tabindex="-1" id="command-item-'+position+'" data-index="'+position+'" type="button">'+'<span class="c-command__item-icon"><svg aria-hidden="true"><use href="#'+escapeHtml(cmd.icon)+'"/></svg></span>'+'<span class="c-command__item-body">'+'<span class="c-command__item-title">'+highlight(cmd.title,cmd.hits)+"</span>"+'<span class="c-command__item-hint">'+hint+"</span>"+"</span>"+"</button>")}).join("");return('<div class="c-command__group"><div class="c-command__group-title">'+escapeHtml(group)+"</div>"+rows+"</div>")}).join("");setActive(0)};const open=()=>{index=buildIndex();field.value="";render();field.setAttribute("aria-expanded","true");if(supportsPopover)palette.showPopover();else palette.classList.add("is-open");requestAnimationFrame(()=>field.focus())};const close=()=>{field.setAttribute("aria-expanded","false");field.removeAttribute("aria-activedescendant");if(supportsPopover)palette.hidePopover();else palette.classList.remove("is-open")};const isOpen=()=>supportsPopover?palette.matches(":popover-open"):palette.classList.contains("is-open");field?.addEventListener("input",render);field?.addEventListener("keydown",(event)=>{if(event.key==="ArrowDown"){event.preventDefault();setActive(active+1)}else if(event.key==="ArrowUp"){event.preventDefault();setActive(active-1)}else if(event.key==="Enter"){event.preventDefault();const all=items();if(all[active])all[active].click()}else if(event.key==="Escape"){if(field.value){event.preventDefault();field.value="";render()}else{close()}}});list?.addEventListener("click",(event)=>{const item=event.target.closest(".c-command__item");if(!item)return;const cmd=filtered[Number(item.dataset.index)];if(!cmd)return;close();cmd.run()});document.addEventListener("keydown",(event)=>{if(event.key.toLowerCase()==="k"&&(event.metaKey||event.ctrlKey)&&!isTyping(event.target)){event.preventDefault();if(isOpen())close();else open();return}if(event.key==="/"&&!event.metaKey&&!event.ctrlKey&&!event.altKey&&!isTyping(event.target)){event.preventDefault();if(!isOpen())open()}if(event.key==="?"&&!event.metaKey&&!event.ctrlKey&&!event.altKey&&!isTyping(event.target)){event.preventDefault();const overlay=document.querySelector("[data-shortcut-overlay]");if(overlay){if(overlay.hasAttribute("hidden")){overlay.removeAttribute("hidden")}else{overlay.setAttribute("hidden","")}}return}if(event.key==="Escape"){const overlay=document.querySelector("[data-shortcut-overlay]");if(overlay&&!overlay.hasAttribute("hidden")){overlay.setAttribute("hidden","")}}if(!isTyping(event.target)){const mod=event.metaKey||event.ctrlKey;for(const cmd of commandRegistry){if(!cmd.shortcut)continue;const parts=String(cmd.shortcut).toLowerCase().split("+").map((p)=>p.trim());const needsMod=parts.includes("mod")||parts.includes("ctrl")||parts.includes("meta");const key=parts.filter((p)=>!["mod","ctrl","meta","shift","alt"].includes(p))[0];if(needsMod!==mod)continue;if(parts.includes("shift")!==event.shiftKey)continue;if(parts.includes("alt")!==event.altKey)continue;if(key&&event.key.toLowerCase()===key){event.preventDefault();cmd.run();return}}}});$$("[data-command-open]").forEach((btn)=>btn.addEventListener("click",(event)=>{event.preventDefault();open()}),)}$$("table[data-sortable]").forEach((table)=>{const headers=$$("th[aria-sort]",table);const tbody=table.tBodies[0];if(!tbody)return;headers.forEach((th)=>{th.setAttribute("tabindex","0");th.setAttribute("role","columnheader");const apply=()=>{const type=th.dataset.sortType||"text";const dir=th.getAttribute("aria-sort")==="ascending"?-1:1;headers.forEach((h)=>{if(h!==th)h.setAttribute("aria-sort","none")});th.setAttribute("aria-sort",dir===1?"ascending":"descending");const rows=Array.from(tbody.rows);rows.sort((a,b)=>{const av=a.cells[th.cellIndex]?.dataset.value??a.cells[th.cellIndex]?.textContent.trim()??"";const bv=b.cells[th.cellIndex]?.dataset.value??b.cells[th.cellIndex]?.textContent.trim()??"";if(type==="number")return(parseFloat(av)||0)*dir-(parseFloat(bv)||0)*dir;return av.localeCompare(bv,undefined,{numeric:true})*dir});rows.forEach((row)=>tbody.append(row))};th.addEventListener("click",apply);th.addEventListener("keydown",(event)=>{if(event.key==="Enter"||event.key===" "){event.preventDefault();apply()}})})});$$("[data-density-toggle]").forEach((group)=>{const scope=document.querySelector(group.dataset.densityToggle)||document;const options=$$("button",group);options.forEach((option)=>{option.addEventListener("click",()=>{options.forEach((o)=>o.setAttribute("aria-pressed",String(o===option)));scope.setAttribute("data-density",option.dataset.value)})})});const tocLinks=$$("[data-toc] a");if(tocLinks.length){const headings=tocLinks.map((link)=>document.getElementById(link.getAttribute("href")?.slice(1))).filter(Boolean);const setCurrent=(id)=>{tocLinks.forEach((link)=>{link.setAttribute("aria-current",link.getAttribute("href")===`#${id}`?"true":"false")})};if("IntersectionObserver"in window){const spy=new IntersectionObserver((entries)=>{const visible=entries.filter((e)=>e.isIntersecting).sort((a,b)=>a.boundingClientRect.top-b.boundingClientRect.top);if(visible[0])setCurrent(visible[0].target.id)},{rootMargin:"-15% 0px -75% 0px"},);headings.forEach((h)=>spy.observe(h))}}document.addEventListener("click",(event)=>{const remove=event.target.closest("[data-remove]");if(!remove)return;const target=remove.closest("[data-removable]")||remove.parentElement;target?.remove()});function linearScale(domain,range){const[d0,d1]=domain;const[r0,r1]=range;const span=d1-d0||1;return(v)=>r0+((v-d0)/span)*(r1-r0)}function niceTicks(min,max,count){count=count||5;const span=max-min||1;const step=Math.pow(10,Math.floor(Math.log10(span/count)));const err=(count*step)/span;if(!isFinite(step)||step<=0)return[min,max];let niceStep=step;if(!isFinite(niceStep)||niceStep<=0)niceStep=step||1;if(err<=0.15)niceStep=10*step;else if(err<=0.35)niceStep=5*step;else if(err<=0.75)niceStep=2*step;const niceMin=Math.floor(min/niceStep)*niceStep;const niceMax=Math.ceil(max/niceStep)*niceStep;const ticks=[];for(let v=niceMin;v<=niceMax+niceStep/2;v+=niceStep){ticks.push(Math.round(v*1e9)/1e9)}return ticks}function datum(x,y,r){r=r||3;return{cx:x,cy:y,r:r}}const commandRegistry=[];function registerCommand(cmd){if(!cmd||!cmd.id||typeof cmd.id!=="string")return;if(cmd.label!=null&&typeof cmd.label!=="string")return;if(cmd.shortcut!=null&&typeof cmd.shortcut!=="string")return;if(cmd.run!=null&&typeof cmd.run!=="function")return;commandRegistry.push(Object.freeze({id:cmd.id,label:cmd.label||cmd.id,shortcut:cmd.shortcut||null,run:typeof cmd.run==="function"?cmd.run:function(){},}))}function listCommands(){return commandRegistry.slice()}$$("[data-cvd-toggle]").forEach((group)=>{const scope=document.getElementById("data")||document.documentElement;const targets=()=>$$(".u-cvd-target, .c-chart, .c-datamark",scope);$$("button",group).forEach((btn)=>{btn.addEventListener("click",()=>{const value=btn.dataset.cvdValue||"";targets().forEach((el)=>{if(value)el.setAttribute("data-cvd",value);else el.removeAttribute("data-cvd")});$$("button",group).forEach((b)=>b.setAttribute("aria-pressed",String(b===btn)))})})});$$("[data-theme-set]").forEach((group)=>{$$("button",group).forEach((btn)=>{btn.addEventListener("click",()=>{const value=btn.dataset.themeValue||"";if(value)document.documentElement.setAttribute("data-theme",value);else document.documentElement.removeAttribute("data-theme");$$("button",group).forEach((b)=>b.setAttribute("aria-pressed",String(b===btn)))})})});$$("[data-profile-toggle]").forEach((group)=>{const scope=document.getElementById(group.dataset.profileScope||"data")||document.documentElement;$$("button",group).forEach((btn)=>{btn.addEventListener("click",()=>{const value=btn.dataset.profileValue||"";if(value)scope.setAttribute("data-profile",value);else scope.removeAttribute("data-profile");$$("button",group).forEach((b)=>b.setAttribute("aria-pressed",String(b===btn)))})})});$$("[data-motion-toggle]").forEach((group)=>{const scope=(group.dataset.motionScope&&document.getElementById(group.dataset.motionScope))||document.documentElement;$$("button",group).forEach((btn)=>{btn.addEventListener("click",()=>{const value=btn.dataset.motionValue||"auto";if(value==="auto")scope.removeAttribute("data-motion");else scope.setAttribute("data-motion",value);$$("button",group).forEach((b)=>b.setAttribute("aria-pressed",String(b===btn)))})})});const marchingSquares=(grid,level)=>{const rows=grid.length;const cols=grid[0].length;const segments=[];const lerp=(a,b,va,vb)=>{if(vb===va)return 0.5;return(level-va)/(vb-va)};for(let y=0;y<rows-1;y++){for(let x=0;x<cols-1;x++){const tl=grid[y][x];const tr=grid[y][x+1];const bl=grid[y+1][x];const br=grid[y+1][x+1];const code=(tl>=level?8:0)|(tr>=level?4:0)|(br>=level?2:0)|(bl>=level?1:0);if(code===0||code===15)continue;const top={x:x+lerp(tl,tr,tl,tr),y:y};const right={x:x+1,y:y+lerp(tr,br,tr,br)};const bottom={x:x+lerp(bl,br,bl,br),y:y+1};const left={x:x,y:y+lerp(tl,bl,tl,bl)};let connect;if(code===5){const center=(tl+tr+bl+br)/4;connect=center>=level?"top-bottom":"left-right"}else if(code===10){const center=(tl+tr+bl+br)/4;connect=center>=level?"left-right":"top-bottom"}switch(code){case 1:case 14:segments.push([left,bottom]);break;case 2:case 13:segments.push([bottom,right]);break;case 3:case 12:segments.push([left,right]);break;case 4:case 11:segments.push([top,right]);break;case 6:case 9:segments.push([top,bottom]);break;case 7:case 8:segments.push([left,top]);break;case 5:if(connect==="top-bottom"){segments.push([top,bottom]);segments.push([left,right])}else{segments.push([top,right]);segments.push([left,bottom])}break;case 10:if(connect==="left-right"){segments.push([left,right]);segments.push([top,bottom])}else{segments.push([top,right]);segments.push([left,bottom])}break}}}return segments};const renderContourPlot=(el)=>{const svg=el.querySelector("svg");if(!svg)return;const valuesAttr=el.getAttribute("data-values");const levelsAttr=el.getAttribute("data-levels");if(!valuesAttr)return;let grid;try{grid=JSON.parse(valuesAttr)}catch(e){return}const levels=levelsAttr?JSON.parse(levelsAttr):[0.3,0.5,0.7];const rows=grid.length;const cols=grid[0].length;const w=el.clientWidth||300;const h=el.clientHeight||300;const sx=w/(cols-1);const sy=h/(rows-1);svg.querySelectorAll(".c-contour-plot__contour").forEach((n)=>n.remove());levels.forEach((level,li)=>{const segs=marchingSquares(grid,level);const path=document.createElementNS("http://www.w3.org/2000/svg","path");let d="";for(const[a,b]of segs){d+=`M ${a.x * sx} ${a.y * sy} L ${b.x * sx} ${b.y * sy} `}path.setAttribute("d",d.trim());path.setAttribute("class","c-contour-plot__contour"+(li>0?" c-contour-plot__contour--level-"+(li+1):""));svg.appendChild(path)})};$$("[data-contour-plot]").forEach((el)=>{renderContourPlot(el);if(typeof ResizeObserver!=="undefined"){new ResizeObserver(()=>renderContourPlot(el)).observe(el)}});$$("[data-chart-export]").forEach((chart)=>{const btn=document.createElement("button");btn.className="c-btn c-btn--sm c-btn--ghost";btn.textContent="Export";btn.setAttribute("aria-label","Export chart");btn.addEventListener("click",()=>{const svg=chart.querySelector("svg");if(!svg)return;const serializer=new XMLSerializer();const svgStr=serializer.serializeToString(svg);const blob=new Blob([svgStr],{type:"image/svg+xml"});const url=URL.createObjectURL(blob);const a=document.createElement("a");a.href=url;a.download="chart.svg";a.click();URL.revokeObjectURL(url)});chart.appendChild(btn)});$$(".c-combobox").forEach((combo)=>{const input=combo.querySelector(".c-combobox__input");const list=combo.querySelector(".c-combobox__list");if(!input||!list)return;const options=[...list.querySelectorAll(".c-combobox__option")];let activeIndex=-1;const filter=(query)=>{const q=query.toLowerCase();options.forEach((opt)=>{const text=opt.textContent.toLowerCase();opt.hidden=q&&!text.includes(q)});activeIndex=-1};const open=()=>list.removeAttribute("hidden");const close=()=>list.setAttribute("hidden","");input.addEventListener("input",()=>{filter(input.value);open()});input.addEventListener("focus",()=>{filter(input.value);open()});input.addEventListener("keydown",(e)=>{const visible=options.filter((o)=>!o.hidden);if(e.key==="ArrowDown"){e.preventDefault();activeIndex=Math.min(activeIndex+1,visible.length-1);visible.forEach((o,i)=>o.classList.toggle("c-combobox__option--active",i===activeIndex))}else if(e.key==="ArrowUp"){e.preventDefault();activeIndex=Math.max(activeIndex-1,0);visible.forEach((o,i)=>o.classList.toggle("c-combobox__option--active",i===activeIndex))}else if(e.key==="Enter"){e.preventDefault();if(activeIndex>=0&&visible[activeIndex]){input.value=visible[activeIndex].textContent;close()}}else if(e.key==="Escape"){close()}});list.addEventListener("click",(e)=>{const opt=e.target.closest(".c-combobox__option");if(opt){input.value=opt.textContent;close();input.focus()}});document.addEventListener("click",(e)=>{if(!combo.contains(e.target))close()})});$$(".c-tree__toggle").forEach((toggle)=>{toggle.addEventListener("click",(e)=>{e.stopPropagation();const expanded=toggle.getAttribute("aria-expanded")==="true";toggle.setAttribute("aria-expanded",String(!expanded));const row=toggle.closest(".c-tree__row");if(row)row.setAttribute("aria-expanded",String(!expanded));const children=toggle.closest(".c-tree__node")?.querySelector(":scope > .c-tree__children");if(children){if(expanded)children.setAttribute("hidden","");else children.removeAttribute("hidden")}})});$$(".c-resize-handle").forEach((handle)=>{handle.setAttribute("tabindex","0");handle.setAttribute("role","separator");if(!handle.hasAttribute("aria-valuenow"))handle.setAttribute("aria-valuenow","50");if(!handle.hasAttribute("aria-valuemin"))handle.setAttribute("aria-valuemin","0");if(!handle.hasAttribute("aria-valuemax"))handle.setAttribute("aria-valuemax","100");if(!handle.hasAttribute("aria-orientation"))handle.setAttribute("aria-orientation","vertical");handle.addEventListener("pointerdown",(e)=>{e.preventDefault();handle.setPointerCapture(e.pointerId);handle.classList.add("c-resize-handle--dragging");const resizable=handle.closest(".c-resizable");const isHorizontal=resizable?.classList.contains("c-resizable--horizontal");const prevPane=handle.previousElementSibling;const nextPane=handle.nextElementSibling;if(!prevPane||!nextPane)return;const startPos=isHorizontal?e.clientX:e.clientY;const prevSize=isHorizontal?prevPane.offsetWidth:prevPane.offsetHeight;const nextSize=isHorizontal?nextPane.offsetWidth:nextPane.offsetHeight;const onMove=(ev)=>{const delta=(isHorizontal?ev.clientX:ev.clientY)-startPos;const newPrev=Math.max(50,prevSize+delta);const newNext=Math.max(50,nextSize-delta);prevPane.style.flex="0 0 "+newPrev+"px";nextPane.style.flex="0 0 "+newNext+"px"};const onUp=()=>{handle.classList.remove("c-resize-handle--dragging");handle.releasePointerCapture(e.pointerId);document.removeEventListener("pointermove",onMove);document.removeEventListener("pointerup",onUp)};document.addEventListener("pointermove",onMove);document.addEventListener("pointerup",onUp)});handle.addEventListener("keydown",(e)=>{const resizable=handle.closest(".c-resizable");const isHorizontal=resizable?.classList.contains("c-resizable--horizontal");const prevPane=handle.previousElementSibling;const nextPane=handle.nextElementSibling;if(!prevPane||!nextPane)return;const step=10;let delta=0;if(isHorizontal){if(e.key==="ArrowLeft")delta=-step;else if(e.key==="ArrowRight")delta=step}else{if(e.key==="ArrowUp")delta=-step;else if(e.key==="ArrowDown")delta=step}if(delta!==0){e.preventDefault();const prevSize=isHorizontal?prevPane.offsetWidth:prevPane.offsetHeight;const nextSize=isHorizontal?nextPane.offsetWidth:nextPane.offsetHeight;const newPrev=Math.max(50,prevSize+delta);const newNext=Math.max(50,nextSize-delta);prevPane.style.flex="0 0 "+newPrev+"px";nextPane.style.flex="0 0 "+newNext+"px"}})});$$(".c-comparison").forEach((comp)=>{const divider=comp.querySelector(".c-comparison__divider");const before=comp.querySelector(".c-comparison__pane--before");if(!divider||!before)return;const setPct=(pct)=>{const clamped=Math.max(2,Math.min(98,pct));divider.style.insetInlineStart=clamped+"%";before.style.clipPath="inset(0 "+(100-clamped)+"% 0 0)";divider.setAttribute("aria-valuenow",String(Math.round(clamped)))};divider.setAttribute("tabindex","0");divider.setAttribute("role","separator");divider.setAttribute("aria-orientation","vertical");divider.setAttribute("aria-valuemin","0");divider.setAttribute("aria-valuemax","100");if(!divider.getAttribute("aria-label")){divider.setAttribute("aria-label","Comparison divider")}const seed=parseFloat(divider.style.insetInlineStart);setPct(Number.isFinite(seed)?seed:50);divider.addEventListener("pointerdown",(e)=>{e.preventDefault();divider.setPointerCapture(e.pointerId);const onMove=(ev)=>{const rect=comp.getBoundingClientRect();if(!rect.width)return;setPct(((ev.clientX-rect.left)/rect.width)*100)};const onUp=()=>{try{divider.releasePointerCapture(e.pointerId)}catch(_){}document.removeEventListener("pointermove",onMove);document.removeEventListener("pointerup",onUp)};document.addEventListener("pointermove",onMove);document.addEventListener("pointerup",onUp)});divider.addEventListener("keydown",(e)=>{const current=parseFloat(divider.style.insetInlineStart);const base=Number.isFinite(current)?current:50;let delta=0;if(e.key==="ArrowLeft")delta=-2;else if(e.key==="ArrowRight")delta=2;if(delta!==0){e.preventDefault();setPct(base+delta)}})});let draggedEl=null;$$(".c-draggable").forEach((el)=>{el.setAttribute("draggable","true");el.setAttribute("tabindex","0");el.addEventListener("dragstart",(e)=>{el.classList.add("c-draggable--dragging");draggedEl=el;e.dataTransfer?.setData("text/plain",el.textContent||"");if(e.dataTransfer)e.dataTransfer.effectAllowed="move"});el.addEventListener("dragend",()=>{el.classList.remove("c-draggable--dragging");draggedEl=null});let touchTimer=null;el.addEventListener("touchstart",()=>{touchTimer=setTimeout(()=>{el.classList.add("c-draggable--dragging");el.style.opacity="0.5"},300)},{passive:true});el.addEventListener("touchend",()=>{if(touchTimer)clearTimeout(touchTimer);el.classList.remove("c-draggable--dragging");el.style.opacity=""});el.addEventListener("touchmove",()=>{if(touchTimer)clearTimeout(touchTimer)},{passive:true});el.addEventListener("keydown",(e)=>{const parent=el.parentElement;if(!parent)return;const siblings=[...parent.querySelectorAll(".c-draggable")];const idx=siblings.indexOf(el);if(e.key==="ArrowUp"&&idx>0){e.preventDefault();el.classList.add("c-draggable--reordering");parent.insertBefore(el,siblings[idx-1]);el.focus();setTimeout(()=>el.classList.remove("c-draggable--reordering"),200)}else if(e.key==="ArrowDown"&&idx<siblings.length-1){e.preventDefault();el.classList.add("c-draggable--reordering");parent.insertBefore(siblings[idx+1],el);el.focus();setTimeout(()=>el.classList.remove("c-draggable--reordering"),200)}})});$$(".c-drop-zone").forEach((zone)=>{zone.addEventListener("dragover",(e)=>{e.preventDefault();zone.classList.add("c-drop-zone--active");const indicator=zone.querySelector(".c-drop-indicator");if(indicator)indicator.classList.add("c-drop-indicator--visible")});zone.addEventListener("dragleave",()=>{zone.classList.remove("c-drop-zone--active");const indicator=zone.querySelector(".c-drop-indicator");if(indicator)indicator.classList.remove("c-drop-indicator--visible")});zone.addEventListener("drop",(e)=>{e.preventDefault();zone.classList.remove("c-drop-zone--active");const indicator=zone.querySelector(".c-drop-indicator");if(indicator)indicator.classList.remove("c-drop-indicator--visible");if(draggedEl){zone.appendChild(draggedEl);draggedEl.classList.remove("c-draggable--dragging");draggedEl=null;return}const data=e.dataTransfer?.getData("text/plain");if(data){const item=document.createElement("span");item.className="c-draggable c-card";item.style.padding="var(--space-sm)";item.style.overflow="hidden";item.style.textOverflow="ellipsis";item.style.whiteSpace="nowrap";item.style.maxInlineSize="100%";item.textContent=data;item.setAttribute("tabindex","0");zone.appendChild(item)}})});$$(".c-layer-panel").forEach((panel)=>{if(!panel.hasAttribute("role"))panel.setAttribute("role","list");const items=()=>[...panel.querySelectorAll(".c-layer-panel__item")];const reorder=(el,dir)=>{const s=items(),i=s.indexOf(el);if(dir<0&&i>0){el.classList.add("c-layer-panel__item--dragging");panel.insertBefore(el,s[i-1]);el.focus();setTimeout(()=>el.classList.remove("c-layer-panel__item--dragging"),200)}else if(dir>0&&i<s.length-1){el.classList.add("c-layer-panel__item--dragging");panel.insertBefore(s[i+1],el);el.focus();setTimeout(()=>el.classList.remove("c-layer-panel__item--dragging"),200)}};items().forEach((item)=>{item.setAttribute("draggable","true");item.setAttribute("tabindex","0");item.setAttribute("role","listitem");item.addEventListener("dragstart",(e)=>{const t=e.target;if(t&&t!==item&&/^(INPUT|BUTTON|SELECT)$/.test(t.tagName)&&!(t.classList&&t.classList.contains("c-drag-handle"))){e.preventDefault();return}item.classList.add("c-layer-panel__item--dragging");e.dataTransfer?.setData("text/plain",item.querySelector(".c-layer-panel__name")?.textContent||"");if(e.dataTransfer)e.dataTransfer.effectAllowed="move"});item.addEventListener("dragend",()=>item.classList.remove("c-layer-panel__item--dragging"));item.addEventListener("dragover",(e)=>{e.preventDefault();const dragged=panel.querySelector(".c-layer-panel__item--dragging");if(!dragged||dragged===item)return;const r=item.getBoundingClientRect(),mid=r.top+r.height/2;if(e.clientY<mid)panel.insertBefore(dragged,item);else panel.insertBefore(dragged,item.nextSibling)});item.addEventListener("keydown",(e)=>{if(e.key==="ArrowUp"){e.preventDefault();reorder(item,-1)}else if(e.key==="ArrowDown"){e.preventDefault();reorder(item,1)}})})});window.Contour=Object.freeze({__loaded:true,version:"1.0",toast:showToast,setScheme:applyScheme,scrollTo:(id)=>{const el=typeof id==="string"?document.getElementById(id):id;if(el)goTo(el)},copy:async(text)=>copyText(text),format:{number:(value,format,locale)=>{const n=Number(value);if(!Number.isFinite(n))return String(value);if(format==="percent")return(n*100).toFixed(0)+"%";try{return new Intl.NumberFormat(locale||undefined).format(n)}catch(e){return String(n)}},time:(value,locale)=>{try{return new Intl.DateTimeFormat(locale||undefined).format(new Date(value))}catch(e){return String(value)}},locale:(locale)=>locale||(typeof navigator!=="undefined"?navigator.language:"en"),},chart:{scale:linearScale,ticks:niceTicks,datum:datum},commands:{register:registerCommand,list:listCommands},})})();
1
+ (()=>{"use strict";if(window.Contour&&window.Contour.__loaded)return;const $=(sel,root=document)=>root.querySelector(sel);const $$=(sel,root=document)=>Array.from((root||document).querySelectorAll(sel));const isTyping=(el)=>!!el&&(el.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(el.tagName));const reducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)");const goTo=(el)=>{if(!el)return;if(el.id&&location.hash!=="#"+el.id){history.replaceState(null,"","#"+el.id)}el.scrollIntoView({behavior:reducedMotion.matches?"auto":"smooth",block:"start",})};const schemeMeta=()=>$('meta[name="color-scheme"]');const storedScheme=()=>{try{return localStorage.getItem("contour-scheme")??"light dark"}catch{return"light dark"}};const applyScheme=(value)=>{document.documentElement.classList.add("is-theme-switching");const meta=schemeMeta();if(meta)meta.setAttribute("content",value);requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.documentElement.classList.remove("is-theme-switching")})});try{if(value==="light dark")localStorage.removeItem("contour-scheme");else localStorage.setItem("contour-scheme",value)}catch{}syncSchemeControls(value)};const resolvedScheme=()=>window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";function syncSchemeControls(value){const resolved=resolvedScheme();const rendered=value==="light dark"?resolved:value;const target=rendered==="dark"?"light":"dark";$$("[data-scheme-toggle]").forEach((btn)=>{btn.dataset.schemeNext=target;btn.setAttribute("aria-label",target==="dark"?"Switch to dark theme":"Switch to light theme",);btn.setAttribute("title",value==="light dark"?`Following the system (${resolved}). Activate to switch to ${target}.`:`Manual: ${value}. Activate to switch to ${target}.`,)});$$("[data-scheme-option]").forEach((el)=>{const active=el.dataset.schemeOption===value;if(el.type==="radio"){el.checked=active}else{el.setAttribute("aria-checked",String(active));el.tabIndex=active?0:-1}})}$$("[data-scheme-toggle]").forEach((btn)=>{btn.addEventListener("click",()=>{const current=storedScheme();const rendered=current==="light dark"?resolvedScheme():current;const target=rendered==="dark"?"light":"dark";const system=resolvedScheme();applyScheme(target===system?"light dark":target)})});$$("[data-scheme-option]").forEach((el)=>{if(el.type==="radio"){el.addEventListener("change",()=>applyScheme(el.dataset.schemeOption));return}el.addEventListener("click",()=>applyScheme(el.dataset.schemeOption));el.addEventListener("keydown",(event)=>{const options=$$("[data-scheme-option]").filter((o)=>o.type!=="radio");const index=options.indexOf(el);if(event.key==="ArrowRight"||event.key==="ArrowDown"){event.preventDefault();options[(index+1)%options.length].focus();options[(index+1)%options.length].click()}if(event.key==="ArrowLeft"||event.key==="ArrowUp"){event.preventDefault();const prev=options[(index-1+options.length)%options.length];prev.focus();prev.click()}})});window.addEventListener("storage",(event)=>{if(event.key==="contour-scheme")syncSchemeControls(storedScheme())});window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{syncSchemeControls(storedScheme())});syncSchemeControls(storedScheme());$$("[data-tabs]").forEach((group)=>{const list=$("[role='tablist']",group);const tabs=$$("[role='tab']",list);if(!tabs.length)return;const activate=(tab,focus=true)=>{tabs.forEach((t)=>{const selected=t===tab;t.setAttribute("aria-selected",String(selected));t.tabIndex=selected?0:-1;const panel=document.getElementById(t.getAttribute("aria-controls"));if(panel)panel.hidden=!selected});if(focus)tab.focus()};tabs.forEach((tab,index)=>{tab.addEventListener("click",()=>activate(tab,false));tab.addEventListener("keydown",(event)=>{const map={ArrowRight:index+1,ArrowLeft:index-1,Home:0,End:tabs.length-1,};if(!(event.key in map))return;event.preventDefault();const next=tabs[(map[event.key]+tabs.length)%tabs.length];activate(next)})});if(tabs[0])activate(tabs[0],false)});$$("[data-segmented]").forEach((group)=>{const options=$$("button",group);options.forEach((option)=>{option.addEventListener("click",()=>{options.forEach((o)=>o.setAttribute("aria-pressed",String(o===option)));group.dispatchEvent(new CustomEvent("contour:change",{detail:{value:option.dataset.value}}),)})})});const paintRange=(input)=>{const min=Number(input.min||0);const max=Number(input.max||100);const value=Number(input.value);const pct=max===min?0:((value-min)/(max-min))*100;input.style.setProperty("--fill",`${pct}%`);const output=document.getElementById(input.getAttribute("aria-describedby")||"");if(output)output.textContent=input.dataset.format?formatValue(input,value):value};const formatValue=(input,value)=>{const format=input.dataset.format||"";if(format==="deg")return`${value}°`;if(format==="ms")return`${value} ms`;if(format==="km")return`${value.toFixed(1)} km`;if(format==="pct")return`${value}%`;return String(value)};$$('input[type="range"].c-range').forEach((input)=>{paintRange(input);input.addEventListener("input",()=>{paintRange(input);input.dispatchEvent(new CustomEvent("contour:input",{bubbles:true,detail:{value:Number(input.value)}}))})});$$('.c-time-slider__play').forEach((btn)=>{btn.addEventListener('click',()=>{const playing=btn.getAttribute('data-state')==='play';btn.setAttribute('data-state',playing?'pause':'play');btn.setAttribute('aria-label',playing?'Pause':'Play');const use=btn.querySelector('use');if(use)use.setAttribute('href',playing?'#i-pause':'#i-play')})});const railLinks=$$("[data-spy] a");if(railLinks.length){const sections=railLinks.map((link)=>document.getElementById(link.getAttribute("href")?.slice(1))).filter(Boolean);const setActive=(id)=>{railLinks.forEach((link)=>{const active=link.getAttribute("href")===`#${id}`;link.setAttribute("aria-current",active?"true":"false")})};if(sections[0])setActive(sections[0].id);if("IntersectionObserver"in window){const spy=new IntersectionObserver((entries)=>{const visible=entries.filter((e)=>e.isIntersecting).sort((a,b)=>a.boundingClientRect.top-b.boundingClientRect.top);if(visible[0])setActive(visible[0].target.id)},{rootMargin:"-20% 0px -70% 0px"},);sections.forEach((section)=>spy.observe(section))}}const copyText=async(text)=>{try{await navigator.clipboard.writeText(text);return true}catch{try{const ta=document.createElement("textarea");ta.value=text;ta.setAttribute("readonly","");ta.style.position="fixed";ta.style.top="-9999px";ta.style.opacity="0";document.body.append(ta);ta.select();const ok=document.execCommand("copy");ta.remove();return ok}catch{return false}}};document.addEventListener("click",async(event)=>{const trigger=event.target.closest("[data-copy]");if(!trigger)return;if(trigger.closest("summary"))event.preventDefault();const selector=trigger.dataset.copy;const source=selector?$(selector):trigger.previousElementSibling;const text=source?.textContent?.trim()??"";if(!text)return;const ok=await copyText(text);const icon=trigger.querySelector("use");const originalHref=icon?.getAttribute("href");const originalLabel=trigger.getAttribute("aria-label")||trigger.title;if(ok&&icon)icon.setAttribute("href","#i-check");trigger.setAttribute("aria-label",ok?"Copied":"Copy failed");trigger.dataset.copied=String(ok);const timer=setTimeout(()=>{if(!trigger.isConnected)return;if(icon&&originalHref)icon.setAttribute("href",originalHref);trigger.setAttribute("aria-label",originalLabel);delete trigger.dataset.copied},1600)});let toastHost=$("#toast-host");const ensureToastHost=()=>{if(!toastHost||!document.contains(toastHost)){toastHost=document.createElement("div");toastHost.id="toast-host";toastHost.className="c-toast-host";document.body.append(toastHost)}if(!toastHost.getAttribute("role"))toastHost.setAttribute("role","status");if(!toastHost.hasAttribute("aria-live"))toastHost.setAttribute("aria-live","polite");return toastHost};ensureToastHost();const showToast=(message,variant="success")=>{const host=ensureToastHost();if(!host)return;const toast=document.createElement("div");toast.className=`c-toast c-toast--${variant}`;toast.innerHTML=`<span class="c-dot c-dot--${variant === "danger" ? "danger" : "success"}"></span><span></span>`;toast.querySelector("span:last-child").textContent=message;host.append(toast);requestAnimationFrame(()=>{toast.animate([{opacity:0,transform:"translateY(0.75rem) scale(0.98)"},{opacity:1,transform:"none"},],{duration:240,easing:"cubic-bezier(0.16, 1, 0.3, 1)"},)});setTimeout(()=>{toast.animate([{opacity:1},{opacity:0}],{duration:200}).onfinish=()=>toast.remove()},3200)};$$("[data-toast]").forEach((btn)=>btn.addEventListener("click",()=>showToast(btn.dataset.toast,btn.dataset.toastVariant)),);const counters=$$("[data-count]");if(counters.length){const run=(el)=>{const target=Number(el.dataset.count);const decimals=Number(el.dataset.countDecimals||0);const suffix=el.dataset.countSuffix||"";if(reducedMotion.matches){el.textContent=target.toFixed(decimals)+suffix;return}const duration=1100;const start=performance.now();const tick=(now)=>{const t=Math.min(1,(now-start)/duration);const eased=1-Math.pow(1-t,4);el.textContent=(target*eased).toFixed(decimals)+suffix;if(t<1)requestAnimationFrame(tick)};requestAnimationFrame(tick)};if("IntersectionObserver"in window){const obs=new IntersectionObserver((entries)=>{entries.forEach((entry)=>{if(!entry.isIntersecting)return;run(entry.target);obs.unobserve(entry.target)})},{threshold:0.4},);counters.forEach((el)=>obs.observe(el))}else{counters.forEach(run)}}const playground=$("[data-playground]");if(playground){const scope=$("[data-playground-scope]",playground)||document.documentElement;const outputs=$$("[data-playground-out]",playground);const write=(key,value)=>{scope.style.setProperty(key,value);outputs.forEach((out)=>{if(out.dataset.playgroundOut===key)out.textContent=value})};$$("[data-playground-input]",playground).forEach((input)=>{const key=input.dataset.playgroundInput;const unit=input.dataset.playgroundUnit||"";const divisor=Number(input.dataset.playgroundDivisor||1);const handler=()=>{const raw=Number(input.value);write(key,divisor===1?`${raw}${unit}`:`${raw / divisor}`)};input.addEventListener("input",handler);handler()});const reset=$("[data-playground-reset]",playground);reset?.addEventListener("click",()=>{$$("[data-playground-input]",playground).forEach((input)=>{input.value=input.defaultValue;input.dispatchEvent(new Event("input",{bubbles:true}))})})}const navToggle=$("[data-nav-toggle]");const nav=$("#primary-nav");if(navToggle&&nav){navToggle.addEventListener("click",()=>{const open=navToggle.getAttribute("aria-expanded")==="true";navToggle.setAttribute("aria-expanded",String(!open));nav.classList.toggle("is-open",!open)})}$$("[data-dialog-open]").forEach((btn)=>{const dialog=document.getElementById(btn.dataset.dialogOpen);btn.addEventListener("click",()=>dialog?.showModal())});$$("[data-dialog-close]").forEach((btn)=>{const dialog=btn.closest("dialog");btn.addEventListener("click",()=>dialog?.close())});$$("[data-menu-toggle]").forEach((btn)=>{const menu=document.getElementById(btn.dataset.menuToggle);if(!menu)return;btn.setAttribute("popovertarget",menu.id);menu.addEventListener("toggle",(e)=>{btn.setAttribute("aria-expanded",String(e.newState==="open"))})});$$("[data-drawer-toggle]").forEach((btn)=>{const drawer=document.getElementById(btn.dataset.drawerToggle);if(!drawer)return;btn.setAttribute("popovertarget",drawer.id);drawer.addEventListener("toggle",(e)=>{btn.setAttribute("aria-expanded",String(e.newState==="open"))})});$$("[data-alert-close]").forEach((btn)=>{btn.addEventListener("click",()=>{const alertEl=btn.closest(".c-alert");if(!alertEl)return;const animation=alertEl.animate([{opacity:1},{opacity:0,transform:"translateX(-8px)"}],{duration:180,easing:"ease-in"},);animation.onfinish=()=>alertEl.remove()})});if("popover"in HTMLElement.prototype){$$("[data-tooltip]").forEach((trigger)=>{const tip=document.getElementById(trigger.dataset.tooltip);if(!tip)return;trigger.setAttribute("popovertarget",tip.id);trigger.setAttribute("aria-describedby",tip.id)})}else{$$("[data-tooltip]").forEach((trigger)=>{const tip=document.getElementById(trigger.dataset.tooltip);if(!tip)return;trigger.setAttribute("title",tip.textContent.trim())})}const palette=$("[data-command-palette]");if(palette){const field=$("[data-command-field]",palette);const list=$("[data-command-list]",palette);const empty=$("[data-command-empty]",palette);const supportsPopover=typeof palette.showPopover==="function";let index=[];let filtered=[];let active=0;const fuzzy=(query,text)=>{if(!query)return{score:0,hits:[]};const q=query.toLowerCase();const t=text.toLowerCase();const hits=[];let ti=0;let score=0;let streak=0;for(const ch of q){if(ch===" ")continue;const found=t.indexOf(ch,ti);if(found===-1)return null;hits.push(found);streak=found===ti?streak+1:0;score+=10+streak*6-Math.min(found-ti,8);ti=found+1}if(t.startsWith(q))score+=40;else if(t.includes(q))score+=25;score-=text.length*0.12;return{score,hits}};const buildIndex=()=>{const found=[];const push=(group,title,hint,icon,run)=>{if(!title)return;found.push({group,title,hint,icon,run})};$$("[data-command-nav] a[href]").forEach((a)=>{const clone=a.cloneNode(true);clone.querySelectorAll(".c-docs-nav__badge, .c-badge, .c-tag, .c-kbd").forEach((n)=>n.remove());push(a.dataset.commandGroup||"Navigate",clone.textContent.trim(),a.dataset.commandHint||"",a.dataset.commandIcon||"i-file",()=>{location.hash=a.getAttribute("href")},)});$$("main section[id]").forEach((section)=>{const heading=$(".c-section-head__title",section)||$("h2",section)||$("h3",section);push("Sections",heading?heading.textContent.replace(/[\u00b6#]/g,"").trim():"",section.id,"i-hash",()=>goTo(section),)});$$("main h2[id], main h3[id]").forEach((h)=>{push("Sections",h.textContent.replace(/[\u00b6#]/g,"").trim(),h.tagName==="H2"?"Section":"Subsection","i-hash",()=>goTo(h),)});$$("[data-command-action]").forEach((b)=>{push("Actions",b.dataset.commandAction,b.dataset.commandHint||"",b.dataset.commandIcon||"i-zap",()=>b.click(),)});commandRegistry.forEach((cmd)=>{push("Commands",cmd.label,cmd.shortcut||"","i-zap",()=>cmd.run(),)});return found};const escapeHtml=(text)=>text.replace(/[&<>"]/g,(c)=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;",})[c]);const highlight=(text,hits)=>{if(!hits?.length)return escapeHtml(text);const set=new Set(hits);let html="";for(let i=0;i<text.length;i++){html+=set.has(i)?'<mark class="c-command__mark">'+escapeHtml(text[i])+"</mark>":escapeHtml(text[i])}return html};const matchCommand=(query,cmd)=>{const title=fuzzy(query,cmd.title);if(title)return{score:title.score+24,hits:title.hits,hintHits:[]};const hint=fuzzy(query,cmd.hint);if(hint)return{score:hint.score+8,hits:[],hintHits:hint.hits};const group=fuzzy(query,cmd.group);if(group)return{score:group.score,hits:[],hintHits:[]};return null};const items=()=>$$(".c-command__item",list);function setActive(position){const all=items();if(!all.length){field.removeAttribute("aria-activedescendant");return}active=(position+all.length)%all.length;all.forEach((el,i)=>el.setAttribute("aria-selected",String(i===active)));const activeEl=all[active];if(activeEl&&!activeEl.id)activeEl.id="command-item-"+active;if(activeEl)field.setAttribute("aria-activedescendant",activeEl.id);all[active].scrollIntoView({block:"nearest"})}const render=()=>{const query=field.value.trim();filtered=index.map((cmd)=>{const match=matchCommand(query,cmd);return match?Object.assign({},cmd,match):null}).filter(Boolean).sort((a,b)=>b.score-a.score);if(!filtered.length){list.innerHTML="";if(empty)empty.hidden=false;return}if(empty)empty.hidden=true;const groups=new Map();filtered.forEach((cmd)=>{if(!groups.has(cmd.group))groups.set(cmd.group,[]);groups.get(cmd.group).push(cmd)});list.innerHTML=Array.from(groups,([group,cmds])=>{const rows=cmds.map((cmd)=>{const position=filtered.indexOf(cmd);const safeGroup=escapeHtml(group);const hint=cmd.hint?safeGroup+" \u00b7 "+highlight(cmd.hint,cmd.hintHits):safeGroup;return('<button class="c-command__item" role="option" aria-selected="false" tabindex="-1" id="command-item-'+position+'" data-index="'+position+'" type="button">'+'<span class="c-command__item-icon"><svg aria-hidden="true"><use href="#'+escapeHtml(cmd.icon)+'"/></svg></span>'+'<span class="c-command__item-body">'+'<span class="c-command__item-title">'+highlight(cmd.title,cmd.hits)+"</span>"+'<span class="c-command__item-hint">'+hint+"</span>"+"</span>"+"</button>")}).join("");return('<div class="c-command__group"><div class="c-command__group-title">'+escapeHtml(group)+"</div>"+rows+"</div>")}).join("");setActive(0)};let lastFocus=null;const open=()=>{lastFocus=document.activeElement;index=buildIndex();field.value="";render();field.setAttribute("aria-expanded","true");if(supportsPopover)palette.showPopover();else palette.classList.add("is-open");requestAnimationFrame(()=>field.focus())};const close=()=>{field.setAttribute("aria-expanded","false");field.removeAttribute("aria-activedescendant");if(supportsPopover)palette.hidePopover();else palette.classList.remove("is-open");if(lastFocus&&typeof lastFocus.focus==="function"&&document.contains(lastFocus)){try{lastFocus.focus()}catch(e){}}lastFocus=null};const isOpen=()=>supportsPopover?palette.matches(":popover-open"):palette.classList.contains("is-open");field?.addEventListener("input",render);field?.addEventListener("keydown",(event)=>{if(event.key==="ArrowDown"){event.preventDefault();setActive(active+1)}else if(event.key==="ArrowUp"){event.preventDefault();setActive(active-1)}else if(event.key==="Enter"){event.preventDefault();const all=items();if(all[active])all[active].click()}else if(event.key==="Escape"){if(field.value){event.preventDefault();field.value="";render()}else{close()}}});list?.addEventListener("click",(event)=>{const item=event.target.closest(".c-command__item");if(!item)return;const cmd=filtered[Number(item.dataset.index)];if(!cmd)return;close();cmd.run()});document.addEventListener("keydown",(event)=>{if(event.key.toLowerCase()==="k"&&(event.metaKey||event.ctrlKey)&&!isTyping(event.target)){event.preventDefault();if(isOpen())close();else open();return}if(event.key==="/"&&!event.metaKey&&!event.ctrlKey&&!event.altKey&&!isTyping(event.target)){event.preventDefault();if(!isOpen())open()}if(event.key==="?"&&!event.metaKey&&!event.ctrlKey&&!event.altKey&&!isTyping(event.target)){event.preventDefault();const overlay=document.querySelector("[data-shortcut-overlay]");if(overlay){if(overlay.hasAttribute("hidden")){overlay.removeAttribute("hidden")}else{overlay.setAttribute("hidden","")}}return}if(event.key==="Escape"){const overlay=document.querySelector("[data-shortcut-overlay]");if(overlay&&!overlay.hasAttribute("hidden")){overlay.setAttribute("hidden","")}}if(!isTyping(event.target)){const mod=event.metaKey||event.ctrlKey;for(const cmd of commandRegistry){if(!cmd.shortcut)continue;const parts=String(cmd.shortcut).toLowerCase().split("+").map((p)=>p.trim());const needsMod=parts.includes("mod")||parts.includes("ctrl")||parts.includes("meta");const key=parts.filter((p)=>!["mod","ctrl","meta","shift","alt"].includes(p))[0];if(needsMod!==mod)continue;if(parts.includes("shift")!==event.shiftKey)continue;if(parts.includes("alt")!==event.altKey)continue;if(key&&event.key.toLowerCase()===key){event.preventDefault();cmd.run();return}}}});$$("[data-command-open]").forEach((btn)=>btn.addEventListener("click",(event)=>{event.preventDefault();open()}),)}$$("table[data-sortable]").forEach((table)=>{const headers=$$("th[aria-sort]",table);const tbody=table.tBodies[0];if(!tbody)return;headers.forEach((th)=>{th.setAttribute("tabindex","0");th.setAttribute("role","columnheader");const apply=()=>{const type=th.dataset.sortType||"text";const dir=th.getAttribute("aria-sort")==="ascending"?-1:1;headers.forEach((h)=>{if(h!==th)h.setAttribute("aria-sort","none")});th.setAttribute("aria-sort",dir===1?"ascending":"descending");const rows=Array.from(tbody.rows);rows.sort((a,b)=>{const av=a.cells[th.cellIndex]?.dataset.value??a.cells[th.cellIndex]?.textContent.trim()??"";const bv=b.cells[th.cellIndex]?.dataset.value??b.cells[th.cellIndex]?.textContent.trim()??"";if(type==="number")return(parseFloat(av)||0)*dir-(parseFloat(bv)||0)*dir;return av.localeCompare(bv,undefined,{numeric:true})*dir});rows.forEach((row)=>tbody.append(row))};th.addEventListener("click",apply);th.addEventListener("keydown",(event)=>{if(event.key==="Enter"||event.key===" "){event.preventDefault();apply()}})})});$$("[data-density-toggle]").forEach((group)=>{const scope=document.querySelector(group.dataset.densityToggle)||document;const options=$$("button",group);options.forEach((option)=>{option.addEventListener("click",()=>{options.forEach((o)=>o.setAttribute("aria-pressed",String(o===option)));scope.setAttribute("data-density",option.dataset.value)})})});const tocLinks=$$("[data-toc] a");if(tocLinks.length){const headings=tocLinks.map((link)=>document.getElementById(link.getAttribute("href")?.slice(1))).filter(Boolean);const setCurrent=(id)=>{tocLinks.forEach((link)=>{link.setAttribute("aria-current",link.getAttribute("href")===`#${id}`?"true":"false")})};if("IntersectionObserver"in window){const spy=new IntersectionObserver((entries)=>{const visible=entries.filter((e)=>e.isIntersecting).sort((a,b)=>a.boundingClientRect.top-b.boundingClientRect.top);if(visible[0])setCurrent(visible[0].target.id)},{rootMargin:"-15% 0px -75% 0px"},);headings.forEach((h)=>spy.observe(h))}}document.addEventListener("click",(event)=>{const remove=event.target.closest("[data-remove]");if(!remove)return;const target=remove.closest("[data-removable]")||remove.parentElement;target?.remove()});function linearScale(domain,range){const[d0,d1]=domain;const[r0,r1]=range;const span=d1-d0||1;return(v)=>r0+((v-d0)/span)*(r1-r0)}function niceTicks(min,max,count){count=count||5;const span=max-min||1;const step=Math.pow(10,Math.floor(Math.log10(span/count)));const err=(count*step)/span;if(!isFinite(step)||step<=0)return[min,max];let niceStep=step;if(!isFinite(niceStep)||niceStep<=0)niceStep=step||1;if(err<=0.15)niceStep=10*step;else if(err<=0.35)niceStep=5*step;else if(err<=0.75)niceStep=2*step;const niceMin=Math.floor(min/niceStep)*niceStep;const niceMax=Math.ceil(max/niceStep)*niceStep;const ticks=[];for(let v=niceMin;v<=niceMax+niceStep/2;v+=niceStep){ticks.push(Math.round(v*1e9)/1e9)}return ticks}function datum(x,y,r){r=r||3;return{cx:x,cy:y,r:r}}const commandRegistry=[];function registerCommand(cmd){if(!cmd||!cmd.id||typeof cmd.id!=="string")return;if(cmd.label!=null&&typeof cmd.label!=="string")return;if(cmd.shortcut!=null&&typeof cmd.shortcut!=="string")return;if(cmd.run!=null&&typeof cmd.run!=="function")return;commandRegistry.push(Object.freeze({id:cmd.id,label:cmd.label||cmd.id,shortcut:cmd.shortcut||null,run:typeof cmd.run==="function"?cmd.run:function(){},}))}function listCommands(){return commandRegistry.slice()}$$("[data-cvd-toggle]").forEach((group)=>{const scope=document.getElementById("data")||document.documentElement;const targets=()=>$$(".u-cvd-target, .c-chart, .c-datamark",scope);$$("button",group).forEach((btn)=>{btn.addEventListener("click",()=>{const value=btn.dataset.cvdValue||"";targets().forEach((el)=>{if(value)el.setAttribute("data-cvd",value);else el.removeAttribute("data-cvd")});$$("button",group).forEach((b)=>b.setAttribute("aria-pressed",String(b===btn)))})})});$$("[data-theme-set]").forEach((group)=>{$$("button",group).forEach((btn)=>{btn.addEventListener("click",()=>{const value=btn.dataset.themeValue||"";if(value)document.documentElement.setAttribute("data-theme",value);else document.documentElement.removeAttribute("data-theme");$$("button",group).forEach((b)=>b.setAttribute("aria-pressed",String(b===btn)))})})});$$("[data-profile-toggle]").forEach((group)=>{const scope=document.getElementById(group.dataset.profileScope||"data")||document.documentElement;$$("button",group).forEach((btn)=>{btn.addEventListener("click",()=>{const value=btn.dataset.profileValue||"";if(value)scope.setAttribute("data-profile",value);else scope.removeAttribute("data-profile");$$("button",group).forEach((b)=>b.setAttribute("aria-pressed",String(b===btn)))})})});$$("[data-motion-toggle]").forEach((group)=>{const scope=(group.dataset.motionScope&&document.getElementById(group.dataset.motionScope))||document.documentElement;$$("button",group).forEach((btn)=>{btn.addEventListener("click",()=>{const value=btn.dataset.motionValue||"auto";if(value==="auto")scope.removeAttribute("data-motion");else scope.setAttribute("data-motion",value);$$("button",group).forEach((b)=>b.setAttribute("aria-pressed",String(b===btn)))})})});const marchingSquares=(grid,level)=>{const rows=grid.length;const cols=grid[0].length;const segments=[];const lerp=(a,b,va,vb)=>{if(vb===va)return 0.5;return(level-va)/(vb-va)};for(let y=0;y<rows-1;y++){for(let x=0;x<cols-1;x++){const tl=grid[y][x];const tr=grid[y][x+1];const bl=grid[y+1][x];const br=grid[y+1][x+1];const code=(tl>=level?8:0)|(tr>=level?4:0)|(br>=level?2:0)|(bl>=level?1:0);if(code===0||code===15)continue;const top={x:x+lerp(tl,tr,tl,tr),y:y};const right={x:x+1,y:y+lerp(tr,br,tr,br)};const bottom={x:x+lerp(bl,br,bl,br),y:y+1};const left={x:x,y:y+lerp(tl,bl,tl,bl)};let connect;if(code===5){const center=(tl+tr+bl+br)/4;connect=center>=level?"top-bottom":"left-right"}else if(code===10){const center=(tl+tr+bl+br)/4;connect=center>=level?"left-right":"top-bottom"}switch(code){case 1:case 14:segments.push([left,bottom]);break;case 2:case 13:segments.push([bottom,right]);break;case 3:case 12:segments.push([left,right]);break;case 4:case 11:segments.push([top,right]);break;case 6:case 9:segments.push([top,bottom]);break;case 7:case 8:segments.push([left,top]);break;case 5:if(connect==="top-bottom"){segments.push([top,bottom]);segments.push([left,right])}else{segments.push([top,right]);segments.push([left,bottom])}break;case 10:if(connect==="left-right"){segments.push([left,right]);segments.push([top,bottom])}else{segments.push([top,right]);segments.push([left,bottom])}break}}}return segments};const renderContourPlot=(el)=>{const svg=el.querySelector("svg");if(!svg)return;const valuesAttr=el.getAttribute("data-values");const levelsAttr=el.getAttribute("data-levels");if(!valuesAttr)return;let grid;try{grid=JSON.parse(valuesAttr)}catch(e){return}const levels=levelsAttr?JSON.parse(levelsAttr):[0.3,0.5,0.7];const rows=grid.length;const cols=grid[0].length;const w=el.clientWidth||300;const h=el.clientHeight||300;const sx=w/(cols-1);const sy=h/(rows-1);svg.querySelectorAll(".c-contour-plot__contour").forEach((n)=>n.remove());levels.forEach((level,li)=>{const segs=marchingSquares(grid,level);const path=document.createElementNS("http://www.w3.org/2000/svg","path");let d="";for(const[a,b]of segs){d+=`M ${a.x * sx} ${a.y * sy} L ${b.x * sx} ${b.y * sy} `}path.setAttribute("d",d.trim());path.setAttribute("class","c-contour-plot__contour"+(li>0?" c-contour-plot__contour--level-"+(li+1):""));svg.appendChild(path)})};$$("[data-contour-plot]").forEach((el)=>{renderContourPlot(el);if(typeof ResizeObserver!=="undefined"){new ResizeObserver(()=>renderContourPlot(el)).observe(el)}});$$("[data-chart-export]").forEach((chart)=>{const btn=document.createElement("button");btn.className="c-btn c-btn--sm c-btn--ghost";btn.textContent="Export";btn.setAttribute("aria-label","Export chart");btn.addEventListener("click",()=>{const svg=chart.querySelector("svg");if(!svg)return;const serializer=new XMLSerializer();const svgStr=serializer.serializeToString(svg);const blob=new Blob([svgStr],{type:"image/svg+xml"});const url=URL.createObjectURL(blob);const a=document.createElement("a");a.href=url;a.download="chart.svg";a.click();URL.revokeObjectURL(url)});chart.appendChild(btn)});$$(".c-combobox").forEach((combo)=>{const input=combo.querySelector(".c-combobox__input");const list=combo.querySelector(".c-combobox__list");if(!input||!list)return;const options=[...list.querySelectorAll(".c-combobox__option")];let activeIndex=-1;const filter=(query)=>{const q=query.toLowerCase();options.forEach((opt)=>{const text=opt.textContent.toLowerCase();opt.hidden=q&&!text.includes(q)});activeIndex=-1};const open=()=>list.removeAttribute("hidden");const close=()=>list.setAttribute("hidden","");input.addEventListener("input",()=>{filter(input.value);open()});input.addEventListener("focus",()=>{filter(input.value);open()});input.addEventListener("keydown",(e)=>{const visible=options.filter((o)=>!o.hidden);if(e.key==="ArrowDown"){e.preventDefault();activeIndex=Math.min(activeIndex+1,visible.length-1);visible.forEach((o,i)=>o.classList.toggle("c-combobox__option--active",i===activeIndex))}else if(e.key==="ArrowUp"){e.preventDefault();activeIndex=Math.max(activeIndex-1,0);visible.forEach((o,i)=>o.classList.toggle("c-combobox__option--active",i===activeIndex))}else if(e.key==="Enter"){e.preventDefault();if(activeIndex>=0&&visible[activeIndex]){input.value=visible[activeIndex].textContent;close()}}else if(e.key==="Escape"){close()}});list.addEventListener("click",(e)=>{const opt=e.target.closest(".c-combobox__option");if(opt){input.value=opt.textContent;close();input.focus()}});document.addEventListener("click",(e)=>{if(!combo.contains(e.target))close()})});$$(".c-tree__toggle").forEach((toggle)=>{toggle.addEventListener("click",(e)=>{e.stopPropagation();const expanded=toggle.getAttribute("aria-expanded")==="true";toggle.setAttribute("aria-expanded",String(!expanded));const row=toggle.closest(".c-tree__row");if(row)row.setAttribute("aria-expanded",String(!expanded));const children=toggle.closest(".c-tree__node")?.querySelector(":scope > .c-tree__children");if(children){if(expanded)children.setAttribute("hidden","");else children.removeAttribute("hidden")}})});$$(".c-resize-handle").forEach((handle)=>{handle.setAttribute("tabindex","0");handle.setAttribute("role","separator");if(!handle.hasAttribute("aria-valuenow"))handle.setAttribute("aria-valuenow","50");if(!handle.hasAttribute("aria-valuemin"))handle.setAttribute("aria-valuemin","0");if(!handle.hasAttribute("aria-valuemax"))handle.setAttribute("aria-valuemax","100");if(!handle.hasAttribute("aria-orientation"))handle.setAttribute("aria-orientation","vertical");handle.addEventListener("pointerdown",(e)=>{e.preventDefault();handle.setPointerCapture(e.pointerId);handle.classList.add("c-resize-handle--dragging");const resizable=handle.closest(".c-resizable");const isHorizontal=resizable?.classList.contains("c-resizable--horizontal");const prevPane=handle.previousElementSibling;const nextPane=handle.nextElementSibling;if(!prevPane||!nextPane)return;const startPos=isHorizontal?e.clientX:e.clientY;const prevSize=isHorizontal?prevPane.offsetWidth:prevPane.offsetHeight;const nextSize=isHorizontal?nextPane.offsetWidth:nextPane.offsetHeight;const onMove=(ev)=>{const delta=(isHorizontal?ev.clientX:ev.clientY)-startPos;const newPrev=Math.max(50,prevSize+delta);const newNext=Math.max(50,nextSize-delta);prevPane.style.flex="0 0 "+newPrev+"px";nextPane.style.flex="0 0 "+newNext+"px"};const onUp=()=>{handle.classList.remove("c-resize-handle--dragging");handle.releasePointerCapture(e.pointerId);document.removeEventListener("pointermove",onMove);document.removeEventListener("pointerup",onUp)};document.addEventListener("pointermove",onMove);document.addEventListener("pointerup",onUp)});handle.addEventListener("keydown",(e)=>{const resizable=handle.closest(".c-resizable");const isHorizontal=resizable?.classList.contains("c-resizable--horizontal");const prevPane=handle.previousElementSibling;const nextPane=handle.nextElementSibling;if(!prevPane||!nextPane)return;const step=10;let delta=0;if(isHorizontal){if(e.key==="ArrowLeft")delta=-step;else if(e.key==="ArrowRight")delta=step}else{if(e.key==="ArrowUp")delta=-step;else if(e.key==="ArrowDown")delta=step}if(delta!==0){e.preventDefault();const prevSize=isHorizontal?prevPane.offsetWidth:prevPane.offsetHeight;const nextSize=isHorizontal?nextPane.offsetWidth:nextPane.offsetHeight;const newPrev=Math.max(50,prevSize+delta);const newNext=Math.max(50,nextSize-delta);prevPane.style.flex="0 0 "+newPrev+"px";nextPane.style.flex="0 0 "+newNext+"px"}})});$$(".c-comparison").forEach((comp)=>{const divider=comp.querySelector(".c-comparison__divider");const before=comp.querySelector(".c-comparison__pane--before");if(!divider||!before)return;const setPct=(pct)=>{const clamped=Math.max(2,Math.min(98,pct));divider.style.insetInlineStart=clamped+"%";before.style.clipPath="inset(0 "+(100-clamped)+"% 0 0)";divider.setAttribute("aria-valuenow",String(Math.round(clamped)))};divider.setAttribute("tabindex","0");divider.setAttribute("role","separator");divider.setAttribute("aria-orientation","vertical");divider.setAttribute("aria-valuemin","0");divider.setAttribute("aria-valuemax","100");if(!divider.getAttribute("aria-label")){divider.setAttribute("aria-label","Comparison divider")}const seed=parseFloat(divider.style.insetInlineStart);setPct(Number.isFinite(seed)?seed:50);divider.addEventListener("pointerdown",(e)=>{e.preventDefault();divider.setPointerCapture(e.pointerId);const onMove=(ev)=>{const rect=comp.getBoundingClientRect();if(!rect.width)return;setPct(((ev.clientX-rect.left)/rect.width)*100)};const onUp=()=>{try{divider.releasePointerCapture(e.pointerId)}catch(_){}document.removeEventListener("pointermove",onMove);document.removeEventListener("pointerup",onUp)};document.addEventListener("pointermove",onMove);document.addEventListener("pointerup",onUp)});divider.addEventListener("keydown",(e)=>{const current=parseFloat(divider.style.insetInlineStart);const base=Number.isFinite(current)?current:50;let delta=0;if(e.key==="ArrowLeft")delta=-2;else if(e.key==="ArrowRight")delta=2;if(delta!==0){e.preventDefault();setPct(base+delta)}})});let draggedEl=null;$$(".c-draggable").forEach((el)=>{el.setAttribute("draggable","true");el.setAttribute("tabindex","0");el.addEventListener("dragstart",(e)=>{el.classList.add("c-draggable--dragging");draggedEl=el;e.dataTransfer?.setData("text/plain",el.textContent||"");if(e.dataTransfer)e.dataTransfer.effectAllowed="move"});el.addEventListener("dragend",()=>{el.classList.remove("c-draggable--dragging");draggedEl=null});let touchTimer=null;el.addEventListener("touchstart",()=>{touchTimer=setTimeout(()=>{el.classList.add("c-draggable--dragging");el.style.opacity="0.5"},300)},{passive:true});el.addEventListener("touchend",()=>{if(touchTimer)clearTimeout(touchTimer);el.classList.remove("c-draggable--dragging");el.style.opacity=""});el.addEventListener("touchmove",()=>{if(touchTimer)clearTimeout(touchTimer)},{passive:true});el.addEventListener("keydown",(e)=>{const parent=el.parentElement;if(!parent)return;const siblings=[...parent.querySelectorAll(".c-draggable")];const idx=siblings.indexOf(el);if(e.key==="ArrowUp"&&idx>0){e.preventDefault();el.classList.add("c-draggable--reordering");parent.insertBefore(el,siblings[idx-1]);el.focus();setTimeout(()=>el.classList.remove("c-draggable--reordering"),200)}else if(e.key==="ArrowDown"&&idx<siblings.length-1){e.preventDefault();el.classList.add("c-draggable--reordering");parent.insertBefore(siblings[idx+1],el);el.focus();setTimeout(()=>el.classList.remove("c-draggable--reordering"),200)}})});$$(".c-drop-zone").forEach((zone)=>{zone.addEventListener("dragover",(e)=>{e.preventDefault();zone.classList.add("c-drop-zone--active");const indicator=zone.querySelector(".c-drop-indicator");if(indicator)indicator.classList.add("c-drop-indicator--visible")});zone.addEventListener("dragleave",()=>{zone.classList.remove("c-drop-zone--active");const indicator=zone.querySelector(".c-drop-indicator");if(indicator)indicator.classList.remove("c-drop-indicator--visible")});zone.addEventListener("drop",(e)=>{e.preventDefault();zone.classList.remove("c-drop-zone--active");const indicator=zone.querySelector(".c-drop-indicator");if(indicator)indicator.classList.remove("c-drop-indicator--visible");if(draggedEl){zone.appendChild(draggedEl);draggedEl.classList.remove("c-draggable--dragging");draggedEl=null;return}const data=e.dataTransfer?.getData("text/plain");if(data){const item=document.createElement("span");item.className="c-draggable c-card";item.style.padding="var(--space-sm)";item.style.overflow="hidden";item.style.textOverflow="ellipsis";item.style.whiteSpace="nowrap";item.style.maxInlineSize="100%";item.textContent=data;item.setAttribute("tabindex","0");zone.appendChild(item)}})});$$(".c-layer-panel").forEach((panel)=>{if(!panel.hasAttribute("role"))panel.setAttribute("role","list");const items=()=>[...panel.querySelectorAll(".c-layer-panel__item")];const reorder=(el,dir)=>{const s=items(),i=s.indexOf(el);if(dir<0&&i>0){el.classList.add("c-layer-panel__item--dragging");panel.insertBefore(el,s[i-1]);el.focus();setTimeout(()=>el.classList.remove("c-layer-panel__item--dragging"),200)}else if(dir>0&&i<s.length-1){el.classList.add("c-layer-panel__item--dragging");panel.insertBefore(s[i+1],el);el.focus();setTimeout(()=>el.classList.remove("c-layer-panel__item--dragging"),200)}};items().forEach((item)=>{item.setAttribute("draggable","true");item.setAttribute("tabindex","0");item.setAttribute("role","listitem");item.addEventListener("dragstart",(e)=>{const t=e.target;if(t&&t!==item&&/^(INPUT|BUTTON|SELECT)$/.test(t.tagName)&&!(t.classList&&t.classList.contains("c-drag-handle"))){e.preventDefault();return}item.classList.add("c-layer-panel__item--dragging");e.dataTransfer?.setData("text/plain",item.querySelector(".c-layer-panel__name")?.textContent||"");if(e.dataTransfer)e.dataTransfer.effectAllowed="move"});item.addEventListener("dragend",()=>item.classList.remove("c-layer-panel__item--dragging"));item.addEventListener("dragover",(e)=>{e.preventDefault();const dragged=panel.querySelector(".c-layer-panel__item--dragging");if(!dragged||dragged===item)return;const r=item.getBoundingClientRect(),mid=r.top+r.height/2;if(e.clientY<mid)panel.insertBefore(dragged,item);else panel.insertBefore(dragged,item.nextSibling)});item.addEventListener("keydown",(e)=>{if(e.key==="ArrowUp"){e.preventDefault();reorder(item,-1)}else if(e.key==="ArrowDown"){e.preventDefault();reorder(item,1)}})})});window.Contour=Object.freeze({__loaded:true,version:"1.0",toast:showToast,setScheme:applyScheme,scrollTo:(id)=>{const el=typeof id==="string"?document.getElementById(id):id;if(el)goTo(el)},copy:async(text)=>copyText(text),format:{number:(value,format,locale)=>{const n=Number(value);if(!Number.isFinite(n))return String(value);if(format==="percent")return(n*100).toFixed(0)+"%";try{return new Intl.NumberFormat(locale||undefined).format(n)}catch(e){return String(n)}},time:(value,locale)=>{try{return new Intl.DateTimeFormat(locale||undefined).format(new Date(value))}catch(e){return String(value)}},locale:(locale)=>locale||(typeof navigator!=="undefined"?navigator.language:"en"),},chart:{scale:linearScale,ticks:niceTicks,datum:datum},commands:{register:registerCommand,list:listCommands},})})();
@@ -1083,6 +1083,20 @@
1083
1083
  "unit": "s"
1084
1084
  }
1085
1085
  },
1086
+ "reveal": {
1087
+ "$type": "duration",
1088
+ "$value": {
1089
+ "value": 320,
1090
+ "unit": "ms"
1091
+ }
1092
+ },
1093
+ "focus": {
1094
+ "$type": "duration",
1095
+ "$value": {
1096
+ "value": 120,
1097
+ "unit": "ms"
1098
+ }
1099
+ },
1086
1100
  "$description": "MOTION"
1087
1101
  },
1088
1102
  "ease": {
@@ -1095,6 +1109,15 @@
1095
1109
  1
1096
1110
  ]
1097
1111
  },
1112
+ "reveal": {
1113
+ "$type": "cubicBezier",
1114
+ "$value": [
1115
+ 0.16,
1116
+ 1,
1117
+ 0.3,
1118
+ 1
1119
+ ]
1120
+ },
1098
1121
  "out-expo": {
1099
1122
  "$type": "cubicBezier",
1100
1123
  "$value": [
@@ -1124,6 +1147,16 @@
1124
1147
  },
1125
1148
  "$description": "MOTION"
1126
1149
  },
1150
+ "reveal": {
1151
+ "distance": {
1152
+ "$type": "dimension",
1153
+ "$value": {
1154
+ "value": 1.5,
1155
+ "unit": "rem"
1156
+ }
1157
+ },
1158
+ "$description": "MOTION"
1159
+ },
1127
1160
  "container": {
1128
1161
  "sm": {
1129
1162
  "$type": "dimension",
@@ -1167,13 +1200,17 @@
1167
1200
  "$type": "number",
1168
1201
  "$value": 100
1169
1202
  },
1203
+ "header": {
1204
+ "$type": "number",
1205
+ "$value": 400
1206
+ },
1170
1207
  "drawer": {
1171
1208
  "$type": "number",
1172
1209
  "$value": 500
1173
1210
  },
1174
- "header": {
1211
+ "modal": {
1175
1212
  "$type": "number",
1176
- "$value": 400
1213
+ "$value": 600
1177
1214
  },
1178
1215
  "toast": {
1179
1216
  "$type": "number",
@@ -1936,6 +1973,10 @@
1936
1973
  "$type": "number",
1937
1974
  "$value": 0.72
1938
1975
  },
1976
+ "roomy": {
1977
+ "$type": "number",
1978
+ "$value": 1.28
1979
+ },
1939
1980
  "type": {
1940
1981
  "$type": "number",
1941
1982
  "$value": 1
@@ -2385,6 +2426,10 @@
2385
2426
  "$description": "Sequential — one hue, rising lightness."
2386
2427
  },
2387
2428
  "$extensions": {
2429
+ "com.contour.version": {
2430
+ "version": "1.6.0",
2431
+ "deprecation": "A deprecated token keeps its name and gains a `$deprecated` boolean plus a `replacement` pointer in its `$extensions`; removals land in the next major release (see CHANGELOG.md)."
2432
+ },
2388
2433
  "com.contour.dtcg": {
2389
2434
  "source": "src/css/tokens.css",
2390
2435
  "statement": "Generated by tools/build.mjs; src/css stays the source of truth. The tokens named here are declared CSS the Format Module cannot represent, so a consumer must read the stylesheet for them — they are listed rather than dropped, and tools/check-export.mjs fails unless exported plus refused equals the census. Note what this document CANNOT say: a knob-resolved colour is published at the value :root declares, so the JSON describes the default theme only. Re-pointing --brand-hue works from :root and not from a subtree — that is why .c-theme-scope re-derives the whole brand layer rather than overriding one value — and a Resolver set carries themes, not an arbitrary hue. Read src/css for the mechanism.",
@@ -1,6 +1,6 @@
1
1
  # Actions
2
2
 
3
- Section `actions` — marker `06`, position 7 of 25 in the guide.
3
+ Section `actions` — marker `06`, position 7 of 27 in the guide.
4
4
  Generated from `index.html`; prose quoted, counts from the inventory, no URL (the project is
5
5
  private until v1.0). See `index.json` for the whole set and the shared statement.
6
6
 
@@ -10,6 +10,10 @@ One primary action per view. Everything else is secondary, ghost or a plain link
10
10
 
11
11
  The same blocks as contour-* elements live in §23.
12
12
 
13
+ ## Subsections
14
+
15
+ - Web component counterpart
16
+
13
17
  ## Blocks documented here
14
18
 
15
19
  8 block(s). Their facts live in `../contour.components.json`;
@@ -27,4 +31,4 @@ starts disagreeing with itself.
27
31
 
28
32
  ---
29
33
 
30
- Source `index.html` @ `1fb85a5bccea15f2` · last committed 2026-11-01T12:28:24+01:00 · no URL: the project is private until v1.0.
34
+ Source `index.html` @ `10d181ea8e0eb659` · last committed 2026-11-04T18:12:14+01:00 · no URL: the project is private until v1.0.
@@ -1,6 +1,6 @@
1
1
  # Affordances, made visible.
2
2
 
3
- Section `affordances` — marker `18`, position 19 of 25 in the guide.
3
+ Section `affordances` — marker `18`, position 19 of 27 in the guide.
4
4
  Generated from `index.html`; prose quoted, counts from the inventory, no URL (the project is
5
5
  private until v1.0). See `index.json` for the whole set and the shared statement.
6
6
 
@@ -8,6 +8,8 @@ private until v1.0). See `index.json` for the whole set and the shared statement
8
8
 
9
9
  An element should look like what it does before anyone touches it. Each interactive class in the system carries a signifier — a shape, a handle, an arrow — that announces its behaviour. Nothing is implied by position alone, and nothing is left to be guessed at.
10
10
 
11
+ Equivalent contour-* elements are catalogued in §23.
12
+
11
13
  Button
12
14
 
13
15
  Filled, raised, pill-shaped with a shadow that implies height. It lifts on hover and presses on activation.
@@ -117,10 +119,17 @@ Main content area
117
119
  ## Subsections
118
120
 
119
121
  - Layout primitives
122
+ - Tour
123
+ - Resize observer
124
+ - Style panel
125
+ - Style switcher
126
+ - Palette editor
127
+ - Widget state
128
+ - Web component counterpart
120
129
 
121
130
  ## Blocks documented here
122
131
 
123
- 34 block(s). Their facts live in `../contour.components.json`;
132
+ 41 block(s). Their facts live in `../contour.components.json`;
124
133
  only the names are here, because the same figure in two files is how a document
125
134
  starts disagreeing with itself.
126
135
 
@@ -139,16 +148,19 @@ starts disagreeing with itself.
139
148
  - `.c-expandable`
140
149
  - `.c-filter-pill`
141
150
  - `.c-icon-badge`
151
+ - `.c-kbd`
142
152
  - `.c-linkish`
143
153
  - `.c-map-footer`
144
154
  - `.c-map-panel`
145
155
  - `.c-map-slot`
146
156
  - `.c-menu`
157
+ - `.c-palette-editor`
147
158
  - `.c-panel`
148
159
  - `.c-pressable`
149
160
  - `.c-range`
150
161
  - `.c-reserved`
151
162
  - `.c-resize-handle`
163
+ - `.c-resize-observer`
152
164
  - `.c-row`
153
165
  - `.c-row-action`
154
166
  - `.c-scrim`
@@ -156,8 +168,12 @@ starts disagreeing with itself.
156
168
  - `.c-select`
157
169
  - `.c-sidebar`
158
170
  - `.c-stack`
171
+ - `.c-style-panel`
172
+ - `.c-style-switcher`
159
173
  - `.c-switch`
160
174
  - `.c-tag`
175
+ - `.c-tour`
176
+ - `.c-widget-state`
161
177
 
162
178
  ### Defined by the guide, not the system
163
179
 
@@ -168,4 +184,4 @@ part of the component contract and nothing in an installed package defines them:
168
184
 
169
185
  ---
170
186
 
171
- Source `index.html` @ `1fb85a5bccea15f2` · last committed 2026-11-01T12:28:24+01:00 · no URL: the project is private until v1.0.
187
+ Source `index.html` @ `10d181ea8e0eb659` · last committed 2026-11-04T18:12:14+01:00 · no URL: the project is private until v1.0.
@@ -0,0 +1,30 @@
1
+ # API reference.
2
+
3
+ Section `apireference` — marker `24`, position 25 of 27 in the guide.
4
+ Generated from `index.html`; prose quoted, counts from the inventory, no URL (the project is
5
+ private until v1.0). See `index.json` for the whole set and the shared statement.
6
+
7
+ ## What the guide says
8
+
9
+ Per-element reference generated from contour.components.json: host-set inputs, sheet-defaulted vars, variants, element count and token count.
10
+
11
+ Per-element reference generated from contour.components.json: host-set inputs, sheet-defaulted vars, variants, element count and token count. Regenerate with node tools/gen-api-cards.mjs.
12
+
13
+ ## Subsections
14
+
15
+ - Component API reference
16
+
17
+ ## Blocks documented here
18
+
19
+ 4 block(s). Their facts live in `../contour.components.json`;
20
+ only the names are here, because the same figure in two files is how a document
21
+ starts disagreeing with itself.
22
+
23
+ - `.c-disclosure`
24
+ - `.c-panel`
25
+ - `.c-section-head`
26
+ - `.c-stack`
27
+
28
+ ---
29
+
30
+ Source `index.html` @ `10d181ea8e0eb659` · last committed 2026-11-04T18:12:14+01:00 · no URL: the project is private until v1.0.
@@ -1,6 +1,6 @@
1
1
  # Colour, in five families and a neutral ramp.
2
2
 
3
- Section `colour` — marker `02`, position 3 of 25 in the guide.
3
+ Section `colour` — marker `02`, position 3 of 27 in the guide.
4
4
  Generated from `index.html`; prose quoted, counts from the inventory, no URL (the project is
5
5
  private until v1.0). See `index.json` for the whole set and the shared statement.
6
6
 
@@ -41,4 +41,4 @@ starts disagreeing with itself.
41
41
 
42
42
  ---
43
43
 
44
- Source `index.html` @ `1fb85a5bccea15f2` · last committed 2026-11-01T12:28:24+01:00 · no URL: the project is private until v1.0.
44
+ Source `index.html` @ `10d181ea8e0eb659` · last committed 2026-11-04T18:12:14+01:00 · no URL: the project is private until v1.0.
@@ -0,0 +1,39 @@
1
+ # Component index.
2
+
3
+ Section `componentindex` — marker `26`, position 27 of 27 in the guide.
4
+ Generated from `index.html`; prose quoted, counts from the inventory, no URL (the project is
5
+ private until v1.0). See `index.json` for the whole set and the shared statement.
6
+
7
+ ## What the guide says
8
+
9
+ Coverage specimens for shipped blocks not yet shown in a family section.
10
+
11
+ Responsive content
12
+
13
+ Sheet body content.
14
+
15
+ ## Blocks documented here
16
+
17
+ 15 block(s). Their facts live in `../contour.components.json`;
18
+ only the names are here, because the same figure in two files is how a document
19
+ starts disagreeing with itself.
20
+
21
+ - `.c-avatar`
22
+ - `.c-avatar-group`
23
+ - `.c-banner`
24
+ - `.c-btn`
25
+ - `.c-calendar`
26
+ - `.c-carousel`
27
+ - `.c-divider`
28
+ - `.c-fab`
29
+ - `.c-pivot`
30
+ - `.c-responsive-content`
31
+ - `.c-section-head`
32
+ - `.c-skeleton`
33
+ - `.c-skeleton-group`
34
+ - `.c-status-light`
35
+ - `.c-swatch`
36
+
37
+ ---
38
+
39
+ Source `index.html` @ `10d181ea8e0eb659` · last committed 2026-11-04T18:12:14+01:00 · no URL: the project is private until v1.0.
package/dist/docs/data.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Data display
2
2
 
3
- Section `data` — marker `13`, position 14 of 25 in the guide.
3
+ Section `data` — marker `13`, position 14 of 27 in the guide.
4
4
  Generated from `index.html`; prose quoted, counts from the inventory, no URL (the project is
5
5
  private until v1.0). See `index.json` for the whole set and the shared statement.
6
6
 
@@ -8,6 +8,8 @@ private until v1.0). See `index.json` for the whole set and the shared statement
8
8
 
9
9
  Numbers are set in mono with tabular figures so columns align. Readouts use dotted rules instead of boxes, which keeps dense data calm — and no two series are ever separated by hue alone.
10
10
 
11
+ Equivalent contour-* elements are catalogued in §23.
12
+
11
13
  The friction cost of each surface, and where people end up walking anyway.
12
14
 
13
15
  Walking resistance
@@ -71,36 +73,69 @@ A migration aid: the names a consumer may already know, and the Contour class th
71
73
  - Deltas
72
74
  - How to add a component
73
75
  - Rename table (legacy → Contour)
76
+ - Web component counterpart
77
+ - Virtual list
78
+ - Data table
79
+ - Data grid
80
+ - Tree grid
81
+ - Annotation
82
+ - Axis
83
+ - Gauge
84
+ - Donut
85
+ - Category
86
+ - Brush
87
+ - Bivariate legend
88
+ - Stacked bar
89
+ - Time series
90
+ - Brownout
91
+ - Animation controls
92
+ - Web component counterparts
74
93
 
75
94
  ## Blocks documented here
76
95
 
77
- 22 block(s). Their facts live in `../contour.components.json`;
96
+ 38 block(s). Their facts live in `../contour.components.json`;
78
97
  only the names are here, because the same figure in two files is how a document
79
98
  starts disagreeing with itself.
80
99
 
81
100
  - `.c-activity`
101
+ - `.c-animation-controls`
102
+ - `.c-annotation`
103
+ - `.c-axis`
82
104
  - `.c-badge`
105
+ - `.c-bivariate-legend`
106
+ - `.c-brownout`
107
+ - `.c-brush`
83
108
  - `.c-btn`
84
109
  - `.c-catchment`
110
+ - `.c-category`
85
111
  - `.c-chart`
86
112
  - `.c-contour-plot`
113
+ - `.c-data-grid`
114
+ - `.c-data-table`
87
115
  - `.c-datamark`
88
116
  - `.c-delta`
117
+ - `.c-donut`
89
118
  - `.c-flow-map`
119
+ - `.c-gauge`
90
120
  - `.c-heatmap`
91
121
  - `.c-icon-badge`
92
122
  - `.c-isochrone`
123
+ - `.c-kbd`
93
124
  - `.c-kpi`
94
125
  - `.c-legend`
95
126
  - `.c-panel`
96
127
  - `.c-readout`
97
128
  - `.c-section-head`
129
+ - `.c-stacked-bar`
98
130
  - `.c-streaming-chart`
99
131
  - `.c-table`
100
132
  - `.c-table-wrap`
101
133
  - `.c-time-range`
134
+ - `.c-time-series`
102
135
  - `.c-timeline`
136
+ - `.c-tree-grid`
137
+ - `.c-virtual-list`
103
138
 
104
139
  ---
105
140
 
106
- Source `index.html` @ `1fb85a5bccea15f2` · last committed 2026-11-01T12:28:24+01:00 · no URL: the project is private until v1.0.
141
+ Source `index.html` @ `10d181ea8e0eb659` · last committed 2026-11-04T18:12:14+01:00 · no URL: the project is private until v1.0.
package/dist/docs/docs.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Documentation
2
2
 
3
- Section `docs` — marker `15`, position 16 of 25 in the guide.
3
+ Section `docs` — marker `15`, position 16 of 27 in the guide.
4
4
  Generated from `index.html`; prose quoted, counts from the inventory, no URL (the project is
5
5
  private until v1.0). See `index.json` for the whole set and the shared statement.
6
6
 
@@ -8,6 +8,8 @@ private until v1.0). See `index.json` for the whole set and the shared statement
8
8
 
9
9
  The parts that make a manual usable: a callout that holds a rule, a list of steps that holds an order, a diff that holds a change, and a pager that holds the way out.
10
10
 
11
+ Equivalent contour-* elements are catalogued in §23.
12
+
11
13
  Five tones. Each carries an icon and a word, so the meaning survives a monochrome print and a reader who cannot tell red from green.
12
14
 
13
15
  Note
@@ -66,6 +68,7 @@ The way out of a long page, at the foot of it. Both links are real links, so the
66
68
 
67
69
  ## Subsections
68
70
 
71
+ - Web component counterpart
69
72
  - Callouts
70
73
  - Do / Don't
71
74
  - Steps
@@ -75,6 +78,7 @@ The way out of a long page, at the foot of it. Both links are real links, so the
75
78
  - Versions
76
79
  - File tree
77
80
  - Pager
81
+ - Web component counterpart
78
82
 
79
83
  ## Blocks documented here
80
84
 
@@ -99,4 +103,4 @@ starts disagreeing with itself.
99
103
 
100
104
  ---
101
105
 
102
- Source `index.html` @ `1fb85a5bccea15f2` · last committed 2026-11-01T12:28:24+01:00 · no URL: the project is private until v1.0.
106
+ Source `index.html` @ `10d181ea8e0eb659` · last committed 2026-11-04T18:12:14+01:00 · no URL: the project is private until v1.0.