vanilla-breeze 0.3.0 → 0.3.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.
- package/dist/cdn/components/settings-panel.js +1 -1
- package/dist/cdn/themes/8bit.tokens.json +1 -1
- package/dist/cdn/themes/alpha1999-dark.tokens.json +1 -1
- package/dist/cdn/themes/alpha1999.tokens.json +1 -1
- package/dist/cdn/themes/anthropic.tokens.json +1 -1
- package/dist/cdn/themes/art-deco-dark.tokens.json +1 -1
- package/dist/cdn/themes/art-deco.tokens.json +1 -1
- package/dist/cdn/themes/bauhaus-dark.tokens.json +1 -1
- package/dist/cdn/themes/bauhaus.tokens.json +1 -1
- package/dist/cdn/themes/brutalist-dark.tokens.json +1 -1
- package/dist/cdn/themes/brutalist.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-frappe.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-latte-dark.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-latte.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-macchiato.tokens.json +1 -1
- package/dist/cdn/themes/catppuccin-mocha.tokens.json +1 -1
- package/dist/cdn/themes/classic-dark.tokens.json +1 -1
- package/dist/cdn/themes/classic.tokens.json +1 -1
- package/dist/cdn/themes/claymorphism-dark.tokens.json +1 -1
- package/dist/cdn/themes/claymorphism.tokens.json +1 -1
- package/dist/cdn/themes/clinical-dark.tokens.json +1 -1
- package/dist/cdn/themes/clinical.tokens.json +1 -1
- package/dist/cdn/themes/cottagecore-dark.tokens.json +1 -1
- package/dist/cdn/themes/cottagecore.tokens.json +1 -1
- package/dist/cdn/themes/cyber.tokens.json +1 -1
- package/dist/cdn/themes/dawn-dark.tokens.json +1 -1
- package/dist/cdn/themes/dawn.tokens.json +1 -1
- package/dist/cdn/themes/dracula.tokens.json +1 -1
- package/dist/cdn/themes/dusk.tokens.json +1 -1
- package/dist/cdn/themes/editorial-dark.tokens.json +1 -1
- package/dist/cdn/themes/editorial.tokens.json +1 -1
- package/dist/cdn/themes/financial-dark.tokens.json +1 -1
- package/dist/cdn/themes/financial.tokens.json +1 -1
- package/dist/cdn/themes/genai.tokens.json +1 -1
- package/dist/cdn/themes/glassmorphism-dark.tokens.json +1 -1
- package/dist/cdn/themes/glassmorphism.tokens.json +1 -1
- package/dist/cdn/themes/government-dark.tokens.json +1 -1
- package/dist/cdn/themes/government.tokens.json +1 -1
- package/dist/cdn/themes/gruvbox-dark.tokens.json +1 -1
- package/dist/cdn/themes/gruvbox.tokens.json +1 -1
- package/dist/cdn/themes/high-noon-dark.tokens.json +1 -1
- package/dist/cdn/themes/high-noon.tokens.json +1 -1
- package/dist/cdn/themes/ibm.tokens.json +1 -1
- package/dist/cdn/themes/journal-dark.tokens.json +1 -1
- package/dist/cdn/themes/journal.tokens.json +1 -1
- package/dist/cdn/themes/kawaii-dark.tokens.json +1 -1
- package/dist/cdn/themes/kawaii.tokens.json +1 -1
- package/dist/cdn/themes/magna-dark.tokens.json +1 -1
- package/dist/cdn/themes/magna.tokens.json +1 -1
- package/dist/cdn/themes/mcdonalds.tokens.json +1 -1
- package/dist/cdn/themes/midnight.tokens.json +1 -1
- package/dist/cdn/themes/minimal-dark.tokens.json +1 -1
- package/dist/cdn/themes/minimal.tokens.json +1 -1
- package/dist/cdn/themes/modern-dark.tokens.json +1 -1
- package/dist/cdn/themes/modern.tokens.json +1 -1
- package/dist/cdn/themes/nes-dark.tokens.json +1 -1
- package/dist/cdn/themes/nes.tokens.json +1 -1
- package/dist/cdn/themes/neumorphism-dark.tokens.json +1 -1
- package/dist/cdn/themes/neumorphism.tokens.json +1 -1
- package/dist/cdn/themes/nord-dark.tokens.json +1 -1
- package/dist/cdn/themes/nord.tokens.json +1 -1
- package/dist/cdn/themes/organic-dark.tokens.json +1 -1
- package/dist/cdn/themes/organic.tokens.json +1 -1
- package/dist/cdn/themes/rose-pine-dark.tokens.json +1 -1
- package/dist/cdn/themes/rose-pine.tokens.json +1 -1
- package/dist/cdn/themes/rough-dark.tokens.json +1 -1
- package/dist/cdn/themes/rough.tokens.json +1 -1
- package/dist/cdn/themes/solarized-dark.tokens.json +1 -1
- package/dist/cdn/themes/solarized.tokens.json +1 -1
- package/dist/cdn/themes/starbucks.tokens.json +1 -1
- package/dist/cdn/themes/startup-dark.tokens.json +1 -1
- package/dist/cdn/themes/startup.tokens.json +1 -1
- package/dist/cdn/themes/super2026-dark.tokens.json +1 -1
- package/dist/cdn/themes/super2026.tokens.json +1 -1
- package/dist/cdn/themes/swiss-dark.tokens.json +1 -1
- package/dist/cdn/themes/swiss.tokens.json +1 -1
- package/dist/cdn/themes/terminal.tokens.json +1 -1
- package/dist/cdn/themes/tokyo-night-dark.tokens.json +1 -1
- package/dist/cdn/themes/tokyo-night.tokens.json +1 -1
- package/dist/cdn/themes/vaporwave-dark.tokens.json +1 -1
- package/dist/cdn/themes/vaporwave.tokens.json +1 -1
- package/dist/cdn/themes/win9x-dark.tokens.json +1 -1
- package/dist/cdn/themes/win9x.tokens.json +1 -1
- package/dist/cdn/vanilla-breeze-core.js +1 -1
- package/dist/cdn/vanilla-breeze.js +1 -1
- package/package.json +1 -1
- package/dist/cdn/components/accessibility-specimen.js +0 -11
- package/dist/cdn/components/adr-wc.js +0 -403
- package/dist/cdn/components/breakpoint-specimen.js +0 -26
- package/dist/cdn/components/burndown-chart.js +0 -2
- package/dist/cdn/components/capacity-plan.js +0 -25
- package/dist/cdn/components/color-palette.js +0 -16
- package/dist/cdn/components/component-sampler.js +0 -45
- package/dist/cdn/components/empathy-map.js +0 -582
- package/dist/cdn/components/font-pairer.js +0 -108
- package/dist/cdn/components/gantt-chart.js +0 -2
- package/dist/cdn/components/gradient-builder.js +0 -52
- package/dist/cdn/components/impact-effort.js +0 -2
- package/dist/cdn/components/iron-triangle.js +0 -2
- package/dist/cdn/components/kanban-board.js +0 -2
- package/dist/cdn/components/layout-specimen.js +0 -35
- package/dist/cdn/components/motion-specimen.js +0 -21
- package/dist/cdn/components/palette-generator.js +0 -15
- package/dist/cdn/components/product-roadmap.js +0 -3
- package/dist/cdn/components/quadrant-grid.js +0 -3
- package/dist/cdn/components/quality-target.js +0 -12
- package/dist/cdn/components/requirement-card.js +0 -122
- package/dist/cdn/components/review-surface.js +0 -535
- package/dist/cdn/components/risk-register.js +0 -25
- package/dist/cdn/components/semantic-palette.js +0 -30
- package/dist/cdn/components/spacing-specimen.js +0 -6
- package/dist/cdn/components/story-map.js +0 -2
- package/dist/cdn/components/theme-catalog.js +0 -28
- package/dist/cdn/components/theme-export.js +0 -26
- package/dist/cdn/components/theme-import.js +0 -44
- package/dist/cdn/components/token-specimen.js +0 -26
- package/dist/cdn/components/traceability-matrix.js +0 -3
- package/dist/cdn/components/type-specimen.js +0 -19
- package/dist/cdn/components/user-journey.js +0 -366
- package/dist/cdn/components/user-persona.js +0 -402
- package/dist/cdn/components/user-story.js +0 -411
- package/dist/cdn/components/work-item.js +0 -447
- package/dist/cdn/packs/design-system.full.css +0 -2
- package/dist/cdn/packs/design-system.full.js +0 -175
- package/dist/cdn/packs/ux-planning.full.css +0 -2
- package/dist/cdn/packs/ux-planning.full.js +0 -3160
|
@@ -801,7 +801,7 @@ svg {
|
|
|
801
801
|
<a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noopener">© OpenStreetMap</a>
|
|
802
802
|
</div>
|
|
803
803
|
</div>
|
|
804
|
-
`}loadTiles(){let t=this.#i(),e=t?.lat??NaN,i=t?.lng??NaN;if(isNaN(e)||isNaN(i)){this.handleError("Missing or invalid lat/lng coordinates");return}let n=this.zoom,r=this.provider,{tileX:a,tileY:o,pixelX:l,pixelY:d}=Ec(e,i,n),c=this.shadowRoot.querySelector('[part="tiles"]');if(!c)return;c.innerHTML="";let u=this,h=u.offsetWidth||400,p=u.offsetHeight||300,f=Math.round(h/2-256-l),m=Math.round(p/2-256-d);c.style.transform=`translate(${f}px, ${m}px)`;let v=0,y=0,w=9;for(let A=-1;A<=1;A++)for(let k=-1;k<=1;k++){let E=a+k,C=o+A,N=vi(r,n,E,C,this.tileUrl),S=document.createElement("img");S.src=N,S.alt="",S.loading="lazy",S.draggable=!1,S.addEventListener("load",()=>{v++,v+y===w&&this.dispatchEvent(new CustomEvent("geo-map:ready",{bubbles:!0,detail:{lat:e,lng:i,zoom:n}}))}),S.addEventListener("error",()=>{y++,y===w?this.handleError("Failed to load map tiles"):v+y===w&&this.dispatchEvent(new CustomEvent("geo-map:ready",{bubbles:!0,detail:{lat:e,lng:i,zoom:n}}))}),c.appendChild(S)}}#a(){let t=this.shadowRoot.querySelector('[part="overlay"]');if(!t)return;let e=t.querySelector('[part="activate"]');t.addEventListener("mouseenter",()=>this.#o(),{once:!0}),e&&e.addEventListener("focus",()=>this.#o(),{once:!0}),e&&e.addEventListener("click",()=>this.#l()),this.interactive==="eager"&&requestAnimationFrame(()=>this.#l())}#o(){if(this.#e)return;let t=this.tileUrl;if(t)try{let r=new URL(t,location.origin);if(r.origin===location.origin){this.#e=!0;return}this.#e=!0;let a=document.createElement("link");a.rel="preconnect",a.href=r.origin,a.crossOrigin="",document.head.appendChild(a);return}catch{}this.#e=!0;let e=this.provider,i;e==="carto-light"||e==="carto-dark"?i="https://basemaps.cartocdn.com":i="https://tile.openstreetmap.org";let n=document.createElement("link");n.rel="preconnect",n.href=i,n.crossOrigin="",document.head.appendChild(n)}async#l(){if(this.#t)return;let t=this.#i(),e=t?.lat??NaN,i=t?.lng??NaN;if(isNaN(e)||isNaN(i))return;let{MapInteraction:n}=await Promise.resolve().then(()=>(Sc(),kc));this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.focus(),this.setAttribute("data-interactive-active",""),this.#t=new n({shadow:this.shadowRoot,host:this,lat:e,lng:i,zoom:this.zoom,provider:this.provider,tileUrl:this.tileUrl,onDeactivate:()=>this.#c()}),this.dispatchEvent(new CustomEvent("geo-map:activate",{bubbles:!0,detail:{lat:e,lng:i,zoom:this.zoom}}))}#c(){this.#t&&(this.#t.destroy(),this.#t=null,this.removeAttribute("data-interactive-active"),this.render(),this.loadTiles(),this.#a())}handleError(t){let e=this.shadowRoot.querySelector('[part="container"]');e&&(e.setAttribute("data-state","error"),e.setAttribute("data-error",t)),this.dispatchEvent(new CustomEvent("geo-map:error",{bubbles:!0,detail:{message:t}}))}};g("geo-map",rr);var Ai=null;async function xf(){return Ai||(Ai=await Promise.resolve().then(()=>(or(),ar)),Ai)}var lr=8,kf=150,Lc="vb-emoji-recent",cr=class extends b{#t;#e;#i;#s;#n;#r=!1;#a=[];#o=-1;#l=null;#c="";#d=null;#p=!1;#h=null;#u=null;setup(){return this.#m(),!0}async#m(){this.#d=await xf(),this.#p||(this.#f(),this.#p=!0),this.#t&&this.listen(this.#t,"click",this.#v),this.listen(document,"click",this.#E),this.listen(document,"keydown",this.#M)}teardown(){this.#l&&(clearTimeout(this.#l),this.setState("search-pending",!1))}#f(){this.#t=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#t||(this.#t=document.createElement("button"),this.#t.type="button",this.#t.textContent="\u{1F600}",this.#t.setAttribute("data-trigger",""),this.prepend(this.#t)),this.#t.setAttribute("aria-haspopup","dialog"),this.#t.setAttribute("aria-expanded","false"),this.#t.setAttribute("aria-label",this.#t.getAttribute("aria-label")||"Open emoji picker"),this.#w()}#w(){this.#e=document.createElement("div"),this.#e.classList.add("picker"),this.#e.setAttribute("role","dialog"),this.#e.setAttribute("aria-label","Emoji picker"),this.#e.hidden=!0,this.#i=document.createElement("input"),this.#i.type="search",this.#i.placeholder="Search emoji\u2026",this.#i.setAttribute("aria-label","Search emoji"),this.#i.addEventListener("input",this.#x),this.#i.addEventListener("keydown",this.#k),this.#e.appendChild(this.#i),this.#n=document.createElement("nav"),this.#n.classList.add("categories"),this.#n.setAttribute("role","tablist"),this.#n.setAttribute("aria-label","Emoji categories");for(let t of this.#d.EMOJI_GROUPS){let e=document.createElement("button");e.type="button",e.setAttribute("role","tab"),e.setAttribute("aria-selected",t===this.#d.EMOJI_GROUPS[0]?"true":"false"),e.setAttribute("data-group",t),e.setAttribute("aria-label",this.#d.EMOJI_GROUP_LABELS[t]),e.title=this.#d.EMOJI_GROUP_LABELS[t],e.textContent=this.#d.EMOJI_GROUP_ICONS[t],e.addEventListener("click",this.#C),this.#n.appendChild(e)}this.#e.appendChild(this.#n),this.#s=document.createElement("div"),this.#s.classList.add("grid"),this.#s.setAttribute("role","grid"),this.#s.setAttribute("aria-label","Emoji"),this.#s.addEventListener("keydown",this.#T),this.#e.appendChild(this.#s),this.appendChild(this.#e),this.#g()}#g(t=null){this.#s.innerHTML="",this.#a=[],this.#o=-1;let e=this.#_();if(!this.#c&&e.length>0){let n=document.createElement("div");n.classList.add("group-label"),n.textContent="Recently Used",n.setAttribute("data-group-heading","recent"),this.#s.appendChild(n);for(let r of e){let a=this.#d.EMOJI_MAP.get(r);a&&this.#b(a)}}let i=t||null;if(i)if(i.length===0){let n=document.createElement("div");n.classList.add("no-results"),n.textContent="No emoji found",this.#s.appendChild(n)}else for(let n of i)this.#b(n);else for(let n of this.#d.EMOJI_GROUPS){let r=document.createElement("div");r.classList.add("group-label"),r.textContent=this.#d.EMOJI_GROUP_LABELS[n],r.setAttribute("data-group-heading",n),this.#s.appendChild(r);let a=this.#d.getByGroup(n);for(let o of a)this.#b(o)}}#b(t){let e=document.createElement("button");e.type="button",e.setAttribute("role","gridcell"),e.setAttribute("tabindex","-1"),e.setAttribute("data-shortcode",t.shortcode),e.title=`${t.name} :${t.shortcode}:`,e.textContent=t.emoji,e.addEventListener("click",this.#A),this.#s.appendChild(e),this.#a.push(e)}#y(){let t=this.getAttribute("for");if(!t)return;let e=document.getElementById(t);if(e){if(e.tagName==="INPUT"||e.tagName==="TEXTAREA"){let i=e;this.#h={start:i.selectionStart??i.value.length,end:i.selectionEnd??i.value.length},this.#u=null}else if(e.isContentEditable){let i=window.getSelection();i&&i.rangeCount>0&&(this.#u=i.getRangeAt(0).cloneRange()),this.#h=null}}}#v=t=>{t.stopPropagation(),this.toggle()};#E=t=>{this.#r&&!this.contains(t.target)&&this.close()};#M=t=>{t.key==="Escape"&&this.#r&&(t.preventDefault(),this.close(),this.#t?.focus())};#x=()=>{this.#l&&clearTimeout(this.#l),this.setState("search-pending",!0),this.#l=setTimeout(()=>{if(this.setState("search-pending",!1),this.#c=this.#i.value.trim(),this.#c){let t=this.#d.searchEmoji(this.#c);this.#g(t)}else this.#g()},kf)};#k=t=>{t.key==="ArrowDown"&&(t.preventDefault(),this.#a.length>0&&this.#S(0))};#C=t=>{let e=t.currentTarget.getAttribute("data-group");for(let n of this.#n.querySelectorAll('[role="tab"]'))n.setAttribute("aria-selected",n===t.currentTarget?"true":"false");this.#c&&(this.#i.value="",this.#c="",this.#g());let i=this.#s.querySelector(`[data-group-heading="${e}"]`);i&&i.scrollIntoView({block:"start",behavior:"smooth"})};#T=t=>{let e=this.#a.length;if(e!==0)switch(t.key){case"ArrowRight":t.preventDefault(),this.#S(this.#o+1);break;case"ArrowLeft":t.preventDefault(),this.#S(this.#o-1);break;case"ArrowDown":t.preventDefault(),this.#S(this.#o+lr);break;case"ArrowUp":t.preventDefault(),this.#o<lr?(this.#i.focus(),this.#o=-1):this.#S(this.#o-lr);break;case"Home":t.preventDefault(),this.#S(0);break;case"End":t.preventDefault(),this.#S(e-1);break;case"Enter":case" ":t.preventDefault(),this.#o>=0&&this.#a[this.#o].click();break;case"Tab":this.close();break}};#A=t=>{let e=t.currentTarget.getAttribute("data-shortcode"),i=this.#d.EMOJI_MAP.get(e);i&&(this.#N(e),this.#$(i),this.dispatchEvent(new CustomEvent("emoji-picker:select",{bubbles:!0,detail:{shortcode:i.shortcode,emoji:i.emoji,name:i.name,keywords:i.keywords}})),this.close(),this.#L())};#S(t){let e=this.#a.length;e!==0&&(t<0&&(t=0),t>=e&&(t=e-1),this.#o=t,this.#a[t].focus())}#$(t){let e=this.getAttribute("for");if(!e)return;let i=document.getElementById(e);if(i){if(i.tagName==="INPUT"||i.tagName==="TEXTAREA"){let n=i,r=this.#h?.start??n.value.length,a=this.#h?.end??r,o=n.value.slice(0,r),l=n.value.slice(a);n.value=o+t.emoji+l;let d=r+t.emoji.length;n.setSelectionRange(d,d),this.#h={start:d,end:d},i.dispatchEvent(new Event("input",{bubbles:!0}))}else if(i.isContentEditable){i.focus();let n=window.getSelection();if(n&&this.#u){n.removeAllRanges(),n.addRange(this.#u);let r=n.getRangeAt(0);r.deleteContents();let a=document.createTextNode(t.emoji);r.insertNode(a),r.setStartAfter(a),r.collapse(!0),n.removeAllRanges(),n.addRange(r),this.#u=r.cloneRange()}else if(n){let r=document.createRange();r.selectNodeContents(i),r.collapse(!1);let a=document.createTextNode(t.emoji);r.insertNode(a),r.setStartAfter(a),r.collapse(!0),n.removeAllRanges(),n.addRange(r)}}}}#L(){let t=this.getAttribute("for");if(!t)return;let e=document.getElementById(t);e&&e.focus()}#_(){try{return JSON.parse(localStorage.getItem(Lc)||"[]")}catch{return[]}}#N(t){let e=parseInt(this.getAttribute("recent-limit")??"24",10)||24,i=this.#_();i=i.filter(n=>n!==t),i.unshift(t),i.length>e&&(i.length=e);try{localStorage.setItem(Lc,JSON.stringify(i))}catch{}}open(){this.#r||(this.#y(),this.#r=!0,this.setAttribute("open",""),this.#t?.setAttribute("aria-expanded","true"),this.#e.hidden=!1,this.#i.value="",this.#c="",this.#g(),requestAnimationFrame(()=>{this.#i.focus()}),this.dispatchEvent(new CustomEvent("emoji-picker:open",{bubbles:!0})))}close(){this.#r&&(this.#r=!1,this.removeAttribute("open"),this.#t?.setAttribute("aria-expanded","false"),this.#e.hidden=!0,this.dispatchEvent(new CustomEvent("emoji-picker:close",{bubbles:!0})))}toggle(){this.#r?this.close():this.open()}get isOpen(){return this.#r}};g("emoji-picker",cr);at();var Nc="environment",Mc="preferences",dr={timeOfDay:!1,seasonal:!1},Sf=900*1e3,St={...dr};function It(s,t,e){return s+(t-s)*Math.min(1,Math.max(0,e))}var Bt={_timer:null,_baseHues:null,_timeOverride:null,_monthOverride:null,async init(){let s=await T.get(Nc,Mc);St=s?{...dr,...s}:{...dr},(St.timeOfDay||St.seasonal)&&(this._captureBaseHues(),this._update(),this._startLoop()),window.addEventListener("vb:theme-change",()=>{this._hasActiveSource()&&requestAnimationFrame(()=>{this._captureBaseHues(),this._update()})})},load(){return{...St}},save(s){return St={...St,...s},T.set(Nc,Mc,St).catch(()=>{}),{...St}},setTimeOverride(s){this._timeOverride=s,this._hasActiveSource()&&this._update()},setMonthOverride(s){this._monthOverride=s,this._hasActiveSource()&&this._update()},setSource(s,t){let e=this.save({[s]:t});t?(this._captureBaseHues(),this._update(),this._startLoop()):this._hasActiveSource(e)?this._update():(this._clearModifiers(),this._stopLoop())},_hasActiveSource(s){let t=s||this.load();return t.timeOfDay||t.seasonal},_captureBaseHues(){let s=document.documentElement;s.style.removeProperty("--hue-primary"),s.style.removeProperty("--hue-secondary"),s.style.removeProperty("--hue-accent");let t=s.getAttribute("data-theme");if(t){let e=`[data-theme~="${t}"]`;for(let i of document.styleSheets)try{for(let n=0;n<i.cssRules.length;n++){let r=i.cssRules[n];if(r.selectorText?.includes(e)&&!r.selectorText.includes("dark")){let a=r.style?.getPropertyValue("--hue-primary");if(a){this._baseHues={primary:parseFloat(a)||260,secondary:parseFloat(r.style.getPropertyValue("--hue-secondary"))||200,accent:parseFloat(r.style.getPropertyValue("--hue-accent"))||30};return}}}}catch{}}this._baseHues={primary:260,secondary:200,accent:30}},_update(){let s=this.load(),t=0;s.timeOfDay&&(t+=this._getTimeOfDayOffset()),s.seasonal&&(t+=this._getSeasonalOffset());let e=document.documentElement;t!==0&&this._baseHues?(e.style.setProperty("--hue-primary",String(this._baseHues.primary+t)),e.style.setProperty("--hue-secondary",String(this._baseHues.secondary+t)),e.style.setProperty("--hue-accent",String(this._baseHues.accent+t*.5))):t===0&&this._clearModifiers()},_clearModifiers(){let s=document.documentElement;s.style.removeProperty("--hue-primary"),s.style.removeProperty("--hue-secondary"),s.style.removeProperty("--hue-accent")},_getTimeOfDayOffset(){let s=this._timeOverride??new Date().getHours()+new Date().getMinutes()/60;return s<5?-20:s<7?It(-20,20,(s-5)/2):s<10?It(20,5,(s-7)/3):s<14?It(5,0,(s-10)/4):s<17?It(0,-5,(s-14)/3):s<19?It(-5,15,(s-17)/2):s<21?It(15,-10,(s-19)/2):It(-10,-20,(s-21)/8)},_getHemisphere(){return window.__VB_ENV_LOCATION?.hemisphere||"north"},_getSeasonalOffset(){let s=this._monthOverride??new Date().getMonth(),e=this._getHemisphere()==="south"?(s+6)%12:s;return e>=2&&e<=4?5:e>=5&&e<=7?10:e>=8&&e<=10?-5:-10},_startLoop(){this._timer||(this._timer=setInterval(()=>this._update(),Sf))},_stopLoop(){this._timer&&clearInterval(this._timer),this._timer=null}};var Ei=null;function qc(){return"0.3.0-2e045630"}function Cf(){let s=document.querySelectorAll('script[src*="vanilla-breeze"]'),t="/cdn/sw.js";for(let e of s){let i=e.getAttribute("src");if(i){let n=i.lastIndexOf("/");if(n!==-1){t=i.slice(0,n)+"/sw.js";break}}}return t}function Dc(){return Ei||(Ei=navigator.serviceWorker?.ready??Promise.reject(new Error("SW not supported"))),Ei}function _c(s){return new Promise((t,e)=>{navigator.serviceWorker?.controller?$c(navigator.serviceWorker.controller,s,t,e):Dc().then(i=>{let n=i.active||i.waiting||i.installing;n?$c(n,s,t,e):e(new Error("No active service worker"))}).catch(e)})}function $c(s,t,e,i){let n=new MessageChannel;n.port1.onmessage=r=>e(r.data),n.port1.onmessageerror=()=>i(new Error("Message error")),s.postMessage({type:t},[n.port2]),setTimeout(()=>i(new Error("SW message timeout")),5e3)}async function Ic(){return _c("GET_STATUS")}async function Bc(){return _c("CLEAR_CACHE")}async function Rc(){let s=await Dc();return await s.update(),{updated:!!s.waiting}}function Tf(){return typeof window>"u"||!("serviceWorker"in navigator)?!1:window.__VB_SERVICE_WORKER?!0:document.querySelector('meta[name="vb-service-worker"]')?.content==="true"}if(Tf()){let s=Cf();window.addEventListener("load",()=>{Ei=navigator.serviceWorker.register(s).catch(t=>{console.warn("[VB] Service worker registration failed:",t)})})}at();var ee=null,lt="settings",ke={motionFx:!0,sounds:!1},mr=class extends b{#t=null;#e=null;#i=!1;#s=[];#n={...ke};#r=!1;setup(){return this.#a(),!0}async#a(){await this.#o(),this.#b(),this.#v(),this.#O(),this.listen(window,"vb:theme-change",this.#z),this.listen(window,"vb:extensions-change",this.#z),this.listen(window,"vb:a11y-themes-change",this.#z)}teardown(){}get data(){return{a11yThemes:[...this.#s],extensions:{...this.#n},sticky:this.#r}}set data(t){if(!t||typeof t!="object")return;let e=[];Array.isArray(t.a11yThemes)&&(this.#s=[...t.a11yThemes],e.push(T.set(lt,"a11y",this.#s))),t.extensions&&typeof t.extensions=="object"&&(this.#n={...ke,...t.extensions},e.push(T.set(lt,"extensions",this.#n))),t.sticky!=null&&(this.#r=!!t.sticky,e.push(T.set(lt,"sticky",this.#r?"on":"off"))),Promise.all(e).then(()=>{this.#O?.(),this.dispatchEvent(new CustomEvent("settings-panel:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0}))})}async#o(){let[t,e,i]=await Promise.all([T.get(lt,"a11y"),T.get(lt,"extensions"),T.get(lt,"sticky")]);this.#s=Array.isArray(t)?t:[],this.#n={...ke,...e??{}},this.#r=i==="on"}#l(t){return t!==""&&t!==void 0}#c(t){return t==="compact"?"compact":t==="spacious"?"spacious":"default"}#d(t,e){return t?e==="compact"?"compact":e==="spacious"?"spacious":"default":""}#p(){return this.#r}#h(t){return t!==""&&t!==void 0}#u(t){return t==="flush"?"flush":t==="elevated"?"elevated":"default"}#m(t,e){return t?e==="flush"?"flush":e==="elevated"?"elevated":"default":""}#f(t){if(!t)return"card";let e=t.split(/\s+/);for(let i of e)if(i==="stretch"||i==="integrated")return i;return"card"}#w(t){return t?t.split(/\s+/).includes("fixed"):!1}#g(t,e){let i=[];return t&&t!=="card"&&i.push(t),e&&i.push("fixed"),i.join(" ")||"card"}#b(){this.#t=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#t||(this.#t=document.createElement("button"),this.#t.setAttribute("data-trigger",""),this.#t.setAttribute("aria-label","Site settings"),this.#t.className="settings-trigger",this.#t.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>',this.prepend(this.#t)),this.#t.setAttribute("aria-haspopup","dialog"),this.#t.setAttribute("aria-expanded","false"),this.#e=document.createElement("div"),this.#e.className="settings-panel",this.#e.setAttribute("role","dialog"),this.#e.setAttribute("aria-label","Site settings");let t=`settings-panel-${crypto.randomUUID().slice(0,8)}`;this.#e.id=t,this.#t.setAttribute("aria-controls",t),this.#e.innerHTML=this.#y(),this.appendChild(this.#e)}#y(){let{mode:t,brand:e,fluid:i,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:l,pageBgGradEnd:d,pageBgGradDir:c}=$.getState(),u=this.#H(),h=this.#J(),p=this.#l(i),f=this.#c(i),m=this.#h(n),v=this.#u(n);return`
|
|
804
|
+
`}loadTiles(){let t=this.#i(),e=t?.lat??NaN,i=t?.lng??NaN;if(isNaN(e)||isNaN(i)){this.handleError("Missing or invalid lat/lng coordinates");return}let n=this.zoom,r=this.provider,{tileX:a,tileY:o,pixelX:l,pixelY:d}=Ec(e,i,n),c=this.shadowRoot.querySelector('[part="tiles"]');if(!c)return;c.innerHTML="";let u=this,h=u.offsetWidth||400,p=u.offsetHeight||300,f=Math.round(h/2-256-l),m=Math.round(p/2-256-d);c.style.transform=`translate(${f}px, ${m}px)`;let v=0,y=0,w=9;for(let A=-1;A<=1;A++)for(let k=-1;k<=1;k++){let E=a+k,C=o+A,N=vi(r,n,E,C,this.tileUrl),S=document.createElement("img");S.src=N,S.alt="",S.loading="lazy",S.draggable=!1,S.addEventListener("load",()=>{v++,v+y===w&&this.dispatchEvent(new CustomEvent("geo-map:ready",{bubbles:!0,detail:{lat:e,lng:i,zoom:n}}))}),S.addEventListener("error",()=>{y++,y===w?this.handleError("Failed to load map tiles"):v+y===w&&this.dispatchEvent(new CustomEvent("geo-map:ready",{bubbles:!0,detail:{lat:e,lng:i,zoom:n}}))}),c.appendChild(S)}}#a(){let t=this.shadowRoot.querySelector('[part="overlay"]');if(!t)return;let e=t.querySelector('[part="activate"]');t.addEventListener("mouseenter",()=>this.#o(),{once:!0}),e&&e.addEventListener("focus",()=>this.#o(),{once:!0}),e&&e.addEventListener("click",()=>this.#l()),this.interactive==="eager"&&requestAnimationFrame(()=>this.#l())}#o(){if(this.#e)return;let t=this.tileUrl;if(t)try{let r=new URL(t,location.origin);if(r.origin===location.origin){this.#e=!0;return}this.#e=!0;let a=document.createElement("link");a.rel="preconnect",a.href=r.origin,a.crossOrigin="",document.head.appendChild(a);return}catch{}this.#e=!0;let e=this.provider,i;e==="carto-light"||e==="carto-dark"?i="https://basemaps.cartocdn.com":i="https://tile.openstreetmap.org";let n=document.createElement("link");n.rel="preconnect",n.href=i,n.crossOrigin="",document.head.appendChild(n)}async#l(){if(this.#t)return;let t=this.#i(),e=t?.lat??NaN,i=t?.lng??NaN;if(isNaN(e)||isNaN(i))return;let{MapInteraction:n}=await Promise.resolve().then(()=>(Sc(),kc));this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.focus(),this.setAttribute("data-interactive-active",""),this.#t=new n({shadow:this.shadowRoot,host:this,lat:e,lng:i,zoom:this.zoom,provider:this.provider,tileUrl:this.tileUrl,onDeactivate:()=>this.#c()}),this.dispatchEvent(new CustomEvent("geo-map:activate",{bubbles:!0,detail:{lat:e,lng:i,zoom:this.zoom}}))}#c(){this.#t&&(this.#t.destroy(),this.#t=null,this.removeAttribute("data-interactive-active"),this.render(),this.loadTiles(),this.#a())}handleError(t){let e=this.shadowRoot.querySelector('[part="container"]');e&&(e.setAttribute("data-state","error"),e.setAttribute("data-error",t)),this.dispatchEvent(new CustomEvent("geo-map:error",{bubbles:!0,detail:{message:t}}))}};g("geo-map",rr);var Ai=null;async function xf(){return Ai||(Ai=await Promise.resolve().then(()=>(or(),ar)),Ai)}var lr=8,kf=150,Lc="vb-emoji-recent",cr=class extends b{#t;#e;#i;#s;#n;#r=!1;#a=[];#o=-1;#l=null;#c="";#d=null;#p=!1;#h=null;#u=null;setup(){return this.#m(),!0}async#m(){this.#d=await xf(),this.#p||(this.#f(),this.#p=!0),this.#t&&this.listen(this.#t,"click",this.#v),this.listen(document,"click",this.#E),this.listen(document,"keydown",this.#M)}teardown(){this.#l&&(clearTimeout(this.#l),this.setState("search-pending",!1))}#f(){this.#t=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#t||(this.#t=document.createElement("button"),this.#t.type="button",this.#t.textContent="\u{1F600}",this.#t.setAttribute("data-trigger",""),this.prepend(this.#t)),this.#t.setAttribute("aria-haspopup","dialog"),this.#t.setAttribute("aria-expanded","false"),this.#t.setAttribute("aria-label",this.#t.getAttribute("aria-label")||"Open emoji picker"),this.#w()}#w(){this.#e=document.createElement("div"),this.#e.classList.add("picker"),this.#e.setAttribute("role","dialog"),this.#e.setAttribute("aria-label","Emoji picker"),this.#e.hidden=!0,this.#i=document.createElement("input"),this.#i.type="search",this.#i.placeholder="Search emoji\u2026",this.#i.setAttribute("aria-label","Search emoji"),this.#i.addEventListener("input",this.#x),this.#i.addEventListener("keydown",this.#k),this.#e.appendChild(this.#i),this.#n=document.createElement("nav"),this.#n.classList.add("categories"),this.#n.setAttribute("role","tablist"),this.#n.setAttribute("aria-label","Emoji categories");for(let t of this.#d.EMOJI_GROUPS){let e=document.createElement("button");e.type="button",e.setAttribute("role","tab"),e.setAttribute("aria-selected",t===this.#d.EMOJI_GROUPS[0]?"true":"false"),e.setAttribute("data-group",t),e.setAttribute("aria-label",this.#d.EMOJI_GROUP_LABELS[t]),e.title=this.#d.EMOJI_GROUP_LABELS[t],e.textContent=this.#d.EMOJI_GROUP_ICONS[t],e.addEventListener("click",this.#C),this.#n.appendChild(e)}this.#e.appendChild(this.#n),this.#s=document.createElement("div"),this.#s.classList.add("grid"),this.#s.setAttribute("role","grid"),this.#s.setAttribute("aria-label","Emoji"),this.#s.addEventListener("keydown",this.#T),this.#e.appendChild(this.#s),this.appendChild(this.#e),this.#g()}#g(t=null){this.#s.innerHTML="",this.#a=[],this.#o=-1;let e=this.#_();if(!this.#c&&e.length>0){let n=document.createElement("div");n.classList.add("group-label"),n.textContent="Recently Used",n.setAttribute("data-group-heading","recent"),this.#s.appendChild(n);for(let r of e){let a=this.#d.EMOJI_MAP.get(r);a&&this.#b(a)}}let i=t||null;if(i)if(i.length===0){let n=document.createElement("div");n.classList.add("no-results"),n.textContent="No emoji found",this.#s.appendChild(n)}else for(let n of i)this.#b(n);else for(let n of this.#d.EMOJI_GROUPS){let r=document.createElement("div");r.classList.add("group-label"),r.textContent=this.#d.EMOJI_GROUP_LABELS[n],r.setAttribute("data-group-heading",n),this.#s.appendChild(r);let a=this.#d.getByGroup(n);for(let o of a)this.#b(o)}}#b(t){let e=document.createElement("button");e.type="button",e.setAttribute("role","gridcell"),e.setAttribute("tabindex","-1"),e.setAttribute("data-shortcode",t.shortcode),e.title=`${t.name} :${t.shortcode}:`,e.textContent=t.emoji,e.addEventListener("click",this.#A),this.#s.appendChild(e),this.#a.push(e)}#y(){let t=this.getAttribute("for");if(!t)return;let e=document.getElementById(t);if(e){if(e.tagName==="INPUT"||e.tagName==="TEXTAREA"){let i=e;this.#h={start:i.selectionStart??i.value.length,end:i.selectionEnd??i.value.length},this.#u=null}else if(e.isContentEditable){let i=window.getSelection();i&&i.rangeCount>0&&(this.#u=i.getRangeAt(0).cloneRange()),this.#h=null}}}#v=t=>{t.stopPropagation(),this.toggle()};#E=t=>{this.#r&&!this.contains(t.target)&&this.close()};#M=t=>{t.key==="Escape"&&this.#r&&(t.preventDefault(),this.close(),this.#t?.focus())};#x=()=>{this.#l&&clearTimeout(this.#l),this.setState("search-pending",!0),this.#l=setTimeout(()=>{if(this.setState("search-pending",!1),this.#c=this.#i.value.trim(),this.#c){let t=this.#d.searchEmoji(this.#c);this.#g(t)}else this.#g()},kf)};#k=t=>{t.key==="ArrowDown"&&(t.preventDefault(),this.#a.length>0&&this.#S(0))};#C=t=>{let e=t.currentTarget.getAttribute("data-group");for(let n of this.#n.querySelectorAll('[role="tab"]'))n.setAttribute("aria-selected",n===t.currentTarget?"true":"false");this.#c&&(this.#i.value="",this.#c="",this.#g());let i=this.#s.querySelector(`[data-group-heading="${e}"]`);i&&i.scrollIntoView({block:"start",behavior:"smooth"})};#T=t=>{let e=this.#a.length;if(e!==0)switch(t.key){case"ArrowRight":t.preventDefault(),this.#S(this.#o+1);break;case"ArrowLeft":t.preventDefault(),this.#S(this.#o-1);break;case"ArrowDown":t.preventDefault(),this.#S(this.#o+lr);break;case"ArrowUp":t.preventDefault(),this.#o<lr?(this.#i.focus(),this.#o=-1):this.#S(this.#o-lr);break;case"Home":t.preventDefault(),this.#S(0);break;case"End":t.preventDefault(),this.#S(e-1);break;case"Enter":case" ":t.preventDefault(),this.#o>=0&&this.#a[this.#o].click();break;case"Tab":this.close();break}};#A=t=>{let e=t.currentTarget.getAttribute("data-shortcode"),i=this.#d.EMOJI_MAP.get(e);i&&(this.#N(e),this.#$(i),this.dispatchEvent(new CustomEvent("emoji-picker:select",{bubbles:!0,detail:{shortcode:i.shortcode,emoji:i.emoji,name:i.name,keywords:i.keywords}})),this.close(),this.#L())};#S(t){let e=this.#a.length;e!==0&&(t<0&&(t=0),t>=e&&(t=e-1),this.#o=t,this.#a[t].focus())}#$(t){let e=this.getAttribute("for");if(!e)return;let i=document.getElementById(e);if(i){if(i.tagName==="INPUT"||i.tagName==="TEXTAREA"){let n=i,r=this.#h?.start??n.value.length,a=this.#h?.end??r,o=n.value.slice(0,r),l=n.value.slice(a);n.value=o+t.emoji+l;let d=r+t.emoji.length;n.setSelectionRange(d,d),this.#h={start:d,end:d},i.dispatchEvent(new Event("input",{bubbles:!0}))}else if(i.isContentEditable){i.focus();let n=window.getSelection();if(n&&this.#u){n.removeAllRanges(),n.addRange(this.#u);let r=n.getRangeAt(0);r.deleteContents();let a=document.createTextNode(t.emoji);r.insertNode(a),r.setStartAfter(a),r.collapse(!0),n.removeAllRanges(),n.addRange(r),this.#u=r.cloneRange()}else if(n){let r=document.createRange();r.selectNodeContents(i),r.collapse(!1);let a=document.createTextNode(t.emoji);r.insertNode(a),r.setStartAfter(a),r.collapse(!0),n.removeAllRanges(),n.addRange(r)}}}}#L(){let t=this.getAttribute("for");if(!t)return;let e=document.getElementById(t);e&&e.focus()}#_(){try{return JSON.parse(localStorage.getItem(Lc)||"[]")}catch{return[]}}#N(t){let e=parseInt(this.getAttribute("recent-limit")??"24",10)||24,i=this.#_();i=i.filter(n=>n!==t),i.unshift(t),i.length>e&&(i.length=e);try{localStorage.setItem(Lc,JSON.stringify(i))}catch{}}open(){this.#r||(this.#y(),this.#r=!0,this.setAttribute("open",""),this.#t?.setAttribute("aria-expanded","true"),this.#e.hidden=!1,this.#i.value="",this.#c="",this.#g(),requestAnimationFrame(()=>{this.#i.focus()}),this.dispatchEvent(new CustomEvent("emoji-picker:open",{bubbles:!0})))}close(){this.#r&&(this.#r=!1,this.removeAttribute("open"),this.#t?.setAttribute("aria-expanded","false"),this.#e.hidden=!0,this.dispatchEvent(new CustomEvent("emoji-picker:close",{bubbles:!0})))}toggle(){this.#r?this.close():this.open()}get isOpen(){return this.#r}};g("emoji-picker",cr);at();var Nc="environment",Mc="preferences",dr={timeOfDay:!1,seasonal:!1},Sf=900*1e3,St={...dr};function It(s,t,e){return s+(t-s)*Math.min(1,Math.max(0,e))}var Bt={_timer:null,_baseHues:null,_timeOverride:null,_monthOverride:null,async init(){let s=await T.get(Nc,Mc);St=s?{...dr,...s}:{...dr},(St.timeOfDay||St.seasonal)&&(this._captureBaseHues(),this._update(),this._startLoop()),window.addEventListener("vb:theme-change",()=>{this._hasActiveSource()&&requestAnimationFrame(()=>{this._captureBaseHues(),this._update()})})},load(){return{...St}},save(s){return St={...St,...s},T.set(Nc,Mc,St).catch(()=>{}),{...St}},setTimeOverride(s){this._timeOverride=s,this._hasActiveSource()&&this._update()},setMonthOverride(s){this._monthOverride=s,this._hasActiveSource()&&this._update()},setSource(s,t){let e=this.save({[s]:t});t?(this._captureBaseHues(),this._update(),this._startLoop()):this._hasActiveSource(e)?this._update():(this._clearModifiers(),this._stopLoop())},_hasActiveSource(s){let t=s||this.load();return t.timeOfDay||t.seasonal},_captureBaseHues(){let s=document.documentElement;s.style.removeProperty("--hue-primary"),s.style.removeProperty("--hue-secondary"),s.style.removeProperty("--hue-accent");let t=s.getAttribute("data-theme");if(t){let e=`[data-theme~="${t}"]`;for(let i of document.styleSheets)try{for(let n=0;n<i.cssRules.length;n++){let r=i.cssRules[n];if(r.selectorText?.includes(e)&&!r.selectorText.includes("dark")){let a=r.style?.getPropertyValue("--hue-primary");if(a){this._baseHues={primary:parseFloat(a)||260,secondary:parseFloat(r.style.getPropertyValue("--hue-secondary"))||200,accent:parseFloat(r.style.getPropertyValue("--hue-accent"))||30};return}}}}catch{}}this._baseHues={primary:260,secondary:200,accent:30}},_update(){let s=this.load(),t=0;s.timeOfDay&&(t+=this._getTimeOfDayOffset()),s.seasonal&&(t+=this._getSeasonalOffset());let e=document.documentElement;t!==0&&this._baseHues?(e.style.setProperty("--hue-primary",String(this._baseHues.primary+t)),e.style.setProperty("--hue-secondary",String(this._baseHues.secondary+t)),e.style.setProperty("--hue-accent",String(this._baseHues.accent+t*.5))):t===0&&this._clearModifiers()},_clearModifiers(){let s=document.documentElement;s.style.removeProperty("--hue-primary"),s.style.removeProperty("--hue-secondary"),s.style.removeProperty("--hue-accent")},_getTimeOfDayOffset(){let s=this._timeOverride??new Date().getHours()+new Date().getMinutes()/60;return s<5?-20:s<7?It(-20,20,(s-5)/2):s<10?It(20,5,(s-7)/3):s<14?It(5,0,(s-10)/4):s<17?It(0,-5,(s-14)/3):s<19?It(-5,15,(s-17)/2):s<21?It(15,-10,(s-19)/2):It(-10,-20,(s-21)/8)},_getHemisphere(){return window.__VB_ENV_LOCATION?.hemisphere||"north"},_getSeasonalOffset(){let s=this._monthOverride??new Date().getMonth(),e=this._getHemisphere()==="south"?(s+6)%12:s;return e>=2&&e<=4?5:e>=5&&e<=7?10:e>=8&&e<=10?-5:-10},_startLoop(){this._timer||(this._timer=setInterval(()=>this._update(),Sf))},_stopLoop(){this._timer&&clearInterval(this._timer),this._timer=null}};var Ei=null;function qc(){return"0.3.1-289faf69"}function Cf(){let s=document.querySelectorAll('script[src*="vanilla-breeze"]'),t="/cdn/sw.js";for(let e of s){let i=e.getAttribute("src");if(i){let n=i.lastIndexOf("/");if(n!==-1){t=i.slice(0,n)+"/sw.js";break}}}return t}function Dc(){return Ei||(Ei=navigator.serviceWorker?.ready??Promise.reject(new Error("SW not supported"))),Ei}function _c(s){return new Promise((t,e)=>{navigator.serviceWorker?.controller?$c(navigator.serviceWorker.controller,s,t,e):Dc().then(i=>{let n=i.active||i.waiting||i.installing;n?$c(n,s,t,e):e(new Error("No active service worker"))}).catch(e)})}function $c(s,t,e,i){let n=new MessageChannel;n.port1.onmessage=r=>e(r.data),n.port1.onmessageerror=()=>i(new Error("Message error")),s.postMessage({type:t},[n.port2]),setTimeout(()=>i(new Error("SW message timeout")),5e3)}async function Ic(){return _c("GET_STATUS")}async function Bc(){return _c("CLEAR_CACHE")}async function Rc(){let s=await Dc();return await s.update(),{updated:!!s.waiting}}function Tf(){return typeof window>"u"||!("serviceWorker"in navigator)?!1:window.__VB_SERVICE_WORKER?!0:document.querySelector('meta[name="vb-service-worker"]')?.content==="true"}if(Tf()){let s=Cf();window.addEventListener("load",()=>{Ei=navigator.serviceWorker.register(s).catch(t=>{console.warn("[VB] Service worker registration failed:",t)})})}at();var ee=null,lt="settings",ke={motionFx:!0,sounds:!1},mr=class extends b{#t=null;#e=null;#i=!1;#s=[];#n={...ke};#r=!1;setup(){return this.#a(),!0}async#a(){await this.#o(),this.#b(),this.#v(),this.#O(),this.listen(window,"vb:theme-change",this.#z),this.listen(window,"vb:extensions-change",this.#z),this.listen(window,"vb:a11y-themes-change",this.#z)}teardown(){}get data(){return{a11yThemes:[...this.#s],extensions:{...this.#n},sticky:this.#r}}set data(t){if(!t||typeof t!="object")return;let e=[];Array.isArray(t.a11yThemes)&&(this.#s=[...t.a11yThemes],e.push(T.set(lt,"a11y",this.#s))),t.extensions&&typeof t.extensions=="object"&&(this.#n={...ke,...t.extensions},e.push(T.set(lt,"extensions",this.#n))),t.sticky!=null&&(this.#r=!!t.sticky,e.push(T.set(lt,"sticky",this.#r?"on":"off"))),Promise.all(e).then(()=>{this.#O?.(),this.dispatchEvent(new CustomEvent("settings-panel:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0}))})}async#o(){let[t,e,i]=await Promise.all([T.get(lt,"a11y"),T.get(lt,"extensions"),T.get(lt,"sticky")]);this.#s=Array.isArray(t)?t:[],this.#n={...ke,...e??{}},this.#r=i==="on"}#l(t){return t!==""&&t!==void 0}#c(t){return t==="compact"?"compact":t==="spacious"?"spacious":"default"}#d(t,e){return t?e==="compact"?"compact":e==="spacious"?"spacious":"default":""}#p(){return this.#r}#h(t){return t!==""&&t!==void 0}#u(t){return t==="flush"?"flush":t==="elevated"?"elevated":"default"}#m(t,e){return t?e==="flush"?"flush":e==="elevated"?"elevated":"default":""}#f(t){if(!t)return"card";let e=t.split(/\s+/);for(let i of e)if(i==="stretch"||i==="integrated")return i;return"card"}#w(t){return t?t.split(/\s+/).includes("fixed"):!1}#g(t,e){let i=[];return t&&t!=="card"&&i.push(t),e&&i.push("fixed"),i.join(" ")||"card"}#b(){this.#t=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#t||(this.#t=document.createElement("button"),this.#t.setAttribute("data-trigger",""),this.#t.setAttribute("aria-label","Site settings"),this.#t.className="settings-trigger",this.#t.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>',this.prepend(this.#t)),this.#t.setAttribute("aria-haspopup","dialog"),this.#t.setAttribute("aria-expanded","false"),this.#e=document.createElement("div"),this.#e.className="settings-panel",this.#e.setAttribute("role","dialog"),this.#e.setAttribute("aria-label","Site settings");let t=`settings-panel-${crypto.randomUUID().slice(0,8)}`;this.#e.id=t,this.#t.setAttribute("aria-controls",t),this.#e.innerHTML=this.#y(),this.appendChild(this.#e)}#y(){let{mode:t,brand:e,fluid:i,backdrop:n,backdropChrome:r,pageBgType:a,pageBgColor:o,pageBgGradStart:l,pageBgGradEnd:d,pageBgGradDir:c}=$.getState(),u=this.#H(),h=this.#J(),p=this.#l(i),f=this.#c(i),m=this.#h(n),v=this.#u(n);return`
|
|
805
805
|
<header class="settings-header">
|
|
806
806
|
<strong>Settings</strong>
|
|
807
807
|
<button type="button" class="settings-close" aria-label="Close settings">
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
var k=window.matchMedia("(prefers-reduced-motion: reduce)");var b=new Map;function y(s,t,n={}){let e=n.priority??10,r={impl:t,bundle:n.bundle,contract:n.contract,priority:e},a=b.get(s);if(customElements.get(s)){if(!a||a.priority>=e){a&&a.priority===e&&a.impl!==t&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${a.bundle}" (priority ${a.priority}). Skipping "${n.bundle}".`);return}console.warn(`[VB Bundle] Tag <${s}> defined by "${a.bundle}" cannot be replaced (customElements.define is permanent). "${n.bundle}" has higher priority but arrived late.`);return}if(a&&a.priority>=e){a.priority===e&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${a.bundle}". Skipping "${n.bundle}" (first wins at equal priority).`);return}b.set(s,r),customElements.define(s,t)}var u=class extends HTMLElement{#t=[];#e;connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let t of this.#t)t();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,n,e,r){t.addEventListener(n,e,r),this.#t.push(()=>t.removeEventListener(n,e,r))}setup(){}teardown(){}setState(t,n){this.#e||(this.#e=this.attachInternals());let e=this.#e.states;try{n?e.add(t):e.delete(t)}catch{let r=`--${t}`;n?e.add(r):e.delete(r)}}_adoptInternals(t){this.#e||(this.#e=t)}};function g(s){let t=String(s||"").trim();if(!t)return null;let n=t.match(/^#([0-9a-f]{3,8})$/i);if(n){let e=n[1];if(e.length===3)return[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16)];if(e.length===4)return[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16)];if(e.length===6)return[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)];if(e.length===8)return[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}if(n=t.match(/^rgba?\s*\(\s*([0-9.]+)[\s,]+([0-9.]+)[\s,]+([0-9.]+)/i),n)return[Math.round(+n[1]),Math.round(+n[2]),Math.round(+n[3])];if(typeof document<"u"){let e=document.createElement("span");e.style.color=t,e.style.display="none",document.body.appendChild(e);let r=getComputedStyle(e).color;e.remove();let a=r.match(/^rgba?\s*\(\s*([0-9.]+)[\s,]+([0-9.]+)[\s,]+([0-9.]+)/i);if(a)return[Math.round(+a[1]),Math.round(+a[2]),Math.round(+a[3])]}return null}function f(s){let t=s/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function E([s,t,n]){return .2126*f(s)+.7152*f(t)+.0722*f(n)}function $(s,t){let n=g(s),e=g(t);if(!n||!e)return null;let r=E(n),a=E(e),o=Math.max(r,a),c=Math.min(r,a);return(o+.05)/(c+.05)}function M(s){return s==null?{aaNormal:!1,aaLarge:!1,aaaNormal:!1,aaaLarge:!1}:{aaNormal:s>=4.5,aaLarge:s>=3,aaaNormal:s>=7,aaaLarge:s>=4.5}}var m=class extends u{static observedAttributes=["type"];setup(){(this.getAttribute("type")||"contrast")==="checklist"?this.#n():this.#t()}attributeChangedCallback(t,n,e){!this.isConnected||n===e||this.setup()}#t(){let t=[...this.querySelectorAll(":scope > button[data-fg][data-bg]")].map(a=>({fg:a.dataset.fg,bg:a.dataset.bg,label:a.dataset.label||a.textContent.trim()||`${a.dataset.fg} on ${a.dataset.bg}`})),n=document.createElement("table");n.className="as-contrast-table";let e=document.createElement("thead");e.innerHTML=`
|
|
2
|
-
<tr>
|
|
3
|
-
<th scope="col">Pair</th>
|
|
4
|
-
<th scope="col">Sample</th>
|
|
5
|
-
<th scope="col">Ratio</th>
|
|
6
|
-
<th scope="col">AA</th>
|
|
7
|
-
<th scope="col">AA Large</th>
|
|
8
|
-
<th scope="col">AAA</th>
|
|
9
|
-
<th scope="col">AAA Large</th>
|
|
10
|
-
</tr>`,n.appendChild(e);let r=document.createElement("tbody");if(t.length===0){let a=document.createElement("tr"),o=document.createElement("td");o.colSpan=7,o.className="as-empty",o.textContent='No color pairs authored. Add <button data-fg="\u2026" data-bg="\u2026">Label</button> children.',a.appendChild(o),r.appendChild(a)}else for(let a of t)r.appendChild(this.#e(a));n.appendChild(r),this.replaceChildren(n)}#e({fg:t,bg:n,label:e}){let r=$(t,n),a=M(r),o=r==null?"?":`${r.toFixed(2)}:1`,c=document.createElement("tr"),i=document.createElement("th");i.scope="row",i.className="as-pair-label",i.innerHTML=`<span class="as-swatch" style="background:${n};border-color:${t}"></span><span>${N(e)}</span>`,c.appendChild(i);let l=document.createElement("td");l.className="as-pair-sample",l.style.background=n,l.style.color=t,l.textContent="Aa Bb 123",c.appendChild(l);let p=document.createElement("td");p.className="as-pair-ratio",p.textContent=o,c.appendChild(p);for(let C of["aaNormal","aaLarge","aaaNormal","aaaLarge"]){let d=document.createElement("td"),h=a[C];d.className=`as-badge ${h?"as-pass":"as-fail"}`,d.textContent=h?"\u2713":"\u2717",d.setAttribute("aria-label",h?"Pass":"Fail"),c.appendChild(d)}return c}#n(){let t=this.querySelector(":scope > ul, :scope > ol");if(t){t.classList.add("as-checklist");for(let n of t.querySelectorAll(":scope > li"))this.#a(n)}}#a(t){if(t.dataset.decorated==="")return;t.dataset.decorated="";let n=t.dataset.status||"na";t.classList.add(`as-status-${n}`);let e=document.createElement("span");e.className="as-checklist-icon",e.setAttribute("aria-hidden","true"),e.textContent={pass:"\u2713",fail:"\u2717",warn:"!",na:"\u2013"}[n]||"\u2013";let r={pass:"Pass",fail:"Fail",warn:"Warning",na:"Not applicable"}[n]||"Not applicable",a=document.createElement("span");a.className="as-sr-only",a.textContent=`${r}: `,t.prepend(e,a)}};function N(s){return String(s).replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}y("accessibility-specimen",m);export{m as AccessibilitySpecimen};
|
|
11
|
-
//# sourceMappingURL=accessibility-specimen.js.map
|
|
@@ -1,403 +0,0 @@
|
|
|
1
|
-
var l=`
|
|
2
|
-
:host {
|
|
3
|
-
--_bg: var(--adr-wc-bg, var(--color-surface, #ffffff));
|
|
4
|
-
--_text: var(--adr-wc-text, var(--color-text, #1a1a1a));
|
|
5
|
-
--_muted: var(--adr-wc-muted, var(--color-text-muted, #666));
|
|
6
|
-
--_border: var(--adr-wc-border, var(--color-border, #e0e0e0));
|
|
7
|
-
--_accent: var(--adr-wc-accent, var(--color-interactive, #0066cc));
|
|
8
|
-
--_card-bg: var(--adr-wc-card-bg, var(--color-surface-raised, #f8f9fa));
|
|
9
|
-
--_highlight: var(--adr-wc-highlight, color-mix(in srgb, var(--_accent) 8%, transparent));
|
|
10
|
-
--_radius: var(--adr-wc-radius, var(--radius-l, 0.75rem));
|
|
11
|
-
--_shadow: var(--adr-wc-shadow, var(--shadow-sm));
|
|
12
|
-
--_shadow-hover: var(--adr-wc-shadow-hover, var(--shadow-md));
|
|
13
|
-
--_duration: var(--adr-wc-duration, var(--duration-normal, 200ms));
|
|
14
|
-
--_ease: var(--adr-wc-ease, var(--ease-default, ease));
|
|
15
|
-
--_space-2xs: var(--adr-wc-space-2xs, var(--size-2xs, 0.25rem));
|
|
16
|
-
--_space-xs: var(--adr-wc-space-xs, var(--size-xs, 0.5rem));
|
|
17
|
-
--_space-s: var(--adr-wc-space-s, var(--size-s, 0.75rem));
|
|
18
|
-
--_space-m: var(--adr-wc-space-m, var(--size-m, 1rem));
|
|
19
|
-
--_font-xs: var(--adr-wc-font-xs, var(--font-size-xs, 0.75rem));
|
|
20
|
-
--_font-sm: var(--adr-wc-font-sm, var(--font-size-sm, 0.875rem));
|
|
21
|
-
--_font-md: var(--adr-wc-font-md, var(--font-size-md, 1rem));
|
|
22
|
-
--_font-lg: var(--adr-wc-font-lg, var(--font-size-lg, 1.125rem));
|
|
23
|
-
--_font-mono: var(--adr-wc-font-mono, var(--font-mono, ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace));
|
|
24
|
-
--_radius-s: var(--adr-wc-radius-s, var(--radius-s, 0.25rem));
|
|
25
|
-
--_radius-full: var(--adr-wc-radius-full, var(--radius-full, 9999px));
|
|
26
|
-
|
|
27
|
-
display: block;
|
|
28
|
-
font-family: var(--adr-wc-font, var(--font-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
*, *::before, *::after { box-sizing: border-box; margin: 0; }
|
|
32
|
-
|
|
33
|
-
/* \u2500\u2500 Card \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
34
|
-
.adr-card {
|
|
35
|
-
background: var(--_bg);
|
|
36
|
-
border: 1px solid var(--_border);
|
|
37
|
-
border-radius: var(--_radius);
|
|
38
|
-
overflow: hidden;
|
|
39
|
-
box-shadow: var(--_shadow);
|
|
40
|
-
transition: box-shadow var(--_duration) var(--_ease);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.adr-card:hover {
|
|
44
|
-
box-shadow: var(--_shadow-hover);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/* \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
48
|
-
.adr-header {
|
|
49
|
-
display: flex;
|
|
50
|
-
align-items: center;
|
|
51
|
-
justify-content: space-between;
|
|
52
|
-
padding: var(--_space-s) var(--_space-m);
|
|
53
|
-
background: var(--_card-bg);
|
|
54
|
-
border-block-end: 1px solid var(--_border);
|
|
55
|
-
gap: var(--_space-s);
|
|
56
|
-
flex-wrap: wrap;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.adr-meta {
|
|
60
|
-
display: flex;
|
|
61
|
-
align-items: center;
|
|
62
|
-
gap: var(--_space-xs);
|
|
63
|
-
flex-wrap: wrap;
|
|
64
|
-
min-width: 0;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.adr-id {
|
|
68
|
-
font-size: var(--_font-xs);
|
|
69
|
-
font-weight: 600;
|
|
70
|
-
color: var(--_muted);
|
|
71
|
-
font-family: var(--_font-mono);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/* \u2500\u2500 Status badge \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
75
|
-
.adr-badges {
|
|
76
|
-
display: flex;
|
|
77
|
-
align-items: center;
|
|
78
|
-
gap: var(--_space-xs);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.adr-status {
|
|
82
|
-
font-size: 11px;
|
|
83
|
-
padding: 4px 10px;
|
|
84
|
-
border-radius: var(--_radius-full);
|
|
85
|
-
font-weight: 600;
|
|
86
|
-
text-transform: uppercase;
|
|
87
|
-
letter-spacing: 0.3px;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/* \u2500\u2500 Date (slotted <time>) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
91
|
-
.adr-date-wrap {
|
|
92
|
-
display: inline-flex;
|
|
93
|
-
align-items: center;
|
|
94
|
-
gap: 4px;
|
|
95
|
-
font-size: var(--_font-xs);
|
|
96
|
-
color: var(--_muted);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.adr-date-wrap svg {
|
|
100
|
-
width: 12px;
|
|
101
|
-
height: 12px;
|
|
102
|
-
flex-shrink: 0;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
::slotted([slot="date"]) {
|
|
106
|
-
font-size: var(--_font-xs);
|
|
107
|
-
font-family: var(--_font-mono);
|
|
108
|
-
color: var(--_muted);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/* \u2500\u2500 Body \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
112
|
-
.adr-body {
|
|
113
|
-
padding: 16px 20px;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/* \u2500\u2500 Title (slotted heading) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
117
|
-
.adr-title-wrap {
|
|
118
|
-
margin-block-end: 0;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
::slotted([slot="title"]) {
|
|
122
|
-
font-size: var(--_font-lg) !important;
|
|
123
|
-
font-weight: 700 !important;
|
|
124
|
-
color: var(--_text) !important;
|
|
125
|
-
line-height: 1.4 !important;
|
|
126
|
-
margin: 0 !important;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/* Fallback title when no slot content */
|
|
130
|
-
.adr-title-fallback {
|
|
131
|
-
font-size: var(--_font-lg);
|
|
132
|
-
font-weight: 700;
|
|
133
|
-
color: var(--_text);
|
|
134
|
-
line-height: 1.4;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/* \u2500\u2500 Supersedes / Superseded-by links \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
138
|
-
.adr-links {
|
|
139
|
-
display: flex;
|
|
140
|
-
flex-wrap: wrap;
|
|
141
|
-
gap: 4px;
|
|
142
|
-
margin-block-start: var(--_space-s);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.adr-links-label {
|
|
146
|
-
font-size: 11px;
|
|
147
|
-
font-weight: 600;
|
|
148
|
-
color: var(--_muted);
|
|
149
|
-
text-transform: uppercase;
|
|
150
|
-
letter-spacing: 0.3px;
|
|
151
|
-
margin-inline-end: var(--_space-2xs);
|
|
152
|
-
align-self: center;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.adr-link {
|
|
156
|
-
display: inline-flex;
|
|
157
|
-
align-items: center;
|
|
158
|
-
gap: 3px;
|
|
159
|
-
font-size: 11px;
|
|
160
|
-
font-weight: 500;
|
|
161
|
-
padding: 2px 8px;
|
|
162
|
-
border-radius: var(--_radius-s);
|
|
163
|
-
background: var(--_highlight);
|
|
164
|
-
color: var(--_accent);
|
|
165
|
-
text-decoration: none;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.adr-link:hover {
|
|
169
|
-
text-decoration: underline;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.adr-link svg {
|
|
173
|
-
width: 11px;
|
|
174
|
-
height: 11px;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/* \u2500\u2500 Sections \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
178
|
-
.adr-sections {
|
|
179
|
-
border-block-start: 1px solid var(--_border);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.adr-section {
|
|
183
|
-
padding: 14px 20px;
|
|
184
|
-
border-block-end: 1px solid var(--_border);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.adr-section:last-child {
|
|
188
|
-
border-block-end: none;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.adr-section-header {
|
|
192
|
-
display: flex;
|
|
193
|
-
align-items: center;
|
|
194
|
-
gap: var(--_space-xs);
|
|
195
|
-
margin-block-end: var(--_space-s);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.adr-section-icon {
|
|
199
|
-
width: 22px;
|
|
200
|
-
height: 22px;
|
|
201
|
-
border-radius: 5px;
|
|
202
|
-
display: flex;
|
|
203
|
-
align-items: center;
|
|
204
|
-
justify-content: center;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.adr-section-icon svg {
|
|
208
|
-
width: 13px;
|
|
209
|
-
height: 13px;
|
|
210
|
-
fill: var(--color-text-inverted, #fff);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.adr-section-icon.context { background: var(--color-accent, #8b5cf6); }
|
|
214
|
-
.adr-section-icon.decision { background: var(--color-success, #22c55e); }
|
|
215
|
-
.adr-section-icon.consequences { background: var(--color-warning, #f59e0b); }
|
|
216
|
-
|
|
217
|
-
.adr-section-title {
|
|
218
|
-
font-size: var(--_font-xs);
|
|
219
|
-
font-weight: 600;
|
|
220
|
-
color: var(--_muted);
|
|
221
|
-
text-transform: uppercase;
|
|
222
|
-
letter-spacing: 0.5px;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.adr-section-content {
|
|
226
|
-
color: var(--_text);
|
|
227
|
-
font-size: var(--_font-sm);
|
|
228
|
-
line-height: 1.6;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.adr-section-content ::slotted(ul),
|
|
232
|
-
.adr-section-content ::slotted(ol) {
|
|
233
|
-
margin: 0;
|
|
234
|
-
padding-inline-start: 20px;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.adr-section-content ::slotted(p) {
|
|
238
|
-
margin: 0;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.slot-fallback {
|
|
242
|
-
color: var(--_muted);
|
|
243
|
-
font-style: italic;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
/* \u2500\u2500 Minimal detail \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
247
|
-
.adr-card--minimal {
|
|
248
|
-
padding: var(--_space-xs);
|
|
249
|
-
cursor: pointer;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.adr-card--minimal:hover {
|
|
253
|
-
box-shadow: var(--_shadow-hover);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.adr-card--minimal:focus-visible {
|
|
257
|
-
outline: 2px solid var(--_accent);
|
|
258
|
-
outline-offset: 2px;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.adr-card--minimal .adr-header { display: none; }
|
|
262
|
-
.adr-card--minimal .adr-sections { display: none; }
|
|
263
|
-
.adr-card--minimal .adr-links { display: none; }
|
|
264
|
-
.adr-card--minimal .adr-date-wrap { display: none; }
|
|
265
|
-
|
|
266
|
-
.adr-card--minimal .adr-body {
|
|
267
|
-
padding: var(--_space-xs) var(--_space-s);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.adr-card--minimal .adr-title-fallback,
|
|
271
|
-
.adr-card--minimal ::slotted([slot="title"]) {
|
|
272
|
-
font-size: var(--_font-sm) !important;
|
|
273
|
-
font-weight: 600 !important;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.adr-card--minimal .adr-id {
|
|
277
|
-
display: block;
|
|
278
|
-
margin-block-end: var(--_space-2xs);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.adr-card--minimal .adr-status {
|
|
282
|
-
font-size: 10px;
|
|
283
|
-
padding: 2px 6px;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
/* \u2500\u2500 Compact detail \u2014 hide empty sections \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
287
|
-
.adr-card--compact .adr-section[data-empty] {
|
|
288
|
-
display: none;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.adr-card--compact .slot-fallback {
|
|
292
|
-
display: none;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
.adr-card--compact .adr-body {
|
|
296
|
-
padding: var(--_space-s) var(--_space-m);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/* \u2500\u2500 Responsive \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
300
|
-
@media (max-width: 480px) {
|
|
301
|
-
.adr-header {
|
|
302
|
-
flex-direction: column;
|
|
303
|
-
align-items: flex-start;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
.adr-badges {
|
|
307
|
-
width: 100%;
|
|
308
|
-
justify-content: flex-start;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
@media (prefers-reduced-motion: reduce) {
|
|
313
|
-
.adr-card {
|
|
314
|
-
transition: none;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
@media print {
|
|
319
|
-
.adr-card {
|
|
320
|
-
box-shadow: none;
|
|
321
|
-
break-inside: avoid;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
.state-msg { padding: var(--_space-m); font-size: var(--_font-sm); color: var(--_muted); font-style: italic; }
|
|
326
|
-
.state-msg--error { color: var(--color-error-text, var(--color-error, #dc2626)); }
|
|
327
|
-
`;var b=window.matchMedia("(prefers-reduced-motion: reduce)");var m=new Map;function f(s,e,t={}){let a=t.priority??10,o={impl:e,bundle:t.bundle,contract:t.contract,priority:a},r=m.get(s);if(customElements.get(s)){if(!r||r.priority>=a){r&&r.priority===a&&r.impl!==e&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${r.bundle}" (priority ${r.priority}). Skipping "${t.bundle}".`);return}console.warn(`[VB Bundle] Tag <${s}> defined by "${r.bundle}" cannot be replaced (customElements.define is permanent). "${t.bundle}" has higher priority but arrived late.`);return}if(r&&r.priority>=a){r.priority===a&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${r.bundle}". Skipping "${t.bundle}" (first wins at equal priority).`);return}m.set(s,o),customElements.define(s,e)}function i(s){return String(s).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function n(s){return`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${s}</svg>`}var p={user:'<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>',pencil:'<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/><path d="m15 5 4 4"/>',check:'<path d="M20 6 9 17l-5-5"/>',target:'<circle cx="12" cy="12" r="10"/><circle cx="12" cy="12" r="6"/><circle cx="12" cy="12" r="2"/>',alertTriangle:'<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/>',messageCircle:'<path d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719"/>',lightbulb:'<path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"/><path d="M9 18h6"/><path d="M10 22h4"/>',wrench:'<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z"/>',heart:'<path d="M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5"/>',mapPin:'<path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"/><circle cx="12" cy="10" r="3"/>',checkCircle:'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><path d="m9 11 3 3L22 4"/>',x:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" x2="12" y1="15" y2="3"/>',send:'<path d="M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"/><path d="m21.854 2.147-10.94 10.939"/>'},y={says:{label:"Says",icon:p.messageCircle,color:"#3b82f6"},thinks:{label:"Thinks",icon:p.lightbulb,color:"#8b5cf6"},does:{label:"Does",icon:p.wrench,color:"#f59e0b"},feels:{label:"Feels",icon:p.heart,color:"#ef4444"}};var v={proposed:{label:"Proposed",color:"#3b82f6",bg:"rgba(59, 130, 246, 0.1)"},accepted:{label:"Accepted",color:"#22c55e",bg:"rgba(34, 197, 94, 0.1)"},deprecated:{label:"Deprecated",color:"#f59e0b",bg:"rgba(245, 158, 11, 0.1)"},superseded:{label:"Superseded",color:"#6b7280",bg:"rgba(107, 114, 128, 0.1)"}},c={calendar:'<rect width="18" height="18" x="3" y="4" rx="2" ry="2"/><line x1="16" x2="16" y1="2" y2="6"/><line x1="8" x2="8" y1="2" y2="6"/><line x1="3" x2="21" y1="10" y2="10"/>',context:'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" x2="8" y1="13" y2="13"/><line x1="16" x2="8" y1="17" y2="17"/><line x1="10" x2="8" y1="9" y2="9"/>',decision:'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><path d="m9 11 3 3L22 4"/>',consequences:'<path d="m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z"/><path d="m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z"/><path d="M7 21h10"/><path d="M12 3v18"/><path d="M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2"/>',arrowRight:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>'},u=class extends HTMLElement{static get observedAttributes(){return["adr-id","status","supersedes","superseded-by","detail","compact","src"]}#e=new Map;constructor(){super(),this.attachShadow({mode:"open"})}#a(){for(let e of[...this.children]){let t=e.getAttribute("slot");t&&this.#e.set(t,e.textContent.trim())}}connectedCallback(){this.#a(),this.adrId&&!this.id&&(this.id=this.adrId),this.hasAttribute("src")&&this._loadSrc(this.getAttribute("src")),this.#t(),this.setAttribute("data-upgraded","")}disconnectedCallback(){this.removeAttribute("data-upgraded")}attributeChangedCallback(e,t,a){t!==a&&this.shadowRoot&&(e==="src"&&this.isConnected?this._loadSrc(a):this.#t())}get adrId(){return this.getAttribute("adr-id")||""}get status(){return this.getAttribute("status")||"proposed"}get adrTitle(){return this.querySelector('[slot="title"]')?.textContent?.trim()||this.#e.get("title")||""}get adrDate(){let e=this.querySelector('[slot="date"]');return e?.getAttribute("datetime")||e?.textContent?.trim()||this.#e.get("date")||""}get supersedes(){let e=this.getAttribute("supersedes")||"";return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}get supersededBy(){let e=this.getAttribute("superseded-by")||"";return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}get _detailLevel(){return this.getAttribute("detail")?this.getAttribute("detail"):this.hasAttribute("compact")?"compact":"full"}get _minimalLabel(){return this.adrTitle||this.adrId||"ADR"}get data(){return{adrId:this.adrId||void 0,status:this.status,detail:this.getAttribute("detail")||void 0,supersedes:this.supersedes.length?this.supersedes:void 0,supersededBy:this.supersededBy.length?this.supersededBy:void 0,title:this.adrTitle||void 0,date:this.adrDate||void 0}}set data(e){!e||typeof e!="object"||(this._applyData(e),this.#a(),this.shadowRoot&&this.#t(),this.dispatchEvent(new CustomEvent("adr-wc:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0,composed:!0})))}_applyData(e){if(e.adrId!=null&&this.setAttribute("adr-id",String(e.adrId)),e.status!=null&&this.setAttribute("status",String(e.status)),e.detail!=null&&this.setAttribute("detail",String(e.detail)),e.supersedes&&this.setAttribute("supersedes",Array.isArray(e.supersedes)?e.supersedes.join(","):String(e.supersedes)),e.supersededBy&&this.setAttribute("superseded-by",Array.isArray(e.supersededBy)?e.supersededBy.join(","):String(e.supersededBy)),e.title&&!this.querySelector('[slot="title"]')){let t=document.createElement("h3");t.slot="title",t.textContent=String(e.title),this.appendChild(t)}if(e.date&&!this.querySelector('[slot="date"]')){let t=document.createElement("time");t.slot="date",t.setAttribute("datetime",String(e.date)),t.textContent=new Date(String(e.date)).toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"}),this.appendChild(t)}for(let t of["context","decision"])if(e[t]&&!this.querySelector(`[slot="${t}"]`)){let a=document.createElement("p");a.slot=t,a.textContent=String(e[t]),this.appendChild(a)}if(e.consequences&&!this.querySelector('[slot="consequences"]')){let t=document.createElement("ul");t.slot="consequences";let a=Array.isArray(e.consequences)?e.consequences:[e.consequences];for(let o of a){let r=document.createElement("li");r.textContent=String(o),t.appendChild(r)}this.appendChild(t)}}async _loadSrc(e){if(!e)return;let t=this.shadowRoot;t.innerHTML=`<style>${l}</style><div class="state-msg">Loading\u2026</div>`;try{let a=await fetch(e);if(!a.ok)throw new Error(`HTTP ${a.status}`);let o=await a.json();this._applyData(o),this.#a(),this.#t()}catch(a){t.innerHTML=`<style>${l}</style><div class="state-msg state-msg--error">Could not load: ${i(a.message)}</div>`}}#t(){let e=this.shadowRoot,t=v[this.status]||v.proposed,a=this._detailLevel,o=this.adrId?`ADR: ${i(this.adrId)}`:"Architectural Decision Record",r=!!this.querySelector('[slot="date"]')||this.#e.has("date");if(a==="minimal"){e.innerHTML=`<style>${l}</style>
|
|
328
|
-
<article class="adr-card adr-card--minimal" role="article" aria-label="${o}"
|
|
329
|
-
tabindex="0">
|
|
330
|
-
<div class="adr-body">
|
|
331
|
-
<div class="adr-meta">
|
|
332
|
-
${this.adrId?`<span class="adr-id">${i(this.adrId)}</span>`:""}
|
|
333
|
-
<span class="adr-status" style="color:${t.color};background:${t.bg}">${i(t.label)}</span>
|
|
334
|
-
</div>
|
|
335
|
-
<div class="adr-title-wrap">
|
|
336
|
-
<slot name="title"><span class="adr-title-fallback">${i(this._minimalLabel)}</span></slot>
|
|
337
|
-
</div>
|
|
338
|
-
</div>
|
|
339
|
-
</article>`;return}if(e.innerHTML=`<style>${l}</style>
|
|
340
|
-
<article class="adr-card adr-card--${a}" role="article" aria-label="${o}">
|
|
341
|
-
|
|
342
|
-
<header class="adr-header">
|
|
343
|
-
<div class="adr-meta">
|
|
344
|
-
${this.adrId?`<span class="adr-id">${i(this.adrId)}</span>`:""}
|
|
345
|
-
${r?`<span class="adr-date-wrap">${n(c.calendar)} <slot name="date"></slot></span>`:""}
|
|
346
|
-
</div>
|
|
347
|
-
<div class="adr-badges">
|
|
348
|
-
<span class="adr-status" style="color:${t.color};background:${t.bg}">${i(t.label)}</span>
|
|
349
|
-
</div>
|
|
350
|
-
</header>
|
|
351
|
-
|
|
352
|
-
<div class="adr-body">
|
|
353
|
-
<div class="adr-title-wrap">
|
|
354
|
-
<slot name="title"><span class="adr-title-fallback">[Untitled ADR]</span></slot>
|
|
355
|
-
</div>
|
|
356
|
-
|
|
357
|
-
${this.supersedes.length?`
|
|
358
|
-
<div class="adr-links">
|
|
359
|
-
<span class="adr-links-label">Supersedes</span>
|
|
360
|
-
${this.supersedes.map(d=>`<a class="adr-link" href="#${i(d)}">${n(c.arrowRight)} ${i(d)}</a>`).join("")}
|
|
361
|
-
</div>`:""}
|
|
362
|
-
|
|
363
|
-
${this.supersededBy.length?`
|
|
364
|
-
<div class="adr-links">
|
|
365
|
-
<span class="adr-links-label">Superseded by</span>
|
|
366
|
-
${this.supersededBy.map(d=>`<a class="adr-link" href="#${i(d)}">${n(c.arrowRight)} ${i(d)}</a>`).join("")}
|
|
367
|
-
</div>`:""}
|
|
368
|
-
</div>
|
|
369
|
-
|
|
370
|
-
<div class="adr-sections">
|
|
371
|
-
<div class="adr-section">
|
|
372
|
-
<div class="adr-section-header">
|
|
373
|
-
<div class="adr-section-icon context">${n(c.context)}</div>
|
|
374
|
-
<span class="adr-section-title">Context</span>
|
|
375
|
-
</div>
|
|
376
|
-
<div class="adr-section-content">
|
|
377
|
-
<slot name="context"><em class="slot-fallback">No context provided.</em></slot>
|
|
378
|
-
</div>
|
|
379
|
-
</div>
|
|
380
|
-
|
|
381
|
-
<div class="adr-section">
|
|
382
|
-
<div class="adr-section-header">
|
|
383
|
-
<div class="adr-section-icon decision">${n(c.decision)}</div>
|
|
384
|
-
<span class="adr-section-title">Decision</span>
|
|
385
|
-
</div>
|
|
386
|
-
<div class="adr-section-content">
|
|
387
|
-
<slot name="decision"><em class="slot-fallback">No decision recorded.</em></slot>
|
|
388
|
-
</div>
|
|
389
|
-
</div>
|
|
390
|
-
|
|
391
|
-
<div class="adr-section">
|
|
392
|
-
<div class="adr-section-header">
|
|
393
|
-
<div class="adr-section-icon consequences">${n(c.consequences)}</div>
|
|
394
|
-
<span class="adr-section-title">Consequences</span>
|
|
395
|
-
</div>
|
|
396
|
-
<div class="adr-section-content">
|
|
397
|
-
<slot name="consequences"><em class="slot-fallback">No consequences documented.</em></slot>
|
|
398
|
-
</div>
|
|
399
|
-
</div>
|
|
400
|
-
</div>
|
|
401
|
-
|
|
402
|
-
</article>`,a==="compact")for(let d of e.querySelectorAll(".adr-section")){let h=d.querySelector("slot");h&&h.assignedNodes().length===0&&d.setAttribute("data-empty","")}this.dispatchEvent(new CustomEvent("adr-wc:ready",{detail:{adrId:this.adrId,title:this.adrTitle,status:this.status},bubbles:!0,composed:!0}))}};f("adr-wc",u);export{u as AdrWc};
|
|
403
|
-
//# sourceMappingURL=adr-wc.js.map
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
var $=window.matchMedia("(prefers-reduced-motion: reduce)");var u=new Map;function p(o,s,t={}){let e=t.priority??10,i={impl:s,bundle:t.bundle,contract:t.contract,priority:e},r=u.get(o);if(customElements.get(o)){if(!r||r.priority>=e){r&&r.priority===e&&r.impl!==s&&console.warn(`[VB Bundle] Tag <${o}> already registered by "${r.bundle}" (priority ${r.priority}). Skipping "${t.bundle}".`);return}console.warn(`[VB Bundle] Tag <${o}> defined by "${r.bundle}" cannot be replaced (customElements.define is permanent). "${t.bundle}" has higher priority but arrived late.`);return}if(r&&r.priority>=e){r.priority===e&&console.warn(`[VB Bundle] Tag <${o}> already registered by "${r.bundle}". Skipping "${t.bundle}" (first wins at equal priority).`);return}u.set(o,i),customElements.define(o,s)}var l=class extends HTMLElement{#e=[];#t;connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let s of this.#e)s();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(s,t,e,i){s.addEventListener(t,e,i),this.#e.push(()=>s.removeEventListener(t,e,i))}setup(){}teardown(){}setState(s,t){this.#t||(this.#t=this.attachInternals());let e=this.#t.states;try{t?e.add(s):e.delete(s)}catch{let i=`--${s}`;t?e.add(i):e.delete(i)}}_adoptInternals(s){this.#t||(this.#t=s)}};var d=class extends l{static observedAttributes=["tokens","prefix","label","data-observe"];setup(){this.#e(),this.#t()}attributeChangedCallback(){this.isConnected&&(this.#c(),this.#e(),this.#t())}teardown(){this.#c()}#e(){let s=this.getAttribute("tokens")||"sm,md,lg,xl",t=this.getAttribute("prefix")||"--bp-",e=this.getAttribute("label")||"",i=s.split(",").map(n=>n.trim()).filter(Boolean),r=getComputedStyle(document.documentElement),a=i.map(n=>{let c=r.getPropertyValue(`${t}${n}`).trim(),y=this.#u(c);return{name:n,raw:c,px:y}}).filter(n=>n.px>0).sort((n,c)=>n.px-c.px);this.#l=a,this.#i=a.length?a[a.length-1].px*1.15:1;let h=e?`<header class="bps-label">${e}</header>`:"",f=`
|
|
2
|
-
<output class="bps-readout" aria-live="polite">
|
|
3
|
-
<span class="bps-width">\u2014</span>
|
|
4
|
-
<span class="bps-active" data-active="">\u2014</span>
|
|
5
|
-
</output>
|
|
6
|
-
`,b=`
|
|
7
|
-
<figure class="bps-ruler" aria-hidden="true">
|
|
8
|
-
<span class="bps-cursor" data-cursor></span>
|
|
9
|
-
${a.map(n=>`
|
|
10
|
-
<span class="bps-stop" style="--bps-pos:${n.px/this.#i*100}%" data-bp="${n.name}">
|
|
11
|
-
<span class="bps-tick"></span>
|
|
12
|
-
<span class="bps-stop-label">${n.name}<br><small>${Math.round(n.px)}px</small></span>
|
|
13
|
-
</span>
|
|
14
|
-
`).join("")}
|
|
15
|
-
</figure>
|
|
16
|
-
`,m=`
|
|
17
|
-
<dl class="bps-list">
|
|
18
|
-
${a.map(n=>`
|
|
19
|
-
<div class="bps-row" data-bp="${n.name}">
|
|
20
|
-
<dt>${n.name}</dt>
|
|
21
|
-
<dd><code>${n.raw}</code> \u2014 ${Math.round(n.px)}px and up</dd>
|
|
22
|
-
</div>
|
|
23
|
-
`).join("")}
|
|
24
|
-
</dl>
|
|
25
|
-
`;this.innerHTML=`${h}${f}${b}${m}`,this.#o=this.querySelector(".bps-width"),this.#n=this.querySelector(".bps-active"),this.#a=this.querySelector("[data-cursor]")}#t(){let s=this.getAttribute("data-observe");if(s){let e=document.querySelector(s);if(!e)return;this.#s=new ResizeObserver(()=>this.#r(e.clientWidth)),this.#s.observe(e),this.#r(e.clientWidth);return}let t=()=>this.#r(window.innerWidth);t(),this.listen(window,"resize",t,{passive:!0})}#c(){this.#s&&(this.#s.disconnect(),this.#s=null)}#r(s){if(!this.#o||!this.#n)return;this.#o.textContent=`${Math.round(s)}px`;let t=this.#d(s);if(this.#n.textContent=t?t.name:"base",this.#n.dataset.active=t?t.name:"",this.#a){let e=Math.min(100,s/this.#i*100);this.#a.style.setProperty("--bps-pos",`${e}%`)}this.querySelectorAll("[data-bp]").forEach(e=>{let i=t&&e.getAttribute("data-bp")===t.name;e.toggleAttribute("data-current",!!i)})}#d(s){let t=null;for(let e of this.#l)s>=e.px&&(t=e);return t}#u(s){if(!s)return 0;let t=parseFloat(s);if(Number.isNaN(t))return 0;if(s.endsWith("rem")||s.endsWith("em")){let e=parseFloat(getComputedStyle(document.documentElement).fontSize)||16;return t*e}return t}#l=[];#i=1;#s=null;#o=null;#n=null;#a=null};p("breakpoint-specimen",d);export{d as BreakpointSpecimen};
|
|
26
|
-
//# sourceMappingURL=breakpoint-specimen.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var S=window.matchMedia("(prefers-reduced-motion: reduce)");var y=new Map;function E(i,e,t={}){let n=t.priority??10,r={impl:e,bundle:t.bundle,contract:t.contract,priority:n},s=y.get(i);if(customElements.get(i)){if(!s||s.priority>=n){s&&s.priority===n&&s.impl!==e&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${s.bundle}" (priority ${s.priority}). Skipping "${t.bundle}".`);return}console.warn(`[VB Bundle] Tag <${i}> defined by "${s.bundle}" cannot be replaced (customElements.define is permanent). "${t.bundle}" has higher priority but arrived late.`);return}if(s&&s.priority>=n){s.priority===n&&console.warn(`[VB Bundle] Tag <${i}> already registered by "${s.bundle}". Skipping "${t.bundle}" (first wins at equal priority).`);return}y.set(i,r),customElements.define(i,e)}var b=class extends HTMLElement{#t=[];#e;connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let e of this.#t)e();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(e,t,n,r){e.addEventListener(t,n,r),this.#t.push(()=>e.removeEventListener(t,n,r))}setup(){}teardown(){}setState(e,t){this.#e||(this.#e=this.attachInternals());let n=this.#e.states;try{t?n.add(e):n.delete(e)}catch{let r=`--${e}`;t?n.add(r):n.delete(r)}}_adoptInternals(e){this.#e||(this.#e=e)}};var $=864e5,g=class i extends b{setup(){let e=this.getAttribute("start"),t=this.getAttribute("end"),n=parseFloat(this.getAttribute("total")||"");if(!e||!t||!Number.isFinite(n))return console.warn("burndown-chart: requires start, end, and total attributes"),!1;let r=i.#n(e),s=i.#n(t);if(!r||!s||s<r)return console.warn("burndown-chart: start/end dates invalid",e,t),!1;let d=(this.getAttribute("weekends")||"include")!=="exclude",c=this.getAttribute("unit")||"points",u=this.getAttribute("label")||"",h=this.querySelector(":scope > template"),a=h?i.#e(h):[],o=a.filter(p=>p.delta!==0),l=i.#s(r,s),m=i.#o(l,n,d),f=i.#a(l,a);return this.#t({label:u,unit:c,dayLabels:l,actual:f,ideal:m,scopeChanges:o}),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent("burndown-chart:ready",{bubbles:!0,detail:{dayCount:l.length,total:n,scopeChanges:o.length}}))}),!0}#t({label:e,unit:t,dayLabels:n,actual:r,ideal:s,scopeChanges:d}){if([...this.children].forEach(o=>{o.tagName!=="TEMPLATE"&&o.remove()}),e){let o=document.createElement("header");o.className="bdc-label",o.textContent=e,this.appendChild(o)}let c=document.createElement("chart-wc");c.setAttribute("data-type","line"),c.setAttribute("data-legend",""),c.setAttribute("data-tooltip",""),c.setAttribute("data-label-x","Day"),c.setAttribute("data-label-y",t);let u={},h={};n.forEach((o,l)=>{u[o]=s[l],r[l]!==null&&(h[o]=r[l])});let a=[{name:"Actual",values:h},{name:"Ideal",values:u}];if(c.setAttribute("data-values",JSON.stringify(a)),this.appendChild(c),d.length){let o=document.createElement("aside");o.className="bdc-scope-changes";let l=document.createElement("h4");l.textContent="Scope changes",o.appendChild(l);let m=document.createElement("ul");for(let f of d){let p=document.createElement("li"),w=f.delta>0?"+":"";p.innerHTML=`<time datetime="${f.date}">${f.date}</time>: <strong>${w}${f.delta} ${t}</strong>`,m.appendChild(p)}o.appendChild(m),this.appendChild(o)}}static#e(e){let t=[],n=e.content.querySelectorAll("tr");for(let r of n){let s=[...r.children],d=s[0]?.textContent?.trim(),c=parseFloat(s[1]?.textContent??""),u=parseFloat(s[2]?.textContent??"0")||0;!d||!Number.isFinite(c)||t.push({date:d,remaining:c,delta:u})}return t}static#n(e){let t=String(e).match(/^(\d{4})-(\d{2})-(\d{2})/);return t?new Date(Number(t[1]),Number(t[2])-1,Number(t[3])):null}static#r(e){let t=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${t}-${n}`}static#s(e,t){let n=[];for(let r=e.getTime();r<=t.getTime();r+=$)n.push(i.#r(new Date(r)));return n}static#o(e,t,n){let r=a=>{let o=i.#n(a);if(!o)return!1;let l=o.getDay();return l===0||l===6},s=e.map((a,o)=>({d:a,i:o,weekend:r(a)})).filter(a=>n||!a.weekend),d=s.length>1?t/(s.length-1):0,c=new Array(e.length).fill(null),u=t,h=0;for(let a=0;a<e.length;a++){let o=r(e[a]);n||!o?(c[a]=Math.max(0,t-d*h),h++,u=c[a]):c[a]=u}return c}static#a(e,t){let n=new Map(t.map(r=>[r.date,r.remaining]));return e.map(r=>n.has(r)?n.get(r):null)}};E("burndown-chart",g);export{g as BurndownChart};
|
|
2
|
-
//# sourceMappingURL=burndown-chart.js.map
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
var n=class extends HTMLElement{#e=[];#t;connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),queueMicrotask(()=>{this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0}))}))}disconnectedCallback(){for(let t of this.#e)t();this.#e=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,r,i){t.addEventListener(e,r,i),this.#e.push(()=>t.removeEventListener(e,r,i))}setup(){}teardown(){}setState(t,e){this.#t||(this.#t=this.attachInternals());let r=this.#t.states;try{e?r.add(t):r.delete(t)}catch{let i=`--${t}`;e?r.add(i):r.delete(i)}}_adoptInternals(t){this.#t||(this.#t=t)}};var k=window.matchMedia("(prefers-reduced-motion: reduce)");var u=new Map;function f(s,t,e={}){let r=e.priority??10,i={impl:t,bundle:e.bundle,contract:e.contract,priority:r},a=u.get(s);if(customElements.get(s)){if(!a||a.priority>=r){a&&a.priority===r&&a.impl!==t&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${a.bundle}" (priority ${a.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${s}> defined by "${a.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(a&&a.priority>=r){a.priority===r&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${a.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}u.set(s,i),customElements.define(s,t)}function m(s){if(!s)return 0;let t=s.dataset?.capacityCost??s.getAttribute?.("data-capacity-cost"),e=Number(t);return Number.isFinite(e)&&e>0?e:0}function h(s){let t=0;for(let e of s||[])t+=m(e);return t}function l({capacityPoints:s,qualitySum:t,featureSum:e}){let r=Number.isFinite(s)?s:1/0,i=Math.max(0,Number(t)||0),a=Math.max(0,Number(e)||0),o=Number.isFinite(r)?r-i-a:1/0;return{capacity:r,quality:i,features:a,slack:o}}function p({capacity:s,quality:t,features:e}){if(!Number.isFinite(s)||s<=0){let a=t+e;return a<=0?{quality:0,features:0,slack:100}:{quality:t/a*100,features:e/a*100,slack:0}}let r=t+e,i=Math.max(s,r);return{quality:t/i*100,features:e/i*100,slack:Math.max(0,(s-r)/i*100)}}var c=class extends n{static get observedAttributes(){return["data-bind-triangle","data-bind-quality"]}#e=null;#t=null;#r=null;#i=null;#l=!1;setup(){this.#c(),this.#d(),this.#u(),this.#s()}teardown(){this.#e?.(),this.#t?.(),this.#r?.disconnect(),this.#e=null,this.#t=null,this.#r=null}attributeChangedCallback(t){this.isConnected&&(t==="data-bind-triangle"?(this.#c(),this.#s()):t==="data-bind-quality"&&(this.#d(),this.#s()))}get capacityPoints(){return this.#n()}get qualitySum(){return this.#o()}get featureSum(){return this.#i!=null?this.#i:h(this.querySelectorAll("[data-capacity-cost]"))}set featureSum(t){this.#i=Number.isFinite(+t)?+t:null,this.#s()}get slack(){return l({capacityPoints:this.#n(),qualitySum:this.#o(),featureSum:this.featureSum}).slack}#a(t){if(!t)return null;let e=this.getRootNode();return e.getElementById?e.getElementById(t):document.getElementById(t)}#c(){this.#e?.(),this.#e=null;let t=this.#a(this.dataset.bindTriangle);if(!t||t.localName!=="iron-triangle")return;let e=()=>this.#s();t.addEventListener("iron-triangle:change",e),this.#e=()=>t.removeEventListener("iron-triangle:change",e)}#d(){this.#t?.(),this.#t=null;let t=this.#a(this.dataset.bindQuality);if(!t||t.localName!=="quality-target")return;let e=()=>this.#s();t.addEventListener("quality-target:change",e),this.#t=()=>t.removeEventListener("quality-target:change",e)}#u(){this.#r||(this.#r=new MutationObserver(t=>{t.some(r=>!r.target.closest?.("[data-capacity-table]"))&&this.#s()}),this.#r.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-capacity-cost"]}))}#n(){let t=this.#a(this.dataset.bindTriangle);if(!t||t.localName!=="iron-triangle")return 1/0;let e=t.capacityPoints;return Number.isFinite(e)&&e>0?e:1/0}#o(){let t=this.#a(this.dataset.bindQuality);return!t||t.localName!=="quality-target"?0:Number(t.criticalSum)||0}#s(){let t=l({capacityPoints:this.#n(),qualitySum:this.#o(),featureSum:this.featureSum}),e=p(t),r=this.querySelector(":scope > [data-capacity-table]");r||(r=document.createElement("section"),r.dataset.capacityTable="",this.prepend(r));let i=y(t.capacity),a=t.quality>0?`\u2212${t.quality} pts`:"0 pts",o=t.features>0?`\u2212${t.features} pts`:"0 pts",b=g(t.slack);r.innerHTML=`
|
|
2
|
-
<dl data-layout="grid" class="capacity-ledger" aria-label="Capacity ledger">
|
|
3
|
-
<div data-row="capacity">
|
|
4
|
-
<dt>Capacity</dt>
|
|
5
|
-
<dd class="num">${i}</dd>
|
|
6
|
-
<dd class="bar"><span class="bar-track"><span class="bar-fill bar-capacity" style="--w:100%"></span></span></dd>
|
|
7
|
-
</div>
|
|
8
|
-
<div data-row="quality">
|
|
9
|
-
<dt>Quality</dt>
|
|
10
|
-
<dd class="num">${a}</dd>
|
|
11
|
-
<dd class="bar"><span class="bar-track"><span class="bar-fill bar-quality" style="--w:${e.quality.toFixed(1)}%"></span></span></dd>
|
|
12
|
-
</div>
|
|
13
|
-
<div data-row="features">
|
|
14
|
-
<dt>Features</dt>
|
|
15
|
-
<dd class="num">${o}</dd>
|
|
16
|
-
<dd class="bar"><span class="bar-track"><span class="bar-fill bar-features" style="--w:${e.features.toFixed(1)}%"></span></span></dd>
|
|
17
|
-
</div>
|
|
18
|
-
<div data-row="slack" data-state="${t.slack<0?"over":"under"}">
|
|
19
|
-
<dt>Slack</dt>
|
|
20
|
-
<dd class="num">${b}</dd>
|
|
21
|
-
<dd class="bar"><span class="bar-track"><span class="bar-fill bar-slack" style="--w:${e.slack.toFixed(1)}%"></span></span></dd>
|
|
22
|
-
</div>
|
|
23
|
-
</dl>
|
|
24
|
-
`,this.setState("overdrawn",t.slack<0);let d=t.slack<0;d!==this.#l&&(this.dispatchEvent(new CustomEvent("capacity-plan:overdrawn",{bubbles:!0,composed:!0,detail:{ledger:t,source:"render"}})),this.#l=d)}};function y(s){return Number.isFinite(s)?`${s} pts`:"\u221E"}function g(s){return Number.isFinite(s)?s===0?"0 pts":s>0?`+${s} pts`:`${s} pts`:"\u221E"}f("capacity-plan",c);export{c as CapacityPlan};
|
|
25
|
-
//# sourceMappingURL=capacity-plan.js.map
|