Socket
Socket
Sign inDemoInstall

abstract-document

Package Overview
Dependencies
136
Maintainers
16
Versions
134
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 9.0.0 to 9.1.0

3

lib/abstract-document-exporters/pdf/render.js

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

function drawText(pdf, finalRect, textStyle, text, alignment, isFirstAtom, isLastAtom, availableWidth) {
var _a;
const font = (0, font_1.getFontNameStyle)(textStyle);

@@ -375,3 +376,3 @@ const fontSize = AD.TextStyle.calculateFontSize(textStyle, 10);

.fontSize(fontSize)
.fillColor(textStyle.color || "black");
.fillColor(textStyle.color || "black", (_a = textStyle.opacity) !== null && _a !== void 0 ? _a : 1.0);
applyTextOffset(pdf, textStyle);

@@ -378,0 +379,0 @@ // Using continued with alignment "center" or "right" is broken:

@@ -27,2 +27,3 @@ export declare type TextAlignment = "left" | "center" | "right" | "justify";

readonly strike?: boolean;
readonly opacity?: number;
}

@@ -51,2 +52,3 @@ export interface TextStyleProps {

readonly strike?: boolean;
readonly opacity?: number;
}

@@ -53,0 +55,0 @@ export declare function create(props?: TextStyleProps): TextStyle;

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

function overrideWith(overrider, toOverride) {
var _a, _b, _c, _d;
var _a, _b, _c, _d, _e;
let overriddenFontWeight = (overrider === null || overrider === void 0 ? void 0 : overrider.light) ||

@@ -35,3 +35,3 @@ (overrider === null || overrider === void 0 ? void 0 : overrider.normal) ||

const b = toOverride || {};
return create(Object.assign({ fontFamily: a.fontFamily || b.fontFamily, color: a.color || b.color, fontSize: a.fontSize || b.fontSize, fontScale: a.fontScale || b.fontScale, italic: a.italic || b.italic, subScript: a.subScript || b.subScript, superScript: a.superScript || b.superScript, underline: a.underline || b.underline, verticalPosition: a.verticalPosition || b.verticalPosition, indent: a.indent || b.indent, lineGap: a.lineGap || b.lineGap, lineBreak: (_a = a.lineBreak) !== null && _a !== void 0 ? _a : b.lineBreak, alignment: (_b = a.alignment) !== null && _b !== void 0 ? _b : b.alignment, baseline: (_c = a.baseline) !== null && _c !== void 0 ? _c : b.baseline, strike: (_d = a.strike) !== null && _d !== void 0 ? _d : b.strike }, overriddenFontWeight));
return create(Object.assign({ fontFamily: a.fontFamily || b.fontFamily, color: a.color || b.color, fontSize: a.fontSize || b.fontSize, fontScale: a.fontScale || b.fontScale, italic: a.italic || b.italic, subScript: a.subScript || b.subScript, superScript: a.superScript || b.superScript, underline: a.underline || b.underline, verticalPosition: a.verticalPosition || b.verticalPosition, indent: a.indent || b.indent, lineGap: a.lineGap || b.lineGap, lineBreak: (_a = a.lineBreak) !== null && _a !== void 0 ? _a : b.lineBreak, alignment: (_b = a.alignment) !== null && _b !== void 0 ? _b : b.alignment, baseline: (_c = a.baseline) !== null && _c !== void 0 ? _c : b.baseline, strike: (_d = a.strike) !== null && _d !== void 0 ? _d : b.strike, opacity: (_e = a.opacity) !== null && _e !== void 0 ? _e : b.opacity }, overriddenFontWeight));
}

@@ -38,0 +38,0 @@ exports.overrideWith = overrideWith;

{
"name": "abstract-document",
"version": "9.0.0",
"version": "9.1.0",
"description": "Dynamically create documents using code or JSX and render to any format",

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

"dependencies": {
"abstract-image": "^6.0.0",
"abstract-image": "^6.0.1",
"base64-js": "^1.2.0",

@@ -45,3 +45,3 @@ "docx": "^6.0.3",

},
"gitHead": "a76bd0a1c26c7e19eb07eb5d7c27a8e0eaa0b2ae"
"gitHead": "f69aa4f8417ae1d9faad717bea3e725a326e97a7"
}

@@ -568,3 +568,3 @@ import * as AD from "../../abstract-document/index";

.fontSize(fontSize)
.fillColor(textStyle.color || "black");
.fillColor(textStyle.color || "black", textStyle.opacity ?? 1.0);

@@ -571,0 +571,0 @@ applyTextOffset(pdf, textStyle);

@@ -28,2 +28,3 @@ export type TextAlignment = "left" | "center" | "right" | "justify";

readonly strike?: boolean;
readonly opacity?: number;
}

@@ -53,2 +54,3 @@

readonly strike?: boolean;
readonly opacity?: number;
}

@@ -105,2 +107,3 @@

strike: a.strike ?? b.strike,
opacity: a.opacity ?? b.opacity,
...overriddenFontWeight,

@@ -107,0 +110,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

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

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

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

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

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

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

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