@pdfme/ui 6.1.2-dev.27 → 6.1.2-dev.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -100558,7 +100558,7 @@ var Underline = [["path", { d: "M6 4v6a6 6 0 0 0 12 0V4" }], ["line", {
|
|
|
100558
100558
|
y2: "20"
|
|
100559
100559
|
}]];
|
|
100560
100560
|
//#endregion
|
|
100561
|
-
//#region ../schemas/dist/builtins-
|
|
100561
|
+
//#region ../schemas/dist/builtins-D9sJvrz9.js
|
|
100562
100562
|
var addUriLinkAnnotation = (arg) => {
|
|
100563
100563
|
const { pdfDoc, page, uri, rect, borderWidth = 0 } = arg;
|
|
100564
100564
|
const safeUri = normalizeSafeLinkUri(uri);
|
|
@@ -101741,6 +101741,8 @@ var getRangedPlainTextValue = (arg) => {
|
|
|
101741
101741
|
var buildStyledTextContainer = (arg, fontKitFont, value, resolvedDynamicFontSize) => {
|
|
101742
101742
|
const { schema, rootElement, mode } = arg;
|
|
101743
101743
|
let dynamicFontSize = resolvedDynamicFontSize;
|
|
101744
|
+
const characterSpacing = schema.characterSpacing ?? 0;
|
|
101745
|
+
const editable = isEditable(mode, schema);
|
|
101744
101746
|
if (dynamicFontSize === void 0 && shouldUseDynamicFontSize(schema, arg.basePdf) && value) dynamicFontSize = calculateDynamicFontSize({
|
|
101745
101747
|
textSchema: schema,
|
|
101746
101748
|
fontKitFont,
|
|
@@ -101775,7 +101777,7 @@ var buildStyledTextContainer = (arg, fontKitFont, value, resolvedDynamicFontSize
|
|
|
101775
101777
|
justifyContent: mapVerticalAlignToFlex(verticalAlignment),
|
|
101776
101778
|
width: "100%",
|
|
101777
101779
|
height: "100%",
|
|
101778
|
-
cursor:
|
|
101780
|
+
cursor: editable ? "text" : "default"
|
|
101779
101781
|
};
|
|
101780
101782
|
Object.assign(container.style, containerStyle);
|
|
101781
101783
|
rootElement.innerHTML = "";
|
|
@@ -101787,7 +101789,7 @@ var buildStyledTextContainer = (arg, fontKitFont, value, resolvedDynamicFontSize
|
|
|
101787
101789
|
fontFamily: schema.fontName ? `'${schema.fontName}'` : "inherit",
|
|
101788
101790
|
color: schema.fontColor ? schema.fontColor : DEFAULT_FONT_COLOR,
|
|
101789
101791
|
fontSize: `${dynamicFontSize ?? schema.fontSize ?? 13}pt`,
|
|
101790
|
-
letterSpacing: `${
|
|
101792
|
+
letterSpacing: `${characterSpacing}pt`,
|
|
101791
101793
|
lineHeight: `${schema.lineHeight ?? 1}em`,
|
|
101792
101794
|
textAlign: schema.alignment ?? "left",
|
|
101793
101795
|
whiteSpace: "pre-wrap",
|
|
@@ -101799,6 +101801,7 @@ var buildStyledTextContainer = (arg, fontKitFont, value, resolvedDynamicFontSize
|
|
|
101799
101801
|
paddingTop: `${topAdjustment}px`,
|
|
101800
101802
|
backgroundColor: "transparent",
|
|
101801
101803
|
textDecoration: textDecorations.join(" "),
|
|
101804
|
+
...editable && characterSpacing > 0 ? { width: `calc(100% + ${characterSpacing}pt)` } : {},
|
|
101802
101805
|
...isTopAligned ? { height: "100%" } : {}
|
|
101803
101806
|
};
|
|
101804
101807
|
const textBlock = document.createElement("div");
|