UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

4 lines 1.82 kB
/*! * KoliBri - The accessible HTML-Standard */ import{U as t,A as o,L as e,W as s,X as l,Y as n,D as i,P as r,Z as a,_ as f,p as c,$ as p,J as L}from"./common-7RW_NFNf.js";import{i as d,r as m}from"./dev.utils-9pEPkxnH.js";import"./index-CElQfBOC.js";const u=()=>{let t=i().KoliBri;return void 0===t&&(t={},Object.defineProperty(i(),"KoliBri",{value:t,writable:!1})),t};function h(t,o){try{Object.defineProperty(u(),t,{get:function(){return o}})}catch(o){e.debug(`KoliBri property ${t} is already bind.`)}}const v=(t,o)=>e.debug(`${t} ${o?"":"not "}activated`),g=()=>{if(d(),t()){m(),h("a11yColorContrast",n),h("querySelector",r),h("querySelectorAll",a),h("querySelectorColors",f),h("utils",(function(){return l})),h("parseJson",c),h("stringifyJson",p);const e=o().body,i=o().createElement("svg");if(i.setAttribute("aria-label","KoliBri-DevTools"),i.setAttribute("xmlns","http://www.w3.org/2000/svg"),i.setAttribute("role","toolbar"),i.setAttribute("style","position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;"),i.innerHTML='<svg\n xmlns="http://www.w3.org/2000/svg"\n width="50"\n height="50"\n viewBox="0 0 600 600"\n>\n <path d="M353 322L213 304V434L353 322Z" fill="#047" />\n <path d="M209 564V304L149 434L209 564Z" fill="#047" />\n <path d="M357 316L417 250L361 210L275 244L357 316Z" fill="#047" />\n <path d="M353 318L35 36L213 300L353 318Z" fill="#047" />\n <path d="M329 218L237 92L250 222L272 241L329 218Z" fill="#047" />\n <path d="M391 286L565 272L421 252L391 286Z" fill="#047" />\n</svg>',o().body.appendChild(i),v("Development mode",t()),v("Experimental mode",L()),v("Color contrast analysis",s()),s()){const t=setTimeout((()=>{clearTimeout(t),setInterval((()=>{l.queryHtmlElementColors(o().createElement("div"),n(e),!1,!1)}),1e4)}),2500)}}};export{g as initialize};