@pdfme/schemas 6.1.1-dev.28 → 6.1.1-dev.30
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/box.d.ts +45 -0
- package/dist/{builtins-BNd4jd5D.js → builtins-BB2DHceW.js} +177 -73
- package/dist/builtins-BB2DHceW.js.map +1 -0
- package/dist/builtins.js +1 -1
- package/dist/dynamicLayout.js +4 -4
- package/dist/{dynamicTemplate-CjbGepw4.js → dynamicTemplate-B4GCNLF9.js} +6 -45
- package/dist/dynamicTemplate-B4GCNLF9.js.map +1 -0
- package/dist/{dynamicTemplate-BpD4RNw8.js → dynamicTemplate-BwzF9C1L.js} +2 -2
- package/dist/{dynamicTemplate-BpD4RNw8.js.map → dynamicTemplate-BwzF9C1L.js.map} +1 -1
- package/dist/{dynamicTemplate-CBvwRBx9.js → dynamicTemplate-C7MdZxPm.js} +20 -10
- package/dist/dynamicTemplate-C7MdZxPm.js.map +1 -0
- package/dist/{helper-BFz9EwDz.js → helper-CEme39Uo.js} +2 -2
- package/dist/{helper-BFz9EwDz.js.map → helper-CEme39Uo.js.map} +1 -1
- package/dist/index.js +24 -20
- package/dist/index.js.map +1 -1
- package/dist/lists.js +2 -2
- package/dist/{measure-Bjmh9Ro3.js → measure-L5diay3k.js} +34 -7
- package/dist/measure-L5diay3k.js.map +1 -0
- package/dist/{splitRange-CpXivbmJ.js → splitRange-DmVDtmzO.js} +88 -3
- package/dist/splitRange-DmVDtmzO.js.map +1 -0
- package/dist/tables/helper.d.ts +4 -96
- package/dist/tables/types.d.ts +2 -6
- package/dist/tables.js +2 -2
- package/dist/text/measure.d.ts +6 -0
- package/dist/text/richTextPdfRender.d.ts +1 -1
- package/dist/text/types.d.ts +4 -0
- package/dist/texts.js +3 -3
- package/dist/types.d.ts +1 -0
- package/dist/{utils-Bd4CvhPZ.js → utils-zDZkqBnX.js} +2 -2
- package/dist/{utils-Bd4CvhPZ.js.map → utils-zDZkqBnX.js.map} +1 -1
- package/dist/utils.js +2 -2
- package/package.json +1 -1
- package/dist/builtins-BNd4jd5D.js.map +0 -1
- package/dist/dynamicTemplate-CBvwRBx9.js.map +0 -1
- package/dist/dynamicTemplate-CjbGepw4.js.map +0 -1
- package/dist/measure-Bjmh9Ro3.js.map +0 -1
- package/dist/splitRange-CpXivbmJ.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a as mapVerticalAlignToFlex, c as Formatter, i as makeElementPlainTextContentEditable, l as getExtraFormatterSchema, n as textSchema, o as uiRender$4, r as buildStyledTextContainer, s as propPanel$3, t as builtInPlugins, u as pdfRender$4 } from "./builtins-
|
|
4
|
-
import { a as getCellPropPanelSchema, c as HEX_COLOR_PATTERN, i as getBodyWithSchemaRange, l as createSingleTable, n as getDynamicLayoutForTable, o as getColumnStylesPropPanelSchema, r as getBody, s as getDefaultCellStyles, t as getDynamicHeightsForTable } from "./dynamicTemplate-
|
|
5
|
-
import { c as isEditable, d as countUniqueVariableNames, f as getVariableNames, i as createSvgStr, l as readFile, n as convertForPdfLayoutProps, o as hex2PrintingColor, p as visitVariables, r as createErrorElm, t as addAlphaToHex, u as rotatePoint } from "./utils-
|
|
6
|
-
import { a as normalizeListItems, c as LIST_STYLE_BULLET, i as normalizeListItemEntries, l as LIST_STYLE_ORDERED, n as calculateListLayout, o as serializeListItems, s as DEFAULT_LIST_STYLE, t as getDynamicLayoutForList } from "./dynamicTemplate-
|
|
7
|
-
import { n as substituteVariablesAsInlineMarkdownLiterals, r as validateVariables, t as substituteVariables } from "./helper-
|
|
1
|
+
import { $ as VERTICAL_ALIGN_MIDDLE, F as DEFAULT_FONT_COLOR, G as PLACEHOLDER_FONT_COLOR, K as SYNTHETIC_BOLD_CSS_TEXT_SHADOW, N as DEFAULT_ALIGNMENT, a as createListItemSplitRange, b as createBoxDimension, c as getListItemRange, h as getFontKitFont, i as TEXT_LINE_SPLIT_UNIT, j as CODE_BACKGROUND_COLOR, l as getTableBodyRange, n as LIST_ITEM_SPLIT_UNIT, o as createTableBodySplitRange, r as TABLE_BODY_SPLIT_UNIT, s as createTextLineSplitRange, t as BUILT_IN_DYNAMIC_LAYOUT_SPLIT_UNITS, u as getTextLineRange, x as getBoxContentArea } from "./splitRange-DmVDtmzO.js";
|
|
2
|
+
import { a as measureTextLines, d as isInlineMarkdownTextSchema, g as parseInlineMarkdown, p as resolveFontVariant } from "./measure-L5diay3k.js";
|
|
3
|
+
import { a as mapVerticalAlignToFlex, c as Formatter, i as makeElementPlainTextContentEditable, l as getExtraFormatterSchema, n as textSchema, o as uiRender$4, r as buildStyledTextContainer, s as propPanel$3, t as builtInPlugins, u as pdfRender$4 } from "./builtins-BB2DHceW.js";
|
|
4
|
+
import { a as getCellPropPanelSchema, c as HEX_COLOR_PATTERN, i as getBodyWithSchemaRange, l as createSingleTable, n as getDynamicLayoutForTable, o as getColumnStylesPropPanelSchema, r as getBody, s as getDefaultCellStyles, t as getDynamicHeightsForTable } from "./dynamicTemplate-B4GCNLF9.js";
|
|
5
|
+
import { c as isEditable, d as countUniqueVariableNames, f as getVariableNames, i as createSvgStr, l as readFile, n as convertForPdfLayoutProps, o as hex2PrintingColor, p as visitVariables, r as createErrorElm, t as addAlphaToHex, u as rotatePoint } from "./utils-zDZkqBnX.js";
|
|
6
|
+
import { a as normalizeListItems, c as LIST_STYLE_BULLET, i as normalizeListItemEntries, l as LIST_STYLE_ORDERED, n as calculateListLayout, o as serializeListItems, s as DEFAULT_LIST_STYLE, t as getDynamicLayoutForList } from "./dynamicTemplate-BwzF9C1L.js";
|
|
7
|
+
import { n as substituteVariablesAsInlineMarkdownLiterals, r as validateVariables, t as substituteVariables } from "./helper-CEme39Uo.js";
|
|
8
8
|
import "./tables.js";
|
|
9
9
|
import "./lists.js";
|
|
10
10
|
import { DEFAULT_FONT_NAME, ZOOM, b64toUint8Array, getDefaultFont, getFallbackFontName, getInternalLinkTarget, mm2pt, normalizeLinkHref, px2mm } from "@pdfme/common";
|
|
@@ -2476,14 +2476,14 @@ var renderLine = async (arg, schema, position, width, height) => linePdfRender({
|
|
|
2476
2476
|
}
|
|
2477
2477
|
});
|
|
2478
2478
|
var createTextDiv = (schema) => {
|
|
2479
|
-
const
|
|
2479
|
+
const contentArea = getBoxContentArea(schema);
|
|
2480
2480
|
const textDiv = document.createElement("div");
|
|
2481
2481
|
textDiv.style.position = "absolute";
|
|
2482
2482
|
textDiv.style.zIndex = "1";
|
|
2483
|
-
textDiv.style.width = `${width
|
|
2484
|
-
textDiv.style.height = `${height
|
|
2485
|
-
textDiv.style.top = `${
|
|
2486
|
-
textDiv.style.left = `${
|
|
2483
|
+
textDiv.style.width = `${contentArea.width}mm`;
|
|
2484
|
+
textDiv.style.height = `${contentArea.height}mm`;
|
|
2485
|
+
textDiv.style.top = `${contentArea.topInset}mm`;
|
|
2486
|
+
textDiv.style.left = `${contentArea.leftInset}mm`;
|
|
2487
2487
|
return textDiv;
|
|
2488
2488
|
};
|
|
2489
2489
|
var createLineDiv = (width, height, top, right, bottom, left, borderColor) => {
|
|
@@ -2501,7 +2501,8 @@ var createLineDiv = (width, height, top, right, bottom, left, borderColor) => {
|
|
|
2501
2501
|
var cellSchema = {
|
|
2502
2502
|
pdf: async (arg) => {
|
|
2503
2503
|
const { schema } = arg;
|
|
2504
|
-
const { position, width, height, borderWidth
|
|
2504
|
+
const { position, width, height, borderWidth } = schema;
|
|
2505
|
+
const contentArea = getBoxContentArea(schema);
|
|
2505
2506
|
await Promise.all([
|
|
2506
2507
|
rectanglePdfRender$1({
|
|
2507
2508
|
...arg,
|
|
@@ -2538,12 +2539,12 @@ var cellSchema = {
|
|
|
2538
2539
|
...schema,
|
|
2539
2540
|
type: "text",
|
|
2540
2541
|
backgroundColor: "",
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
width: width
|
|
2546
|
-
height: height
|
|
2542
|
+
borderColor: "",
|
|
2543
|
+
borderWidth: createBoxDimension(0),
|
|
2544
|
+
padding: createBoxDimension(0),
|
|
2545
|
+
position: contentArea.position,
|
|
2546
|
+
width: contentArea.width,
|
|
2547
|
+
height: contentArea.height
|
|
2547
2548
|
}
|
|
2548
2549
|
});
|
|
2549
2550
|
},
|
|
@@ -2556,7 +2557,10 @@ var cellSchema = {
|
|
|
2556
2557
|
...arg,
|
|
2557
2558
|
schema: {
|
|
2558
2559
|
...schema,
|
|
2559
|
-
backgroundColor: ""
|
|
2560
|
+
backgroundColor: "",
|
|
2561
|
+
borderColor: "",
|
|
2562
|
+
borderWidth: createBoxDimension(0),
|
|
2563
|
+
padding: createBoxDimension(0)
|
|
2560
2564
|
},
|
|
2561
2565
|
rootElement: textDiv
|
|
2562
2566
|
});
|