@opensite/ui 2.6.7 → 2.6.9

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.
@@ -519,7 +519,7 @@ function BreadcrumbList({ className, ...props }) {
519
519
  {
520
520
  "data-slot": "breadcrumb-list",
521
521
  className: cn(
522
- "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
522
+ "flex flex-wrap items-center gap-1.5 text-sm wrap-break-word sm:gap-2.5",
523
523
  className
524
524
  ),
525
525
  ...props
@@ -546,7 +546,7 @@ function BreadcrumbLink({
546
546
  Comp,
547
547
  {
548
548
  "data-slot": "breadcrumb-link",
549
- className: cn("hover:text-foreground transition-colors", className),
549
+ className: cn("hover:underline transition-colors", className),
550
550
  ...props
551
551
  }
552
552
  );
@@ -559,7 +559,7 @@ function BreadcrumbPage({ className, ...props }) {
559
559
  role: "link",
560
560
  "aria-disabled": "true",
561
561
  "aria-current": "page",
562
- className: cn("text-foreground font-normal", className),
562
+ className: cn("font-normal", className),
563
563
  ...props
564
564
  }
565
565
  );
@@ -497,7 +497,7 @@ function BreadcrumbList({ className, ...props }) {
497
497
  {
498
498
  "data-slot": "breadcrumb-list",
499
499
  className: cn(
500
- "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
500
+ "flex flex-wrap items-center gap-1.5 text-sm wrap-break-word sm:gap-2.5",
501
501
  className
502
502
  ),
503
503
  ...props
@@ -524,7 +524,7 @@ function BreadcrumbLink({
524
524
  Comp,
525
525
  {
526
526
  "data-slot": "breadcrumb-link",
527
- className: cn("hover:text-foreground transition-colors", className),
527
+ className: cn("hover:underline transition-colors", className),
528
528
  ...props
529
529
  }
530
530
  );
@@ -537,7 +537,7 @@ function BreadcrumbPage({ className, ...props }) {
537
537
  role: "link",
538
538
  "aria-disabled": "true",
539
539
  "aria-current": "page",
540
- className: cn("text-foreground font-normal", className),
540
+ className: cn("font-normal", className),
541
541
  ...props
542
542
  }
543
543
  );
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var React5 = require('react');
4
+ var React6 = require('react');
5
5
  var clsx = require('clsx');
6
6
  var tailwindMerge = require('tailwind-merge');
7
7
  var img = require('@page-speed/img');
@@ -10,6 +10,7 @@ var jsxRuntime = require('react/jsx-runtime');
10
10
  var icon = require('@page-speed/icon');
11
11
  var AvatarPrimitive = require('@radix-ui/react-avatar');
12
12
  var reactSlot = require('@radix-ui/react-slot');
13
+ var usePlatformFromUrl = require('@opensite/hooks/usePlatformFromUrl');
13
14
 
14
15
  function _interopNamespace(e) {
15
16
  if (e && e.__esModule) return e;
@@ -29,7 +30,7 @@ function _interopNamespace(e) {
29
30
  return Object.freeze(n);
30
31
  }
31
32
 
32
- var React5__namespace = /*#__PURE__*/_interopNamespace(React5);
33
+ var React6__namespace = /*#__PURE__*/_interopNamespace(React6);
33
34
  var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
34
35
 
35
36
  // components/blocks/article/article-chapters-author.tsx
@@ -118,7 +119,7 @@ function useNavigation({
118
119
  href,
119
120
  onClick
120
121
  } = {}) {
121
- const linkType = React5__namespace.useMemo(() => {
122
+ const linkType = React6__namespace.useMemo(() => {
122
123
  if (!href || href.trim() === "") {
123
124
  return onClick ? "none" : "none";
124
125
  }
@@ -139,7 +140,7 @@ function useNavigation({
139
140
  return "internal";
140
141
  }
141
142
  }, [href, onClick]);
142
- const normalizedHref = React5__namespace.useMemo(() => {
143
+ const normalizedHref = React6__namespace.useMemo(() => {
143
144
  if (!href || href.trim() === "") {
144
145
  return void 0;
145
146
  }
@@ -157,7 +158,7 @@ function useNavigation({
157
158
  return trimmed;
158
159
  }
159
160
  }, [href, linkType]);
160
- const target = React5__namespace.useMemo(() => {
161
+ const target = React6__namespace.useMemo(() => {
161
162
  switch (linkType) {
162
163
  case "external":
163
164
  return "_blank";
@@ -170,7 +171,7 @@ function useNavigation({
170
171
  return void 0;
171
172
  }
172
173
  }, [linkType]);
173
- const rel = React5__namespace.useMemo(() => {
174
+ const rel = React6__namespace.useMemo(() => {
174
175
  if (linkType === "external") {
175
176
  return "noopener noreferrer";
176
177
  }
@@ -179,7 +180,7 @@ function useNavigation({
179
180
  const isExternal = linkType === "external";
180
181
  const isInternal = linkType === "internal";
181
182
  const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
182
- const handleClick = React5__namespace.useCallback(
183
+ const handleClick = React6__namespace.useCallback(
183
184
  (event) => {
184
185
  if (onClick) {
185
186
  try {
@@ -363,7 +364,7 @@ var buttonVariants = classVarianceAuthority.cva(baseStyles, {
363
364
  size: "default"
364
365
  }
365
366
  });
366
- var Pressable = React5__namespace.forwardRef(
367
+ var Pressable = React6__namespace.forwardRef(
367
368
  ({
368
369
  children,
369
370
  className,
@@ -519,7 +520,7 @@ function BreadcrumbList({ className, ...props }) {
519
520
  {
520
521
  "data-slot": "breadcrumb-list",
521
522
  className: cn(
522
- "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
523
+ "flex flex-wrap items-center gap-1.5 text-sm wrap-break-word sm:gap-2.5",
523
524
  className
524
525
  ),
525
526
  ...props
@@ -546,7 +547,7 @@ function BreadcrumbLink({
546
547
  Comp,
547
548
  {
548
549
  "data-slot": "breadcrumb-link",
549
- className: cn("hover:text-foreground transition-colors", className),
550
+ className: cn("hover:underline transition-colors", className),
550
551
  ...props
551
552
  }
552
553
  );
@@ -559,7 +560,7 @@ function BreadcrumbPage({ className, ...props }) {
559
560
  role: "link",
560
561
  "aria-disabled": "true",
561
562
  "aria-current": "page",
562
- className: cn("text-foreground font-normal", className),
563
+ className: cn("font-normal", className),
563
564
  ...props
564
565
  }
565
566
  );
@@ -590,7 +591,7 @@ var maxWidthStyles = {
590
591
  "4xl": "max-w-[1536px]",
591
592
  full: "max-w-full"
592
593
  };
593
- var Container = React5__namespace.default.forwardRef(
594
+ var Container = React6__namespace.default.forwardRef(
594
595
  ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
595
596
  const Component = as;
596
597
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -896,7 +897,7 @@ var spacingStyles = {
896
897
  };
897
898
  var predefinedSpacings = ["none", "sm", "md", "lg", "xl", "hero"];
898
899
  var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
899
- var Section = React5__namespace.default.forwardRef(
900
+ var Section = React6__namespace.default.forwardRef(
900
901
  ({
901
902
  id,
902
903
  title,
@@ -957,6 +958,87 @@ var Section = React5__namespace.default.forwardRef(
957
958
  }
958
959
  );
959
960
  Section.displayName = "Section";
961
+ var platformIconMap = {
962
+ instagram: "cib/instagram",
963
+ linkedin: "cib/linkedin",
964
+ google: "cib/google",
965
+ facebook: "cib/facebook",
966
+ tiktok: "cib/tiktok",
967
+ youtube: "cib/youtube",
968
+ yelp: "cib/yelp",
969
+ spotify: "cib/spotify",
970
+ apple: "cib/apple",
971
+ x: "prime/twitter",
972
+ github: "cib/github",
973
+ snapchat: "cib/snapchat",
974
+ discord: "cib/discord",
975
+ dev: "simple-icons/devdotto",
976
+ substack: "simple-icons/substack",
977
+ reddit: "cib/reddit",
978
+ pinterest: "cib/pinterest",
979
+ threads: "simple-icons/threads",
980
+ twitch: "cib/twitch",
981
+ whatsapp: "cib/whatsapp",
982
+ telegram: "cib/telegram",
983
+ medium: "simple-icons/medium",
984
+ patreon: "cib/patreon",
985
+ onlyfans: "simple-icons/onlyfans",
986
+ eventbrite: "cib/eventbrite",
987
+ npmjs: "simple-icons/npm",
988
+ crates: "cib/rust",
989
+ rubygems: "cib/rubygems",
990
+ behance: "cib/behance",
991
+ dribbble: "cib/dribbble",
992
+ unknown: "icon-park-solid/circular-connection"
993
+ };
994
+ var SocialLinkIcon = React6__namespace.forwardRef(
995
+ ({
996
+ platformName,
997
+ label,
998
+ iconSize = 20,
999
+ iconColor,
1000
+ href,
1001
+ iconClassName,
1002
+ className,
1003
+ iconNameOverride,
1004
+ ...pressableProps
1005
+ }, ref) => {
1006
+ const platform = usePlatformFromUrl.usePlatformFromUrl(href);
1007
+ const smartPlatformName = React6__namespace.useMemo(() => {
1008
+ return platform || platformName;
1009
+ }, [platform, platformName]);
1010
+ const iconName = React6__namespace.useMemo(() => {
1011
+ return iconNameOverride || platformIconMap[smartPlatformName];
1012
+ }, [iconNameOverride, smartPlatformName]);
1013
+ const accessibleLabel = React6__namespace.useMemo(() => {
1014
+ return label || platformName;
1015
+ }, [label, platformName]);
1016
+ return /* @__PURE__ */ jsxRuntime.jsx(
1017
+ Pressable,
1018
+ {
1019
+ ref,
1020
+ href,
1021
+ "aria-label": accessibleLabel,
1022
+ className: cn(
1023
+ "inline-flex items-center justify-center transition-colors",
1024
+ className
1025
+ ),
1026
+ ...pressableProps,
1027
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1028
+ DynamicIcon,
1029
+ {
1030
+ name: iconName,
1031
+ size: iconSize,
1032
+ color: iconColor,
1033
+ className: iconClassName,
1034
+ alt: accessibleLabel
1035
+ }
1036
+ )
1037
+ }
1038
+ );
1039
+ }
1040
+ );
1041
+ SocialLinkIcon.displayName = "SocialLinkIcon";
960
1042
  function ArticleChaptersAuthorComponent({
961
1043
  className,
962
1044
  breadcrumbClassName,
@@ -996,10 +1078,10 @@ function ArticleChaptersAuthorComponent({
996
1078
  pattern,
997
1079
  patternOpacity
998
1080
  }) {
999
- const [activeChapter, setActiveChapter] = React5__namespace.useState(
1081
+ const [activeChapter, setActiveChapter] = React6__namespace.useState(
1000
1082
  chapters?.[0]?.id || ""
1001
1083
  );
1002
- React5__namespace.useEffect(() => {
1084
+ React6__namespace.useEffect(() => {
1003
1085
  if (!enableChapterTracking || !chapters || chapters.length === 0) return;
1004
1086
  const observer = new IntersectionObserver(
1005
1087
  (entries) => {
@@ -1017,12 +1099,12 @@ function ArticleChaptersAuthorComponent({
1017
1099
  });
1018
1100
  return () => observer.disconnect();
1019
1101
  }, [chapters, enableChapterTracking]);
1020
- const breadcrumbsContent = React5__namespace.useMemo(() => {
1102
+ const breadcrumbsContent = React6__namespace.useMemo(() => {
1021
1103
  if (breadcrumbsSlot) return breadcrumbsSlot;
1022
1104
  if (!breadcrumbs || breadcrumbs.length === 0) return null;
1023
1105
  return /* @__PURE__ */ jsxRuntime.jsx(Breadcrumb, { className: cn("mb-8 md:mb-20", breadcrumbClassName), children: /* @__PURE__ */ jsxRuntime.jsxs(BreadcrumbList, { children: [
1024
1106
  /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href: "#", children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/home", size: 16 }) }) }) }),
1025
- breadcrumbs.map((crumb, index) => /* @__PURE__ */ jsxRuntime.jsxs(React5__namespace.Fragment, { children: [
1107
+ breadcrumbs.map((crumb, index) => /* @__PURE__ */ jsxRuntime.jsxs(React6__namespace.Fragment, { children: [
1026
1108
  /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbSeparator, {}),
1027
1109
  /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href: crumb.href, children: crumb.label }) }) })
1028
1110
  ] }, index)),
@@ -1030,7 +1112,7 @@ function ArticleChaptersAuthorComponent({
1030
1112
  /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbPage, { children: typeof currentPage === "string" ? currentPage : currentPage }) })
1031
1113
  ] }) });
1032
1114
  }, [breadcrumbsSlot, breadcrumbs, currentPage, breadcrumbClassName]);
1033
- const chaptersNavContent = React5__namespace.useMemo(() => {
1115
+ const chaptersNavContent = React6__namespace.useMemo(() => {
1034
1116
  if (chaptersSlot) return chaptersSlot;
1035
1117
  if (!chapters || chapters.length === 0) return null;
1036
1118
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("rounded-lg border p-4", chaptersClassName), children: [
@@ -1038,7 +1120,7 @@ function ArticleChaptersAuthorComponent({
1038
1120
  /* @__PURE__ */ jsxRuntime.jsx("nav", { className: "space-y-2", children: chapters.map((chapter) => {
1039
1121
  const isActive = activeChapter === chapter.id;
1040
1122
  if (renderChapterLink) {
1041
- return /* @__PURE__ */ jsxRuntime.jsx(React5__namespace.Fragment, { children: renderChapterLink(chapter, isActive) }, chapter.id);
1123
+ return /* @__PURE__ */ jsxRuntime.jsx(React6__namespace.Fragment, { children: renderChapterLink(chapter, isActive) }, chapter.id);
1042
1124
  }
1043
1125
  return /* @__PURE__ */ jsxRuntime.jsxs(
1044
1126
  Pressable,
@@ -1072,26 +1154,14 @@ function ArticleChaptersAuthorComponent({
1072
1154
  renderChapterLink,
1073
1155
  chaptersClassName
1074
1156
  ]);
1075
- const authorCardContent = React5__namespace.useMemo(() => {
1157
+ const authorCardContent = React6__namespace.useMemo(() => {
1076
1158
  if (authorSlot) return authorSlot;
1077
1159
  if (!author) return null;
1078
1160
  let socialLinksContent = null;
1079
1161
  if (author.socialLinks) {
1080
1162
  if (Array.isArray(author.socialLinks)) {
1081
1163
  if (author.socialLinks.length > 0) {
1082
- socialLinksContent = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 flex gap-2", children: author.socialLinks.map((link, index) => /* @__PURE__ */ jsxRuntime.jsx(
1083
- Pressable,
1084
- {
1085
- href: link.href,
1086
- className: cn(
1087
- "flex h-8 w-8 items-center justify-center rounded-md border",
1088
- link.className
1089
- ),
1090
- "aria-label": link["aria-label"],
1091
- children: link.icon ?? /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: `lucide/${link.platform}`, size: 14 })
1092
- },
1093
- index
1094
- )) });
1164
+ socialLinksContent = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 flex gap-2", children: author.socialLinks.map((link, index) => /* @__PURE__ */ jsxRuntime.jsx(SocialLinkIcon, { href: link.href }, index)) });
1095
1165
  }
1096
1166
  } else {
1097
1167
  const links = author.socialLinks;
@@ -1133,7 +1203,7 @@ function ArticleChaptersAuthorComponent({
1133
1203
  socialLinksContent
1134
1204
  ] });
1135
1205
  }, [authorSlot, author, authorClassName]);
1136
- const heroMediaContent = React5__namespace.useMemo(() => {
1206
+ const heroMediaContent = React6__namespace.useMemo(() => {
1137
1207
  if (heroMediaSlot) return heroMediaSlot;
1138
1208
  if (!heroImageSrc) return null;
1139
1209
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -1155,7 +1225,7 @@ function ArticleChaptersAuthorComponent({
1155
1225
  heroImageClassName,
1156
1226
  optixFlowConfig
1157
1227
  ]);
1158
- const conclusionContent = React5__namespace.useMemo(() => {
1228
+ const conclusionContent = React6__namespace.useMemo(() => {
1159
1229
  if (conclusionSlot) return conclusionSlot;
1160
1230
  if (!conclusionTitle && !conclusionDescription && (!conclusionActions || conclusionActions.length === 0))
1161
1231
  return null;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import * as React5 from 'react';
3
- import React5__default from 'react';
2
+ import * as React6 from 'react';
3
+ import React6__default from 'react';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
6
6
  import { Img } from '@page-speed/img';
@@ -9,6 +9,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
9
  import { Icon } from '@page-speed/icon';
10
10
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
11
11
  import { Slot } from '@radix-ui/react-slot';
12
+ import { usePlatformFromUrl } from '@opensite/hooks/usePlatformFromUrl';
12
13
 
13
14
  // components/blocks/article/article-chapters-author.tsx
14
15
  function cn(...inputs) {
@@ -96,7 +97,7 @@ function useNavigation({
96
97
  href,
97
98
  onClick
98
99
  } = {}) {
99
- const linkType = React5.useMemo(() => {
100
+ const linkType = React6.useMemo(() => {
100
101
  if (!href || href.trim() === "") {
101
102
  return onClick ? "none" : "none";
102
103
  }
@@ -117,7 +118,7 @@ function useNavigation({
117
118
  return "internal";
118
119
  }
119
120
  }, [href, onClick]);
120
- const normalizedHref = React5.useMemo(() => {
121
+ const normalizedHref = React6.useMemo(() => {
121
122
  if (!href || href.trim() === "") {
122
123
  return void 0;
123
124
  }
@@ -135,7 +136,7 @@ function useNavigation({
135
136
  return trimmed;
136
137
  }
137
138
  }, [href, linkType]);
138
- const target = React5.useMemo(() => {
139
+ const target = React6.useMemo(() => {
139
140
  switch (linkType) {
140
141
  case "external":
141
142
  return "_blank";
@@ -148,7 +149,7 @@ function useNavigation({
148
149
  return void 0;
149
150
  }
150
151
  }, [linkType]);
151
- const rel = React5.useMemo(() => {
152
+ const rel = React6.useMemo(() => {
152
153
  if (linkType === "external") {
153
154
  return "noopener noreferrer";
154
155
  }
@@ -157,7 +158,7 @@ function useNavigation({
157
158
  const isExternal = linkType === "external";
158
159
  const isInternal = linkType === "internal";
159
160
  const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
160
- const handleClick = React5.useCallback(
161
+ const handleClick = React6.useCallback(
161
162
  (event) => {
162
163
  if (onClick) {
163
164
  try {
@@ -341,7 +342,7 @@ var buttonVariants = cva(baseStyles, {
341
342
  size: "default"
342
343
  }
343
344
  });
344
- var Pressable = React5.forwardRef(
345
+ var Pressable = React6.forwardRef(
345
346
  ({
346
347
  children,
347
348
  className,
@@ -497,7 +498,7 @@ function BreadcrumbList({ className, ...props }) {
497
498
  {
498
499
  "data-slot": "breadcrumb-list",
499
500
  className: cn(
500
- "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
501
+ "flex flex-wrap items-center gap-1.5 text-sm wrap-break-word sm:gap-2.5",
501
502
  className
502
503
  ),
503
504
  ...props
@@ -524,7 +525,7 @@ function BreadcrumbLink({
524
525
  Comp,
525
526
  {
526
527
  "data-slot": "breadcrumb-link",
527
- className: cn("hover:text-foreground transition-colors", className),
528
+ className: cn("hover:underline transition-colors", className),
528
529
  ...props
529
530
  }
530
531
  );
@@ -537,7 +538,7 @@ function BreadcrumbPage({ className, ...props }) {
537
538
  role: "link",
538
539
  "aria-disabled": "true",
539
540
  "aria-current": "page",
540
- className: cn("text-foreground font-normal", className),
541
+ className: cn("font-normal", className),
541
542
  ...props
542
543
  }
543
544
  );
@@ -568,7 +569,7 @@ var maxWidthStyles = {
568
569
  "4xl": "max-w-[1536px]",
569
570
  full: "max-w-full"
570
571
  };
571
- var Container = React5__default.forwardRef(
572
+ var Container = React6__default.forwardRef(
572
573
  ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
573
574
  const Component = as;
574
575
  return /* @__PURE__ */ jsx(
@@ -874,7 +875,7 @@ var spacingStyles = {
874
875
  };
875
876
  var predefinedSpacings = ["none", "sm", "md", "lg", "xl", "hero"];
876
877
  var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
877
- var Section = React5__default.forwardRef(
878
+ var Section = React6__default.forwardRef(
878
879
  ({
879
880
  id,
880
881
  title,
@@ -935,6 +936,87 @@ var Section = React5__default.forwardRef(
935
936
  }
936
937
  );
937
938
  Section.displayName = "Section";
939
+ var platformIconMap = {
940
+ instagram: "cib/instagram",
941
+ linkedin: "cib/linkedin",
942
+ google: "cib/google",
943
+ facebook: "cib/facebook",
944
+ tiktok: "cib/tiktok",
945
+ youtube: "cib/youtube",
946
+ yelp: "cib/yelp",
947
+ spotify: "cib/spotify",
948
+ apple: "cib/apple",
949
+ x: "prime/twitter",
950
+ github: "cib/github",
951
+ snapchat: "cib/snapchat",
952
+ discord: "cib/discord",
953
+ dev: "simple-icons/devdotto",
954
+ substack: "simple-icons/substack",
955
+ reddit: "cib/reddit",
956
+ pinterest: "cib/pinterest",
957
+ threads: "simple-icons/threads",
958
+ twitch: "cib/twitch",
959
+ whatsapp: "cib/whatsapp",
960
+ telegram: "cib/telegram",
961
+ medium: "simple-icons/medium",
962
+ patreon: "cib/patreon",
963
+ onlyfans: "simple-icons/onlyfans",
964
+ eventbrite: "cib/eventbrite",
965
+ npmjs: "simple-icons/npm",
966
+ crates: "cib/rust",
967
+ rubygems: "cib/rubygems",
968
+ behance: "cib/behance",
969
+ dribbble: "cib/dribbble",
970
+ unknown: "icon-park-solid/circular-connection"
971
+ };
972
+ var SocialLinkIcon = React6.forwardRef(
973
+ ({
974
+ platformName,
975
+ label,
976
+ iconSize = 20,
977
+ iconColor,
978
+ href,
979
+ iconClassName,
980
+ className,
981
+ iconNameOverride,
982
+ ...pressableProps
983
+ }, ref) => {
984
+ const platform = usePlatformFromUrl(href);
985
+ const smartPlatformName = React6.useMemo(() => {
986
+ return platform || platformName;
987
+ }, [platform, platformName]);
988
+ const iconName = React6.useMemo(() => {
989
+ return iconNameOverride || platformIconMap[smartPlatformName];
990
+ }, [iconNameOverride, smartPlatformName]);
991
+ const accessibleLabel = React6.useMemo(() => {
992
+ return label || platformName;
993
+ }, [label, platformName]);
994
+ return /* @__PURE__ */ jsx(
995
+ Pressable,
996
+ {
997
+ ref,
998
+ href,
999
+ "aria-label": accessibleLabel,
1000
+ className: cn(
1001
+ "inline-flex items-center justify-center transition-colors",
1002
+ className
1003
+ ),
1004
+ ...pressableProps,
1005
+ children: /* @__PURE__ */ jsx(
1006
+ DynamicIcon,
1007
+ {
1008
+ name: iconName,
1009
+ size: iconSize,
1010
+ color: iconColor,
1011
+ className: iconClassName,
1012
+ alt: accessibleLabel
1013
+ }
1014
+ )
1015
+ }
1016
+ );
1017
+ }
1018
+ );
1019
+ SocialLinkIcon.displayName = "SocialLinkIcon";
938
1020
  function ArticleChaptersAuthorComponent({
939
1021
  className,
940
1022
  breadcrumbClassName,
@@ -974,10 +1056,10 @@ function ArticleChaptersAuthorComponent({
974
1056
  pattern,
975
1057
  patternOpacity
976
1058
  }) {
977
- const [activeChapter, setActiveChapter] = React5.useState(
1059
+ const [activeChapter, setActiveChapter] = React6.useState(
978
1060
  chapters?.[0]?.id || ""
979
1061
  );
980
- React5.useEffect(() => {
1062
+ React6.useEffect(() => {
981
1063
  if (!enableChapterTracking || !chapters || chapters.length === 0) return;
982
1064
  const observer = new IntersectionObserver(
983
1065
  (entries) => {
@@ -995,12 +1077,12 @@ function ArticleChaptersAuthorComponent({
995
1077
  });
996
1078
  return () => observer.disconnect();
997
1079
  }, [chapters, enableChapterTracking]);
998
- const breadcrumbsContent = React5.useMemo(() => {
1080
+ const breadcrumbsContent = React6.useMemo(() => {
999
1081
  if (breadcrumbsSlot) return breadcrumbsSlot;
1000
1082
  if (!breadcrumbs || breadcrumbs.length === 0) return null;
1001
1083
  return /* @__PURE__ */ jsx(Breadcrumb, { className: cn("mb-8 md:mb-20", breadcrumbClassName), children: /* @__PURE__ */ jsxs(BreadcrumbList, { children: [
1002
1084
  /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsx(Pressable, { href: "#", children: /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/home", size: 16 }) }) }) }),
1003
- breadcrumbs.map((crumb, index) => /* @__PURE__ */ jsxs(React5.Fragment, { children: [
1085
+ breadcrumbs.map((crumb, index) => /* @__PURE__ */ jsxs(React6.Fragment, { children: [
1004
1086
  /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
1005
1087
  /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsx(Pressable, { href: crumb.href, children: crumb.label }) }) })
1006
1088
  ] }, index)),
@@ -1008,7 +1090,7 @@ function ArticleChaptersAuthorComponent({
1008
1090
  /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, { children: typeof currentPage === "string" ? currentPage : currentPage }) })
1009
1091
  ] }) });
1010
1092
  }, [breadcrumbsSlot, breadcrumbs, currentPage, breadcrumbClassName]);
1011
- const chaptersNavContent = React5.useMemo(() => {
1093
+ const chaptersNavContent = React6.useMemo(() => {
1012
1094
  if (chaptersSlot) return chaptersSlot;
1013
1095
  if (!chapters || chapters.length === 0) return null;
1014
1096
  return /* @__PURE__ */ jsxs("div", { className: cn("rounded-lg border p-4", chaptersClassName), children: [
@@ -1016,7 +1098,7 @@ function ArticleChaptersAuthorComponent({
1016
1098
  /* @__PURE__ */ jsx("nav", { className: "space-y-2", children: chapters.map((chapter) => {
1017
1099
  const isActive = activeChapter === chapter.id;
1018
1100
  if (renderChapterLink) {
1019
- return /* @__PURE__ */ jsx(React5.Fragment, { children: renderChapterLink(chapter, isActive) }, chapter.id);
1101
+ return /* @__PURE__ */ jsx(React6.Fragment, { children: renderChapterLink(chapter, isActive) }, chapter.id);
1020
1102
  }
1021
1103
  return /* @__PURE__ */ jsxs(
1022
1104
  Pressable,
@@ -1050,26 +1132,14 @@ function ArticleChaptersAuthorComponent({
1050
1132
  renderChapterLink,
1051
1133
  chaptersClassName
1052
1134
  ]);
1053
- const authorCardContent = React5.useMemo(() => {
1135
+ const authorCardContent = React6.useMemo(() => {
1054
1136
  if (authorSlot) return authorSlot;
1055
1137
  if (!author) return null;
1056
1138
  let socialLinksContent = null;
1057
1139
  if (author.socialLinks) {
1058
1140
  if (Array.isArray(author.socialLinks)) {
1059
1141
  if (author.socialLinks.length > 0) {
1060
- socialLinksContent = /* @__PURE__ */ jsx("div", { className: "mt-4 flex gap-2", children: author.socialLinks.map((link, index) => /* @__PURE__ */ jsx(
1061
- Pressable,
1062
- {
1063
- href: link.href,
1064
- className: cn(
1065
- "flex h-8 w-8 items-center justify-center rounded-md border",
1066
- link.className
1067
- ),
1068
- "aria-label": link["aria-label"],
1069
- children: link.icon ?? /* @__PURE__ */ jsx(DynamicIcon, { name: `lucide/${link.platform}`, size: 14 })
1070
- },
1071
- index
1072
- )) });
1142
+ socialLinksContent = /* @__PURE__ */ jsx("div", { className: "mt-4 flex gap-2", children: author.socialLinks.map((link, index) => /* @__PURE__ */ jsx(SocialLinkIcon, { href: link.href }, index)) });
1073
1143
  }
1074
1144
  } else {
1075
1145
  const links = author.socialLinks;
@@ -1111,7 +1181,7 @@ function ArticleChaptersAuthorComponent({
1111
1181
  socialLinksContent
1112
1182
  ] });
1113
1183
  }, [authorSlot, author, authorClassName]);
1114
- const heroMediaContent = React5.useMemo(() => {
1184
+ const heroMediaContent = React6.useMemo(() => {
1115
1185
  if (heroMediaSlot) return heroMediaSlot;
1116
1186
  if (!heroImageSrc) return null;
1117
1187
  return /* @__PURE__ */ jsx(
@@ -1133,7 +1203,7 @@ function ArticleChaptersAuthorComponent({
1133
1203
  heroImageClassName,
1134
1204
  optixFlowConfig
1135
1205
  ]);
1136
- const conclusionContent = React5.useMemo(() => {
1206
+ const conclusionContent = React6.useMemo(() => {
1137
1207
  if (conclusionSlot) return conclusionSlot;
1138
1208
  if (!conclusionTitle && !conclusionDescription && (!conclusionActions || conclusionActions.length === 0))
1139
1209
  return null;