@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 React5 = 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 React5__namespace = /*#__PURE__*/_interopNamespace(React5);
|
|
32
32
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
33
33
|
|
|
34
34
|
// components/blocks/article/article-toc-sidebar.tsx
|
|
@@ -110,7 +110,7 @@ function useNavigation({
|
|
|
110
110
|
href,
|
|
111
111
|
onClick
|
|
112
112
|
} = {}) {
|
|
113
|
-
const linkType =
|
|
113
|
+
const linkType = React5__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 = React5__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 = React5__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 = React5__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 = React5__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 = React5__namespace.forwardRef(
|
|
359
359
|
({
|
|
360
360
|
children,
|
|
361
361
|
className,
|
|
@@ -453,169 +453,6 @@ var Pressable = React4__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] = React4__namespace.useState(null);
|
|
465
|
-
const [isLoading, setIsLoading] = React4__namespace.useState(true);
|
|
466
|
-
const [error, setError] = React4__namespace.useState(null);
|
|
467
|
-
const { url, iconName } = React4__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
|
-
React4__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
|
|
@@ -693,169 +530,379 @@ function Badge({
|
|
|
693
530
|
}
|
|
694
531
|
);
|
|
695
532
|
}
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
"
|
|
700
|
-
"
|
|
701
|
-
"
|
|
702
|
-
"
|
|
703
|
-
"
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
"
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
"https://toastability-production.s3.amazonaws.com/qhz2kawawq3bbh7nusz3bvahln3v",
|
|
711
|
-
"https://toastability-production.s3.amazonaws.com/zykfhuapdqzu94ee1535gsgnvyac",
|
|
712
|
-
"https://toastability-production.s3.amazonaws.com/kh1p8y15v55ctp5ulobm4pd77etm",
|
|
713
|
-
"https://toastability-production.s3.amazonaws.com/8x62o6350p1ejm3pjrp1jwvcbh4v",
|
|
714
|
-
"https://toastability-production.s3.amazonaws.com/vvixyoo7ybq3h04q2q0kact0s5wc",
|
|
715
|
-
"https://toastability-production.s3.amazonaws.com/t502cfynqso7ntkdvmcmfc87yjkt",
|
|
716
|
-
"https://toastability-production.s3.amazonaws.com/ihgx63s5nfzp2e93e3ccljjnnrov",
|
|
717
|
-
"https://toastability-production.s3.amazonaws.com/b555hwjt7ltr81et05v5254q1ak6",
|
|
718
|
-
"https://toastability-production.s3.amazonaws.com/c4sgsy0g7o2rrjmvm9x7evxems82",
|
|
719
|
-
"https://toastability-production.s3.amazonaws.com/a3m42usevv0iet0fpfwa1fsytxmv",
|
|
720
|
-
"https://toastability-production.s3.amazonaws.com/qghzqu1i99vaubyew9s5dxcbel9l",
|
|
721
|
-
"https://toastability-production.s3.amazonaws.com/9covpitzpuuobkg1m4mfokpi0enw",
|
|
722
|
-
"https://toastability-production.s3.amazonaws.com/2d4k8d5shwg82276hzj2ztbj7mxq",
|
|
723
|
-
"https://toastability-production.s3.amazonaws.com/op92dycs7w856e2jsvx20st0nyz9",
|
|
724
|
-
"https://toastability-production.s3.amazonaws.com/f921uoblxbv8f9bmr4s2ik7xxugl",
|
|
725
|
-
"https://toastability-production.s3.amazonaws.com/gl7n7p6atndufbsm6q2ac5jeqttp",
|
|
726
|
-
"https://toastability-production.s3.amazonaws.com/sj8cs2gpbanaowqwxar1uhhwd23z",
|
|
727
|
-
"https://toastability-production.s3.amazonaws.com/hu4gmd93sp95wdyr9qijze0rgim9",
|
|
728
|
-
"https://toastability-production.s3.amazonaws.com/uh2vd59np82h8sevbmfnsha89sf1",
|
|
729
|
-
"https://toastability-production.s3.amazonaws.com/gxs6zevccphti0hdq5l9fwytprpr",
|
|
730
|
-
"https://toastability-production.s3.amazonaws.com/s4vho0wfbjhf758oife8qfuekou8",
|
|
731
|
-
"https://toastability-production.s3.amazonaws.com/1b0gd8ul22q799d62dvm3sgyll85",
|
|
732
|
-
"https://toastability-production.s3.amazonaws.com/102grjqg8aigxkj585s9x3xbxfv7",
|
|
733
|
-
"https://toastability-production.s3.amazonaws.com/dvz0441h9fxjhh88lzqbwdoyxv52",
|
|
734
|
-
"https://toastability-production.s3.amazonaws.com/50y066ms7rb5sw62u9u08jzkk8rj",
|
|
735
|
-
"https://toastability-production.s3.amazonaws.com/9uxe0jw1zl1tujy0m5yalo7m2ht8",
|
|
736
|
-
"https://toastability-production.s3.amazonaws.com/cyhcpla6me8vs936i3fw6wbhypi2",
|
|
737
|
-
"https://toastability-production.s3.amazonaws.com/6ntdz6xwid3fswjz8y0otdxmzs40",
|
|
738
|
-
"https://toastability-production.s3.amazonaws.com/y1aezpa78m2fhfvj8whcx337y9cb",
|
|
739
|
-
"https://toastability-production.s3.amazonaws.com/eoa76d31ynbg34urr6e4619la1f7",
|
|
740
|
-
"https://toastability-production.s3.amazonaws.com/0mh8a1dg7ftcqnyzgv303u501c8y",
|
|
741
|
-
"https://toastability-production.s3.amazonaws.com/vvucxqs128w2d0z3n4s2z131rq7p",
|
|
742
|
-
"https://toastability-production.s3.amazonaws.com/2rbqbw9778770i8izdeabx8v2w2k",
|
|
743
|
-
"https://toastability-production.s3.amazonaws.com/90rcw2mljzpeuxlac8q77mor15xz",
|
|
744
|
-
"https://toastability-production.s3.amazonaws.com/vh1aowwr93yz4qrzct2s4je0cxdo",
|
|
745
|
-
"https://toastability-production.s3.amazonaws.com/ssgb7unxdwdqokfvhkp7cok2v79s",
|
|
746
|
-
"https://toastability-production.s3.amazonaws.com/vvkma6b8whdkiq5nq8z4eyfe00vo",
|
|
747
|
-
"https://toastability-production.s3.amazonaws.com/9797jh6slgbf9oq6lzlimcdiuziv",
|
|
748
|
-
"https://toastability-production.s3.amazonaws.com/betxbx61fkijt0aygineplf489ze",
|
|
749
|
-
"https://toastability-production.s3.amazonaws.com/0o6d7z4mm9nzeufhv9kefrhihbip",
|
|
750
|
-
"https://toastability-production.s3.amazonaws.com/1xdx70c7gp9l883soyh5d3exesvt",
|
|
751
|
-
"https://toastability-production.s3.amazonaws.com/jhjfvkmdzktacyijd9fh6acc7o2c",
|
|
752
|
-
"https://toastability-production.s3.amazonaws.com/n001o4pfpszmyw03ubctig7kvf0e",
|
|
753
|
-
"https://toastability-production.s3.amazonaws.com/l080sx0lcx51x44dqrb8006nqf08",
|
|
754
|
-
"https://toastability-production.s3.amazonaws.com/2t36c7l0ywchaz4nys8yj2l5amae",
|
|
755
|
-
"https://toastability-production.s3.amazonaws.com/gg5qnvb4nsl2k3g4dw4ls8bsllwh",
|
|
756
|
-
"https://toastability-production.s3.amazonaws.com/3nqc7xvjy3e8d7jo1gdvbzty0oqg",
|
|
757
|
-
"https://toastability-production.s3.amazonaws.com/0kx9umbfmv881wt9dfqnohv8efgi",
|
|
758
|
-
"https://toastability-production.s3.amazonaws.com/9z0sbfnskx70vse99e3dfhper7i1",
|
|
759
|
-
"https://toastability-production.s3.amazonaws.com/9keidwrag6g7jtqr7rdwb1ryt6ht",
|
|
760
|
-
"https://toastability-production.s3.amazonaws.com/zm88vf14geh1gh0frd3yrdlb6pl8",
|
|
761
|
-
"https://toastability-production.s3.amazonaws.com/0x7ktdk01jfaoysst0emzvqevu19",
|
|
762
|
-
"https://toastability-production.s3.amazonaws.com/e83zsyvl0an0owzdmpwjnnty641x",
|
|
763
|
-
"https://toastability-production.s3.amazonaws.com/t3k42fbzq7r7j93feldqm5cj1o1n",
|
|
764
|
-
"https://toastability-production.s3.amazonaws.com/5sm6wc4no8fyzxfki5njmnv6gql5",
|
|
765
|
-
"https://toastability-production.s3.amazonaws.com/w41h7890eivogu3sr78vlwkpzz8g",
|
|
766
|
-
"https://toastability-production.s3.amazonaws.com/vrezhtksoqbw1nyo4hwnoqizrus5",
|
|
767
|
-
"https://toastability-production.s3.amazonaws.com/8qkikcd43paeqgvw9gc1032j3yup",
|
|
768
|
-
"https://toastability-production.s3.amazonaws.com/ihhq8unynafk4aikmys3rhbfibaz",
|
|
769
|
-
"https://toastability-production.s3.amazonaws.com/rews5enr9ynu6izioj66s8ec90nc",
|
|
770
|
-
"https://toastability-production.s3.amazonaws.com/6ku135fhv528eei3agnoc3zd7y75",
|
|
771
|
-
"https://toastability-production.s3.amazonaws.com/x4scuzhsozrwrg703df5wbhygkgo",
|
|
772
|
-
"https://toastability-production.s3.amazonaws.com/73e0s79u4crdu7cmjfp99j1l2v55",
|
|
773
|
-
"https://toastability-production.s3.amazonaws.com/rddfyzvfpdlbzwhgep2myppwxn05",
|
|
774
|
-
"https://toastability-production.s3.amazonaws.com/mat88x8zzdek7wpgtocjrehfivsh",
|
|
775
|
-
"https://toastability-production.s3.amazonaws.com/3vwfdbekbkskxj2mvlvu85fz787u",
|
|
776
|
-
"https://toastability-production.s3.amazonaws.com/ms4s4zyqpmboh0slez1cwat9qhw4",
|
|
777
|
-
"https://toastability-production.s3.amazonaws.com/5jsc0b4e3gxnjs81iotw2c3e6da3",
|
|
778
|
-
"https://toastability-production.s3.amazonaws.com/0g6t701zqr2r7najmdgftpeqnxmz",
|
|
779
|
-
"https://toastability-production.s3.amazonaws.com/u3p1hlbm2c1vvkwlm8h668pe132z",
|
|
780
|
-
"https://toastability-production.s3.amazonaws.com/ehgbcugs782765ke1l2dtbtzd918",
|
|
781
|
-
"https://toastability-production.s3.amazonaws.com/kka8f550on7acx1lf82xleu6zhzo",
|
|
782
|
-
"https://toastability-production.s3.amazonaws.com/67fnapqepn7f8vwt0x4nqho70hbz",
|
|
783
|
-
"https://toastability-production.s3.amazonaws.com/t4cidbsfz3z468bn45yqdrkbx7ou",
|
|
784
|
-
"https://toastability-production.s3.amazonaws.com/gq3c9qalkiomu0rzdzxymkdaazdu",
|
|
785
|
-
"https://toastability-production.s3.amazonaws.com/9ujya2tfhxja7y5s9wb7d2u8crhd",
|
|
786
|
-
"https://toastability-production.s3.amazonaws.com/hotlo54tsvl2k3eht9gg0460l9zw",
|
|
787
|
-
"https://toastability-production.s3.amazonaws.com/ytbyjrcvrghc7wl6w1g7g8fwka22",
|
|
788
|
-
"https://toastability-production.s3.amazonaws.com/uv0g605yf5mz106nrm1uspt9l0rr",
|
|
789
|
-
"https://toastability-production.s3.amazonaws.com/yrp5k5xszwpe26fquupey6a6g0uu",
|
|
790
|
-
"https://toastability-production.s3.amazonaws.com/97gctpna2hdozl1f8u5xq4ew8h0o",
|
|
791
|
-
"https://toastability-production.s3.amazonaws.com/xjtepune0scj9yjkkqgaiwlq9hls",
|
|
792
|
-
"https://toastability-production.s3.amazonaws.com/g607vblaarqctl1cvgxffhx4pw6g",
|
|
793
|
-
"https://toastability-production.s3.amazonaws.com/4xpu1ljr9c8g6qzmfum5ygjzbzpb",
|
|
794
|
-
"https://toastability-production.s3.amazonaws.com/yw5f7iwyypf4kctpr5ye5e495swt",
|
|
795
|
-
"https://toastability-production.s3.amazonaws.com/z37cidvud212bzqhhalrhvk7ipaa",
|
|
796
|
-
"https://toastability-production.s3.amazonaws.com/pfllskt7q7144l288lrnpc6gx606",
|
|
797
|
-
"https://toastability-production.s3.amazonaws.com/fokd3hxzvdtsomagbfhqooyvndyv",
|
|
798
|
-
"https://toastability-production.s3.amazonaws.com/6fffnb4phovtqkjhtzifs4rhb84u",
|
|
799
|
-
"https://toastability-production.s3.amazonaws.com/mt87xjr79wxdhjy7496v3r6m2m9t",
|
|
800
|
-
"https://toastability-production.s3.amazonaws.com/3dy9ge962uarlaf2xl7imdcviqgx",
|
|
801
|
-
"https://toastability-production.s3.amazonaws.com/okf6fg4n9yv59up8ivgcdjy3w030",
|
|
802
|
-
"https://toastability-production.s3.amazonaws.com/t7iteqw4xhtppkiws88bsoia25hv",
|
|
803
|
-
"https://toastability-production.s3.amazonaws.com/klr5tuvulkyqfb721txtu4hgzxdm",
|
|
804
|
-
"https://toastability-production.s3.amazonaws.com/9eddibiq5ovc9cvs3ekijkrjpahg",
|
|
805
|
-
"https://toastability-production.s3.amazonaws.com/3ghn8dz3g9qtt4pf4nwbriaydvzb",
|
|
806
|
-
"https://toastability-production.s3.amazonaws.com/82ykd8s8boiqaxypkulb0v0s2qiw",
|
|
807
|
-
"https://toastability-production.s3.amazonaws.com/4eqmdeanxfk6jzvigo42y5ryv2c8",
|
|
808
|
-
"https://toastability-production.s3.amazonaws.com/9ughnl9wnko2vdboib8n3wl3cxsy",
|
|
809
|
-
"https://toastability-production.s3.amazonaws.com/4xjcgtlwseruezhoh3o1ga4umhj4",
|
|
810
|
-
"https://toastability-production.s3.amazonaws.com/xwh1zzxgyd887thfm1j9lu9qnd6c",
|
|
811
|
-
"https://toastability-production.s3.amazonaws.com/ri0dqx79spe6771np76mkmno5xfd",
|
|
812
|
-
"https://toastability-production.s3.amazonaws.com/e13qu3083lkhdg7th64vb628172a",
|
|
813
|
-
"https://toastability-production.s3.amazonaws.com/w87w0fyjdol9yzwo7yywkgxidvzo"
|
|
814
|
-
];
|
|
815
|
-
var defaultArticleContent = (optixFlowConfig) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
816
|
-
/* @__PURE__ */ jsxRuntime.jsxs("section", { id: "introduction", children: [
|
|
817
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { children: "Introduction" }),
|
|
818
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "Building scalable applications requires careful consideration of architecture, design patterns, and infrastructure. In this guide, we'll explore the key principles that enable applications to grow gracefully with increasing demand." }),
|
|
819
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Alert, { children: [
|
|
820
|
-
/* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/lightbulb", size: 16 }),
|
|
821
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertTitle, { children: "Pro Tip" }),
|
|
822
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertDescription, { children: "Start with a simple architecture and evolve it as your needs grow. Premature optimization can lead to unnecessary complexity." })
|
|
823
|
-
] })
|
|
824
|
-
] }),
|
|
825
|
-
/* @__PURE__ */ jsxRuntime.jsxs("section", { id: "getting-started", children: [
|
|
826
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { children: "Getting Started" }),
|
|
827
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "Before diving into complex architectural patterns, ensure you have a solid understanding of your application's requirements. Consider factors like expected traffic, data volume, and team expertise." }),
|
|
828
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "A well-designed system starts with clear requirements and constraints. Document your assumptions and validate them with stakeholders before making architectural decisions." })
|
|
829
|
-
] }),
|
|
830
|
-
/* @__PURE__ */ jsxRuntime.jsxs("section", { id: "core-concepts", children: [
|
|
831
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { children: "Core Concepts" }),
|
|
832
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "Scalability encompasses both horizontal and vertical scaling strategies. Horizontal scaling adds more machines to handle load, while vertical scaling increases the capacity of existing machines." }),
|
|
833
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
834
|
-
img.Img,
|
|
533
|
+
var maxWidthStyles = {
|
|
534
|
+
sm: "max-w-screen-sm",
|
|
535
|
+
md: "max-w-screen-md",
|
|
536
|
+
lg: "max-w-screen-lg",
|
|
537
|
+
xl: "max-w-7xl",
|
|
538
|
+
"2xl": "max-w-screen-2xl",
|
|
539
|
+
"4xl": "max-w-[1536px]",
|
|
540
|
+
full: "max-w-full"
|
|
541
|
+
};
|
|
542
|
+
var Container = React5__namespace.default.forwardRef(
|
|
543
|
+
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
544
|
+
const Component = as;
|
|
545
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
546
|
+
Component,
|
|
835
547
|
{
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
548
|
+
ref,
|
|
549
|
+
className: cn(
|
|
550
|
+
"mx-auto w-full px-2 sm:px-4 lg:px-8",
|
|
551
|
+
maxWidthStyles[maxWidth],
|
|
552
|
+
className
|
|
553
|
+
),
|
|
554
|
+
...props,
|
|
555
|
+
children
|
|
840
556
|
}
|
|
557
|
+
);
|
|
558
|
+
}
|
|
559
|
+
);
|
|
560
|
+
Container.displayName = "Container";
|
|
561
|
+
|
|
562
|
+
// lib/patternSvgs.ts
|
|
563
|
+
var patternSvgs = {
|
|
564
|
+
squareAltGrid: "https://cdn.ing/assets/files/record/286187/4gpn0yq2ptra8iwlvmwwv860ggwv",
|
|
565
|
+
grid1: "https://cdn.ing/assets/files/record/286186/nbdflpgp4ostrno079hygibsflp3",
|
|
566
|
+
noise: "https://cdn.ing/assets/i/r/286188/zrqcp9hynh3j7p2laihwzfbujgrl/noise.png",
|
|
567
|
+
dots: "https://cdn.ing/assets/files/record/286198/yfsjx9thvtxzhl2qtshxyhkrm524",
|
|
568
|
+
dotPattern: "https://cdn.ing/assets/files/record/286192/7ig0cku8aqbboiza8nuk6hw0nnsr",
|
|
569
|
+
dotPattern2: "https://cdn.ing/assets/files/record/286189/arez6gd2s7isn9i1o6c7sexdq7bl",
|
|
570
|
+
circles: "https://cdn.ing/assets/files/record/286190/gtmia3sncjtzetdshc20zf1d3c17",
|
|
571
|
+
waves: "https://cdn.ing/assets/files/record/286191/mqlb33fzxz9cdth1bx7if0wmpkp1",
|
|
572
|
+
crossPattern: "https://cdn.ing/assets/files/record/286193/9yfqwdbnqaipbp7fsb3wbzzmq472",
|
|
573
|
+
architect: "https://cdn.ing/assets/files/record/286194/vgs88ugpvyhxu13wqgy0acvae6re",
|
|
574
|
+
tinyCheckers: "https://cdn.ing/assets/files/record/286195/65efaknsw8kcpf9o3c2gybytsl5b",
|
|
575
|
+
p6: "https://cdn.ing/assets/i/r/286196/6kl0rqnd6mjk8j7e525fo8fo0vkc/p6.webp"
|
|
576
|
+
};
|
|
577
|
+
var maskTop = "radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%)";
|
|
578
|
+
var maskBottom = "radial-gradient(ellipse 100% 80% at 50% 100%, #000 50%, transparent 90%)";
|
|
579
|
+
var maskCenter = "radial-gradient(ellipse 60% 60% at 50% 50%, #000 30%, transparent 70%)";
|
|
580
|
+
var maskTopLeft = "radial-gradient(ellipse 80% 80% at 0% 0%, #000 50%, transparent 90%)";
|
|
581
|
+
var maskTopRight = "radial-gradient(ellipse 80% 80% at 100% 0%, #000 50%, transparent 90%)";
|
|
582
|
+
var maskBottomLeft = "radial-gradient(ellipse 80% 80% at 0% 100%, #000 50%, transparent 90%)";
|
|
583
|
+
var maskBottomRight = "radial-gradient(ellipse 80% 80% at 100% 100%, #000 50%, transparent 90%)";
|
|
584
|
+
var circuitBoardPattern = (id, mask) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
585
|
+
"svg",
|
|
586
|
+
{
|
|
587
|
+
className: "h-full w-full",
|
|
588
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
589
|
+
style: mask ? {
|
|
590
|
+
maskImage: mask,
|
|
591
|
+
WebkitMaskImage: mask
|
|
592
|
+
} : void 0,
|
|
593
|
+
children: [
|
|
594
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
595
|
+
"pattern",
|
|
596
|
+
{
|
|
597
|
+
id,
|
|
598
|
+
x: "0",
|
|
599
|
+
y: "0",
|
|
600
|
+
width: "100",
|
|
601
|
+
height: "100",
|
|
602
|
+
patternUnits: "userSpaceOnUse",
|
|
603
|
+
children: [
|
|
604
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
605
|
+
"path",
|
|
606
|
+
{
|
|
607
|
+
d: "M0 50h40M60 50h40M50 0v40M50 60v40",
|
|
608
|
+
stroke: "hsl(var(--muted))",
|
|
609
|
+
strokeWidth: "1",
|
|
610
|
+
fill: "none"
|
|
611
|
+
}
|
|
612
|
+
),
|
|
613
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "50", r: "3", fill: "hsl(var(--muted))" }),
|
|
614
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "0", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
|
|
615
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "100", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
|
|
616
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "0", r: "2", fill: "hsl(var(--muted))" }),
|
|
617
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "100", r: "2", fill: "hsl(var(--muted))" })
|
|
618
|
+
]
|
|
619
|
+
}
|
|
620
|
+
) }),
|
|
621
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
|
|
622
|
+
]
|
|
623
|
+
}
|
|
624
|
+
);
|
|
625
|
+
var gridDotsPattern = (id, mask) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
626
|
+
"svg",
|
|
627
|
+
{
|
|
628
|
+
className: "h-full w-full",
|
|
629
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
630
|
+
style: mask ? {
|
|
631
|
+
maskImage: mask,
|
|
632
|
+
WebkitMaskImage: mask
|
|
633
|
+
} : void 0,
|
|
634
|
+
children: [
|
|
635
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
636
|
+
"pattern",
|
|
637
|
+
{
|
|
638
|
+
id,
|
|
639
|
+
x: "0",
|
|
640
|
+
y: "0",
|
|
641
|
+
width: "40",
|
|
642
|
+
height: "40",
|
|
643
|
+
patternUnits: "userSpaceOnUse",
|
|
644
|
+
children: [
|
|
645
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
646
|
+
"path",
|
|
647
|
+
{
|
|
648
|
+
d: "M0 20h40M20 0v40",
|
|
649
|
+
stroke: "hsl(var(--muted))",
|
|
650
|
+
strokeWidth: "0.5",
|
|
651
|
+
fill: "none"
|
|
652
|
+
}
|
|
653
|
+
),
|
|
654
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "20", cy: "20", r: "2", fill: "hsl(var(--muted))" })
|
|
655
|
+
]
|
|
656
|
+
}
|
|
657
|
+
) }),
|
|
658
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
|
|
659
|
+
]
|
|
660
|
+
}
|
|
661
|
+
);
|
|
662
|
+
var gridPattern = (size, mask) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
663
|
+
"div",
|
|
664
|
+
{
|
|
665
|
+
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)]",
|
|
666
|
+
style: {
|
|
667
|
+
backgroundSize: `${size}px ${size}px`,
|
|
668
|
+
...mask ? {
|
|
669
|
+
maskImage: mask,
|
|
670
|
+
WebkitMaskImage: mask
|
|
671
|
+
} : {}
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
);
|
|
675
|
+
var diagonalCrossPattern = (mask) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
676
|
+
"div",
|
|
677
|
+
{
|
|
678
|
+
className: "h-full w-full",
|
|
679
|
+
style: {
|
|
680
|
+
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)",
|
|
681
|
+
...mask ? {
|
|
682
|
+
maskImage: mask,
|
|
683
|
+
WebkitMaskImage: mask
|
|
684
|
+
} : {}
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
);
|
|
688
|
+
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)";
|
|
689
|
+
var dashedGridPattern = (fadeMask) => {
|
|
690
|
+
const mask = fadeMask ? `${dashedGridMaskBase}, ${fadeMask}` : dashedGridMaskBase;
|
|
691
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
692
|
+
"div",
|
|
693
|
+
{
|
|
694
|
+
className: "h-full w-full",
|
|
695
|
+
style: {
|
|
696
|
+
backgroundImage: "linear-gradient(to right, hsl(var(--muted)) 1px, transparent 1px), linear-gradient(to bottom, hsl(var(--muted)) 1px, transparent 1px)",
|
|
697
|
+
backgroundSize: "20px 20px",
|
|
698
|
+
backgroundPosition: "0 0, 0 0",
|
|
699
|
+
maskImage: mask,
|
|
700
|
+
WebkitMaskImage: mask,
|
|
701
|
+
maskComposite: "intersect",
|
|
702
|
+
WebkitMaskComposite: "source-in"
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
);
|
|
706
|
+
};
|
|
707
|
+
var gradientGlow = (position) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
708
|
+
"div",
|
|
709
|
+
{
|
|
710
|
+
className: cn(
|
|
711
|
+
"pointer-events-none absolute left-1/2 z-0 aspect-square w-3/4 -translate-x-1/2 rounded-full opacity-50 blur-3xl",
|
|
712
|
+
position === "top" ? "-top-1/4" : "-bottom-1/4"
|
|
841
713
|
),
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
714
|
+
style: {
|
|
715
|
+
background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
);
|
|
719
|
+
var spotlight = (position) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
720
|
+
"div",
|
|
721
|
+
{
|
|
722
|
+
className: cn(
|
|
723
|
+
"pointer-events-none absolute top-1/2 z-0 aspect-square w-3/4 -translate-y-1/2 rounded-full opacity-40 blur-3xl",
|
|
724
|
+
position === "left" ? "-left-1/4" : "-right-1/4"
|
|
725
|
+
),
|
|
726
|
+
style: {
|
|
727
|
+
background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
);
|
|
731
|
+
var patternOverlays = {
|
|
732
|
+
circuitBoardBasic: () => circuitBoardPattern("circuit-board-basic"),
|
|
733
|
+
circuitBoardFadeTop: () => circuitBoardPattern("circuit-board-fade-top", maskTop),
|
|
734
|
+
circuitBoardFadeBottom: () => circuitBoardPattern("circuit-board-fade-bottom", maskBottom),
|
|
735
|
+
circuitBoardFadeCenter: () => circuitBoardPattern("circuit-board-fade-center", maskCenter),
|
|
736
|
+
circuitBoardFadeTopLeft: () => circuitBoardPattern("circuit-board-fade-top-left", maskTopLeft),
|
|
737
|
+
circuitBoardFadeTopRight: () => circuitBoardPattern("circuit-board-fade-top-right", maskTopRight),
|
|
738
|
+
circuitBoardFadeBottomLeft: () => circuitBoardPattern("circuit-board-fade-bottom-left", maskBottomLeft),
|
|
739
|
+
circuitBoardFadeBottomRight: () => circuitBoardPattern("circuit-board-fade-bottom-right", maskBottomRight),
|
|
740
|
+
dashedGridBasic: () => dashedGridPattern(),
|
|
741
|
+
dashedGridFadeTop: () => dashedGridPattern(maskTop),
|
|
742
|
+
dashedGridFadeBottom: () => dashedGridPattern(maskBottom),
|
|
743
|
+
dashedGridFadeCenter: () => dashedGridPattern(maskCenter),
|
|
744
|
+
dashedGridFadeTopLeft: () => dashedGridPattern(maskTopLeft),
|
|
745
|
+
dashedGridFadeTopRight: () => dashedGridPattern(maskTopRight),
|
|
746
|
+
dashedGridFadeBottomLeft: () => dashedGridPattern(maskBottomLeft),
|
|
747
|
+
dashedGridFadeBottomRight: () => dashedGridPattern(maskBottomRight),
|
|
748
|
+
diagonalCrossBasic: () => diagonalCrossPattern(),
|
|
749
|
+
diagonalCrossFadeTop: () => diagonalCrossPattern(maskTop),
|
|
750
|
+
diagonalCrossFadeBottom: () => diagonalCrossPattern(maskBottom),
|
|
751
|
+
diagonalCrossFadeCenter: () => diagonalCrossPattern(maskCenter),
|
|
752
|
+
diagonalCrossFadeTopLeft: () => diagonalCrossPattern(maskTopLeft),
|
|
753
|
+
diagonalCrossFadeTopRight: () => diagonalCrossPattern(maskTopRight),
|
|
754
|
+
diagonalCrossFadeBottomLeft: () => diagonalCrossPattern(maskBottomLeft),
|
|
755
|
+
diagonalCrossFadeBottomRight: () => diagonalCrossPattern(maskBottomRight),
|
|
756
|
+
gridBasic: () => gridPattern(40),
|
|
757
|
+
gridFadeTop: () => gridPattern(32, maskTop),
|
|
758
|
+
gridFadeBottom: () => gridPattern(32, maskBottom),
|
|
759
|
+
gridFadeCenter: () => gridPattern(40, maskCenter),
|
|
760
|
+
gridFadeTopLeft: () => gridPattern(32, maskTopLeft),
|
|
761
|
+
gridFadeTopRight: () => gridPattern(32, maskTopRight),
|
|
762
|
+
gridFadeBottomLeft: () => gridPattern(32, maskBottomLeft),
|
|
763
|
+
gridFadeBottomRight: () => gridPattern(32, maskBottomRight),
|
|
764
|
+
gridDotsBasic: () => gridDotsPattern("grid-dots-basic"),
|
|
765
|
+
gridDotsFadeCenter: () => gridDotsPattern("grid-dots-fade-center", maskCenter),
|
|
766
|
+
gradientGlowTop: () => gradientGlow("top"),
|
|
767
|
+
gradientGlowBottom: () => gradientGlow("bottom"),
|
|
768
|
+
spotlightLeft: () => spotlight("left"),
|
|
769
|
+
spotlightRight: () => spotlight("right")
|
|
770
|
+
};
|
|
771
|
+
var inlinePatternStyles = {
|
|
772
|
+
radialGradientTop: {
|
|
773
|
+
background: "radial-gradient(125% 125% at 50% 10%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
|
|
774
|
+
},
|
|
775
|
+
radialGradientBottom: {
|
|
776
|
+
background: "radial-gradient(125% 125% at 50% 90%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
|
|
777
|
+
}
|
|
778
|
+
};
|
|
779
|
+
function PatternBackground({
|
|
780
|
+
pattern,
|
|
781
|
+
opacity = 0.08,
|
|
782
|
+
className,
|
|
783
|
+
style
|
|
784
|
+
}) {
|
|
785
|
+
if (!pattern) {
|
|
786
|
+
return null;
|
|
787
|
+
}
|
|
788
|
+
if (pattern in inlinePatternStyles) {
|
|
789
|
+
const inlineStyle = inlinePatternStyles[pattern];
|
|
790
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
791
|
+
"div",
|
|
792
|
+
{
|
|
793
|
+
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
794
|
+
style: { ...inlineStyle, opacity, ...style },
|
|
795
|
+
"aria-hidden": "true"
|
|
796
|
+
}
|
|
797
|
+
);
|
|
798
|
+
}
|
|
799
|
+
if (pattern in patternOverlays) {
|
|
800
|
+
const Overlay = patternOverlays[pattern];
|
|
801
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
802
|
+
"div",
|
|
803
|
+
{
|
|
804
|
+
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
805
|
+
style: { opacity, ...style },
|
|
806
|
+
"aria-hidden": "true",
|
|
807
|
+
children: Overlay()
|
|
808
|
+
}
|
|
809
|
+
);
|
|
810
|
+
}
|
|
811
|
+
const patternUrl = pattern in patternSvgs ? patternSvgs[pattern] : pattern;
|
|
812
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
813
|
+
"div",
|
|
814
|
+
{
|
|
815
|
+
className: cn("pointer-events-none absolute inset-0 z-0", className),
|
|
816
|
+
style: {
|
|
817
|
+
backgroundImage: `url(${patternUrl})`,
|
|
818
|
+
backgroundRepeat: "repeat",
|
|
819
|
+
backgroundSize: "auto",
|
|
820
|
+
opacity,
|
|
821
|
+
...style
|
|
822
|
+
},
|
|
823
|
+
"aria-hidden": "true"
|
|
824
|
+
}
|
|
825
|
+
);
|
|
826
|
+
}
|
|
827
|
+
var backgroundStyles = {
|
|
828
|
+
default: "bg-background text-foreground",
|
|
829
|
+
white: "bg-white text-dark",
|
|
830
|
+
gray: "bg-muted/30 text-foreground",
|
|
831
|
+
dark: "bg-foreground text-background",
|
|
832
|
+
transparent: "bg-transparent text-foreground",
|
|
833
|
+
gradient: "bg-linear-to-br from-primary via-primary/90 to-foreground text-primary-foreground",
|
|
834
|
+
primary: "bg-primary text-primary-foreground",
|
|
835
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
836
|
+
muted: "bg-muted text-muted-foreground"
|
|
837
|
+
};
|
|
838
|
+
var spacingStyles = {
|
|
839
|
+
none: "py-0 md:py-0",
|
|
840
|
+
sm: "py-12 md:py-16",
|
|
841
|
+
md: "py-16 md:py-24",
|
|
842
|
+
lg: "py-20 md:py-32",
|
|
843
|
+
xl: "py-24 md:py-40"
|
|
844
|
+
};
|
|
845
|
+
var Section = React5__namespace.default.forwardRef(
|
|
846
|
+
({
|
|
847
|
+
id,
|
|
848
|
+
title,
|
|
849
|
+
subtitle,
|
|
850
|
+
children,
|
|
851
|
+
className,
|
|
852
|
+
style,
|
|
853
|
+
background = "default",
|
|
854
|
+
spacing = "lg",
|
|
855
|
+
pattern,
|
|
856
|
+
patternOpacity,
|
|
857
|
+
patternClassName,
|
|
858
|
+
containerClassName,
|
|
859
|
+
containerMaxWidth = "xl",
|
|
860
|
+
...props
|
|
861
|
+
}, ref) => {
|
|
862
|
+
const effectivePatternOpacity = patternOpacity !== void 0 ? patternOpacity : pattern ? 1 : 0;
|
|
863
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
864
|
+
"section",
|
|
865
|
+
{
|
|
866
|
+
ref,
|
|
867
|
+
id,
|
|
868
|
+
className: cn(
|
|
869
|
+
"relative",
|
|
870
|
+
pattern ? "overflow-hidden" : null,
|
|
871
|
+
backgroundStyles[background],
|
|
872
|
+
spacingStyles[spacing],
|
|
873
|
+
className
|
|
874
|
+
),
|
|
875
|
+
style,
|
|
876
|
+
...props,
|
|
877
|
+
children: [
|
|
878
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
879
|
+
PatternBackground,
|
|
880
|
+
{
|
|
881
|
+
pattern,
|
|
882
|
+
opacity: effectivePatternOpacity,
|
|
883
|
+
className: patternClassName
|
|
884
|
+
}
|
|
885
|
+
),
|
|
886
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
887
|
+
Container,
|
|
888
|
+
{
|
|
889
|
+
maxWidth: containerMaxWidth,
|
|
890
|
+
className: cn("relative z-10", containerClassName),
|
|
891
|
+
children: [
|
|
892
|
+
(title || subtitle) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-12 text-center md:mb-16", children: [
|
|
893
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-sm font-semibold uppercase tracking-wider text-primary", children: subtitle }),
|
|
894
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl", children: title })
|
|
895
|
+
] }),
|
|
896
|
+
children
|
|
897
|
+
]
|
|
898
|
+
}
|
|
899
|
+
)
|
|
900
|
+
]
|
|
901
|
+
}
|
|
902
|
+
);
|
|
903
|
+
}
|
|
904
|
+
);
|
|
905
|
+
Section.displayName = "Section";
|
|
859
906
|
function ArticleTocSidebarComponent({
|
|
860
907
|
className,
|
|
861
908
|
containerClassName,
|
|
@@ -892,13 +939,17 @@ function ArticleTocSidebarComponent({
|
|
|
892
939
|
ctaSlot,
|
|
893
940
|
children,
|
|
894
941
|
enableTocTracking = true,
|
|
895
|
-
optixFlowConfig
|
|
942
|
+
optixFlowConfig,
|
|
943
|
+
background,
|
|
944
|
+
spacing,
|
|
945
|
+
pattern,
|
|
946
|
+
patternOpacity
|
|
896
947
|
}) {
|
|
897
948
|
const ctaActions = ctaActionsProp ?? (ctaButtonText ? [{ label: ctaButtonText, href: ctaButtonHref || "#", variant: "default", className: "w-full" }] : []);
|
|
898
|
-
const [activeSection, setActiveSection] =
|
|
949
|
+
const [activeSection, setActiveSection] = React5__namespace.useState(
|
|
899
950
|
sections?.[0]?.id || ""
|
|
900
951
|
);
|
|
901
|
-
|
|
952
|
+
React5__namespace.useEffect(() => {
|
|
902
953
|
if (!enableTocTracking || !sections || sections.length === 0) return;
|
|
903
954
|
const observer = new IntersectionObserver(
|
|
904
955
|
(entries) => {
|
|
@@ -916,12 +967,12 @@ function ArticleTocSidebarComponent({
|
|
|
916
967
|
});
|
|
917
968
|
return () => observer.disconnect();
|
|
918
969
|
}, [sections, enableTocTracking]);
|
|
919
|
-
const categoryContent =
|
|
970
|
+
const categoryContent = React5__namespace.useMemo(() => {
|
|
920
971
|
if (categorySlot) return categorySlot;
|
|
921
972
|
if (!category) return null;
|
|
922
973
|
return /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "secondary", children: category });
|
|
923
974
|
}, [categorySlot, category]);
|
|
924
|
-
const authorContent =
|
|
975
|
+
const authorContent = React5__namespace.useMemo(() => {
|
|
925
976
|
if (authorSlot) return authorSlot;
|
|
926
977
|
if (!authorName) return null;
|
|
927
978
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mt-6 flex items-center gap-4", authorClassName), children: [
|
|
@@ -941,7 +992,7 @@ function ArticleTocSidebarComponent({
|
|
|
941
992
|
] })
|
|
942
993
|
] });
|
|
943
994
|
}, [authorSlot, authorName, authorImage, authorHref, publishDate, readTime, authorClassName]);
|
|
944
|
-
const heroMediaContent =
|
|
995
|
+
const heroMediaContent = React5__namespace.useMemo(() => {
|
|
945
996
|
if (heroMediaSlot) return heroMediaSlot;
|
|
946
997
|
if (!heroImageSrc) return null;
|
|
947
998
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -954,7 +1005,7 @@ function ArticleTocSidebarComponent({
|
|
|
954
1005
|
}
|
|
955
1006
|
);
|
|
956
1007
|
}, [heroMediaSlot, heroImageSrc, heroImageAlt, heroImageClassName, optixFlowConfig]);
|
|
957
|
-
const tocContent =
|
|
1008
|
+
const tocContent = React5__namespace.useMemo(() => {
|
|
958
1009
|
if (tocSlot) return tocSlot;
|
|
959
1010
|
if (!sections || sections.length === 0) return null;
|
|
960
1011
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("rounded-lg border p-4", tocClassName), children: [
|
|
@@ -962,7 +1013,7 @@ function ArticleTocSidebarComponent({
|
|
|
962
1013
|
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "space-y-2", children: sections.map((section) => {
|
|
963
1014
|
const isActive = activeSection === section.id;
|
|
964
1015
|
if (renderSectionLink) {
|
|
965
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1016
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React5__namespace.Fragment, { children: renderSectionLink(section, isActive) }, section.id);
|
|
966
1017
|
}
|
|
967
1018
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
968
1019
|
Pressable,
|
|
@@ -979,7 +1030,7 @@ function ArticleTocSidebarComponent({
|
|
|
979
1030
|
}) })
|
|
980
1031
|
] });
|
|
981
1032
|
}, [tocSlot, sections, activeSection, renderSectionLink, tocClassName]);
|
|
982
|
-
const ctaContent =
|
|
1033
|
+
const ctaContent = React5__namespace.useMemo(() => {
|
|
983
1034
|
if (ctaSlot) return ctaSlot;
|
|
984
1035
|
if (!ctaTitle && !ctaDescription && (!ctaActions || ctaActions.length === 0)) return null;
|
|
985
1036
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("rounded-lg border bg-muted/50 p-4", ctaClassName), children: [
|
|
@@ -1004,22 +1055,32 @@ function ArticleTocSidebarComponent({
|
|
|
1004
1055
|
}) })
|
|
1005
1056
|
] });
|
|
1006
1057
|
}, [ctaSlot, ctaTitle, ctaDescription, ctaActions, ctaClassName]);
|
|
1007
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1058
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1059
|
+
Section,
|
|
1060
|
+
{
|
|
1061
|
+
background,
|
|
1062
|
+
spacing,
|
|
1063
|
+
pattern,
|
|
1064
|
+
patternOpacity,
|
|
1065
|
+
className,
|
|
1066
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("container", containerClassName), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-10 lg:grid-cols-[minmax(0,1fr)_300px]", children: [
|
|
1067
|
+
/* @__PURE__ */ jsxRuntime.jsxs("article", { className: cn("prose max-w-none dark:prose-invert", articleClassName), children: [
|
|
1068
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mb-8 not-prose", headerClassName), children: [
|
|
1069
|
+
categoryContent,
|
|
1070
|
+
title && (typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h1", { className: cn("mt-4 text-4xl font-bold tracking-tight md:text-5xl", titleClassName), children: title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-4", titleClassName), children: title })),
|
|
1071
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("mt-4 text-lg text-muted-foreground", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-4", descriptionClassName), children: description })),
|
|
1072
|
+
authorContent
|
|
1073
|
+
] }),
|
|
1074
|
+
heroMediaContent,
|
|
1075
|
+
children
|
|
1076
|
+
] }),
|
|
1077
|
+
/* @__PURE__ */ jsxRuntime.jsx("aside", { className: cn("hidden lg:block", sidebarClassName), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sticky top-8 space-y-6", children: [
|
|
1078
|
+
tocContent,
|
|
1079
|
+
ctaContent
|
|
1080
|
+
] }) })
|
|
1081
|
+
] }) })
|
|
1082
|
+
}
|
|
1083
|
+
);
|
|
1023
1084
|
}
|
|
1024
1085
|
|
|
1025
1086
|
exports.ArticleTocSidebar = ArticleTocSidebarComponent;
|