From 5e26d1d33dcb06dee9e4473e9469675c8ce904ca Mon Sep 17 00:00:00 2001 From: DIYgod Date: Thu, 26 Feb 2026 11:33:16 +0800 Subject: [PATCH] feat(landing): merge landing app into monorepo (#4881) --- .github/workflows/deploy-cloudflare.yml | 21 + .gitignore | 3 + .prettierignore | 1 + apps/desktop/package.json | 1 + apps/landing/.prettierrc.mjs | 5 + apps/landing/components.json | 25 + apps/landing/eslint.config.mjs | 80 + apps/landing/global.d.ts | 42 + apps/landing/next.config.ts | 63 + apps/landing/open-next.config.ts | 3 + apps/landing/package.json | 92 + .../landing/plugins/eslint-recursive-sort.mjs | 60 + apps/landing/postcss.config.mjs | 5 + apps/landing/public/favicon.ico | Bin 0 -> 15406 bytes apps/landing/public/icon-192x192.png | Bin 0 -> 7589 bytes apps/landing/public/icon-512x512.png | Bin 0 -> 30437 bytes apps/landing/public/icon.svg | 1 + apps/landing/public/manifest.json | 16 + apps/landing/public/og.png | Bin 0 -> 124060 bytes apps/landing/src/actions/github-star.ts | 23 + apps/landing/src/app/ClientInit.tsx | 6 + apps/landing/src/app/InitInClient.ts | 9 + .../src/app/[locale]/download/page.tsx | 32 + apps/landing/src/app/[locale]/error.tsx | 26 + apps/landing/src/app/[locale]/layout.tsx | 146 + apps/landing/src/app/[locale]/page.tsx | 19 + .../src/app/[locale]/privacy-policy/page.tsx | 36 + .../app/[locale]/terms-of-service/page.tsx | 34 + .../app/apple-app-site-association/route.ts | 9 + apps/landing/src/app/globals.css | 1 + apps/landing/src/app/init.ts | 7 + apps/landing/src/app/layout.tsx | 9 + apps/landing/src/app/robots.ts | 11 + apps/landing/src/atoms/css-media.ts | 6 + apps/landing/src/atoms/index.ts | 2 + apps/landing/src/atoms/is-interactive.ts | 10 + apps/landing/src/atoms/viewport.ts | 54 + apps/landing/src/components/brand/Folo.tsx | 20 + apps/landing/src/components/brand/Logo.tsx | 29 + .../src/components/common/ClientOnly.tsx | 9 + .../src/components/common/ErrorBoundary.tsx | 37 + .../src/components/common/GithubTrending.tsx | 81 + .../common/HydrationEndDetector.tsx | 23 + .../src/components/common/Lazyload.tsx | 35 + .../src/components/common/LightRays.tsx | 581 ++ .../components/common/ProviderComposer.tsx | 12 + .../src/components/common/QueryHydrate.tsx | 8 + .../src/components/common/ScrollTop.tsx | 18 + .../src/components/hoc/with-no-ssr.tsx | 13 + .../components/layout/container/Normal.tsx | 17 + .../src/components/layout/content/Content.tsx | 7 + .../src/components/layout/content/index.ts | 1 + .../src/components/layout/footer/Footer.tsx | 184 + .../src/components/layout/root/Root.tsx | 13 + .../src/components/ui/3d-models/AISpline.ts | 23 + .../ui/3d-models/AISplineLoader.tsx | 129 + .../src/components/ui/accordion/Accordion.tsx | 251 + .../landing/src/components/ui/border-beam.tsx | 106 + .../src/components/ui/button/Button.tsx | 154 + .../src/components/ui/button/MotionButton.tsx | 27 + .../landing/src/components/ui/button/index.ts | 2 + .../src/components/ui/checkbox/Checkbox.tsx | 174 + .../src/components/ui/checkbox/index.ts | 1 + .../components/ui/collapse/CollapseCss.tsx | 188 + .../src/components/ui/collapse/hooks.tsx | 15 + .../src/components/ui/collapse/index.ts | 1 + .../src/components/ui/dialog/Dialog.tsx | 267 + .../landing/src/components/ui/dialog/index.ts | 12 + .../src/components/ui/divider/Divider.tsx | 36 + .../src/components/ui/divider/index.ts | 1 + .../ui/dropdown-menu/DropdownMenu.tsx | 258 + .../src/components/ui/effects/GridGuides.tsx | 51 + .../components/ui/effects/ParticlesAura.tsx | 64 + .../src/components/ui/effects/TiltCard.tsx | 106 + .../landing/src/components/ui/glass/index.tsx | 390 ++ .../landing/src/components/ui/highlighter.tsx | 101 + .../components/ui/hover-card/HoverCard.tsx | 77 + .../src/components/ui/hover-card/index.ts | 9 + .../landing/src/components/ui/input/Input.tsx | 253 + .../src/components/ui/input/TextArea.tsx | 53 + apps/landing/src/components/ui/input/index.ts | 1 + .../components/ui/json-highlighter/index.tsx | 422 ++ .../landing/src/components/ui/label/Label.tsx | 48 + apps/landing/src/components/ui/light-rays.tsx | 149 + .../src/components/ui/loading/index.tsx | 34 + apps/landing/src/components/ui/magic-card.tsx | 103 + .../src/components/ui/markdown/index.tsx | 51 + .../components/ui/modal/ModalContainer.tsx | 161 + .../src/components/ui/modal/ModalManager.ts | 72 + apps/landing/src/components/ui/modal/hooks.ts | 9 + apps/landing/src/components/ui/modal/index.ts | 4 + apps/landing/src/components/ui/modal/types.ts | 26 + .../src/components/ui/panel/PanelSplitter.tsx | 47 + .../src/components/ui/portal/index.tsx | 20 + .../src/components/ui/portal/provider.tsx | 19 + .../src/components/ui/prompts/BasePrompt.tsx | 100 + .../src/components/ui/prompts/InputPrompt.tsx | 125 + .../src/components/ui/prompts/Prompt.ts | 26 + .../src/components/ui/prompts/index.ts | 3 + .../landing/src/components/ui/radio/index.tsx | 137 + .../ui/relative-time/RelativeTime.tsx | 39 + .../src/components/ui/relative-time/index.ts | 1 + .../components/ui/scroll-areas/ScrollArea.tsx | 178 + .../src/components/ui/scroll-areas/ctx.ts | 5 + .../src/components/ui/scroll-areas/hooks.ts | 9 + .../components/ui/segment-tab/SegmentTab.tsx | 164 + .../src/components/ui/segment-tab/index.ts | 2 + .../components/ui/select/ComboboxSelect.tsx | 158 + .../src/components/ui/select/MultiSelect.tsx | 207 + .../src/components/ui/select/Select.tsx | 220 + .../landing/src/components/ui/select/index.ts | 3 + .../landing/src/components/ui/sheet/Sheet.tsx | 88 + apps/landing/src/components/ui/sheet/index.ts | 1 + .../src/components/ui/skeleton/Skeleton.tsx | 13 + .../src/components/ui/skeleton/index.ts | 1 + .../src/components/ui/switch/index.tsx | 120 + .../ui/theme-switcher/ThemeSwitcher.tsx | 158 + .../src/components/ui/theme-switcher/index.ts | 1 + .../src/components/ui/tooltip/index.tsx | 75 + .../src/components/ui/tooltip/styles.ts | 11 + .../BottomToUpSoftScaleTransitionView.tsx | 15 + .../transition/BottomToUpTransitionView.tsx | 17 + .../ui/transition/FadeInOutTransitionView.tsx | 17 + .../ui/transition/IconTransiton.tsx | 44 + .../transition/LeftToRightTransitionView.tsx | 14 + .../transition/RightToLeftTransitionView.tsx | 14 + .../ui/transition/ScaleTransitionView.tsx | 14 + .../ui/transition/TextUpTransitionView.tsx | 57 + .../src/components/ui/transition/factor.tsx | 86 + .../src/components/ui/transition/typings.ts | 20 + .../components/ui/viewport/OnlyDesktop.tsx | 20 + .../src/components/ui/viewport/OnlyMobile.tsx | 16 + .../src/components/ui/viewport/index.ts | 1 + .../widgets/download/DownloadHero.tsx | 58 + .../widgets/download/PlatformDownloads.tsx | 216 + .../components/widgets/landing/Audience.tsx | 294 + .../components/widgets/landing/BuiltOpen.tsx | 137 + .../components/widgets/landing/Features.tsx | 122 + .../src/components/widgets/landing/Header.tsx | 192 + .../src/components/widgets/landing/Hero.tsx | 182 + .../components/widgets/landing/PromptDemo.tsx | 64 + .../components/widgets/landing/RepoStats.tsx | 85 + .../widgets/landing/SocialProof.tsx | 157 + .../widgets/landing/ViewsShowcase.tsx | 107 + .../widgets/landing/WindowChrome.tsx | 41 + .../widgets/simulators/EntryChatPanel.tsx | 25 + .../widgets/simulators/EntryPage.tsx | 83 + .../widgets/simulators/ListDemo.tsx | 166 + .../widgets/simulators/TimelineChatDemo.tsx | 18 + .../components/EntryPageOverlay.tsx | 5 + .../components/SimulatorReaders.tsx | 27 + .../components/ai/AIChainOfThought.tsx | 245 + .../components/ai/AIMarkdownMessage.tsx | 37 + .../components/ai/AIReasoningPart.tsx | 68 + .../components/ai/ToolInvocationComponent.tsx | 87 + .../ai/animated/AnimatedMarkdown.tsx | 182 + .../components/ai/animated/TokenizedText.tsx | 129 + .../components/ai/animated/constants.ts | 4 + .../widgets/simulators/components/ai/mocks.ts | 3 + .../ai/parse-incomplete-markdown.ts | 730 ++ .../components/ai/reasoning-mock.json | 22 + .../components/ai/shiny-text/ShinyText.tsx | 38 + .../components/ai/shiny-text/index.module.css | 37 + .../components/chat/AiMessageContextBar.tsx | 26 + .../components/chat/AiMockMessage.tsx | 148 + .../components/chat/AiUserMessage.tsx | 31 + .../components/chat/ListChatPlayer.tsx | 439 ++ .../components/chat/MarkdownMessage.tsx | 19 + .../simulators/components/chat/stream.ts | 77 + .../components/widgets/simulators/mocks.tsx | 274 + apps/landing/src/constants/download.ts | 23 + apps/landing/src/constants/env.ts | 12 + apps/landing/src/constants/site.ts | 85 + apps/landing/src/constants/spring.ts | 32 + apps/landing/src/hooks/biz/use-github-star.ts | 10 + .../src/hooks/common/use-before-mounted.ts | 10 + .../src/hooks/common/use-click-away.ts | 59 + .../src/hooks/common/use-debounce-value.ts | 17 + .../src/hooks/common/use-event-callback.ts | 8 + .../src/hooks/common/use-input-composition.ts | 98 + .../landing/src/hooks/common/use-is-active.ts | 14 + .../landing/src/hooks/common/use-is-client.ts | 23 + apps/landing/src/hooks/common/use-is-dark.ts | 6 + .../src/hooks/common/use-is-mounted.ts | 10 + .../src/hooks/common/use-is-unmounted.ts | 12 + apps/landing/src/hooks/common/use-previous.ts | 9 + .../landing/src/hooks/common/use-ref-value.ts | 12 + .../src/hooks/common/use-safe-setState.ts | 13 + .../landing/src/hooks/common/use-state-ref.ts | 9 + .../src/hooks/common/use-sync-effect.ts | 15 + apps/landing/src/hooks/common/useMeasure.ts | 236 + .../src/hooks/shared/use-mask-scrollarea.ts | 72 + apps/landing/src/i18n/request.ts | 10 + apps/landing/src/i18n/routing.ts | 13 + apps/landing/src/legal/privacy.md | 115 + apps/landing/src/legal/tos.md | 131 + .../src/lib/apple-app-site-association.ts | 11 + apps/landing/src/lib/cn.ts | 45 + apps/landing/src/lib/color.ts | 182 + apps/landing/src/lib/cookie.ts | 22 + apps/landing/src/lib/datetime.ts | 83 + apps/landing/src/lib/dom.ts | 18 + apps/landing/src/lib/env.ts | 4 + apps/landing/src/lib/fonts.ts | 10 + apps/landing/src/lib/helper.ts | 19 + apps/landing/src/lib/jotai.ts | 41 + apps/landing/src/lib/noop.ts | 5 + apps/landing/src/lib/platform.ts | 13 + apps/landing/src/lib/query-client.server.ts | 11 + apps/landing/src/lib/scroller.ts | 58 + apps/landing/src/lib/sleep.ts | 2 + apps/landing/src/lib/spring.ts | 75 + apps/landing/src/lib/store.ts | 3 + apps/landing/src/messages/en.json | 92 + apps/landing/src/messages/jp.json | 92 + apps/landing/src/messages/zh.json | 92 + apps/landing/src/middleware.ts | 9 + .../src/providers/root/debug-provider.tsx | 20 + .../src/providers/root/event-provider.tsx | 60 + .../src/providers/root/framer-lazy-feature.ts | 1 + apps/landing/src/providers/root/index.tsx | 40 + .../src/providers/root/jotai-provider.tsx | 7 + .../root/page-scroll-info-provider.tsx | 88 + .../providers/root/react-query-provider.tsx | 68 + apps/landing/src/providers/root/sonner.tsx | 41 + .../shared/LayoutRightSideProvider.tsx | 40 + .../shared/WrappedElementProvider.tsx | 136 + apps/landing/src/styles/globals.css | 515 ++ .../landing/src/styles/pastel-theme-oklch.css | 601 ++ apps/landing/tsconfig.json | 35 + apps/landing/wrangler.jsonc | 29 + apps/ssr/package.json | 1 + plugins/eslint/eslint-package-json.js | 5 + pnpm-lock.yaml | 5875 +++++++++++++++-- pnpm-workspace.yaml | 13 + turbo.json | 3 + 236 files changed, 21510 insertions(+), 625 deletions(-) create mode 100644 apps/landing/.prettierrc.mjs create mode 100644 apps/landing/components.json create mode 100644 apps/landing/eslint.config.mjs create mode 100644 apps/landing/global.d.ts create mode 100644 apps/landing/next.config.ts create mode 100644 apps/landing/open-next.config.ts create mode 100644 apps/landing/package.json create mode 100644 apps/landing/plugins/eslint-recursive-sort.mjs create mode 100644 apps/landing/postcss.config.mjs create mode 100644 apps/landing/public/favicon.ico create mode 100644 apps/landing/public/icon-192x192.png create mode 100644 apps/landing/public/icon-512x512.png create mode 100644 apps/landing/public/icon.svg create mode 100644 apps/landing/public/manifest.json create mode 100644 apps/landing/public/og.png create mode 100644 apps/landing/src/actions/github-star.ts create mode 100644 apps/landing/src/app/ClientInit.tsx create mode 100644 apps/landing/src/app/InitInClient.ts create mode 100644 apps/landing/src/app/[locale]/download/page.tsx create mode 100644 apps/landing/src/app/[locale]/error.tsx create mode 100644 apps/landing/src/app/[locale]/layout.tsx create mode 100644 apps/landing/src/app/[locale]/page.tsx create mode 100644 apps/landing/src/app/[locale]/privacy-policy/page.tsx create mode 100644 apps/landing/src/app/[locale]/terms-of-service/page.tsx create mode 100644 apps/landing/src/app/apple-app-site-association/route.ts create mode 100644 apps/landing/src/app/globals.css create mode 100644 apps/landing/src/app/init.ts create mode 100644 apps/landing/src/app/layout.tsx create mode 100644 apps/landing/src/app/robots.ts create mode 100644 apps/landing/src/atoms/css-media.ts create mode 100644 apps/landing/src/atoms/index.ts create mode 100644 apps/landing/src/atoms/is-interactive.ts create mode 100644 apps/landing/src/atoms/viewport.ts create mode 100644 apps/landing/src/components/brand/Folo.tsx create mode 100644 apps/landing/src/components/brand/Logo.tsx create mode 100644 apps/landing/src/components/common/ClientOnly.tsx create mode 100644 apps/landing/src/components/common/ErrorBoundary.tsx create mode 100644 apps/landing/src/components/common/GithubTrending.tsx create mode 100644 apps/landing/src/components/common/HydrationEndDetector.tsx create mode 100644 apps/landing/src/components/common/Lazyload.tsx create mode 100644 apps/landing/src/components/common/LightRays.tsx create mode 100644 apps/landing/src/components/common/ProviderComposer.tsx create mode 100644 apps/landing/src/components/common/QueryHydrate.tsx create mode 100644 apps/landing/src/components/common/ScrollTop.tsx create mode 100644 apps/landing/src/components/hoc/with-no-ssr.tsx create mode 100644 apps/landing/src/components/layout/container/Normal.tsx create mode 100644 apps/landing/src/components/layout/content/Content.tsx create mode 100644 apps/landing/src/components/layout/content/index.ts create mode 100644 apps/landing/src/components/layout/footer/Footer.tsx create mode 100644 apps/landing/src/components/layout/root/Root.tsx create mode 100644 apps/landing/src/components/ui/3d-models/AISpline.ts create mode 100644 apps/landing/src/components/ui/3d-models/AISplineLoader.tsx create mode 100644 apps/landing/src/components/ui/accordion/Accordion.tsx create mode 100644 apps/landing/src/components/ui/border-beam.tsx create mode 100644 apps/landing/src/components/ui/button/Button.tsx create mode 100644 apps/landing/src/components/ui/button/MotionButton.tsx create mode 100644 apps/landing/src/components/ui/button/index.ts create mode 100644 apps/landing/src/components/ui/checkbox/Checkbox.tsx create mode 100644 apps/landing/src/components/ui/checkbox/index.ts create mode 100644 apps/landing/src/components/ui/collapse/CollapseCss.tsx create mode 100644 apps/landing/src/components/ui/collapse/hooks.tsx create mode 100644 apps/landing/src/components/ui/collapse/index.ts create mode 100644 apps/landing/src/components/ui/dialog/Dialog.tsx create mode 100644 apps/landing/src/components/ui/dialog/index.ts create mode 100644 apps/landing/src/components/ui/divider/Divider.tsx create mode 100644 apps/landing/src/components/ui/divider/index.ts create mode 100644 apps/landing/src/components/ui/dropdown-menu/DropdownMenu.tsx create mode 100644 apps/landing/src/components/ui/effects/GridGuides.tsx create mode 100644 apps/landing/src/components/ui/effects/ParticlesAura.tsx create mode 100644 apps/landing/src/components/ui/effects/TiltCard.tsx create mode 100644 apps/landing/src/components/ui/glass/index.tsx create mode 100644 apps/landing/src/components/ui/highlighter.tsx create mode 100644 apps/landing/src/components/ui/hover-card/HoverCard.tsx create mode 100644 apps/landing/src/components/ui/hover-card/index.ts create mode 100644 apps/landing/src/components/ui/input/Input.tsx create mode 100644 apps/landing/src/components/ui/input/TextArea.tsx create mode 100644 apps/landing/src/components/ui/input/index.ts create mode 100644 apps/landing/src/components/ui/json-highlighter/index.tsx create mode 100644 apps/landing/src/components/ui/label/Label.tsx create mode 100644 apps/landing/src/components/ui/light-rays.tsx create mode 100644 apps/landing/src/components/ui/loading/index.tsx create mode 100644 apps/landing/src/components/ui/magic-card.tsx create mode 100644 apps/landing/src/components/ui/markdown/index.tsx create mode 100644 apps/landing/src/components/ui/modal/ModalContainer.tsx create mode 100644 apps/landing/src/components/ui/modal/ModalManager.ts create mode 100644 apps/landing/src/components/ui/modal/hooks.ts create mode 100644 apps/landing/src/components/ui/modal/index.ts create mode 100644 apps/landing/src/components/ui/modal/types.ts create mode 100644 apps/landing/src/components/ui/panel/PanelSplitter.tsx create mode 100644 apps/landing/src/components/ui/portal/index.tsx create mode 100644 apps/landing/src/components/ui/portal/provider.tsx create mode 100644 apps/landing/src/components/ui/prompts/BasePrompt.tsx create mode 100644 apps/landing/src/components/ui/prompts/InputPrompt.tsx create mode 100644 apps/landing/src/components/ui/prompts/Prompt.ts create mode 100644 apps/landing/src/components/ui/prompts/index.ts create mode 100644 apps/landing/src/components/ui/radio/index.tsx create mode 100644 apps/landing/src/components/ui/relative-time/RelativeTime.tsx create mode 100644 apps/landing/src/components/ui/relative-time/index.ts create mode 100644 apps/landing/src/components/ui/scroll-areas/ScrollArea.tsx create mode 100644 apps/landing/src/components/ui/scroll-areas/ctx.ts create mode 100644 apps/landing/src/components/ui/scroll-areas/hooks.ts create mode 100644 apps/landing/src/components/ui/segment-tab/SegmentTab.tsx create mode 100644 apps/landing/src/components/ui/segment-tab/index.ts create mode 100644 apps/landing/src/components/ui/select/ComboboxSelect.tsx create mode 100644 apps/landing/src/components/ui/select/MultiSelect.tsx create mode 100644 apps/landing/src/components/ui/select/Select.tsx create mode 100644 apps/landing/src/components/ui/select/index.ts create mode 100644 apps/landing/src/components/ui/sheet/Sheet.tsx create mode 100644 apps/landing/src/components/ui/sheet/index.ts create mode 100644 apps/landing/src/components/ui/skeleton/Skeleton.tsx create mode 100644 apps/landing/src/components/ui/skeleton/index.ts create mode 100644 apps/landing/src/components/ui/switch/index.tsx create mode 100644 apps/landing/src/components/ui/theme-switcher/ThemeSwitcher.tsx create mode 100644 apps/landing/src/components/ui/theme-switcher/index.ts create mode 100644 apps/landing/src/components/ui/tooltip/index.tsx create mode 100644 apps/landing/src/components/ui/tooltip/styles.ts create mode 100644 apps/landing/src/components/ui/transition/BottomToUpSoftScaleTransitionView.tsx create mode 100644 apps/landing/src/components/ui/transition/BottomToUpTransitionView.tsx create mode 100644 apps/landing/src/components/ui/transition/FadeInOutTransitionView.tsx create mode 100644 apps/landing/src/components/ui/transition/IconTransiton.tsx create mode 100644 apps/landing/src/components/ui/transition/LeftToRightTransitionView.tsx create mode 100644 apps/landing/src/components/ui/transition/RightToLeftTransitionView.tsx create mode 100644 apps/landing/src/components/ui/transition/ScaleTransitionView.tsx create mode 100644 apps/landing/src/components/ui/transition/TextUpTransitionView.tsx create mode 100644 apps/landing/src/components/ui/transition/factor.tsx create mode 100644 apps/landing/src/components/ui/transition/typings.ts create mode 100644 apps/landing/src/components/ui/viewport/OnlyDesktop.tsx create mode 100644 apps/landing/src/components/ui/viewport/OnlyMobile.tsx create mode 100644 apps/landing/src/components/ui/viewport/index.ts create mode 100644 apps/landing/src/components/widgets/download/DownloadHero.tsx create mode 100644 apps/landing/src/components/widgets/download/PlatformDownloads.tsx create mode 100644 apps/landing/src/components/widgets/landing/Audience.tsx create mode 100644 apps/landing/src/components/widgets/landing/BuiltOpen.tsx create mode 100644 apps/landing/src/components/widgets/landing/Features.tsx create mode 100644 apps/landing/src/components/widgets/landing/Header.tsx create mode 100644 apps/landing/src/components/widgets/landing/Hero.tsx create mode 100644 apps/landing/src/components/widgets/landing/PromptDemo.tsx create mode 100644 apps/landing/src/components/widgets/landing/RepoStats.tsx create mode 100644 apps/landing/src/components/widgets/landing/SocialProof.tsx create mode 100644 apps/landing/src/components/widgets/landing/ViewsShowcase.tsx create mode 100644 apps/landing/src/components/widgets/landing/WindowChrome.tsx create mode 100644 apps/landing/src/components/widgets/simulators/EntryChatPanel.tsx create mode 100644 apps/landing/src/components/widgets/simulators/EntryPage.tsx create mode 100644 apps/landing/src/components/widgets/simulators/ListDemo.tsx create mode 100644 apps/landing/src/components/widgets/simulators/TimelineChatDemo.tsx create mode 100644 apps/landing/src/components/widgets/simulators/components/EntryPageOverlay.tsx create mode 100644 apps/landing/src/components/widgets/simulators/components/SimulatorReaders.tsx create mode 100644 apps/landing/src/components/widgets/simulators/components/ai/AIChainOfThought.tsx create mode 100644 apps/landing/src/components/widgets/simulators/components/ai/AIMarkdownMessage.tsx create mode 100644 apps/landing/src/components/widgets/simulators/components/ai/AIReasoningPart.tsx create mode 100644 apps/landing/src/components/widgets/simulators/components/ai/ToolInvocationComponent.tsx create mode 100644 apps/landing/src/components/widgets/simulators/components/ai/animated/AnimatedMarkdown.tsx create mode 100644 apps/landing/src/components/widgets/simulators/components/ai/animated/TokenizedText.tsx create mode 100644 apps/landing/src/components/widgets/simulators/components/ai/animated/constants.ts create mode 100644 apps/landing/src/components/widgets/simulators/components/ai/mocks.ts create mode 100644 apps/landing/src/components/widgets/simulators/components/ai/parse-incomplete-markdown.ts create mode 100644 apps/landing/src/components/widgets/simulators/components/ai/reasoning-mock.json create mode 100644 apps/landing/src/components/widgets/simulators/components/ai/shiny-text/ShinyText.tsx create mode 100644 apps/landing/src/components/widgets/simulators/components/ai/shiny-text/index.module.css create mode 100644 apps/landing/src/components/widgets/simulators/components/chat/AiMessageContextBar.tsx create mode 100644 apps/landing/src/components/widgets/simulators/components/chat/AiMockMessage.tsx create mode 100644 apps/landing/src/components/widgets/simulators/components/chat/AiUserMessage.tsx create mode 100644 apps/landing/src/components/widgets/simulators/components/chat/ListChatPlayer.tsx create mode 100644 apps/landing/src/components/widgets/simulators/components/chat/MarkdownMessage.tsx create mode 100644 apps/landing/src/components/widgets/simulators/components/chat/stream.ts create mode 100644 apps/landing/src/components/widgets/simulators/mocks.tsx create mode 100644 apps/landing/src/constants/download.ts create mode 100644 apps/landing/src/constants/env.ts create mode 100644 apps/landing/src/constants/site.ts create mode 100644 apps/landing/src/constants/spring.ts create mode 100644 apps/landing/src/hooks/biz/use-github-star.ts create mode 100644 apps/landing/src/hooks/common/use-before-mounted.ts create mode 100644 apps/landing/src/hooks/common/use-click-away.ts create mode 100644 apps/landing/src/hooks/common/use-debounce-value.ts create mode 100644 apps/landing/src/hooks/common/use-event-callback.ts create mode 100644 apps/landing/src/hooks/common/use-input-composition.ts create mode 100644 apps/landing/src/hooks/common/use-is-active.ts create mode 100644 apps/landing/src/hooks/common/use-is-client.ts create mode 100644 apps/landing/src/hooks/common/use-is-dark.ts create mode 100644 apps/landing/src/hooks/common/use-is-mounted.ts create mode 100644 apps/landing/src/hooks/common/use-is-unmounted.ts create mode 100644 apps/landing/src/hooks/common/use-previous.ts create mode 100644 apps/landing/src/hooks/common/use-ref-value.ts create mode 100644 apps/landing/src/hooks/common/use-safe-setState.ts create mode 100644 apps/landing/src/hooks/common/use-state-ref.ts create mode 100644 apps/landing/src/hooks/common/use-sync-effect.ts create mode 100644 apps/landing/src/hooks/common/useMeasure.ts create mode 100644 apps/landing/src/hooks/shared/use-mask-scrollarea.ts create mode 100644 apps/landing/src/i18n/request.ts create mode 100644 apps/landing/src/i18n/routing.ts create mode 100644 apps/landing/src/legal/privacy.md create mode 100644 apps/landing/src/legal/tos.md create mode 100644 apps/landing/src/lib/apple-app-site-association.ts create mode 100644 apps/landing/src/lib/cn.ts create mode 100644 apps/landing/src/lib/color.ts create mode 100644 apps/landing/src/lib/cookie.ts create mode 100644 apps/landing/src/lib/datetime.ts create mode 100644 apps/landing/src/lib/dom.ts create mode 100644 apps/landing/src/lib/env.ts create mode 100644 apps/landing/src/lib/fonts.ts create mode 100644 apps/landing/src/lib/helper.ts create mode 100644 apps/landing/src/lib/jotai.ts create mode 100644 apps/landing/src/lib/noop.ts create mode 100644 apps/landing/src/lib/platform.ts create mode 100644 apps/landing/src/lib/query-client.server.ts create mode 100644 apps/landing/src/lib/scroller.ts create mode 100644 apps/landing/src/lib/sleep.ts create mode 100644 apps/landing/src/lib/spring.ts create mode 100644 apps/landing/src/lib/store.ts create mode 100644 apps/landing/src/messages/en.json create mode 100644 apps/landing/src/messages/jp.json create mode 100644 apps/landing/src/messages/zh.json create mode 100644 apps/landing/src/middleware.ts create mode 100644 apps/landing/src/providers/root/debug-provider.tsx create mode 100644 apps/landing/src/providers/root/event-provider.tsx create mode 100644 apps/landing/src/providers/root/framer-lazy-feature.ts create mode 100644 apps/landing/src/providers/root/index.tsx create mode 100644 apps/landing/src/providers/root/jotai-provider.tsx create mode 100644 apps/landing/src/providers/root/page-scroll-info-provider.tsx create mode 100644 apps/landing/src/providers/root/react-query-provider.tsx create mode 100644 apps/landing/src/providers/root/sonner.tsx create mode 100644 apps/landing/src/providers/shared/LayoutRightSideProvider.tsx create mode 100644 apps/landing/src/providers/shared/WrappedElementProvider.tsx create mode 100644 apps/landing/src/styles/globals.css create mode 100644 apps/landing/src/styles/pastel-theme-oklch.css create mode 100644 apps/landing/tsconfig.json create mode 100644 apps/landing/wrangler.jsonc diff --git a/.github/workflows/deploy-cloudflare.yml b/.github/workflows/deploy-cloudflare.yml index aca9c7e24..11f0b6e5b 100644 --- a/.github/workflows/deploy-cloudflare.yml +++ b/.github/workflows/deploy-cloudflare.yml @@ -51,6 +51,9 @@ jobs: - name: Copy WASM file run: cp node_modules/@resvg/resvg-wasm/index_bg.wasm apps/ssr/dist/worker/resvg.wasm + - name: Build Landing Worker + run: pnpm exec turbo run @follow/landing#cf:build + - name: Deploy to Cloudflare (dev) if: github.ref == 'refs/heads/dev' uses: cloudflare/wrangler-action@v3 @@ -60,6 +63,15 @@ jobs: workingDirectory: apps/ssr command: deploy --env dev + - name: Deploy Landing to Cloudflare (dev) + if: github.ref == 'refs/heads/dev' + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + workingDirectory: apps/landing + command: deploy --env dev + - name: Deploy to Cloudflare (prod) if: github.ref == 'refs/heads/main' uses: cloudflare/wrangler-action@v3 @@ -68,3 +80,12 @@ jobs: accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} workingDirectory: apps/ssr command: deploy + + - name: Deploy Landing to Cloudflare (prod) + if: github.ref == 'refs/heads/main' + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + workingDirectory: apps/landing + command: deploy diff --git a/.gitignore b/.gitignore index da495911b..22fb1f8dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ node_modules dist out +.next +.open-next +next-env.d.ts .DS_Store *.log* .env diff --git a/.prettierignore b/.prettierignore index 165674e58..c68d0c0fa 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,6 +1,7 @@ pnpm-lock.yaml CHANGELOG.md +.context apps/external/postcss.config.cjs diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 1abc329f6..734deb27f 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -75,6 +75,7 @@ "pathe": "2.0.3", "react": "19.0.0", "react-dom": "19.0.0", + "tailwindcss": "3.4.17", "tailwindcss-content-visibility": "1.0.2", "tailwindcss-multi": "0.4.6", "tar": "7.5.7", diff --git a/apps/landing/.prettierrc.mjs b/apps/landing/.prettierrc.mjs new file mode 100644 index 000000000..0f454b1f2 --- /dev/null +++ b/apps/landing/.prettierrc.mjs @@ -0,0 +1,5 @@ +import { factory } from '@innei/prettier' + +export default factory({ + importSort: false, +}) diff --git a/apps/landing/components.json b/apps/landing/components.json new file mode 100644 index 000000000..e8253ed9c --- /dev/null +++ b/apps/landing/components.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": false, + "tsx": true, + "tailwind": { + "config": "", + "css": "src/styles/tailwind.css", + "baseColor": "neutral", + "cssVariables": true, + "prefix": "" + }, + "iconLibrary": "lucide", + "aliases": { + "components": "~/components", + "utils": "~/lib/utils", + "ui": "~/components/ui", + "lib": "~/lib", + "hooks": "~/hooks" + }, + "registries": { + "@animate-ui": "https://animate-ui.com/r/{name}.json", + "@magicui": "https://magicui.design/r/{name}.json" + } +} diff --git a/apps/landing/eslint.config.mjs b/apps/landing/eslint.config.mjs new file mode 100644 index 000000000..7b431334b --- /dev/null +++ b/apps/landing/eslint.config.mjs @@ -0,0 +1,80 @@ +// @ts-check +import { defineConfig } from 'eslint-config-hyoban' + +import recursiveSort from './plugins/eslint-recursive-sort.mjs' + +export default defineConfig( + { + formatting: false, + lessOpinionated: true, + ignores: ['dist/**'], + preferESM: false, + }, + { + settings: { + tailwindcss: { + whitelist: ['center'], + }, + }, + rules: { + 'tailwindcss/classnames-order': 'off', + 'tailwindcss/no-custom-classname': 'off', + 'unicorn/prefer-math-trunc': 'off', + 'unicorn/expiring-todo-comments': 0, + '@eslint-react/no-clone-element': 0, + '@eslint-react/hooks-extra/no-direct-set-state-in-use-effect': 0, + // NOTE: Disable this temporarily + 'react-compiler/react-compiler': 0, + 'no-restricted-syntax': 0, + 'package-json/valid-name': 0, + + // disable react compiler rules for now + 'react-hooks/no-unused-directives': 'off', + 'react-hooks/static-components': 'off', + 'react-hooks/use-memo': 'off', + 'react-hooks/component-hook-factories': 'off', + 'react-hooks/preserve-manual-memoization': 'off', + 'react-hooks/immutability': 'off', + 'react-hooks/globals': 'off', + 'react-hooks/refs': 'off', + 'react-hooks/set-state-in-effect': 'off', + 'react-hooks/error-boundaries': 'off', + 'react-hooks/purity': 'off', + 'react-hooks/set-state-in-render': 'off', + 'react-hooks/unsupported-syntax': 'off', + 'react-hooks/config': 'off', + 'react-hooks/gating': 'off', + + 'no-restricted-globals': [ + 'error', + { + name: 'location', + message: + "Since you don't use the same router instance in electron and browser, you can't use the global location to get the route info. \n\n" + + 'You can use `useLocaltion` or `getReadonlyRoute` to get the route info.', + }, + ], + }, + }, + { + files: ['**/*.tsx'], + rules: { + '@stylistic/jsx-self-closing-comp': 'error', + }, + }, + { + files: ['locales/**/*.json'], + plugins: { + 'recursive-sort': recursiveSort, + }, + rules: { + 'recursive-sort/recursive-sort': 'error', + }, + }, + { + files: ['package.json'], + rules: { + 'package-json/valid-name': 0, + }, + }, +) diff --git a/apps/landing/global.d.ts b/apps/landing/global.d.ts new file mode 100644 index 000000000..bc4a25e68 --- /dev/null +++ b/apps/landing/global.d.ts @@ -0,0 +1,42 @@ +/* eslint-disable @typescript-eslint/no-empty-object-type */ +/* eslint-disable @typescript-eslint/method-signature-style */ +import type { FC, PropsWithChildren } from 'react' + +declare global { + export type NextErrorProps = { + reset(): void + error: Error + } + export type NextPageParams
= PropsWithChildren< + { + params: P + } & Props + > + + export type Component
= FC = {
+ className?: string
+ } & PropsWithChildren &
+ P
+
+ // TODO should remove in next TypeScript version
+ interface Document {
+ startViewTransition(callback?: () => void | Promise >s?qubcVe`R-j dx>fsy1w2m1MJENxchcrcpY)!GTZiV`_E(>89lN(rV7)l9ec1a2V4SN8pl1 kQ>(tI(=nh*WfXabcoQ5`OWOb(YrGeuEStWicp2rYn^erP{etJ%&qXvY^(Dt%t*
zT?qeu5bIVXK&5uwO`Xqqvot+sy{#%xz50tnJTcUlu3Ji7Kl=zewEXRV`VX;&zp?RA
zUz@e WOM}q&fj_|vUBhdm0m97w
z$cCqL=bId_P_AYe7QvfXTTMWF^CpzPl<4Z3qS2ltZk>PVs5*jgf*M~4DMJQh==!f^
z8-^M6v
zgnM;mO~h^6hwwim6iss4vzndj3M2`};x%~Nm4wvV0rE;Hcfex?2@>v{7O{R|+&FpH
z6kCgkJm6o8nA0m(FA++Puu6p!6S2ceAGe&2YH~y$+^$6qyr1INohPB*HKHsujEB4!
zj$bUm>(^~du>iAQ!ke5xu@rq^L?3*d&|EhCSj)GX*a6CrOMT+k;o+$ey|5qc?D8O;
z?HAStHq)I`TGczpPEFdG?k#El;8i;4?1z4V0&k1|mIh2f%*3Ivi~0u&8rP#R4Ih?U
zpYgNU&ro6
&^KNBzv~~Z$M`?S6=#lIL8;TZhDy9S5*_Z
z@|G@?Z0lX=u#UrQG0E~Q1yuKpOytMFT~h;oonHn+fC2StvzQ)U$(d}QBuFERY#Zad
zFez(|IuaOu+@k
CaFBL9fp2dJI?P7CtKoX-y?KFUgB5vwtKB^)E}vQjFTw^dh)kf0gMt
z`fQM_qCH|aH92K9AgN_7_~F^{nRhtSk)pdF&<2K|JT3(bXnL>qUw=4FY;e^??_gpf
zDRp>zO3K6`ZJY1o!(SA-SUM%G8p+n>@~&&WN3yj$xBkcpB?766A5cBA@0ZEFb-TdF
z>O${7R5!+BRt6?Om@CS)WX~g}@KW+FL3xS}YHXjYU&U8{O52D3S$zE@$B%?t*!po%
zRT#?&7O<=TpyV#fa-Nr?=4zMxDOQLH@`uNkjPlp%_c3YZLc7&DrB$G)LPEP=^6DOp
z^miY+NdVFV?83={bakgl79RiR+zlLQUVIlu;Zsjs=+|Is$h;Zjfxa8^)3M66-WGcA
z2vqD-QI@4F2)tLVmaRh&J;&=-|LNcN?KZyP^kN17u;l}v<=emb!0eaiX7<`!Y|-?J
zuK6}L{6%LGxQ?I2t2;eb7{M)0u|}fAlUYi)6ZHQCbYQsg&zSjA`vchGRT+4s&miUQ
z7yd)c=ZNwM?cUnRE;lYQIR|?gNoj&KNP3P}TISj8g5uMD3L&Bp@G_(j{gF$2fClp-
zuBmGCAaU&6*33aeUek$*SASHO(l?Fa-CKqcyYE{Q`5Ff8=GA^TE3f=E{@{q1AH6Xi
z7ep<$js-X|qDz1`4ghwmKbv%KPO>2P*E0Mit14bXBC6qVE7aOaGrT>t#90+x^l}mtnzU~`k
zc{X;F>@|=|^~dI4