Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ne1410s/demo

Package Overview
Dependencies
Maintainers
1
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ne1410s/demo - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

51

dist/ne14_demo.cjs.min.js

@@ -1,1 +0,50 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@ne1410s/cust-elems");class t extends e.CustomElementBase{constructor(){super("data:text/css;base64,LnJvb3Qgew0KICBwb3NpdGlvbjogcmVsYXRpdmU7DQogIGJvcmRlcjogMXB4IHNvbGlkIGJsYWNrOw0KICBib3JkZXItcmFkaXVzOiAzcHg7DQogIHBhZGRpbmc6IDA7DQogIG1hcmdpbjogMDsNCiAgZGlzcGxheTogaW5saW5lLWJsb2NrOw0KfQ0KLm5vcm1hbCB7DQogIHBhZGRpbmc6IDAgLjI1cmVtOw0KICB0cmFuc2l0aW9uOiBjb2xvciAuM3MsIGJhY2tncm91bmQtY29sb3IgLjNzOw0KICBkaXNwbGF5OiBibG9jazsNCn0NCi5yZXZlYWxbZGF0YS1jb3JuZXJdIHsgcG9zaXRpb246IGZpeGVkOyB9DQoucmV2ZWFsW2RhdGEtY29ybmVyPSIxIl0geyB0b3A6IDA7IGxlZnQ6IDA7IH0NCi5yZXZlYWxbZGF0YS1jb3JuZXI9IjIiXSB7IHRvcDogMDsgcmlnaHQ6IDA7IH0NCi5yZXZlYWxbZGF0YS1jb3JuZXI9IjMiXSB7IGJvdHRvbTogMDsgcmlnaHQ6MDsgfQ0KLnJldmVhbFtkYXRhLWNvcm5lcj0iNCJdIHsgYm90dG9tOiAwOyBsZWZ0OiAwOyB9DQoucmV2ZWFsOm5vdChbZGF0YS1jb3JuZXJdKSB7IHRvcDogY2FsYygtNTAlKTsgbGVmdDogY2FsYygxMDAlKTsgfQ0KLnJldmVhbCB7DQogIG9wYWNpdHk6IDA7DQogIHBvc2l0aW9uOiBhYnNvbHV0ZTsNCiAgcG9pbnRlci1ldmVudHM6IG5vbmU7DQogIGJvcmRlcjogMXB4IHNvbGlkIGJsYWNrOw0KICBib3JkZXItcmFkaXVzOiAzcHg7DQogIGJhY2tncm91bmQ6IHdoaXRlOw0KICB3aGl0ZS1zcGFjZTogbm93cmFwOw0KICBmb250LXN0eWxlOiBpdGFsaWM7DQogIGZvbnQtc2l6ZTogLjhlbTsNCiAgcGFkZGluZzogLjVyZW07DQogIHotaW5kZXg6IDE7DQp9DQoucm9vdDpob3ZlciAubm9ybWFsIHsNCiAgY29sb3I6IHdoaXRlOw0KICBiYWNrZ3JvdW5kOiBibGFjazsNCn0NCi5yb290OmhvdmVyIC5yZXZlYWwgew0KICBvcGFjaXR5OiAxOw0KICBwb2ludGVyLWV2ZW50czogaW5pdGlhbDsNCn0NCi5yb290Om5vdCg6aG92ZXIpIC5yZXZlYWwgew0KICBkaXNwbGF5OiBub25lOw0KfQ==","data:text/html;base64,PHNwYW4gY2xhc3M9InJvb3QiPg0KICA8c3BhbiBjbGFzcz0ibm9ybWFsIj4NCiAgICA8c2xvdD48L3Nsb3Q+DQogIDwvc3Bhbj4NCiAgPHNwYW4gY2xhc3M9InJldmVhbCI+DQogICAgPHNsb3QgbmFtZT0icmV2ZWFsIj48L3Nsb3Q+DQogIDwvc3Bhbj4NCjwvc3Bhbj4=")}set reveal(e){this.setAttribute("reveal",e)}set corner(e){this.setAttribute("corner",e+"")}attributeChangedCallback(e,t,b){switch(e){case"corner":const e=this.root.querySelector(".reveal"),t=-1==="1234".split("").indexOf(b)?"":b;t?e.setAttribute("data-corner",t+""):e.removeAttribute("data-corner");break;case"reveal":this.root.querySelector("slot[name=reveal]").textContent=b}}connectedCallback(){}disconnectedCallback(){}}t.observedAttributes=["corner","reveal"],"customElements"in window&&window.customElements.define("ne14-demo-tooltip",t),exports.DemoTooltip=t;
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var custElems = require('@ne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Rlci1ldmVudHM6IG5vbmU7DQogIGJvcmRlcjogMXB4IHNvbGlkIGJsYWNrOw0KICBib3JkZXItcmFkaXVzOiAzcHg7DQogIGJhY2tncm91bmQ6IHdoaXRlOw0KICB3aGl0ZS1zcGFjZTogbm93cmFwOw0KICBmb250LXN0eWxlOiBpdGFsaWM7DQogIGZvbnQtc2l6ZTogLjhlbTsNCiAgcGFkZGluZzogLjVyZW07DQogIHotaW5kZXg6IDE7DQp9DQoucm9vdDpob3ZlciAubm9ybWFsIHsNCiAgY29sb3I6IHdoaXRlOw0KICBiYWNrZ3JvdW5kOiBibGFjazsNCn0NCi5yb290OmhvdmVyIC5yZXZlYWwgew0KICBvcGFjaXR5OiAxOw0KICBwb2ludGVyLWV2ZW50czogaW5pdGlhbDsNCn0NCi5yb290Om5vdCg6aG92ZXIpIC5yZXZlYWwgew0KICBkaXNwbGF5OiBub25lOw0KfQ==";
class DemoTooltip extends custElems.CustomElementBase {
constructor() {
super(stylesUrl, markupUrl);
}
set reveal(value) {
this.setAttribute('reveal', value);
}
set corner(value) {
this.setAttribute('corner', value + '');
}
attributeChangedCallback(name, oldValue, newValue) {
switch (name) {
case 'corner':
const target = this.root.querySelector('.reveal');
const corner = '1234'.split('').indexOf(newValue) === -1 ? '' : newValue;
if (corner)
target.setAttribute('data-corner', corner + '');
else
target.removeAttribute('data-corner');
break;
case 'reveal':
const slot = this.root.querySelector('slot[name=reveal]');
slot.textContent = newValue;
break;
}
}
connectedCallback() {
// on connected to dom
}
disconnectedCallback() {
// on disconnected from dom
}
}
DemoTooltip.observedAttributes = ['corner', 'reveal'];
if ('customElements' in window) {
window.customElements.define('ne14-demo-tooltip', DemoTooltip);
}
exports.DemoTooltip = DemoTooltip;

@@ -1,1 +0,46 @@

import{CustomElementBase as b}from"@ne1410s/cust-elems";class e extends b{constructor(){super("data:text/css;base64,LnJvb3Qgew0KICBwb3NpdGlvbjogcmVsYXRpdmU7DQogIGJvcmRlcjogMXB4IHNvbGlkIGJsYWN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NCi5yb290OmhvdmVyIC5yZXZlYWwgew0KICBvcGFjaXR5OiAxOw0KICBwb2ludGVyLWV2ZW50czogaW5pdGlhbDsNCn0NCi5yb290Om5vdCg6aG92ZXIpIC5yZXZlYWwgew0KICBkaXNwbGF5OiBub25lOw0KfQ==","data:text/html;base64,PHNwYW4gY2xhc3M9InJvb3QiPg0KICA8c3BhbiBjbGFzcz0ibm9ybWFsIj4NCiAgICA8c2xvdD48L3Nsb3Q+DQogIDwvc3Bhbj4NCiAgPHNwYW4gY2xhc3M9InJldmVhbCI+DQogICAgPHNsb3QgbmFtZT0icmV2ZWFsIj48L3Nsb3Q+DQogIDwvc3Bhbj4NCjwvc3Bhbj4=")}set reveal(b){this.setAttribute("reveal",b)}set corner(b){this.setAttribute("corner",b+"")}attributeChangedCallback(b,e,c){switch(b){case"corner":const b=this.root.querySelector(".reveal"),e=-1==="1234".split("").indexOf(c)?"":c;e?b.setAttribute("data-corner",e+""):b.removeAttribute("data-corner");break;case"reveal":this.root.querySelector("slot[name=reveal]").textContent=c}}connectedCallback(){}disconnectedCallback(){}}e.observedAttributes=["corner","reveal"],"customElements"in window&&window.customElements.define("ne14-demo-tooltip",e);export{e as DemoTooltip};
import { CustomElementBase } from '@ne1410s/cust-elems';
var markupUrl = "data:text/html;base64,PHNwYW4gY2xhc3M9InJvb3QiPg0KICA8c3BhbiBjbGFzcz0ibm9ybWFsIj4NCiAgICA8c2xvdD48L3Nsb3Q+DQogIDwvc3Bhbj4NCiAgPHNwYW4gY2xhc3M9InJldmVhbCI+DQogICAgPHNsb3QgbmFtZT0icmV2ZWFsIj48L3Nsb3Q+DQogIDwvc3Bhbj4NCjwvc3Bhbj4=";
var stylesUrl = "data:text/css;base64,LnJvb3Qgew0KICBwb3NpdGlvbjogcmVsYXRpdmU7DQogIGJvcmRlcjogMXB4IHNvbGlkIGJsYWNrOw0KICBib3JkZXItcmFkaXVzOiAzcHg7DQogIHBhZGRpbmc6IDA7DQogIG1hcmdpbjogMDsNCi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aW5pdGlhbDsNCn0NCi5yb290Om5vdCg6aG92ZXIpIC5yZXZlYWwgew0KICBkaXNwbGF5OiBub25lOw0KfQ==";
class DemoTooltip extends CustomElementBase {
constructor() {
super(stylesUrl, markupUrl);
}
set reveal(value) {
this.setAttribute('reveal', value);
}
set corner(value) {
this.setAttribute('corner', value + '');
}
attributeChangedCallback(name, oldValue, newValue) {
switch (name) {
case 'corner':
const target = this.root.querySelector('.reveal');
const corner = '1234'.split('').indexOf(newValue) === -1 ? '' : newValue;
if (corner)
target.setAttribute('data-corner', corner + '');
else
target.removeAttribute('data-corner');
break;
case 'reveal':
const slot = this.root.querySelector('slot[name=reveal]');
slot.textContent = newValue;
break;
}
}
connectedCallback() {
// on connected to dom
}
disconnectedCallback() {
// on disconnected from dom
}
}
DemoTooltip.observedAttributes = ['corner', 'reveal'];
if ('customElements' in window) {
window.customElements.define('ne14-demo-tooltip', DemoTooltip);
}
export { DemoTooltip };

@@ -1,1 +0,69 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).ne_demo={})}(this,(function(e){"use strict";class t extends HTMLElement{constructor(e,t,o="closed"){super(),this.root=this.attachShadow({mode:o}),this.root.innerHTML=this.decode(t);const c=document.createElement("style");c.textContent=this.decode(e),this.root.appendChild(c)}decode(e){const t=(e+"").indexOf("base64,");return-1===t?e:window.atob(e.substring(t+7))}}class o extends t{constructor(){super("data:text/css;base64,LnJvb3Qgew0KICBwb3NpdGlvbjogcmVsYXRpdmU7DQogIGJvcmRlcjogMXB4IHNvbGlkIGJsYWNrOw0KICBib3JkZXItcmFkaXVzOiAzcHg7DQogIHBhZGRpbmc6IDA7DQogIG1hcmdpbjogMDsNCiAgZGlzcGxheTogaW5saW5lLWJsb2NrOw0KfQ0KLm5vcm1hbCB7DQogIHBhZGRpbmc6IDAgLjI1cmVtOw0KICB0cmFuc2l0aW9uOiBjb2xvciAuM3MsIGJhY2tncm91bmQtY29s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bGFzcz0ibm9ybWFsIj4NCiAgICA8c2xvdD48L3Nsb3Q+DQogIDwvc3Bhbj4NCiAgPHNwYW4gY2xhc3M9InJldmVhbCI+DQogICAgPHNsb3QgbmFtZT0icmV2ZWFsIj48L3Nsb3Q+DQogIDwvc3Bhbj4NCjwvc3Bhbj4=")}set reveal(e){this.setAttribute("reveal",e)}set corner(e){this.setAttribute("corner",e+"")}attributeChangedCallback(e,t,o){switch(e){case"corner":const e=this.root.querySelector(".reveal"),t=-1==="1234".split("").indexOf(o)?"":o;t?e.setAttribute("data-corner",t+""):e.removeAttribute("data-corner");break;case"reveal":this.root.querySelector("slot[name=reveal]").textContent=o}}connectedCallback(){}disconnectedCallback(){}}o.observedAttributes=["corner","reveal"],"customElements"in window&&window.customElements.define("ne14-demo-tooltip",o),e.DemoTooltip=o,Object.defineProperty(e,"__esModule",{value:!0})}));
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.ne_demo = {}));
}(this, (function (exports) { 'use strict';
class CustomElementBase extends HTMLElement {
constructor(css, html, mode = 'closed') {
super();
this.root = this.attachShadow({ mode });
this.root.innerHTML = this.decode(html);
const style = document.createElement('style');
style.textContent = this.decode(css);
this.root.appendChild(style);
}
decode(b64) {
const bIndex = (b64 + '').indexOf('base64,');
return bIndex === -1 ? b64 : window.atob(b64.substring(bIndex + 7));
}
}
var markupUrl = "data:text/html;base64,PHNwYW4gY2xhc3M9InJvb3QiPg0KICA8c3BhbiBjbGFzcz0ibm9ybWFsIj4NCiAgICA8c2xvdD48L3Nsb3Q+DQogIDwvc3Bhbj4NCiAgPHNwYW4gY2xhc3M9InJldmVhbCI+DQogICAgPHNsb3QgbmFtZT0icmV2ZWFsIj48L3Nsb3Q+DQogIDwvc3Bhbj4NCjwvc3Bhbj4=";
var stylesUrl = "data:text/css;base64,LnJvb3Qgew0KICBwb3NpdGlvbjogcmVsYXRpdmU7DQog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KICBiYWNrZ3JvdW5kOiBibGFjazsNCn0NCi5yb290OmhvdmVyIC5yZXZlYWwgew0KICBvcGFjaXR5OiAxOw0KICBwb2ludGVyLWV2ZW50czogaW5pdGlhbDsNCn0NCi5yb290Om5vdCg6aG92ZXIpIC5yZXZlYWwgew0KICBkaXNwbGF5OiBub25lOw0KfQ==";
class DemoTooltip extends CustomElementBase {
constructor() {
super(stylesUrl, markupUrl);
}
set reveal(value) {
this.setAttribute('reveal', value);
}
set corner(value) {
this.setAttribute('corner', value + '');
}
attributeChangedCallback(name, oldValue, newValue) {
switch (name) {
case 'corner':
const target = this.root.querySelector('.reveal');
const corner = '1234'.split('').indexOf(newValue) === -1 ? '' : newValue;
if (corner)
target.setAttribute('data-corner', corner + '');
else
target.removeAttribute('data-corner');
break;
case 'reveal':
const slot = this.root.querySelector('slot[name=reveal]');
slot.textContent = newValue;
break;
}
}
connectedCallback() {
// on connected to dom
}
disconnectedCallback() {
// on disconnected from dom
}
}
DemoTooltip.observedAttributes = ['corner', 'reveal'];
if ('customElements' in window) {
window.customElements.define('ne14-demo-tooltip', DemoTooltip);
}
exports.DemoTooltip = DemoTooltip;
Object.defineProperty(exports, '__esModule', { value: true });
})));

9

package.json
{
"name": "@ne1410s/demo",
"version": "0.0.0",
"version": "0.0.1",
"description": "A custom element for demonstration purposes and to serve as a project template.",

@@ -39,8 +39,7 @@ "main": "dist/ne14_demo.cjs.min.js",

"@rollup/plugin-commonjs": "^11.1.0",
"@rollup/plugin-json": "^4.0.2",
"@rollup/plugin-json": "^4.0.3",
"@rollup/plugin-node-resolve": "^7.1.3",
"@rollup/plugin-url": "^4.0.2",
"rimraf": "^3.0.1",
"rollup": "^2.6.1",
"rollup-plugin-terser": "^5.3.0",
"rollup": "^2.8.0",
"rollup-plugin-typescript2": "^0.27.0",

@@ -50,4 +49,4 @@ "typescript": "^3.8.3"

"dependencies": {
"@ne1410s/cust-elems": "^0.1.1"
"@ne1410s/cust-elems": "^0.1.3"
}
}
# @ne1410s/demo
## A custom element for demonstration purposes and to serve as a project template.
```html
<ne14-demo-tooltip>
<ne14-demo-tooltip reveal="Hey!">
<p>Hello world</p>

@@ -6,0 +6,0 @@ </ne14-demo-tooltip>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc