Free & Open-Source Invoice Generator - No Sign-Up, No Ads, Instant PDF Export, 100% In-Browser, and Fully Customizable Templates.
TypeScript fintechinvoiceinvoice-generatorinvoice-pdfinvoice-templateinvoicesnextjsopen-sourcequotesreactreact-pdf-rendererself-hostedshadcn-uitailwindcsstypescript
feat: stripe invoice template, new CTA toasts, cleanup landing page + other improvements (#118)
Vlad Sazonau205f9bc234b9
diff --git a/.env.example b/.env.examplenew file mode 100644index 0000000..855ffc4--- /dev/null+++ b/.env.example@@ -0,0 +1,48 @@+# run `cp .env.example .env.local`++# for server side+SENTRY_ENABLED="false"+# for client side+NEXT_PUBLIC_SENTRY_ENABLED="false"++NEXT_PUBLIC_SENTRY_DSN=""++# Resend (For emails) Create account and paste API keys in .env.local+RESEND_API_KEY=""+RESEND_AUDIENCE_ID=""++# Upstash Redis (For subscription tokens) Create account and paste API keys in .env.local+UPSTASH_REDIS_REST_URL=""+UPSTASH_REDIS_REST_TOKEN=""++# Used for /api+AUTH_TOKEN=""++# Personal Info for sending Invoice via Email++# Sellet Info+SELLER_NAME="Adam Smith"+SELLER_ADDRESS="London, UK"+SELLER_VAT_NO="12345"+SELLER_EMAIL="[email protected]"+SELLER_ACCOUNT_NUMBER="12345"+SELLER_SWIFT_BIC="12345"++# Buyer Information+BUYER_NAME="Random Company"+BUYER_ADDRESS="Bristol, UK"+BUYER_VAT_NO="12345"+BUYER_EMAIL="[email protected]"++INVOICE_NET_PRICE="10000"+INVOICE_EMAIL_RECIPIENT="[email protected]"+INVOICE_EMAIL_COMPANY_TO="[email protected]"++# Telegram notifications+TELEGRAM_BOT_TOKEN=""+TELEGRAM_CHAT_ID=""++# Google drive api+GOOGLE_DRIVE_CLIENT_EMAIL="[email protected]"+GOOGLE_DRIVE_PRIVATE_KEY=""+GOOGLE_DRIVE_PARENT_FOLDER_ID=""\ No newline at end of filediff --git a/README.md b/README.mdindex 34b03a1..39baaaf 100644--- a/README.md+++ b/README.md@@ -36,9 +36,22 @@ https://github.com/user-attachments/assets/9e3194e0-3072-4c95-ae99-e66db1301dc6- Generate beautiful OG images: https://og.new- Analytics: https://umami.is/-<!-- GitAds-Verify: JHXPD28PWARXHPOAHBA7ZTVRIFBKGZPE -->+## Quick Start++- Run `pnpm i`+- Copy `.env.example to .env.local` (`cp .env.example .env.local`)+- Run `pnpm run dev`++For the full app experience, you’ll need to obtain and set values from the following services:++- [Resend](https://resend.com/)+- [Upstash](https://upstash.com/)+- [Google Drive API](https://developers.google.com/workspace/drive/api/quickstart/js)+- [Telegram Bot API](https://core.telegram.org/bots)## GitAds Sponsored++<!-- GitAds-Verify: JHXPD28PWARXHPOAHBA7ZTVRIFBKGZPE -->+Ads help support this project 🙏[](https://gitads.dev/v1/ad-track?source=vladsez/easy-invoice-pdf@github)-diff --git a/e2e/about.test.ts b/e2e/about.test.tsindex 85f548d..6bbf8d6 100644--- a/e2e/about.test.ts+++ b/e2e/about.test.ts@@ -1,4 +1,9 @@-import { STATIC_ASSETS_URL, VIDEO_DEMO_URL } from "@/config";+import {+ GITHUB_URL,+ STATIC_ASSETS_URL,+ TWITTER_URL,+ VIDEO_DEMO_URL,+} from "@/config";import { test, expect } from "@playwright/test";test.describe("About page", () => {@@ -14,8 +19,11 @@ test.describe("About page", () => {const header = page.getByRole("banner");// Check header elements- await expect(header.getByText("EasyInvoicePDF.com")).toBeVisible();- const goToAppButton = header.getByRole("link", { name: "Go to app" });+ await expect(header.getByText("EasyInvoicePDF")).toBeVisible();+ const goToAppButton = header.getByRole("link", {+ name: "Go to app",+ exact: true,+ });await expect(goToAppButton).toBeVisible();// Check Hero section@@ -26,6 +34,7 @@ test.describe("About page", () => {heroSection.getByRole("heading", {level: 1,name: "Create professional invoices in seconds",+ exact: true,})).toBeVisible();@@ -71,6 +80,7 @@ test.describe("About page", () => {featuresSection.getByRole("heading", {level: 2,name: "Everything you need for professional invoicing",+ exact: true,})).toBeVisible();@@ -92,6 +102,7 @@ test.describe("About page", () => {faqSection.getByRole("heading", {level: 2,name: "Frequently Asked Questions",+ exact: true,})).toBeVisible();@@ -106,6 +117,7 @@ test.describe("About page", () => {subscribeFormSection.getByRole("heading", {level: 2,name: "Subscribe to our newsletter",+ exact: true,})).toBeVisible();@@ -131,6 +143,7 @@ test.describe("About page", () => {const subscribeFormButton = subscribeForm.getByRole("button", {name: "Subscribe",+ exact: true,});await expect(subscribeFormButton).toBeVisible();@@ -140,30 +153,25 @@ test.describe("About page", () => {const footer = page.getByRole("contentinfo");await expect(footer).toBeVisible();- const footerSocialLinks = footer.getByTestId(- "about-page-footer-social-links"- );+ // check footer social logos first+ const footerSocialLinks = footer.getByTestId("footer-logos-social-links");const githubSocialLink = footerSocialLinks.getByRole("link", {name: "GitHub",+ exact: true,});await expect(githubSocialLink).toBeVisible();- await expect(githubSocialLink).toHaveAttribute(- "href",- "https://github.com/VladSez/easy-invoice-pdf"- );+ await expect(githubSocialLink).toHaveAttribute("href", GITHUB_URL);await expect(githubSocialLink).toHaveAttribute("target", "_blank");const twitterSocialLink = footerSocialLinks.getByRole("link", {name: "Twitter",+ exact: true,});await expect(twitterSocialLink).toBeVisible();- await expect(twitterSocialLink).toHaveAttribute(- "href",- "https://x.com/vlad_sazon"- );+ await expect(twitterSocialLink).toHaveAttribute("href", TWITTER_URL);await expect(twitterSocialLink).toHaveAttribute("target", "_blank");// Check newsletter subscription form@@ -184,7 +192,8 @@ test.describe("About page", () => {newsletterForm.getByRole("button", { name: "Subscribe" })).toBeVisible();- const footerLinks = footer.getByTestId("about-page-footer-links");+ // now check all the rest of the footer links+ const footerLinks = footer.getByTestId("footer-social-links");const appLink = footerLinks.getByRole("link", { name: "App" });@@ -194,6 +203,7 @@ test.describe("About page", () => {const featuresLink = footerLinks.getByRole("link", {name: "Features",+ exact: true,});await expect(featuresLink).toBeVisible();@@ -202,14 +212,25 @@ test.describe("About page", () => {const faqLink = footerLinks.getByRole("link", {name: "FAQ",+ exact: true,});await expect(faqLink).toBeVisible();await expect(faqLink).toHaveAttribute("href", "#faq");await expect(faqLink).not.toHaveAttribute("target", "_blank");+ const changelogLink = footerLinks.getByRole("link", {+ name: "Changelog",+ exact: true,+ });++ await expect(changelogLink).toBeVisible();+ await expect(changelogLink).toHaveAttribute("href", "/changelog");+ await expect(changelogLink).not.toHaveAttribute("target", "_blank");+const shareFeedbackLink = footerLinks.getByRole("link", {name: "Share feedback",+ exact: true,});await expect(shareFeedbackLink).toBeVisible();@@ -221,13 +242,11 @@ test.describe("About page", () => {const githubLink = footerLinks.getByRole("link", {name: "GitHub",+ exact: true,});await expect(githubLink).toBeVisible();- await expect(githubLink).toHaveAttribute(- "href",- "https://github.com/VladSez/easy-invoice-pdf"- );+ await expect(githubLink).toHaveAttribute("href", GITHUB_URL);await expect(githubLink).toHaveAttribute("target", "_blank");});@@ -239,9 +258,10 @@ test.describe("About page", () => {const header = page.getByRole("banner");// Check header elements in French- await expect(header.getByText("EasyInvoicePDF.com")).toBeVisible();+ await expect(header.getByText("EasyInvoicePDF")).toBeVisible();const goToAppButton = header.getByRole("link", {name: "Aller à l'application",+ exact: true,});await expect(goToAppButton).toBeVisible();@@ -253,12 +273,13 @@ test.describe("About page", () => {heroSection.getByRole("heading", {level: 1,name: "Créez des factures professionnelles en quelques secondes",+ exact: true,})).toBeVisible();await expect(heroSection.getByText(- "EasyInvoicePDF est un outil gratuit et open-source qui vous permet de créer, personnaliser et télécharger des factures professionelles avec aperçu en temps réel."+ "EasyInvoicePDF est un outil gratuit et open-source qui vous permet de créer, personnaliser et télécharger des factures professionnelles avec aperçu en temps réel. Fonctionne entièrement dans votre navigateur.")).toBeVisible();@@ -284,6 +305,7 @@ test.describe("About page", () => {featuresSection.getByRole("heading", {level: 2,name: "Tout ce dont vous avez besoin pour une facturation professionnelle",+ exact: true,})).toBeVisible();@@ -295,6 +317,7 @@ test.describe("About page", () => {subscribeFormSection.getByRole("heading", {level: 2,name: "Abonnez-vous à notre newsletter",+ exact: true,})).toBeVisible();@@ -322,12 +345,15 @@ test.describe("About page", () => {newsletterForm.getByPlaceholder("Entrez votre email")).toBeVisible();await expect(- newsletterForm.getByRole("button", { name: "S'abonner" })+ newsletterForm.getByRole("button", { name: "S'abonner", exact: true })).toBeVisible();- const footerLinks = footer.getByTestId("about-page-footer-links");+ const footerLinks = footer.getByTestId("footer-social-links");- const appLink = footerLinks.getByRole("link", { name: "App" });+ const appLink = footerLinks.getByRole("link", {+ name: "Application",+ exact: true,+ });await expect(appLink).toBeVisible();await expect(appLink).toHaveAttribute("href", "/");@@ -335,10 +361,12 @@ test.describe("About page", () => {const featuresLink = footerLinks.getByRole("link", {name: "Fonctionnalités",+ exact: true,});await expect(featuresLink).toBeVisible();await expect(featuresLink).toHaveAttribute("href", "#features");+ await expect(featuresLink).not.toHaveAttribute("target", "_blank");});test("should display about page content in German", async ({ page }) => {@@ -349,8 +377,11 @@ test.describe("About page", () => {const header = page.getByRole("banner");// Check header elements in German- await expect(header.getByText("EasyInvoicePDF.com")).toBeVisible();- const goToAppButton = header.getByRole("link", { name: "Zur App" });+ await expect(header.getByText("EasyInvoicePDF")).toBeVisible();+ const goToAppButton = header.getByRole("link", {+ name: "Zur App gehen",+ exact: true,+ });await expect(goToAppButton).toBeVisible();// Check Hero section in German@@ -361,6 +392,7 @@ test.describe("About page", () => {heroSection.getByRole("heading", {level: 1,name: "Erstellen Sie professionelle Rechnungen in Sekunden",+ exact: true,})).toBeVisible();@@ -392,6 +424,7 @@ test.describe("About page", () => {featuresSection.getByRole("heading", {level: 2,name: "Alles, was Sie für professionelle Rechnungsstellung brauchen",+ exact: true,})).toBeVisible();@@ -411,12 +444,12 @@ test.describe("About page", () => {newsletterForm.getByPlaceholder("E-Mail eingeben")).toBeVisible();await expect(- newsletterForm.getByRole("button", { name: "Abonnieren" })+ newsletterForm.getByRole("button", { name: "Abonnieren", exact: true })).toBeVisible();- const footerLinks = footer.getByTestId("about-page-footer-links");+ const footerLinks = footer.getByTestId("footer-social-links");await expect(- footerLinks.getByRole("link", { name: "Funktionen" })+ footerLinks.getByRole("link", { name: "Funktionen", exact: true })).toBeVisible();});@@ -426,12 +459,17 @@ test.describe("About page", () => {await expect(page).toHaveURL("/en/about");// Switch to French- await page.getByRole("button", { name: "Switch language" }).click();+ await page+ .getByRole("button", { name: "Switch language", exact: true })+ .click();await page.getByText("Français").click();const header = page.getByRole("banner");await expect(- header.getByRole("link", { name: "Aller à l'application" })+ header.getByRole("link", {+ name: "Aller à l'application",+ exact: true,+ })).toBeVisible();await expect(page).toHaveURL("/fr/about");});@@ -444,7 +482,10 @@ test.describe("About page", () => {// Click the Go to App button in headerconst header = page.getByRole("banner");- const headerGoToAppButton = header.getByRole("link", { name: "Go to app" });+ const headerGoToAppButton = header.getByRole("link", {+ name: "Go to app",+ exact: true,+ });await headerGoToAppButton.click();await expect(page).toHaveURL("/");diff --git a/e2e/changelog.test.ts b/e2e/changelog.test.tsnew file mode 100644index 0000000..38940cb--- /dev/null+++ b/e2e/changelog.test.ts@@ -0,0 +1,161 @@+import { test, expect } from "@playwright/test";++test.describe("Changelog page", () => {+ test("should display changelog page content", async ({ page }) => {+ await page.goto("/changelog");++ // Verify the page is loaded+ await expect(page).toHaveURL("/changelog");++ // Check main heading+ await expect(+ page.getByRole("heading", {+ level: 1,+ name: "Changelog",+ exact: true,+ })+ ).toBeVisible();++ // Check subtitle+ await expect(+ page.getByText(+ "All the latest updates, improvements, and fixes to EasyInvoicePDF"+ )+ ).toBeVisible();++ // Check that changelog entries are present+ const entryCards = page.locator('[data-testid="changelog-entry-card"]');++ // At least one entry should be visible+ await expect(entryCards.first()).toBeVisible();+ });++ test("should navigate to individual changelog entry", async ({ page }) => {+ await page.goto("/changelog");++ // Find and click on the first changelog entry title link+ // Find first changelog entry link and get its href+ const firstEntryLink = page+ .getByRole("link")+ .filter({ has: page.getByRole("heading", { level: 2 }) })+ .first();++ await firstEntryLink.waitFor({ state: "visible" });+ const href = await firstEntryLink.getAttribute("href");+ await firstEntryLink.click();++ // Verify we navigated to the individual entry page+ await expect(page).toHaveURL(href!);++ // Check that we're on an individual entry page by looking for "Back to All Posts" link+ await expect(+ page.getByRole("link", { name: "Back to All Posts" })+ ).toBeVisible();+ });++ test("should display individual changelog entry content", async ({+ page,+ }) => {+ // Navigate to changelog and then to first entry+ await page.goto("/changelog");++ // Find and click on the first changelog entry title link+ // Find first changelog entry link and get its href+ const firstEntryLink = page+ .getByRole("link")+ .filter({ has: page.getByRole("heading", { level: 2 }) })+ .first();++ await firstEntryLink.waitFor({ state: "visible" });+ const href = await firstEntryLink.getAttribute("href");+ await firstEntryLink.click();++ // Verify we navigated to the individual entry page+ await expect(page).toHaveURL(href!);++ // Check "Back to All Posts" navigation link+ const backLink = page.getByRole("link", { name: "Back to All Posts" });+ await expect(backLink).toBeVisible();+ await expect(backLink).toHaveAttribute("href", "/changelog");++ // Check that the entry has a title (h1)+ const entryTitle = page.locator("h1").first();+ await expect(entryTitle).toBeVisible();++ // Check author information+ await expect(page.getByTestId("author-info-text")).toHaveText(+ "Vlad SazonauFounder, EasyInvoicePDF"+ );+ await expect(page.getByTestId("author-info-img")).toBeVisible();++ // Check social sharing buttons are present+ const twitterShareLink = page.locator(+ 'a[href*="twitter.com/intent/tweet"]'+ );+ await expect(twitterShareLink).toBeVisible();++ const linkedinShareLink = page.locator(+ 'a[href*="linkedin.com/shareArticle"]'+ );+ await expect(linkedinShareLink).toBeVisible();++ // Check "Go to App" CTA button+ const goToAppButtonContainer = page.getByTestId(+ "go-to-app-button-container"+ );++ const goToAppButton = goToAppButtonContainer.getByRole("link");+ await expect(goToAppButton).toBeVisible();+ await expect(goToAppButton).toHaveText("Go to App");+ });++ test("should navigate back to changelog from individual entry", async ({+ page,+ }) => {+ // Navigate to an individual entry+ await page.goto("/changelog");+ const firstEntryLink = page+ .getByRole("link")+ .filter({ has: page.getByRole("heading", { level: 2 }) })+ .first();++ const link = await firstEntryLink.getAttribute("href");+ await firstEntryLink.waitFor({ state: "visible" });+ await firstEntryLink.click();++ // Wait for navigation to individual entry+ // Wait for URL pattern: /changelog/[any-slug] where [any-slug] is any characters except forward slash+ await page.waitForURL(link!);++ // Click "Back to All Posts" link+ await page.getByRole("link", { name: "Back to All Posts" }).click();++ // Verify we're back on the main changelog page+ await expect(page).toHaveURL("/changelog");+ await expect(+ page.getByRole("heading", { level: 1, name: "Changelog" })+ ).toBeVisible();+ });++ test("should handle direct navigation to changelog entry", async ({+ page,+ }) => {+ // Try to navigate directly to a changelog entry+ // First get the slug from the main page+ await page.goto("/changelog");+ const firstEntryLink = page.locator('a[href^="/changelog/"]').first();+ const href = await firstEntryLink.getAttribute("href");++ // Navigate directly to the entry+ await page.goto(href!);++ // Verify the page loads correctly+ await expect(+ page.getByRole("link", { name: "Back to All Posts" })+ ).toBeVisible();++ // Verify we can still navigate back+ await page.getByRole("link", { name: "Back to All Posts" }).click();+ await expect(page).toHaveURL("/changelog");+ });+});diff --git a/e2e/pdf.test.ts b/e2e/default-invoice-template/pdf.test.tssimilarity index 96%rename from e2e/pdf.test.tsrename to e2e/default-invoice-template/pdf.test.tsindex 203fd9b..ad6263a 100644--- a/e2e/pdf.test.ts+++ b/e2e/default-invoice-template/pdf.test.ts@@ -151,7 +151,11 @@ test.describe("PDF Preview", () => {expect(pdfData.text).toContain("Person authorized to issue");expect(pdfData.text).toContain("Reverse charge");expect(pdfData.text).toContain("Created with https://easyinvoicepdf.com");- expect(pdfData.text).toContain("1/1");++ // Check page footer and metadata+ expect(pdfData.text).toContain(+ `1/${CURRENT_MONTH_AND_YEAR}·€0.00 EUR due ${PAYMENT_DATE}·Created with https://easyinvoicepdf.comPage 1 of 1`+ );});test("downloads PDF in Polish and verifies translated content", async ({@@ -190,6 +194,10 @@ test.describe("PDF Preview", () => {const dataBuffer = await fs.promises.readFile(tmpPath);const pdfData = await pdf(dataBuffer);+ expect((pdfData.info as { Title: string }).Title).toContain(+ `Faktura nr: 1/${CURRENT_MONTH_AND_YEAR} | Created with https://easyinvoicepdf.com`+ );+// Verify PDF contentexpect(pdfData.text).toContain("Faktura nr");expect(pdfData.text).toContain("Data wystawienia");@@ -210,7 +218,7 @@ Pozostało do zapłaty: 0.00 EURKwota słownie: zero EUR 00/100`);expect(pdfData.text).toContain(- "Utworzono za pomocą https://easyinvoicepdf.com"+ `1/${CURRENT_MONTH_AND_YEAR}·€0.00 EUR termin ${PAYMENT_DATE}·Utworzono za pomocą https://easyinvoicepdf.comStrona 1 z 1`);});@@ -404,8 +412,10 @@ Kwota słownie: zero EUR 00/100`);expect(pdfData.text).toContain("Person authorized to receive");expect(pdfData.text).toContain("Person authorized to issue");expect(pdfData.text).toContain("Reverse charge");- expect(pdfData.text).toContain("Created with https://easyinvoicepdf.com");- expect(pdfData.text).toContain("1/1");++ expect(pdfData.text).toContain(+ `1/${CURRENT_MONTH_AND_YEAR}·£3 000.00 GBP due ${paymentDate}·Created with https://easyinvoicepdf.comPage 1 of 1`+ );});test("completes full invoice flow on mobile: tabs navigation, form editing and PDF download in French", async ({@@ -542,15 +552,13 @@ Reste à payer: 184.50 GBPMontant en lettres: cent quatre-vingt-quatre GBP 50/100`);// Verify toast appears after download+ await expect(page.getByTestId("download-pdf-toast")).toBeVisible();+await expect(- page.getByText("❤️ Enjoying EasyInvoicePDF? Help Keep It Free!")- ).toBeVisible();- await expect(- page.getByText(- "This tool is free and ad-free thanks to user support. If it’s helped you, consider a small donation to keep it running and growing. Every bit counts—thank you!"- )+ page.getByRole("link", { name: "Star on GitHub" })).toBeVisible();- await expect(page.getByRole("button", { name: "Donate" })).toBeVisible();++ await expect(page.getByTestId("toast-cta-btn")).toBeVisible();// Switch back to form tabawait page.getByRole("tab", { name: "Edit Invoice" }).click();diff --git a/e2e/invoice-form.test.ts b/e2e/invoice-form.test.tsindex 4761f0d..836ba52 100644--- a/e2e/invoice-form.test.ts+++ b/e2e/invoice-form.test.ts@@ -13,7 +13,7 @@ import {import { expect, test } from "@playwright/test";import dayjs from "dayjs";import { INITIAL_INVOICE_DATA } from "../src/app/constants";-import { VIDEO_DEMO_URL } from "@/config";+import { GITHUB_URL, VIDEO_DEMO_URL } from "@/config";test.describe("Invoice Generator Page", () => {test.beforeEach(async ({ page }) => {@@ -38,11 +38,11 @@ test.describe("Invoice Generator Page", () => {await expect(header).toBeVisible();await expect(- header.getByRole("link", { name: "EasyInvoicePDF.com" })+ header.getByRole("link", { name: "EasyInvoicePDF" })).toBeVisible();await expect(- header.getByText("Free Invoice Generator with Real-Time PDF Preview")+ header.getByText("Free Invoice Generator with Live PDF Preview")).toBeVisible();// Check main action buttons@@ -104,10 +104,7 @@ test.describe("Invoice Generator Page", () => {await expect(header.getByRole("link", { name: "Open Source" })- ).toHaveAttribute(- "href",- "https://github.com/VladSez/pdf-invoice-generator"- );+ ).toHaveAttribute("href", GITHUB_URL);// Verify buttons are enabledawait expect(@@ -462,10 +459,19 @@ test.describe("Invoice Generator Page", () => {await itemNameInput.fill("TEST INVOICE ITEM");await expect(itemNameInput).toHaveValue("TEST INVOICE ITEM");+ // Set up dialog handler before triggering the action+ page.on("dialog", async (dialog) => {+ expect(dialog.message()).toBe(+ "Are you sure you want to delete invoice item #2?"+ );+ await dialog.accept();+ });+// Remove the added itemawait invoiceItemsSection.getByRole("button", { name: "Delete Invoice Item 2" }).click();+await expect(invoiceItemsSection.getByText("Item 2", { exact: true })).toBeHidden();@@ -526,10 +532,6 @@ test.describe("Invoice Generator Page", () => {const invoiceItemsSection = page.getByTestId(`invoice-items-section`);await invoiceItemsSection.getByRole("textbox", { name: "Name" }).clear();- await expect(- page.getByText("Date of issue is required", { exact: true })- ).toBeVisible();-await expect(page.getByText("Seller name is required", { exact: true })).toBeVisible();@@ -574,9 +576,6 @@ test.describe("Invoice Generator Page", () => {.fill("Test Buyer");// Check for error messages to be hidden- await expect(- page.getByText("Date of issue is required", { exact: true })- ).toBeHidden();await expect(page.getByText("Seller name is required", { exact: true })@@ -1181,8 +1180,8 @@ test.describe("Invoice Generator Page", () => {page.getByText("The shared invoice URL appears to be incorrect")).toBeHidden();- // Verify URL is cleared- expect(page.url()).toContain("/");- expect(page.url()).not.toContain("?data=");+ // Wait for URL to be cleared and verify+ await expect(page).toHaveURL("/");+ await expect(page).not.toHaveURL(/\?data=/);});});diff --git a/e2e/stripe-invoice-template/share-logic.test.ts b/e2e/stripe-invoice-template/share-logic.test.tsnew file mode 100644index 0000000..8595ae4--- /dev/null+++ b/e2e/stripe-invoice-template/share-logic.test.ts@@ -0,0 +1,282 @@+import { PDF_DATA_LOCAL_STORAGE_KEY, type InvoiceData } from "@/app/schema";+import { expect, test } from "@playwright/test";+import { SMALL_TEST_IMAGE_BASE64, uploadBase64LogoAsFile } from "./utils";++test.describe("Stripe Invoice Sharing Logic", () => {+ test.beforeEach(async ({ page }) => {+ await page.goto("/");+ });++ test("can share invoice with Stripe template and *WITHOUT* logo", async ({+ page,+ }) => {+ // Switch to Stripe template+ await page+ .getByRole("combobox", { name: "Invoice Template" })+ .selectOption("stripe");++ // Verify share button is still enabled (no logo uploaded)+ const shareButton = page.getByRole("button", {+ name: "Generate a link to invoice",+ });+ await expect(shareButton).toBeVisible();+ await expect(shareButton).toBeEnabled();++ // Click share button+ // eslint-disable-next-line playwright/no-force-option+ await shareButton.click({ force: true });++ // Verify URL contains shared data+ await page.waitForURL((url) => url.searchParams.has("data"));+ expect(page.url()).toContain("?data=");+ });++ test("cannot share invoice with Stripe template and *WITH* logo", async ({+ page,+ }) => {+ // Switch to Stripe template+ await page+ .getByRole("combobox", { name: "Invoice Template" })+ .selectOption("stripe");++ await page.evaluate(uploadBase64LogoAsFile, SMALL_TEST_IMAGE_BASE64);++ // Wait for logo to be uploaded+ const generalInfoSection = page.getByTestId("general-information-section");+ await expect(+ generalInfoSection.getByAltText("Company logo preview")+ ).toBeVisible();++ // Verify share button is disabled+ const shareButton = page.getByRole("button", {+ name: "Generate a link to invoice",+ });+ await expect(shareButton).toHaveAttribute("aria-disabled", "true");++ // click over share button to verify tooltip+ // on mobile, we need to click the button to show the toast because it's better UX for user (you can't hover on mobile)+ // eslint-disable-next-line playwright/no-force-option+ await shareButton.click({ force: true });++ await expect(page.getByText("Unable to Share Invoice")).toBeVisible();++ await expect(+ page.getByText(+ "Invoices with logos cannot be shared. Please remove the logo to generate a shareable link. You can still download the invoice as PDF and share it."+ )+ ).toBeVisible();+ });++ test("share button becomes enabled again after removing logo", async ({+ page,+ }) => {+ // Switch to Stripe template and upload logo+ await page+ .getByRole("combobox", { name: "Invoice Template" })+ .selectOption("stripe");++ await page.evaluate(uploadBase64LogoAsFile, SMALL_TEST_IMAGE_BASE64);++ await page.evaluate((base64Data) => {+ const fileInput = document.querySelector(+ "#logoUpload"+ ) as HTMLInputElement;++ if (fileInput) {+ const byteString = atob(base64Data.split(",")[1]);+ const mimeString = base64Data.split(",")[0].split(":")[1].split(";")[0];+ const ab = new ArrayBuffer(byteString.length);+ const ia = new Uint8Array(ab);+ for (let i = 0; i < byteString.length; i++) {+ ia[i] = byteString.charCodeAt(i);+ }+ const file = new File([ab], "test-logo.png", { type: mimeString });+ const dataTransfer = new DataTransfer();+ dataTransfer.items.add(file);+ fileInput.files = dataTransfer.files;+ fileInput.dispatchEvent(new Event("change", { bubbles: true }));+ }+ }, SMALL_TEST_IMAGE_BASE64);++ const generalInfoSection = page.getByTestId("general-information-section");+ await expect(+ generalInfoSection.getByAltText("Company logo preview")+ ).toBeVisible();++ // Verify share button is disabled+ const shareButton = page.getByRole("button", {+ name: "Generate a link to invoice",+ });+ await expect(shareButton).toHaveAttribute("aria-disabled", "true");++ // Remove the logo+ await generalInfoSection+ .getByRole("button", { name: "Remove logo" })+ .click();++ // Wait for logo to be removed+ await expect(+ generalInfoSection.getByAltText("Company logo preview")+ ).toBeHidden();++ // Verify share button is enabled again+ await expect(shareButton).toHaveAttribute("aria-disabled", "false");+ await expect(shareButton).toBeEnabled();++ // Test that sharing works+ await shareButton.click();+ await page.waitForURL((url) => url.searchParams.has("data"));+ expect(page.url()).toContain("?data=");++ await expect(+ page.getByText("Invoice link copied to clipboard!")+ ).toBeVisible();+ });++ test("share button becomes disabled when switching to Stripe template with existing logo", async ({+ page,+ }) => {+ // Start with default template and verify share button is enabled+ const shareButton = page.getByRole("button", {+ name: "Generate a link to invoice",+ });+ await expect(shareButton).toBeEnabled();++ // Switch to Stripe template+ await page+ .getByRole("combobox", { name: "Invoice Template" })+ .selectOption("stripe");++ // Upload a logo+ await page.evaluate((base64Data) => {+ const fileInput = document.querySelector(+ "#logoUpload"+ ) as HTMLInputElement;+ if (fileInput) {+ const byteString = atob(base64Data.split(",")[1]);+ const mimeString = base64Data.split(",")[0].split(":")[1].split(";")[0];+ const ab = new ArrayBuffer(byteString.length);+ const ia = new Uint8Array(ab);+ for (let i = 0; i < byteString.length; i++) {+ ia[i] = byteString.charCodeAt(i);+ }+ const file = new File([ab], "test-logo.png", { type: mimeString });+ const dataTransfer = new DataTransfer();+ dataTransfer.items.add(file);+ fileInput.files = dataTransfer.files;+ fileInput.dispatchEvent(new Event("change", { bubbles: true }));+ }+ }, SMALL_TEST_IMAGE_BASE64);++ // Verify share button becomes disabled+ await expect(shareButton).toHaveAttribute("aria-disabled", "true");++ // Switch back to default template+ await page+ .getByRole("combobox", { name: "Invoice Template" })+ .selectOption("default");++ // Verify share button is enabled again (logo is cleared when switching away from Stripe)+ await expect(shareButton).toHaveAttribute("aria-disabled", "false");+ await expect(shareButton).toBeEnabled();+ });++ test("preserves sharing state after page reload", async ({ page }) => {+ // Switch to Stripe template and upload logo+ await page+ .getByRole("combobox", { name: "Invoice Template" })+ .selectOption("stripe");++ await page.evaluate(uploadBase64LogoAsFile, SMALL_TEST_IMAGE_BASE64);++ // Wait for upload and verify share button is disabled+ const generalInfoSection = page.getByTestId("general-information-section");+ await expect(+ generalInfoSection.getByAltText("Company logo preview")+ ).toBeVisible();++ const shareButton = page.getByRole("button", {+ name: "Generate a link to invoice",+ });++ // Verify share button is disabled+ await expect(shareButton).toHaveAttribute("aria-disabled", "true");++ // Wait a moment for any debounced localStorage updates+ // eslint-disable-next-line playwright/no-wait-for-timeout+ await page.waitForTimeout(500);++ // Verify data is actually saved in localStorage+ const storedData = (await page.evaluate((key) => {+ return localStorage.getItem(key);+ }, PDF_DATA_LOCAL_STORAGE_KEY)) as string;++ expect(storedData).toBeTruthy();++ const parsedData = JSON.parse(storedData) as InvoiceData;++ expect(parsedData).toMatchObject({+ logo: SMALL_TEST_IMAGE_BASE64,+ } satisfies Pick<InvoiceData, "logo">);++ // Reload the page+ await page.reload();++ // Verify state persists after reload+ await expect(+ page.getByRole("combobox", { name: "Invoice Template" })+ ).toHaveValue("stripe");+ await expect(+ generalInfoSection.getByAltText("Company logo preview")+ ).toBeVisible();++ // Verify share button is still disabled+ await expect(shareButton).toHaveAttribute("aria-disabled", "true");+ });++ test("sharing functionality works correctly in mobile view (mobile UI is a bit different)", async ({+ page,+ }) => {+ // Set mobile viewport+ await page.setViewportSize({ width: 375, height: 667 });++ // Verify share button is visible and enabled in mobile+ const shareButton = page.getByRole("button", {+ name: "Generate a link to invoice",+ });+ await expect(shareButton).toBeVisible();+ await expect(shareButton).toBeEnabled();++ // Switch to Stripe template+ await page+ .getByRole("combobox", { name: "Invoice Template" })+ .selectOption("stripe");++ // Upload logo+ await page.evaluate(uploadBase64LogoAsFile, SMALL_TEST_IMAGE_BASE64);++ // Verify share button is disabled in mobile view too+ await expect(shareButton).toHaveAttribute("aria-disabled", "true");++ // Click share button to verify toast is shown+ // eslint-disable-next-line playwright/no-force-option+ await shareButton.click({ force: true });++ await expect(page.getByText("Unable to Share Invoice")).toBeVisible();++ await expect(+ page.getByText(+ "Invoices with logos cannot be shared. Please remove the logo to generate a shareable link. You can still download the invoice as PDF and share it."+ )+ ).toBeVisible();++ // Remove logo and verify sharing works again+ const generalInfoSection = page.getByTestId("general-information-section");+ await generalInfoSection+ .getByRole("button", { name: "Remove logo" })+ .click();++ await expect(shareButton).toHaveAttribute("aria-disabled", "false");+ await expect(shareButton).toBeEnabled();+ });+});diff --git a/e2e/stripe-invoice-template/template.test.ts b/e2e/stripe-invoice-template/template.test.tsnew file mode 100644index 0000000..2b29a91--- /dev/null+++ b/e2e/stripe-invoice-template/template.test.ts@@ -0,0 +1,466 @@+import {+ PDF_DATA_LOCAL_STORAGE_KEY,+ STRIPE_DEFAULT_DATE_FORMAT,+ type InvoiceData,+} from "@/app/schema";+import { expect, test } from "@playwright/test";+import dayjs from "dayjs";+import fs from "fs";+import path from "path";+import pdf from "pdf-parse";+import { SMALL_TEST_IMAGE_BASE64, uploadBase64LogoAsFile } from "./utils";++const PLAYWRIGHT_TEST_DOWNLOADS_DIR = "playwright-test-downloads";++const getDownloadDir = ({ browserName }: { browserName: string }) => {+ const name = `stripe-logo-downloads-${browserName}`;+ return path.join(PLAYWRIGHT_TEST_DOWNLOADS_DIR, name);+};++const CURRENT_MONTH_AND_YEAR = dayjs().format("MM-YYYY");+const TODAY = dayjs().format(STRIPE_DEFAULT_DATE_FORMAT);+const START_OF_CURRENT_MONTH = dayjs()+ .startOf("month")+ .format(STRIPE_DEFAULT_DATE_FORMAT);+const LAST_DAY_OF_CURRENT_MONTH = dayjs()+ .endOf("month")+ .format(STRIPE_DEFAULT_DATE_FORMAT);++// Payment date is 14 days from today (by default)+const PAYMENT_DATE = dayjs().add(14, "day").format(STRIPE_DEFAULT_DATE_FORMAT);++test.describe("Stripe InvoiceTemplate", () => {+ let downloadDir: string;++ test.beforeAll(async ({ browserName }) => {+ downloadDir = getDownloadDir({ browserName });++ // Ensure browser-specific test-downloads directory exists+ try {+ await fs.promises.mkdir(downloadDir, { recursive: true });+ } catch (error) {+ if ((error as NodeJS.ErrnoException).code !== "EEXIST") {+ throw error;+ }+ }+ });++ test.afterAll(async () => {+ // Remove the parent playwright-test-downloads directory+ try {+ await fs.promises.rm(PLAYWRIGHT_TEST_DOWNLOADS_DIR, {+ recursive: true,+ force: true,+ });+ } catch (error) {+ if ((error as NodeJS.ErrnoException).code !== "ENOENT") {+ throw error;+ }+ }+ });++ test.beforeEach(async ({ page }) => {+ await page.goto("/");+ });++ test("logo upload section and payment link URL section only appear for Stripe template", async ({+ page,+ }) => {+ const generalInfoSection = page.getByTestId("general-information-section");++ // Initially default template - logo section should not be visible+ await expect(+ generalInfoSection.getByText("Company Logo (Optional)")+ ).toBeHidden();+ await expect(+ generalInfoSection.getByTestId("stripe-logo-upload-input")+ ).toBeHidden();++ // Payment URL section should not be visible+ await expect(+ generalInfoSection.getByRole("textbox", {+ name: "Payment Link URL (Optional)",+ })+ ).toBeHidden();++ // Switch to Stripe template+ await page+ .getByRole("combobox", { name: "Invoice Template" })+ .selectOption("stripe");++ // Logo section should now be visible+ await expect(+ generalInfoSection.getByTestId("stripe-logo-upload-input")+ ).toBeVisible();++ await expect(+ generalInfoSection.getByText("Company Logo (Optional)")+ ).toBeVisible();+ await expect(+ generalInfoSection.getByText("Click to upload your company logo")+ ).toBeVisible();+ await expect(+ generalInfoSection.getByText("JPEG, PNG or WebP (max 3MB)")+ ).toBeVisible();++ // Payment URL section should now be visible+ await expect(+ generalInfoSection.getByRole("textbox", {+ name: "Payment Link URL (Optional)",+ })+ ).toBeVisible();++ // Switch back to default template+ await page+ .getByRole("combobox", { name: "Invoice Template" })+ .selectOption("default");++ // Logo section should be hidden again+ await expect(+ generalInfoSection.getByText("Company Logo (Optional)")+ ).toBeHidden();++ await expect(+ generalInfoSection.getByTestId("stripe-logo-upload-input")+ ).toBeHidden();++ // Payment URL section should be hidden again+ await expect(+ generalInfoSection.getByRole("textbox", {+ name: "Payment Link URL (Optional)",+ })+ ).toBeHidden();+ });++ test("validates file types and shows error for invalid files", async ({+ page,+ }) => {+ // Switch to Stripe template to show logo upload+ await page+ .getByRole("combobox", { name: "Invoice Template" })+ .selectOption("stripe");++ // Create a mock file input event with invalid file type+ await page.evaluate(() => {+ const fileInput = document.querySelector(+ "#logoUpload"+ ) as HTMLInputElement;+ if (fileInput) {+ // Create a mock file with invalid type+ const file = new File(["test"], "test.txt", { type: "text/plain" });+ const dataTransfer = new DataTransfer();+ dataTransfer.items.add(file);+ fileInput.files = dataTransfer.files;++ // Trigger change event+ fileInput.dispatchEvent(new Event("change", { bubbles: true }));+ }+ });++ // Should show error toast+ await expect(+ page.getByText("Please select a valid image file (JPEG, PNG or WebP)")+ ).toBeVisible();+ });++ test("validates file size and shows error for large files", async ({+ page,+ }) => {+ // Switch to Stripe template to show logo upload+ await page+ .getByRole("combobox", { name: "Invoice Template" })+ .selectOption("stripe");++ // Create a mock file input event with large file+ await page.evaluate(() => {+ const fileInput = document.querySelector(+ "#logoUpload"+ ) as HTMLInputElement;+ if (fileInput) {+ // Create a mock file that's too large (4MB)+ const largeContent = new Array(4 * 1024 * 1024).fill("a").join("");+ const file = new File([largeContent], "large-image.png", {+ type: "image/png",+ });+ const dataTransfer = new DataTransfer();+ dataTransfer.items.add(file);+ fileInput.files = dataTransfer.files;++ // Trigger change event+ fileInput.dispatchEvent(new Event("change", { bubbles: true }));+ }+ });++ // Should show error toast+ await expect(+ page.getByText("Image size must be less than 3MB")+ ).toBeVisible();+ });++ test("successfully uploads valid image and shows preview", async ({+ page,+ }) => {+ // Switch to Stripe template to show logo upload+ await page+ .getByRole("combobox", { name: "Invoice Template" })+ .selectOption("stripe");++ const generalInfoSection = page.getByTestId("general-information-section");++ // Upload a valid small image+ await page.evaluate(uploadBase64LogoAsFile, SMALL_TEST_IMAGE_BASE64);++ // Should show success toast+ await expect(page.getByText("Logo uploaded successfully!")).toBeVisible();++ // Should show logo preview+ await expect(+ generalInfoSection.getByAltText("Company logo preview")+ ).toBeVisible();+ await expect(+ generalInfoSection.getByText(+ "Logo uploaded successfully. Click the X to remove it."+ )+ ).toBeVisible();++ // Should show remove button+ await expect(+ generalInfoSection.getByRole("button", { name: "Remove logo" })+ ).toBeVisible();++ // Upload area should be hidden+ await expect(+ generalInfoSection.getByText("Click to upload your company logo")+ ).toBeHidden();+ });++ test("can remove uploaded logo", async ({ page }) => {+ // Switch to Stripe template and upload logo first+ await page+ .getByRole("combobox", { name: "Invoice Template" })+ .selectOption("stripe");++ // Upload a valid small image+ await page.evaluate(uploadBase64LogoAsFile, SMALL_TEST_IMAGE_BASE64);++ const generalInfoSection = page.getByTestId("general-information-section");++ // Wait for logo to be uploaded+ await expect(+ generalInfoSection.getByAltText("Company logo preview")+ ).toBeVisible();++ // Click remove button+ await generalInfoSection+ .getByRole("button", { name: "Remove logo" })+ .click();++ // Should show success toast+ await expect(page.getByText("Logo removed successfully!")).toBeVisible();++ // Logo preview should be hidden+ await expect(+ generalInfoSection.getByAltText("Company logo preview")+ ).toBeHidden();++ // Upload area should be visible again+ await expect(+ generalInfoSection.getByText("Click to upload your company logo")+ ).toBeVisible();+ });++ test("generates PDF with logo and payment URL when using Stripe template", async ({+ page,+ }) => {+ const generalInfoSection = page.getByTestId("general-information-section");++ // Switch to Stripe template+ await generalInfoSection+ .getByRole("combobox", { name: "Invoice Template" })+ .selectOption("stripe");++ // Upload a valid logo+ await page.evaluate(uploadBase64LogoAsFile, SMALL_TEST_IMAGE_BASE64);++ // Wait for logo to be uploaded and PDF to regenerate+ await expect(page.getByText("Logo uploaded successfully!")).toBeVisible();++ // Add payment URL+ await generalInfoSection+ .getByRole("textbox", { name: "Payment Link URL (Optional)" })+ .fill("https://buy.stripe.com/test_payment_link");++ // Wait a moment for any debounced localStorage updates+ // eslint-disable-next-line playwright/no-wait-for-timeout+ await page.waitForTimeout(500);++ // Verify data is actually saved in localStorage+ const storedData = (await page.evaluate((key) => {+ return localStorage.getItem(key);+ }, PDF_DATA_LOCAL_STORAGE_KEY)) as string;++ expect(storedData).toBeTruthy();++ const parsedData = JSON.parse(storedData) as InvoiceData;++ expect(parsedData).toMatchObject({+ logo: SMALL_TEST_IMAGE_BASE64,+ } satisfies Pick<InvoiceData, "logo">);++ // Set up download handler+ const downloadPromise = page.waitForEvent("download");++ const downloadButton = page.getByRole("link", {+ name: "Download PDF in English",+ });++ await expect(downloadButton).toBeVisible();+ await expect(downloadButton).toBeEnabled();++ // Click the download button+ await downloadButton.click();++ // Wait for the download to start+ const download = await downloadPromise;++ // Get the suggested filename+ const suggestedFilename = download.suggestedFilename();++ // Save the file to a browser-specific temporary location+ const tmpPath = path.join(downloadDir, suggestedFilename);+ await download.saveAs(tmpPath);++ // Read and verify PDF content using pdf-parse+ const dataBuffer = await fs.promises.readFile(tmpPath);+ const pdfData = await pdf(dataBuffer);++ expect((pdfData.info as { Title: string }).Title).toContain(+ `Invoice 1/${CURRENT_MONTH_AND_YEAR} | Created with https://easyinvoicepdf.com`+ );++ expect(pdfData.text).toContain("Invoice");+ expect(pdfData.text).toContain(`Invoice number1/${CURRENT_MONTH_AND_YEAR}`);+ expect(pdfData.text).toContain(`Date of issue${TODAY}`);+ expect(pdfData.text).toContain(`Date due${PAYMENT_DATE}`);+ expect(pdfData.text).toContain(+ `Service period${START_OF_CURRENT_MONTH} - ${LAST_DAY_OF_CURRENT_MONTH}`+ );+ expect(pdfData.text).toContain("Seller name");+ expect(pdfData.text).toContain("Seller address");+ expect(pdfData.text).toContain("[email protected]");+ expect(pdfData.text).toContain("VAT no: Seller vat number");++ expect(pdfData.text).toContain(+ "Account Number: Seller account \n" ++ "number\n" ++ "SWIFT/BIC number: Seller swift bic\n" ++ "Bill to\n"+ );++ expect(pdfData.text).toContain("Bill to");+ expect(pdfData.text).toContain("Buyer name");+ expect(pdfData.text).toContain("Buyer address");+ expect(pdfData.text).toContain("[email protected]");+ expect(pdfData.text).toContain("VAT no: Buyer vat number");+ expect(pdfData.text).toContain(`€0.00 EUR due ${PAYMENT_DATE}`);++ // Payment URL should be visible+ expect(pdfData.text).toContain("Pay Online");++ expect(pdfData.text).toContain("DescriptionQtyUnit PriceAmount");+ expect(pdfData.text).toContain("Item name");+ expect(pdfData.text).toContain(+ `${START_OF_CURRENT_MONTH} – ${LAST_DAY_OF_CURRENT_MONTH}`+ );+ expect(pdfData.text).toContain("1€0.00€0.00");+ expect(pdfData.text).toContain("Subtotal€0.00");+ expect(pdfData.text).toContain("Total€0.00");+ expect(pdfData.text).toContain("Amount Due€0.00 EUR");+ expect(pdfData.text).toContain("Reverse charge");+ expect(pdfData.text).toContain(+ `1/${CURRENT_MONTH_AND_YEAR}·€0.00 EUR due ${PAYMENT_DATE}·Created with https://easyinvoicepdf.comPage 1 of 1`+ );+ });++ test("validates payment URL format", async ({ page }) => {+ // Switch to Stripe template+ await page+ .getByRole("combobox", { name: "Invoice Template" })+ .selectOption("stripe");++ const generalInfoSection = page.getByTestId("general-information-section");+ const paymentUrlInput = generalInfoSection.getByRole("textbox", {+ name: "Payment Link URL (Optional)",+ });++ // Try invalid URL+ await paymentUrlInput.fill("not-a-valid-url");+ await paymentUrlInput.blur();++ // Check for validation error (this would depend on your validation implementation)+ // The actual validation error checking would depend on how your form validation works++ // Try valid URL+ await paymentUrlInput.fill("https://buy.stripe.com/test_payment_link");+ await paymentUrlInput.blur();++ // Should not show error for valid URL+ await expect(paymentUrlInput).toHaveValue(+ "https://buy.stripe.com/test_payment_link"+ );+ });++ test("persists logo and payment URL in localStorage", async ({ page }) => {+ // Switch to Stripe template+ await page+ .getByRole("combobox", { name: "Invoice Template" })+ .selectOption("stripe");++ const generalInfoSection = page.getByTestId("general-information-section");++ // Add payment URL+ await generalInfoSection+ .getByRole("textbox", { name: "Payment Link URL (Optional)" })+ .fill("https://buy.stripe.com/test_payment_link");++ // Upload logo+ await page.evaluate(uploadBase64LogoAsFile, SMALL_TEST_IMAGE_BASE64);++ // Wait a moment for any debounced localStorage updates+ // eslint-disable-next-line playwright/no-wait-for-timeout+ await page.waitForTimeout(500);++ // Verify data is actually saved in localStorage+ const storedData = (await page.evaluate((key) => {+ return localStorage.getItem(key);+ }, PDF_DATA_LOCAL_STORAGE_KEY)) as string;++ expect(storedData).toBeTruthy();++ const parsedData = JSON.parse(storedData) as InvoiceData;++ expect(parsedData).toMatchObject({+ logo: SMALL_TEST_IMAGE_BASE64,+ } satisfies Pick<InvoiceData, "logo">);++ // Reload page+ await page.reload();++ // Verify template is still Stripe+ await expect(+ page.getByRole("combobox", { name: "Invoice Template" })+ ).toHaveValue("stripe");++ // Verify payment URL persists+ await expect(+ generalInfoSection.getByRole("textbox", {+ name: "Payment Link URL (Optional)",+ })+ ).toHaveValue("https://buy.stripe.com/test_payment_link");++ // Verify logo persists+ await expect(+ generalInfoSection.getByAltText("Company logo preview")+ ).toBeVisible();+ });+});diff --git a/e2e/stripe-invoice-template/utils.ts b/e2e/stripe-invoice-template/utils.tsnew file mode 100644index 0000000..1bbf433--- /dev/null+++ b/e2e/stripe-invoice-template/utils.ts@@ -0,0 +1,51 @@+/**+ * Create a small test image in base64 format (1x1 pixel PNG)+ */+export const SMALL_TEST_IMAGE_BASE64 =+ "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==";++/**+ * Upload a base64 image to the logo input+ */+export const uploadBase64LogoAsFile = (base64Data: string) => {+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion+ const fileInput = document.querySelector(+ "#logoUpload"+ ) as HTMLInputElement | null;++ if (!fileInput) {+ throw new Error('Logo upload input "#logoUpload" was not found');+ }++ if (!base64Data) {+ throw new Error("Base64 data is required");+ }++ // Convert base64 data to binary string by removing metadata and decoding+ const byteString = atob(base64Data.split(",")[1]);++ // Extract MIME type from base64 metadata (e.g. "image/png")+ const mimeString = base64Data.split(",")[0].split(":")[1].split(";")[0];++ // Create ArrayBuffer to store binary data+ const ab = new ArrayBuffer(byteString.length);++ // Create Uint8Array view to write bytes to ArrayBuffer+ const ia = new Uint8Array(ab);++ // Convert binary string to bytes and write to array+ for (let i = 0; i < byteString.length; i++) {+ ia[i] = byteString.charCodeAt(i);+ }++ // Create File object from ArrayBuffer with name and MIME type+ const file = new File([ab], "test-logo.png", { type: mimeString });++ // Create DataTransfer to simulate file input+ const dataTransfer = new DataTransfer();+ dataTransfer.items.add(file);++ // Set file input's files property and trigger change event+ fileInput.files = dataTransfer.files;+ fileInput.dispatchEvent(new Event("change", { bubbles: true }));+};diff --git a/eslint.config.mjs b/eslint.config.mjsindex 8a930bb..62e0bd9 100644--- a/eslint.config.mjs+++ b/eslint.config.mjs@@ -2,6 +2,7 @@import { FlatCompat } from "@eslint/eslintrc";import tseslint from "typescript-eslint";import playwright from "eslint-plugin-playwright";+import youMightNotNeedAnEffect from "eslint-plugin-react-you-might-not-need-an-effect";const compat = new FlatCompat({baseDirectory: import.meta.dirname,@@ -68,6 +69,15 @@ export default tseslint.config("no-console": ["warn", { allow: ["error"] }],},},+ {+ files: ["src/**/*.ts", "src/**/*.tsx"],+ plugins: {+ "react-you-might-not-need-an-effect": youMightNotNeedAnEffect,+ },+ rules: {+ "react-you-might-not-need-an-effect/you-might-not-need-an-effect": "warn",+ },+ },// Playwright config for e2e tests only{...playwright.configs["flat/recommended"],diff --git a/knip.ts b/knip.tsindex 5ede00a..fe9b225 100644--- a/knip.ts+++ b/knip.ts@@ -26,6 +26,7 @@ const config: KnipConfig = {"src/i18n/**/*","src/app/schema/**/*","src/**/dev/**/*",+ "src/app/changelog/content/**/*",],includeEntryExports: true,// ignore tagsdiff --git a/messages/de.json b/messages/de.jsonindex 4881139..a48edff 100644--- a/messages/de.json+++ b/messages/de.json@@ -11,7 +11,7 @@"tagline": "Rechnungs-PDF-Generator mit Live-Vorschau","hero": {"title": "Erstellen Sie professionelle Rechnungen in Sekunden",- "description": "EasyInvoicePDF ist ein kostenloses Open-Source-Tool, mit dem Sie professionelle Rechnungen mit Echtzeit-Vorschau erstellen, anpassen und herunterladen können.",+ "description": "EasyInvoicePDF ist ein kostenloses Open-Source-Tool, mit dem Sie professionelle Rechnungen mit Echtzeit-Vorschau erstellen, anpassen und herunterladen können. Läuft vollständig in Ihrem Browser.","noSignup": "Keine Anmeldung erforderlich. 100% kostenlos und Open-Source."},"features": {@@ -56,16 +56,17 @@"product": "Produkt","links": {"features": "Funktionen",- "github": "GitHub"+ "github": "GitHub",+ "changelog": "Änderungsprotokoll"},- "copyright": "© {year} EasyInvoicePDF.com","createdBy": "Erstellt von"},"buttons": {- "goToApp": "Zur App",+ "goToApp": "Zur App gehen","viewOnGithub": "Auf GitHub ansehen",- "switchLanguage": "Sprache ändern",- "shareFeedback": "Feedback geben",+ "starOnGithub": "Auf GitHub bewerten",+ "switchLanguage": "Sprache wechseln",+ "shareFeedback": "Feedback teilen","app": "App"},"newsletter": {@@ -81,7 +82,6 @@"FAQ": {"title": "Häufig gestellte Fragen","description": "Finden Sie Antworten auf häufige Fragen zu EasyInvoicePDF",- "badge": "FAQ","items": {"whatIs": {"question": "Was ist EasyInvoicePDF?",diff --git a/messages/en.json b/messages/en.jsonindex 5f79616..a5c8a90 100644--- a/messages/en.json+++ b/messages/en.json@@ -1,9 +1,10 @@{"About": {- "tagline": "Free Invoice Generator with Real-Time PDF Preview",+ "tagline": "Free Invoice Generator with Live PDF Preview","hero": {"title": "Create professional invoices in seconds",- "description": "EasyInvoicePDF is a free, open-source tool that lets you create, customize, and download professional invoices with real-time preview.",+ "description": "EasyInvoicePDF is a free, open-source tool that lets you create, customize, and download professional invoices with real-time preview. Runs entirely in your browser.",+"noSignup": "No sign-up required. 100% free and open-source."},"features": {@@ -48,14 +49,15 @@"product": "Product","links": {"features": "Features",- "github": "GitHub"+ "github": "GitHub",+ "changelog": "Changelog"},- "copyright": "© {year} EasyInvoicePDF.com","createdBy": "Created by"},"buttons": {"goToApp": "Go to app","viewOnGithub": "View on GitHub",+ "starOnGithub": "Star on GitHub","switchLanguage": "Switch language","shareFeedback": "Share feedback","app": "App"@@ -81,7 +83,6 @@"FAQ": {"title": "Frequently Asked Questions","description": "Find answers to common questions about EasyInvoicePDF",- "badge": "FAQ","items": {"whatIs": {"question": "What is EasyInvoicePDF?",diff --git a/messages/es.json b/messages/es.jsonindex 638db03..23259ce 100644--- a/messages/es.json+++ b/messages/es.json@@ -11,7 +11,7 @@"tagline": "Generador de facturas PDF con vista previa en vivo","hero": {"title": "Cree facturas profesionales en segundos",- "description": "EasyInvoicePDF es una herramienta gratuita de código abierto que le permite crear, personalizar y descargar facturas profesionales con vista previa en tiempo real.",+ "description": "EasyInvoicePDF es una herramienta gratuita de código abierto que le permite crear, personalizar y descargar facturas profesionales con vista previa en tiempo real. Funciona completamente en su navegador.","noSignup": "No requiere registro. 100% gratuito y de código abierto."},"features": {@@ -56,14 +56,15 @@"product": "Producto","links": {"features": "Características",- "github": "GitHub"+ "github": "GitHub",+ "changelog": "Registro de cambios"},- "copyright": "© {year} EasyInvoicePDF.com","createdBy": "Creado por"},"buttons": {"goToApp": "Ir a la aplicación","viewOnGithub": "Ver en GitHub",+ "starOnGithub": "Dar estrella en GitHub","switchLanguage": "Cambiar idioma","shareFeedback": "Compartir comentarios","app": "Aplicación"@@ -81,7 +82,6 @@"FAQ": {"title": "Preguntas Frecuentes","description": "Encuentra respuestas a preguntas comunes sobre EasyInvoicePDF",- "badge": "FAQ","items": {"whatIs": {"question": "¿Qué es EasyInvoicePDF?",diff --git a/messages/fr.json b/messages/fr.jsonindex ac9935d..8ec7bda 100644--- a/messages/fr.json+++ b/messages/fr.json@@ -3,7 +3,7 @@"tagline": "Générateur de factures PDF avec aperçu en direct","hero": {"title": "Créez des factures professionnelles en quelques secondes",- "description": "EasyInvoicePDF est un outil gratuit et open-source qui vous permet de créer, personnaliser et télécharger des factures professionelles avec aperçu en temps réel.",+ "description": "EasyInvoicePDF est un outil gratuit et open-source qui vous permet de créer, personnaliser et télécharger des factures professionnelles avec aperçu en temps réel. Fonctionne entièrement dans votre navigateur.","noSignup": "Aucune inscription requise. 100% gratuit et open-source."},"features": {@@ -48,14 +48,15 @@"product": "Produit","links": {"features": "Fonctionnalités",- "github": "GitHub"+ "github": "GitHub",+ "changelog": "Journal des modifications"},- "copyright": "© {year} EasyInvoicePDF.com","createdBy": "Créé par"},"buttons": {"goToApp": "Aller à l'application","viewOnGithub": "Voir sur GitHub",+ "starOnGithub": "Mettre une étoile sur GitHub","switchLanguage": "Changer de langue","shareFeedback": "Partager un avis","app": "Application"@@ -81,7 +82,6 @@"FAQ": {"title": "Questions Fréquemment Posées","description": "Trouvez des réponses aux questions courantes sur EasyInvoicePDF",- "badge": "FAQ","items": {"whatIs": {"question": "Qu'est-ce qu'EasyInvoicePDF ?",diff --git a/messages/it.json b/messages/it.jsonindex 7478fba..204b303 100644--- a/messages/it.json+++ b/messages/it.json@@ -3,7 +3,7 @@"tagline": "Generatore di fatture PDF con anteprima in tempo reale","hero": {"title": "Crea fatture professionali in pochi secondi",- "description": "EasyInvoicePDF è uno strumento gratuito e open-source che ti permette di creare, personalizzare e scaricare fatture professionali con anteprima in tempo reale.",+ "description": "EasyInvoicePDF è uno strumento gratuito e open-source che ti permette di creare, personalizzare e scaricare fatture professionali con anteprima in tempo reale. Funziona completamente nel tuo browser.","noSignup": "Nessuna registrazione richiesta. 100% gratuito e open-source."},"features": {@@ -48,14 +48,15 @@"product": "Prodotto","links": {"features": "Funzionalità",- "github": "GitHub"+ "github": "GitHub",+ "changelog": "Registro delle modifiche"},- "copyright": "© {year} EasyInvoicePDF.com","createdBy": "Creato da"},"buttons": {"goToApp": "Vai all'app",- "viewOnGithub": "Vedi su GitHub",+ "viewOnGithub": "Visualizza su GitHub",+ "starOnGithub": "Metti una stella su GitHub","switchLanguage": "Cambia lingua","shareFeedback": "Condividi feedback","app": "App"@@ -81,7 +82,6 @@"FAQ": {"title": "Domande Frequenti","description": "Trova risposte alle domande comuni su EasyInvoicePDF",- "badge": "FAQ","items": {"whatIs": {"question": "Cos'è EasyInvoicePDF?",diff --git a/messages/nl.json b/messages/nl.jsonindex 3836ddb..262956d 100644--- a/messages/nl.json+++ b/messages/nl.json@@ -3,7 +3,7 @@"tagline": "PDF-factuur generator met live preview","hero": {"title": "Maak professionele facturen in seconden",- "description": "EasyInvoicePDF is een gratis, open-source tool waarmee je professionele PDF-facturen kunt maken, aanpassen en downloaden met realtime voorbeeld.",+ "description": "EasyInvoicePDF is een gratis, open-source tool waarmee je professionele facturen kunt maken, aanpassen en downloaden met realtime voorbeeld. Draait volledig in je browser.","noSignup": "Geen registratie vereist. 100% gratis en open-source."},"features": {@@ -48,16 +48,17 @@"product": "Product","links": {"features": "Functies",- "github": "GitHub"+ "github": "GitHub",+ "changelog": "Wijzigingslogboek"},- "copyright": "© {year} EasyInvoicePDF.com","createdBy": "Gemaakt door"},"buttons": {"goToApp": "Ga naar app","viewOnGithub": "Bekijk op GitHub",- "switchLanguage": "Taal wijzigen",- "shareFeedback": "Deel feedback",+ "starOnGithub": "Ster geven op GitHub",+ "switchLanguage": "Verander taal",+ "shareFeedback": "Feedback delen","app": "App"},"newsletter": {@@ -81,7 +82,6 @@"FAQ": {"title": "Veelgestelde Vragen","description": "Vind antwoorden op veelgestelde vragen over EasyInvoicePDF",- "badge": "FAQ","items": {"whatIs": {"question": "Wat is EasyInvoicePDF?",diff --git a/messages/pl.json b/messages/pl.jsonindex d4ebb4c..3fb0737 100644--- a/messages/pl.json+++ b/messages/pl.json@@ -11,7 +11,7 @@"tagline": "Generator faktur PDF z podglądem na żywo","hero": {"title": "Twórz profesjonalne faktury w kilka sekund",- "description": "EasyInvoicePDF to darmowe narzędzie open-source, które pozwala tworzyć, dostosowywać i pobierać profesjonalne faktury z podglądem w czasie rzeczywistym.",+ "description": "EasyInvoicePDF to darmowe narzędzie open-source, które pozwala tworzyć, dostosowywać i pobierać profesjonalne faktury z podglądem w czasie rzeczywistym. Działa całkowicie w Twojej przeglądarce.","noSignup": "Bez rejestracji. W 100% darmowe i open-source."},"features": {@@ -56,14 +56,15 @@"product": "Produkt","links": {"features": "Funkcje",- "github": "GitHub"+ "github": "GitHub",+ "changelog": "Dziennik zmian"},- "copyright": "© {year} EasyInvoicePDF.com","createdBy": "Stworzone przez"},"buttons": {"goToApp": "Przejdź do aplikacji","viewOnGithub": "Zobacz na GitHub",+ "starOnGithub": "Oznacz gwiazdką na GitHub","switchLanguage": "Zmień język","shareFeedback": "Podziel się opinią","app": "Aplikacja"@@ -81,7 +82,6 @@"FAQ": {"title": "Często Zadawane Pytania","description": "Znajdź odpowiedzi na często zadawane pytania o EasyInvoicePDF",- "badge": "FAQ","items": {"whatIs": {"question": "Czym jest EasyInvoicePDF?",diff --git a/messages/pt.json b/messages/pt.jsonindex 06c0c5b..161d6ee 100644--- a/messages/pt.json+++ b/messages/pt.json@@ -11,7 +11,7 @@"tagline": "Gerador de faturas PDF com pré-visualização em tempo real","hero": {"title": "Crie faturas profissionais em segundos",- "description": "EasyInvoicePDF é uma ferramenta gratuita de código aberto que permite criar, personalizar e baixar faturas PDF profissionais com pré-visualização em tempo real.",+ "description": "EasyInvoicePDF é uma ferramenta gratuita de código aberto que permite criar, personalizar e baixar faturas profissionais com pré-visualização em tempo real. Funciona completamente no seu navegador.","noSignup": "Não requer cadastro. 100% gratuito e de código aberto."},"features": {@@ -56,17 +56,18 @@"product": "Produto","links": {"features": "Recursos",- "github": "GitHub"+ "github": "GitHub",+ "changelog": "Registro de alterações"},- "copyright": "© {year} EasyInvoicePDF.com","createdBy": "Criado por"},"buttons": {- "goToApp": "Ir para o aplicativo",+ "goToApp": "Ir para o app","viewOnGithub": "Ver no GitHub",+ "starOnGithub": "Dar estrela no GitHub","switchLanguage": "Mudar idioma","shareFeedback": "Compartilhar feedback",- "app": "Aplicativo"+ "app": "App"},"newsletter": {"title": "Inscreva-se em nossa newsletter",@@ -81,7 +82,6 @@"FAQ": {"title": "Perguntas Frequentes","description": "Encontre respostas para perguntas comuns sobre o EasyInvoicePDF",- "badge": "FAQ","items": {"whatIs": {"question": "O que é o EasyInvoicePDF?",diff --git a/messages/ru.json b/messages/ru.jsonindex 8f78baf..bc5c19f 100644--- a/messages/ru.json+++ b/messages/ru.json@@ -11,7 +11,7 @@"tagline": "Генератор PDF-счетов с предпросмотром","hero": {"title": "Создавайте инвойсы за секунды",- "description": "EasyInvoicePDF — это бесплатный инструмент с открытым исходным кодом, который позволяет создавать, настраивать и скачивать инвойсы с предпросмотром в реальном времени.",+ "description": "EasyInvoicePDF — это бесплатный инструмент с открытым исходным кодом, который позволяет создавать, настраивать и скачивать инвойсы с предпросмотром в реальном времени. Работает полностью в вашем браузере.","noSignup": "Без регистрации. 100% бесплатно и с открытым исходным кодом."},"features": {@@ -56,14 +56,15 @@"product": "Продукт","links": {"features": "Возможности",- "github": "GitHub"+ "github": "GitHub",+ "changelog": "Журнал изменений"},- "copyright": "© {year} EasyInvoicePDF.com","createdBy": "Создано"},"buttons": {"goToApp": "Перейти в приложение","viewOnGithub": "Посмотреть на GitHub",+ "starOnGithub": "Поставить звезду на GitHub","switchLanguage": "Изменить язык","shareFeedback": "Поделиться отзывом","app": "Приложение"@@ -81,7 +82,6 @@"FAQ": {"title": "Часто Задаваемые Вопросы","description": "Найдите ответы на часто задаваемые вопросы о EasyInvoicePDF",- "badge": "FAQ","items": {"whatIs": {"question": "Что такое EasyInvoicePDF?",diff --git a/messages/uk.json b/messages/uk.jsonindex c9e48b4..cc63705 100644--- a/messages/uk.json+++ b/messages/uk.json@@ -11,7 +11,7 @@"tagline": "Генератор PDF-рахунків з попереднім переглядом","hero": {"title": "Створюйте професійні рахунки за секунди",- "description": "EasyInvoicePDF — це безкоштовний інструмент з відкритим кодом, який дозволяє створювати, налаштовувати та завантажувати професійні рахунки з попереднім переглядом у реальному часі.",+ "description": "EasyInvoicePDF — це безкоштовний інструмент з відкритим кодом, який дозволяє створювати, налаштовувати та завантажувати професійні рахунки з попереднім переглядом у реальному часі. Працює повністю в вашому браузері.","noSignup": "Без реєстрації. 100% безкоштовно та з відкритим кодом."},"features": {@@ -56,14 +56,15 @@"product": "Продукт","links": {"features": "Можливості",- "github": "GitHub"+ "github": "GitHub",+ "changelog": "Журнал змін"},- "copyright": "© {year} EasyInvoicePDF.com","createdBy": "Створено"},"buttons": {"goToApp": "Перейти до додатку","viewOnGithub": "Переглянути на GitHub",+ "starOnGithub": "Поставити зірку на GitHub","switchLanguage": "Змінити мову","shareFeedback": "Поділитися відгуком","app": "Додаток"@@ -81,7 +82,6 @@"FAQ": {"title": "Часті Запитання","description": "Знайдіть відповіді на поширені запитання про EasyInvoicePDF",- "badge": "FAQ","items": {"whatIs": {"question": "Що таке EasyInvoicePDF?",diff --git a/next.config.mjs b/next.config.mjsindex d54e2de..9c1c77c 100644--- a/next.config.mjs+++ b/next.config.mjs@@ -2,7 +2,9 @@import { withSentryConfig } from "@sentry/nextjs";import createNextIntlPlugin from "next-intl/plugin";+import createMDX from "@next/mdx";import { createJiti } from "jiti";+import remarkGfm from "remark-gfm";import path from "node:path";import { fileURLToPath } from "node:url";@@ -113,8 +115,19 @@ const withNextIntl = createNextIntlPlugin({},});+const withMDX = createMDX({+ // Add markdown plugins here, as desired+ extension: /\.mdx?$/,+ options: {+ remarkPlugins: [remarkGfm],+ rehypePlugins: [],+ },+});+/** @type {import('next').NextConfig} */const nextConfig = {+ // Configure the file extensions that Next.js should handle+ pageExtensions: ["ts", "tsx", "js", "jsx", "md", "mdx"],typescript: {ignoreBuildErrors: true,},@@ -153,7 +166,7 @@ const nextConfig = {},};-export default withSentryConfig(withNextIntl(nextConfig), {+export default withSentryConfig(withNextIntl(withMDX(nextConfig)), {// For all available options, see:// https://www.npmjs.com/package/@sentry/webpack-plugin#optionsdiff --git a/package.json b/package.jsonindex 342861d..164f536 100644--- a/package.json+++ b/package.json@@ -24,10 +24,14 @@"lint-stage": "npx lint-staged --verbose","check-meta": "pnpx check-site-meta","dev:email": "email dev --dir src/emails",- "prepare": "husky"+ "prepare": "husky",+ "expose-to-internet": "pnpm dlx localtunnel --port 3000"},"dependencies": {"@hookform/resolvers": "3.9.0",+ "@mdx-js/loader": "3.1.0",+ "@mdx-js/react": "3.1.0",+ "@next/mdx": "15.3.3","@radix-ui/react-accordion": "1.2.3","@radix-ui/react-alert-dialog": "1.1.6","@radix-ui/react-dialog": "1.1.6",@@ -44,6 +48,8 @@"@react-pdf/renderer": "4.3.0","@sentry/nextjs": "9.3.0","@t3-oss/env-nextjs": "0.13.4",+ "@tailwindcss/typography": "0.5.16",+ "@types/mdx": "2.0.13","@types/ua-parser-js": "0.7.39","@upstash/ratelimit": "2.0.5","@upstash/redis": "1.34.6",@@ -69,6 +75,7 @@"react-hook-form": "7.53.1","react-intersection-observer": "9.16.0","react-pdf": "9.2.1",+ "remark-gfm": "4.0.1","resend": "4.2.0","sonner": "1.7.4","tailwind-merge": "2.6.0",@@ -92,6 +99,7 @@"eslint": "9.26.0","eslint-config-next": "15.2.3","eslint-plugin-playwright": "2.2.0",+ "eslint-plugin-react-you-might-not-need-an-effect": "0.0.39","husky": "9.1.7","knip": "5.55.1","lint-staged": "15.5.0",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex d8999b7..e7a5cb7 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -10,6 +10,15 @@ importers:"@hookform/resolvers":specifier: 3.9.0version: 3.9.0([email protected]([email protected]))+ "@mdx-js/loader":+ specifier: 3.1.0+ "@mdx-js/react":+ specifier: 3.1.0+ version: 3.1.0(@types/[email protected])([email protected])+ "@next/mdx":+ specifier: 15.3.3+ version: 15.3.3(@mdx-js/[email protected]([email protected])([email protected]([email protected])))(@mdx-js/[email protected](@types/[email protected])([email protected]))"@radix-ui/react-accordion":specifier: 1.2.3version: 1.2.3(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])@@ -58,6 +67,12 @@ importers:"@t3-oss/env-nextjs":specifier: 0.13.4+ "@tailwindcss/typography":+ specifier: 0.5.16+ version: 0.5.16([email protected])+ "@types/mdx":+ specifier: 2.0.13+ version: 2.0.13"@types/ua-parser-js":specifier: 0.7.39version: 0.7.39@@ -133,6 +148,9 @@ importers:react-pdf:specifier: 9.2.1+ remark-gfm:+ specifier: 4.0.1+ version: 4.0.1resend:specifier: 4.2.0@@ -166,7 +184,7 @@ importers:version: 1.52.0"@stagewise/toolbar-next":specifier: 0.1.2- version: 0.1.2(@types/[email protected])([email protected])([email protected](@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])+ version: 0.1.2(@types/[email protected])([email protected])([email protected](@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])"@types/file-saver":specifier: 2.0.7version: 2.0.7@@ -187,7 +205,7 @@ importers:version: 7.0.0-dev.20250525.1autoprefixer:specifier: 10.4.21- version: 10.4.21([email protected])+ version: 10.4.21([email protected])eslint:specifier: 9.26.0version: 9.26.0([email protected])@@ -197,6 +215,9 @@ importers:eslint-plugin-playwright:specifier: 2.2.0version: 2.2.0([email protected]([email protected]))+ eslint-plugin-react-you-might-not-need-an-effect:+ specifier: 0.0.39+ version: 0.0.39([email protected]([email protected]))husky:specifier: 9.1.7version: 9.1.7@@ -208,7 +229,7 @@ importers:version: 15.5.0postcss:specifier: ^8- version: 8.4.47+ version: 8.5.3prettier:specifier: 3.5.3version: 3.5.3@@ -356,13 +377,6 @@ packages:engines: { node: ">=6.0.0" }hasBin: true- "@babel/[email protected]":- resolution:- {- integrity: sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ==,- }- engines: { node: ">=6.9.0" }-"@babel/[email protected]":resolution:{@@ -653,15 +667,6 @@ packages:cpu: [x64]os: [win32]- "@eslint-community/[email protected]":- resolution:- {- integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==,- }- engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 }- peerDependencies:- eslint: ^6.0.0 || ^7.0.0 || >=8.0.0-"@eslint-community/[email protected]":resolution:{@@ -671,13 +676,6 @@ packages:peerDependencies:eslint: ^6.0.0 || ^7.0.0 || >=8.0.0- "@eslint-community/[email protected]":- resolution:- {- integrity: sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==,- }- engines: { node: ^12.0.0 || ^14.0.0 || >=16.0.0 }-"@eslint-community/[email protected]":resolution:{@@ -1052,13 +1050,6 @@ packages:}engines: { node: ">=12" }- "@jridgewell/[email protected]":- resolution:- {- integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==,- }- engines: { node: ">=6.0.0" }-"@jridgewell/[email protected]":resolution:{@@ -1098,6 +1089,32 @@ packages:integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==,}+ "@mdx-js/[email protected]":+ resolution:+ {+ integrity: sha512-xU/lwKdOyfXtQGqn3VnJjlDrmKXEvMi1mgYxVmukEUtVycIz1nh7oQ40bKTd4cA7rLStqu0740pnhGYxGoqsCg==,+ }+ peerDependencies:+ webpack: ">=5"+ peerDependenciesMeta:+ webpack:+ optional: true++ "@mdx-js/[email protected]":+ resolution:+ {+ integrity: sha512-/QxEhPAvGwbQmy1Px8F899L5Uc2KZ6JtXwlCgJmjSTBedwOZkByYcBG4GceIGPXRDsmfxhHazuS+hlOShRLeDw==,+ }++ "@mdx-js/[email protected]":+ resolution:+ {+ integrity: sha512-QjHtSaoameoalGnKDT3FoIl4+9RwyTmo9ZJGBdLOks/YOiWHoRDI3PUwEzOE7kEmGcV3AFcp9K6dYu9rEuKLAQ==,+ }+ peerDependencies:+ "@types/react": ">=16"+ react: ">=16"+"@modelcontextprotocol/[email protected]":resolution:{@@ -1129,6 +1146,20 @@ packages:integrity: sha512-eNSOIMJtjs+dp4Ms1tB1PPPJUQHP3uZK+OQ7iFY9qXpGO6ojT6imCL+KcUOqE/GXGidWbBZJzYdgAdPHqeCEPA==,}+ "@next/[email protected]":+ resolution:+ {+ integrity: sha512-kJI7E/353vsoGa2usU/P36gDSA0iVc9xqJFFiPgLrSgWlivkANTRXjrnNVmVpHZ6ETmiZP52fMuKwmT9/FSmNQ==,+ }+ peerDependencies:+ "@mdx-js/loader": ">=0.15.0"+ "@mdx-js/react": ">=0.15.0"+ peerDependenciesMeta:+ "@mdx-js/loader":+ optional: true+ "@mdx-js/react":+ optional: true+"@next/[email protected]":resolution:{@@ -4053,6 +4084,14 @@ packages:zod:optional: true+ "@tailwindcss/[email protected]":+ resolution:+ {+ integrity: sha512-0wDLwCVF5V3x3b1SGXPCDcdsbDHMBe+lkFzBRaHeLvNi+nrrnZ1lA18u+OTWO8iSWU2GxUOCvlXtDuqftc1oiA==,+ }+ peerDependencies:+ tailwindcss: ">=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1"+"@tanstack/[email protected]":resolution:{@@ -4086,6 +4125,12 @@ packages:integrity: sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==,}+ "@types/[email protected]":+ resolution:+ {+ integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==,+ }+"@types/[email protected]":resolution:{@@ -4098,10 +4143,10 @@ packages:integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==,}- "@types/[email protected]":+ "@types/[email protected]":resolution:{- integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==,+ integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==,}"@types/[email protected]":@@ -4116,6 +4161,12 @@ packages:integrity: sha512-dNKVfHd/jk0SkR/exKGj2ggkB45MAkzvWCaqLUUgkyjITkGNzH8H+yUwr+BLJUBjZOe9w8X3wgmXhZDRg1ED6A==,}+ "@types/[email protected]":+ resolution:+ {+ integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==,+ }+"@types/[email protected]":resolution:{@@ -4128,6 +4179,24 @@ packages:integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==,}+ "@types/[email protected]":+ resolution:+ {+ integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==,+ }++ "@types/[email protected]":+ resolution:+ {+ integrity: sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==,+ }++ "@types/[email protected]":+ resolution:+ {+ integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==,+ }+"@types/[email protected]":resolution:{@@ -4214,35 +4283,26 @@ packages:integrity: sha512-P/oDfpofrdtF5xw433SPALpdSchtJmY7nsJItf8h3KXqOslkbySh8zq4dSWXH2oTjRvJ5PczVEoCZPow6GicLg==,}- "@typescript-eslint/[email protected]":+ "@types/[email protected]":resolution:{- integrity: sha512-lvFK3TCGAHsItNdWZ/1FkvpzCxTHUVuFrdnOGLMa0GGCFIbCgQWVk3CzCGdA7kM3qGVc+dfW9tr0Z/sHnGDFyg==,+ integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==,}- engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 }- peerDependencies:- "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0- eslint: ^8.57.0 || ^9.0.0- typescript: ">=4.8.4 <5.9.0"- "@typescript-eslint/[email protected]":+ "@types/[email protected]":resolution:{- integrity: sha512-/jU9ettcntkBFmWUzzGgsClEi2ZFiikMX5eEQsmxIAWMOn4H3D4rvHssstmAHGVvrYnaMqdWWWg0b5M6IN/MTQ==,+ integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==,}- engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 }- peerDependencies:- "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0- eslint: ^8.57.0 || ^9.0.0- typescript: ">=4.8.4 <5.9.0"- "@typescript-eslint/[email protected]":+ "@typescript-eslint/[email protected]":resolution:{- integrity: sha512-LPcw1yHD3ToaDEoljFEfQ9j2xShY367h7FZ1sq5NJT9I3yj4LHer1Xd1yRSOdYy9BpsrxU7R+eoDokChYM53lQ==,+ integrity: sha512-/jU9ettcntkBFmWUzzGgsClEi2ZFiikMX5eEQsmxIAWMOn4H3D4rvHssstmAHGVvrYnaMqdWWWg0b5M6IN/MTQ==,}engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 }peerDependencies:+ "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0eslint: ^8.57.0 || ^9.0.0typescript: ">=4.8.4 <5.9.0"@@ -4256,13 +4316,6 @@ packages:eslint: ^8.57.0 || ^9.0.0typescript: ">=4.8.4 <5.9.0"- "@typescript-eslint/[email protected]":- resolution:- {- integrity: sha512-u2oITX3BJwzWCapoZ/pXw6BCOl8rJP4Ij/3wPoGvY8XwvXflOzd1kLrDUUUAIEdJSFh+ASwdTHqtan9xSg8buw==,- }- engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 }-"@typescript-eslint/[email protected]":resolution:{@@ -4270,16 +4323,6 @@ packages:}engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 }- "@typescript-eslint/[email protected]":- resolution:- {- integrity: sha512-oRoXu2v0Rsy/VoOGhtWrOKDiIehvI+YNrDk5Oqj40Mwm0Yt01FC/Q7nFqg088d3yAsR1ZcZFVfPCTTFCe/KPwg==,- }- engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 }- peerDependencies:- eslint: ^8.57.0 || ^9.0.0- typescript: ">=4.8.4 <5.9.0"-"@typescript-eslint/[email protected]":resolution:{@@ -4290,13 +4333,6 @@ packages:eslint: ^8.57.0 || ^9.0.0typescript: ">=4.8.4 <5.9.0"- "@typescript-eslint/[email protected]":- resolution:- {- integrity: sha512-bn4WS1bkKEjx7HqiwG2JNB3YJdC1q6Ue7GyGlwPHyt0TnVq6TtD/hiOdTZt71sq0s7UzqBFXD8t8o2e63tXgwA==,- }- engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 }-"@typescript-eslint/[email protected]":resolution:{@@ -4304,15 +4340,6 @@ packages:}engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 }- "@typescript-eslint/[email protected]":- resolution:- {- integrity: sha512-H74nHEeBGeklctAVUvmDkxB1mk+PAZ9FiOMPFncdqeRBXxk1lWSYraHw8V12b7aa6Sg9HOBNbGdSHobBPuQSuA==,- }- engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 }- peerDependencies:- typescript: ">=4.8.4 <5.9.0"-"@typescript-eslint/[email protected]":resolution:{@@ -4322,16 +4349,6 @@ packages:peerDependencies:typescript: ">=4.8.4 <5.9.0"- "@typescript-eslint/[email protected]":- resolution:- {- integrity: sha512-OELa9hbTYciYITqgurT1u/SzpQVtDLmQMFzy/N8pQE+tefOyCWT79jHsav294aTqV1q1u+VzqDGbuujvRYaeSQ==,- }- engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 }- peerDependencies:- eslint: ^8.57.0 || ^9.0.0- typescript: ">=4.8.4 <5.9.0"-"@typescript-eslint/[email protected]":resolution:{@@ -4342,13 +4359,6 @@ packages:eslint: ^8.57.0 || ^9.0.0typescript: ">=4.8.4 <5.9.0"- "@typescript-eslint/[email protected]":- resolution:- {- integrity: sha512-hbn8SZ8w4u2pRwgQ1GlUrPKE+t2XvcCW5tTRF7j6SMYIuYG37XuzIW44JCZPa36evi0Oy2SnM664BlIaAuQcvg==,- }- engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 }-"@typescript-eslint/[email protected]":resolution:{@@ -4427,6 +4437,12 @@ packages:engines: { node: ">=20.6.0" }hasBin: true+ "@ungap/[email protected]":+ resolution:+ {+ integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==,+ }+"@unrs/[email protected]":resolution:{@@ -4895,6 +4911,13 @@ packages:integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==,}+ resolution:+ {+ integrity: sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==,+ }+ hasBin: true+resolution:{@@ -4939,6 +4962,12 @@ packages:}engines: { node: ">= 0.4" }+ resolution:+ {+ integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==,+ }+resolution:{@@ -5127,12 +5156,6 @@ packages:}engines: { node: ">= 6" }- resolution:- {- integrity: sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w==,- }-resolution:{@@ -5146,6 +5169,12 @@ packages:}engines: { node: ^18.12.0 || >= 20.9.0 }+ resolution:+ {+ integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==,+ }+resolution:{@@ -5167,6 +5196,30 @@ packages:}engines: { node: ^12.17.0 || ^14.13 || >=16.0.0 }+ resolution:+ {+ integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==,+ }++ resolution:+ {+ integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==,+ }++ resolution:+ {+ integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==,+ }++ resolution:+ {+ integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==,+ }+resolution:{@@ -5270,6 +5323,12 @@ packages:react: ^18.0.0react-dom: ^18.0.0+ resolution:+ {+ integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==,+ }+resolution:{@@ -5309,6 +5368,12 @@ packages:}engines: { node: ">= 0.8" }+ resolution:+ {+ integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==,+ }+resolution:{@@ -5523,6 +5588,12 @@ packages:integrity: sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==,}+ resolution:+ {+ integrity: sha512-c6fcElNV6ShtZXmsgNgFFV5tVX2PaV4g+MOAkb8eXHvn6sryJBrZa9r0zV6+dtTyoCKxtDy5tyQ5ZwQuidtd+Q==,+ }+resolution:{@@ -5610,6 +5681,12 @@ packages:integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==,}+ resolution:+ {+ integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==,+ }+resolution:{@@ -5826,6 +5903,18 @@ packages:}engines: { node: ">= 0.4" }+ resolution:+ {+ integrity: sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ==,+ }++ resolution:+ {+ integrity: sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==,+ }+resolution:{@@ -5854,6 +5943,13 @@ packages:}engines: { node: ">=10" }+ resolution:+ {+ integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==,+ }+ engines: { node: ">=12" }+resolution:{@@ -5952,6 +6048,15 @@ packages:peerDependencies:eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0+ resolution:+ {+ integrity: sha512-jOknh8c7kVan2W1eES+Po2jAkmW98e/ltF01qw9fpSDMockGWo0MvSzzgSUuBN/Dl1eHN9F0pc6/AgTACmOqbw==,+ }+ engines: { node: ">=14.0.0" }+ peerDependencies:+ eslint: ">=7.0.0"+resolution:{@@ -5975,6 +6080,22 @@ packages:}engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 }+ resolution:+ {+ integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==,+ }+ engines: { node: ^10.0.0 || ^12.0.0 || >= 14.0.0 }+ peerDependencies:+ eslint: ">=5"++ resolution:+ {+ integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==,+ }+ engines: { node: ">=10" }+resolution:{@@ -6037,6 +6158,42 @@ packages:}engines: { node: ">=4.0" }+ resolution:+ {+ integrity: sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw==,+ }++ resolution:+ {+ integrity: sha512-8U5eiL6BTrPxp/CHbs2yMgP8ftMhR5ww1eIKoWRMlqvltHF8fZn5LRDvTKuxD3DUn+shRbLGqXemcP51oFCsGQ==,+ }++ resolution:+ {+ integrity: sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==,+ }++ resolution:+ {+ integrity: sha512-2CAASclonf+JFWBNJPndcOpA8EMJwa0Q8LUFJEKqXLW6+qBvbFZuF5gItbQOs/umBUkjviCSDCbBwU2cXbmrhQ==,+ }++ resolution:+ {+ integrity: sha512-WDF+xj5rRWmD5tj6bIqRi6CkLIXbbNQUcxQHzGysQzvHmdYG2G7p/Tf0J0gpxGgkeMZNTIjT/AoSvC9Xehcgdg==,+ }++ resolution:+ {+ integrity: sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==,+ }+resolution:{@@ -6145,13 +6302,6 @@ packages:}engines: { node: ">=8.6.0" }- resolution:- {- integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==,- }- engines: { node: ">=8.6.0" }-resolution:{@@ -6189,17 +6339,6 @@ packages:integrity: sha512-45LSPmWf+gC5tdCQMNH4s9Sr00bIkiD9aN7dc5hqkrEw1geRYyDQS1v1oMHAW3ysfxfndqGsrDREHHjNNbKUfA==,}- resolution:- {- integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==,- }- peerDependencies:- picomatch: ^3 || ^4- peerDependenciesMeta:- picomatch:- optional: true-resolution:{@@ -6598,13 +6737,6 @@ packages:}engines: { node: ">= 0.4" }- resolution:- {- integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==,- }- engines: { node: ">= 0.4" }-resolution:{@@ -6626,25 +6758,43 @@ packages:}engines: { node: ">= 0.4" }resolution:{- integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==,+ integrity: sha512-48+B/rJWAp0jamNbAAf9M7Uf//UVqAoMmgXhBdxTDJLGKY+LRnZ99qcG+Qjl5HfMpYNzS5v4EAwVEF34LeAj7w==,}resolution:{- integrity: sha512-K6GVpucS5wFf44X0h2bLVRDsycgJmf9FF2elg+CrqD8GcFU8c6vYhgXn8NjUkFCwj+xDFb70qgLbTUm6sxwPmA==,+ integrity: sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==,}resolution:{- integrity: sha512-LgOWAkrN0rFaQpfdWBQlv/VhkOxb5AsBjk6NQVx4yEzWS923T07X0M1Y0VNko2H52HeSpZrZNNMJ0aFqsdVzQg==,+ integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==,}+ resolution:+ {+ integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==,+ }++ resolution:+ {+ integrity: sha512-K6GVpucS5wFf44X0h2bLVRDsycgJmf9FF2elg+CrqD8GcFU8c6vYhgXn8NjUkFCwj+xDFb70qgLbTUm6sxwPmA==,+ }++ resolution:+ {+ integrity: sha512-LgOWAkrN0rFaQpfdWBQlv/VhkOxb5AsBjk6NQVx4yEzWS923T07X0M1Y0VNko2H52HeSpZrZNNMJ0aFqsdVzQg==,+ }+resolution:{integrity: sha512-qY60FjREgVZL03vJU6IfMV4GDjGBIoOyvuFdpBDIX9yTlDw0TjxVBQp+P8NvpdIXNJvfWBTNul7fsAQJq2FNpg==,@@ -6757,6 +6907,12 @@ packages:integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==,}+ resolution:+ {+ integrity: sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==,+ }+resolution:{@@ -6777,6 +6933,18 @@ packages:}engines: { node: ">= 0.10" }+ resolution:+ {+ integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==,+ }++ resolution:+ {+ integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==,+ }+resolution:{@@ -6831,13 +6999,6 @@ packages:}engines: { node: ">= 0.4" }- resolution:- {- integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==,- }- engines: { node: ">= 0.4" }-resolution:{@@ -6859,6 +7020,12 @@ packages:}engines: { node: ">= 0.4" }+ resolution:+ {+ integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==,+ }+resolution:{@@ -6908,6 +7075,12 @@ packages:}engines: { node: ">=0.10.0" }+ resolution:+ {+ integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==,+ }+resolution:{@@ -6936,6 +7109,13 @@ packages:}engines: { node: ">=0.12.0" }+ resolution:+ {+ integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==,+ }+ engines: { node: ">=12" }+resolution:{@@ -7289,13 +7469,6 @@ packages:}engines: { node: ">=10" }- resolution:- {- integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==,- }- engines: { node: ">=14" }-resolution:{@@ -7351,6 +7524,18 @@ packages:}engines: { node: ">=10" }+ resolution:+ {+ integrity: sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==,+ }++ resolution:+ {+ integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==,+ }+resolution:{@@ -7377,6 +7562,12 @@ packages:}engines: { node: ">=18" }+ resolution:+ {+ integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==,+ }+resolution:{@@ -7444,6 +7635,19 @@ packages:integrity: sha512-iDwf7mA03WPiR8QxvcVHmVWEPfMY1RZXerDVNCRYW7dUr2ppH3J58Rwb39/WG39yTZdRSxr3x+2v22tvI0VEvA==,}+ resolution:+ {+ integrity: sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==,+ }+ engines: { node: ">=16" }++ resolution:+ {+ integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==,+ }+resolution:{@@ -7467,6 +7671,102 @@ packages:peerDependencies:react: ^18.0 || ^19.0+ resolution:+ {+ integrity: sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==,+ }++ resolution:+ {+ integrity: sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==,+ }++ resolution:+ {+ integrity: sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ==,+ }++ resolution:+ {+ integrity: sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==,+ }++ resolution:+ {+ integrity: sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==,+ }++ resolution:+ {+ integrity: sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==,+ }++ resolution:+ {+ integrity: sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==,+ }++ resolution:+ {+ integrity: sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==,+ }++ resolution:+ {+ integrity: sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==,+ }++ resolution:+ {+ integrity: sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q==,+ }++ resolution:+ {+ integrity: sha512-JfbYLAW7XnYTTbUsmpu0kdBUVe+yKVJZBItEjwyYJiDJuZ9w4eeaqks4HQO+R7objWgS2ymV60GYpI14Ug554w==,+ }++ resolution:+ {+ integrity: sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==,+ }++ resolution:+ {+ integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==,+ }++ resolution:+ {+ integrity: sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==,+ }++ resolution:+ {+ integrity: sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==,+ }++ resolution:+ {+ integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==,+ }+resolution:{@@ -7511,6 +7811,216 @@ packages:}engines: { node: ">= 8" }+ resolution:+ {+ integrity: sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==,+ }++ resolution:+ {+ integrity: sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==,+ }++ resolution:+ {+ integrity: sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==,+ }++ resolution:+ {+ integrity: sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==,+ }++ resolution:+ {+ integrity: sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg==,+ }++ resolution:+ {+ integrity: sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==,+ }++ resolution:+ {+ integrity: sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==,+ }++ resolution:+ {+ integrity: sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==,+ }++ resolution:+ {+ integrity: sha512-dD/ADLJ1AeMvSAKBwO22zG22N4ybhe7kFIZ3LsDI0GlsNr2A3KYxb0LdC1u5rj4Nw+CHKY0RVdnHX8vj8ejm4Q==,+ }++ resolution:+ {+ integrity: sha512-e5+q1DjMh62LZAJOnDraSSbDMvGJ8x3cbjygy2qFEi7HCeUT4BDKCvMozPozcD6WmOt6sVvYDNBKhFSz3kjOVQ==,+ }++ resolution:+ {+ integrity: sha512-EpAiszsB3blw4Rpba7xTOUptcFeBFi+6PY8VnJ2hhimH+vCQDirWgsMpz7w1XcZE7LVrSAUGb9VJpG9ghlYvYQ==,+ }++ resolution:+ {+ integrity: sha512-DJFl4ZqkErRpq/dAPyeWp15tGrcrrJho1hKK5uBS70BCtfrIFg81sqcTVu3Ta+KD1Tk5vAtBNElWxtAa+m8K9A==,+ }++ resolution:+ {+ integrity: sha512-A873fJfhnJ2siZyUrJ31l34Uqwy4xIFmvPY1oj+Ean5PHcPBYzEsvqvWGaWcfEIr11O5Dlw3p2y0tZWpKHDejQ==,+ }++ resolution:+ {+ integrity: sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==,+ }++ resolution:+ {+ integrity: sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==,+ }++ resolution:+ {+ integrity: sha512-kQnEtA3vzucU2BkrIa8/VaSAsP+EJ3CKOvhMuJgOEGg9KDC6OAY6nSnNDVRiVNRqj7Y4SlSzcStaH/5jge8JdQ==,+ }++ resolution:+ {+ integrity: sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==,+ }++ resolution:+ {+ integrity: sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==,+ }++ resolution:+ {+ integrity: sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==,+ }++ resolution:+ {+ integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==,+ }++ resolution:+ {+ integrity: sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==,+ }++ resolution:+ {+ integrity: sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==,+ }++ resolution:+ {+ integrity: sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==,+ }++ resolution:+ {+ integrity: sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==,+ }++ resolution:+ {+ integrity: sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==,+ }++ resolution:+ {+ integrity: sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==,+ }++ resolution:+ {+ integrity: sha512-jmsiEIiZ1n7X1Rr5k8wVExBQCg5jy4UXVADItHmNk1zkwEVhBuIUKRu3fqv+hs4nxLISi2DQGlqIOGiFxgbfHg==,+ }++ resolution:+ {+ integrity: sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==,+ }++ resolution:+ {+ integrity: sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==,+ }++ resolution:+ {+ integrity: sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==,+ }++ resolution:+ {+ integrity: sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==,+ }++ resolution:+ {+ integrity: sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==,+ }++ resolution:+ {+ integrity: sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==,+ }++ resolution:+ {+ integrity: sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==,+ }++ resolution:+ {+ integrity: sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==,+ }+resolution:{@@ -7666,14 +8176,6 @@ packages:engines: { node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1 }hasBin: true- resolution:- {- integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==,- }- engines: { node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1 }- hasBin: true-resolution:{@@ -7985,6 +8487,12 @@ packages:}engines: { node: ">=6" }+ resolution:+ {+ integrity: sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==,+ }+resolution:{@@ -8247,6 +8755,13 @@ packages:peerDependencies:postcss: ^8.0.0+ resolution:+ {+ integrity: sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==,+ }+ engines: { node: ">=4" }+resolution:{@@ -8267,13 +8782,6 @@ packages:}engines: { node: ^10 || ^12 || >=14 }- resolution:- {- integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==,- }- engines: { node: ^10 || ^12 || >=14 }-resolution:{@@ -8430,6 +8938,12 @@ packages:integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==,}+ resolution:+ {+ integrity: sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==,+ }+resolution:{@@ -8705,30 +9219,90 @@ packages:}engines: { node: ">= 14.18.0" }+ resolution:+ {+ integrity: sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew==,+ }++ resolution:+ {+ integrity: sha512-5vwkv65qWwYxg+Atz95acp8DMu1JDSqdGkA2Of1j6rCreyFUE/gp15fC8MnGEuG1W68UKjM6x6+YTWIh7hZM/Q==,+ }++ resolution:+ {+ integrity: sha512-OYLsIGBB5Y5wjnSnQW6t3Xg7q3fQ7FWbw/vcXtORTnyaSFscOtABg+7Pnz6YZ6c27fG1/aN8CjfwoUEUIdwqWQ==,+ }++ resolution:+ {+ integrity: sha512-cjwII1MdIIVloKvC9ErQ+OgAtwHBmcZ0Bg4ciz78FtbT8In39aAYbaA7zvxQ61xVMSPE8WxhLwLbhif4Js2C+g==,+ }+resolution:{- integrity: sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==,+ integrity: sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==,+ }+ engines: { node: ">= 0.4" }++ resolution:+ {+ integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==,+ }++ resolution:+ {+ integrity: sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==,+ }+ engines: { node: ">= 0.4" }++ resolution:+ {+ integrity: sha512-lqA4rGUf1JmacCNWWZx0Wv1dHqMwxzsDWYMTowuplHF3xH0N/MmrZ/G3BDZnzAkRmxDadujCjaKM2hqYdCBOGw==,+ }++ resolution:+ {+ integrity: sha512-aCv3juQw4hT1/P/OrVltKWLlp15eW1GRcwP1XdxHrPdZE9MtgqFpegjnTjLhi2m2WI9MT/hQQtE+tjEWG1hgkQ==,+ }++ resolution:+ {+ integrity: sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==,+ }++ resolution:+ {+ integrity: sha512-Ngl/H3YXyBV9RcRNdlYsZujAmhsxwzxpDzpDEhFBVAGthS4GDgnctpDjgFl/ULx5UEDzqtW1cyBSNKqYYrqLBA==,}- engines: { node: ">= 0.4" }resolution:{- integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==,+ integrity: sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==,}resolution:{- integrity: sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==,+ integrity: sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==,}- engines: { node: ">= 0.4" }resolution:{- integrity: sha512-aCv3juQw4hT1/P/OrVltKWLlp15eW1GRcwP1XdxHrPdZE9MtgqFpegjnTjLhi2m2WI9MT/hQQtE+tjEWG1hgkQ==,+ integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==,}@@ -8855,6 +9429,7 @@ packages:{integrity: sha512-Fwc19jMBA3g+fxDJH2B4WxwZjE0VaaOL7OX/A4Wn5Zv7bOD/vyPZhzXfaO73Xc2GAlfi96g5fGUa378WbIGfFw==,}+ deprecated: Please migrate to the brand new `@rspack/resolver` or `unrs-resolver` insteadresolution:@@ -8939,14 +9514,6 @@ packages:}hasBin: true- resolution:- {- integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==,- }- engines: { node: ">=10" }- hasBin: true-resolution:{@@ -9170,6 +9737,13 @@ packages:}engines: { node: ">=0.10.0" }+ resolution:+ {+ integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==,+ }+ engines: { node: ">= 8" }+resolution:{@@ -9177,6 +9751,12 @@ packages:}engines: { node: ">= 8" }+ resolution:+ {+ integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==,+ }+resolution:{@@ -9285,6 +9865,12 @@ packages:integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==,}+ resolution:+ {+ integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==,+ }+resolution:{@@ -9334,6 +9920,18 @@ packages:}engines: { node: ">=14.16" }+ resolution:+ {+ integrity: sha512-xQcBGDxJb6jjFCTzvQtfiPn6YvvP2O8U1MDIPNfJQlWMYfktPy+iGsHE7cssjs7y84d9fQaK4UF3RIJaAHSoYA==,+ }++ resolution:+ {+ integrity: sha512-G4qppLgKu/k6FwRpHiGiKPaPTFcG3g4wNVX/Qsfu+RqQM30E7Tyu/TEgxcL9PNLF5pdRLwQdE3YKKf+KF2Dzlw==,+ }+resolution:{@@ -9526,13 +10124,6 @@ packages:integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==,}- resolution:- {- integrity: sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==,- }- engines: { node: ">=12.0.0" }-resolution:{@@ -9573,6 +10164,18 @@ packages:}hasBin: true+ resolution:+ {+ integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==,+ }++ resolution:+ {+ integrity: sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==,+ }+resolution:{@@ -9754,6 +10357,48 @@ packages:integrity: sha512-x7bc76x0bm4prf1VLg79uhAzKw8DVboClSN5VxJuQ+LKDOVEW9CdH+VY7SP+vX7xCYQqzzgQpFqz15zeLvAtZQ==,}+ resolution:+ {+ integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==,+ }++ resolution:+ {+ integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==,+ }++ resolution:+ {+ integrity: sha512-KaFVRjoqLyF6YXCbVLNad/eS4+OfPQQn2yOd7zF/h5T/CSL2v8NpN6a5TPvtbXthAGw5nG+PuTtq+DdIZr+cRQ==,+ }++ resolution:+ {+ integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==,+ }++ resolution:+ {+ integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==,+ }++ resolution:+ {+ integrity: sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==,+ }++ resolution:+ {+ integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==,+ }+resolution:{@@ -9866,6 +10511,18 @@ packages:}engines: { node: ">= 0.8" }+ resolution:+ {+ integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==,+ }++ resolution:+ {+ integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==,+ }+resolution:{@@ -10103,14 +10760,6 @@ packages:integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==,}- resolution:- {- integrity: sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==,- }- engines: { node: ">= 14" }- hasBin: true-resolution:{@@ -10176,6 +10825,12 @@ packages:use-sync-external-store:optional: true+ resolution:+ {+ integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==,+ }+snapshots:"@alloc/[email protected]": {}@@ -10269,10 +10924,6 @@ snapshots:dependencies:"@babel/types": 7.26.9- "@babel/[email protected]":- dependencies:- regenerator-runtime: 0.14.1-"@babel/[email protected]":dependencies:regenerator-runtime: 0.14.1@@ -10414,18 +11065,11 @@ snapshots:"@esbuild/[email protected]":optional: true- dependencies:- eslint: 9.26.0([email protected])- eslint-visitor-keys: 3.4.3-dependencies:eslint: 9.26.0([email protected])eslint-visitor-keys: 3.4.3- "@eslint-community/[email protected]": {}-"@eslint-community/[email protected]": {}"@eslint/[email protected]":@@ -10445,7 +11089,7 @@ snapshots:"@eslint/[email protected]":dependencies:ajv: 6.12.6- debug: 4.3.7+ debug: 4.4.0espree: 10.3.0globals: 14.0.0ignore: 5.3.2@@ -10648,12 +11292,6 @@ snapshots:wrap-ansi: 8.1.0wrap-ansi-cjs: [email protected]- "@jridgewell/[email protected]":- dependencies:- "@jridgewell/set-array": 1.2.1- "@jridgewell/sourcemap-codec": 1.5.0- "@jridgewell/trace-mapping": 0.3.25-"@jridgewell/[email protected]":dependencies:"@jridgewell/set-array": 1.2.1@@ -10676,6 +11314,52 @@ snapshots:"@jridgewell/resolve-uri": 3.1.2"@jridgewell/sourcemap-codec": 1.5.0+ dependencies:+ "@mdx-js/mdx": 3.1.0([email protected])+ source-map: 0.7.4+ optionalDependencies:+ webpack: 5.98.0([email protected])+ transitivePeerDependencies:+ - acorn+ - supports-color++ "@mdx-js/[email protected]([email protected])":+ dependencies:+ "@types/estree": 1.0.7+ "@types/estree-jsx": 1.0.5+ "@types/hast": 3.0.4+ "@types/mdx": 2.0.13+ collapse-white-space: 2.1.0+ devlop: 1.1.0+ estree-util-is-identifier-name: 3.0.0+ estree-util-scope: 1.0.0+ estree-walker: 3.0.3+ hast-util-to-jsx-runtime: 2.3.6+ markdown-extensions: 2.0.0+ recma-build-jsx: 1.0.0+ recma-jsx: 1.0.0([email protected])+ recma-stringify: 1.0.0+ rehype-recma: 1.0.0+ remark-mdx: 3.1.0+ remark-parse: 11.0.0+ remark-rehype: 11.1.2+ source-map: 0.7.4+ unified: 11.0.5+ unist-util-position-from-estree: 2.0.0+ unist-util-stringify-position: 4.0.0+ unist-util-visit: 5.0.0+ vfile: 6.0.3+ transitivePeerDependencies:+ - acorn+ - supports-color++ dependencies:+ "@types/mdx": 2.0.13+ "@types/react": 18.3.12+ react: 18.3.1+"@modelcontextprotocol/[email protected]":dependencies:content-type: 1.0.5@@ -10706,6 +11390,13 @@ snapshots:dependencies:fast-glob: 3.3.1+ "@next/[email protected](@mdx-js/[email protected]([email protected])([email protected]([email protected])))(@mdx-js/[email protected](@types/[email protected])([email protected]))":+ dependencies:+ source-map: 0.7.4+ optionalDependencies:+ "@mdx-js/react": 3.1.0(@types/[email protected])([email protected])+"@next/[email protected]":optional: true@@ -10868,7 +11559,7 @@ snapshots:"@opentelemetry/instrumentation": 0.57.2(@opentelemetry/[email protected])"@opentelemetry/semantic-conventions": 1.28.0forwarded-parse: 2.1.2- semver: 7.6.3+ semver: 7.7.1transitivePeerDependencies:- supports-color@@ -10993,7 +11684,7 @@ snapshots:"@types/shimmer": 1.2.0import-in-the-middle: 1.13.1require-in-the-middle: 7.5.2- semver: 7.6.3+ semver: 7.7.1shimmer: 1.2.1transitivePeerDependencies:- supports-color@@ -11054,7 +11745,7 @@ snapshots:"@radix-ui/[email protected]":dependencies:- "@babel/runtime": 7.26.7+ "@babel/runtime": 7.26.9"@radix-ui/[email protected]": {}@@ -11128,7 +11819,7 @@ snapshots:dependencies:- "@babel/runtime": 7.26.7+ "@babel/runtime": 7.26.9react: 18.3.1optionalDependencies:"@types/react": 18.3.12@@ -11141,7 +11832,7 @@ snapshots:dependencies:- "@babel/runtime": 7.26.7+ "@babel/runtime": 7.26.9react: 18.3.1optionalDependencies:"@types/react": 18.3.12@@ -11154,7 +11845,7 @@ snapshots:"@radix-ui/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])":dependencies:- "@babel/runtime": 7.26.7+ "@babel/runtime": 7.26.9"@radix-ui/primitive": 1.0.1"@radix-ui/react-compose-refs": 1.0.1(@types/[email protected])([email protected])"@radix-ui/react-context": 1.0.1(@types/[email protected])([email protected])@@ -11205,7 +11896,7 @@ snapshots:"@radix-ui/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])":dependencies:- "@babel/runtime": 7.26.7+ "@babel/runtime": 7.26.9"@radix-ui/primitive": 1.0.1"@radix-ui/react-compose-refs": 1.0.1(@types/[email protected])([email protected])"@radix-ui/react-primitive": 1.0.3(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])@@ -11247,7 +11938,7 @@ snapshots:dependencies:- "@babel/runtime": 7.26.7+ "@babel/runtime": 7.26.9react: 18.3.1optionalDependencies:"@types/react": 18.3.12@@ -11260,7 +11951,7 @@ snapshots:"@radix-ui/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])":dependencies:- "@babel/runtime": 7.26.7+ "@babel/runtime": 7.26.9"@radix-ui/react-compose-refs": 1.0.1(@types/[email protected])([email protected])"@radix-ui/react-primitive": 1.0.3(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])"@radix-ui/react-use-callback-ref": 1.0.1(@types/[email protected])([email protected])@@ -11283,7 +11974,7 @@ snapshots:dependencies:- "@babel/runtime": 7.26.7+ "@babel/runtime": 7.26.9"@radix-ui/react-use-layout-effect": 1.0.1(@types/[email protected])([email protected])react: 18.3.1optionalDependencies:@@ -11374,7 +12065,7 @@ snapshots:"@radix-ui/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])":dependencies:- "@babel/runtime": 7.26.7+ "@babel/runtime": 7.26.9"@radix-ui/react-primitive": 1.0.3(@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])react: 18.3.1react-dom: 18.3.1([email protected])@@ -11394,7 +12085,7 @@ snapshots:"@radix-ui/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])":dependencies:- "@babel/runtime": 7.26.7+ "@babel/runtime": 7.26.9"@radix-ui/react-compose-refs": 1.0.1(@types/[email protected])([email protected])"@radix-ui/react-use-layout-effect": 1.0.1(@types/[email protected])([email protected])react: 18.3.1@@ -11415,7 +12106,7 @@ snapshots:"@radix-ui/[email protected](@types/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])":dependencies:- "@babel/runtime": 7.26.7+ "@babel/runtime": 7.26.9"@radix-ui/react-slot": 1.0.2(@types/[email protected])([email protected])react: 18.3.1react-dom: 18.3.1([email protected])@@ -11460,7 +12151,7 @@ snapshots:dependencies:- "@babel/runtime": 7.26.7+ "@babel/runtime": 7.26.9"@radix-ui/react-compose-refs": 1.0.1(@types/[email protected])([email protected])react: 18.3.1optionalDependencies:@@ -11526,7 +12217,7 @@ snapshots:dependencies:- "@babel/runtime": 7.26.7+ "@babel/runtime": 7.26.9react: 18.3.1optionalDependencies:"@types/react": 18.3.12@@ -11539,7 +12230,7 @@ snapshots:dependencies:- "@babel/runtime": 7.26.7+ "@babel/runtime": 7.26.9"@radix-ui/react-use-callback-ref": 1.0.1(@types/[email protected])([email protected])react: 18.3.1optionalDependencies:@@ -11554,7 +12245,7 @@ snapshots:dependencies:- "@babel/runtime": 7.26.7+ "@babel/runtime": 7.26.9"@radix-ui/react-use-callback-ref": 1.0.1(@types/[email protected])([email protected])react: 18.3.1optionalDependencies:@@ -11569,7 +12260,7 @@ snapshots:dependencies:- "@babel/runtime": 7.26.7+ "@babel/runtime": 7.26.9react: 18.3.1optionalDependencies:"@types/react": 18.3.12@@ -12879,7 +13570,7 @@ snapshots:"@rollup/pluginutils": 5.1.4([email protected])commondir: 1.0.1estree-walker: 2.0.2- fdir: 6.4.3([email protected])+ fdir: 6.4.4([email protected])is-reference: 1.2.1magic-string: 0.30.17picomatch: 4.0.2@@ -13149,9 +13840,9 @@ snapshots:"@socket.io/[email protected]": {}- "@stagewise/[email protected](@types/[email protected])([email protected])([email protected](@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])":+ "@stagewise/[email protected](@types/[email protected])([email protected])([email protected](@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])":dependencies:- "@stagewise/toolbar-react": 0.1.2(@types/[email protected])([email protected])([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])+ "@stagewise/toolbar-react": 0.1.2(@types/[email protected])([email protected])([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])"@types/react": 18.3.12next: 14.2.15(@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])([email protected]([email protected]))([email protected])react: 18.3.1@@ -13170,9 +13861,9 @@ snapshots:- vite- yaml- "@stagewise/[email protected](@types/[email protected])([email protected])([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])":+ "@stagewise/[email protected](@types/[email protected])([email protected])([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])":dependencies:- "@stagewise/toolbar": 0.2.1(@types/[email protected])([email protected])([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])+ "@stagewise/toolbar": 0.2.1(@types/[email protected])([email protected])([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])"@types/react": 18.3.12react: 18.3.1transitivePeerDependencies:@@ -13190,20 +13881,20 @@ snapshots:- vite- yaml- "@stagewise/[email protected](@types/[email protected])([email protected])([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])":+ "@stagewise/[email protected](@types/[email protected])([email protected])([email protected])([email protected]([email protected]))([email protected])([email protected])([email protected])([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))([email protected])":dependencies:"@preact/compat": 18.3.1([email protected])clsx: 2.1.1javascript-time-ago: 2.5.11lucide-react: 0.503.0([email protected])- postcss-prefix-selector: 2.1.1([email protected])+ postcss-prefix-selector: 2.1.1([email protected])preact: 10.26.6react-remove-scroll: 2.6.3(@types/[email protected])([email protected])superjson: 2.2.2tailwind-merge: 3.3.0tailwindcss: 4.1.7- tsup: 8.5.0([email protected])([email protected])([email protected])([email protected])([email protected])+ tsup: 8.5.0([email protected])([email protected])([email protected])([email protected])([email protected])ua-parser-js: 2.0.3vite-plugin-css-injected-by-js: 3.5.2([email protected](@types/[email protected])([email protected])([email protected])([email protected])([email protected]))zod: 3.24.4@@ -13252,6 +13943,14 @@ snapshots:transitivePeerDependencies:- arktype+ "@tailwindcss/[email protected]([email protected])":+ dependencies:+ lodash.castarray: 4.4.0+ lodash.isplainobject: 4.0.6+ lodash.merge: 4.6.2+ postcss-selector-parser: 6.0.10+ tailwindcss: 3.4.14+dependencies:"@tanstack/virtual-core": 3.13.9@@ -13273,6 +13972,10 @@ snapshots:dependencies:"@types/node": 22.8.1+ "@types/[email protected]":+ dependencies:+ "@types/ms": 2.1.0+"@types/[email protected]":dependencies:"@types/eslint": 9.6.1@@ -13283,16 +13986,30 @@ snapshots:"@types/estree": 1.0.7"@types/json-schema": 7.0.15- "@types/[email protected]": {}+ "@types/[email protected]":+ dependencies:+ "@types/estree": 1.0.7"@types/[email protected]": {}"@types/[email protected]": {}+ "@types/[email protected]":+ dependencies:+ "@types/unist": 3.0.3+"@types/[email protected]": {}"@types/[email protected]": {}+ "@types/[email protected]":+ dependencies:+ "@types/unist": 3.0.3++ "@types/[email protected]": {}++ "@types/[email protected]": {}+"@types/[email protected]":dependencies:"@types/node": 22.8.1@@ -13347,22 +14064,9 @@ snapshots:"@types/[email protected]": {}- "@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])":- dependencies:- "@eslint-community/regexpp": 4.11.1- "@typescript-eslint/scope-manager": 8.28.0- "@typescript-eslint/visitor-keys": 8.28.0- eslint: 9.26.0([email protected])- graphemer: 1.4.0- ignore: 5.3.2- natural-compare: 1.4.0- ts-api-utils: 2.1.0([email protected])- typescript: 5.8.3- transitivePeerDependencies:- - supports-color+ "@types/[email protected]": {}++ "@types/[email protected]": {}"@typescript-eslint/[email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])":dependencies:@@ -13381,18 +14085,6 @@ snapshots:transitivePeerDependencies:- supports-color- dependencies:- "@typescript-eslint/scope-manager": 8.28.0- "@typescript-eslint/types": 8.28.0- "@typescript-eslint/typescript-estree": 8.28.0([email protected])- "@typescript-eslint/visitor-keys": 8.28.0- debug: 4.3.7- eslint: 9.26.0([email protected])- typescript: 5.8.3- transitivePeerDependencies:- - supports-color-dependencies:"@typescript-eslint/scope-manager": 8.32.0@@ -13405,27 +14097,11 @@ snapshots:transitivePeerDependencies:- supports-color- "@typescript-eslint/[email protected]":- dependencies:- "@typescript-eslint/types": 8.28.0- "@typescript-eslint/visitor-keys": 8.28.0-"@typescript-eslint/[email protected]":dependencies:"@typescript-eslint/types": 8.32.0"@typescript-eslint/visitor-keys": 8.32.0- dependencies:- "@typescript-eslint/typescript-estree": 8.28.0([email protected])- debug: 4.4.0- eslint: 9.26.0([email protected])- ts-api-utils: 2.1.0([email protected])- typescript: 5.8.3- transitivePeerDependencies:- - supports-color-dependencies:"@typescript-eslint/typescript-estree": 8.32.0([email protected])@@ -13437,24 +14113,8 @@ snapshots:transitivePeerDependencies:- supports-color- "@typescript-eslint/[email protected]": {}-"@typescript-eslint/[email protected]": {}- "@typescript-eslint/[email protected]([email protected])":- dependencies:- "@typescript-eslint/types": 8.28.0- "@typescript-eslint/visitor-keys": 8.28.0- debug: 4.4.0- fast-glob: 3.3.2- is-glob: 4.0.3- minimatch: 9.0.5- semver: 7.6.3- ts-api-utils: 2.1.0([email protected])- typescript: 5.8.3- transitivePeerDependencies:- - supports-color-"@typescript-eslint/[email protected]([email protected])":dependencies:"@typescript-eslint/types": 8.32.0@@ -13469,17 +14129,6 @@ snapshots:transitivePeerDependencies:- supports-color- dependencies:- "@eslint-community/eslint-utils": 4.4.0([email protected]([email protected]))- "@typescript-eslint/scope-manager": 8.28.0- "@typescript-eslint/types": 8.28.0- "@typescript-eslint/typescript-estree": 8.28.0([email protected])- eslint: 9.26.0([email protected])- typescript: 5.8.3- transitivePeerDependencies:- - supports-color-dependencies:"@eslint-community/eslint-utils": 4.7.0([email protected]([email protected]))@@ -13491,11 +14140,6 @@ snapshots:transitivePeerDependencies:- supports-color- "@typescript-eslint/[email protected]":- dependencies:- "@typescript-eslint/types": 8.28.0- eslint-visitor-keys: 4.2.0-"@typescript-eslint/[email protected]":dependencies:"@typescript-eslint/types": 8.32.0@@ -13532,6 +14176,8 @@ snapshots:"@typescript/native-preview-win32-arm64": 7.0.0-dev.20250525.1"@typescript/native-preview-win32-x64": 7.0.0-dev.20250525.1+ "@ungap/[email protected]": {}+"@unrs/[email protected]":optional: true@@ -13821,18 +14467,20 @@ snapshots:+ [email protected]: {}+dependencies:browserslist: 4.24.4caniuse-lite: 1.0.30001707fraction.js: 4.3.7normalize-range: 0.1.2picocolors: 1.1.1- postcss: 8.4.47+ postcss: 8.5.3postcss-value-parser: 4.2.0@@ -13843,6 +14491,8 @@ snapshots:+ [email protected]: {}+@@ -13957,8 +14607,6 @@ snapshots:- [email protected]: {}-@@ -13967,6 +14615,8 @@ snapshots:prebuild-install: 7.1.3optional: true+ [email protected]: {}+dependencies:ansi-styles: 4.3.0@@ -13979,6 +14629,14 @@ snapshots:+ [email protected]: {}++ [email protected]: {}++ [email protected]: {}++ [email protected]: {}+dependencies:anymatch: 3.1.3@@ -14039,6 +14697,8 @@ snapshots:- "@types/react"- "@types/react-dom"+ [email protected]: {}+dependencies:color-name: 1.1.4@@ -14062,6 +14722,8 @@ snapshots:dependencies:delayed-stream: 1.0.0+ [email protected]: {}+@@ -14151,6 +14813,10 @@ snapshots:+ dependencies:+ character-entities: 2.0.2+dependencies:mimic-response: 3.1.0@@ -14192,6 +14858,10 @@ snapshots:+ dependencies:+ dequal: 2.0.3+@@ -14378,6 +15048,20 @@ snapshots:is-date-object: 1.1.0is-symbol: 1.1.1+ dependencies:+ "@types/estree-jsx": 1.0.5+ devlop: 1.1.0+ estree-util-visit: 2.0.0+ unist-util-position-from-estree: 2.0.0++ dependencies:+ "@types/estree-jsx": 1.0.5+ acorn: 8.14.1+ esast-util-from-estree: 2.0.0+ vfile-message: 4.0.2+optionalDependencies:"@esbuild/aix-ppc64": 0.25.0@@ -14412,16 +15096,18 @@ snapshots:+ [email protected]: {}+dependencies:"@next/eslint-plugin-next": 15.2.3"@rushstack/eslint-patch": 1.11.0- "@typescript-eslint/eslint-plugin": 8.28.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])+ "@typescript-eslint/eslint-plugin": 8.32.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])eslint: 9.26.0([email protected])eslint-import-resolver-node: 0.3.9- eslint-plugin-import: 2.31.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))+ eslint-plugin-import: 2.31.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected]))eslint-plugin-jsx-a11y: 6.10.2([email protected]([email protected]))eslint-plugin-react: 7.37.4([email protected]([email protected]))eslint-plugin-react-hooks: 5.2.0([email protected]([email protected]))@@ -14449,23 +15135,24 @@ snapshots:is-bun-module: 1.3.0rspack-resolver: 1.2.2stable-hash: 0.0.5- tinyglobby: 0.2.12+ tinyglobby: 0.2.13optionalDependencies:- eslint-plugin-import: 2.31.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected]))+ eslint-plugin-import: 2.31.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected]))transitivePeerDependencies:- supports-color- [email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected])):+ [email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected]([email protected])):dependencies:debug: 3.2.7optionalDependencies:eslint: 9.26.0([email protected])eslint-import-resolver-node: 0.3.9transitivePeerDependencies:- supports-color- [email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected]([email protected])):+ [email protected](@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected])):dependencies:"@rtsao/scc": 1.1.0array-includes: 3.1.8@@ -14476,7 +15163,7 @@ snapshots:doctrine: 2.1.0eslint: 9.26.0([email protected])eslint-import-resolver-node: 0.3.9- eslint-module-utils: 2.12.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected]([email protected]))+ eslint-module-utils: 2.12.0(@typescript-eslint/[email protected]([email protected]([email protected]))([email protected]))([email protected])([email protected])([email protected]([email protected]))hasown: 2.0.2is-core-module: 2.16.1is-glob: 4.0.3@@ -14522,6 +15209,11 @@ snapshots:dependencies:eslint: 9.26.0([email protected])+ dependencies:+ eslint: 9.26.0([email protected])+ eslint-utils: 3.0.0([email protected]([email protected]))+dependencies:array-includes: 3.1.8@@ -14554,6 +15246,13 @@ snapshots:esrecurse: 4.3.0estraverse: 5.3.0+ dependencies:+ eslint: 9.26.0([email protected])+ eslint-visitor-keys: 2.1.0++ [email protected]: {}+@@ -14616,9 +15315,38 @@ snapshots:dependencies:estraverse: 5.3.0- [email protected]: {}+ [email protected]: {}++ [email protected]: {}++ dependencies:+ "@types/estree": 1.0.7++ dependencies:+ "@types/estree-jsx": 1.0.5+ devlop: 1.1.0+ estree-util-is-identifier-name: 3.0.0+ estree-walker: 3.0.3++ [email protected]: {}++ dependencies:+ "@types/estree": 1.0.7+ devlop: 1.1.0++ dependencies:+ "@types/estree-jsx": 1.0.5+ astring: 1.9.0+ source-map: 0.7.4- [email protected]: {}+ dependencies:+ "@types/estree-jsx": 1.0.5+ "@types/unist": 3.0.3@@ -14705,14 +15433,6 @@ snapshots:merge2: 1.4.1micromatch: 4.0.8- dependencies:- "@nodelib/fs.stat": 2.0.5- "@nodelib/fs.walk": 1.2.8- glob-parent: 5.1.2- merge2: 1.4.1- micromatch: 4.0.8-dependencies:"@nodelib/fs.stat": 2.0.5@@ -14735,10 +15455,6 @@ snapshots:dependencies:walk-up-path: 3.0.1- optionalDependencies:- picomatch: 4.0.2-optionalDependencies:picomatch: 4.0.2@@ -15012,18 +15728,61 @@ snapshots:dependencies:dunder-proto: 1.0.1- [email protected]: {}-dependencies:- has-symbols: 1.0.3+ has-symbols: 1.1.0dependencies:function-bind: 1.1.2+ dependencies:+ "@types/estree": 1.0.7+ "@types/estree-jsx": 1.0.5+ "@types/hast": 3.0.4+ comma-separated-tokens: 2.0.3+ devlop: 1.1.0+ estree-util-attach-comments: 3.0.0+ estree-util-is-identifier-name: 3.0.0+ hast-util-whitespace: 3.0.0+ mdast-util-mdx-expression: 2.0.1+ mdast-util-mdx-jsx: 3.2.0+ mdast-util-mdxjs-esm: 2.0.1+ property-information: 7.1.0+ space-separated-tokens: 2.0.2+ style-to-js: 1.1.17+ unist-util-position: 5.0.0+ zwitch: 2.0.4+ transitivePeerDependencies:+ - supports-color++ dependencies:+ "@types/estree": 1.0.7+ "@types/hast": 3.0.4+ "@types/unist": 3.0.3+ comma-separated-tokens: 2.0.3+ devlop: 1.1.0+ estree-util-is-identifier-name: 3.0.0+ hast-util-whitespace: 3.0.0+ mdast-util-mdx-expression: 2.0.1+ mdast-util-mdx-jsx: 3.2.0+ mdast-util-mdxjs-esm: 2.0.1+ property-information: 7.1.0+ space-separated-tokens: 2.0.2+ style-to-js: 1.1.17+ unist-util-position: 5.0.0+ vfile-message: 4.0.2+ transitivePeerDependencies:+ - supports-color++ dependencies:+ "@types/hast": 3.0.4+dependencies:react-is: 16.13.1@@ -15106,6 +15865,8 @@ snapshots:optional: true+ [email protected]: {}+dependencies:es-errors: 1.3.0@@ -15121,6 +15882,13 @@ snapshots:+ [email protected]: {}++ dependencies:+ is-alphabetical: 2.0.1+ is-decimal: 2.0.1+dependencies:call-bind: 1.0.8@@ -15156,10 +15924,6 @@ snapshots:- dependencies:- hasown: 2.0.2-dependencies:hasown: 2.0.2@@ -15175,6 +15939,8 @@ snapshots:call-bound: 1.0.4has-tostringtag: 1.0.2+ [email protected]: {}+@@ -15200,6 +15966,8 @@ snapshots:dependencies:is-extglob: 2.1.1+ [email protected]: {}+@@ -15211,11 +15979,13 @@ snapshots:+ [email protected]: {}+dependencies:- "@types/estree": 1.0.6+ "@types/estree": 1.0.7dependencies:@@ -15411,8 +16181,6 @@ snapshots:- [email protected]: {}-@@ -15454,6 +16222,10 @@ snapshots:dependencies:p-locate: 5.0.0+ [email protected]: {}++ [email protected]: {}+@@ -15471,6 +16243,8 @@ snapshots:strip-ansi: 7.1.0wrap-ansi: 9.0.0+ [email protected]: {}+dependencies:js-tokens: 4.0.0@@ -15503,6 +16277,10 @@ snapshots:+ [email protected]: {}++ [email protected]: {}+@@ -15512,6 +16290,169 @@ snapshots:marked: 7.0.4react: 18.3.1+ dependencies:+ "@types/mdast": 4.0.4+ escape-string-regexp: 5.0.0+ unist-util-is: 6.0.0+ unist-util-visit-parents: 6.0.1++ dependencies:+ "@types/mdast": 4.0.4+ "@types/unist": 3.0.3+ decode-named-character-reference: 1.2.0+ devlop: 1.1.0+ mdast-util-to-string: 4.0.0+ micromark: 4.0.2+ micromark-util-decode-numeric-character-reference: 2.0.2+ micromark-util-decode-string: 2.0.1+ micromark-util-normalize-identifier: 2.0.1+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2+ unist-util-stringify-position: 4.0.0+ transitivePeerDependencies:+ - supports-color++ dependencies:+ "@types/mdast": 4.0.4+ ccount: 2.0.1+ devlop: 1.1.0+ mdast-util-find-and-replace: 3.0.2+ micromark-util-character: 2.1.1++ dependencies:+ "@types/mdast": 4.0.4+ devlop: 1.1.0+ mdast-util-from-markdown: 2.0.2+ mdast-util-to-markdown: 2.1.2+ micromark-util-normalize-identifier: 2.0.1+ transitivePeerDependencies:+ - supports-color++ dependencies:+ "@types/mdast": 4.0.4+ mdast-util-from-markdown: 2.0.2+ mdast-util-to-markdown: 2.1.2+ transitivePeerDependencies:+ - supports-color++ dependencies:+ "@types/mdast": 4.0.4+ devlop: 1.1.0+ markdown-table: 3.0.4+ mdast-util-from-markdown: 2.0.2+ mdast-util-to-markdown: 2.1.2+ transitivePeerDependencies:+ - supports-color++ dependencies:+ "@types/mdast": 4.0.4+ devlop: 1.1.0+ mdast-util-from-markdown: 2.0.2+ mdast-util-to-markdown: 2.1.2+ transitivePeerDependencies:+ - supports-color++ dependencies:+ mdast-util-from-markdown: 2.0.2+ mdast-util-gfm-autolink-literal: 2.0.1+ mdast-util-gfm-footnote: 2.1.0+ mdast-util-gfm-strikethrough: 2.0.0+ mdast-util-gfm-table: 2.0.0+ mdast-util-gfm-task-list-item: 2.0.0+ mdast-util-to-markdown: 2.1.2+ transitivePeerDependencies:+ - supports-color++ dependencies:+ "@types/estree-jsx": 1.0.5+ "@types/hast": 3.0.4+ "@types/mdast": 4.0.4+ devlop: 1.1.0+ mdast-util-from-markdown: 2.0.2+ mdast-util-to-markdown: 2.1.2+ transitivePeerDependencies:+ - supports-color++ dependencies:+ "@types/estree-jsx": 1.0.5+ "@types/hast": 3.0.4+ "@types/mdast": 4.0.4+ "@types/unist": 3.0.3+ ccount: 2.0.1+ devlop: 1.1.0+ mdast-util-from-markdown: 2.0.2+ mdast-util-to-markdown: 2.1.2+ parse-entities: 4.0.2+ stringify-entities: 4.0.4+ unist-util-stringify-position: 4.0.0+ vfile-message: 4.0.2+ transitivePeerDependencies:+ - supports-color++ dependencies:+ mdast-util-from-markdown: 2.0.2+ mdast-util-mdx-expression: 2.0.1+ mdast-util-mdx-jsx: 3.2.0+ mdast-util-mdxjs-esm: 2.0.1+ mdast-util-to-markdown: 2.1.2+ transitivePeerDependencies:+ - supports-color++ dependencies:+ "@types/estree-jsx": 1.0.5+ "@types/hast": 3.0.4+ "@types/mdast": 4.0.4+ devlop: 1.1.0+ mdast-util-from-markdown: 2.0.2+ mdast-util-to-markdown: 2.1.2+ transitivePeerDependencies:+ - supports-color++ dependencies:+ "@types/mdast": 4.0.4+ unist-util-is: 6.0.0++ dependencies:+ "@types/hast": 3.0.4+ "@types/mdast": 4.0.4+ "@ungap/structured-clone": 1.3.0+ devlop: 1.1.0+ micromark-util-sanitize-uri: 2.0.1+ trim-lines: 3.0.1+ unist-util-position: 5.0.0+ unist-util-visit: 5.0.0+ vfile: 6.0.3++ dependencies:+ "@types/mdast": 4.0.4+ "@types/unist": 3.0.3+ longest-streak: 3.1.0+ mdast-util-phrasing: 4.1.0+ mdast-util-to-string: 4.0.0+ micromark-util-classify-character: 2.0.1+ micromark-util-decode-string: 2.0.1+ unist-util-visit: 5.0.0+ zwitch: 2.0.4++ dependencies:+ "@types/mdast": 4.0.4+@@ -15526,6 +16467,270 @@ snapshots:+ dependencies:+ decode-named-character-reference: 1.2.0+ devlop: 1.1.0+ micromark-factory-destination: 2.0.1+ micromark-factory-label: 2.0.1+ micromark-factory-space: 2.0.1+ micromark-factory-title: 2.0.1+ micromark-factory-whitespace: 2.0.1+ micromark-util-character: 2.1.1+ micromark-util-chunked: 2.0.1+ micromark-util-classify-character: 2.0.1+ micromark-util-html-tag-name: 2.0.1+ micromark-util-normalize-identifier: 2.0.1+ micromark-util-resolve-all: 2.0.1+ micromark-util-subtokenize: 2.1.0+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2++ dependencies:+ micromark-util-character: 2.1.1+ micromark-util-sanitize-uri: 2.0.1+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2++ dependencies:+ devlop: 1.1.0+ micromark-core-commonmark: 2.0.3+ micromark-factory-space: 2.0.1+ micromark-util-character: 2.1.1+ micromark-util-normalize-identifier: 2.0.1+ micromark-util-sanitize-uri: 2.0.1+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2++ dependencies:+ devlop: 1.1.0+ micromark-util-chunked: 2.0.1+ micromark-util-classify-character: 2.0.1+ micromark-util-resolve-all: 2.0.1+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2++ dependencies:+ devlop: 1.1.0+ micromark-factory-space: 2.0.1+ micromark-util-character: 2.1.1+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2++ dependencies:+ micromark-util-types: 2.0.2++ dependencies:+ devlop: 1.1.0+ micromark-factory-space: 2.0.1+ micromark-util-character: 2.1.1+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2++ dependencies:+ micromark-extension-gfm-autolink-literal: 2.1.0+ micromark-extension-gfm-footnote: 2.1.0+ micromark-extension-gfm-strikethrough: 2.1.0+ micromark-extension-gfm-table: 2.1.1+ micromark-extension-gfm-tagfilter: 2.0.0+ micromark-extension-gfm-task-list-item: 2.1.0+ micromark-util-combine-extensions: 2.0.1+ micromark-util-types: 2.0.2++ dependencies:+ "@types/estree": 1.0.7+ devlop: 1.1.0+ micromark-factory-mdx-expression: 2.0.3+ micromark-factory-space: 2.0.1+ micromark-util-character: 2.1.1+ micromark-util-events-to-acorn: 2.0.3+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2++ dependencies:+ "@types/estree": 1.0.7+ devlop: 1.1.0+ estree-util-is-identifier-name: 3.0.0+ micromark-factory-mdx-expression: 2.0.3+ micromark-factory-space: 2.0.1+ micromark-util-character: 2.1.1+ micromark-util-events-to-acorn: 2.0.3+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2+ vfile-message: 4.0.2++ dependencies:+ micromark-util-types: 2.0.2++ dependencies:+ "@types/estree": 1.0.7+ devlop: 1.1.0+ micromark-core-commonmark: 2.0.3+ micromark-util-character: 2.1.1+ micromark-util-events-to-acorn: 2.0.3+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2+ unist-util-position-from-estree: 2.0.0+ vfile-message: 4.0.2++ dependencies:+ acorn: 8.14.1+ acorn-jsx: 5.3.2([email protected])+ micromark-extension-mdx-expression: 3.0.1+ micromark-extension-mdx-jsx: 3.0.2+ micromark-extension-mdx-md: 2.0.0+ micromark-extension-mdxjs-esm: 3.0.0+ micromark-util-combine-extensions: 2.0.1+ micromark-util-types: 2.0.2++ dependencies:+ micromark-util-character: 2.1.1+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2++ dependencies:+ devlop: 1.1.0+ micromark-util-character: 2.1.1+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2++ dependencies:+ "@types/estree": 1.0.7+ devlop: 1.1.0+ micromark-factory-space: 2.0.1+ micromark-util-character: 2.1.1+ micromark-util-events-to-acorn: 2.0.3+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2+ unist-util-position-from-estree: 2.0.0+ vfile-message: 4.0.2++ dependencies:+ micromark-util-character: 2.1.1+ micromark-util-types: 2.0.2++ dependencies:+ micromark-factory-space: 2.0.1+ micromark-util-character: 2.1.1+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2++ dependencies:+ micromark-factory-space: 2.0.1+ micromark-util-character: 2.1.1+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2++ dependencies:+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2++ dependencies:+ micromark-util-symbol: 2.0.1++ dependencies:+ micromark-util-character: 2.1.1+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2++ dependencies:+ micromark-util-chunked: 2.0.1+ micromark-util-types: 2.0.2++ dependencies:+ micromark-util-symbol: 2.0.1++ dependencies:+ decode-named-character-reference: 1.2.0+ micromark-util-character: 2.1.1+ micromark-util-decode-numeric-character-reference: 2.0.2+ micromark-util-symbol: 2.0.1++ [email protected]: {}++ dependencies:+ "@types/estree": 1.0.7+ "@types/unist": 3.0.3+ devlop: 1.1.0+ estree-util-visit: 2.0.0+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2+ vfile-message: 4.0.2++ [email protected]: {}++ dependencies:+ micromark-util-symbol: 2.0.1++ dependencies:+ micromark-util-types: 2.0.2++ dependencies:+ micromark-util-character: 2.1.1+ micromark-util-encode: 2.0.1+ micromark-util-symbol: 2.0.1++ dependencies:+ devlop: 1.1.0+ micromark-util-chunked: 2.0.1+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2++ [email protected]: {}++ [email protected]: {}++ dependencies:+ "@types/debug": 4.1.12+ debug: 4.4.0+ decode-named-character-reference: 1.2.0+ devlop: 1.1.0+ micromark-core-commonmark: 2.0.3+ micromark-factory-space: 2.0.1+ micromark-util-character: 2.1.1+ micromark-util-chunked: 2.0.1+ micromark-util-combine-extensions: 2.0.1+ micromark-util-decode-numeric-character-reference: 2.0.2+ micromark-util-encode: 2.0.1+ micromark-util-normalize-identifier: 2.0.1+ micromark-util-resolve-all: 2.0.1+ micromark-util-sanitize-uri: 2.0.1+ micromark-util-subtokenize: 2.1.0+ micromark-util-symbol: 2.0.1+ micromark-util-types: 2.0.2+ transitivePeerDependencies:+ - supports-color+dependencies:braces: 3.0.3@@ -15596,8 +16801,6 @@ snapshots:- [email protected]: {}-optional: true@@ -15624,7 +16827,7 @@ snapshots:"@next/env": 14.2.15"@swc/helpers": 0.5.5busboy: 1.6.0- caniuse-lite: 1.0.30001669+ caniuse-lite: 1.0.30001707graceful-fs: 4.2.11postcss: 8.4.31react: 18.3.1@@ -15810,6 +17013,16 @@ snapshots:dependencies:callsites: 3.1.0+ dependencies:+ "@types/unist": 2.0.11+ character-entities-legacy: 3.0.0+ character-reference-invalid: 2.0.1+ decode-named-character-reference: 1.2.0+ is-alphanumerical: 2.0.1+ is-decimal: 2.0.1+ is-hexadecimal: 2.0.1+@@ -15895,42 +17108,47 @@ snapshots:dependencies:- postcss: 8.4.47+ postcss: 8.5.3postcss-value-parser: 4.2.0read-cache: 1.0.0- resolve: 1.22.8+ resolve: 1.22.10dependencies:camelcase-css: 2.0.1- postcss: 8.4.47+ postcss: 8.5.3dependencies:- lilconfig: 3.1.2- yaml: 2.6.0+ lilconfig: 3.1.3+ yaml: 2.7.0optionalDependencies:- postcss: 8.4.47+ postcss: 8.5.3dependencies:lilconfig: 3.1.3optionalDependencies:jiti: 2.4.2- postcss: 8.4.47+ postcss: 8.5.3tsx: 4.19.4yaml: 2.7.0dependencies:- postcss: 8.4.47+ postcss: 8.5.3postcss-selector-parser: 6.1.2+ dependencies:+ postcss: 8.5.3+dependencies:- postcss: 8.4.47+ cssesc: 3.0.0+ util-deprecate: 1.0.2dependencies:@@ -15941,13 +17159,7 @@ snapshots:dependencies:- nanoid: 3.3.7- picocolors: 1.1.1- source-map-js: 1.2.1-- dependencies:- nanoid: 3.3.7+ nanoid: 3.3.11picocolors: 1.1.1source-map-js: 1.2.1@@ -16007,6 +17219,8 @@ snapshots:object-assign: 4.1.1react-is: 16.13.1+ [email protected]: {}+dependencies:forwarded: 0.2.0@@ -16326,6 +17540,36 @@ snapshots:+ dependencies:+ "@types/estree": 1.0.7+ estree-util-build-jsx: 3.0.1+ vfile: 6.0.3++ dependencies:+ acorn-jsx: 5.3.2([email protected])+ estree-util-to-js: 2.0.0+ recma-parse: 1.0.0+ recma-stringify: 1.0.0+ unified: 11.0.5+ transitivePeerDependencies:+ - acorn++ dependencies:+ "@types/estree": 1.0.7+ esast-util-from-js: 2.0.1+ unified: 11.0.5+ vfile: 6.0.3++ dependencies:+ "@types/estree": 1.0.7+ estree-util-to-js: 2.0.0+ unified: 11.0.5+ vfile: 6.0.3+dependencies:call-bind: 1.0.8@@ -16348,15 +17592,64 @@ snapshots:gopd: 1.2.0set-function-name: 2.0.2+ dependencies:+ "@types/estree": 1.0.7+ "@types/hast": 3.0.4+ hast-util-to-estree: 3.1.3+ transitivePeerDependencies:+ - supports-color++ dependencies:+ "@types/mdast": 4.0.4+ mdast-util-gfm: 3.1.0+ micromark-extension-gfm: 3.0.0+ remark-parse: 11.0.0+ remark-stringify: 11.0.0+ unified: 11.0.5+ transitivePeerDependencies:+ - supports-color++ dependencies:+ mdast-util-mdx: 3.0.0+ micromark-extension-mdxjs: 3.0.0+ transitivePeerDependencies:+ - supports-color++ dependencies:+ "@types/mdast": 4.0.4+ mdast-util-from-markdown: 2.0.2+ micromark-util-types: 2.0.2+ unified: 11.0.5+ transitivePeerDependencies:+ - supports-color++ dependencies:+ "@types/hast": 3.0.4+ "@types/mdast": 4.0.4+ mdast-util-to-hast: 13.2.0+ unified: 11.0.5+ vfile: 6.0.3++ dependencies:+ "@types/mdast": 4.0.4+ mdast-util-to-markdown: 2.1.2+ unified: 11.0.5+dependencies:debug: 4.4.0module-details-from-path: 1.0.3- resolve: 1.22.8+ resolve: 1.22.10transitivePeerDependencies:- supports-color@@ -16381,7 +17674,7 @@ snapshots:dependencies:- is-core-module: 2.15.1+ is-core-module: 2.16.1path-parse: 1.0.7supports-preserve-symlinks-flag: 1.0.0@@ -16511,8 +17804,6 @@ snapshots:- [email protected]: {}-@@ -16709,10 +18000,14 @@ snapshots:+ [email protected]: {}+dependencies:whatwg-url: 7.1.0+ [email protected]: {}+@@ -16801,6 +18096,11 @@ snapshots:dependencies:safe-buffer: 5.2.1+ dependencies:+ character-entities-html4: 2.1.0+ character-entities-legacy: 3.0.0+dependencies:ansi-regex: 5.0.1@@ -16820,6 +18120,14 @@ snapshots:+ dependencies:+ style-to-object: 1.0.9++ dependencies:+ inline-style-parser: 0.2.4+dependencies:client-only: 0.0.1@@ -16836,7 +18144,7 @@ snapshots:dependencies:- "@jridgewell/gen-mapping": 0.3.5+ "@jridgewell/gen-mapping": 0.3.8commander: 4.1.1glob: 10.4.5lines-and-columns: 1.2.4@@ -16877,7 +18185,7 @@ snapshots:chokidar: 3.6.0didyoumean: 1.2.2dlv: 1.1.3- fast-glob: 3.3.2+ fast-glob: 3.3.3glob-parent: 6.0.2is-glob: 4.0.3jiti: 1.21.6@@ -16886,13 +18194,13 @@ snapshots:normalize-path: 3.0.0object-hash: 3.0.0picocolors: 1.1.1- postcss: 8.4.47- postcss-import: 15.1.0([email protected])- postcss-js: 4.0.1([email protected])- postcss-load-config: 4.0.2([email protected])- postcss-nested: 6.2.0([email protected])+ postcss: 8.5.3+ postcss-import: 15.1.0([email protected])+ postcss-js: 4.0.1([email protected])+ postcss-load-config: 4.0.2([email protected])+ postcss-nested: 6.2.0([email protected])postcss-selector-parser: 6.1.2- resolve: 1.22.8+ resolve: 1.22.10sucrase: 3.35.0transitivePeerDependencies:- ts-node@@ -16950,11 +18258,6 @@ snapshots:- dependencies:- fdir: 6.4.3([email protected])- picomatch: 4.0.2-dependencies:fdir: 6.4.4([email protected])@@ -16974,6 +18277,10 @@ snapshots:+ [email protected]: {}++ [email protected]: {}+dependencies:typescript: 5.8.3@@ -16989,7 +18296,7 @@ snapshots:- [email protected]([email protected])([email protected])([email protected])([email protected])([email protected]):+ [email protected]([email protected])([email protected])([email protected])([email protected])([email protected]):dependencies:bundle-require: 5.1.0([email protected])cac: 6.7.14@@ -17000,16 +18307,16 @@ snapshots:fix-dts-default-cjs-exports: 1.0.1joycon: 3.1.1picocolors: 1.1.1- postcss-load-config: 6.0.1([email protected])([email protected])([email protected])([email protected])+ postcss-load-config: 6.0.1([email protected])([email protected])([email protected])([email protected])resolve-from: 5.0.0rollup: 4.41.0source-map: 0.8.0-beta.0sucrase: 3.35.0tinyexec: 0.3.2- tinyglobby: 0.2.12+ tinyglobby: 0.2.13tree-kill: 1.2.2optionalDependencies:- postcss: 8.4.47+ postcss: 8.5.3typescript: 5.8.3transitivePeerDependencies:- jiti@@ -17121,6 +18428,43 @@ snapshots:pako: 0.2.9tiny-inflate: 1.0.3+ dependencies:+ "@types/unist": 3.0.3+ bail: 2.0.2+ devlop: 1.1.0+ extend: 3.0.2+ is-plain-obj: 4.1.0+ trough: 2.2.0+ vfile: 6.0.3++ dependencies:+ "@types/unist": 3.0.3++ dependencies:+ "@types/unist": 3.0.3++ dependencies:+ "@types/unist": 3.0.3++ dependencies:+ "@types/unist": 3.0.3++ dependencies:+ "@types/unist": 3.0.3+ unist-util-is: 6.0.0++ dependencies:+ "@types/unist": 3.0.3+ unist-util-is: 6.0.0+ unist-util-visit-parents: 6.0.1+@@ -17184,6 +18528,16 @@ snapshots:+ dependencies:+ "@types/unist": 3.0.3+ unist-util-stringify-position: 4.0.0++ dependencies:+ "@types/unist": 3.0.3+ vfile-message: 4.0.2+dependencies:inherits: 2.0.4@@ -17350,8 +18704,6 @@ snapshots:- [email protected]: {}-@@ -17373,3 +18725,5 @@ snapshots:"@types/react": 18.3.12react: 18.3.1use-sync-external-store: 1.5.0([email protected])++ [email protected]: {}diff --git a/src/app/(app)/components/android-pdf-viewer.tsx b/src/app/(app)/components/android-pdf-viewer.tsxindex 5909eaa..1c39876 100644--- a/src/app/(app)/components/android-pdf-viewer.tsx+++ b/src/app/(app)/components/android-pdf-viewer.tsx@@ -1,10 +1,13 @@+"use client";+import { BlobProvider } from "@react-pdf/renderer/lib/react-pdf.browser";import { Document, Page, pdfjs } from "react-pdf";import type { InvoiceData } from "@/app/schema";import { InvoicePdfTemplate } from "./invoice-pdf-template";--import "react-pdf/dist/esm/Page/AnnotationLayer.css";-import "react-pdf/dist/esm/Page/TextLayer.css";+import { StripeInvoicePdfTemplate } from "./invoice-pdf-stripe-template";+import { toast } from "sonner";+import * as Sentry from "@sentry/nextjs";+import { useMemo } from "react";// https://github.com/wojtekmaj/react-pdf/issues/1822#issuecomment-2233334169pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.mjs`;@@ -13,17 +16,29 @@ pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/b* Android PDF viewer.* We only show the Android PDF viewer on Android devices due to the limitations of the PDF viewer* https://github.com/diegomura/react-pdf/issues/714+ *+ * https://github.com/wojtekmaj/react-pdf*/export const AndroidPdfViewer = ({invoiceData,}: {invoiceData: InvoiceData;}) => {+ const memoizedInvoicePdfTemplate = useMemo(() => {+ switch (invoiceData.template) {+ case "stripe":+ return <StripeInvoicePdfTemplate invoiceData={invoiceData} />;+ case "default":+ default:+ return <InvoicePdfTemplate invoiceData={invoiceData} />;+ }+ }, [invoiceData]);+// On mobile, we need to use the BlobProvider to generate a PDF preview// This is because the PDF viewer is not supported on Android Chrome devices// https://github.com/diegomura/react-pdf/issues/714return (- <BlobProvider document={<InvoicePdfTemplate invoiceData={invoiceData} />}>+ <BlobProvider document={memoizedInvoicePdfTemplate}>{({ url, loading, error }) => {if (error) {return (@@ -49,6 +64,15 @@ export const AndroidPdfViewer = ({);}+ if (!url) {+ return (+ <div className="flex h-full w-full items-center justify-center border border-gray-200 bg-gray-200">+ <p className="text-gray-600">No PDF URL</p>+ </div>+ );+ }++ // https://github.com/wojtekmaj/react-pdfreturn (<Documentfile={url}@@ -61,6 +85,11 @@ export const AndroidPdfViewer = ({</div></div>}+ onLoadError={(error) => {+ Sentry.captureException(error);++ toast.error("Error loading PDF");+ }}><PagepageNumber={1}@@ -73,6 +102,9 @@ export const AndroidPdfViewer = ({</div></div>}+ onLoadError={(error) => {+ Sentry.captureException(error);+ }}height={450}width={650}/>diff --git a/src/app/(app)/components/cta-toasts/index.tsx b/src/app/(app)/components/cta-toasts/index.tsxnew file mode 100644index 0000000..d76ef6c--- /dev/null+++ b/src/app/(app)/components/cta-toasts/index.tsx@@ -0,0 +1,353 @@+import { Button } from "@/components/ui/button";+import { umamiTrackEvent } from "@/lib/umami-analytics-track-event";+import {+ Coffee,+ GiftIcon,+ Heart,+ HeartIcon,+ MessageSquare,+ Sparkles,+ Star,+ XIcon,+} from "lucide-react";++import { GithubIcon } from "@/components/etc/github-logo";+import { DONATION_URL, GITHUB_URL } from "@/config";+import { toast as sonnerToast } from "sonner";++const FEEDBACK_URL = "https://pdfinvoicegenerator.userjot.com/";++interface ToastProps {+ id: string | number;+ title: string;+ description: string;+ showDonationButton?: boolean;+}++/**+ * Randomly determines whether to show donation or feedback button+ */+function randomlyShowDonationButton() {+ return Math.random() < 0.5;+}++/**+ * Renders a premium donation toast+ */+export function customPremiumToast(toast: Omit<ToastProps, "id">) {+ // dismiss any existing toasts+ sonnerToast.dismiss();++ return sonnerToast.custom(+ (id) => (+ <PremiumDonationToast+ id={id}+ title={toast.title}+ description={toast.description}+ showDonationButton={toast.showDonationButton}+ />+ ),+ {+ duration: Infinity,+ }+ );+}++/**+ * Renders a default donation toast+ */+export function customDefaultToast(toast: Omit<ToastProps, "id">) {+ // dismiss any existing toasts+ sonnerToast.dismiss();++ return sonnerToast.custom(+ (id) => (+ <DefaultDonationToast+ id={id}+ title={toast.title}+ description={toast.description}+ showDonationButton={toast.showDonationButton}+ />+ ),+ {+ duration: Infinity,+ }+ );+}++const SonnerCloseButton = (+ props: React.ButtonHTMLAttributes<HTMLButtonElement>+) => {+ return (+ <button+ className="absolute flex h-5 w-5 border border-gray-300 bg-white"+ aria-label="Close toast"+ type="button"+ data-disabled="false"+ data-close-button="true"+ {...props}+ >+ <XIcon className="h-3.5 w-3.5" />+ </button>+ );+};++function PremiumDonationToast(props: ToastProps) {+ const { title, description, id, showDonationButton = true } = props;+ const showDonationBtnRandomly = randomlyShowDonationButton();++ return (+ <div+ className="relative max-w-sm rounded-lg border border-indigo-200 bg-gradient-to-br from-indigo-50 via-white to-purple-50 p-4 shadow-xl"+ data-testid="download-pdf-toast"+ >+ {/* Close button - styled like default Sonner toast */}+ <SonnerCloseButton onClick={() => sonnerToast.dismiss(id)} />++ <div className="relative">+ <div className="mb-2 flex items-center gap-2">+ <div className="flex h-8 w-8 items-center justify-center rounded-lg bg-gradient-to-br from-indigo-500 to-purple-600">+ <GiftIcon className="h-4 w-4 text-white" />+ </div>+ <div>+ <h3 className="text-sm font-bold text-gray-900">{title}</h3>+ </div>+ </div>+ <p className="mb-4 text-xs leading-relaxed text-gray-700">+ {description}+ </p>+ <div className="flex gap-2">+ <Button+ _size="sm"+ _variant="outline"+ asChild+ className="h-8 flex-1 border-gray-300 text-xs transition-all duration-200 hover:bg-gray-50"+ >+ <a+ href={GITHUB_URL}+ target="_blank"+ rel="noopener noreferrer"+ onClick={() => {+ umamiTrackEvent("gh_star_btn_click_download_pdf_toast_premium");++ sonnerToast.dismiss(id);+ }}+ >+ <GithubIcon className="mr-1 h-3 w-3" />+ Star on GitHub+ </a>+ </Button>+ {showDonationButton ? (+ showDonationBtnRandomly ? (+ <PremiumToastDonationButton+ onClick={() => {+ umamiTrackEvent(+ "donate_btn_click_download_pdf_toast_premium"+ );++ sonnerToast.dismiss(id);+ }}+ />+ ) : (+ <PremiumToastFeedbackButton+ onClick={() => {+ umamiTrackEvent(+ "feedback_btn_click_download_pdf_toast_premium"+ );++ sonnerToast.dismiss(id);+ }}+ />+ )+ ) : (+ <PremiumToastFeedbackButton+ onClick={() => {+ umamiTrackEvent(+ "feedback_btn_click_download_pdf_toast_premium"+ );++ sonnerToast.dismiss(id);+ }}+ />+ )}+ </div>+ </div>+ </div>+ );+}++function PremiumToastFeedbackButton(+ props: React.AnchorHTMLAttributes<HTMLAnchorElement>+) {+ return (+ <Button+ _size="sm"+ className="h-8 flex-1 bg-gradient-to-r from-green-500 to-blue-600 text-xs text-white transition-all duration-200 hover:from-green-600 hover:to-blue-700 hover:shadow-lg"+ asChild+ data-testid="toast-cta-btn"+ >+ <a+ href={FEEDBACK_URL}+ target="_blank"+ rel="noopener noreferrer"+ {...props}+ >+ <MessageSquare className="mr-1 h-3 w-3" />+ Share Feedback+ </a>+ </Button>+ );+}++function PremiumToastDonationButton(+ props: React.AnchorHTMLAttributes<HTMLAnchorElement>+) {+ return (+ <Button+ _size="sm"+ className="h-8 flex-1 bg-gradient-to-r from-indigo-500 to-purple-600 text-xs text-white transition-all duration-200 hover:from-indigo-600 hover:to-purple-700 hover:shadow-lg"+ asChild+ data-testid="toast-cta-btn"+ >+ <a+ href={DONATION_URL}+ target="_blank"+ rel="noopener noreferrer"+ {...props}+ >+ <HeartIcon className="mr-1 h-3 w-3 fill-current" />+ Donate $5+ </a>+ </Button>+ );+}++function DefaultDonationToast(props: ToastProps) {+ const { title, description, id, showDonationButton = true } = props;++ // Randomly determine whether to show donation or feedback button+ const showDonationBtnRandomly = randomlyShowDonationButton();++ return (+ <div+ className="flex max-w-md items-start gap-3 rounded-lg border border-indigo-200 bg-gradient-to-br from-indigo-50 via-white to-purple-50 p-4 shadow-xl"+ data-testid="download-pdf-toast"+ >+ {/* Close button - styled like default Sonner toast */}+ <SonnerCloseButton onClick={() => sonnerToast.dismiss(id)} />++ <div className="flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-pink-500 to-purple-600">+ <Heart className="h-5 w-5 fill-current text-white" />+ </div>+ <div className="min-w-0 flex-1">+ <div className="mb-1 flex items-center gap-2">+ <Sparkles className="h-4 w-4 text-yellow-500" />+ <p className="text-sm font-semibold text-gray-900">{title}</p>+ </div>+ <p className="mb-3 text-xs leading-relaxed text-gray-600">+ {description}+ </p>+ <div className="flex gap-2">+ <Button+ _size="sm"+ className="h-7 bg-gray-900 px-3 text-xs font-medium text-white transition-all duration-200 hover:scale-105 hover:bg-gray-800"+ asChild+ >+ <a+ href={GITHUB_URL}+ target="_blank"+ rel="noopener noreferrer"+ onClick={() => {+ umamiTrackEvent("gh_star_btn_click_download_pdf_toast_default");++ sonnerToast.dismiss(id);+ }}+ >+ <Star className="mr-1 h-3 w-3" />+ Star on GitHub+ </a>+ </Button>+ {showDonationButton ? (+ showDonationBtnRandomly ? (+ <DefaultToastDonationButton+ onClick={() => {+ umamiTrackEvent(+ "donate_btn_click_download_pdf_toast_default"+ );++ sonnerToast.dismiss(id);+ }}+ />+ ) : (+ <DefaultToastFeedbackButton+ onClick={() => {+ umamiTrackEvent(+ "feedback_btn_click_download_pdf_toast_default"+ );++ sonnerToast.dismiss(id);+ }}+ />+ )+ ) : (+ <DefaultToastFeedbackButton+ onClick={() => {+ umamiTrackEvent(+ "feedback_btn_click_download_pdf_toast_default"+ );++ sonnerToast.dismiss(id);+ }}+ />+ )}+ </div>+ </div>+ </div>+ );+}++function DefaultToastDonationButton(+ props: React.AnchorHTMLAttributes<HTMLAnchorElement>+) {+ return (+ <Button+ _size="sm"+ className="h-7 bg-gradient-to-r from-pink-500 to-purple-600 px-3 text-xs font-medium text-white shadow-lg transition-all duration-200 hover:scale-105 hover:from-pink-600 hover:to-purple-700"+ asChild+ data-testid="toast-cta-btn"+ >+ <a+ href={DONATION_URL}+ target="_blank"+ rel="noopener noreferrer"+ {...props}+ >+ <Coffee className="mr-1 h-3 w-3" />+ Donate $5+ </a>+ </Button>+ );+}++function DefaultToastFeedbackButton(+ props: React.AnchorHTMLAttributes<HTMLAnchorElement>+) {+ return (+ <Button+ _size="sm"+ className="h-7 bg-gradient-to-r from-green-500 to-blue-600 px-3 text-xs font-medium text-white shadow-lg transition-all duration-200 hover:scale-105 hover:from-green-600 hover:to-blue-700"+ asChild+ data-testid="toast-cta-btn"+ >+ <a+ href={FEEDBACK_URL}+ target="_blank"+ rel="noopener noreferrer"+ {...props}+ >+ <MessageSquare className="mr-1 h-3 w-3" />+ Share Feedback+ </a>+ </Button>+ );+}diff --git a/src/app/(app)/components/index.tsx b/src/app/(app)/components/index.tsxindex 83a966a..a88e609 100644--- a/src/app/(app)/components/index.tsx+++ b/src/app/(app)/components/index.tsx@@ -1,13 +1,15 @@import { Button } from "@/components/ui/button";import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";import { CustomTooltip } from "@/components/ui/tooltip";-import { FileTextIcon, PencilIcon } from "lucide-react";+import { AlertCircleIcon, FileTextIcon, PencilIcon } from "lucide-react";import dynamic from "next/dynamic";import type { InvoiceData } from "@/app/schema";import { InvoiceForm } from "./invoice-form";import { InvoicePDFDownloadLink } from "./invoice-pdf-download-link";import { InvoicePdfTemplate } from "./invoice-pdf-template";+import { StripeInvoicePdfTemplate } from "./invoice-pdf-stripe-template";import { useDeviceContext } from "@/contexts/device-context";+import { cn } from "@/lib/utils";const DesktopPDFViewerModuleLoading = () => (<div className="flex h-[580px] w-full items-center justify-center border border-gray-200 bg-gray-200 lg:h-[620px] 2xl:h-[700px]">@@ -44,19 +46,40 @@ const AndroidPDFViewer = dynamic(});-const PdfViewer = ({ invoiceData }: { invoiceData: InvoiceData }) => {+const PdfViewer = ({+ invoiceData,+ errorWhileGeneratingPdfIsShown,+}: {+ invoiceData: InvoiceData;+ errorWhileGeneratingPdfIsShown: boolean;+}) => {const { isAndroid } = useDeviceContext();+ // Render the appropriate template based on the selected template+ const renderTemplate = () => {+ switch (invoiceData.template) {+ case "stripe":+ return <StripeInvoicePdfTemplate invoiceData={invoiceData} />;+ case "default":+ default:+ return <InvoicePdfTemplate invoiceData={invoiceData} />;+ }+ };+// we only show the Android PDF viewer on Android devices due to the limitations of the PDF viewer// https://github.com/diegomura/react-pdf/issues/714if (isAndroid) {return <AndroidPDFViewer invoiceData={invoiceData} />;}- // Desktop version+ const template = renderTemplate();++ // Normal versionreturn (- <InvoicePDFViewer>- <InvoicePdfTemplate invoiceData={invoiceData} />+ <InvoicePDFViewer+ errorWhileGeneratingPdfIsShown={errorWhileGeneratingPdfIsShown}+ >+ {template}</InvoicePDFViewer>);};@@ -71,11 +94,19 @@ export function InvoiceClientPage({handleInvoiceDataChange,handleShareInvoice,isMobile,+ errorWhileGeneratingPdfIsShown,+ setErrorWhileGeneratingPdfIsShown,+ setCanShareInvoice,+ canShareInvoice,}: {invoiceDataState: InvoiceData;handleInvoiceDataChange: (invoiceData: InvoiceData) => void;handleShareInvoice: () => void;isMobile: boolean;+ errorWhileGeneratingPdfIsShown: boolean;+ setErrorWhileGeneratingPdfIsShown: (error: boolean) => void;+ setCanShareInvoice: (canShareInvoice: boolean) => void;+ canShareInvoice: boolean;}) {return (<>@@ -101,29 +132,75 @@ export function InvoiceClientPage({<InvoiceForminvoiceData={invoiceDataState}onInvoiceDataChange={handleInvoiceDataChange}+ setCanShareInvoice={setCanShareInvoice}/></div></TabsContent><TabsContent value={TAB_INVOICE_PREVIEW} className="mt-1"><div className="flex h-[480px] w-full items-center justify-center">- <PdfViewer invoiceData={invoiceDataState} />+ <PdfViewer+ invoiceData={invoiceDataState}+ errorWhileGeneratingPdfIsShown={+ errorWhileGeneratingPdfIsShown+ }+ /></div></TabsContent></Tabs><div className="sticky bottom-0 z-50 mt-2 flex flex-col items-center justify-center gap-3 rounded-lg border border-t border-gray-200 bg-white px-3 py-3 shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.1),0_-2px_4px_-2px_rgba(0,0,0,0.05)]"><CustomTooltip+ className={cn(!canShareInvoice && "bg-red-50")}trigger={<Button+ aria-disabled={!canShareInvoice} // for better UX than 'disabled'onClick={handleShareInvoice}_variant="outline"- className="mx-2 w-full"+ className={cn("mx-2 w-full")}>Generate a link to invoice</Button>}- content="Generate a shareable link to this invoice. Share it with your clients to allow them to view the invoice online."+ content={+ canShareInvoice ? (+ <div className="flex items-center gap-3 p-2">+ <div className="space-y-1">+ <p className="text-sm font-semibold text-slate-900">+ Share Invoice Online+ </p>+ <p className="text-pretty text-xs leading-relaxed text-slate-700">+ Generate a secure link to share this invoice with your+ clients. They can view and download it directly from+ their browser.+ </p>+ </div>+ </div>+ ) : (+ <div+ data-testid="share-invoice-tooltip-content"+ className="flex items-center gap-3 bg-red-50 p-3"+ >+ <AlertCircleIcon className="h-5 w-5 flex-shrink-0 fill-red-600 text-white" />+ <div className="space-y-1">+ <p className="text-sm font-semibold text-red-800">+ Unable to Share Invoice+ </p>+ <p className="text-pretty text-xs leading-relaxed text-red-700">+ Invoices with logos cannot be shared. Please remove the+ logo to generate a shareable link. You can still+ download the invoice as PDF and share it.+ </p>+ </div>+ </div>+ )+ }+ />+ <InvoicePDFDownloadLink+ invoiceData={invoiceDataState}+ errorWhileGeneratingPdfIsShown={errorWhileGeneratingPdfIsShown}+ setErrorWhileGeneratingPdfIsShown={+ setErrorWhileGeneratingPdfIsShown+ }/>- <InvoicePDFDownloadLink invoiceData={invoiceDataState} /></div></div>) : (@@ -134,11 +211,15 @@ export function InvoiceClientPage({<InvoiceForminvoiceData={invoiceDataState}onInvoiceDataChange={handleInvoiceDataChange}+ setCanShareInvoice={setCanShareInvoice}/></div></div><div className="col-span-8 h-[620px] w-full max-w-full 2xl:h-[700px]">- <PdfViewer invoiceData={invoiceDataState} />+ <PdfViewer+ invoiceData={invoiceDataState}+ errorWhileGeneratingPdfIsShown={errorWhileGeneratingPdfIsShown}+ /></div></>)}diff --git a/src/app/(app)/components/invoice-form/index.tsx b/src/app/(app)/components/invoice-form/index.tsxindex 96fa6dc..83bd947 100644--- a/src/app/(app)/components/invoice-form/index.tsx+++ b/src/app/(app)/components/invoice-form/index.tsx@@ -64,11 +64,13 @@ type AccordionKeys = Array<(typeof DEFAULT_ACCORDION_VALUES)[number]>;interface InvoiceFormProps {invoiceData: InvoiceData;onInvoiceDataChange: (updatedData: InvoiceData) => void;+ setCanShareInvoice: (canShareInvoice: boolean) => void;}export const InvoiceForm = memo(function InvoiceForm({invoiceData,onInvoiceDataChange,+ setCanShareInvoice,}: InvoiceFormProps) {const form = useForm<InvoiceData>({resolver: zodResolver(invoiceSchema),@@ -91,6 +93,7 @@ export const InvoiceForm = memo(function InvoiceForm({const paymentDue = useWatch({ control, name: "paymentDue" });const language = useWatch({ control, name: "language" });+ const selectedDateFormat = useWatch({ control, name: "dateFormat" });const isPaymentDueBeforeDateOfIssue = dayjs(paymentDue).isBefore(dayjs(dateOfIssue)@@ -161,10 +164,11 @@ export const InvoiceForm = memo(function InvoiceForm({// submit form e.g. regenerates pdf and run form validationsvoid handleSubmit(onSubmit)(data as unknown as React.BaseSyntheticEvent);- // data should be already validated- const stringifiedData = JSON.stringify(data);-try {+ const validatedData = invoiceSchema.parse(data);++ const stringifiedData = JSON.stringify(validatedData);+localStorage.setItem(PDF_DATA_LOCAL_STORAGE_KEY, stringifiedData);} catch (error) {console.error("Error saving to local storage:", error);@@ -185,6 +189,16 @@ export const InvoiceForm = memo(function InvoiceForm({return () => subscription.unsubscribe();}, [debouncedRegeneratePdfOnFormChange, watch]);+ const template = useWatch({ control, name: "template" });+ const logo = useWatch({ control, name: "logo" });++ // Disable sharing when Stripe template contains a logo (we can't put the logo base64 string in the URL due to browser URL length limits)+ useEffect(() => {+ const canShareInvoice = !(template === "stripe" && Boolean(logo));++ setCanShareInvoice(canShareInvoice);+ }, [template, logo, setCanShareInvoice]);+// Add a wrapper function for remove item that triggers the form updateconst handleRemoveItem = useCallback((index: number) => {@@ -519,31 +533,39 @@ export const InvoiceForm = memo(function InvoiceForm({{errors.paymentDue && (<ErrorMessage>{errors.paymentDue.message}</ErrorMessage>)}- {!errors.paymentDue && isPaymentDueBeforeDateOfIssue ? (+ {!errors.paymentDue &&+ isPaymentDueBeforeDateOfIssue &&+ dateOfIssue ? (<InputHelperMessage>- <span className="flex items-center text-balance">+ <span className="flex items-center text-balance text-amber-800"><AlertIcon />Payment due date is before date of issue (- {dayjs(dateOfIssue).format("DD.MM.YYYY")})+ {dayjs(dateOfIssue).format(selectedDateFormat)})</span><ButtonHelperonClick={() => {const newPaymentDue = dayjs(dateOfIssue).add(14, "days")- .format("YYYY-MM-DD");+ .format("YYYY-MM-DD"); // default browser date input format is YYYY-MM-DDsetValue("paymentDue", newPaymentDue);}}>- Click to set payment due date 14 days after the date of issue- ({dayjs(dateOfIssue).add(14, "days").format("DD/MM/YYYY")})+ <span className="text-balance">+ Set payment due date to{" "}+ {dayjs(dateOfIssue)+ .add(14, "days")+ .format(selectedDateFormat)}{" "}+ (14 days from issue date)+ </span></ButtonHelper></InputHelperMessage>) : null}{/* If there are no errors and the payment due date is not before the date of issue and the payment due date is not 14 days after the date of issue, show the button to set the payment due date to 14 days after the date of issue (probably a bit better UX) */}{!errors.paymentDue &&!isPaymentDueBeforeDateOfIssue &&- !isPaymentDue14DaysFromDateOfIssue ? (+ !isPaymentDue14DaysFromDateOfIssue &&+ dateOfIssue ? (<ButtonHelperclassName="whitespace-normal"onClick={() => {@@ -554,8 +576,13 @@ export const InvoiceForm = memo(function InvoiceForm({setValue("paymentDue", newPaymentDue);}}>- Click to set payment due date 14 days after the date of issue (- {dayjs(dateOfIssue).add(14, "days").format("DD/MM/YYYY")})+ <span className="text-balance">+ Set payment due date to{" "}+ {dayjs(dateOfIssue)+ .add(14, "days")+ .format(selectedDateFormat)}{" "}+ (14 days from issue date)+ </span></ButtonHelper>) : null}</div>diff --git a/src/app/(app)/components/invoice-form/sections/general-information.tsx b/src/app/(app)/components/invoice-form/sections/general-information.tsxindex 4ba8529..723d164 100644--- a/src/app/(app)/components/invoice-form/sections/general-information.tsx+++ b/src/app/(app)/components/invoice-form/sections/general-information.tsx@@ -9,6 +9,9 @@ import {CURRENCY_SYMBOLS,CURRENCY_TO_LABEL,LANGUAGE_TO_LABEL,+ STRIPE_DEFAULT_DATE_FORMAT,+ SUPPORTED_TEMPLATES,+ TEMPLATE_TO_LABEL,type InvoiceData,} from "@/app/schema";import {@@ -26,11 +29,14 @@ import { Textarea } from "@/components/ui/textarea";import { CustomTooltip } from "@/components/ui/tooltip";import { TRANSLATIONS } from "@/app/schema/translations";import dayjs from "dayjs";-import { AlertTriangle } from "lucide-react";-import { memo } from "react";+import { AlertTriangle, Upload, X } from "lucide-react";+import { memo, useCallback, useEffect, useRef } from "react";+import { toast } from "sonner";const AlertIcon = () => {- return <AlertTriangle className="mr-1 inline-block h-3 w-3 text-amber-500" />;+ return (+ <AlertTriangle className="mr-1 inline-block h-3.5 w-3.5 text-amber-500" />+ );};const ErrorMessage = ({ children }: { children: React.ReactNode }) => {@@ -39,6 +45,24 @@ const ErrorMessage = ({ children }: { children: React.ReactNode }) => {const CURRENT_MONTH_AND_YEAR = dayjs().format("MM-YYYY");+// Logo helper functions+const validateImageSize = (file: File): Promise<boolean> => {+ return new Promise((resolve) => {+ const maxSize = 3 * 1024 * 1024; // 3MB in bytes++ resolve(file.size <= maxSize);+ });+};++const convertFileToBase64 = (file: File): Promise<string> => {+ return new Promise((resolve, reject) => {+ const reader = new FileReader();+ reader.onload = () => resolve(reader.result as string);+ reader.onerror = reject;+ reader.readAsDataURL(file);+ });+};+interface GeneralInformationProps {control: Control<InvoiceData>;errors: FieldErrors<InvoiceData>;@@ -52,6 +76,8 @@ export const GeneralInformation = memo(function GeneralInformation({setValue,dateOfIssue,}: GeneralInformationProps) {+ const fileInputRef = useRef<HTMLInputElement>(null);+const invoiceNumberLabel = useWatch({control,name: "invoiceNumberObject.label",@@ -64,6 +90,9 @@ export const GeneralInformation = memo(function GeneralInformation({const dateOfService = useWatch({ control, name: "dateOfService" });const language = useWatch({ control, name: "language" });+ const template = useWatch({ control, name: "template" });+ const logo = useWatch({ control, name: "logo" });+ const selectedDateFormat = useWatch({ control, name: "dateFormat" });const t = TRANSLATIONS[language];const defaultInvoiceNumber = `${t.invoiceNumber}:`;@@ -86,8 +115,191 @@ export const GeneralInformation = memo(function GeneralInformation({const isInvoiceNumberInCurrentMonth =extractInvoiceMonthAndYear === CURRENT_MONTH_AND_YEAR;+ // Logo upload handlers+ const handleLogoUpload = useCallback(+ async (event: React.ChangeEvent<HTMLInputElement>) => {+ const file = event.target.files?.[0];+ if (!file) return;++ // Validate file type+ const validTypes = ["image/jpeg", "image/jpg", "image/png", "image/webp"];+ if (!validTypes.includes(file.type)) {+ toast.error("Please select a valid image file (JPEG, PNG or WebP)");+ return;+ }++ // Validate file size (3MB max)+ const isValidSize = await validateImageSize(file);+ if (!isValidSize) {+ toast.error("Image size must be less than 3MB");+ return;+ }++ try {+ const base64 = await convertFileToBase64(file);+ setValue("logo", base64);+ toast.success("Logo uploaded successfully!");+ } catch (error) {+ console.error("Error converting file to base64:", error);+ toast.error("Error uploading image. Please try again.");+ }+ },+ [setValue]+ );++ const handleLogoRemove = useCallback(() => {+ setValue("logo", "");+ if (fileInputRef.current) {+ fileInputRef.current.value = "";+ }+ toast.success("Logo removed successfully!");+ }, [setValue]);++ // Handle template-specific form updates+ useEffect(() => {+ if (template === "stripe") {+ // Set date format to "MMMM D, YYYY" when template is Stripe+ setValue("dateFormat", STRIPE_DEFAULT_DATE_FORMAT);+ } else {+ // Clear Stripe-specific fields when not using Stripe template+ if (errors.stripePayOnlineUrl) {+ setValue("stripePayOnlineUrl", "");+ }++ // Clear logo when template is not stripe+ if (logo) {+ setValue("logo", "");+ }++ // Set date format to "YYYY-MM-DD" when template is not stripe+ setValue("dateFormat", SUPPORTED_DATE_FORMATS[0]);+ }+ }, [template, setValue, errors.stripePayOnlineUrl, logo]);+return (<div className="space-y-4">+ {/* Invoice Template Selection */}+ <div>+ <Label htmlFor={`template`} className="mb-1">+ Invoice Template+ </Label>+ <Controller+ name="template"+ control={control}+ render={({ field }) => (+ <SelectNative {...field} id={`template`} className="block">+ {SUPPORTED_TEMPLATES.map((template) => {+ const templateLabel = TEMPLATE_TO_LABEL[template];++ return (+ <option key={template} value={template}>+ {templateLabel}+ </option>+ );+ })}+ </SelectNative>+ )}+ />+ {errors.template ? (+ <ErrorMessage>{errors.template.message}</ErrorMessage>+ ) : (+ <InputHelperMessage>+ Select the design template for your invoice+ </InputHelperMessage>+ )}+ </div>++ {/* Logo Upload - Only for Stripe template */}+ {template === "stripe" && (+ <div className="duration-500 animate-in fade-in slide-in-from-bottom-2">+ <Label htmlFor="logoUpload" className="mb-2">+ Company Logo (Optional)+ </Label>++ {logo ? (+ <div className="space-y-2">+ {/* Logo preview */}+ <div className="relative inline-block">+ {/* eslint-disable-next-line @next/next/no-img-element */}+ <img+ src={logo}+ alt="Company logo preview"+ className="h-28 max-w-40 rounded-lg border-2 border-gray-200 object-contain p-2 shadow-sm"+ />+ <button+ type="button"+ onClick={handleLogoRemove}+ className="absolute -right-2 -top-2 flex h-7 w-7 items-center justify-center rounded-full bg-red-500 text-white shadow-md transition-colors hover:bg-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2"+ aria-label="Remove logo"+ >+ <X className="h-4 w-4" />+ </button>+ </div>+ <InputHelperMessage>+ Logo uploaded successfully. Click the X to remove it.+ </InputHelperMessage>+ </div>+ ) : (+ <div data-testid="stripe-logo-upload-input">+ <input+ ref={fileInputRef}+ type="file"+ id="logoUpload"+ accept="image/jpeg,image/jpg,image/png,image/webp"+ onChange={handleLogoUpload}+ className="hidden"+ />+ <label+ htmlFor="logoUpload"+ className="flex cursor-pointer items-center justify-center rounded-lg border-2 border-dashed border-gray-300 p-8 transition-colors hover:border-gray-400 hover:bg-gray-50"+ >+ <div className="text-center">+ <Upload className="mx-auto h-4 w-4 text-gray-400" />+ <p className="mt-3 text-sm font-medium text-gray-600">+ Click to upload your company logo+ </p>+ <p className="mt-1 text-xs text-gray-500">+ JPEG, PNG or WebP (max 3MB)+ </p>+ </div>+ </label>+ </div>+ )}++ {errors.logo && <ErrorMessage>{errors.logo.message}</ErrorMessage>}+ </div>+ )}++ {/* Pay Online URL - Only for Stripe template */}+ {template === "stripe" && (+ <div className="duration-500 animate-in fade-in slide-in-from-bottom-2">+ <Label htmlFor={`stripePayOnlineUrl`} className="">+ Payment Link URL (Optional)+ </Label>++ <Controller+ name="stripePayOnlineUrl"+ control={control}+ render={({ field }) => (+ <Input+ {...field}+ id={`stripePayOnlineUrl`}+ type="url"+ className="mt-1"+ />+ )}+ />+ {errors.stripePayOnlineUrl ? (+ <ErrorMessage>{errors.stripePayOnlineUrl.message}</ErrorMessage>+ ) : (+ <InputHelperMessage>+ Enter your payment URL. This adds a "Pay Online" button+ to the PDF invoice.+ </InputHelperMessage>+ )}+ </div>+ )}+{/* Language PDF Select */}<div><Label htmlFor={`language`} className="mb-1">@@ -194,7 +406,7 @@ export const GeneralInformation = memo(function GeneralInformation({render={({ field }) => (<SelectNative {...field} id={`dateFormat`} className="block">{SUPPORTED_DATE_FORMATS.map((format) => {- const preview = dayjs().format(format);+ const preview = dayjs().locale(language).format(format);const isDefault = format === SUPPORTED_DATE_FORMATS[0];return (@@ -283,7 +495,7 @@ export const GeneralInformation = memo(function GeneralInformation({{!isInvoiceNumberInCurrentMonth &&!errors.invoiceNumberObject?.value && (<div className="mt-1 flex flex-col items-start text-balance text-xs text-zinc-700/90">- <span className="mb-2 flex items-center md:mb-0 lg:mb-2">+ <span className="mb-2 flex items-center text-amber-800 md:mb-0 lg:mb-2"><AlertIcon />Invoice number does not match current month</span>@@ -323,19 +535,22 @@ export const GeneralInformation = memo(function GeneralInformation({)}{isDateOfIssueNotToday && !errors.dateOfIssue ? (<InputHelperMessage>- <span className="flex items-center">+ <span className="flex items-center text-amber-800"><AlertIcon />Date of issue is not today</span><ButtonHelperonClick={() => {- const currentMonth = dayjs().format("YYYY-MM-DD");+ const currentMonth = dayjs().format("YYYY-MM-DD"); // default browser date input format is YYYY-MM-DDsetValue("dateOfIssue", currentMonth);}}>- Click to set the date to today ({dayjs().format("DD/MM/YYYY")})+ <span className="text-balance">+ Set date of issue to {dayjs().format(selectedDateFormat)}{" "}+ (today)+ </span></ButtonHelper></InputHelperMessage>) : null}@@ -359,7 +574,7 @@ export const GeneralInformation = memo(function GeneralInformation({{!isDateOfServiceEqualsEndOfCurrentMonth && !errors.dateOfService ? (<InputHelperMessage>- <span className="flex items-center">+ <span className="flex items-center text-amber-800"><AlertIcon />Date of service is not the last day of the current month</span>@@ -368,13 +583,14 @@ export const GeneralInformation = memo(function GeneralInformation({onClick={() => {const lastDayOfCurrentMonth = dayjs().endOf("month")- .format("YYYY-MM-DD");+ .format("YYYY-MM-DD"); // default browser date input format is YYYY-MM-DDsetValue("dateOfService", lastDayOfCurrentMonth);}}>- Click to set the date to the last day of the current month (- {dayjs().endOf("month").format("DD/MM/YYYY")})+ Set date of service to{" "}+ {dayjs().endOf("month").format(selectedDateFormat)} (end of+ current month)</ButtonHelper></InputHelperMessage>) : null}diff --git a/src/app/(app)/components/invoice-form/sections/invoice-items.tsx b/src/app/(app)/components/invoice-form/sections/invoice-items.tsxindex db7d6d9..1adb546 100644--- a/src/app/(app)/components/invoice-form/sections/invoice-items.tsx+++ b/src/app/(app)/components/invoice-form/sections/invoice-items.tsx@@ -111,7 +111,15 @@ export const InvoiceItems = memo(function InvoiceItems({trigger={<buttontype="button"- onClick={() => handleRemoveItem(index)}+ onClick={() => {+ const canDelete = window.confirm(+ `Are you sure you want to delete invoice item #${index + 1}?`+ );++ if (canDelete) {+ handleRemoveItem(index);+ }+ }}className="flex items-center justify-center rounded-full bg-red-600 p-2 transition-colors hover:bg-red-700"><span className="sr-only">diff --git a/src/app/(app)/components/invoice-pdf-download-link.tsx b/src/app/(app)/components/invoice-pdf-download-link.tsxindex 0d745d9..fac34be 100644--- a/src/app/(app)/components/invoice-pdf-download-link.tsx+++ b/src/app/(app)/components/invoice-pdf-download-link.tsx@@ -1,31 +1,22 @@-"use client";--import { useEffect, useState, useMemo, useCallback } from "react";-import { usePDF } from "@react-pdf/renderer/lib/react-pdf.browser";import {LANGUAGE_TO_LABEL,type InvoiceData,type SupportedLanguages,} from "@/app/schema";-import { InvoicePdfTemplate } from "./invoice-pdf-template";-import { cn } from "@/lib/utils";-import { Loader2 } from "lucide-react";-import { LOADING_BUTTON_TEXT, LOADING_BUTTON_TIMEOUT } from "./invoice-form";-import { toast } from "sonner";-import { umamiTrackEvent } from "@/lib/umami-analytics-track-event";import { ErrorGeneratingPdfToast } from "@/components/ui/toasts/error-generating-pdf-toast";+import { umamiTrackEvent } from "@/lib/umami-analytics-track-event";+import { cn } from "@/lib/utils";+import { usePDF } from "@react-pdf/renderer/lib/react-pdf.browser";import * as Sentry from "@sentry/nextjs";import dayjs from "dayjs";+import { Loader2 } from "lucide-react";+import { useCallback, useEffect, useMemo, useState } from "react";+import { toast } from "sonner";+import { LOADING_BUTTON_TEXT, LOADING_BUTTON_TIMEOUT } from "./invoice-form";+import { StripeInvoicePdfTemplate } from "./invoice-pdf-stripe-template";+import { InvoicePdfTemplate } from "./invoice-pdf-template";-const DONATION_TOAST_CONFIG = {- title: "❤️ Enjoying EasyInvoicePDF? Help Keep It Free!",- description:- "This tool is free and ad-free thanks to user support. If it’s helped you, consider a small donation to keep it running and growing. Every bit counts—thank you!",- duration: Infinity,- closeButton: true,-} as const;--const DONATION_URL = "https://dub.sh/easyinvoice-donate";+import { customDefaultToast, customPremiumToast } from "./cta-toasts";// Separate button states into a memoized componentconst ButtonContent = ({@@ -51,8 +42,12 @@ const ButtonContent = ({export function InvoicePDFDownloadLink({invoiceData,+ errorWhileGeneratingPdfIsShown,+ setErrorWhileGeneratingPdfIsShown,}: {invoiceData: InvoiceData;+ errorWhileGeneratingPdfIsShown: boolean;+ setErrorWhileGeneratingPdfIsShown: (error: boolean) => void;}) {// Memoize static valuesconst filename = useMemo(() => {@@ -68,52 +63,62 @@ export function InvoicePDFDownloadLink({return name;}, [invoiceData?.language, invoiceData?.invoiceNumberObject]);- const PdfDocument = useMemo(- () => <InvoicePdfTemplate invoiceData={invoiceData} />,- [invoiceData]- );+ const PdfDocument = useMemo(() => {+ switch (invoiceData.template) {+ case "stripe":+ return <StripeInvoicePdfTemplate invoiceData={invoiceData} />;+ case "default":+ default:+ return <InvoicePdfTemplate invoiceData={invoiceData} />;+ }+ }, [invoiceData]);// Combine loading statesconst [{ loading: pdfLoading, url, error }, updatePdfInstance] = usePDF();const [isLoading, setIsLoading] = useState(false);- const [errorShown, setErrorShown] = useState(false);+ // const [errorShown, setErrorShown] = useState(false);// Memoize tracking functionsconst trackDownload = useCallback(() => {- umamiTrackEvent("download_invoice");- }, []);-- const trackDonationClick = useCallback(() => {- umamiTrackEvent("donate_button_clicked_download_pdf_toast");- }, []);-- const showDonationToast = useCallback(() => {- toast(DONATION_TOAST_CONFIG.title, {- ...DONATION_TOAST_CONFIG,- action: {- label: "Donate",- onClick: () => {- window.open(DONATION_URL, "_blank", "noopener,noreferrer");- trackDonationClick();- },+ umamiTrackEvent("download_invoice", {+ data: {+ invoice_template: invoiceData.template,},});- }, [trackDonationClick]);+ }, [invoiceData.template]);const handleClick = useCallback(() => {if (!isLoading && url) {trackDownload();++ // close all other toasts (if any)toast.dismiss();- setTimeout(showDonationToast, 3000);++ // Randomly show either default or premium donation toast after 3 seconds+ setTimeout(() => {+ if (Math.random() <= 0.5) {+ customPremiumToast({+ title: "Support My Work",+ description:+ "Your contribution helps me maintain and improve this project for everyone! 🚀",+ });+ } else {+ customDefaultToast({+ title: "Love this project?",+ description:+ "Help me keep building amazing tools! Your support means the world to me. ✨",+ });+ }+ }, 2500);}- }, [isLoading, url, trackDownload, showDonationToast]);+ }, [isLoading, url, trackDownload]);// Handle PDF updatesuseEffect(() => {updatePdfInstance(PdfDocument);}, [PdfDocument, updatePdfInstance]);- // Handle loading state+ // Handle loading state (for better UX)useEffect(() => {if (!pdfLoading) {const timer = setTimeout(@@ -127,33 +132,40 @@ export function InvoicePDFDownloadLink({// Handle errorsuseEffect(() => {- if (error && !errorShown) {+ if (error && !errorWhileGeneratingPdfIsShown) {ErrorGeneratingPdfToast();- setErrorShown(true);+ // setErrorShown(true);+ setErrorWhileGeneratingPdfIsShown(true);umamiTrackEvent("error_generating_document_link", { data: { error } });Sentry.captureException(error);}- }, [error, errorShown]);+ }, [+ error,+ errorWhileGeneratingPdfIsShown,+ setErrorWhileGeneratingPdfIsShown,+ ]);return (- <a- translate="no"- href={url || "#"}- download={filename}- onClick={handleClick}- className={cn(- "h-[36px] w-full rounded-lg bg-slate-900 px-4 py-2 text-center text-sm font-medium text-slate-50",- "shadow-sm shadow-black/5 outline-offset-2 hover:bg-slate-900/90",- "focus-visible:border-indigo-500 focus-visible:ring focus-visible:ring-indigo-200 focus-visible:ring-opacity-50",- "dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50/90 lg:mb-0 lg:w-[210px]",- {- "pointer-events-none opacity-70": isLoading,- "lg:w-[240px]": invoiceData.language === "pt",- }- )}- >- <ButtonContent isLoading={isLoading} language={invoiceData.language} />- </a>+ <>+ <a+ translate="no"+ href={url || "#"}+ download={filename}+ onClick={handleClick}+ className={cn(+ "h-[36px] w-full rounded-lg bg-slate-900 px-4 py-2 text-center text-sm font-medium text-slate-50",+ "shadow-sm shadow-black/5 outline-offset-2 hover:bg-slate-900/90",+ "focus-visible:border-indigo-500 focus-visible:ring focus-visible:ring-indigo-200 focus-visible:ring-opacity-50",+ "dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50/90 lg:mb-0 lg:w-[210px]",+ {+ "pointer-events-none opacity-70": isLoading,+ "lg:w-[240px]": invoiceData.language === "pt",+ }+ )}+ >+ <ButtonContent isLoading={isLoading} language={invoiceData.language} />+ </a>+ </>);}diff --git a/src/app/(app)/components/invoice-pdf-stripe-template/index.tsx b/src/app/(app)/components/invoice-pdf-stripe-template/index.tsxnew file mode 100644index 0000000..368bd8c--- /dev/null+++ b/src/app/(app)/components/invoice-pdf-stripe-template/index.tsx@@ -0,0 +1,275 @@+"use client";++import { type InvoiceData } from "@/app/schema";+import {+ Document,+ Font,+ Page,+ StyleSheet,+ Text,+ View,+ type Styles,+} from "@react-pdf/renderer/lib/react-pdf.browser";++import { memo } from "react";+import { StripeDueAmount } from "./stripe-due-amount";+import { StripeFooter } from "./stripe-footer";+import { StripeInvoiceHeader } from "./stripe-invoice-header";+import { StripeInvoiceInfo } from "./stripe-invoice-info";+import { StripeItemsTable } from "./stripe-items-table";+import { StripeSellerBuyerInfo } from "./stripe-seller-buyer-info";+import { StripeTotals } from "./stripe-totals";+import { STATIC_ASSETS_URL } from "@/config";++import "dayjs/locale/en";+import "dayjs/locale/pl";+import "dayjs/locale/de";+import "dayjs/locale/es";+import "dayjs/locale/pt";+import "dayjs/locale/ru";+import "dayjs/locale/uk";+import "dayjs/locale/fr";+import "dayjs/locale/it";+import "dayjs/locale/nl";+import dayjs from "dayjs";++const fontFamily = "Inter";++Font.register({+ family: fontFamily,+ fonts: [+ {+ src: `${STATIC_ASSETS_URL}/Inter-Regular.ttf`,+ fontWeight: 400,+ fontStyle: "normal",+ },+ {+ src: `${STATIC_ASSETS_URL}/Inter-Medium.ttf`,+ fontWeight: 500,+ },+ {+ src: `${STATIC_ASSETS_URL}/Inter-SemiBold.ttf`,+ fontWeight: 600,+ },+ ],+});++// Stripe-inspired styles+export const STRIPE_TEMPLATE_STYLES = StyleSheet.create({+ page: {+ flexDirection: "column",+ backgroundColor: "#FFFFFF",+ padding: 0,+ fontFamily: fontFamily,+ fontWeight: 400,+ },+ // Yellow header bar+ headerBar: {+ backgroundColor: "#fbbf24", // Yellow color matching screenshot+ height: 4,+ width: "100%",+ },+ // Main content container+ content: {+ padding: 30,+ },+ // Typography+ fontSize8: { fontSize: 8 },+ fontSize9: { fontSize: 9 },+ fontSize10: { fontSize: 10 },+ fontSize11: { fontSize: 11 },+ fontSize12: { fontSize: 12 },+ fontSize14: { fontSize: 14 },+ fontSize16: { fontSize: 16 },+ fontSize18: { fontSize: 18 },+ fontSize24: { fontSize: 24 },+ fontRegular: {+ fontFamily: fontFamily,+ fontWeight: 400,+ },+ fontMedium: {+ fontFamily: fontFamily,+ fontWeight: 500,+ },+ fontBold: {+ fontFamily: fontFamily,+ fontWeight: 600,+ },+ // Colors+ textGray: { color: "#6b7280" },+ textDark: { color: "#111827" },+ // Layout+ row: {+ flexDirection: "row",+ alignItems: "center",+ },+ spaceBetween: {+ display: "flex",+ flexDirection: "row",+ justifyContent: "space-between",+ alignItems: "center",+ },+ // Spacing+ mb1: { marginBottom: 1 },+ mb2: { marginBottom: 2 },+ mb3: { marginBottom: 3 },+ mb4: { marginBottom: 4 },+ mb8: { marginBottom: 8 },+ mb12: { marginBottom: 12 },+ mb16: { marginBottom: 16 },+ mb20: { marginBottom: 20 },+ mb24: { marginBottom: 24 },+ mt2: { marginTop: 2 },+ mt4: { marginTop: 4 },+ mt8: { marginTop: 8 },+ mt16: { marginTop: 16 },+ mt24: { marginTop: 24 },+ // Table styles+ table: {+ display: "flex",+ width: "100%",+ },+ tableHeader: {+ flexDirection: "row",+ borderBottomWidth: 1,+ borderBottomColor: "#010000",+ paddingBottom: 6,+ marginBottom: 4,+ },+ tableRow: {+ flexDirection: "row",+ paddingVertical: 4,+ },+ // Column widths for Stripe-style table+ colDescription: { flex: 3 },+ colQty: { flex: 0.8, textAlign: "center" },+ colUnitPrice: { flex: 1.2, textAlign: "right" },+ colAmount: { flex: 1.2, textAlign: "right" },+ // Due amount highlight+ dueAmountBox: {+ backgroundColor: "#f9fafb",+ padding: 16,+ borderRadius: 8,+ borderWidth: 1,+ borderColor: "#e5e7eb",+ marginVertical: 24,+ },+ // Totals section+ totalsSection: {+ marginTop: 16,+ paddingTop: 16,+ borderTopWidth: 1,+ borderTopColor: "#e5e7eb",+ },+ totalRow: {+ flexDirection: "row",+ justifyContent: "space-between",+ alignItems: "center",+ paddingVertical: 1,+ },+ finalTotalRow: {+ flexDirection: "row",+ justifyContent: "space-between",+ alignItems: "center",+ },+ borderTop: {+ borderTopWidth: 0.5,+ borderTopColor: "#e5e7eb",+ },+ // Footer styles+ footer: {+ position: "absolute",+ bottom: 20,+ left: 30,+ right: 30,+ paddingTop: 8,+ borderTopWidth: 0.5,+ borderTopColor: "#e5e7eb",+ },+} as const satisfies Styles);++export const StripeInvoicePdfTemplate = memo(function StripeInvoicePdfTemplate({+ invoiceData,+}: {+ invoiceData: InvoiceData;+}) {+ const language = invoiceData.language;++ // Set dayjs locale based on invoice language+ dayjs.locale(language);++ const invoiceNumberValue = invoiceData?.invoiceNumberObject?.value;+ const invoiceNumber = `${invoiceNumberValue}`;+ const invoiceDocTitle = `Invoice ${invoiceNumber} | Created with https://easyinvoicepdf.com`;++ const formattedInvoiceTotal = invoiceData?.total.toLocaleString("en-US", {+ minimumFractionDigits: 2,+ maximumFractionDigits: 2,+ });++ return (+ <Document title={invoiceDocTitle}>+ <Page size={"LETTER"} style={STRIPE_TEMPLATE_STYLES.page}>+ {/* Yellow header bar */}+ <View style={STRIPE_TEMPLATE_STYLES.headerBar} />++ {/* Main content */}+ <View style={STRIPE_TEMPLATE_STYLES.content}>+ {/* Header with Invoice title */}+ <StripeInvoiceHeader+ invoiceData={invoiceData}+ styles={STRIPE_TEMPLATE_STYLES}+ />++ {/* Invoice basic info */}+ <StripeInvoiceInfo+ invoiceData={invoiceData}+ styles={STRIPE_TEMPLATE_STYLES}+ />++ {/* Seller and buyer info */}+ <StripeSellerBuyerInfo+ invoiceData={invoiceData}+ styles={STRIPE_TEMPLATE_STYLES}+ />++ {/* Due amount highlight */}+ <StripeDueAmount+ invoiceData={invoiceData}+ formattedInvoiceTotal={formattedInvoiceTotal}+ styles={STRIPE_TEMPLATE_STYLES}+ />++ {/* Items table */}+ <StripeItemsTable+ invoiceData={invoiceData}+ styles={STRIPE_TEMPLATE_STYLES}+ />++ {/* Totals */}+ <StripeTotals+ invoiceData={invoiceData}+ formattedInvoiceTotal={formattedInvoiceTotal}+ styles={STRIPE_TEMPLATE_STYLES}+ />++ {/* Notes */}+ {invoiceData.notesFieldIsVisible && invoiceData.notes && (+ <View style={[STRIPE_TEMPLATE_STYLES.mt24]}>+ <Text style={[STRIPE_TEMPLATE_STYLES.fontSize10]}>+ {invoiceData.notes}+ </Text>+ </View>+ )}+ </View>++ {/* Footer */}+ <StripeFooter+ invoiceData={invoiceData}+ formattedInvoiceTotal={formattedInvoiceTotal}+ styles={STRIPE_TEMPLATE_STYLES}+ />+ </Page>+ </Document>+ );+});diff --git a/src/app/(app)/components/invoice-pdf-stripe-template/stripe-due-amount.tsx b/src/app/(app)/components/invoice-pdf-stripe-template/stripe-due-amount.tsxnew file mode 100644index 0000000..04f5674--- /dev/null+++ b/src/app/(app)/components/invoice-pdf-stripe-template/stripe-due-amount.tsx@@ -0,0 +1,62 @@+import { Text, View, Link } from "@react-pdf/renderer/lib/react-pdf.browser";+import { type InvoiceData } from "@/app/schema";+import { CURRENCY_SYMBOLS } from "@/app/schema";+import { TRANSLATIONS } from "@/app/schema/translations";+import dayjs from "dayjs";+import "dayjs/locale/en";+import "dayjs/locale/pl";+import "dayjs/locale/de";+import "dayjs/locale/es";+import "dayjs/locale/pt";+import "dayjs/locale/ru";+import "dayjs/locale/uk";+import "dayjs/locale/fr";+import "dayjs/locale/it";+import "dayjs/locale/nl";+import type { STRIPE_TEMPLATE_STYLES } from ".";++export function StripeDueAmount({+ invoiceData,+ formattedInvoiceTotal,+ styles,+}: {+ invoiceData: InvoiceData;+ formattedInvoiceTotal: string;+ styles: typeof STRIPE_TEMPLATE_STYLES;+}) {+ const language = invoiceData.language;+ const t = TRANSLATIONS[language];++ // Set dayjs locale based on invoice language+ dayjs.locale(language);++ const paymentDueDate = dayjs(invoiceData.paymentDue).format(+ invoiceData.dateFormat+ );+ const currencySymbol = CURRENCY_SYMBOLS[invoiceData.currency];++ // Check if payOnlineUrl is provided and valid+ const hasPayOnlineUrl = invoiceData.stripePayOnlineUrl;++ return (+ <View>+ <Text style={[styles.fontSize14, styles.fontBold, styles.mb8]}>+ {currencySymbol}+ {formattedInvoiceTotal} {invoiceData.currency} {t.stripe.due}{" "}+ {paymentDueDate}+ </Text>+ {hasPayOnlineUrl ? (+ <Link+ href={invoiceData.stripePayOnlineUrl}+ style={[+ styles.fontSize10,+ styles.fontBold,+ { color: "#635BFF", textDecoration: "underline" },+ ]}+ >+ {t.stripe.payOnline}+ </Link>+ ) : null}+ </View>+ );+}diff --git a/src/app/(app)/components/invoice-pdf-stripe-template/stripe-footer.tsx b/src/app/(app)/components/invoice-pdf-stripe-template/stripe-footer.tsxnew file mode 100644index 0000000..64a9c7e--- /dev/null+++ b/src/app/(app)/components/invoice-pdf-stripe-template/stripe-footer.tsx@@ -0,0 +1,64 @@+import { Link, Text, View } from "@react-pdf/renderer/lib/react-pdf.browser";+import { type InvoiceData, CURRENCY_SYMBOLS } from "@/app/schema";+import { TRANSLATIONS } from "@/app/schema/translations";+import { PROD_WEBSITE_URL } from "@/config";+import dayjs from "dayjs";++import type { STRIPE_TEMPLATE_STYLES } from ".";++export function StripeFooter({+ invoiceData,+ formattedInvoiceTotal,+ styles,+}: {+ invoiceData: InvoiceData;+ formattedInvoiceTotal: string;+ styles: typeof STRIPE_TEMPLATE_STYLES;+}) {+ const language = invoiceData.language;+ const t = TRANSLATIONS[language];++ const currencySymbol = CURRENCY_SYMBOLS[invoiceData.currency];+ const invoiceNumberValue = invoiceData?.invoiceNumberObject?.value;+ const invoiceNumber = `${invoiceNumberValue}`;++ const paymentDueDate = dayjs(invoiceData.paymentDue).format(+ invoiceData.dateFormat+ );++ return (+ <View style={styles.footer} fixed>+ <View style={styles.spaceBetween}>+ <View style={[styles.row, { gap: 3 }]}>+ {invoiceNumber && (+ <>+ <Text style={[styles.fontSize8]}>{invoiceNumber}</Text>+ <Text style={[styles.fontSize8]}>·</Text>+ </>+ )}+ <Text style={[styles.fontSize8]}>+ {currencySymbol}+ {formattedInvoiceTotal} {invoiceData.currency} {t.stripe.due}{" "}+ {paymentDueDate}+ </Text>+ <Text style={[styles.fontSize8]}>·</Text>+ <Text style={[styles.fontSize8]}>+ {t.createdWith}{" "}+ <Link+ style={[styles.fontSize8, { color: "blue" }]}+ src={PROD_WEBSITE_URL}+ >+ https://easyinvoicepdf.com+ </Link>+ </Text>+ </View>+ <Text+ style={[styles.fontSize8]}+ render={({ pageNumber, totalPages }) =>+ `${t.stripe.page} ${pageNumber} ${t.stripe.of} ${totalPages}`+ }+ />+ </View>+ </View>+ );+}diff --git a/src/app/(app)/components/invoice-pdf-stripe-template/stripe-invoice-header.tsx b/src/app/(app)/components/invoice-pdf-stripe-template/stripe-invoice-header.tsxnew file mode 100644index 0000000..6a6e6ef--- /dev/null+++ b/src/app/(app)/components/invoice-pdf-stripe-template/stripe-invoice-header.tsx@@ -0,0 +1,55 @@+import { Image, Text, View } from "@react-pdf/renderer/lib/react-pdf.browser";+import { type InvoiceData } from "@/app/schema";+import { TRANSLATIONS } from "@/app/schema/translations";+import type { STRIPE_TEMPLATE_STYLES } from ".";++export function StripeInvoiceHeader({+ invoiceData,+ styles,+}: {+ invoiceData: InvoiceData;+ styles: typeof STRIPE_TEMPLATE_STYLES;+}) {+ const language = invoiceData.language;+ const t = TRANSLATIONS[language];+ const hasLogo = invoiceData.logo && invoiceData.logo.length > 0;++ return (+ <View style={[hasLogo ? {} : styles.mb20]}>+ {hasLogo ? (+ // Header with logo and title side by side+ <View+ style={[+ styles.spaceBetween,+ {+ alignItems: "flex-start",+ minHeight: 50, // Ensure consistent height+ },+ ]}+ >+ <View style={{ flex: 1, alignItems: "flex-start" }}>+ <Text style={[styles.fontSize18, styles.fontBold, styles.textDark]}>+ {t.stripe.invoice}+ </Text>+ </View>+ <View style={{ flex: 1, alignItems: "flex-end" }}>+ {/* eslint-disable-next-line jsx-a11y/alt-text */}+ <Image+ src={invoiceData.logo}+ style={{+ maxWidth: 110,+ maxHeight: 40,+ objectFit: "contain",+ }}+ />+ </View>+ </View>+ ) : (+ // Header with title only+ <Text style={[styles.fontSize18, styles.fontBold, styles.textDark]}>+ {t.stripe.invoice}+ </Text>+ )}+ </View>+ );+}diff --git a/src/app/(app)/components/invoice-pdf-stripe-template/stripe-invoice-info.tsx b/src/app/(app)/components/invoice-pdf-stripe-template/stripe-invoice-info.tsxnew file mode 100644index 0000000..4c70f20--- /dev/null+++ b/src/app/(app)/components/invoice-pdf-stripe-template/stripe-invoice-info.tsx@@ -0,0 +1,96 @@+import { Text, View } from "@react-pdf/renderer/lib/react-pdf.browser";+import { type InvoiceData } from "@/app/schema";+import dayjs from "dayjs";++import { TRANSLATIONS } from "@/app/schema/translations";+import type { STRIPE_TEMPLATE_STYLES } from ".";++export function StripeInvoiceInfo({+ invoiceData,+ styles,+}: {+ invoiceData: InvoiceData;+ styles: typeof STRIPE_TEMPLATE_STYLES;+}) {+ const language = invoiceData.language;+ const t = TRANSLATIONS[language];++ const dateOfIssue = dayjs(invoiceData.dateOfIssue).format(+ invoiceData.dateFormat+ );++ const invoiceNumberValue = invoiceData?.invoiceNumberObject?.value;++ // Calculate service period (example: Jan 01 2025 - Jan 31 2025)+ const servicePeriodStart = dayjs(invoiceData.dateOfService)+ .startOf("month")+ .format(invoiceData.dateFormat);++ const servicePeriodEnd = dayjs(invoiceData.dateOfService).format(+ invoiceData.dateFormat+ );++ const paymentDueDate = dayjs(invoiceData.paymentDue).format(+ invoiceData.dateFormat+ );++ return (+ <View style={[styles.mb24, { gap: 2 }]}>+ <View style={[styles.mb1, styles.row, { alignItems: "baseline" }]}>+ {/* Invoice number text column */}+ <View style={{ width: 90 }}>+ <Text style={[styles.fontSize9, styles.fontBold, { maxWidth: 80 }]}>+ {t.stripe.invoiceNumber}+ </Text>+ </View>+ {/* Invoice number value column */}+ <Text style={[styles.fontSize9, styles.fontBold]}>+ {invoiceNumberValue}+ </Text>+ </View>++ <View style={[styles.mb1, styles.row, { alignItems: "baseline" }]}>+ {/* Date of issue text column */}+ <View style={{ width: 90 }}>+ <Text+ style={[styles.fontSize9, styles.fontMedium, { maxWidth: 120 }]}+ >+ {t.stripe.dateOfIssue}+ </Text>+ </View>+ {/* Date of issue value column */}+ <Text style={[styles.fontSize9, styles.fontMedium]}>{dateOfIssue}</Text>+ </View>++ <View style={[styles.mb1, styles.row, { alignItems: "baseline" }]}>+ {/* Date due text column */}+ <View style={{ width: 90 }}>+ <Text+ style={[styles.fontSize9, styles.fontMedium, { maxWidth: 120 }]}+ >+ {t.stripe.dateDue}+ </Text>+ </View>+ {/* Date due value column */}+ <Text style={[styles.fontSize9, styles.fontMedium]}>+ {paymentDueDate}+ </Text>+ </View>++ <View style={[styles.mb1, styles.row, { alignItems: "baseline" }]}>+ {/* Service period text column */}+ <View style={{ width: 90 }}>+ <Text+ style={[styles.fontSize9, styles.fontMedium, { maxWidth: 120 }]}+ >+ {t.stripe.servicePeriod}+ </Text>+ </View>+ {/* Service period value column */}+ <Text style={[styles.fontSize9, styles.fontMedium]}>+ {servicePeriodStart} - {servicePeriodEnd}+ </Text>+ </View>+ </View>+ );+}diff --git a/src/app/(app)/components/invoice-pdf-stripe-template/stripe-items-table.tsx b/src/app/(app)/components/invoice-pdf-stripe-template/stripe-items-table.tsxnew file mode 100644index 0000000..3eae3d6--- /dev/null+++ b/src/app/(app)/components/invoice-pdf-stripe-template/stripe-items-table.tsx@@ -0,0 +1,110 @@+import { Text, View } from "@react-pdf/renderer/lib/react-pdf.browser";+import type { InvoiceData } from "@/app/schema";+import { CURRENCY_SYMBOLS } from "@/app/schema";+import { TRANSLATIONS } from "@/app/schema/translations";+import type { STRIPE_TEMPLATE_STYLES } from ".";+import dayjs from "dayjs";+import "dayjs/locale/en";+import "dayjs/locale/pl";+import "dayjs/locale/de";+import "dayjs/locale/es";+import "dayjs/locale/pt";+import "dayjs/locale/ru";+import "dayjs/locale/uk";+import "dayjs/locale/fr";+import "dayjs/locale/it";+import "dayjs/locale/nl";++export function StripeItemsTable({+ invoiceData,+ styles,+}: {+ invoiceData: InvoiceData;+ styles: typeof STRIPE_TEMPLATE_STYLES;+}) {+ const language = invoiceData.language;+ const t = TRANSLATIONS[language];+ const currencySymbol = CURRENCY_SYMBOLS[invoiceData.currency];++ // Set dayjs locale based on invoice language+ dayjs.locale(language);++ // Calculate service period (example: Jan 01 2025 - Jan 31 2025)+ const servicePeriodStart = dayjs(invoiceData.dateOfService)+ .startOf("month")+ .format(invoiceData.dateFormat);++ const servicePeriodEnd = dayjs(invoiceData.dateOfService).format(+ invoiceData.dateFormat+ );++ return (+ <View style={[styles.table, styles.mt24]}>+ {/* Table header */}+ <View style={styles.tableHeader}>+ <View style={styles.colDescription}>+ <Text style={[styles.fontSize8]}>{t.stripe.description}</Text>+ </View>+ <View style={styles.colQty}>+ <Text style={[styles.fontSize8]}>{t.stripe.qty}</Text>+ </View>+ <View style={styles.colUnitPrice}>+ <Text style={[styles.fontSize8]}>{t.stripe.unitPrice}</Text>+ </View>+ <View style={styles.colAmount}>+ <Text style={[styles.fontSize8]}>{t.stripe.amount}</Text>+ </View>+ </View>++ {/* Table rows */}+ {invoiceData.items.map((item, index) => {+ const formattedNetPrice = item.netPrice.toLocaleString("en-US", {+ minimumFractionDigits: 2,+ maximumFractionDigits: 5,+ });++ const formattedPreTaxAmount = item.preTaxAmount.toLocaleString(+ "en-US",+ {+ minimumFractionDigits: 2,+ maximumFractionDigits: 2,+ }+ );++ const formattedAmount = item.amount.toLocaleString("en-US", {+ style: "decimal",+ maximumFractionDigits: 0,+ });++ return (+ <View style={styles.tableRow} key={index}>+ <View style={styles.colDescription}>+ <Text style={[styles.fontSize11]}>{item.name}</Text>+ {/* Add service period if available */}+ <Text style={[styles.fontSize10, styles.mt4]}>+ {servicePeriodStart} – {servicePeriodEnd}+ </Text>+ </View>+ <View style={styles.colQty}>+ <Text style={[styles.fontSize11, styles.textDark]}>+ {formattedAmount}+ </Text>+ </View>+ <View style={styles.colUnitPrice}>+ <Text style={[styles.fontSize11, styles.textDark]}>+ {currencySymbol}+ {formattedNetPrice}+ </Text>+ </View>+ <View style={styles.colAmount}>+ <Text style={[styles.fontSize11, styles.textDark]}>+ {currencySymbol}+ {formattedPreTaxAmount}+ </Text>+ </View>+ </View>+ );+ })}+ </View>+ );+}diff --git a/src/app/(app)/components/invoice-pdf-stripe-template/stripe-seller-buyer-info.tsx b/src/app/(app)/components/invoice-pdf-stripe-template/stripe-seller-buyer-info.tsxnew file mode 100644index 0000000..faa1020--- /dev/null+++ b/src/app/(app)/components/invoice-pdf-stripe-template/stripe-seller-buyer-info.tsx@@ -0,0 +1,86 @@+import { Text, View } from "@react-pdf/renderer/lib/react-pdf.browser";+import type { InvoiceData } from "@/app/schema";+import { TRANSLATIONS } from "@/app/schema/translations";+import type { STRIPE_TEMPLATE_STYLES } from ".";++export function StripeSellerBuyerInfo({+ invoiceData,+ styles,+}: {+ invoiceData: InvoiceData;+ styles: typeof STRIPE_TEMPLATE_STYLES;+}) {+ const language = invoiceData.language;+ const t = TRANSLATIONS[language];++ return (+ <View+ style={{+ flexDirection: "row",+ marginBottom: 24,+ }}+ >+ {/* Seller info */}+ <View style={{ marginRight: 80, width: "150px" }}>+ <Text style={[styles.fontSize10, styles.fontBold, styles.mb3]}>+ {invoiceData.seller.name}+ </Text>+ <Text style={[styles.fontSize9, styles.mb3]}>+ {invoiceData.seller.address}+ </Text>+ <Text style={[styles.fontSize9, styles.mb3]}>+ {invoiceData.seller.email}+ </Text>+ {invoiceData.seller.vatNoFieldIsVisible && (+ <Text style={[styles.fontSize9, styles.mb3]}>+ {t.seller.vatNo}: {invoiceData.seller.vatNo}+ </Text>+ )}+ {invoiceData.seller.accountNumberFieldIsVisible && (+ <Text style={[styles.fontSize9, styles.mb3]}>+ {t.seller.accountNumber}: {invoiceData.seller.accountNumber}+ </Text>+ )}+ {invoiceData.seller.swiftBicFieldIsVisible && (+ <Text style={[styles.fontSize9, styles.mb3]}>+ {t.seller.swiftBic}: {invoiceData.seller.swiftBic}+ </Text>+ )}++ {invoiceData.seller.notesFieldIsVisible && (+ <Text style={[styles.fontSize9, styles.mb3]}>+ {invoiceData.seller.notes}+ </Text>+ )}+ </View>++ {/* Buyer info */}+ <View style={{ width: "150px" }}>+ <Text style={[styles.fontSize10, styles.fontBold, styles.mb3]}>+ {t.stripe.billTo}+ </Text>+ <Text style={[styles.fontSize9, styles.mb3]}>+ {invoiceData.buyer.name}+ </Text>+ <Text style={[styles.fontSize9, styles.mb3]}>+ {invoiceData.buyer.address}+ </Text>+ <Text style={[styles.fontSize9, styles.mb3]}>+ {invoiceData.buyer.email}+ </Text>++ {invoiceData.buyer.vatNoFieldIsVisible && (+ <Text style={[styles.fontSize9, styles.mb3]}>+ {t.buyer.vatNo}: {invoiceData.buyer.vatNo}+ </Text>+ )}++ {invoiceData.buyer.notesFieldIsVisible && (+ <Text style={[styles.fontSize9, styles.mb3]}>+ {invoiceData.buyer.notes}+ </Text>+ )}+ </View>+ </View>+ );+}diff --git a/src/app/(app)/components/invoice-pdf-stripe-template/stripe-totals.tsx b/src/app/(app)/components/invoice-pdf-stripe-template/stripe-totals.tsxnew file mode 100644index 0000000..2422f9e--- /dev/null+++ b/src/app/(app)/components/invoice-pdf-stripe-template/stripe-totals.tsx@@ -0,0 +1,64 @@+import { Text, View } from "@react-pdf/renderer/lib/react-pdf.browser";+import { type InvoiceData } from "@/app/schema";+import { CURRENCY_SYMBOLS } from "@/app/schema";+import { TRANSLATIONS } from "@/app/schema/translations";+import type { STRIPE_TEMPLATE_STYLES } from ".";++export function StripeTotals({+ invoiceData,+ formattedInvoiceTotal,+ styles,+}: {+ invoiceData: InvoiceData;+ formattedInvoiceTotal: string;+ styles: typeof STRIPE_TEMPLATE_STYLES;+}) {+ const language = invoiceData.language;+ const t = TRANSLATIONS[language];+ const currencySymbol = CURRENCY_SYMBOLS[invoiceData.currency];++ // Calculate subtotal (sum of all items)+ const subtotal = invoiceData.items.reduce(+ (sum, item) => sum + item.preTaxAmount,+ 0+ );+ const formattedSubtotal = subtotal.toLocaleString("en-US", {+ minimumFractionDigits: 2,+ maximumFractionDigits: 2,+ });++ return (+ <View style={{ alignItems: "flex-end", marginTop: 24 }}>+ <View style={{ width: "40%" }}>+ {/* Subtotal */}+ <View style={[styles.totalRow, styles.borderTop]}>+ <Text style={[styles.fontSize8]}>{t.stripe.subtotal}</Text>+ <Text style={[styles.fontSize8, styles.textDark]}>+ {currencySymbol}+ {formattedSubtotal}+ </Text>+ </View>++ {/* Total */}+ <View style={[styles.totalRow, styles.borderTop]}>+ <Text style={[styles.fontSize8]}>{t.stripe.total}</Text>+ <Text style={[styles.fontSize8, styles.textDark]}>+ {currencySymbol}+ {formattedInvoiceTotal}+ </Text>+ </View>++ {/* Amount due */}+ <View style={[styles.totalRow, styles.borderTop]}>+ <Text style={[styles.fontSize8, styles.fontBold, styles.textDark]}>+ {t.stripe.amountDue}+ </Text>+ <Text style={[styles.fontSize8, styles.fontBold, styles.textDark]}>+ {currencySymbol}+ {formattedInvoiceTotal} {invoiceData.currency}+ </Text>+ </View>+ </View>+ </View>+ );+}diff --git a/src/app/(app)/components/invoice-pdf-template/index.tsx b/src/app/(app)/components/invoice-pdf-template/index.tsxindex ee266c0..6ca4ba6 100644--- a/src/app/(app)/components/invoice-pdf-template/index.tsx+++ b/src/app/(app)/components/invoice-pdf-template/index.tsx@@ -1,26 +1,13 @@-"use client";-import { type InvoiceData } from "@/app/schema";+import { STATIC_ASSETS_URL } from "@/config";import {Document,Font,- Link,Page,StyleSheet,- Text,- View,} from "@react-pdf/renderer/lib/react-pdf.browser";-import { InvoiceHeader } from "./invoice-header";-import { InvoiceSellerBuyerInfo } from "./invoice-seller-buyer-info";-import { InvoiceItemsTable } from "./invoice-items-table";-import { InvoicePaymentInfo } from "./invoice-payment-info";-import { InvoiceVATSummaryTable } from "./invoice-vat-summary-table";-import { InvoicePaymentTotals } from "./invoice-payment-totals";-import { TRANSLATIONS } from "@/app/schema/translations";-import { STATIC_ASSETS_URL } from "@/config";import { memo } from "react";--const PROD_WEBSITE_URL = "https://dub.sh/easy-invoice";+import { InvoiceBody } from "./invoice-body";// Open sans seems to be working fine with EN and PLconst fontFamily = "Open Sans";@@ -40,7 +27,7 @@ Font.register({});// Styles for the PDF-const styles = StyleSheet.create({+export const PDF_DEFAULT_TEMPLATE_STYLES = StyleSheet.create({wFull: {width: "100%",},@@ -163,8 +150,6 @@ const styles = StyleSheet.create({bottom: 30,left: 30,right: 30,- flexDirection: "row",- justifyContent: "space-between",borderTop: "1px solid #000",paddingTop: 5,},@@ -177,6 +162,16 @@ const styles = StyleSheet.create({justifyContent: "center",alignItems: "center",},+ row: {+ flexDirection: "row",+ alignItems: "center",+ },+ spaceBetween: {+ display: "flex",+ flexDirection: "row",+ justifyContent: "space-between",+ alignItems: "center",+ },} as const);// Memoize the PDF Document component@@ -185,9 +180,6 @@ export const InvoicePdfTemplate = memo(function InvoicePdfTemplate({}: {invoiceData: InvoiceData;}) {- const language = invoiceData.language;- const t = TRANSLATIONS[language];-const invoiceNumberLabel = invoiceData?.invoiceNumberObject?.label;const invoiceNumberValue = invoiceData?.invoiceNumberObject?.value;@@ -195,108 +187,13 @@ export const InvoicePdfTemplate = memo(function InvoicePdfTemplate({const invoiceNumber = `${invoiceNumberLabel} ${invoiceNumberValue}`;const invoiceDocTitle = `${invoiceNumber} | Created with https://easyinvoicepdf.com`;- const formattedInvoiceTotal = invoiceData?.total- .toLocaleString("en-US", {- minimumFractionDigits: 2,- maximumFractionDigits: 2,- })- .replaceAll(",", " ");-- const signatureSectionIsVisible =- invoiceData.personAuthorizedToReceiveFieldIsVisible ||- invoiceData.personAuthorizedToIssueFieldIsVisible;-- const vatTableSummaryIsVisible = invoiceData.vatTableSummaryIsVisible;-return (<Document title={invoiceDocTitle}>- <Page size="A4" style={styles.page}>- <InvoiceHeader invoiceData={invoiceData} styles={styles} />- <InvoiceSellerBuyerInfo invoiceData={invoiceData} styles={styles} />- <InvoiceItemsTable+ <Page size="A4" style={PDF_DEFAULT_TEMPLATE_STYLES.page}>+ <InvoiceBodyinvoiceData={invoiceData}- formattedInvoiceTotal={formattedInvoiceTotal}- styles={styles}+ styles={PDF_DEFAULT_TEMPLATE_STYLES}/>-- <View- style={{- display: "flex",- flexDirection: "row",- justifyContent: "space-between",- }}- >- <View style={{ width: "50%" }}>- <InvoicePaymentInfo invoiceData={invoiceData} styles={styles} />- </View>-- {vatTableSummaryIsVisible && (- <View style={{ width: "50%" }}>- <InvoiceVATSummaryTable- invoiceData={invoiceData}- formattedInvoiceTotal={formattedInvoiceTotal}- styles={styles}- />- </View>- )}- </View>-- <View style={{ marginTop: vatTableSummaryIsVisible ? 0 : 15 }}>- <InvoicePaymentTotals- invoiceData={invoiceData}- formattedInvoiceTotal={formattedInvoiceTotal}- styles={styles}- />- </View>-- {/* Signature section */}- {signatureSectionIsVisible && (- <View style={styles.signatureSection}>- {invoiceData.personAuthorizedToReceiveFieldIsVisible && (- <View style={styles.signatureColumn}>- <View style={styles.signatureLine} />- <Text style={styles.signatureText}>- {t.personAuthorizedToReceive}- </Text>- </View>- )}- {invoiceData.personAuthorizedToIssueFieldIsVisible && (- <View style={styles.signatureColumn}>- <View style={styles.signatureLine} />- <Text style={styles.signatureText}>- {t.personAuthorizedToIssue}- </Text>- </View>- )}- </View>- )}-- {/* Notes */}- {invoiceData.notesFieldIsVisible && (- <View style={{ marginTop: 10 }}>- <Text style={styles.fontSize8}>{invoiceData?.notes}</Text>- </View>- )}-- {/* Footer */}- <View style={styles.footer}>- <Text style={[styles.fontSize9]}>- {t.createdWith}{" "}- <Link- style={[styles.fontSize9, { color: "blue" }]}- src={PROD_WEBSITE_URL}- >- https://easyinvoicepdf.com- </Link>- </Text>- {/* Page number */}- <Text- style={styles.footerText}- render={({ pageNumber, totalPages }) =>- `${pageNumber}/${totalPages}`- }- />- </View></Page></Document>);diff --git a/src/app/(app)/components/invoice-pdf-template/invoice-body.tsx b/src/app/(app)/components/invoice-pdf-template/invoice-body.tsxnew file mode 100644index 0000000..2940b6b--- /dev/null+++ b/src/app/(app)/components/invoice-pdf-template/invoice-body.tsx@@ -0,0 +1,139 @@+import { type InvoiceData } from "@/app/schema";+import { TRANSLATIONS } from "@/app/schema/translations";+import {+ Text,+ View,+ type Styles,+} from "@react-pdf/renderer/lib/react-pdf.browser";+import { InvoiceFooter } from "./invoice-footer";+import { InvoiceHeader } from "./invoice-header";+import { InvoiceItemsTable } from "./invoice-items-table";+import { InvoicePaymentInfo } from "./invoice-payment-info";+import { InvoicePaymentTotals } from "./invoice-payment-totals";+import { InvoiceSellerBuyerInfo } from "./invoice-seller-buyer-info";+import { InvoiceVATSummaryTable } from "./invoice-vat-summary-table";++import "dayjs/locale/en";+import "dayjs/locale/pl";+import "dayjs/locale/de";+import "dayjs/locale/es";+import "dayjs/locale/pt";+import "dayjs/locale/ru";+import "dayjs/locale/uk";+import "dayjs/locale/fr";+import "dayjs/locale/it";+import "dayjs/locale/nl";+import dayjs from "dayjs";++export const InvoiceBody = ({+ invoiceData,+ styles,+ shouldLocaliseDates = true,+}: {+ invoiceData: InvoiceData;+ styles: Styles;+ shouldLocaliseDates?: boolean;+}) => {+ const language = invoiceData.language;+ const t = TRANSLATIONS[language];++ if (shouldLocaliseDates) {+ dayjs.locale(language);+ }++ const invoiceTotal = invoiceData?.total;++ const formattedInvoiceTotal =+ typeof invoiceTotal === "number"+ ? invoiceTotal+ .toLocaleString("en-US", {+ minimumFractionDigits: 2,+ maximumFractionDigits: 2,+ })+ .replaceAll(",", " ")+ : "0.00";++ const signatureSectionIsVisible =+ invoiceData.personAuthorizedToReceiveFieldIsVisible ||+ invoiceData.personAuthorizedToIssueFieldIsVisible;++ const vatTableSummaryIsVisible = invoiceData.vatTableSummaryIsVisible;++ return (+ <>+ <InvoiceHeader invoiceData={invoiceData} styles={styles} />+ <InvoiceSellerBuyerInfo invoiceData={invoiceData} styles={styles} />+ <InvoiceItemsTable+ invoiceData={invoiceData}+ formattedInvoiceTotal={formattedInvoiceTotal}+ styles={styles}+ />++ <View+ style={{+ display: "flex",+ flexDirection: "row",+ justifyContent: "space-between",+ }}+ >+ <View style={{ width: "50%" }}>+ <InvoicePaymentInfo invoiceData={invoiceData} styles={styles} />+ </View>++ {vatTableSummaryIsVisible && (+ <View style={{ width: "50%" }}>+ <InvoiceVATSummaryTable+ invoiceData={invoiceData}+ formattedInvoiceTotal={formattedInvoiceTotal}+ styles={styles}+ />+ </View>+ )}+ </View>++ <View style={{ marginTop: vatTableSummaryIsVisible ? 0 : 15 }}>+ <InvoicePaymentTotals+ invoiceData={invoiceData}+ formattedInvoiceTotal={formattedInvoiceTotal}+ styles={styles}+ />+ </View>++ {/* Signature section */}+ {signatureSectionIsVisible && (+ <View style={styles.signatureSection}>+ {invoiceData.personAuthorizedToReceiveFieldIsVisible && (+ <View style={styles.signatureColumn}>+ <View style={styles.signatureLine} />+ <Text style={styles.signatureText}>+ {t.personAuthorizedToReceive}+ </Text>+ </View>+ )}+ {invoiceData.personAuthorizedToIssueFieldIsVisible && (+ <View style={styles.signatureColumn}>+ <View style={styles.signatureLine} />+ <Text style={styles.signatureText}>+ {t.personAuthorizedToIssue}+ </Text>+ </View>+ )}+ </View>+ )}++ {/* Notes */}+ {invoiceData.notesFieldIsVisible && (+ <View style={{ marginTop: 10 }}>+ <Text style={styles.fontSize8}>{invoiceData?.notes}</Text>+ </View>+ )}++ {/* Footer */}+ <InvoiceFooter+ invoiceData={invoiceData}+ styles={styles}+ formattedInvoiceTotal={formattedInvoiceTotal}+ />+ </>+ );+};diff --git a/src/app/(app)/components/invoice-pdf-template/invoice-footer.tsx b/src/app/(app)/components/invoice-pdf-template/invoice-footer.tsxnew file mode 100644index 0000000..409e2a7--- /dev/null+++ b/src/app/(app)/components/invoice-pdf-template/invoice-footer.tsx@@ -0,0 +1,66 @@+import { CURRENCY_SYMBOLS, type InvoiceData } from "@/app/schema";+import { TRANSLATIONS } from "@/app/schema/translations";+import { PROD_WEBSITE_URL } from "@/config";+import {+ Link,+ Text,+ View,+ type Styles,+} from "@react-pdf/renderer/lib/react-pdf.browser";+import dayjs from "dayjs";++export function InvoiceFooter({+ invoiceData,+ styles,+ formattedInvoiceTotal,+}: {+ invoiceData: InvoiceData;+ styles: Styles;+ formattedInvoiceTotal: string;+}) {+ const language = invoiceData.language;+ const t = TRANSLATIONS[language];++ const currencySymbol = CURRENCY_SYMBOLS[invoiceData.currency];+ const invoiceNumberValue = invoiceData?.invoiceNumberObject?.value;++ const paymentDueDate = dayjs(invoiceData.paymentDue).format(+ invoiceData.dateFormat+ );++ return (+ <View style={styles.footer} fixed>+ <View style={styles.spaceBetween}>+ <View style={[styles.row, { gap: 3 }]}>+ {invoiceNumberValue && (+ <>+ <Text style={[styles.fontSize8]}>{invoiceNumberValue}</Text>+ <Text style={[styles.fontSize8]}>·</Text>+ </>+ )}+ <Text style={[styles.fontSize8]}>+ {currencySymbol}+ {formattedInvoiceTotal} {invoiceData.currency} {t.stripe.due}{" "}+ {paymentDueDate}+ </Text>+ <Text style={[styles.fontSize8]}>·</Text>+ <Text style={[styles.fontSize8]}>+ {t.createdWith}{" "}+ <Link+ style={[styles.fontSize8, { color: "blue" }]}+ src={PROD_WEBSITE_URL}+ >+ https://easyinvoicepdf.com+ </Link>+ </Text>+ </View>+ <Text+ style={[styles.fontSize8]}+ render={({ pageNumber, totalPages }) =>+ `${t.stripe.page} ${pageNumber} ${t.stripe.of} ${totalPages}`+ }+ />+ </View>+ </View>+ );+}diff --git a/src/app/(app)/components/invoice-pdf-template/invoice-header.tsx b/src/app/(app)/components/invoice-pdf-template/invoice-header.tsxindex 7e0b536..fd743a9 100644--- a/src/app/(app)/components/invoice-pdf-template/invoice-header.tsx+++ b/src/app/(app)/components/invoice-pdf-template/invoice-header.tsx@@ -3,9 +3,9 @@ import {View,type Styles,} from "@react-pdf/renderer/lib/react-pdf.browser";-// import { styles } from ".";import { type InvoiceData } from "@/app/schema";import dayjs from "dayjs";+import { TRANSLATIONS } from "@/app/schema/translations";export function InvoiceHeader({diff --git a/src/app/(app)/components/invoice-pdf-template/invoice-payment-info.tsx b/src/app/(app)/components/invoice-pdf-template/invoice-payment-info.tsxindex 570a772..3b6ecf5 100644--- a/src/app/(app)/components/invoice-pdf-template/invoice-payment-info.tsx+++ b/src/app/(app)/components/invoice-pdf-template/invoice-payment-info.tsx@@ -5,6 +5,7 @@ import {} from "@react-pdf/renderer/lib/react-pdf.browser";import type { InvoiceData } from "@/app/schema";import dayjs from "dayjs";+import { TRANSLATIONS } from "@/app/schema/translations";export function InvoicePaymentInfo({diff --git a/src/app/(app)/components/invoice-pdf-viewer.tsx b/src/app/(app)/components/invoice-pdf-viewer.tsxindex da1a856..3b34b67 100644--- a/src/app/(app)/components/invoice-pdf-viewer.tsx+++ b/src/app/(app)/components/invoice-pdf-viewer.tsx@@ -2,7 +2,26 @@import { PDFViewer } from "@react-pdf/renderer/lib/react-pdf.browser";-export function InvoicePDFViewer({ children }: { children: React.ReactNode }) {+export function InvoicePDFViewer({+ children,+ errorWhileGeneratingPdfIsShown,+}: {+ children: React.ReactNode;+ errorWhileGeneratingPdfIsShown: boolean;+}) {+ if (errorWhileGeneratingPdfIsShown) {+ return (+ <div className="flex h-[580px] w-full items-center justify-center border border-gray-200 bg-gray-200 lg:h-[620px] 2xl:h-[700px]">+ <div className="text-center">+ <p className="text-red-600">Error generating PDF preview</p>+ <p className="mt-2 text-sm text-gray-600">+ Something went wrong. Please try again or contact support.+ </p>+ </div>+ </div>+ );+ }+return (<PDFViewerwidth="100%"diff --git a/src/app/(app)/loading.tsx b/src/app/(app)/loading.tsxindex cbc074a..7408c3d 100644--- a/src/app/(app)/loading.tsx+++ b/src/app/(app)/loading.tsx@@ -1,30 +1,32 @@export default function Loading() {return (- <div className="min-h-screen bg-gray-50 p-8">- <div className="mx-auto flex max-w-[1400px] flex-col gap-8 lg:flex-row">- {/* Left side - Form */}- <div className="w-full space-y-6 lg:w-1/3">- <div className="h-8 w-full animate-pulse rounded bg-gray-200 lg:w-64" />+ <div className="flex flex-col items-center justify-start bg-gray-100 sm:p-4 md:justify-center lg:min-h-screen">+ <div className="w-full max-w-7xl bg-white p-3 shadow-lg sm:mb-0 sm:rounded-lg sm:p-6 2xl:max-w-[1680px]">+ <div className="grid grid-cols-1 gap-8 lg:grid-cols-12">+ {/* Left side - Form */}+ <div className="col-span-8 w-full space-y-6 lg:col-span-4">+ <div className="h-8 w-full animate-pulse rounded bg-gray-200 lg:w-64" />- {/* Form fields skeleton */}- <div className="space-y-4">- {Array.from({ length: 6 }).map((_, i) => (- <div key={i} className="space-y-2">- <div className="h-4 w-32 animate-pulse rounded bg-gray-200" />- <div className="h-10 animate-pulse rounded bg-gray-200" />- </div>- ))}+ {/* Form fields skeleton */}+ <div className="space-y-4">+ {Array.from({ length: 6 }).map((_, i) => (+ <div key={i} className="space-y-2">+ <div className="h-4 w-32 animate-pulse rounded bg-gray-200" />+ <div className="h-10 animate-pulse rounded bg-gray-200" />+ </div>+ ))}+ </div></div>- </div>- {/* Right side - PDF Preview */}- <div className="w-full lg:w-2/3">- <div className="h-[700px] animate-pulse rounded-lg bg-gray-200">- <div className="flex items-center justify-between rounded-t-lg bg-gray-300 p-4">- <div className="h-6 w-full animate-pulse rounded bg-gray-400 lg:w-48" />- <div className="hidden gap-2 lg:flex">- <div className="h-8 w-32 animate-pulse rounded bg-gray-400" />- <div className="h-8 w-32 animate-pulse rounded bg-blue-400" />+ {/* Right side - PDF Preview */}+ <div className="col-span-8 h-[480px] w-full max-w-full sm:h-[690px] 2xl:h-[800px]">+ <div className="h-full animate-pulse rounded-lg bg-gray-200">+ <div className="flex items-center justify-between rounded-t-lg bg-gray-300 p-4">+ <div className="h-6 w-full animate-pulse rounded bg-gray-400 lg:w-48" />+ <div className="hidden gap-2 lg:flex">+ <div className="h-8 w-32 animate-pulse rounded bg-gray-400" />+ <div className="h-8 w-32 animate-pulse rounded bg-blue-400" />+ </div></div></div></div>diff --git a/src/app/(app)/page.client.tsx b/src/app/(app)/page.client.tsxindex 41aa4bc..c0282c3 100644--- a/src/app/(app)/page.client.tsx+++ b/src/app/(app)/page.client.tsx@@ -10,7 +10,6 @@ import {import { TRANSLATIONS } from "@/app/schema/translations";import { GithubIcon } from "@/components/etc/github-logo";import { ProjectLogo } from "@/components/etc/project-logo";-import { SubscribeInput } from "@/components/subscribe-input";import { Button } from "@/components/ui/button";import {Dialog,@@ -24,9 +23,14 @@ import { useDeviceContext } from "@/contexts/device-context";import Link from "next/link";import { useRouter } from "next/navigation";+import { Footer } from "@/components/footer";+import { ProjectLogoDescription } from "@/components/project-logo-description";+import { GITHUB_URL, VIDEO_DEMO_URL } from "@/config";import { isLocalStorageAvailable } from "@/lib/check-local-storage";import { umamiTrackEvent } from "@/lib/umami-analytics-track-event";+import { cn } from "@/lib/utils";import * as Sentry from "@sentry/nextjs";+import { AlertCircleIcon } from "lucide-react";import {compressToEncodedURIComponent,decompressFromEncodedURIComponent,@@ -35,9 +39,12 @@ import { useSearchParams } from "next/navigation";import { useEffect, useState } from "react";import { toast } from "sonner";import { z } from "zod";-import { VIDEO_DEMO_URL } from "@/config";-import { InvoicePDFDownloadLink } from "./components/invoice-pdf-download-link";import { InvoiceClientPage } from "./components";+import {+ customDefaultToast,+ customPremiumToast,+} from "./components/cta-toasts";+import { InvoicePDFDownloadLink } from "./components/invoice-pdf-download-link";// import { InvoicePDFDownloadMultipleLanguages } from "./components/invoice-pdf-download-multiple-languages";/**@@ -107,6 +114,11 @@ export function AppPageClient() {null);+ const [errorWhileGeneratingPdfIsShown, setErrorWhileGeneratingPdfIsShown] =+ useState(false);++ const [canShareInvoice, setCanShareInvoice] = useState(true);+// Scroll to top on mountuseEffect(() => {window.scrollTo({ top: 0, behavior: "smooth" });@@ -264,17 +276,81 @@ export function AppPageClient() {}}, [invoiceDataState, router, searchParams]);+ // Show CTA toast every minute+ useEffect(() => {+ // only show on production+ if (process.env.NODE_ENV !== "production") {+ return;+ }++ const showCTAToast = () => {+ // Randomly show either default or premium donation toast+ if (Math.random() <= 0.5) {+ customPremiumToast({+ title: "Support My Work",+ description:+ "Your contribution helps me maintain and improve this project for everyone! 🚀",+ showDonationButton: false,+ });+ } else {+ customDefaultToast({+ title: "Love this project?",+ description:+ "Help me keep building amazing tools! Your support means the world to me. ✨",+ showDonationButton: false,+ });+ }+ };++ // Show cta toast after 40 seconds on the app page+ const initialTimer = setTimeout(showCTAToast, 40_000);++ return () => {+ clearTimeout(initialTimer);+ };+ }, []);+const handleInvoiceDataChange = (updatedData: InvoiceData) => {setInvoiceDataState(updatedData);};const handleShareInvoice = async () => {+ if (!canShareInvoice) {+ toast.error("Unable to Share Invoice", {+ duration: 5000,+ description: (+ <>+ <p className="text-pretty text-xs leading-relaxed text-red-700">+ Invoices with logos cannot be shared. Please remove the logo to+ generate a shareable link. You can still download the invoice as+ PDF and share it.+ </p>+ </>+ ),+ });++ return;+ }+if (invoiceDataState) {try {const newInvoiceDataValidated = invoiceSchema.parse(invoiceDataState);const stringified = JSON.stringify(newInvoiceDataValidated);const compressedData = compressToEncodedURIComponent(stringified);+ // Check if the compressed data length exceeds browser URL limits+ // Most browsers have a limit around 2000 characters for URLs+ const URL_LENGTH_LIMIT = 2000;+ const estimatedUrlLength =+ window.location.origin.length + 7 + compressedData.length; // 7 for "/?data="++ if (estimatedUrlLength > URL_LENGTH_LIMIT) {+ toast.error("Invoice data is too large to share via URL", {+ description: "Try removing some items or simplifying the invoice",+ });+ return;+ }+router.push(`/?data=${compressedData}`);// Construct full URL with locale and compressed data@@ -310,22 +386,14 @@ export function AppPageClient() {<div className="w-full max-w-7xl bg-white p-3 shadow-lg sm:mb-0 sm:rounded-lg sm:p-6 2xl:max-w-[1680px]"><div data-testid="header"><div className="flex w-full flex-row flex-wrap items-center justify-between lg:flex-nowrap">- <div className="relative bottom-3 mt-3 flex flex-col items-center justify-center sm:mt-0">+ <div className="relative bottom-2 mt-2 flex w-full flex-col justify-center sm:bottom-4 sm:mt-0"><div className="flex items-center"><ProjectLogo className="h-8 w-8" />- <p className="text-balance text-center text-xl font-bold text-slate-800 sm:mt-0 sm:text-2xl lg:mr-5 lg:text-left">- <a- href="https://easyinvoicepdf.com"- target="_blank"- rel="noopener noreferrer"- >- EasyInvoicePDF.com- </a>- </p>++ <ProjectLogoDescription>+ Free Invoice Generator with Live PDF Preview+ </ProjectLogoDescription></div>- <p className="relative bottom-1.5 left-[49px] text-[12px] text-slate-700">- Free Invoice Generator with Real-Time PDF Preview- </p></div><div className="mb-1 flex w-full flex-wrap justify-center gap-3 lg:flex-nowrap lg:justify-end"><Button@@ -352,18 +420,63 @@ export function AppPageClient() {{isDesktop ? (<><CustomTooltip+ className={cn(!canShareInvoice && "bg-red-50")}trigger={<Button+ aria-disabled={!canShareInvoice} // better UX than 'disabled'onClick={handleShareInvoice}_variant="outline"- className="mx-2 mb-2 w-full lg:mx-0 lg:mb-0 lg:w-auto"+ className={cn(+ "mx-2 mb-2 w-full lg:mx-0 lg:mb-0 lg:w-auto"+ )}>Generate a link to invoice</Button>}- content="Generate a shareable link to this invoice. Share it with your clients to allow them to view the invoice online."+ content={+ canShareInvoice ? (+ <div className="flex items-center gap-3 p-2">+ <div className="space-y-1">+ <p className="text-sm font-semibold text-slate-900">+ Share Invoice Online+ </p>+ <p className="text-pretty text-xs leading-relaxed text-slate-700">+ Generate a secure link to share this invoice+ with your clients. They can view and download it+ directly from their browser.+ </p>+ </div>+ </div>+ ) : (+ <div+ data-testid="share-invoice-tooltip-content"+ className="flex items-center gap-3 bg-red-50 p-3"+ >+ <AlertCircleIcon className="h-5 w-5 flex-shrink-0 fill-red-600 text-white" />+ <div className="space-y-1">+ <p className="text-sm font-semibold text-red-800">+ Unable to Share Invoice+ </p>+ <p className="text-pretty text-xs leading-relaxed text-red-700">+ Invoices with logos cannot be shared. Please+ remove the logo to generate a shareable link.+ You can still download the invoice as PDF and+ share it.+ </p>+ </div>+ </div>+ )+ }+ />+ <InvoicePDFDownloadLink+ invoiceData={invoiceDataState}+ errorWhileGeneratingPdfIsShown={+ errorWhileGeneratingPdfIsShown+ }+ setErrorWhileGeneratingPdfIsShown={+ setErrorWhileGeneratingPdfIsShown+ }/>- <InvoicePDFDownloadLink invoiceData={invoiceDataState} /></>) : null}@@ -375,7 +488,7 @@ export function AppPageClient() {) : null} */}</div></div>- <div className="mb-3 mt-2 flex flex-row items-center justify-center lg:mb-0 lg:mt-4 lg:justify-start xl:mt-0">+ <div className="mb-3 mt-2 flex flex-row items-center justify-center lg:mb-0 lg:mt-4 lg:justify-start xl:mt-1"><ProjectInfo /></div></div>@@ -385,11 +498,73 @@ export function AppPageClient() {handleInvoiceDataChange={handleInvoiceDataChange}handleShareInvoice={handleShareInvoice}isMobile={isMobile}+ errorWhileGeneratingPdfIsShown={errorWhileGeneratingPdfIsShown}+ setErrorWhileGeneratingPdfIsShown={+ setErrorWhileGeneratingPdfIsShown+ }+ canShareInvoice={canShareInvoice}+ setCanShareInvoice={setCanShareInvoice}/></div></div></div>- <Footer />+ <Footer+ translations={{+ footerDescription:+ "A free, open-source tool for creating professional invoices with real-time preview.",+ footerCreatedBy: "Created by",+ product: "Product",++ newsletterTitle: "Subscribe to our newsletter",+ newsletterDescription:+ "Get the latest updates and news from EasyInvoicePDF.com",+ newsletterSubscribe: "Subscribe",+ newsletterPlaceholder: "Enter your email",+ newsletterSuccessMessage: "Thank you for subscribing!",+ newsletterErrorMessage: "Failed to subscribe. Please try again.",+ newsletterEmailLanguageInfo: "All emails will be sent in English",+ }}+ links={+ <ul className="space-y-2">+ <li>+ <Link+ href="/en/about"+ className="text-sm text-slate-500 hover:text-slate-900"+ >+ About+ </Link>+ </li>+ <li>+ <Link+ href="/changelog"+ className="text-sm text-slate-500 hover:text-slate-900"+ >+ Changelog+ </Link>+ </li>+ <li>+ <Link+ href={GITHUB_URL}+ target="_blank"+ rel="noopener noreferrer"+ className="text-sm text-slate-500 hover:text-slate-900"+ >+ GitHub+ </Link>+ </li>+ <li>+ <Link+ href="https://pdfinvoicegenerator.userjot.com/?cursor=1&order=top&limit=10"+ target="_blank"+ rel="noopener noreferrer"+ className="text-sm text-slate-500 hover:text-slate-900"+ >+ Share feedback+ </Link>+ </li>+ </ul>+ }+ /></TooltipProvider>);}@@ -406,7 +581,7 @@ function ProjectInfo() {<><span className="relative bottom-0 text-center text-sm text-gray-900 lg:bottom-3"><a- href="https://github.com/VladSez/pdf-invoice-generator"+ href={GITHUB_URL}target="_blank"rel="noopener noreferrer"className="group inline-flex items-center gap-1"@@ -459,155 +634,3 @@ function ProjectInfo() {</>);}--function Footer() {- return (- <footer className="w-full border-t border-slate-200 bg-white py-12 md:py-16">- <div className="container mx-auto px-4 md:px-6">- <div className="flex flex-col gap-10 md:flex-row">- <div className="space-y-4 md:w-1/3">- <div className="flex items-center">- <ProjectLogo className="h-8 w-8" />- <p className="text-balance text-center text-xl font-bold text-slate-800 sm:mt-0 sm:text-2xl lg:mr-5 lg:text-left">- <a- href="https://easyinvoicepdf.com"- target="_blank"- rel="noopener noreferrer"- >- EasyInvoicePDF.com- </a>- </p>- </div>- <p className="text-sm text-slate-500">- A free, open-source tool for creating professional PDF invoices- with real-time preview.- </p>- <div className="flex gap-4">- <Link- href="https://github.com/VladSez/pdf-invoice-generator"- target="_blank"- rel="noopener noreferrer"- className="text-slate-400 hover:text-slate-800"- >- <span className="sr-only">GitHub</span>- <svg- className="h-5 w-5"- fill="currentColor"- viewBox="0 0 24 24"- aria-hidden="true"- >- <path- fillRule="evenodd"- d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"- clipRule="evenodd"- />- </svg>- </Link>- <Link- href="https://x.com/vlad_sazon"- target="_blank"- rel="noopener noreferrer"- className="text-slate-400 hover:text-slate-800"- >- <span className="sr-only">Twitter</span>- <svg- className="h-5 w-5"- fill="currentColor"- viewBox="0 0 24 24"- aria-hidden="true"- >- <path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" />- </svg>- <span className="sr-only">Twitter</span>- </Link>- </div>- </div>- <div className="grid grid-cols-1 sm:gap-10 md:flex-1 md:grid-cols-2">- <div className="space-y-3"></div>- <div className="space-y-3">- <h3 className="text-sm font-medium text-slate-900">Product</h3>- <ul className="space-y-2">- <li>- <Link- href="/en/about"- className="text-sm text-slate-500 hover:text-slate-900"- >- About- </Link>- </li>- <li>- <Link- href="https://github.com/VladSez/easy-invoice-pdf"- target="_blank"- rel="noopener noreferrer"- className="text-sm text-slate-500 hover:text-slate-900"- >- GitHub- </Link>- </li>- <li>- <Link- href="https://pdfinvoicegenerator.userjot.com/?cursor=1&order=top&limit=10"- target="_blank"- rel="noopener noreferrer"- className="text-sm text-slate-500 hover:text-slate-900"- >- Share feedback- </Link>- </li>- </ul>- </div>- </div>- </div>- {/* Badge for featured on Startup Fame */}- <div className="my-5">- <a- href="https://startupfa.me/s/easyinvoicepdf?utm_source=easyinvoicepdf.com"- target="_blank"- >- {/* eslint-disable-next-line @next/next/no-img-element */}- <img- src="https://startupfa.me/badges/featured-badge-small.webp"- alt="Featured on Startup Fame"- width="224"- height="36"- />- </a>- </div>- <div className="my-5 max-w-lg space-y-2">- <p className="text-sm font-medium text-slate-900">- Subscribe to our newsletter- </p>- <SubscribeInput- translations={{- title: "Subscribe to our newsletter",- description:- "Get the latest updates and news from EasyInvoicePDF.com",- subscribe: "Subscribe",- placeholder: "Enter your email",- success: "Thank you for subscribing!",- error: "Failed to subscribe. Please try again.",- emailLanguageInfo: "All emails will be sent in English",- }}- />- </div>- <div className="mt-10 flex flex-col items-center justify-between gap-4 border-t border-slate-200 pt-8 md:flex-row">- <p className="text-xs text-slate-500">- © {new Date().getFullYear()} EasyInvoicePDF.com- </p>- <p className="text-xs text-slate-500">- Created by{" "}- <Link- href="https://github.com/VladSez"- target="_blank"- rel="noopener noreferrer"- className="underline hover:text-slate-900"- >- Vlad Sazonau- </Link>- </p>- </div>- </div>- </footer>- );-}diff --git a/src/app/[locale]/about/components/landing-cta-toast.tsx b/src/app/[locale]/about/components/landing-cta-toast.tsxnew file mode 100644index 0000000..6b72acd--- /dev/null+++ b/src/app/[locale]/about/components/landing-cta-toast.tsx@@ -0,0 +1,55 @@+"use client";++import {+ customDefaultToast,+ customPremiumToast,+} from "@/app/(app)/components/cta-toasts";+import { useEffect } from "react";++/**+ * This component is used to show a CTA toast on the landing page.+ *+ * It is used to encourage users to support the project.+ *+ * It is only shown on the production environment.+ *+ * It is shown after 7 seconds on the page.+ *+ */+export const LandingCtaToast = () => {+ // Show CTA toast every minute+ useEffect(() => {+ // only show on production+ if (process.env.NODE_ENV !== "production") {+ return;+ }++ const showCTAToast = () => {+ // Randomly show either default or premium donation toast+ if (Math.random() <= 0.5) {+ customPremiumToast({+ title: "Support My Work",+ description:+ "Your contribution helps me maintain and improve this project for everyone! 🚀",+ showDonationButton: false, // we only want to show the donation button on the app page+ });+ } else {+ customDefaultToast({+ title: "Love this project?",+ description:+ "Help me keep building amazing tools! Your support means the world to me. ✨",+ showDonationButton: false, // we only want to show the donation button on the app page+ });+ }+ };++ // Show cta toast after 7 seconds on the page+ const initialTimer = setTimeout(showCTAToast, 7_000);++ return () => {+ clearTimeout(initialTimer);+ };+ }, []);++ return null;+};diff --git a/src/app/[locale]/about/page.tsx b/src/app/[locale]/about/page.tsxindex 7aadfbc..ab5e1de 100644--- a/src/app/[locale]/about/page.tsx+++ b/src/app/[locale]/about/page.tsx@@ -1,5 +1,10 @@import { GithubIcon } from "@/components/etc/github-logo";import { ProjectLogo } from "@/components/etc/project-logo";+import { Footer } from "@/components/footer";+import {+ BlackGoToAppButton,+ GoToAppButton,+} from "@/components/go-to-app-button-cta";import { SubscribeInput } from "@/components/subscribe-input";import { Button } from "@/components/ui/button";import {@@ -10,22 +15,22 @@ import {} from "@/components/ui/disclosure";import { TooltipProvider } from "@/components/ui/tooltip";import { Video } from "@/components/video";-import Link from "next/link";-import { cn } from "@/lib/utils";+import { GITHUB_URL, STATIC_ASSETS_URL, VIDEO_DEMO_URL } from "@/config";+import { routing } from "@/i18n/routing";import {CalculatorIcon,Download,FileText,GlobeIcon,Share2,- ArrowRight,} from "lucide-react";import { useTranslations, type Locale } from "next-intl";import { setRequestLocale } from "next-intl/server";+import Link from "next/link";import { type Graph } from "schema-dts";+import { LandingCtaToast } from "./components/landing-cta-toast";import { LanguageSwitcher } from "./components/language-switcher";-import { STATIC_ASSETS_URL, VIDEO_DEMO_URL } from "@/config";-import { routing } from "@/i18n/routing";+import { ProjectLogoDescription } from "@/components/project-logo-description";// statically generate the pages for all localesexport function generateStaticParams() {@@ -38,6 +43,17 @@ export default function AboutPage({ params }: { params: { locale: Locale } }) {// Enables static rendering to prevent an error: https://nextjs.org/docs/messages/dynamic-server-errorsetRequestLocale(locale);+ const t = useTranslations("About");+ const tNewsletter = useTranslations("About.newsletter");++ const newsletterTitle = tNewsletter("title");+ const newsletterDescription = tNewsletter("description");+ const newsletterSubscribe = tNewsletter("subscribe");+ const newsletterPlaceholder = tNewsletter("placeholder");+ const newsletterSuccessMessage = tNewsletter("success");+ const newsletterErrorMessage = tNewsletter("error");+ const newsletterEmailLanguageInfo = tNewsletter("emailLanguageInfo");+return (<TooltipProvider><script@@ -47,6 +63,7 @@ export default function AboutPage({ params }: { params: { locale: Locale } }) {__html: JSON.stringify(JSON_LD),}}/>+ <LandingCtaToast /><div className="flex min-h-screen flex-col bg-slate-50"><Header locale={locale} /><main>@@ -56,7 +73,77 @@ export default function AboutPage({ params }: { params: { locale: Locale } }) {<SubscribeSection /><CtaSection /></main>- <Footer />+ <Footer+ links={+ <ul className="space-y-2">+ <li>+ <Link+ href="/"+ className="text-sm text-slate-500 hover:text-slate-900"+ >+ {t("buttons.app")}+ </Link>+ </li>+ <li>+ <Link+ href="#features"+ className="text-sm text-slate-500 hover:text-slate-900"+ >+ {t("footer.links.features")}+ </Link>+ </li>+ <li>+ <Link+ href="#faq"+ className="text-sm text-slate-500 hover:text-slate-900"+ >+ FAQ+ </Link>+ </li>+ <li>+ <Link+ href="/changelog"+ className="text-sm text-slate-500 hover:text-slate-900"+ >+ {t("footer.links.changelog")}+ </Link>+ </li>+ <li>+ <Link+ href="https://pdfinvoicegenerator.userjot.com/?cursor=1&order=top&limit=10"+ target="_blank"+ rel="noopener noreferrer"+ className="text-sm text-slate-500 hover:text-slate-900"+ >+ {t("buttons.shareFeedback")}+ </Link>+ </li>+ <li>+ <Link+ href={GITHUB_URL}+ target="_blank"+ rel="noopener noreferrer"+ className="text-sm text-slate-500 hover:text-slate-900"+ >+ {t("footer.links.github")}+ </Link>+ </li>+ </ul>+ }+ translations={{+ footerDescription: t("footer.description"),+ footerCreatedBy: t("footer.createdBy"),+ product: t("footer.product"),++ newsletterTitle: newsletterTitle,+ newsletterDescription: newsletterDescription,+ newsletterSubscribe: newsletterSubscribe,+ newsletterPlaceholder: newsletterPlaceholder,+ newsletterSuccessMessage: newsletterSuccessMessage,+ newsletterErrorMessage: newsletterErrorMessage,+ newsletterEmailLanguageInfo: newsletterEmailLanguageInfo,+ }}+ /></div></TooltipProvider>);@@ -64,6 +151,7 @@ export default function AboutPage({ params }: { params: { locale: Locale } }) {function Header({ locale }: { locale: Locale }) {const t = useTranslations("About.buttons");+ const tFooter = useTranslations("About.footer.links");return (<header className="sticky top-0 z-50 w-full border-b bg-white shadow-sm">@@ -74,11 +162,21 @@ function Header({ locale }: { locale: Locale }) {<Logo /></div><div className="flex items-center sm:mt-0 sm:gap-2">+ <Button+ _variant="ghost"+ className="hidden lg:inline-flex"+ asChild+ >+ <Link href="/changelog">{tFooter("changelog")}</Link>+ </Button><LanguageSwitcherlocale={locale}buttonText={t("switchLanguage")}/>- <BlackGoToAppButton className="px-3 sm:px-8" />+ {/* <BlackGoToAppButton className="px-3 sm:px-8" /> */}+ <BlackGoToAppButton className="px-3 sm:px-8">+ {t("goToApp")}+ </BlackGoToAppButton></div></div></div>@@ -102,7 +200,8 @@ function HeroSection() {</div><div className="container relative z-10 px-4 md:px-6">- <div className="grid gap-8 lg:grid-cols-2 lg:gap-12">+ <div className="grid gap-8 lg:grid-cols-2 lg:gap-12 xl:gap-6">+ {/* Left column (text) */}<div className="flex flex-col justify-center space-y-5 md:space-y-6"><div className="space-y-3 md:space-y-4"><h1 className="text-balance text-3xl font-bold tracking-tight text-slate-900 sm:text-4xl md:text-5xl lg:text-6xl">@@ -115,7 +214,9 @@ function HeroSection() {</div><div className="flex w-full flex-col gap-3 sm:flex-row sm:flex-wrap">- <BlackGoToAppButton className="px-10 py-6 text-lg" />+ <BlackGoToAppButton className="px-10 py-6 text-lg">+ {t("buttons.goToApp")}+ </BlackGoToAppButton><Button_size="lg"@@ -124,7 +225,7 @@ function HeroSection() {asChild><Link- href="https://github.com/VladSez/easy-invoice-pdf"+ href={GITHUB_URL}target="_blank"rel="noopener noreferrer">@@ -133,30 +234,16 @@ function HeroSection() {</Link></Button></div>- <div className="mx-auto flex max-w-fit cursor-pointer items-center justify-center gap-x-2 rounded-full border border-amber-300 bg-amber-50 px-4 py-1.5 text-sm font-medium text-amber-800 shadow-sm transition-all hover:scale-105 sm:mx-0">+ <div className="mx-auto flex max-w-fit cursor-pointer items-center justify-center gap-x-2 text-pretty rounded-full border border-amber-300 bg-amber-50 px-4 py-1.5 text-sm font-medium text-amber-800 shadow-sm transition-all hover:scale-105 sm:mx-0"><span className="" role="img" aria-label="checkmark">✅</span><span>{t("hero.noSignup")}</span></div>- {/* Badge for featured on Startup Fame */}- <div className="mx-auto sm:mx-0">- <a- href="https://startupfa.me/s/easyinvoicepdf?utm_source=easyinvoicepdf.com"- target="_blank"- >- {/* eslint-disable-next-line @next/next/no-img-element */}- <img- src="https://startupfa.me/badges/featured-badge-small.webp"- alt="Featured on Startup Fame"- width="224"- height="36"- />- </a>- </div></div>- <div className="relative mx-auto w-full max-w-[600px] lg:mx-0">+ {/* Right column (video) */}+ <div className="relative mx-auto w-full max-w-[650px] lg:mx-0">{/* Mac OS Frame around the video */}<div className="relative overflow-hidden rounded-xl border border-slate-200 bg-white shadow-lg md:rounded-2xl md:shadow-xl">{/* Browser chrome bar */}@@ -221,7 +308,7 @@ function FeaturesSection() {return (<sectionid="features"- className="flex w-full items-center justify-center bg-slate-50 py-12 md:py-20"+ className="flex w-full items-center justify-center bg-slate-50 py-12 lg:py-20"><div className="container px-4 md:px-6"><div className="flex flex-col items-center justify-center space-y-4 text-center">@@ -310,7 +397,7 @@ function FaqSection() {<div className="flex flex-col items-center justify-center space-y-4 text-center"><div className="space-y-2"><div className="mb-10 inline-flex items-center rounded-md border border-indigo-200 bg-indigo-100 px-3 py-1 text-sm font-semibold text-indigo-900 shadow-sm transition-colors">- {t("badge")}+ FAQ</div><h2 className="text-3xl font-bold tracking-tighter text-slate-900 md:text-4xl/tight">{t("title")}@@ -405,222 +492,31 @@ function CtaSection() {</div><div className="flex w-full flex-col items-center justify-center gap-6"><div className="flex w-full flex-col justify-center gap-2 md:flex-row">- <GoToAppButton className="border-slate-600 bg-white text-slate-950 hover:bg-white/90" />+ <GoToAppButton className="border-slate-600 bg-white px-10 py-6 text-lg text-slate-950 hover:bg-white/90">+ {t("buttons.goToApp")}+ </GoToAppButton><Button_size="lg"- className="bg-slate-700 px-8 text-white hover:bg-slate-700/90"+ className="group border border-slate-700 bg-slate-700 px-10 py-6 text-lg text-white transition-all duration-300 hover:bg-slate-600/80"asChild><Link- href="https://github.com/VladSez/easy-invoice-pdf"+ href={GITHUB_URL}target="_blank"rel="noopener noreferrer">- <GithubIcon className="mr-2 h-5 w-5 fill-white" />- {t("buttons.viewOnGithub")}+ <GithubIcon className="mr-2 h-6 w-6 fill-slate-100 transition-transform duration-300 group-hover:scale-110 group-hover:fill-slate-950" />+ {t("buttons.starOnGithub")}</Link></Button></div></div>- <p className="text-sm text-slate-400">{t("cta.noSignup")}</p>- </div>- </div>- </section>- );-}--function Footer() {- const t = useTranslations("About");- const tFaq = useTranslations("FAQ");- const tNewsletter = useTranslations("About.newsletter");-- const newsletterTitle = tNewsletter("title");- const newsletterDescription = tNewsletter("description");- const newsletterSubscribe = tNewsletter("subscribe");- const newsletterPlaceholder = tNewsletter("placeholder");- const newsletterSuccessMessage = tNewsletter("success");- const newsletterErrorMessage = tNewsletter("error");- const newsletterEmailLanguageInfo = tNewsletter("emailLanguageInfo");- return (- <footer- id="footer"- className="flex w-full items-center justify-center border-t border-slate-200 bg-white py-12 md:py-16 lg:py-20"- >- <div className="container px-4 md:px-6">- <div className="flex flex-col gap-10 md:flex-row">- <div className="space-y-4 md:w-1/3">- <Logo />- <p className="text-sm text-slate-500">{t("footer.description")}</p>- <div- className="flex gap-4"- data-testid="about-page-footer-social-links"- >- <Link- href="https://github.com/VladSez/easy-invoice-pdf"- target="_blank"- rel="noopener noreferrer"- className="text-slate-400 hover:text-slate-800"- >- <span className="sr-only">GitHub</span>- <svg- className="h-5 w-5"- fill="currentColor"- viewBox="0 0 24 24"- aria-hidden="true"- >- <path- fillRule="evenodd"- d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"- clipRule="evenodd"- />- </svg>- </Link>- <Link- href="https://x.com/vlad_sazon"- target="_blank"- rel="noopener noreferrer"- className="text-slate-400 hover:text-slate-800"- >- <span className="sr-only">Twitter</span>- <svg- className="h-5 w-5"- fill="currentColor"- viewBox="0 0 24 24"- aria-hidden="true"- >- <path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" />- </svg>- <span className="sr-only">Twitter</span>- </Link>- </div>- </div>- <div className="grid grid-cols-1 sm:gap-10 md:flex-1 md:grid-cols-2">- <div className="space-y-3"></div>- <div className="space-y-3">- <h3 className="text-sm font-medium text-slate-900">- {t("footer.product")}- </h3>- <ul className="space-y-2" data-testid="about-page-footer-links">- <li>- <Link- href="/"- className="text-sm text-slate-500 hover:text-slate-900"- >- {t("buttons.app")}- </Link>- </li>- <li>- <Link- href="#features"- className="text-sm text-slate-500 hover:text-slate-900"- >- {t("footer.links.features")}- </Link>- </li>- <li>- <Link- href="#faq"- className="text-sm text-slate-500 hover:text-slate-900"- >- {tFaq("badge")}- </Link>- </li>- <li>- <Link- href="https://pdfinvoicegenerator.userjot.com/?cursor=1&order=top&limit=10"- target="_blank"- rel="noopener noreferrer"- className="text-sm text-slate-500 hover:text-slate-900"- >- {t("buttons.shareFeedback")}- </Link>- </li>- <li>- <Link- href="https://github.com/VladSez/easy-invoice-pdf"- target="_blank"- rel="noopener noreferrer"- className="text-sm text-slate-500 hover:text-slate-900"- >- {t("footer.links.github")}- </Link>- </li>- </ul>- </div>- </div>- </div>- <div className="my-5 max-w-lg space-y-2">- <p className="text-sm font-medium text-slate-900">- {tNewsletter("title")}- </p>- <SubscribeInput- translations={{- title: newsletterTitle,- description: newsletterDescription,- subscribe: newsletterSubscribe,- placeholder: newsletterPlaceholder,- success: newsletterSuccessMessage,- error: newsletterErrorMessage,- emailLanguageInfo: newsletterEmailLanguageInfo,- }}- />- </div>- <div className="mt-10 flex flex-col items-center justify-between gap-4 border-t border-slate-200 pt-8 md:flex-row">- <p className="text-xs text-slate-500">- {t("footer.copyright", {- year: String(new Date().getFullYear()),- })}- </p>- <p className="text-xs text-slate-500">- {t("footer.createdBy")}{" "}- <Link- href="https://github.com/VladSez"- target="_blank"- rel="noopener noreferrer"- className="underline hover:text-slate-900"- >- Vlad Sazonau- </Link>+ <p className="animate-pulse text-sm text-slate-400">+ {t("cta.noSignup")}</p></div></div>- </footer>- );-}--function GoToAppButton({ className }: { className?: string }) {- const t = useTranslations("About");-- return (- <Button- _size="lg"- _variant="outline"- className={cn(- "group relative overflow-hidden border-slate-200 px-8 shadow-sm transition-all duration-300 hover:border-slate-200/80 hover:shadow-lg",- className- )}- asChild- >- {/**- * scroll={false} is used to disable the default behavior of the link because it doesn't work for some reason- * the page is already scrolled to the top on mount at /en/app- */}- <Link href="/" scroll={false}>- <ArrowRight className="mr-2 h-5 w-5 transition-transform group-hover:scale-110" />- {t("buttons.goToApp")}- </Link>- </Button>- );-}--function BlackGoToAppButton({ className }: { className?: string }) {- return (- <GoToAppButton- className={cn(- "relative overflow-hidden bg-zinc-900 text-white transition-all duration-300 hover:scale-[1.02] hover:bg-zinc-800 hover:text-white active:scale-[0.98]",- className- )}- />+ </section>);}@@ -631,20 +527,7 @@ function Logo() {<div><div className="flex items-center gap-1 sm:gap-2"><ProjectLogo className="h-7 w-7 flex-shrink-0 sm:h-8 sm:w-8" />- <div className="flex flex-col">- <p className="text-balance text-base font-bold text-slate-800 sm:text-xl lg:text-2xl">- <a- href="https://easyinvoicepdf.com"- target="_blank"- rel="noopener noreferrer"- >- EasyInvoicePDF.com- </a>- </p>- <p className="text-balance text-[11px] text-slate-700 sm:text-[12px]">- {t("tagline")}- </p>- </div>+ <ProjectLogoDescription>{t("tagline")}</ProjectLogoDescription></div></div>);diff --git a/src/app/api/generate-invoice/render-pdf-on-server.tsx b/src/app/api/generate-invoice/render-pdf-on-server.tsxindex 3917b55..a16d0f8 100644--- a/src/app/api/generate-invoice/render-pdf-on-server.tsx+++ b/src/app/api/generate-invoice/render-pdf-on-server.tsx@@ -1,36 +1,22 @@-import { InvoiceHeader } from "@/app/(app)/components/invoice-pdf-template/invoice-header";-import { InvoiceItemsTable } from "@/app/(app)/components/invoice-pdf-template/invoice-items-table";-import { InvoicePaymentInfo } from "@/app/(app)/components/invoice-pdf-template/invoice-payment-info";-import { InvoicePaymentTotals } from "@/app/(app)/components/invoice-pdf-template/invoice-payment-totals";-import { InvoiceSellerBuyerInfo } from "@/app/(app)/components/invoice-pdf-template/invoice-seller-buyer-info";-import { InvoiceVATSummaryTable } from "@/app/(app)/components/invoice-pdf-template/invoice-vat-summary-table";+import { PDF_DEFAULT_TEMPLATE_STYLES } from "@/app/(app)/components/invoice-pdf-template";+import { InvoiceBody } from "@/app/(app)/components/invoice-pdf-template/invoice-body";import {INVOICE_DEFAULT_NUMBER_VALUE,LAST_DAY_OF_MONTH,PAYMENT_DUE,TODAY,} from "@/app/constants";-import type { InvoiceData, SupportedLanguages } from "@/app/schema";+import { type InvoiceData, type SupportedLanguages } from "@/app/schema";import { TRANSLATIONS } from "@/app/schema/translations";import { STATIC_ASSETS_URL } from "@/config";import { env } from "@/env";// eslint-disable-next-line no-restricted-imports-import {- Document,- Font,- Link,- Page,- StyleSheet,- Text,- View,-} from "@react-pdf/renderer";+import { Document, Font, Page } from "@react-pdf/renderer";// Open sans seems to be working fine with EN and PLconst fontFamily = "Open Sans";-const fontFamilyBold = "Open Sans";-// we need to duplicate font registration from invoice-pdf-template.tsx for some reason-// otherwise fonts are not applied+// we need to duplicate font registration from /invoice-pdf-template/index.tsx due to some technical limitations, otherwise fonts are not applied in the PDFFont.register({family: fontFamily,fonts: [@@ -44,173 +30,16 @@ Font.register({],});-// we need to duplicate styles from invoice-pdf-template.tsx for some reason-// otherwise styles are not applied-const styles = StyleSheet.create({- wFull: {- width: "100%",- },- page: {- flexDirection: "column",- backgroundColor: "#FFFFFF",- padding: 30,- fontFamily: fontFamily,- fontWeight: 400,- },- header: {- fontSize: 16,- marginBottom: 0,- fontFamily: fontFamilyBold,- fontWeight: 600,- },- subheader: {- fontSize: 12,- marginBottom: 3,- borderBottom: "1px solid gray",- fontFamily: fontFamilyBold,- fontWeight: 600,- },- fontSize7: {- fontSize: 7,- },- fontSize8: {- fontSize: 8,- },- fontSize9: {- fontSize: 9,- },- fontSize10: {- fontSize: 10,- },- fontSize11: {- fontSize: 11,- },- fontBold: {- fontFamily: fontFamilyBold,- fontWeight: 600,- },- boldText: {- fontFamily: fontFamilyBold,- fontWeight: 600,- fontSize: 7,- },- table: {- display: "flex",- width: "100%",- borderStyle: "solid",- borderWidth: 1,- borderRightWidth: 0,- borderBottomWidth: 0,- borderColor: "gray",- },-- tableRow: {- flexDirection: "row",- width: "100%",- },- tableCol: {- borderStyle: "solid",- borderWidth: 1,- borderLeftWidth: 0,- borderTopWidth: 0,- borderColor: "gray",- textAlign: "center",- },- tableCell: {- marginTop: 1.5,- marginBottom: 1.5,- fontSize: 8,- },- tableCellBold: {- marginTop: 1,- marginBottom: 1,- marginLeft: 2,- marginRight: 2,- fontSize: 8,- fontFamily: fontFamilyBold,- fontWeight: 600,- },- // styles for specific column widths for invoice items table- colNo: { flex: 0.45 }, // smallest width for numbers- colName: { flex: 5 }, // larger width for text- colGTU: { flex: 0.9 }, // small width for codes- colAmount: { flex: 1.1 }, // medium width for numbers- colUnit: { flex: 1 }, // medium width for text- colNetPrice: { flex: 1.5 }, // medium-large for prices- colVAT: { flex: 0.7 }, // small width for percentages- colNetAmount: { flex: 1.5 }, // medium-large for amounts- colVATAmount: { flex: 1.5 }, // medium-large for amounts- colPreTaxAmount: { flex: 1.5 }, // medium-large for amounts- signatureSection: {- flexDirection: "row",- justifyContent: "center",- marginTop: 70,- width: "100%",- },- signatureColumn: {- flexDirection: "column",- alignItems: "center",- width: "30%",- marginHorizontal: "5%",- },- signatureLine: {- borderTopWidth: 1,- borderTopColor: "#000000",- borderTopStyle: "dashed",- width: "100%",- marginBottom: 5,- },- signatureText: {- fontSize: 8,- textAlign: "center",- },- footer: {- position: "absolute",- bottom: 30,- left: 30,- right: 30,- flexDirection: "row",- justifyContent: "space-between",- borderTop: "1px solid #000",- paddingTop: 5,- },- footerText: {- fontSize: 8,- color: "#000",- },- center: {- display: "flex",- justifyContent: "center",- alignItems: "center",- },-} as const);-/*** This component is used to render the invoice PDF template on the backend*- * It is used to generate the PDF file for the invoice and is duplicated from the frontend component, due to some issues.+ * It is used to generate the PDF file for the invoice and is DUPLICATED from the frontend component (/invoice-pdf-template/index.tsx), due to technical limitations.*/export const InvoicePdfTemplateToRenderOnBackend = ({invoiceData,}: {invoiceData: InvoiceData;}) => {- const language = invoiceData.language;- const t = TRANSLATIONS[language];-- const formattedInvoiceTotal = invoiceData?.total- .toLocaleString("en-US", {- minimumFractionDigits: 2,- maximumFractionDigits: 2,- })- .replaceAll(",", " ");-- const vatTableSummaryIsVisible = invoiceData.vatTableSummaryIsVisible;-- const signatureSectionIsVisible =- invoiceData.personAuthorizedToReceiveFieldIsVisible ||- invoiceData.personAuthorizedToIssueFieldIsVisible;-const invoiceNumberLabel = invoiceData?.invoiceNumberObject?.label;const invoiceNumberValue = invoiceData?.invoiceNumberObject?.value;@@ -220,91 +49,12 @@ export const InvoicePdfTemplateToRenderOnBackend = ({return (<Document title={invoiceDocTitle}>- <Page size="A4" style={styles.page}>- <InvoiceHeader invoiceData={invoiceData} styles={styles} />- <InvoiceSellerBuyerInfo invoiceData={invoiceData} styles={styles} />- <InvoiceItemsTable+ <Page size="A4" style={PDF_DEFAULT_TEMPLATE_STYLES.page}>+ <InvoiceBodyinvoiceData={invoiceData}- formattedInvoiceTotal={formattedInvoiceTotal}- styles={styles}+ styles={PDF_DEFAULT_TEMPLATE_STYLES}+ shouldLocaliseDates={false}/>- <View- style={{- display: "flex",- flexDirection: "row",- justifyContent: "space-between",- }}- >- <View style={{ width: "50%" }}>- <InvoicePaymentInfo invoiceData={invoiceData} styles={styles} />- </View>-- {vatTableSummaryIsVisible && (- <View style={{ width: "50%" }}>- <InvoiceVATSummaryTable- invoiceData={invoiceData}- formattedInvoiceTotal={formattedInvoiceTotal}- styles={styles}- />- </View>- )}- </View>- <View style={{ marginTop: vatTableSummaryIsVisible ? 0 : 15 }}>- <InvoicePaymentTotals- invoiceData={invoiceData}- formattedInvoiceTotal={formattedInvoiceTotal}- styles={styles}- />- </View>-- {/* Signature section */}- {signatureSectionIsVisible && (- <View style={styles.signatureSection}>- {invoiceData.personAuthorizedToReceiveFieldIsVisible && (- <View style={styles.signatureColumn}>- <View style={styles.signatureLine} />- <Text style={styles.signatureText}>- {t.personAuthorizedToReceive}- </Text>- </View>- )}- {invoiceData.personAuthorizedToIssueFieldIsVisible && (- <View style={styles.signatureColumn}>- <View style={styles.signatureLine} />- <Text style={styles.signatureText}>- {t.personAuthorizedToIssue}- </Text>- </View>- )}- </View>- )}-- {/* Notes */}- {invoiceData.notesFieldIsVisible && (- <View style={{ marginTop: 10 }}>- <Text style={styles.fontSize8}>{invoiceData?.notes}</Text>- </View>- )}-- {/* Footer */}- <View style={styles.footer}>- <Text style={[styles.fontSize9]}>- {t.createdWith}{" "}- <Link- style={[styles.fontSize9, { color: "blue" }]}- src={"https://easyinvoicepdf.com"}- >- https://easyinvoicepdf.com- </Link>- </Text>- {/* Page number */}- <Text- style={styles.footerText}- render={({ pageNumber, totalPages }) =>- `${pageNumber}/${totalPages}`- }- />- </View></Page></Document>);@@ -396,6 +146,8 @@ export const ENGLISH_INVOICE_REAL_DATA = {notesFieldIsVisible: true,personAuthorizedToReceiveFieldIsVisible: true,personAuthorizedToIssueFieldIsVisible: true,++ template: "default",} as const satisfies InvoiceData;export const POLISH_INVOICE_REAL_DATA = {diff --git a/src/app/api/generate-invoice/route.tsx b/src/app/api/generate-invoice/route.tsxindex 4d570df..b3b7632 100644--- a/src/app/api/generate-invoice/route.tsx+++ b/src/app/api/generate-invoice/route.tsx@@ -22,6 +22,7 @@ import {} from "./render-pdf-on-server";import { env } from "@/env";+import { ipLimiter } from "@/lib/rate-limit";export const dynamic = "force-dynamic";@@ -30,10 +31,32 @@ export const maxDuration = 30; // Set to 30 secondsexport async function GET(req: NextRequest) {try {+ // Check if the request is authorizedif (req.headers.get("Authorization") !== `Bearer ${env.AUTH_TOKEN}`) {return new NextResponse("Unauthorized", { status: 401 });}+ // Rate limiting+ const ip = req.headers.get("x-forwarded-for") || "127.0.0.1";++ const rateLimitResult = await ipLimiter.limit(ip);++ if (!rateLimitResult.success) {+ console.log(`Rate limit exceeded for IP: ${ip}`);++ return new NextResponse(+ JSON.stringify({+ error: "Too many requests.",+ }),+ {+ status: 429,+ headers: {+ "Content-Type": "application/json",+ },+ }+ );+ }+const GENERATED_ENGLISH_INVOICE_PDF_DOCUMENT = renderToBuffer(<InvoicePdfTemplateToRenderOnBackendinvoiceData={ENGLISH_INVOICE_REAL_DATA}diff --git a/src/app/changelog/[slug]/page.tsx b/src/app/changelog/[slug]/page.tsxnew file mode 100644index 0000000..db5b5b5--- /dev/null+++ b/src/app/changelog/[slug]/page.tsx@@ -0,0 +1,339 @@+import { APP_URL, STATIC_ASSETS_URL } from "@/config";+import {+ formatChangelogDate,+ getChangelogEntry,+ getChangelogEntries,+ getNextChangelogEntry,+ getPreviousChangelogEntry,+} from "@/app/changelog/utils";+import { ArrowLeftIcon, ArrowRightIcon } from "lucide-react";+import type { Metadata } from "next";+import Link from "next/link";+import { notFound } from "next/navigation";+import { Suspense } from "react";+import { DateTime } from "../components/date-time";+import { BlackGoToAppButton } from "@/components/go-to-app-button-cta";++interface ChangelogPageProps {+ params: Promise<{ slug: string }>;+}++// Generate static params for all changelog entries+export async function generateStaticParams() {+ const entries = await getChangelogEntries();+ return entries.map((entry) => ({+ slug: entry.slug,+ }));+}++// Generate metadata for each changelog entry+export async function generateMetadata({+ params,+}: ChangelogPageProps): Promise<Metadata> {+ const { slug } = await params;+ const entry = await getChangelogEntry(slug);++ if (!entry) {+ return {+ title: "Changelog Entry Not Found",+ };+ }++ const formattedDate = formatChangelogDate(entry.metadata.date);++ return {+ title: `${entry.metadata.title || `Update ${formattedDate}`} | Changelog`,+ description: `Changelog entry from ${formattedDate}`,+ authors: [{ name: "Vlad Sazonau", url: "https://x.com/vlad_sazon" }],+ openGraph: {+ title: `${entry.metadata.title || `Update ${formattedDate}`} | Changelog`,+ description: `Changelog entry from ${formattedDate}`,+ type: "article",+ publishedTime: entry.metadata.date,+ siteName: `https://easyinvoicepdf.com/changelog/${slug}`,+ images: [+ {+ url: `${STATIC_ASSETS_URL}/easy-invoice-opengraph-image.png?v=5`,+ type: "image/png",+ width: 1200,+ height: 630,+ alt: "EasyInvoicePDF.com - Free Invoice Generator with Live PDF Preview",+ },+ ],+ },+ twitter: {+ card: "summary_large_image",+ title: `${entry.metadata.title || `Update ${formattedDate}`} | Changelog`,+ description: `Changelog entry from ${formattedDate}`,+ images: [+ {+ url: `${STATIC_ASSETS_URL}/easy-invoice-opengraph-image.png?v=5`,+ type: "image/png",+ width: 1200,+ height: 630,+ alt: "EasyInvoicePDF.com - Free Invoice Generator with Live PDF Preview",+ },+ ],+ },+ };+}++export default async function ChangelogEntryPage({+ params,+}: ChangelogPageProps) {+ const { slug } = await params;+ const entry = await getChangelogEntry(slug);++ if (!entry) {+ notFound();+ }++ const formattedDate = formatChangelogDate(entry.metadata.date);+ const [nextEntry, previousEntry] = await Promise.all([+ getNextChangelogEntry(slug),+ getPreviousChangelogEntry(slug),+ ]);++ return (+ <div className="min-h-screen bg-white dark:bg-gray-900">+ <div className="mx-auto max-w-4xl px-4 py-16 sm:px-6 lg:px-8">+ {/* Back to changelog link */}+ <div className="mb-8">+ <Link+ href="/changelog"+ className="group inline-flex items-center text-start text-base font-medium text-slate-700 dark:text-gray-400"+ >+ <ArrowLeftIcon className="inline-block size-4 transition-transform group-hover:-translate-x-0.5" />+ <span className="ml-1">Back to All Posts</span>+ </Link>+ </div>++ {/* Entry header */}+ <article className="prose prose-gray max-w-none dark:prose-invert">+ <header className="not-prose mb-4 sm:mb-8">+ <div className="mb-4 flex items-center gap-3">+ <h1 className="text-pretty text-3xl font-bold text-gray-900 dark:text-gray-100 sm:text-4xl">+ {entry.metadata.title || `Update ${formattedDate}`}+ </h1>+ </div>+ <div className="flex items-center gap-4 text-sm text-gray-600 dark:text-gray-400">+ <DateTime dateTime={entry.metadata.date}>+ {formattedDate}+ </DateTime>+ </div>+ </header>++ {/* Author and social sharing */}+ <div className="my-4 flex flex-col justify-between sm:my-8 sm:flex-row sm:items-center">+ <div className="flex items-center gap-x-8">+ <div+ className="flex items-center space-x-3"+ data-testid="author-info-img"+ >+ <Link+ href="https://x.com/vlad_sazon"+ target="_blank"+ rel="noopener noreferrer"+ className="group"+ >+ {/* eslint-disable-next-line @next/next/no-img-element */}+ <img+ alt="Vlad Sazonau"+ loading="lazy"+ width="36"+ height="36"+ decoding="async"+ className="rounded-full blur-0 transition-all group-hover:brightness-95"+ src={+ "https://pbs.twimg.com/profile_images/1927695477971030016/Dwloje_P_400x400.jpg"+ }+ />+ </Link>+ <div className="flex flex-col" data-testid="author-info-text">+ <span className="text-sm font-medium text-neutral-800 dark:text-neutral-300">+ Vlad Sazonau+ </span>+ <span className="text-sm text-slate-500 dark:text-neutral-400">+ Founder,{" "}+ <Link+ href="/"+ className="text-slate-500 no-underline hover:underline hover:underline-offset-2 dark:text-neutral-400"+ >+ {" "}+ EasyInvoicePDF+ </Link>+ </span>+ </div>+ </div>+ </div>+ <div className="flex items-center gap-x-6">+ {/* Twitter/X share */}+ <a+ target="_blank"+ rel="noopener noreferrer"+ className="transition-all hover:scale-110"+ href={`https://twitter.com/intent/tweet?text=${encodeURIComponent(+ `EasyInvoicePDF: ${entry.metadata.title || `Update ${formattedDate}`}`+ )}&url=${encodeURIComponent(`${APP_URL}/changelog/${slug}`)}`}+ >+ <svg+ width="300"+ height="300"+ viewBox="0 0 300 300"+ version="1.1"+ xmlns="http://www.w3.org/2000/svg"+ className="size-5 p-px text-black dark:text-white"+ >+ <path+ stroke="currentColor"+ d="M178.57 127.15 290.27 0h-26.46l-97.03 110.38L89.34 0H0l117.13 166.93L0 300.25h26.46l102.4-116.59 81.8 116.59h89.34M36.01 19.54H76.66l187.13 262.13h-40.66"+ />+ </svg>+ </a>+ {/* LinkedIn share */}+ <a+ target="_blank"+ rel="noopener noreferrer"+ className="transition-all hover:scale-110"+ href={`http://www.linkedin.com/shareArticle?mini=true&url=${encodeURIComponent(+ `${APP_URL}/changelog/${slug}`+ )}&title=${encodeURIComponent(+ `EasyInvoicePDF: ${entry.metadata.title || `Update ${formattedDate}`}`+ )}`}+ >+ <svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ className="size-6 text-[#0077b5] dark:text-[#0077b5]"+ >+ <path+ fill="currentColor"+ d="M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-11 19h-3v-11h3v11zm-1.5-12.268c-.966 0-1.75-.79-1.75-1.764s.784-1.764 1.75-1.764 1.75.79 1.75 1.764-.783 1.764-1.75 1.764zm13.5 12.268h-3v-5.604c0-3.368-4-3.113-4 0v5.604h-3v-11h3v1.765c1.396-2.586 7-2.777 7 2.476v6.759z"+ />+ </svg>+ </a>+ {/* Facebook share */}+ <a+ target="_blank"+ rel="noopener noreferrer"+ className="transition-all hover:scale-110"+ href={`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(+ `${APP_URL}/changelog/${slug}`+ )}&title=${encodeURIComponent(+ `EasyInvoicePDF: ${entry.metadata.title || `Update ${formattedDate}`}`+ )}`}+ >+ <svg+ xmlns="http://www.w3.org/2000/svg"+ width="1365.12"+ height="1365.12"+ viewBox="0 0 14222 14222"+ className="size-6 text-[#1877f2] dark:text-[#1877f2]"+ >+ <circle cx="7111" cy="7112" r="7111" fill="currentColor" />+ <path+ d="M9879 9168l315-2056H8222V5778c0-562 275-1111 1159-1111h897V2917s-814-139-1592-139c-1624 0-2686 984-2686 2767v1567H4194v2056h1806v4969c362 57 733 86 1111 86s749-30 1111-86V9168z"+ fill="white"+ />+ </svg>+ </a>+ {/* Hacker News share */}+ <a+ target="_blank"+ rel="noopener noreferrer"+ className="transition-all hover:scale-110"+ href={`https://news.ycombinator.com/submitlink?u=${encodeURIComponent(+ `${APP_URL}/changelog/${slug}`+ )}&t=${encodeURIComponent(`EasyInvoicePDF: ${entry.metadata.title || `Update ${formattedDate}`}`)}`}+ >+ <svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ className="size-6 text-[#ff6600] dark:text-[#ff6600]"+ >+ <path+ fill="currentColor"+ d="M0 24V0h24v24H0zM6.951 5.896l4.112 7.708v5.064h1.583v-4.972l4.148-7.799h-1.749l-2.457 4.875c-.372.745-.688 1.434-.688 1.434s-.297-.708-.651-1.434L8.831 5.896h-1.88z"+ />+ </svg>+ </a>+ </div>+ </div>++ {/* Entry content */}+ <div className="prose-headings:mt-8 prose-headings:font-semibold prose-headings:text-black prose-h1:text-3xl prose-h2:text-2xl prose-h3:text-xl prose-h4:text-lg prose-h5:text-base prose-h6:text-sm prose-p:text-gray-600 prose-blockquote:border-l-blue-500 prose-strong:text-gray-900 prose-code:rounded prose-code:bg-gray-100 prose-code:px-2 prose-code:py-1 prose-pre:bg-gray-100 prose-li:text-gray-600 prose-img:rounded-lg prose-img:shadow-lg dark:prose-headings:text-white dark:prose-p:text-gray-300 dark:prose-strong:text-gray-100 dark:prose-code:bg-gray-800 dark:prose-pre:bg-gray-800 dark:prose-li:text-gray-300">+ <Suspense+ fallback={+ <div className="h-64 animate-pulse rounded bg-gray-200 dark:bg-gray-700"></div>+ }+ >+ <entry.Component />+ </Suspense>+ </div>+ </article>++ {/* CTA Button */}+ <div+ className="mt-16 flex justify-center"+ data-testid="go-to-app-button-container"+ >+ <BlackGoToAppButton className="w-full py-6 text-lg">+ Go to App+ </BlackGoToAppButton>+ </div>++ {/* Previous and Next post navigation */}+ {(previousEntry || nextEntry) && (+ <div className="mt-16 border-t border-gray-200 pt-8 dark:border-gray-700">+ <div className="flex flex-row gap-8 sm:justify-between">+ {/* Previous post link */}+ {previousEntry ? (+ <Link+ href={`/changelog/${previousEntry.slug}`}+ className="group ml-2 flex-1 text-left sm:ml-10"+ >+ <p className="flex items-center justify-end gap-1 text-sm font-medium text-slate-500 dark:text-gray-400 sm:text-base">+ <ArrowLeftIcon className="inline-block size-4 transition-transform group-hover:-translate-x-0.5" />+ Previous+ </p>+ <h3 className="mt-1 text-pretty text-end text-sm font-semibold text-gray-900 group-hover:underline dark:text-gray-100 sm:text-base">+ {previousEntry.metadata.title ||+ `Update ${formatChangelogDate(previousEntry.metadata.date)}`}+ </h3>+ </Link>+ ) : (+ <div className="flex-1"></div>+ )}++ {/* Center divider */}+ <div className="block w-px self-stretch bg-gray-200 dark:bg-gray-700" />++ {/* Next post link */}+ {nextEntry ? (+ <Link+ href={`/changelog/${nextEntry.slug}`}+ className="group mr-2 flex-1 text-right sm:mr-10"+ >+ <p className="flex items-center justify-start gap-1 text-sm font-medium text-slate-500 dark:text-gray-400 sm:text-base">+ Next+ <ArrowRightIcon className="inline-block size-4 transition-transform group-hover:translate-x-0.5" />+ </p>+ <h3 className="mt-1 text-pretty text-start text-sm font-semibold text-gray-900 group-hover:underline dark:text-gray-100 sm:text-base">+ {nextEntry.metadata.title ||+ `Update ${formatChangelogDate(nextEntry.metadata.date)}`}+ </h3>+ </Link>+ ) : (+ <div className="flex-1"></div>+ )}+ </div>+ </div>+ )}+ </div>+ </div>+ );+}diff --git a/src/app/changelog/components/date-time.tsx b/src/app/changelog/components/date-time.tsxnew file mode 100644index 0000000..cc13e8f--- /dev/null+++ b/src/app/changelog/components/date-time.tsx@@ -0,0 +1,16 @@+export function DateTime({+ dateTime = "",+ children,+}: {+ dateTime: string;+ children: React.ReactNode;+}) {+ return (+ <time+ className="inline-flex items-center rounded-md border border-gray-200 bg-white px-3 py-1.5 text-sm font-medium text-gray-800 shadow-sm transition-colors hover:bg-gray-50 hover:text-gray-950 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700 dark:hover:text-gray-50"+ dateTime={dateTime}+ >+ {children}+ </time>+ );+}diff --git a/src/app/changelog/content/easy-invoice-pdf-launch.mdx b/src/app/changelog/content/easy-invoice-pdf-launch.mdxnew file mode 100644index 0000000..e5fad64--- /dev/null+++ b/src/app/changelog/content/easy-invoice-pdf-launch.mdx@@ -0,0 +1,74 @@+export const metadata = {+ title:+ "EasyInvoicePDF Launch - Free & Open-Source Invoice Generator with Live Preview",+ date: "2025-03-03",+ version: "1.0.0",+ type: "major",+};++++## 🎉 Initial Release++### Welcome to EasyInvoicePDF!++We're excited to launch **EasyInvoicePDF** - a free, open-source tool that helps you create professional invoices instantly with real-time preview. No sign-up required, completely free to use!++## ✨ Core Features++### 🔴 Live Preview++See your invoice update in real-time as you make changes, ensuring it looks exactly how you want before downloading.++### 🔗 Shareable Links++Generate secure links to share your invoices directly with clients without sending attachments. Perfect for remote collaboration and client communication.++### ⚡ Instant Download++Download your invoice as a PDF file with one click, ready to be sent or printed. No waiting, no processing delays.++### 🌍 Multiple Languages & Currencies++Create invoices in **ten languages**:++- English+- Polish+- German+- Spanish+- Portuguese+- Russian+- Ukrainian+- French+- Italian+- Dutch++With support for all major currencies and automatic formatting based on your selected locale.++### 🇪🇺 European VAT Support++Automatically calculate European VAT rates and totals for your invoices. Compliant with EU tax requirements.++### 🔓 Open Source & Privacy-First++- **100% Free**: Completely free to use with no hidden costs+- **Open Source**: Full access to source code on GitHub+- **Privacy Focused**: All invoice data is processed entirely in your browser - we don't store any of your information on our servers+- **No Sign-up Required**: Start creating invoices immediately without any registration process++### 🏢 Professional Invoice Features++- Complete seller and buyer information management+- Detailed invoice items with descriptions, quantities, and pricing+- Automatic tax calculations and totals+- Professional invoice formatting and layout+- Payment information and terms+- Invoice numbering and dating++---++**Ready to simplify your invoicing?**++Start creating professional invoices in seconds with our free, open-source tool at [easyinvoicepdf.com](https://easyinvoicepdf.com)++**GitHub Repository**: [VladSez/easy-invoice-pdf](https://github.com/VladSez/easy-invoice-pdf)diff --git a/src/app/changelog/content/stripe-pdf-template.mdx b/src/app/changelog/content/stripe-pdf-template.mdxnew file mode 100644index 0000000..1bd2b98--- /dev/null+++ b/src/app/changelog/content/stripe-pdf-template.mdx@@ -0,0 +1,45 @@+export const metadata = {+ title: "Stripe Invoice Template & Landing Page Improvements",+ date: "2025-06-28",+ version: "1.1.0",+ type: "major",+};++++## 🚀 New Features++### Stripe-inspired Invoice Template++- 🤩 **Stripe template support**: Introduced a modern, Stripe-inspired invoice template with professional styling and layout optimizations+- **Dynamic template selection**: Introduced template selection functionality in the invoice form+- **Logo upload**: Added logo upload capability for the **Stripe** template with validation+- **Payment links**: Integrated Stripe payment URL field for enhanced invoice functionality++++### User Experience & Design++- **Landing page cleanup**: Refined About section and footer for better layout and accessibility+- **Call-to-action toasts**: Added custom, randomized CTA toasts encouraging user support (40-second timer)+- **Currency expansion**: Added support for more currencies with improved date handling+- **Improved tooltips**: Enhanced tooltips with detailed explanations and improved styling++{/* prettier-ignore-start */}+| Before | After |+|--------|-------|+|  |  |+|  |  |+{/* prettier-ignore-end */}++- **Invoice deletion**: Added confirmation dialog for invoice item deletion+- **Form validation**: Relaxed date validations for better user experience+- **Improved PDF viewers**: Enhanced PDF rendering with better error handling and fallback UI+- **Accessibility**: Improved button component accessibility with proper disabled state handling+- **Detailed Invoice Footers**: Added comprehensive invoice footer and payment info sections++++---++**Full Changeset**: [`63b097b...7ae733b`](https://github.com/VladSez/easy-invoice-pdf/compare/63b097b...7ae733b)diff --git a/src/app/changelog/layout.tsx b/src/app/changelog/layout.tsxnew file mode 100644index 0000000..f433ab8--- /dev/null+++ b/src/app/changelog/layout.tsx@@ -0,0 +1,187 @@+import { ProjectLogo } from "@/components/etc/project-logo";+import { Footer } from "@/components/footer";+import { BlackGoToAppButton } from "@/components/go-to-app-button-cta";+import { ProjectLogoDescription } from "@/components/project-logo-description";+import { Button } from "@/components/ui/button";+import { GITHUB_URL, STATIC_ASSETS_URL } from "@/config";+import type { Metadata } from "next";+import Link from "next/link";++// Enable static generation for changelog layout+export const dynamic = "force-static";++export const metadata: Metadata = {+ title: "Changelog | Free Invoice Generator – Live Preview, No Sign-Up",+ description:+ "Stay up to date with the latest features, improvements, and bug fixes in EasyInvoicePDF.",+ keywords: [+ "changelog",+ "updates",+ "releases",+ "features",+ "bug fixes",+ "pdf invoice generator",+ ],+ authors: [{ name: "Uladzislau Sazonau" }],+ creator: "Uladzislau Sazonau",+ publisher: "Uladzislau Sazonau",+ openGraph: {+ title: "Changelog | Free Invoice Generator – Live Preview, No Sign-Up",+ description:+ "Stay up to date with the latest features, improvements, and bug fixes in EasyInvoicePDF.",+ siteName: "EasyInvoicePDF.com | Free Invoice Generator",+ type: "website",+ locale: "en_US",+ images: [+ {+ url: `${STATIC_ASSETS_URL}/easy-invoice-opengraph-image.png?v=5`,+ type: "image/png",+ width: 1200,+ height: 630,+ alt: "EasyInvoicePDF.com - Free Invoice Generator with Live PDF Preview",+ },+ ],+ },+ twitter: {+ card: "summary_large_image",+ title: "Changelog | Free Invoice Generator – Live Preview, No Sign-Up",+ description:+ "Stay up to date with the latest features, improvements, and bug fixes in EasyInvoicePDF.",+ creator: "@vlad_sazon",+ images: [+ {+ url: `${STATIC_ASSETS_URL}/easy-invoice-opengraph-image.png?v=5`,+ type: "image/png",+ width: 1200,+ height: 630,+ alt: "EasyInvoicePDF.com - Free Invoice Generator with Live PDF Preview",+ },+ ],+ },+};++interface ChangelogLayoutProps {+ children: React.ReactNode;+}++// https://nextjs.org/docs/app/guides/mdx+export default function ChangelogLayout({ children }: ChangelogLayoutProps) {+ return (+ <>+ <Header />+ {children}+ <Footer+ translations={{+ footerDescription:+ "A free, open-source tool for creating professional invoices with real-time preview.",+ footerCreatedBy: "Created by",+ product: "Product",++ newsletterTitle: "Subscribe to our newsletter",+ newsletterDescription:+ "Get the latest updates and news from EasyInvoicePDF.com",+ newsletterSubscribe: "Subscribe",+ newsletterPlaceholder: "Enter your email",+ newsletterSuccessMessage: "Thank you for subscribing!",+ newsletterErrorMessage: "Failed to subscribe. Please try again.",+ newsletterEmailLanguageInfo: "All emails will be sent in English",+ }}+ links={+ <ul className="space-y-2">+ <li>+ <Link+ href="/"+ className="text-sm text-slate-500 hover:text-slate-900"+ >+ App+ </Link>+ </li>+ <li>+ <Link+ href="/en/about"+ className="text-sm text-slate-500 hover:text-slate-900"+ >+ About+ </Link>+ </li>++ <li>+ <Link+ href={GITHUB_URL}+ target="_blank"+ rel="noopener noreferrer"+ className="text-sm text-slate-500 hover:text-slate-900"+ >+ GitHub+ </Link>+ </li>+ <li>+ <Link+ href="https://pdfinvoicegenerator.userjot.com/?cursor=1&order=top&limit=10"+ target="_blank"+ rel="noopener noreferrer"+ className="text-sm text-slate-500 hover:text-slate-900"+ >+ Share feedback+ </Link>+ </li>+ </ul>+ }+ />+ </>+ );+}++function Header() {+ return (+ <header className="sticky top-0 z-50 w-full border-b bg-white shadow-sm">+ <div className="flex items-center justify-center">+ <div className="container h-auto px-3 py-2 sm:h-16 sm:py-0">+ <div className="flex h-full flex-row flex-wrap items-center justify-between gap-2">+ <div className="w-[53%] sm:w-auto">+ <Logo />+ </div>+ <div className="flex items-center sm:mt-0 sm:gap-2">+ <Button+ _variant="ghost"+ className="hidden lg:inline-flex"+ asChild+ >+ <Link href="/en/about">About product</Link>+ </Button>+ <Button+ _variant="ghost"+ className="hidden lg:inline-flex"+ asChild+ >+ <Link+ href="https://pdfinvoicegenerator.userjot.com/?cursor=1&order=top&limit=10"+ target="_blank"+ rel="noopener noreferrer"+ >+ Share feedback+ </Link>+ </Button>+ <BlackGoToAppButton className="px-3 sm:px-8">+ Go to App+ </BlackGoToAppButton>+ </div>+ </div>+ </div>+ </div>+ </header>+ );+}++function Logo() {+ return (+ <div>+ <div className="flex items-center gap-1 sm:gap-2">+ <ProjectLogo className="h-7 w-7 flex-shrink-0 sm:h-8 sm:w-8" />+ <ProjectLogoDescription>+ Free Invoice Generator with Live PDF Preview+ </ProjectLogoDescription>+ </div>+ </div>+ );+}diff --git a/src/app/changelog/page.tsx b/src/app/changelog/page.tsxnew file mode 100644index 0000000..04ad9c6--- /dev/null+++ b/src/app/changelog/page.tsx@@ -0,0 +1,90 @@+import {+ formatChangelogDate,+ getChangelogEntries,+ type ChangelogEntry,+} from "@/app/changelog/utils";+import Link from "next/link";+import { notFound } from "next/navigation";+import { Suspense } from "react";+import { DateTime } from "./components/date-time";++// Enable static generation for this page+export const dynamic = "force-static";++// https://nextjs.org/docs/app/guides/mdx+export default async function ChangelogPage() {+ const entries = await getChangelogEntries();++ if (entries.length === 0) {+ notFound();+ }++ return (+ <div className="min-h-screen bg-white dark:bg-gray-900">+ <div className="relative z-0">+ <div className="relative mb-8 pt-16 text-center sm:mb-16">+ <div className="absolute bottom-0 h-full w-full bg-[radial-gradient(#e5e7eb_1px,transparent_1px)] [background-size:16px_16px] [mask-image:radial-gradient(ellipse_50%_50%_at_50%_50%,#000_70%,transparent_100%)] sm:bottom-auto"></div>+ <h1 className="relative z-10 text-4xl font-bold tracking-tight text-gray-900 dark:text-gray-100 sm:text-5xl">+ Changelog+ </h1>+ <p className="relative z-10 mt-4 text-balance px-4 text-lg text-gray-600 dark:text-gray-400 sm:px-0">+ All the latest updates, improvements, and fixes to EasyInvoicePDF+ </p>+ </div>++ {/* Timeline Grid */}+ <div className="border-slate-200 sm:border-t">+ <div className="mx-auto max-w-6xl border-slate-200 px-4 dark:border-gray-700 sm:px-12 xl:border-x">+ {entries.map((entry) => (+ <ChangelogEntryCard key={entry.slug} entry={entry} />+ ))}+ </div>+ </div>+ </div>+ </div>+ );+}++function ChangelogEntryCard({ entry }: { entry: ChangelogEntry }) {+ const formattedDate = formatChangelogDate(entry.metadata.date);++ return (+ <div className="grid pb-20 pt-4 sm:pt-12 md:grid-cols-4">+ {/* Sticky Date Column - Desktop Only */}+ <div className="sticky top-28 hidden self-start md:col-span-1 md:block">+ <Link href={`/changelog/${entry.slug}`}>+ <DateTime dateTime={entry.metadata.date}>{formattedDate}</DateTime>+ </Link>+ </div>++ {/* Content Column */}+ <div className="flex flex-col md:col-span-3">+ {/* Mobile Date - Above Title */}+ <Link className="mb-3 md:hidden" href={`/changelog/${entry.slug}`}>+ <DateTime dateTime={entry.metadata.date}>{formattedDate}</DateTime>+ </Link>++ {/* Title */}+ <Link href={`/changelog/${entry.slug}`}>+ <h2 className="mt-2 text-pretty text-2xl font-semibold tracking-tight text-gray-800 hover:underline hover:decoration-1 hover:underline-offset-4 dark:text-gray-100 sm:mt-0">+ {entry.metadata.title || `Update ${formattedDate}`}+ </h2>+ </Link>++ {/* Article Content */}+ <article+ data-testid="changelog-entry-card"+ className="prose prose-gray max-w-none transition-all dark:prose-invert prose-headings:relative prose-headings:mb-4 prose-headings:mt-6 prose-headings:scroll-mt-20 prose-headings:font-semibold prose-headings:text-gray-900 prose-h1:text-2xl prose-h2:text-xl prose-h3:text-lg prose-h4:text-base prose-p:leading-relaxed prose-p:text-gray-600 prose-a:font-medium prose-a:text-gray-500 prose-a:underline-offset-4 hover:prose-a:text-black prose-strong:text-gray-900 prose-code:rounded prose-code:bg-gray-100 prose-code:px-1.5 prose-code:py-0.5 prose-code:text-sm prose-pre:border prose-pre:border-gray-200 prose-pre:bg-gray-100 prose-li:text-gray-600 prose-img:rounded-lg prose-img:border prose-img:border-gray-200 prose-img:shadow-md dark:prose-headings:text-gray-100 dark:prose-p:text-gray-300 dark:prose-a:text-blue-400 dark:prose-strong:text-gray-100 dark:prose-code:bg-gray-800 dark:prose-pre:border-gray-700 dark:prose-pre:bg-gray-800 dark:prose-li:text-gray-300 dark:prose-img:border-gray-700"+ >+ <Suspense+ fallback={+ <div className="h-32 animate-pulse rounded bg-gray-200 dark:bg-gray-700"></div>+ }+ >+ <entry.Component />+ </Suspense>+ </article>+ </div>+ </div>+ );+}diff --git a/src/app/changelog/utils.ts b/src/app/changelog/utils.tsnew file mode 100644index 0000000..cfa8b18--- /dev/null+++ b/src/app/changelog/utils.ts@@ -0,0 +1,209 @@+import { readdir } from "fs/promises";+import { join } from "path";+import { z } from "zod";++interface ChangelogMetadata {+ title?: string;+ date: string;+ version?: string;+ type?: "major" | "minor" | "patch";+ slug?: string;+}++export interface ChangelogEntry {+ slug: string;+ metadata: ChangelogMetadata;+ Component: React.ComponentType;+}++/**+ * Gets all MDX files from the content/changelog directory+ */+async function getChangelogFiles(): Promise<string[]> {+ try {+ const changelogDir = join(+ process.cwd(),+ "src",+ "app",+ "changelog",+ "content"+ );+ const files = await readdir(changelogDir);+ return files.filter((file) => file.endsWith(".mdx"));+ } catch (error) {+ console.error("Failed to read changelog directory:", error);+ return [];+ }+}++/**+ * Converts filename to slug (removes .mdx extension)+ */+function filenameToSlug(filename: string): string {+ return filename.replace(".mdx", "");+}++/**+ * Dynamically imports a changelog MDX file+ */+async function importChangelogFile(filename: string) {+ const slug = filenameToSlug(filename);+ try {+ const dynamicModule = (await import(`./content/${filename}`)) as {+ metadata: ChangelogMetadata;+ default: React.ComponentType;+ };++ // Validate metadata with Zod schema+ const metadataSchema = z.object({+ title: z.string().optional(),+ date: z.string().date(),+ version: z.string().optional(),+ type: z.enum(["major", "minor", "patch"]).optional(),+ });++ // Validate metadata and throw error if invalid+ try {+ metadataSchema.parse(dynamicModule.metadata);+ } catch (error) {+ if (error instanceof z.ZodError) {+ console.error(+ `Invalid metadata in changelog file ${filename}:`,+ error.errors+ );+ return null;+ }+ throw error;+ }++ return {+ slug,+ module: {+ metadata: dynamicModule.metadata,+ default: dynamicModule.default,+ },+ };+ } catch (error) {+ console.error(`Failed to import changelog file ${filename}:`, error);+ return null;+ }+}++/**+ * Loads all changelog entries and returns them sorted by date (newest first)+ */+export async function getChangelogEntries(): Promise<ChangelogEntry[]> {+ const files = await getChangelogFiles();+ const entries: ChangelogEntry[] = [];++ for (const filename of files) {+ const imported = await importChangelogFile(filename);+ if (!imported) continue;++ const { slug, module } = imported;+ const { metadata, default: Component } = module as {+ metadata: ChangelogMetadata;+ default: React.ComponentType;+ };++ entries.push({+ slug,+ metadata: {+ ...metadata,+ slug, // Ensure slug is always available in metadata+ },+ Component,+ });+ }++ // Sort by date (newest first)+ return entries.sort(+ (a, b) =>+ new Date(b.metadata.date).getTime() - new Date(a.metadata.date).getTime()+ );+}++/**+ * Gets a specific changelog entry by slug+ */+export async function getChangelogEntry(+ slug: string+): Promise<ChangelogEntry | null> {+ const files = await getChangelogFiles();+ const filename = files.find((file) => filenameToSlug(file) === slug);++ if (!filename) {+ return null;+ }++ const imported = await importChangelogFile(filename);+ if (!imported) {+ return null;+ }++ const { module } = imported;+ const { metadata, default: Component } = module as {+ metadata: ChangelogMetadata;+ default: React.ComponentType;+ };++ return {+ slug,+ metadata: {+ ...metadata,+ slug, // Ensure slug is always available in metadata+ },+ Component,+ };+}++/**+ * Formats a date for display+ */+export function formatChangelogDate(date: string): string {+ return new Date(date).toLocaleDateString("en-US", {+ year: "numeric",+ month: "long",+ day: "numeric",+ });+}++/**+ * Gets the next changelog entry after the current one (based on date order)+ */+export async function getNextChangelogEntry(+ currentSlug: string+): Promise<ChangelogEntry | null> {+ const allEntries = await getChangelogEntries();+ const currentIndex = allEntries.findIndex(+ (entry) => entry.slug === currentSlug+ );++ // If current entry is not found or is the first one (newest), return null+ if (currentIndex === -1 || currentIndex === 0) {+ return null;+ }++ // Return the previous entry (newer entry since they're sorted newest first)+ return allEntries[currentIndex - 1];+}++/**+ * Gets the previous changelog entry before the current one (based on date order)+ */+export async function getPreviousChangelogEntry(+ currentSlug: string+): Promise<ChangelogEntry | null> {+ const allEntries = await getChangelogEntries();+ const currentIndex = allEntries.findIndex(+ (entry) => entry.slug === currentSlug+ );++ // If current entry is not found or is the last one (oldest), return null+ if (currentIndex === -1 || currentIndex === allEntries.length - 1) {+ return null;+ }++ // Return the next entry (older entry since they're sorted newest first)+ return allEntries[currentIndex + 1];+}diff --git a/src/app/constants/index.ts b/src/app/constants/index.tsindex 1e21bdb..35f6733 100644--- a/src/app/constants/index.ts+++ b/src/app/constants/index.ts@@ -2,6 +2,7 @@ import {SUPPORTED_CURRENCIES,SUPPORTED_LANGUAGES,SUPPORTED_DATE_FORMATS,+ SUPPORTED_TEMPLATES,type InvoiceData,type SellerData,type BuyerData,@@ -17,6 +18,7 @@ const INVOICE_CURRENT_MONTH_AND_YEAR = dayjs().format("MM-YYYY");const EUR = SUPPORTED_CURRENCIES[0];const EN = SUPPORTED_LANGUAGES[0];const DEFAULT_DATE_FORMAT = SUPPORTED_DATE_FORMATS[0];+const DEFAULT_TEMPLATE = SUPPORTED_TEMPLATES[0];export const INVOICE_DEFAULT_NUMBER_VALUE = `1/${INVOICE_CURRENT_MONTH_AND_YEAR}`;@@ -72,6 +74,11 @@ export const DEFAULT_BUYER_DATA = {export const INITIAL_INVOICE_DATA = {language: EN,currency: EUR,+ template: DEFAULT_TEMPLATE,++ logo: "",+ stripePayOnlineUrl: "",+invoiceNumberObject: {label: `${TRANSLATIONS[EN].invoiceNumber}:`,value: INVOICE_DEFAULT_NUMBER_VALUE,diff --git a/src/app/layout.tsx b/src/app/layout.tsxindex b22963d..2a484f8 100644--- a/src/app/layout.tsx+++ b/src/app/layout.tsx@@ -15,6 +15,9 @@ import { APP_URL, STATIC_ASSETS_URL } from "@/config";import "./globals.css";+import "react-pdf/dist/esm/Page/AnnotationLayer.css";+import "react-pdf/dist/esm/Page/TextLayer.css";+export const viewport: Viewport = {initialScale: 1, // Sets the default zoom level to 1 (100%)width: "device-width", // Ensures the viewport width matches the device's screen widthdiff --git a/src/app/schema/i18n-schema.ts b/src/app/schema/i18n-schema.tsindex 58de6b5..641de99 100644--- a/src/app/schema/i18n-schema.ts+++ b/src/app/schema/i18n-schema.ts@@ -65,9 +65,9 @@ const aboutSchema = z.object({features: z.string(),github: z.string(),+ changelog: z.string(),}).strict(),- copyright: z.string(),createdBy: z.string(),}).strict(),@@ -75,6 +75,7 @@ const aboutSchema = z.object({goToApp: z.string(),viewOnGithub: z.string(),+ starOnGithub: z.string(),switchLanguage: z.string(),shareFeedback: z.string(),app: z.string(),@@ -98,7 +99,6 @@ const faqSchema = z.object({title: z.string(),description: z.string(),- badge: z.string(),items: z.object({whatIs: z.object({diff --git a/src/app/schema/index.ts b/src/app/schema/index.tsindex 562b14d..ef293a0 100644--- a/src/app/schema/index.ts+++ b/src/app/schema/index.ts@@ -1,31 +1,55 @@import { z } from "zod";+import dayjs from "dayjs";export const SUPPORTED_CURRENCIES = ["EUR", // Euro"USD", // US Dollar+ "PLN", // Polish Złoty+ "GBP", // British Pound++ "JPY", // Japanese Yen+ "CNY", // Chinese Yuan (RMB)+ "CHF", // Swiss Franc"CAD", // Canadian Dollar"AUD", // Australian Dollar- "GBP", // British Pound- "PLN", // Polish Złoty+ "HKD", // Hong Kong Dollar+ "SGD", // Singapore Dollar+ "INR", // Indian Rupee+ "KRW", // South Korean Won+ "BRL", // Brazilian Real"RUB", // Russian Ruble+ "TWD", // Taiwan Dollar+ "SEK", // Swedish Krona+ "MXN", // Mexican Peso+ "NZD", // New Zealand Dollar+ "TRY", // Turkish Lira+ "ZAR", // South African Rand+ "NOK", // Norwegian Krone+ "DKK", // Danish Krone+ "ILS", // Israeli New Shekel+ "CZK", // Czech Koruna+ "HUF", // Hungarian Forint"UAH", // Ukrainian Hryvnia"BYN", // Belarusian Ruble- "BRL", // Brazilian Real- "MXN", // Mexican Peso"ARS", // Argentine Peso- "INR", // Indian Rupee- "CHF", // Swiss Franc- "HKD", // Hong Kong Dollar- "TWD", // Taiwan Dollar- "CNY", // Chinese Yuan (RMB)- "SGD", // Singapore Dollar-] as const;+ "PKR", // Pakistani Rupee+ "SAR", // Saudi Riyal+ "AED", // UAE Dirham+ "QAR", // Qatari Riyal+ "KWD", // Kuwaiti Dinar+ "BHD", // Bahraini Dinar+ "OMR", // Omani Rial+ "JOD", // Jordanian Dinar+ "EGP", // Egyptian Pound+ "LBP", // Lebanese Pound+] as const satisfies string[];export type SupportedCurrencies = (typeof SUPPORTED_CURRENCIES)[number];export const CURRENCY_SYMBOLS = {EUR: "€", // EuroUSD: "$", // US Dollar+CAD: "$", // Canadian DollarAUD: "$", // Australian DollarGBP: "£", // British Pound@@ -42,6 +66,27 @@ export const CURRENCY_SYMBOLS = {TWD: "NT$", // Taiwan DollarCNY: "¥", // Chinese Yuan (RMB)SGD: "S$", // Singapore Dollar+ JPY: "¥", // Japanese Yen+ SEK: "kr", // Swedish Krona+ NOK: "kr", // Norwegian Krone+ DKK: "kr", // Danish Krone+ CZK: "Kč", // Czech Koruna+ HUF: "Ft", // Hungarian Forint+ ILS: "₪", // Israeli New Shekel+ ZAR: "R", // South African Rand+ TRY: "₺", // Turkish Lira+ KRW: "₩", // South Korean Won+ NZD: "NZ$", // New Zealand Dollar+ PKR: "₨", // Pakistani Rupee+ SAR: "SAR", // Saudi Riyal+ AED: "AED", // UAE Dirham+ QAR: "QR", // Qatari Riyal+ KWD: "KWD", // Kuwaiti Dinar+ BHD: "BHD", // Bahraini Dinar+ OMR: "OMR", // Omani Rial+ JOD: "JOD", // Jordanian Dinar+ EGP: "EGP", // Egyptian Pound+ LBP: "LBP", // Lebanese Pound} as const satisfies Record<SupportedCurrencies, string>;export type CurrencySymbols =@@ -66,11 +111,44 @@ export const CURRENCY_TO_LABEL = {TWD: "New Taiwan Dollar",CNY: "Chinese Yuan Renminbi",SGD: "Singapore Dollar",+ JPY: "Japanese Yen",+ SEK: "Swedish Krona",+ NOK: "Norwegian Krone",+ DKK: "Danish Krone",+ CZK: "Czech Koruna",+ HUF: "Hungarian Forint",+ ILS: "Israeli New Shekel",+ ZAR: "South African Rand",+ TRY: "Turkish Lira",+ KRW: "South Korean Won",+ NZD: "New Zealand Dollar",+ PKR: "Pakistani Rupee",+ SAR: "Saudi Riyal",+ AED: "UAE Dirham",+ QAR: "Qatari Riyal",+ KWD: "Kuwaiti Dinar",+ BHD: "Bahraini Dinar",+ OMR: "Omani Rial",+ JOD: "Jordanian Dinar",+ EGP: "Egyptian Pound",+ LBP: "Lebanese Pound",} as const satisfies Record<SupportedCurrencies, string>;export type CurrencyLabels =(typeof CURRENCY_TO_LABEL)[keyof typeof CURRENCY_TO_LABEL];+export const SUPPORTED_TEMPLATES = ["default", "stripe"] as const;++export type SupportedTemplates = (typeof SUPPORTED_TEMPLATES)[number];++export const TEMPLATE_TO_LABEL = {+ default: "Default Template",+ stripe: "Stripe Template",+} as const satisfies Record<SupportedTemplates, string>;++export type TemplateLabels =+ (typeof TEMPLATE_TO_LABEL)[keyof typeof TEMPLATE_TO_LABEL];+export const SUPPORTED_LANGUAGES = ["en","pl",@@ -109,6 +187,8 @@ export const SUPPORTED_DATE_FORMATS = ["YYYY.MM.DD", // 2024.03.20] as const;+export const STRIPE_DEFAULT_DATE_FORMAT = "MMMM D, YYYY";+/*** Supported date formats*@@ -294,7 +374,42 @@ export const invoiceSchema = z.object({language: z.enum(SUPPORTED_LANGUAGES).default("en"),dateFormat: z.enum(SUPPORTED_DATE_FORMATS).default("YYYY-MM-DD"),currency: z.enum(SUPPORTED_CURRENCIES).default("EUR"),-+ template: z.enum(SUPPORTED_TEMPLATES).default("default"),++ /**+ * Logo field for Stripe template+ *+ * Stores base64 image data+ *+ * Max 3MB limit enforced on the client side during upload+ */+ logo: z+ .string()+ .trim()+ .default("")+ .refine((val) => {+ if (!val) return true; // Allow empty string+ // Check if it's a valid base64 data URL+ const base64Pattern = /^data:image\/(jpeg|jpg|png|webp);base64,/;+ return base64Pattern.test(val);+ }, "Logo must be a valid image (JPEG, PNG or WebP) in base64 format")+ .optional()+ .describe(+ "Stripe template specific field. Logo must be a valid image (JPEG, PNG or WebP) in base64 format"+ ),++ /**+ * Invoice number object+ *+ * Contains label and value for invoice number+ *+ * {+ * label: "Invoice Number",+ * value: "1234",+ * }+ *+ * Optional field+ */invoiceNumberObject: z.object({label: z@@ -308,8 +423,32 @@ export const invoiceSchema = z.object({}).optional(),- dateOfIssue: z.string().min(1, "Date of issue is required").trim(),- dateOfService: z.string().min(1, "Date of service is required").trim(),+ dateOfIssue: z+ .string()+ .trim()+ .transform((val) => {+ if (!val) {+ // If no value is provided, set the date of issue to today's date+ return dayjs().format("YYYY-MM-DD");+ }++ return val;+ })+ .describe("Invoice date of issue. Default is today's date"),++ dateOfService: z+ .string()+ .trim()+ .transform((val) => {+ if (!val) {+ // If no value is provided, set the date of service to the last day of the current month+ return dayjs().endOf("month").format("YYYY-MM-DD");+ }+ return val;+ })+ .describe(+ "Invoice date of service. Default is the last day of the current month"+ ),invoiceType: z.string()@@ -334,7 +473,45 @@ export const invoiceSchema = z.object({.optional(),paymentMethodFieldIsVisible: z.boolean().default(true),- paymentDue: z.string().min(1, "Payment due is required").trim(),+ paymentDue: z+ .string()+ .trim()+ .transform((val) => {+ if (!val) {+ // If no value is provided, set the payment due date to 14 days from the date of issue+ return dayjs().add(14, "days").format("YYYY-MM-DD");+ }+ return val;+ })+ .describe("Payment due date. Default is 14 days from the date of issue"),++ /**+ * Pay Online URL field for Stripe template only+ *+ * URL field for Stripe payment link that:+ * - Accepts empty string or valid URL+ * - Trims whitespace+ * - Optional field+ * - Validates URL format if non-empty value provided+ */+ stripePayOnlineUrl: z+ .string()+ .trim() // Remove whitespace+ .transform((val) => val) // Pass through value+ .pipe(+ z.union([+ z.literal(""), // Allow empty string+ z+ .string()+ .url("Please enter a valid URL or leave empty")+ .refine(+ (url) => url.startsWith("https://"),+ "URL must start with https://"+ ), // Validate HTTPS URL format+ ])+ )+ .optional()+ .describe("Stripe template specific field. URL field for payment link"),notes: z.string()@@ -372,3 +549,26 @@ export const accordionSchema = zexport type AccordionState = z.infer<typeof accordionSchema>;export const ACCORDION_STATE_LOCAL_STORAGE_KEY = "EASY_INVOICE_ACCORDION_STATE";++// __________________________________________________________+// Validate that currencies are unique+// __________________________________________________________+const uniqueCurrencies = new Set(SUPPORTED_CURRENCIES);++if (uniqueCurrencies.size !== SUPPORTED_CURRENCIES.length) {+ const duplicates = SUPPORTED_CURRENCIES.filter(+ (currency, index) => SUPPORTED_CURRENCIES.indexOf(currency) !== index+ );++ const currencyFullNames = duplicates.map((currency) => {+ const currencyFullName = CURRENCY_TO_LABEL[currency];++ return `${currency} - ${currencyFullName}`;+ });++ throw new Error(+ `SUPPORTED_CURRENCIES contains duplicate entries: ${currencyFullNames.join(+ ", "+ )}`+ );+}diff --git a/src/app/schema/translations.ts b/src/app/schema/translations.tsindex d15c0f8..c32efdf 100644--- a/src/app/schema/translations.ts+++ b/src/app/schema/translations.ts@@ -67,6 +67,29 @@ const paymentTotalsTranslationSchema = z}).strict();+// Schema for Stripe-specific translations+const stripeTranslationSchema = z+ .object({+ invoice: z.string(),+ invoiceNumber: z.string(),+ dateOfIssue: z.string(),+ dateDue: z.string(),+ servicePeriod: z.string(),+ billTo: z.string(),+ due: z.string(),+ payOnline: z.string(),+ description: z.string(),+ qty: z.string(),+ unitPrice: z.string(),+ amount: z.string(),+ subtotal: z.string(),+ total: z.string(),+ amountDue: z.string(),+ page: z.string(),+ of: z.string(),+ })+ .strict();+// Main translation schemaexport const translationSchema = z.object({@@ -83,6 +106,7 @@ export const translationSchema = zpersonAuthorizedToReceive: z.string(),personAuthorizedToIssue: z.string(),createdWith: z.string(),+ stripe: stripeTranslationSchema,}).strict();@@ -156,6 +180,25 @@ export const TRANSLATIONS = {personAuthorizedToReceive: "Person authorized to receive",personAuthorizedToIssue: "Person authorized to issue",createdWith: "Created with",+ stripe: {+ invoice: "Invoice",+ invoiceNumber: "Invoice number",+ dateOfIssue: "Date of issue",+ dateDue: "Date due",+ servicePeriod: "Service period",+ billTo: "Bill to",+ due: "due",+ payOnline: "Pay Online",+ description: "Description",+ qty: "Qty",+ unitPrice: "Unit Price",+ amount: "Amount",+ subtotal: "Subtotal",+ total: "Total",+ amountDue: "Amount Due",+ page: "Page",+ of: "of",+ },},pl: {invoiceNumber: "Faktura nr",@@ -184,7 +227,7 @@ export const TRANSLATIONS = {vat: "VAT",netAmount: "Kwota\n netto",vatAmount: "Kwota VAT",- preTaxAmount: "Kwota brutto",+ preTaxAmount: "Kwota\n brutto",sum: "SUMA",},paymentInfo: {@@ -207,6 +250,25 @@ export const TRANSLATIONS = {personAuthorizedToReceive: "Osoba upoważniona do odbioru",personAuthorizedToIssue: "Osoba upoważniona do wystawienia",createdWith: "Utworzono za pomocą",+ stripe: {+ invoice: "Faktura",+ invoiceNumber: "Numer faktury",+ dateOfIssue: "Data wystawienia",+ dateDue: "Termin płatności",+ servicePeriod: "Okres realizacji",+ billTo: "Nabywca",+ due: "termin",+ payOnline: "Płatność online",+ description: "Opis",+ qty: "Ilość",+ unitPrice: "Cena jednostkowa",+ amount: "Kwota",+ subtotal: "Podsumowanie",+ total: "Razem",+ amountDue: "Kwota do zapłaty",+ page: "Strona",+ of: "z",+ },},de: {invoiceNumber: "Rechnungsnummer",@@ -258,6 +320,25 @@ export const TRANSLATIONS = {personAuthorizedToReceive: "Empfangsberechtigte Person",personAuthorizedToIssue: "Ausstellungsberechtigte Person",createdWith: "Erstellt mit",+ stripe: {+ invoice: "Rechnung",+ invoiceNumber: "Rechnungsnummer",+ dateOfIssue: "Ausstellungsdatum",+ dateDue: "Fälligkeitsdatum",+ servicePeriod: "Leistungszeitraum",+ billTo: "Rechnung an",+ due: "fällig",+ payOnline: "Online-Zahlung",+ description: "Beschreibung",+ qty: "Menge",+ unitPrice: "Einzelpreis",+ amount: "Betrag",+ subtotal: "Zwischensumme",+ total: "Gesamt",+ amountDue: "Fälligkeitsbetrag",+ page: "Seite",+ of: "von",+ },},es: {invoiceNumber: "Factura N°",@@ -309,6 +390,25 @@ export const TRANSLATIONS = {personAuthorizedToReceive: "Persona autorizada para recibir",personAuthorizedToIssue: "Persona autorizada para emitir",createdWith: "Creado con",+ stripe: {+ invoice: "Factura",+ invoiceNumber: "Número de factura",+ dateOfIssue: "Fecha de emisión",+ dateDue: "Fecha de vencimiento",+ servicePeriod: "Periodo de servicio",+ billTo: "Facturar a",+ due: "vencimiento",+ payOnline: "Pago en línea",+ description: "Descripción",+ qty: "Cantidad",+ unitPrice: "Precio unitario",+ amount: "Monto",+ subtotal: "Subtotal",+ total: "Total",+ amountDue: "Monto vencido",+ page: "Página",+ of: "de",+ },},pt: {invoiceNumber: "Fatura N°",@@ -360,6 +460,25 @@ export const TRANSLATIONS = {personAuthorizedToReceive: "Pessoa autorizada a receber",personAuthorizedToIssue: "Pessoa autorizada a emitir",createdWith: "Criado com",+ stripe: {+ invoice: "Fatura",+ invoiceNumber: "Número da fatura",+ dateOfIssue: "Data de emissão",+ dateDue: "Data de vencimento",+ servicePeriod: "Período de serviço",+ billTo: "Cobrar de",+ due: "vencimento",+ payOnline: "Pagamento online",+ description: "Descrição",+ qty: "Quantidade",+ unitPrice: "Preço unitário",+ amount: "Valor",+ subtotal: "Subtotal",+ total: "Total",+ amountDue: "Valor vencido",+ page: "Página",+ of: "de",+ },},ru: {invoiceNumber: "Инвойс №",@@ -411,6 +530,25 @@ export const TRANSLATIONS = {personAuthorizedToReceive: "Уполномоченное лицо на получение",personAuthorizedToIssue: "Уполномоченное лицо на выставление",createdWith: "Создано с помощью",+ stripe: {+ invoice: "Счет",+ invoiceNumber: "Номер счета",+ dateOfIssue: "Дата выставления",+ dateDue: "Дата оплаты",+ servicePeriod: "Период оказания услуг",+ billTo: "Плательщик",+ due: "оплатить до",+ payOnline: "Оплатить онлайн",+ description: "Описание",+ qty: "Количество",+ unitPrice: "Цена за единицу",+ amount: "Сумма",+ subtotal: "Промежуточный итог",+ total: "Итого",+ amountDue: "Сумма к оплате",+ page: "Страница",+ of: "из",+ },},uk: {invoiceNumber: "Рахунок-фактура №",@@ -462,6 +600,25 @@ export const TRANSLATIONS = {personAuthorizedToReceive: "Уповноважена особа на отримання",personAuthorizedToIssue: "Уповноважена особа на виставлення",createdWith: "Створено за допомогою",+ stripe: {+ invoice: "Рахунок",+ invoiceNumber: "Номер рахунку",+ dateOfIssue: "Дата виставлення",+ dateDue: "Дата оплати",+ servicePeriod: "Період надання послуги",+ billTo: "Платник",+ due: "оплатити до",+ payOnline: "Оплатити онлайн",+ description: "Опис",+ qty: "Кількість",+ unitPrice: "Ціна за одиницю",+ amount: "Сума",+ subtotal: "Проміжний ітог",+ total: "Всього",+ amountDue: "Сума до сплати",+ page: "Сторінка",+ of: "з",+ },},fr: {invoiceNumber: "Facture N°",@@ -513,6 +670,25 @@ export const TRANSLATIONS = {personAuthorizedToReceive: "Personne autorisée à recevoir",personAuthorizedToIssue: "Personne autorisée à émettre",createdWith: "Créé avec",+ stripe: {+ invoice: "Facture",+ invoiceNumber: "Numéro de facture",+ dateOfIssue: "Date d'émission",+ dateDue: "Date d'échéance",+ servicePeriod: "Période de service",+ billTo: "Facturé à",+ due: "échéance",+ payOnline: "Payer en ligne",+ description: "Description",+ qty: "Quantité",+ unitPrice: "Prix unitaire",+ amount: "Montant",+ subtotal: "Sous-total",+ total: "Total",+ amountDue: "Montant échéant",+ page: "Page",+ of: "de",+ },},it: {invoiceNumber: "Fattura N°",@@ -564,6 +740,25 @@ export const TRANSLATIONS = {personAuthorizedToReceive: "Persona autorizzata a ricevere",personAuthorizedToIssue: "Persona autorizzata a emettere",createdWith: "Creato con",+ stripe: {+ invoice: "Fattura",+ invoiceNumber: "Numero di fattura",+ dateOfIssue: "Data di emissione",+ dateDue: "Data di scadenza",+ servicePeriod: "Periodo di servizio",+ billTo: "Fatturare a",+ due: "scadenza",+ payOnline: "Pagare online",+ description: "Descrizione",+ qty: "Quantità",+ unitPrice: "Prezzo unitario",+ amount: "Importo",+ subtotal: "Totale parziale",+ total: "Totale",+ amountDue: "Importo scaduto",+ page: "Pagina",+ of: "di",+ },},nl: {invoiceNumber: "Factuurnummer",@@ -615,5 +810,24 @@ export const TRANSLATIONS = {personAuthorizedToReceive: "Persoon gemachtigd voor ontvangst",personAuthorizedToIssue: "Persoon gemachtigd voor uitgifte",createdWith: "Gemaakt met",+ stripe: {+ invoice: "Factuur",+ invoiceNumber: "Factuurnummer",+ dateOfIssue: "Uitgiftedatum",+ dateDue: "Vervaldatum",+ servicePeriod: "Dienstverleningperiode",+ billTo: "Factuur aan",+ due: "verval",+ payOnline: "Online betalen",+ description: "Omschrijving",+ qty: "Aantal",+ unitPrice: "Netto prijs",+ amount: "Bedrag",+ subtotal: "Subtotaal",+ total: "Totaal",+ amountDue: "Bedrag te betalen",+ page: "Pagina",+ of: "van",+ },},} as const satisfies Record<SupportedLanguages, TranslationSchema>;diff --git a/src/components/buyer-management.tsx b/src/components/buyer-management.tsxindex 9074d73..7b139a8 100644--- a/src/components/buyer-management.tsx+++ b/src/components/buyer-management.tsx@@ -1,4 +1,4 @@-import { Plus, Trash2, Pencil } from "lucide-react";+import { Plus, Trash2, Pencil, AlertCircleIcon } from "lucide-react";import { useId, useState, useEffect } from "react";import { CustomTooltip } from "./ui/tooltip";import { SelectNative } from "./ui/select-native";@@ -304,6 +304,7 @@ export function BuyerManagement({) : null}<CustomTooltip+ className={cn(!isLocalStorageAvailable && "bg-red-50")}trigger={<Button_variant="outline"@@ -315,21 +316,52 @@ export function BuyerManagement({// open buyer dialogsetIsBuyerDialogOpen(true);+ } else {+ toast.error("Unable to add buyer", {+ description: (+ <>+ <p className="text-pretty text-xs leading-relaxed text-red-700">+ Local storage is not available in your browser. Please+ enable it or try another browser.+ </p>+ </>+ ),+ });}}}- aria-disabled={!isLocalStorageAvailable}- className={cn(- !isLocalStorageAvailable && "cursor-not-allowed opacity-40"- )}+ aria-disabled={!isLocalStorageAvailable} // better UX than 'disabled'>New Buyer<Plus className="ml-1 h-3 w-3" /></Button>}content={- isLocalStorageAvailable- ? "You can save multiple buyers to use them later"- : "Local storage is not available in your browser. Please enable it or try another browser"+ isLocalStorageAvailable ? (+ <div className="flex items-center gap-3 p-2">+ <div className="space-y-1">+ <p className="text-sm font-semibold text-slate-900">+ Save Buyers for Quick Access+ </p>+ <p className="text-pretty text-xs leading-relaxed text-slate-700">+ Store multiple buyers to easily reuse their information in+ future invoices. All data is saved locally in your browser.+ </p>+ </div>+ </div>+ ) : (+ <div className="flex items-center gap-3 bg-red-50 p-3">+ <AlertCircleIcon className="h-5 w-5 flex-shrink-0 fill-red-600 text-white" />+ <div className="space-y-1">+ <p className="text-sm font-semibold text-red-800">+ Storage Not Available+ </p>+ <p className="text-pretty text-xs leading-relaxed text-red-700">+ Local storage is not available in your browser. Please+ enable it or try another browser to save buyer information.+ </p>+ </div>+ </div>+ )}/></div>diff --git a/src/components/footer.tsx b/src/components/footer.tsxnew file mode 100644index 0000000..4f33ab4--- /dev/null+++ b/src/components/footer.tsx@@ -0,0 +1,145 @@+import { ProjectLogo } from "@/components/etc/project-logo";+import { SubscribeInput } from "@/components/subscribe-input";+import { GITHUB_URL, TWITTER_URL } from "@/config";+import Link from "next/link";++export function Footer({+ links,+ translations,+}: {+ links: React.ReactNode;+ translations: {+ footerDescription: string;+ footerCreatedBy: string;++ product: string;++ newsletterTitle: string;+ newsletterDescription: string;+ newsletterSubscribe: string;+ newsletterPlaceholder: string;+ newsletterSuccessMessage: string;+ newsletterErrorMessage: string;+ newsletterEmailLanguageInfo: string;+ };+}) {+ return (+ <footer className="w-full border-t border-slate-200 bg-white py-12 md:py-16">+ <div className="container mx-auto px-4 md:px-6">+ <div className="flex flex-col gap-10 md:flex-row">+ <div className="space-y-4 md:w-1/3">+ <div className="flex items-center">+ <ProjectLogo className="h-8 w-8" />+ <p className="text-balance text-center text-xl font-bold text-slate-800 sm:mt-0 sm:text-2xl lg:mr-5 lg:text-left">+ <a+ href="https://easyinvoicepdf.com"+ target="_blank"+ rel="noopener noreferrer"+ >+ EasyInvoicePDF+ </a>+ </p>+ </div>+ <p className="text-sm text-slate-700">+ {translations.footerDescription}+ </p>+ <div className="flex gap-4" data-testid="footer-logos-social-links">+ <Link+ href={GITHUB_URL}+ target="_blank"+ rel="noopener noreferrer"+ className="text-slate-400 hover:text-slate-800"+ >+ <span className="sr-only">GitHub</span>+ <svg+ className="h-5 w-5"+ fill="currentColor"+ viewBox="0 0 24 24"+ aria-hidden="true"+ >+ <path+ fillRule="evenodd"+ d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"+ clipRule="evenodd"+ />+ </svg>+ </Link>+ <Link+ href={TWITTER_URL}+ target="_blank"+ rel="noopener noreferrer"+ className="text-slate-400 hover:text-slate-800"+ >+ <span className="sr-only">Twitter</span>+ <svg+ className="h-5 w-5"+ fill="currentColor"+ viewBox="0 0 24 24"+ aria-hidden="true"+ >+ <path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" />+ </svg>+ </Link>+ </div>+ </div>+ <div className="grid grid-cols-1 sm:gap-10 md:flex-1 md:grid-cols-2">+ <div className="space-y-3"></div>+ <div className="space-y-3" data-testid="footer-social-links">+ <h3 className="text-sm font-medium text-slate-900">+ {translations.product}+ </h3>+ {links}+ </div>+ </div>+ </div>+ {/* Badge for featured on Startup Fame */}+ <div className="my-5">+ <a+ href="https://startupfa.me/s/easyinvoicepdf?utm_source=easyinvoicepdf.com"+ target="_blank"+ >+ {/* eslint-disable-next-line @next/next/no-img-element */}+ <img+ src="https://startupfa.me/badges/featured-badge-small.webp"+ alt="Featured on Startup Fame"+ width="224"+ height="36"+ />+ </a>+ </div>+ <div className="my-5 max-w-lg space-y-2">+ <p className="text-sm font-medium text-slate-900">+ {translations.newsletterTitle}+ </p>+ <SubscribeInput+ translations={{+ title: translations.newsletterTitle,+ description: translations.newsletterDescription,+ subscribe: translations.newsletterSubscribe,+ placeholder: translations.newsletterPlaceholder,+ success: translations.newsletterSuccessMessage,+ error: translations.newsletterErrorMessage,+ emailLanguageInfo: translations.newsletterEmailLanguageInfo,+ }}+ />+ </div>+ <div className="mt-10 flex flex-col items-center justify-between gap-4 border-t border-slate-200 pt-8 md:flex-row">+ <p className="text-xs text-slate-500">+ © {new Date().getFullYear()} EasyInvoicePDF.com+ </p>+ <p className="text-xs text-slate-500">+ {translations.footerCreatedBy}{" "}+ <Link+ href="https://github.com/VladSez"+ target="_blank"+ rel="noopener noreferrer"+ className="underline hover:text-slate-900"+ >+ Vlad Sazonau+ </Link>+ </p>+ </div>+ </div>+ </footer>+ );+}diff --git a/src/components/go-to-app-button-cta.tsx b/src/components/go-to-app-button-cta.tsxnew file mode 100644index 0000000..d722181--- /dev/null+++ b/src/components/go-to-app-button-cta.tsx@@ -0,0 +1,48 @@+import { Button } from "@/components/ui/button";+import { cn } from "@/lib/utils";+import { ArrowRight } from "lucide-react";+import Link from "next/link";++export function GoToAppButton({+ className,+ children,+}: {+ className?: string;+ children?: React.ReactNode;+}) {+ return (+ <Button+ _size="lg"+ _variant="outline"+ className={cn(+ "group relative overflow-hidden border-slate-200 px-8 shadow-sm transition-all duration-300 hover:border-slate-200/80 hover:shadow-lg",+ className+ )}+ asChild+ >+ <Link href="/" scroll={false}>+ <ArrowRight className="mr-2 h-5 w-5 transition-transform group-hover:scale-110" />+ {children}+ </Link>+ </Button>+ );+}++export function BlackGoToAppButton({+ className,+ children,+}: {+ className?: string;+ children?: React.ReactNode;+}) {+ return (+ <GoToAppButton+ className={cn(+ "relative overflow-hidden bg-zinc-900 text-white transition-all duration-300 hover:scale-[1.02] hover:bg-zinc-800 hover:text-white active:scale-[0.98]",+ className+ )}+ >+ {children}+ </GoToAppButton>+ );+}diff --git a/src/components/project-logo-description.tsx b/src/components/project-logo-description.tsxnew file mode 100644index 0000000..22000a4--- /dev/null+++ b/src/components/project-logo-description.tsx@@ -0,0 +1,22 @@+export function ProjectLogoDescription({+ children,+}: {+ children: React.ReactNode;+}) {+ return (+ <div className="flex flex-col -space-y-0.5">+ <span className="text-balance text-xl font-bold text-slate-800 lg:text-2xl">+ <a+ href="https://easyinvoicepdf.com"+ target="_blank"+ rel="noopener noreferrer"+ >+ EasyInvoicePDF+ </a>+ </span>+ <span className="text-balance text-[12px] text-slate-700 sm:text-[13px]">+ {children || "Free Invoice Generator with Live PDF Preview"}+ </span>+ </div>+ );+}diff --git a/src/components/seller-management.tsx b/src/components/seller-management.tsxindex 82c167f..5e7c9d5 100644--- a/src/components/seller-management.tsx+++ b/src/components/seller-management.tsx@@ -1,4 +1,4 @@-import { Plus, Trash2, Pencil } from "lucide-react";+import { Plus, Trash2, Pencil, AlertCircleIcon } from "lucide-react";import {useId,@@ -320,6 +320,7 @@ export function SellerManagement({) : null}<CustomTooltip+ className={cn(!isLocalStorageAvailable && "bg-red-50")}trigger={<Button_variant="outline"@@ -331,21 +332,52 @@ export function SellerManagement({// open seller dialogsetIsSellerDialogOpen(true);+ } else {+ toast.error("Unable to add seller", {+ description: (+ <>+ <p className="text-pretty text-xs leading-relaxed text-red-700">+ Local storage is not available in your browser. Please+ enable it or try another browser.+ </p>+ </>+ ),+ });}}}- aria-disabled={!isLocalStorageAvailable}- className={cn(- !isLocalStorageAvailable && "cursor-not-allowed opacity-40"- )}+ aria-disabled={!isLocalStorageAvailable} // better UX than 'disabled'>New Seller<Plus className="ml-1 h-3 w-3" /></Button>}content={- isLocalStorageAvailable- ? "You can save multiple sellers to use them later"- : "Local storage is not available in your browser. Please enable it or try another browser"+ isLocalStorageAvailable ? (+ <div className="flex items-center gap-3 p-2">+ <div className="space-y-1">+ <p className="text-sm font-semibold text-slate-900">+ Save Sellers for Quick Access+ </p>+ <p className="text-pretty text-xs leading-relaxed text-slate-700">+ Store multiple sellers to easily reuse their information in+ future invoices. All data is saved locally in your browser.+ </p>+ </div>+ </div>+ ) : (+ <div className="flex items-center gap-3 bg-red-50 p-3">+ <AlertCircleIcon className="h-5 w-5 flex-shrink-0 fill-red-600 text-white" />+ <div className="space-y-1">+ <p className="text-sm font-semibold text-red-800">+ Storage Not Available+ </p>+ <p className="text-pretty text-xs leading-relaxed text-red-700">+ Local storage is not available in your browser. Please+ enable it or try another browser to save seller information.+ </p>+ </div>+ </div>+ )}/></div>diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsxindex ce07abf..16ce807 100644--- a/src/components/ui/button.tsx+++ b/src/components/ui/button.tsx@@ -5,7 +5,7 @@ import * as React from "react";import { cn } from "@/lib/utils";const buttonVariants = cva(- "inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium transition-colors outline-offset-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring/70 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",+ "inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium transition-colors outline-offset-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring/70 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:shrink-0 [&[aria-disabled=true]]:opacity-50",{variants: {_variant: {diff --git a/src/components/ui/input.tsx b/src/components/ui/input.tsxindex 785cc37..cce4637 100644--- a/src/components/ui/input.tsx+++ b/src/components/ui/input.tsx@@ -10,6 +10,7 @@ const Input = React.memo(autoComplete="off"className={cn("h-8 w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-sm text-slate-950 shadow-sm shadow-black/5 transition-shadow placeholder:text-slate-500/70 focus-visible:border-indigo-500 focus-visible:ring focus-visible:ring-indigo-200 focus-visible:ring-opacity-50 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50 dark:placeholder:text-slate-400/70 dark:focus-visible:border-slate-300 dark:focus-visible:ring-slate-300/20 [&[aria-readonly=true]]:cursor-not-allowed [&[aria-readonly=true]]:bg-slate-50 [&[aria-readonly=true]]:opacity-50 [&[aria-readonly=true]]:dark:bg-slate-900",+ type === "date" && "w-auto",type === "search" &&"[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none",type === "file" &&diff --git a/src/components/ui/toasts/error-generating-pdf-toast.tsx b/src/components/ui/toasts/error-generating-pdf-toast.tsxindex ec52d7a..4b26204 100644--- a/src/components/ui/toasts/error-generating-pdf-toast.tsx+++ b/src/components/ui/toasts/error-generating-pdf-toast.tsx@@ -31,7 +31,7 @@ export function ErrorGeneratingPdfToast() {</a></span>,{- duration: 10000,+ duration: Infinity,});}diff --git a/src/config.ts b/src/config.tsindex 7af3c51..aebcc2d 100644--- a/src/config.ts+++ b/src/config.ts@@ -7,3 +7,11 @@ export const APP_URL = process.env.VERCEL_PROJECT_PRODUCTION_URLexport const STATIC_ASSETS_URL = "https://static.easyinvoicepdf.com";export const VIDEO_DEMO_URL = `${STATIC_ASSETS_URL}/easy-invoice-demo.mp4`;++export const DONATION_URL = "https://dub.sh/easyinvoice-donate";++export const PROD_WEBSITE_URL = "https://dub.sh/easy-invoice";++export const GITHUB_URL = "https://github.com/VladSez/easy-invoice-pdf";++export const TWITTER_URL = "https://x.com/vlad_sazon";diff --git a/src/env.ts b/src/env.tsindex 32831d0..db22031 100644--- a/src/env.ts+++ b/src/env.ts@@ -3,39 +3,39 @@ import { z } from "zod";export const env = createEnv({server: {- AUTH_TOKEN: z.string().min(1),+ AUTH_TOKEN: z.string(),- RESEND_API_KEY: z.string().min(1),- RESEND_AUDIENCE_ID: z.string().min(1),+ RESEND_API_KEY: z.string(),+ RESEND_AUDIENCE_ID: z.string(),- UPSTASH_REDIS_REST_URL: z.string().min(1),- UPSTASH_REDIS_REST_TOKEN: z.string().min(1),+ UPSTASH_REDIS_REST_URL: z.string(),+ UPSTASH_REDIS_REST_TOKEN: z.string(),- TELEGRAM_BOT_TOKEN: z.string().min(1),- TELEGRAM_CHAT_ID: z.string().min(1),+ TELEGRAM_BOT_TOKEN: z.string(),+ TELEGRAM_CHAT_ID: z.string(),- SELLER_NAME: z.string().min(1),- SELLER_ADDRESS: z.string().min(1),- SELLER_VAT_NO: z.string().min(1),+ SELLER_NAME: z.string(),+ SELLER_ADDRESS: z.string(),+ SELLER_VAT_NO: z.string(),SELLER_EMAIL: z.string().email(),- SELLER_ACCOUNT_NUMBER: z.string().min(1),- SELLER_SWIFT_BIC: z.string().min(1),+ SELLER_ACCOUNT_NUMBER: z.string(),+ SELLER_SWIFT_BIC: z.string(),- BUYER_NAME: z.string().min(1),- BUYER_ADDRESS: z.string().min(1),- BUYER_VAT_NO: z.string().min(1),+ BUYER_NAME: z.string(),+ BUYER_ADDRESS: z.string(),+ BUYER_VAT_NO: z.string(),BUYER_EMAIL: z.string().email(),- INVOICE_NET_PRICE: z.string().min(1),+ INVOICE_NET_PRICE: z.string(),INVOICE_EMAIL_RECIPIENT: z.string().email(),INVOICE_EMAIL_COMPANY_TO: z.string().email(),- GOOGLE_DRIVE_PARENT_FOLDER_ID: z.string().min(1),+ GOOGLE_DRIVE_PARENT_FOLDER_ID: z.string(),GOOGLE_DRIVE_CLIENT_EMAIL: z.string().email(),- GOOGLE_DRIVE_PRIVATE_KEY: z.string().min(1),+ GOOGLE_DRIVE_PRIVATE_KEY: z.string(),},client: {- NEXT_PUBLIC_SENTRY_DSN: z.string().min(1),+ NEXT_PUBLIC_SENTRY_DSN: z.string(),},// If you're using Next.js < 13.4.4, you'll need to specify the runtimeEnv manuallyruntimeEnv: {@@ -72,4 +72,5 @@ export const env = createEnv({GOOGLE_DRIVE_CLIENT_EMAIL: process.env.GOOGLE_DRIVE_CLIENT_EMAIL,GOOGLE_DRIVE_PRIVATE_KEY: process.env.GOOGLE_DRIVE_PRIVATE_KEY,},+ // emptyStringAsUndefined: true,});diff --git a/src/lib/google-drive.ts b/src/lib/google-drive.tsindex 785d5dd..25229cc 100644--- a/src/lib/google-drive.ts+++ b/src/lib/google-drive.ts@@ -167,6 +167,7 @@ export async function createOrFindInvoiceFolder({// if the month folder already exists, use itmonthFolder = monthFolderResponse.data.files[0] as GoogleDriveFile;+ // eslint-disable-next-line no-consoleconsole.log("\n\n________month folder already exists, using it: ",monthFolder,@@ -209,6 +210,7 @@ export async function createOrFindInvoiceFolder({const googleDriveFolderPath = `/${yearFolder.name}/${monthFolder.name}/${folderToUploadInvoices.name}`;+ // eslint-disable-next-line no-consoleconsole.log("\n\n________invoice to upload Google Drive folder path: ",googleDriveFolderPath,diff --git a/src/lib/telegram.ts b/src/lib/telegram.tsindex 905b2b7..32a7178 100644--- a/src/lib/telegram.ts+++ b/src/lib/telegram.ts@@ -20,12 +20,16 @@ export async function sendTelegramMessage({method: "POST",headers: {"Content-Type": "application/json",+ "Cache-Control": "no-cache, no-store, must-revalidate",+ Pragma: "no-cache",+ Expires: "0",},body: JSON.stringify({chat_id: env.TELEGRAM_CHAT_ID,text: message,parse_mode: "Markdown",}),+ cache: "no-store",});@@ -46,7 +50,13 @@ export async function sendTelegramMessage({`https://api.telegram.org/bot${env.TELEGRAM_BOT_TOKEN}/sendDocument`,{method: "POST",+ headers: {+ "Cache-Control": "no-cache, no-store, must-revalidate",+ Pragma: "no-cache",+ Expires: "0",+ },body: formData,+ cache: "no-store",});diff --git a/src/lib/umami-analytics-track-event.tsx b/src/lib/umami-analytics-track-event.tsxindex 842d89f..e6cab85 100644--- a/src/lib/umami-analytics-track-event.tsx+++ b/src/lib/umami-analytics-track-event.tsx@@ -1,6 +1,7 @@"use client";import { z } from "zod";+import * as Sentry from "@sentry/nextjs";interface UmamiEventData {[key: string]: string | number | boolean | undefined;@@ -36,6 +37,8 @@ export const umamiTrackEvent = (try {eventNameSchema.parse(eventName);} catch (error) {+ Sentry.captureException(error);+if (error instanceof z.ZodError) {console.error("Invalid event name:", error.errors[0].message);return;@@ -46,6 +49,7 @@ export const umamiTrackEvent = (window.umami?.track(eventName, options);} catch (error) {console.error("Failed to track event:", error);+ Sentry.captureException(error);if (error instanceof Error) {umamiTrackEvent("error_tracking_umami_event", {diff --git a/src/mdx-components.tsx b/src/mdx-components.tsxnew file mode 100644index 0000000..5c801d5--- /dev/null+++ b/src/mdx-components.tsx@@ -0,0 +1,95 @@+import type { MDXComponents } from "mdx/types";++// This file allows you to provide custom React components+// to be used in MDX files. You can import and use any+// React component you want, including components from your UI library.++export function useMDXComponents(components: MDXComponents): MDXComponents {+ return {+ // Tailwind Typography plugin provides excellent defaults+ // We can override specific elements here if needed++ // Custom link styling for external links+ a: ({ children, href, ...props }) => {+ const isExternal = href?.startsWith("http");+ return (+ <a+ href={href}+ {...props}+ {...(isExternal && {+ target: "_blank",+ rel: "noopener noreferrer",+ })}+ className="text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-200"+ >+ {children}+ </a>+ );+ },++ // Enhanced code block styling+ pre: ({ children, ...props }) => (+ <pre+ {...props}+ className="overflow-x-auto rounded-lg border border-gray-200 bg-gray-50 p-4 text-sm dark:border-gray-700 dark:bg-gray-800"+ >+ {children}+ </pre>+ ),++ // Enhanced inline code styling+ code: ({ children, ...props }) => (+ <code+ {...props}+ className="rounded bg-gray-100 px-1.5 py-0.5 font-mono text-sm text-gray-800 dark:bg-gray-800 dark:text-gray-200"+ >+ {children}+ </code>+ ),++ // Custom blockquote with accent color+ blockquote: ({ children, ...props }) => (+ <blockquote+ {...props}+ className="border-l-4 border-blue-500 bg-blue-50 py-2 pl-6 italic dark:bg-blue-950/20"+ >+ {children}+ </blockquote>+ ),++ // Enhanced image styling with responsive design+ img: ({ alt, src, ...props }) => (+ // eslint-disable-next-line @next/next/no-img-element+ <img+ {...props}+ src={src}+ alt={alt}+ height={450}+ width={840}+ className="aspect-auto rounded-lg border border-gray-200 bg-slate-300 shadow-sm dark:border-gray-700"+ style={{ maxWidth: "100%", height: "auto" }}+ />+ ),++ table: ({ children, ...props }) => (+ <table {...props} className="w-full border-collapse border">+ {children}+ </table>+ ),++ th: ({ children, ...props }) => (+ <th {...props} className="border p-2 text-center">+ {children}+ </th>+ ),++ td: ({ children, ...props }) => (+ <td {...props} className="border p-2">+ {children}+ </td>+ ),++ // Override any default components as needed+ ...components,+ };+}diff --git a/tailwind.config.ts b/tailwind.config.tsindex 8b60a76..f7c14d2 100644--- a/tailwind.config.ts+++ b/tailwind.config.ts@@ -6,6 +6,7 @@ const config: Config = {"./src/pages/**/*.{js,ts,jsx,tsx,mdx}","./src/components/**/*.{js,ts,jsx,tsx,mdx}","./src/app/**/*.{js,ts,jsx,tsx,mdx}",+ "./content/**/*.{md,mdx}",],theme: {extend: {@@ -51,6 +52,6 @@ const config: Config = {},},// eslint-disable-next-line @typescript-eslint/no-require-imports- plugins: [require("tailwindcss-animate")],+ plugins: [require("tailwindcss-animate"), require("@tailwindcss/typography")],};export default config;diff --git a/vercel.json b/vercel.jsondeleted file mode 100644index c657450..0000000--- a/vercel.json+++ /dev/null@@ -1,9 +0,0 @@-{- "$schema": "https://openapi.vercel.sh/vercel.json",- "crons": [- {- "path": "/api/generate-invoice",- "schedule": "0 14 10 * *"- }- ]-}