react-figma
Advanced tools
Comparing version 0.0.44 to 0.0.45
import { CommonStyle } from '../types'; | ||
import { Assign } from 'utility-types'; | ||
declare type StyleProp<P, T> = { | ||
@@ -11,4 +12,7 @@ [P in keyof T]: Partial<CommonStyle>; | ||
}>(value: T): T; | ||
static compose<C1 extends StyleProp<any, C1>, C2 extends StyleProp<any, C2>>(style1: C1, style2: C2): C1 & C2; | ||
static compose<C1 extends Partial<CommonStyle>, C2 extends Partial<CommonStyle>>(style1: C1, style2: C2): Assign<C1, C2>; | ||
static hairlineWidth: number; | ||
static absoluteFill: Partial<CommonStyle>; | ||
static absoluteFillObject: Partial<CommonStyle>; | ||
} | ||
export {}; |
@@ -14,2 +14,9 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var absoluteFill = { | ||
position: 'absolute', | ||
left: 0, | ||
top: 0, | ||
width: '100%', | ||
height: '100%' | ||
}; | ||
var StyleSheet = /** @class */ (function () { | ||
@@ -33,10 +40,7 @@ function StyleSheet() { | ||
StyleSheet.compose = function (style1, style2) { | ||
var result = __assign({}, style1, style2); | ||
Object.keys(style1).map(function (style1Key) { | ||
if (style2[style1Key]) { | ||
result[style1Key] = __assign({}, style1[style1Key], style2[style1Key]); | ||
} | ||
}); | ||
return result; | ||
return __assign({}, (style1 || {}), (style2 || {})); | ||
}; | ||
StyleSheet.hairlineWidth = 1; | ||
StyleSheet.absoluteFill = absoluteFill; | ||
StyleSheet.absoluteFillObject = absoluteFill; | ||
return StyleSheet; | ||
@@ -43,0 +47,0 @@ }()); |
{ | ||
"name": "react-figma", | ||
"version": "0.0.44", | ||
"version": "0.0.45", | ||
"description": "Render React components to Figma", | ||
@@ -81,3 +81,4 @@ "scripts": { | ||
"react-reconciler": "^0.23.0", | ||
"rxjs": "^6.5.2" | ||
"rxjs": "^6.5.2", | ||
"utility-types": "^3.10.0" | ||
}, | ||
@@ -84,0 +85,0 @@ "peerDependencies": { |
@@ -7,3 +7,3 @@ "use strict"; | ||
type: 'DROP_SHADOW', | ||
color: transformColors_1.colorToRGBA(styles.shadowColor, styles.shadowOpacity || 1), | ||
color: transformColors_1.colorToRGBA(styles.shadowColor, styles.shadowOpacity), | ||
offset: styles.shadowOffset | ||
@@ -10,0 +10,0 @@ ? { |
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
306471
4687
6
+ Addedutility-types@^3.10.0
+ Addedutility-types@3.11.0(transitive)