@webqit/subscript
Advanced tools
Comparing version 2.0.23 to 2.0.24
@@ -1,2 +0,2 @@ | ||
(()=>{"use strict";var t={829:(t,e,n)=>{n.d(e,{Z:()=>s});const s=t=>class extends t{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){[].concat(this.css).forEach((t=>{if(t.includes("{")&&t.includes(":")&&t.includes(";"))this.shadowRoot.appendChild(document.createElement("style")).textContent=t;else{let e=this.shadowRoot.appendChild(document.createElement("link"));e.setAttribute("rel","stylesheet"),e.setAttribute("href",t)}}))}get css(){return[]}}}},e={};function n(s){var o=e[s];if(void 0!==o)return o.exports;var i=e[s]={exports:{}};return t[s](i,i.exports,n),i.exports}n.d=(t,e)=>{for(var s in e)n.o(e,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t=n(829);class e extends((0,t.Z)(HTMLElement)){connectedCallback(){this._contentSlot=document.createElement("slot"),this.shadowRoot.append(this._contentSlot),super.connectedCallback(),this._contentSlot.addEventListener("slotchange",(()=>{setTimeout((()=>{let t=this._contentSlot.assignedNodes().reduce(((t,e)=>t||(e.subscripts instanceof Map?e:null)),null);t&&this.inspectElement(t)}),0)}))}inspectElement(t){this.consoleElement&&(this.consoleElement.remove(),this.controlsElement.remove()),this.consoleElement=document.createElement("subscript-console"),this.controlsElement=document.createElement("div"),this.controlsElement.classList.add("controls-element"),this.shadowRoot.append(this.consoleElement,this.controlsElement),this.buttons={},t.subscriptConsole.forEach(((t,e)=>{let n="number"==typeof e?`script:${e}`:`${e}()`;this.buttons[e]=this.controlsElement.appendChild(document.createElement("button")),this.buttons[e].setAttribute("script-id",e),this.buttons[e].setAttribute("title",n),this.buttons[e].appendChild(document.createElement("span")).append(" ",n);let s=this.buttons[e].appendChild(document.createElement("i"));(this.getAttribute("data-icons")||"bi bi-"+("number"==typeof e?"code":"braces")).split(" ").map((t=>t.trim())).forEach((t=>s.classList.add(t))),this.buttons[e].addEventListener("click",(n=>{this.active&&this.active.classList.remove("active"),this.active=this.buttons[e],this.active.classList.add("active"),this.inspectFunction(t)}))}))}inspectFunction(t){if(t)this.consoleElement.bind(t);else{let t=Object.keys(this.buttons);if(t.length){let e=this.buttons[t[0]],n=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});e.dispatchEvent(n)}}}get css(){return["https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css","\n * {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n :host {\n position: relative;\n display: block;\n background-color: rgb(75, 75, 75);\n }\n .controls-element {\n position: relative;\n z-index: 10;\n }\n .controls-element button {\n display: inline-flex;\n align-items: center;\n background-color: transparent;\n padding: 0.5rem 1rem;\n border: none;\n color: silver;\n }\n .controls-element button:is(:hover, .active) {\n background-color: dimgray;\n color: gainsboro;\n }\n .controls-element button .bi {\n margin-left: 0.5rem;\n }\n "]}}customElements.define("subscript-inspector",e)})()})(); | ||
(()=>{"use strict";var t={829:(t,e,n)=>{n.d(e,{Z:()=>s});const s=t=>class extends t{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){[].concat(this.css).forEach((t=>{if(t.includes("{")&&t.includes(":")&&t.includes(";"))this.shadowRoot.appendChild(document.createElement("style")).textContent=t;else{let e=this.shadowRoot.appendChild(document.createElement("link"));e.setAttribute("rel","stylesheet"),e.setAttribute("href",t)}}))}get css(){return[]}}}},e={};function n(s){var o=e[s];if(void 0!==o)return o.exports;var i=e[s]={exports:{}};return t[s](i,i.exports,n),i.exports}n.d=(t,e)=>{for(var s in e)n.o(e,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t=n(829);class e extends((0,t.Z)(HTMLElement)){connectedCallback(){this._contentSlot=document.createElement("slot"),this.shadowRoot.append(this._contentSlot),super.connectedCallback(),this._contentSlot.addEventListener("slotchange",(()=>{setTimeout((()=>{let t=this._contentSlot.assignedNodes().reduce(((t,e)=>t||(e.subscripts instanceof Map?e:null)),null);t&&this.inspectElement(t)}),0)}))}inspectElement(t){this.consoleElement&&(this.consoleElement.remove(),this.controlsElement.remove()),this.consoleElement=document.createElement("subscript-console"),this.controlsElement=document.createElement("div"),this.controlsElement.classList.add("controls-element"),this.shadowRoot.append(this.consoleElement,this.controlsElement),this.buttons={},t.subscripts.forEach(((t,e)=>{let n="number"==typeof e?`script:${e}`:`${e}()`;this.buttons[e]=this.controlsElement.appendChild(document.createElement("button")),this.buttons[e].setAttribute("script-id",e),this.buttons[e].setAttribute("title",n),this.buttons[e].appendChild(document.createElement("span")).append(" ",n);let s=this.buttons[e].appendChild(document.createElement("i"));(this.getAttribute("data-icons")||"bi bi-"+("number"==typeof e?"code":"braces")).split(" ").map((t=>t.trim())).forEach((t=>s.classList.add(t))),this.buttons[e].addEventListener("click",(n=>{this.active&&this.active.classList.remove("active"),this.active=this.buttons[e],this.active.classList.add("active"),this.inspectFunction(t)}))}))}inspectFunction(t){if(t)this.consoleElement.bind(t);else{let t=Object.keys(this.buttons);if(t.length){let e=this.buttons[t[0]],n=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});e.dispatchEvent(n)}}}get css(){return["https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css","\n * {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n :host {\n position: relative;\n display: block;\n background-color: rgb(75, 75, 75);\n }\n .controls-element {\n position: relative;\n z-index: 10;\n }\n .controls-element button {\n display: inline-flex;\n align-items: center;\n background-color: transparent;\n padding: 0.5rem 1rem;\n border: none;\n color: silver;\n }\n .controls-element button:is(:hover, .active) {\n background-color: dimgray;\n color: gainsboro;\n }\n .controls-element button .bi {\n margin-left: 0.5rem;\n }\n "]}}customElements.define("subscript-inspector",e)})()})(); | ||
//# sourceMappingURL=inspector-element.js.map |
@@ -11,3 +11,3 @@ { | ||
"homepage": "https://webqit.io/tooling/subscript", | ||
"version": "2.0.23", | ||
"version": "2.0.24", | ||
"license": "MIT", | ||
@@ -14,0 +14,0 @@ "repository": { |
@@ -40,3 +40,3 @@ | ||
this.buttons = {}; | ||
subscriptElement.subscriptConsole.forEach( ( subscriptFunction, id ) => { | ||
subscriptElement.subscripts.forEach( ( subscriptFunction, id ) => { | ||
let title = typeof id === 'number' ? `script:${ id }` : `${ id }()`; | ||
@@ -43,0 +43,0 @@ this.buttons[ id ] = this.controlsElement.appendChild( document.createElement( 'button' ) ); |
@@ -15,1 +15,2 @@ | ||
console.log( gen.source ); | ||
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3505604
10