@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
|
@@ -453,169 +453,6 @@ var Pressable = React__namespace.forwardRef(
|
|
|
453
453
|
}
|
|
454
454
|
);
|
|
455
455
|
Pressable.displayName = "Pressable";
|
|
456
|
-
var svgCache = /* @__PURE__ */ new Map();
|
|
457
|
-
function DynamicIcon({
|
|
458
|
-
name,
|
|
459
|
-
size = 28,
|
|
460
|
-
color,
|
|
461
|
-
className,
|
|
462
|
-
alt
|
|
463
|
-
}) {
|
|
464
|
-
const [svgContent, setSvgContent] = React__namespace.useState(null);
|
|
465
|
-
const [isLoading, setIsLoading] = React__namespace.useState(true);
|
|
466
|
-
const [error, setError] = React__namespace.useState(null);
|
|
467
|
-
const { url, iconName } = React__namespace.useMemo(() => {
|
|
468
|
-
const separator = name.includes("/") ? "/" : ":";
|
|
469
|
-
const [prefix, iconName2] = name.split(separator);
|
|
470
|
-
const baseUrl = `https://icons.opensite.ai/api/icon/${prefix}/${iconName2}?format=svg&width=${size}&height=${size}`;
|
|
471
|
-
return {
|
|
472
|
-
url: baseUrl,
|
|
473
|
-
iconName: iconName2
|
|
474
|
-
};
|
|
475
|
-
}, [name, size]);
|
|
476
|
-
React__namespace.useEffect(() => {
|
|
477
|
-
let isMounted = true;
|
|
478
|
-
const fetchSvg = async () => {
|
|
479
|
-
const cached = svgCache.get(url);
|
|
480
|
-
if (cached) {
|
|
481
|
-
if (isMounted) {
|
|
482
|
-
setSvgContent(cached);
|
|
483
|
-
setIsLoading(false);
|
|
484
|
-
}
|
|
485
|
-
return;
|
|
486
|
-
}
|
|
487
|
-
try {
|
|
488
|
-
setIsLoading(true);
|
|
489
|
-
setError(null);
|
|
490
|
-
const response = await fetch(url);
|
|
491
|
-
if (!response.ok) {
|
|
492
|
-
throw new Error(`Failed to fetch icon: ${response.status}`);
|
|
493
|
-
}
|
|
494
|
-
let svg = await response.text();
|
|
495
|
-
svg = processSvgForCurrentColor(svg);
|
|
496
|
-
svgCache.set(url, svg);
|
|
497
|
-
if (isMounted) {
|
|
498
|
-
setSvgContent(svg);
|
|
499
|
-
setIsLoading(false);
|
|
500
|
-
}
|
|
501
|
-
} catch (err) {
|
|
502
|
-
if (isMounted) {
|
|
503
|
-
setError(err instanceof Error ? err.message : "Failed to load icon");
|
|
504
|
-
setIsLoading(false);
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
};
|
|
508
|
-
fetchSvg();
|
|
509
|
-
return () => {
|
|
510
|
-
isMounted = false;
|
|
511
|
-
};
|
|
512
|
-
}, [url]);
|
|
513
|
-
if (isLoading) {
|
|
514
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
515
|
-
"span",
|
|
516
|
-
{
|
|
517
|
-
className: cn("inline-block", className),
|
|
518
|
-
style: { width: size, height: size },
|
|
519
|
-
"aria-hidden": "true"
|
|
520
|
-
}
|
|
521
|
-
);
|
|
522
|
-
}
|
|
523
|
-
if (error || !svgContent) {
|
|
524
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
525
|
-
"span",
|
|
526
|
-
{
|
|
527
|
-
className: cn("inline-block", className),
|
|
528
|
-
style: { width: size, height: size },
|
|
529
|
-
role: "img",
|
|
530
|
-
"aria-label": alt || iconName
|
|
531
|
-
}
|
|
532
|
-
);
|
|
533
|
-
}
|
|
534
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
535
|
-
"span",
|
|
536
|
-
{
|
|
537
|
-
className: cn("inline-flex items-center justify-center", className),
|
|
538
|
-
style: {
|
|
539
|
-
width: size,
|
|
540
|
-
height: size,
|
|
541
|
-
color: color || "inherit"
|
|
542
|
-
},
|
|
543
|
-
role: "img",
|
|
544
|
-
"aria-label": alt || iconName,
|
|
545
|
-
dangerouslySetInnerHTML: { __html: svgContent }
|
|
546
|
-
}
|
|
547
|
-
);
|
|
548
|
-
}
|
|
549
|
-
function processSvgForCurrentColor(svg) {
|
|
550
|
-
let processed = svg;
|
|
551
|
-
processed = processed.replace(
|
|
552
|
-
/stroke=["'](#000000|#000|black)["']/gi,
|
|
553
|
-
'stroke="currentColor"'
|
|
554
|
-
);
|
|
555
|
-
processed = processed.replace(
|
|
556
|
-
/fill=["'](#000000|#000|black)["']/gi,
|
|
557
|
-
'fill="currentColor"'
|
|
558
|
-
);
|
|
559
|
-
return processed;
|
|
560
|
-
}
|
|
561
|
-
var alertVariants = classVarianceAuthority.cva(
|
|
562
|
-
"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
563
|
-
{
|
|
564
|
-
variants: {
|
|
565
|
-
variant: {
|
|
566
|
-
default: "bg-card text-card-foreground",
|
|
567
|
-
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
|
|
568
|
-
}
|
|
569
|
-
},
|
|
570
|
-
defaultVariants: {
|
|
571
|
-
variant: "default"
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
);
|
|
575
|
-
function Alert({
|
|
576
|
-
className,
|
|
577
|
-
variant,
|
|
578
|
-
...props
|
|
579
|
-
}) {
|
|
580
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
581
|
-
"div",
|
|
582
|
-
{
|
|
583
|
-
"data-slot": "alert",
|
|
584
|
-
role: "alert",
|
|
585
|
-
className: cn(alertVariants({ variant }), className),
|
|
586
|
-
...props
|
|
587
|
-
}
|
|
588
|
-
);
|
|
589
|
-
}
|
|
590
|
-
function AlertTitle({ className, ...props }) {
|
|
591
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
592
|
-
"div",
|
|
593
|
-
{
|
|
594
|
-
"data-slot": "alert-title",
|
|
595
|
-
className: cn(
|
|
596
|
-
"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
|
|
597
|
-
className
|
|
598
|
-
),
|
|
599
|
-
...props
|
|
600
|
-
}
|
|
601
|
-
);
|
|
602
|
-
}
|
|
603
|
-
function AlertDescription({
|
|
604
|
-
className,
|
|
605
|
-
...props
|
|
606
|
-
}) {
|
|
607
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
608
|
-
"div",
|
|
609
|
-
{
|
|
610
|
-
"data-slot": "alert-description",
|
|
611
|
-
className: cn(
|
|
612
|
-
"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
|
|
613
|
-
className
|
|
614
|
-
),
|
|
615
|
-
...props
|
|
616
|
-
}
|
|
617
|
-
);
|
|
618
|
-
}
|
|
619
456
|
function Avatar({
|
|
620
457
|
className,
|
|
621
458
|
...props
|
|
@@ -661,183 +498,379 @@ function AvatarFallback({
|
|
|
661
498
|
}
|
|
662
499
|
);
|
|
663
500
|
}
|
|
501
|
+
var maxWidthStyles = {
|
|
502
|
+
sm: "max-w-screen-sm",
|
|
503
|
+
md: "max-w-screen-md",
|
|
504
|
+
lg: "max-w-screen-lg",
|
|
505
|
+
xl: "max-w-7xl",
|
|
506
|
+
"2xl": "max-w-screen-2xl",
|
|
507
|
+
"4xl": "max-w-[1536px]",
|
|
508
|
+
full: "max-w-full"
|
|
509
|
+
};
|
|
510
|
+
var Container = React__namespace.default.forwardRef(
|
|
511
|
+
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
512
|
+
const Component = as;
|
|
513
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
514
|
+
Component,
|
|
515
|
+
{
|
|
516
|
+
ref,
|
|
517
|
+
className: cn(
|
|
518
|
+
"mx-auto w-full px-2 sm:px-4 lg:px-8",
|
|
519
|
+
maxWidthStyles[maxWidth],
|
|
520
|
+
className
|
|
521
|
+
),
|
|
522
|
+
...props,
|
|
523
|
+
children
|
|
524
|
+
}
|
|
525
|
+
);
|
|
526
|
+
}
|
|
527
|
+
);
|
|
528
|
+
Container.displayName = "Container";
|
|
664
529
|
|
|
665
|
-
// lib/
|
|
666
|
-
var
|
|
667
|
-
"https://
|
|
668
|
-
"https://
|
|
669
|
-
"https://
|
|
670
|
-
"https://
|
|
671
|
-
"https://
|
|
672
|
-
"https://
|
|
673
|
-
"https://
|
|
674
|
-
"https://
|
|
675
|
-
"https://
|
|
676
|
-
"https://
|
|
677
|
-
"https://
|
|
678
|
-
"https://
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
"
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
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
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
795
|
-
|
|
796
|
-
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
797
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", { children: "King's Treasury" }),
|
|
798
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", { children: "People's happiness" })
|
|
799
|
-
] }) }),
|
|
800
|
-
/* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
|
|
801
|
-
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
802
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { children: "Empty" }),
|
|
803
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { children: "Overflowing" })
|
|
804
|
-
] }),
|
|
805
|
-
/* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "m-0 border-t p-0 even:bg-muted", children: [
|
|
806
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { children: "Modest" }),
|
|
807
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { children: "Satisfied" })
|
|
808
|
-
] }),
|
|
809
|
-
/* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "m-0 border-t p-0 even:bg-muted", children: [
|
|
810
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { children: "Full" }),
|
|
811
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { children: "Ecstatic" })
|
|
812
|
-
] })
|
|
813
|
-
] })
|
|
814
|
-
] }) }),
|
|
815
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "The king, seeing how much happier his subjects were, realized the error of his ways and repealed the joke tax. Jokester was declared a hero, and the kingdom lived happily ever after." }),
|
|
816
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { children: "The King's Plan" }),
|
|
817
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
818
|
-
img.Img,
|
|
530
|
+
// lib/patternSvgs.ts
|
|
531
|
+
var patternSvgs = {
|
|
532
|
+
squareAltGrid: "https://cdn.ing/assets/files/record/286187/4gpn0yq2ptra8iwlvmwwv860ggwv",
|
|
533
|
+
grid1: "https://cdn.ing/assets/files/record/286186/nbdflpgp4ostrno079hygibsflp3",
|
|
534
|
+
noise: "https://cdn.ing/assets/i/r/286188/zrqcp9hynh3j7p2laihwzfbujgrl/noise.png",
|
|
535
|
+
dots: "https://cdn.ing/assets/files/record/286198/yfsjx9thvtxzhl2qtshxyhkrm524",
|
|
536
|
+
dotPattern: "https://cdn.ing/assets/files/record/286192/7ig0cku8aqbboiza8nuk6hw0nnsr",
|
|
537
|
+
dotPattern2: "https://cdn.ing/assets/files/record/286189/arez6gd2s7isn9i1o6c7sexdq7bl",
|
|
538
|
+
circles: "https://cdn.ing/assets/files/record/286190/gtmia3sncjtzetdshc20zf1d3c17",
|
|
539
|
+
waves: "https://cdn.ing/assets/files/record/286191/mqlb33fzxz9cdth1bx7if0wmpkp1",
|
|
540
|
+
crossPattern: "https://cdn.ing/assets/files/record/286193/9yfqwdbnqaipbp7fsb3wbzzmq472",
|
|
541
|
+
architect: "https://cdn.ing/assets/files/record/286194/vgs88ugpvyhxu13wqgy0acvae6re",
|
|
542
|
+
tinyCheckers: "https://cdn.ing/assets/files/record/286195/65efaknsw8kcpf9o3c2gybytsl5b",
|
|
543
|
+
p6: "https://cdn.ing/assets/i/r/286196/6kl0rqnd6mjk8j7e525fo8fo0vkc/p6.webp"
|
|
544
|
+
};
|
|
545
|
+
var maskTop = "radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%)";
|
|
546
|
+
var maskBottom = "radial-gradient(ellipse 100% 80% at 50% 100%, #000 50%, transparent 90%)";
|
|
547
|
+
var maskCenter = "radial-gradient(ellipse 60% 60% at 50% 50%, #000 30%, transparent 70%)";
|
|
548
|
+
var maskTopLeft = "radial-gradient(ellipse 80% 80% at 0% 0%, #000 50%, transparent 90%)";
|
|
549
|
+
var maskTopRight = "radial-gradient(ellipse 80% 80% at 100% 0%, #000 50%, transparent 90%)";
|
|
550
|
+
var maskBottomLeft = "radial-gradient(ellipse 80% 80% at 0% 100%, #000 50%, transparent 90%)";
|
|
551
|
+
var maskBottomRight = "radial-gradient(ellipse 80% 80% at 100% 100%, #000 50%, transparent 90%)";
|
|
552
|
+
var circuitBoardPattern = (id, mask) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
553
|
+
"svg",
|
|
554
|
+
{
|
|
555
|
+
className: "h-full w-full",
|
|
556
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
557
|
+
style: mask ? {
|
|
558
|
+
maskImage: mask,
|
|
559
|
+
WebkitMaskImage: mask
|
|
560
|
+
} : void 0,
|
|
561
|
+
children: [
|
|
562
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
563
|
+
"pattern",
|
|
564
|
+
{
|
|
565
|
+
id,
|
|
566
|
+
x: "0",
|
|
567
|
+
y: "0",
|
|
568
|
+
width: "100",
|
|
569
|
+
height: "100",
|
|
570
|
+
patternUnits: "userSpaceOnUse",
|
|
571
|
+
children: [
|
|
572
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
573
|
+
"path",
|
|
574
|
+
{
|
|
575
|
+
d: "M0 50h40M60 50h40M50 0v40M50 60v40",
|
|
576
|
+
stroke: "hsl(var(--muted))",
|
|
577
|
+
strokeWidth: "1",
|
|
578
|
+
fill: "none"
|
|
579
|
+
}
|
|
580
|
+
),
|
|
581
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "50", r: "3", fill: "hsl(var(--muted))" }),
|
|
582
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "0", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
|
|
583
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "100", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
|
|
584
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "0", r: "2", fill: "hsl(var(--muted))" }),
|
|
585
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "100", r: "2", fill: "hsl(var(--muted))" })
|
|
586
|
+
]
|
|
587
|
+
}
|
|
588
|
+
) }),
|
|
589
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
|
|
590
|
+
]
|
|
591
|
+
}
|
|
592
|
+
);
|
|
593
|
+
var gridDotsPattern = (id, mask) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
594
|
+
"svg",
|
|
595
|
+
{
|
|
596
|
+
className: "h-full w-full",
|
|
597
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
598
|
+
style: mask ? {
|
|
599
|
+
maskImage: mask,
|
|
600
|
+
WebkitMaskImage: mask
|
|
601
|
+
} : void 0,
|
|
602
|
+
children: [
|
|
603
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
604
|
+
"pattern",
|
|
605
|
+
{
|
|
606
|
+
id,
|
|
607
|
+
x: "0",
|
|
608
|
+
y: "0",
|
|
609
|
+
width: "40",
|
|
610
|
+
height: "40",
|
|
611
|
+
patternUnits: "userSpaceOnUse",
|
|
612
|
+
children: [
|
|
613
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
614
|
+
"path",
|
|
615
|
+
{
|
|
616
|
+
d: "M0 20h40M20 0v40",
|
|
617
|
+
stroke: "hsl(var(--muted))",
|
|
618
|
+
strokeWidth: "0.5",
|
|
619
|
+
fill: "none"
|
|
620
|
+
}
|
|
621
|
+
),
|
|
622
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "20", cy: "20", r: "2", fill: "hsl(var(--muted))" })
|
|
623
|
+
]
|
|
624
|
+
}
|
|
625
|
+
) }),
|
|
626
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
|
|
627
|
+
]
|
|
628
|
+
}
|
|
629
|
+
);
|
|
630
|
+
var gridPattern = (size, mask) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
631
|
+
"div",
|
|
632
|
+
{
|
|
633
|
+
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)]",
|
|
634
|
+
style: {
|
|
635
|
+
backgroundSize: `${size}px ${size}px`,
|
|
636
|
+
...mask ? {
|
|
637
|
+
maskImage: mask,
|
|
638
|
+
WebkitMaskImage: mask
|
|
639
|
+
} : {}
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
);
|
|
643
|
+
var diagonalCrossPattern = (mask) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
644
|
+
"div",
|
|
645
|
+
{
|
|
646
|
+
className: "h-full w-full",
|
|
647
|
+
style: {
|
|
648
|
+
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)",
|
|
649
|
+
...mask ? {
|
|
650
|
+
maskImage: mask,
|
|
651
|
+
WebkitMaskImage: mask
|
|
652
|
+
} : {}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
);
|
|
656
|
+
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)";
|
|
657
|
+
var dashedGridPattern = (fadeMask) => {
|
|
658
|
+
const mask = fadeMask ? `${dashedGridMaskBase}, ${fadeMask}` : dashedGridMaskBase;
|
|
659
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
660
|
+
"div",
|
|
819
661
|
{
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
662
|
+
className: "h-full w-full",
|
|
663
|
+
style: {
|
|
664
|
+
backgroundImage: "linear-gradient(to right, hsl(var(--muted)) 1px, transparent 1px), linear-gradient(to bottom, hsl(var(--muted)) 1px, transparent 1px)",
|
|
665
|
+
backgroundSize: "20px 20px",
|
|
666
|
+
backgroundPosition: "0 0, 0 0",
|
|
667
|
+
maskImage: mask,
|
|
668
|
+
WebkitMaskImage: mask,
|
|
669
|
+
maskComposite: "intersect",
|
|
670
|
+
WebkitMaskComposite: "source-in"
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
);
|
|
674
|
+
};
|
|
675
|
+
var gradientGlow = (position) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
676
|
+
"div",
|
|
677
|
+
{
|
|
678
|
+
className: cn(
|
|
679
|
+
"pointer-events-none absolute left-1/2 z-0 aspect-square w-3/4 -translate-x-1/2 rounded-full opacity-50 blur-3xl",
|
|
680
|
+
position === "top" ? "-top-1/4" : "-bottom-1/4"
|
|
681
|
+
),
|
|
682
|
+
style: {
|
|
683
|
+
background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
);
|
|
687
|
+
var spotlight = (position) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
688
|
+
"div",
|
|
689
|
+
{
|
|
690
|
+
className: cn(
|
|
691
|
+
"pointer-events-none absolute top-1/2 z-0 aspect-square w-3/4 -translate-y-1/2 rounded-full opacity-40 blur-3xl",
|
|
692
|
+
position === "left" ? "-left-1/4" : "-right-1/4"
|
|
693
|
+
),
|
|
694
|
+
style: {
|
|
695
|
+
background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
|
|
824
696
|
}
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
697
|
+
}
|
|
698
|
+
);
|
|
699
|
+
var patternOverlays = {
|
|
700
|
+
circuitBoardBasic: () => circuitBoardPattern("circuit-board-basic"),
|
|
701
|
+
circuitBoardFadeTop: () => circuitBoardPattern("circuit-board-fade-top", maskTop),
|
|
702
|
+
circuitBoardFadeBottom: () => circuitBoardPattern("circuit-board-fade-bottom", maskBottom),
|
|
703
|
+
circuitBoardFadeCenter: () => circuitBoardPattern("circuit-board-fade-center", maskCenter),
|
|
704
|
+
circuitBoardFadeTopLeft: () => circuitBoardPattern("circuit-board-fade-top-left", maskTopLeft),
|
|
705
|
+
circuitBoardFadeTopRight: () => circuitBoardPattern("circuit-board-fade-top-right", maskTopRight),
|
|
706
|
+
circuitBoardFadeBottomLeft: () => circuitBoardPattern("circuit-board-fade-bottom-left", maskBottomLeft),
|
|
707
|
+
circuitBoardFadeBottomRight: () => circuitBoardPattern("circuit-board-fade-bottom-right", maskBottomRight),
|
|
708
|
+
dashedGridBasic: () => dashedGridPattern(),
|
|
709
|
+
dashedGridFadeTop: () => dashedGridPattern(maskTop),
|
|
710
|
+
dashedGridFadeBottom: () => dashedGridPattern(maskBottom),
|
|
711
|
+
dashedGridFadeCenter: () => dashedGridPattern(maskCenter),
|
|
712
|
+
dashedGridFadeTopLeft: () => dashedGridPattern(maskTopLeft),
|
|
713
|
+
dashedGridFadeTopRight: () => dashedGridPattern(maskTopRight),
|
|
714
|
+
dashedGridFadeBottomLeft: () => dashedGridPattern(maskBottomLeft),
|
|
715
|
+
dashedGridFadeBottomRight: () => dashedGridPattern(maskBottomRight),
|
|
716
|
+
diagonalCrossBasic: () => diagonalCrossPattern(),
|
|
717
|
+
diagonalCrossFadeTop: () => diagonalCrossPattern(maskTop),
|
|
718
|
+
diagonalCrossFadeBottom: () => diagonalCrossPattern(maskBottom),
|
|
719
|
+
diagonalCrossFadeCenter: () => diagonalCrossPattern(maskCenter),
|
|
720
|
+
diagonalCrossFadeTopLeft: () => diagonalCrossPattern(maskTopLeft),
|
|
721
|
+
diagonalCrossFadeTopRight: () => diagonalCrossPattern(maskTopRight),
|
|
722
|
+
diagonalCrossFadeBottomLeft: () => diagonalCrossPattern(maskBottomLeft),
|
|
723
|
+
diagonalCrossFadeBottomRight: () => diagonalCrossPattern(maskBottomRight),
|
|
724
|
+
gridBasic: () => gridPattern(40),
|
|
725
|
+
gridFadeTop: () => gridPattern(32, maskTop),
|
|
726
|
+
gridFadeBottom: () => gridPattern(32, maskBottom),
|
|
727
|
+
gridFadeCenter: () => gridPattern(40, maskCenter),
|
|
728
|
+
gridFadeTopLeft: () => gridPattern(32, maskTopLeft),
|
|
729
|
+
gridFadeTopRight: () => gridPattern(32, maskTopRight),
|
|
730
|
+
gridFadeBottomLeft: () => gridPattern(32, maskBottomLeft),
|
|
731
|
+
gridFadeBottomRight: () => gridPattern(32, maskBottomRight),
|
|
732
|
+
gridDotsBasic: () => gridDotsPattern("grid-dots-basic"),
|
|
733
|
+
gridDotsFadeCenter: () => gridDotsPattern("grid-dots-fade-center", maskCenter),
|
|
734
|
+
gradientGlowTop: () => gradientGlow("top"),
|
|
735
|
+
gradientGlowBottom: () => gradientGlow("bottom"),
|
|
736
|
+
spotlightLeft: () => spotlight("left"),
|
|
737
|
+
spotlightRight: () => spotlight("right")
|
|
738
|
+
};
|
|
739
|
+
var inlinePatternStyles = {
|
|
740
|
+
radialGradientTop: {
|
|
741
|
+
background: "radial-gradient(125% 125% at 50% 10%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
|
|
742
|
+
},
|
|
743
|
+
radialGradientBottom: {
|
|
744
|
+
background: "radial-gradient(125% 125% at 50% 90%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
|
|
745
|
+
}
|
|
746
|
+
};
|
|
747
|
+
function PatternBackground({
|
|
748
|
+
pattern,
|
|
749
|
+
opacity = 0.08,
|
|
750
|
+
className,
|
|
751
|
+
style
|
|
752
|
+
}) {
|
|
753
|
+
if (!pattern) {
|
|
754
|
+
return null;
|
|
755
|
+
}
|
|
756
|
+
if (pattern in inlinePatternStyles) {
|
|
757
|
+
const inlineStyle = inlinePatternStyles[pattern];
|
|
758
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
759
|
+
"div",
|
|
760
|
+
{
|
|
761
|
+
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
762
|
+
style: { ...inlineStyle, opacity, ...style },
|
|
763
|
+
"aria-hidden": "true"
|
|
764
|
+
}
|
|
765
|
+
);
|
|
766
|
+
}
|
|
767
|
+
if (pattern in patternOverlays) {
|
|
768
|
+
const Overlay = patternOverlays[pattern];
|
|
769
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
770
|
+
"div",
|
|
771
|
+
{
|
|
772
|
+
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
773
|
+
style: { opacity, ...style },
|
|
774
|
+
"aria-hidden": "true",
|
|
775
|
+
children: Overlay()
|
|
776
|
+
}
|
|
777
|
+
);
|
|
778
|
+
}
|
|
779
|
+
const patternUrl = pattern in patternSvgs ? patternSvgs[pattern] : pattern;
|
|
780
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
781
|
+
"div",
|
|
782
|
+
{
|
|
783
|
+
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
784
|
+
style: {
|
|
785
|
+
backgroundImage: `url(${patternUrl})`,
|
|
786
|
+
backgroundRepeat: "repeat",
|
|
787
|
+
backgroundSize: "auto",
|
|
788
|
+
opacity,
|
|
789
|
+
...style
|
|
790
|
+
},
|
|
791
|
+
"aria-hidden": "true"
|
|
792
|
+
}
|
|
793
|
+
);
|
|
794
|
+
}
|
|
795
|
+
var backgroundStyles = {
|
|
796
|
+
default: "bg-background text-foreground",
|
|
797
|
+
white: "bg-white text-dark",
|
|
798
|
+
gray: "bg-muted/30 text-foreground",
|
|
799
|
+
dark: "bg-foreground text-background",
|
|
800
|
+
transparent: "bg-transparent text-foreground",
|
|
801
|
+
gradient: "bg-linear-to-br from-primary via-primary/90 to-foreground text-primary-foreground",
|
|
802
|
+
primary: "bg-primary text-primary-foreground",
|
|
803
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
804
|
+
muted: "bg-muted text-muted-foreground"
|
|
805
|
+
};
|
|
806
|
+
var spacingStyles = {
|
|
807
|
+
none: "py-0 md:py-0",
|
|
808
|
+
sm: "py-12 md:py-16",
|
|
809
|
+
md: "py-16 md:py-24",
|
|
810
|
+
lg: "py-20 md:py-32",
|
|
811
|
+
xl: "py-24 md:py-40"
|
|
812
|
+
};
|
|
813
|
+
var Section = React__namespace.default.forwardRef(
|
|
814
|
+
({
|
|
815
|
+
id,
|
|
816
|
+
title,
|
|
817
|
+
subtitle,
|
|
818
|
+
children,
|
|
819
|
+
className,
|
|
820
|
+
style,
|
|
821
|
+
background = "default",
|
|
822
|
+
spacing = "lg",
|
|
823
|
+
pattern,
|
|
824
|
+
patternOpacity,
|
|
825
|
+
patternClassName,
|
|
826
|
+
containerClassName,
|
|
827
|
+
containerMaxWidth = "xl",
|
|
828
|
+
...props
|
|
829
|
+
}, ref) => {
|
|
830
|
+
const effectivePatternOpacity = patternOpacity !== void 0 ? patternOpacity : pattern ? 1 : 0;
|
|
831
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
832
|
+
"section",
|
|
833
|
+
{
|
|
834
|
+
ref,
|
|
835
|
+
id,
|
|
836
|
+
className: cn(
|
|
837
|
+
"relative",
|
|
838
|
+
pattern ? "overflow-hidden" : null,
|
|
839
|
+
backgroundStyles[background],
|
|
840
|
+
spacingStyles[spacing],
|
|
841
|
+
className
|
|
842
|
+
),
|
|
843
|
+
style,
|
|
844
|
+
...props,
|
|
845
|
+
children: [
|
|
846
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
847
|
+
PatternBackground,
|
|
848
|
+
{
|
|
849
|
+
pattern,
|
|
850
|
+
opacity: effectivePatternOpacity,
|
|
851
|
+
className: patternClassName
|
|
852
|
+
}
|
|
853
|
+
),
|
|
854
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
855
|
+
Container,
|
|
856
|
+
{
|
|
857
|
+
maxWidth: containerMaxWidth,
|
|
858
|
+
className: cn("relative z-10", containerClassName),
|
|
859
|
+
children: [
|
|
860
|
+
(title || subtitle) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-12 text-center md:mb-16", children: [
|
|
861
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-sm font-semibold uppercase tracking-wider text-primary", children: subtitle }),
|
|
862
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl", children: title })
|
|
863
|
+
] }),
|
|
864
|
+
children
|
|
865
|
+
]
|
|
866
|
+
}
|
|
867
|
+
)
|
|
868
|
+
]
|
|
869
|
+
}
|
|
870
|
+
);
|
|
871
|
+
}
|
|
872
|
+
);
|
|
873
|
+
Section.displayName = "Section";
|
|
841
874
|
function ArticleHeroProseComponent({
|
|
842
875
|
post,
|
|
843
876
|
className,
|
|
@@ -852,7 +885,11 @@ function ArticleHeroProseComponent({
|
|
|
852
885
|
authorSlot,
|
|
853
886
|
children,
|
|
854
887
|
dateFormat = "MMMM d, yyyy",
|
|
855
|
-
optixFlowConfig
|
|
888
|
+
optixFlowConfig,
|
|
889
|
+
background,
|
|
890
|
+
spacing,
|
|
891
|
+
pattern,
|
|
892
|
+
patternOpacity
|
|
856
893
|
}) {
|
|
857
894
|
const { title, authorName, authorHref, image, pubDate, description, authorImage } = post ?? {};
|
|
858
895
|
const authorContent = React__namespace.useMemo(() => {
|
|
@@ -885,15 +922,25 @@ function ArticleHeroProseComponent({
|
|
|
885
922
|
}
|
|
886
923
|
);
|
|
887
924
|
}, [heroMediaSlot, image, heroImageClassName, optixFlowConfig]);
|
|
888
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
925
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
926
|
+
Section,
|
|
927
|
+
{
|
|
928
|
+
background,
|
|
929
|
+
spacing,
|
|
930
|
+
pattern,
|
|
931
|
+
patternOpacity,
|
|
932
|
+
className,
|
|
933
|
+
children: [
|
|
934
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("container", containerClassName), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mx-auto flex max-w-5xl flex-col items-center gap-4 text-center", headerClassName), children: [
|
|
935
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h1", { className: cn("max-w-3xl text-5xl font-semibold text-pretty md:text-6xl", titleClassName), children: title }),
|
|
936
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn("max-w-3xl text-lg text-muted-foreground md:text-xl", descriptionClassName), children: description }),
|
|
937
|
+
authorContent,
|
|
938
|
+
heroMediaContent
|
|
939
|
+
] }) }),
|
|
940
|
+
children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("container", containerClassName), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mx-auto prose max-w-3xl dark:prose-invert", proseClassName), children }) })
|
|
941
|
+
]
|
|
942
|
+
}
|
|
943
|
+
);
|
|
897
944
|
}
|
|
898
945
|
|
|
899
946
|
exports.ArticleHeroProse = ArticleHeroProseComponent;
|