@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.
Files changed (69) hide show
  1. package/dist/cjs/src/barcodes/helper.js +2 -2
  2. package/dist/cjs/src/barcodes/helper.js.map +1 -1
  3. package/dist/cjs/src/barcodes/index.js +6 -6
  4. package/dist/cjs/src/barcodes/index.js.map +1 -1
  5. package/dist/cjs/src/barcodes/pdfRender.js +5 -5
  6. package/dist/cjs/src/barcodes/pdfRender.js.map +1 -1
  7. package/dist/cjs/src/barcodes/propPanel.js +4 -4
  8. package/dist/cjs/src/barcodes/propPanel.js.map +1 -1
  9. package/dist/cjs/src/barcodes/uiRender.js +3 -3
  10. package/dist/cjs/src/barcodes/uiRender.js.map +1 -1
  11. package/dist/cjs/src/image/index.js +4 -4
  12. package/dist/cjs/src/image/index.js.map +1 -1
  13. package/dist/cjs/src/image/pdfRender.js +2 -2
  14. package/dist/cjs/src/image/pdfRender.js.map +1 -1
  15. package/dist/cjs/src/index.js +10 -10
  16. package/dist/cjs/src/index.js.map +1 -1
  17. package/dist/cjs/src/text/helper.js +12 -12
  18. package/dist/cjs/src/text/helper.js.map +1 -1
  19. package/dist/cjs/src/text/index.js +4 -4
  20. package/dist/cjs/src/text/index.js.map +1 -1
  21. package/dist/cjs/src/text/pdfRender.js +21 -21
  22. package/dist/cjs/src/text/pdfRender.js.map +1 -1
  23. package/dist/cjs/src/text/propPanel.js +18 -18
  24. package/dist/cjs/src/text/propPanel.js.map +1 -1
  25. package/dist/cjs/src/text/uiRender.js +13 -13
  26. package/dist/cjs/src/text/uiRender.js.map +1 -1
  27. package/dist/esm/src/barcodes/helper.js +1 -1
  28. package/dist/esm/src/barcodes/helper.js.map +1 -1
  29. package/dist/esm/src/barcodes/index.js +4 -4
  30. package/dist/esm/src/barcodes/index.js.map +1 -1
  31. package/dist/esm/src/barcodes/pdfRender.js +2 -2
  32. package/dist/esm/src/barcodes/pdfRender.js.map +1 -1
  33. package/dist/esm/src/barcodes/propPanel.js +1 -1
  34. package/dist/esm/src/barcodes/propPanel.js.map +1 -1
  35. package/dist/esm/src/barcodes/uiRender.js +1 -1
  36. package/dist/esm/src/barcodes/uiRender.js.map +1 -1
  37. package/dist/esm/src/image/index.js +3 -3
  38. package/dist/esm/src/image/index.js.map +1 -1
  39. package/dist/esm/src/image/pdfRender.js +1 -1
  40. package/dist/esm/src/image/pdfRender.js.map +1 -1
  41. package/dist/esm/src/index.js +4 -4
  42. package/dist/esm/src/index.js.map +1 -1
  43. package/dist/esm/src/text/helper.js +1 -1
  44. package/dist/esm/src/text/helper.js.map +1 -1
  45. package/dist/esm/src/text/index.js +3 -3
  46. package/dist/esm/src/text/index.js.map +1 -1
  47. package/dist/esm/src/text/pdfRender.js +3 -3
  48. package/dist/esm/src/text/pdfRender.js.map +1 -1
  49. package/dist/esm/src/text/propPanel.js +1 -1
  50. package/dist/esm/src/text/propPanel.js.map +1 -1
  51. package/dist/esm/src/text/uiRender.js +2 -2
  52. package/dist/esm/src/text/uiRender.js.map +1 -1
  53. package/dist/types/src/barcodes/types.d.ts +1 -1
  54. package/dist/types/src/index.d.ts +5 -5
  55. package/package.json +2 -1
  56. package/src/barcodes/helper.ts +1 -1
  57. package/src/barcodes/index.ts +4 -4
  58. package/src/barcodes/pdfRender.ts +2 -2
  59. package/src/barcodes/propPanel.ts +1 -1
  60. package/src/barcodes/types.ts +1 -1
  61. package/src/barcodes/uiRender.ts +1 -1
  62. package/src/image/index.ts +3 -3
  63. package/src/image/pdfRender.ts +1 -1
  64. package/src/index.ts +4 -4
  65. package/src/text/helper.ts +1 -1
  66. package/src/text/index.ts +3 -3
  67. package/src/text/pdfRender.ts +3 -3
  68. package/src/text/propPanel.ts +1 -1
  69. package/src/text/uiRender.ts +2 -2
@@ -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
@@ -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,
@@ -1,5 +1,5 @@
1
1
  import { Schema } from '@pdfme/common';
2
- import { BARCODE_TYPES } from './constants';
2
+ import { BARCODE_TYPES } from './constants.js';
3
3
 
4
4
  export interface BarcodeSchema extends Schema {
5
5
  type: (typeof BARCODE_TYPES)[number];
@@ -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
 
@@ -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 };
@@ -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
 
@@ -22,7 +22,7 @@ import {
22
22
  DYNAMIC_FIT_HORIZONTAL,
23
23
  DYNAMIC_FIT_VERTICAL,
24
24
  VERTICAL_ALIGN_TOP,
25
- } from './constants';
25
+ } from './constants.js';
26
26
 
27
27
  export const getBrowserVerticalFontAdjustments = (
28
28
  fontKitFont: FontKitFont,
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 };
@@ -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);
@@ -23,7 +23,7 @@ import {
23
23
  DEFAULT_DYNAMIC_MAX_FONT_SIZE,
24
24
  ALIGN_RIGHT,
25
25
  ALIGN_CENTER,
26
- } from './constants';
26
+ } from './constants.js';
27
27
 
28
28
  const UseDynamicFontSize = (props: PropPanelWidgetProps) => {
29
29
  const { rootElement, changeSchemas, activeSchema } = props;
@@ -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) {