UNPKG

@ryusei/light

Version:

<div align="center"> <a href="https://light.ryuseijs.com"> <img alt="RyuseiLight" src="https://light.ryuseijs.com/images/svg/logo.svg" width="70"> </a>

2 lines (1 loc) 927 B
!function(o,n){if("function"==typeof define&&define.amd)define([],n);else if("undefined"!=typeof exports)n();else{n(),o.unknown={}}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,(function(){"undefined"!=typeof window&&window.RyuseiLight&&window.RyuseiLight.compose({Overlay:function(o){var n=o.event,e=o.options;n.on("mounted",(function(){var o=e.overlay,t=void 0===o?{}:o,i=e.tools,f=t.topRight,s=t.topLeft;[f=f||"topRight"===i,s=s||"topLeft"===i].forEach((function(o,e){o&&(i&&function(o,n){var e=n?"Left":"Right";o.on("overlay:top"+e,(function(n){n('<span class="rl__tools">'),o.emit("tools:top"+e,n),n("</span>")}))}(n,1===e),function(o,n){var e="rl__overlay";o.on("close",(function(t){t('<div class="'+e+" "+e+"--top-"+(n?"left":"right")+'">'),o.emit("overlay:top"+(n?"Left":"Right"),t),t("</div>")}))}(n,1===e))})),(f||s)&&n.on("open",(function(o,n){n.push("has-top-overlay")}))}))}})}));