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

panel

Package Overview
Dependencies
Maintainers
6
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 5.10.0-perf.4 to 5.10.0

16

build/component.js

@@ -368,4 +368,3 @@ 'use strict';

updateSync: false,
useShadowDom: false,
slowThreshold: 20
useShadowDom: false
}, _this.config);

@@ -414,3 +413,2 @@

this.initializing = true;
this.initializingStartedAt = Date.now();

@@ -519,4 +517,3 @@ var _iteratorNormalCompletion = true;

this.domPatcher = new _domPatcher.DOMPatcher(this.state, this._render.bind(this), {
updateMode: this.getConfig('updateSync') ? 'sync' : 'async',
component: this
updateMode: this.getConfig('updateSync') ? 'sync' : 'async'
});

@@ -536,11 +533,2 @@ this.el.appendChild(this.domPatcher.el);

this.initializing = false;
this.initializingCompletedAt = Date.now();
this.dispatchEvent(new CustomEvent('componentInitialized', {
detail: {
elapsedMs: this.initializingCompletedAt - this.initializingStartedAt,
component: this.toString()
},
bubbles: true,
composed: true
}));
}

@@ -547,0 +535,0 @@ }, {

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

var _h = require('snabbdom/h');
var _h2 = _interopRequireDefault(_h);
var _attributes = require('snabbdom/modules/attributes');
var _attributes2 = _interopRequireDefault(_attributes);
var _dataset = require('snabbdom/modules/dataset');
var _dataset2 = _interopRequireDefault(_dataset);
var _snabbdomDelayedClass = require('snabbdom-delayed-class');

@@ -33,14 +21,2 @@

var _eventlisteners = require('snabbdom/modules/eventlisteners');
var _eventlisteners2 = _interopRequireDefault(_eventlisteners);
var _props = require('snabbdom/modules/props');
var _props2 = _interopRequireDefault(_props);
var _style = require('snabbdom/modules/style');
var _style2 = _interopRequireDefault(_style);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -50,6 +26,6 @@

var patch = (0, _snabbdom.init)([_attributes2.default, _dataset2.default, _snabbdomDelayedClass2.default, _eventlisteners2.default, _props2.default, _style2.default]);
var patch = (0, _snabbdom.init)([_snabbdom.datasetModule, _snabbdom.attributesModule, _snabbdom.classModule, _snabbdom.propsModule, _snabbdom.styleModule, _snabbdom.eventListenersModule, _snabbdomDelayedClass2.default]);
var EMPTY_DIV = exports.EMPTY_DIV = (0, _h2.default)('div');
exports.h = _h2.default;
var EMPTY_DIV = exports.EMPTY_DIV = (0, _snabbdom.h)('div');
exports.h = _snabbdom.h;

@@ -67,3 +43,2 @@ var DOMPatcher = exports.DOMPatcher = function () {

this.vnode = this.renderFunc(this.state);
this.component = options.component;

@@ -79,2 +54,5 @@ // prepare root element

}).join(' ');
// this attribute setting ensures that svg elements behave as expected and will ensure
// compatibility with different snabbdom versions
this.el.setAttribute('class', this.el.className);
}

@@ -130,3 +108,2 @@ if (idMatch) {

var startedAt = Date.now();
this.rendering = true;

@@ -141,10 +118,2 @@ this.pending = false;

this.el = this.vnode.elm;
var elapsedMs = Date.now() - startedAt;
if (this.component && elapsedMs > this.component.getConfig('slowThreshold')) {
this.component.dispatchEvent(new CustomEvent('slowRender', {
detail: { elapsedMs: elapsedMs, component: this.component.toString() },
bubbles: true,
composed: true
}));
}
}

@@ -159,3 +128,2 @@ }, {

this.el = null;
this.component = null;
// patch with empty vnode to clear out listeners in tree

@@ -162,0 +130,0 @@ // this ensures we don't leave dangling DetachedHTMLElements blocking GC

2

lib/component-utils/hook-helpers.d.ts

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

import {VNode} from 'snabbdom/vnode';
import {VNode} from 'snabbdom';

@@ -3,0 +3,0 @@ /**

@@ -291,3 +291,2 @@ import cuid from 'cuid';

useShadowDom: false,
slowThreshold: 20,
},

@@ -335,3 +334,2 @@ this.config,

this.initializing = true;
this.initializingStartedAt = Date.now();

@@ -402,3 +400,2 @@ for (const attrsSchemaKey of Object.keys(this._attrsSchema)) {

updateMode: this.getConfig(`updateSync`) ? `sync` : `async`,
component: this,
});

@@ -418,13 +415,2 @@ this.el.appendChild(this.domPatcher.el);

this.initializing = false;
this.initializingCompletedAt = Date.now();
this.dispatchEvent(
new CustomEvent(`componentInitialized`, {
detail: {
elapsedMs: this.initializingCompletedAt - this.initializingStartedAt,
component: this.toString(),
},
bubbles: true,
composed: true,
}),
);
}

@@ -431,0 +417,0 @@

@@ -7,19 +7,23 @@ /**

import {init as initSnabbdom} from 'snabbdom';
import h from 'snabbdom/h';
import {
init as initSnabbdom,
attributesModule,
h,
datasetModule,
eventListenersModule,
propsModule,
styleModule,
classModule,
} from 'snabbdom';
import snabbAttributes from 'snabbdom/modules/attributes';
import snabbDataset from 'snabbdom/modules/dataset';
import snabbDelayedClass from 'snabbdom-delayed-class';
import snabbEventlisterners from 'snabbdom/modules/eventlisteners';
import snabbProps from 'snabbdom/modules/props';
import snabbStyle from 'snabbdom/modules/style';
import delayedClassModule from 'snabbdom-delayed-class';
const patch = initSnabbdom([
snabbAttributes,
snabbDataset,
snabbDelayedClass,
snabbEventlisterners,
snabbProps,
snabbStyle,
datasetModule,
attributesModule,
classModule,
propsModule,
styleModule,
eventListenersModule,
delayedClassModule,
]);

@@ -37,3 +41,2 @@

this.vnode = this.renderFunc(this.state);
this.component = options.component;

@@ -47,2 +50,5 @@ // prepare root element

this.el.className = classMatches.map((c) => c.slice(1)).join(` `);
// this attribute setting ensures that svg elements behave as expected and will ensure
// compatibility with different snabbdom versions
this.el.setAttribute(`class`, this.el.className);
}

@@ -91,3 +97,2 @@ if (idMatch) {

const startedAt = Date.now();
this.rendering = true;

@@ -102,12 +107,2 @@ this.pending = false;

this.el = this.vnode.elm;
const elapsedMs = Date.now() - startedAt;
if (this.component && elapsedMs > this.component.getConfig(`slowThreshold`)) {
this.component.dispatchEvent(
new CustomEvent(`slowRender`, {
detail: {elapsedMs, component: this.component.toString()},
bubbles: true,
composed: true,
}),
);
}
}

@@ -121,3 +116,2 @@

this.el = null;
this.component = null;
// patch with empty vnode to clear out listeners in tree

@@ -124,0 +118,0 @@ // this ensures we don't leave dangling DetachedHTMLElements blocking GC

// Type definitions for panel
// Project: panel
// Definitions by: Mixpanel (https://mixpanel.com)
import {VNode} from 'snabbdom/vnode';
import {VNode} from 'snabbdom';
import WebComponent from 'webcomponent';
export {h} from 'snabbdom/h';
export {h} from 'snabbdom';
export {jsx} from 'snabbdom-jsx-lite';

@@ -110,5 +110,2 @@

useShadowDom?: boolean;
/** Defines the threshold at which 'slowRender' events will be dispatched, defaults to 20ms */
slowThreshold: number;
}

@@ -183,7 +180,2 @@

/** The ms since unix epoch that component initialization started (also see 'initializingCompletedAt') */
readonly initializingStartedAt: number;
/** The ms since unix epoch that component initialization completed (also see 'initializingStartedAt') */
readonly initializingCompletedAt: number;
/** Defines standard component configuration */

@@ -208,3 +200,3 @@ get config(): ConfigOptions<StateT, AppStateT, ContextRegistryT>;

*/
child<T = object>(tagName: string, config?: T): VNode;
child(tagName: string, config?: object): VNode;

@@ -211,0 +203,0 @@ /**

{
"name": "panel",
"version": "5.10.0-perf.4",
"version": "5.10.0",
"description": "Web Components with Virtual DOM: lightweight composable web apps",

@@ -53,5 +53,5 @@ "main": "build/index.js",

"schema-utils": "1.0.0",
"snabbdom": "0.7.4",
"snabbdom": "3.0.3",
"snabbdom-delayed-class": "0.1.1",
"snabbdom-jsx-lite": "1.0.11",
"snabbdom-jsx-lite": "2.0.0",
"webcomponent": "1.2.2"

@@ -58,0 +58,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