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{Q as t,g as e,L as o,F as s,R as i,T as l,N as a,U as n,W as r,X as c,k as d,Y as f,h as L}from"./index-ebe5a881.js";import{i as p,r as m}from"./dev.utils-cb61837d.js";import"./index-1ed13705.js";const u=()=>{let t=L().KoliBri;return void 0===t&&(t={},Object.defineProperty(L(),"KoliBri",{value:t,writable:!1})),t};function h(t,e){try{Object.defineProperty(u(),t,{get:function(){return e}})}catch(e){o.debug(`KoliBri property ${t} is already bind.`)}}const v=(t,e)=>o.debug(`${t} ${e?"":"not "}activated`),g=()=>{if(p(),t()){m(),h("a11yColorContrast",l),h("querySelector",a),h("querySelectorAll",n),h("querySelectorColors",r),h("utils",(function(){return c})),h("parseJson",d),h("stringifyJson",f);const o=e().body,p=e().createElement("svg");if(p.setAttribute("aria-label","KoliBri-DevTools"),p.setAttribute("xmlns","http://www.w3.org/2000/svg"),p.setAttribute("role","toolbar"),p.setAttribute("style","position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;"),p.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>',e().body.appendChild(p),v("Development mode",t()),v("Experimental mode",s()),v("Color contrast analysis",i()),i()){const t=setTimeout((()=>{clearTimeout(t),setInterval((()=>{c.queryHtmlElementColors(e().createElement("div"),l(o),!1,!1)}),1e4)}),2500)}}};export{g as initialize};