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

@cicada/render

Package Overview
Dependencies
Maintainers
6
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cicada/render - npm Package Compare versions

Comparing version 1.1.3-alpha to 1.1.3-alpha1

36

lib/createAppearance.js

@@ -96,3 +96,5 @@ 'use strict';

function updateAppearanceRef(id) {
var ref = refCache[id];
var _ref = refCache[id] || {},
ref = _ref.ref;
if (!ref) return;

@@ -109,5 +111,21 @@ var _appearance$id = appearance[id],

if (className) ref.className = className;
if (children !== undefined) ref.innerHTML = children;
if (children !== undefined) {
refCache[id].children = ref.innerHTML;
ref.innerHTML = children;
}
}
function clearAppearanceRef(id) {
var _ref2 = refCache[id] || {},
ref = _ref2.ref,
children = _ref2.children;
if (!ref) return;
if (ref.className) ref.className = ref.className.split(/\s+/).filter(function (cls) {
return cls && !prefixReg.test(cls);
}).join(' ');
if (children) ref.innerHTML = children;
delete refCache[id];
}
function injectExternalListenerArg(id, listener, props) {

@@ -129,8 +147,8 @@ return function () {

function updateRefById(id, ref) {
clearAppearanceRef(id);
ref = _reactDom2.default.findDOMNode(ref);
if (!ref || !ref.classList) {
delete refCache[id];
return;
}
refCache[id] = ref;
refCache[id] = { ref: ref };
updateAppearanceRef(id);

@@ -183,6 +201,6 @@ }

return {
register: function register(id, _ref, fn) {
var componentPath = _ref.path,
_ref$visible = _ref.visible,
visible = _ref$visible === undefined ? true : _ref$visible;
register: function register(id, _ref3, fn) {
var componentPath = _ref3.path,
_ref3$visible = _ref3.visible,
visible = _ref3$visible === undefined ? true : _ref3$visible;

@@ -202,3 +220,3 @@ var unsubscribe = (0, _util.concat)([subscribeById(id, fn), subscribeById(id, (0, _util.partial)(updateAppearanceRef, id))]);

delete appearance[id];
delete refCache[id];
clearAppearanceRef(id);
if (componentPathKey !== undefined) {

@@ -205,0 +223,0 @@ stateIdByComponentPath.remove(componentPathKey, id);

{
"name": "@cicada/render",
"version": "1.1.3-alpha",
"version": "1.1.3-alpha1",
"main": "./lib/index.js",

@@ -5,0 +5,0 @@ "scripts": {

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