Socket
Socket
Sign inDemoInstall

abstract-image

Package Overview
Dependencies
10
Maintainers
14
Versions
43
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.4.0 to 3.4.1

15

lib/exporters/react-svg-export-image.js

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

fontSize: component.fontSize.toString() + "px",
fontWeight: component.fontWeight === "mediumBold" ? "bold" : component.fontWeight,
fontWeight: getTextFontWeight(component.fontWeight),
fontFamily: component.fontFamily,

@@ -99,3 +99,3 @@ stroke: colorToRgb(component.strokeColor),

fontSize: component.fontSize.toString() + "px",
fontWeight: component.fontWeight === "mediumBold" ? "bold" : component.fontWeight,
fontWeight: getTextFontWeight(component.fontWeight),
fontFamily: component.fontFamily,

@@ -146,2 +146,13 @@ fill: colorToRgb(component.textColor),

}
function getTextFontWeight(fontWeight) {
if (fontWeight === "mediumBold" || fontWeight === "extraBold") {
return "bold";
}
else if (fontWeight === "light") {
return "normal";
}
else {
return fontWeight;
}
}
function getImageUrl(format, data) {

@@ -148,0 +159,0 @@ if (data.type === "url") {

2

lib/model/component.d.ts

@@ -80,3 +80,3 @@ import * as Point from "./point";

export declare function corners(rectangle: Rectangle): Array<Point.Point>;
export declare type AbstractFontWeight = "normal" | "mediumBold" | "bold";
export declare type AbstractFontWeight = "light" | "normal" | "mediumBold" | "bold" | "extraBold";
export declare type TextAlignment = "left" | "center" | "right";

@@ -83,0 +83,0 @@ export declare type GrowthDirection = "up" | "down" | "uniform" | "left" | "right";

{
"name": "abstract-image",
"version": "3.4.0",
"version": "3.4.1",
"description": "Dynamically create images using code or JSX and render to any format",

@@ -29,3 +29,3 @@ "repository": "https://github.com/dividab/abstract-visuals/tree/master/packages/abstract-image",

},
"gitHead": "cc48e3f14a9ec319766ae3322bcdd98748718cab"
"gitHead": "8d1489ac0f201c23159219b373ebc200a1390189"
}

@@ -207,3 +207,3 @@ import * as Point from "./point";

export type AbstractFontWeight = "normal" | "mediumBold" | "bold";
export type AbstractFontWeight = "light" | "normal" | "mediumBold" | "bold" | "extraBold";

@@ -210,0 +210,0 @@ export type TextAlignment = "left" | "center" | "right";

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc