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