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

panel

Package Overview
Dependencies
Maintainers
2
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

panel - npm Package Compare versions

Comparing version 0.10.0-rc1 to 0.10.0-rc2

build/app.js

4

build/component.js

@@ -9,3 +9,3 @@ 'use strict';

var _h = require('snabbdom-tdumitrescu/h');
var _h = require('snabbdom/h');

@@ -73,3 +73,3 @@ var _h2 = _interopRequireDefault(_h);

return _possibleConstructorReturn(this, Object.getPrototypeOf(Component).apply(this, arguments));
return _possibleConstructorReturn(this, (Component.__proto__ || Object.getPrototypeOf(Component)).apply(this, arguments));
}

@@ -76,0 +76,0 @@

@@ -7,19 +7,17 @@ 'use strict';

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // TODO replace snabbdom-tdumitrescu with mainline snabbdom
// once current master (>0.5.4) is published
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _snabbdom = require('snabbdom');
var _snabbdomTdumitrescu = require('snabbdom-tdumitrescu');
var _snabbdom2 = _interopRequireDefault(_snabbdom);
var _snabbdomTdumitrescu2 = _interopRequireDefault(_snabbdomTdumitrescu);
var _h = require('snabbdom/h');
var _h = require('snabbdom-tdumitrescu/h');
var _h2 = _interopRequireDefault(_h);
var _attributes = require('snabbdom-tdumitrescu/modules/attributes');
var _attributes = require('snabbdom/modules/attributes');
var _attributes2 = _interopRequireDefault(_attributes);
var _dataset = require('snabbdom-tdumitrescu/modules/dataset');
var _dataset = require('snabbdom/modules/dataset');

@@ -32,11 +30,11 @@ var _dataset2 = _interopRequireDefault(_dataset);

var _eventlisteners = require('snabbdom-tdumitrescu/modules/eventlisteners');
var _eventlisteners = require('snabbdom/modules/eventlisteners');
var _eventlisteners2 = _interopRequireDefault(_eventlisteners);
var _props = require('snabbdom-tdumitrescu/modules/props');
var _props = require('snabbdom/modules/props');
var _props2 = _interopRequireDefault(_props);
var _style = require('snabbdom-tdumitrescu/modules/style');
var _style = require('snabbdom/modules/style');

@@ -49,3 +47,3 @@ var _style2 = _interopRequireDefault(_style);

var patch = _snabbdomTdumitrescu2.default.init([_attributes2.default, _dataset2.default, _snabbdomDelayedClass2.default, _eventlisteners2.default, _props2.default, _style2.default]);
var patch = _snabbdom2.default.init([_attributes2.default, _dataset2.default, _snabbdomDelayedClass2.default, _eventlisteners2.default, _props2.default, _style2.default]);

@@ -63,4 +61,17 @@ var DOMPatcher = function () {

this.vnode = this.renderFunc(this.state);
// prepare root element
var tagName = this.vnode.sel.split(/[#\.]/)[0];
var classMatches = this.vnode.sel.match(/\.[^\.#]+/g);
var idMatch = this.vnode.sel.match(/#[^\.#]+/);
this.el = document.createElement(tagName);
if (classMatches) {
this.el.className = classMatches.map(function (c) {
return c.slice(1);
}).join(' ');
}
if (idMatch) {
this.el.id = idMatch.slice(1);
}
patch(this.el, this.vnode);

@@ -67,0 +78,0 @@ }

@@ -12,3 +12,3 @@ 'use strict';

var _h = require('snabbdom-tdumitrescu/h');
var _h = require('snabbdom/h');

@@ -15,0 +15,0 @@ var _h2 = _interopRequireDefault(_h);

@@ -66,3 +66,3 @@ 'use strict';

var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(HTMLElement).apply(this, arguments));
var _this = _possibleConstructorReturn(this, (HTMLElement.__proto__ || Object.getPrototypeOf(HTMLElement)).apply(this, arguments));

@@ -77,3 +77,3 @@ _this.createdCallback && _this.createdCallback();

var oldValue = this.getAttribute(name);
_get(Object.getPrototypeOf(HTMLElement.prototype), 'setAttribute', this).apply(this, arguments);
_get(HTMLElement.prototype.__proto__ || Object.getPrototypeOf(HTMLElement.prototype), 'setAttribute', this).apply(this, arguments);
this.attributeChangedCallback && this.attributeChangedCallback(name, oldValue, value);

@@ -80,0 +80,0 @@ }

@@ -16,3 +16,2 @@ 'use strict';

// just the necessary bits of Backbone router+history
var Router = function () {

@@ -19,0 +18,0 @@ function Router(app) {

@@ -66,3 +66,3 @@ 'use strict';

var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(HTMLElement).apply(this, arguments));
var _this = _possibleConstructorReturn(this, (HTMLElement.__proto__ || Object.getPrototypeOf(HTMLElement)).apply(this, arguments));

@@ -77,3 +77,3 @@ _this.createdCallback && _this.createdCallback();

var oldValue = this.getAttribute(name);
_get(Object.getPrototypeOf(HTMLElement.prototype), 'setAttribute', this).apply(this, arguments);
_get(HTMLElement.prototype.__proto__ || Object.getPrototypeOf(HTMLElement.prototype), 'setAttribute', this).apply(this, arguments);
this.attributeChangedCallback && this.attributeChangedCallback(name, oldValue, value);

@@ -80,0 +80,0 @@ }

@@ -1,2 +0,2 @@

import h from 'snabbdom-tdumitrescu/h';
import h from 'snabbdom/h';
import WebComponent from 'webcomponent';

@@ -3,0 +3,0 @@

@@ -1,12 +0,10 @@

// TODO replace snabbdom-tdumitrescu with mainline snabbdom
// once current master (>0.5.4) is published
import snabbdom from 'snabbdom-tdumitrescu';
import h from 'snabbdom-tdumitrescu/h';
import snabbdom from 'snabbdom';
import h from 'snabbdom/h';
import snabbAttributes from 'snabbdom-tdumitrescu/modules/attributes';
import snabbDataset from 'snabbdom-tdumitrescu/modules/dataset';
import snabbAttributes from 'snabbdom/modules/attributes';
import snabbDataset from 'snabbdom/modules/dataset';
import snabbDelayedClass from 'snabbdom-delayed-class';
import snabbEventlisterners from 'snabbdom-tdumitrescu/modules/eventlisteners';
import snabbProps from 'snabbdom-tdumitrescu/modules/props';
import snabbStyle from 'snabbdom-tdumitrescu/modules/style';
import snabbEventlisterners from 'snabbdom/modules/eventlisteners';
import snabbProps from 'snabbdom/modules/props';
import snabbStyle from 'snabbdom/modules/style';

@@ -29,4 +27,15 @@ const patch = snabbdom.init([

this.vnode = this.renderFunc(this.state);
// prepare root element
const tagName = this.vnode.sel.split(/[#\.]/)[0];
const classMatches = this.vnode.sel.match(/\.[^\.#]+/g);
const idMatch = this.vnode.sel.match(/#[^\.#]+/);
this.el = document.createElement(tagName);
if (classMatches) {
this.el.className = classMatches.map(c => c.slice(1)).join(' ');
}
if (idMatch) {
this.el.id = idMatch.slice(1);
}
patch(this.el, this.vnode);

@@ -33,0 +42,0 @@ }

@@ -12,3 +12,3 @@ /**

import Component from './component';
import h from 'snabbdom-tdumitrescu/h';
import h from 'snabbdom/h';

@@ -15,0 +15,0 @@ export {

{
"name": "panel",
"version": "0.10.0-rc1",
"version": "0.10.0-rc2",
"description": "Web Components with Virtual DOM: lightweight composable web apps",

@@ -37,3 +37,3 @@ "main": "build/index.js",

"snabbdom-delayed-class": "0.1.1",
"snabbdom-tdumitrescu": "0.6.1",
"snabbdom": "0.6.1",
"webcomponent": "0.1.2"

@@ -40,0 +40,0 @@ },

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