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

react-figma

Package Overview
Dependencies
Maintainers
1
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-figma - npm Package Compare versions

Comparing version 0.0.53 to 0.0.54

styleTransformers/transformAutoLayoutToYoga.d.ts

5

components/component/Component.js

@@ -20,7 +20,8 @@ "use strict";

var useSelectionChange_1 = require("../../hooks/useSelectionChange");
var transformAutoLayoutToYoga_1 = require("../../styleTransformers/transformAutoLayoutToYoga");
exports.Component = function (props) {
var nodeRef = props.nodeRef || React.useRef();
useSelectionChange_1.useSelectionChange(nodeRef, props);
var style = __1.StyleSheet.flatten(props.style);
var componentProps = __assign({}, transformLayoutStyleProperties_1.transformLayoutStyleProperties(style), transformBlendProperties_1.transformBlendProperties(style), props);
var style = __assign({}, __1.StyleSheet.flatten(props.style), transformAutoLayoutToYoga_1.transformAutoLayoutToYoga(props));
var componentProps = __assign({}, transformLayoutStyleProperties_1.transformLayoutStyleProperties(style), transformBlendProperties_1.transformBlendProperties(style), props, { style: style });
var yogaChildProps = useYogaLayout_1.useYogaLayout(__assign({ nodeRef: nodeRef }, componentProps));

@@ -27,0 +28,0 @@ return React.createElement("component", __assign({}, componentProps, yogaChildProps, { innerRef: nodeRef }));

@@ -21,2 +21,3 @@ "use strict";

var useSelectionChange_1 = require("../../hooks/useSelectionChange");
var transformAutoLayoutToYoga_1 = require("../../styleTransformers/transformAutoLayoutToYoga");
var findNodeByName = function (children, name) {

@@ -33,4 +34,4 @@ return children && children.find(function (child) { return child.name === name || findNodeByName(child.children, name); });

useSelectionChange_1.useSelectionChange(nodeRef, props);
var style = __1.StyleSheet.flatten(props.style);
var componentProps = __assign({}, transformLayoutStyleProperties_1.transformLayoutStyleProperties(style), transformBlendProperties_1.transformBlendProperties(style), props);
var style = __assign({}, __1.StyleSheet.flatten(props.style), transformAutoLayoutToYoga_1.transformAutoLayoutToYoga(props));
var componentProps = __assign({}, transformLayoutStyleProperties_1.transformLayoutStyleProperties(style), transformBlendProperties_1.transformBlendProperties(style), props, { style: style });
var yogaProps = useYogaLayout_1.useYogaLayout(__assign({ nodeRef: nodeRef }, componentProps));

@@ -37,0 +38,0 @@ return (React.createElement("instance", __assign({}, componentProps, yogaProps, { innerRef: nodeRef, innerRefCallback: function () { return setHaveNode(true); } }), isHaveNode && props.overrides

@@ -33,2 +33,3 @@ "use strict";

var transformBorderProperties_1 = require("../../styleTransformers/transformBorderProperties");
var transformAutoLayoutToYoga_1 = require("../../styleTransformers/transformAutoLayoutToYoga");
exports.FRAME_PRESETS = {

@@ -204,5 +205,5 @@ iPhoneX: {

useSelectionChange_1.useSelectionChange(nodeRef, props);
var style = StyleSheet_1.StyleSheet.flatten(props.style);
var style = __assign({}, StyleSheet_1.StyleSheet.flatten(props.style), transformAutoLayoutToYoga_1.transformAutoLayoutToYoga(props));
var preset = props.preset, propWithoutPreset = __rest(props, ["preset"]);
var frameProps = __assign({}, (preset || {}), transformLayoutStyleProperties_1.transformLayoutStyleProperties(style), transformBlendProperties_1.transformBlendProperties(style), transformGeometryStyleProperties_1.transformGeometryStyleProperties('backgrounds', style), transformBorderProperties_1.transformBorderStyleProperties(style), propWithoutPreset);
var frameProps = __assign({}, (preset || {}), transformLayoutStyleProperties_1.transformLayoutStyleProperties(style), transformBlendProperties_1.transformBlendProperties(style), transformGeometryStyleProperties_1.transformGeometryStyleProperties('backgrounds', style), transformBorderProperties_1.transformBorderStyleProperties(style), propWithoutPreset, { style: style });
var yogaChildProps = useYogaLayout_1.useYogaLayout(__assign({ nodeRef: nodeRef }, frameProps));

@@ -209,0 +210,0 @@ return React.createElement("frame", __assign({}, frameProps, yogaChildProps, { innerRef: nodeRef }));

2

package.json
{
"name": "react-figma",
"version": "0.0.53",
"version": "0.0.54",
"description": "Render React components to Figma",

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

@@ -47,3 +47,3 @@ "use strict";

exports.yogaWorker = function (yoga) { return function (message) {
if (!message.value || message.value.type !== 'calculateLayout') {
if (!message.value || message.value.type !== 'calculateLayout' || !yoga) {
return;

@@ -50,0 +50,0 @@ }

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

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