UNPKG

@public-ui/components

Version:

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

4 lines 1.92 kB
/*! * KoliBri - The accessible HTML-Standard */ import{i as t,r as e}from"./dev.utils-0b748391.js";import{e as o,g as s,L as r,a as i,f as a,d as l}from"./dev.utils-fab45cbc.js";import{y as n,t as c,z as f,A as d,B as p,p as m,C as L}from"./prop.validators-64749272.js";import"./index-f0de5c73.js";import"./reuse-32931294.js";import"./index-da3e0c00.js";const u=()=>{let t=l().KoliBri;return void 0===t&&(t={},Object.defineProperty(l(),"KoliBri",{value:t,writable:!1})),t};function v(t,e){try{Object.defineProperty(u(),t,{get:function(){return e}})}catch(e){r.debug(`KoliBri property ${t} is already bind.`)}}const h=(t,e)=>r.debug(`${t} ${e?"":"not "}activated`),g=()=>{if(t(),o()){e(),v("a11yColorContrast",n),v("querySelector",c),v("querySelectorAll",f),v("querySelectorColors",d),v("utils",(function(){return p})),v("parseJson",m),v("stringifyJson",L);const t=s().body,r=s().createElement("svg");if(r.setAttribute("aria-label","KoliBri-DevTools"),r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("role","toolbar"),r.setAttribute("style","position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;"),r.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>',s().body.appendChild(r),h("Development mode",o()),h("Experimental mode",i()),h("Color contrast analysis",a()),a()){const e=setTimeout((()=>{clearTimeout(e),setInterval((()=>{p.queryHtmlElementColors(s().createElement("div"),n(t),!1,!1)}),1e4)}),2500)}}};export{g as initialize};