@burdenoff/website-sdk 2026.518.4 → 2026.520.2

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.js CHANGED
@@ -3011,19 +3011,21 @@ function BlogCard({
3011
3011
  month: "long",
3012
3012
  day: "numeric"
3013
3013
  }) : "";
3014
+ const [imgError, setImgError] = React.useState(false);
3014
3015
  return /* @__PURE__ */ jsxRuntime.jsxs(
3015
3016
  "a",
3016
3017
  {
3017
3018
  href: `${basePath}/${post.slug}`,
3018
3019
  className: "group block bg-card border rounded-xl overflow-hidden hover:shadow-lg hover:border-primary/30 transition-all duration-300",
3019
3020
  children: [
3020
- post.thumbnail ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/9] overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
3021
+ post.thumbnail && !imgError ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/9] overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
3021
3022
  "img",
3022
3023
  {
3023
3024
  src: post.thumbnail,
3024
3025
  alt: post.title,
3025
3026
  className: "w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",
3026
- loading: "lazy"
3027
+ loading: "lazy",
3028
+ onError: () => setImgError(true)
3027
3029
  }
3028
3030
  ) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/9] bg-muted/50 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
3029
3031
  "svg",
@@ -3185,7 +3187,12 @@ function BlogListPage(props) {
3185
3187
  ] });
3186
3188
  }
3187
3189
  function BlogPostPage(props) {
3188
- const { productName, blogListUrl = "/blog", className = "" } = props;
3190
+ const {
3191
+ productName,
3192
+ blogListUrl = "/blog",
3193
+ backLabel = "Back to Blog",
3194
+ className = ""
3195
+ } = props;
3189
3196
  const client = useWebSDK();
3190
3197
  const config = useWebSDKConfig();
3191
3198
  const { product } = useProduct();
@@ -3229,12 +3236,15 @@ function BlogPostPage(props) {
3229
3236
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-full ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-24 text-center", children: [
3230
3237
  /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-bold mb-4", children: "Post not found" }),
3231
3238
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-6", children: error || "This blog post doesn't exist or has been removed." }),
3232
- /* @__PURE__ */ jsxRuntime.jsx(
3239
+ /* @__PURE__ */ jsxRuntime.jsxs(
3233
3240
  "a",
3234
3241
  {
3235
3242
  href: blogListUrl,
3236
3243
  className: "text-primary hover:underline font-medium",
3237
- children: "\u2190 Back to Blog"
3244
+ children: [
3245
+ "\u2190 ",
3246
+ backLabel
3247
+ ]
3238
3248
  }
3239
3249
  )
3240
3250
  ] }) });
@@ -3256,12 +3266,15 @@ function BlogPostPage(props) {
3256
3266
  }
3257
3267
  ),
3258
3268
  /* @__PURE__ */ jsxRuntime.jsxs("article", { className: "max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-16 sm:py-20", children: [
3259
- /* @__PURE__ */ jsxRuntime.jsx(
3269
+ /* @__PURE__ */ jsxRuntime.jsxs(
3260
3270
  "a",
3261
3271
  {
3262
3272
  href: blogListUrl,
3263
3273
  className: "inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground mb-8 transition-colors",
3264
- children: "\u2190 Back to Blog"
3274
+ children: [
3275
+ "\u2190 ",
3276
+ backLabel
3277
+ ]
3265
3278
  }
3266
3279
  ),
3267
3280
  post.category && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block text-xs font-medium text-primary bg-primary/10 px-2.5 py-1 rounded-full mb-4", children: post.category }),
@@ -3314,6 +3327,29 @@ var PRESS_KIT_QUERY = `
3314
3327
  }
3315
3328
  }
3316
3329
  `;
3330
+ var PRESS_RELEASES_QUERY = `
3331
+ query PublicPressReleases($productId: String!, $limit: Int, $offset: Int) {
3332
+ publicContentPages(productId: $productId, limit: $limit, offset: $offset) {
3333
+ items {
3334
+ id
3335
+ title
3336
+ slug
3337
+ lastUpdated
3338
+ tags
3339
+ seoDescription
3340
+ excerpt
3341
+ thumbnail
3342
+ author
3343
+ publishedAt
3344
+ readingTime
3345
+ featured
3346
+ category
3347
+ }
3348
+ total
3349
+ hasMore
3350
+ }
3351
+ }
3352
+ `;
3317
3353
  var CATEGORY_ORDER = [
3318
3354
  "LOGO",
3319
3355
  "BANNER",
@@ -3338,7 +3374,154 @@ function formatBytes(bytes) {
3338
3374
  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(0)} KB`;
3339
3375
  return `${(bytes / 1024 / 1024).toFixed(1)} MB`;
3340
3376
  }
3341
- function AssetCard({ asset }) {
3377
+ function isImageAsset(a) {
3378
+ return (a.mimeType || "").startsWith("image/");
3379
+ }
3380
+ async function downloadAsset(e, asset) {
3381
+ e.preventDefault();
3382
+ const openInTab = () => window.open(asset.fileUrl, "_blank", "noopener,noreferrer");
3383
+ const name = asset.fileName || asset.fileUrl.split("/").pop()?.split("?")[0] || asset.title || "download";
3384
+ try {
3385
+ const res = await fetch(asset.fileUrl, { mode: "cors" });
3386
+ if (!res.ok) {
3387
+ openInTab();
3388
+ return;
3389
+ }
3390
+ const blob = await res.blob();
3391
+ const objUrl = URL.createObjectURL(blob);
3392
+ const a = document.createElement("a");
3393
+ a.href = objUrl;
3394
+ a.download = name;
3395
+ document.body.appendChild(a);
3396
+ a.click();
3397
+ a.remove();
3398
+ URL.revokeObjectURL(objUrl);
3399
+ } catch {
3400
+ openInTab();
3401
+ }
3402
+ }
3403
+ function PressKitLightbox({
3404
+ asset,
3405
+ onClose
3406
+ }) {
3407
+ React.useEffect(() => {
3408
+ if (!asset) return;
3409
+ const onKey = (e) => {
3410
+ if (e.key === "Escape") onClose();
3411
+ };
3412
+ document.addEventListener("keydown", onKey);
3413
+ const prevOverflow = document.body.style.overflow;
3414
+ document.body.style.overflow = "hidden";
3415
+ return () => {
3416
+ document.removeEventListener("keydown", onKey);
3417
+ document.body.style.overflow = prevOverflow;
3418
+ };
3419
+ }, [asset, onClose]);
3420
+ if (!asset) return null;
3421
+ const ext = (asset.mimeType || "file").split("/").pop()?.toUpperCase() || "FILE";
3422
+ const size = formatBytes(asset.fileSize);
3423
+ return /* @__PURE__ */ jsxRuntime.jsx(
3424
+ "div",
3425
+ {
3426
+ role: "dialog",
3427
+ "aria-modal": "true",
3428
+ "aria-label": `${asset.title} preview`,
3429
+ onClick: onClose,
3430
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-4 sm:p-8",
3431
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
3432
+ "div",
3433
+ {
3434
+ onClick: (e) => e.stopPropagation(),
3435
+ className: "relative flex max-h-full w-full max-w-4xl flex-col overflow-hidden rounded-xl border bg-card shadow-2xl",
3436
+ children: [
3437
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4 border-b p-4", children: [
3438
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
3439
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "truncate text-sm font-semibold text-foreground", children: asset.title }),
3440
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground", children: [
3441
+ ext,
3442
+ size ? ` \xB7 ${size}` : ""
3443
+ ] })
3444
+ ] }),
3445
+ /* @__PURE__ */ jsxRuntime.jsx(
3446
+ "button",
3447
+ {
3448
+ type: "button",
3449
+ onClick: onClose,
3450
+ "aria-label": "Close preview",
3451
+ className: "shrink-0 rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
3452
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3453
+ "svg",
3454
+ {
3455
+ className: "h-5 w-5",
3456
+ fill: "none",
3457
+ viewBox: "0 0 24 24",
3458
+ stroke: "currentColor",
3459
+ strokeWidth: 2,
3460
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3461
+ "path",
3462
+ {
3463
+ strokeLinecap: "round",
3464
+ strokeLinejoin: "round",
3465
+ d: "M6 18L18 6M6 6l12 12"
3466
+ }
3467
+ )
3468
+ }
3469
+ )
3470
+ }
3471
+ )
3472
+ ] }),
3473
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 items-center justify-center overflow-auto bg-muted/20 p-4", children: /* @__PURE__ */ jsxRuntime.jsx(
3474
+ "img",
3475
+ {
3476
+ src: asset.fileUrl,
3477
+ alt: asset.title,
3478
+ className: "max-h-[70vh] w-auto max-w-full object-contain"
3479
+ }
3480
+ ) }),
3481
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end border-t p-4", children: /* @__PURE__ */ jsxRuntime.jsxs(
3482
+ "a",
3483
+ {
3484
+ href: asset.fileUrl,
3485
+ target: "_blank",
3486
+ rel: "noopener noreferrer",
3487
+ download: true,
3488
+ onClick: (e) => {
3489
+ void downloadAsset(e, asset);
3490
+ },
3491
+ className: "inline-flex items-center gap-1.5 rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-opacity hover:opacity-90",
3492
+ children: [
3493
+ /* @__PURE__ */ jsxRuntime.jsx(
3494
+ "svg",
3495
+ {
3496
+ className: "h-4 w-4",
3497
+ fill: "none",
3498
+ viewBox: "0 0 24 24",
3499
+ stroke: "currentColor",
3500
+ strokeWidth: 2,
3501
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3502
+ "path",
3503
+ {
3504
+ strokeLinecap: "round",
3505
+ strokeLinejoin: "round",
3506
+ d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
3507
+ }
3508
+ )
3509
+ }
3510
+ ),
3511
+ "Download"
3512
+ ]
3513
+ }
3514
+ ) })
3515
+ ]
3516
+ }
3517
+ )
3518
+ }
3519
+ );
3520
+ }
3521
+ function AssetCard({
3522
+ asset,
3523
+ onPreview
3524
+ }) {
3342
3525
  const date = asset.updatedAt ? new Date(asset.updatedAt).toLocaleDateString("en-US", {
3343
3526
  year: "numeric",
3344
3527
  month: "short",
@@ -3346,33 +3529,55 @@ function AssetCard({ asset }) {
3346
3529
  }) : "";
3347
3530
  const ext = (asset.mimeType || "file").split("/").pop()?.toUpperCase() || "FILE";
3348
3531
  const size = formatBytes(asset.fileSize);
3532
+ const [imgError, setImgError] = React.useState(false);
3533
+ const thumb = asset.thumbnailUrl && !imgError ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/9] overflow-hidden bg-muted/30", children: /* @__PURE__ */ jsxRuntime.jsx(
3534
+ "img",
3535
+ {
3536
+ src: asset.thumbnailUrl,
3537
+ alt: asset.title,
3538
+ className: "w-full h-full object-contain group-hover:scale-105 transition-transform duration-300",
3539
+ loading: "lazy",
3540
+ onError: () => setImgError(true)
3541
+ }
3542
+ ) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/9] bg-muted/50 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
3543
+ "svg",
3544
+ {
3545
+ className: "w-12 h-12 text-muted-foreground/20",
3546
+ fill: "none",
3547
+ viewBox: "0 0 24 24",
3548
+ stroke: "currentColor",
3549
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3550
+ "path",
3551
+ {
3552
+ strokeLinecap: "round",
3553
+ strokeLinejoin: "round",
3554
+ strokeWidth: 1.5,
3555
+ d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
3556
+ }
3557
+ )
3558
+ }
3559
+ ) });
3349
3560
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "group flex flex-col bg-card border rounded-xl overflow-hidden hover:shadow-lg hover:border-primary/30 transition-all duration-300", children: [
3350
- asset.thumbnailUrl ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/9] overflow-hidden bg-muted/30", children: /* @__PURE__ */ jsxRuntime.jsx(
3351
- "img",
3561
+ onPreview && isImageAsset(asset) ? /* @__PURE__ */ jsxRuntime.jsx(
3562
+ "button",
3352
3563
  {
3353
- src: asset.thumbnailUrl,
3354
- alt: asset.title,
3355
- className: "w-full h-full object-contain group-hover:scale-105 transition-transform duration-300",
3356
- loading: "lazy"
3564
+ type: "button",
3565
+ onClick: () => onPreview(asset),
3566
+ "aria-label": `Preview ${asset.title}`,
3567
+ className: "block w-full text-left cursor-zoom-in",
3568
+ children: thumb
3357
3569
  }
3358
- ) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/9] bg-muted/50 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
3359
- "svg",
3570
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
3571
+ "a",
3360
3572
  {
3361
- className: "w-12 h-12 text-muted-foreground/20",
3362
- fill: "none",
3363
- viewBox: "0 0 24 24",
3364
- stroke: "currentColor",
3365
- children: /* @__PURE__ */ jsxRuntime.jsx(
3366
- "path",
3367
- {
3368
- strokeLinecap: "round",
3369
- strokeLinejoin: "round",
3370
- strokeWidth: 1.5,
3371
- d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"
3372
- }
3373
- )
3573
+ href: asset.fileUrl,
3574
+ target: "_blank",
3575
+ rel: "noopener noreferrer",
3576
+ "aria-label": `Open ${asset.title}`,
3577
+ className: "block",
3578
+ children: thumb
3374
3579
  }
3375
- ) }),
3580
+ ),
3376
3581
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col flex-1 p-5", children: [
3377
3582
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block self-start text-xs font-medium text-primary bg-primary/10 px-2.5 py-1 rounded-full mb-3", children: CATEGORY_LABELS[asset.category] ?? asset.category }),
3378
3583
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-semibold text-foreground mb-1 line-clamp-2", children: asset.title }),
@@ -3396,6 +3601,9 @@ function AssetCard({ asset }) {
3396
3601
  target: "_blank",
3397
3602
  rel: "noopener noreferrer",
3398
3603
  download: true,
3604
+ onClick: (e) => {
3605
+ void downloadAsset(e, asset);
3606
+ },
3399
3607
  className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",
3400
3608
  children: [
3401
3609
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3424,6 +3632,71 @@ function AssetCard({ asset }) {
3424
3632
  ] })
3425
3633
  ] });
3426
3634
  }
3635
+ function PressReleaseCard({
3636
+ release,
3637
+ basePath
3638
+ }) {
3639
+ const date = release.publishedAt || release.lastUpdated;
3640
+ const formattedDate = date ? new Date(date).toLocaleDateString("en-US", {
3641
+ year: "numeric",
3642
+ month: "long",
3643
+ day: "numeric"
3644
+ }) : "";
3645
+ const [imgError, setImgError] = React.useState(false);
3646
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3647
+ "a",
3648
+ {
3649
+ href: `${basePath}/${release.slug}`,
3650
+ className: "group flex flex-col bg-card border rounded-xl overflow-hidden hover:shadow-lg hover:border-primary/30 transition-all duration-300",
3651
+ children: [
3652
+ release.thumbnail && !imgError ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/9] overflow-hidden bg-muted/30", children: /* @__PURE__ */ jsxRuntime.jsx(
3653
+ "img",
3654
+ {
3655
+ src: release.thumbnail,
3656
+ alt: release.title,
3657
+ className: "w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",
3658
+ loading: "lazy",
3659
+ onError: () => setImgError(true)
3660
+ }
3661
+ ) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/9] bg-muted/50 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
3662
+ "svg",
3663
+ {
3664
+ className: "w-12 h-12 text-muted-foreground/20",
3665
+ fill: "none",
3666
+ viewBox: "0 0 24 24",
3667
+ stroke: "currentColor",
3668
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3669
+ "path",
3670
+ {
3671
+ strokeLinecap: "round",
3672
+ strokeLinejoin: "round",
3673
+ strokeWidth: 1.5,
3674
+ d: "M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m-1 13a2 2 0 01-2-2V7m3 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"
3675
+ }
3676
+ )
3677
+ }
3678
+ ) }),
3679
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col flex-1 p-5 sm:p-6", children: [
3680
+ release.category && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block self-start text-xs font-medium text-primary bg-primary/10 px-2.5 py-1 rounded-full mb-3", children: release.category }),
3681
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold text-foreground mb-2 group-hover:text-primary transition-colors line-clamp-2", children: release.title }),
3682
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mb-4 line-clamp-3", children: release.excerpt || release.seoDescription || "" }),
3683
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-auto flex items-center gap-3 text-xs text-muted-foreground", children: [
3684
+ release.author && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: release.author }),
3685
+ release.author && formattedDate && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/40", children: "\xB7" }),
3686
+ formattedDate && /* @__PURE__ */ jsxRuntime.jsx("span", { children: formattedDate }),
3687
+ release.readingTime ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3688
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/40", children: "\xB7" }),
3689
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
3690
+ release.readingTime,
3691
+ " min read"
3692
+ ] })
3693
+ ] }) : null
3694
+ ] })
3695
+ ] })
3696
+ ]
3697
+ }
3698
+ );
3699
+ }
3427
3700
  function PressKitPage(props) {
3428
3701
  const {
3429
3702
  productName,
@@ -3434,7 +3707,10 @@ function PressKitPage(props) {
3434
3707
  className = "",
3435
3708
  seoTitle,
3436
3709
  seoDescription,
3437
- seoKeywords
3710
+ seoKeywords,
3711
+ showPressReleases = true,
3712
+ pressReleaseBasePath = "/press",
3713
+ pressReleasesTitle = "Press Releases"
3438
3714
  } = props;
3439
3715
  const client = useWebSDK();
3440
3716
  const config = useWebSDKConfig();
@@ -3445,6 +3721,9 @@ function PressKitPage(props) {
3445
3721
  const [loading, setLoading] = React.useState(true);
3446
3722
  const [error, setError] = React.useState(null);
3447
3723
  const [activeCategory, setActiveCategory] = React.useState("ALL");
3724
+ const [releases, setReleases] = React.useState([]);
3725
+ const [releasesLoading, setReleasesLoading] = React.useState(true);
3726
+ const [preview, setPreview] = React.useState(null);
3448
3727
  const fetchAssets = React.useCallback(async () => {
3449
3728
  if (!resolvedProductId) {
3450
3729
  setLoading(false);
@@ -3482,6 +3761,48 @@ function PressKitPage(props) {
3482
3761
  React.useEffect(() => {
3483
3762
  fetchAssets();
3484
3763
  }, [fetchAssets]);
3764
+ const fetchReleases = React.useCallback(async () => {
3765
+ if (!resolvedProductId || !showPressReleases) {
3766
+ setReleasesLoading(false);
3767
+ return;
3768
+ }
3769
+ setReleasesLoading(true);
3770
+ try {
3771
+ const PAGE_SIZE = 100;
3772
+ const MAX_PAGES = 10;
3773
+ const all = [];
3774
+ let offset = 0;
3775
+ for (let pageNum = 0; pageNum < MAX_PAGES; pageNum++) {
3776
+ const result = await client.query(PRESS_RELEASES_QUERY, {
3777
+ productId: resolvedProductId,
3778
+ limit: PAGE_SIZE,
3779
+ offset
3780
+ });
3781
+ if (result.errors?.length) {
3782
+ setReleases([]);
3783
+ return;
3784
+ }
3785
+ const page = result.data?.publicContentPages;
3786
+ const items = page?.items || [];
3787
+ all.push(...items);
3788
+ if (!page?.hasMore || items.length === 0) break;
3789
+ offset += PAGE_SIZE;
3790
+ }
3791
+ const pressOnly = all.filter((p) => p.tags?.includes("press")).sort((a, b) => {
3792
+ const da = new Date(a.publishedAt || a.lastUpdated || 0).getTime();
3793
+ const db = new Date(b.publishedAt || b.lastUpdated || 0).getTime();
3794
+ return db - da;
3795
+ });
3796
+ setReleases(pressOnly);
3797
+ } catch {
3798
+ setReleases([]);
3799
+ } finally {
3800
+ setReleasesLoading(false);
3801
+ }
3802
+ }, [client, resolvedProductId, showPressReleases]);
3803
+ React.useEffect(() => {
3804
+ fetchReleases();
3805
+ }, [fetchReleases]);
3485
3806
  const presentCategories = CATEGORY_ORDER.filter(
3486
3807
  (c) => assets.some((a) => a.category === c)
3487
3808
  );
@@ -3524,6 +3845,31 @@ function PressKitPage(props) {
3524
3845
  )
3525
3846
  ] })
3526
3847
  ] }) }) }),
3848
+ showPressReleases && (releasesLoading || releases.length > 0) && /* @__PURE__ */ jsxRuntime.jsx("section", { className: "pb-16 sm:pb-20", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: [
3849
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-semibold text-foreground mb-6", children: pressReleasesTitle }),
3850
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid sm:grid-cols-2 lg:grid-cols-3 gap-6", children: releasesLoading ? [1, 2, 3].map((i) => /* @__PURE__ */ jsxRuntime.jsxs(
3851
+ "div",
3852
+ {
3853
+ className: "bg-card border rounded-xl overflow-hidden animate-pulse",
3854
+ children: [
3855
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/9] bg-muted" }),
3856
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-5 space-y-3", children: [
3857
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-muted rounded w-1/4" }),
3858
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-5 bg-muted rounded w-3/4" }),
3859
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-muted rounded w-1/2" })
3860
+ ] })
3861
+ ]
3862
+ },
3863
+ i
3864
+ )) : releases.map((r) => /* @__PURE__ */ jsxRuntime.jsx(
3865
+ PressReleaseCard,
3866
+ {
3867
+ release: r,
3868
+ basePath: pressReleaseBasePath
3869
+ },
3870
+ r.id
3871
+ )) })
3872
+ ] }) }),
3527
3873
  /* @__PURE__ */ jsxRuntime.jsx("section", { className: "pb-16 sm:pb-20", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid sm:grid-cols-2 lg:grid-cols-3 gap-6", children: [1, 2, 3, 4, 5, 6].map((i) => /* @__PURE__ */ jsxRuntime.jsxs(
3528
3874
  "div",
3529
3875
  {
@@ -3568,7 +3914,7 @@ function PressKitPage(props) {
3568
3914
  }) }),
3569
3915
  grouped.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-12", children: [
3570
3916
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-semibold text-foreground mb-5", children: CATEGORY_LABELS[group.cat] ?? group.cat }),
3571
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid sm:grid-cols-2 lg:grid-cols-3 gap-6", children: group.items.map((a) => /* @__PURE__ */ jsxRuntime.jsx(AssetCard, { asset: a }, a.id)) })
3917
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid sm:grid-cols-2 lg:grid-cols-3 gap-6", children: group.items.map((a) => /* @__PURE__ */ jsxRuntime.jsx(AssetCard, { asset: a, onPreview: setPreview }, a.id)) })
3572
3918
  ] }, group.cat)),
3573
3919
  contactEmail && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 border-t pt-10 text-center", children: [
3574
3920
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-foreground mb-2", children: "Media Contact" }),
@@ -3585,7 +3931,8 @@ function PressKitPage(props) {
3585
3931
  )
3586
3932
  ] })
3587
3933
  ] })
3588
- ] }) }) })
3934
+ ] }) }) }),
3935
+ /* @__PURE__ */ jsxRuntime.jsx(PressKitLightbox, { asset: preview, onClose: () => setPreview(null) })
3589
3936
  ] });
3590
3937
  }
3591
3938