@pdfme/schemas 4.0.0-alpha.0 → 4.0.0-dev.4
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/README.md +1 -0
- package/dist/cjs/__tests__/text.test.js +10 -4
- package/dist/cjs/__tests__/text.test.js.map +1 -1
- package/dist/cjs/src/barcodes/propPanel.js +12 -0
- package/dist/cjs/src/barcodes/propPanel.js.map +1 -1
- package/dist/cjs/src/graphics/cacheKey.js +6 -0
- package/dist/cjs/src/graphics/cacheKey.js.map +1 -0
- package/dist/cjs/src/graphics/image.js +26 -15
- package/dist/cjs/src/graphics/image.js.map +1 -1
- package/dist/{esm/src/graphics/helper.js → cjs/src/graphics/imagehelper.js} +15 -2
- package/dist/cjs/src/graphics/imagehelper.js.map +1 -0
- package/dist/cjs/src/graphics/pdfHelper.js +49 -0
- package/dist/cjs/src/graphics/pdfHelper.js.map +1 -0
- package/dist/cjs/src/graphics/svg.js +2 -0
- package/dist/cjs/src/graphics/svg.js.map +1 -1
- package/dist/cjs/src/index.js +3 -2
- package/dist/cjs/src/index.js.map +1 -1
- package/dist/cjs/src/shapes/line.js +4 -2
- package/dist/cjs/src/shapes/line.js.map +1 -1
- package/dist/cjs/src/shapes/rectAndEllipse.js +13 -6
- package/dist/cjs/src/shapes/rectAndEllipse.js.map +1 -1
- package/dist/cjs/src/tables/pdfRender.js +0 -2
- package/dist/cjs/src/tables/pdfRender.js.map +1 -1
- package/dist/cjs/src/tables/propPanel.js +1 -0
- package/dist/cjs/src/tables/propPanel.js.map +1 -1
- package/dist/cjs/src/tables/uiRender.js +44 -23
- package/dist/cjs/src/tables/uiRender.js.map +1 -1
- package/dist/cjs/src/text/helper.js +27 -7
- package/dist/cjs/src/text/helper.js.map +1 -1
- package/dist/cjs/src/text/index.js +1 -0
- package/dist/cjs/src/text/index.js.map +1 -1
- package/dist/cjs/src/text/pdfRender.js +4 -4
- package/dist/cjs/src/text/pdfRender.js.map +1 -1
- package/dist/cjs/src/text/propPanel.js +1 -0
- package/dist/cjs/src/text/propPanel.js.map +1 -1
- package/dist/cjs/src/text/uiRender.js +22 -1
- package/dist/cjs/src/text/uiRender.js.map +1 -1
- package/dist/cjs/src/utils.js +37 -7
- package/dist/cjs/src/utils.js.map +1 -1
- package/dist/esm/__tests__/text.test.js +10 -4
- package/dist/esm/__tests__/text.test.js.map +1 -1
- package/dist/esm/src/barcodes/propPanel.js +12 -0
- package/dist/esm/src/barcodes/propPanel.js.map +1 -1
- package/dist/esm/src/graphics/cacheKey.js +2 -0
- package/dist/esm/src/graphics/cacheKey.js.map +1 -0
- package/dist/esm/src/graphics/image.js +25 -14
- package/dist/esm/src/graphics/image.js.map +1 -1
- package/dist/{cjs/src/graphics/helper.js → esm/src/graphics/imagehelper.js} +10 -5
- package/dist/esm/src/graphics/imagehelper.js.map +1 -0
- package/dist/esm/src/graphics/pdfHelper.js +44 -0
- package/dist/esm/src/graphics/pdfHelper.js.map +1 -0
- package/dist/esm/src/graphics/svg.js +2 -0
- package/dist/esm/src/graphics/svg.js.map +1 -1
- package/dist/esm/src/index.js +2 -1
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/shapes/line.js +5 -3
- package/dist/esm/src/shapes/line.js.map +1 -1
- package/dist/esm/src/shapes/rectAndEllipse.js +14 -7
- package/dist/esm/src/shapes/rectAndEllipse.js.map +1 -1
- package/dist/esm/src/tables/pdfRender.js +0 -2
- package/dist/esm/src/tables/pdfRender.js.map +1 -1
- package/dist/esm/src/tables/propPanel.js +1 -0
- package/dist/esm/src/tables/propPanel.js.map +1 -1
- package/dist/esm/src/tables/uiRender.js +39 -18
- package/dist/esm/src/tables/uiRender.js.map +1 -1
- package/dist/esm/src/text/helper.js +25 -6
- package/dist/esm/src/text/helper.js.map +1 -1
- package/dist/esm/src/text/index.js +1 -0
- package/dist/esm/src/text/index.js.map +1 -1
- package/dist/esm/src/text/pdfRender.js +6 -6
- package/dist/esm/src/text/pdfRender.js.map +1 -1
- package/dist/esm/src/text/propPanel.js +1 -0
- package/dist/esm/src/text/propPanel.js.map +1 -1
- package/dist/esm/src/text/uiRender.js +23 -2
- package/dist/esm/src/text/uiRender.js.map +1 -1
- package/dist/esm/src/utils.js +35 -6
- package/dist/esm/src/utils.js.map +1 -1
- package/dist/types/src/graphics/cacheKey.d.ts +2 -0
- package/dist/types/src/graphics/image.d.ts +1 -1
- package/dist/types/src/graphics/imagehelper.d.ts +4 -0
- package/dist/types/src/graphics/pdfHelper.d.ts +8 -0
- package/dist/types/src/index.d.ts +2 -2
- package/dist/types/src/shapes/rectAndEllipse.d.ts +6 -0
- package/dist/types/src/text/helper.d.ts +1 -0
- package/dist/types/src/utils.d.ts +3 -2
- package/package.json +1 -1
- package/src/barcodes/propPanel.ts +14 -0
- package/src/graphics/cacheKey.ts +3 -0
- package/src/graphics/image.ts +28 -19
- package/src/graphics/{helper.ts → imagehelper.ts} +10 -1
- package/src/graphics/pdfHelper.ts +55 -0
- package/src/graphics/svg.ts +2 -0
- package/src/index.ts +3 -1
- package/src/shapes/line.ts +5 -3
- package/src/shapes/rectAndEllipse.ts +17 -7
- package/src/tables/pdfRender.ts +0 -2
- package/src/tables/propPanel.ts +1 -0
- package/src/tables/uiRender.ts +50 -19
- package/src/text/helper.ts +27 -6
- package/src/text/index.ts +1 -0
- package/src/text/pdfRender.ts +14 -5
- package/src/text/propPanel.ts +1 -0
- package/src/text/uiRender.ts +22 -1
- package/src/utils.ts +46 -9
- package/dist/cjs/src/graphics/helper.js.map +0 -1
- package/dist/esm/src/graphics/helper.js.map +0 -1
- package/dist/types/src/graphics/helper.d.ts +0 -5
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"svg.js","sourceRoot":"","sources":["../../../../src/graphics/svg.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,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B,aAAa,EAAE;YACb,GAAG,SAAS,CAAC,SAAS,CAAC,aAAa;YACpC,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,mcAAmc;YACzc,QAAQ,EAAE,IAAI;SACf;KACF;CACF,CAAC"}
|
package/dist/esm/src/index.js
CHANGED
@@ -7,6 +7,7 @@ import table from './tables/index.js';
|
|
7
7
|
import { modifyTemplateForTable, getDynamicHeightForTable } from './tables/dynamicTemplate.js';
|
8
8
|
import { rectangle, ellipse } from './shapes/rectAndEllipse.js';
|
9
9
|
import { convertForPdfLayoutProps, rotatePoint } from './utils.js';
|
10
|
+
const tableBeta = table;
|
10
11
|
const builtInPlugins = { Text: text };
|
11
|
-
export { text, readOnlyText, image, readOnlyImage, svg, readOnlySvg, barcodes, line,
|
12
|
+
export { text, readOnlyText, image, readOnlyImage, svg, readOnlySvg, barcodes, line, tableBeta, modifyTemplateForTable, getDynamicHeightForTable, rectangle, ellipse, builtInPlugins, convertForPdfLayoutProps, rotatePoint, };
|
12
13
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,GAAG,EAAE,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC/F,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEnE,MAAM,cAAc,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAEtC,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,aAAa,EACb,GAAG,EACH,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,GAAG,EAAE,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC/F,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEnE,MAAM,SAAS,GAAG,KAAK,CAAC;AAExB,MAAM,cAAc,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAEtC,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,aAAa,EACb,GAAG,EACH,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,sBAAsB,EACtB,wBAAwB,EACxB,SAAS,EACT,OAAO,EACP,cAAc,EACd,wBAAwB,EACxB,WAAW,GACZ,CAAC"}
|
@@ -1,11 +1,12 @@
|
|
1
|
-
import { rotatePoint, convertForPdfLayoutProps,
|
1
|
+
import { rotatePoint, convertForPdfLayoutProps, hex2PrintingColor } from '../utils.js';
|
2
2
|
import { HEX_COLOR_PATTERN } from '../constants.js';
|
3
3
|
const DEFAULT_LINE_COLOR = '#000000';
|
4
4
|
const lineSchema = {
|
5
5
|
pdf: (arg) => {
|
6
|
-
const { page, schema } = arg;
|
6
|
+
const { page, schema, options } = arg;
|
7
7
|
if (schema.width === 0 || schema.height === 0 || !schema.color)
|
8
8
|
return;
|
9
|
+
const { colorType } = options;
|
9
10
|
const pageHeight = page.getHeight();
|
10
11
|
const { width, height, rotate, position: { x, y }, opacity, } = convertForPdfLayoutProps({ schema, pageHeight, applyRotateTranslate: false });
|
11
12
|
const pivot = { x: x + width / 2, y: y + height / 2 };
|
@@ -13,7 +14,7 @@ const lineSchema = {
|
|
13
14
|
start: rotatePoint({ x, y: y + height / 2 }, pivot, rotate.angle),
|
14
15
|
end: rotatePoint({ x: x + width, y: y + height / 2 }, pivot, rotate.angle),
|
15
16
|
thickness: height,
|
16
|
-
color:
|
17
|
+
color: hex2PrintingColor(schema.color ?? DEFAULT_LINE_COLOR, colorType),
|
17
18
|
opacity: opacity,
|
18
19
|
});
|
19
20
|
},
|
@@ -37,6 +38,7 @@ const lineSchema = {
|
|
37
38
|
}),
|
38
39
|
defaultSchema: {
|
39
40
|
type: 'line',
|
41
|
+
icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-minus"><path d="M5 12h14"/></svg>',
|
40
42
|
position: { x: 0, y: 0 },
|
41
43
|
width: 50,
|
42
44
|
height: 1,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"line.js","sourceRoot":"","sources":["../../../../src/shapes/line.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,
|
1
|
+
{"version":3,"file":"line.js","sourceRoot":"","sources":["../../../../src/shapes/line.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,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-
import {
|
3
|
+
import { hex2PrintingColor, convertForPdfLayoutProps } from '../utils.js';
|
4
4
|
const shape = {
|
5
5
|
ui: (arg) => {
|
6
6
|
const { schema, rootElement } = arg;
|
@@ -18,9 +18,10 @@ const shape = {
|
|
18
18
|
rootElement.appendChild(div);
|
19
19
|
},
|
20
20
|
pdf: (arg) => {
|
21
|
-
const { schema, page } = arg;
|
21
|
+
const { schema, page, options } = arg;
|
22
22
|
if (!schema.color && !schema.borderColor)
|
23
23
|
return;
|
24
|
+
const { colorType } = options;
|
24
25
|
const pageHeight = page.getHeight();
|
25
26
|
const cArg = { schema, pageHeight };
|
26
27
|
const { position, width, height, rotate, opacity } = convertForPdfLayoutProps(cArg);
|
@@ -29,8 +30,8 @@ const shape = {
|
|
29
30
|
const drawOptions = {
|
30
31
|
rotate,
|
31
32
|
borderWidth,
|
32
|
-
borderColor:
|
33
|
-
color:
|
33
|
+
borderColor: hex2PrintingColor(schema.borderColor, colorType),
|
34
|
+
color: hex2PrintingColor(schema.color, colorType),
|
34
35
|
opacity,
|
35
36
|
borderOpacity: opacity,
|
36
37
|
};
|
@@ -82,16 +83,22 @@ const shape = {
|
|
82
83
|
height: 37.5,
|
83
84
|
rotate: 0,
|
84
85
|
opacity: 1,
|
85
|
-
borderWidth:
|
86
|
+
borderWidth: 1,
|
86
87
|
borderColor: '#000000',
|
87
|
-
color: '
|
88
|
+
color: '',
|
88
89
|
readOnly: true,
|
89
90
|
},
|
90
91
|
},
|
91
92
|
};
|
93
|
+
const rectangleIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-square"><rect width="18" height="18" x="3" y="3" rx="2"/></svg>';
|
94
|
+
const ellipseIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle"><circle cx="12" cy="12" r="10"/></svg>';
|
92
95
|
const getPropPanelSchema = (type) => ({
|
93
96
|
...shape.propPanel,
|
94
|
-
defaultSchema: {
|
97
|
+
defaultSchema: {
|
98
|
+
...shape.propPanel.defaultSchema,
|
99
|
+
type,
|
100
|
+
icon: type === 'rectangle' ? rectangleIcon : ellipseIcon,
|
101
|
+
},
|
95
102
|
});
|
96
103
|
export const rectangle = { ...shape, propPanel: getPropPanelSchema('rectangle') };
|
97
104
|
export const ellipse = { ...shape, propPanel: getPropPanelSchema('ellipse') };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rectAndEllipse.js","sourceRoot":"","sources":["../../../../src/shapes/rectAndEllipse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"rectAndEllipse.js","sourceRoot":"","sources":["../../../../src/shapes/rectAndEllipse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAS1E,MAAM,KAAK,GAAwB;IACjC,EAAE,EAAE,CAAC,GAAG,EAAE,EAAE;QACV,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,GAAG,CAAC;QACpC,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC1C,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;QACzB,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QAC1B,GAAG,CAAC,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC;QACnC,IAAI,MAAM,CAAC,IAAI,KA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AAC,WAAW,CAAC,EAAE,CAAC;AAElF,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,kBAAkB,CAAC,SAAS,CAAC,EAAE,CAAC"}
|
@@ -5,8 +5,6 @@ import { createSingleTable } from './tableHelper';
|
|
5
5
|
const rectanglePdfRender = rectangle.pdf;
|
6
6
|
const cellPdfRender = cell.pdf;
|
7
7
|
async function drawCell(arg, cell) {
|
8
|
-
// TODO Not considering the table border
|
9
|
-
// The cell's position and size should indeed be shifted to accommodate the table border
|
10
8
|
await cellPdfRender({
|
11
9
|
...arg,
|
12
10
|
value: cell.raw,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pdfRender.js","sourceRoot":"","sources":["../../../../src/tables/pdfRender.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAIlD,MAAM,kBAAkB,GAAG,SAAS,CAAC,GAAG,CAAC;AACzC,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC;AAE/B,KAAK,UAAU,QAAQ,CAAC,GAAgC,EAAE,IAAU;IAClE,
|
1
|
+
{"version":3,"file":"pdfRender.js","sourceRoot":"","sources":["../../../../src/tables/pdfRender.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAIlD,MAAM,kBAAkB,GAAG,SAAS,CAAC,GAAG,CAAC;AACzC,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC;AAE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/B,MAAM,MAAM,GAAG,EAAE,CAAC,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;IAE7C,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAE3C,IAAI,QAAQ,CAAC,QAAQ,EAAE;QACrB,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,IAAI,EAAE;YAC5B,MAAM,OAAO,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;SACvD;KACF;IAED,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,IAAI,EAAE;QAC5B,MAAM,OAAO,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;KACvD;IAED,MAAM,eAAe,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,EAAE,GAAgC,EAAE,EAAE;IAClE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC;IAC9B,MAAM,IAAI,GAAG,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;IACzD,MAAM,KAAK,GAAG,MAAM,iBAAiB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACjD,MAAM,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AAC9B,CAAC,CAAC"}
|
@@ -55,6 +55,7 @@ export const propPanel = {
|
|
55
55
|
},
|
56
56
|
defaultSchema: {
|
57
57
|
type: 'table',
|
58
|
+
icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-table"><path d="M12 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M3 9h18"/><path d="M3 15h18"/></svg>',
|
58
59
|
position: { x: 0, y: 0 },
|
59
60
|
width: 150,
|
60
61
|
height: 20,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"propPanel.js","sourceRoot":"","sources":["../../../../src/tables/propPanel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,MAAM,CAAC,MAAM,SAAS,GAA2B;IAC/C,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;QAC1C,aAAa;QACb,MAAM,IAAI,GAAG,CAAC,YAAY,CAAC,IAAI,IAAI,EAAE,CAAa,CAAC;QACnD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,iBAAiB,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC;QACnF,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpC,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACnD,OAAO;YACL,WAAW,EAAE;gBACX,KAAK,EAAE,IAAI,CAAC,0BAA0B,CAAC;gBACvC,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,EAAE;gBACR,UAAU,EAAE;oBACV,WAAW,EAAE;wBACX,KAAK,EAAE,IAAI,CAAC,qBAAqB,CAAC;wBAClC,IAAI,EAAE,QAAQ;wBACd,MAAM,EAAE,aAAa;wBACrB,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAA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AS;SACpC,CAAC;QACF,YAAY,EAAE,EAAE;KACjB;CACF,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
|
+
import { px2mm } from '@pdfme/common';
|
1
2
|
import { createSingleTable } from './tableHelper.js';
|
2
3
|
import { getBody, getBodyWithRange } from './helper.js';
|
3
4
|
import cell from './cell.js';
|
4
|
-
import { px2mm } from '../utils';
|
5
5
|
const cellUiRender = cell.ui;
|
6
6
|
const convertToCellStyle = (styles) => ({
|
7
7
|
fontName: styles.fontName,
|
@@ -30,23 +30,51 @@ const calcResizedHeadWidthPercentages = (arg) => {
|
|
30
30
|
}
|
31
31
|
return headWidthPercentages;
|
32
32
|
};
|
33
|
+
const setBorder = (div, borderPosition, arg) => {
|
34
|
+
div.style[`border${borderPosition}`] = `${String(arg.schema.tableStyles.borderWidth)}mm solid ${arg.schema.tableStyles.borderColor}`;
|
35
|
+
};
|
36
|
+
const drawBorder = (div, row, colIndex, rowIndex, rowsLength, arg) => {
|
37
|
+
const isFirstColumn = colIndex === 0;
|
38
|
+
const isLastColumn = colIndex === Object.values(row.cells).length - 1;
|
39
|
+
const isLastRow = rowIndex === rowsLength - 1;
|
40
|
+
if (row.section === 'head') {
|
41
|
+
setBorder(div, 'Top', arg);
|
42
|
+
if (isFirstColumn)
|
43
|
+
setBorder(div, 'Left', arg);
|
44
|
+
if (isLastColumn)
|
45
|
+
setBorder(div, 'Right', arg);
|
46
|
+
if (JSON.parse(arg.value || '[]').length === 0) {
|
47
|
+
setBorder(div, 'Bottom', arg);
|
48
|
+
}
|
49
|
+
}
|
50
|
+
else if (row.section === 'body') {
|
51
|
+
if (!arg.schema.showHead && rowIndex === 0) {
|
52
|
+
setBorder(div, 'Top', arg);
|
53
|
+
}
|
54
|
+
if (isFirstColumn)
|
55
|
+
setBorder(div, 'Left', arg);
|
56
|
+
if (isLastColumn)
|
57
|
+
setBorder(div, 'Right', arg);
|
58
|
+
if (isLastRow)
|
59
|
+
setBorder(div, 'Bottom', arg);
|
60
|
+
}
|
61
|
+
};
|
33
62
|
const renderRowUi = (args) => {
|
34
63
|
const { rows, arg, onChangeEditingPosition, offsetY = 0, editingPosition } = args;
|
35
64
|
const value = JSON.parse(arg.value || '[]');
|
36
|
-
// TODO Need to adjust the inner size when the outer border increases
|
37
|
-
// Want to have the same style as border-collapse: collapse; (overlapping borders should merge into one)
|
38
|
-
// This should apply to the table itself as well as the cells, which should behave similarly.
|
39
65
|
let rowOffsetY = offsetY;
|
40
66
|
rows.forEach((row, rowIndex) => {
|
41
67
|
const { cells, height, section } = row;
|
42
|
-
let
|
68
|
+
let colOffsetX = 0;
|
43
69
|
Object.values(cells).forEach((cell, colIndex) => {
|
44
70
|
const div = document.createElement('div');
|
45
71
|
div.style.position = 'absolute';
|
46
72
|
div.style.top = `${rowOffsetY}mm`;
|
47
|
-
div.style.left = `${
|
73
|
+
div.style.left = `${colOffsetX}mm`;
|
48
74
|
div.style.width = `${cell.width}mm`;
|
49
75
|
div.style.height = `${cell.height}mm`;
|
76
|
+
div.style.boxSizing = 'border-box';
|
77
|
+
drawBorder(div, row, colIndex, rowIndex, rows.length, arg);
|
50
78
|
div.style.cursor =
|
51
79
|
arg.mode === 'designer' || (arg.mode === 'form' && section === 'body') ? 'text' : 'default';
|
52
80
|
div.addEventListener('click', () => {
|
@@ -78,7 +106,6 @@ const renderRowUi = (args) => {
|
|
78
106
|
if (section === 'body') {
|
79
107
|
const startRange = arg.schema.__bodyRange?.start ?? 0;
|
80
108
|
value[rowIndex + startRange][colIndex] = newValue;
|
81
|
-
// TODO Calling onChange triggers re-rendering, causing the focus to be lost
|
82
109
|
arg.onChange({ key: 'content', value: JSON.stringify(value) });
|
83
110
|
}
|
84
111
|
else {
|
@@ -93,13 +120,13 @@ const renderRowUi = (args) => {
|
|
93
120
|
schema: {
|
94
121
|
type: 'cell',
|
95
122
|
content: cell.raw,
|
96
|
-
position: { x:
|
123
|
+
position: { x: colOffsetX, y: rowOffsetY },
|
97
124
|
width: cell.width,
|
98
125
|
height: cell.height,
|
99
126
|
...convertToCellStyle(cell.styles),
|
100
127
|
},
|
101
128
|
});
|
102
|
-
|
129
|
+
colOffsetX += cell.width;
|
103
130
|
});
|
104
131
|
rowOffsetY += height;
|
105
132
|
});
|
@@ -118,10 +145,6 @@ export const uiRender = async (arg) => {
|
|
118
145
|
const bodyWidthRange = getBodyWithRange(value, schema.__bodyRange);
|
119
146
|
const table = await createSingleTable(bodyWidthRange, arg);
|
120
147
|
rootElement.innerHTML = '';
|
121
|
-
rootElement.style.borderColor = schema.tableStyles.borderColor;
|
122
|
-
rootElement.style.borderWidth = String(schema.tableStyles.borderWidth) + 'mm';
|
123
|
-
rootElement.style.borderStyle = 'solid';
|
124
|
-
rootElement.style.boxSizing = 'border-box';
|
125
148
|
const handleChangeEditingPosition = (newPosition, editingPosition) => {
|
126
149
|
resetEditingPosition();
|
127
150
|
editingPosition.rowIndex = newPosition.rowIndex;
|
@@ -304,11 +327,9 @@ export const uiRender = async (arg) => {
|
|
304
327
|
if (mode === 'viewer') {
|
305
328
|
resetEditingPosition();
|
306
329
|
}
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
onChange({ key: 'height', value: tableHeight });
|
311
|
-
}
|
330
|
+
const tableHeight = schema.showHead ? table.getHeight() : table.getBodyHeight();
|
331
|
+
if (schema.height !== tableHeight && onChange) {
|
332
|
+
onChange({ key: 'height', value: tableHeight });
|
312
333
|
}
|
313
334
|
};
|
314
335
|
//# sourceMappingURL=uiRender.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"uiRender.js","sourceRoot":"","sources":["../../../../src/tables/uiRender.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAKjC,MAAM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AC,mBAAmB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;gBAC3D,CAAC,CAAC;gBACF,WAAW,CAAC,gBAAgB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;YACxD,CAAC,CAAC,CAAC;YACH,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC;KACJ;IAED,IAAI,IAAI,KAAK,QAAQ,EAAE;QACrB,oBAAoB,EAAE,CAAC;KACxB;IAED,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;IAChF,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW,IAAI,QAAQ,EAAE;QAC7C,QAAQ,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;KACjD;AACH,CAAC,CAAC"}
|
@@ -94,20 +94,38 @@ const getOverPosition = (textLine, calcValues) => {
|
|
94
94
|
}
|
95
95
|
return null;
|
96
96
|
};
|
97
|
+
/**
|
98
|
+
* Line breakable chars depend on the language and writing system.
|
99
|
+
* Western writing systems typically use spaces and hyphens as line breakable chars.
|
100
|
+
* Other writing systems often break on word boundaries so the following
|
101
|
+
* does not negatively impact them.
|
102
|
+
* However, this might need to be revisited for broader language support.
|
103
|
+
*/
|
104
|
+
const isLineBreakableChar = (char) => {
|
105
|
+
const lineBreakableChars = [' ', '-', "\u2014", "\u2013"];
|
106
|
+
return lineBreakableChars.includes(char);
|
107
|
+
};
|
97
108
|
/**
|
98
109
|
* Gets the position of the split. Splits the exceeding line at
|
99
|
-
* the last
|
110
|
+
* the last breakable char prior to it exceeding the bounding box width.
|
100
111
|
*/
|
101
112
|
const getSplitPosition = (textLine, calcValues) => {
|
102
113
|
const overPos = getOverPosition(textLine, calcValues);
|
103
114
|
if (overPos === null)
|
104
115
|
return textLine.length; // input line is shorter than the available space
|
105
|
-
|
106
|
-
|
116
|
+
if (textLine[overPos] === ' ') {
|
117
|
+
// if the character immediately beyond the boundary is a space, split
|
118
|
+
return overPos;
|
119
|
+
}
|
120
|
+
let overPosTmp = overPos - 1;
|
121
|
+
while (overPosTmp >= 0) {
|
122
|
+
if (isLineBreakableChar(textLine[overPosTmp])) {
|
123
|
+
return overPosTmp + 1;
|
124
|
+
}
|
107
125
|
overPosTmp--;
|
108
126
|
}
|
109
|
-
// For very long lines with no
|
110
|
-
return
|
127
|
+
// For very long lines with no breakable chars use the original overPos
|
128
|
+
return overPos;
|
111
129
|
};
|
112
130
|
/**
|
113
131
|
* Recursively splits the line at getSplitPosition.
|
@@ -115,7 +133,7 @@ const getSplitPosition = (textLine, calcValues) => {
|
|
115
133
|
*/
|
116
134
|
export const getSplittedLines = (textLine, calcValues) => {
|
117
135
|
const splitPos = getSplitPosition(textLine, calcValues);
|
118
|
-
const splittedLine = textLine.substring(0, splitPos);
|
136
|
+
const splittedLine = textLine.substring(0, splitPos).trimEnd();
|
119
137
|
const rest = textLine.substring(splitPos).trimStart();
|
120
138
|
if (rest === textLine) {
|
121
139
|
// if we went so small that we want to split on the first char
|
@@ -239,4 +257,5 @@ export const splitTextToSize = (arg) => {
|
|
239
257
|
});
|
240
258
|
return lines;
|
241
259
|
};
|
260
|
+
export const isFirefox = () => navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
242
261
|
//# sourceMappingURL=helper.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../../src/text/helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,OAAO,EACL,eAAe,EACf,KAAK,EACL,KAAK,EACL,KAAK,EAEL,mBAAmB,EACnB,cAAc,EACd,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EACL,iB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S,CAAC;SAC7B;aAAM;YACL,eAAe,IAAI,oBAAoB,CAAC;YACxC,MAAM;SACP;KACF;IAED,wDAAwD;IACxD,OAAO,qBAAqB,CAAC,cAAc,EAAE,eAAe,CAAC,EAAE;QAC7D,eAAe,IAAI,oBAAoB,CAAC;QACxC,CAAC,EAAE,cAAc,EAAE,eAAe,EAAE,GAAG,oBAAoB,CAAC,eAAe,CAAC,CAAC,CAAC;KAC/E;IAED,OAAO,eAAe,CAAC;AACzB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAM/B,EAAE,EAAE;IACH,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,GAAG,CAAC;IAC7E,MAAM,mBAAmB,GAAwB;QAC/C,IAAI,EAAE,WAAW;QACjB,QAAQ;QACR,gBAAgB;QAChB,YAAY;KACb,CAAC;IACF,IAAI,KAAK,GAAa,EAAE,CAAC;IACzB,KAAK,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,OAAO,CAAC,CAAC,IAAY,EAAE,EAAE;QAC5D,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AACF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC"}
|
@@ -11,6 +11,7 @@ export const readOnlyText = {
|
|
11
11
|
defaultSchema: {
|
12
12
|
...textSchema.propPanel.defaultSchema,
|
13
13
|
type: 'readOnlyText',
|
14
|
+
icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-type"><polyline points="4 7 4 4 20 4 20 7"/><line x1="9" x2="15" y1="20" y2="20"/><line x1="12" x2="12" y1="4" y2="20"/></svg>',
|
14
15
|
readOnly: true,
|
15
16
|
},
|
16
17
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/text/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,MAAM,UAAU,GAAuB,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AAEnF,eAAe,UAAU,CAAC;AAE1B,MAAM,CAAC,MAAM,YAAY,GAAuB;IAC9C,GAAG,EAAE,UAAU,CAAC,GAAG;IACnB,EAAE,EAAE,UAAU,CAAC,EAAE;IACjB,SAAS,EAAE;QACT,GAAG,UAAU,CAAC,SAAS;QACvB,aAAa,EAAE;YACb,GAAG,UAAU,CAAC,SAAS,CAAC,aAAa;YACrC,IAAI,EAAE,cAAc;YACpB,QAAQ,EAAE,IAAI;SACf;KACF;CACF,CAAC"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/text/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,MAAM,UAAU,GAAuB,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;AAEnF,eAAe,UAAU,CAAC;AAE1B,MAAM,CAAC,MAAM,YAAY,GAAuB;IAC9C,GAAG,EAAE,UAAU,CAAC,GAAG;IACnB,EAAE,EAAE,UAAU,CAAC,EAAE;IACjB,SAAS,EAAE;QACT,GAAG,UAAU,CAAC,SAAS;QACvB,aAAa,EAAE;YACb,GAAG,UAAU,CAAC,SAAS,CAAC,aAAa;YACrC,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,0UAA0U;YAChV,QAAQ,EAAE,IAAI;SACf;KACF;CACF,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { getDefaultFont, getFallbackFontName, mm2pt } from '@pdfme/common';
|
1
|
+
import { getDefaultFont, getFallbackFontName, mm2pt, } from '@pdfme/common';
|
2
2
|
import { VERTICAL_ALIGN_TOP, VERTICAL_ALIGN_MIDDLE, VERTICAL_ALIGN_BOTTOM, DEFAULT_FONT_SIZE, DEFAULT_ALIGNMENT, DEFAULT_VERTICAL_ALIGNMENT, DEFAULT_LINE_HEIGHT, DEFAULT_CHARACTER_SPACING, DEFAULT_FONT_COLOR, } from './constants.js';
|
3
3
|
import { calculateDynamicFontSize, heightOfFontAtSize, getFontDescentInPt, getFontKitFont, widthOfTextAtSize, splitTextToSize, } from './helper.js';
|
4
|
-
import { convertForPdfLayoutProps, rotatePoint,
|
4
|
+
import { convertForPdfLayoutProps, rotatePoint, hex2PrintingColor } from '../utils.js';
|
5
5
|
const embedAndGetFontObj = async (arg) => {
|
6
6
|
const { pdfDoc, font, _cache } = arg;
|
7
7
|
if (_cache.has(pdfDoc)) {
|
@@ -20,11 +20,11 @@ const embedAndGetFontObj = async (arg) => {
|
|
20
20
|
_cache.set(pdfDoc, fontObj);
|
21
21
|
return fontObj;
|
22
22
|
};
|
23
|
-
const getFontProp = async ({ value, font, schema, _cache, }) => {
|
23
|
+
const getFontProp = async ({ value, font, schema, colorType, _cache, }) => {
|
24
24
|
const fontSize = schema.dynamicFontSize
|
25
25
|
? await calculateDynamicFontSize({ textSchema: schema, font, value, _cache })
|
26
26
|
: schema.fontSize ?? DEFAULT_FONT_SIZE;
|
27
|
-
const color =
|
27
|
+
const color = hex2PrintingColor(schema.fontColor || DEFAULT_FONT_COLOR, colorType);
|
28
28
|
return {
|
29
29
|
alignment: schema.alignment ?? DEFAULT_ALIGNMENT,
|
30
30
|
verticalAlignment: schema.verticalAlignment ?? DEFAULT_VERTICAL_ALIGNMENT,
|
@@ -38,7 +38,7 @@ export const pdfRender = async (arg) => {
|
|
38
38
|
const { value, pdfDoc, pdfLib, page, options, schema, _cache } = arg;
|
39
39
|
if (!value)
|
40
40
|
return;
|
41
|
-
const { font = getDefaultFont() } = options;
|
41
|
+
const { font = getDefaultFont(), colorType } = options;
|
42
42
|
const [pdfFontObj, fontKitFont, fontProp] = await Promise.all([
|
43
43
|
embedAndGetFontObj({ pdfDoc, font, _cache }),
|
44
44
|
getFontKitFont(schema.fontName, font, _cache),
|
@@ -50,7 +50,7 @@ export const pdfRender = async (arg) => {
|
|
50
50
|
const pageHeight = page.getHeight();
|
51
51
|
const { width, height, rotate, position: { x, y }, opacity, } = convertForPdfLayoutProps({ schema, pageHeight, applyRotateTranslate: false });
|
52
52
|
if (schema.backgroundColor) {
|
53
|
-
const color =
|
53
|
+
const color = hex2PrintingColor(schema.backgroundColor, colorType);
|
54
54
|
page.drawRectangle({ x, y, width, height, rotate, color });
|
55
55
|
}
|
56
56
|
page.pushOperators(pdfLib.setCharacterSpacing(characterSpacing ?? DEFAULT_CHARACTER_SPACING));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pdfRender.js","sourceRoot":"","sources":["../../../../src/text/pdfRender.ts"],"names":[],"mappings":"AAEA,OAAO,
|
1
|
+
{"version":3,"file":"pdfRender.js","sourceRoot":"","sources":["../../../../src/text/pdfRender.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,cAAc,EACd,mBAAmB,EACnB,KAAK,GACN,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,EAC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="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-text-cursor-input"><path d="M5 4h1a3 3 0 0 1 3 3 3 3 0 0 1 3-3h1"/><path d="M13 20h-1a3 3 0 0 1-3-3 3 3 0 0 1-3 3H5"/><path d="M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1"/><path d="M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7"/><path d="M9 7v10"/></svg>',
|
150
151
|
content: 'Type Something...',
|
151
152
|
position: { x: 0, y: 0 },
|
152
153
|
width: 45,
|