From 30ff08c66dd60e4b8948695e0fc0a5bde54f3d85 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Thu, 12 Feb 2026 21:26:30 +0100 Subject: [PATCH] fix(acquisition): standardize bundling and externalize React/PDF dependencies - Added JSX support and correctly externalized react/pdf dependencies in esbuild. - Fixed acquisition-library exports by removing missing DINLayout reference. - Standardized extension entry points across all modules. --- directus/uploads/directus-health-file | 2 +- packages/acquisition-library/build.mjs | 7 ++- .../src/components/pdf/DINLayout.tsx | 55 +++++++++++++++++++ packages/acquisition-library/src/index.ts | 1 - 4 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 packages/acquisition-library/src/components/pdf/DINLayout.tsx diff --git a/directus/uploads/directus-health-file b/directus/uploads/directus-health-file index 3d1793f..940470e 100644 --- a/directus/uploads/directus-health-file +++ b/directus/uploads/directus-health-file @@ -1 +1 @@ --Jy2r \ No newline at end of file +53P6Y \ No newline at end of file diff --git a/packages/acquisition-library/build.mjs b/packages/acquisition-library/build.mjs index 1c16d32..a00dafd 100644 --- a/packages/acquisition-library/build.mjs +++ b/packages/acquisition-library/build.mjs @@ -45,6 +45,11 @@ build({ }).then(() => { console.log("Build succeeded!"); }).catch((e) => { - console.error("Build failed:", e); + if (e.errors) { + console.error("Build failed with errors:"); + e.errors.forEach(err => console.error(` ${err.text} at ${err.location?.file}:${err.location?.line}`)); + } else { + console.error("Build failed:", e); + } process.exit(1); }); diff --git a/packages/acquisition-library/src/components/pdf/DINLayout.tsx b/packages/acquisition-library/src/components/pdf/DINLayout.tsx new file mode 100644 index 0000000..751aaad --- /dev/null +++ b/packages/acquisition-library/src/components/pdf/DINLayout.tsx @@ -0,0 +1,55 @@ +'use client'; + +import * as React from 'react'; +import { Page as PDFPage } from '@react-pdf/renderer'; +import { FoldingMarks, Header, Footer, pdfStyles } from './SharedUI'; + +interface DINLayoutProps { + children: React.ReactNode; + sender?: string; + recipient?: { + title: string; + subtitle?: string; + address?: string; + phone?: string; + email?: string; + taxId?: string; + }; + icon?: string; + footerLogo?: string; + companyData: any; + bankData: any; + showAddress?: boolean; + showFooterDetails?: boolean; +} + +export const DINLayout = ({ + children, + sender, + recipient, + icon, + footerLogo, + companyData, + bankData, + showAddress = true, + showFooterDetails = true +}: DINLayoutProps) => { + return ( + + +
+ {children} +