UNPKG

@public-ui/components

Version:

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

4 lines 1.74 kB
/*! * KoliBri - The accessible HTML-Standard */ import{L as Log,x as getDocument,y as setExperimentalMode,z as setColorContrastAnalysis,A as getWindow,B as isTestMode}from"./common.js";import{Env}from"@stencil/core/internal/client";const initMeta=()=>{try{const e=getDocument();if(!e||"function"!=typeof e.querySelector)return;const t=e.querySelector('meta[name="kolibri"]');if(t&&t.hasAttribute("content")){const e=t.getAttribute("content");"string"==typeof e&&(setExperimentalMode(e.includes("experimental-mode=true")),setColorContrastAnalysis(e.includes("color-contrast-analysis=true")))}}catch(e){}},getKoliBri=()=>{let e=getWindow().KoliBri;return void 0===e&&(e={},Object.defineProperty(getWindow(),"KoliBri",{value:e,writable:!1})),e},initKoliBri=()=>{initMeta(),Log.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${Env.kolibriVersion}\n\t`,{forceLog:!0})},renderDevAdvice=()=>{!0!==getKoliBri().adviceShown&&(Object.defineProperty(getKoliBri(),"adviceShown",{get:function(){return!0}}),Log.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let nonce=()=>Math.floor(16777215*Math.random()).toString(16);isTestMode()&&(nonce=()=>"nonce");export{initKoliBri as i,nonce as n,renderDevAdvice as r};