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

react-figma

Package Overview
Dependencies
Maintainers
2
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.25.0 to 0.26.0

helpers/constants.d.ts

3

components/text/Text.js

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

var useNodeIdCallback_1 = require("../../hooks/useNodeIdCallback");
var constants_1 = require("../../helpers/constants");
var normalizeTextNodeChidren = function (children) {

@@ -47,3 +48,3 @@ return Array.isArray(children) ? children.join('') : children;

var hasDefinedWidth = textProps.width || style.maxWidth;
var loadedFont = useFontName_1.useFontName(textProps.fontName || { family: 'Roboto', style: 'Regular' });
var loadedFont = useFontName_1.useFontName(textProps.fontName || constants_1.DEFAULT_FONT);
var yogaProps = useYogaLayout_1.useYogaLayout(__assign({ nodeRef: nodeRef }, textProps, { loadedFont: loadedFont }));

@@ -50,0 +51,0 @@ useOnLayoutHandler_1.useOnLayoutHandler(yogaProps, props);

{
"name": "react-figma",
"version": "0.25.0",
"version": "0.26.0",
"description": "Render React components to Figma",

@@ -51,3 +51,3 @@ "scripts": {

"css-loader": "^3.2.0",
"figma-api-stub": "0.0.48",
"figma-api-stub": "0.0.54",
"file-loader": "^6.2.0",

@@ -54,0 +54,0 @@ "html-webpack-inline-source-plugin": "^0.0.10",

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

var constraintsMixin_1 = require("../mixins/constraintsMixin");
var constants_1 = require("../helpers/constants");
var textNodePropsAssign = propsAssign_1.propsAssign([

@@ -45,3 +46,3 @@ 'characters',

});
var defaultFont = { family: 'Roboto', style: 'Regular' };
var defaultFont = constants_1.DEFAULT_FONT;
exports.text = function (node) { return function (props) {

@@ -48,0 +49,0 @@ var textNode = node || props.node || figma.createText();

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

var isEqualFontStyle_1 = require("./helpers/isEqualFontStyle");
var constants_1 = require("./helpers/constants");
var getInitialTree = function (node) {

@@ -262,3 +263,3 @@ return {

}
var _b = textProperties.fontName, fontName = _b === void 0 ? { family: 'Roboto', style: 'Regular' } : _b;
var _b = textProperties.fontName, fontName = _b === void 0 ? constants_1.DEFAULT_FONT : _b;
if (loadedFont &&

@@ -265,0 +266,0 @@ fontName &&

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