@opensite/ui 2.6.6 → 2.6.7
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/article-breadcrumb-social.cjs +7 -28
- package/dist/article-breadcrumb-social.d.cts +5 -1
- package/dist/article-breadcrumb-social.d.ts +5 -1
- package/dist/article-breadcrumb-social.js +7 -27
- package/dist/article-chapters-author.cjs +7 -39
- package/dist/article-chapters-author.d.cts +5 -1
- package/dist/article-chapters-author.d.ts +5 -1
- package/dist/article-chapters-author.js +7 -39
- package/dist/article-compact-toc.cjs +23 -31
- package/dist/article-compact-toc.d.cts +5 -1
- package/dist/article-compact-toc.d.ts +5 -1
- package/dist/article-compact-toc.js +23 -31
- package/dist/article-hero-prose.cjs +1 -1
- package/dist/article-hero-prose.js +1 -1
- package/dist/article-sidebar-sticky.cjs +2 -2
- package/dist/article-sidebar-sticky.js +2 -2
- package/dist/article-split-animated.cjs +9 -28
- package/dist/article-split-animated.d.cts +1 -11
- package/dist/article-split-animated.d.ts +1 -11
- package/dist/article-split-animated.js +9 -28
- package/dist/carousel-portfolio-hero.cjs +1 -1
- package/dist/carousel-portfolio-hero.js +1 -1
- package/dist/registry.cjs +50 -78
- package/dist/registry.js +50 -78
- package/package.json +1 -1
|
@@ -10,7 +10,6 @@ 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 SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
14
13
|
|
|
15
14
|
function _interopNamespace(e) {
|
|
16
15
|
if (e && e.__esModule) return e;
|
|
@@ -32,7 +31,6 @@ function _interopNamespace(e) {
|
|
|
32
31
|
|
|
33
32
|
var React5__namespace = /*#__PURE__*/_interopNamespace(React5);
|
|
34
33
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
35
|
-
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
36
34
|
|
|
37
35
|
// components/blocks/article/article-breadcrumb-social.tsx
|
|
38
36
|
function cn(...inputs) {
|
|
@@ -583,26 +581,6 @@ function BreadcrumbSeparator({
|
|
|
583
581
|
}
|
|
584
582
|
);
|
|
585
583
|
}
|
|
586
|
-
function Separator({
|
|
587
|
-
className,
|
|
588
|
-
orientation = "horizontal",
|
|
589
|
-
decorative = true,
|
|
590
|
-
...props
|
|
591
|
-
}) {
|
|
592
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
593
|
-
SeparatorPrimitive__namespace.Root,
|
|
594
|
-
{
|
|
595
|
-
"data-slot": "separator",
|
|
596
|
-
decorative,
|
|
597
|
-
orientation,
|
|
598
|
-
className: cn(
|
|
599
|
-
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
600
|
-
className
|
|
601
|
-
),
|
|
602
|
-
...props
|
|
603
|
-
}
|
|
604
|
-
);
|
|
605
|
-
}
|
|
606
584
|
var maxWidthStyles = {
|
|
607
585
|
sm: "max-w-screen-sm",
|
|
608
586
|
md: "max-w-screen-md",
|
|
@@ -1010,7 +988,8 @@ function ArticleBreadcrumbSocialComponent({
|
|
|
1010
988
|
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
1011
989
|
spacing = "hero",
|
|
1012
990
|
pattern,
|
|
1013
|
-
patternOpacity
|
|
991
|
+
patternOpacity,
|
|
992
|
+
patternClassName
|
|
1014
993
|
}) {
|
|
1015
994
|
const [activeSection, setActiveSection] = React5__namespace.useState(
|
|
1016
995
|
sections?.[0]?.id || ""
|
|
@@ -1077,7 +1056,7 @@ function ArticleBreadcrumbSocialComponent({
|
|
|
1077
1056
|
] }),
|
|
1078
1057
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1079
1058
|
author.name && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium", children: author.name }),
|
|
1080
|
-
(author.role || publishDate || readTime) && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm
|
|
1059
|
+
(author.role || publishDate || readTime) && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm", children: [author.role, publishDate, readTime].filter(Boolean).join(" \xB7 ") })
|
|
1081
1060
|
] })
|
|
1082
1061
|
]
|
|
1083
1062
|
}
|
|
@@ -1121,7 +1100,7 @@ function ArticleBreadcrumbSocialComponent({
|
|
|
1121
1100
|
href: `#${section.id}`,
|
|
1122
1101
|
className: cn(
|
|
1123
1102
|
"block text-sm transition-colors",
|
|
1124
|
-
isActive ? "
|
|
1103
|
+
isActive ? "underline" : ""
|
|
1125
1104
|
),
|
|
1126
1105
|
children: section.title
|
|
1127
1106
|
},
|
|
@@ -1137,7 +1116,8 @@ function ArticleBreadcrumbSocialComponent({
|
|
|
1137
1116
|
spacing,
|
|
1138
1117
|
pattern,
|
|
1139
1118
|
patternOpacity,
|
|
1140
|
-
|
|
1119
|
+
patternClassName,
|
|
1120
|
+
className: cn(pattern && "overflow-visible", className),
|
|
1141
1121
|
containerClassName,
|
|
1142
1122
|
children: [
|
|
1143
1123
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
@@ -1162,7 +1142,6 @@ function ArticleBreadcrumbSocialComponent({
|
|
|
1162
1142
|
}
|
|
1163
1143
|
) : title),
|
|
1164
1144
|
authorContent,
|
|
1165
|
-
/* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "my-8" }),
|
|
1166
1145
|
heroMediaContent,
|
|
1167
1146
|
children
|
|
1168
1147
|
]
|
|
@@ -1175,7 +1154,7 @@ function ArticleBreadcrumbSocialComponent({
|
|
|
1175
1154
|
"button",
|
|
1176
1155
|
{
|
|
1177
1156
|
onClick: scrollToTop,
|
|
1178
|
-
className: "fixed bottom-8 right-8 flex h-10 w-10 items-center justify-center rounded-full
|
|
1157
|
+
className: "fixed bottom-8 right-8 flex h-10 w-10 items-center justify-center rounded-full shadow-lg transition-opacity hover:opacity-90",
|
|
1179
1158
|
"aria-label": "Back to top",
|
|
1180
1159
|
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/arrow-up", size: 20 })
|
|
1181
1160
|
}
|
|
@@ -145,7 +145,11 @@ interface ArticleBreadcrumbSocialProps {
|
|
|
145
145
|
* Pattern opacity (0-1)
|
|
146
146
|
*/
|
|
147
147
|
patternOpacity?: number;
|
|
148
|
+
/**
|
|
149
|
+
* Additional CSS classes for the pattern overlay
|
|
150
|
+
*/
|
|
151
|
+
patternClassName?: string;
|
|
148
152
|
}
|
|
149
|
-
declare function ArticleBreadcrumbSocialComponent({ className, breadcrumbClassName, articleClassName, sidebarClassName, titleClassName, authorClassName, heroImageClassName, tocClassName, breadcrumbs, breadcrumbsSlot, currentPage, title, author, authorSlot, publishDate, readTime, sections, tocSlot, renderSectionLink, heroImageSrc, heroImageAlt, heroMediaSlot, children, enableTocTracking, enableBackToTop, optixFlowConfig, background, containerClassName, spacing, pattern, patternOpacity, }: ArticleBreadcrumbSocialProps): react_jsx_runtime.JSX.Element;
|
|
153
|
+
declare function ArticleBreadcrumbSocialComponent({ className, breadcrumbClassName, articleClassName, sidebarClassName, titleClassName, authorClassName, heroImageClassName, tocClassName, breadcrumbs, breadcrumbsSlot, currentPage, title, author, authorSlot, publishDate, readTime, sections, tocSlot, renderSectionLink, heroImageSrc, heroImageAlt, heroMediaSlot, children, enableTocTracking, enableBackToTop, optixFlowConfig, background, containerClassName, spacing, pattern, patternOpacity, patternClassName, }: ArticleBreadcrumbSocialProps): react_jsx_runtime.JSX.Element;
|
|
150
154
|
|
|
151
155
|
export { type ArticleBreadcrumbSection, ArticleBreadcrumbSocialComponent as ArticleBreadcrumbSocial, type ArticleBreadcrumbSocialProps };
|
|
@@ -145,7 +145,11 @@ interface ArticleBreadcrumbSocialProps {
|
|
|
145
145
|
* Pattern opacity (0-1)
|
|
146
146
|
*/
|
|
147
147
|
patternOpacity?: number;
|
|
148
|
+
/**
|
|
149
|
+
* Additional CSS classes for the pattern overlay
|
|
150
|
+
*/
|
|
151
|
+
patternClassName?: string;
|
|
148
152
|
}
|
|
149
|
-
declare function ArticleBreadcrumbSocialComponent({ className, breadcrumbClassName, articleClassName, sidebarClassName, titleClassName, authorClassName, heroImageClassName, tocClassName, breadcrumbs, breadcrumbsSlot, currentPage, title, author, authorSlot, publishDate, readTime, sections, tocSlot, renderSectionLink, heroImageSrc, heroImageAlt, heroMediaSlot, children, enableTocTracking, enableBackToTop, optixFlowConfig, background, containerClassName, spacing, pattern, patternOpacity, }: ArticleBreadcrumbSocialProps): react_jsx_runtime.JSX.Element;
|
|
153
|
+
declare function ArticleBreadcrumbSocialComponent({ className, breadcrumbClassName, articleClassName, sidebarClassName, titleClassName, authorClassName, heroImageClassName, tocClassName, breadcrumbs, breadcrumbsSlot, currentPage, title, author, authorSlot, publishDate, readTime, sections, tocSlot, renderSectionLink, heroImageSrc, heroImageAlt, heroMediaSlot, children, enableTocTracking, enableBackToTop, optixFlowConfig, background, containerClassName, spacing, pattern, patternOpacity, patternClassName, }: ArticleBreadcrumbSocialProps): react_jsx_runtime.JSX.Element;
|
|
150
154
|
|
|
151
155
|
export { type ArticleBreadcrumbSection, ArticleBreadcrumbSocialComponent as ArticleBreadcrumbSocial, type ArticleBreadcrumbSocialProps };
|
|
@@ -9,7 +9,6 @@ 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 * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
13
12
|
|
|
14
13
|
// components/blocks/article/article-breadcrumb-social.tsx
|
|
15
14
|
function cn(...inputs) {
|
|
@@ -560,26 +559,6 @@ function BreadcrumbSeparator({
|
|
|
560
559
|
}
|
|
561
560
|
);
|
|
562
561
|
}
|
|
563
|
-
function Separator({
|
|
564
|
-
className,
|
|
565
|
-
orientation = "horizontal",
|
|
566
|
-
decorative = true,
|
|
567
|
-
...props
|
|
568
|
-
}) {
|
|
569
|
-
return /* @__PURE__ */ jsx(
|
|
570
|
-
SeparatorPrimitive.Root,
|
|
571
|
-
{
|
|
572
|
-
"data-slot": "separator",
|
|
573
|
-
decorative,
|
|
574
|
-
orientation,
|
|
575
|
-
className: cn(
|
|
576
|
-
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
577
|
-
className
|
|
578
|
-
),
|
|
579
|
-
...props
|
|
580
|
-
}
|
|
581
|
-
);
|
|
582
|
-
}
|
|
583
562
|
var maxWidthStyles = {
|
|
584
563
|
sm: "max-w-screen-sm",
|
|
585
564
|
md: "max-w-screen-md",
|
|
@@ -987,7 +966,8 @@ function ArticleBreadcrumbSocialComponent({
|
|
|
987
966
|
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
988
967
|
spacing = "hero",
|
|
989
968
|
pattern,
|
|
990
|
-
patternOpacity
|
|
969
|
+
patternOpacity,
|
|
970
|
+
patternClassName
|
|
991
971
|
}) {
|
|
992
972
|
const [activeSection, setActiveSection] = React5.useState(
|
|
993
973
|
sections?.[0]?.id || ""
|
|
@@ -1054,7 +1034,7 @@ function ArticleBreadcrumbSocialComponent({
|
|
|
1054
1034
|
] }),
|
|
1055
1035
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
1056
1036
|
author.name && /* @__PURE__ */ jsx("p", { className: "font-medium", children: author.name }),
|
|
1057
|
-
(author.role || publishDate || readTime) && /* @__PURE__ */ jsx("p", { className: "text-sm
|
|
1037
|
+
(author.role || publishDate || readTime) && /* @__PURE__ */ jsx("p", { className: "text-sm", children: [author.role, publishDate, readTime].filter(Boolean).join(" \xB7 ") })
|
|
1058
1038
|
] })
|
|
1059
1039
|
]
|
|
1060
1040
|
}
|
|
@@ -1098,7 +1078,7 @@ function ArticleBreadcrumbSocialComponent({
|
|
|
1098
1078
|
href: `#${section.id}`,
|
|
1099
1079
|
className: cn(
|
|
1100
1080
|
"block text-sm transition-colors",
|
|
1101
|
-
isActive ? "
|
|
1081
|
+
isActive ? "underline" : ""
|
|
1102
1082
|
),
|
|
1103
1083
|
children: section.title
|
|
1104
1084
|
},
|
|
@@ -1114,7 +1094,8 @@ function ArticleBreadcrumbSocialComponent({
|
|
|
1114
1094
|
spacing,
|
|
1115
1095
|
pattern,
|
|
1116
1096
|
patternOpacity,
|
|
1117
|
-
|
|
1097
|
+
patternClassName,
|
|
1098
|
+
className: cn(pattern && "overflow-visible", className),
|
|
1118
1099
|
containerClassName,
|
|
1119
1100
|
children: [
|
|
1120
1101
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
@@ -1139,7 +1120,6 @@ function ArticleBreadcrumbSocialComponent({
|
|
|
1139
1120
|
}
|
|
1140
1121
|
) : title),
|
|
1141
1122
|
authorContent,
|
|
1142
|
-
/* @__PURE__ */ jsx(Separator, { className: "my-8" }),
|
|
1143
1123
|
heroMediaContent,
|
|
1144
1124
|
children
|
|
1145
1125
|
]
|
|
@@ -1152,7 +1132,7 @@ function ArticleBreadcrumbSocialComponent({
|
|
|
1152
1132
|
"button",
|
|
1153
1133
|
{
|
|
1154
1134
|
onClick: scrollToTop,
|
|
1155
|
-
className: "fixed bottom-8 right-8 flex h-10 w-10 items-center justify-center rounded-full
|
|
1135
|
+
className: "fixed bottom-8 right-8 flex h-10 w-10 items-center justify-center rounded-full shadow-lg transition-opacity hover:opacity-90",
|
|
1156
1136
|
"aria-label": "Back to top",
|
|
1157
1137
|
children: /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/arrow-up", size: 20 })
|
|
1158
1138
|
}
|
|
@@ -36,36 +36,6 @@ var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive)
|
|
|
36
36
|
function cn(...inputs) {
|
|
37
37
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
38
38
|
}
|
|
39
|
-
function getNestedCardBg(parentBg, variant = "muted", options) {
|
|
40
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
41
|
-
if (isDark) {
|
|
42
|
-
switch (variant) {
|
|
43
|
-
case "muted":
|
|
44
|
-
return "bg-background";
|
|
45
|
-
case "card":
|
|
46
|
-
return "bg-card";
|
|
47
|
-
case "accent":
|
|
48
|
-
return "bg-accent";
|
|
49
|
-
case "subtle":
|
|
50
|
-
return "bg-background/50";
|
|
51
|
-
}
|
|
52
|
-
} else {
|
|
53
|
-
switch (variant) {
|
|
54
|
-
case "muted":
|
|
55
|
-
return "bg-muted";
|
|
56
|
-
case "card":
|
|
57
|
-
return "bg-card";
|
|
58
|
-
case "accent":
|
|
59
|
-
return "bg-accent";
|
|
60
|
-
case "subtle":
|
|
61
|
-
return "bg-muted/50";
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function getNestedCardTextColor(parentBg, options) {
|
|
66
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
67
|
-
return isDark ? "text-foreground" : "";
|
|
68
|
-
}
|
|
69
39
|
function isDarkBackground(bg) {
|
|
70
40
|
return bg === "dark" || bg === "gradient" || bg === "primary" || bg === "secondary";
|
|
71
41
|
}
|
|
@@ -1022,6 +992,7 @@ function ArticleChaptersAuthorComponent({
|
|
|
1022
992
|
background,
|
|
1023
993
|
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
1024
994
|
spacing = "hero",
|
|
995
|
+
patternClassName,
|
|
1025
996
|
pattern,
|
|
1026
997
|
patternOpacity
|
|
1027
998
|
}) {
|
|
@@ -1075,16 +1046,14 @@ function ArticleChaptersAuthorComponent({
|
|
|
1075
1046
|
href: `#${chapter.id}`,
|
|
1076
1047
|
className: cn(
|
|
1077
1048
|
"flex items-center gap-3 text-sm transition-colors",
|
|
1078
|
-
isActive ? "
|
|
1049
|
+
isActive ? "underline" : ""
|
|
1079
1050
|
),
|
|
1080
1051
|
children: [
|
|
1081
1052
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1082
1053
|
"span",
|
|
1083
1054
|
{
|
|
1084
1055
|
className: cn(
|
|
1085
|
-
"flex h-6 w-6 items-center justify-center rounded-full text-xs"
|
|
1086
|
-
getNestedCardBg(background),
|
|
1087
|
-
getNestedCardTextColor(background)
|
|
1056
|
+
"flex h-6 w-6 items-center justify-center rounded-full text-xs"
|
|
1088
1057
|
),
|
|
1089
1058
|
children: chapter.number
|
|
1090
1059
|
}
|
|
@@ -1157,10 +1126,10 @@ function ArticleChaptersAuthorComponent({
|
|
|
1157
1126
|
] }),
|
|
1158
1127
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1159
1128
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium", children: author.name }),
|
|
1160
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs
|
|
1129
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs", children: author.role })
|
|
1161
1130
|
] })
|
|
1162
1131
|
] }),
|
|
1163
|
-
author.bio && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-sm
|
|
1132
|
+
author.bio && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-sm", children: author.bio }),
|
|
1164
1133
|
socialLinksContent
|
|
1165
1134
|
] });
|
|
1166
1135
|
}, [authorSlot, author, authorClassName]);
|
|
@@ -1195,8 +1164,6 @@ function ArticleChaptersAuthorComponent({
|
|
|
1195
1164
|
{
|
|
1196
1165
|
className: cn(
|
|
1197
1166
|
"mt-12 rounded-lg border p-6 not-prose",
|
|
1198
|
-
getNestedCardBg(background, "subtle"),
|
|
1199
|
-
getNestedCardTextColor(background),
|
|
1200
1167
|
conclusionClassName
|
|
1201
1168
|
),
|
|
1202
1169
|
children: [
|
|
@@ -1243,7 +1210,8 @@ function ArticleChaptersAuthorComponent({
|
|
|
1243
1210
|
spacing,
|
|
1244
1211
|
pattern,
|
|
1245
1212
|
patternOpacity,
|
|
1246
|
-
|
|
1213
|
+
patternClassName,
|
|
1214
|
+
className: cn(pattern && "overflow-visible", className),
|
|
1247
1215
|
containerClassName,
|
|
1248
1216
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
1249
1217
|
breadcrumbsContent,
|
|
@@ -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 };
|
|
@@ -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 };
|
|
@@ -14,36 +14,6 @@ import { Slot } from '@radix-ui/react-slot';
|
|
|
14
14
|
function cn(...inputs) {
|
|
15
15
|
return twMerge(clsx(inputs));
|
|
16
16
|
}
|
|
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
17
|
function isDarkBackground(bg) {
|
|
48
18
|
return bg === "dark" || bg === "gradient" || bg === "primary" || bg === "secondary";
|
|
49
19
|
}
|
|
@@ -1000,6 +970,7 @@ function ArticleChaptersAuthorComponent({
|
|
|
1000
970
|
background,
|
|
1001
971
|
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
1002
972
|
spacing = "hero",
|
|
973
|
+
patternClassName,
|
|
1003
974
|
pattern,
|
|
1004
975
|
patternOpacity
|
|
1005
976
|
}) {
|
|
@@ -1053,16 +1024,14 @@ function ArticleChaptersAuthorComponent({
|
|
|
1053
1024
|
href: `#${chapter.id}`,
|
|
1054
1025
|
className: cn(
|
|
1055
1026
|
"flex items-center gap-3 text-sm transition-colors",
|
|
1056
|
-
isActive ? "
|
|
1027
|
+
isActive ? "underline" : ""
|
|
1057
1028
|
),
|
|
1058
1029
|
children: [
|
|
1059
1030
|
/* @__PURE__ */ jsx(
|
|
1060
1031
|
"span",
|
|
1061
1032
|
{
|
|
1062
1033
|
className: cn(
|
|
1063
|
-
"flex h-6 w-6 items-center justify-center rounded-full text-xs"
|
|
1064
|
-
getNestedCardBg(background),
|
|
1065
|
-
getNestedCardTextColor(background)
|
|
1034
|
+
"flex h-6 w-6 items-center justify-center rounded-full text-xs"
|
|
1066
1035
|
),
|
|
1067
1036
|
children: chapter.number
|
|
1068
1037
|
}
|
|
@@ -1135,10 +1104,10 @@ function ArticleChaptersAuthorComponent({
|
|
|
1135
1104
|
] }),
|
|
1136
1105
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
1137
1106
|
/* @__PURE__ */ jsx("p", { className: "font-medium", children: author.name }),
|
|
1138
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs
|
|
1107
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs", children: author.role })
|
|
1139
1108
|
] })
|
|
1140
1109
|
] }),
|
|
1141
|
-
author.bio && /* @__PURE__ */ jsx("p", { className: "mt-3 text-sm
|
|
1110
|
+
author.bio && /* @__PURE__ */ jsx("p", { className: "mt-3 text-sm", children: author.bio }),
|
|
1142
1111
|
socialLinksContent
|
|
1143
1112
|
] });
|
|
1144
1113
|
}, [authorSlot, author, authorClassName]);
|
|
@@ -1173,8 +1142,6 @@ function ArticleChaptersAuthorComponent({
|
|
|
1173
1142
|
{
|
|
1174
1143
|
className: cn(
|
|
1175
1144
|
"mt-12 rounded-lg border p-6 not-prose",
|
|
1176
|
-
getNestedCardBg(background, "subtle"),
|
|
1177
|
-
getNestedCardTextColor(background),
|
|
1178
1145
|
conclusionClassName
|
|
1179
1146
|
),
|
|
1180
1147
|
children: [
|
|
@@ -1221,7 +1188,8 @@ function ArticleChaptersAuthorComponent({
|
|
|
1221
1188
|
spacing,
|
|
1222
1189
|
pattern,
|
|
1223
1190
|
patternOpacity,
|
|
1224
|
-
|
|
1191
|
+
patternClassName,
|
|
1192
|
+
className: cn(pattern && "overflow-visible", className),
|
|
1225
1193
|
containerClassName,
|
|
1226
1194
|
children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
1227
1195
|
breadcrumbsContent,
|
|
@@ -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 || ""
|
|
@@ -1038,7 +1039,7 @@ function ArticleCompactTocComponent({
|
|
|
1038
1039
|
if (shareSlot) return shareSlot;
|
|
1039
1040
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
1040
1041
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mt-6 flex items-center gap-2", shareClassName), children: [
|
|
1041
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm
|
|
1042
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: "Share:" }),
|
|
1042
1043
|
socialLinks.map((link, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1043
1044
|
Pressable,
|
|
1044
1045
|
{
|
|
@@ -1065,7 +1066,7 @@ function ArticleCompactTocComponent({
|
|
|
1065
1066
|
href: `#${section.id}`,
|
|
1066
1067
|
className: cn(
|
|
1067
1068
|
"block text-sm transition-colors",
|
|
1068
|
-
isActive ? "
|
|
1069
|
+
isActive ? "underline" : ""
|
|
1069
1070
|
),
|
|
1070
1071
|
onClick: onLinkClick,
|
|
1071
1072
|
children: section.title
|
|
@@ -1109,23 +1110,14 @@ function ArticleCompactTocComponent({
|
|
|
1109
1110
|
)
|
|
1110
1111
|
] }) });
|
|
1111
1112
|
}, [tocSlot, sections, isTocOpen, tocClassName, renderTocLinks]);
|
|
1113
|
+
const hasDesktopToc = !tocSlot && sections && sections.length > 0;
|
|
1112
1114
|
const desktopTocContent = React5__namespace.useMemo(() => {
|
|
1113
|
-
if (
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
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]);
|
|
1115
|
+
if (!hasDesktopToc) return null;
|
|
1116
|
+
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: [
|
|
1117
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-3 block text-sm font-semibold", children: "Table of Contents" }),
|
|
1118
|
+
renderTocLinks()
|
|
1119
|
+
] }) });
|
|
1120
|
+
}, [hasDesktopToc, tocClassName, renderTocLinks]);
|
|
1129
1121
|
const heroMediaContent = React5__namespace.useMemo(() => {
|
|
1130
1122
|
if (heroMediaSlot) return heroMediaSlot;
|
|
1131
1123
|
if (!heroImageSrc) return null;
|
|
@@ -1148,20 +1140,20 @@ function ArticleCompactTocComponent({
|
|
|
1148
1140
|
heroImageClassName,
|
|
1149
1141
|
optixFlowConfig
|
|
1150
1142
|
]);
|
|
1151
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
1143
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1152
1144
|
Section,
|
|
1153
1145
|
{
|
|
1154
1146
|
background,
|
|
1155
1147
|
spacing,
|
|
1156
1148
|
pattern,
|
|
1157
1149
|
patternOpacity,
|
|
1158
|
-
|
|
1150
|
+
patternClassName,
|
|
1151
|
+
className: cn(pattern && "overflow-visible", className),
|
|
1159
1152
|
containerClassName,
|
|
1160
|
-
children: [
|
|
1161
|
-
|
|
1162
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("
|
|
1163
|
-
|
|
1164
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
1153
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
1154
|
+
breadcrumbsContent,
|
|
1155
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", hasDesktopToc && "lg:flex lg:gap-8"), children: [
|
|
1156
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(hasDesktopToc && "min-w-0 lg:flex-1"), children: [
|
|
1165
1157
|
title && (typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1166
1158
|
"h1",
|
|
1167
1159
|
{
|
|
@@ -1176,11 +1168,11 @@ function ArticleCompactTocComponent({
|
|
|
1176
1168
|
"div",
|
|
1177
1169
|
{
|
|
1178
1170
|
className: cn(
|
|
1179
|
-
"mt-4 flex flex-wrap items-center gap-4 text-sm
|
|
1171
|
+
"mt-4 flex flex-wrap items-center gap-4 text-sm",
|
|
1180
1172
|
metaClassName
|
|
1181
1173
|
),
|
|
1182
1174
|
children: [
|
|
1183
|
-
authorName &&
|
|
1175
|
+
authorName && /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href: authorHref, children: authorName }),
|
|
1184
1176
|
authorName && publishDate && /* @__PURE__ */ jsxRuntime.jsx(Separator, { orientation: "vertical", className: "h-4" }),
|
|
1185
1177
|
publishDate && /* @__PURE__ */ jsxRuntime.jsx("span", { children: publishDate }),
|
|
1186
1178
|
publishDate && readTime && /* @__PURE__ */ jsxRuntime.jsx(Separator, { orientation: "vertical", className: "h-4" }),
|
|
@@ -1189,7 +1181,6 @@ function ArticleCompactTocComponent({
|
|
|
1189
1181
|
}
|
|
1190
1182
|
),
|
|
1191
1183
|
shareContent,
|
|
1192
|
-
/* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "my-8" }),
|
|
1193
1184
|
tocContent,
|
|
1194
1185
|
children && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1195
1186
|
"article",
|
|
@@ -1204,9 +1195,10 @@ function ArticleCompactTocComponent({
|
|
|
1204
1195
|
]
|
|
1205
1196
|
}
|
|
1206
1197
|
)
|
|
1207
|
-
] })
|
|
1198
|
+
] }),
|
|
1199
|
+
desktopTocContent
|
|
1208
1200
|
] })
|
|
1209
|
-
]
|
|
1201
|
+
] })
|
|
1210
1202
|
}
|
|
1211
1203
|
);
|
|
1212
1204
|
}
|
|
@@ -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 };
|