vanilla-breeze 0.1.3 → 0.2.0
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/custom-elements.json +25084 -6649
- package/dist/cdn/components/accessibility-specimen.js +11 -0
- package/dist/cdn/components/accordion-wc.js +1 -1
- package/dist/cdn/components/activity-feed.js +2 -0
- package/dist/cdn/components/adr-wc.js +17 -17
- package/dist/cdn/components/ai-chat.js +28 -0
- package/dist/cdn/components/ai-summary.js +10 -0
- package/dist/cdn/components/analytics-panel.js +5 -5
- package/dist/cdn/components/audio-player.js +3 -3
- package/dist/cdn/components/audio-visualizer.js +2 -2
- package/dist/cdn/components/author-index.js +2 -2
- package/dist/cdn/components/brand-mark.js +1 -1
- package/dist/cdn/components/bread-crumb.js +2 -0
- package/dist/cdn/components/breakpoint-specimen.js +26 -0
- package/dist/cdn/components/burndown-chart.js +2 -0
- package/dist/cdn/components/calendar-wc.js +2 -2
- package/dist/cdn/components/capacity-plan.js +25 -0
- package/dist/cdn/components/card-list.js +1 -1
- package/dist/cdn/components/carousel-wc.js +1 -1
- package/dist/cdn/components/change-set.js +2 -2
- package/dist/cdn/components/chart-wc.js +58 -36
- package/dist/cdn/components/chat-input.js +1 -1
- package/dist/cdn/components/chat-window.js +1 -1
- package/dist/cdn/components/color-palette.js +9 -9
- package/dist/cdn/components/color-picker.js +1 -1
- package/dist/cdn/components/combo-box.js +1 -1
- package/dist/cdn/components/command-palette.js +1 -1
- package/dist/cdn/components/comment-box.js +60 -0
- package/dist/cdn/components/comment-thread.js +60 -0
- package/dist/cdn/components/comment-wc.js +1 -1
- package/dist/cdn/components/compare-surface.js +1 -1
- package/dist/cdn/components/component-sampler.js +2 -2
- package/dist/cdn/components/consent-banner.js +1 -1
- package/dist/cdn/components/content-lens.js +1 -1
- package/dist/cdn/components/content-swap.js +1 -1
- package/dist/cdn/components/context-menu.js +1 -1
- package/dist/cdn/components/data-table.js +1 -1
- package/dist/cdn/components/date-picker.js +1 -1
- package/dist/cdn/components/day-view.js +1 -1
- package/dist/cdn/components/diagram-wc.js +3 -0
- package/dist/cdn/components/drag-surface.js +1 -1
- package/dist/cdn/components/drop-down.js +1 -1
- package/dist/cdn/components/emoji-picker.js +1 -1
- package/dist/cdn/components/empathy-map.js +41 -43
- package/dist/cdn/components/flow-diagram.js +1 -1
- package/dist/cdn/components/font-pairer.js +81 -81
- package/dist/cdn/components/foot-notes.js +1 -1
- package/dist/cdn/components/form-field.js +1 -1
- package/dist/cdn/components/gantt-chart.js +1 -1
- package/dist/cdn/components/geo-map.js +25 -23
- package/dist/cdn/components/glossary-index.js +1 -1
- package/dist/cdn/components/glossary-wc.js +1 -1
- package/dist/cdn/components/gradient-builder.js +29 -29
- package/dist/cdn/components/heading-links.js +1 -1
- package/dist/cdn/components/highlight-wc.js +2 -2
- package/dist/cdn/components/icon-wc.js +4 -4
- package/dist/cdn/components/image-gallery.js +1 -1
- package/dist/cdn/components/image-map.js +1 -1
- package/dist/cdn/components/impact-effort.js +1 -1
- package/dist/cdn/components/include-file.js +1 -1
- package/dist/cdn/components/iron-triangle.js +2 -0
- package/dist/cdn/components/kanban-board.js +1 -1
- package/dist/cdn/components/layout-specimen.js +35 -0
- package/dist/cdn/components/manifest.json +227 -103
- package/dist/cdn/components/markdown-editor.js +1 -1
- package/dist/cdn/components/markdown-viewer.js +12 -12
- package/dist/cdn/components/motion-specimen.js +12 -12
- package/dist/cdn/components/nav-bar.js +2 -0
- package/dist/cdn/components/note-wc.js +2 -2
- package/dist/cdn/components/notification-wc.js +4 -4
- package/dist/cdn/components/page-info.js +4 -4
- package/dist/cdn/components/page-stats.js +1 -1
- package/dist/cdn/components/page-toc.js +1 -1
- package/dist/cdn/components/page-tools.js +1 -1
- package/dist/cdn/components/page-tour.js +6 -6
- package/dist/cdn/components/pager-wc.js +2 -0
- package/dist/cdn/components/palette-generator.js +11 -11
- package/dist/cdn/components/poll-wc.js +2 -0
- package/dist/cdn/components/pop-over.js +2 -0
- package/dist/cdn/components/popularity-index.js +2 -2
- package/dist/cdn/components/print-page.js +1 -1
- package/dist/cdn/components/product-roadmap.js +3 -0
- package/dist/cdn/components/progress-tracker.js +2 -0
- package/dist/cdn/components/qr-code.js +1 -1
- package/dist/cdn/components/quadrant-grid.js +3 -0
- package/dist/cdn/components/quality-target.js +12 -0
- package/dist/cdn/components/reaction-bar.js +2 -0
- package/dist/cdn/components/reader-view.js +3 -3
- package/dist/cdn/components/reading-progress.js +2 -0
- package/dist/cdn/components/recently-visited.js +10 -10
- package/dist/cdn/components/requirement-card.js +122 -0
- package/dist/cdn/components/review-surface.js +34 -40
- package/dist/cdn/components/risk-register.js +25 -0
- package/dist/cdn/components/roadmap.js +3 -0
- package/dist/cdn/components/score-card.js +197 -0
- package/dist/cdn/components/selection-menu.js +1 -1
- package/dist/cdn/components/semantic-palette.js +15 -15
- package/dist/cdn/components/settings-panel.js +12 -12
- package/dist/cdn/components/share-wc.js +2 -2
- package/dist/cdn/components/short-cuts.js +1 -1
- package/dist/cdn/components/site-index.js +4 -4
- package/dist/cdn/components/site-map-wc.js +1 -1
- package/dist/cdn/components/site-map.js +1 -1
- package/dist/cdn/components/site-search.js +9 -9
- package/dist/cdn/components/slide-accept.js +1 -1
- package/dist/cdn/components/social-embed.js +1 -1
- package/dist/cdn/components/spacing-specimen.js +5 -5
- package/dist/cdn/components/split-surface.js +1 -1
- package/dist/cdn/components/star-rating.js +1 -1
- package/dist/cdn/components/status-wc.js +2 -0
- package/dist/cdn/components/stepper-wc.js +2 -0
- package/dist/cdn/components/story-map.js +1 -1
- package/dist/cdn/components/tab-set.js +1 -1
- package/dist/cdn/components/text-reader.js +2 -2
- package/dist/cdn/components/theme-catalog.js +28 -0
- package/dist/cdn/components/theme-export.js +20 -12
- package/dist/cdn/components/theme-import.js +44 -0
- package/dist/cdn/components/theme-picker.js +29 -26
- package/dist/cdn/components/time-index.js +2 -2
- package/dist/cdn/components/time-picker.js +1 -1
- package/dist/cdn/components/toast-msg.js +3 -3
- package/dist/cdn/components/token-specimen.js +14 -14
- package/dist/cdn/components/tool-tip.js +1 -1
- package/dist/cdn/components/topic-map.js +3 -3
- package/dist/cdn/components/traceability-matrix.js +3 -0
- package/dist/cdn/components/trust-filter.js +3 -3
- package/dist/cdn/components/type-specimen.js +15 -15
- package/dist/cdn/components/user-journey.js +63 -70
- package/dist/cdn/components/user-persona.js +75 -13
- package/dist/cdn/components/user-story.js +12 -11
- package/dist/cdn/components/version-switcher.js +17 -0
- package/dist/cdn/components/video-player.js +3 -3
- package/dist/cdn/components/watch-wc.js +2 -2
- package/dist/cdn/components/week-view.js +1 -1
- package/dist/cdn/components/work-item.js +29 -28
- package/dist/cdn/components/youtube-player.js +1 -1
- package/dist/cdn/icons/bold.css +17 -0
- package/dist/cdn/icons/bold.json +1 -0
- package/dist/cdn/icons/custom.css +6 -0
- package/dist/cdn/icons/custom.json +1 -0
- package/dist/cdn/icons/lucide.css +1914 -0
- package/dist/cdn/icons/lucide.json +1 -0
- package/dist/cdn/icons/mage.css +17 -0
- package/dist/cdn/icons/mage.json +1 -0
- package/dist/cdn/icons/phosphor.css +17 -0
- package/dist/cdn/icons/phosphor.json +1 -0
- package/dist/cdn/icons/tabler.css +17 -0
- package/dist/cdn/icons/tabler.json +1 -0
- package/dist/cdn/packs/design-system.full.js +59 -51
- package/dist/cdn/packs/effects.full.js +1 -1
- package/dist/cdn/packs/icons.effects.js +1 -1
- package/dist/cdn/packs/icons.full.js +1 -1
- package/dist/cdn/packs/kawaii.full.css +1 -1
- package/dist/cdn/packs/kawaii.full.js +6 -6
- package/dist/cdn/packs/kawaii.theme.css +1 -1
- package/dist/cdn/packs/manifest.json +11 -11
- package/dist/cdn/packs/ui.full.css +1 -1
- package/dist/cdn/packs/ui.full.js +54 -51
- package/dist/cdn/packs/ux-planning.full.css +1 -1
- package/dist/cdn/packs/ux-planning.full.js +318 -243
- package/dist/cdn/themes/8bit.css +1 -1
- package/dist/cdn/themes/8bit.tokens.json +662 -0
- package/dist/cdn/themes/alpha1999-dark.tokens.json +693 -0
- package/dist/cdn/themes/alpha1999.css +1 -1
- package/dist/cdn/themes/alpha1999.tokens.json +869 -0
- package/dist/cdn/themes/anthropic.css +2 -0
- package/dist/cdn/themes/anthropic.tokens.json +564 -0
- package/dist/cdn/themes/art-deco-dark.tokens.json +407 -0
- package/dist/cdn/themes/art-deco.css +1 -1
- package/dist/cdn/themes/art-deco.tokens.json +581 -0
- package/dist/cdn/themes/bauhaus-dark.tokens.json +260 -0
- package/dist/cdn/themes/bauhaus.css +1 -1
- package/dist/cdn/themes/bauhaus.tokens.json +589 -0
- package/dist/cdn/themes/brutalist-dark.tokens.json +503 -0
- package/dist/cdn/themes/brutalist.tokens.json +677 -0
- package/dist/cdn/themes/catalog/atlassian.tokens.json +303 -0
- package/dist/cdn/themes/catalog/bootstrap.tokens.json +304 -0
- package/dist/cdn/themes/catalog/carbon.tokens.json +301 -0
- package/dist/cdn/themes/catalog/catppuccin-mocha.tokens.json +301 -0
- package/dist/cdn/themes/catalog/govuk.tokens.json +301 -0
- package/dist/cdn/themes/catalog/manifest.json +132 -0
- package/dist/cdn/themes/catalog/material.tokens.json +289 -0
- package/dist/cdn/themes/catalog/salesforce.tokens.json +301 -0
- package/dist/cdn/themes/catalog/tailwind.tokens.json +302 -0
- package/dist/cdn/themes/catppuccin-frappe.css +1 -1
- package/dist/cdn/themes/catppuccin-frappe.tokens.json +608 -0
- package/dist/cdn/themes/catppuccin-latte-dark.tokens.json +472 -0
- package/dist/cdn/themes/catppuccin-latte.css +1 -1
- package/dist/cdn/themes/catppuccin-latte.tokens.json +608 -0
- package/dist/cdn/themes/catppuccin-macchiato.css +1 -1
- package/dist/cdn/themes/catppuccin-macchiato.tokens.json +608 -0
- package/dist/cdn/themes/catppuccin-mocha.tokens.json +608 -0
- package/dist/cdn/themes/classic-dark.tokens.json +503 -0
- package/dist/cdn/themes/classic.tokens.json +640 -0
- package/dist/cdn/themes/claymorphism-dark.tokens.json +493 -0
- package/dist/cdn/themes/claymorphism.css +1 -1
- package/dist/cdn/themes/claymorphism.tokens.json +626 -0
- package/dist/cdn/themes/clinical-dark.tokens.json +472 -0
- package/dist/cdn/themes/clinical.tokens.json +608 -0
- package/dist/cdn/themes/cottagecore-dark.tokens.json +412 -0
- package/dist/cdn/themes/cottagecore.css +1 -1
- package/dist/cdn/themes/cottagecore.tokens.json +544 -0
- package/dist/cdn/themes/cyber.tokens.json +668 -0
- package/dist/cdn/themes/dawn-dark.tokens.json +472 -0
- package/dist/cdn/themes/dawn.css +1 -1
- package/dist/cdn/themes/dawn.tokens.json +608 -0
- package/dist/cdn/themes/dracula.tokens.json +534 -0
- package/dist/cdn/themes/dusk.tokens.json +533 -0
- package/dist/cdn/themes/editorial-dark.tokens.json +400 -0
- package/dist/cdn/themes/editorial.tokens.json +690 -0
- package/dist/cdn/themes/financial-dark.tokens.json +472 -0
- package/dist/cdn/themes/financial.css +1 -1
- package/dist/cdn/themes/financial.tokens.json +607 -0
- package/dist/cdn/themes/genai.tokens.json +534 -0
- package/dist/cdn/themes/glassmorphism-dark.tokens.json +489 -0
- package/dist/cdn/themes/glassmorphism.css +1 -1
- package/dist/cdn/themes/glassmorphism.tokens.json +632 -0
- package/dist/cdn/themes/government-dark.tokens.json +472 -0
- package/dist/cdn/themes/government.tokens.json +608 -0
- package/dist/cdn/themes/gruvbox-dark.tokens.json +472 -0
- package/dist/cdn/themes/gruvbox.tokens.json +608 -0
- package/dist/cdn/themes/high-noon-dark.tokens.json +397 -0
- package/dist/cdn/themes/high-noon.tokens.json +533 -0
- package/dist/cdn/themes/ibm.css +2 -0
- package/dist/cdn/themes/ibm.tokens.json +568 -0
- package/dist/cdn/themes/kawaii-dark.tokens.json +549 -0
- package/dist/cdn/themes/kawaii.css +1 -1
- package/dist/cdn/themes/kawaii.tokens.json +641 -0
- package/dist/cdn/themes/magna-dark.tokens.json +482 -0
- package/dist/cdn/themes/magna.css +1 -1
- package/dist/cdn/themes/magna.tokens.json +632 -0
- package/dist/cdn/themes/manifest.json +162 -62
- package/dist/cdn/themes/mcdonalds.css +2 -0
- package/dist/cdn/themes/mcdonalds.tokens.json +533 -0
- package/dist/cdn/themes/midnight.tokens.json +534 -0
- package/dist/cdn/themes/minimal-dark.tokens.json +294 -0
- package/dist/cdn/themes/minimal.tokens.json +494 -0
- package/dist/cdn/themes/modern-dark.tokens.json +490 -0
- package/dist/cdn/themes/modern.tokens.json +573 -0
- package/dist/cdn/themes/nes-dark.tokens.json +564 -0
- package/dist/cdn/themes/nes.css +1 -1
- package/dist/cdn/themes/nes.tokens.json +687 -0
- package/dist/cdn/themes/neumorphism-dark.tokens.json +471 -0
- package/dist/cdn/themes/neumorphism.css +1 -1
- package/dist/cdn/themes/neumorphism.tokens.json +589 -0
- package/dist/cdn/themes/nord-dark.tokens.json +484 -0
- package/dist/cdn/themes/nord.tokens.json +619 -0
- package/dist/cdn/themes/organic-dark.tokens.json +532 -0
- package/dist/cdn/themes/organic.tokens.json +685 -0
- package/dist/cdn/themes/rose-pine-dark.tokens.json +472 -0
- package/dist/cdn/themes/rose-pine.tokens.json +608 -0
- package/dist/cdn/themes/rough-dark.tokens.json +515 -0
- package/dist/cdn/themes/rough.css +1 -1
- package/dist/cdn/themes/rough.tokens.json +650 -0
- package/dist/cdn/themes/solarized-dark.tokens.json +397 -0
- package/dist/cdn/themes/solarized.tokens.json +532 -0
- package/dist/cdn/themes/starbucks.css +2 -0
- package/dist/cdn/themes/starbucks.tokens.json +593 -0
- package/dist/cdn/themes/startup-dark.tokens.json +522 -0
- package/dist/cdn/themes/startup.css +1 -1
- package/dist/cdn/themes/startup.tokens.json +607 -0
- package/dist/cdn/themes/super2026-dark.tokens.json +667 -0
- package/dist/cdn/themes/super2026.tokens.json +863 -0
- package/dist/cdn/themes/swiss-dark.tokens.json +390 -0
- package/dist/cdn/themes/swiss.tokens.json +750 -0
- package/dist/cdn/themes/terminal.css +1 -1
- package/dist/cdn/themes/terminal.tokens.json +689 -0
- package/dist/cdn/themes/tokyo-night-dark.tokens.json +472 -0
- package/dist/cdn/themes/tokyo-night.tokens.json +608 -0
- package/dist/cdn/themes/vaporwave-dark.tokens.json +413 -0
- package/dist/cdn/themes/vaporwave.tokens.json +549 -0
- package/dist/cdn/themes/win9x-dark.tokens.json +563 -0
- package/dist/cdn/themes/win9x.tokens.json +700 -0
- package/dist/cdn/vanilla-breeze-charts.css +1 -1
- package/dist/cdn/vanilla-breeze-charts.js +58 -36
- package/dist/cdn/vanilla-breeze-core.css +1 -1
- package/dist/cdn/vanilla-breeze-core.js +246 -51
- package/dist/cdn/vanilla-breeze-dev.js +1 -1
- package/dist/cdn/vanilla-breeze-extras.js +90 -80
- package/dist/cdn/vanilla-breeze.css +1 -1
- package/dist/cdn/vanilla-breeze.js +1370 -405
- package/package.json +12 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var I=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,n,t,r){e.addEventListener(n,t,r),this.#t.push(()=>e.removeEventListener(n,t,r))}setup(){}teardown(){}setState(e,n){this.#e||(this.#e=this.attachInternals());let t=this.#e.states;try{n?t.add(e):t.delete(e)}catch{let r=`--${e}`;n?t.add(r):t.delete(r)}}_adoptInternals(e){this.#e||(this.#e=e)}};var P=window.matchMedia("(prefers-reduced-motion: reduce)");var H=new Map;function B(h,e,n={}){let t=n.priority??10,r={impl:e,bundle:n.bundle,contract:n.contract,priority:t},s=H.get(h);if(customElements.get(h)){if(!s||s.priority>=t){s&&s.priority===t&&s.impl!==e&&console.warn(`[VB Bundle] Tag <${h}> already registered by "${s.bundle}" (priority ${s.priority}). Skipping "${n.bundle}".`);return}console.warn(`[VB Bundle] Tag <${h}> defined by "${s.bundle}" cannot be replaced (customElements.define is permanent). "${n.bundle}" has higher priority but arrived late.`);return}if(s&&s.priority>=t){s.priority===t&&console.warn(`[VB Bundle] Tag <${h}> already registered by "${s.bundle}". Skipping "${n.bundle}" (first wins at equal priority).`);return}H.set(h,r),customElements.define(h,e)}function O(h){let e=h.getFullYear(),n=String(h.getMonth()+1).padStart(2,"0"),t=String(h.getDate()).padStart(2,"0");return`${e}-${n}-${t}`}var N=class extends I{#t=null;setup(){if(this.#t=this.querySelector("table"),this.#t||this.#e(),!this.#t)return!1;this.#n(),this.listen(this.#t,"click",n=>{let r=n.target?.closest("calendar-event");if(!r)return;let a=r.closest("tr")?.querySelector("th time[datetime]");this.dispatchEvent(new CustomEvent("week-view:event-click",{bubbles:!0,detail:{date:r.dataset.date,time:r.querySelector("time[datetime]")?.getAttribute("datetime")||a?.getAttribute("datetime"),text:r.textContent?.trim()??"",element:r,category:r.dataset.category,duration:r.dataset.duration}}))}),this.#r();let e=this.#t.querySelector("calendar-event");return e&&e.setAttribute("tabindex","0"),!0}teardown(){this.querySelectorAll("calendar-event.wv-spanning").forEach(e=>{e.style.cssText="",e.classList.remove("wv-spanning")})}refresh(){this.teardown(),this.#n()}get events(){return[...this.querySelectorAll("calendar-event")].map(e=>{let n=e;return{date:n.dataset.date||void 0,time:n.querySelector("time[datetime]")?.getAttribute("datetime")||void 0,text:n.textContent?.trim()??"",category:n.dataset.category||void 0,duration:n.dataset.duration||void 0}})}set events(e){let n=Array.isArray(e)?e:[];for(;this.firstChild;)this.firstChild.remove();for(let t of n){let r=document.createElement("calendar-event");if(t.date&&(r.dataset.date=t.date),t.category&&(r.dataset.category=t.category),t.duration&&(r.dataset.duration=String(t.duration)),t.time){let s=document.createElement("time");s.setAttribute("datetime",t.time),s.textContent=t.time,r.appendChild(s),r.appendChild(document.createTextNode(" "))}r.appendChild(document.createTextNode(t.text||"")),this.appendChild(r)}this.teardown(),this.removeAttribute("data-upgraded"),this.setup(),this.dispatchEvent(new CustomEvent("week-view:events-changed",{detail:{events:n,source:"property"},bubbles:!0}))}#e(){let e=[...this.querySelectorAll(":scope > calendar-event")];if(e.length===0)return;let n=this.dataset.startDate;if(!n)return;let t=parseInt(this.dataset.days||"7",10),[r,s,a]=n.split("-").map(Number),u=new Date(r,s-1,a),m=[];for(let l=0;l<t;l++){let i=new Date(u);i.setDate(i.getDate()+l),m.push(i)}let y=m.map(O),f=new Map,g=new Set;e.forEach(l=>{let i=l,p=i.dataset.date;if(!p||!y.includes(p))return;let S=i.querySelector("time[datetime]");if(!S)return;let k=S.getAttribute("datetime");if(!k)return;let T=k.split(":"),A=parseInt(T[0],10),D=parseInt(T[1]||"0",10);if(isNaN(A))return;D>=30&&!i.dataset.start&&(i.dataset.start="30");let q=String(A).padStart(2,"0"),b=`${p}:${q}`;f.has(b)||f.set(b,[]),f.get(b).push(i),g.add(A)});let d=[...g].sort((l,i)=>l-i),o=this.dataset.startHour==="auto"||!this.dataset.startHour,c=o?d.length>0?Math.max(0,d[0]-1):7:parseInt(this.dataset.startHour??"",10),C=o?d.length>0?Math.min(23,d[d.length-1]+1):19:parseInt(this.dataset.endHour||"19",10),v=this.closest("[lang]")?.lang||navigator.language,E=new Intl.DateTimeFormat(v,{weekday:"short",day:"numeric"}),M=new Intl.DateTimeFormat(v,{hour:"numeric"});this.style.setProperty("--wv-days",String(t));let w=document.createElement("table"),$=document.createElement("thead"),x=document.createElement("tr"),F=document.createElement("th");F.setAttribute("aria-label","Time"),x.appendChild(F),m.forEach(l=>{let i=document.createElement("th");i.setAttribute("scope","col");let p=document.createElement("time");p.setAttribute("datetime",O(l)),p.textContent=E.format(l),i.appendChild(p),x.appendChild(i)}),$.appendChild(x),w.appendChild($);let L=document.createElement("tbody");for(let l=c;l<=C;l++){let i=document.createElement("tr"),p=document.createElement("th");p.setAttribute("scope","row");let S=document.createElement("time"),k=String(l).padStart(2,"0");S.setAttribute("datetime",`${k}:00`),S.textContent=M.format(new Date(2026,0,1,l)),p.appendChild(S),i.appendChild(p),y.forEach(T=>{let A=document.createElement("td"),D=`${T}:${k}`,q=f.get(D)||[];if(q.length>0){let b=document.createElement("hour-view");q.length>1&&(b.dataset.overlap=""),q.forEach(R=>b.appendChild(R)),A.appendChild(b)}i.appendChild(A)}),L.appendChild(i)}w.appendChild(L),this.appendChild(w),this.#t=w}#n(){let e=this.#t?.querySelector("tbody");if(!e)return;let n=e.querySelectorAll("calendar-event[data-duration]");n.length!==0&&requestAnimationFrame(()=>{let t=e.getBoundingClientRect(),r=new Map;e.querySelectorAll(":scope > tr").forEach(s=>{let a=s.querySelector("th time[datetime]");if(!a)return;let u=a.getAttribute("datetime");if(!u)return;let m=parseInt(u.split(":")[0],10),y=s.getBoundingClientRect();r.set(m,{top:y.top-t.top,height:y.height})}),n.forEach(s=>{let a=s,u=a.closest("td"),m=u?.closest("tr");if(!u||!m)return;let f=m.querySelector("th time[datetime]")?.getAttribute("datetime");if(!f)return;let g=parseInt(f.split(":")[0],10),d=parseInt(a.dataset.start||"0",10),o=a.dataset.duration??"",c=60,C=o.match(/(\d+)h/),v=o.match(/(\d+)m/);(C||v)&&(c=(C?parseInt(C[1],10)*60:0)+(v?parseInt(v[1],10):0));let E=r.get(g);if(!E)return;let M=u.getBoundingClientRect(),w=d/60,$=E.top+E.height*w,x=E.height*(c/60);a.style.position="absolute",a.style.top=$+"px",a.style.height=x+"px",a.style.left=M.left-t.left+2+"px",a.style.right=t.right-M.right+2+"px",a.classList.add("wv-spanning")})})}#r(){let e=this.#t;e&&this.listen(e,"keydown",n=>{let t=n;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t.key))return;let s=t.target?.closest("calendar-event");if(!s)return;let a=s.closest("td"),u=a?.closest("tr");if(!a||!u||!u.parentElement)return;let m=[...u.parentElement.children],y=m.indexOf(u),f=[...u.children],g=f.indexOf(a),d=null;if(t.key==="ArrowDown")for(let o=y+1;o<m.length;o++){let c=m[o].children[g]?.querySelector("calendar-event");if(c){d=c;break}}else if(t.key==="ArrowUp")for(let o=y-1;o>=0;o--){let c=m[o].children[g]?.querySelector("calendar-event");if(c){d=c;break}}else if(t.key==="ArrowRight")for(let o=g+1;o<f.length;o++){let c=f[o]?.querySelector("calendar-event");if(c){d=c;break}}else if(t.key==="ArrowLeft")for(let o=g-1;o>=1;o--){let c=f[o]?.querySelector("calendar-event");if(c){d=c;break}}d&&(t.preventDefault(),d.setAttribute("tabindex","0"),s.setAttribute("tabindex","-1"),d.focus())})}};B("week-view",N);export{N as WeekView};
|
|
2
2
|
//# sourceMappingURL=week-view.js.map
|
|
@@ -88,12 +88,13 @@ var c=`
|
|
|
88
88
|
height: 12px;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
/* Type colors
|
|
92
|
-
|
|
93
|
-
.wi-type[data-type="
|
|
94
|
-
.wi-type[data-type="
|
|
95
|
-
.wi-type[data-type="
|
|
96
|
-
.wi-type[data-type="
|
|
91
|
+
/* Type colors \u2014 driven by VB theme tokens, with color-mix surfaces so the
|
|
92
|
+
pill background shifts with the active theme. */
|
|
93
|
+
.wi-type[data-type="task"] { color: var(--color-info, #3b82f6); background: color-mix(in oklch, var(--color-info, #3b82f6) 12%, transparent); }
|
|
94
|
+
.wi-type[data-type="bug"] { color: var(--color-error, #dc2626); background: color-mix(in oklch, var(--color-error, #dc2626) 12%, transparent); }
|
|
95
|
+
.wi-type[data-type="chore"] { color: var(--color-text-muted, #6b7280); background: color-mix(in oklch, var(--color-text-muted, #6b7280) 12%, transparent); }
|
|
96
|
+
.wi-type[data-type="spike"] { color: var(--color-accent, #8b5cf6); background: color-mix(in oklch, var(--color-accent, #8b5cf6) 12%, transparent); }
|
|
97
|
+
.wi-type[data-type="feature"] { color: var(--color-success, #059669); background: color-mix(in oklch, var(--color-success, #059669) 12%, transparent); }
|
|
97
98
|
|
|
98
99
|
/* \u2500\u2500 Badges \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 */
|
|
99
100
|
.wi-badges {
|
|
@@ -176,7 +177,7 @@ var c=`
|
|
|
176
177
|
display: flex;
|
|
177
178
|
align-items: center;
|
|
178
179
|
justify-content: center;
|
|
179
|
-
color: #fff;
|
|
180
|
+
color: var(--color-text-inverted, #fff);
|
|
180
181
|
flex-shrink: 0;
|
|
181
182
|
}
|
|
182
183
|
|
|
@@ -243,12 +244,12 @@ var c=`
|
|
|
243
244
|
.wi-section-icon svg {
|
|
244
245
|
width: 13px;
|
|
245
246
|
height: 13px;
|
|
246
|
-
fill:
|
|
247
|
+
fill: var(--color-text-inverted, #fff);
|
|
247
248
|
}
|
|
248
249
|
|
|
249
|
-
.wi-section-icon.description { background: #3b82f6; }
|
|
250
|
-
.wi-section-icon.checklist { background: #22c55e; }
|
|
251
|
-
.wi-section-icon.notes { background: #f59e0b; }
|
|
250
|
+
.wi-section-icon.description { background: var(--color-info, #3b82f6); }
|
|
251
|
+
.wi-section-icon.checklist { background: var(--color-success, #22c55e); }
|
|
252
|
+
.wi-section-icon.notes { background: var(--color-warning, #f59e0b); }
|
|
252
253
|
|
|
253
254
|
.wi-section-title {
|
|
254
255
|
font-size: var(--_font-xs);
|
|
@@ -359,31 +360,31 @@ var c=`
|
|
|
359
360
|
}
|
|
360
361
|
|
|
361
362
|
.state-msg { padding: var(--_space-m); font-size: var(--_font-sm); color: var(--_muted); font-style: italic; }
|
|
362
|
-
.state-msg--error { color: #dc2626; }
|
|
363
|
-
`;var
|
|
364
|
-
<article class="wi-card wi-card--minimal" role="article" aria-label="${
|
|
363
|
+
.state-msg--error { color: var(--color-error-text, var(--color-error, #dc2626)); }
|
|
364
|
+
`;var _=window.matchMedia("(prefers-reduced-motion: reduce)");var v=new Map;function w(r,t,e={}){let i=e.priority??10,o={impl:t,bundle:e.bundle,contract:e.contract,priority:i},s=v.get(r);if(customElements.get(r)){if(!s||s.priority>=i){s&&s.priority===i&&s.impl!==t&&console.warn(`[VB Bundle] Tag <${r}> already registered by "${s.bundle}" (priority ${s.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${r}> defined by "${s.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(s&&s.priority>=i){s.priority===i&&console.warn(`[VB Bundle] Tag <${r}> already registered by "${s.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}v.set(r,o),customElements.define(r,t)}function a(r){return String(r).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function b(r){return r.split(" ").map(t=>t[0]).join("").toUpperCase().slice(0,2)}function y(r){let t=0;for(let i=0;i<r.length;i++)t=r.charCodeAt(i)+((t<<5)-t);return`hsl(${(t%360+360)%360}, 65%, 55%)`}function d(r){return`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${r}</svg>`}var l={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"/>'},$={says:{label:"Says",icon:l.messageCircle,color:"#3b82f6"},thinks:{label:"Thinks",icon:l.lightbulb,color:"#8b5cf6"},does:{label:"Does",icon:l.wrench,color:"#f59e0b"},feels:{label:"Feels",icon:l.heart,color:"#ef4444"}};var x={task:'<rect x="3" y="3" width="18" height="18" rx="2"/><path d="m9 12 2 2 4-4"/>',bug:'<path d="m8 2 1.88 1.88"/><path d="M14.12 3.88 16 2"/><path d="M9 7.13v-1a3.003 3.003 0 1 1 6 0v1"/><path d="M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6"/><path d="M12 20v-9"/><path d="M6.53 9C4.6 8.8 3 7.1 3 5"/><path d="M6 13H2"/><path d="M3 21c0-2.1 1.7-3.9 3.8-4"/><path d="M20.97 5c0 2.1-1.6 3.8-3.5 4"/><path d="M22 13h-4"/><path d="M17.2 17c2.1.1 3.8 1.9 3.8 4"/>',chore:'<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"/>',spike:'<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"/>',feature:'<circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/>'},h={critical:{label:"Critical",color:"#dc2626",bg:"rgba(220, 38, 38, 0.1)"},high:{label:"High",color:"#ea580c",bg:"rgba(234, 88, 12, 0.1)"},medium:{label:"Medium",color:"#ca8a04",bg:"rgba(202, 138, 4, 0.1)"},low:{label:"Low",color:"#16a34a",bg:"rgba(22, 163, 74, 0.1)"}},m={backlog:{label:"Backlog",color:"#6b7280",bg:"rgba(107, 114, 128, 0.1)"},"to-do":{label:"To Do",color:"#3b82f6",bg:"rgba(59, 130, 246, 0.1)"},"in-progress":{label:"In Progress",color:"#8b5cf6",bg:"rgba(139, 92, 246, 0.1)"},review:{label:"Review",color:"#f59e0b",bg:"rgba(245, 158, 11, 0.1)"},done:{label:"Done",color:"#22c55e",bg:"rgba(34, 197, 94, 0.1)"},blocked:{label:"Blocked",color:"#dc2626",bg:"rgba(220, 38, 38, 0.1)"}},u=class extends HTMLElement{static get observedAttributes(){return["item-id","type","priority","status","estimate","assignee","story-ids","detail","compact","src"]}#e=new Map;constructor(){super(),this.attachShadow({mode:"open"})}#i(){for(let t of[...this.children]){let e=t.getAttribute("slot");e&&this.#e.set(e,t.textContent.trim())}}_resolve(t){return this.getAttribute(t)||this.#e.get(t)||""}connectedCallback(){this.#i(),this.itemId&&!this.id&&(this.id=this.itemId),this.hasAttribute("src")&&this._loadSrc(this.getAttribute("src")),this.#t(),this.setAttribute("data-upgraded","")}disconnectedCallback(){this.removeAttribute("data-upgraded")}attributeChangedCallback(t,e,i){e!==i&&this.shadowRoot&&(t==="src"&&this.isConnected?this._loadSrc(i):this.#t())}get itemId(){return this.getAttribute("item-id")||""}get itemTitle(){return this.querySelector('[slot="title"]')?.textContent?.trim()||this.#e.get("title")||""}get itemType(){return this.getAttribute("type")||"task"}get priority(){return this.getAttribute("priority")||"medium"}get status(){return this.getAttribute("status")||"backlog"}get estimate(){return this.getAttribute("estimate")||""}get assignee(){return this.getAttribute("assignee")||""}get storyIds(){let t=this.getAttribute("story-ids")||"";return t?t.split(",").map(e=>e.trim()).filter(Boolean):[]}get _detailLevel(){return this.getAttribute("detail")?this.getAttribute("detail"):this.hasAttribute("compact")?"compact":"full"}get _minimalLabel(){return this.itemTitle||this.itemId||"Work item"}updateStatus(t){m[t]&&(this.setAttribute("status",t),this.dispatchEvent(new CustomEvent("work-item:status",{detail:{status:t,itemId:this.itemId},bubbles:!0,composed:!0})))}updatePriority(t){h[t]&&(this.setAttribute("priority",t),this.dispatchEvent(new CustomEvent("work-item:priority",{detail:{priority:t,itemId:this.itemId},bubbles:!0,composed:!0})))}get data(){return{itemId:this.itemId||void 0,type:this.itemType,priority:this.priority,status:this.status,estimate:this.estimate||void 0,assignee:this.assignee||void 0,storyIds:this.storyIds.length?this.storyIds:void 0,detail:this.getAttribute("detail")||void 0,title:this.itemTitle||void 0}}set data(t){!t||typeof t!="object"||(this._applyData(t),this.shadowRoot&&this.#t(),this.dispatchEvent(new CustomEvent("work-item:data-changed",{detail:{data:this.data,source:"property"},bubbles:!0,composed:!0})))}_applyData(t){for(let[e,i]of[["itemId","item-id"],["type","type"],["priority","priority"],["status","status"],["estimate","estimate"],["assignee","assignee"],["detail","detail"]])t[e]!=null&&this.setAttribute(i,String(t[e]));if(t.storyIds&&this.setAttribute("story-ids",Array.isArray(t.storyIds)?t.storyIds.join(","):String(t.storyIds)),t.title&&!this.querySelector('[slot="title"]')){let e=document.createElement("h3");e.slot="title",e.textContent=String(t.title),this.appendChild(e)}for(let e of["description","notes"])if(t[e]&&!this.querySelector(`[slot="${e}"]`)){let i=document.createElement("p");i.slot=e,i.textContent=String(t[e]),this.appendChild(i)}if(t.checklist&&!this.querySelector('[slot="checklist"]')){let e=document.createElement("ul");e.slot="checklist";let i=Array.isArray(t.checklist)?t.checklist:[t.checklist];for(let o of i){let s=document.createElement("li");s.textContent=String(o),e.appendChild(s)}this.appendChild(e)}}async _loadSrc(t){if(!t)return;let e=this.shadowRoot;e.innerHTML=`<style>${c}</style><div class="state-msg">Loading\u2026</div>`;try{let i=await fetch(t);if(!i.ok)throw new Error(`HTTP ${i.status}`);let o=await i.json();this._applyData(o),this.#t()}catch(i){e.innerHTML=`<style>${c}</style><div class="state-msg state-msg--error">Could not load: ${a(i.message)}</div>`}}#t(){let t=this.shadowRoot,e=h[this.priority]||h.medium,i=m[this.status]||m.backlog,o=this.itemType,s=x[o]||x.task,p=this._detailLevel,f=this.itemId?`Work item: ${a(this.itemId)}`:"Work item";if(p==="minimal"){t.innerHTML=`<style>${c}</style>
|
|
365
|
+
<article class="wi-card wi-card--minimal" role="article" aria-label="${f}"
|
|
365
366
|
tabindex="0">
|
|
366
367
|
<div class="wi-body">
|
|
367
368
|
<div class="wi-meta">
|
|
368
|
-
${this.itemId?`<span class="wi-id">${
|
|
369
|
-
<span class="wi-type" data-type="${
|
|
369
|
+
${this.itemId?`<span class="wi-id">${a(this.itemId)}</span>`:""}
|
|
370
|
+
<span class="wi-type" data-type="${a(o)}">${d(s)} ${a(o)}</span>
|
|
370
371
|
</div>
|
|
371
372
|
<div class="wi-title-wrap">
|
|
372
|
-
<slot name="title"><span class="wi-title-fallback">${
|
|
373
|
+
<slot name="title"><span class="wi-title-fallback">${a(this._minimalLabel)}</span></slot>
|
|
373
374
|
</div>
|
|
374
375
|
</div>
|
|
375
|
-
</article>`;return}if(
|
|
376
|
-
<article class="wi-card wi-card--${
|
|
376
|
+
</article>`;return}if(t.innerHTML=`<style>${c}</style>
|
|
377
|
+
<article class="wi-card wi-card--${p}" role="article" aria-label="${f}">
|
|
377
378
|
|
|
378
379
|
<header class="wi-header">
|
|
379
380
|
<div class="wi-meta">
|
|
380
|
-
${this.itemId?`<span class="wi-id">${
|
|
381
|
-
<span class="wi-type" data-type="${
|
|
381
|
+
${this.itemId?`<span class="wi-id">${a(this.itemId)}</span>`:""}
|
|
382
|
+
<span class="wi-type" data-type="${a(o)}">${d(s)} ${a(o)}</span>
|
|
382
383
|
</div>
|
|
383
384
|
<div class="wi-badges">
|
|
384
|
-
<span class="wi-priority" style="color:${
|
|
385
|
-
<span class="wi-status" style="color:${
|
|
386
|
-
${this.estimate?`<span class="wi-estimate" title="Estimate">${
|
|
385
|
+
<span class="wi-priority" style="color:${e.color};background:${e.bg}">${a(e.label)}</span>
|
|
386
|
+
<span class="wi-status" style="color:${i.color};background:${i.bg}">${a(i.label)}</span>
|
|
387
|
+
${this.estimate?`<span class="wi-estimate" title="Estimate">${a(this.estimate)}</span>`:""}
|
|
387
388
|
</div>
|
|
388
389
|
</header>
|
|
389
390
|
|
|
@@ -394,13 +395,13 @@ var c=`
|
|
|
394
395
|
|
|
395
396
|
${this.assignee?`
|
|
396
397
|
<div class="wi-assignee">
|
|
397
|
-
<span class="wi-assignee__avatar" style="background:${
|
|
398
|
-
${
|
|
398
|
+
<span class="wi-assignee__avatar" style="background:${y(this.assignee)}">${b(this.assignee)}</span>
|
|
399
|
+
${a(this.assignee)}
|
|
399
400
|
</div>`:""}
|
|
400
401
|
|
|
401
402
|
${this.storyIds.length?`
|
|
402
403
|
<div class="wi-links">
|
|
403
|
-
${this.storyIds.map(n=>`<a class="wi-link" href="#${
|
|
404
|
+
${this.storyIds.map(n=>`<a class="wi-link" href="#${a(n)}">${d('<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M7 7h10"/><path d="M7 12h10"/><path d="M7 17h10"/>')} ${a(n)}</a>`).join("")}
|
|
404
405
|
</div>`:""}
|
|
405
406
|
</div>
|
|
406
407
|
|
|
@@ -442,5 +443,5 @@ var c=`
|
|
|
442
443
|
</div>
|
|
443
444
|
</div>
|
|
444
445
|
|
|
445
|
-
</article>`,
|
|
446
|
+
</article>`,p==="compact")for(let n of t.querySelectorAll(".wi-section")){let g=n.querySelector("slot");g&&g.assignedNodes().length===0&&n.setAttribute("data-empty","")}this.dispatchEvent(new CustomEvent("work-item:ready",{detail:{itemId:this.itemId,title:this.itemTitle,type:o,priority:this.priority,status:this.status},bubbles:!0,composed:!0}))}};w("work-item",u);export{u as WorkItem};
|
|
446
447
|
//# sourceMappingURL=work-item.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var o=class extends HTMLElement{#e=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0})))}disconnectedCallback(){for(let
|
|
1
|
+
var o=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,i,e,n){t.addEventListener(i,e,n),this.#e.push(()=>t.removeEventListener(i,e,n))}setup(){}teardown(){}setState(t,i){this.#t||(this.#t=this.attachInternals());let e=this.#t.states;try{i?e.add(t):e.delete(t)}catch{let n=`--${t}`;i?e.add(n):e.delete(n)}}_adoptInternals(t){this.#t||(this.#t=t)}};var f=window.matchMedia("(prefers-reduced-motion: reduce)");var c=new Map;function l(s,t,i={}){let e=i.priority??10,n={impl:t,bundle:i.bundle,contract:i.contract,priority:e},r=c.get(s);if(customElements.get(s)){if(!r||r.priority>=e){r&&r.priority===e&&r.impl!==t&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${r.bundle}" (priority ${r.priority}). Skipping "${i.bundle}".`);return}console.warn(`[VB Bundle] Tag <${s}> defined by "${r.bundle}" cannot be replaced (customElements.define is permanent). "${i.bundle}" has higher priority but arrived late.`);return}if(r&&r.priority>=e){r.priority===e&&console.warn(`[VB Bundle] Tag <${s}> already registered by "${r.bundle}". Skipping "${i.bundle}" (first wins at equal priority).`);return}c.set(s,n),customElements.define(s,t)}var d='<svg viewBox="0 0 68 48" width="68" height="48" aria-hidden="true" focusable="false"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.64 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="var(--color-error, #f00)"/><path d="M45 24 27 14v20z" fill="#fff"/></svg>',u={hq:"hqdefault",mq:"mqdefault",sd:"sddefault",maxres:"maxresdefault"},a=class extends o{#e;#t;setup(){return this.#e=this.getAttribute("video-id"),this.#t=this.getAttribute("title")??"Play video",this.#e?(this.hasAttribute("autoplay")?this.#i():this.#a(),!0):(console.warn("youtube-player: missing required video-id attribute"),!1)}#n(){let t=new URLSearchParams({autoplay:"1"}),i=this.getAttribute("start");i&&t.set("start",i);let e=this.getAttribute("list");return e&&t.set("list",e),this.getAttribute("params")&&new URLSearchParams(this.getAttribute("params")||"").forEach((n,r)=>t.set(r,n)),`https://www.youtube-nocookie.com/embed/${this.#e}?${t}`}#o(){let t=this.getAttribute("thumbnail")??"hq";return`https://i.ytimg.com/vi/${this.#e}/${u[t]??"hqdefault"}.jpg`}#a(){this.setAttribute("state","ready"),this.setAttribute("tabindex","0"),this.setAttribute("role","button"),this.setAttribute("aria-label",`Play ${this.#t}`),this.innerHTML=`<img src="${this.#o()}" alt="" loading="lazy" decoding="async"><button type="button" aria-label="Play ${this.#t}">${d}</button>`,this.addEventListener("click",this.#r,{once:!0}),this.addEventListener("keydown",this.#s)}#r=()=>{this.removeEventListener("keydown",this.#s),this.#i()};#s=t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.removeEventListener("click",this.#r),this.#i())};#i(){this.setAttribute("state","active"),this.removeAttribute("tabindex"),this.removeAttribute("role"),this.removeAttribute("aria-label"),this.innerHTML=`<iframe src="${this.#n()}" title="${this.#t}" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen loading="lazy"></iframe>`,this.querySelector("iframe")?.focus()}};l("youtube-player",a);export{a as YouTubePlayer};
|
|
2
2
|
//# sourceMappingURL=youtube-player.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* generated by scripts/gen-icon-css.js — do not edit */
|
|
2
|
+
/* Link this stylesheet UNLAYERED (do not @import it into a cascade layer), or icons will not resolve. */
|
|
3
|
+
[data-icon-set="bold"] [data-icon="bell"],[data-icon-set="bold"][data-icon="bell"]{--vb-icon:url("bold/bell.svg")}
|
|
4
|
+
[data-icon-set="bold"] [data-icon="bookmark"],[data-icon-set="bold"][data-icon="bookmark"]{--vb-icon:url("bold/bookmark.svg")}
|
|
5
|
+
[data-icon-set="bold"] [data-icon="calendar"],[data-icon-set="bold"][data-icon="calendar"]{--vb-icon:url("bold/calendar.svg")}
|
|
6
|
+
[data-icon-set="bold"] [data-icon="camera"],[data-icon-set="bold"][data-icon="camera"]{--vb-icon:url("bold/camera.svg")}
|
|
7
|
+
[data-icon-set="bold"] [data-icon="globe"],[data-icon-set="bold"][data-icon="globe"]{--vb-icon:url("bold/globe.svg")}
|
|
8
|
+
[data-icon-set="bold"] [data-icon="heart"],[data-icon-set="bold"][data-icon="heart"]{--vb-icon:url("bold/heart.svg")}
|
|
9
|
+
[data-icon-set="bold"] [data-icon="home"],[data-icon-set="bold"][data-icon="home"]{--vb-icon:url("bold/home.svg")}
|
|
10
|
+
[data-icon-set="bold"] [data-icon="lock"],[data-icon-set="bold"][data-icon="lock"]{--vb-icon:url("bold/lock.svg")}
|
|
11
|
+
[data-icon-set="bold"] [data-icon="mail"],[data-icon-set="bold"][data-icon="mail"]{--vb-icon:url("bold/mail.svg")}
|
|
12
|
+
[data-icon-set="bold"] [data-icon="music"],[data-icon-set="bold"][data-icon="music"]{--vb-icon:url("bold/music.svg")}
|
|
13
|
+
[data-icon-set="bold"] [data-icon="search"],[data-icon-set="bold"][data-icon="search"]{--vb-icon:url("bold/search.svg")}
|
|
14
|
+
[data-icon-set="bold"] [data-icon="settings"],[data-icon-set="bold"][data-icon="settings"]{--vb-icon:url("bold/settings.svg")}
|
|
15
|
+
[data-icon-set="bold"] [data-icon="star"],[data-icon-set="bold"][data-icon="star"]{--vb-icon:url("bold/star.svg")}
|
|
16
|
+
[data-icon-set="bold"] [data-icon="user"],[data-icon-set="bold"][data-icon="user"]{--vb-icon:url("bold/user.svg")}
|
|
17
|
+
[data-icon-set="bold"] [data-icon="zap"],[data-icon-set="bold"][data-icon="zap"]{--vb-icon:url("bold/zap.svg")}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
["bell","bookmark","calendar","camera","globe","heart","home","lock","mail","music","search","settings","star","user","zap"]
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/* generated by scripts/gen-icon-css.js — do not edit */
|
|
2
|
+
/* Link this stylesheet UNLAYERED (do not @import it into a cascade layer), or icons will not resolve. */
|
|
3
|
+
[data-icon-set="custom"] [data-icon="bluesky"],[data-icon-set="custom"][data-icon="bluesky"]{--vb-icon:url("custom/bluesky.svg")}
|
|
4
|
+
[data-icon-set="custom"] [data-icon="mastodon"],[data-icon-set="custom"][data-icon="mastodon"]{--vb-icon:url("custom/mastodon.svg")}
|
|
5
|
+
[data-icon-set="custom"] [data-icon="telegram"],[data-icon-set="custom"][data-icon="telegram"]{--vb-icon:url("custom/telegram.svg")}
|
|
6
|
+
[data-icon-set="custom"] [data-icon="whatsapp"],[data-icon-set="custom"][data-icon="whatsapp"]{--vb-icon:url("custom/whatsapp.svg")}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
["bluesky","mastodon","telegram","whatsapp"]
|