@opensite/ui 2.6.6 → 2.6.8

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 (35) hide show
  1. package/dist/article-breadcrumb-social.cjs +10 -31
  2. package/dist/article-breadcrumb-social.d.cts +5 -1
  3. package/dist/article-breadcrumb-social.d.ts +5 -1
  4. package/dist/article-breadcrumb-social.js +10 -30
  5. package/dist/article-chapters-author.cjs +112 -74
  6. package/dist/article-chapters-author.d.cts +5 -1
  7. package/dist/article-chapters-author.d.ts +5 -1
  8. package/dist/article-chapters-author.js +112 -74
  9. package/dist/article-compact-toc.cjs +25 -51
  10. package/dist/article-compact-toc.d.cts +5 -1
  11. package/dist/article-compact-toc.d.ts +5 -1
  12. package/dist/article-compact-toc.js +25 -51
  13. package/dist/article-sidebar-sticky.cjs +2 -2
  14. package/dist/article-sidebar-sticky.js +2 -2
  15. package/dist/article-split-animated.cjs +10 -29
  16. package/dist/article-split-animated.d.cts +1 -11
  17. package/dist/article-split-animated.d.ts +1 -11
  18. package/dist/article-split-animated.js +10 -29
  19. package/dist/blog-filtered-results.cjs +2 -2
  20. package/dist/blog-filtered-results.js +2 -2
  21. package/dist/carousel-portfolio-hero.cjs +1 -1
  22. package/dist/carousel-portfolio-hero.js +1 -1
  23. package/dist/case-study-stats-metrics.cjs +3 -3
  24. package/dist/case-study-stats-metrics.js +3 -3
  25. package/dist/case-study-toc-social-sidebar.cjs +3 -3
  26. package/dist/case-study-toc-social-sidebar.js +3 -3
  27. package/dist/hero-event-registration.cjs +1 -1
  28. package/dist/hero-event-registration.js +1 -1
  29. package/dist/registry.cjs +54 -112
  30. package/dist/registry.js +54 -112
  31. package/dist/resource-detail-document-sidebar.cjs +3 -3
  32. package/dist/resource-detail-document-sidebar.js +3 -3
  33. package/dist/resource-list-hero-filter.cjs +2 -2
  34. package/dist/resource-list-hero-filter.js +2 -2
  35. package/package.json +1 -1
@@ -174,7 +174,11 @@ interface ArticleChaptersAuthorProps {
174
174
  * Pattern opacity (0-1)
175
175
  */
176
176
  patternOpacity?: number;
177
+ /**
178
+ * Additional CSS classes for the pattern overlay
179
+ */
180
+ patternClassName?: string;
177
181
  }
178
- declare function ArticleChaptersAuthorComponent({ className, breadcrumbClassName, headerClassName, titleClassName, subtitleClassName, sidebarClassName, articleClassName, chaptersClassName, authorClassName, conclusionClassName, heroImageClassName, breadcrumbs, breadcrumbsSlot, currentPage, title, subtitle, chapters, chaptersSlot, renderChapterLink, author, authorSlot, heroImageSrc, heroImageAlt, heroMediaSlot, conclusionTitle, conclusionDescription, conclusionActions, conclusionSlot, children, enableChapterTracking, optixFlowConfig, background, containerClassName, spacing, pattern, patternOpacity, }: ArticleChaptersAuthorProps): react_jsx_runtime.JSX.Element;
182
+ declare function ArticleChaptersAuthorComponent({ className, breadcrumbClassName, headerClassName, titleClassName, subtitleClassName, sidebarClassName, articleClassName, chaptersClassName, authorClassName, conclusionClassName, heroImageClassName, breadcrumbs, breadcrumbsSlot, currentPage, title, subtitle, chapters, chaptersSlot, renderChapterLink, author, authorSlot, heroImageSrc, heroImageAlt, heroMediaSlot, conclusionTitle, conclusionDescription, conclusionActions, conclusionSlot, children, enableChapterTracking, optixFlowConfig, background, containerClassName, spacing, patternClassName, pattern, patternOpacity, }: ArticleChaptersAuthorProps): react_jsx_runtime.JSX.Element;
179
183
 
180
184
  export { type ArticleAuthor, type ArticleChapter, ArticleChaptersAuthorComponent as ArticleChaptersAuthor, type ArticleChaptersAuthorProps };
@@ -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,41 +9,12 @@ 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) {
15
16
  return twMerge(clsx(inputs));
16
17
  }
17
- function getNestedCardBg(parentBg, variant = "muted", options) {
18
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
19
- if (isDark) {
20
- switch (variant) {
21
- case "muted":
22
- return "bg-background";
23
- case "card":
24
- return "bg-card";
25
- case "accent":
26
- return "bg-accent";
27
- case "subtle":
28
- return "bg-background/50";
29
- }
30
- } else {
31
- switch (variant) {
32
- case "muted":
33
- return "bg-muted";
34
- case "card":
35
- return "bg-card";
36
- case "accent":
37
- return "bg-accent";
38
- case "subtle":
39
- return "bg-muted/50";
40
- }
41
- }
42
- }
43
- function getNestedCardTextColor(parentBg, options) {
44
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
45
- return isDark ? "text-foreground" : "";
46
- }
47
18
  function isDarkBackground(bg) {
48
19
  return bg === "dark" || bg === "gradient" || bg === "primary" || bg === "secondary";
49
20
  }
@@ -126,7 +97,7 @@ function useNavigation({
126
97
  href,
127
98
  onClick
128
99
  } = {}) {
129
- const linkType = React5.useMemo(() => {
100
+ const linkType = React6.useMemo(() => {
130
101
  if (!href || href.trim() === "") {
131
102
  return onClick ? "none" : "none";
132
103
  }
@@ -147,7 +118,7 @@ function useNavigation({
147
118
  return "internal";
148
119
  }
149
120
  }, [href, onClick]);
150
- const normalizedHref = React5.useMemo(() => {
121
+ const normalizedHref = React6.useMemo(() => {
151
122
  if (!href || href.trim() === "") {
152
123
  return void 0;
153
124
  }
@@ -165,7 +136,7 @@ function useNavigation({
165
136
  return trimmed;
166
137
  }
167
138
  }, [href, linkType]);
168
- const target = React5.useMemo(() => {
139
+ const target = React6.useMemo(() => {
169
140
  switch (linkType) {
170
141
  case "external":
171
142
  return "_blank";
@@ -178,7 +149,7 @@ function useNavigation({
178
149
  return void 0;
179
150
  }
180
151
  }, [linkType]);
181
- const rel = React5.useMemo(() => {
152
+ const rel = React6.useMemo(() => {
182
153
  if (linkType === "external") {
183
154
  return "noopener noreferrer";
184
155
  }
@@ -187,7 +158,7 @@ function useNavigation({
187
158
  const isExternal = linkType === "external";
188
159
  const isInternal = linkType === "internal";
189
160
  const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
190
- const handleClick = React5.useCallback(
161
+ const handleClick = React6.useCallback(
191
162
  (event) => {
192
163
  if (onClick) {
193
164
  try {
@@ -371,7 +342,7 @@ var buttonVariants = cva(baseStyles, {
371
342
  size: "default"
372
343
  }
373
344
  });
374
- var Pressable = React5.forwardRef(
345
+ var Pressable = React6.forwardRef(
375
346
  ({
376
347
  children,
377
348
  className,
@@ -527,7 +498,7 @@ function BreadcrumbList({ className, ...props }) {
527
498
  {
528
499
  "data-slot": "breadcrumb-list",
529
500
  className: cn(
530
- "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",
531
502
  className
532
503
  ),
533
504
  ...props
@@ -554,7 +525,7 @@ function BreadcrumbLink({
554
525
  Comp,
555
526
  {
556
527
  "data-slot": "breadcrumb-link",
557
- className: cn("hover:text-foreground transition-colors", className),
528
+ className: cn("hover:underline transition-colors", className),
558
529
  ...props
559
530
  }
560
531
  );
@@ -567,7 +538,7 @@ function BreadcrumbPage({ className, ...props }) {
567
538
  role: "link",
568
539
  "aria-disabled": "true",
569
540
  "aria-current": "page",
570
- className: cn("text-foreground font-normal", className),
541
+ className: cn("font-normal", className),
571
542
  ...props
572
543
  }
573
544
  );
@@ -598,7 +569,7 @@ var maxWidthStyles = {
598
569
  "4xl": "max-w-[1536px]",
599
570
  full: "max-w-full"
600
571
  };
601
- var Container = React5__default.forwardRef(
572
+ var Container = React6__default.forwardRef(
602
573
  ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
603
574
  const Component = as;
604
575
  return /* @__PURE__ */ jsx(
@@ -904,7 +875,7 @@ var spacingStyles = {
904
875
  };
905
876
  var predefinedSpacings = ["none", "sm", "md", "lg", "xl", "hero"];
906
877
  var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
907
- var Section = React5__default.forwardRef(
878
+ var Section = React6__default.forwardRef(
908
879
  ({
909
880
  id,
910
881
  title,
@@ -965,6 +936,87 @@ var Section = React5__default.forwardRef(
965
936
  }
966
937
  );
967
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";
968
1020
  function ArticleChaptersAuthorComponent({
969
1021
  className,
970
1022
  breadcrumbClassName,
@@ -1000,13 +1052,14 @@ function ArticleChaptersAuthorComponent({
1000
1052
  background,
1001
1053
  containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
1002
1054
  spacing = "hero",
1055
+ patternClassName,
1003
1056
  pattern,
1004
1057
  patternOpacity
1005
1058
  }) {
1006
- const [activeChapter, setActiveChapter] = React5.useState(
1059
+ const [activeChapter, setActiveChapter] = React6.useState(
1007
1060
  chapters?.[0]?.id || ""
1008
1061
  );
1009
- React5.useEffect(() => {
1062
+ React6.useEffect(() => {
1010
1063
  if (!enableChapterTracking || !chapters || chapters.length === 0) return;
1011
1064
  const observer = new IntersectionObserver(
1012
1065
  (entries) => {
@@ -1024,12 +1077,12 @@ function ArticleChaptersAuthorComponent({
1024
1077
  });
1025
1078
  return () => observer.disconnect();
1026
1079
  }, [chapters, enableChapterTracking]);
1027
- const breadcrumbsContent = React5.useMemo(() => {
1080
+ const breadcrumbsContent = React6.useMemo(() => {
1028
1081
  if (breadcrumbsSlot) return breadcrumbsSlot;
1029
1082
  if (!breadcrumbs || breadcrumbs.length === 0) return null;
1030
1083
  return /* @__PURE__ */ jsx(Breadcrumb, { className: cn("mb-8 md:mb-20", breadcrumbClassName), children: /* @__PURE__ */ jsxs(BreadcrumbList, { children: [
1031
1084
  /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsx(Pressable, { href: "#", children: /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/home", size: 16 }) }) }) }),
1032
- breadcrumbs.map((crumb, index) => /* @__PURE__ */ jsxs(React5.Fragment, { children: [
1085
+ breadcrumbs.map((crumb, index) => /* @__PURE__ */ jsxs(React6.Fragment, { children: [
1033
1086
  /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
1034
1087
  /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsx(Pressable, { href: crumb.href, children: crumb.label }) }) })
1035
1088
  ] }, index)),
@@ -1037,7 +1090,7 @@ function ArticleChaptersAuthorComponent({
1037
1090
  /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, { children: typeof currentPage === "string" ? currentPage : currentPage }) })
1038
1091
  ] }) });
1039
1092
  }, [breadcrumbsSlot, breadcrumbs, currentPage, breadcrumbClassName]);
1040
- const chaptersNavContent = React5.useMemo(() => {
1093
+ const chaptersNavContent = React6.useMemo(() => {
1041
1094
  if (chaptersSlot) return chaptersSlot;
1042
1095
  if (!chapters || chapters.length === 0) return null;
1043
1096
  return /* @__PURE__ */ jsxs("div", { className: cn("rounded-lg border p-4", chaptersClassName), children: [
@@ -1045,7 +1098,7 @@ function ArticleChaptersAuthorComponent({
1045
1098
  /* @__PURE__ */ jsx("nav", { className: "space-y-2", children: chapters.map((chapter) => {
1046
1099
  const isActive = activeChapter === chapter.id;
1047
1100
  if (renderChapterLink) {
1048
- return /* @__PURE__ */ jsx(React5.Fragment, { children: renderChapterLink(chapter, isActive) }, chapter.id);
1101
+ return /* @__PURE__ */ jsx(React6.Fragment, { children: renderChapterLink(chapter, isActive) }, chapter.id);
1049
1102
  }
1050
1103
  return /* @__PURE__ */ jsxs(
1051
1104
  Pressable,
@@ -1053,16 +1106,14 @@ function ArticleChaptersAuthorComponent({
1053
1106
  href: `#${chapter.id}`,
1054
1107
  className: cn(
1055
1108
  "flex items-center gap-3 text-sm transition-colors",
1056
- isActive ? "font-medium" : ""
1109
+ isActive ? "underline" : ""
1057
1110
  ),
1058
1111
  children: [
1059
1112
  /* @__PURE__ */ jsx(
1060
1113
  "span",
1061
1114
  {
1062
1115
  className: cn(
1063
- "flex h-6 w-6 items-center justify-center rounded-full text-xs",
1064
- getNestedCardBg(background),
1065
- getNestedCardTextColor(background)
1116
+ "flex h-6 w-6 items-center justify-center rounded-full text-xs"
1066
1117
  ),
1067
1118
  children: chapter.number
1068
1119
  }
@@ -1081,26 +1132,14 @@ function ArticleChaptersAuthorComponent({
1081
1132
  renderChapterLink,
1082
1133
  chaptersClassName
1083
1134
  ]);
1084
- const authorCardContent = React5.useMemo(() => {
1135
+ const authorCardContent = React6.useMemo(() => {
1085
1136
  if (authorSlot) return authorSlot;
1086
1137
  if (!author) return null;
1087
1138
  let socialLinksContent = null;
1088
1139
  if (author.socialLinks) {
1089
1140
  if (Array.isArray(author.socialLinks)) {
1090
1141
  if (author.socialLinks.length > 0) {
1091
- socialLinksContent = /* @__PURE__ */ jsx("div", { className: "mt-4 flex gap-2", children: author.socialLinks.map((link, index) => /* @__PURE__ */ jsx(
1092
- Pressable,
1093
- {
1094
- href: link.href,
1095
- className: cn(
1096
- "flex h-8 w-8 items-center justify-center rounded-md border",
1097
- link.className
1098
- ),
1099
- "aria-label": link["aria-label"],
1100
- children: link.icon ?? /* @__PURE__ */ jsx(DynamicIcon, { name: `lucide/${link.platform}`, size: 14 })
1101
- },
1102
- index
1103
- )) });
1142
+ socialLinksContent = /* @__PURE__ */ jsx("div", { className: "mt-4 flex gap-2", children: author.socialLinks.map((link, index) => /* @__PURE__ */ jsx(SocialLinkIcon, { href: link.href }, index)) });
1104
1143
  }
1105
1144
  } else {
1106
1145
  const links = author.socialLinks;
@@ -1135,14 +1174,14 @@ function ArticleChaptersAuthorComponent({
1135
1174
  ] }),
1136
1175
  /* @__PURE__ */ jsxs("div", { children: [
1137
1176
  /* @__PURE__ */ jsx("p", { className: "font-medium", children: author.name }),
1138
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: author.role })
1177
+ /* @__PURE__ */ jsx("p", { className: "text-xs", children: author.role })
1139
1178
  ] })
1140
1179
  ] }),
1141
- author.bio && /* @__PURE__ */ jsx("p", { className: "mt-3 text-sm text-muted-foreground", children: author.bio }),
1180
+ author.bio && /* @__PURE__ */ jsx("p", { className: "mt-3 text-sm", children: author.bio }),
1142
1181
  socialLinksContent
1143
1182
  ] });
1144
1183
  }, [authorSlot, author, authorClassName]);
1145
- const heroMediaContent = React5.useMemo(() => {
1184
+ const heroMediaContent = React6.useMemo(() => {
1146
1185
  if (heroMediaSlot) return heroMediaSlot;
1147
1186
  if (!heroImageSrc) return null;
1148
1187
  return /* @__PURE__ */ jsx(
@@ -1164,7 +1203,7 @@ function ArticleChaptersAuthorComponent({
1164
1203
  heroImageClassName,
1165
1204
  optixFlowConfig
1166
1205
  ]);
1167
- const conclusionContent = React5.useMemo(() => {
1206
+ const conclusionContent = React6.useMemo(() => {
1168
1207
  if (conclusionSlot) return conclusionSlot;
1169
1208
  if (!conclusionTitle && !conclusionDescription && (!conclusionActions || conclusionActions.length === 0))
1170
1209
  return null;
@@ -1173,8 +1212,6 @@ function ArticleChaptersAuthorComponent({
1173
1212
  {
1174
1213
  className: cn(
1175
1214
  "mt-12 rounded-lg border p-6 not-prose",
1176
- getNestedCardBg(background, "subtle"),
1177
- getNestedCardTextColor(background),
1178
1215
  conclusionClassName
1179
1216
  ),
1180
1217
  children: [
@@ -1221,7 +1258,8 @@ function ArticleChaptersAuthorComponent({
1221
1258
  spacing,
1222
1259
  pattern,
1223
1260
  patternOpacity,
1224
- className,
1261
+ patternClassName,
1262
+ className: cn(pattern && "overflow-visible", className),
1225
1263
  containerClassName,
1226
1264
  children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1227
1265
  breadcrumbsContent,
@@ -476,7 +476,7 @@ function BreadcrumbList({ className, ...props }) {
476
476
  {
477
477
  "data-slot": "breadcrumb-list",
478
478
  className: cn(
479
- "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
479
+ "flex flex-wrap items-center gap-1.5 text-sm wrap-break-word sm:gap-2.5",
480
480
  className
481
481
  ),
482
482
  ...props
@@ -503,7 +503,7 @@ function BreadcrumbLink({
503
503
  Comp,
504
504
  {
505
505
  "data-slot": "breadcrumb-link",
506
- className: cn("hover:text-foreground transition-colors", className),
506
+ className: cn("hover:underline transition-colors", className),
507
507
  ...props
508
508
  }
509
509
  );
@@ -516,7 +516,7 @@ function BreadcrumbPage({ className, ...props }) {
516
516
  role: "link",
517
517
  "aria-disabled": "true",
518
518
  "aria-current": "page",
519
- className: cn("text-foreground font-normal", className),
519
+ className: cn("font-normal", className),
520
520
  ...props
521
521
  }
522
522
  );
@@ -997,7 +997,8 @@ function ArticleCompactTocComponent({
997
997
  containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
998
998
  spacing = "hero",
999
999
  pattern,
1000
- patternOpacity
1000
+ patternOpacity,
1001
+ patternClassName
1001
1002
  }) {
1002
1003
  const [activeSection, setActiveSection] = React5__namespace.useState(
1003
1004
  sections?.[0]?.id || ""
@@ -1034,23 +1035,6 @@ function ArticleCompactTocComponent({
1034
1035
  /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbPage, { children: currentPage }) })
1035
1036
  ] }) });
1036
1037
  }, [breadcrumbsSlot, breadcrumbs, currentPage, breadcrumbClassName]);
1037
- const shareContent = React5__namespace.useMemo(() => {
1038
- if (shareSlot) return shareSlot;
1039
- if (!socialLinks || socialLinks.length === 0) return null;
1040
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mt-6 flex items-center gap-2", shareClassName), children: [
1041
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "Share:" }),
1042
- socialLinks.map((link, index) => /* @__PURE__ */ jsxRuntime.jsx(
1043
- Pressable,
1044
- {
1045
- href: link.href,
1046
- className: "flex h-8 w-8 items-center justify-center rounded-md hover:bg-muted",
1047
- "aria-label": link["aria-label"] || `Share on ${link.platform}`,
1048
- children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: `lucide/${link.platform}`, size: 16 })
1049
- },
1050
- index
1051
- ))
1052
- ] });
1053
- }, [shareSlot, socialLinks, shareClassName]);
1054
1038
  const renderTocLinks = React5__namespace.useCallback(
1055
1039
  (onLinkClick) => {
1056
1040
  if (!sections) return null;
@@ -1065,7 +1049,7 @@ function ArticleCompactTocComponent({
1065
1049
  href: `#${section.id}`,
1066
1050
  className: cn(
1067
1051
  "block text-sm transition-colors",
1068
- isActive ? "font-medium" : "text-muted-foreground hover:text-foreground"
1052
+ isActive ? "underline" : ""
1069
1053
  ),
1070
1054
  onClick: onLinkClick,
1071
1055
  children: section.title
@@ -1109,23 +1093,14 @@ function ArticleCompactTocComponent({
1109
1093
  )
1110
1094
  ] }) });
1111
1095
  }, [tocSlot, sections, isTocOpen, tocClassName, renderTocLinks]);
1096
+ const hasDesktopToc = !tocSlot && sections && sections.length > 0;
1112
1097
  const desktopTocContent = React5__namespace.useMemo(() => {
1113
- if (tocSlot) return null;
1114
- if (!sections || sections.length === 0) return null;
1115
- return /* @__PURE__ */ jsxRuntime.jsx(
1116
- "aside",
1117
- {
1118
- className: cn(
1119
- "hidden lg:block fixed top-24 right-8 w-64 max-h-[calc(100vh-8rem)] overflow-y-auto",
1120
- tocClassName
1121
- ),
1122
- children: /* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "space-y-2 rounded-lg border bg-background p-4", children: [
1123
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-3 block text-sm font-semibold", children: "Table of Contents" }),
1124
- renderTocLinks()
1125
- ] })
1126
- }
1127
- );
1128
- }, [tocSlot, sections, tocClassName, renderTocLinks]);
1098
+ if (!hasDesktopToc) return null;
1099
+ return /* @__PURE__ */ jsxRuntime.jsx("aside", { className: cn("hidden lg:block w-64 shrink-0", tocClassName), children: /* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "sticky top-24 max-h-[calc(100vh-8rem)] overflow-y-auto space-y-2 rounded-lg border p-4", children: [
1100
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-3 block text-sm font-semibold", children: "Table of Contents" }),
1101
+ renderTocLinks()
1102
+ ] }) });
1103
+ }, [hasDesktopToc, tocClassName, renderTocLinks]);
1129
1104
  const heroMediaContent = React5__namespace.useMemo(() => {
1130
1105
  if (heroMediaSlot) return heroMediaSlot;
1131
1106
  if (!heroImageSrc) return null;
@@ -1148,20 +1123,20 @@ function ArticleCompactTocComponent({
1148
1123
  heroImageClassName,
1149
1124
  optixFlowConfig
1150
1125
  ]);
1151
- return /* @__PURE__ */ jsxRuntime.jsxs(
1126
+ return /* @__PURE__ */ jsxRuntime.jsx(
1152
1127
  Section,
1153
1128
  {
1154
1129
  background,
1155
1130
  spacing,
1156
1131
  pattern,
1157
1132
  patternOpacity,
1158
- className: cn("relative", className),
1133
+ patternClassName,
1134
+ className: cn(pattern && "overflow-visible", className),
1159
1135
  containerClassName,
1160
- children: [
1161
- desktopTocContent,
1162
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("container", containerClassName), children: [
1163
- breadcrumbsContent,
1164
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
1136
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
1137
+ breadcrumbsContent,
1138
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", hasDesktopToc && "lg:flex lg:gap-8"), children: [
1139
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(hasDesktopToc && "min-w-0 lg:flex-1"), children: [
1165
1140
  title && (typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
1166
1141
  "h1",
1167
1142
  {
@@ -1176,11 +1151,11 @@ function ArticleCompactTocComponent({
1176
1151
  "div",
1177
1152
  {
1178
1153
  className: cn(
1179
- "mt-4 flex flex-wrap items-center gap-4 text-sm text-muted-foreground",
1154
+ "mt-4 flex flex-wrap items-center gap-4 text-sm",
1180
1155
  metaClassName
1181
1156
  ),
1182
1157
  children: [
1183
- authorName && (authorHref ? /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href: authorHref, className: "hover:underline", children: authorName }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: authorName })),
1158
+ authorName && /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href: authorHref, children: authorName }),
1184
1159
  authorName && publishDate && /* @__PURE__ */ jsxRuntime.jsx(Separator, { orientation: "vertical", className: "h-4" }),
1185
1160
  publishDate && /* @__PURE__ */ jsxRuntime.jsx("span", { children: publishDate }),
1186
1161
  publishDate && readTime && /* @__PURE__ */ jsxRuntime.jsx(Separator, { orientation: "vertical", className: "h-4" }),
@@ -1188,8 +1163,6 @@ function ArticleCompactTocComponent({
1188
1163
  ]
1189
1164
  }
1190
1165
  ),
1191
- shareContent,
1192
- /* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "my-8" }),
1193
1166
  tocContent,
1194
1167
  children && /* @__PURE__ */ jsxRuntime.jsxs(
1195
1168
  "article",
@@ -1204,9 +1177,10 @@ function ArticleCompactTocComponent({
1204
1177
  ]
1205
1178
  }
1206
1179
  )
1207
- ] })
1180
+ ] }),
1181
+ desktopTocContent
1208
1182
  ] })
1209
- ]
1183
+ ] })
1210
1184
  }
1211
1185
  );
1212
1186
  }
@@ -149,7 +149,11 @@ interface ArticleCompactTocProps {
149
149
  * Pattern opacity (0-1)
150
150
  */
151
151
  patternOpacity?: number;
152
+ /**
153
+ * Additional CSS classes for the pattern overlay
154
+ */
155
+ patternClassName?: string;
152
156
  }
153
- declare function ArticleCompactTocComponent({ className, breadcrumbClassName, contentClassName, titleClassName, metaClassName, shareClassName, tocClassName, articleClassName, heroImageClassName, breadcrumbs, breadcrumbsSlot, currentPage, title, authorName, authorHref, publishDate, readTime, sections, tocSlot, renderSectionLink, socialLinks, shareSlot, heroImageSrc, heroImageAlt, heroMediaSlot, children, enableTocTracking, optixFlowConfig, background, containerClassName, spacing, pattern, patternOpacity, }: ArticleCompactTocProps): react_jsx_runtime.JSX.Element;
157
+ declare function ArticleCompactTocComponent({ className, breadcrumbClassName, contentClassName, titleClassName, metaClassName, shareClassName, tocClassName, articleClassName, heroImageClassName, breadcrumbs, breadcrumbsSlot, currentPage, title, authorName, authorHref, publishDate, readTime, sections, tocSlot, renderSectionLink, socialLinks, shareSlot, heroImageSrc, heroImageAlt, heroMediaSlot, children, enableTocTracking, optixFlowConfig, background, containerClassName, spacing, pattern, patternOpacity, patternClassName, }: ArticleCompactTocProps): react_jsx_runtime.JSX.Element;
154
158
 
155
159
  export { ArticleCompactTocComponent as ArticleCompactToc, type ArticleCompactTocProps, type ArticleCompactTocSection };
@@ -149,7 +149,11 @@ interface ArticleCompactTocProps {
149
149
  * Pattern opacity (0-1)
150
150
  */
151
151
  patternOpacity?: number;
152
+ /**
153
+ * Additional CSS classes for the pattern overlay
154
+ */
155
+ patternClassName?: string;
152
156
  }
153
- declare function ArticleCompactTocComponent({ className, breadcrumbClassName, contentClassName, titleClassName, metaClassName, shareClassName, tocClassName, articleClassName, heroImageClassName, breadcrumbs, breadcrumbsSlot, currentPage, title, authorName, authorHref, publishDate, readTime, sections, tocSlot, renderSectionLink, socialLinks, shareSlot, heroImageSrc, heroImageAlt, heroMediaSlot, children, enableTocTracking, optixFlowConfig, background, containerClassName, spacing, pattern, patternOpacity, }: ArticleCompactTocProps): react_jsx_runtime.JSX.Element;
157
+ declare function ArticleCompactTocComponent({ className, breadcrumbClassName, contentClassName, titleClassName, metaClassName, shareClassName, tocClassName, articleClassName, heroImageClassName, breadcrumbs, breadcrumbsSlot, currentPage, title, authorName, authorHref, publishDate, readTime, sections, tocSlot, renderSectionLink, socialLinks, shareSlot, heroImageSrc, heroImageAlt, heroMediaSlot, children, enableTocTracking, optixFlowConfig, background, containerClassName, spacing, pattern, patternOpacity, patternClassName, }: ArticleCompactTocProps): react_jsx_runtime.JSX.Element;
154
158
 
155
159
  export { ArticleCompactTocComponent as ArticleCompactToc, type ArticleCompactTocProps, type ArticleCompactTocSection };