diff --git a/README.md b/README.md index 66e5131..a91f01b 100644 --- a/README.md +++ b/README.md @@ -148,3 +148,49 @@ missing or unauthorized code, tag overflow, or activation-limit failure rolls back the whole batch. Changing filters clears selection. Individual and batch activation writes share an organization lock to protect plan limits under concurrent requests. This release requires no database schema migration. + +## Campaign workspace additions + +Twenty additions extend the toolkit and managed library: + +1. Website QR codes with HTTP/HTTPS validation. +2. Calendar event QR codes with validated UTC start/end times and escaped event text. +3. Place/address QR codes using Google Maps search links. +4. Social profile QR codes for Instagram, TikTok, X, GitHub, and LinkedIn. +5. Campaign source/medium presets for posters, packaging, events, and newsletters. +6. Import UTM parameters from an existing campaign URL. +7. Normalize campaign values to lowercase with hyphenated spaces. +8. Generate up to 100 campaign source variants and export them as CSV. +9. Open the managed QR builder with a completed campaign destination and name. +10. Save, load, and delete up to 30 toolkit drafts in the current browser. +11. Export/import validated, versioned JSON draft files. +12. Classic, Teal, and Ink QR design presets. +13. Custom foreground/background colors for toolkit QR codes and print cards. +14. Contrast checks that block low-contrast or inverted QR exports. +15. Raster export resolutions of 600, 1200, or 2400 pixels. +16. JPEG and WebP toolkit downloads, alongside existing PNG/SVG exports. +17. Custom, sanitized export filenames. +18. Persistent QR library favorites and a favorites-only filter. +19. Destination domain filtering, including secondary weighted destinations. +20. Save, apply, and delete up to 20 library views with search, filters, and sorting. + +Drafts, favorites, and saved views use versioned browser storage scoped by both +user ID and organization ID. They stay on this browser; portable draft files can +be explicitly moved between browsers. Wi-Fi passwords are omitted from saved, +exported, and imported drafts. A contrast check is a design guard, not a guarantee +of scanner compatibility: test the final code on the intended scanning devices. +Calendar event scanner support varies by device; the payload uses the +[ZXing VEVENT convention](https://github.com/zxing/zxing/wiki/Barcode-Contents#calendar-events). + +This release adds no database migration, changes no API responses, and preserves +existing managed short links. Campaign handoff only prefills the existing create +screen; the code is saved when the user submits that screen. Toolkit image exports +contain the QR, while printing includes the card heading and caption. + +The style review used Mobbin screen references retrieved by the coordinating +session and visually inspected here: +[Braintrust library](https://mobbin.com/screens/b6ba8022-ce35-4276-9539-c4a59bb0507c) +and [Claude utility](https://mobbin.com/screens/31119433-f7f8-48aa-91a6-cee4d0360e83). +The cleanup unifies shared/workspace light and dark color tokens, removes legacy +border/shadow overrides, aligns labeled controls, groups related actions, and +keeps the existing responsive navigation and library layout. diff --git a/src/components/auth/auth-brand.tsx b/src/components/auth/auth-brand.tsx index a4ca28b..0b88414 100644 --- a/src/components/auth/auth-brand.tsx +++ b/src/components/auth/auth-brand.tsx @@ -1,7 +1,7 @@ export function AuthBrand() { return (
- + Easy Access QR
diff --git a/src/components/marketing/marketing-header.tsx b/src/components/marketing/marketing-header.tsx index c791cfc..e7d65ac 100644 --- a/src/components/marketing/marketing-header.tsx +++ b/src/components/marketing/marketing-header.tsx @@ -54,7 +54,7 @@ export function MarketingHeader({ Easy Access QR @@ -114,7 +114,7 @@ export function MarketingHeader({ className="w-[88vw] max-w-sm border-r border-ds-border bg-ds-surface p-0 text-ds-fg" > - + Easy Access QR diff --git a/src/components/qr/campaign-tools.tsx b/src/components/qr/campaign-tools.tsx new file mode 100644 index 0000000..72dbb34 --- /dev/null +++ b/src/components/qr/campaign-tools.tsx @@ -0,0 +1,156 @@ +import { Link } from "@tanstack/react-router"; +import { ArrowUpRight, Download, WandSparkles } from "lucide-react"; +import { useState } from "react"; +import { toast } from "sonner"; +import { Button } from "@/components/ui/button"; +import { + Field, + FieldDescription, + FieldGroup, + FieldLabel, +} from "@/components/ui/field"; +import { NativeSelect } from "@/components/ui/native-select"; +import { Textarea } from "@/components/ui/textarea"; +import { downloadCsv } from "@/lib/client-export"; +import { cleanTrackingUrl, type ToolkitFields } from "@/lib/qr-toolkit"; +import { + campaignPresets, + campaignVariants, + importCampaignUrl, + normalizeCampaign, +} from "@/lib/qr-workspace"; + +export function CampaignTools({ + fields, + onChange, + payload, +}: { + fields: ToolkitFields; + onChange: (fields: ToolkitFields) => void; + payload: string; +}) { + const [sources, setSources] = useState(""); + const action = (operation: () => void) => { + try { + operation(); + } catch (cause) { + toast.error((cause as Error).message); + } + }; + return ( +
+ + Campaign preset + { + const preset = campaignPresets.find( + (item) => item.id === event.target.value, + ); + if (preset) + onChange({ + ...fields, + source: preset.source, + medium: preset.medium, + }); + }} + > + + {campaignPresets.map((preset) => ( + + ))} + + +
+ + + +
+
+ + Generate campaign variants + + + + Variant sources +