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 6.18.1 to 6.20.2

4

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

@@ -381,6 +381,6 @@ "use strict";

if (isFirstAtom || alignment !== "left") {
pdf.text(text, finalRect.x, finalRect.y, Object.assign({ width: availableWidth, underline: textStyle.underline || false, align: isSingleAtom ? alignment : "left", indent: textStyle.indent || 0, continued: alignment !== "left" ? false : !isLastAtom, baseline: textStyle.baseline || "top" }, (textStyle.lineGap !== undefined ? { lineGap: textStyle.lineGap } : {})));
pdf.text(text, finalRect.x, finalRect.y, Object.assign({ width: availableWidth, underline: textStyle.underline || false, align: isSingleAtom ? alignment : "left", indent: textStyle.indent || 0, continued: alignment !== "left" ? false : !isLastAtom, baseline: textStyle.baseline || "top", strike: textStyle.strike }, (textStyle.lineGap !== undefined ? { lineGap: textStyle.lineGap } : {})));
}
else {
pdf.text(text, Object.assign({ underline: textStyle.underline || false, align: "left", indent: textStyle.indent || 0, continued: !isLastAtom }, (textStyle.lineGap !== undefined ? { lineGap: textStyle.lineGap } : {})));
pdf.text(text, Object.assign({ underline: textStyle.underline || false, align: "left", indent: textStyle.indent || 0, continued: !isLastAtom, strike: textStyle.strike || false }, (textStyle.lineGap !== undefined ? { lineGap: textStyle.lineGap } : {})));
}

@@ -387,0 +387,0 @@ resetTextOffset(pdf, textStyle);

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

readonly baseline?: TextBaseline;
readonly strike?: boolean;
}

@@ -49,2 +50,3 @@ export interface TextStyleProps {

readonly baseline?: TextBaseline;
readonly strike?: boolean;
}

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

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

function overrideWith(overrider, toOverride) {
var _a, _b, _c;
var _a, _b, _c, _d;
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 }, 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 }, overriddenFontWeight));
}

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

{
"name": "abstract-document",
"version": "6.18.1",
"version": "6.20.2",
"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": "^3.4.1",
"abstract-image": "^3.4.3",
"base64-js": "^1.2.0",

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

},
"gitHead": "33dad0344df5c39eb9f083a3822d8cac88860fd9"
"gitHead": "5b368ba880f15586f9a948e914788ff2bb17c2c7"
}

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

baseline: textStyle.baseline || "top",
strike: textStyle.strike,
...(textStyle.lineGap !== undefined ? { lineGap: textStyle.lineGap } : {}),

@@ -593,2 +594,3 @@ });

continued: !isLastAtom,
strike: textStyle.strike || false,
...(textStyle.lineGap !== undefined ? { lineGap: textStyle.lineGap } : {}),

@@ -595,0 +597,0 @@ });

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

readonly baseline?: TextBaseline;
readonly strike?: boolean;
}

@@ -51,2 +52,3 @@

readonly baseline?: TextBaseline;
readonly strike?: boolean;
}

@@ -102,2 +104,3 @@

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

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