@pdfme/schemas 5.3.8 → 5.3.9-dev.1

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 (280) hide show
  1. package/dist/cjs/__tests__/barcode.test.js +119 -120
  2. package/dist/cjs/__tests__/barcode.test.js.map +1 -1
  3. package/dist/cjs/__tests__/multiVariableText.test.js +15 -15
  4. package/dist/cjs/__tests__/multiVariableText.test.js.map +1 -1
  5. package/dist/cjs/__tests__/text.test.js +88 -78
  6. package/dist/cjs/__tests__/text.test.js.map +1 -1
  7. package/dist/cjs/__tests__/utils.test.js +76 -15
  8. package/dist/cjs/__tests__/utils.test.js.map +1 -1
  9. package/dist/cjs/src/barcodes/helper.js +2 -1
  10. package/dist/cjs/src/barcodes/helper.js.map +1 -1
  11. package/dist/cjs/src/barcodes/pdfRender.js.map +1 -1
  12. package/dist/cjs/src/barcodes/propPanel.js +3 -3
  13. package/dist/cjs/src/barcodes/propPanel.js.map +1 -1
  14. package/dist/cjs/src/barcodes/uiRender.js.map +1 -1
  15. package/dist/cjs/src/checkbox/index.js +4 -4
  16. package/dist/cjs/src/checkbox/index.js.map +1 -1
  17. package/dist/cjs/src/date/date.js +2 -2
  18. package/dist/cjs/src/date/date.js.map +1 -1
  19. package/dist/cjs/src/date/dateTime.js +2 -2
  20. package/dist/cjs/src/date/dateTime.js.map +1 -1
  21. package/dist/cjs/src/date/helper.js +28 -18
  22. package/dist/cjs/src/date/helper.js.map +1 -1
  23. package/dist/cjs/src/date/time.js +2 -2
  24. package/dist/cjs/src/date/time.js.map +1 -1
  25. package/dist/cjs/src/graphics/image.js.map +1 -1
  26. package/dist/cjs/src/graphics/imagehelper.js.map +1 -1
  27. package/dist/cjs/src/graphics/svg.js +25 -2
  28. package/dist/cjs/src/graphics/svg.js.map +1 -1
  29. package/dist/cjs/src/index.js +34 -31
  30. package/dist/cjs/src/index.js.map +1 -1
  31. package/dist/cjs/src/multiVariableText/helper.js +2 -2
  32. package/dist/cjs/src/multiVariableText/helper.js.map +1 -1
  33. package/dist/cjs/src/multiVariableText/pdfRender.js +5 -5
  34. package/dist/cjs/src/multiVariableText/pdfRender.js.map +1 -1
  35. package/dist/cjs/src/multiVariableText/propPanel.js +19 -14
  36. package/dist/cjs/src/multiVariableText/propPanel.js.map +1 -1
  37. package/dist/cjs/src/multiVariableText/uiRender.js +25 -15
  38. package/dist/cjs/src/multiVariableText/uiRender.js.map +1 -1
  39. package/dist/cjs/src/radioGroup/index.js +4 -4
  40. package/dist/cjs/src/radioGroup/index.js.map +1 -1
  41. package/dist/cjs/src/select/index.js +9 -9
  42. package/dist/cjs/src/select/index.js.map +1 -1
  43. package/dist/cjs/src/shapes/line.js +1 -1
  44. package/dist/cjs/src/shapes/rectAndEllipse.js +8 -4
  45. package/dist/cjs/src/shapes/rectAndEllipse.js.map +1 -1
  46. package/dist/cjs/src/tables/classes.js +4 -4
  47. package/dist/cjs/src/tables/classes.js.map +1 -1
  48. package/dist/cjs/src/tables/dynamicTemplate.js +2 -2
  49. package/dist/cjs/src/tables/dynamicTemplate.js.map +1 -1
  50. package/dist/cjs/src/tables/helper.js +25 -25
  51. package/dist/cjs/src/tables/helper.js.map +1 -1
  52. package/dist/cjs/src/tables/pdfRender.js +8 -8
  53. package/dist/cjs/src/tables/pdfRender.js.map +1 -1
  54. package/dist/cjs/src/tables/tableHelper.js +6 -7
  55. package/dist/cjs/src/tables/tableHelper.js.map +1 -1
  56. package/dist/cjs/src/tables/uiRender.js.map +1 -1
  57. package/dist/cjs/src/text/extraFormatter.js +17 -17
  58. package/dist/cjs/src/text/extraFormatter.js.map +1 -1
  59. package/dist/cjs/src/text/helper.js +17 -7
  60. package/dist/cjs/src/text/helper.js.map +1 -1
  61. package/dist/cjs/src/text/pdfRender.js +1 -1
  62. package/dist/cjs/src/text/pdfRender.js.map +1 -1
  63. package/dist/cjs/src/text/propPanel.js +2 -2
  64. package/dist/cjs/src/text/propPanel.js.map +1 -1
  65. package/dist/cjs/src/text/uiRender.js.map +1 -1
  66. package/dist/cjs/src/utils.js +52 -12
  67. package/dist/cjs/src/utils.js.map +1 -1
  68. package/dist/esm/__tests__/barcode.test.js +14 -15
  69. package/dist/esm/__tests__/barcode.test.js.map +1 -1
  70. package/dist/esm/__tests__/multiVariableText.test.js +1 -1
  71. package/dist/esm/__tests__/multiVariableText.test.js.map +1 -1
  72. package/dist/esm/__tests__/text.test.js +2 -2
  73. package/dist/esm/__tests__/text.test.js.map +1 -1
  74. package/dist/esm/__tests__/utils.test.js +65 -4
  75. package/dist/esm/__tests__/utils.test.js.map +1 -1
  76. package/dist/esm/src/barcodes/helper.js +2 -1
  77. package/dist/esm/src/barcodes/helper.js.map +1 -1
  78. package/dist/esm/src/barcodes/pdfRender.js.map +1 -1
  79. package/dist/esm/src/barcodes/propPanel.js +3 -3
  80. package/dist/esm/src/barcodes/propPanel.js.map +1 -1
  81. package/dist/esm/src/barcodes/uiRender.js.map +1 -1
  82. package/dist/esm/src/checkbox/index.js +2 -2
  83. package/dist/esm/src/checkbox/index.js.map +1 -1
  84. package/dist/esm/src/date/date.js +1 -1
  85. package/dist/esm/src/date/date.js.map +1 -1
  86. package/dist/esm/src/date/dateTime.js +1 -1
  87. package/dist/esm/src/date/dateTime.js.map +1 -1
  88. package/dist/esm/src/date/helper.js +4 -4
  89. package/dist/esm/src/date/helper.js.map +1 -1
  90. package/dist/esm/src/date/time.js +1 -1
  91. package/dist/esm/src/date/time.js.map +1 -1
  92. package/dist/esm/src/graphics/image.js.map +1 -1
  93. package/dist/esm/src/graphics/imagehelper.js.map +1 -1
  94. package/dist/esm/src/graphics/svg.js +25 -2
  95. package/dist/esm/src/graphics/svg.js.map +1 -1
  96. package/dist/esm/src/index.js +16 -14
  97. package/dist/esm/src/index.js.map +1 -1
  98. package/dist/esm/src/multiVariableText/helper.js +2 -2
  99. package/dist/esm/src/multiVariableText/helper.js.map +1 -1
  100. package/dist/esm/src/multiVariableText/pdfRender.js +2 -2
  101. package/dist/esm/src/multiVariableText/pdfRender.js.map +1 -1
  102. package/dist/esm/src/multiVariableText/propPanel.js +15 -10
  103. package/dist/esm/src/multiVariableText/propPanel.js.map +1 -1
  104. package/dist/esm/src/multiVariableText/uiRender.js +19 -9
  105. package/dist/esm/src/multiVariableText/uiRender.js.map +1 -1
  106. package/dist/esm/src/radioGroup/index.js +2 -2
  107. package/dist/esm/src/radioGroup/index.js.map +1 -1
  108. package/dist/esm/src/select/index.js +2 -2
  109. package/dist/esm/src/select/index.js.map +1 -1
  110. package/dist/esm/src/shapes/line.js +1 -1
  111. package/dist/esm/src/shapes/rectAndEllipse.js +8 -4
  112. package/dist/esm/src/shapes/rectAndEllipse.js.map +1 -1
  113. package/dist/esm/src/tables/classes.js +1 -1
  114. package/dist/esm/src/tables/classes.js.map +1 -1
  115. package/dist/esm/src/tables/dynamicTemplate.js +1 -1
  116. package/dist/esm/src/tables/dynamicTemplate.js.map +1 -1
  117. package/dist/esm/src/tables/helper.js +5 -5
  118. package/dist/esm/src/tables/helper.js.map +1 -1
  119. package/dist/esm/src/tables/pdfRender.js +4 -4
  120. package/dist/esm/src/tables/pdfRender.js.map +1 -1
  121. package/dist/esm/src/tables/tableHelper.js +1 -1
  122. package/dist/esm/src/tables/tableHelper.js.map +1 -1
  123. package/dist/esm/src/tables/uiRender.js.map +1 -1
  124. package/dist/esm/src/text/extraFormatter.js +2 -2
  125. package/dist/esm/src/text/extraFormatter.js.map +1 -1
  126. package/dist/esm/src/text/helper.js.map +1 -1
  127. package/dist/esm/src/text/pdfRender.js +1 -1
  128. package/dist/esm/src/text/pdfRender.js.map +1 -1
  129. package/dist/esm/src/text/propPanel.js +1 -1
  130. package/dist/esm/src/text/propPanel.js.map +1 -1
  131. package/dist/esm/src/text/uiRender.js.map +1 -1
  132. package/dist/esm/src/utils.js +52 -12
  133. package/dist/esm/src/utils.js.map +1 -1
  134. package/dist/node/__tests__/barcode.test.js +119 -120
  135. package/dist/node/__tests__/barcode.test.js.map +1 -1
  136. package/dist/node/__tests__/multiVariableText.test.js +15 -15
  137. package/dist/node/__tests__/multiVariableText.test.js.map +1 -1
  138. package/dist/node/__tests__/text.test.js +88 -78
  139. package/dist/node/__tests__/text.test.js.map +1 -1
  140. package/dist/node/__tests__/utils.test.js +76 -15
  141. package/dist/node/__tests__/utils.test.js.map +1 -1
  142. package/dist/node/src/barcodes/helper.js +2 -1
  143. package/dist/node/src/barcodes/helper.js.map +1 -1
  144. package/dist/node/src/barcodes/pdfRender.js.map +1 -1
  145. package/dist/node/src/barcodes/propPanel.js +3 -3
  146. package/dist/node/src/barcodes/propPanel.js.map +1 -1
  147. package/dist/node/src/barcodes/uiRender.js.map +1 -1
  148. package/dist/node/src/checkbox/index.js +4 -4
  149. package/dist/node/src/checkbox/index.js.map +1 -1
  150. package/dist/node/src/date/date.js +2 -2
  151. package/dist/node/src/date/date.js.map +1 -1
  152. package/dist/node/src/date/dateTime.js +2 -2
  153. package/dist/node/src/date/dateTime.js.map +1 -1
  154. package/dist/node/src/date/helper.js +28 -18
  155. package/dist/node/src/date/helper.js.map +1 -1
  156. package/dist/node/src/date/time.js +2 -2
  157. package/dist/node/src/date/time.js.map +1 -1
  158. package/dist/node/src/graphics/image.js.map +1 -1
  159. package/dist/node/src/graphics/imagehelper.js.map +1 -1
  160. package/dist/node/src/graphics/svg.js +25 -2
  161. package/dist/node/src/graphics/svg.js.map +1 -1
  162. package/dist/node/src/index.js +34 -31
  163. package/dist/node/src/index.js.map +1 -1
  164. package/dist/node/src/multiVariableText/helper.js +2 -2
  165. package/dist/node/src/multiVariableText/helper.js.map +1 -1
  166. package/dist/node/src/multiVariableText/pdfRender.js +5 -5
  167. package/dist/node/src/multiVariableText/pdfRender.js.map +1 -1
  168. package/dist/node/src/multiVariableText/propPanel.js +19 -14
  169. package/dist/node/src/multiVariableText/propPanel.js.map +1 -1
  170. package/dist/node/src/multiVariableText/uiRender.js +25 -15
  171. package/dist/node/src/multiVariableText/uiRender.js.map +1 -1
  172. package/dist/node/src/radioGroup/index.js +4 -4
  173. package/dist/node/src/radioGroup/index.js.map +1 -1
  174. package/dist/node/src/select/index.js +9 -9
  175. package/dist/node/src/select/index.js.map +1 -1
  176. package/dist/node/src/shapes/line.js +1 -1
  177. package/dist/node/src/shapes/rectAndEllipse.js +8 -4
  178. package/dist/node/src/shapes/rectAndEllipse.js.map +1 -1
  179. package/dist/node/src/tables/classes.js +4 -4
  180. package/dist/node/src/tables/classes.js.map +1 -1
  181. package/dist/node/src/tables/dynamicTemplate.js +2 -2
  182. package/dist/node/src/tables/dynamicTemplate.js.map +1 -1
  183. package/dist/node/src/tables/helper.js +25 -25
  184. package/dist/node/src/tables/helper.js.map +1 -1
  185. package/dist/node/src/tables/pdfRender.js +8 -8
  186. package/dist/node/src/tables/pdfRender.js.map +1 -1
  187. package/dist/node/src/tables/tableHelper.js +6 -7
  188. package/dist/node/src/tables/tableHelper.js.map +1 -1
  189. package/dist/node/src/tables/uiRender.js.map +1 -1
  190. package/dist/node/src/text/extraFormatter.js +17 -17
  191. package/dist/node/src/text/extraFormatter.js.map +1 -1
  192. package/dist/node/src/text/helper.js +17 -7
  193. package/dist/node/src/text/helper.js.map +1 -1
  194. package/dist/node/src/text/pdfRender.js +1 -1
  195. package/dist/node/src/text/pdfRender.js.map +1 -1
  196. package/dist/node/src/text/propPanel.js +2 -2
  197. package/dist/node/src/text/propPanel.js.map +1 -1
  198. package/dist/node/src/text/uiRender.js.map +1 -1
  199. package/dist/node/src/utils.js +52 -12
  200. package/dist/node/src/utils.js.map +1 -1
  201. package/dist/types/src/barcodes/helper.d.ts +1 -1
  202. package/dist/types/src/barcodes/index.d.ts +1 -1
  203. package/dist/types/src/barcodes/pdfRender.d.ts +1 -1
  204. package/dist/types/src/barcodes/propPanel.d.ts +1 -1
  205. package/dist/types/src/barcodes/uiRender.d.ts +1 -1
  206. package/dist/types/src/date/date.d.ts +1 -1
  207. package/dist/types/src/date/dateTime.d.ts +1 -1
  208. package/dist/types/src/date/helper.d.ts +1 -1
  209. package/dist/types/src/date/time.d.ts +1 -1
  210. package/dist/types/src/date/types.d.ts +6 -1
  211. package/dist/types/src/index.d.ts +16 -15
  212. package/dist/types/src/multiVariableText/helper.d.ts +1 -1
  213. package/dist/types/src/multiVariableText/index.d.ts +1 -1
  214. package/dist/types/src/multiVariableText/pdfRender.d.ts +1 -1
  215. package/dist/types/src/multiVariableText/propPanel.d.ts +1 -1
  216. package/dist/types/src/multiVariableText/types.d.ts +1 -1
  217. package/dist/types/src/multiVariableText/uiRender.d.ts +1 -1
  218. package/dist/types/src/select/index.d.ts +1 -1
  219. package/dist/types/src/shapes/rectAndEllipse.d.ts +16 -96
  220. package/dist/types/src/tables/cell.d.ts +1 -1
  221. package/dist/types/src/tables/classes.d.ts +1 -1
  222. package/dist/types/src/tables/helper.d.ts +5 -5
  223. package/dist/types/src/tables/pdfRender.d.ts +1 -1
  224. package/dist/types/src/tables/propPanel.d.ts +1 -1
  225. package/dist/types/src/tables/tableHelper.d.ts +1 -1
  226. package/dist/types/src/tables/types.d.ts +1 -1
  227. package/dist/types/src/text/constants.d.ts +1 -1
  228. package/dist/types/src/text/helper.d.ts +1 -1
  229. package/dist/types/src/text/index.d.ts +1 -1
  230. package/dist/types/src/text/pdfRender.d.ts +1 -1
  231. package/dist/types/src/text/propPanel.d.ts +1 -1
  232. package/dist/types/src/text/uiRender.d.ts +1 -1
  233. package/dist/types/src/utils.d.ts +4 -85
  234. package/eslint.config.mjs +22 -0
  235. package/package.json +3 -4
  236. package/src/barcodes/helper.ts +3 -4
  237. package/src/barcodes/index.ts +2 -2
  238. package/src/barcodes/pdfRender.ts +2 -2
  239. package/src/barcodes/propPanel.ts +4 -5
  240. package/src/barcodes/uiRender.ts +1 -1
  241. package/src/checkbox/index.ts +2 -2
  242. package/src/date/date.ts +1 -1
  243. package/src/date/dateTime.ts +1 -1
  244. package/src/date/helper.ts +20 -13
  245. package/src/date/time.ts +1 -1
  246. package/src/date/types.ts +7 -1
  247. package/src/graphics/imagehelper.ts +1 -1
  248. package/src/graphics/svg.ts +27 -2
  249. package/src/index.ts +17 -14
  250. package/src/multiVariableText/helper.ts +15 -7
  251. package/src/multiVariableText/index.ts +1 -1
  252. package/src/multiVariableText/pdfRender.ts +3 -3
  253. package/src/multiVariableText/propPanel.ts +19 -16
  254. package/src/multiVariableText/types.ts +1 -1
  255. package/src/multiVariableText/uiRender.ts +26 -23
  256. package/src/radioGroup/index.ts +3 -3
  257. package/src/select/index.ts +4 -4
  258. package/src/shapes/line.ts +1 -1
  259. package/src/shapes/rectAndEllipse.ts +10 -4
  260. package/src/tables/cell.ts +5 -5
  261. package/src/tables/classes.ts +7 -7
  262. package/src/tables/dynamicTemplate.ts +3 -3
  263. package/src/tables/helper.ts +7 -7
  264. package/src/tables/pdfRender.ts +9 -9
  265. package/src/tables/propPanel.ts +1 -1
  266. package/src/tables/tableHelper.ts +15 -12
  267. package/src/tables/types.ts +1 -1
  268. package/src/tables/uiRender.ts +6 -6
  269. package/src/text/constants.ts +1 -1
  270. package/src/text/extraFormatter.ts +2 -2
  271. package/src/text/helper.ts +6 -6
  272. package/src/text/index.ts +1 -1
  273. package/src/text/pdfRender.ts +4 -4
  274. package/src/text/propPanel.ts +2 -2
  275. package/src/text/uiRender.ts +14 -6
  276. package/src/utils.ts +60 -15
  277. package/tsconfig.cjs.json +1 -1
  278. package/tsconfig.esm.json +2 -1
  279. package/tsconfig.node.json +2 -1
  280. package/.eslintrc.cjs +0 -3
@@ -1,7 +1,7 @@
1
1
  import { Font, mm2pt, pt2mm } from '@pdfme/common';
2
2
  import type { Font as FontKitFont } from 'fontkit';
3
- import { splitTextToSize, getFontKitFont, widthOfTextAtSize } from '../text/helper';
4
- import type { Styles, TableInput, Settings, Section, StylesProps } from './types';
3
+ import { splitTextToSize, getFontKitFont, widthOfTextAtSize } from '../text/helper.js';
4
+ import type { Styles, TableInput, Settings, Section, StylesProps } from './types.js';
5
5
 
6
6
  type ContentSettings = { body: Row[]; head: Row[]; columns: Column[] };
7
7
 
@@ -175,7 +175,7 @@ async function calculateWidths(arg: { table: Table; font: Font; _cache: Map<any,
175
175
  // first resize attempt: with respect to minReadableWidth and minWidth
176
176
  if (resizeWidth) {
177
177
  resizeWidth = resizeColumns(resizableColumns, resizeWidth, (column) =>
178
- Math.max(column.minReadableWidth, column.minWidth)
178
+ Math.max(column.minReadableWidth, column.minWidth),
179
179
  );
180
180
  }
181
181
 
@@ -257,7 +257,7 @@ function applyColSpans(table: Table) {
257
257
 
258
258
  async function fitContent(
259
259
  table: Table,
260
- getFontKitFontByFontName: (fontName: string | undefined) => Promise<FontKitFont>
260
+ getFontKitFontByFontName: (fontName: string | undefined) => Promise<FontKitFont>,
261
261
  ) {
262
262
  const rowSpanHeight = { count: 0, height: 0 };
263
263
  for (const row of table.allRows()) {
@@ -293,7 +293,7 @@ async function fitContent(
293
293
  function resizeColumns(
294
294
  columns: Column[],
295
295
  resizeWidth: number,
296
- getMinWidth: (column: Column) => number
296
+ getMinWidth: (column: Column) => number,
297
297
  ) {
298
298
  const initialResizeWidth = resizeWidth;
299
299
  const sumWrappedWidth = columns.reduce((acc, column) => acc + column.wrappedWidth, 0);
@@ -333,7 +333,7 @@ function resizeColumns(
333
333
 
334
334
  async function calculate(
335
335
  table: Table,
336
- getFontKitFontByFontName: (fontName: string | undefined) => Promise<FontKitFont>
336
+ getFontKitFontByFontName: (fontName: string | undefined) => Promise<FontKitFont>,
337
337
  ) {
338
338
  for (const row of table.allRows()) {
339
339
  for (const column of table.columns) {
@@ -347,7 +347,7 @@ async function calculate(
347
347
 
348
348
  const longestWordWidth = getStringWidth(
349
349
  Object.assign(cell, { text: cell.text.join(' ').split(/\s+/) }),
350
- fontKitFont
350
+ fontKitFont,
351
351
  );
352
352
  cell.minReadableWidth = longestWordWidth + hPadding;
353
353
 
@@ -1,7 +1,7 @@
1
1
  import { Schema, BasePdf, CommonOptions } from '@pdfme/common';
2
- import { createSingleTable } from './tableHelper';
2
+ import { createSingleTable } from './tableHelper.js';
3
3
  import { getBodyWithRange, getBody } from './helper.js';
4
- import { TableSchema } from './types';
4
+ import { TableSchema } from './types.js';
5
5
 
6
6
  export const getDynamicHeightsForTable = async (
7
7
  value: string,
@@ -10,7 +10,7 @@ export const getDynamicHeightsForTable = async (
10
10
  basePdf: BasePdf;
11
11
  options: CommonOptions;
12
12
  _cache: Map<any, any>;
13
- }
13
+ },
14
14
  ): Promise<number[]> => {
15
15
  if (args.schema.type !== 'table') return Promise.resolve([args.schema.height]);
16
16
  const schema = args.schema as TableSchema;
@@ -10,7 +10,7 @@ import {
10
10
  VERTICAL_ALIGN_TOP,
11
11
  VERTICAL_ALIGN_MIDDLE,
12
12
  VERTICAL_ALIGN_BOTTOM,
13
- } from '../text/constants';
13
+ } from '../text/constants.js';
14
14
  import { HEX_COLOR_PATTERN } from '../constants.js';
15
15
 
16
16
  export const getDefaultCellStyles = () => ({
@@ -112,7 +112,7 @@ export const getCellPropPanelSchema = (arg: {
112
112
  type: 'string',
113
113
  widget: 'color',
114
114
  props: {
115
- disabledAlpha: true
115
+ disabledAlpha: true,
116
116
  },
117
117
  rules: [{ pattern: HEX_COLOR_PATTERN, message: i18n('validation.hexColor') }],
118
118
  },
@@ -121,7 +121,7 @@ export const getCellPropPanelSchema = (arg: {
121
121
  type: 'string',
122
122
  widget: 'color',
123
123
  props: {
124
- disabledAlpha: true
124
+ disabledAlpha: true,
125
125
  },
126
126
  rules: [{ pattern: HEX_COLOR_PATTERN, message: i18n('validation.hexColor') }],
127
127
  },
@@ -130,7 +130,7 @@ export const getCellPropPanelSchema = (arg: {
130
130
  type: 'string',
131
131
  widget: 'color',
132
132
  props: {
133
- disabledAlpha: true
133
+ disabledAlpha: true,
134
134
  },
135
135
  rules: [{ pattern: HEX_COLOR_PATTERN, message: i18n('validation.hexColor') }],
136
136
  },
@@ -141,7 +141,7 @@ export const getCellPropPanelSchema = (arg: {
141
141
  type: 'string',
142
142
  widget: 'color',
143
143
  props: {
144
- disabledAlpha: true
144
+ disabledAlpha: true,
145
145
  },
146
146
  rules: [{ pattern: HEX_COLOR_PATTERN, message: i18n('validation.hexColor') }],
147
147
  },
@@ -194,7 +194,7 @@ export const getColumnStylesPropPanelSchema = ({
194
194
  },
195
195
  },
196
196
  }),
197
- {}
197
+ {},
198
198
  ),
199
199
  },
200
200
  });
@@ -208,7 +208,7 @@ export const getBody = (value: string | string[][]): string[][] => {
208
208
 
209
209
  export const getBodyWithRange = (
210
210
  value: string | string[][],
211
- range?: { start: number; end?: number | undefined }
211
+ range?: { start: number; end?: number | undefined },
212
212
  ) => {
213
213
  const body = getBody(value);
214
214
  if (!range) return body;
@@ -1,10 +1,10 @@
1
- import type { TableSchema } from './types';
1
+ import type { TableSchema } from './types.js';
2
2
  import type { PDFRenderProps } from '@pdfme/common';
3
- import { Cell, Table, Row, Column } from './classes';
4
- import { rectangle } from '../shapes/rectAndEllipse';
5
- import cell from './cell';
6
- import { getBodyWithRange } from './helper';
7
- import { createSingleTable } from './tableHelper';
3
+ import { Cell, Table, Row, Column } from './classes.js';
4
+ import { rectangle } from '../shapes/rectAndEllipse.js';
5
+ import cell from './cell.js';
6
+ import { getBodyWithRange } from './helper.js';
7
+ import { createSingleTable } from './tableHelper.js';
8
8
 
9
9
  type Pos = { x: number; y: number };
10
10
 
@@ -41,7 +41,7 @@ async function drawRow(
41
41
  table: Table,
42
42
  row: Row,
43
43
  cursor: Pos,
44
- columns: Column[]
44
+ columns: Column[],
45
45
  ) {
46
46
  cursor.x = table.settings.margin.left;
47
47
  for (const column of columns) {
@@ -65,7 +65,7 @@ async function drawTableBorder(
65
65
  arg: PDFRenderProps<TableSchema>,
66
66
  table: Table,
67
67
  startPos: Pos,
68
- cursor: Pos
68
+ cursor: Pos,
69
69
  ) {
70
70
  const lineWidth = table.settings.tableLineWidth;
71
71
  const lineColor = table.settings.tableLineColor;
@@ -112,7 +112,7 @@ export const pdfRender = async (arg: PDFRenderProps<TableSchema>) => {
112
112
 
113
113
  const body = getBodyWithRange(
114
114
  typeof value !== 'string' ? JSON.stringify(value || '[]') : value,
115
- schema.__bodyRange
115
+ schema.__bodyRange,
116
116
  );
117
117
  const table = await createSingleTable(body, arg);
118
118
  await drawTable(arg, table);
@@ -1,5 +1,5 @@
1
1
  import type { PropPanel } from '@pdfme/common';
2
- import type { TableSchema } from './types';
2
+ import type { TableSchema } from './types.js';
3
3
  import { getFallbackFontName, DEFAULT_FONT_NAME } from '@pdfme/common';
4
4
  import {
5
5
  getDefaultCellStyles,
@@ -15,8 +15,8 @@ import type {
15
15
  TableInput,
16
16
  StylesProps,
17
17
  Section,
18
- } from './types';
19
- import { Cell, Column, Row, Table } from './classes';
18
+ } from './types.js';
19
+ import { Cell, Column, Row, Table } from './classes.js';
20
20
 
21
21
  type StyleProp = 'styles' | 'headStyles' | 'bodyStyles' | 'alternateRowStyles' | 'columnStyles';
22
22
 
@@ -51,7 +51,7 @@ function parseSection(
51
51
  sectionRows: string[][],
52
52
  columns: Column[],
53
53
  styleProps: StylesProps,
54
- fallbackFontName: string
54
+ fallbackFontName: string,
55
55
  ): Row[] {
56
56
  const rowSpansLeftForColumn: { [key: string]: { left: number; times: number } } = {};
57
57
  const result = sectionRows.map((rawRow, rowIndex) => {
@@ -112,7 +112,7 @@ function cellStyles(
112
112
  column: Column,
113
113
  rowIndex: number,
114
114
  styles: StylesProps,
115
- fallbackFontName: string
115
+ fallbackFontName: string,
116
116
  ) {
117
117
  let sectionStyles;
118
118
  if (sectionName === 'head') {
@@ -167,23 +167,26 @@ function mapCellStyle(style: CellStyle): Partial<Styles> {
167
167
  function getTableOptions(schema: TableSchema, body: string[][]): UserOptions {
168
168
  const columnStylesWidth = schema.headWidthPercentages.reduce(
169
169
  (acc, cur, i) => ({ ...acc, [i]: { cellWidth: schema.width * (cur / 100) } }),
170
- {} as Record<number, Partial<Styles>>
170
+ {} as Record<number, Partial<Styles>>,
171
171
  );
172
172
 
173
173
  const columnStylesAlignment = Object.entries(schema.columnStyles.alignment || {}).reduce(
174
174
  (acc, [key, value]) => ({ ...acc, [key]: { alignment: value } }),
175
- {} as Record<number, Partial<Styles>>
175
+ {} as Record<number, Partial<Styles>>,
176
176
  );
177
177
 
178
178
  const allKeys = new Set([
179
179
  ...Object.keys(columnStylesWidth).map(Number),
180
180
  ...Object.keys(columnStylesAlignment).map(Number),
181
181
  ]);
182
- const columnStyles = Array.from(allKeys).reduce((acc, key) => {
183
- const widthStyle = columnStylesWidth[key] || {};
184
- const alignmentStyle = columnStylesAlignment[key] || {};
185
- return { ...acc, [key]: { ...widthStyle, ...alignmentStyle } };
186
- }, {} as Record<number, Partial<Styles>>);
182
+ const columnStyles = Array.from(allKeys).reduce(
183
+ (acc, key) => {
184
+ const widthStyle = columnStylesWidth[key] || {};
185
+ const alignmentStyle = columnStylesAlignment[key] || {};
186
+ return { ...acc, [key]: { ...widthStyle, ...alignmentStyle } };
187
+ },
188
+ {} as Record<number, Partial<Styles>>,
189
+ );
187
190
 
188
191
  return {
189
192
  head: [schema.head],
@@ -254,7 +257,7 @@ export function createSingleTable(body: string[][], args: CreateTableArgs) {
254
257
  'When specifying a custom PDF for basePdf, ' +
255
258
  'you cannot use features such as page breaks or re-layout of other elements.' +
256
259
  'To utilize these features, please define basePdf as follows:\n' +
257
- '{ width: number; height: number; padding: [number, number, number, number]; }'
260
+ '{ width: number; height: number; padding: [number, number, number, number]; }',
258
261
  );
259
262
  }
260
263
 
@@ -1,4 +1,4 @@
1
- import type { ALIGNMENT, VERTICAL_ALIGNMENT } from '../text/types';
1
+ import type { ALIGNMENT, VERTICAL_ALIGNMENT } from '../text/types.js';
2
2
  import type { Schema } from '@pdfme/common';
3
3
 
4
4
  export type Spacing = { top: number; right: number; bottom: number; left: number };
@@ -4,7 +4,7 @@ import { px2mm } from '@pdfme/common';
4
4
  import { createSingleTable } from './tableHelper.js';
5
5
  import { getBody, getBodyWithRange } from './helper.js';
6
6
  import cell from './cell.js';
7
- import { Row } from './classes';
7
+ import { Row } from './classes.js';
8
8
 
9
9
  const buttonSize = 30;
10
10
 
@@ -75,7 +75,7 @@ const calcResizedHeadWidthPercentages = (arg: {
75
75
  const setBorder = (
76
76
  div: HTMLDivElement,
77
77
  borderPosition: 'Top' | 'Left' | 'Right' | 'Bottom',
78
- arg: UIRenderProps<TableSchema>
78
+ arg: UIRenderProps<TableSchema>,
79
79
  ) => {
80
80
  div.style[`border${borderPosition}`] = `${String(arg.schema.tableStyles.borderWidth)}mm solid ${
81
81
  arg.schema.tableStyles.borderColor
@@ -88,7 +88,7 @@ const drawBorder = (
88
88
  colIndex: number,
89
89
  rowIndex: number,
90
90
  rowsLength: number,
91
- arg: UIRenderProps<TableSchema>
91
+ arg: UIRenderProps<TableSchema>,
92
92
  ) => {
93
93
  const isFirstColumn = colIndex === 0;
94
94
  const isLastColumn = colIndex === Object.values(row.cells).length - 1;
@@ -213,7 +213,7 @@ export const uiRender = async (arg: UIRenderProps<TableSchema>) => {
213
213
 
214
214
  const handleChangeEditingPosition = (
215
215
  newPosition: { rowIndex: number; colIndex: number },
216
- editingPosition: { rowIndex: number; colIndex: number }
216
+ editingPosition: { rowIndex: number; colIndex: number },
217
217
  ) => {
218
218
  resetEditingPosition();
219
219
  editingPosition.rowIndex = newPosition.rowIndex;
@@ -296,7 +296,7 @@ export const uiRender = async (arg: UIRenderProps<TableSchema>) => {
296
296
  const newColumnWidthPercentage = 25;
297
297
  const totalCurrentWidth = schema.headWidthPercentages.reduce(
298
298
  (acc, width) => acc + width,
299
- 0
299
+ 0,
300
300
  );
301
301
  const scalingRatio = (100 - newColumnWidthPercentage) / totalCurrentWidth;
302
302
  const scaledWidths = schema.headWidthPercentages.map((width) => width * scalingRatio);
@@ -329,7 +329,7 @@ export const uiRender = async (arg: UIRenderProps<TableSchema>) => {
329
329
  onClick: () => {
330
330
  const totalWidthMinusRemoved = schema.headWidthPercentages.reduce(
331
331
  (sum, width, j) => (j !== i ? sum + width : sum),
332
- 0
332
+ 0,
333
333
  );
334
334
 
335
335
  // TODO Should also remove the deleted columnStyles when deleting
@@ -1,4 +1,4 @@
1
- import { ALIGNMENT, VERTICAL_ALIGNMENT, DYNAMIC_FONT_SIZE_FIT } from './types';
1
+ import { ALIGNMENT, VERTICAL_ALIGNMENT, DYNAMIC_FONT_SIZE_FIT } from './types.js';
2
2
 
3
3
  export const DEFAULT_FONT_SIZE = 13;
4
4
 
@@ -9,7 +9,7 @@ import {
9
9
  TextVerticalAlignBottomIcon,
10
10
  TextVerticalAlignMiddleIcon,
11
11
  TextVerticalAlignTopIcon,
12
- } from './icons';
12
+ } from './icons/index.js';
13
13
  import {
14
14
  ALIGN_CENTER,
15
15
  ALIGN_RIGHT,
@@ -18,7 +18,7 @@ import {
18
18
  VERTICAL_ALIGN_BOTTOM,
19
19
  VERTICAL_ALIGN_MIDDLE,
20
20
  ALIGN_JUSTIFY,
21
- } from './constants';
21
+ } from './constants.js';
22
22
 
23
23
  export enum Formatter {
24
24
  STRIKETHROUGH = 'strikethrough',
@@ -11,7 +11,7 @@ import {
11
11
  DEFAULT_FONT_NAME,
12
12
  } from '@pdfme/common';
13
13
  import { Buffer } from 'buffer';
14
- import type { TextSchema, FontWidthCalcValues } from './types';
14
+ import type { TextSchema, FontWidthCalcValues } from './types.js';
15
15
  import {
16
16
  DEFAULT_FONT_SIZE,
17
17
  DEFAULT_CHARACTER_SPACING,
@@ -29,7 +29,7 @@ export const getBrowserVerticalFontAdjustments = (
29
29
  fontKitFont: FontKitFont,
30
30
  fontSize: number,
31
31
  lineHeight: number,
32
- verticalAlignment: string
32
+ verticalAlignment: string,
33
33
  ) => {
34
34
  const { ascent, descent, unitsPerEm } = fontKitFont;
35
35
 
@@ -92,7 +92,7 @@ export const widthOfTextAtSize = (
92
92
  text: string,
93
93
  fontKitFont: FontKitFont,
94
94
  fontSize: number,
95
- characterSpacing: number
95
+ characterSpacing: number,
96
96
  ) => {
97
97
  const { glyphs } = fontKitFont.layout(text);
98
98
  const scale = 1000 / fontKitFont.unitsPerEm;
@@ -112,7 +112,7 @@ const getCacheKey = (fontName: string) => `getFontKitFont-${fontName}`;
112
112
  export const getFontKitFont = async (
113
113
  fontName: string | undefined,
114
114
  font: Font,
115
- _cache: Map<any, any>
115
+ _cache: Map<any, any>,
116
116
  ) => {
117
117
  const fntNm = fontName || getFallbackFontName(font);
118
118
  const cacheKey = getCacheKey(fntNm);
@@ -129,7 +129,7 @@ export const getFontKitFont = async (
129
129
  }
130
130
 
131
131
  const fontKitFont = fontkit.create(
132
- fontData instanceof Buffer ? fontData : Buffer.from(fontData as ArrayBuffer)
132
+ fontData instanceof Buffer ? fontData : Buffer.from(fontData as ArrayBuffer),
133
133
  ) as fontkit.Font;
134
134
  _cache.set(cacheKey, fontKitFont);
135
135
 
@@ -281,7 +281,7 @@ export const calculateDynamicFontSize = ({
281
281
  line.replace('\n', ''),
282
282
  fontKitFont,
283
283
  size,
284
- characterSpacing
284
+ characterSpacing,
285
285
  );
286
286
  const textWidthInMm = pt2mm(textWidth);
287
287
  totalWidthInMm = Math.max(totalWidthInMm, textWidthInMm);
package/src/text/index.ts CHANGED
@@ -2,7 +2,7 @@ import type { Plugin } from '@pdfme/common';
2
2
  import { pdfRender } from './pdfRender.js';
3
3
  import { propPanel } from './propPanel.js';
4
4
  import { uiRender } from './uiRender.js';
5
- import type { TextSchema } from './types';
5
+ import type { TextSchema } from './types.js';
6
6
  import { TextCursorInput } from 'lucide';
7
7
  import { createSvgStr } from '../utils.js';
8
8
 
@@ -1,6 +1,6 @@
1
1
  import { PDFFont, PDFDocument } from '@pdfme/pdf-lib';
2
2
  import type { Font as FontKitFont } from 'fontkit';
3
- import type { TextSchema } from './types';
3
+ import type { TextSchema } from './types.js';
4
4
  import {
5
5
  PDFRenderProps,
6
6
  ColorType,
@@ -49,12 +49,12 @@ const embedAndGetFontObj = async (arg: {
49
49
  return pdfDoc.embedFont(fontData, {
50
50
  subset: typeof v.subset === 'undefined' ? true : v.subset,
51
51
  });
52
- })
52
+ }),
53
53
  );
54
54
 
55
55
  const fontObj = Object.keys(font).reduce(
56
56
  (acc, cur, i) => Object.assign(acc, { [cur]: fontValues[i] }),
57
- {} as { [key: string]: PDFFont }
57
+ {} as { [key: string]: PDFFont },
58
58
  );
59
59
 
60
60
  _cache.set(pdfDoc, fontObj);
@@ -74,7 +74,7 @@ const getFontProp = ({
74
74
  }) => {
75
75
  const fontSize = schema.dynamicFontSize
76
76
  ? calculateDynamicFontSize({ textSchema: schema, fontKitFont, value })
77
- : schema.fontSize ?? DEFAULT_FONT_SIZE;
77
+ : (schema.fontSize ?? DEFAULT_FONT_SIZE);
78
78
  const color = hex2PrintingColor(schema.fontColor || DEFAULT_FONT_COLOR, colorType);
79
79
 
80
80
  return {
@@ -5,7 +5,7 @@ import {
5
5
  PropPanelSchema,
6
6
  getFallbackFontName,
7
7
  } from '@pdfme/common';
8
- import type { TextSchema } from './types';
8
+ import type { TextSchema } from './types.js';
9
9
  import {
10
10
  DEFAULT_FONT_SIZE,
11
11
  DEFAULT_ALIGNMENT,
@@ -20,7 +20,7 @@ import {
20
20
  DEFAULT_DYNAMIC_MAX_FONT_SIZE,
21
21
  } from './constants.js';
22
22
  import { DEFAULT_OPACITY, HEX_COLOR_PATTERN } from '../constants.js';
23
- import { getExtraFormatterSchema } from './extraFormatter';
23
+ import { getExtraFormatterSchema } from './extraFormatter.js';
24
24
 
25
25
  const UseDynamicFontSize = (props: PropPanelWidgetProps) => {
26
26
  const { rootElement, changeSchemas, activeSchema, i18n } = props;
@@ -1,7 +1,7 @@
1
1
  import type * as CSS from 'csstype';
2
2
  import type { Font as FontKitFont } from 'fontkit';
3
3
  import { UIRenderProps, getDefaultFont } from '@pdfme/common';
4
- import type { TextSchema } from './types';
4
+ import type { TextSchema } from './types.js';
5
5
  import {
6
6
  DEFAULT_FONT_SIZE,
7
7
  DEFAULT_ALIGNMENT,
@@ -70,7 +70,11 @@ export const uiRender = async (arg: UIRenderProps<TextSchema>) => {
70
70
  };
71
71
  const font = options?.font || getDefaultFont();
72
72
  const fontKitFont = await getFontKitFont(schema.fontName, font, _cache);
73
- const textBlock = buildStyledTextContainer(arg, fontKitFont, usePlaceholder ? placeholder : value);
73
+ const textBlock = buildStyledTextContainer(
74
+ arg,
75
+ fontKitFont,
76
+ usePlaceholder ? placeholder : value,
77
+ );
74
78
 
75
79
  const processedText = replaceUnsupportedChars(value, fontKitFont);
76
80
 
@@ -82,7 +86,7 @@ export const uiRender = async (arg: UIRenderProps<TextSchema>) => {
82
86
  (l, i) =>
83
87
  `<span style="letter-spacing:${
84
88
  String(value).length === i + 1 ? 0 : 'inherit'
85
- };">${l}</span>`
89
+ };">${l}</span>`,
86
90
  )
87
91
  .join('');
88
92
  return;
@@ -115,7 +119,7 @@ export const uiRender = async (arg: UIRenderProps<TextSchema>) => {
115
119
  fontKitFont,
116
120
  dynamicFontSize ?? schema.fontSize ?? DEFAULT_FONT_SIZE,
117
121
  schema.lineHeight ?? DEFAULT_LINE_HEIGHT,
118
- schema.verticalAlignment ?? DEFAULT_VERTICAL_ALIGNMENT
122
+ schema.verticalAlignment ?? DEFAULT_VERTICAL_ALIGNMENT,
119
123
  );
120
124
  textBlock.style.paddingTop = `${newTopAdj}px`;
121
125
  textBlock.style.marginBottom = `${newBottomAdj}px`;
@@ -150,7 +154,11 @@ export const uiRender = async (arg: UIRenderProps<TextSchema>) => {
150
154
  }
151
155
  };
152
156
 
153
- export const buildStyledTextContainer = (arg: UIRenderProps<TextSchema>, fontKitFont: FontKitFont, value: string) => {
157
+ export const buildStyledTextContainer = (
158
+ arg: UIRenderProps<TextSchema>,
159
+ fontKitFont: FontKitFont,
160
+ value: string,
161
+ ) => {
154
162
  const { schema, rootElement, mode, options, _cache } = arg;
155
163
  const font = options?.font || getDefaultFont();
156
164
 
@@ -171,7 +179,7 @@ export const buildStyledTextContainer = (arg: UIRenderProps<TextSchema>, fontKit
171
179
  fontKitFont,
172
180
  dynamicFontSize ?? schema.fontSize ?? DEFAULT_FONT_SIZE,
173
181
  schema.lineHeight ?? DEFAULT_LINE_HEIGHT,
174
- schema.verticalAlignment ?? DEFAULT_VERTICAL_ALIGNMENT
182
+ schema.verticalAlignment ?? DEFAULT_VERTICAL_ALIGNMENT,
175
183
  );
176
184
 
177
185
  const topAdjustment = topAdj.toString();
package/src/utils.ts CHANGED
@@ -45,7 +45,7 @@ export const convertForPdfLayoutProps = ({
45
45
  export const rotatePoint = (
46
46
  point: { x: number; y: number },
47
47
  pivot: { x: number; y: number },
48
- angleDegrees: number
48
+ angleDegrees: number,
49
49
  ): { x: number; y: number } => {
50
50
  const angleRadians = degreesToRadians(angleDegrees);
51
51
 
@@ -148,10 +148,8 @@ const hex2CmykColor = (hexString: string | undefined) => {
148
148
 
149
149
  export const hex2PrintingColor = (color?: string | Color, colorType?: ColorType) => {
150
150
  // if color is already CMYK, RGB or Grayscale, does not required to convert
151
- if (typeof color === 'object') return color
152
- return colorType?.toLowerCase() == 'cmyk'
153
- ? hex2CmykColor(color)
154
- : hex2RgbColor(color);
151
+ if (typeof color === 'object') return color;
152
+ return colorType?.toLowerCase() == 'cmyk' ? hex2CmykColor(color) : hex2RgbColor(color);
155
153
  };
156
154
 
157
155
  export const readFile = (input: File | FileList | null): Promise<string | ArrayBuffer> =>
@@ -212,21 +210,68 @@ export const createErrorElm = () => {
212
210
  };
213
211
 
214
212
  export const createSvgStr = (icon: IconNode, attrs?: Record<string, string>): string => {
215
- const createElementString = (node: IconNode): string => {
216
- const [tag, attributes, children = []] = node;
213
+ // In lucide 0.475.0, the icon is an array of elements, not a single SVG element
214
+ // We need to create an SVG wrapper and add the elements as children
217
215
 
218
- const mergedAttributes = tag === 'svg' ? { ...attributes, ...attrs } : attributes;
216
+ // Handle non-array input
217
+ if (!Array.isArray(icon)) {
218
+ return String(icon);
219
+ }
220
+
221
+ // Create default SVG attributes
222
+ const svgAttrs = {
223
+ xmlns: 'http://www.w3.org/2000/svg',
224
+ width: '24',
225
+ height: '24',
226
+ viewBox: '0 0 24 24',
227
+ fill: 'none',
228
+ stroke: 'currentColor',
229
+ 'stroke-width': '2',
230
+ 'stroke-linecap': 'round',
231
+ 'stroke-linejoin': 'round',
232
+ ...(attrs || {}),
233
+ };
234
+
235
+ // Format SVG attributes string
236
+ const svgAttrString = Object.entries(svgAttrs)
237
+ .map(([key, value]) => `${key}="${value}"`)
238
+ .join(' ');
239
+
240
+ // Helper function to process a single element
241
+ const processElement = (element: any): string => {
242
+ if (!Array.isArray(element)) {
243
+ return String(element);
244
+ }
245
+
246
+ const [tag, attributes = {}, children = []] = element;
247
+ const tagName = String(tag);
219
248
 
220
- const attrString = Object.entries(mergedAttributes)
249
+ // Format attributes string
250
+ const attrString = Object.entries(attributes)
221
251
  .map(([key, value]) => `${key}="${value}"`)
222
252
  .join(' ');
223
253
 
224
- const childrenString = children
225
- .map((child) => createElementString(child))
226
- .join('');
254
+ // Process children recursively
255
+ let childrenString = '';
227
256
 
228
- return `<${tag} ${attrString}>${childrenString}</${tag}>`;
257
+ if (Array.isArray(children) && children.length > 0) {
258
+ childrenString = children.map((child) => processElement(child)).join('');
259
+ }
260
+
261
+ // Return properly formatted element string
262
+ if (childrenString) {
263
+ return `<${tagName}${attrString ? ' ' + attrString : ''}>${childrenString}</${tagName}>`;
264
+ } else {
265
+ // Self-closing tag for empty children
266
+ return `<${tagName}${attrString ? ' ' + attrString : ''}/>`;
267
+ }
229
268
  };
230
269
 
231
- return createElementString(icon);
232
- };
270
+ // Process all elements and join them
271
+ const elementsString = Array.isArray(icon)
272
+ ? icon.map((element) => processElement(element)).join('')
273
+ : processElement(icon);
274
+
275
+ // Return the complete SVG string
276
+ return `<svg ${svgAttrString}>${elementsString}</svg>`;
277
+ };
package/tsconfig.cjs.json CHANGED
@@ -7,4 +7,4 @@
7
7
  "declarationDir": "dist/types",
8
8
  "skipLibCheck": true
9
9
  }
10
- }
10
+ }
package/tsconfig.esm.json CHANGED
@@ -2,9 +2,10 @@
2
2
  "extends": "../../tsconfig.base",
3
3
  "compilerOptions": {
4
4
  "module": "ESNext",
5
+ "moduleResolution": "bundler",
5
6
  "outDir": "./dist/esm",
6
7
  "declaration": true,
7
8
  "declarationDir": "dist/types",
8
9
  "skipLibCheck": true
9
10
  }
10
- }
11
+ }
@@ -2,9 +2,10 @@
2
2
  "extends": "../../tsconfig.base",
3
3
  "compilerOptions": {
4
4
  "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
5
6
  "outDir": "./dist/node",
6
7
  "declaration": true,
7
8
  "declarationDir": "dist/types",
8
9
  "skipLibCheck": true
9
10
  }
10
- }
11
+ }
package/.eslintrc.cjs DELETED
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- extends: ['../../eslint.base.js'],
3
- };