@opensite/ui 0.6.3 → 0.6.5
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/about-startup-team.cjs +2 -2
- package/dist/about-startup-team.js +2 -2
- package/dist/article-breadcrumb-social.cjs +434 -215
- package/dist/article-breadcrumb-social.d.cts +19 -1
- package/dist/article-breadcrumb-social.d.ts +19 -1
- package/dist/article-breadcrumb-social.js +434 -214
- package/dist/article-chapters-author.cjs +422 -204
- package/dist/article-chapters-author.d.cts +19 -1
- package/dist/article-chapters-author.d.ts +19 -1
- package/dist/article-chapters-author.js +422 -203
- package/dist/article-compact-toc.cjs +429 -73
- package/dist/article-compact-toc.d.cts +19 -1
- package/dist/article-compact-toc.d.ts +19 -1
- package/dist/article-compact-toc.js +430 -73
- package/dist/article-hero-prose.cjs +394 -347
- package/dist/article-hero-prose.d.cts +19 -1
- package/dist/article-hero-prose.d.ts +19 -1
- package/dist/article-hero-prose.js +396 -348
- package/dist/article-sidebar-sticky.cjs +398 -152
- package/dist/article-sidebar-sticky.d.cts +19 -1
- package/dist/article-sidebar-sticky.d.ts +19 -1
- package/dist/article-sidebar-sticky.js +400 -153
- package/dist/article-split-animated.cjs +422 -35
- package/dist/article-split-animated.d.cts +19 -1
- package/dist/article-split-animated.d.ts +19 -1
- package/dist/article-split-animated.js +423 -35
- package/dist/article-toc-sidebar.cjs +417 -356
- package/dist/article-toc-sidebar.d.cts +19 -1
- package/dist/article-toc-sidebar.d.ts +19 -1
- package/dist/article-toc-sidebar.js +417 -355
- package/dist/blog-cards-read-time.cjs +66 -27
- package/dist/blog-cards-read-time.js +66 -27
- package/dist/blog-cards-tagline-cta.cjs +64 -14
- package/dist/blog-cards-tagline-cta.js +64 -14
- package/dist/blog-carousel-apple.cjs +1255 -0
- package/dist/blog-carousel-apple.d.cts +113 -0
- package/dist/blog-carousel-apple.d.ts +113 -0
- package/dist/blog-carousel-apple.js +1234 -0
- package/dist/blog-category-overlay.cjs +77 -15
- package/dist/blog-category-overlay.js +77 -15
- package/dist/blog-featured-popular.cjs +72 -14
- package/dist/blog-featured-popular.js +72 -14
- package/dist/blog-filtered-results.cjs +122 -39
- package/dist/blog-filtered-results.js +122 -39
- package/dist/blog-grid-author-cards.cjs +40 -6
- package/dist/blog-grid-author-cards.js +40 -6
- package/dist/blog-grid-nine-posts.cjs +40 -6
- package/dist/blog-grid-nine-posts.js +40 -6
- package/dist/blog-horizontal-cards.cjs +34 -6
- package/dist/blog-horizontal-cards.js +34 -6
- package/dist/blog-horizontal-timeline.cjs +41 -12
- package/dist/blog-horizontal-timeline.js +41 -12
- package/dist/blog-masonry-featured.cjs +96 -52
- package/dist/blog-masonry-featured.js +96 -52
- package/dist/blog-related-articles.cjs +47 -9
- package/dist/blog-related-articles.js +47 -9
- package/dist/blog-tech-insights.cjs +78 -14
- package/dist/blog-tech-insights.js +78 -14
- package/dist/registry.cjs +1036 -687
- package/dist/registry.js +1036 -687
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
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');
|
|
@@ -28,7 +28,7 @@ function _interopNamespace(e) {
|
|
|
28
28
|
return Object.freeze(n);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var React6__namespace = /*#__PURE__*/_interopNamespace(React6);
|
|
32
32
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
33
33
|
|
|
34
34
|
// components/blocks/article/article-chapters-author.tsx
|
|
@@ -110,7 +110,7 @@ function useNavigation({
|
|
|
110
110
|
href,
|
|
111
111
|
onClick
|
|
112
112
|
} = {}) {
|
|
113
|
-
const linkType =
|
|
113
|
+
const linkType = React6__namespace.useMemo(() => {
|
|
114
114
|
if (!href || href.trim() === "") {
|
|
115
115
|
return onClick ? "none" : "none";
|
|
116
116
|
}
|
|
@@ -131,7 +131,7 @@ function useNavigation({
|
|
|
131
131
|
return "internal";
|
|
132
132
|
}
|
|
133
133
|
}, [href, onClick]);
|
|
134
|
-
const normalizedHref =
|
|
134
|
+
const normalizedHref = React6__namespace.useMemo(() => {
|
|
135
135
|
if (!href || href.trim() === "") {
|
|
136
136
|
return void 0;
|
|
137
137
|
}
|
|
@@ -149,7 +149,7 @@ function useNavigation({
|
|
|
149
149
|
return trimmed;
|
|
150
150
|
}
|
|
151
151
|
}, [href, linkType]);
|
|
152
|
-
const target =
|
|
152
|
+
const target = React6__namespace.useMemo(() => {
|
|
153
153
|
switch (linkType) {
|
|
154
154
|
case "external":
|
|
155
155
|
return "_blank";
|
|
@@ -162,7 +162,7 @@ function useNavigation({
|
|
|
162
162
|
return void 0;
|
|
163
163
|
}
|
|
164
164
|
}, [linkType]);
|
|
165
|
-
const rel =
|
|
165
|
+
const rel = React6__namespace.useMemo(() => {
|
|
166
166
|
if (linkType === "external") {
|
|
167
167
|
return "noopener noreferrer";
|
|
168
168
|
}
|
|
@@ -171,7 +171,7 @@ function useNavigation({
|
|
|
171
171
|
const isExternal = linkType === "external";
|
|
172
172
|
const isInternal = linkType === "internal";
|
|
173
173
|
const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
|
|
174
|
-
const handleClick =
|
|
174
|
+
const handleClick = React6__namespace.useCallback(
|
|
175
175
|
(event) => {
|
|
176
176
|
if (onClick) {
|
|
177
177
|
try {
|
|
@@ -355,7 +355,7 @@ var buttonVariants = classVarianceAuthority.cva(baseStyles, {
|
|
|
355
355
|
size: "default"
|
|
356
356
|
}
|
|
357
357
|
});
|
|
358
|
-
var Pressable =
|
|
358
|
+
var Pressable = React6__namespace.forwardRef(
|
|
359
359
|
({
|
|
360
360
|
children,
|
|
361
361
|
className,
|
|
@@ -461,10 +461,10 @@ function DynamicIcon({
|
|
|
461
461
|
className,
|
|
462
462
|
alt
|
|
463
463
|
}) {
|
|
464
|
-
const [svgContent, setSvgContent] =
|
|
465
|
-
const [isLoading, setIsLoading] =
|
|
466
|
-
const [error, setError] =
|
|
467
|
-
const { url, iconName } =
|
|
464
|
+
const [svgContent, setSvgContent] = React6__namespace.useState(null);
|
|
465
|
+
const [isLoading, setIsLoading] = React6__namespace.useState(true);
|
|
466
|
+
const [error, setError] = React6__namespace.useState(null);
|
|
467
|
+
const { url, iconName } = React6__namespace.useMemo(() => {
|
|
468
468
|
const separator = name.includes("/") ? "/" : ":";
|
|
469
469
|
const [prefix, iconName2] = name.split(separator);
|
|
470
470
|
const baseUrl = `https://icons.opensite.ai/api/icon/${prefix}/${iconName2}?format=svg&width=${size}&height=${size}`;
|
|
@@ -473,7 +473,7 @@ function DynamicIcon({
|
|
|
473
473
|
iconName: iconName2
|
|
474
474
|
};
|
|
475
475
|
}, [name, size]);
|
|
476
|
-
|
|
476
|
+
React6__namespace.useEffect(() => {
|
|
477
477
|
let isMounted = true;
|
|
478
478
|
const fetchSvg = async () => {
|
|
479
479
|
const cached = svgCache.get(url);
|
|
@@ -674,175 +674,379 @@ function BreadcrumbSeparator({
|
|
|
674
674
|
}
|
|
675
675
|
);
|
|
676
676
|
}
|
|
677
|
+
var maxWidthStyles = {
|
|
678
|
+
sm: "max-w-screen-sm",
|
|
679
|
+
md: "max-w-screen-md",
|
|
680
|
+
lg: "max-w-screen-lg",
|
|
681
|
+
xl: "max-w-7xl",
|
|
682
|
+
"2xl": "max-w-screen-2xl",
|
|
683
|
+
"4xl": "max-w-[1536px]",
|
|
684
|
+
full: "max-w-full"
|
|
685
|
+
};
|
|
686
|
+
var Container = React6__namespace.default.forwardRef(
|
|
687
|
+
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
688
|
+
const Component = as;
|
|
689
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
690
|
+
Component,
|
|
691
|
+
{
|
|
692
|
+
ref,
|
|
693
|
+
className: cn(
|
|
694
|
+
"mx-auto w-full px-2 sm:px-4 lg:px-8",
|
|
695
|
+
maxWidthStyles[maxWidth],
|
|
696
|
+
className
|
|
697
|
+
),
|
|
698
|
+
...props,
|
|
699
|
+
children
|
|
700
|
+
}
|
|
701
|
+
);
|
|
702
|
+
}
|
|
703
|
+
);
|
|
704
|
+
Container.displayName = "Container";
|
|
677
705
|
|
|
678
|
-
// lib/
|
|
679
|
-
var
|
|
680
|
-
"https://
|
|
681
|
-
"https://
|
|
682
|
-
"https://
|
|
683
|
-
"https://
|
|
684
|
-
"https://
|
|
685
|
-
"https://
|
|
686
|
-
"https://
|
|
687
|
-
"https://
|
|
688
|
-
"https://
|
|
689
|
-
"https://
|
|
690
|
-
"https://
|
|
691
|
-
"https://
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
"
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
"
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
"
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
"
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
706
|
+
// lib/patternSvgs.ts
|
|
707
|
+
var patternSvgs = {
|
|
708
|
+
squareAltGrid: "https://cdn.ing/assets/files/record/286187/4gpn0yq2ptra8iwlvmwwv860ggwv",
|
|
709
|
+
grid1: "https://cdn.ing/assets/files/record/286186/nbdflpgp4ostrno079hygibsflp3",
|
|
710
|
+
noise: "https://cdn.ing/assets/i/r/286188/zrqcp9hynh3j7p2laihwzfbujgrl/noise.png",
|
|
711
|
+
dots: "https://cdn.ing/assets/files/record/286198/yfsjx9thvtxzhl2qtshxyhkrm524",
|
|
712
|
+
dotPattern: "https://cdn.ing/assets/files/record/286192/7ig0cku8aqbboiza8nuk6hw0nnsr",
|
|
713
|
+
dotPattern2: "https://cdn.ing/assets/files/record/286189/arez6gd2s7isn9i1o6c7sexdq7bl",
|
|
714
|
+
circles: "https://cdn.ing/assets/files/record/286190/gtmia3sncjtzetdshc20zf1d3c17",
|
|
715
|
+
waves: "https://cdn.ing/assets/files/record/286191/mqlb33fzxz9cdth1bx7if0wmpkp1",
|
|
716
|
+
crossPattern: "https://cdn.ing/assets/files/record/286193/9yfqwdbnqaipbp7fsb3wbzzmq472",
|
|
717
|
+
architect: "https://cdn.ing/assets/files/record/286194/vgs88ugpvyhxu13wqgy0acvae6re",
|
|
718
|
+
tinyCheckers: "https://cdn.ing/assets/files/record/286195/65efaknsw8kcpf9o3c2gybytsl5b",
|
|
719
|
+
p6: "https://cdn.ing/assets/i/r/286196/6kl0rqnd6mjk8j7e525fo8fo0vkc/p6.webp"
|
|
720
|
+
};
|
|
721
|
+
var maskTop = "radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%)";
|
|
722
|
+
var maskBottom = "radial-gradient(ellipse 100% 80% at 50% 100%, #000 50%, transparent 90%)";
|
|
723
|
+
var maskCenter = "radial-gradient(ellipse 60% 60% at 50% 50%, #000 30%, transparent 70%)";
|
|
724
|
+
var maskTopLeft = "radial-gradient(ellipse 80% 80% at 0% 0%, #000 50%, transparent 90%)";
|
|
725
|
+
var maskTopRight = "radial-gradient(ellipse 80% 80% at 100% 0%, #000 50%, transparent 90%)";
|
|
726
|
+
var maskBottomLeft = "radial-gradient(ellipse 80% 80% at 0% 100%, #000 50%, transparent 90%)";
|
|
727
|
+
var maskBottomRight = "radial-gradient(ellipse 80% 80% at 100% 100%, #000 50%, transparent 90%)";
|
|
728
|
+
var circuitBoardPattern = (id, mask) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
729
|
+
"svg",
|
|
730
|
+
{
|
|
731
|
+
className: "h-full w-full",
|
|
732
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
733
|
+
style: mask ? {
|
|
734
|
+
maskImage: mask,
|
|
735
|
+
WebkitMaskImage: mask
|
|
736
|
+
} : void 0,
|
|
737
|
+
children: [
|
|
738
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
739
|
+
"pattern",
|
|
740
|
+
{
|
|
741
|
+
id,
|
|
742
|
+
x: "0",
|
|
743
|
+
y: "0",
|
|
744
|
+
width: "100",
|
|
745
|
+
height: "100",
|
|
746
|
+
patternUnits: "userSpaceOnUse",
|
|
747
|
+
children: [
|
|
748
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
749
|
+
"path",
|
|
750
|
+
{
|
|
751
|
+
d: "M0 50h40M60 50h40M50 0v40M50 60v40",
|
|
752
|
+
stroke: "hsl(var(--muted))",
|
|
753
|
+
strokeWidth: "1",
|
|
754
|
+
fill: "none"
|
|
755
|
+
}
|
|
756
|
+
),
|
|
757
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "50", r: "3", fill: "hsl(var(--muted))" }),
|
|
758
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "0", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
|
|
759
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "100", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
|
|
760
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "0", r: "2", fill: "hsl(var(--muted))" }),
|
|
761
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "100", r: "2", fill: "hsl(var(--muted))" })
|
|
762
|
+
]
|
|
763
|
+
}
|
|
764
|
+
) }),
|
|
765
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
|
|
766
|
+
]
|
|
767
|
+
}
|
|
768
|
+
);
|
|
769
|
+
var gridDotsPattern = (id, mask) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
770
|
+
"svg",
|
|
771
|
+
{
|
|
772
|
+
className: "h-full w-full",
|
|
773
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
774
|
+
style: mask ? {
|
|
775
|
+
maskImage: mask,
|
|
776
|
+
WebkitMaskImage: mask
|
|
777
|
+
} : void 0,
|
|
778
|
+
children: [
|
|
779
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
780
|
+
"pattern",
|
|
781
|
+
{
|
|
782
|
+
id,
|
|
783
|
+
x: "0",
|
|
784
|
+
y: "0",
|
|
785
|
+
width: "40",
|
|
786
|
+
height: "40",
|
|
787
|
+
patternUnits: "userSpaceOnUse",
|
|
788
|
+
children: [
|
|
789
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
790
|
+
"path",
|
|
791
|
+
{
|
|
792
|
+
d: "M0 20h40M20 0v40",
|
|
793
|
+
stroke: "hsl(var(--muted))",
|
|
794
|
+
strokeWidth: "0.5",
|
|
795
|
+
fill: "none"
|
|
796
|
+
}
|
|
797
|
+
),
|
|
798
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "20", cy: "20", r: "2", fill: "hsl(var(--muted))" })
|
|
799
|
+
]
|
|
800
|
+
}
|
|
801
|
+
) }),
|
|
802
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
|
|
803
|
+
]
|
|
804
|
+
}
|
|
805
|
+
);
|
|
806
|
+
var gridPattern = (size, mask) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
807
|
+
"div",
|
|
808
|
+
{
|
|
809
|
+
className: "h-full w-full bg-[linear-gradient(to_right,_hsl(var(--muted))_1px,_transparent_1px),linear-gradient(to_bottom,_hsl(var(--muted))_1px,_transparent_1px)]",
|
|
810
|
+
style: {
|
|
811
|
+
backgroundSize: `${size}px ${size}px`,
|
|
812
|
+
...mask ? {
|
|
813
|
+
maskImage: mask,
|
|
814
|
+
WebkitMaskImage: mask
|
|
815
|
+
} : {}
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
);
|
|
819
|
+
var diagonalCrossPattern = (mask) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
820
|
+
"div",
|
|
821
|
+
{
|
|
822
|
+
className: "h-full w-full",
|
|
823
|
+
style: {
|
|
824
|
+
backgroundImage: "repeating-linear-gradient(45deg, transparent, transparent 32px, hsl(var(--muted)) 32px, hsl(var(--muted)) 33px), repeating-linear-gradient(135deg, transparent, transparent 32px, hsl(var(--muted)) 32px, hsl(var(--muted)) 33px)",
|
|
825
|
+
...mask ? {
|
|
826
|
+
maskImage: mask,
|
|
827
|
+
WebkitMaskImage: mask
|
|
828
|
+
} : {}
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
);
|
|
832
|
+
var dashedGridMaskBase = "repeating-linear-gradient(to right, black 0px, black 3px, transparent 3px, transparent 8px), repeating-linear-gradient(to bottom, black 0px, black 3px, transparent 3px, transparent 8px)";
|
|
833
|
+
var dashedGridPattern = (fadeMask) => {
|
|
834
|
+
const mask = fadeMask ? `${dashedGridMaskBase}, ${fadeMask}` : dashedGridMaskBase;
|
|
835
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
836
|
+
"div",
|
|
799
837
|
{
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
838
|
+
className: "h-full w-full",
|
|
839
|
+
style: {
|
|
840
|
+
backgroundImage: "linear-gradient(to right, hsl(var(--muted)) 1px, transparent 1px), linear-gradient(to bottom, hsl(var(--muted)) 1px, transparent 1px)",
|
|
841
|
+
backgroundSize: "20px 20px",
|
|
842
|
+
backgroundPosition: "0 0, 0 0",
|
|
843
|
+
maskImage: mask,
|
|
844
|
+
WebkitMaskImage: mask,
|
|
845
|
+
maskComposite: "intersect",
|
|
846
|
+
WebkitMaskComposite: "source-in"
|
|
847
|
+
}
|
|
804
848
|
}
|
|
805
|
-
)
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
849
|
+
);
|
|
850
|
+
};
|
|
851
|
+
var gradientGlow = (position) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
852
|
+
"div",
|
|
853
|
+
{
|
|
854
|
+
className: cn(
|
|
855
|
+
"pointer-events-none absolute left-1/2 z-0 aspect-square w-3/4 -translate-x-1/2 rounded-full opacity-50 blur-3xl",
|
|
856
|
+
position === "top" ? "-top-1/4" : "-bottom-1/4"
|
|
857
|
+
),
|
|
858
|
+
style: {
|
|
859
|
+
background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
);
|
|
863
|
+
var spotlight = (position) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
864
|
+
"div",
|
|
865
|
+
{
|
|
866
|
+
className: cn(
|
|
867
|
+
"pointer-events-none absolute top-1/2 z-0 aspect-square w-3/4 -translate-y-1/2 rounded-full opacity-40 blur-3xl",
|
|
868
|
+
position === "left" ? "-left-1/4" : "-right-1/4"
|
|
869
|
+
),
|
|
870
|
+
style: {
|
|
871
|
+
background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
);
|
|
875
|
+
var patternOverlays = {
|
|
876
|
+
circuitBoardBasic: () => circuitBoardPattern("circuit-board-basic"),
|
|
877
|
+
circuitBoardFadeTop: () => circuitBoardPattern("circuit-board-fade-top", maskTop),
|
|
878
|
+
circuitBoardFadeBottom: () => circuitBoardPattern("circuit-board-fade-bottom", maskBottom),
|
|
879
|
+
circuitBoardFadeCenter: () => circuitBoardPattern("circuit-board-fade-center", maskCenter),
|
|
880
|
+
circuitBoardFadeTopLeft: () => circuitBoardPattern("circuit-board-fade-top-left", maskTopLeft),
|
|
881
|
+
circuitBoardFadeTopRight: () => circuitBoardPattern("circuit-board-fade-top-right", maskTopRight),
|
|
882
|
+
circuitBoardFadeBottomLeft: () => circuitBoardPattern("circuit-board-fade-bottom-left", maskBottomLeft),
|
|
883
|
+
circuitBoardFadeBottomRight: () => circuitBoardPattern("circuit-board-fade-bottom-right", maskBottomRight),
|
|
884
|
+
dashedGridBasic: () => dashedGridPattern(),
|
|
885
|
+
dashedGridFadeTop: () => dashedGridPattern(maskTop),
|
|
886
|
+
dashedGridFadeBottom: () => dashedGridPattern(maskBottom),
|
|
887
|
+
dashedGridFadeCenter: () => dashedGridPattern(maskCenter),
|
|
888
|
+
dashedGridFadeTopLeft: () => dashedGridPattern(maskTopLeft),
|
|
889
|
+
dashedGridFadeTopRight: () => dashedGridPattern(maskTopRight),
|
|
890
|
+
dashedGridFadeBottomLeft: () => dashedGridPattern(maskBottomLeft),
|
|
891
|
+
dashedGridFadeBottomRight: () => dashedGridPattern(maskBottomRight),
|
|
892
|
+
diagonalCrossBasic: () => diagonalCrossPattern(),
|
|
893
|
+
diagonalCrossFadeTop: () => diagonalCrossPattern(maskTop),
|
|
894
|
+
diagonalCrossFadeBottom: () => diagonalCrossPattern(maskBottom),
|
|
895
|
+
diagonalCrossFadeCenter: () => diagonalCrossPattern(maskCenter),
|
|
896
|
+
diagonalCrossFadeTopLeft: () => diagonalCrossPattern(maskTopLeft),
|
|
897
|
+
diagonalCrossFadeTopRight: () => diagonalCrossPattern(maskTopRight),
|
|
898
|
+
diagonalCrossFadeBottomLeft: () => diagonalCrossPattern(maskBottomLeft),
|
|
899
|
+
diagonalCrossFadeBottomRight: () => diagonalCrossPattern(maskBottomRight),
|
|
900
|
+
gridBasic: () => gridPattern(40),
|
|
901
|
+
gridFadeTop: () => gridPattern(32, maskTop),
|
|
902
|
+
gridFadeBottom: () => gridPattern(32, maskBottom),
|
|
903
|
+
gridFadeCenter: () => gridPattern(40, maskCenter),
|
|
904
|
+
gridFadeTopLeft: () => gridPattern(32, maskTopLeft),
|
|
905
|
+
gridFadeTopRight: () => gridPattern(32, maskTopRight),
|
|
906
|
+
gridFadeBottomLeft: () => gridPattern(32, maskBottomLeft),
|
|
907
|
+
gridFadeBottomRight: () => gridPattern(32, maskBottomRight),
|
|
908
|
+
gridDotsBasic: () => gridDotsPattern("grid-dots-basic"),
|
|
909
|
+
gridDotsFadeCenter: () => gridDotsPattern("grid-dots-fade-center", maskCenter),
|
|
910
|
+
gradientGlowTop: () => gradientGlow("top"),
|
|
911
|
+
gradientGlowBottom: () => gradientGlow("bottom"),
|
|
912
|
+
spotlightLeft: () => spotlight("left"),
|
|
913
|
+
spotlightRight: () => spotlight("right")
|
|
914
|
+
};
|
|
915
|
+
var inlinePatternStyles = {
|
|
916
|
+
radialGradientTop: {
|
|
917
|
+
background: "radial-gradient(125% 125% at 50% 10%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
|
|
918
|
+
},
|
|
919
|
+
radialGradientBottom: {
|
|
920
|
+
background: "radial-gradient(125% 125% at 50% 90%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
|
|
921
|
+
}
|
|
922
|
+
};
|
|
923
|
+
function PatternBackground({
|
|
924
|
+
pattern,
|
|
925
|
+
opacity = 0.08,
|
|
926
|
+
className,
|
|
927
|
+
style
|
|
928
|
+
}) {
|
|
929
|
+
if (!pattern) {
|
|
930
|
+
return null;
|
|
931
|
+
}
|
|
932
|
+
if (pattern in inlinePatternStyles) {
|
|
933
|
+
const inlineStyle = inlinePatternStyles[pattern];
|
|
934
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
935
|
+
"div",
|
|
816
936
|
{
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
optixFlowConfig
|
|
937
|
+
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
938
|
+
style: { ...inlineStyle, opacity, ...style },
|
|
939
|
+
"aria-hidden": "true"
|
|
821
940
|
}
|
|
822
|
-
)
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
941
|
+
);
|
|
942
|
+
}
|
|
943
|
+
if (pattern in patternOverlays) {
|
|
944
|
+
const Overlay = patternOverlays[pattern];
|
|
945
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
946
|
+
"div",
|
|
947
|
+
{
|
|
948
|
+
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
949
|
+
style: { opacity, ...style },
|
|
950
|
+
"aria-hidden": "true",
|
|
951
|
+
children: Overlay()
|
|
952
|
+
}
|
|
953
|
+
);
|
|
954
|
+
}
|
|
955
|
+
const patternUrl = pattern in patternSvgs ? patternSvgs[pattern] : pattern;
|
|
956
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
957
|
+
"div",
|
|
958
|
+
{
|
|
959
|
+
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
960
|
+
style: {
|
|
961
|
+
backgroundImage: `url(${patternUrl})`,
|
|
962
|
+
backgroundRepeat: "repeat",
|
|
963
|
+
backgroundSize: "auto",
|
|
964
|
+
opacity,
|
|
965
|
+
...style
|
|
966
|
+
},
|
|
967
|
+
"aria-hidden": "true"
|
|
968
|
+
}
|
|
969
|
+
);
|
|
970
|
+
}
|
|
971
|
+
var backgroundStyles = {
|
|
972
|
+
default: "bg-background text-foreground",
|
|
973
|
+
white: "bg-white text-dark",
|
|
974
|
+
gray: "bg-muted/30 text-foreground",
|
|
975
|
+
dark: "bg-foreground text-background",
|
|
976
|
+
transparent: "bg-transparent text-foreground",
|
|
977
|
+
gradient: "bg-linear-to-br from-primary via-primary/90 to-foreground text-primary-foreground",
|
|
978
|
+
primary: "bg-primary text-primary-foreground",
|
|
979
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
980
|
+
muted: "bg-muted text-muted-foreground"
|
|
981
|
+
};
|
|
982
|
+
var spacingStyles = {
|
|
983
|
+
none: "py-0 md:py-0",
|
|
984
|
+
sm: "py-12 md:py-16",
|
|
985
|
+
md: "py-16 md:py-24",
|
|
986
|
+
lg: "py-20 md:py-32",
|
|
987
|
+
xl: "py-24 md:py-40"
|
|
988
|
+
};
|
|
989
|
+
var Section = React6__namespace.default.forwardRef(
|
|
990
|
+
({
|
|
991
|
+
id,
|
|
992
|
+
title,
|
|
993
|
+
subtitle,
|
|
994
|
+
children,
|
|
995
|
+
className,
|
|
996
|
+
style,
|
|
997
|
+
background = "default",
|
|
998
|
+
spacing = "lg",
|
|
999
|
+
pattern,
|
|
1000
|
+
patternOpacity,
|
|
1001
|
+
patternClassName,
|
|
1002
|
+
containerClassName,
|
|
1003
|
+
containerMaxWidth = "xl",
|
|
1004
|
+
...props
|
|
1005
|
+
}, ref) => {
|
|
1006
|
+
const effectivePatternOpacity = patternOpacity !== void 0 ? patternOpacity : pattern ? 1 : 0;
|
|
1007
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1008
|
+
"section",
|
|
1009
|
+
{
|
|
1010
|
+
ref,
|
|
1011
|
+
id,
|
|
1012
|
+
className: cn(
|
|
1013
|
+
"relative",
|
|
1014
|
+
pattern ? "overflow-hidden" : null,
|
|
1015
|
+
backgroundStyles[background],
|
|
1016
|
+
spacingStyles[spacing],
|
|
1017
|
+
className
|
|
1018
|
+
),
|
|
1019
|
+
style,
|
|
1020
|
+
...props,
|
|
1021
|
+
children: [
|
|
1022
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1023
|
+
PatternBackground,
|
|
1024
|
+
{
|
|
1025
|
+
pattern,
|
|
1026
|
+
opacity: effectivePatternOpacity,
|
|
1027
|
+
className: patternClassName
|
|
1028
|
+
}
|
|
1029
|
+
),
|
|
1030
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1031
|
+
Container,
|
|
1032
|
+
{
|
|
1033
|
+
maxWidth: containerMaxWidth,
|
|
1034
|
+
className: cn("relative z-10", containerClassName),
|
|
1035
|
+
children: [
|
|
1036
|
+
(title || subtitle) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-12 text-center md:mb-16", children: [
|
|
1037
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-sm font-semibold uppercase tracking-wider text-primary", children: subtitle }),
|
|
1038
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl", children: title })
|
|
1039
|
+
] }),
|
|
1040
|
+
children
|
|
1041
|
+
]
|
|
1042
|
+
}
|
|
1043
|
+
)
|
|
1044
|
+
]
|
|
1045
|
+
}
|
|
1046
|
+
);
|
|
1047
|
+
}
|
|
1048
|
+
);
|
|
1049
|
+
Section.displayName = "Section";
|
|
846
1050
|
function ArticleChaptersAuthorComponent({
|
|
847
1051
|
className,
|
|
848
1052
|
containerClassName,
|
|
@@ -877,13 +1081,17 @@ function ArticleChaptersAuthorComponent({
|
|
|
877
1081
|
conclusionSlot,
|
|
878
1082
|
children,
|
|
879
1083
|
enableChapterTracking = true,
|
|
880
|
-
optixFlowConfig
|
|
1084
|
+
optixFlowConfig,
|
|
1085
|
+
background,
|
|
1086
|
+
spacing,
|
|
1087
|
+
pattern,
|
|
1088
|
+
patternOpacity
|
|
881
1089
|
}) {
|
|
882
1090
|
const conclusionActions = conclusionActionsProp ?? (conclusionButtonText ? [{ label: conclusionButtonText, href: conclusionButtonHref || "#", variant: "default" }] : []);
|
|
883
|
-
const [activeChapter, setActiveChapter] =
|
|
1091
|
+
const [activeChapter, setActiveChapter] = React6__namespace.useState(
|
|
884
1092
|
chapters?.[0]?.id || ""
|
|
885
1093
|
);
|
|
886
|
-
|
|
1094
|
+
React6__namespace.useEffect(() => {
|
|
887
1095
|
if (!enableChapterTracking || !chapters || chapters.length === 0) return;
|
|
888
1096
|
const observer = new IntersectionObserver(
|
|
889
1097
|
(entries) => {
|
|
@@ -901,12 +1109,12 @@ function ArticleChaptersAuthorComponent({
|
|
|
901
1109
|
});
|
|
902
1110
|
return () => observer.disconnect();
|
|
903
1111
|
}, [chapters, enableChapterTracking]);
|
|
904
|
-
const breadcrumbsContent =
|
|
1112
|
+
const breadcrumbsContent = React6__namespace.useMemo(() => {
|
|
905
1113
|
if (breadcrumbsSlot) return breadcrumbsSlot;
|
|
906
1114
|
if (!breadcrumbs || breadcrumbs.length === 0) return null;
|
|
907
1115
|
return /* @__PURE__ */ jsxRuntime.jsx(Breadcrumb, { className: cn("mb-8", breadcrumbClassName), children: /* @__PURE__ */ jsxRuntime.jsxs(BreadcrumbList, { children: [
|
|
908
1116
|
/* @__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 }) }) }) }),
|
|
909
|
-
breadcrumbs.map((crumb, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1117
|
+
breadcrumbs.map((crumb, index) => /* @__PURE__ */ jsxRuntime.jsxs(React6__namespace.Fragment, { children: [
|
|
910
1118
|
/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbSeparator, {}),
|
|
911
1119
|
/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href: crumb.href, children: crumb.label }) }) })
|
|
912
1120
|
] }, index)),
|
|
@@ -914,7 +1122,7 @@ function ArticleChaptersAuthorComponent({
|
|
|
914
1122
|
/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbPage, { children: typeof currentPage === "string" ? currentPage : currentPage }) })
|
|
915
1123
|
] }) });
|
|
916
1124
|
}, [breadcrumbsSlot, breadcrumbs, currentPage, breadcrumbClassName]);
|
|
917
|
-
const chaptersNavContent =
|
|
1125
|
+
const chaptersNavContent = React6__namespace.useMemo(() => {
|
|
918
1126
|
if (chaptersSlot) return chaptersSlot;
|
|
919
1127
|
if (!chapters || chapters.length === 0) return null;
|
|
920
1128
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("rounded-lg border p-4", chaptersClassName), children: [
|
|
@@ -922,7 +1130,7 @@ function ArticleChaptersAuthorComponent({
|
|
|
922
1130
|
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "space-y-2", children: chapters.map((chapter) => {
|
|
923
1131
|
const isActive = activeChapter === chapter.id;
|
|
924
1132
|
if (renderChapterLink) {
|
|
925
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1133
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React6__namespace.Fragment, { children: renderChapterLink(chapter, isActive) }, chapter.id);
|
|
926
1134
|
}
|
|
927
1135
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
928
1136
|
Pressable,
|
|
@@ -942,7 +1150,7 @@ function ArticleChaptersAuthorComponent({
|
|
|
942
1150
|
}) })
|
|
943
1151
|
] });
|
|
944
1152
|
}, [chaptersSlot, chapters, activeChapter, renderChapterLink, chaptersClassName]);
|
|
945
|
-
const authorCardContent =
|
|
1153
|
+
const authorCardContent = React6__namespace.useMemo(() => {
|
|
946
1154
|
if (authorSlot) return authorSlot;
|
|
947
1155
|
if (!author) return null;
|
|
948
1156
|
let socialLinksContent = null;
|
|
@@ -1003,7 +1211,7 @@ function ArticleChaptersAuthorComponent({
|
|
|
1003
1211
|
socialLinksContent
|
|
1004
1212
|
] });
|
|
1005
1213
|
}, [authorSlot, author, authorClassName]);
|
|
1006
|
-
const heroMediaContent =
|
|
1214
|
+
const heroMediaContent = React6__namespace.useMemo(() => {
|
|
1007
1215
|
if (heroMediaSlot) return heroMediaSlot;
|
|
1008
1216
|
if (!heroImageSrc) return null;
|
|
1009
1217
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1016,7 +1224,7 @@ function ArticleChaptersAuthorComponent({
|
|
|
1016
1224
|
}
|
|
1017
1225
|
);
|
|
1018
1226
|
}, [heroMediaSlot, heroImageSrc, heroImageAlt, heroImageClassName, optixFlowConfig]);
|
|
1019
|
-
const conclusionContent =
|
|
1227
|
+
const conclusionContent = React6__namespace.useMemo(() => {
|
|
1020
1228
|
if (conclusionSlot) return conclusionSlot;
|
|
1021
1229
|
if (!conclusionTitle && !conclusionDescription && (!conclusionActions || conclusionActions.length === 0)) return null;
|
|
1022
1230
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mt-12 rounded-lg border bg-muted/50 p-6 not-prose", conclusionClassName), children: [
|
|
@@ -1041,24 +1249,34 @@ function ArticleChaptersAuthorComponent({
|
|
|
1041
1249
|
}) })
|
|
1042
1250
|
] });
|
|
1043
1251
|
}, [conclusionSlot, conclusionTitle, conclusionDescription, conclusionActions, conclusionClassName]);
|
|
1044
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1252
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1253
|
+
Section,
|
|
1254
|
+
{
|
|
1255
|
+
background,
|
|
1256
|
+
spacing,
|
|
1257
|
+
pattern,
|
|
1258
|
+
patternOpacity,
|
|
1259
|
+
className,
|
|
1260
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("container", containerClassName), children: [
|
|
1261
|
+
breadcrumbsContent,
|
|
1262
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mb-12 text-center", headerClassName), children: [
|
|
1263
|
+
title && (typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h1", { className: cn("text-4xl font-bold tracking-tight md:text-5xl lg:text-6xl", titleClassName), children: title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: titleClassName, children: title })),
|
|
1264
|
+
subtitle && (typeof subtitle === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("mt-4 text-lg text-muted-foreground md:text-xl", subtitleClassName), children: subtitle }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-4", subtitleClassName), children: subtitle }))
|
|
1265
|
+
] }),
|
|
1266
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-10 lg:grid-cols-[280px_minmax(0,1fr)]", children: [
|
|
1267
|
+
/* @__PURE__ */ jsxRuntime.jsx("aside", { className: cn("hidden lg:block", sidebarClassName), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sticky top-8 space-y-6", children: [
|
|
1268
|
+
chaptersNavContent,
|
|
1269
|
+
authorCardContent
|
|
1270
|
+
] }) }),
|
|
1271
|
+
/* @__PURE__ */ jsxRuntime.jsxs("article", { className: cn("prose max-w-none dark:prose-invert", articleClassName), children: [
|
|
1272
|
+
heroMediaContent,
|
|
1273
|
+
children,
|
|
1274
|
+
conclusionContent
|
|
1275
|
+
] })
|
|
1276
|
+
] })
|
|
1059
1277
|
] })
|
|
1060
|
-
|
|
1061
|
-
|
|
1278
|
+
}
|
|
1279
|
+
);
|
|
1062
1280
|
}
|
|
1063
1281
|
|
|
1064
1282
|
exports.ArticleChaptersAuthor = ArticleChaptersAuthorComponent;
|