@flamingo-stack/openframe-frontend-core 0.0.407-snapshot.20260711133234 → 0.0.407

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.
Files changed (116) hide show
  1. package/dist/{chunk-E4J5KKHH.js → chunk-43H2WOAW.js} +2 -2
  2. package/dist/{chunk-5HOII3WB.js → chunk-4UZH3MT2.js} +2 -2
  3. package/dist/{chunk-RL344I7V.cjs → chunk-5M5W6XDY.cjs} +7 -7
  4. package/dist/{chunk-RL344I7V.cjs.map → chunk-5M5W6XDY.cjs.map} +1 -1
  5. package/dist/{chunk-KRLBVBYU.cjs → chunk-74FWQI73.cjs} +11 -11
  6. package/dist/{chunk-KRLBVBYU.cjs.map → chunk-74FWQI73.cjs.map} +1 -1
  7. package/dist/{chunk-ZF5O3KUQ.js → chunk-7XVFSGQA.js} +2 -2
  8. package/dist/{chunk-IVM47EGI.js → chunk-CVYSW33D.js} +109 -149
  9. package/dist/chunk-CVYSW33D.js.map +1 -0
  10. package/dist/{chunk-NEMUCNCG.cjs → chunk-DOBNDDNE.cjs} +59 -59
  11. package/dist/{chunk-NEMUCNCG.cjs.map → chunk-DOBNDDNE.cjs.map} +1 -1
  12. package/dist/{chunk-SOALFYU6.cjs → chunk-GGDM5J4B.cjs} +109 -149
  13. package/dist/chunk-GGDM5J4B.cjs.map +1 -0
  14. package/dist/{chunk-O5W26SCL.js → chunk-GJSLKATJ.js} +2 -2
  15. package/dist/{chunk-ZMFQWMM7.js → chunk-GMZL4T7C.js} +2 -2
  16. package/dist/{chunk-LQWYXIKB.js → chunk-H66L2265.js} +4 -4
  17. package/dist/{chunk-KZPVN7AZ.js → chunk-HB63TQQO.js} +2 -2
  18. package/dist/{chunk-VUW4G6SU.js → chunk-HJIRG7R6.js} +2 -2
  19. package/dist/{chunk-J6M2G6TD.js → chunk-KLBEIJVZ.js} +4 -4
  20. package/dist/{chunk-YRKPMYI3.cjs → chunk-LC6RRLFA.cjs} +15 -15
  21. package/dist/{chunk-YRKPMYI3.cjs.map → chunk-LC6RRLFA.cjs.map} +1 -1
  22. package/dist/{chunk-F4KE5AZO.cjs → chunk-LPC3C7MG.cjs} +37 -37
  23. package/dist/{chunk-F4KE5AZO.cjs.map → chunk-LPC3C7MG.cjs.map} +1 -1
  24. package/dist/{chunk-IK5AR6QG.js → chunk-NSF7JUXF.js} +4 -4
  25. package/dist/{chunk-T6ZUBXPA.cjs → chunk-PRKMOF2U.cjs} +9 -9
  26. package/dist/{chunk-T6ZUBXPA.cjs.map → chunk-PRKMOF2U.cjs.map} +1 -1
  27. package/dist/{chunk-RPGFIUN3.cjs → chunk-Q2MC3CBI.cjs} +26 -26
  28. package/dist/{chunk-RPGFIUN3.cjs.map → chunk-Q2MC3CBI.cjs.map} +1 -1
  29. package/dist/{chunk-KPGKNUJF.cjs → chunk-R4MXLJUS.cjs} +31 -31
  30. package/dist/{chunk-KPGKNUJF.cjs.map → chunk-R4MXLJUS.cjs.map} +1 -1
  31. package/dist/{chunk-A3RW7M6B.cjs → chunk-SY3QS2E5.cjs} +26 -26
  32. package/dist/{chunk-A3RW7M6B.cjs.map → chunk-SY3QS2E5.cjs.map} +1 -1
  33. package/dist/{chunk-V3EZQWHQ.cjs → chunk-WCPUJA3Y.cjs} +5 -5
  34. package/dist/{chunk-V3EZQWHQ.cjs.map → chunk-WCPUJA3Y.cjs.map} +1 -1
  35. package/dist/{chunk-L6OPVKVR.js → chunk-XFP43YKG.js} +4 -4
  36. package/dist/{chunk-WGOATV3P.cjs → chunk-YX7C5JD7.cjs} +62 -62
  37. package/dist/{chunk-WGOATV3P.cjs.map → chunk-YX7C5JD7.cjs.map} +1 -1
  38. package/dist/components/case-studies/index.cjs +8 -9
  39. package/dist/components/case-studies/index.cjs.map +1 -1
  40. package/dist/components/case-studies/index.js +2 -3
  41. package/dist/components/case-studies/index.js.map +1 -1
  42. package/dist/components/chat/index.cjs +2 -3
  43. package/dist/components/chat/index.cjs.map +1 -1
  44. package/dist/components/chat/index.js +1 -2
  45. package/dist/components/chat/quick-action-chip.d.ts +2 -11
  46. package/dist/components/chat/quick-action-chip.d.ts.map +1 -1
  47. package/dist/components/contact/index.cjs +3 -4
  48. package/dist/components/contact/index.cjs.map +1 -1
  49. package/dist/components/contact/index.js +2 -3
  50. package/dist/components/docs/index.cjs +6 -6
  51. package/dist/components/docs/index.js +5 -5
  52. package/dist/components/embeds/index.cjs +3 -4
  53. package/dist/components/embeds/index.cjs.map +1 -1
  54. package/dist/components/embeds/index.js +2 -3
  55. package/dist/components/embeds/reddit-embed-client.d.ts.map +1 -1
  56. package/dist/components/faq/index.cjs +3 -4
  57. package/dist/components/faq/index.cjs.map +1 -1
  58. package/dist/components/faq/index.js +2 -3
  59. package/dist/components/features/index.cjs +2 -3
  60. package/dist/components/features/index.cjs.map +1 -1
  61. package/dist/components/features/index.js +1 -2
  62. package/dist/components/help-center-pages/index.cjs +21 -21
  63. package/dist/components/help-center-pages/index.js +12 -12
  64. package/dist/components/index.cjs +126 -126
  65. package/dist/components/index.cjs.map +1 -1
  66. package/dist/components/index.d.ts +0 -1
  67. package/dist/components/index.d.ts.map +1 -1
  68. package/dist/components/index.js +10 -10
  69. package/dist/components/index.js.map +1 -1
  70. package/dist/components/media-carousel.d.ts +4 -28
  71. package/dist/components/media-carousel.d.ts.map +1 -1
  72. package/dist/components/navigation/index.cjs +2 -3
  73. package/dist/components/navigation/index.cjs.map +1 -1
  74. package/dist/components/navigation/index.js +1 -2
  75. package/dist/components/onboarding-guides/index.cjs +6 -6
  76. package/dist/components/onboarding-guides/index.js +5 -5
  77. package/dist/components/related-content/index.cjs +3 -4
  78. package/dist/components/related-content/index.cjs.map +1 -1
  79. package/dist/components/related-content/index.js +2 -3
  80. package/dist/components/tickets/index.cjs +6 -6
  81. package/dist/components/tickets/index.js +5 -5
  82. package/dist/components/ui/index.cjs +2 -3
  83. package/dist/components/ui/index.cjs.map +1 -1
  84. package/dist/components/ui/index.js +1 -2
  85. package/dist/components/ui/tag.d.ts +2 -3
  86. package/dist/components/ui/tag.d.ts.map +1 -1
  87. package/dist/index.cjs +2 -3
  88. package/dist/index.cjs.map +1 -1
  89. package/dist/index.js +1 -2
  90. package/dist/utils/media-carousel-utils-stub.d.ts +1 -3
  91. package/dist/utils/media-carousel-utils-stub.d.ts.map +1 -1
  92. package/dist/utils/media-carousel-utils.d.ts +10 -0
  93. package/dist/utils/media-carousel-utils.d.ts.map +1 -0
  94. package/package.json +1 -1
  95. package/src/components/chat/quick-action-chip.tsx +4 -18
  96. package/src/components/embeds/reddit-embed-client.tsx +3 -0
  97. package/src/components/index.ts +0 -5
  98. package/src/components/media-carousel.tsx +149 -195
  99. package/src/components/ui/tag.tsx +3 -21
  100. package/src/styles/ods-design-tokens.css +0 -2
  101. package/src/utils/.media-carousel-utils.md +31 -0
  102. package/src/utils/media-carousel-utils-stub.ts +1 -3
  103. package/src/utils/media-carousel-utils.ts +22 -0
  104. package/dist/chunk-IVM47EGI.js.map +0 -1
  105. package/dist/chunk-SOALFYU6.cjs.map +0 -1
  106. /package/dist/{chunk-E4J5KKHH.js.map → chunk-43H2WOAW.js.map} +0 -0
  107. /package/dist/{chunk-5HOII3WB.js.map → chunk-4UZH3MT2.js.map} +0 -0
  108. /package/dist/{chunk-ZF5O3KUQ.js.map → chunk-7XVFSGQA.js.map} +0 -0
  109. /package/dist/{chunk-O5W26SCL.js.map → chunk-GJSLKATJ.js.map} +0 -0
  110. /package/dist/{chunk-ZMFQWMM7.js.map → chunk-GMZL4T7C.js.map} +0 -0
  111. /package/dist/{chunk-LQWYXIKB.js.map → chunk-H66L2265.js.map} +0 -0
  112. /package/dist/{chunk-KZPVN7AZ.js.map → chunk-HB63TQQO.js.map} +0 -0
  113. /package/dist/{chunk-VUW4G6SU.js.map → chunk-HJIRG7R6.js.map} +0 -0
  114. /package/dist/{chunk-J6M2G6TD.js.map → chunk-KLBEIJVZ.js.map} +0 -0
  115. /package/dist/{chunk-IK5AR6QG.js.map → chunk-NSF7JUXF.js.map} +0 -0
  116. /package/dist/{chunk-L6OPVKVR.js.map → chunk-XFP43YKG.js.map} +0 -0
@@ -90,7 +90,6 @@ import {
90
90
  GraduationCapIcon,
91
91
  HeadphoneIcon,
92
92
  HubspotLogoGreyIcon,
93
- ImageOffIcon,
94
93
  ImagePlusIcon,
95
94
  InfoCircleIcon,
96
95
  LayersIcon,
@@ -425,18 +424,11 @@ init_cn();
425
424
  import { jsx, jsxs } from "react/jsx-runtime";
426
425
  var tagVariants = cva(
427
426
  [
428
- "inline-flex items-center justify-center rounded-md",
427
+ "text-h5 h-8 inline-flex items-center justify-center gap-[var(--spacing-system-xxs)] p-[var(--spacing-system-xsf)] rounded-md",
429
428
  "transition-colors duration-150"
430
429
  ],
431
430
  {
432
431
  variants: {
433
- // Chip scale. `default` is the classic 32px mono-uppercase tag; `large`
434
- // is the Figma "Feature Item" chip (48px, h3 bold body label) used by
435
- // chip groups acting as tabs (OpenFrame categories).
436
- size: {
437
- default: "text-h5 h-8 gap-[var(--spacing-system-xxs)] p-[var(--spacing-system-xsf)]",
438
- large: "text-h3 font-bold h-12 gap-[var(--spacing-system-xs)] p-[var(--spacing-system-s)]"
439
- },
440
432
  variant: {
441
433
  primary: [
442
434
  "bg-[var(--ods-open-yellow-base)] text-[var(--ods-system-greys-black)]",
@@ -467,15 +459,6 @@ var tagVariants = cva(
467
459
  "bg-[var(--ods-system-greys-soft-grey)] text-[var(--ods-system-greys-grey)]",
468
460
  "hover:bg-[var(--ods-system-greys-soft-grey-hover)] active:bg-[var(--ods-system-greys-soft-grey-action)]"
469
461
  ],
470
- // Active/selected chip state (Figma "Feature Item" active): pink
471
- // border + pink-secondary fill. A dedicated variant (not appended
472
- // utilities) so its own hover rules win — the outline variant's
473
- // hover:bg/hover:border would otherwise repaint an active chip grey.
474
- selected: [
475
- "bg-[var(--ods-flamingo-pink-secondary)] text-[var(--ods-system-greys-white)] border border-[var(--ods-flamingo-pink-base)]",
476
- "hover:bg-[var(--ods-flamingo-pink-secondary-hover)] hover:border-[var(--ods-flamingo-pink-base)]",
477
- "active:bg-[var(--ods-flamingo-pink-secondary-action)]"
478
- ],
479
462
  // Matches the EntityTagBadges / StatusBadge tag skin (ods-card + ods-border,
480
463
  // mono uppercase) so the tag-editor chips render identically to the public
481
464
  // tag badges. Used for FilterChipData variant 'tag' (see search-input).
@@ -486,8 +469,7 @@ var tagVariants = cva(
486
469
  }
487
470
  },
488
471
  defaultVariants: {
489
- variant: "primary",
490
- size: "default"
472
+ variant: "primary"
491
473
  }
492
474
  }
493
475
  );
@@ -500,7 +482,6 @@ var disabledTagClasses = [
500
482
  function Tag({
501
483
  label,
502
484
  variant,
503
- size: size2,
504
485
  icon,
505
486
  onClose,
506
487
  className,
@@ -513,14 +494,14 @@ function Tag({
513
494
  Comp,
514
495
  {
515
496
  className: cn(
516
- tagVariants({ variant, size: size2 }),
497
+ tagVariants({ variant }),
517
498
  disabled && disabledTagClasses,
518
499
  className
519
500
  ),
520
501
  "aria-disabled": disabled || void 0,
521
502
  ...props,
522
503
  children: [
523
- icon && /* @__PURE__ */ jsx("span", { className: cn("flex items-center justify-center shrink-0", size2 === "large" ? "size-6" : "size-5"), children: icon }),
504
+ icon && /* @__PURE__ */ jsx("span", { className: "flex items-center justify-center size-5 shrink-0", children: icon }),
524
505
  /* @__PURE__ */ jsx("span", { className: cn("truncate", labelClassName), title: typeof label === "string" ? label : void 0, children: label }),
525
506
  onClose && /* @__PURE__ */ jsx(
526
507
  "button",
@@ -6523,14 +6504,13 @@ function composeChipLabel(label, lozenge) {
6523
6504
  function ChipSkelBar({ className, style }) {
6524
6505
  return /* @__PURE__ */ jsx34("span", { "aria-hidden": true, className: cn("animate-pulse rounded-md bg-ods-border", className), style });
6525
6506
  }
6526
- function QuickActionChipSkeleton({ labelCh = 16, icon = true, lozenge = false, size: size2 = "default", className }) {
6507
+ function QuickActionChipSkeleton({ labelCh = 16, icon = true, lozenge = false, className }) {
6527
6508
  return /* @__PURE__ */ jsx34(
6528
6509
  Tag,
6529
6510
  {
6530
6511
  variant: "outline",
6531
- size: size2,
6532
6512
  className,
6533
- icon: icon ? /* @__PURE__ */ jsx34(ChipSkelBar, { className: size2 === "large" ? "block size-5" : "block size-4" }) : void 0,
6513
+ icon: icon ? /* @__PURE__ */ jsx34(ChipSkelBar, { className: "block size-4" }) : void 0,
6534
6514
  label: /* @__PURE__ */ jsxs28(Fragment8, { children: [
6535
6515
  lozenge && /* @__PURE__ */ jsx34(ChipSkelBar, { className: "mr-2 inline-block h-[16px] w-[26px] translate-y-[2px]" }),
6536
6516
  /* @__PURE__ */ jsx34(ChipSkelBar, { className: "inline-block h-[0.9em] translate-y-[0.08em]", style: { width: `${labelCh}ch` } })
@@ -6543,8 +6523,6 @@ function QuickActionChipButton({
6543
6523
  icon,
6544
6524
  lozenge,
6545
6525
  variant = "outline",
6546
- selected = false,
6547
- size: size2 = "default",
6548
6526
  onSelect,
6549
6527
  onHoverStart,
6550
6528
  onHoverEnd,
@@ -6553,9 +6531,8 @@ function QuickActionChipButton({
6553
6531
  }) {
6554
6532
  const resolvedIcon = renderQuickActionIcon(icon);
6555
6533
  const resolvedLabel = composeChipLabel(label, lozenge);
6556
- const tagVariant = selected ? "selected" : variant;
6557
6534
  if (!interactive) {
6558
- return /* @__PURE__ */ jsx34(Tag, { variant: tagVariant, size: size2, icon: resolvedIcon, label: resolvedLabel, className });
6535
+ return /* @__PURE__ */ jsx34(Tag, { variant, icon: resolvedIcon, label: resolvedLabel, className });
6559
6536
  }
6560
6537
  return /* @__PURE__ */ jsx34(
6561
6538
  "button",
@@ -6566,12 +6543,11 @@ function QuickActionChipButton({
6566
6543
  onMouseLeave: onHoverEnd,
6567
6544
  onFocus: onHoverStart,
6568
6545
  onBlur: onHoverEnd,
6569
- "aria-pressed": selected || void 0,
6570
6546
  className: cn(
6571
6547
  "shrink-0 rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-ods-accent",
6572
6548
  className
6573
6549
  ),
6574
- children: /* @__PURE__ */ jsx34(Tag, { variant: tagVariant, size: size2, icon: resolvedIcon, label: resolvedLabel })
6550
+ children: /* @__PURE__ */ jsx34(Tag, { variant, icon: resolvedIcon, label: resolvedLabel })
6575
6551
  }
6576
6552
  );
6577
6553
  }
@@ -18708,7 +18684,6 @@ var socialCache = SocialEmbedCache.getInstance();
18708
18684
  // src/components/media-carousel.tsx
18709
18685
  init_cn();
18710
18686
  import { useState as useState39, useRef as useRef23, useEffect as useEffect32, memo as memo4, useCallback as useCallback19 } from "react";
18711
- init_button2();
18712
18687
  import { Fragment as Fragment30, jsx as jsx135, jsxs as jsxs104 } from "react/jsx-runtime";
18713
18688
  var ChevronLeftIcon = () => /* @__PURE__ */ jsx135("svg", { width: "24", height: "24", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx135("polyline", { points: "15,18 9,12 15,6" }) });
18714
18689
  var ChevronRightIcon = () => /* @__PURE__ */ jsx135("svg", { width: "24", height: "24", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx135("polyline", { points: "9,18 15,12 9,6" }) });
@@ -18716,28 +18691,27 @@ var MediaCarousel = memo4(function MediaCarousel2({
18716
18691
  media,
18717
18692
  className,
18718
18693
  aspectRatio = "16/9",
18719
- showArrows = true,
18720
- objectFit = "contain",
18721
- posterPriority = false,
18722
- transformImageSrc,
18723
- reserveDotRow = false
18694
+ showThumbnails = true,
18695
+ autoPlay = false,
18696
+ objectFit = "contain"
18724
18697
  }) {
18725
18698
  const [currentIndex, setCurrentIndex] = useState39(0);
18726
18699
  const [touchStart, setTouchStart] = useState39(null);
18727
18700
  const [touchEnd, setTouchEnd] = useState39(null);
18728
- const [brokenResourceUrls, setBrokenResourceUrls] = useState39({});
18729
- const [loadedImageSrc, setLoadedImageSrc] = useState39(null);
18730
18701
  const carouselRef = useRef23(null);
18731
- const onImageError = useCallback19((originalUrl) => {
18732
- const key = originalUrl.trim() || "__missing_src__";
18733
- setBrokenResourceUrls((b) => b[key] ? b : { ...b, [key]: true });
18734
- }, []);
18702
+ const thumbnailsRef = useRef23(null);
18735
18703
  useEffect32(() => {
18736
18704
  if (currentIndex >= media.length && media.length > 0) {
18737
18705
  setCurrentIndex(media.length - 1);
18738
18706
  }
18739
18707
  }, [media.length, currentIndex]);
18708
+ if (!media || media.length === 0) {
18709
+ return null;
18710
+ }
18740
18711
  const currentItem = media[currentIndex] || media[0];
18712
+ if (!currentItem) {
18713
+ return null;
18714
+ }
18741
18715
  const nextSlide = useCallback19(() => {
18742
18716
  setCurrentIndex((prev) => (prev + 1) % media.length);
18743
18717
  }, [media.length]);
@@ -18745,8 +18719,9 @@ var MediaCarousel = memo4(function MediaCarousel2({
18745
18719
  setCurrentIndex((prev) => (prev - 1 + media.length) % media.length);
18746
18720
  }, [media.length]);
18747
18721
  const selectSlide = useCallback19((index) => {
18748
- setCurrentIndex((prev) => index === prev ? prev : index);
18749
- }, []);
18722
+ if (index === currentIndex) return;
18723
+ setCurrentIndex(index);
18724
+ }, [currentIndex]);
18750
18725
  const handleKeyDown = useCallback19((e) => {
18751
18726
  if (media.length <= 1) return;
18752
18727
  if (e.key === "ArrowLeft") {
@@ -18757,12 +18732,6 @@ var MediaCarousel = memo4(function MediaCarousel2({
18757
18732
  nextSlide();
18758
18733
  }
18759
18734
  }, [nextSlide, prevSlide, media.length]);
18760
- if (!media || media.length === 0) {
18761
- return null;
18762
- }
18763
- if (!currentItem) {
18764
- return null;
18765
- }
18766
18735
  const minSwipeDistance = 50;
18767
18736
  const onTouchStart = (e) => {
18768
18737
  setTouchEnd(null);
@@ -18772,7 +18741,7 @@ var MediaCarousel = memo4(function MediaCarousel2({
18772
18741
  setTouchEnd(e.targetTouches[0].clientX);
18773
18742
  };
18774
18743
  const onTouchEnd = () => {
18775
- if (touchStart === null || touchEnd === null) return;
18744
+ if (!touchStart || !touchEnd) return;
18776
18745
  const distance = touchStart - touchEnd;
18777
18746
  const isLeftSwipe = distance > minSwipeDistance;
18778
18747
  const isRightSwipe = distance < -minSwipeDistance;
@@ -18783,77 +18752,43 @@ var MediaCarousel = memo4(function MediaCarousel2({
18783
18752
  prevSlide();
18784
18753
  }
18785
18754
  };
18786
- const displayImageSrc = (url) => transformImageSrc ? transformImageSrc(url) : url;
18787
- const renderVideo = (item, index) => /* @__PURE__ */ jsx135(
18755
+ const renderYouTubeEmbed = (item, index) => /* @__PURE__ */ jsx135(
18788
18756
  Video2,
18789
18757
  {
18758
+ kind: "youtube",
18790
18759
  url: item.src,
18791
- poster: item.poster ? displayImageSrc(item.poster) : void 0,
18792
18760
  title: item.alt || `Video ${index + 1}`,
18761
+ layout: "fill",
18762
+ priority: index === currentIndex
18763
+ }
18764
+ );
18765
+ const renderVideo = (item, index) => /* @__PURE__ */ jsx135(
18766
+ Video2,
18767
+ {
18768
+ url: item.src,
18769
+ poster: item.poster,
18793
18770
  muted: true,
18794
18771
  layout: "fill",
18795
- priority: Boolean(posterPriority && index === 0),
18796
- className: "w-full h-full bg-black"
18797
- },
18798
- `video-${index}-${item.src}`
18772
+ priority: index === currentIndex
18773
+ }
18799
18774
  );
18800
- const renderImageUnavailable = (failedUrl) => /* @__PURE__ */ jsxs104("div", { className: "absolute inset-0 flex flex-col items-center justify-center gap-3 bg-ods-card px-6 text-center", children: [
18801
- /* @__PURE__ */ jsx135(ImageOffIcon, { className: "size-8 text-ods-text-secondary" }),
18802
- /* @__PURE__ */ jsx135("p", { className: "text-ods-text-secondary text-sm max-w-md", children: "This image is no longer available at the original URL." }),
18803
- /* @__PURE__ */ jsx135(
18804
- next_link_default,
18805
- {
18806
- href: failedUrl,
18807
- target: "_blank",
18808
- rel: "noopener noreferrer",
18809
- className: "text-ods-accent text-sm underline break-all",
18810
- children: "Open link"
18775
+ const renderImage = (item, index) => /* @__PURE__ */ jsx135("div", { className: "absolute inset-0 bg-black", children: /* @__PURE__ */ jsx135(
18776
+ "img",
18777
+ {
18778
+ src: item.src,
18779
+ alt: item.alt || `Media ${index + 1}`,
18780
+ className: `w-full h-full object-${objectFit}`,
18781
+ loading: "lazy",
18782
+ onError: (e) => {
18783
+ const target = e.target;
18784
+ target.style.display = "none";
18811
18785
  }
18812
- )
18813
- ] });
18814
- const renderImage = (item, index) => {
18815
- const rawSrc = typeof item.src === "string" ? item.src.trim() : "";
18816
- if (!rawSrc) {
18817
- return /* @__PURE__ */ jsx135("div", { className: "absolute inset-0 flex flex-col items-center justify-center gap-3 bg-ods-card px-6 text-center", children: /* @__PURE__ */ jsx135("p", { className: "text-ods-text-secondary text-sm max-w-md", children: "No image URL for this slide." }) });
18818
- }
18819
- if (brokenResourceUrls[rawSrc]) {
18820
- return renderImageUnavailable(rawSrc);
18821
- }
18822
- const mainImagePriority = Boolean(posterPriority && index === 0);
18823
- const imageLoaded = loadedImageSrc === rawSrc;
18824
- return /* @__PURE__ */ jsxs104("div", { className: "absolute inset-0 bg-ods-bg", children: [
18825
- !imageLoaded && /* @__PURE__ */ jsx135(
18826
- "div",
18827
- {
18828
- className: "absolute inset-0 z-[1] bg-ods-card/90 animate-pulse",
18829
- "aria-hidden": true
18830
- }
18831
- ),
18832
- /* @__PURE__ */ jsx135(
18833
- next_image_default,
18834
- {
18835
- src: displayImageSrc(rawSrc),
18836
- alt: item.alt || `Media ${index + 1}`,
18837
- className: cn(
18838
- `w-full h-full object-${objectFit} relative z-[2]`,
18839
- !imageLoaded && "opacity-0",
18840
- imageLoaded && "opacity-100 transition-opacity duration-200"
18841
- ),
18842
- priority: mainImagePriority,
18843
- loading: mainImagePriority ? "eager" : "lazy",
18844
- sizes: "(max-width: 1279px) 100vw, 1428px",
18845
- width: 1428,
18846
- height: 802,
18847
- unoptimized: true,
18848
- onLoad: () => setLoadedImageSrc(rawSrc),
18849
- onError: () => onImageError(rawSrc)
18850
- }
18851
- )
18852
- ] });
18853
- };
18786
+ }
18787
+ ) });
18854
18788
  const renderMainMedia = (item, index) => {
18855
18789
  switch (item.type) {
18856
18790
  case "youtube":
18791
+ return renderYouTubeEmbed(item, index);
18857
18792
  case "video":
18858
18793
  return renderVideo(item, index);
18859
18794
  case "image":
@@ -18861,6 +18796,41 @@ var MediaCarousel = memo4(function MediaCarousel2({
18861
18796
  return renderImage(item, index);
18862
18797
  }
18863
18798
  };
18799
+ const renderThumbnail = (item, index) => {
18800
+ const isActive = index === currentIndex;
18801
+ let thumbnailSrc = item.src;
18802
+ if (item.type === "youtube") {
18803
+ const videoId = extractYouTubeId(item.src);
18804
+ thumbnailSrc = videoId ? `https://img.youtube.com/vi/${videoId}/mqdefault.jpg` : item.src;
18805
+ } else if (item.type === "video" && item.poster) {
18806
+ thumbnailSrc = item.poster;
18807
+ }
18808
+ return /* @__PURE__ */ jsxs104(
18809
+ "button",
18810
+ {
18811
+ onClick: () => selectSlide(index),
18812
+ className: cn(
18813
+ "relative flex-shrink-0 overflow-hidden transition-all duration-200",
18814
+ "w-20 h-20 md:w-24 md:h-24 rounded-lg border-2",
18815
+ isActive ? "border-[#FFC008] ring-2 ring-[#FFC008]/20" : "border-ods-border hover:border-[#888888]"
18816
+ ),
18817
+ children: [
18818
+ /* @__PURE__ */ jsx135(
18819
+ "img",
18820
+ {
18821
+ src: thumbnailSrc,
18822
+ alt: item.alt || `Thumbnail ${index + 1}`,
18823
+ className: "w-full h-full object-cover",
18824
+ loading: "lazy"
18825
+ }
18826
+ ),
18827
+ (item.type === "video" || item.type === "youtube") && /* @__PURE__ */ jsx135("div", { className: "absolute inset-0 flex items-center justify-center bg-black/30", children: /* @__PURE__ */ jsx135(VideoPlayBadge, { size: "sm" }) }),
18828
+ isActive && /* @__PURE__ */ jsx135("div", { className: "absolute bottom-1 right-1 w-2 h-2 bg-[#FFC008] rounded-full" })
18829
+ ]
18830
+ },
18831
+ index
18832
+ );
18833
+ };
18864
18834
  const getAspectRatioClass = () => {
18865
18835
  switch (aspectRatio) {
18866
18836
  case "4/3":
@@ -18874,14 +18844,13 @@ var MediaCarousel = memo4(function MediaCarousel2({
18874
18844
  return "aspect-video";
18875
18845
  }
18876
18846
  };
18877
- return /* @__PURE__ */ jsxs104("div", { className: cn("flex flex-col items-center gap-[var(--spacing-system-l)]", className), children: [
18847
+ return /* @__PURE__ */ jsxs104("div", { className: cn("space-y-4", className), children: [
18878
18848
  /* @__PURE__ */ jsxs104(
18879
18849
  "div",
18880
18850
  {
18881
18851
  ref: carouselRef,
18882
18852
  className: cn(
18883
- "relative bg-ods-bg border border-ods-border rounded-md overflow-hidden group w-full",
18884
- "[box-shadow:var(--shadow-media-frame)]",
18853
+ "relative bg-ods-bg border border-ods-border rounded-2xl overflow-hidden group w-full",
18885
18854
  getAspectRatioClass()
18886
18855
  ),
18887
18856
  onTouchStart,
@@ -18893,54 +18862,43 @@ var MediaCarousel = memo4(function MediaCarousel2({
18893
18862
  "aria-label": media.length > 1 ? "Media carousel, use arrow keys to navigate" : void 0,
18894
18863
  children: [
18895
18864
  renderMainMedia(currentItem, currentIndex),
18896
- showArrows && media.length > 1 && /* @__PURE__ */ jsxs104(Fragment30, { children: [
18865
+ media.length > 1 && /* @__PURE__ */ jsxs104(Fragment30, { children: [
18897
18866
  /* @__PURE__ */ jsx135(
18898
- Button,
18867
+ "button",
18899
18868
  {
18900
- variant: "transparent",
18901
18869
  onClick: prevSlide,
18902
- className: "absolute left-3 top-1/2 h-auto md:h-auto -translate-y-1/2 rounded-full bg-black/50 p-2 text-white opacity-0 transition-opacity duration-200 group-hover:opacity-100 hover:bg-black/70 z-10",
18870
+ className: "absolute left-3 top-1/2 transform -translate-y-1/2 bg-black/50 text-white rounded-full p-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200 hover:bg-black/70 z-10",
18903
18871
  "aria-label": "Previous media",
18904
18872
  children: /* @__PURE__ */ jsx135(ChevronLeftIcon, {})
18905
18873
  }
18906
18874
  ),
18907
18875
  /* @__PURE__ */ jsx135(
18908
- Button,
18876
+ "button",
18909
18877
  {
18910
- variant: "transparent",
18911
18878
  onClick: nextSlide,
18912
- className: "absolute right-3 top-1/2 h-auto md:h-auto -translate-y-1/2 rounded-full bg-black/50 p-2 text-white opacity-0 transition-opacity duration-200 group-hover:opacity-100 hover:bg-black/70 z-10",
18879
+ className: "absolute right-3 top-1/2 transform -translate-y-1/2 bg-black/50 text-white rounded-full p-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200 hover:bg-black/70 z-10",
18913
18880
  "aria-label": "Next media",
18914
18881
  children: /* @__PURE__ */ jsx135(ChevronRightIcon, {})
18915
18882
  }
18916
- )
18883
+ ),
18884
+ /* @__PURE__ */ jsxs104("div", { className: "absolute top-3 right-3 bg-black/70 text-white px-3 py-1 rounded-lg text-sm font-medium", children: [
18885
+ currentIndex + 1,
18886
+ " / ",
18887
+ media.length
18888
+ ] })
18917
18889
  ] })
18918
18890
  ]
18919
18891
  }
18920
18892
  ),
18921
- (media.length > 1 || reserveDotRow) && /* @__PURE__ */ jsx135("div", { className: "flex h-6 items-center gap-[var(--spacing-system-xs)]", role: "group", "aria-label": "Choose slide", children: media.length > 1 && media.map((item, index) => {
18922
- const isActive = index === currentIndex;
18923
- return /* @__PURE__ */ jsx135(
18924
- Button,
18925
- {
18926
- variant: "transparent",
18927
- "aria-current": isActive ? "true" : void 0,
18928
- "aria-label": `Go to slide ${index + 1}`,
18929
- onClick: () => selectSlide(index),
18930
- className: "flex h-6 w-6 md:h-6 shrink-0 items-center justify-center rounded-full p-0",
18931
- children: /* @__PURE__ */ jsx135(
18932
- "span",
18933
- {
18934
- className: cn(
18935
- "size-2 rounded-full transition-colors duration-150",
18936
- isActive ? "bg-[var(--ods-flamingo-pink-base)]" : "bg-[var(--ods-system-greys-soft-grey)] hover:bg-[var(--ods-system-greys-soft-grey-hover)]"
18937
- )
18938
- }
18939
- )
18940
- },
18941
- index
18942
- );
18943
- }) })
18893
+ media.length > 1 && showThumbnails && /* @__PURE__ */ jsx135("div", { className: "w-full", children: /* @__PURE__ */ jsx135(
18894
+ "div",
18895
+ {
18896
+ ref: thumbnailsRef,
18897
+ className: "flex gap-2 overflow-x-auto scrollbar-none py-2",
18898
+ style: { scrollbarWidth: "none", msOverflowStyle: "none" },
18899
+ children: media.map((item, index) => renderThumbnail(item, index))
18900
+ }
18901
+ ) })
18944
18902
  ] });
18945
18903
  });
18946
18904
 
@@ -19276,6 +19234,7 @@ function RedditEmbedClient({ url, maxWidth = 700 }) {
19276
19234
  width: m.width,
19277
19235
  height: m.height
19278
19236
  }));
19237
+ console.log("\u{1F3AC} MediaCarousel will render with:", mediaContent.length, "items", mediaContent);
19279
19238
  const formatTimeAgo = (timestamp) => {
19280
19239
  const now = Math.floor(Date.now() / 1e3);
19281
19240
  const diffSeconds = now - timestamp;
@@ -19322,7 +19281,8 @@ function RedditEmbedClient({ url, maxWidth = 700 }) {
19322
19281
  MediaCarousel,
19323
19282
  {
19324
19283
  media: carouselItems,
19325
- aspectRatio: "16/9"
19284
+ aspectRatio: "16/9",
19285
+ showThumbnails: carouselItems.length > 1
19326
19286
  }
19327
19287
  ),
19328
19288
  /* @__PURE__ */ jsxs105("div", { className: "flex items-center space-x-6 text-ods-text-secondary text-sm", children: [
@@ -53409,4 +53369,4 @@ export {
53409
53369
  LogsList,
53410
53370
  assets
53411
53371
  };
53412
- //# sourceMappingURL=chunk-IVM47EGI.js.map
53372
+ //# sourceMappingURL=chunk-CVYSW33D.js.map