@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 SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
33
33
|
|
|
34
34
|
// components/blocks/article/article-compact-toc.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);
|
|
@@ -649,37 +649,379 @@ function Separator({
|
|
|
649
649
|
}
|
|
650
650
|
);
|
|
651
651
|
}
|
|
652
|
-
var
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
652
|
+
var maxWidthStyles = {
|
|
653
|
+
sm: "max-w-screen-sm",
|
|
654
|
+
md: "max-w-screen-md",
|
|
655
|
+
lg: "max-w-screen-lg",
|
|
656
|
+
xl: "max-w-7xl",
|
|
657
|
+
"2xl": "max-w-screen-2xl",
|
|
658
|
+
"4xl": "max-w-[1536px]",
|
|
659
|
+
full: "max-w-full"
|
|
660
|
+
};
|
|
661
|
+
var Container = React6__namespace.default.forwardRef(
|
|
662
|
+
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
663
|
+
const Component = as;
|
|
664
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
665
|
+
Component,
|
|
666
|
+
{
|
|
667
|
+
ref,
|
|
668
|
+
className: cn(
|
|
669
|
+
"mx-auto w-full px-2 sm:px-4 lg:px-8",
|
|
670
|
+
maxWidthStyles[maxWidth],
|
|
671
|
+
className
|
|
672
|
+
),
|
|
673
|
+
...props,
|
|
674
|
+
children
|
|
675
|
+
}
|
|
676
|
+
);
|
|
677
|
+
}
|
|
678
|
+
);
|
|
679
|
+
Container.displayName = "Container";
|
|
680
|
+
|
|
681
|
+
// lib/patternSvgs.ts
|
|
682
|
+
var patternSvgs = {
|
|
683
|
+
squareAltGrid: "https://cdn.ing/assets/files/record/286187/4gpn0yq2ptra8iwlvmwwv860ggwv",
|
|
684
|
+
grid1: "https://cdn.ing/assets/files/record/286186/nbdflpgp4ostrno079hygibsflp3",
|
|
685
|
+
noise: "https://cdn.ing/assets/i/r/286188/zrqcp9hynh3j7p2laihwzfbujgrl/noise.png",
|
|
686
|
+
dots: "https://cdn.ing/assets/files/record/286198/yfsjx9thvtxzhl2qtshxyhkrm524",
|
|
687
|
+
dotPattern: "https://cdn.ing/assets/files/record/286192/7ig0cku8aqbboiza8nuk6hw0nnsr",
|
|
688
|
+
dotPattern2: "https://cdn.ing/assets/files/record/286189/arez6gd2s7isn9i1o6c7sexdq7bl",
|
|
689
|
+
circles: "https://cdn.ing/assets/files/record/286190/gtmia3sncjtzetdshc20zf1d3c17",
|
|
690
|
+
waves: "https://cdn.ing/assets/files/record/286191/mqlb33fzxz9cdth1bx7if0wmpkp1",
|
|
691
|
+
crossPattern: "https://cdn.ing/assets/files/record/286193/9yfqwdbnqaipbp7fsb3wbzzmq472",
|
|
692
|
+
architect: "https://cdn.ing/assets/files/record/286194/vgs88ugpvyhxu13wqgy0acvae6re",
|
|
693
|
+
tinyCheckers: "https://cdn.ing/assets/files/record/286195/65efaknsw8kcpf9o3c2gybytsl5b",
|
|
694
|
+
p6: "https://cdn.ing/assets/i/r/286196/6kl0rqnd6mjk8j7e525fo8fo0vkc/p6.webp"
|
|
695
|
+
};
|
|
696
|
+
var maskTop = "radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%)";
|
|
697
|
+
var maskBottom = "radial-gradient(ellipse 100% 80% at 50% 100%, #000 50%, transparent 90%)";
|
|
698
|
+
var maskCenter = "radial-gradient(ellipse 60% 60% at 50% 50%, #000 30%, transparent 70%)";
|
|
699
|
+
var maskTopLeft = "radial-gradient(ellipse 80% 80% at 0% 0%, #000 50%, transparent 90%)";
|
|
700
|
+
var maskTopRight = "radial-gradient(ellipse 80% 80% at 100% 0%, #000 50%, transparent 90%)";
|
|
701
|
+
var maskBottomLeft = "radial-gradient(ellipse 80% 80% at 0% 100%, #000 50%, transparent 90%)";
|
|
702
|
+
var maskBottomRight = "radial-gradient(ellipse 80% 80% at 100% 100%, #000 50%, transparent 90%)";
|
|
703
|
+
var circuitBoardPattern = (id, mask) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
704
|
+
"svg",
|
|
705
|
+
{
|
|
706
|
+
className: "h-full w-full",
|
|
707
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
708
|
+
style: mask ? {
|
|
709
|
+
maskImage: mask,
|
|
710
|
+
WebkitMaskImage: mask
|
|
711
|
+
} : void 0,
|
|
712
|
+
children: [
|
|
713
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
714
|
+
"pattern",
|
|
715
|
+
{
|
|
716
|
+
id,
|
|
717
|
+
x: "0",
|
|
718
|
+
y: "0",
|
|
719
|
+
width: "100",
|
|
720
|
+
height: "100",
|
|
721
|
+
patternUnits: "userSpaceOnUse",
|
|
722
|
+
children: [
|
|
723
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
724
|
+
"path",
|
|
725
|
+
{
|
|
726
|
+
d: "M0 50h40M60 50h40M50 0v40M50 60v40",
|
|
727
|
+
stroke: "hsl(var(--muted))",
|
|
728
|
+
strokeWidth: "1",
|
|
729
|
+
fill: "none"
|
|
730
|
+
}
|
|
731
|
+
),
|
|
732
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "50", r: "3", fill: "hsl(var(--muted))" }),
|
|
733
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "0", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
|
|
734
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "100", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
|
|
735
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "0", r: "2", fill: "hsl(var(--muted))" }),
|
|
736
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "100", r: "2", fill: "hsl(var(--muted))" })
|
|
737
|
+
]
|
|
738
|
+
}
|
|
739
|
+
) }),
|
|
740
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
|
|
741
|
+
]
|
|
742
|
+
}
|
|
743
|
+
);
|
|
744
|
+
var gridDotsPattern = (id, mask) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
745
|
+
"svg",
|
|
746
|
+
{
|
|
747
|
+
className: "h-full w-full",
|
|
748
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
749
|
+
style: mask ? {
|
|
750
|
+
maskImage: mask,
|
|
751
|
+
WebkitMaskImage: mask
|
|
752
|
+
} : void 0,
|
|
753
|
+
children: [
|
|
754
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
755
|
+
"pattern",
|
|
756
|
+
{
|
|
757
|
+
id,
|
|
758
|
+
x: "0",
|
|
759
|
+
y: "0",
|
|
760
|
+
width: "40",
|
|
761
|
+
height: "40",
|
|
762
|
+
patternUnits: "userSpaceOnUse",
|
|
763
|
+
children: [
|
|
764
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
765
|
+
"path",
|
|
766
|
+
{
|
|
767
|
+
d: "M0 20h40M20 0v40",
|
|
768
|
+
stroke: "hsl(var(--muted))",
|
|
769
|
+
strokeWidth: "0.5",
|
|
770
|
+
fill: "none"
|
|
771
|
+
}
|
|
772
|
+
),
|
|
773
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "20", cy: "20", r: "2", fill: "hsl(var(--muted))" })
|
|
774
|
+
]
|
|
775
|
+
}
|
|
776
|
+
) }),
|
|
777
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
|
|
778
|
+
]
|
|
779
|
+
}
|
|
780
|
+
);
|
|
781
|
+
var gridPattern = (size, mask) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
782
|
+
"div",
|
|
783
|
+
{
|
|
784
|
+
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)]",
|
|
785
|
+
style: {
|
|
786
|
+
backgroundSize: `${size}px ${size}px`,
|
|
787
|
+
...mask ? {
|
|
788
|
+
maskImage: mask,
|
|
789
|
+
WebkitMaskImage: mask
|
|
790
|
+
} : {}
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
);
|
|
794
|
+
var diagonalCrossPattern = (mask) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
795
|
+
"div",
|
|
796
|
+
{
|
|
797
|
+
className: "h-full w-full",
|
|
798
|
+
style: {
|
|
799
|
+
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)",
|
|
800
|
+
...mask ? {
|
|
801
|
+
maskImage: mask,
|
|
802
|
+
WebkitMaskImage: mask
|
|
803
|
+
} : {}
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
);
|
|
807
|
+
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)";
|
|
808
|
+
var dashedGridPattern = (fadeMask) => {
|
|
809
|
+
const mask = fadeMask ? `${dashedGridMaskBase}, ${fadeMask}` : dashedGridMaskBase;
|
|
810
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
811
|
+
"div",
|
|
812
|
+
{
|
|
813
|
+
className: "h-full w-full",
|
|
814
|
+
style: {
|
|
815
|
+
backgroundImage: "linear-gradient(to right, hsl(var(--muted)) 1px, transparent 1px), linear-gradient(to bottom, hsl(var(--muted)) 1px, transparent 1px)",
|
|
816
|
+
backgroundSize: "20px 20px",
|
|
817
|
+
backgroundPosition: "0 0, 0 0",
|
|
818
|
+
maskImage: mask,
|
|
819
|
+
WebkitMaskImage: mask,
|
|
820
|
+
maskComposite: "intersect",
|
|
821
|
+
WebkitMaskComposite: "source-in"
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
);
|
|
825
|
+
};
|
|
826
|
+
var gradientGlow = (position) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
827
|
+
"div",
|
|
828
|
+
{
|
|
829
|
+
className: cn(
|
|
830
|
+
"pointer-events-none absolute left-1/2 z-0 aspect-square w-3/4 -translate-x-1/2 rounded-full opacity-50 blur-3xl",
|
|
831
|
+
position === "top" ? "-top-1/4" : "-bottom-1/4"
|
|
832
|
+
),
|
|
833
|
+
style: {
|
|
834
|
+
background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
);
|
|
838
|
+
var spotlight = (position) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
839
|
+
"div",
|
|
840
|
+
{
|
|
841
|
+
className: cn(
|
|
842
|
+
"pointer-events-none absolute top-1/2 z-0 aspect-square w-3/4 -translate-y-1/2 rounded-full opacity-40 blur-3xl",
|
|
843
|
+
position === "left" ? "-left-1/4" : "-right-1/4"
|
|
844
|
+
),
|
|
845
|
+
style: {
|
|
846
|
+
background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
);
|
|
850
|
+
var patternOverlays = {
|
|
851
|
+
circuitBoardBasic: () => circuitBoardPattern("circuit-board-basic"),
|
|
852
|
+
circuitBoardFadeTop: () => circuitBoardPattern("circuit-board-fade-top", maskTop),
|
|
853
|
+
circuitBoardFadeBottom: () => circuitBoardPattern("circuit-board-fade-bottom", maskBottom),
|
|
854
|
+
circuitBoardFadeCenter: () => circuitBoardPattern("circuit-board-fade-center", maskCenter),
|
|
855
|
+
circuitBoardFadeTopLeft: () => circuitBoardPattern("circuit-board-fade-top-left", maskTopLeft),
|
|
856
|
+
circuitBoardFadeTopRight: () => circuitBoardPattern("circuit-board-fade-top-right", maskTopRight),
|
|
857
|
+
circuitBoardFadeBottomLeft: () => circuitBoardPattern("circuit-board-fade-bottom-left", maskBottomLeft),
|
|
858
|
+
circuitBoardFadeBottomRight: () => circuitBoardPattern("circuit-board-fade-bottom-right", maskBottomRight),
|
|
859
|
+
dashedGridBasic: () => dashedGridPattern(),
|
|
860
|
+
dashedGridFadeTop: () => dashedGridPattern(maskTop),
|
|
861
|
+
dashedGridFadeBottom: () => dashedGridPattern(maskBottom),
|
|
862
|
+
dashedGridFadeCenter: () => dashedGridPattern(maskCenter),
|
|
863
|
+
dashedGridFadeTopLeft: () => dashedGridPattern(maskTopLeft),
|
|
864
|
+
dashedGridFadeTopRight: () => dashedGridPattern(maskTopRight),
|
|
865
|
+
dashedGridFadeBottomLeft: () => dashedGridPattern(maskBottomLeft),
|
|
866
|
+
dashedGridFadeBottomRight: () => dashedGridPattern(maskBottomRight),
|
|
867
|
+
diagonalCrossBasic: () => diagonalCrossPattern(),
|
|
868
|
+
diagonalCrossFadeTop: () => diagonalCrossPattern(maskTop),
|
|
869
|
+
diagonalCrossFadeBottom: () => diagonalCrossPattern(maskBottom),
|
|
870
|
+
diagonalCrossFadeCenter: () => diagonalCrossPattern(maskCenter),
|
|
871
|
+
diagonalCrossFadeTopLeft: () => diagonalCrossPattern(maskTopLeft),
|
|
872
|
+
diagonalCrossFadeTopRight: () => diagonalCrossPattern(maskTopRight),
|
|
873
|
+
diagonalCrossFadeBottomLeft: () => diagonalCrossPattern(maskBottomLeft),
|
|
874
|
+
diagonalCrossFadeBottomRight: () => diagonalCrossPattern(maskBottomRight),
|
|
875
|
+
gridBasic: () => gridPattern(40),
|
|
876
|
+
gridFadeTop: () => gridPattern(32, maskTop),
|
|
877
|
+
gridFadeBottom: () => gridPattern(32, maskBottom),
|
|
878
|
+
gridFadeCenter: () => gridPattern(40, maskCenter),
|
|
879
|
+
gridFadeTopLeft: () => gridPattern(32, maskTopLeft),
|
|
880
|
+
gridFadeTopRight: () => gridPattern(32, maskTopRight),
|
|
881
|
+
gridFadeBottomLeft: () => gridPattern(32, maskBottomLeft),
|
|
882
|
+
gridFadeBottomRight: () => gridPattern(32, maskBottomRight),
|
|
883
|
+
gridDotsBasic: () => gridDotsPattern("grid-dots-basic"),
|
|
884
|
+
gridDotsFadeCenter: () => gridDotsPattern("grid-dots-fade-center", maskCenter),
|
|
885
|
+
gradientGlowTop: () => gradientGlow("top"),
|
|
886
|
+
gradientGlowBottom: () => gradientGlow("bottom"),
|
|
887
|
+
spotlightLeft: () => spotlight("left"),
|
|
888
|
+
spotlightRight: () => spotlight("right")
|
|
889
|
+
};
|
|
890
|
+
var inlinePatternStyles = {
|
|
891
|
+
radialGradientTop: {
|
|
892
|
+
background: "radial-gradient(125% 125% at 50% 10%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
|
|
893
|
+
},
|
|
894
|
+
radialGradientBottom: {
|
|
895
|
+
background: "radial-gradient(125% 125% at 50% 90%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
|
|
896
|
+
}
|
|
897
|
+
};
|
|
898
|
+
function PatternBackground({
|
|
899
|
+
pattern,
|
|
900
|
+
opacity = 0.08,
|
|
901
|
+
className,
|
|
902
|
+
style
|
|
903
|
+
}) {
|
|
904
|
+
if (!pattern) {
|
|
905
|
+
return null;
|
|
906
|
+
}
|
|
907
|
+
if (pattern in inlinePatternStyles) {
|
|
908
|
+
const inlineStyle = inlinePatternStyles[pattern];
|
|
909
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
910
|
+
"div",
|
|
911
|
+
{
|
|
912
|
+
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
913
|
+
style: { ...inlineStyle, opacity, ...style },
|
|
914
|
+
"aria-hidden": "true"
|
|
915
|
+
}
|
|
916
|
+
);
|
|
917
|
+
}
|
|
918
|
+
if (pattern in patternOverlays) {
|
|
919
|
+
const Overlay = patternOverlays[pattern];
|
|
920
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
921
|
+
"div",
|
|
922
|
+
{
|
|
923
|
+
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
924
|
+
style: { opacity, ...style },
|
|
925
|
+
"aria-hidden": "true",
|
|
926
|
+
children: Overlay()
|
|
927
|
+
}
|
|
928
|
+
);
|
|
929
|
+
}
|
|
930
|
+
const patternUrl = pattern in patternSvgs ? patternSvgs[pattern] : pattern;
|
|
931
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
932
|
+
"div",
|
|
933
|
+
{
|
|
934
|
+
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
935
|
+
style: {
|
|
936
|
+
backgroundImage: `url(${patternUrl})`,
|
|
937
|
+
backgroundRepeat: "repeat",
|
|
938
|
+
backgroundSize: "auto",
|
|
939
|
+
opacity,
|
|
940
|
+
...style
|
|
941
|
+
},
|
|
942
|
+
"aria-hidden": "true"
|
|
943
|
+
}
|
|
944
|
+
);
|
|
945
|
+
}
|
|
946
|
+
var backgroundStyles = {
|
|
947
|
+
default: "bg-background text-foreground",
|
|
948
|
+
white: "bg-white text-dark",
|
|
949
|
+
gray: "bg-muted/30 text-foreground",
|
|
950
|
+
dark: "bg-foreground text-background",
|
|
951
|
+
transparent: "bg-transparent text-foreground",
|
|
952
|
+
gradient: "bg-linear-to-br from-primary via-primary/90 to-foreground text-primary-foreground",
|
|
953
|
+
primary: "bg-primary text-primary-foreground",
|
|
954
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
955
|
+
muted: "bg-muted text-muted-foreground"
|
|
956
|
+
};
|
|
957
|
+
var spacingStyles = {
|
|
958
|
+
none: "py-0 md:py-0",
|
|
959
|
+
sm: "py-12 md:py-16",
|
|
960
|
+
md: "py-16 md:py-24",
|
|
961
|
+
lg: "py-20 md:py-32",
|
|
962
|
+
xl: "py-24 md:py-40"
|
|
963
|
+
};
|
|
964
|
+
var Section = React6__namespace.default.forwardRef(
|
|
965
|
+
({
|
|
966
|
+
id,
|
|
967
|
+
title,
|
|
968
|
+
subtitle,
|
|
969
|
+
children,
|
|
970
|
+
className,
|
|
971
|
+
style,
|
|
972
|
+
background = "default",
|
|
973
|
+
spacing = "lg",
|
|
974
|
+
pattern,
|
|
975
|
+
patternOpacity,
|
|
976
|
+
patternClassName,
|
|
977
|
+
containerClassName,
|
|
978
|
+
containerMaxWidth = "xl",
|
|
979
|
+
...props
|
|
980
|
+
}, ref) => {
|
|
981
|
+
const effectivePatternOpacity = patternOpacity !== void 0 ? patternOpacity : pattern ? 1 : 0;
|
|
982
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
983
|
+
"section",
|
|
984
|
+
{
|
|
985
|
+
ref,
|
|
986
|
+
id,
|
|
987
|
+
className: cn(
|
|
988
|
+
"relative",
|
|
989
|
+
pattern ? "overflow-hidden" : null,
|
|
990
|
+
backgroundStyles[background],
|
|
991
|
+
spacingStyles[spacing],
|
|
992
|
+
className
|
|
993
|
+
),
|
|
994
|
+
style,
|
|
995
|
+
...props,
|
|
996
|
+
children: [
|
|
997
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
998
|
+
PatternBackground,
|
|
999
|
+
{
|
|
1000
|
+
pattern,
|
|
1001
|
+
opacity: effectivePatternOpacity,
|
|
1002
|
+
className: patternClassName
|
|
1003
|
+
}
|
|
1004
|
+
),
|
|
1005
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1006
|
+
Container,
|
|
1007
|
+
{
|
|
1008
|
+
maxWidth: containerMaxWidth,
|
|
1009
|
+
className: cn("relative z-10", containerClassName),
|
|
1010
|
+
children: [
|
|
1011
|
+
(title || subtitle) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-12 text-center md:mb-16", children: [
|
|
1012
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-sm font-semibold uppercase tracking-wider text-primary", children: subtitle }),
|
|
1013
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl", children: title })
|
|
1014
|
+
] }),
|
|
1015
|
+
children
|
|
1016
|
+
]
|
|
1017
|
+
}
|
|
1018
|
+
)
|
|
1019
|
+
]
|
|
1020
|
+
}
|
|
1021
|
+
);
|
|
1022
|
+
}
|
|
1023
|
+
);
|
|
1024
|
+
Section.displayName = "Section";
|
|
683
1025
|
function ArticleCompactTocComponent({
|
|
684
1026
|
className,
|
|
685
1027
|
containerClassName,
|
|
@@ -709,13 +1051,17 @@ function ArticleCompactTocComponent({
|
|
|
709
1051
|
heroMediaSlot,
|
|
710
1052
|
children,
|
|
711
1053
|
enableTocTracking = true,
|
|
712
|
-
optixFlowConfig
|
|
1054
|
+
optixFlowConfig,
|
|
1055
|
+
background,
|
|
1056
|
+
spacing,
|
|
1057
|
+
pattern,
|
|
1058
|
+
patternOpacity
|
|
713
1059
|
}) {
|
|
714
|
-
const [activeSection, setActiveSection] =
|
|
1060
|
+
const [activeSection, setActiveSection] = React6__namespace.useState(
|
|
715
1061
|
sections?.[0]?.id || ""
|
|
716
1062
|
);
|
|
717
|
-
const [isTocOpen, setIsTocOpen] =
|
|
718
|
-
|
|
1063
|
+
const [isTocOpen, setIsTocOpen] = React6__namespace.useState(false);
|
|
1064
|
+
React6__namespace.useEffect(() => {
|
|
719
1065
|
if (!enableTocTracking) return;
|
|
720
1066
|
const observer = new IntersectionObserver(
|
|
721
1067
|
(entries) => {
|
|
@@ -733,12 +1079,12 @@ function ArticleCompactTocComponent({
|
|
|
733
1079
|
});
|
|
734
1080
|
return () => observer.disconnect();
|
|
735
1081
|
}, [sections, enableTocTracking]);
|
|
736
|
-
const breadcrumbsContent =
|
|
1082
|
+
const breadcrumbsContent = React6__namespace.useMemo(() => {
|
|
737
1083
|
if (breadcrumbsSlot) return breadcrumbsSlot;
|
|
738
1084
|
if (!breadcrumbs && !currentPage) return null;
|
|
739
1085
|
return /* @__PURE__ */ jsxRuntime.jsx(Breadcrumb, { className: cn("mb-6", breadcrumbClassName), children: /* @__PURE__ */ jsxRuntime.jsxs(BreadcrumbList, { children: [
|
|
740
1086
|
/* @__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 }) }) }) }),
|
|
741
|
-
breadcrumbs?.map((crumb, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1087
|
+
breadcrumbs?.map((crumb, index) => /* @__PURE__ */ jsxRuntime.jsxs(React6__namespace.Fragment, { children: [
|
|
742
1088
|
/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbSeparator, {}),
|
|
743
1089
|
/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href: crumb.href, children: crumb.label }) }) })
|
|
744
1090
|
] }, index)),
|
|
@@ -746,7 +1092,7 @@ function ArticleCompactTocComponent({
|
|
|
746
1092
|
/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbPage, { children: currentPage }) })
|
|
747
1093
|
] }) });
|
|
748
1094
|
}, [breadcrumbsSlot, breadcrumbs, currentPage, breadcrumbClassName]);
|
|
749
|
-
const shareContent =
|
|
1095
|
+
const shareContent = React6__namespace.useMemo(() => {
|
|
750
1096
|
if (shareSlot) return shareSlot;
|
|
751
1097
|
if (!socialLinks || socialLinks.length === 0) return null;
|
|
752
1098
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mt-6 flex items-center gap-2", shareClassName), children: [
|
|
@@ -763,7 +1109,7 @@ function ArticleCompactTocComponent({
|
|
|
763
1109
|
))
|
|
764
1110
|
] });
|
|
765
1111
|
}, [shareSlot, socialLinks, shareClassName]);
|
|
766
|
-
const tocContent =
|
|
1112
|
+
const tocContent = React6__namespace.useMemo(() => {
|
|
767
1113
|
if (tocSlot) return tocSlot;
|
|
768
1114
|
if (!sections || sections.length === 0) return null;
|
|
769
1115
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-8 lg:hidden", children: [
|
|
@@ -790,7 +1136,7 @@ function ArticleCompactTocComponent({
|
|
|
790
1136
|
isTocOpen && /* @__PURE__ */ jsxRuntime.jsx("nav", { className: "mt-2 space-y-2 rounded-lg border p-4", children: sections.map((section) => {
|
|
791
1137
|
const isActive = activeSection === section.id;
|
|
792
1138
|
if (renderSectionLink) {
|
|
793
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1139
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React6__namespace.Fragment, { children: renderSectionLink(section, isActive) }, section.id);
|
|
794
1140
|
}
|
|
795
1141
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
796
1142
|
Pressable,
|
|
@@ -808,7 +1154,7 @@ function ArticleCompactTocComponent({
|
|
|
808
1154
|
}) })
|
|
809
1155
|
] });
|
|
810
1156
|
}, [tocSlot, sections, isTocOpen, activeSection, renderSectionLink, tocClassName]);
|
|
811
|
-
const heroMediaContent =
|
|
1157
|
+
const heroMediaContent = React6__namespace.useMemo(() => {
|
|
812
1158
|
if (heroMediaSlot) return heroMediaSlot;
|
|
813
1159
|
if (!heroImageSrc) return null;
|
|
814
1160
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -821,26 +1167,36 @@ function ArticleCompactTocComponent({
|
|
|
821
1167
|
}
|
|
822
1168
|
);
|
|
823
1169
|
}, [heroMediaSlot, heroImageSrc, heroImageAlt, heroImageClassName, optixFlowConfig]);
|
|
824
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
1170
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1171
|
+
Section,
|
|
1172
|
+
{
|
|
1173
|
+
background,
|
|
1174
|
+
spacing,
|
|
1175
|
+
pattern,
|
|
1176
|
+
patternOpacity,
|
|
1177
|
+
className,
|
|
1178
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("container", containerClassName), children: [
|
|
1179
|
+
breadcrumbsContent,
|
|
1180
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mx-auto max-w-3xl", contentClassName), children: [
|
|
1181
|
+
title && (typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h1", { className: cn("text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl", titleClassName), children: title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: titleClassName, children: title })),
|
|
1182
|
+
(authorName || publishDate || readTime) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mt-4 flex flex-wrap items-center gap-4 text-sm text-muted-foreground", metaClassName), children: [
|
|
1183
|
+
authorName && (authorHref ? /* @__PURE__ */ jsxRuntime.jsx(Pressable, { href: authorHref, className: "hover:underline", children: authorName }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: authorName })),
|
|
1184
|
+
authorName && publishDate && /* @__PURE__ */ jsxRuntime.jsx(Separator, { orientation: "vertical", className: "h-4" }),
|
|
1185
|
+
publishDate && /* @__PURE__ */ jsxRuntime.jsx("span", { children: publishDate }),
|
|
1186
|
+
publishDate && readTime && /* @__PURE__ */ jsxRuntime.jsx(Separator, { orientation: "vertical", className: "h-4" }),
|
|
1187
|
+
readTime && /* @__PURE__ */ jsxRuntime.jsx("span", { children: readTime })
|
|
1188
|
+
] }),
|
|
1189
|
+
shareContent,
|
|
1190
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "my-8" }),
|
|
1191
|
+
tocContent,
|
|
1192
|
+
children && /* @__PURE__ */ jsxRuntime.jsxs("article", { className: cn("prose max-w-none dark:prose-invert", articleClassName), children: [
|
|
1193
|
+
heroMediaContent,
|
|
1194
|
+
children
|
|
1195
|
+
] })
|
|
1196
|
+
] })
|
|
841
1197
|
] })
|
|
842
|
-
|
|
843
|
-
|
|
1198
|
+
}
|
|
1199
|
+
);
|
|
844
1200
|
}
|
|
845
1201
|
|
|
846
1202
|
exports.ArticleCompactToc = ArticleCompactTocComponent;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import { f as SectionBackground, g as SectionSpacing } from './community-initiatives-CODGexkN.cjs';
|
|
4
|
+
import { P as PatternName } from './pattern-background-a7gKHzHy.cjs';
|
|
3
5
|
import { a as SocialLinkItem, O as OptixFlowConfig } from './blocks-Cohq4eio.cjs';
|
|
4
6
|
import 'class-variance-authority';
|
|
5
7
|
import './button-variants-lRElsmTc.cjs';
|
|
@@ -131,7 +133,23 @@ interface ArticleCompactTocProps {
|
|
|
131
133
|
* OptixFlow image optimization configuration
|
|
132
134
|
*/
|
|
133
135
|
optixFlowConfig?: OptixFlowConfig;
|
|
136
|
+
/**
|
|
137
|
+
* Background style for the section
|
|
138
|
+
*/
|
|
139
|
+
background?: SectionBackground;
|
|
140
|
+
/**
|
|
141
|
+
* Vertical spacing for the section
|
|
142
|
+
*/
|
|
143
|
+
spacing?: SectionSpacing;
|
|
144
|
+
/**
|
|
145
|
+
* Background pattern
|
|
146
|
+
*/
|
|
147
|
+
pattern?: PatternName;
|
|
148
|
+
/**
|
|
149
|
+
* Pattern opacity (0-1)
|
|
150
|
+
*/
|
|
151
|
+
patternOpacity?: number;
|
|
134
152
|
}
|
|
135
|
-
declare function ArticleCompactTocComponent({ className, containerClassName, 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, }: ArticleCompactTocProps): react_jsx_runtime.JSX.Element;
|
|
153
|
+
declare function ArticleCompactTocComponent({ className, containerClassName, 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, spacing, pattern, patternOpacity, }: ArticleCompactTocProps): react_jsx_runtime.JSX.Element;
|
|
136
154
|
|
|
137
155
|
export { ArticleCompactTocComponent as ArticleCompactToc, type ArticleCompactTocProps, type ArticleCompactTocSection };
|