react-figma
Advanced tools
Comparing version 0.1.13 to 0.1.14
{ | ||
"name": "react-figma", | ||
"version": "0.1.13", | ||
"version": "0.1.14", | ||
"description": "Render React components to Figma", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -55,2 +55,6 @@ "use strict"; | ||
var serializers_1 = require("./serializers"); | ||
var isReactFigmaExperimental = process.env.REACT_FIGMA_EXPERIMENTAL; | ||
if (isReactFigmaExperimental) { | ||
console.log('REACT_FIGMA_EXPERIMENTAL'); | ||
} | ||
var setTextInstance = function (parentNode, childNode) { | ||
@@ -57,0 +61,0 @@ childNode.parent = parentNode; |
@@ -15,3 +15,2 @@ "use strict"; | ||
var safeGetPluginData_1 = require("../helpers/safeGetPluginData"); | ||
var isReactFigmaExperimental = process.env.REACT_FIGMA_EXPERIMENTAL; | ||
var textNodePropsAssign = propsAssign_1.propsAssign([ | ||
@@ -70,16 +69,11 @@ 'characters', | ||
} | ||
if (isReactFigmaExperimental) { | ||
var oldCharacters = textNode.characters; | ||
var oldFontSize = textNode.fontSize; | ||
textNodePropsAssign(textNode)(props); | ||
if (oldCharacters !== textNode.characters || oldFontSize !== textNode.fontSize) { | ||
var reactId = safeGetPluginData_1.safeGetPluginData('reactId')(textNode); | ||
if (reactId) { | ||
rpc_1.uiApi.updateYogaNode(reactId); | ||
} | ||
var oldCharacters = textNode.characters; | ||
var oldFontSize = textNode.fontSize; | ||
textNodePropsAssign(textNode)(props); | ||
if (oldCharacters !== textNode.characters || oldFontSize !== textNode.fontSize) { | ||
var reactId = safeGetPluginData_1.safeGetPluginData('reactId')(textNode); | ||
if (reactId) { | ||
rpc_1.uiApi.updateYogaNode(reactId); | ||
} | ||
} | ||
else { | ||
textNodePropsAssign(textNode)(props); | ||
} | ||
} | ||
@@ -86,0 +80,0 @@ return textNode; |
@@ -29,9 +29,5 @@ "use strict"; | ||
}; | ||
var isReactFigmaExperimental = process.env.REACT_FIGMA_EXPERIMENTAL; | ||
if (isReactFigmaExperimental) { | ||
console.log('REACT_FIGMA_EXPERIMENTAL'); | ||
rpc_1.$updateYogaReactId | ||
.pipe(operators_1.map(function (reactId) { return ({ reactId: reactId }); }), operators_1.tap(function (val) { return console.log('$updateYogaReactId', val); })) | ||
.subscribe($yogaRoot); | ||
} | ||
rpc_1.$updateYogaReactId | ||
.pipe(operators_1.map(function (reactId) { return ({ reactId: reactId }); }), operators_1.tap(function (val) { return console.log('$updateYogaReactId', val); })) | ||
.subscribe($yogaRoot); | ||
$yogaRoot | ||
@@ -38,0 +34,0 @@ .pipe(operators_1.delay(0), operators_1.exhaustMap(function (instance) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2
332790
4728