Socket
Socket
Sign inDemoInstall

@murasoftware/next-core

Package Overview
Dependencies
Maintainers
5
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@murasoftware/next-core - npm Package Compare versions

Comparing version 1.0.43 to 1.0.44

52

dist/index.js

@@ -638,3 +638,9 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var isEditMode = getIsEditMode();
var _useState = React.useState(false),
mounted = _useState[0],
setMounted = _useState[1];
React.useEffect(function () {
setMounted(true);
Mura(function () {

@@ -663,26 +669,26 @@ var obj = Mura('div[data-instanceid="' + instanceid + '"]');

if (isEditMode && typeof props.stylesupport == 'object' && Object.keys(props.stylesupport).length) {
if (typeof document == 'undefined') {
var getModuleTargetStyles = function getModuleTargetStyles(incoming) {
var styles = {};
var invalid = {
backgroundcolor: true,
backgroundimage: true
};
Object.keys(incoming).forEach(function (key) {
if (!invalid[key]) {
if (Mura.styleMap.tojs[key]) {
styles[Mura.styleMap.tojs[key]] = incoming[key];
} else {
styles[key] = incoming[key];
}
if (!mounted && isEditMode && typeof props.stylesupport == 'object' && Object.keys(props.stylesupport).length) {
var getModuleTargetStyles = function getModuleTargetStyles(incoming) {
var styles = {};
var invalid = {
backgroundcolor: true,
backgroundimage: true
};
Object.keys(incoming).forEach(function (key) {
if (!invalid[key]) {
if (Mura.styleMap.tojs[key]) {
styles[Mura.styleMap.tojs[key]] = incoming[key];
} else {
styles[key] = incoming[key];
}
});
return styles;
};
}
});
return styles;
};
objectStyles = props.stylesupport.objectstyles ? getModuleTargetStyles(props.stylesupport.objectstyles) : {};
metaStyles = props.stylesupport.metastyles ? getModuleTargetStyles(props.stylesupport.metastyles) : {};
contentStyles = props.stylesupport.contentstyles ? getModuleTargetStyles(props.stylesupport.contentstyles) : {};
} else {
objectStyles = props.stylesupport.objectstyles ? getModuleTargetStyles(props.stylesupport.objectstyles) : {};
metaStyles = props.stylesupport.metastyles ? getModuleTargetStyles(props.stylesupport.metastyles) : {};
contentStyles = props.stylesupport.contentstyles ? getModuleTargetStyles(props.stylesupport.contentstyles) : {};
if (typeof document != 'undefined') {
var params = Object.assign({}, {

@@ -734,3 +740,3 @@ stylesupport: props.stylesupport,

Object.keys(props).forEach(function (key) {
if (!['Link', 'html', 'content', 'children', 'isEditMode', 'dynamicProps', 'moduleStyleData'].find(function (restrictedkey) {
if (!['Router', 'Link', 'html', 'content', 'children', 'isEditMode', 'dynamicProps', 'moduleStyleData'].find(function (restrictedkey) {
return restrictedkey === key;

@@ -737,0 +743,0 @@ })) {

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

import React, { useEffect, createContext } from 'react';
import React, { useEffect, useState, createContext } from 'react';
import Mura from 'mura.js';

@@ -635,3 +635,9 @@

var isEditMode = getIsEditMode();
var _useState = useState(false),
mounted = _useState[0],
setMounted = _useState[1];
useEffect(function () {
setMounted(true);
Mura(function () {

@@ -660,26 +666,26 @@ var obj = Mura('div[data-instanceid="' + instanceid + '"]');

if (isEditMode && typeof props.stylesupport == 'object' && Object.keys(props.stylesupport).length) {
if (typeof document == 'undefined') {
var getModuleTargetStyles = function getModuleTargetStyles(incoming) {
var styles = {};
var invalid = {
backgroundcolor: true,
backgroundimage: true
};
Object.keys(incoming).forEach(function (key) {
if (!invalid[key]) {
if (Mura.styleMap.tojs[key]) {
styles[Mura.styleMap.tojs[key]] = incoming[key];
} else {
styles[key] = incoming[key];
}
if (!mounted && isEditMode && typeof props.stylesupport == 'object' && Object.keys(props.stylesupport).length) {
var getModuleTargetStyles = function getModuleTargetStyles(incoming) {
var styles = {};
var invalid = {
backgroundcolor: true,
backgroundimage: true
};
Object.keys(incoming).forEach(function (key) {
if (!invalid[key]) {
if (Mura.styleMap.tojs[key]) {
styles[Mura.styleMap.tojs[key]] = incoming[key];
} else {
styles[key] = incoming[key];
}
});
return styles;
};
}
});
return styles;
};
objectStyles = props.stylesupport.objectstyles ? getModuleTargetStyles(props.stylesupport.objectstyles) : {};
metaStyles = props.stylesupport.metastyles ? getModuleTargetStyles(props.stylesupport.metastyles) : {};
contentStyles = props.stylesupport.contentstyles ? getModuleTargetStyles(props.stylesupport.contentstyles) : {};
} else {
objectStyles = props.stylesupport.objectstyles ? getModuleTargetStyles(props.stylesupport.objectstyles) : {};
metaStyles = props.stylesupport.metastyles ? getModuleTargetStyles(props.stylesupport.metastyles) : {};
contentStyles = props.stylesupport.contentstyles ? getModuleTargetStyles(props.stylesupport.contentstyles) : {};
if (typeof document != 'undefined') {
var params = Object.assign({}, {

@@ -731,3 +737,3 @@ stylesupport: props.stylesupport,

Object.keys(props).forEach(function (key) {
if (!['Link', 'html', 'content', 'children', 'isEditMode', 'dynamicProps', 'moduleStyleData'].find(function (restrictedkey) {
if (!['Router', 'Link', 'html', 'content', 'children', 'isEditMode', 'dynamicProps', 'moduleStyleData'].find(function (restrictedkey) {
return restrictedkey === key;

@@ -734,0 +740,0 @@ })) {

{
"name": "@murasoftware/next-core",
"version": "1.0.43",
"version": "1.0.44",
"description": "Core utilties for Mura.js and Next.js",

@@ -5,0 +5,0 @@ "author": "Mura Software",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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