UNPKG

@callstack/rspress-theme

Version:
770 lines (769 loc) 37.9 kB
// inject component styles import "./index.css" import { jsx, jsxs } from "react/jsx-runtime"; import { createElement, useContext, useState } from "react"; import { DataContext, NoSSR, ThemeContext, flushSync, isExternalUrl, normalizeHrefInRuntime, normalizeImagePath, usePageData, withBase } from "rspress/runtime"; import { Badge as external_theme_Badge, Link, SocialLinks } from "@theme"; const SvgClose = (props)=>/*#__PURE__*/ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 20, height: 20, fill: "currentColor", viewBox: "0 0 20 20", ...props, children: /*#__PURE__*/ jsx("path", { d: "M5.833 15.833H4.167v-1.666h1.666zm10 0h-1.666v-1.666h1.666zM7.5 12.5v1.667H5.833V12.5zm6.667 1.667H12.5V12.5h1.667zm-5-1.667H7.5v-1.667h1.667zm3.333 0h-1.667v-1.667H12.5zm-1.667-1.667H9.167V9.167h1.666zM9.167 9.167H7.5V7.5h1.667zm3.333 0h-1.667V7.5H12.5zM7.5 7.5H5.833V5.833H7.5zm6.667 0H12.5V5.833h1.667zM5.833 5.833H4.167V4.167h1.666zm10 0h-1.666V4.167h1.666z" }) }); const closereact = SvgClose; const index_module = { bar: "bar-yFRNhz", link: "link-iUd1SG", close: "close-kUdhEg" }; function Announcement({ href, message, localStorageKey, display = true }) { return /*#__PURE__*/ jsx(NoSSR, { children: /*#__PURE__*/ jsx(AnnouncementComponent, { href: href, message: message, localStorageKey: localStorageKey, display: display }) }); } function AnnouncementComponent({ href, message, localStorageKey, display = true }) { if (!display) return null; const [disable, setDisable] = useState(window.localStorage.getItem(localStorageKey) ?? false); if (disable) return null; return /*#__PURE__*/ jsxs("div", { className: index_module.bar, children: [ /*#__PURE__*/ jsx("a", { href: href, className: index_module.link, children: message }), /*#__PURE__*/ jsx(closereact, { className: index_module.close, onClick: ()=>{ setDisable(true); window.localStorage.setItem(localStorageKey, 'true'); } }) ] }); } const badge_index_module = { badge: "badge-JOuwlY", tip: "tip-obOVcS", info: "info-q_r3eR", warning: "warning-BggZiV", danger: "danger-UwnNxJ", note: "note-ItYjre", outline: "outline-gGpHp9" }; function Badge({ children, type = 'tip', text, outline = false }) { const content = children || text; return /*#__PURE__*/ jsx("span", { className: `${badge_index_module.badge} ${badge_index_module[type]} ${outline ? badge_index_module.outline : ''}`, children: content }); } const SvgArrowBarRight = (props)=>/*#__PURE__*/ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: "currentColor", viewBox: "0 0 24 24", ...props, children: /*#__PURE__*/ jsx("path", { d: "M20 20h-2V4h2zm-8-5v2h-2v-2zm2-4h2v2h-2v2h-2v-2H4v-2h8V9h2zm-2-2h-2V7h2z" }) }); const arrow_bar_rightreact = SvgArrowBarRight; const SvgCornerDownRight = (props)=>/*#__PURE__*/ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "none", viewBox: "0 0 16 16", ...props, children: /*#__PURE__*/ jsx("path", { fill: "currentColor", d: "M9.333 13.333h1.334V12H9.333zm-6.666-2.666h8V12H12v-1.333h1.333V9.333H12V8h-1.333v1.333H4V2.667H2.667zM9.333 8h1.334V6.667H9.333z" }) }); const corner_down_rightreact = SvgCornerDownRight; const button_index_module = { button: "button-DogSnd", "button-icon": "button-icon-Okk0hT", buttonIcon: "button-icon-Okk0hT", "slide-out": "slide-out-Yp9sdv", slideOut: "slide-out-Yp9sdv", "slide-in": "slide-in-_qbjG1", slideIn: "slide-in-_qbjG1", alt: "alt-XB5jdj", brand: "brand-rT2ahT" }; function Button(props) { const { dark = false, theme = 'brand', href = '/', external = false, className = '', children } = props; let type = null; type = 'button' === props.type ? 'button' : 'a' === props.type ? external ? 'a' : Link : 'a'; return createElement('div', { className: dark ? 'dark' : void 0 }, [ createElement(type, { key: 'button-1', className: `dark:rp-hidden rp-block ${button_index_module.button} ${button_index_module[theme]} ${className}`, href }, [ children, createElement('brand' === theme ? corner_down_rightreact : arrow_bar_rightreact, { key: 'button-icon-1', className: `${button_index_module["button-icon"]}`, 'aria-hidden': true, focusable: false }) ]), createElement(type, { key: 'button-2', className: `rp-hidden dark:rp-block ${button_index_module.button} ${button_index_module[theme]} ${className}`, href }, [ children, createElement('brand' === theme ? corner_down_rightreact : arrow_bar_rightreact, { key: 'button-icon-2', className: `${button_index_module["button-icon"]}`, 'aria-hidden': true, focusable: false }) ]) ]); } const card_index_module = { card: "card-Mp1eVU", cardContentContainer: "cardContentContainer-uPAwxW", cardTitle: "cardTitle-TpjSJW", cardContent: "cardContent-IHYWJn" }; function Card(props) { const { title, content, style } = props; return /*#__PURE__*/ jsx("div", { className: card_index_module.card, style: style, children: /*#__PURE__*/ jsxs("div", { className: card_index_module.cardContentContainer, children: [ /*#__PURE__*/ jsx("span", { className: card_index_module.cardTitle, children: title }), content && /*#__PURE__*/ jsx("span", { className: card_index_module.cardContent, children: content }) ] }) }); } import abstract_atom_namespaceObject from "./static/image/abstract-atom.avif"; const OUTLINE_CTA_BUTTON_TEXT = "Let's talk"; const OUTLINE_CTA_DESCRIPTION = 'We help React Native teams enhance speed, responsiveness, and efficiency.'; const OUTLINE_CTA_HEADLINE = "Need to boost your app's performance?"; const HOME_BANNER_HEADLINE = 'Need React or React Native\nexpertise you can count on?'; const HOME_BANNER_DESCRIPTION = "We've spent years building full-stack, cross-platform apps and solving tough technical challenges."; const HOME_BANNER_BUTTON_TEXT = "Let's talk"; const home_banner_index_module = { container: "container-JklxSY", logo: "logo-wGu6zG", content: "content-qrbCuM", headline: "headline-urbBtl", description: "description-a82hKX", descriptionText: "descriptionText-UMW_4H" }; function HomeBanner({ buttonText = HOME_BANNER_BUTTON_TEXT, description = HOME_BANNER_DESCRIPTION, headline = HOME_BANNER_HEADLINE, href = HOME_BANNER_LINK }) { return /*#__PURE__*/ jsxs("div", { className: `rp-max-w-6xl ${home_banner_index_module.container}`, children: [ /*#__PURE__*/ jsxs("div", { className: home_banner_index_module.background, children: [ /*#__PURE__*/ jsx("div", { className: home_banner_index_module.gradient }), /*#__PURE__*/ jsx("div", { className: home_banner_index_module.pattern }) ] }), /*#__PURE__*/ jsx("img", { className: home_banner_index_module.logo, src: abstract_atom_namespaceObject, alt: "Abstract Logo", "aria-hidden": "true" }), /*#__PURE__*/ jsxs("div", { className: home_banner_index_module.content, children: [ /*#__PURE__*/ jsx("h1", { className: home_banner_index_module.headline, children: headline }), /*#__PURE__*/ jsxs("div", { className: home_banner_index_module.description, children: [ /*#__PURE__*/ jsx("p", { className: home_banner_index_module.descriptionText, children: description }), /*#__PURE__*/ jsx("div", { children: /*#__PURE__*/ jsx(Button, { dark: true, external: true, href: href, children: buttonText }) }) ] }) ] }) ] }); } function renderHtmlOrText(str) { if (!str) return { children: null }; if ('number' == typeof str) return { children: str.toString() }; const hasValidHtmlElements = /<([a-z]+)([^<]*)(?:>(.*?)<\/\1>|\s*\/>)/i.test(str); if (hasValidHtmlElements) return { dangerouslySetInnerHTML: { __html: str } }; return { children: str.replace(/\\</g, '<').replace(/\\>/g, '>').replace(/&lt;/g, '<').replace(/&gt;/g, '>') }; } const home_feature_index_module = { "grid-2": "grid-2-cgAqRP", grid2: "grid-2-cgAqRP", "grid-4": "grid-4-JvWJqM", grid4: "grid-4-JvWJqM", "grid-6": "grid-6-dUNjnk", grid6: "grid-6-dUNjnk", "grid-3": "grid-3-UOYenV", grid3: "grid-3-UOYenV", featureCardContainer: "featureCardContainer-NOFPt7", featureCard: "featureCard-XfKTmz", featureIcon: "featureIcon-Hb8_cv", featureTitle: "featureTitle-cyqmgX", featureDetail: "featureDetail-QDEU9M" }; const getGridClass = ({ span })=>{ switch(span){ case 2: return home_feature_index_module.grid2; case 3: return home_feature_index_module.grid3; case 4: return home_feature_index_module.grid4; case 6: return home_feature_index_module.grid6; case void 0: return home_feature_index_module.grid4; default: return ''; } }; function HomeFeature({ frontmatter }) { const features = null == frontmatter ? void 0 : frontmatter.features; return /*#__PURE__*/ jsx("div", { className: "rp-overflow-hidden rp-m-auto rp-flex rp-flex-wrap rp-max-w-6xl", children: null == features ? void 0 : features.map((feature)=>{ const { icon, title, details, link: rawLink } = feature; let link = rawLink; if (rawLink) link = isExternalUrl(rawLink) ? rawLink : normalizeHrefInRuntime(withBase(rawLink)); return /*#__PURE__*/ jsx("div", { className: `${getGridClass(feature)} rp-rounded hover:rp-var(--rp-c-brand)`, children: /*#__PURE__*/ jsx("div", { className: home_feature_index_module.featureCardContainer, children: /*#__PURE__*/ jsxs("article", { className: home_feature_index_module.featureCard, style: { cursor: link ? 'pointer' : 'auto' }, onClick: ()=>{ if (link) window.location.href = link; }, children: [ icon ? /*#__PURE__*/ jsx("div", { className: "rp-flex rp-items-center rp-justify-center", children: /*#__PURE__*/ jsx("div", { className: home_feature_index_module.featureIcon, ...renderHtmlOrText(icon) }) }) : null, /*#__PURE__*/ jsx("h2", { className: home_feature_index_module.featureTitle, ...renderHtmlOrText(title) }), /*#__PURE__*/ jsx("p", { className: home_feature_index_module.featureDetail, ...renderHtmlOrText(details) }) ] }, title) }) }, title); }) }); } const SvgCkLogoDark = (props)=>/*#__PURE__*/ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: 101, height: 20, fill: "none", viewBox: "0 0 101 20", ...props, children: [ /*#__PURE__*/ jsx("g", { clipPath: "url(#ck-logo-dark_svg__a)", children: /*#__PURE__*/ jsx("path", { fill: "#fff", d: "M41.283 12.442a8.7 8.7 0 0 0 3.996 1.161c.856 0 1.377-.23 1.377-.779 0-.779-1.133-.702-2.661-1.084-1.913-.473-3.046-1.27-3.046-2.916 0-2.122 1.913-3.328 4.424-3.328a9.4 9.4 0 0 1 3.873.794v2.626a8.6 8.6 0 0 0-3.784-1.068c-.826 0-1.316.243-1.316.701 0 .703 1.087.703 2.587 1.039 1.929.473 3.108 1.206 3.108 2.946 0 2.193-1.96 3.405-4.547 3.405a9.7 9.7 0 0 1-3.99-.84l-.015-2.655zm17.139 2.977c-.702.371-1.487.56-2.281.55a3.53 3.53 0 0 1-2.633-1.008c-.536-.564-.887-1.404-.887-3.007V8.26h-1.64V5.694h1.64V1.787h3.124v3.907h2.68v2.58h-2.682v3.374c0 .978.231 1.71 1.179 1.71a3.65 3.65 0 0 0 1.504-.412v2.473zM81.874 1.787H85v8.152h.046l3.537-4.27h3.535l-3.872 4.5 4.166 5.559h-3.693l-3.69-5.132h-.045v5.113h-3.125zm14.067 10.9c0-1.512.347-2.321 1.423-2.672v-.046c-1.072-.346-1.424-1.154-1.424-2.672V3.693c0-1.084-.383-1.466-1.3-1.466a4.5 4.5 0 0 0-.781.078V.122Q94.565.004 95.282 0c2.435 0 3.537 1.375 3.537 3.328V7.42c0 1.038.29 1.45 1.362 1.45h.597v2.244h-.597c-1.072 0-1.362.413-1.362 1.45v4.108c0 1.953-1.133 3.328-3.537 3.328a9 9 0 0 1-1.423-.122v-2.184q.386.09.78.091c.903 0 1.302-.38 1.302-1.465zm-26.294.718c-.428 0-.612-.321-.612-.794V9.206a3.3 3.3 0 0 0-1.133-2.779 5.4 5.4 0 0 0-3.368-.961 8.1 8.1 0 0 0-3.536.779v2.671a6.3 6.3 0 0 1 2.954-.794 2.38 2.38 0 0 1 1.561.427 1.45 1.45 0 0 1 .383 1.069v.397a8.4 8.4 0 0 0-1.745-.183c-.99-.045-1.973.2-2.827.702a2.82 2.82 0 0 0-1.24 2.424 2.76 2.76 0 0 0 1.194 2.35 4.2 4.2 0 0 0 2.342.657 4.93 4.93 0 0 0 2.832-.839l.031-.016a2.96 2.96 0 0 0 2.188.794 3.4 3.4 0 0 0 1.505-.304v-2.318c-.165.08-.346.121-.529.123m-3.736-.123a2.9 2.9 0 0 1-1.423.412c-.735 0-1.302-.346-1.302-1.007 0-.78.81-1.023 1.607-1.023.377 0 .753.045 1.118.138zm13.991 1.909a6.96 6.96 0 0 1-3.322.778c-3.246 0-5.67-2.214-5.67-5.236 0-3.161 2.633-5.267 5.802-5.267a6.8 6.8 0 0 1 3.012.701v2.886a5.4 5.4 0 0 0-2.832-.932 2.63 2.63 0 0 0-2.388 1.297 2.616 2.616 0 0 0 1.05 3.666c.425.22.903.32 1.38.288a5.1 5.1 0 0 0 2.97-1.007v2.825zM35.85 1.954h3.124V15.74H35.85zM17.217 15.19a7.1 7.1 0 0 1-3.306.778c-3.24 0-5.665-2.214-5.665-5.236 0-3.161 2.634-5.267 5.803-5.267a6.8 6.8 0 0 1 3 .701v2.886a5.4 5.4 0 0 0-2.832-.932 2.65 2.65 0 0 0-2.386 1.29 2.63 2.63 0 0 0 .009 2.707 2.65 2.65 0 0 0 2.418 1.25 5.03 5.03 0 0 0 2.955-1.007v2.825zm11.11-1.787c-.428 0-.612-.32-.612-.793V9.206a3.3 3.3 0 0 0-1.133-2.779 5.4 5.4 0 0 0-3.368-.961 8.1 8.1 0 0 0-3.536.779v2.671a6.3 6.3 0 0 1 2.954-.794 2.38 2.38 0 0 1 1.561.427 1.44 1.44 0 0 1 .383 1.069v.397a8.3 8.3 0 0 0-1.745-.183 5 5 0 0 0-2.832.702 2.83 2.83 0 0 0-1.24 2.424 2.77 2.77 0 0 0 1.194 2.35 4.2 4.2 0 0 0 2.342.657 4.93 4.93 0 0 0 2.832-.839l.031-.016a2.97 2.97 0 0 0 2.19.794 3.4 3.4 0 0 0 1.504-.304v-2.318c-.164.079-.343.12-.525.123m-3.75-.122a2.9 2.9 0 0 1-1.424.412c-.735 0-1.301-.346-1.301-1.007 0-.78.81-1.023 1.607-1.023.377 0 .752.046 1.117.138zM30.47 1.954h3.124V15.74H30.47zM2.181 12.564c0-1.038-.29-1.45-1.362-1.45H.222V8.87H.82c1.072 0 1.362-.412 1.362-1.45V3.328C2.181 1.358 3.314 0 5.718 0q.717.005 1.423.122v2.186a3.4 3.4 0 0 0-.78-.092c-.904 0-1.302.382-1.302 1.465v3.601c0 1.512-.347 2.321-1.423 2.672V10c1.072.346 1.423 1.154 1.423 2.672v3.6c0 1.084.398 1.466 1.302 1.466q.396-.001.78-.092v2.183a9 9 0 0 1-1.423.122c-2.43 0-3.537-1.374-3.537-3.328z" }) }), /*#__PURE__*/ jsx("defs", { children: /*#__PURE__*/ jsx("clipPath", { id: "ck-logo-dark_svg__a", children: /*#__PURE__*/ jsx("path", { fill: "#fff", d: "M0 0h101v20H0z" }) }) }) ] }); const ck_logo_darkreact = SvgCkLogoDark; const SvgCkLogoLight = (props)=>/*#__PURE__*/ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: 101, height: 20, fill: "none", viewBox: "0 0 101 20", ...props, children: [ /*#__PURE__*/ jsx("g", { clipPath: "url(#ck-logo-light_svg__a)", children: /*#__PURE__*/ jsx("path", { fill: "#201F24", d: "M41.283 12.442a8.7 8.7 0 0 0 3.996 1.161c.856 0 1.377-.23 1.377-.779 0-.779-1.133-.702-2.661-1.084-1.913-.473-3.046-1.27-3.046-2.916 0-2.122 1.913-3.328 4.424-3.328a9.4 9.4 0 0 1 3.873.794v2.626a8.6 8.6 0 0 0-3.784-1.068c-.826 0-1.316.243-1.316.701 0 .703 1.087.703 2.587 1.039 1.929.473 3.108 1.206 3.108 2.946 0 2.193-1.96 3.405-4.547 3.405a9.7 9.7 0 0 1-3.99-.84l-.015-2.655zm17.139 2.977c-.702.371-1.487.56-2.281.55a3.53 3.53 0 0 1-2.633-1.008c-.536-.564-.887-1.404-.887-3.007V8.26h-1.639V5.694h1.639V1.787h3.124v3.907h2.68v2.58h-2.682v3.374c0 .978.231 1.71 1.18 1.71a3.65 3.65 0 0 0 1.503-.412v2.473zM81.874 1.787H85v8.152h.046l3.537-4.27h3.535l-3.872 4.5 4.166 5.559h-3.693l-3.689-5.132h-.046v5.113h-3.125zm14.067 10.9c0-1.512.347-2.321 1.423-2.672v-.046c-1.072-.346-1.423-1.154-1.423-2.672V3.693c0-1.084-.383-1.466-1.301-1.466a4.5 4.5 0 0 0-.781.078V.122Q94.565.004 95.282 0c2.435 0 3.537 1.375 3.537 3.328V7.42c0 1.038.29 1.45 1.362 1.45h.597v2.244h-.597c-1.072 0-1.362.413-1.362 1.45v4.108c0 1.953-1.133 3.328-3.537 3.328a9 9 0 0 1-1.423-.122v-2.184q.386.09.78.091c.904 0 1.302-.38 1.302-1.465zm-26.294.718c-.428 0-.612-.321-.612-.794V9.206a3.3 3.3 0 0 0-1.133-2.779 5.4 5.4 0 0 0-3.368-.961 8.1 8.1 0 0 0-3.536.779v2.671a6.3 6.3 0 0 1 2.954-.794 2.38 2.38 0 0 1 1.561.427 1.45 1.45 0 0 1 .383 1.069v.397a8.4 8.4 0 0 0-1.745-.183c-.99-.045-1.973.2-2.827.702a2.82 2.82 0 0 0-1.24 2.424 2.77 2.77 0 0 0 1.194 2.35 4.2 4.2 0 0 0 2.342.657 4.93 4.93 0 0 0 2.832-.839l.031-.016a2.96 2.96 0 0 0 2.188.794 3.4 3.4 0 0 0 1.505-.304v-2.318c-.165.08-.346.121-.529.123m-3.736-.123a2.9 2.9 0 0 1-1.423.412c-.735 0-1.302-.346-1.302-1.007 0-.78.81-1.023 1.608-1.023q.567 0 1.118.138zm13.991 1.909a6.96 6.96 0 0 1-3.322.778c-3.246 0-5.67-2.214-5.67-5.236 0-3.161 2.633-5.267 5.802-5.267a6.8 6.8 0 0 1 3.012.701v2.886a5.4 5.4 0 0 0-2.832-.932 2.63 2.63 0 0 0-2.388 1.297 2.616 2.616 0 0 0 1.05 3.666c.426.22.903.32 1.38.288a5.1 5.1 0 0 0 2.97-1.007v2.825zM35.85 1.954h3.124V15.74H35.85zM17.217 15.19a7.1 7.1 0 0 1-3.306.778c-3.24 0-5.665-2.214-5.665-5.236 0-3.161 2.634-5.267 5.803-5.267a6.8 6.8 0 0 1 3 .701v2.886a5.4 5.4 0 0 0-2.832-.932 2.65 2.65 0 0 0-2.386 1.29 2.63 2.63 0 0 0 .009 2.707 2.65 2.65 0 0 0 2.418 1.25 5.03 5.03 0 0 0 2.955-1.007v2.825zm11.11-1.787c-.428 0-.612-.32-.612-.793V9.206a3.3 3.3 0 0 0-1.133-2.779 5.4 5.4 0 0 0-3.368-.961 8.1 8.1 0 0 0-3.536.779v2.671a6.3 6.3 0 0 1 2.954-.794 2.38 2.38 0 0 1 1.561.427 1.44 1.44 0 0 1 .383 1.069v.397a8.3 8.3 0 0 0-1.745-.183 5 5 0 0 0-2.832.702 2.83 2.83 0 0 0-1.24 2.424 2.77 2.77 0 0 0 1.194 2.35 4.2 4.2 0 0 0 2.342.657 4.93 4.93 0 0 0 2.832-.839l.031-.016a2.97 2.97 0 0 0 2.19.794 3.4 3.4 0 0 0 1.504-.304v-2.318c-.164.079-.343.12-.525.123m-3.75-.122a2.9 2.9 0 0 1-1.424.412c-.735 0-1.3-.346-1.3-1.007 0-.78.81-1.023 1.606-1.023.377 0 .752.046 1.117.138zM30.47 1.954h3.125V15.74H30.47zM2.181 12.564c0-1.038-.29-1.45-1.362-1.45H.222V8.87H.82c1.072 0 1.362-.412 1.362-1.45V3.328C2.181 1.358 3.314 0 5.718 0q.717.005 1.423.122v2.186a3.4 3.4 0 0 0-.78-.092c-.903 0-1.302.382-1.302 1.465v3.601c0 1.512-.347 2.321-1.423 2.672V10c1.072.346 1.423 1.154 1.423 2.672v3.6c0 1.084.399 1.466 1.302 1.466q.396-.001.78-.092v2.183a9 9 0 0 1-1.423.122c-2.43 0-3.537-1.374-3.537-3.328z" }) }), /*#__PURE__*/ jsx("defs", { children: /*#__PURE__*/ jsx("clipPath", { id: "ck-logo-light_svg__a", children: /*#__PURE__*/ jsx("path", { fill: "#fff", d: "M0 0h101v20H0z" }) }) }) ] }); const ck_logo_lightreact = SvgCkLogoLight; const home_footer_index_module = { container: "container-IBgsxu", row: "row-VpRJwk", logo: "logo-eionWK", message: "message-flKFGZ" }; function HomeFooter(props) { var _siteData_themeConfig_footer; const { siteData } = usePageData(); const LinkComponent = props.LinkComponent ?? Link; const SocialLinksComponent = props.SocialLinksComponent ?? SocialLinks; return /*#__PURE__*/ jsx("div", { className: `rp-max-w-6xl ${home_footer_index_module.container}`, children: /*#__PURE__*/ jsxs("div", { className: home_footer_index_module.row, children: [ /*#__PURE__*/ jsx(LinkComponent, { href: HOME_FOOTER_LINK, children: /*#__PURE__*/ jsxs("div", { className: home_footer_index_module.logo, children: [ /*#__PURE__*/ jsx(ck_logo_darkreact, { className: "rp-hidden dark:rp-block" }), /*#__PURE__*/ jsx(ck_logo_lightreact, { className: "dark:rp-hidden" }) ] }) }), /*#__PURE__*/ jsx("span", { className: home_footer_index_module.message, children: null == (_siteData_themeConfig_footer = siteData.themeConfig.footer) ? void 0 : _siteData_themeConfig_footer.message }), /*#__PURE__*/ jsx(SocialLinksComponent, { socialLinks: siteData.themeConfig.socialLinks }) ] }) }); } const home_hero_index_module = { container: "container-Ey5SDc", heroMain: "heroMain-aBhXSi", heroImage: "heroImage-SovGBC", heroName: "heroName-_0lw9K", heroTaglineActions: "heroTaglineActions-jKkfzE", heroTagline: "heroTagline-HUMGEx", heroActions: "heroActions-x2L3Tk" }; const DEFAULT_HERO = { name: '', text: '', tagline: '', actions: [], image: void 0 }; function HomeHero({ beforeHeroActions, afterHeroActions, frontmatter }) { var _hero_image, _hero_image1, _hero_image2, _hero_image3, _hero_image4, _hero_image5, _hero_image6, _hero_image7; const hero = frontmatter.hero ?? DEFAULT_HERO; const imageSrc = 'string' == typeof (null == (_hero_image = hero.image) ? void 0 : _hero_image.src) ? { light: hero.image.src, dark: hero.image.src } : (null == (_hero_image1 = hero.image) ? void 0 : _hero_image1.src) || { light: '', dark: '' }; return /*#__PURE__*/ jsxs("div", { className: `rp-overflow-hidden rp-max-w-6xl ${home_hero_index_module.container}`, children: [ /*#__PURE__*/ jsxs("div", { className: home_hero_index_module.heroMain, children: [ hero.image ? /*#__PURE__*/ jsxs("div", { children: [ /*#__PURE__*/ jsx("img", { className: `dark:rp-hidden ${home_hero_index_module.heroImage}`, src: normalizeImagePath(imageSrc.light), alt: null == (_hero_image2 = hero.image) ? void 0 : _hero_image2.alt, srcSet: normalizeSrcsetAndSizes(null == (_hero_image3 = hero.image) ? void 0 : _hero_image3.srcset), sizes: normalizeSrcsetAndSizes(null == (_hero_image4 = hero.image) ? void 0 : _hero_image4.sizes) }), /*#__PURE__*/ jsx("img", { className: `rp-hidden dark:rp-block ${home_hero_index_module.heroImage}`, src: normalizeImagePath(imageSrc.dark), alt: null == (_hero_image5 = hero.image) ? void 0 : _hero_image5.alt, srcSet: normalizeSrcsetAndSizes(null == (_hero_image6 = hero.image) ? void 0 : _hero_image6.srcset), sizes: normalizeSrcsetAndSizes(null == (_hero_image7 = hero.image) ? void 0 : _hero_image7.sizes) }) ] }) : null, (null == hero ? void 0 : hero.name) ? /*#__PURE__*/ jsx("h1", { className: home_hero_index_module.heroName, ...renderHtmlOrText(hero.name) }) : null ] }), /*#__PURE__*/ jsxs("div", { className: home_hero_index_module.heroTaglineActions, children: [ /*#__PURE__*/ jsx("div", { className: home_hero_index_module.heroTagline, ...renderHtmlOrText(hero.tagline) }), beforeHeroActions, /*#__PURE__*/ jsx("div", { className: home_hero_index_module.heroActions, children: hero.actions.map((action)=>{ const link = isExternalUrl(action.link) ? action.link : normalizeHrefInRuntime(withBase(action.link)); return /*#__PURE__*/ jsx(Button, { href: link, theme: action.theme, ...renderHtmlOrText(action.text) }, action.text); }) }) ] }), afterHeroActions ] }); } function normalizeSrcsetAndSizes(field) { const r = (Array.isArray(field) ? field : [ field ]).filter(Boolean).join(', '); return r || void 0; } const SvgArrowRight = (props)=>/*#__PURE__*/ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: "none", viewBox: "0 0 24 24", ...props, children: /*#__PURE__*/ jsx("path", { fill: "currentColor", d: "M16 13v2h2v-2h2v-2h-2V9h-2v2H4v2zm0-4V7h-2v2zm0 8v-2h-2v2zM12 7h2V5h-2zm2 12v-2h-2v2z" }) }); const arrow_rightreact = SvgArrowRight; const link_card_index_module = { linkCard: "linkCard-cPk9Gt", link: "link-zuNVWp", linkCardContent: "linkCardContent-GW7Cr2", linkCardTitle: "linkCardTitle-uyQhA8", linkCardDescription: "linkCardDescription-vJgWKQ" }; function LinkCard(props) { const { href, title, description, style } = props; return /*#__PURE__*/ jsxs("div", { className: link_card_index_module.linkCard, style: style, children: [ /*#__PURE__*/ jsxs("div", { className: link_card_index_module.linkCardContent, children: [ /*#__PURE__*/ jsx("a", { href: href, className: link_card_index_module.link, children: title && /*#__PURE__*/ jsx("span", { className: link_card_index_module.linkCardTitle, children: title }) }), /*#__PURE__*/ jsx("span", { className: link_card_index_module.linkCardDescription, children: description }) ] }), /*#__PURE__*/ jsx("div", { className: link_card_index_module.linkCardArrow, children: /*#__PURE__*/ jsx(arrow_rightreact, {}) }) ] }); } const outline_cta_index_module = { container: "container-LzbylO", headline: "headline-y75_LS", description: "description-muYVs3" }; function OutlineCTA({ buttonText = OUTLINE_CTA_BUTTON_TEXT, description = OUTLINE_CTA_DESCRIPTION, headline = OUTLINE_CTA_HEADLINE, href = OUTLINE_CTA_LINK }) { return /*#__PURE__*/ jsxs("div", { className: outline_cta_index_module.container, children: [ /*#__PURE__*/ jsxs("div", { children: [ /*#__PURE__*/ jsx("div", { className: outline_cta_index_module.headline, children: headline }), /*#__PURE__*/ jsx("div", { className: outline_cta_index_module.description, children: description }) ] }), /*#__PURE__*/ jsx(Button, { external: true, href: href, children: buttonText }) ] }); } const prev_next_page_index_module = { "pager-link": "pager-link-NSBULJ", pagerLink: "pager-link-NSBULJ", title: "title-hrit_i", next: "next-axkYXz", desc: "desc-sp3vRh", inner: "inner-MA3YUN", textWrap: "textWrap-lmdyLc", iconWrap: "iconWrap-ATpUMW", iconBg: "iconBg-mnR30D", icon: "icon-WRLCnG", iconPrev: "iconPrev-ZwYZt5" }; const prevPageText = 'Previous Page'; const nextPageText = 'Next Page'; function PrevNextPage(props) { const { type, text, href } = props; const pageText = 'prev' === type ? prevPageText : nextPageText; const isPrev = 'prev' === type; return /*#__PURE__*/ jsx(Link, { href: href, className: prev_next_page_index_module.pagerLink, children: /*#__PURE__*/ jsxs("div", { className: `${prev_next_page_index_module.inner} ${isPrev ? prev_next_page_index_module.prev : prev_next_page_index_module.next}`, children: [ isPrev && /*#__PURE__*/ jsx("span", { className: prev_next_page_index_module.iconWrap, children: /*#__PURE__*/ jsx("span", { className: prev_next_page_index_module.iconBg, children: /*#__PURE__*/ jsx(arrow_bar_rightreact, { className: `${prev_next_page_index_module.icon} ${prev_next_page_index_module.iconPrev}` }) }) }), /*#__PURE__*/ jsxs("span", { className: prev_next_page_index_module.textWrap, children: [ /*#__PURE__*/ jsx("span", { className: prev_next_page_index_module.desc, children: pageText }), /*#__PURE__*/ jsx("span", { className: prev_next_page_index_module.title, children: text }) ] }), !isPrev && /*#__PURE__*/ jsx("span", { className: prev_next_page_index_module.iconWrap, children: /*#__PURE__*/ jsx("span", { className: prev_next_page_index_module.iconBg, children: /*#__PURE__*/ jsx(arrow_bar_rightreact, { className: `${prev_next_page_index_module.icon} ${prev_next_page_index_module.iconNext}` }) }) }) ] }) }); } const SvgMoon = (props)=>/*#__PURE__*/ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: "none", viewBox: "0 0 24 24", ...props, children: /*#__PURE__*/ jsx("path", { fill: "currentColor", d: "M18 22H8v-2h10zM8 20H6v-2h2zm12 0h-2v-2h2zM6 18H4v-2h2zm16 0h-2v-4h-2v-2h2v-2h2zM4 16H2V6h2zm14 0h-6v-2h6zm-6-2h-2v-2h2zm-2-2H8V6h2zM6 6H4V4h2zm8-2h-2v2h-2V4H6V2h8z" }) }); const moonreact = SvgMoon; const SvgSun = (props)=>/*#__PURE__*/ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: "none", viewBox: "0 0 24 24", ...props, children: /*#__PURE__*/ jsx("path", { fill: "currentColor", d: "M13 24h-2v-4h2zm-9-2H2v-2h2zm18 0h-2v-2h2zM6 20H4v-2h2zm14 0h-2v-2h2zm-4-2H8v-2h8zm-8-2H6V8h2zm10 0h-2V8h2zM4 13H0v-2h4zm20 0h-4v-2h4zm-8-5H8V6h8zM6 6H4V4h2zm14 0h-2V4h2zM4 4H2V2h2zm9 0h-2V0h2zm9 0h-2V2h2z" }) }); const sunreact = SvgSun; const supportAppearanceTransition = ()=>{ var _document; return 'function' == typeof (null == (_document = document) ? void 0 : _document.startViewTransition) && !window.matchMedia('(prefers-reduced-motion: reduce)').matches; }; const removeClipViewTransition = ()=>{ const styleDom = document.createElement('style'); styleDom.innerHTML = ` .rspress-doc { view-transition-name: none !important; } `; document.head.appendChild(styleDom); return ()=>{ document.head.removeChild(styleDom); }; }; function SwitchAppearance({ onClick }) { const { data: pageData } = useContext(DataContext); const { theme, setTheme = ()=>{} } = useContext(ThemeContext); const handleClick = (event)=>{ var _pageData_siteData_themeConfig, _pageData_siteData; const supported = supportAppearanceTransition(); const enabled = null == (_pageData_siteData = pageData.siteData) ? void 0 : null == (_pageData_siteData_themeConfig = _pageData_siteData.themeConfig) ? void 0 : _pageData_siteData_themeConfig.enableAppearanceAnimation; const nextTheme = 'dark' === theme ? 'light' : 'dark'; const isDark = 'dark' === nextTheme; if (supported && enabled) { const x = event.clientX; const y = event.clientY; const endRadius = Math.hypot(Math.max(x, innerWidth - x + 200), Math.max(y, innerHeight - y + 200)); const dispose = removeClipViewTransition(); const transition = document.startViewTransition(async ()=>{ flushSync(()=>{ setTheme(nextTheme); null == onClick || onClick(); }); }); const clipPath = [ `circle(0px at ${x}px ${y}px)`, `circle(${endRadius}px at ${x}px ${y}px)` ]; transition.ready.then(()=>{ document.documentElement.animate({ clipPath: isDark ? [ ...clipPath ].reverse() : clipPath }, { duration: 400, easing: 'ease-in', pseudoElement: isDark ? '::view-transition-old(root)' : '::view-transition-new(root)', id: '' }).finished.then(()=>{ dispose(); }); }); } else { setTheme(nextTheme); null == onClick || onClick(); } }; return /*#__PURE__*/ jsx("div", { onClick: handleClick, className: "md:rp-mr-2 rspress-nav-appearance", children: /*#__PURE__*/ jsxs("div", { className: "rp-p-1 rp-border rp-border-solid rp-border-gray-300 rp-text-gray-400 rp-cursor-pointer rp-rounded-md hover:rp-border-gray-600 hover:rp-text-gray-600 dark:hover:rp-border-gray-200 dark:hover:rp-text-gray-200 rp-transition-all rp-duration-300 rp-w-7 rp-h-7", children: [ /*#__PURE__*/ jsx(moonreact, { className: "dark:rp-hidden", width: "18", height: "18", fill: "currentColor" }), /*#__PURE__*/ jsx(sunreact, { className: "rp-hidden dark:rp-block", width: "18", height: "18", fill: "currentColor" }) ] }) }); } const version_badge_index_module = { container: "container-guehiO" }; function VersionBadge({ version }) { const pageData = usePageData(); if (pageData.page.frontmatter.overview) return null; const currentVersion = version ?? pageData.page.version; const versionText = `Version: ${currentVersion}`; return /*#__PURE__*/ jsx("div", { className: version_badge_index_module.container, children: /*#__PURE__*/ jsx(external_theme_Badge, { type: "info", text: versionText }) }); } export { Announcement, Badge, Button, Card, HomeBanner, HomeFeature, HomeFooter, HomeHero, LinkCard, OutlineCTA, PrevNextPage, SwitchAppearance, VersionBadge };