From 9f0d43fe099a95ab1516ae951dcb60a89e76a5a5 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Fri, 3 Nov 2023 21:13:33 +0800 Subject: chore: delete useless codes --- docs/components/Authors.tsx | 22 - docs/components/Avatar.tsx | 37 -- docs/components/Badge.tsx | 24 - docs/components/Callout.tsx | 55 -- docs/components/Container.tsx | 9 - docs/components/ExamplesArea.tsx | 30 -- docs/components/ExtraContent.tsx | 10 - docs/components/Feature.tsx | 88 ---- docs/components/Features.tsx | 46 -- docs/components/Footer.tsx | 249 --------- docs/components/FullTurboCTA.tsx | 41 -- docs/components/HeaderLogo.tsx | 36 -- docs/components/HydroRollTRPGFeatures.tsx | 106 ---- docs/components/HydroRollTRPGQuickstart.tsx | 28 -- docs/components/Icons.tsx | 165 ------ docs/components/Logo.tsx | 119 ----- docs/components/LogoContext/icons.tsx | 228 --------- docs/components/LogoContext/index.tsx | 169 ------- docs/components/LogoContext/items.tsx | 91 ---- docs/components/LogoContext/types.ts | 25 - docs/components/MonorepoHandbook.tsx | 142 ------ docs/components/Navigation.tsx | 47 -- docs/components/QuickStart.tsx | 89 ---- docs/components/RemoteCacheCounter.tsx | 47 -- docs/components/SiteSwitcher.tsx | 66 --- docs/components/Social.tsx | 32 -- docs/components/Tabs.tsx | 37 -- docs/components/Tweet.tsx | 46 -- docs/components/blog/Date.tsx | 21 - docs/components/clients/Clients.tsx | 61 --- docs/components/clients/Filters.tsx | 42 -- docs/components/clients/Logo.tsx | 67 --- docs/components/clients/Marquee.tsx | 14 - docs/components/clients/users.ts | 556 --------------------- docs/components/header-logo.module.css | 20 - docs/components/image/ImageFigure.tsx | 40 -- docs/components/image/ThemedImage.tsx | 45 -- docs/components/image/ThemedImageFigure.tsx | 47 -- docs/components/logos/AILogo.tsx | 17 - docs/components/logos/HydroRoll.tsx | 26 - docs/components/logos/TRPGLogo.tsx | 16 - docs/components/logos/Turbo.tsx | 62 --- docs/components/logos/TurboAnimated.tsx | 157 ------ docs/components/logos/og/PackLogo.tsx | 72 --- docs/components/logos/og/RepoLogo.tsx | 70 --- docs/components/logos/og/TurboLogo.tsx | 54 -- docs/components/logos/og/VercelLogo.tsx | 16 - docs/components/output-mode-table.mdx | 7 - docs/components/pages/AI-home/AIFeatures.tsx | 15 - docs/components/pages/AI-home/AIHero.tsx | 113 ----- docs/components/pages/AI-home/AILetter.tsx | 106 ---- docs/components/pages/AI-home/index.tsx | 22 - .../pages/TRPG-home/DocsBenchmarkStat.tsx | 53 -- .../pages/TRPG-home/DocsBenchmarksGraph.tsx | 31 -- .../pages/TRPG-home/PackBenchmarkTabs.tsx | 149 ------ docs/components/pages/TRPG-home/PackBenchmarks.tsx | 97 ---- .../pages/TRPG-home/PackBenchmarksGraph.tsx | 334 ------------- .../pages/TRPG-home/PackBenchmarksPicker.tsx | 20 - docs/components/pages/TRPG-home/PackDropdown.tsx | 117 ----- docs/components/pages/TRPG-home/PackFeatures.tsx | 12 - docs/components/pages/TRPG-home/PackHero.tsx | 114 ----- docs/components/pages/TRPG-home/PackLetter.tsx | 104 ---- .../pages/TRPG-home/benchmark-data/README.md | 7 - .../pages/TRPG-home/benchmark-data/data.json | 54 -- docs/components/pages/TRPG-home/index.tsx | 24 - docs/components/pages/confirm.tsx | 36 -- docs/components/pages/home-shared/CTAButton.tsx | 43 -- docs/components/pages/home-shared/FadeIn.tsx | 50 -- docs/components/pages/home-shared/FeatureBox.tsx | 42 -- .../components/pages/home-shared/FeaturesBento.tsx | 38 -- docs/components/pages/home-shared/GlobalStyles.tsx | 20 - docs/components/pages/home-shared/Gradient.tsx | 47 -- .../pages/home-shared/GradientSectionBorder.tsx | 37 -- docs/components/pages/home-shared/Headings.tsx | 56 --- .../pages/home-shared/gradients.module.css | 231 --------- docs/components/pages/landing/HydroRollAI.tsx | 27 - docs/components/pages/landing/HydroRollTRPG.tsx | 27 - .../pages/landing/TurboHeroBackground.tsx | 33 -- docs/components/pages/landing/index.module.css | 184 ------- docs/components/pages/landing/index.tsx | 197 -------- .../pages/landing/turbohero-background.module.css | 108 ---- docs/components/pages/showcase.tsx | 47 -- docs/components/useIsomorphicLayoutEffect.tsx | 7 - docs/components/usePrefersReducedMotion.tsx | 44 -- 84 files changed, 6140 deletions(-) delete mode 100644 docs/components/Authors.tsx delete mode 100644 docs/components/Avatar.tsx delete mode 100644 docs/components/Badge.tsx delete mode 100644 docs/components/Callout.tsx delete mode 100644 docs/components/Container.tsx delete mode 100644 docs/components/ExamplesArea.tsx delete mode 100644 docs/components/ExtraContent.tsx delete mode 100644 docs/components/Feature.tsx delete mode 100644 docs/components/Features.tsx delete mode 100644 docs/components/Footer.tsx delete mode 100644 docs/components/FullTurboCTA.tsx delete mode 100644 docs/components/HeaderLogo.tsx delete mode 100644 docs/components/HydroRollTRPGFeatures.tsx delete mode 100644 docs/components/HydroRollTRPGQuickstart.tsx delete mode 100644 docs/components/Icons.tsx delete mode 100644 docs/components/Logo.tsx delete mode 100644 docs/components/LogoContext/icons.tsx delete mode 100644 docs/components/LogoContext/index.tsx delete mode 100644 docs/components/LogoContext/items.tsx delete mode 100644 docs/components/LogoContext/types.ts delete mode 100644 docs/components/MonorepoHandbook.tsx delete mode 100644 docs/components/Navigation.tsx delete mode 100644 docs/components/QuickStart.tsx delete mode 100644 docs/components/RemoteCacheCounter.tsx delete mode 100644 docs/components/SiteSwitcher.tsx delete mode 100644 docs/components/Social.tsx delete mode 100644 docs/components/Tabs.tsx delete mode 100644 docs/components/Tweet.tsx delete mode 100644 docs/components/blog/Date.tsx delete mode 100644 docs/components/clients/Clients.tsx delete mode 100644 docs/components/clients/Filters.tsx delete mode 100644 docs/components/clients/Logo.tsx delete mode 100644 docs/components/clients/Marquee.tsx delete mode 100644 docs/components/clients/users.ts delete mode 100644 docs/components/header-logo.module.css delete mode 100644 docs/components/image/ImageFigure.tsx delete mode 100644 docs/components/image/ThemedImage.tsx delete mode 100644 docs/components/image/ThemedImageFigure.tsx delete mode 100644 docs/components/logos/AILogo.tsx delete mode 100644 docs/components/logos/HydroRoll.tsx delete mode 100644 docs/components/logos/TRPGLogo.tsx delete mode 100644 docs/components/logos/Turbo.tsx delete mode 100644 docs/components/logos/TurboAnimated.tsx delete mode 100644 docs/components/logos/og/PackLogo.tsx delete mode 100644 docs/components/logos/og/RepoLogo.tsx delete mode 100644 docs/components/logos/og/TurboLogo.tsx delete mode 100644 docs/components/logos/og/VercelLogo.tsx delete mode 100644 docs/components/output-mode-table.mdx delete mode 100644 docs/components/pages/AI-home/AIFeatures.tsx delete mode 100644 docs/components/pages/AI-home/AIHero.tsx delete mode 100644 docs/components/pages/AI-home/AILetter.tsx delete mode 100644 docs/components/pages/AI-home/index.tsx delete mode 100644 docs/components/pages/TRPG-home/DocsBenchmarkStat.tsx delete mode 100644 docs/components/pages/TRPG-home/DocsBenchmarksGraph.tsx delete mode 100644 docs/components/pages/TRPG-home/PackBenchmarkTabs.tsx delete mode 100644 docs/components/pages/TRPG-home/PackBenchmarks.tsx delete mode 100644 docs/components/pages/TRPG-home/PackBenchmarksGraph.tsx delete mode 100644 docs/components/pages/TRPG-home/PackBenchmarksPicker.tsx delete mode 100644 docs/components/pages/TRPG-home/PackDropdown.tsx delete mode 100644 docs/components/pages/TRPG-home/PackFeatures.tsx delete mode 100644 docs/components/pages/TRPG-home/PackHero.tsx delete mode 100644 docs/components/pages/TRPG-home/PackLetter.tsx delete mode 100644 docs/components/pages/TRPG-home/benchmark-data/README.md delete mode 100644 docs/components/pages/TRPG-home/benchmark-data/data.json delete mode 100644 docs/components/pages/TRPG-home/index.tsx delete mode 100644 docs/components/pages/confirm.tsx delete mode 100644 docs/components/pages/home-shared/CTAButton.tsx delete mode 100644 docs/components/pages/home-shared/FadeIn.tsx delete mode 100644 docs/components/pages/home-shared/FeatureBox.tsx delete mode 100644 docs/components/pages/home-shared/FeaturesBento.tsx delete mode 100644 docs/components/pages/home-shared/GlobalStyles.tsx delete mode 100644 docs/components/pages/home-shared/Gradient.tsx delete mode 100644 docs/components/pages/home-shared/GradientSectionBorder.tsx delete mode 100644 docs/components/pages/home-shared/Headings.tsx delete mode 100644 docs/components/pages/home-shared/gradients.module.css delete mode 100644 docs/components/pages/landing/HydroRollAI.tsx delete mode 100644 docs/components/pages/landing/HydroRollTRPG.tsx delete mode 100644 docs/components/pages/landing/TurboHeroBackground.tsx delete mode 100644 docs/components/pages/landing/index.module.css delete mode 100644 docs/components/pages/landing/index.tsx delete mode 100644 docs/components/pages/landing/turbohero-background.module.css delete mode 100644 docs/components/pages/showcase.tsx delete mode 100644 docs/components/useIsomorphicLayoutEffect.tsx delete mode 100644 docs/components/usePrefersReducedMotion.tsx (limited to 'docs/components') diff --git a/docs/components/Authors.tsx b/docs/components/Authors.tsx deleted file mode 100644 index 0623440..0000000 --- a/docs/components/Authors.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { Avatar } from "./Avatar"; -import cn from "classnames"; -import HYDROROLL_TEAM from "../content/team"; -import type { Author } from "../content/team"; - -export function Authors({ authors }: { authors: Array }) { - const validAuthors = authors.filter((author) => HYDROROLL_TEAM[author]); - return ( -
-
4 && "max-w-3xl" - )} - > - {validAuthors.map((username) => ( - - ))} -
-
- ); -} diff --git a/docs/components/Avatar.tsx b/docs/components/Avatar.tsx deleted file mode 100644 index 8914269..0000000 --- a/docs/components/Avatar.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import Image from "next/image"; -import type { AuthorDetails } from "../content/team"; - -export const Avatar = ({ name, picture, GithubUsername }: AuthorDetails) => ( -
-
- {name} -
-
-
Name
-
{name}
- {GithubUsername && ( - <> -
Github
-
- - {`@${GithubUsername}`} - -
- - )} -
-
-); diff --git a/docs/components/Badge.tsx b/docs/components/Badge.tsx deleted file mode 100644 index 45e5a0c..0000000 --- a/docs/components/Badge.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import cn from "classnames"; - -import type { ReactNode } from "react"; - -export type BadgeProps = React.ComponentProps<"span"> & { - children: ReactNode; - className?: string; -}; - -export default function Badge(props: BadgeProps) { - const { children, className, ...rest } = props; - - return ( - - {children} - - ); -} diff --git a/docs/components/Callout.tsx b/docs/components/Callout.tsx deleted file mode 100644 index d284bae..0000000 --- a/docs/components/Callout.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import React, { ReactElement, ReactNode } from "react"; -import { - LightBulbIcon, - ExclamationIcon, - ExclamationCircleIcon, - InformationCircleIcon, -} from "@heroicons/react/solid"; - -const THEMES = { - info: { - classes: - "bg-blue-100 text-blue-800 dark:text-blue-300 dark:bg-blue-200 dark:bg-opacity-10", - icon: , - }, - idea: { - classes: - "bg-gray-100 text-gray-800 dark:text-gray-300 dark:bg-gray-200 dark:bg-opacity-10", - icon: , - }, - error: { - classes: - "bg-red-200 text-red-900 dark:text-red-200 dark:bg-red-600 dark:bg-opacity-30", - icon: , - }, - default: { - classes: - "bg-orange-100 text-orange-800 dark:text-orange-300 dark:bg-orange-200 dark:bg-opacity-10", - icon: , - }, -}; - -export default function Callout({ - children, - type = "default", - icon, -}: { - children: ReactNode; - type: keyof typeof THEMES; - icon?: ReactElement; -}) { - return ( -
-
- {icon || THEMES[type].icon} -
-
{children}
-
- ); -} diff --git a/docs/components/Container.tsx b/docs/components/Container.tsx deleted file mode 100644 index a6db4d8..0000000 --- a/docs/components/Container.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import type { ReactNode } from "react"; - -type Props = { - children?: ReactNode; -}; - -export const Container = ({ children }: Props) => { - return
{children}
; -}; diff --git a/docs/components/ExamplesArea.tsx b/docs/components/ExamplesArea.tsx deleted file mode 100644 index c4c7060..0000000 --- a/docs/components/ExamplesArea.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { useSSG } from "nextra/ssg"; -import { DetailedFeatureLink } from "./Feature"; -import { GitHubIcon } from "./Icons"; - -export const ExamplesArea = ({ - filter = "featured", -}: { - filter: "featured" | "all"; -}) => { - const { examples } = useSSG(); - - return ( -
- {examples - .filter(({ featured }) => (filter === "featured" ? featured : true)) - .map(({ name, description, slug }) => ( - - ))} -
- ); -}; diff --git a/docs/components/ExtraContent.tsx b/docs/components/ExtraContent.tsx deleted file mode 100644 index 93567ce..0000000 --- a/docs/components/ExtraContent.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import RemoteCacheCounter from "./RemoteCacheCounter"; -import { useTurboSite } from "./SiteSwitcher"; - -export default function ExtraContent() { - const site = useTurboSite(); - - if (site === "AI") { - return ; - } -} diff --git a/docs/components/Feature.tsx b/docs/components/Feature.tsx deleted file mode 100644 index 1a8a8b2..0000000 --- a/docs/components/Feature.tsx +++ /dev/null @@ -1,88 +0,0 @@ -import classNames from "classnames"; -import Link from "next/link"; -import type { Feature } from "../content/legacy-features"; - -type FeatureProps = { - feature: Omit; - // include feature description - detailed?: boolean; -}; - -const DetailedFeatureInner = (props: { feature: FeatureProps["feature"] }) => { - const { Icon, name, description } = props.feature; - return ( - <> -
-
-
-

- {name} -

-
-
-

- {description} -

-
- - - ); -}; - -const featureWrapperClasses = `relative block overflow-hidden p-10 bg-white shadow-lg rounded-xl dark:bg-opacity-5 no-underline text-black dark:text-white`; - -export const DetailedFeatureLink = (props: { - href: string; - feature: FeatureProps["feature"]; - target?: string; -}) => { - const { href, feature, ...rest } = props; - return ( - - - - ); -}; - -export default function Feature(props: FeatureProps) { - const { feature, detailed = false } = props; - const { Icon, name } = feature; - - if (detailed) { - return ( -
- -
- ); - } - - return ( -
-
-
-
-
{name}
-
-
- ); -} diff --git a/docs/components/Features.tsx b/docs/components/Features.tsx deleted file mode 100644 index c8a6eed..0000000 --- a/docs/components/Features.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import React from "react"; -import { - LEGACY_REPO_DOCS_FEATURES, - LEGACY_REPO_HOME_FEATURES, -} from "../content/legacy-features"; -import Feature from "./Feature"; - -export function HomeFeatures() { - return ( - - {LEGACY_REPO_HOME_FEATURES.map((feature) => ( - - ))} - - ); -} - -export function DocsFeatures({ detailed = true }: { detailed?: boolean }) { - return ( -
- {LEGACY_REPO_DOCS_FEATURES.map((feature) => ( - - ))} -
- ); -} - -export function DetailedFeaturesGrid({ - children, -}: { - children?: React.ReactNode; -}) { - return ( -
- {children} -
- ); -} diff --git a/docs/components/Footer.tsx b/docs/components/Footer.tsx deleted file mode 100644 index 9a3bf23..0000000 --- a/docs/components/Footer.tsx +++ /dev/null @@ -1,249 +0,0 @@ -import { useRouter } from "next/router"; -import Link from "next/link"; -import { useState, ReactNode, ReactElement } from "react"; -import cn from "classnames"; -import { ThemeSwitch } from "nextra-theme-docs"; -import HydroRolllogo from "./logos/HydroRoll"; -import { useTurboSite, TurboSite } from "./SiteSwitcher"; - -function FooterLink({ href, children }: { href: string; children: ReactNode }) { - const classes = - "text-sm text-[#666666] dark:text-[#888888] no-underline betterhover:hover:text-gray-700 betterhover:hover:dark:text-white transition"; - if (href.startsWith("http")) { - return ( - - {children} - - ); - } - return ( - - {children} - - ); -} - -function FooterHeader({ children }: { children: ReactNode }) { - return

{children}

; -} - -const navigation = { - general: [ - { name: "Blog", href: "/blog" }, - { name: "Releases", href: "https://github.com/HydroRoll-Team/HydroRoll/releases" }, - ], - AI: [ - { name: "文档", href: "/AI/docs" }, - { name: "FAQ", href: "/AI/docs/faq" }, - ], - TRPG: [ - { name: "文档", href: "/TRPG/docs" }, - { name: "特性", href: "/TRPG/docs/features" }, - ], - support: [ - { - name: "GitHub", - href: "https://github.com/HydroRoll-Team/support", - }, - { - name: "Discord", - href: "https://hydroroll.retrofor.space/discord", - }, - ], - links: (site: TurboSite) => [ - { name: "Dice!", href: "https://forum.kokona.tech" }, - { - name: "OlivOS", - href: "https://forum.olivos.run", - }, - // { name: "Dicex骰子屋", href: "https://forum.dicex.link" }, - // { name: "SealDice", href: "https://dice.weizaima.com/"}, - { name: "HuggingFace", href: "https://huggingface.co " } - // { - // name: "", - // href: `https://vercel.com/${ - // site === "AI" ? "solutions/HydroRollAI" : "contact/sales" - // }?utm_source=turbo.build&utm_medium=referral&utm_campaign=footer-enterpriseLink`, - // }, - ], - legal: [ - { name: "隐私政策", href: "/privacy" }, - // { name: "Terms of Service", href: "/terms" }, - ], -}; - -export function FooterContent() { - const site = useTurboSite(); - return ( -
- -
-
-
-
-
- Resources -
    - {navigation.general.map((item) => ( -
  • - {item.name} -
  • - ))} -
-
-
- AI Model -
    - {navigation.AI.map((item) => ( -
  • - {item.name} -
  • - ))} -
-
-
- TRPG -
    - {navigation.TRPG.map((item) => ( -
  • - {item.name} -
  • - ))} -
-
-
- Links -
    - {navigation.links(site).map((item) => ( -
  • - {item.name} -
  • - ))} -
-
-
- Legal -
    - {navigation.legal.map((item) => ( -
  • - {item.name} -
  • - ))} -
-
-
- Support -
    - {navigation.support.map((item) => ( -
  • - {item.name} -
  • - ))} -
-
-
-
-
- Subscribe to HydroRoll newsletter -

- 订阅水系最新的blog与release内容,抑或是插件与模型的更新。 -

- -
-
- -
-
- - - -

- © {new Date().getFullYear()} HydroRoll-Team. All rights - reserved. -

-
-
-
-
- ); -} - -function SubmitForm() { - const [email, setEmail] = useState(""); - const router = useRouter(); - return ( -
{ - fetch("/api/signup", { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ email }), - }) - .then((res) => res.json()) - .then((res) => { - return router.push("/confirm"); - }); - e.preventDefault(); - }} - > - - setEmail(e.target.value)} - className="border-[#666666] dark:border-[#888888] w-full min-w-0 px-4 py-2 text-base text-gray-900 placeholder-gray-500 bg-white border rounded-md appearance-none dark:text-white sm:text-sm dark:bg-transparent focus:outline-none focus:ring-2 focus:ring-gray-800 dark:focus:border-white focus:placeholder-gray-400" - placeholder="you@example.com" - /> -
- -
-
- ); -} - -export function Footer({ menu }: { menu?: boolean }): ReactElement { - return ( -
-
-
- -
-
-
- -
-
- ); -} diff --git a/docs/components/FullTurboCTA.tsx b/docs/components/FullTurboCTA.tsx deleted file mode 100644 index 0c3a44b..0000000 --- a/docs/components/FullTurboCTA.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { Container } from "./Container"; -import Callout from "./Callout"; -import Link from "next/link"; - -function FullTurboCTA() { - return ( -
-
-

- Ready to go - {">>>"} FULL TURBO - at your organization? -

-
- Vercel's Experts can bring your entire team up to speed quickly -
-
-
- - Talk to an Expert - -
- -
- ); -} - -export default FullTurboCTA; diff --git a/docs/components/HeaderLogo.tsx b/docs/components/HeaderLogo.tsx deleted file mode 100644 index a1fc395..0000000 --- a/docs/components/HeaderLogo.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import SiteSwitcher from "./SiteSwitcher"; -import Link from "next/link"; -import styles from "./header-logo.module.css"; -import TurboAnimated from "./logos/TurboAnimated"; -import { LogoContext } from "./LogoContext"; - -function HeaderLogo() { - return ( - <> - - - - - - - - -
- -
- - ); -} - -export default HeaderLogo; diff --git a/docs/components/HydroRollTRPGFeatures.tsx b/docs/components/HydroRollTRPGFeatures.tsx deleted file mode 100644 index c470df7..0000000 --- a/docs/components/HydroRollTRPGFeatures.tsx +++ /dev/null @@ -1,106 +0,0 @@ -import { - AdjustmentsIcon, - ArchiveIcon, - DesktopComputerIcon, - DownloadIcon, - ServerIcon, -} from "@heroicons/react/outline"; -import { DetailedFeatureLink } from "./Feature"; -import { CSSIcon, JSIcon, TSIcon } from "./Icons"; - -export const HydroRollTRPGFeatures = () => { - return ( -
- - - Supports TypeScript out of the box, including resolving{" "} - paths and baseUrl. - - ), - name: "TypeScript", - }} - href="/TRPG/docs/features/typescript" - > - - Supports require, import, dynamic - imports and more. - - ), - name: "Imports", - }} - href="/TRPG/docs/features/imports" - > - - - Supports Global CSS, CSS Modules, postcss-nested and{" "} - @import. - - ), - name: "CSS", - }} - href="/TRPG/docs/features/css" - > - - - Supports the /public directory, JSON imports, and - importing assets via ESM. - - ), - name: "Static Assets", - }} - href="/TRPG/docs/features/static-assets" - > - - Supports environment variables via .env,{" "} - .env.local, and more. - - ), - name: "Environment Variables", - }} - href="/TRPG/docs/features/environment-variables" - > -
- ); -}; diff --git a/docs/components/HydroRollTRPGQuickstart.tsx b/docs/components/HydroRollTRPGQuickstart.tsx deleted file mode 100644 index 8f57f38..0000000 --- a/docs/components/HydroRollTRPGQuickstart.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { - LightBulbIcon, - QuestionMarkCircleIcon, -} from "@heroicons/react/outline"; -import { DetailedFeatureLink } from "./Feature"; - -export const HydroRollTRPGQuickstartArea = () => { - return ( -
- - -
- ); -}; diff --git a/docs/components/Icons.tsx b/docs/components/Icons.tsx deleted file mode 100644 index c203b3d..0000000 --- a/docs/components/Icons.tsx +++ /dev/null @@ -1,165 +0,0 @@ -import React, { ComponentProps } from "react"; - -export type IconType = ((props: ComponentProps<"svg">) => JSX.Element) & { - requiresFill?: boolean; -}; - -export const TailwindIcon: IconType = (props) => { - return ( - - ); -}; - -export const GitHubIcon: IconType = ({ height = 28, ...props }) => { - return ( - - ); -}; - -export const DockerIcon: IconType = ({ height = 28, ...props }) => { - return ( - - - - - - ); -}; - -export const RectangleGroupIcon: IconType = (props) => { - return ( - - - - ); -}; - -export const FaceSmileIcon: IconType = (props) => { - return ( - - - - ); -}; - -export const RectangleStackIcon: IconType = (props) => { - return ( - - - - ); -}; - -export const JSIcon: IconType = (props) => { - return ( - - - - ); -}; - -JSIcon.requiresFill = true; - -export const TSIcon: IconType = (props) => { - return ( - - - - ); -}; - -TSIcon.requiresFill = true; - -export const CSSIcon: IconType = (props) => { - return ( - - - - ); -}; - -CSSIcon.requiresFill = true; diff --git a/docs/components/Logo.tsx b/docs/components/Logo.tsx deleted file mode 100644 index 4c697ea..0000000 --- a/docs/components/Logo.tsx +++ /dev/null @@ -1,119 +0,0 @@ -export const Logo = () => ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -); diff --git a/docs/components/LogoContext/icons.tsx b/docs/components/LogoContext/icons.tsx deleted file mode 100644 index dabefc2..0000000 --- a/docs/components/LogoContext/icons.tsx +++ /dev/null @@ -1,228 +0,0 @@ -import classNames from "classnames"; - -export const VercelLogo = ({ className }: { className?: string }) => ( - - - -); - -export const TurborepoLogo = ({ className }: { className?: string }) => ( - - - - - - - - - - -); - -export const TurbopackLogo = ({ className }: { className?: string }) => ( - - - - - - - - - - - - - - - - - - - - -); - -export const NextJSLogo = ({ className }: { className?: string }) => ( - - - - - - - - - - - - - - - - - - - - -); - -export const DesignSystemLogo = ({ className }: { className?: string }) => ( - - - - - - -); - -export const IconType = ({ className }: { className?: string }) => ( - - - - - -); diff --git a/docs/components/LogoContext/index.tsx b/docs/components/LogoContext/index.tsx deleted file mode 100644 index 3f03740..0000000 --- a/docs/components/LogoContext/index.tsx +++ /dev/null @@ -1,169 +0,0 @@ -import { useEffect, useCallback, useState, useRef } from "react"; -import { useTheme } from "nextra-theme-docs"; -import Link from "next/link"; -import classNames from "classnames"; -import { VercelLogo } from "./icons"; -import { PRODUCT_MENU_ITEMS, PLATFORM_MENU_ITEMS } from "./items"; -import type { MenuItemProps } from "./types"; -import { MouseEvent } from "react"; -import { useTurboSite } from "../SiteSwitcher"; - -function MenuDivider({ children, ...other }: { children: string }) { - return ( -

- {children} -

- ); -} - -function MenuItem({ - children, - prefix, - className, - type, - href, - onClick, - closeMenu, - disabled, - ...other -}: MenuItemProps) { - const [copied, setCopied] = useState(false); - - const handleClick = () => { - if (onClick) { - onClick(); - } - if (type === "copy") { - setCopied(true); - } else { - closeMenu(); - } - }; - - useEffect(() => { - if (copied) { - const timeout = setTimeout(() => { - setCopied(false); - closeMenu(); - }, 2000); - return () => clearTimeout(timeout); - } - }, [copied, closeMenu]); - - const classes = classNames( - className, - "group flex items-center px-4 py-2 text-sm dark:hover:bg-gray-800 hover:bg-gray-200 w-full rounded-md" - ); - if (type === "internal") { - return ( - - {prefix} - {children} - - ); - } - if (type === "external") { - return ( - - {prefix} - {children} - - ); - } - - if (type === "copy") { - return ( - - ); - } -} - -export function LogoContext() { - const [open, setOpen] = useState(false); - const site = useTurboSite(); - const menu = useRef(null); - const { theme = "dark" } = useTheme(); - - const toggleMenu = (e: MouseEvent) => { - e.preventDefault(); - if (e.type === "contextmenu") { - setOpen((prev) => !prev); - } else { - setOpen(false); - window.open(`https://vercel.com`, "_blank"); - } - }; - - const onClickOutside: EventListener = useCallback( - (e) => { - if (menu.current && open && !menu.current.contains(e.target)) { - setOpen(false); - } - }, - [open] - ); - - useEffect(() => { - document.addEventListener("click", onClickOutside, true); - return () => { - document.removeEventListener("click", onClickOutside, true); - }; - }, [onClickOutside]); - - return ( -
- - {open && ( -
-
- Platform - {PLATFORM_MENU_ITEMS({ theme, site }).map((item) => ( - setOpen(false)} - {...item} - > - {item.children} - - ))} - Products - {PRODUCT_MENU_ITEMS({ theme, site }).map((item) => ( - setOpen(false)} - {...item} - > - {item.children} - - ))} -
-
- )} -
- ); -} diff --git a/docs/components/LogoContext/items.tsx b/docs/components/LogoContext/items.tsx deleted file mode 100644 index 3d15c01..0000000 --- a/docs/components/LogoContext/items.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import { - VercelLogo, - TurborepoLogo, - TurbopackLogo, - IconType, - NextJSLogo, - DesignSystemLogo, -} from "./icons"; -import type { ContextItem, ContextList } from "./types"; -import copy from "copy-to-clipboard"; - -export const PLATFORM_MENU_ITEMS = ({ - theme, -}: ContextList): Array => [ - { - name: "copy-logo", - "aria-label": "Copy Logo as SVG to Clipboard", - children: "Copy Logo as SVG", - prefix: , - type: "copy", - onClick: () => { - copy( - ` - - ` - ); - }, - }, - { - name: "copy-wordmark", - "aria-label": "Copy Wordmark as SVG to Clipboard", - children: "Copy Wordmark as SVG", - prefix: , - type: "copy", - onClick: () => { - copy( - // NOTE: We include `xmlns` as this is required when the SVG isn't inlined. - `` - ); - }, - }, - { - name: "brand-guidelines", - "aria-label": "Open Brand Guidelines in New Tab", - children: "Brand Guidelines", - prefix: , - type: "external", - href: "https://vercel.com/design/brands", - }, -]; - -export const PRODUCT_MENU_ITEMS = ({ - site, -}: ContextList): Array => [ - { - name: "next-js", - "aria-label": "Open Next.js Home in New Tab", - children: "Next.js", - prefix: , - type: "external", - href: "https://nextjs.org", - }, - { - name: "HydroRollAI", - "aria-label": "Open Turborepo Home in New Tab", - disabled: site === "AI", - children: "HydroRollAI", - prefix: , - type: "internal", - href: "/AI", - }, - { - name: "HydroRollTRPG", - "aria-label": "Open Turbopack Home in New Tab", - disabled: site === "TRPG", - children: "HydroRollTRPG", - prefix: , - type: "internal", - href: "/TRPG", - }, -]; diff --git a/docs/components/LogoContext/types.ts b/docs/components/LogoContext/types.ts deleted file mode 100644 index ff7f644..0000000 --- a/docs/components/LogoContext/types.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { ReactNode } from "react"; -import { TurboSite } from "../SiteSwitcher"; - -type MenuItemType = "internal" | "external" | "copy"; - -export interface MenuItemProps extends ContextItem { - closeMenu?: () => void; - className?: string; -} - -export interface ContextList { - theme: string; - site: TurboSite; -} - -export interface ContextItem { - name: string; - "aria-label": string; - disabled?: boolean; - type: MenuItemType; - children: ReactNode; - prefix: ReactNode; - href?: string; - onClick?: () => void; -} diff --git a/docs/components/MonorepoHandbook.tsx b/docs/components/MonorepoHandbook.tsx deleted file mode 100644 index d7e2fe5..0000000 --- a/docs/components/MonorepoHandbook.tsx +++ /dev/null @@ -1,142 +0,0 @@ -import { - BanIcon, - ChatAlt2Icon, - CloudDownloadIcon, - CloudUploadIcon, - CodeIcon, - CubeIcon, - LibraryIcon, - PencilAltIcon, - ShareIcon, - ShieldExclamationIcon, - StarIcon, -} from "@heroicons/react/outline"; -import React from "react"; -import { DetailedFeatureLink } from "./Feature"; -import { DockerIcon } from "./Icons"; - -const Wrapper = ({ children }: { children: React.ReactNode }) => { - return ( -
- {children} -
- ); -}; - -export const FundamentalsArea = () => { - return ( - - - - - - - - - ); -}; - -export const TasksArea = () => { - return ( - - - - - - - - - ); -}; diff --git a/docs/components/Navigation.tsx b/docs/components/Navigation.tsx deleted file mode 100644 index b446d4c..0000000 --- a/docs/components/Navigation.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import { Navbar } from "nextra-theme-docs"; -import { useTurboSite } from "./SiteSwitcher"; - -function Navigation(props) { - const site = useTurboSite(); - - /* - Inject a dynamic docs link when NOT on root - 1. Points to /repo/docs when on /repo - 2. Points to /pack/docs when on /pack - */ - const leadingItem = props.items[0]; - if (leadingItem?.id !== "contextual-docs" && site) { - props.items.unshift({ - title: "Docs", - type: "page", - route: `/${site}/docs`, - id: "contextual-docs", - key: "contextual-docs", - }); - } - - const lastItem = props.items[props.items.length - 1]; - if (lastItem?.id !== "contextual-enterprise") { - props.items.push({ - title: "Enterprise", - newWindow: true, - // https://github.com/shuding/nextra/issues/1028 - route: "enterprise", - href: `https://vercel.com/${ - site === "AI" ? "solutions/HydroRollAI" : "contact/sales" - }?utm_source=turbo.build&utm_medium=referral&utm_campaign=header-enterpriseLink`, - id: "contextual-enterprise", - key: "contextual-enterprise", - }); - } - - // remove the top level repo and pack links - const headerItems = props.items.filter((item) => { - return item.name !== "AI" && item.name !== "TRPG"; - }); - - // items last to override the default - return ; -} - -export default Navigation; diff --git a/docs/components/QuickStart.tsx b/docs/components/QuickStart.tsx deleted file mode 100644 index 113ba4f..0000000 --- a/docs/components/QuickStart.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import { - BookOpenIcon, - CloudDownloadIcon, - CloudUploadIcon, - LightBulbIcon, - LightningBoltIcon, - PencilIcon, - ServerIcon, - SparklesIcon, -} from "@heroicons/react/outline"; -import { DetailedFeatureLink } from "./Feature"; -import Turbo from "./logos/Turbo"; - -export const QuickStartArea = () => { - return ( -
- - - -
- ); -}; - -export const MonoreposArea = () => { - return ( -
- - -
- ); -}; - -export const LearnMoreArea = () => { - return ( -
- - -
- ); -}; diff --git a/docs/components/RemoteCacheCounter.tsx b/docs/components/RemoteCacheCounter.tsx deleted file mode 100644 index 7281887..0000000 --- a/docs/components/RemoteCacheCounter.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import cn from "classnames"; -import { useState, useEffect } from "react"; -import { animated, useSpring, config } from "@react-spring/web"; -import useTurborepoMinutesSaved from "../lib/useTurborepoMinutesSaved"; -import Link from "next/link"; - -const counterFormatter = Intl.NumberFormat(undefined, { - minimumIntegerDigits: 7, - maximumFractionDigits: 0, -}); - -export default function RemoteCacheCounter() { - const [targetMinutes, setTargetMinutes] = useState(0); - const timeSaved = useTurborepoMinutesSaved(); - useEffect(() => { - if (timeSaved) { - setTargetMinutes( - timeSaved.local_cache_minutes_saved + - timeSaved.remote_cache_minutes_saved - ); - } - }, [timeSaved]); - - const spring = useSpring({ - from: { minutesSaved: 0 }, - minutesSaved: targetMinutes, - config: config.molasses, - }); - - return ( - -
- - {spring.minutesSaved.to((t) => counterFormatter.format(t))} - -
Total Compute Minutes Saved
- -
- Get Started With Remote Caching → -
-
- - ); -} diff --git a/docs/components/SiteSwitcher.tsx b/docs/components/SiteSwitcher.tsx deleted file mode 100644 index 6f6ba15..0000000 --- a/docs/components/SiteSwitcher.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import cn from "classnames"; -import { useRouter } from "next/router"; -import Link from "next/link"; - -export type TurboSite = "TRPG" | "AI"; - -export function useTurboSite(): TurboSite | undefined { - const { pathname } = useRouter(); - - if (pathname.startsWith("/AI")) { - return "AI"; - } - - if (pathname.startsWith("/TRPG")) { - return "TRPG"; - } - - return undefined; -} - -function SiteSwitcherLink({ href, text, isActive }) { - const classes = - "py-1 transition-colors duration-300 inline-block w-[50px] cursor-pointer hover:text-black dark:hover:text-white"; - - const conditionalClasses = { - "text-black dark:text-white": !!isActive, - }; - - return ( - - {text} - - ); -} - -function SiteSwitcher() { - const site = useTurboSite(); - - return ( -
- - - - - - -
- ); -} - -export default SiteSwitcher; diff --git a/docs/components/Social.tsx b/docs/components/Social.tsx deleted file mode 100644 index 44e2cc2..0000000 --- a/docs/components/Social.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { DiscordIcon, GitHubIcon } from "nextra/icons"; - -function Github() { - return ( - - {/* Nextra icons have a attribute providing alt text */} - <GitHubIcon /> - </a> - ); -} - -function Discord() { - return ( - <a - href="https://hydroroll.retrofor.space/discord" - className="hidden p-2 text-current sm:flex hover:opacity-75" - title="HydroRoll Discord server" - target="_blank" - rel="noreferrer" - > - <DiscordIcon /> - </a> - ); -} - -export { Github, Discord }; diff --git a/docs/components/Tabs.tsx b/docs/components/Tabs.tsx deleted file mode 100644 index f75019a..0000000 --- a/docs/components/Tabs.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import type { FC, ReactElement } from "react"; - -import { Tabs as NextraTabs, Tab } from "nextra-theme-docs"; -import useSWR from "swr"; - -export { Tab }; - -export const Tabs: FC<{ - storageKey?: string; - items: string[]; - children: ReactElement; -}> = function ({ storageKey = "tab-index", items, children = null, ...props }) { - // Use SWR so all tabs with the same key can sync their states. - const { data, mutate } = useSWR(storageKey, (key) => { - try { - return JSON.parse(localStorage.getItem(key)); - } catch (e) { - return null; - } - }); - - const selectedIndex = items.indexOf(data); - - return ( - <NextraTabs - onChange={(index) => { - localStorage.setItem(storageKey, JSON.stringify(items[index])); - mutate(items[index], false); - }} - selectedIndex={selectedIndex === -1 ? undefined : selectedIndex} - items={items} - {...props} - > - {children} - </NextraTabs> - ); -}; diff --git a/docs/components/Tweet.tsx b/docs/components/Tweet.tsx deleted file mode 100644 index e5ac388..0000000 --- a/docs/components/Tweet.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import Image from "next/image"; - -function TweetLink({ href, children }) { - return ( - <a - href={href} - target="_blank" - rel="noopener noreferrer" - className="inline-block text-[#35ACDF]" - > - {children} - </a> - ); -} - -export function Mention({ children }) { - return ( - <TweetLink href={`https://twitter.com/${children.replace("@", "")}`}> - {children} - </TweetLink> - ); -} - -export default function Tweet({ url, username, name, avatar, date, children }) { - return ( - <div className="flex p-4 bg-white rounded-md shadow-xl dark:bg-opacity-10"> - <div className="flex-shrink-0 mr-4"> - <Image - className="w-12 h-12 rounded-full" - width={42} - height={42} - src={avatar} - alt={`${name} twitter avatar`} - /> - </div> - <div> - <div className="flex items-center space-x-1 text-sm"> - <h4 className="font-medium dark:text-white">{name}</h4> - <div className="truncate dark:text-gray-400">@{username}</div> - <div className="dark:text-gray-500 md:hidden xl:block">• {date}</div> - </div> - <div className="mt-1 text-sm dark:text-gray-200">{children}</div> - </div> - </div> - ); -} diff --git a/docs/components/blog/Date.tsx b/docs/components/blog/Date.tsx deleted file mode 100644 index 506eecc..0000000 --- a/docs/components/blog/Date.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { ReactNode } from "react"; - -function Date({ - children, - update = null, -}: { - children: ReactNode; - update?: string; -}) { - return ( - <div className="text-sm mt-2 text-center text-gray-500 dark:text-gray-400 font-space-grotesk"> - {children} - - {update != null && ( - <div className="text-xs mt-1 text-center">Last updated {update}</div> - )} - </div> - ); -} - -export default Date; diff --git a/docs/components/clients/Clients.tsx b/docs/components/clients/Clients.tsx deleted file mode 100644 index 199794e..0000000 --- a/docs/components/clients/Clients.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import React from "react"; -import cn from "classnames"; -import { users } from "./users"; -import { Logo } from "./Logo"; - -export function Clients({ - linked, - staticWidth, - companyList, -}: { - linked?: boolean; - staticWidth?: boolean; - companyList?: string[]; -}) { - const showcaseDark = []; - const showcaseLight = []; - - const LogoWrapper = ({ className, children }) => { - if (!staticWidth) return children; - return ( - <div - className={cn( - "w-48 lg:w-40 flex items-center justify-center", - className - )} - > - {children} - </div> - ); - }; - - users - .filter((i) => (companyList ? companyList.includes(i.caption) : true)) - .forEach((user) => { - if (user.pinned) { - showcaseDark.push( - <LogoWrapper - key={`${user.caption}-dark`} - className="flex dark:hidden" - > - <Logo user={user} theme={"dark"} isLink={linked} /> - </LogoWrapper> - ); - showcaseLight.push( - <LogoWrapper - key={`${user.caption}-light`} - className="hidden dark:flex" - > - <Logo user={user} theme={"light"} isLink={linked} /> - </LogoWrapper> - ); - } - }); - - return ( - <> - {showcaseDark} - {showcaseLight} - </> - ); -} diff --git a/docs/components/clients/Filters.tsx b/docs/components/clients/Filters.tsx deleted file mode 100644 index 3c22edc..0000000 --- a/docs/components/clients/Filters.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import React from "react"; - -export const Filters: React.FC<{}> = () => ( - <> - <svg width={0} height={0}> - <defs> - <filter id="high-threshold"> - <feColorMatrix type="saturate" values="0" /> - <feComponentTransfer> - <feFuncR type="discrete" tableValues="0" /> - <feFuncG type="discrete" tableValues="0" /> - <feFuncB type="discrete" tableValues="0" /> - </feComponentTransfer> - </filter> - </defs> - </svg> - <svg width={0} height={0}> - <defs> - <filter id="medium-threshold"> - <feColorMatrix type="saturate" values="0" /> - <feComponentTransfer> - <feFuncR type="discrete" tableValues="0 1" /> - <feFuncG type="discrete" tableValues="0 1" /> - <feFuncB type="discrete" tableValues="0 1" /> - </feComponentTransfer> - </filter> - </defs> - </svg> - <svg width={0} height={0}> - <defs> - <filter id="low-threshold"> - <feColorMatrix type="saturate" values="0" /> - <feComponentTransfer> - <feFuncR type="discrete" tableValues="0 0 0 0 1" /> - <feFuncG type="discrete" tableValues="0 0 0 0 1" /> - <feFuncB type="discrete" tableValues="0 0 0 0 1" /> - </feComponentTransfer> - </filter> - </defs> - </svg> - </> -); diff --git a/docs/components/clients/Logo.tsx b/docs/components/clients/Logo.tsx deleted file mode 100644 index 79ab9c2..0000000 --- a/docs/components/clients/Logo.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import React from "react"; -import cn from "classnames"; -import Image from "next/image"; -import { TurboUser } from "./users"; - -const DEFAULT_SIZE = { - width: 100, - height: 75, -}; - -export function Logo({ - user, - theme, - isLink, -}: { - user: TurboUser; - theme: "dark" | "light"; - isLink: boolean; -}) { - const styles = { - ...DEFAULT_SIZE, - ...user.style, - }; - let numericWidth: number; - let numericHeight: number; - if (typeof styles.width === "number") { - numericWidth = styles.width; - } - if (typeof styles.height === "number") { - numericHeight = styles.height; - } - const logo = ( - <Image - src={user.image.replace( - "/logos", - theme === "light" ? "/logos/white" : "/logos/color" - )} - alt={`${user.caption}'s Logo`} - width={numericWidth} - height={numericHeight} - priority={true} - style={styles} - className={cn("mx-8", { - "hidden dark:inline": theme !== "dark", - "dark:hidden inline": theme === "dark", - })} - /> - ); - - if (isLink) { - return ( - <a - href={user.infoLink} - target="_blank" - rel="noopener noreferrer" - className={cn("flex justify-center item-center", { - "hidden dark:flex": theme !== "dark", - "dark:hidden flex": theme === "dark", - })} - > - {logo} - </a> - ); - } - - return logo; -} diff --git a/docs/components/clients/Marquee.tsx b/docs/components/clients/Marquee.tsx deleted file mode 100644 index 0e0fc6f..0000000 --- a/docs/components/clients/Marquee.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from "react"; - -export function Marquee({ children, ...props }) { - return ( - <div className="overflow-x-hidden"> - <div className="sr-only"> - These are the logos of some but not all of our users. - </div> - <div className="relative"> - <div className="inline-block wrapper">{children}</div> - </div> - </div> - ); -} diff --git a/docs/components/clients/users.ts b/docs/components/clients/users.ts deleted file mode 100644 index efd2172..0000000 --- a/docs/components/clients/users.ts +++ /dev/null @@ -1,556 +0,0 @@ -import { CSSProperties } from "react"; - -export type TurboUser = { - caption: string; - image: string; - infoLink: string; - pinned?: boolean; - style?: CSSProperties; -}; - -export const users: Array<TurboUser> = [ - { - caption: "Vercel", - image: "/images/logos/vercel.svg", - infoLink: "https://vercel.com/", - pinned: true, - style: { - width: 150, - }, - }, - { - caption: "AWS", - image: "/images/logos/aws.svg", - infoLink: "https://aws.amazon.com/", - pinned: true, - style: { - width: 75, - }, - }, - { - caption: "Microsoft", - image: "/images/logos/microsoft.svg", - infoLink: "https://www.microsoft.com/", - pinned: true, - style: { - width: 125, - }, - }, - { - caption: "Netflix", - image: "/images/logos/netflix.svg", - infoLink: "https://netflix.com/", - pinned: true, - style: { - width: 110, - }, - }, - { - caption: "Disney", - image: "/images/logos/disney.svg", - infoLink: "https://www.disney.com/", - pinned: true, - }, - { - caption: "Github", - image: "/images/logos/github.svg", - infoLink: "https://www.github.com/", - pinned: true, - style: { - width: 110, - }, - }, - { - caption: "Alibaba", - image: "/images/logos/alibaba.svg", - infoLink: "https://www.alibaba.com/", - pinned: true, - style: { - width: 125, - }, - }, - { - caption: "Ant Group", - image: "/images/logos/ant.svg", - infoLink: "https://antgroup.com/", - pinned: true, - style: { - width: 125, - }, - }, - { - caption: "Adobe", - image: "/images/logos/adobe.svg", - infoLink: "https://www.adobe.com/", - pinned: true, - }, - { - caption: "PayPal", - image: "/images/logos/paypal.svg", - infoLink: "https://www.paypal.com/", - pinned: true, - }, - - { - caption: "Snap", - image: "/images/logos/snap.svg", - infoLink: "https://snap.com/", - pinned: true, - }, - { - caption: "SAP", - image: "/images/logos/sap.svg", - infoLink: "https://www.sap.com/", - pinned: true, - style: { - width: 75, - }, - }, - - { - caption: "Shopify", - image: "/images/logos/shopify.svg", - infoLink: "https://www.shopify.com/", - pinned: true, - style: { - width: 125, - }, - }, - - { - caption: "Datadog", - image: "/images/logos/datadog.svg", - infoLink: "https://www.datadoghq.com/", - pinned: true, - style: { - width: 125, - }, - }, - { - caption: "Twilio", - image: "/images/logos/twilio.svg", - infoLink: "https://www.twilio.com/", - pinned: true, - }, - { - caption: "Segment", - image: "/images/logos/segment.svg", - infoLink: "https://segment.com/", - pinned: true, - style: { - width: 125, - }, - }, - { - caption: "Twitch", - image: "/images/logos/twitch.svg", - infoLink: "https://www.twitch.tv/", - pinned: true, - style: { - width: 125, - }, - }, - { - caption: "Xiaomi", - image: "/images/logos/xiaomi.svg", - infoLink: "https://www.mi.com/", - pinned: true, - style: { - width: 50, - }, - }, - { - caption: "Line", - image: "/images/logos/line.svg", - infoLink: "https://line.me/", - pinned: true, - style: { - width: 75, - }, - }, - { - caption: "ESPN", - image: "/images/logos/espn.svg", - infoLink: "https://www.espn.com/", - pinned: true, - style: { - width: 125, - }, - }, - { - caption: "Volvo", - image: "/images/logos/volvo.svg", - infoLink: "https://www.volvo.com/", - pinned: true, - style: { - width: 60, - }, - }, - { - caption: "Hearst", - image: "/images/logos/hearst.svg", - infoLink: "https://www.hearst.com/", - pinned: true, - style: { - width: 175, - }, - }, - { - caption: "The Washington Post", - image: "/images/logos/washingtonpost.svg", - infoLink: "https://www.washingtonpost.com/", - pinned: true, - style: { - width: 175, - }, - }, - { - caption: "Wayfair", - image: "/images/logos/wayfair.svg", - infoLink: "https://www.wayfair.com/", - pinned: true, - style: { - width: 125, - }, - }, - { - caption: "Hulu", - image: "/images/logos/hulu.svg", - infoLink: "https://www.hulu.com/", - pinned: true, - }, - { - caption: "CrowdStrike", - image: "/images/logos/crowdstrike.svg", - infoLink: "https://www.crowdstrike.com/", - pinned: true, - style: { - width: 150, - marginTop: 20, - }, - }, - { - caption: "Binance", - image: "/images/logos/binance.svg", - infoLink: "https://www.binance.com/", - pinned: true, - style: { - width: 150, - }, - }, - { - caption: "Plex", - image: "/images/logos/plex.svg", - infoLink: "https://www.plex.tv/", - pinned: true, - }, - { - caption: "Groupon", - image: "/images/logos/groupon.svg", - infoLink: "https://groupon.com/", - pinned: true, - style: { - width: 125, - }, - }, - { - caption: "Vimeo", - image: "/images/logos/vimeo.svg", - infoLink: "https://vimeo.com/", - pinned: true, - }, - { - caption: "GoodRx", - image: "/images/logos/goodrx.svg", - infoLink: "https://www.goodrx.com/", - pinned: true, - style: { - width: 150, - }, - }, - { - caption: "Tripadvisor", - image: "/images/logos/tripadvisor.svg", - infoLink: "https://www.tripadvisor.com/", - pinned: true, - style: { - width: 150, - }, - }, - { - caption: "RapidAPI", - image: "/images/logos/rapidapi.svg", - infoLink: "https://rapidapi.com/", - pinned: true, - style: { - width: 150, - }, - }, - { - caption: "Miro", - image: "/images/logos/miro.svg", - infoLink: "https://miro.com/", - pinned: true, - }, - { - caption: "Lattice", - image: "/images/logos/lattice.svg", - infoLink: "https://lattice.com/", - pinned: true, - style: { - width: 150, - }, - }, - { - caption: "Watershed", - image: "/images/logos/watershed.svg", - infoLink: "https://watershed.com/", - pinned: true, - style: { - width: 150, - }, - }, - { - caption: "N26", - image: "/images/logos/n26.svg", - infoLink: "https://n26.com/", - pinned: true, - style: { - width: 75, - }, - }, - { - caption: "Sourcegraph", - image: "/images/logos/sourcegraph.svg", - infoLink: "https://sourcegraph.com/", - pinned: true, - style: { - width: 150, - }, - }, - { - caption: "Big Commerce", - image: "/images/logos/bigcommerce.svg", - infoLink: "https://www.bigcommerce.com/", - pinned: true, - style: { - width: 150, - }, - }, - { - caption: "Stedi", - image: "/images/logos/stedi.svg", - infoLink: "https://www.stedi.com/", - pinned: true, - style: { - width: 75, - }, - }, - { - caption: "Framer", - image: "/images/logos/framer.svg", - infoLink: "https://www.framer.com/", - pinned: true, - }, - { - caption: "Maze", - image: "/images/logos/maze.svg", - infoLink: "https://maze.co/", - pinned: true, - style: { - width: 125, - }, - }, - { - caption: "Builder.io", - image: "/images/logos/builderio.svg", - infoLink: "https://www.builder.io/", - pinned: true, - style: { - width: 125, - }, - }, - { - caption: "Contentful", - image: "/images/logos/contentful.svg", - infoLink: "https://www.contentful.com/", - pinned: true, - style: { - width: 150, - }, - }, - { - caption: "Xata", - image: "/images/logos/xata.svg", - infoLink: "https://xata.io/", - pinned: true, - }, - { - caption: "Cal.com", - image: "/images/logos/calcom.svg", - infoLink: "https://cal.com/", - pinned: true, - }, - { - caption: "Codesandbox", - image: "/images/logos/codesandbox.svg", - infoLink: "https://codesandbox.io/", - pinned: true, - style: { - width: 150, - }, - }, - { - caption: "WooCommerce", - image: "/images/logos/woocommerce.svg", - infoLink: "https://woocommerce.com/", - pinned: true, - style: { - width: 150, - }, - }, - { - caption: "Expo", - image: "/images/logos/expo.svg", - infoLink: "https://expo.dev/", - pinned: true, - }, - { - caption: "TeeSpring", - image: "/images/logos/teespring.svg", - infoLink: "https://www.spri.ng/", - pinned: true, - style: { - width: 150, - }, - }, - { - caption: "Endear", - image: "/images/logos/endear.svg", - infoLink: "https://endearhq.com/", - pinned: true, - }, - { - caption: "Makeswift", - image: "/images/logos/makeswift.svg", - infoLink: "https://www.makeswift.com/", - pinned: true, - }, - { - caption: "Fandom", - image: "/images/logos/fandom.svg", - infoLink: "https://www.fandom.com/", - pinned: true, - }, - { - caption: "Waggel", - image: "/images/logos/waggel.svg", - infoLink: "https://www.waggel.co.uk/", - pinned: true, - }, - { - caption: "n8n", - image: "/images/logos/n8n.svg", - infoLink: "https://n8n.io/", - pinned: true, - }, - { - caption: "React Flow", - image: "/images/logos/reactflow.svg", - infoLink: "https://reactflow.dev/", - pinned: true, - }, - { - caption: "Agrotoken", - image: "/images/logos/agrotoken.svg", - infoLink: "https://agrotoken.io/", - pinned: true, - }, - { - caption: "Rocket.Chat", - image: "/images/logos/rocketchat.svg", - infoLink: "https://www.rocket.chat/", - pinned: true, - }, - { - caption: "Backpack", - image: "/images/logos/backpack.svg", - infoLink: "https://www.backpack.app/", - pinned: true, - }, - { - caption: "Supernova.io", - image: "/images/logos/supernova.svg", - infoLink: "https://www.supernova.io/", - pinned: true, - style: { - width: 150, - }, - }, - { - caption: "BuildPass", - image: "/images/logos/buildpass.svg", - infoLink: "https://www.buildpass.com.au/", - pinned: true, - style: { - width: 175, - }, - }, - { - caption: "SolanaFM", - image: "/images/logos/solanafm.svg", - infoLink: "https://solana.fm/", - pinned: true, - }, - { - caption: "Authdog", - image: "/images/logos/authdog.svg", - infoLink: "https://www.authdog.com/", - pinned: true, - style: { - width: 175, - }, - }, - { - caption: "Nhost", - image: "/images/logos/nhost.svg", - infoLink: "https://nhost.io/", - pinned: true, - }, - { - caption: "LG U+", - image: "/images/logos/lguplus.svg", - infoLink: "https://www.lguplus.com/about/en", - pinned: true, - style: { - width: 150, - }, - }, - { - caption: "Comparastore", - image: "/images/logos/comparastore.svg", - infoLink: "https://www.comparastore.com", - pinned: true, - style: { - width: 175, - }, - }, - { - caption: "Block Protocol", - image: "/images/logos/blockprotocol.svg", - infoLink: "https://blockprotocol.org/", - pinned: true, - }, - { - caption: "HASH", - image: "/images/logos/hash.svg", - infoLink: "https://hash.dev/", - pinned: true, - }, - { - caption: "Chợ Tốt", - image: "/images/logos/chotot.svg", - infoLink: "https://chotot.com/", - pinned: true, - }, -]; diff --git a/docs/components/header-logo.module.css b/docs/components/header-logo.module.css deleted file mode 100644 index 515486e..0000000 --- a/docs/components/header-logo.module.css +++ /dev/null @@ -1,20 +0,0 @@ -.desktopLogo { - display: none; - - @media (min-width: 768px) { - display: block; - } -} - -.siteSwitcher { - position: absolute; - left: 50%; - transform: translateX(-50%); - - @media (min-width: 768px) { - margin-left: 12px; - position: relative; - left: 0; - transform: none; - } -} diff --git a/docs/components/image/ImageFigure.tsx b/docs/components/image/ImageFigure.tsx deleted file mode 100644 index b90237e..0000000 --- a/docs/components/image/ImageFigure.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import React from "react"; -import Image from "next/image"; - -type ImageProps = Parameters<typeof Image>[0]; - -export type ImageFigureProps = ImageProps & { - caption?: string; - margin?: number; - captionSpacing?: number; - shadow?: boolean; - borderRadius?: boolean; -}; - -export function ImageFigure(props: ImageFigureProps): React.ReactNode { - const { - caption, - margin = 40, - captionSpacing = null, - shadow = false, - borderRadius = false, - ...rest - } = props; - - return ( - <figure className="block text-center" style={{ margin: `${margin}px 0` }}> - <div className="relative inline-block w-full max-w-full overflow-hidden border-box text-[0px]"> - {/* eslint-disable-next-line jsx-a11y/alt-text */} - <Image {...rest} /> - </div> - {caption && ( - <figcaption - className="m-0 text-xs text-center text-gray-500" - style={captionSpacing ? { marginTop: captionSpacing } : {}} - > - {caption} - </figcaption> - )} - </figure> - ); -} diff --git a/docs/components/image/ThemedImage.tsx b/docs/components/image/ThemedImage.tsx deleted file mode 100644 index 0416bd9..0000000 --- a/docs/components/image/ThemedImage.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import React from "react"; -import Image from "next/image"; - -export interface Image { - height: number; - width: number; - source: string; -} - -export interface ThemedImageProps { - title?: string; - dark?: Image; - light?: Image; - priority?: boolean; -} - -export function ThemedImage({ - title, - light, - dark, - priority = false, -}: ThemedImageProps) { - return ( - <> - <div className="block w-full dark:hidden"> - <Image - alt={title} - src={light.source} - width={light.width} - height={light.height} - priority={priority} - /> - </div> - <div className="hidden w-full dark:block"> - <Image - alt={title} - src={dark.source} - width={dark.width} - height={dark.height} - priority={priority} - /> - </div> - </> - ); -} diff --git a/docs/components/image/ThemedImageFigure.tsx b/docs/components/image/ThemedImageFigure.tsx deleted file mode 100644 index 9c50dc7..0000000 --- a/docs/components/image/ThemedImageFigure.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import React from "react"; -import { ImageFigureProps } from "./ImageFigure"; -import { ThemedImage, ThemedImageProps } from "./ThemedImage"; -import cn from "classnames"; -export type ThemedImageFigureProps = Omit<ImageFigureProps, "src"> & - ThemedImageProps; - -export function ThemedImageFigure( - props: ThemedImageFigureProps -): React.ReactNode { - const { - caption, - margin = 40, - captionSpacing = null, - shadow = false, - borderRadius = false, - ...rest - } = props; - - return ( - <figure - className="block -mx-4 text-center sm:-mx-4 md:-mx-7 lg:-mx-12" - style={{ marginTop: `${margin}px`, marginBottom: `${margin}px` }} - > - <div - className={cn( - "relative inline-block max-w-full overflow-hidden border-box text-[0px]", - { - "rounded-md": borderRadius, - "shadow-lg": shadow, - } - )} - > - {/* eslint-disable-next-line jsx-a11y/alt-text */} - <ThemedImage {...rest} /> - </div> - {caption && ( - <figcaption - className="m-0 text-xs text-center text-gray-500" - style={captionSpacing ? { marginTop: captionSpacing } : {}} - > - {caption} - </figcaption> - )} - </figure> - ); -} diff --git a/docs/components/logos/AILogo.tsx b/docs/components/logos/AILogo.tsx deleted file mode 100644 index f1bc02a..0000000 --- a/docs/components/logos/AILogo.tsx +++ /dev/null @@ -1,17 +0,0 @@ -const RepoLogo = (props) => ( - <svg {...props} viewBox="0 0 506 50" xmlns="http://www.w3.org/2000/svg"> - <title>HydroRollAI logo - {/* - - - - - - - - */} - HydrRollAI - -); - -export default RepoLogo; diff --git a/docs/components/logos/HydroRoll.tsx b/docs/components/logos/HydroRoll.tsx deleted file mode 100644 index aae0ea7..0000000 --- a/docs/components/logos/HydroRoll.tsx +++ /dev/null @@ -1,26 +0,0 @@ -const HydroRoll = ({ height = 20 }: { height?: number }) => ( - - HydroRoll - - -); - -export default HydroRoll; diff --git a/docs/components/logos/TRPGLogo.tsx b/docs/components/logos/TRPGLogo.tsx deleted file mode 100644 index 8bb4785..0000000 --- a/docs/components/logos/TRPGLogo.tsx +++ /dev/null @@ -1,16 +0,0 @@ -const PackLogo = (props) => ( - - HydroRollTRPG logo - {/* - - - - - - - - */} - -); - -export default PackLogo; diff --git a/docs/components/logos/Turbo.tsx b/docs/components/logos/Turbo.tsx deleted file mode 100644 index 306880a..0000000 --- a/docs/components/logos/Turbo.tsx +++ /dev/null @@ -1,62 +0,0 @@ -type LogoProps = { - className?: string; - height?: number; -}; - -const Turbo = ({ height = 32, className = "" }: LogoProps) => ( - - HydroRoll - - - - - - - - - - - - - - -); - -export default Turbo; diff --git a/docs/components/logos/TurboAnimated.tsx b/docs/components/logos/TurboAnimated.tsx deleted file mode 100644 index 5c63f30..0000000 --- a/docs/components/logos/TurboAnimated.tsx +++ /dev/null @@ -1,157 +0,0 @@ -import { AnimatePresence, motion, Variants } from "framer-motion"; -import { useTurboSite } from "../SiteSwitcher"; -import cn from "classnames"; -import styles from "../header-logo.module.css"; - -type LogoProps = { - className?: string; - height?: number; -}; - -const LEFT_PADDING = 8; -const RIGHT_PADDING = 12; -// The width of the logo + wordmark. This does not include the "invisible" padding. -const VISUAL_WIDTH = 112; - -const TurboAnimated = ({ height = 32, className = "" }: LogoProps) => { - const site = useTurboSite(); - - return ( - - AI - - - - - - - - - - - - - - - - - - - - {site === "AI" || site === undefined ? ( - - - - - ) : ( - - - - - )} - - - - {/* Turbo Wordmark */} - - - - - - - - - ); -}; - -export default TurboAnimated; - -const variants: Variants = { - visible: { - opacity: 1, - x: 0, - transition: { - duration: 0.3, - }, - }, - hidden: (distance) => ({ - opacity: 0, - x: distance, - transition: { - duration: 0.3, - }, - }), -}; diff --git a/docs/components/logos/og/PackLogo.tsx b/docs/components/logos/og/PackLogo.tsx deleted file mode 100644 index a2bc95a..0000000 --- a/docs/components/logos/og/PackLogo.tsx +++ /dev/null @@ -1,72 +0,0 @@ -const PackLogo = (props) => ( - - - - - - - - - - - - - - - - - - - -); - -export default PackLogo; diff --git a/docs/components/logos/og/RepoLogo.tsx b/docs/components/logos/og/RepoLogo.tsx deleted file mode 100644 index f09a1ff..0000000 --- a/docs/components/logos/og/RepoLogo.tsx +++ /dev/null @@ -1,70 +0,0 @@ -const RepoLogo = (props) => ( - - - - - - - - - - - - - - - - - - - -); - -export default RepoLogo; diff --git a/docs/components/logos/og/TurboLogo.tsx b/docs/components/logos/og/TurboLogo.tsx deleted file mode 100644 index 5646ce2..0000000 --- a/docs/components/logos/og/TurboLogo.tsx +++ /dev/null @@ -1,54 +0,0 @@ -const TurboLogo = (props) => ( - - - - - - - - - - - - - - - -); - -export default TurboLogo; diff --git a/docs/components/logos/og/VercelLogo.tsx b/docs/components/logos/og/VercelLogo.tsx deleted file mode 100644 index 020f271..0000000 --- a/docs/components/logos/og/VercelLogo.tsx +++ /dev/null @@ -1,16 +0,0 @@ -const VercelLogo = ({ - fill = "none", - height = 20, -}: { - fill?: string; - height?: number; -}) => ( - - - -); - -export default VercelLogo; diff --git a/docs/components/output-mode-table.mdx b/docs/components/output-mode-table.mdx deleted file mode 100644 index 56fd80a..0000000 --- a/docs/components/output-mode-table.mdx +++ /dev/null @@ -1,7 +0,0 @@ -| option | description | -| ----------- | ---------------------------------------- | -| full | This is the default. Displays all output | -| hash-only | Show only the hashes of the tasks | -| new-only | Only show output from cache misses | -| errors-only | Only show output from task failures | -| none | Hides all task output | diff --git a/docs/components/pages/AI-home/AIFeatures.tsx b/docs/components/pages/AI-home/AIFeatures.tsx deleted file mode 100644 index aa8c236..0000000 --- a/docs/components/pages/AI-home/AIFeatures.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { REPO_HOME_FEATURES } from "../../../content/features"; -import { FadeIn } from "../home-shared/FadeIn"; -import { FeaturesBento } from "../home-shared/FeaturesBento"; - -export function AIFeatures() { - return ( - - - - ); -} diff --git a/docs/components/pages/AI-home/AIHero.tsx b/docs/components/pages/AI-home/AIHero.tsx deleted file mode 100644 index be2ea40..0000000 --- a/docs/components/pages/AI-home/AIHero.tsx +++ /dev/null @@ -1,113 +0,0 @@ -import cn from "classnames"; -import Image from "next/image"; -import Link from "next/link"; -import gradients from "../home-shared/gradients.module.css"; -import { HeroText, SectionSubtext } from "../home-shared/Headings"; -import { Gradient } from "../home-shared/Gradient"; -import { FadeIn } from "../home-shared/FadeIn"; -import { CTAButton } from "../home-shared/CTAButton"; -import RepoLogo from "../../logos/AILogo"; - -export function AIHero() { - return ( - <> - - -
- {/* TODO: On dark mode, there should be a "breathing" gradient inside the inner circle */} - AI - AI -
-
- -
- -
- - -
-
- -
- - - Artificial Intelligence MODEL - - 简单易用的人工智能模型,尤其用于各种NLP场景,如文本分类、文本生成、文本匹配、命名实体识别、关系抽取等。 - - - -
- - - 快速开始 - - - - - 查看源码 - - -
-

License: GPL-3.0

-
- -
- - - - ); -} diff --git a/docs/components/pages/AI-home/AILetter.tsx b/docs/components/pages/AI-home/AILetter.tsx deleted file mode 100644 index 8b9b405..0000000 --- a/docs/components/pages/AI-home/AILetter.tsx +++ /dev/null @@ -1,106 +0,0 @@ -import { HeroText } from "../home-shared/Headings"; -import Image from "next/image"; -import cn from "classnames"; -import gradients from "../home-shared/gradients.module.css"; -import { FadeIn } from "../home-shared/FadeIn"; -import { CTAButton } from "../home-shared/CTAButton"; -import Link from "next/link"; -import { Gradient } from "../home-shared/Gradient"; - -export function AILetter() { - return ( -
- - - 优化完善你的骰子系统 -
- 不再那么死板繁琐 -
-
-
- -

- 当你的骰子系统越来越大,跑的团也越来越多且趋于复杂时,你会发现你的骰子系统越来越难以维护,越来越难以使用。 - HydroRollAI提供了很多工具,帮助你优化你的骰子系统,比如文本分析,自动化生成,自动化测试等等。 -

-
-

- 你可以写一整套完整的自动化流程,也可以只使用其中的一部分,HydroRollAI会按照你的流程自动去测试你的骰子系统,找出其中的问题。 - 同时,HydroRollAI也会帮助你生成文档,让你的骰子系统更加易于使用。 - 整个流程是并行的,你可以在任何时候停止,或者在任何时候加入新的流程。 -

-
-

我们还需要点其他的什么东西。

-

-

- 一种新颖的骰子系统,可以让你的骰子系统更加灵活,更加易于使用。 -

-
-

通过HydroRollAI,处理骰子系统就是那么简单处理。

-
-

- 你可以在HydroRollAI的文档中找到更多关于HydroRollAI的信息,或者你可以直接开始使用HydroRollAI。 -

-
- - - - -
- Image of Jared Palmer -
-
- {/* Jared Palmer's hand written signature - Jared Palmer's hand written signature */} -
-

Stardust·减(Stardust)

-

水系模型训练者之一

-
-
-
-
- -
- - - 开始训练 - - -
- -
-
- ); -} diff --git a/docs/components/pages/AI-home/index.tsx b/docs/components/pages/AI-home/index.tsx deleted file mode 100644 index b65040c..0000000 --- a/docs/components/pages/AI-home/index.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { AIHero } from "./AIHero"; -import { AIFeatures } from "./AIFeatures"; -import { AILetter } from "./AILetter"; -import { GradientSectionBorder } from "../home-shared/GradientSectionBorder"; -import { LandingPageGlobalStyles } from "../home-shared/GlobalStyles"; - -export default function HydroRollAIHome() { - return ( - <> - -
- - - - - - - -
- - ); -} diff --git a/docs/components/pages/TRPG-home/DocsBenchmarkStat.tsx b/docs/components/pages/TRPG-home/DocsBenchmarkStat.tsx deleted file mode 100644 index 5b8dcf6..0000000 --- a/docs/components/pages/TRPG-home/DocsBenchmarkStat.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import benchmarkData from "./benchmark-data/data.json"; - -type StatFunc = (data: typeof benchmarkData) => string; - -/** - * Replace with satisfies keyword when TS 4.9 drops - */ -const satisfies = - () => - (t: U) => - t; - -const formatToSeconds = (seconds: number) => `${seconds.toFixed(1)}s`; -const formatPercentage = (percentage: number) => `${percentage.toFixed(1)}x`; - -const stats = satisfies>()({ - "next12-cold-1000": (data) => formatToSeconds(data.cold[1000].next12), - "turbopack-cold-1000": (data) => formatToSeconds(data.cold[1000].next13), - "turbopack-cold-vs-next12": (data) => - formatPercentage(data.cold[1000].next12 / data.cold[1000].next13), - "turbopack-cold-vs-next12-30000": (data) => - formatPercentage(data.cold[30000].next12 / data.cold[30000].next13), - "turbopack-update-vs-next12": (data) => - formatPercentage( - data.file_change[1000].next12 / data.file_change[1000].next13 - ), - "turbopack-update-vs-next12-30000": (data) => - formatPercentage( - data.file_change[30000].next12 / data.file_change[30000].next13 - ), - "vite-cold-1000": (data) => formatToSeconds(data.cold[1000].vite), - "turbopack-cold-vs-vite": (data) => - formatPercentage(data.cold[1000].vite / data.cold[1000].next13), - "turbopack-cold-vs-vite-30000": (data) => - formatPercentage(data.cold[30000].vite / data.cold[30000].next13), - "turbopack-update-vs-vite": (data) => - formatPercentage( - data.file_change[1000].vite / data.file_change[1000].next13 - ), - "turbopack-update-vs-vite-30000": (data) => - formatPercentage( - data.file_change[30000].vite / data.file_change[30000].next13 - ), -}); - -type Stat = keyof typeof stats; - -export function DocsBenchmarkStat(props: { stat: Stat }) { - if (!stats[props.stat]) { - throw new Error(`Invalid stat: ${props.stat}`); - } - return stats[props.stat](benchmarkData); -} diff --git a/docs/components/pages/TRPG-home/DocsBenchmarksGraph.tsx b/docs/components/pages/TRPG-home/DocsBenchmarksGraph.tsx deleted file mode 100644 index 7fb9d55..0000000 --- a/docs/components/pages/TRPG-home/DocsBenchmarksGraph.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import { useState } from "react"; -import { - BenchmarkBar, - BenchmarkCategory, - BenchmarkNumberOfModules, -} from "./PackBenchmarks"; -import { BenchmarksGraph } from "./PackBenchmarksGraph"; -import { PackBenchmarksPicker } from "./PackBenchmarksPicker"; - -export function DocsBenchmarksGraph(props: { - bars: BenchmarkBar[]; - category: BenchmarkCategory; -}) { - const [numberOfModules, setNumberOfModules] = - useState("1000"); - return ( -
- -
- -
-
- ); -} diff --git a/docs/components/pages/TRPG-home/PackBenchmarkTabs.tsx b/docs/components/pages/TRPG-home/PackBenchmarkTabs.tsx deleted file mode 100644 index e79b820..0000000 --- a/docs/components/pages/TRPG-home/PackBenchmarkTabs.tsx +++ /dev/null @@ -1,149 +0,0 @@ -import { useRef, useState } from "react"; -import { AnimatePresence, motion } from "framer-motion"; -import { BenchmarkCategory } from "./PackBenchmarks"; -import classNames from "classnames"; -import gradients from "../home-shared/gradients.module.css"; - -const TABS: { - id: BenchmarkCategory; - title: string; - soon: boolean; - tooltip: string; -}[] = [ - { - id: "cold", - title: "冷加载", - soon: false, - tooltip: "First run", - }, - { - id: "file_change", - title: "热加载", - soon: false, - tooltip: "Hot Reload (HMR)", - }, - { - id: "code_build", - title: "核心构建", - soon: true, - tooltip: "First Build", - }, - { - id: "build_from_cache", - title: "使用缓存构建", - soon: true, - tooltip: "Second Build", - }, -]; - -const TRANSITION = { - duration: 0.3, - ease: [0.59, 0.15, 0.18, 0.93], -}; - -function SoonBadge() { - return ( - - Soon - - ); -} - -export function PackBenchmarkTabs({ - onTabChange, -}: { - onTabChange: (tab: BenchmarkCategory) => void; -}) { - const [activeTab, setActiveTab] = useState(0); - - const onTabClick = (index: number) => { - if (TABS[index].soon) return; - setActiveTab(index); - onTabChange(TABS[index].id); - }; - - return ( -
-
- -
- {TABS.map((tab, index) => ( - - ))} -
-
-
-
- ); -} - -function ToolTip({ text, children }: { text; children: React.ReactNode }) { - const [show, setShow] = useState(false); - const timeout = useRef(); - - const onMouseEnter = () => { - timeout.current = setTimeout(() => { - setShow(true); - }, 800); - }; - - const onMouseLeave = () => { - clearTimeout(timeout.current); - setShow(false); - }; - - return ( -
- -
-
-

{text}

-
- -
{children}
-
- ); -} diff --git a/docs/components/pages/TRPG-home/PackBenchmarks.tsx b/docs/components/pages/TRPG-home/PackBenchmarks.tsx deleted file mode 100644 index 0d3322c..0000000 --- a/docs/components/pages/TRPG-home/PackBenchmarks.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import { useState } from "react"; -import { FadeIn } from "../home-shared/FadeIn"; -import { SectionHeader, SectionSubtext } from "../home-shared/Headings"; -import { BenchmarksGraph } from "./PackBenchmarksGraph"; -import { PackBenchmarksPicker } from "./PackBenchmarksPicker"; -import { PackBenchmarkTabs } from "./PackBenchmarkTabs"; - -export type BenchmarkNumberOfModules = "1000" | "5000" | "10000" | "30000"; -export type BenchmarkCategory = - | "cold" - | "from_cache" - | "file_change" - | "code_build" - | "build_from_cache"; -export interface BenchmarkData { - HydroRoll: number; - Shiki: number; - OlivOS: number; - SealDice: number; -} - -export interface BenchmarkBar { - label: string; - key: keyof BenchmarkData; - core?: true; - swc?: true; -} - -export const DEFAULT_BARS: BenchmarkBar[] = [ - { - key: "HydroRoll", - label: "HydroRoll水系", - core: true, - }, - { - key: "Shiki", - label: "溯洄Shiki", - }, - { - key: "OlivOS", - label: "OlivOS青果", - swc: true, - }, - { - key: "SealDice", - label: "SealDice海豹", - }, -]; -export const HMR_BARS: BenchmarkBar[] = [ - { - key: "HydroRoll", - label: "HydroRoll水系", - core: true, - }, - { - key: "Shiki", - label: "溯洄Shiki", - }, - { - key: "OlivOS", - label: "OlivOS青果", - swc: true, - }, - { - key: "SealDice", - label: "SealDice海豹", - }, -]; - -export function PackBenchmarks() { - const [numberOfModules, setNumberOfModules] = - useState("1000"); - const [category, setCategory] = useState("cold"); - - return ( - -
- 速度不止于此 - - 快速加载,模块化设计,fastapi、aiohttp、flask等高效率支持库, - 为核心提速。 - -
-
- - -
- -
- ); -} diff --git a/docs/components/pages/TRPG-home/PackBenchmarksGraph.tsx b/docs/components/pages/TRPG-home/PackBenchmarksGraph.tsx deleted file mode 100644 index 489553a..0000000 --- a/docs/components/pages/TRPG-home/PackBenchmarksGraph.tsx +++ /dev/null @@ -1,334 +0,0 @@ -import cn from "classnames"; -import { - animate, - motion, - useInView, - useAnimation, - AnimationPlaybackControls, -} from "framer-motion"; -import Image from "next/image"; -import { useEffect, useRef, useState } from "react"; -import benchmarkData from "./benchmark-data/data.json"; -import { Gradient } from "../home-shared/Gradient"; -import gradients from "../home-shared/gradients.module.css"; -import { - BenchmarkBar, - BenchmarkCategory, - BenchmarkData, - BenchmarkNumberOfModules, -} from "./PackBenchmarks"; -import HydroRoll from "../../logos/HydroRoll"; - -interface BenchmarksGraphProps { - category: BenchmarkCategory; - numberOfModules: BenchmarkNumberOfModules; - bars: BenchmarkBar[]; - pinTime?: true; -} - -export function BenchmarksGraph({ - category, - numberOfModules, - bars, - pinTime, -}: BenchmarksGraphProps) { - const data: BenchmarkData = benchmarkData[category][numberOfModules]; - const keys = bars.map((bar) => bar.key); - const longestTime = Math.max(...keys.map((key) => data[key])) * 1000; - const longestTimeWithPadding = longestTime * 1.15; - const graphRef = useRef(null); - const graphInView = useInView(graphRef, { once: true, margin: "-128px" }); - - return ( -
-
- -
-
- {bars.map((bar) => { - return ( - - } - duration={data[bar.key] * 1000} - longestTime={longestTimeWithPadding} - inView={graphInView} - pinTime={pinTime} - > - ); - })} -
-
- ); -} - -const START_DELAY = 0.0; - -const graphBarVariants = { - initial: { - width: 0, - }, - progress: { - width: "100%", - }, -}; - -const graphBarWrapperVariants = { - hidden: { - opacity: 0, - }, - show: { - opacity: 1, - }, -}; - -function GraphBar({ - core, - duration, - longestTime, - inView, - Label, - pinTime, -}: { - core?: boolean; - duration: number; - longestTime: number; - Label: JSX.Element; - inView?: boolean; - // Pin the time - pinTime?: true; -}) { - const controls = useAnimation(); - const [timer, setTimer] = useState(0); - const [timerAnimation, setTimerAnimation] = - useState(); - const [barWidth, setBarWidth] = useState(0); - const [, setFinished] = useState(false); - - async function stopAnimation() { - timerAnimation && timerAnimation.stop(); - controls.stop(); - } - - async function resetAnimation() { - setTimer(0); - setFinished(false); - await controls.start("initial"); - } - - async function startAnimation() { - const transition = { - duration: duration / 1000, - delay: START_DELAY, - }; - setBarWidth((duration / longestTime) * 100); - await controls.start("show"); - controls - .start("progress", { - ...transition, - ease: "linear", - }) - .then(() => { - setFinished(true); - }); - const timerAnimationRef = animate(0, duration, { - ...transition, - ease: "linear", - onUpdate(value) { - setTimer(value); - }, - }); - setTimerAnimation(timerAnimationRef); - } - - async function playFullAnimation() { - await stopAnimation(); - await controls.start("hidden"); - await resetAnimation(); - await startAnimation(); - } - - useEffect(() => { - if (inView) { - void startAnimation(); - } else { - void stopAnimation(); - void resetAnimation(); - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [inView]); - - useEffect(() => { - if (!inView) return; - void playFullAnimation(); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [duration, longestTime]); - - return ( -
-
{Label}
-
- - - - - - -
-
- ); -} - -const GraphTimer = ({ - core, - timer, - duration, -}: { - core: boolean; - timer: number; - duration: number; -}) => { - return ( -
- {core && ( -
- HydroRollTRPG - HydroRollTRPG - -
- )} -

-

-
- ); -}; - -function roundTo(num: number, decimals: number) { - const factor = Math.pow(10, decimals); - return Math.round(num * factor) / factor; -} - -const Time = ({ - value, - maxValue, -}: { - value: number; - maxValue: number; -}): JSX.Element => { - let unitValue: string; - let unit: string; - if (maxValue < 1000) { - unitValue = Math.round(value).toFixed(0); - unit = "ms"; - } else { - const roundedValue = roundTo(value / 1000, 1); - unitValue = roundedValue.toFixed(1); - unit = "s"; - } - - return ( - <> - {unitValue} - {unit} - - ); -}; - -function GraphLabel({ - label, - core, - swc, - mobileOnly, - esbuild, -}: { - label: string; - core?: boolean; - swc?: boolean; - mobileOnly?: boolean; - esbuild?: boolean; -}) { - return ( -
-

{label}

- {core && ( -

- 水系核心 -

- )} - {swc && ( -

- 青果核 -

- )} - {esbuild && ( -

esbuild

- )} -
- ); -} diff --git a/docs/components/pages/TRPG-home/PackBenchmarksPicker.tsx b/docs/components/pages/TRPG-home/PackBenchmarksPicker.tsx deleted file mode 100644 index 8f0e83e..0000000 --- a/docs/components/pages/TRPG-home/PackBenchmarksPicker.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { BenchmarkNumberOfModules } from "./PackBenchmarks"; -import { PackDropdown } from "./PackDropdown"; - -export function PackBenchmarksPicker(props: { - setNumberOfModules: (num: BenchmarkNumberOfModules) => void; -}) { - return ( -
- - 本体文件大小 - - props.setNumberOfModules(value)} - /> -
- ); -} diff --git a/docs/components/pages/TRPG-home/PackDropdown.tsx b/docs/components/pages/TRPG-home/PackDropdown.tsx deleted file mode 100644 index 7ff5d76..0000000 --- a/docs/components/pages/TRPG-home/PackDropdown.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { useState, Fragment } from "react"; -import { Listbox, Transition } from "@headlessui/react"; -import { BenchmarkNumberOfModules } from "./PackBenchmarks"; - -export function PackDropdown({ - onOptionSelected, -}: { - onOptionSelected: (option: BenchmarkNumberOfModules) => void; -}) { - const [selectedOption, setSelectedOption] = - useState("1000"); - - const onSelect = (option: BenchmarkNumberOfModules) => { - onOptionSelected(option); - setSelectedOption(option); - }; - - return ( -
- - - {Number(selectedOption).toLocaleString()} - - - - - - - `relative cursor-default select-none py-1 text-sm pl-3 text-gray-400 ${ - active ? "bg-gray-800 text-gray-100" : "text-gray-900" - }` - } - > - 1000 - - - `relative cursor-default select-none py-1 text-sm pl-3 text-gray-400 ${ - active ? "bg-gray-800 text-gray-100" : "text-gray-900" - }` - } - value="5000" - > - 5000 - - - `relative cursor-default select-none py-1 text-sm pl-3 text-gray-400 ${ - active ? "bg-gray-800 text-gray-100" : "text-gray-900" - }` - } - value="10000" - > - 10000 - - - `relative cursor-default select-none py-1 text-sm pl-3 text-gray-400 ${ - active ? "bg-gray-800 text-gray-100" : "text-gray-900" - }` - } - value="30000" - > - 30000 - - - - -
- ); -} - -function BenchmarkOption({ - value, - onSelect, -}: { - value: BenchmarkNumberOfModules; - onSelect: (value: string) => void; -}) { - return ( -
onSelect(value)} - > -

- {Number(value).toLocaleString()} -

-
- ); -} - -function Arrow() { - return ( - - - - ); -} diff --git a/docs/components/pages/TRPG-home/PackFeatures.tsx b/docs/components/pages/TRPG-home/PackFeatures.tsx deleted file mode 100644 index 7abbb96..0000000 --- a/docs/components/pages/TRPG-home/PackFeatures.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { PACK_HOME_FEATURES } from "../../../content/features"; -import { FeaturesBento } from "../home-shared/FeaturesBento"; - -export function PackFeatures() { - return ( - - ); -} diff --git a/docs/components/pages/TRPG-home/PackHero.tsx b/docs/components/pages/TRPG-home/PackHero.tsx deleted file mode 100644 index 33052db..0000000 --- a/docs/components/pages/TRPG-home/PackHero.tsx +++ /dev/null @@ -1,114 +0,0 @@ -import cn from "classnames"; -import Image from "next/image"; -import Link from "next/link"; -// import { Marquee } from "../../clients/Marquee"; -// import { Clients } from "../../clients/Clients"; -import gradients from "../home-shared/gradients.module.css"; -import { HeroText, SectionSubtext } from "../home-shared/Headings"; -import { Gradient } from "../home-shared/Gradient"; -import { FadeIn } from "../home-shared/FadeIn"; -import { CTAButton } from "../home-shared/CTAButton"; -import PackLogo from "../../logos/TRPGLogo"; - -export function PackHero() { - return ( - <> - - -
- HydroRollTRPG - HydroRollTRPG -
-
- -
- -
- - -
-
- -
- - - Tabletop Role-Playing Game - - TRPG 模块是水系的另一个重要组成部分,它提供了一套完整的 TRPG 架构,包括骰子、角色卡、战斗、技能、物品、地图、音乐等等。 - - - -
- - - 快速开始 - - - - - 查看源码 - - -
-

License: GPL-3.0

-
- -
- - - - ); -} diff --git a/docs/components/pages/TRPG-home/PackLetter.tsx b/docs/components/pages/TRPG-home/PackLetter.tsx deleted file mode 100644 index df58116..0000000 --- a/docs/components/pages/TRPG-home/PackLetter.tsx +++ /dev/null @@ -1,104 +0,0 @@ -import { HeroText } from "../home-shared/Headings"; -import Image from "next/image"; -import cn from "classnames"; -import gradients from "../home-shared/gradients.module.css"; -import { FadeIn } from "../home-shared/FadeIn"; -import { CTAButton } from "../home-shared/CTAButton"; -import Link from "next/link"; -import { Gradient } from "../home-shared/Gradient"; - -export function PackLetter() { - return ( -
- - - 究竟什么才是真正的 -
- 水系? -
-
-
- -

- 当水系公测后,我接触TRPG已经有两年多了,我希望能够在这里分享一些我对TRPG的理解。 - TRPG,是一种游戏,也是一种文化,它的核心是“故事”。究竟要怎么讲好一个故事呢?我认为,一个好的故事,应该是有趣的,有趣的故事,才能吸引人,才能让人愿意去听,去看,去玩。 -

-
-

- 但是,有趣的故事,不是随随便便就能讲好的,它需要有一个好的故事背景,需要有一个好的故事情节,需要有一个好的故事结局。这些,都是一个好的故事所必须具备的。 - 水系其实是站在规则书作者的角度去设计的,它的第一服务对象永远是世界主,再是kp与pl们。所以,水系的设计,是为了让世界主们能够更好的描绘自己所想象的那个世界。 -

-
-

- 水系是自由的,这主要表现在规则书是以热插拔规则包的形式存在的,世界主们可以根据自己的需要,自由的编写自己想要的规则包,来丰富自己的世界。水系是开放的,这主要表现在规则书的开源,世界主们可以根据自己的需要,自由的修改规则书,来丰富自己的世界。 - 总之,水系是为世界主们服务的,水系的目的,就是让世界主们能够更好的讲好自己的故事,构建好自己的世界。让更多冷门世界观与规则书得到更多人的关注,让更多人能够参与到TRPG的世界中来。 -

-
- - - - -
- Image of Tobias Koopers -
-
- Tobias Koppers hand written signature - {/* Tobias Koppers hand written signature */} -
-

简律纯(HsiangNianian)

-

Creator of HydroRoll

-
-
-
-
- -
- - - 开始搭建 - - -
- -
-
- ); -} diff --git a/docs/components/pages/TRPG-home/benchmark-data/README.md b/docs/components/pages/TRPG-home/benchmark-data/README.md deleted file mode 100644 index 9b53481..0000000 --- a/docs/components/pages/TRPG-home/benchmark-data/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# `turbopack` Benchmark Data - -- `bench_startup`: Time from cold start of the bundler to the browser successfully retrieving bundled scripts. This does not include react hydration time. -- `bench_hydration`: Time from cold start of the bundler to the browser successfully retrieving bundled scripts. This does wait until react hydration has completed. -- `bench_restart`: Before measuring: warms up any available persistent cache (we don’t have one yet) by performing the equivalent of the bench_hydration benchmark, shuts down the server. Then, times another bench_hydration. -- `bench_hmr_to_eval`: Measures the time it takes from an incremental change to be made, bundled, sent over hmr, and evaluated by the browser. -- `bench_hmr_to_commit`: Measures the time it takes from an incremental change to be made, bundled, sent over hmr, evaluated by the browser, and committed by React (runs a useEffect). diff --git a/docs/components/pages/TRPG-home/benchmark-data/data.json b/docs/components/pages/TRPG-home/benchmark-data/data.json deleted file mode 100644 index f88ae6f..0000000 --- a/docs/components/pages/TRPG-home/benchmark-data/data.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "cold": { - "1000": { - "next13": 1.38187759, - "vite": 4.19890847, - "next12": 3.64327949, - "next11": 9.19035540 - }, - "5000": { - "next13": 3.99792562, - "vite": 16.59615430, - "next12": 12.14057345, - "next11": 32.89712268 - }, - "10000": { - "next13": 7.34248178, - "vite": 32.25177941, - "next12": 23.27525035, - "next11": 71.80680350 - }, - "30000": { - "next13": 21.97034306, - "vite": 97.74466099, - "next12": 89.07274544, - "next11": 237.61188540 - } - }, - "file_change": { - "1000": { - "next13": 0.01890358, - "vite": 0.10476515, - "next12": 0.14617346, - "next11": 0.21155549 - }, - "5000": { - "next13": 0.02379283, - "vite": 0.10963156, - "next12": 0.49470051, - "next11": 0.86600602 - }, - "10000": { - "next13": 0.02302405, - "vite": 0.11295908, - "next12": 1.15193035, - "next11": 2.35675312 - }, - "30000": { - "next13": 0.02246753, - "vite": 0.13328557, - "next12": 6.40370549, - "next11": 9.50431942 - } - } -} diff --git a/docs/components/pages/TRPG-home/index.tsx b/docs/components/pages/TRPG-home/index.tsx deleted file mode 100644 index d08443b..0000000 --- a/docs/components/pages/TRPG-home/index.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { PackBenchmarks } from "./PackBenchmarks"; -import { PackHero } from "./PackHero"; -import { PackLetter } from "./PackLetter"; -import { PackFeatures } from "./PackFeatures"; -import { GradientSectionBorder } from "../home-shared/GradientSectionBorder"; -import { LandingPageGlobalStyles } from "../home-shared/GlobalStyles"; - -export default function HydroRollTRPGHome() { - return ( - <> - -
- - - - - - - - -
- - ); -} diff --git a/docs/components/pages/confirm.tsx b/docs/components/pages/confirm.tsx deleted file mode 100644 index ae54cd0..0000000 --- a/docs/components/pages/confirm.tsx +++ /dev/null @@ -1,36 +0,0 @@ -/* eslint-disable react/no-unescaped-entities */ -import Head from "next/head"; -import { Container } from "../Container"; - -export default function Confirm() { - return ( - <> - - Confirm - - - -
-
-
-
-
-

Thanks so much!

-

- Keep an eye on your inbox for product updates and - announcements from Turbo and Vercel. -

{" "} -

- Thanks, -
- The HydroRoll'水系 Team. -

-
-
-
-
-
-
- - ); -} diff --git a/docs/components/pages/home-shared/CTAButton.tsx b/docs/components/pages/home-shared/CTAButton.tsx deleted file mode 100644 index 57da227..0000000 --- a/docs/components/pages/home-shared/CTAButton.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import cn from "classnames"; -import { MouseEventHandler } from "react"; -import gradients from "./gradients.module.css"; - -export function CTAButton({ - children, - outline, - onClick, - monospace, -}: { - outline?: boolean; - children: React.ReactNode; - onClick?: MouseEventHandler; - monospace?: boolean; -}) { - const outlineClasses = - "border dark:border-neutral-400 dark:text-neutral-200 dark:hover:border-white dark:hover:text-white border-[#EAEAEA] text-neutral-800 hover:border-black hover:text-black"; - const filledClasses = - "dark:text-black text-white border-transparent bg-black dark:bg-white"; - - return ( -
- - {!outline && ( -
- )} -
- ); -} diff --git a/docs/components/pages/home-shared/FadeIn.tsx b/docs/components/pages/home-shared/FadeIn.tsx deleted file mode 100644 index 826a078..0000000 --- a/docs/components/pages/home-shared/FadeIn.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { motion, useInView } from "framer-motion"; -import { useRef } from "react"; - -export function FadeIn({ - children, - className, - noVertical, - delay, - viewTriggerOffset, -}: { - children: React.ReactNode; - className?: string; - noVertical?: boolean; - delay?: number; - viewTriggerOffset?: boolean; -}) { - const ref = useRef(null); - const inView = useInView(ref, { - once: true, - margin: viewTriggerOffset ? "-128px" : "0px", - }); - - const fadeUpVariants = { - initial: { - opacity: 0, - y: noVertical ? 0 : 24, - }, - animate: { - opacity: 1, - y: 0, - }, - }; - - return ( - - {children} - - ); -} diff --git a/docs/components/pages/home-shared/FeatureBox.tsx b/docs/components/pages/home-shared/FeatureBox.tsx deleted file mode 100644 index c9d46c1..0000000 --- a/docs/components/pages/home-shared/FeatureBox.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import Image from "next/image"; -import type { ReactNode } from "react"; - -export function FeatureBox({ - name, - description, - iconDark, - iconLight, -}: { - iconDark: Parameters[0]["src"]; - iconLight: Parameters[0]["src"]; - name: string; - description: ReactNode; -}) { - return ( -
- - -
-

- {name} -

- -

{description}

-
-
- ); -} diff --git a/docs/components/pages/home-shared/FeaturesBento.tsx b/docs/components/pages/home-shared/FeaturesBento.tsx deleted file mode 100644 index f2664db..0000000 --- a/docs/components/pages/home-shared/FeaturesBento.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import type { Features } from "../../../content/features"; -import { FadeIn } from "./FadeIn"; -import { SectionHeader, SectionSubtext } from "./Headings"; -import { FeatureBox } from "./FeatureBox"; - -export function FeaturesBento({ - header, - body, - features, -}: { - header: string; - body: string; - features: Features; -}) { - return ( -
- - {header} - {body} - -
- {features.map((feature) => ( - - - - ))} -
-
- ); -} diff --git a/docs/components/pages/home-shared/GlobalStyles.tsx b/docs/components/pages/home-shared/GlobalStyles.tsx deleted file mode 100644 index 5f695f3..0000000 --- a/docs/components/pages/home-shared/GlobalStyles.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import Head from "next/head"; - -export function LandingPageGlobalStyles() { - return ( - - - - ); -} diff --git a/docs/components/pages/home-shared/Gradient.tsx b/docs/components/pages/home-shared/Gradient.tsx deleted file mode 100644 index 9a03a99..0000000 --- a/docs/components/pages/home-shared/Gradient.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import cn from "classnames"; -import gradients from "./gradients.module.css"; - -export function Gradient({ - width = 1000, - height = 200, - opacity, - pink, - blue, - conic, - gray, - className, - small, -}: { - width?: number | string; - height?: number | string; - opacity?: number; - pink?: boolean; - blue?: boolean; - conic?: boolean; - gray?: boolean; - className?: string; - small?: boolean; -}) { - return ( - - ); -} diff --git a/docs/components/pages/home-shared/GradientSectionBorder.tsx b/docs/components/pages/home-shared/GradientSectionBorder.tsx deleted file mode 100644 index ef1e824..0000000 --- a/docs/components/pages/home-shared/GradientSectionBorder.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import cn from "classnames"; -import { FadeIn } from "./FadeIn"; -import gradients from "../home-shared/gradients.module.css"; - -export function GradientSectionBorder({ - children, -}: { - children: React.ReactNode; -}) { - return ( -
- - - - - - {children} -
- ); -} diff --git a/docs/components/pages/home-shared/Headings.tsx b/docs/components/pages/home-shared/Headings.tsx deleted file mode 100644 index 43a5e52..0000000 --- a/docs/components/pages/home-shared/Headings.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import cn from "classnames"; -import gradients from "./gradients.module.css"; - -export function HeroText({ - children, - className, - h1, -}: { - children: React.ReactNode; - className?: string; - h1?: boolean; -}) { - const combinedClassname = cn( - gradients.heroHeading, - "font-extrabold tracking-[-0.04em] leading-none text-[40px] md:text-5xl lg:text-[80px] max-w-lg md:max-w-xl lg:max-w-4xl text-center text-transparent", - className - ); - - if (h1) { - return

{children}

; - } - return

{children}

; -} - -export function SectionHeader({ children }: { children: React.ReactNode }) { - return ( -

- {children} -

- ); -} - -export function SectionSubtext({ - hero, - children, -}: { - hero?: boolean; - children: React.ReactNode; -}) { - const textClasses = hero - ? "text-[20px] lg:text-xl" - : "text-[16px] lg:text-[20px]"; - - return ( -

- {children} -

- ); -} diff --git a/docs/components/pages/home-shared/gradients.module.css b/docs/components/pages/home-shared/gradients.module.css deleted file mode 100644 index 3f94e39..0000000 --- a/docs/components/pages/home-shared/gradients.module.css +++ /dev/null @@ -1,231 +0,0 @@ -.benchmarkTurbo { - background: linear-gradient(288.43deg, #651eff 28.29%, #518ca1 78.78%); - box-shadow: 0px 0px 16px #5f26f0; - :global(.light) & { - background: linear-gradient( - 268.86deg, - #1ebcff -5.68%, - #7fdcd4 107.63%, - #51a181 107.64% - ); - box-shadow: none; - } -} - -.benchmarkActiveTab { - background: radial-gradient( - 50% 50% at 50% 100%, - rgba(255, 255, 255, 0.2) 0%, - rgba(255, 255, 255, 0) 100% - ), - linear-gradient(0deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)), - radial-gradient( - 128.57% 128.57% at 50% 0%, - rgba(255, 255, 255, 0.1) 0%, - rgba(255, 255, 255, 0) 100% - ), - radial-gradient( - 100% 427.04% at 100% 0%, - rgba(255, 255, 255, 0.1) 0%, - rgba(255, 255, 255, 0) 100% - ), - radial-gradient( - 100% 462.63% at 0% 0%, - rgba(255, 255, 255, 0.1) 0%, - rgba(255, 255, 255, 0) 100% - ); - :global(.light) & { - background: linear-gradient( - 0deg, - rgba(255, 255, 255, 0.8), - rgba(255, 255, 255, 0.8) - ), - radial-gradient( - 50% 50% at 49.66% 0%, - rgba(255, 255, 255, 0.1) 0%, - rgba(255, 255, 255, 0) 100% - ); - } -} - -.benchmarkTurboLabel { - background: linear-gradient(288.43deg, #651eff 28.29%, #518ca1 78.78%); - color: transparent; - background-clip: text; - :global(.light) & { - background: linear-gradient( - 268.86deg, - #1ebcff -5.68%, - #7fdcd4 107.63%, - #51a181 107.64% - ), - linear-gradient(288.43deg, #5f26f0 28.29%, #518ca1 78.78%); - color: transparent; - background-clip: text; - } -} - -.benchmark { - background: linear-gradient(270deg, #5c5c5c 0%, #1f1f1f 100%); - :global(.light) & { - background: linear-gradient(89.98deg, #e0e0e0 0.01%, #9c9c9c 99.49%); - } -} - -.barBorder { - border: rgba(255, 255, 255, 0.4) 1px solid; - :global(.light) & { - border: rgba(0, 0, 0, 0.6) 1px solid; - } -} - -.tooltipArrow { - display: block; - border-left: 8px solid transparent; - border-bottom: 8px solid #333333; - border-right: 8px solid transparent; - :global(.light) & { - border-bottom: 8px solid #f5f5f5; - } -} -.translatingGlow { - background: linear-gradient(32deg, #2a8af6 0%, #a853ba 50%, #518ca1 100%); - background-size: 200% 200%; - animation: translateGlow 7s linear infinite; - will-change: filter; -} - -@keyframes translateGlow { - 0% { - background-position: -20% -20%; - } - 25% { - background-position: 30% 80%; - } - 50% { - background-position: 110% 110%; - } - 75% { - background-position: 80% 30%; - } - 100% { - background-position: -20% -20%; - } -} - -.turbopackHeaderText { - background: linear-gradient( - 90deg, - rgba(200, 221, 255, 0.75) 0%, - rgba(255, 202, 222, 0.75) 100% - ), - linear-gradient(0deg, #ffffff, #ffffff); - - :global(.light) & { - background: linear-gradient( - 90deg, - rgba(200, 221, 255, 0.1) 0%, - rgba(255, 202, 222, 0.1) 100% - ), - #000000; - background-clip: text; - } - background-clip: text; -} - -.heroHeading { - background: linear-gradient(180deg, #ffffff 0%, #aaaaaa 100%), #ffffff; - :global(.light) & { - background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, #000000 100%); - background-clip: text; - } - background-clip: text; -} - -.letterLine { - opacity: 0.2; - background: linear-gradient( - 90deg, - #000000 0%, - #ffffff 20%, - #ffffff 80%, - #000000 100% - ); - :global(.light) & { - background: linear-gradient( - 90deg, - #ffffff 0%, - #000000 20%, - #000000 80%, - #ffffff 100% - ); - } -} - -.glow { - mix-blend-mode: normal; - filter: blur(75px); - will-change: filter; -} - -.glowSmall { - filter: blur(32px); -} - -.glowBlue { - background: linear-gradient(180deg, #58a5ff 0%, #a67af4 100%); -} - -.glowPink { - background: linear-gradient(180deg, #518ca1 0%, #5f26f0 100%); -} - -.glowConic { - background: conic-gradient( - from 180deg at 50% 50%, - #1ebcff 0deg, - #7fdcd4 180deg, - #51a181 360deg - ); -} - -.glowGray { - background: rgba(255, 255, 255, 0.15); -} - -.gradientSectionBorder { - --gradient-y-offset: -200px; - --gradient-x-offset: -200px; - --height: 255px; - position: relative; - overflow: hidden; - will-change: filter; -} - -.gradientSectionBorderLeft { - position: absolute; - width: 60vw; - height: var(--height); - left: var(--gradient-x-offset); - top: var(--gradient-y-offset); - background: linear-gradient(180deg, #58a5ff 0%, #a67af4 100%); - border-radius: 100%; - mix-blend-mode: normal; - filter: blur(50px); -} - -.gradientSectionBorderRight { - width: 60vw; - position: absolute; - height: var(--height); - right: var(--gradient-x-offset); - top: var(--gradient-y-offset); - background: linear-gradient(180deg, #5f26f0 0%, #518ca1 100%); - border-radius: 100%; - mix-blend-mode: normal; - filter: blur(50px); -} - -.gradientSectionBorderDivider { - background: linear-gradient(90deg, #288cf9 0%, #5f26f0 100%); -} diff --git a/docs/components/pages/landing/HydroRollAI.tsx b/docs/components/pages/landing/HydroRollAI.tsx deleted file mode 100644 index 8bb778e..0000000 --- a/docs/components/pages/landing/HydroRollAI.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import Image from "next/image"; - -export function HydroRollAI() { - return ( -
-
-
- HydroRollAI Logo -
-
- HydroRollAI Logo -
-
- ); -} diff --git a/docs/components/pages/landing/HydroRollTRPG.tsx b/docs/components/pages/landing/HydroRollTRPG.tsx deleted file mode 100644 index 27cd838..0000000 --- a/docs/components/pages/landing/HydroRollTRPG.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import Image from "next/image"; - -export function HydroRollTRPG() { - return ( -
-
-
- -
-
- -
-
- ); -} diff --git a/docs/components/pages/landing/TurboHeroBackground.tsx b/docs/components/pages/landing/TurboHeroBackground.tsx deleted file mode 100644 index dffa5b6..0000000 --- a/docs/components/pages/landing/TurboHeroBackground.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import cn from "classnames"; -import styles from "./turbohero-background.module.css"; - -export function TurboheroBackground(): JSX.Element { - return ( -
-
-
-
-
-
- ); -} diff --git a/docs/components/pages/landing/index.module.css b/docs/components/pages/landing/index.module.css deleted file mode 100644 index a492233..0000000 --- a/docs/components/pages/landing/index.module.css +++ /dev/null @@ -1,184 +0,0 @@ -.leftLights::before { - content: ""; - position: absolute; - pointer-events: none; - width: 25%; - height: 900px; - left: -12.5%; - top: calc(50% - 900px / 2 + 151px); - opacity: 0.2; - background: linear-gradient(180deg, #77b8ff 0%, rgba(42, 138, 246, 0.4) 100%); - filter: blur(125px); - transform: rotate(-15deg); - border-bottom-left-radius: 25% 25%; - border-bottom-right-radius: 25% 25%; - border-top-left-radius: 100% 100%; - border-top-right-radius: 100% 100%; - z-index: 200; - will-change: filter; - mix-blend-mode: normal; -} - -.leftLights::after { - content: ""; - position: absolute; - pointer-events: none; - width: 40%; - height: 422px; - left: 0px; - top: calc(50% - 422px / 2 + 298px); - opacity: 0.5; - background: linear-gradient( - 180deg, - rgba(29, 92, 162, 0.2) 0%, - rgba(42, 138, 246, 0.4) 100% - ); - filter: blur(125px); - will-change: filter; - mix-blend-mode: normal; -} - -.rightLights::before { - z-index: 200; - content: ""; - position: absolute; - pointer-events: none; - width: 25%; - height: 900px; - right: -12.5%; - top: calc(50% - 900px / 2 + 151px); - background-image: linear-gradient( - 180deg, - rgba(53, 25, 92, 0.4) 0%, - rgb(99, 42, 233) 100% - ); - filter: blur(125px); - transform: rotate(15deg); - border-bottom-left-radius: 25% 25%; - border-bottom-right-radius: 25% 25%; - border-top-left-radius: 100% 100%; - border-top-right-radius: 100% 100%; - opacity: 0.2; - overflow: hidden; - will-change: filter; - mix-blend-mode: normal; -} - -.rightLights::after { - content: ""; - position: absolute; - pointer-events: none; - width: 40%; - height: 422px; - right: 0px; - top: calc(50% - 422px / 2 + 298px); - opacity: 0.25; - - background: linear-gradient( - 180deg, - rgba(151, 164, 236, 0.4) 0%, - rgb(115, 42, 233) 100% - ); - transform: matrix(-1, 0, 0, 1, 0, 0); - filter: blur(125px); - will-change: filter; - mix-blend-mode: normal; -} - -.counter-border { - --border-radius: 12px; - --border-size: 1px; - --padding: 1px; - --border-bg: conic-gradient( - from 180deg at 50% 50%, - #2a2ae9 0deg, - #a853ba 112.5deg, - #2a8af6 228.75deg, - rgba(42, 138, 246, 0) 360deg - ); - position: relative; - overflow: hidden; - font-size: 2rem; - padding: calc(var(--padding) + var(--border-size)); - border-radius: var(--border-radius); - display: inline-block; - z-index: 0; - backface-visibility: hidden; - perspective: 1000; - transform: translate3d(0, 0, 0); -} - -.counter-border:hover { - cursor: pointer; -} - -.counter-border i { - content: ""; - position: absolute; - top: var(--border-size); - right: var(--border-size); - bottom: var(--border-size); - left: var(--border-size); - padding: var(--border-size); - mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); - mask-composite: exclude; - z-index: -1; - border-radius: calc(var(--border-radius) + var(--border-size)); -} - -.counter-border i::before { - content: ""; - display: block; - background: var(--border-bg); - box-shadow: 0px 0px 40px 20px --var(--border-bg); - width: calc(100% * 1.41421356237); - padding-bottom: calc(100% * 1.41421356237); - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - border-radius: 100%; - z-index: -2; - animation: spin 5s linear infinite; -} - -@media (prefers-reduced-motion) { - .counter-border i::before { - animation: none; - } -} - -@keyframes spin { - from { - transform: translate(-50%, -50%) rotate(360deg); - } - to { - transform: translate(-50%, -50%) rotate(0); - } -} - -.leftBottomLights { - position: absolute; - width: 387px; - height: 404px; - left: calc(50% - 387px / 2 - 80px); - bottom: -32px; - background: linear-gradient(180deg, #58a5ff 0%, #a67af4 100%); - mix-blend-mode: normal; - opacity: 0.15; - filter: blur(50px); - will-change: filter; -} - -.rightBottomLights { - position: absolute; - width: 387px; - height: 404px; - left: calc(50% - 387px / 2 + 81px); - bottom: -32px; - background: linear-gradient(180deg, #3333ff 0%, #4fdfff 100%); - mix-blend-mode: normal; - opacity: 0.15; - filter: blur(50px); - will-change: filter; -} diff --git a/docs/components/pages/landing/index.tsx b/docs/components/pages/landing/index.tsx deleted file mode 100644 index 0cf3ea3..0000000 --- a/docs/components/pages/landing/index.tsx +++ /dev/null @@ -1,197 +0,0 @@ -import React from "react"; -import Head from "next/head"; -import cn from "classnames"; -import Link from "next/link"; -import { motion } from "framer-motion"; -import { Clients } from "../../clients/Clients"; -import { Marquee } from "../../clients/Marquee"; -import { TurboheroBackground } from "./TurboHeroBackground"; -import { HydroRollAI } from "./HydroRollAI"; -import { HydroRollTRPG } from "./HydroRollTRPG"; -import { FadeIn } from "../home-shared/FadeIn"; -import { LandingPageGlobalStyles } from "../home-shared/GlobalStyles"; -import styles from "./index.module.css"; -import PackLogo from "../../logos/TRPGLogo"; -import RepoLogo from "../../logos/AILogo"; - -function Background() { - return ( -
-
- - - - - -
- ); -} - -export function CardBadge({ children }: { children: React.ReactNode }) { - return ( -
- {children} -
- ); -} - -const variants = { - hidden: { opacity: 0 }, - active: { opacity: 1 }, -}; - -function Card({ - alt, - href, - title, - icon: Icon, - className, - children, -}: { - href: string; - icon: React.ElementType; - title: "AI" | "TRPG"; - alt?: string; - className?: string; - children: React.ReactNode; -}) { - const [hovering, setHovering] = React.useState(false); - return ( - setHovering(true)} - onMouseLeave={() => setHovering(false)} - > - -
-
- -
- -
- {title == "TRPG" ? ( - - ) : ( - - )} - {children} -
-
- - ); -} - -function SiteCards() { - return ( -
- - -

- 水系核心——AI模块 -

-
-
- - -
- alpha -
-

- 阅读水系TRPG模块文档 -

-
-
-
- ); -} - -function Teams() { - return ( -
-

- Thx by teams from -
around the world -

- 感谢以下来自世界各地的团队或组织的贡献 -

-
- -
-
- ); -} - -function LandingPage() { - return ( - <> - -
- - -

- Make it Happen -

-

- HydroRoll'水系 是一个基于nlp多任务模型的跨平台骰系,尽管只是作为深度学习框架iamai的插件并且借鉴了大量其它骰系较好的机制,但它仍然有自己的创新之处与标准遵循。 -

-
- - - - -
- - ); -} - -export default LandingPage; diff --git a/docs/components/pages/landing/turbohero-background.module.css b/docs/components/pages/landing/turbohero-background.module.css deleted file mode 100644 index 8f157e1..0000000 --- a/docs/components/pages/landing/turbohero-background.module.css +++ /dev/null @@ -1,108 +0,0 @@ -.container { - position: absolute; - z-index: -6; - overflow: hidden; - inset: 0; - transition: perspective 3000ms ease 0s; -} - -.lines { - --right: #f8cde8; - --left: #b9ddff; - position: absolute; - width: 200vw; - margin-left: -50%; - transform: translateY(0); - background-image: linear-gradient( - to right, - var(--left) 45%, - rgba(0, 0, 0, 0) 50%, - var(--right) 55% - ); - mask-image: linear-gradient( - to right, - rgba(0, 0, 0, 1) 2px, - rgba(0, 0, 0, 0) 1px - ), - linear-gradient(to bottom, rgba(0, 0, 0, 1) 2px, rgba(0, 0, 0, 0) 1px); - mask-size: 60px 60px; - overflow: hidden; - mask-repeat: repeat repeat; - display: flex; - align-items: center; - justify-content: center; - inset: -100% 0px; - background-position-y: 100%; - mask-position: 50% 0px; - animation: go-up 60s linear infinite; -} - -@media (min-width: 1024px) { - .lines { - animation-duration: 30s; - mask-size: 80px 80px; - } -} - -:global(.dark) .lines { - --right: #4c2638; - --left: #223b67; -} - -@keyframes go-up { - 0% { - transform: translateY(0); - } - - 100% { - transform: translateY(calc(50% + 28px)); - } -} - -.pulse::before { - content: ""; - position: absolute; - inset: 0px; - animation: pulse-frames ease-out 8s infinite; - animation-delay: 0s; - background: rgba(0, 0, 0, 0) - linear-gradient( - to top, - rgba(0, 0, 0, 0) 45%, - var(--pulse-color) 50%, - rgba(0, 0, 0, 0) 90% - ) - no-repeat; - z-index: 211; - animation-delay: var(--delay); -} - -@keyframes pulse-frames { - 0% { - transform: translateY(0%); - } - 50% { - transform: translateY(200%); - } - 100% { - transform: translateY(200%); - } -} - -@media (prefers-reduced-motion) { - .lines { - animation: none; - } - .pulse::before { - animation: none; - } -} - -@media (prefers-reduced-motion) { - .lines { - animation: none; - } - .pulse::before { - animation: none; - } -} diff --git a/docs/components/pages/showcase.tsx b/docs/components/pages/showcase.tsx deleted file mode 100644 index 922f943..0000000 --- a/docs/components/pages/showcase.tsx +++ /dev/null @@ -1,47 +0,0 @@ -/* eslint-disable react/no-unescaped-entities */ -import { Container } from "../Container"; -import { Clients } from "../clients/Clients"; - -export default function Showcase() { - return ( -
-
-
-

- Showcase -

-

- Wut about plugins? -

-

- Turbo is the one of the fastest growing toolchains in the frontend - ecosystem. It's trusted by thousands of developers in production - including teams at Vercel, AWS, Netflix, Microsoft, Disney, and - more. -

-
-
- -
- -
- -
-
- Are you using HydroRoll? -
- -
-
-
- ); -} diff --git a/docs/components/useIsomorphicLayoutEffect.tsx b/docs/components/useIsomorphicLayoutEffect.tsx deleted file mode 100644 index c685670..0000000 --- a/docs/components/useIsomorphicLayoutEffect.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import * as React from "react"; - -const useIsomorphicLayoutEffect = - typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect; - -/* eslint-disable-next-line import/no-default-export -- TODO: Fix ESLint Error (#13355) */ -export default useIsomorphicLayoutEffect; diff --git a/docs/components/usePrefersReducedMotion.tsx b/docs/components/usePrefersReducedMotion.tsx deleted file mode 100644 index dd9d82c..0000000 --- a/docs/components/usePrefersReducedMotion.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { useState, useEffect } from "react"; - -const QUERY = "(prefers-reduced-motion: no-preference)"; -const isRenderingOnServer = typeof window === "undefined"; -/** - * All code here from https://www.joshwcomeau.com/snippets/react-hooks/use-prefers-reduced-motion/ - */ -const getInitialState = () => { - // For our initial server render, we won't know if the user - // prefers reduced motion, but it doesn't matter. This value - // will be overwritten on the client, before any animations - // occur. - return isRenderingOnServer ? true : !window.matchMedia(QUERY).matches; -}; - -/** - * Checks the user's device setting for `prefers-reduced-motion`. - * Use this if you can't use a media query in CSS. - * - * From https://www.joshwcomeau.com/snippets/react-hooks/use-prefers-reduced-motion/ - */ -export function usePrefersReducedMotion(): boolean { - const [prefersReducedMotion, setPrefersReducedMotion] = - useState(getInitialState); - useEffect(() => { - const mediaQueryList = window.matchMedia(QUERY); - const listener = (event: MediaQueryListEvent) => { - setPrefersReducedMotion(!event.matches); - }; - if (mediaQueryList.addEventListener) { - mediaQueryList.addEventListener("change", listener); - } else { - mediaQueryList.addListener(listener); - } - return () => { - if (mediaQueryList.removeEventListener) { - mediaQueryList.removeEventListener("change", listener); - } else { - mediaQueryList.removeListener(listener); - } - }; - }, []); - return prefersReducedMotion; -} -- cgit v1.2.3-70-g09d2