diff --git a/examples/07-collaboration/01-partykit/package.json b/examples/07-collaboration/01-partykit/package.json index c50ea40320..03570c4cc8 100644 --- a/examples/07-collaboration/01-partykit/package.json +++ b/examples/07-collaboration/01-partykit/package.json @@ -18,7 +18,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "y-partykit": "^0.0.25", - "yjs": "^13.6.15" + "yjs": "13.6.24" }, "devDependencies": { "@types/react": "^18.0.25", @@ -26,4 +26,4 @@ "@vitejs/plugin-react": "^4.3.1", "vite": "^5.3.4" } -} \ No newline at end of file +} diff --git a/examples/07-collaboration/02-liveblocks/package.json b/examples/07-collaboration/02-liveblocks/package.json index def2998319..47a830a2f7 100644 --- a/examples/07-collaboration/02-liveblocks/package.json +++ b/examples/07-collaboration/02-liveblocks/package.json @@ -22,7 +22,7 @@ "@liveblocks/react-blocknote": "^2.23.1", "@liveblocks/react-tiptap": "^2.23.1", "@liveblocks/react-ui": "^2.23.1", - "yjs": "^13.6.15" + "yjs": "13.6.24" }, "devDependencies": { "@types/react": "^18.0.25", @@ -30,4 +30,4 @@ "@vitejs/plugin-react": "^4.3.1", "vite": "^5.3.4" } -} \ No newline at end of file +} diff --git a/examples/07-collaboration/03-y-sweet/package.json b/examples/07-collaboration/03-y-sweet/package.json index cb8d1492a1..cfd2da9601 100644 --- a/examples/07-collaboration/03-y-sweet/package.json +++ b/examples/07-collaboration/03-y-sweet/package.json @@ -17,7 +17,8 @@ "@blocknote/shadcn": "latest", "react": "^18.3.1", "react-dom": "^18.3.1", - "@y-sweet/react": "^0.6.3" + "@y-sweet/react": "^0.6.3", + "yjs": "13.6.24" }, "devDependencies": { "@types/react": "^18.0.25", @@ -25,4 +26,4 @@ "@vitejs/plugin-react": "^4.3.1", "vite": "^5.3.4" } -} \ No newline at end of file +} diff --git a/examples/07-collaboration/04-comments/package.json b/examples/07-collaboration/04-comments/package.json index 45cebf7075..1c8b378333 100644 --- a/examples/07-collaboration/04-comments/package.json +++ b/examples/07-collaboration/04-comments/package.json @@ -18,7 +18,8 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "@y-sweet/react": "^0.6.3", - "@mantine/core": "^7.10.1" + "@mantine/core": "^7.10.1", + "yjs": "13.6.24" }, "devDependencies": { "@types/react": "^18.0.25", @@ -26,4 +27,4 @@ "@vitejs/plugin-react": "^4.3.1", "vite": "^5.3.4" } -} \ No newline at end of file +} diff --git a/examples/07-collaboration/05-comments-with-sidebar/package.json b/examples/07-collaboration/05-comments-with-sidebar/package.json index 2b7d33d0c8..54a3636813 100644 --- a/examples/07-collaboration/05-comments-with-sidebar/package.json +++ b/examples/07-collaboration/05-comments-with-sidebar/package.json @@ -18,7 +18,8 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "@y-sweet/react": "^0.6.3", - "@mantine/core": "^7.10.1" + "@mantine/core": "^7.10.1", + "yjs": "13.6.24" }, "devDependencies": { "@types/react": "^18.0.25", @@ -26,4 +27,4 @@ "@vitejs/plugin-react": "^4.3.1", "vite": "^5.3.4" } -} \ No newline at end of file +} diff --git a/examples/07-collaboration/06-ghost-writer/package.json b/examples/07-collaboration/06-ghost-writer/package.json index 5f37787686..96c4e484e9 100644 --- a/examples/07-collaboration/06-ghost-writer/package.json +++ b/examples/07-collaboration/06-ghost-writer/package.json @@ -18,7 +18,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "y-partykit": "^0.0.25", - "yjs": "^13.6.15" + "yjs": "13.6.24" }, "devDependencies": { "@types/react": "^18.0.25", @@ -26,4 +26,4 @@ "@vitejs/plugin-react": "^4.3.1", "vite": "^5.3.4" } -} \ No newline at end of file +} diff --git a/examples/07-collaboration/06-ghost-writer/App.tsx b/examples/07-collaboration/06-ghost-writer/src/App.tsx similarity index 100% rename from examples/07-collaboration/06-ghost-writer/App.tsx rename to examples/07-collaboration/06-ghost-writer/src/App.tsx diff --git a/examples/07-collaboration/06-ghost-writer/styles.css b/examples/07-collaboration/06-ghost-writer/src/styles.css similarity index 100% rename from examples/07-collaboration/06-ghost-writer/styles.css rename to examples/07-collaboration/06-ghost-writer/src/styles.css diff --git a/examples/07-collaboration/07-forking/package.json b/examples/07-collaboration/07-forking/package.json index 2f02a17c24..0db418c9fd 100644 --- a/examples/07-collaboration/07-forking/package.json +++ b/examples/07-collaboration/07-forking/package.json @@ -18,7 +18,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "y-partykit": "^0.0.25", - "yjs": "^13.6.15" + "yjs": "13.6.24" }, "devDependencies": { "@types/react": "^18.0.25", @@ -26,4 +26,4 @@ "@vitejs/plugin-react": "^4.3.1", "vite": "^5.3.4" } -} \ No newline at end of file +} diff --git a/examples/07-collaboration/07-forking/App.tsx b/examples/07-collaboration/07-forking/src/App.tsx similarity index 100% rename from examples/07-collaboration/07-forking/App.tsx rename to examples/07-collaboration/07-forking/src/App.tsx diff --git a/fumadocs/.gitignore b/fumadocs/.gitignore index f81e4c0d20..d242900bd7 100644 --- a/fumadocs/.gitignore +++ b/fumadocs/.gitignore @@ -40,6 +40,6 @@ next-env.d.ts # Sentry Config File .env.sentry-build-plugin -/content/examples/*/ +/content/examples/**/* /components/example/generated/ /.source/ \ No newline at end of file diff --git a/fumadocs/components/pages/landing/community/Community.tsx b/fumadocs/app/(home)/community/Community.tsx similarity index 65% rename from fumadocs/components/pages/landing/community/Community.tsx rename to fumadocs/app/(home)/community/Community.tsx index e0da85e5fa..f17a69c923 100644 --- a/fumadocs/components/pages/landing/community/Community.tsx +++ b/fumadocs/app/(home)/community/Community.tsx @@ -1,8 +1,8 @@ import { FC } from "react"; -import { Contributors } from "@/components/pages/landing/community/Contributors"; -import { Section } from "@/components/pages/landing/shared/Section"; -import { Sponsors } from "@/components/pages/landing/community/Sponsors"; -import { SectionIntro } from "@/components/pages/landing/shared/Headings"; +import { Contributors } from "@/app/(home)/community/Contributors"; +import { Section } from "@/components/Section"; +import { Sponsors } from "@/app/(home)/community/Sponsors"; +import { SectionIntro } from "@/components/Headings"; export const Community: FC = () => (
diff --git a/fumadocs/components/pages/landing/community/Contributors.tsx b/fumadocs/app/(home)/community/Contributors.tsx similarity index 91% rename from fumadocs/components/pages/landing/community/Contributors.tsx rename to fumadocs/app/(home)/community/Contributors.tsx index a1015612e7..0b15e9c90e 100644 --- a/fumadocs/components/pages/landing/community/Contributors.tsx +++ b/fumadocs/app/(home)/community/Contributors.tsx @@ -1,9 +1,9 @@ import Image from "next/image"; import Link from "next/link"; -import { DiscordIcon, GitHubIcon } from "nextra/icons"; -import { SectionSubHeader } from "@/components/pages/landing/shared/Headings"; -import { JoinButton } from "@/components/pages/landing/community/JoinButton"; -import { FadeIn } from "@/components/pages/landing/shared/FadeIn"; +import { RiDiscordFill, RiGithubFill } from "react-icons/ri"; +import { SectionSubHeader } from "@/components/Headings"; +import { JoinButton } from "@/app/(home)/community/JoinButton"; +import { FadeIn } from "@/components/FadeIn"; // TODO: Use GitHub API function fetchContributors(): { username: string; avatarUrl: string }[] { @@ -114,7 +114,7 @@ export const Contributors = () => ( subtext={ "Join the community of BlockNote developers by contributing code and supporting the project." } - icon={GitHubIcon} + icon={} linkTitle={"See our repository"} linkUrl={"https://github.com/TypeCellOS/BlockNote"} /> @@ -123,7 +123,7 @@ export const Contributors = () => ( subtext={ "Ask questions, discuss features, and share your work with other BlockNote users on Discord." } - icon={DiscordIcon} + icon={} linkTitle={"Join our Server"} linkUrl={"https://discord.gg/Qc2QTTH5dF"} /> diff --git a/fumadocs/components/pages/landing/community/JoinButton.tsx b/fumadocs/app/(home)/community/JoinButton.tsx similarity index 78% rename from fumadocs/components/pages/landing/community/JoinButton.tsx rename to fumadocs/app/(home)/community/JoinButton.tsx index 619e36893e..ec1ce485c3 100644 --- a/fumadocs/components/pages/landing/community/JoinButton.tsx +++ b/fumadocs/app/(home)/community/JoinButton.tsx @@ -1,24 +1,20 @@ import Link from "next/link"; -import { ComponentProps, FC } from "react"; +import { ReactNode } from "react"; export const JoinButton = (props: { text: string; subtext: string; - icon: FC>; + icon: ReactNode; linkTitle: string; linkUrl: string; }) => { - const Icon = props.icon; - return (
-
- -
+
{props.icon}

- {props.name} - {props.name} - {props.tagline && (
{props.tagline} diff --git a/fumadocs/components/pages/landing/community/Sponsors.tsx b/fumadocs/app/(home)/community/Sponsors.tsx similarity index 56% rename from fumadocs/components/pages/landing/community/Sponsors.tsx rename to fumadocs/app/(home)/community/Sponsors.tsx index 690758d5ab..1dcf1cbb05 100644 --- a/fumadocs/components/pages/landing/community/Sponsors.tsx +++ b/fumadocs/app/(home)/community/Sponsors.tsx @@ -1,30 +1,30 @@ import { SponsorCard, SponsorCardProps, -} from "@/components/pages/landing/community/SponsorCard"; -import { FadeIn } from "@/components/pages/landing/shared/FadeIn"; -import { SectionSubHeader } from "@/components/pages/landing/shared/Headings"; +} from "@/app/(home)/community/SponsorCard"; +import { FadeIn } from "@/components/FadeIn"; +import { SectionSubHeader } from "@/components/Headings"; -import agree from "../../../../public/img/sponsors/agree.png"; -import atuin from "../../../../public/img/sponsors/atuin.png"; -import capitolDark from "../../../../public/img/sponsors/capitolDark.svg"; -import capitolLight from "../../../../public/img/sponsors/capitolLight.svg"; -import deepOrigin from "../../../../public/img/sponsors/deepOrigin.svg"; -import dinumDark from "../../../../public/img/sponsors/dinumDark.svg"; -import dinumLight from "../../../../public/img/sponsors/dinumLight.svg"; -import fermatDark from "../../../../public/img/sponsors/fermatDark.svg"; -import fermatLight from "../../../../public/img/sponsors/fermatLight.svg"; -import nlnetDark from "../../../../public/img/sponsors/nlnetDark.svg"; -import nlnetLight from "../../../../public/img/sponsors/nlnetLight.svg"; -import notePlanDark from "../../../../public/img/sponsors/notePlanDark.png"; -import notePlanLight from "../../../../public/img/sponsors/notePlanLight.png"; -import poggioDark from "../../../../public/img/sponsors/poggioDark.svg"; -import poggioLight from "../../../../public/img/sponsors/poggioLight.svg"; -import twentyDark from "../../../../public/img/sponsors/twentyDark.png"; -import twentyLight from "../../../../public/img/sponsors/twentyLight.png"; -import typeCellDark from "../../../../public/img/sponsors/typeCellDark.svg"; -import typeCellLight from "../../../../public/img/sponsors/typeCellLight.svg"; -import zendis from "../../../../public/img/sponsors/zendis.svg"; +import agree from "@/public/img/sponsors/agree.png"; +import atuin from "@/public/img/sponsors/atuin.png"; +import capitolDark from "@/public/img/sponsors/capitolDark.svg"; +import capitolLight from "@/public/img/sponsors/capitolLight.svg"; +import deepOrigin from "@/public/img/sponsors/deepOrigin.svg"; +import dinumDark from "@/public/img/sponsors/dinumDark.svg"; +import dinumLight from "@/public/img/sponsors/dinumLight.svg"; +import fermatDark from "@/public/img/sponsors/fermatDark.svg"; +import fermatLight from "@/public/img/sponsors/fermatLight.svg"; +import nlnetDark from "@/public/img/sponsors/nlnetDark.svg"; +import nlnetLight from "@/public/img/sponsors/nlnetLight.svg"; +import notePlanDark from "@/public/img/sponsors/notePlanDark.png"; +import notePlanLight from "@/public/img/sponsors/notePlanLight.png"; +import poggioDark from "@/public/img/sponsors/poggioDark.svg"; +import poggioLight from "@/public/img/sponsors/poggioLight.svg"; +import twentyDark from "@/public/img/sponsors/twentyDark.png"; +import twentyLight from "@/public/img/sponsors/twentyLight.png"; +import typeCellDark from "@/public/img/sponsors/typeCellDark.svg"; +import typeCellLight from "@/public/img/sponsors/typeCellLight.svg"; +import zendis from "@/public/img/sponsors/zendis.svg"; export const sponsorsCardData: SponsorCardProps[] = [ { diff --git a/fumadocs/components/pages/landing/faq/FAQ.tsx b/fumadocs/app/(home)/faq/FAQ.tsx similarity index 95% rename from fumadocs/components/pages/landing/faq/FAQ.tsx rename to fumadocs/app/(home)/faq/FAQ.tsx index d6ad972ea8..f4fe21e0c1 100644 --- a/fumadocs/components/pages/landing/faq/FAQ.tsx +++ b/fumadocs/app/(home)/faq/FAQ.tsx @@ -1,5 +1,5 @@ -import { SectionIntro } from "@/components/pages/landing/shared/Headings"; -import { Section } from "@/components/pages/landing/shared/Section"; +import { SectionIntro } from "@/components/Headings"; +import { Section } from "@/components/Section"; import Link from "next/link"; const faqs = [ diff --git a/fumadocs/components/pages/landing/features/FeatureCard.tsx b/fumadocs/app/(home)/features/FeatureCard.tsx similarity index 61% rename from fumadocs/components/pages/landing/features/FeatureCard.tsx rename to fumadocs/app/(home)/features/FeatureCard.tsx index c731c4730b..5fa2b855bb 100644 --- a/fumadocs/components/pages/landing/features/FeatureCard.tsx +++ b/fumadocs/app/(home)/features/FeatureCard.tsx @@ -1,3 +1,4 @@ +import ThemedImage from "@/components/ThemedImage"; import Image from "next/image"; import { IconType } from "react-icons"; @@ -16,18 +17,17 @@ export function FeatureCard(props: FeatureCardProps) { return (
{props.thumbnail && ( -
- {props.title} - +
diff --git a/fumadocs/components/pages/landing/features/Features.tsx b/fumadocs/app/(home)/features/Features.tsx similarity index 79% rename from fumadocs/components/pages/landing/features/Features.tsx rename to fumadocs/app/(home)/features/Features.tsx index d70fd8ef72..713e274739 100644 --- a/fumadocs/components/pages/landing/features/Features.tsx +++ b/fumadocs/app/(home)/features/Features.tsx @@ -11,20 +11,20 @@ import { BiLogoMarkdown, BiSolidWrench, } from "react-icons/bi"; -import { Section } from "@/components/pages/landing/shared/Section"; +import { Section } from "@/components/Section"; import { FeatureCard, FeatureCardProps, -} from "@/components/pages/landing/features/FeatureCard"; -import { FadeIn } from "@/components/pages/landing/shared/FadeIn"; -import { SectionIntro } from "@/components/pages/landing/shared/Headings"; +} from "@/app/(home)/features/FeatureCard"; +import { FadeIn } from "@/components/FadeIn"; +import { SectionIntro } from "@/components/Headings"; -import worksOutOfTheBoxLight from "../../../../public/img/features/works_out_of_the_box_light.gif"; -import worksOutOfTheBoxDark from "../../../../public/img/features/works_out_of_the_box_dark.gif"; -import blockBasedDesignLight from "../../../../public/img/features/block_based_design_light.gif"; -import blockBasedDesignDark from "../../../../public/img/features/block_based_design_dark.gif"; -import collaborationLight from "../../../../public/img/features/collaboration_light.gif"; -import collaborationDark from "../../../../public/img/features/collaboration_dark.gif"; +import worksOutOfTheBoxLight from "@/public/img/features/works_out_of_the_box_light.gif"; +import worksOutOfTheBoxDark from "@/public/img/features/works_out_of_the_box_dark.gif"; +import blockBasedDesignLight from "@/public/img/features/block_based_design_light.gif"; +import blockBasedDesignDark from "@/public/img/features/block_based_design_dark.gif"; +import collaborationLight from "@/public/img/features/collaboration_light.gif"; +import collaborationDark from "@/public/img/features/collaboration_dark.gif"; export const featuresCardData: FeatureCardProps[] = [ { diff --git a/fumadocs/app/(home)/hero/Demo.tsx b/fumadocs/app/(home)/hero/Demo.tsx new file mode 100644 index 0000000000..b2c6fd4be2 --- /dev/null +++ b/fumadocs/app/(home)/hero/Demo.tsx @@ -0,0 +1,32 @@ +"use client"; + +import dynamic from "next/dynamic"; +import ThemedImage from "@/components/ThemedImage"; +import tryHereImageDark from "@/public/img/assets/try.dark.svg"; +import tryHereImageLight from "@/public/img/assets/try.svg"; + +function TryHereImage() { + return ( + + ); +} + +const DemoEditor = dynamic(() => import("@/app/(home)/hero/DemoEditor"), { + ssr: false, +}); + +export function Demo() { + return ( +
+
+
+ +
+ +
+ ); +} diff --git a/fumadocs/components/pages/landing/hero/DemoEditor.tsx b/fumadocs/app/(home)/hero/DemoEditor.tsx similarity index 95% rename from fumadocs/components/pages/landing/hero/DemoEditor.tsx rename to fumadocs/app/(home)/hero/DemoEditor.tsx index 8c81ae7243..3712a843ce 100644 --- a/fumadocs/components/pages/landing/hero/DemoEditor.tsx +++ b/fumadocs/app/(home)/hero/DemoEditor.tsx @@ -19,6 +19,7 @@ import { withMultiColumn, } from "@blocknote/xl-multi-column"; import "@blocknote/mantine/style.css"; +import { useTheme } from "next-themes"; import { useCallback, useMemo, useState } from "react"; import YPartyKitProvider from "y-partykit/provider"; import * as Y from "yjs"; @@ -69,7 +70,9 @@ function getUTCDateYYYYMMDD() { return `${year}${formattedMonth}${formattedDay}`; } -export default function DemoEditor(props: { theme?: "light" | "dark" }) { +export default function DemoEditor() { + const { resolvedTheme } = useTheme(); + const [doc, provider] = useMemo(() => { const doc = new Y.Doc(); const provider = new YPartyKitProvider( @@ -128,7 +131,7 @@ export default function DemoEditor(props: { theme?: "light" | "dark" }) { + + + + +

+ ); +} diff --git a/fumadocs/components/pages/landing/hero/Text.tsx b/fumadocs/app/(home)/hero/Text.tsx similarity index 83% rename from fumadocs/components/pages/landing/hero/Text.tsx rename to fumadocs/app/(home)/hero/Text.tsx index 1a36c220ea..6f6aa8fd06 100644 --- a/fumadocs/components/pages/landing/hero/Text.tsx +++ b/fumadocs/app/(home)/hero/Text.tsx @@ -1,8 +1,5 @@ -import { - HeroText, - SectionSubtext, -} from "@/components/pages/landing/shared/Headings"; -import CTAButton from "@/components/pages/landing/shared/CTAButton"; +import { HeroText, SectionSubtext } from "@/components/Headings"; +import CTAButton from "@/components/CTAButton"; export function Text() { return ( diff --git a/fumadocs/components/pages/landing/hero/styles.css b/fumadocs/app/(home)/hero/styles.css similarity index 100% rename from fumadocs/components/pages/landing/hero/styles.css rename to fumadocs/app/(home)/hero/styles.css diff --git a/fumadocs/app/(home)/layout.tsx b/fumadocs/app/(home)/layout.tsx index 1dd4684d0c..be3b25ef89 100644 --- a/fumadocs/app/(home)/layout.tsx +++ b/fumadocs/app/(home)/layout.tsx @@ -1,7 +1,13 @@ -import type { ReactNode } from 'react'; -import { HomeLayout } from 'fumadocs-ui/layouts/home'; -import { baseOptions } from '@/app/layout.config'; +import type { ReactNode } from "react"; +import { HomeLayout } from "fumadocs-ui/layouts/home"; +import { baseOptions } from "@/app/layout.config"; +import { Footer } from "@/components/Footer"; export default function Layout({ children }: { children: ReactNode }) { - return {children}; + return ( + + {children} +