hey-pharmacist-ecommerce 1.1.8 → 1.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ import globalAxios4 from 'axios';
4
4
  import { Toaster, toast } from 'sonner';
5
5
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
6
6
  import { motion, AnimatePresence } from 'framer-motion';
7
- import { Heart, Sparkles, ShieldCheck, TrendingUp, Search, ArrowUpDown, ChevronDown, LayoutGrid, LayoutList, SlidersHorizontal, X, Clock, Package, ArrowLeft, ChevronRight, Shield, Truck, Award, Star, Check, Minus, Plus, ShoppingCart, Trash2, ShoppingBag, HeartPulse, BadgePercent, ArrowRight, Edit3, MapPin, CreditCard, Lock, PackageCheck, EyeOff, Eye, CheckCircle2, UserPlus, Mail, Phone, LogOut, Calendar, CalendarDays, Filter, ChevronLeft, ArrowUpRight, Warehouse, BellRing, Crown, User, Grid, List, Menu, Facebook, Twitter, Instagram, Globe, Home } from 'lucide-react';
7
+ import { Heart, Sparkles, ShieldCheck, TrendingUp, Search, ArrowUpDown, ChevronDown, LayoutGrid, LayoutList, SlidersHorizontal, X, Clock, Package, ArrowLeft, ChevronRight, Shield, Truck, Award, Star, Check, Minus, Plus, ShoppingCart, Trash2, ShoppingBag, ArrowRight, BadgePercent, HeartPulse, Edit3, MapPin, CreditCard, Lock, PackageCheck, EyeOff, Eye, CheckCircle2, UserPlus, Mail, Phone, LogOut, Calendar, CalendarDays, Filter, ChevronLeft, ArrowUpRight, Warehouse, BellRing, Crown, User, Grid, List, Menu, Facebook, Twitter, Instagram, Globe, Home } from 'lucide-react';
8
8
  import Image3 from 'next/image';
9
9
  import { useRouter, useSearchParams } from 'next/navigation';
10
10
  import dynamic from 'next/dynamic';
@@ -8126,8 +8126,7 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
8126
8126
  {
8127
8127
  product,
8128
8128
  onClickProduct: (item) => {
8129
- const productData = encodeURIComponent(JSON.stringify(item));
8130
- router.push(buildPath(`/products/${item.id}?product=${productData}`));
8129
+ router.push(buildPath(`/products/${item.id}`));
8131
8130
  }
8132
8131
  }
8133
8132
  )))) : /* @__PURE__ */ React21.createElement("div", { className: "space-y-4" }, displayedProducts.map((product) => {
@@ -8644,16 +8643,86 @@ function CartScreen() {
8644
8643
  const { cart, isLoading } = useCart();
8645
8644
  const { buildPath } = useBasePath();
8646
8645
  if (!cart || cart.cartBody.items.length === 0) {
8647
- return /* @__PURE__ */ React21.createElement("div", { className: "min-h-screen bg-gradient-to-br from-primary-700 via-primary-600 to-secondary-600 flex items-center justify-center" }, /* @__PURE__ */ React21.createElement("div", { className: "mx-auto px-20 py-5 bg-white rounded-3xl" }, /* @__PURE__ */ React21.createElement(
8648
- EmptyState,
8646
+ const highlights = [
8649
8647
  {
8650
- icon: ShoppingBag,
8651
- title: "Your bag feels a little empty",
8652
- description: "Add pharmacy favorites to unlock quick shipping, curated bundles, and personalized recommendations.",
8653
- actionLabel: "Discover products",
8654
- onAction: () => router.push(buildPath("/shop"))
8648
+ icon: ShieldCheck,
8649
+ title: "Pharmacist approved",
8650
+ description: "Every product passes pharmacist review and cold-chain handling standards."
8651
+ },
8652
+ {
8653
+ icon: BadgePercent,
8654
+ title: "Bundle savings",
8655
+ description: "Unlock tiered discounts when you combine vitamins, OTC, and wellness kits."
8656
+ },
8657
+ {
8658
+ icon: HeartPulse,
8659
+ title: "Personalized guidance",
8660
+ description: "Follow curated collections tailored to your health goals and routines."
8655
8661
  }
8656
- )));
8662
+ ];
8663
+ return /* @__PURE__ */ React21.createElement("div", { className: "relative min-h-screen overflow-hidden bg-slate-950" }, /* @__PURE__ */ React21.createElement("div", { className: "absolute inset-0 bg-gradient-to-br from-[rgb(var(--header-from))] via-[rgb(var(--header-via))] to-[rgb(var(--header-to))]" }), /* @__PURE__ */ React21.createElement("div", { className: "absolute inset-0" }, /* @__PURE__ */ React21.createElement("div", { className: "pointer-events-none absolute -top-24 -left-20 h-96 w-96 rounded-full bg-white/20 blur-3xl opacity-60" }), /* @__PURE__ */ React21.createElement("div", { className: "pointer-events-none absolute bottom-0 right-0 h-[28rem] w-[28rem] rounded-full bg-secondary-500/40 blur-[220px] opacity-70" })), /* @__PURE__ */ React21.createElement("div", { className: "relative z-10 flex min-h-screen items-center px-6 py-20" }, /* @__PURE__ */ React21.createElement("div", { className: "mx-auto grid w-full max-w-6xl gap-12 lg:grid-cols-[minmax(0,1.25fr)_minmax(0,1fr)] lg:items-center" }, /* @__PURE__ */ React21.createElement(
8664
+ motion.div,
8665
+ {
8666
+ initial: { opacity: 0, y: 24 },
8667
+ animate: { opacity: 1, y: 0 },
8668
+ transition: { duration: 0.4 },
8669
+ className: "space-y-8 text-white"
8670
+ },
8671
+ /* @__PURE__ */ React21.createElement("span", { className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-4 py-1 text-sm font-semibold uppercase tracking-[0.3em] text-white/80 backdrop-blur" }, /* @__PURE__ */ React21.createElement(ShoppingBag, { className: "h-4 w-4" }), "Cart status"),
8672
+ /* @__PURE__ */ React21.createElement("div", { className: "space-y-4" }, /* @__PURE__ */ React21.createElement("h1", { className: "text-4xl font-bold md:text-5xl" }, "Your wellness cart is waiting for a refill"), /* @__PURE__ */ React21.createElement("p", { className: "max-w-xl text-lg text-white/75" }, "Build a pharmacist-curated bundle with fast shipping, personalized recommendations, and exclusive member perks designed to keep you feeling your best.")),
8673
+ /* @__PURE__ */ React21.createElement("div", { className: "flex flex-wrap gap-4" }, /* @__PURE__ */ React21.createElement(
8674
+ Button,
8675
+ {
8676
+ size: "lg",
8677
+ className: "bg-white text-primary-700 shadow-xl shadow-white/30 hover:bg-white/90 hover:text-primary-700",
8678
+ onClick: () => router.push(buildPath("/shop"))
8679
+ },
8680
+ "Discover products",
8681
+ /* @__PURE__ */ React21.createElement(ArrowRight, { className: "h-5 w-5" })
8682
+ ), /* @__PURE__ */ React21.createElement(
8683
+ "button",
8684
+ {
8685
+ type: "button",
8686
+ onClick: () => router.push(buildPath("/categories")),
8687
+ className: "inline-flex items-center gap-2 rounded-full border border-white/40 px-5 py-3 text-sm font-semibold text-white/80 transition hover:border-white hover:bg-white/10"
8688
+ },
8689
+ "Browse categories",
8690
+ /* @__PURE__ */ React21.createElement(ArrowRight, { className: "h-4 w-4" })
8691
+ )),
8692
+ /* @__PURE__ */ React21.createElement("div", { className: "grid gap-4 sm:grid-cols-2" }, highlights.map(({ icon: Icon, title, description }) => /* @__PURE__ */ React21.createElement(
8693
+ "div",
8694
+ {
8695
+ key: title,
8696
+ className: "rounded-2xl border border-white/15 bg-white/10 p-5 backdrop-blur transition hover:border-white/25 hover:bg-white/15"
8697
+ },
8698
+ /* @__PURE__ */ React21.createElement(Icon, { className: "h-6 w-6 text-white/90" }),
8699
+ /* @__PURE__ */ React21.createElement("p", { className: "mt-3 text-sm font-semibold text-white" }, title),
8700
+ /* @__PURE__ */ React21.createElement("p", { className: "mt-1 text-xs text-white/70" }, description)
8701
+ )))
8702
+ ), /* @__PURE__ */ React21.createElement(
8703
+ motion.div,
8704
+ {
8705
+ initial: { opacity: 0, y: 24 },
8706
+ animate: { opacity: 1, y: 0 },
8707
+ transition: { delay: 0.1, duration: 0.4 },
8708
+ className: "rounded-[32px] border border-white/10 bg-white/10 p-10 backdrop-blur-2xl shadow-[0_40px_120px_-45px_rgba(12,5,40,0.6)]"
8709
+ },
8710
+ /* @__PURE__ */ React21.createElement("div", { className: "flex h-16 w-16 items-center justify-center rounded-2xl bg-white/20" }, /* @__PURE__ */ React21.createElement(ShoppingBag, { className: "h-8 w-8 text-white" })),
8711
+ /* @__PURE__ */ React21.createElement("h2", { className: "mt-6 text-3xl font-semibold text-white" }, "Still building your bag?"),
8712
+ /* @__PURE__ */ React21.createElement("p", { className: "mt-3 text-sm text-white/80" }, "Add supplements, wellness tools, and everyday pharmacy favorites to personalize your routine. We'll keep them chilled, curated, and ready for doorstep delivery."),
8713
+ /* @__PURE__ */ React21.createElement("ul", { className: "mt-6 space-y-3 text-sm text-white/80" }, /* @__PURE__ */ React21.createElement("li", { className: "flex items-center gap-2 rounded-xl bg-white/10 px-4 py-3" }, /* @__PURE__ */ React21.createElement(ShieldCheck, { className: "h-5 w-5 text-white" }), "Pharmacist oversight on every order"), /* @__PURE__ */ React21.createElement("li", { className: "flex items-center gap-2 rounded-xl bg-white/10 px-4 py-3" }, /* @__PURE__ */ React21.createElement(BadgePercent, { className: "h-5 w-5 text-white" }), "Member-only savings unlock at checkout"), /* @__PURE__ */ React21.createElement("li", { className: "flex items-center gap-2 rounded-xl bg-white/10 px-4 py-3" }, /* @__PURE__ */ React21.createElement(HeartPulse, { className: "h-5 w-5 text-white" }), "Personalized care plans for each purchase")),
8714
+ /* @__PURE__ */ React21.createElement(
8715
+ Button,
8716
+ {
8717
+ size: "lg",
8718
+ variant: "outline",
8719
+ className: "mt-8 w-full border-white/40 text-white hover:border-white hover:bg-white/10",
8720
+ onClick: () => router.push(buildPath("/shop"))
8721
+ },
8722
+ "Start building my cart",
8723
+ /* @__PURE__ */ React21.createElement(ArrowRight, { className: "h-5 w-5" })
8724
+ )
8725
+ ))));
8657
8726
  }
8658
8727
  const subtotal = cart.total;
8659
8728
  const shipping = 0;
@@ -9589,7 +9658,7 @@ function LoginScreen() {
9589
9658
  /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-6 text-sm text-white/80" }, /* @__PURE__ */ React21.createElement("span", null, "Need an account?"), /* @__PURE__ */ React21.createElement(
9590
9659
  Link8,
9591
9660
  {
9592
- href: "/register",
9661
+ href: buildPath("/register"),
9593
9662
  className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-4 py-2 font-semibold transition hover:bg-white/25"
9594
9663
  },
9595
9664
  "Create one now",
@@ -9638,7 +9707,7 @@ function LoginScreen() {
9638
9707
  ), "Remember me"), /* @__PURE__ */ React21.createElement(
9639
9708
  Link8,
9640
9709
  {
9641
- href: "/forgot-password",
9710
+ href: buildPath("/forgot-password"),
9642
9711
  className: "font-medium text-primary-600 transition hover:text-primary-700"
9643
9712
  },
9644
9713
  "Forgot password?"
@@ -9715,7 +9784,7 @@ function RegisterScreen() {
9715
9784
  /* @__PURE__ */ React21.createElement("div", { className: "flex items-center gap-6 text-sm text-white/80" }, /* @__PURE__ */ React21.createElement("span", null, "Already part of the community?"), /* @__PURE__ */ React21.createElement(
9716
9785
  Link8,
9717
9786
  {
9718
- href: "/login",
9787
+ href: buildPath("/login"),
9719
9788
  className: "inline-flex items-center gap-2 rounded-full bg-white/15 px-4 py-2 font-semibold transition hover:bg-white/25"
9720
9789
  },
9721
9790
  "Sign in"
@@ -9807,10 +9876,10 @@ function RegisterScreen() {
9807
9876
  },
9808
9877
  showConfirmPassword ? /* @__PURE__ */ React21.createElement(EyeOff, { className: "h-5 w-5" }) : /* @__PURE__ */ React21.createElement(Eye, { className: "h-5 w-5" })
9809
9878
  )),
9810
- /* @__PURE__ */ React21.createElement("div", { className: "flex items-start gap-3 rounded-2xl bg-slate-50 p-4 text-sm text-slate-600" }, /* @__PURE__ */ React21.createElement(Shield, { className: "mt-0.5 h-5 w-5 text-primary-500" }), /* @__PURE__ */ React21.createElement("span", null, "By creating an account, you agree to our", " ", /* @__PURE__ */ React21.createElement(Link8, { href: "/terms", className: "font-semibold text-primary-600 hover:text-primary-700" }, "Terms of Service"), " ", "and", " ", /* @__PURE__ */ React21.createElement(
9879
+ /* @__PURE__ */ React21.createElement("div", { className: "flex items-start gap-3 rounded-2xl bg-slate-50 p-4 text-sm text-slate-600" }, /* @__PURE__ */ React21.createElement(Shield, { className: "mt-0.5 h-5 w-5 text-primary-500" }), /* @__PURE__ */ React21.createElement("span", null, "By creating an account, you agree to our", " ", /* @__PURE__ */ React21.createElement(Link8, { href: buildPath("/terms"), className: "font-semibold text-primary-600 hover:text-primary-700" }, "Terms of Service"), " ", "and", " ", /* @__PURE__ */ React21.createElement(
9811
9880
  Link8,
9812
9881
  {
9813
- href: "/privacy",
9882
+ href: buildPath("/privacy"),
9814
9883
  className: "font-semibold text-primary-600 hover:text-primary-700"
9815
9884
  },
9816
9885
  "Privacy Policy"