diff --git a/CHANGELOG.md b/CHANGELOG.md index 28f4232..a7c6aeb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). -## [Unreleased] +## [0.11.2] - 2026-12-01 + +### Changed + +- Bridge mode persistence now uses the shared `readStored` / `writeStored` helpers from `@merqo/ui`; stored values are unchanged. ### Fixed @@ -23,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Added +- Label designer: a "Match printer size" button on the printer size note rescales the whole design to the paired printer's label (positions, boxes and text size), and a rejected Width or Length change now says fields extend past the new size and what to do. - Test labels: the cooldown is now 15 seconds and a refused re-print in the designer reads "Printer is busy, try again in Ns" instead of an error; the designer rechecks an offline printer every 15 seconds (plus a "Check again" button), re-saves once if the design changed mid-save, says when the saved design could not be used, and notes that Feie printers print the standard label. The test-print online check honours the virtual printer's longer window. - Label design: a "Print test label" button in the designer that saves a changed design, then sends a sample order to the booth's printer (off with a reason when the booth has no printer or it is offline). A booth picker replaces the 404 for vendors with several booths. New fields and logos land in a free spot instead of on top of existing ones. The rendered preview stays visible until the design changes and no longer waits forever on a stalled request. diff --git a/README.md b/README.md index e122e13..12c80bb 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ payloads 90 days after printing and deletes expired bridge pairing codes. for the security context). The Vercel build does not use `output: "standalone"`; that config was dropped. -Dashboard form errors use the shared `FormError` from `@merqo/ui`. Shared shadcn primitives (`Badge`, `Button`, `Input`, `Label`, `Select`, `Switch`, `Tooltip`, `Alert`, `cn`) come from `@merqo/ui/primitives`. +Dashboard form errors use the shared `FormError` from `@merqo/ui`. The Bridge mode flag in `src/lib/bridge-mode.ts` persists through the shared `readStored` / `writeStored`. Shared shadcn primitives (`Badge`, `Button`, `Input`, `Label`, `Select`, `Switch`, `Tooltip`, `Alert`, `cn`) come from `@merqo/ui/primitives`. The Overview fills the dashboard layout's full `max-w-7xl` width, shows three first-run steps (booth, printer, first label) until a label has printed (a step shows done only when every earlier step is done), refreshes itself on tab focus and every 30 seconds while visible, and every dashboard page header carries a short eyebrow (Overview: "Your booths"); the designer is reached from Printers, and a "Design your label" card appears once a booth has a printer but no label design. The first step always links to qkit: set the optional `NEXT_PUBLIC_QKIT_URL` (see `.env.example`) before building to point it elsewhere than `https://qkit.merqo.io`. The "Your booths" eyebrow appears only once a booth exists, and the label designer shows an empty state (not a 404) for a vendor with no booth printing. @@ -127,6 +127,12 @@ and as a table from the `md` (768px) breakpoint up. An "All labels / Needs a boo control (a client component, `src/app/dashboard/history/history-filter.tsx`) filters the list (`?unrouted=1` still deep-links to it), test prints have no Reprint, and the copy says "labels" rather than "jobs". +In the sticker designer (`src/app/dashboard/printers/designer/`), when the +label size does not match the selected printer's media, the printer-fit notice +offers a "Match printer size" button that resizes the template to the printer +(`fitTemplateToSize` in `src/lib/sticker-fit.ts`). If fields extend past the new +edge the resize is refused with a specific message instead of a generic error. + `/reset-password` shows its form only to the session a fresh reset link created, within 15 minutes, through a signed recovery-window cookie set by `/auth/callback`. Any other signed-in session gets the expired card. See diff --git a/package.json b/package.json index 92dd09e..5f9bb55 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "printkit", - "version": "0.11.1", + "version": "0.11.2", "private": true, "packageManager": "pnpm@11.10.0", "engines": { diff --git a/src/app/dashboard/printers/designer/README.md b/src/app/dashboard/printers/designer/README.md index 09f686b..3c7c1b6 100644 --- a/src/app/dashboard/printers/designer/README.md +++ b/src/app/dashboard/printers/designer/README.md @@ -22,3 +22,5 @@ The designer page carries the tab title "Label design", matching its heading. A failed save shows its message through the shared `@merqo/ui` `FormError`. `loading.tsx` is the route's skeleton, built from the shared `Skeleton`, using the page's `max-w-6xl` cap so the layout does not jump when data arrives; the shared skeleton pulses only when motion is allowed. + +The printer size note offers "Match printer size" (not for Feie), which calls `fitTemplateToSize` from `src/lib/sticker-fit.ts` through the designer's `update()` so undo and saved status keep working. A Width or Length change that would push fields past the margins is refused with a message that names the cause and suggests Match printer size when a printer is paired. diff --git a/src/app/dashboard/printers/designer/printer-fit-notice.tsx b/src/app/dashboard/printers/designer/printer-fit-notice.tsx index 0ac7f97..27bcf77 100644 --- a/src/app/dashboard/printers/designer/printer-fit-notice.tsx +++ b/src/app/dashboard/printers/designer/printer-fit-notice.tsx @@ -1,4 +1,5 @@ import type { StickerTemplate } from "@/lib/sticker-template"; +import { Button } from "@merqo/ui/primitives"; export type DesignerPrinter = { model: string; @@ -18,9 +19,11 @@ const close = (a: number, b: number) => Math.abs(a - b) < 0.05; export function PrinterFitNotice({ printer, template, + onMatch, }: { printer?: DesignerPrinter; template: StickerTemplate; + onMatch?: () => void; }) { if (!printer) return null; if (printer.connector === "vendor_cloud") @@ -36,11 +39,18 @@ export function PrinterFitNotice({ ) return null; return ( -
+