@pdfme/schemas 3.0.1-dev.14 → 3.0.1-dev.15
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/cjs/src/barcodes/helper.js +2 -2
- package/dist/cjs/src/barcodes/helper.js.map +1 -1
- package/dist/cjs/src/barcodes/index.js +6 -6
- package/dist/cjs/src/barcodes/index.js.map +1 -1
- package/dist/cjs/src/barcodes/pdfRender.js +5 -5
- package/dist/cjs/src/barcodes/pdfRender.js.map +1 -1
- package/dist/cjs/src/barcodes/propPanel.js +4 -4
- package/dist/cjs/src/barcodes/propPanel.js.map +1 -1
- package/dist/cjs/src/barcodes/uiRender.js +3 -3
- package/dist/cjs/src/barcodes/uiRender.js.map +1 -1
- package/dist/cjs/src/image/index.js +4 -4
- package/dist/cjs/src/image/index.js.map +1 -1
- package/dist/cjs/src/image/pdfRender.js +2 -2
- package/dist/cjs/src/image/pdfRender.js.map +1 -1
- package/dist/cjs/src/index.js +10 -10
- package/dist/cjs/src/index.js.map +1 -1
- package/dist/cjs/src/text/helper.js +12 -12
- package/dist/cjs/src/text/helper.js.map +1 -1
- package/dist/cjs/src/text/index.js +4 -4
- package/dist/cjs/src/text/index.js.map +1 -1
- package/dist/cjs/src/text/pdfRender.js +21 -21
- package/dist/cjs/src/text/pdfRender.js.map +1 -1
- package/dist/cjs/src/text/propPanel.js +18 -18
- package/dist/cjs/src/text/propPanel.js.map +1 -1
- package/dist/cjs/src/text/uiRender.js +13 -13
- package/dist/cjs/src/text/uiRender.js.map +1 -1
- package/dist/esm/src/barcodes/helper.js +1 -1
- package/dist/esm/src/barcodes/helper.js.map +1 -1
- package/dist/esm/src/barcodes/index.js +4 -4
- package/dist/esm/src/barcodes/index.js.map +1 -1
- package/dist/esm/src/barcodes/pdfRender.js +2 -2
- package/dist/esm/src/barcodes/pdfRender.js.map +1 -1
- package/dist/esm/src/barcodes/propPanel.js +1 -1
- package/dist/esm/src/barcodes/propPanel.js.map +1 -1
- package/dist/esm/src/barcodes/uiRender.js +1 -1
- package/dist/esm/src/barcodes/uiRender.js.map +1 -1
- package/dist/esm/src/image/index.js +3 -3
- package/dist/esm/src/image/index.js.map +1 -1
- package/dist/esm/src/image/pdfRender.js +1 -1
- package/dist/esm/src/image/pdfRender.js.map +1 -1
- package/dist/esm/src/index.js +4 -4
- package/dist/esm/src/index.js.map +1 -1
- package/dist/esm/src/text/helper.js +1 -1
- package/dist/esm/src/text/helper.js.map +1 -1
- package/dist/esm/src/text/index.js +3 -3
- package/dist/esm/src/text/index.js.map +1 -1
- package/dist/esm/src/text/pdfRender.js +3 -3
- package/dist/esm/src/text/pdfRender.js.map +1 -1
- package/dist/esm/src/text/propPanel.js +1 -1
- package/dist/esm/src/text/propPanel.js.map +1 -1
- package/dist/esm/src/text/uiRender.js +2 -2
- package/dist/esm/src/text/uiRender.js.map +1 -1
- package/dist/types/src/barcodes/types.d.ts +1 -1
- package/dist/types/src/index.d.ts +5 -5
- package/package.json +2 -1
- package/src/barcodes/helper.ts +1 -1
- package/src/barcodes/index.ts +4 -4
- package/src/barcodes/pdfRender.ts +2 -2
- package/src/barcodes/propPanel.ts +1 -1
- package/src/barcodes/types.ts +1 -1
- package/src/barcodes/uiRender.ts +1 -1
- package/src/image/index.ts +3 -3
- package/src/image/pdfRender.ts +1 -1
- package/src/index.ts +4 -4
- package/src/text/helper.ts +1 -1
- package/src/text/index.ts +3 -3
- package/src/text/pdfRender.ts +3 -3
- package/src/text/propPanel.ts +1 -1
- package/src/text/uiRender.ts +2 -2
package/src/barcodes/helper.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { b64toUint8Array } from '@pdfme/common';
|
2
2
|
import bwipjs, { RenderOptions } from 'bwip-js';
|
3
3
|
import { Buffer } from 'buffer';
|
4
|
-
import { BARCODE_TYPES } from './constants';
|
4
|
+
import { BARCODE_TYPES } from './constants.js';
|
5
5
|
import { BarcodeTypes } from './types';
|
6
6
|
|
7
7
|
// GTIN-13, GTIN-8, GTIN-12, GTIN-14
|
package/src/barcodes/index.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import { pdfRender } from './pdfRender';
|
2
|
-
import { getPropPanelByBarcodeType } from './propPanel';
|
3
|
-
import { uiRender } from './uiRender';
|
1
|
+
import { pdfRender } from './pdfRender.js';
|
2
|
+
import { getPropPanelByBarcodeType } from './propPanel.js';
|
3
|
+
import { uiRender } from './uiRender.js';
|
4
4
|
import type { BarcodeSchema, BarcodeTypes } from './types';
|
5
|
-
import { BARCODE_TYPES } from './constants';
|
5
|
+
import { BARCODE_TYPES } from './constants.js';
|
6
6
|
import { Plugin } from '@pdfme/common';
|
7
7
|
|
8
8
|
const schemas = BARCODE_TYPES.reduce(
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { PDFRenderProps } from '@pdfme/common';
|
2
|
-
import { convertForPdfLayoutProps } from '../renderUtils';
|
2
|
+
import { convertForPdfLayoutProps } from '../renderUtils.js';
|
3
3
|
import type { BarcodeSchema } from './types';
|
4
|
-
import { createBarCode, validateBarcodeInput } from './helper';
|
4
|
+
import { createBarCode, validateBarcodeInput } from './helper.js';
|
5
5
|
|
6
6
|
const getBarcodeCacheKey = (schema: BarcodeSchema, value: string) => {
|
7
7
|
return `${schema.type}${schema.backgroundColor}${schema.barColor}${schema.textColor}${value}`;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { PropPanel } from '@pdfme/common';
|
2
2
|
import type { BarcodeSchema } from './types';
|
3
|
-
import { DEFAULT_BARCODE_COLOR, DEFAULT_BARCODE_BG_COLOR } from './constants';
|
3
|
+
import { DEFAULT_BARCODE_COLOR, DEFAULT_BARCODE_BG_COLOR } from './constants.js';
|
4
4
|
|
5
5
|
const defaultColors = {
|
6
6
|
backgroundColor: DEFAULT_BARCODE_BG_COLOR,
|
package/src/barcodes/types.ts
CHANGED
package/src/barcodes/uiRender.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import type * as CSS from 'csstype';
|
2
2
|
import { UIRenderProps } from '@pdfme/common';
|
3
3
|
import type { BarcodeSchema } from './types';
|
4
|
-
import { validateBarcodeInput, createBarCode } from './helper';
|
4
|
+
import { validateBarcodeInput, createBarCode } from './helper.js';
|
5
5
|
|
6
6
|
const fullSize = { width: '100%', height: '100%' };
|
7
7
|
|
package/src/image/index.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { Plugin } from '@pdfme/common';
|
2
|
-
import { pdfRender } from './pdfRender';
|
3
|
-
import { propPanel } from './propPanel';
|
4
|
-
import { uiRender } from './uiRender';
|
2
|
+
import { pdfRender } from './pdfRender.js';
|
3
|
+
import { propPanel } from './propPanel.js';
|
4
|
+
import { uiRender } from './uiRender.js';
|
5
5
|
import type { ImageSchema } from './types';
|
6
6
|
|
7
7
|
const schema: Plugin<ImageSchema> = { pdf: pdfRender, ui: uiRender, propPanel };
|
package/src/image/pdfRender.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { PDFRenderProps, Schema } from '@pdfme/common';
|
2
2
|
import type { ImageSchema } from './types';
|
3
|
-
import { convertForPdfLayoutProps } from '../renderUtils';
|
3
|
+
import { convertForPdfLayoutProps } from '../renderUtils.js';
|
4
4
|
|
5
5
|
const getCacheKey = (schema: Schema, input: string) => `${schema.type}${input}`;
|
6
6
|
|
package/src/index.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import text from './text';
|
2
|
-
import image from './image';
|
3
|
-
import barcodes from './barcodes';
|
4
|
-
import { convertForPdfLayoutProps, rotatePoint } from './renderUtils';
|
1
|
+
import text from './text/index.js';
|
2
|
+
import image from './image/index.js';
|
3
|
+
import barcodes from './barcodes/index.js';
|
4
|
+
import { convertForPdfLayoutProps, rotatePoint } from './renderUtils.js';
|
5
5
|
|
6
6
|
const builtInPlugins = { Text: text };
|
7
7
|
|
package/src/text/helper.ts
CHANGED
package/src/text/index.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { Plugin } from '@pdfme/common';
|
2
|
-
import { pdfRender } from './pdfRender';
|
3
|
-
import { propPanel } from './propPanel';
|
4
|
-
import { uiRender } from './uiRender';
|
2
|
+
import { pdfRender } from './pdfRender.js';
|
3
|
+
import { propPanel } from './propPanel.js';
|
4
|
+
import { uiRender } from './uiRender.js';
|
5
5
|
import type { TextSchema } from './types';
|
6
6
|
|
7
7
|
const schema: Plugin<TextSchema> = { pdf: pdfRender, ui: uiRender, propPanel };
|
package/src/text/pdfRender.ts
CHANGED
@@ -11,7 +11,7 @@ import {
|
|
11
11
|
DEFAULT_LINE_HEIGHT,
|
12
12
|
DEFAULT_CHARACTER_SPACING,
|
13
13
|
DEFAULT_FONT_COLOR,
|
14
|
-
} from './constants';
|
14
|
+
} from './constants.js';
|
15
15
|
import {
|
16
16
|
calculateDynamicFontSize,
|
17
17
|
heightOfFontAtSize,
|
@@ -19,8 +19,8 @@ import {
|
|
19
19
|
getFontKitFont,
|
20
20
|
getSplittedLines,
|
21
21
|
widthOfTextAtSize,
|
22
|
-
} from './helper';
|
23
|
-
import { convertForPdfLayoutProps, rotatePoint } from '../renderUtils';
|
22
|
+
} from './helper.js';
|
23
|
+
import { convertForPdfLayoutProps, rotatePoint } from '../renderUtils.js';
|
24
24
|
|
25
25
|
const hex2rgb = (hex: string) => {
|
26
26
|
if (hex.slice(0, 1) === '#') hex = hex.slice(1);
|
package/src/text/propPanel.ts
CHANGED
package/src/text/uiRender.ts
CHANGED
@@ -11,12 +11,12 @@ import {
|
|
11
11
|
DEFAULT_LINE_HEIGHT,
|
12
12
|
DEFAULT_CHARACTER_SPACING,
|
13
13
|
DEFAULT_FONT_COLOR,
|
14
|
-
} from './constants';
|
14
|
+
} from './constants.js';
|
15
15
|
import {
|
16
16
|
calculateDynamicFontSize,
|
17
17
|
getFontKitFont,
|
18
18
|
getBrowserVerticalFontAdjustments,
|
19
|
-
} from './helper';
|
19
|
+
} from './helper.js';
|
20
20
|
|
21
21
|
const mapVerticalAlignToFlex = (verticalAlignmentValue: string | undefined) => {
|
22
22
|
switch (verticalAlignmentValue) {
|