@neowhale/storefront 0.2.12 → 0.2.13

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.
@@ -1,11 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import { ReactNode } from 'react';
4
- import { D as WhaleStorefrontConfig, r as Product, P as PaymentData, O as Order, a as CartItem, T as TaxBreakdown, W as WhaleClient, f as Customer, E as EventType, g as CustomerAnalytics, d as CheckoutSession, A as Address, b as Category, c as CategoryTreeNode, l as LoyaltyAccount, m as LoyaltyReward, n as LoyaltyTransaction, v as Review, w as ReviewSummary, F as WishlistItem, R as Recommendation, k as Location, x as ShippingMethod, y as ShippingRate, e as CouponValidation, C as Cart, i as LandingSection, Q as QRLandingData, h as LandingPageRenderData } from '../client-T1eA5Xs-.cjs';
4
+ import { D as WhaleStorefrontConfig, r as Product, P as PaymentData, O as Order, a as CartItem, T as TaxBreakdown, W as WhaleClient, f as Customer, E as EventType, g as CustomerAnalytics, d as CheckoutSession, A as Address, b as Category, c as CategoryTreeNode, l as LoyaltyAccount, m as LoyaltyReward, n as LoyaltyTransaction, v as Review, w as ReviewSummary, F as WishlistItem, R as Recommendation, k as Location, x as ShippingMethod, y as ShippingRate, e as CouponValidation, C as Cart, i as LandingSection, Q as QRLandingData, h as LandingPageRenderData } from '../client-Ca8Otk-R.cjs';
5
5
  import { ThemeTokens } from '@neowhale/ui';
6
6
  import * as zustand_middleware from 'zustand/middleware';
7
7
  import * as zustand from 'zustand';
8
- import { P as PixelManager } from '../pixel-manager-BHE1nZ90.cjs';
8
+ import { P as PixelManager } from '../pixel-manager-CIR16DXY.cjs';
9
9
 
10
10
  interface WhaleProviderProps extends WhaleStorefrontConfig {
11
11
  children: ReactNode;
@@ -403,6 +403,7 @@ interface SectionData {
403
403
  product?: Record<string, unknown> | null;
404
404
  coa?: {
405
405
  url: string;
406
+ viewer_url?: string | null;
406
407
  document_name: string;
407
408
  } | null;
408
409
  }
@@ -1,11 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import { ReactNode } from 'react';
4
- import { D as WhaleStorefrontConfig, r as Product, P as PaymentData, O as Order, a as CartItem, T as TaxBreakdown, W as WhaleClient, f as Customer, E as EventType, g as CustomerAnalytics, d as CheckoutSession, A as Address, b as Category, c as CategoryTreeNode, l as LoyaltyAccount, m as LoyaltyReward, n as LoyaltyTransaction, v as Review, w as ReviewSummary, F as WishlistItem, R as Recommendation, k as Location, x as ShippingMethod, y as ShippingRate, e as CouponValidation, C as Cart, i as LandingSection, Q as QRLandingData, h as LandingPageRenderData } from '../client-T1eA5Xs-.js';
4
+ import { D as WhaleStorefrontConfig, r as Product, P as PaymentData, O as Order, a as CartItem, T as TaxBreakdown, W as WhaleClient, f as Customer, E as EventType, g as CustomerAnalytics, d as CheckoutSession, A as Address, b as Category, c as CategoryTreeNode, l as LoyaltyAccount, m as LoyaltyReward, n as LoyaltyTransaction, v as Review, w as ReviewSummary, F as WishlistItem, R as Recommendation, k as Location, x as ShippingMethod, y as ShippingRate, e as CouponValidation, C as Cart, i as LandingSection, Q as QRLandingData, h as LandingPageRenderData } from '../client-Ca8Otk-R.js';
5
5
  import { ThemeTokens } from '@neowhale/ui';
6
6
  import * as zustand_middleware from 'zustand/middleware';
7
7
  import * as zustand from 'zustand';
8
- import { P as PixelManager } from '../pixel-manager-1C6-h9Rp.js';
8
+ import { P as PixelManager } from '../pixel-manager-CIZKghfx.js';
9
9
 
10
10
  interface WhaleProviderProps extends WhaleStorefrontConfig {
11
11
  children: ReactNode;
@@ -403,6 +403,7 @@ interface SectionData {
403
403
  product?: Record<string, unknown> | null;
404
404
  coa?: {
405
405
  url: string;
406
+ viewer_url?: string | null;
406
407
  document_name: string;
407
408
  } | null;
408
409
  }
@@ -1497,25 +1497,26 @@ function COAViewerSection({
1497
1497
  const coa = data?.coa;
1498
1498
  const c = section.content;
1499
1499
  if (!coa) return null;
1500
- return /* @__PURE__ */ jsx("div", { style: { padding: "1.5rem", maxWidth: 480, margin: "0 auto" }, children: /* @__PURE__ */ jsx(
1501
- "button",
1502
- {
1503
- onClick: onShowCOA,
1504
- style: {
1505
- width: "100%",
1506
- padding: "0.875rem",
1507
- background: theme.accent,
1508
- color: theme.bg,
1509
- border: "none",
1510
- fontSize: "0.85rem",
1511
- fontWeight: 500,
1512
- cursor: "pointer",
1513
- letterSpacing: "0.08em",
1514
- textTransform: "uppercase"
1515
- },
1516
- children: c.button_text || "View Lab Results"
1517
- }
1518
- ) });
1500
+ const buttonStyle = {
1501
+ width: "100%",
1502
+ padding: "0.875rem",
1503
+ background: theme.accent,
1504
+ color: theme.bg,
1505
+ border: "none",
1506
+ fontSize: "0.85rem",
1507
+ fontWeight: 500,
1508
+ cursor: "pointer",
1509
+ letterSpacing: "0.08em",
1510
+ textTransform: "uppercase",
1511
+ textAlign: "center",
1512
+ textDecoration: "none",
1513
+ display: "block",
1514
+ boxSizing: "border-box"
1515
+ };
1516
+ if (coa.viewer_url) {
1517
+ return /* @__PURE__ */ jsx("div", { style: { padding: "1.5rem", maxWidth: 480, margin: "0 auto" }, children: /* @__PURE__ */ jsx("a", { href: coa.viewer_url, target: "_blank", rel: "noopener noreferrer", style: buttonStyle, children: c.button_text || "View Lab Results" }) });
1518
+ }
1519
+ return /* @__PURE__ */ jsx("div", { style: { padding: "1.5rem", maxWidth: 480, margin: "0 auto" }, children: /* @__PURE__ */ jsx("button", { onClick: onShowCOA, style: buttonStyle, children: c.button_text || "View Lab Results" }) });
1519
1520
  }
1520
1521
  function SocialLinksSection({ section, theme }) {
1521
1522
  const { links } = section.content;