diff --git a/apps/docs/.eslintrc.js b/apps/docs/.eslintrc.js deleted file mode 100644 index b56159ea9..000000000 --- a/apps/docs/.eslintrc.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - root: true, - extends: ['custom'], -} diff --git a/apps/docs/README.md b/apps/docs/README.md deleted file mode 100644 index 23afa0ea9..000000000 --- a/apps/docs/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Plane Docs - -Source code that powers plane.so/docs \ No newline at end of file diff --git a/apps/docs/jsconfig.json b/apps/docs/jsconfig.json deleted file mode 100644 index 2c8ee2bb0..000000000 --- a/apps/docs/jsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": ".", - "paths": { - "@/*": ["src/*"] - } - } -} diff --git a/apps/docs/mdx/recma.mjs b/apps/docs/mdx/recma.mjs deleted file mode 100644 index 489011603..000000000 --- a/apps/docs/mdx/recma.mjs +++ /dev/null @@ -1,19 +0,0 @@ -import { mdxAnnotations } from 'mdx-annotations' -import recmaNextjsStaticProps from 'recma-nextjs-static-props' - -function recmaRemoveNamedExports() { - return (tree) => { - tree.body = tree.body.map((node) => { - if (node.type === 'ExportNamedDeclaration') { - return node.declaration - } - return node - }) - } -} - -export const recmaPlugins = [ - mdxAnnotations.recma, - recmaRemoveNamedExports, - recmaNextjsStaticProps, -] diff --git a/apps/docs/mdx/rehype.mjs b/apps/docs/mdx/rehype.mjs deleted file mode 100644 index d13c65aaa..000000000 --- a/apps/docs/mdx/rehype.mjs +++ /dev/null @@ -1,126 +0,0 @@ -import { mdxAnnotations } from 'mdx-annotations' -import { visit } from 'unist-util-visit' -import rehypeMdxTitle from 'rehype-mdx-title' -import shiki from 'shiki' -import { toString } from 'mdast-util-to-string' -import * as acorn from 'acorn' -import { slugifyWithCounter } from '@sindresorhus/slugify' - -function rehypeParseCodeBlocks() { - return (tree) => { - visit(tree, 'element', (node, _nodeIndex, parentNode) => { - if (node.tagName === 'code' && node.properties.className) { - parentNode.properties.language = node.properties.className[0]?.replace( - /^language-/, - '' - ) - } - }) - } -} - -let highlighter - -function rehypeShiki() { - return async (tree) => { - highlighter = - highlighter ?? (await shiki.getHighlighter({ theme: 'css-variables' })) - - visit(tree, 'element', (node) => { - if (node.tagName === 'pre' && node.children[0]?.tagName === 'code') { - let codeNode = node.children[0] - let textNode = codeNode.children[0] - - node.properties.code = textNode.value - - if (node.properties.language) { - let tokens = highlighter.codeToThemedTokens( - textNode.value, - node.properties.language - ) - - textNode.value = shiki.renderToHtml(tokens, { - elements: { - pre: ({ children }) => children, - code: ({ children }) => children, - line: ({ children }) => `${children}`, - }, - }) - } - } - }) - } -} - -function rehypeSlugify() { - return (tree) => { - let slugify = slugifyWithCounter() - visit(tree, 'element', (node) => { - if (node.tagName === 'h2' && !node.properties.id) { - node.properties.id = slugify(toString(node)) - } - }) - } -} - -function rehypeAddMDXExports(getExports) { - return (tree) => { - let exports = Object.entries(getExports(tree)) - - for (let [name, value] of exports) { - for (let node of tree.children) { - if ( - node.type === 'mdxjsEsm' && - new RegExp(`export\\s+const\\s+${name}\\s*=`).test(node.value) - ) { - return - } - } - - let exportStr = `export const ${name} = ${value}` - - tree.children.push({ - type: 'mdxjsEsm', - value: exportStr, - data: { - estree: acorn.parse(exportStr, { - sourceType: 'module', - ecmaVersion: 'latest', - }), - }, - }) - } - } -} - -function getSections(node) { - let sections = [] - - for (let child of node.children ?? []) { - if (child.type === 'element' && child.tagName === 'h2') { - sections.push(`{ - title: ${JSON.stringify(toString(child))}, - id: ${JSON.stringify(child.properties.id)}, - ...${child.properties.annotation} - }`) - } else if (child.children) { - sections.push(...getSections(child)) - } - } - - return sections -} - -export const rehypePlugins = [ - mdxAnnotations.rehype, - rehypeParseCodeBlocks, - rehypeShiki, - rehypeSlugify, - rehypeMdxTitle, - [ - rehypeAddMDXExports, - (tree) => ({ - sections: `[${getSections(tree).join()}]`, - }), - ], -] diff --git a/apps/docs/mdx/remark.mjs b/apps/docs/mdx/remark.mjs deleted file mode 100644 index f5c0500bc..000000000 --- a/apps/docs/mdx/remark.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import { mdxAnnotations } from 'mdx-annotations' - -export const remarkPlugins = [mdxAnnotations.remark] diff --git a/apps/docs/next.config.mjs b/apps/docs/next.config.mjs deleted file mode 100644 index 3fda9ef1e..000000000 --- a/apps/docs/next.config.mjs +++ /dev/null @@ -1,23 +0,0 @@ -import nextMDX from '@next/mdx' -import { remarkPlugins } from './mdx/remark.mjs' -import { rehypePlugins } from './mdx/rehype.mjs' -import { recmaPlugins } from './mdx/recma.mjs' - -const withMDX = nextMDX({ - options: { - remarkPlugins, - rehypePlugins, - recmaPlugins, - }, -}) - -/** @type {import('next').NextConfig} */ -const nextConfig = { - reactStrictMode: true, - pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'mdx'], - experimental: { - scrollRestoration: true, - }, -} - -export default withMDX(nextConfig) diff --git a/apps/docs/package.json b/apps/docs/package.json deleted file mode 100644 index bb7d213de..000000000 --- a/apps/docs/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "docs", - "version": "0.1.0", - "private": true, - "scripts": { - "dev": "next dev --port 3002", - "build": "next build", - "start": "next start", - "lint": "next lint" - }, - "browserslist": "defaults, not ie <= 11", - "dependencies": { - "@algolia/autocomplete-core": "^1.7.3", - "@algolia/autocomplete-preset-algolia": "^1.7.3", - "@headlessui/react": "^1.7.7", - "@mdx-js/loader": "^2.1.5", - "@mdx-js/react": "^2.1.5", - "@next/mdx": "^13.0.3", - "@sindresorhus/slugify": "^2.1.1", - "@tailwindcss/typography": "^0.5.8", - "acorn": "^8.8.1", - "algoliasearch": "^4.14.2", - "autoprefixer": "^10.4.7", - "clsx": "^1.2.0", - "focus-visible": "^5.2.0", - "framer-motion": "7.8.1", - "mdast-util-to-string": "^3.1.0", - "mdx-annotations": "^0.1.1", - "next": "13.0.2", - "postcss-focus-visible": "^6.0.4", - "react": "18.2.0", - "react-dom": "18.2.0", - "recma-nextjs-static-props": "^1.0.0", - "rehype-mdx-title": "^2.0.0", - "shiki": "^0.11.1", - "tailwindcss": "^3.2.4", - "unist-util-visit": "^4.1.1", - "zustand": "^4.1.4" - }, - "devDependencies": { - "@typescript-eslint/eslint-plugin": "^5.51.0", - "eslint": "8.26.0", - "eslint-config-next": "13.0.2", - "prettier": "^2.7.1", - "prettier-plugin-tailwindcss": "^0.1.13" - } -} diff --git a/apps/docs/postcss.config.js b/apps/docs/postcss.config.js deleted file mode 100644 index 6573c2532..000000000 --- a/apps/docs/postcss.config.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: {}, - 'postcss-focus-visible': { - replaceWith: '[data-focus-visible-added]', - }, - autoprefixer: {}, - }, -} diff --git a/apps/docs/prettier.config.js b/apps/docs/prettier.config.js deleted file mode 100644 index 35bb2b2a6..000000000 --- a/apps/docs/prettier.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - singleQuote: true, - semi: false, - plugins: [require('prettier-plugin-tailwindcss')], -} diff --git a/apps/docs/public/favicon.ico b/apps/docs/public/favicon.ico deleted file mode 100644 index 56366837a..000000000 Binary files a/apps/docs/public/favicon.ico and /dev/null differ diff --git a/apps/docs/src/components/Button.jsx b/apps/docs/src/components/Button.jsx deleted file mode 100644 index c311f91e8..000000000 --- a/apps/docs/src/components/Button.jsx +++ /dev/null @@ -1,62 +0,0 @@ -import Link from 'next/link' -import clsx from 'clsx' - -function ArrowIcon(props) { - return ( - - ) -} - -const variantStyles = { - primary: - 'rounded-full bg-zinc-900 py-1 px-3 text-white hover:bg-zinc-700 dark:bg-blue-400/10 dark:text-blue-400 dark:ring-1 dark:ring-inset dark:ring-blue-400/20 dark:hover:bg-blue-400/10 dark:hover:text-blue-300 dark:hover:ring-blue-300', - secondary: - 'rounded-full bg-zinc-100 py-1 px-3 text-zinc-900 hover:bg-zinc-200 dark:bg-zinc-800/40 dark:text-zinc-400 dark:ring-1 dark:ring-inset dark:ring-zinc-800 dark:hover:bg-zinc-800 dark:hover:text-zinc-300', - filled: - 'rounded-full bg-zinc-900 py-1 px-3 text-white hover:bg-zinc-700 dark:bg-blue-500 dark:text-white dark:hover:bg-blue-400', - outline: - 'rounded-full py-1 px-3 text-zinc-700 ring-1 ring-inset ring-zinc-900/10 hover:bg-zinc-900/2.5 hover:text-zinc-900 dark:text-zinc-400 dark:ring-white/10 dark:hover:bg-white/5 dark:hover:text-white', - text: 'text-blue-500 hover:text-blue-600 dark:text-blue-400 dark:hover:text-blue-500', -} - -export function Button({ - variant = 'primary', - className, - children, - arrow, - ...props -}) { - const Component = props.href ? Link : 'button' - - className = clsx( - 'inline-flex gap-0.5 justify-center overflow-hidden text-sm font-medium transition', - variantStyles[variant], - className - ) - - const arrowIcon = ( - - ) - - return ( - - {arrow === 'left' && arrowIcon} - {children} - {arrow === 'right' && arrowIcon} - - ) -} diff --git a/apps/docs/src/components/Code.jsx b/apps/docs/src/components/Code.jsx deleted file mode 100644 index ad2b1aa36..000000000 --- a/apps/docs/src/components/Code.jsx +++ /dev/null @@ -1,301 +0,0 @@ -import { - Children, - createContext, - useContext, - useEffect, - useRef, - useState, -} from 'react' -import { Tab } from '@headlessui/react' -import clsx from 'clsx' -import create from 'zustand' - -import { Tag } from '@/components/Tag' - -const languageNames = { - js: 'JavaScript', - ts: 'TypeScript', - javascript: 'JavaScript', - typescript: 'TypeScript', - php: 'PHP', - python: 'Python', - ruby: 'Ruby', - go: 'Go', -} - -function getPanelTitle({ title, language }) { - return title ?? languageNames[language] ?? 'Code' -} - -function ClipboardIcon(props) { - return ( - - ) -} - -function CopyButton({ code }) { - const [copyCount, setCopyCount] = useState(0) - const copied = copyCount > 0 - - useEffect(() => { - if (copyCount > 0) { - const timeout = setTimeout(() => setCopyCount(0), 1000) - return () => { - clearTimeout(timeout) - } - } - }, [copyCount]) - - return ( - - ) -} - -function CodePanelHeader({ tag, label }) { - if (!tag && !label) { - return null - } - - return ( -
- {tag && ( -
- {tag} -
- )} - {tag && label && ( - - )} - {label && ( - {label} - )} -
- ) -} - -function CodePanel({ tag, label, code, children }) { - const child = Children.only(children) - - return ( -
- -
-
{children}
- -
-
- ) -} - -function CodeGroupHeader({ title, children, selectedIndex }) { - const hasTabs = Children.count(children) > 1 - - if (!title && !hasTabs) { - return null - } - - return ( -
- {title && ( -

- {title} -

- )} - {hasTabs && ( - - {Children.map(children, (child, childIndex) => ( - - {getPanelTitle(child.props)} - - ))} - - )} -
- ) -} - -function CodeGroupPanels({ children, ...props }) { - const hasTabs = Children.count(children) > 1 - - if (hasTabs) { - return ( - - {Children.map(children, (child) => ( - - {child} - - ))} - - ) - } - - return {children} -} - -function usePreventLayoutShift() { - const positionRef = useRef() - const rafRef = useRef() - - useEffect( - () => () => { - window.cancelAnimationFrame(rafRef.current) - }, - [] - ) - - return { - positionRef, - preventLayoutShift(callback) { - const initialTop = positionRef.current.getBoundingClientRect().top - - callback() - - rafRef.current = window.requestAnimationFrame(() => { - const newTop = positionRef.current.getBoundingClientRect().top - window.scrollBy(0, newTop - initialTop) - }) - }, - } -} - -const usePreferredLanguageStore = create((set) => ({ - preferredLanguages: [], - addPreferredLanguage: (language) => - set((state) => ({ - preferredLanguages: [ - ...state.preferredLanguages.filter( - (preferredLanguage) => preferredLanguage !== language - ), - language, - ], - })), -})) - -function useTabGroupProps(availableLanguages) { - const { preferredLanguages, addPreferredLanguage } = - usePreferredLanguageStore() - const [selectedIndex, setSelectedIndex] = useState(0) - const activeLanguage = [...availableLanguages].sort( - (a, z) => preferredLanguages.indexOf(z) - preferredLanguages.indexOf(a) - )[0] - const languageIndex = availableLanguages.indexOf(activeLanguage) - const newSelectedIndex = languageIndex === -1 ? selectedIndex : languageIndex - if (newSelectedIndex !== selectedIndex) { - setSelectedIndex(newSelectedIndex) - } - - const { positionRef, preventLayoutShift } = usePreventLayoutShift() - - return { - as: 'div', - ref: positionRef, - selectedIndex, - onChange: (newSelectedIndex) => { - preventLayoutShift(() => - addPreferredLanguage(availableLanguages[newSelectedIndex]) - ) - }, - } -} - -const CodeGroupContext = createContext(false) - -export function CodeGroup({ children, title, ...props }) { - const languages = Children.map(children, (child) => - getPanelTitle(child.props) - ) - const tabGroupProps = useTabGroupProps(languages) - const hasTabs = Children.count(children) > 1 - const Container = hasTabs ? Tab.Group : 'div' - const containerProps = hasTabs ? tabGroupProps : {} - const headerProps = hasTabs - ? { selectedIndex: tabGroupProps.selectedIndex } - : {} - - return ( - - - - {children} - - {children} - - - ) -} - -export function Code({ children, ...props }) { - const isGrouped = useContext(CodeGroupContext) - - if (isGrouped) { - return - } - - return {children} -} - -export function Pre({ children, ...props }) { - const isGrouped = useContext(CodeGroupContext) - - if (isGrouped) { - return children - } - - return {children} -} diff --git a/apps/docs/src/components/Footer.jsx b/apps/docs/src/components/Footer.jsx deleted file mode 100644 index 339150cf5..000000000 --- a/apps/docs/src/components/Footer.jsx +++ /dev/null @@ -1,231 +0,0 @@ -import { forwardRef, Fragment, useState } from 'react' -import Link from 'next/link' -import { useRouter } from 'next/router' -import { Transition } from '@headlessui/react' - -import { Button } from '@/components/Button' -import { navigation } from '@/components/Navigation' - -function CheckIcon(props) { - return ( - - ) -} - -function FeedbackButton(props) { - return ( - - - {page.title} - - - ) -} - -function PageNavigation() { - const router = useRouter() - const allPages = navigation.flatMap((group) => group.links) - const currentPageIndex = allPages.findIndex( - (page) => page.href === router.pathname - ) - - if (currentPageIndex === -1) { - return null - } - - const previousPage = allPages[currentPageIndex - 1] - const nextPage = allPages[currentPageIndex + 1] - - if (!previousPage && !nextPage) { - return null - } - - return ( -
- {previousPage && ( -
- -
- )} - {nextPage && ( -
- -
- )} -
- ) -} - -function TwitterIcon(props) { - return ( - - ) -} - -function GitHubIcon(props) { - return ( - - ) -} - -function DiscordIcon(props) { - return ( - - ) -} - -function SocialLink({ href, icon: Icon, children }) { - return ( - - {children} - - - ) -} - -function SmallPrint() { - return ( -
-

- © Copyrights Plane {new Date().getFullYear()}. All rights reserved. -

-
- - Follow us on Twitter - - - Follow us on GitHub - - - Join our Discord server - -
-
- ) -} - -export function Footer() { - const router = useRouter() - - return ( -
- - - -
- ) -} diff --git a/apps/docs/src/components/GridPattern.jsx b/apps/docs/src/components/GridPattern.jsx deleted file mode 100644 index daf63bc36..000000000 --- a/apps/docs/src/components/GridPattern.jsx +++ /dev/null @@ -1,42 +0,0 @@ -import { useId } from 'react' - -export function GridPattern({ width, height, x, y, squares, ...props }) { - const patternId = useId() - - return ( - - ) -} diff --git a/apps/docs/src/components/Guides.jsx b/apps/docs/src/components/Guides.jsx deleted file mode 100644 index 395003903..000000000 --- a/apps/docs/src/components/Guides.jsx +++ /dev/null @@ -1,54 +0,0 @@ -import { Button } from '@/components/Button' -import { Heading } from '@/components/Heading' - -const guides = [ - { - href: '/authentication', - name: 'Authentication', - description: 'Learn how to authenticate your API requests.', - }, - { - href: '/pagination', - name: 'Pagination', - description: 'Understand how to work with paginated responses.', - }, - { - href: '/errors', - name: 'Errors', - description: - 'Read about the different types of errors returned by the API.', - }, - { - href: '/webhooks', - name: 'Webhooks', - description: - 'Learn how to programmatically configure webhooks for your app.', - }, -] - -export function Guides() { - return ( -
- - Guides - -
- {guides.map((guide) => ( -
-

- {guide.name} -

-

- {guide.description} -

-

- -

-
- ))} -
-
- ) -} diff --git a/apps/docs/src/components/Header.jsx b/apps/docs/src/components/Header.jsx deleted file mode 100644 index b0318b8e9..000000000 --- a/apps/docs/src/components/Header.jsx +++ /dev/null @@ -1,93 +0,0 @@ -import { forwardRef } from 'react' -import Link from 'next/link' -import clsx from 'clsx' -import { motion, useScroll, useTransform } from 'framer-motion' - -import { Button } from '@/components/Button' -import { Logo } from '@/components/Logo' -import { - MobileNavigation, - useIsInsideMobileNavigation, - useMobileNavigationStore, -} from '@/components/MobileNavigation' -import { ModeToggle } from '@/components/ModeToggle' -import { MobileSearch, Search } from '@/components/Search' - -function TopLevelNavItem({ href, children }) { - return ( -
  • - - {children} - -
  • - ) -} - -export const Header = forwardRef(function Header({ className }, ref) { - const { isOpen: mobileNavIsOpen } = useMobileNavigationStore() - const isInsideMobileNavigation = useIsInsideMobileNavigation() - - const { scrollY } = useScroll() - const bgOpacityLight = useTransform(scrollY, [0, 72], [0.5, 0.9]) - const bgOpacityDark = useTransform(scrollY, [0, 72], [0.2, 0.8]) - - return ( - -
    - -
    - - - - -
    -
    - -
    -
    - - -
    -
    - -
    -
    - - ) -}) diff --git a/apps/docs/src/components/Heading.jsx b/apps/docs/src/components/Heading.jsx deleted file mode 100644 index a358cd1cc..000000000 --- a/apps/docs/src/components/Heading.jsx +++ /dev/null @@ -1,102 +0,0 @@ -import { useEffect, useRef } from 'react' -import Link from 'next/link' -import { useInView } from 'framer-motion' - -import { useSectionStore } from '@/components/SectionProvider' -import { Tag } from '@/components/Tag' -import { remToPx } from '@/lib/remToPx' - -function AnchorIcon(props) { - return ( - - ) -} - -function Eyebrow({ tag, label }) { - if (!tag && !label) { - return null - } - - return ( -
    - {tag && {tag}} - {tag && label && ( - - )} - {label && ( - {label} - )} -
    - ) -} - -function Anchor({ id, inView, children }) { - return ( - - {inView && ( -
    -
    - -
    -
    - )} - {children} - - ) -} - -export function Heading({ - level = 2, - children, - id, - tag, - label, - anchor = true, - ...props -}) { - const Component = `h${level}` - const ref = useRef() - const registerHeading = useSectionStore((s) => s.registerHeading) - - const inView = useInView(ref, { - margin: `${remToPx(-3.5)}px 0px 0px 0px`, - amount: 'all', - }) - - useEffect(() => { - if (level === 2) { - registerHeading({ id, ref, offsetRem: tag || label ? 8 : 6 }) - } - }) - - return ( - <> - - - {anchor ? ( - - {children} - - ) : ( - children - )} - - - ) -} diff --git a/apps/docs/src/components/HeroPattern.jsx b/apps/docs/src/components/HeroPattern.jsx deleted file mode 100644 index 857895802..000000000 --- a/apps/docs/src/components/HeroPattern.jsx +++ /dev/null @@ -1,32 +0,0 @@ -import { GridPattern } from '@/components/GridPattern' - -export function HeroPattern() { - return ( -
    -
    -
    - -
    - -
    -
    - ) -} diff --git a/apps/docs/src/components/Layout.jsx b/apps/docs/src/components/Layout.jsx deleted file mode 100644 index 6b8cc2b50..000000000 --- a/apps/docs/src/components/Layout.jsx +++ /dev/null @@ -1,36 +0,0 @@ -import Link from 'next/link' -import { motion } from 'framer-motion' - -import { Footer } from '@/components/Footer' -import { Header } from '@/components/Header' -import { Logo } from '@/components/Logo' -import { Navigation } from '@/components/Navigation' -import { Prose } from '@/components/Prose' -import { SectionProvider } from '@/components/SectionProvider' - -export function Layout({ children, sections = [] }) { - return ( - -
    - -
    - - - -
    -
    - - -
    -
    - {children} -
    -
    -
    -
    -
    - ) -} diff --git a/apps/docs/src/components/Libraries.jsx b/apps/docs/src/components/Libraries.jsx deleted file mode 100644 index c3b452c66..000000000 --- a/apps/docs/src/components/Libraries.jsx +++ /dev/null @@ -1,82 +0,0 @@ -import Image from 'next/image' - -import { Button } from '@/components/Button' -import { Heading } from '@/components/Heading' -import logoGo from '@/images/logos/go.svg' -import logoNode from '@/images/logos/node.svg' -import logoPhp from '@/images/logos/php.svg' -import logoPython from '@/images/logos/python.svg' -import logoRuby from '@/images/logos/ruby.svg' - -const libraries = [ - { - href: '#', - name: 'PHP', - description: - 'A popular general-purpose scripting language that is especially suited to web development.', - logo: logoPhp, - }, - { - href: '#', - name: 'Ruby', - description: - 'A dynamic, open source programming language with a focus on simplicity and productivity.', - logo: logoRuby, - }, - { - href: '#', - name: 'Node.js', - description: - 'Node.js® is an open-source, cross-platform JavaScript runtime environment.', - logo: logoNode, - }, - { - href: '#', - name: 'Python', - description: - 'Python is a programming language that lets you work quickly and integrate systems more effectively.', - logo: logoPython, - }, - { - href: '#', - name: 'Go', - description: - 'An open-source programming language supported by Google with built-in concurrency.', - logo: logoGo, - }, -] - -export function Libraries() { - return ( -
    - - Official libraries - -
    - {libraries.map((library) => ( -
    -
    -

    - {library.name} -

    -

    - {library.description} -

    -

    - -

    -
    - -
    - ))} -
    -
    - ) -} diff --git a/apps/docs/src/components/Logo.jsx b/apps/docs/src/components/Logo.jsx deleted file mode 100644 index a3a72d6c2..000000000 --- a/apps/docs/src/components/Logo.jsx +++ /dev/null @@ -1,10 +0,0 @@ -export function Logo() { - return ( - Plane - ) -} diff --git a/apps/docs/src/components/MobileNavigation.jsx b/apps/docs/src/components/MobileNavigation.jsx deleted file mode 100644 index a6d363077..000000000 --- a/apps/docs/src/components/MobileNavigation.jsx +++ /dev/null @@ -1,115 +0,0 @@ -import { createContext, Fragment, useContext } from 'react' -import { Dialog, Transition } from '@headlessui/react' -import { motion } from 'framer-motion' -import create from 'zustand' - -import { Header } from '@/components/Header' -import { Navigation } from '@/components/Navigation' - -function MenuIcon(props) { - return ( - - ) -} - -function XIcon(props) { - return ( - - ) -} - -const IsInsideMobileNavigationContext = createContext(false) - -export function useIsInsideMobileNavigation() { - return useContext(IsInsideMobileNavigationContext) -} - -export const useMobileNavigationStore = create((set) => ({ - isOpen: false, - open: () => set({ isOpen: true }), - close: () => set({ isOpen: false }), - toggle: () => set((state) => ({ isOpen: !state.isOpen })), -})) - -export function MobileNavigation() { - const isInsideMobileNavigation = useIsInsideMobileNavigation() - const { isOpen, toggle, close } = useMobileNavigationStore() - const ToggleIcon = isOpen ? XIcon : MenuIcon - - return ( - - - {!isInsideMobileNavigation && ( - - - -
    - - - - -
    - - - - - - - - -
    -
    - )} -
    - ) -} diff --git a/apps/docs/src/components/ModeToggle.jsx b/apps/docs/src/components/ModeToggle.jsx deleted file mode 100644 index de66f85e1..000000000 --- a/apps/docs/src/components/ModeToggle.jsx +++ /dev/null @@ -1,54 +0,0 @@ -function SunIcon(props) { - return ( - - ) -} - -function MoonIcon(props) { - return ( - - ) -} - -export function ModeToggle() { - function disableTransitionsTemporarily() { - document.documentElement.classList.add('[&_*]:!transition-none') - window.setTimeout(() => { - document.documentElement.classList.remove('[&_*]:!transition-none') - }, 0) - } - - function toggleMode() { - disableTransitionsTemporarily() - - const darkModeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)') - const isSystemDarkMode = darkModeMediaQuery.matches - const isDarkMode = document.documentElement.classList.toggle('dark') - - if (isDarkMode === isSystemDarkMode) { - delete window.localStorage.isDarkMode - } else { - window.localStorage.isDarkMode = isDarkMode - } - } - - return ( - - ) -} diff --git a/apps/docs/src/components/Navigation.jsx b/apps/docs/src/components/Navigation.jsx deleted file mode 100644 index 4537a8cb8..000000000 --- a/apps/docs/src/components/Navigation.jsx +++ /dev/null @@ -1,233 +0,0 @@ -import { useRef } from 'react' -import Link from 'next/link' -import { useRouter } from 'next/router' -import clsx from 'clsx' -import { AnimatePresence, motion, useIsPresent } from 'framer-motion' - -import { Button } from '@/components/Button' -import { useIsInsideMobileNavigation } from '@/components/MobileNavigation' -import { useSectionStore } from '@/components/SectionProvider' -import { Tag } from '@/components/Tag' -import { remToPx } from '@/lib/remToPx' - -function useInitialValue(value, condition = true) { - const initialValue = useRef(value).current - return condition ? initialValue : value -} - -function TopLevelNavItem({ href, children }) { - return ( -
  • - - {children} - -
  • - ) -} - -function NavLink({ href, tag, active, isAnchorLink = false, children }) { - return ( - - {children} - {tag && ( - - {tag} - - )} - - ) -} - -function VisibleSectionHighlight({ group, pathname }) { - const [sections, visibleSections] = useInitialValue( - [ - useSectionStore((s) => s.sections), - useSectionStore((s) => s.visibleSections), - ], - useIsInsideMobileNavigation() - ) - - const isPresent = useIsPresent() - const firstVisibleSectionIndex = Math.max( - 0, - [{ id: '_top' }, ...sections].findIndex( - (section) => section.id === visibleSections[0] - ) - ) - const itemHeight = remToPx(2) - const height = isPresent - ? Math.max(1, visibleSections.length) * itemHeight - : itemHeight - const top = - group.links.findIndex((link) => link.href === pathname) * itemHeight + - firstVisibleSectionIndex * itemHeight - - return ( - - ) -} - -function ActivePageMarker({ group, pathname }) { - const itemHeight = remToPx(2) - const offset = remToPx(0.25) - const activePageIndex = group.links.findIndex( - (link) => link.href === pathname - ) - const top = offset + activePageIndex * itemHeight - - return ( - - ) -} - -function NavigationGroup({ group, className }) { - // If this is the mobile navigation then we always render the initial - // state, so that the state does not change during the close animation. - // The state will still update when we re-open (re-render) the navigation. - const isInsideMobileNavigation = useIsInsideMobileNavigation() - const [router, sections] = useInitialValue( - [useRouter(), useSectionStore((s) => s.sections)], - isInsideMobileNavigation - ) - - const isActiveGroup = - group.links.findIndex((link) => link.href === router.pathname) !== -1 - - return ( -
  • - - {group.title} - -
    - - {isActiveGroup && ( - - )} - - - - {isActiveGroup && ( - - )} - -
      - {group.links.map((link) => ( - - - {link.title} - - - {link.href === router.pathname && sections.length > 0 && ( - - {sections.map((section) => ( -
    • - - {section.title} - -
    • - ))} -
      - )} -
      -
      - ))} -
    -
    -
  • - ) -} - -export const navigation = [ - { - title: 'Guides', - links: [ - { title: 'Introduction', href: '/' }, - { title: 'Quick Start', href: '/quick-start' }, - { title: 'Self Hosting', href: '/self-hosting' }, - { title: 'Architecture', href: '/architecture' }, - ], - }, - { - title: 'Plane App', - links: [ - { title: 'Workspace', href: '/workspace' }, - { title: 'Project', href: '/projects' }, - { title: 'Issues', href: '/issues' }, - { title: 'Cycles', href: '/cycles' }, - { title: 'Modules', href: '/modules' }, - { title: 'Integrations', href: '/integrations' }, - ], - }, -] - -export function Navigation(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/Prose.jsx b/apps/docs/src/components/Prose.jsx deleted file mode 100644 index 9fff2b391..000000000 --- a/apps/docs/src/components/Prose.jsx +++ /dev/null @@ -1,10 +0,0 @@ -import clsx from 'clsx' - -export function Prose({ as: Component = 'div', className, ...props }) { - return ( - - ) -} diff --git a/apps/docs/src/components/Resources.jsx b/apps/docs/src/components/Resources.jsx deleted file mode 100644 index 2daffa825..000000000 --- a/apps/docs/src/components/Resources.jsx +++ /dev/null @@ -1,155 +0,0 @@ -import Link from 'next/link' -import { motion, useMotionTemplate, useMotionValue } from 'framer-motion' - -import { GridPattern } from '@/components/GridPattern' -import { Heading } from '@/components/Heading' -import { ChatBubbleIcon } from '@/components/icons/ChatBubbleIcon' -import { EnvelopeIcon } from '@/components/icons/EnvelopeIcon' -import { UserIcon } from '@/components/icons/UserIcon' -import { UsersIcon } from '@/components/icons/UsersIcon' - -const resources = [ - { - href: '/quick-start', - name: 'Quick Start', - description: - 'Learn how to use Plane and follow the best practices of taking-off.', - icon: UserIcon, - pattern: { - y: 16, - squares: [ - [0, 1], - [1, 3], - ], - }, - }, - { - href: '/self-hosting', - name: 'Self-host Plane', - description: 'Run Plane on your computer or development machine.', - icon: ChatBubbleIcon, - pattern: { - y: -6, - squares: [ - [-1, 2], - [1, 3], - ], - }, - }, - { - href: '/plane-basics', - name: 'Plane Basics', - description: - 'Learn about Plane basic features and kickstart your workspace', - icon: EnvelopeIcon, - pattern: { - y: 32, - squares: [ - [0, 2], - [1, 4], - ], - }, - }, - { - href: 'https://discord.com/invite/A92xrEGCge', - name: 'Community', - description: 'Hang out with truly exceptional devs & designers on Discord.', - icon: UsersIcon, - pattern: { - y: 22, - squares: [[0, 1]], - }, - }, -] - -function ResourceIcon({ icon: Icon }) { - return ( -
    - -
    - ) -} - -function ResourcePattern({ mouseX, mouseY, ...gridProps }) { - const maskImage = useMotionTemplate`radial-gradient(180px at ${mouseX}px ${mouseY}px, white, transparent)` - const style = { maskImage, WebkitMaskImage: maskImage } - - return ( -
    -
    - -
    - - - - -
    - ) -} - -function Resource({ resource }) { - const mouseX = useMotionValue(0) - const mouseY = useMotionValue(0) - - function onMouseMove({ currentTarget, clientX, clientY }) { - const { left, top } = currentTarget.getBoundingClientRect() - mouseX.set(clientX - left) - mouseY.set(clientY - top) - } - - return ( -
    - -
    -
    - -

    - - - {resource.name} - -

    -

    - {resource.description} -

    -
    -
    - ) -} - -export function Resources() { - return ( -
    - - Resources - -
    - {resources.map((resource) => ( - - ))} -
    -
    - ) -} diff --git a/apps/docs/src/components/Search.jsx b/apps/docs/src/components/Search.jsx deleted file mode 100644 index 3b63d8a4d..000000000 --- a/apps/docs/src/components/Search.jsx +++ /dev/null @@ -1,515 +0,0 @@ -import { forwardRef, Fragment, useEffect, useId, useRef, useState } from 'react' -import { useRouter } from 'next/router' -import { createAutocomplete } from '@algolia/autocomplete-core' -import { getAlgoliaResults } from '@algolia/autocomplete-preset-algolia' -import { Dialog, Transition } from '@headlessui/react' -import algoliasearch from 'algoliasearch/lite' -import clsx from 'clsx' - -const searchClient = algoliasearch( - process.env.NEXT_PUBLIC_DOCSEARCH_APP_ID, - process.env.NEXT_PUBLIC_DOCSEARCH_API_KEY -) - -function useAutocomplete() { - const id = useId() - const router = useRouter() - const [autocompleteState, setAutocompleteState] = useState({}) - - const [autocomplete] = useState(() => - createAutocomplete({ - id, - placeholder: 'Find something...', - defaultActiveItemId: 0, - onStateChange({ state }) { - setAutocompleteState(state) - }, - shouldPanelOpen({ state }) { - return state.query !== '' - }, - navigator: { - navigate({ itemUrl }) { - autocomplete.setIsOpen(true) - router.push(itemUrl) - }, - }, - getSources() { - return [ - { - sourceId: 'documentation', - getItemInputValue({ item }) { - return item.query - }, - getItemUrl({ item }) { - const url = new URL(item.url) - return `${url.pathname}${url.hash}` - }, - onSelect({ itemUrl }) { - router.push(itemUrl) - }, - getItems({ query }) { - return getAlgoliaResults({ - searchClient, - queries: [ - { - query, - indexName: process.env.NEXT_PUBLIC_DOCSEARCH_INDEX_NAME, - params: { - hitsPerPage: 5, - highlightPreTag: - '', - highlightPostTag: '', - }, - }, - ], - }) - }, - }, - ] - }, - }) - ) - - return { autocomplete, autocompleteState } -} - -function resolveResult(result) { - const allLevels = Object.keys(result.hierarchy) - const hierarchy = Object.entries(result._highlightResult.hierarchy).filter( - ([, { value }]) => Boolean(value) - ) - const levels = hierarchy.map(([level]) => level) - - const level = - result.type === 'content' - ? levels.pop() - : levels - .filter( - (level) => - allLevels.indexOf(level) <= allLevels.indexOf(result.type) - ) - .pop() - - return { - titleHtml: result._highlightResult.hierarchy[level].value, - hierarchyHtml: hierarchy - .slice(0, levels.indexOf(level)) - .map(([, { value }]) => value), - } -} - -function SearchIcon(props) { - return ( - - ) -} - -function NoResultsIcon(props) { - return ( - - ) -} - -function LoadingIcon(props) { - const id = useId() - - return ( - - ) -} - -function SearchResult({ result, resultIndex, autocomplete, collection }) { - const id = useId() - const { titleHtml, hierarchyHtml } = resolveResult(result) - - return ( -
  • 0 && 'border-t border-zinc-100 dark:border-zinc-800' - )} - aria-labelledby={`${id}-hierarchy ${id}-title`} - {...autocomplete.getItemProps({ - item: result, - source: collection.source, - })} - > -
  • - ) -} - -function SearchResults({ autocomplete, query, collection }) { - if (collection.items.length === 0) { - return ( -
    - -

    - Nothing found for{' '} - - ‘{query}’ - - . Please try again. -

    -
    - ) - } - - return ( -
      - {collection.items.map((result, resultIndex) => ( - - ))} -
    - ) -} - -const SearchInput = forwardRef(function SearchInput( - { autocomplete, autocompleteState, onClose }, - inputRef -) { - const inputProps = autocomplete.getInputProps({}) - - return ( -
    - - { - if ( - event.key === 'Escape' && - !autocompleteState.isOpen && - autocompleteState.query === '' - ) { - // In Safari, closing the dialog with the escape key can sometimes cause the scroll position to jump to the - // bottom of the page. This is a workaround for that until we can figure out a proper fix in Headless UI. - document.activeElement?.blur() - - onClose() - } else { - inputProps.onKeyDown(event) - } - }} - /> - {autocompleteState.status === 'stalled' && ( -
    - -
    - )} -
    - ) -}) - -function AlgoliaLogo(props) { - return ( - - - - - - - ) -} - -function SearchButton(props) { - const [modifierKey, setModifierKey] = useState() - - useEffect(() => { - setModifierKey( - /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? '⌘' : 'Ctrl ' - ) - }, []) - - return ( - <> - - - - ) -} - -function SearchDialog({ open, setOpen, className }) { - const router = useRouter() - const formRef = useRef() - const panelRef = useRef() - const inputRef = useRef() - const { autocomplete, autocompleteState } = useAutocomplete() - - useEffect(() => { - if (!open) { - return - } - - function onRouteChange() { - setOpen(false) - } - - router.events.on('routeChangeStart', onRouteChange) - router.events.on('hashChangeStart', onRouteChange) - - return () => { - router.events.off('routeChangeStart', onRouteChange) - router.events.off('hashChangeStart', onRouteChange) - } - }, [open, setOpen, router]) - - useEffect(() => { - if (open) { - return - } - - function onKeyDown(event) { - if (event.key === 'k' && (event.metaKey || event.ctrlKey)) { - event.preventDefault() - setOpen(true) - } - } - - window.addEventListener('keydown', onKeyDown) - - return () => { - window.removeEventListener('keydown', onKeyDown) - } - }, [open, setOpen]) - - return ( - autocomplete.setQuery('')} - > - - -
    - - -
    - - -
    -
    - setOpen(false)} - /> -
    - {autocompleteState.isOpen && ( - <> - -

    - Search by{' '} - -

    - - )} -
    - -
    -
    -
    -
    -
    -
    - ) -} - -function useSearchProps() { - const buttonRef = useRef() - const [open, setOpen] = useState(false) - - return { - buttonProps: { - ref: buttonRef, - onClick() { - setOpen(true) - }, - }, - dialogProps: { - open, - setOpen(open) { - const { width, height } = buttonRef.current.getBoundingClientRect() - if (!open || (width !== 0 && height !== 0)) { - setOpen(open) - } - }, - }, - } -} - -export function Search() { - const [modifierKey, setModifierKey] = useState() - const { buttonProps, dialogProps } = useSearchProps() - - useEffect(() => { - setModifierKey( - /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? '⌘' : 'Ctrl ' - ) - }, []) - - return ( -
    - - -
    - ) -} - -export function MobileSearch() { - const { buttonProps, dialogProps } = useSearchProps() - - return ( -
    - - -
    - ) -} diff --git a/apps/docs/src/components/SectionProvider.jsx b/apps/docs/src/components/SectionProvider.jsx deleted file mode 100644 index 3e5c3a872..000000000 --- a/apps/docs/src/components/SectionProvider.jsx +++ /dev/null @@ -1,115 +0,0 @@ -import { - createContext, - useContext, - useEffect, - useLayoutEffect, - useState, -} from 'react' -import { createStore, useStore } from 'zustand' - -import { remToPx } from '@/lib/remToPx' - -function createSectionStore(sections) { - return createStore((set) => ({ - sections, - visibleSections: [], - setVisibleSections: (visibleSections) => - set((state) => - state.visibleSections.join() === visibleSections.join() - ? {} - : { visibleSections } - ), - registerHeading: ({ id, ref, offsetRem }) => - set((state) => ({ - sections: state.sections.map((section) => { - if (section.id === id) { - return { - ...section, - headingRef: ref, - offsetRem, - } - } - return section - }), - })), - })) -} - -function useVisibleSections(sectionStore) { - const setVisibleSections = useStore(sectionStore, (s) => s.setVisibleSections) - const sections = useStore(sectionStore, (s) => s.sections) - - useEffect(() => { - function checkVisibleSections() { - const { innerHeight, scrollY } = window - const newVisibleSections = [] - - for ( - let sectionIndex = 0; - sectionIndex < sections.length; - sectionIndex++ - ) { - const { id, headingRef, offsetRem } = sections[sectionIndex] - const offset = remToPx(offsetRem) - const top = headingRef.current.getBoundingClientRect().top + scrollY - - if (sectionIndex === 0 && top - offset > scrollY) { - newVisibleSections.push('_top') - } - - const nextSection = sections[sectionIndex + 1] - const bottom = - (nextSection?.headingRef.current.getBoundingClientRect().top ?? - Infinity) + - scrollY - - remToPx(nextSection?.offsetRem ?? 0) - - if ( - (top > scrollY && top < scrollY + innerHeight) || - (bottom > scrollY && bottom < scrollY + innerHeight) || - (top <= scrollY && bottom >= scrollY + innerHeight) - ) { - newVisibleSections.push(id) - } - } - - setVisibleSections(newVisibleSections) - } - - const raf = window.requestAnimationFrame(() => checkVisibleSections()) - window.addEventListener('scroll', checkVisibleSections, { passive: true }) - window.addEventListener('resize', checkVisibleSections) - - return () => { - window.cancelAnimationFrame(raf) - window.removeEventListener('scroll', checkVisibleSections) - window.removeEventListener('resize', checkVisibleSections) - } - }, [setVisibleSections, sections]) -} - -const SectionStoreContext = createContext() - -const useIsomorphicLayoutEffect = - typeof window === 'undefined' ? useEffect : useLayoutEffect - -export function SectionProvider({ sections, children }) { - const [sectionStore] = useState(() => createSectionStore(sections)) - - useVisibleSections(sectionStore) - - useIsomorphicLayoutEffect(() => { - sectionStore.setState({ sections }) - }, [sectionStore, sections]) - - return ( - - {children} - - ) -} - -export function useSectionStore(selector) { - const store = useContext(SectionStoreContext) - return useStore(store, selector) -} diff --git a/apps/docs/src/components/Tag.jsx b/apps/docs/src/components/Tag.jsx deleted file mode 100644 index 4fba599c2..000000000 --- a/apps/docs/src/components/Tag.jsx +++ /dev/null @@ -1,58 +0,0 @@ -import clsx from 'clsx' - -const variantStyles = { - medium: 'rounded-lg px-1.5 ring-1 ring-inset', -} - -const colorStyles = { - blue: { - small: 'text-blue-500 dark:text-blue-400', - medium: - 'ring-blue-300 dark:ring-blue-400/30 bg-blue-400/10 text-blue-500 dark:text-blue-400', - }, - sky: { - small: 'text-sky-500', - medium: - 'ring-sky-300 bg-sky-400/10 text-sky-500 dark:ring-sky-400/30 dark:bg-sky-400/10 dark:text-sky-400', - }, - amber: { - small: 'text-amber-500', - medium: - 'ring-amber-300 bg-amber-400/10 text-amber-500 dark:ring-amber-400/30 dark:bg-amber-400/10 dark:text-amber-400', - }, - rose: { - small: 'text-red-500 dark:text-rose-500', - medium: - 'ring-rose-200 bg-rose-50 text-red-500 dark:ring-rose-500/20 dark:bg-rose-400/10 dark:text-rose-400', - }, - zinc: { - small: 'text-zinc-400 dark:text-zinc-500', - medium: - 'ring-zinc-200 bg-zinc-50 text-zinc-500 dark:ring-zinc-500/20 dark:bg-zinc-400/10 dark:text-zinc-400', - }, -} - -const valueColorMap = { - get: 'blue', - post: 'sky', - put: 'amber', - delete: 'rose', -} - -export function Tag({ - children, - variant = 'medium', - color = valueColorMap[children.toLowerCase()] ?? 'blue', -}) { - return ( - - {children} - - ) -} diff --git a/apps/docs/src/components/icons/BellIcon.jsx b/apps/docs/src/components/icons/BellIcon.jsx deleted file mode 100644 index 09062dd9b..000000000 --- a/apps/docs/src/components/icons/BellIcon.jsx +++ /dev/null @@ -1,17 +0,0 @@ -export function BellIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/BoltIcon.jsx b/apps/docs/src/components/icons/BoltIcon.jsx deleted file mode 100644 index 1278a7fe8..000000000 --- a/apps/docs/src/components/icons/BoltIcon.jsx +++ /dev/null @@ -1,11 +0,0 @@ -export function BoltIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/BookIcon.jsx b/apps/docs/src/components/icons/BookIcon.jsx deleted file mode 100644 index d560f41c8..000000000 --- a/apps/docs/src/components/icons/BookIcon.jsx +++ /dev/null @@ -1,17 +0,0 @@ -export function BookIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/CalendarIcon.jsx b/apps/docs/src/components/icons/CalendarIcon.jsx deleted file mode 100644 index 8d0a57c8d..000000000 --- a/apps/docs/src/components/icons/CalendarIcon.jsx +++ /dev/null @@ -1,23 +0,0 @@ -export function CalendarIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/CartIcon.jsx b/apps/docs/src/components/icons/CartIcon.jsx deleted file mode 100644 index e42462467..000000000 --- a/apps/docs/src/components/icons/CartIcon.jsx +++ /dev/null @@ -1,15 +0,0 @@ -export function CartIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/ChatBubbleIcon.jsx b/apps/docs/src/components/icons/ChatBubbleIcon.jsx deleted file mode 100644 index b929ec643..000000000 --- a/apps/docs/src/components/icons/ChatBubbleIcon.jsx +++ /dev/null @@ -1,17 +0,0 @@ -export function ChatBubbleIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/CheckIcon.jsx b/apps/docs/src/components/icons/CheckIcon.jsx deleted file mode 100644 index 33d2b249a..000000000 --- a/apps/docs/src/components/icons/CheckIcon.jsx +++ /dev/null @@ -1,17 +0,0 @@ -export function CheckIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/ChevronRightLeftIcon.jsx b/apps/docs/src/components/icons/ChevronRightLeftIcon.jsx deleted file mode 100644 index 2dbaa18c4..000000000 --- a/apps/docs/src/components/icons/ChevronRightLeftIcon.jsx +++ /dev/null @@ -1,17 +0,0 @@ -export function ChevronRightLeftIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/ClipboardIcon.jsx b/apps/docs/src/components/icons/ClipboardIcon.jsx deleted file mode 100644 index 9c8c55cee..000000000 --- a/apps/docs/src/components/icons/ClipboardIcon.jsx +++ /dev/null @@ -1,17 +0,0 @@ -export function ClipboardIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/CogIcon.jsx b/apps/docs/src/components/icons/CogIcon.jsx deleted file mode 100644 index 57023fc7c..000000000 --- a/apps/docs/src/components/icons/CogIcon.jsx +++ /dev/null @@ -1,19 +0,0 @@ -export function CogIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/CopyIcon.jsx b/apps/docs/src/components/icons/CopyIcon.jsx deleted file mode 100644 index aadede17d..000000000 --- a/apps/docs/src/components/icons/CopyIcon.jsx +++ /dev/null @@ -1,17 +0,0 @@ -export function CopyIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/DocumentIcon.jsx b/apps/docs/src/components/icons/DocumentIcon.jsx deleted file mode 100644 index b576db048..000000000 --- a/apps/docs/src/components/icons/DocumentIcon.jsx +++ /dev/null @@ -1,17 +0,0 @@ -export function DocumentIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/EnvelopeIcon.jsx b/apps/docs/src/components/icons/EnvelopeIcon.jsx deleted file mode 100644 index 17ab4fa95..000000000 --- a/apps/docs/src/components/icons/EnvelopeIcon.jsx +++ /dev/null @@ -1,17 +0,0 @@ -export function EnvelopeIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/FaceSmileIcon.jsx b/apps/docs/src/components/icons/FaceSmileIcon.jsx deleted file mode 100644 index 4c01755a3..000000000 --- a/apps/docs/src/components/icons/FaceSmileIcon.jsx +++ /dev/null @@ -1,17 +0,0 @@ -export function FaceSmileIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/FolderIcon.jsx b/apps/docs/src/components/icons/FolderIcon.jsx deleted file mode 100644 index c59b6e0ac..000000000 --- a/apps/docs/src/components/icons/FolderIcon.jsx +++ /dev/null @@ -1,22 +0,0 @@ -export function FolderIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/LinkIcon.jsx b/apps/docs/src/components/icons/LinkIcon.jsx deleted file mode 100644 index 2dace2318..000000000 --- a/apps/docs/src/components/icons/LinkIcon.jsx +++ /dev/null @@ -1,12 +0,0 @@ -export function LinkIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/ListIcon.jsx b/apps/docs/src/components/icons/ListIcon.jsx deleted file mode 100644 index ea45c0a6d..000000000 --- a/apps/docs/src/components/icons/ListIcon.jsx +++ /dev/null @@ -1,17 +0,0 @@ -export function ListIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/MagnifyingGlassIcon.jsx b/apps/docs/src/components/icons/MagnifyingGlassIcon.jsx deleted file mode 100644 index 309359c29..000000000 --- a/apps/docs/src/components/icons/MagnifyingGlassIcon.jsx +++ /dev/null @@ -1,13 +0,0 @@ -export function MagnifyingGlassIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/MapPinIcon.jsx b/apps/docs/src/components/icons/MapPinIcon.jsx deleted file mode 100644 index b581a6d68..000000000 --- a/apps/docs/src/components/icons/MapPinIcon.jsx +++ /dev/null @@ -1,19 +0,0 @@ -export function MapPinIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/PackageIcon.jsx b/apps/docs/src/components/icons/PackageIcon.jsx deleted file mode 100644 index cb0bc98d2..000000000 --- a/apps/docs/src/components/icons/PackageIcon.jsx +++ /dev/null @@ -1,16 +0,0 @@ -export function PackageIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/PaperAirplaneIcon.jsx b/apps/docs/src/components/icons/PaperAirplaneIcon.jsx deleted file mode 100644 index 6f96ea84b..000000000 --- a/apps/docs/src/components/icons/PaperAirplaneIcon.jsx +++ /dev/null @@ -1,17 +0,0 @@ -export function PaperAirplaneIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/PaperClipIcon.jsx b/apps/docs/src/components/icons/PaperClipIcon.jsx deleted file mode 100644 index cdd72437a..000000000 --- a/apps/docs/src/components/icons/PaperClipIcon.jsx +++ /dev/null @@ -1,12 +0,0 @@ -export function PaperClipIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/ShapesIcon.jsx b/apps/docs/src/components/icons/ShapesIcon.jsx deleted file mode 100644 index 5dd29fd0d..000000000 --- a/apps/docs/src/components/icons/ShapesIcon.jsx +++ /dev/null @@ -1,17 +0,0 @@ -export function ShapesIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/ShirtIcon.jsx b/apps/docs/src/components/icons/ShirtIcon.jsx deleted file mode 100644 index 30c67b920..000000000 --- a/apps/docs/src/components/icons/ShirtIcon.jsx +++ /dev/null @@ -1,11 +0,0 @@ -export function ShirtIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/SquaresPlusIcon.jsx b/apps/docs/src/components/icons/SquaresPlusIcon.jsx deleted file mode 100644 index 39a507a4e..000000000 --- a/apps/docs/src/components/icons/SquaresPlusIcon.jsx +++ /dev/null @@ -1,17 +0,0 @@ -export function SquaresPlusIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/TagIcon.jsx b/apps/docs/src/components/icons/TagIcon.jsx deleted file mode 100644 index c7e57b038..000000000 --- a/apps/docs/src/components/icons/TagIcon.jsx +++ /dev/null @@ -1,19 +0,0 @@ -export function TagIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/UserIcon.jsx b/apps/docs/src/components/icons/UserIcon.jsx deleted file mode 100644 index 350e3c42d..000000000 --- a/apps/docs/src/components/icons/UserIcon.jsx +++ /dev/null @@ -1,24 +0,0 @@ -export function UserIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/icons/UsersIcon.jsx b/apps/docs/src/components/icons/UsersIcon.jsx deleted file mode 100644 index 68ef13120..000000000 --- a/apps/docs/src/components/icons/UsersIcon.jsx +++ /dev/null @@ -1,28 +0,0 @@ -export function UsersIcon(props) { - return ( - - ) -} diff --git a/apps/docs/src/components/mdx.jsx b/apps/docs/src/components/mdx.jsx deleted file mode 100644 index 34ce07bc0..000000000 --- a/apps/docs/src/components/mdx.jsx +++ /dev/null @@ -1,94 +0,0 @@ -import Link from 'next/link' -import clsx from 'clsx' - -import { Heading } from '@/components/Heading' - -export const a = Link -export { Button } from '@/components/Button' -export { CodeGroup, Code as code, Pre as pre } from '@/components/Code' - -export const h2 = function H2(props) { - return -} - -function InfoIcon(props) { - return ( - - ) -} - -export function Note({ children }) { - return ( -
    - -
    - {children} -
    -
    - ) -} - -export function Row({ children }) { - return ( -
    - {children} -
    - ) -} - -export function Col({ children, sticky = false }) { - return ( -
    :first-child]:mt-0 [&>:last-child]:mb-0', - sticky && 'xl:sticky xl:top-24' - )} - > - {children} -
    - ) -} - -export function Properties({ children }) { - return ( -
    -
      - {children} -
    -
    - ) -} - -export function Property({ name, type, children }) { - return ( -
  • -
    -
    Name
    -
    - {name} -
    -
    Type
    -
    - {type} -
    -
    Description
    -
    - {children} -
    -
    -
  • - ) -} diff --git a/apps/docs/src/images/logos/go.svg b/apps/docs/src/images/logos/go.svg deleted file mode 100644 index 7f7b19de5..000000000 --- a/apps/docs/src/images/logos/go.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - diff --git a/apps/docs/src/images/logos/node.svg b/apps/docs/src/images/logos/node.svg deleted file mode 100644 index 1d09de22b..000000000 --- a/apps/docs/src/images/logos/node.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - diff --git a/apps/docs/src/images/logos/php.svg b/apps/docs/src/images/logos/php.svg deleted file mode 100644 index 0a9ac462a..000000000 --- a/apps/docs/src/images/logos/php.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - diff --git a/apps/docs/src/images/logos/python.svg b/apps/docs/src/images/logos/python.svg deleted file mode 100644 index 9bceb587a..000000000 --- a/apps/docs/src/images/logos/python.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - diff --git a/apps/docs/src/images/logos/ruby.svg b/apps/docs/src/images/logos/ruby.svg deleted file mode 100644 index b22a5bf10..000000000 --- a/apps/docs/src/images/logos/ruby.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - diff --git a/apps/docs/src/lib/remToPx.js b/apps/docs/src/lib/remToPx.js deleted file mode 100644 index 0e684ec9c..000000000 --- a/apps/docs/src/lib/remToPx.js +++ /dev/null @@ -1,8 +0,0 @@ -export function remToPx(remValue) { - const rootFontSize = - typeof window === 'undefined' - ? 16 - : parseFloat(window.getComputedStyle(document.documentElement).fontSize) - - return parseFloat(remValue) * rootFontSize -} diff --git a/apps/docs/src/pages/_app.jsx b/apps/docs/src/pages/_app.jsx deleted file mode 100644 index fe7265818..000000000 --- a/apps/docs/src/pages/_app.jsx +++ /dev/null @@ -1,45 +0,0 @@ -import Head from 'next/head' -import { Router, useRouter } from 'next/router' -import { MDXProvider } from '@mdx-js/react' - -import { Layout } from '@/components/Layout' -import * as mdxComponents from '@/components/mdx' -import { useMobileNavigationStore } from '@/components/MobileNavigation' - -import '@/styles/tailwind.css' -import 'focus-visible' - -function onRouteChange() { - useMobileNavigationStore.getState().close() -} - -Router.events.on('hashChangeStart', onRouteChange) -Router.events.on('routeChangeComplete', onRouteChange) -Router.events.on('routeChangeError', onRouteChange) - -export default function App({ Component, pageProps }) { - const router = useRouter() - - return ( - <> - - {router.pathname === '/' ? ( - Plane Documentation - ) : ( - {`${pageProps.title} - Plane Documentation`} - )} - - - - - - - -