diff --git a/index.d.ts b/index.d.ts index 5b8c774..e98a164 100644 --- a/index.d.ts +++ b/index.d.ts @@ -110,7 +110,7 @@ interface CTXMenuSingleton { hide(): void; } -/*! ctxMenu v1.6.0 | (c) Nikolaj Kappler | https://github.com/nkappler/ctxmenu/blob/master/LICENSE !*/ +/*! ctxMenu v1.6.1 | (c) Nikolaj Kappler | https://github.com/nkappler/ctxmenu/blob/master/LICENSE !*/ declare const ctxmenu: CTXMenuSingleton; diff --git a/index.js b/index.js index 1e71538..4779ae4 100644 --- a/index.js +++ b/index.js @@ -232,7 +232,7 @@ function getScale() { var styles = 'html{min-height:100%}.ctxmenu{position:fixed;border:1px solid #999;padding:2px 0;box-shadow:#aaa 3px 3px 3px;background:#fff;margin:0;z-index:9999;overflow-y:auto;font:15px Verdana, sans-serif;box-sizing:border-box}.ctxmenu li{margin:1px 0;display:block;position:relative;user-select:none}.ctxmenu li.heading{font-weight:bold;margin-left:-5px}.ctxmenu li span{display:block;padding:2px 20px;cursor:default}.ctxmenu li a{color:inherit;text-decoration:none}.ctxmenu li.icon{padding-left:15px}.ctxmenu img.icon{position:absolute;width:18px;left:10px;top:2px}.ctxmenu li.disabled{color:#ccc}.ctxmenu li.divider{border-bottom:1px solid #aaa;margin:5px 0}.ctxmenu li.interactive:hover{background:rgba(0, 0, 0, .1)}.ctxmenu li.submenu::after{content:"";position:absolute;display:block;top:0;bottom:0;right:.4em;margin:auto .1rem auto auto;border-right:1px solid #000;border-top:1px solid #000;transform:rotate(45deg);width:.3rem;height:.3rem}.ctxmenu li.submenu.disabled::after{border-color:#ccc}'; -/*! ctxMenu v1.6.0 | (c) Nikolaj Kappler | https://github.com/nkappler/ctxmenu/blob/master/LICENSE !*/ var ContextMenu = function() { +/*! ctxMenu v1.6.1 | (c) Nikolaj Kappler | https://github.com/nkappler/ctxmenu/blob/master/LICENSE !*/ var ContextMenu = function() { function ContextMenu() { var _this = this; this.cache = {}; diff --git a/index.min.js b/index.min.js index fa0e6a8..a343320 100644 --- a/index.min.js +++ b/index.min.js @@ -1,2 +1,2 @@ "use strict";function e(e,t,n){if(n||2===arguments.length)for(var o,i=0,r=t.length;i".concat(t(e.text),""),r=t(e.element);r?n.append(r):n.innerHTML=o||i,n.title=t(e.tooltip)||"",e.style&&n.setAttribute("style",t(e.style));e.icon&&(n.classList.add("icon"),n.innerHTML+=''));for(var a=0,d=Object.entries(t(e.events)||{});ap?p-e.width:t.x:t.xm?m-e.height:t.y:t.y ul");i&&i.parentElement!==n&&this.hide(i),n.appendChild(this.generateDOM(t,n))},o.addStylesToDom=function(){var e=function(){if("loading"===document.readyState)return document.addEventListener("readystatechange",(function(){e()}));var t=document.createElement("style");t.innerHTML='html{min-height:100%}.ctxmenu{position:fixed;border:1px solid #999;padding:2px 0;box-shadow:#aaa 3px 3px 3px;background:#fff;margin:0;z-index:9999;overflow-y:auto;font:15px Verdana, sans-serif;box-sizing:border-box}.ctxmenu li{margin:1px 0;display:block;position:relative;user-select:none}.ctxmenu li.heading{font-weight:bold;margin-left:-5px}.ctxmenu li span{display:block;padding:2px 20px;cursor:default}.ctxmenu li a{color:inherit;text-decoration:none}.ctxmenu li.icon{padding-left:15px}.ctxmenu img.icon{position:absolute;width:18px;left:10px;top:2px}.ctxmenu li.disabled{color:#ccc}.ctxmenu li.divider{border-bottom:1px solid #aaa;margin:5px 0}.ctxmenu li.interactive:hover{background:rgba(0, 0, 0, .1)}.ctxmenu li.submenu::after{content:"";position:absolute;display:block;top:0;bottom:0;right:.4em;margin:auto .1rem auto auto;border-right:1px solid #000;border-top:1px solid #000;transform:rotate(45deg);width:.3rem;height:.3rem}.ctxmenu li.submenu.disabled::after{border-color:#ccc}',document.head.insertBefore(t,document.head.childNodes[0]),e=function(){}};e()},o}().getInstance(); -/*! ctxMenu v1.6.0 | (c) Nikolaj Kappler | https://github.com/nkappler/ctxmenu/blob/master/LICENSE !*/exports.ctxmenu=m; +/*! ctxMenu v1.6.1 | (c) Nikolaj Kappler | https://github.com/nkappler/ctxmenu/blob/master/LICENSE !*/exports.ctxmenu=m; diff --git a/package-lock.json b/package-lock.json index 8628a49..52be6d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ctxmenu", - "version": "1.6.0", + "version": "1.6.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ctxmenu", - "version": "1.6.0", + "version": "1.6.1", "license": "MIT", "devDependencies": { "@rollup/plugin-typescript": "^11.1.3", diff --git a/package.json b/package.json index f61bb64..83f6527 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ctxmenu", - "version": "1.6.0", + "version": "1.6.1", "description": "", "main": "index.js", "types": "index.d.ts", diff --git a/src/ctxmenu.ts b/src/ctxmenu.ts index 6d8c3b2..8257951 100644 --- a/src/ctxmenu.ts +++ b/src/ctxmenu.ts @@ -1,4 +1,4 @@ -/*! ctxMenu v1.6.0 | (c) Nikolaj Kappler | https://github.com/nkappler/ctxmenu/blob/master/LICENSE !*/ +/*! ctxMenu v1.6.1 | (c) Nikolaj Kappler | https://github.com/nkappler/ctxmenu/blob/master/LICENSE !*/ import { generateMenuItem, isDisabled, onHoverDebounced } from "./elementFactory"; import type { BeforeRenderFN, CTXMenu, CTXMenuSingleton } from "./interfaces"; diff --git a/standalone/ctxmenu.js b/standalone/ctxmenu.js index 51bf890..f2c68e3 100644 --- a/standalone/ctxmenu.js +++ b/standalone/ctxmenu.js @@ -206,7 +206,7 @@ }; } var styles = 'html{min-height:100%}.ctxmenu{position:fixed;border:1px solid #999;padding:2px 0;box-shadow:#aaa 3px 3px 3px;background:#fff;margin:0;z-index:9999;overflow-y:auto;font:15px Verdana, sans-serif;box-sizing:border-box}.ctxmenu li{margin:1px 0;display:block;position:relative;user-select:none}.ctxmenu li.heading{font-weight:bold;margin-left:-5px}.ctxmenu li span{display:block;padding:2px 20px;cursor:default}.ctxmenu li a{color:inherit;text-decoration:none}.ctxmenu li.icon{padding-left:15px}.ctxmenu img.icon{position:absolute;width:18px;left:10px;top:2px}.ctxmenu li.disabled{color:#ccc}.ctxmenu li.divider{border-bottom:1px solid #aaa;margin:5px 0}.ctxmenu li.interactive:hover{background:rgba(0, 0, 0, .1)}.ctxmenu li.submenu::after{content:"";position:absolute;display:block;top:0;bottom:0;right:.4em;margin:auto .1rem auto auto;border-right:1px solid #000;border-top:1px solid #000;transform:rotate(45deg);width:.3rem;height:.3rem}.ctxmenu li.submenu.disabled::after{border-color:#ccc}'; - /*! ctxMenu v1.6.0 | (c) Nikolaj Kappler | https://github.com/nkappler/ctxmenu/blob/master/LICENSE !*/ var ContextMenu = function() { + /*! ctxMenu v1.6.1 | (c) Nikolaj Kappler | https://github.com/nkappler/ctxmenu/blob/master/LICENSE !*/ var ContextMenu = function() { function ContextMenu() { var _this = this; this.cache = {}; diff --git a/standalone/ctxmenu.min.js b/standalone/ctxmenu.min.js index bd17c1c..1269b56 100644 --- a/standalone/ctxmenu.min.js +++ b/standalone/ctxmenu.min.js @@ -1,2 +1,2 @@ !function(){"use strict";function e(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o".concat(t(e.text),""),r=t(e.element);r?n.append(r):n.innerHTML=i||o,n.title=t(e.tooltip)||"",e.style&&n.setAttribute("style",t(e.style));e.icon&&(n.classList.add("icon"),n.innerHTML+=''));for(var a=0,d=Object.entries(t(e.events)||{});ap?p-e.width:t.x:t.xm?m-e.height:t.y:t.y ul");o&&o.parentElement!==n&&this.hide(o),n.appendChild(this.generateDOM(t,n))},i.addStylesToDom=function(){var e=function(){if("loading"===document.readyState)return document.addEventListener("readystatechange",(function(){e()}));var t=document.createElement("style");t.innerHTML='html{min-height:100%}.ctxmenu{position:fixed;border:1px solid #999;padding:2px 0;box-shadow:#aaa 3px 3px 3px;background:#fff;margin:0;z-index:9999;overflow-y:auto;font:15px Verdana, sans-serif;box-sizing:border-box}.ctxmenu li{margin:1px 0;display:block;position:relative;user-select:none}.ctxmenu li.heading{font-weight:bold;margin-left:-5px}.ctxmenu li span{display:block;padding:2px 20px;cursor:default}.ctxmenu li a{color:inherit;text-decoration:none}.ctxmenu li.icon{padding-left:15px}.ctxmenu img.icon{position:absolute;width:18px;left:10px;top:2px}.ctxmenu li.disabled{color:#ccc}.ctxmenu li.divider{border-bottom:1px solid #aaa;margin:5px 0}.ctxmenu li.interactive:hover{background:rgba(0, 0, 0, .1)}.ctxmenu li.submenu::after{content:"";position:absolute;display:block;top:0;bottom:0;right:.4em;margin:auto .1rem auto auto;border-right:1px solid #000;border-top:1px solid #000;transform:rotate(45deg);width:.3rem;height:.3rem}.ctxmenu li.submenu.disabled::after{border-color:#ccc}',document.head.insertBefore(t,document.head.childNodes[0]),e=function(){}};e()},i}().getInstance(); -/*! ctxMenu v1.6.0 | (c) Nikolaj Kappler | https://github.com/nkappler/ctxmenu/blob/master/LICENSE !*/window.ctxmenu=m}(); +/*! ctxMenu v1.6.1 | (c) Nikolaj Kappler | https://github.com/nkappler/ctxmenu/blob/master/LICENSE !*/window.ctxmenu=m}();