diff --git a/.github/actions/publish-artifacts/package.json b/.github/actions/publish-artifacts/package.json index 77d5529b0786..8404dd8697f0 100644 --- a/.github/actions/publish-artifacts/package.json +++ b/.github/actions/publish-artifacts/package.json @@ -11,6 +11,6 @@ "@actions/io": "^1.1.3" }, "devDependencies": { - "@vercel/ncc": "^0.38.0" + "@vercel/ncc": "^0.38.1" } } diff --git a/.vscode/settings.json b/.vscode/settings.json index 4f032eb17593..3190ae975e29 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -39,6 +39,7 @@ "rust-analyzer.diagnostics.experimental.enable": false, "tailwindCSS.experimental.classRegex": [ ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"], // cva(....)`...` + ["clsx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"], // clsx(....)`...` "tw\\.[^`]+`([^`]*)`", // tw.xxx`...` "tw\\(.*?\\).*?`([^`]*)", // tw(....)`...` "tw`([^`]*)", // tw`...` (mobile) @@ -46,12 +47,14 @@ ["styled\\([^,)]+,([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"] // styled(....)`...` (mobile) ], "search.exclude": { + "node_modules": true, "**/node_modules": true, "**/bower_components": true, "**/*.code-search": true, // Hiding these folders bcs they create a lot of noise in the search results "**/*.contentlayer": true, "**/*.next": true, + "**/dist": true, "apps/mobile/ios/Pods": true, "apps/mobile/android": true, "apps/mobile/ios": true diff --git a/apps/desktop/package.json b/apps/desktop/package.json index c6225e2005eb..b5ca3951ffca 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -16,24 +16,24 @@ "@sd/client": "workspace:*", "@sd/interface": "workspace:*", "@sd/ui": "workspace:*", - "@sentry/vite-plugin": "^2.7.1", "@t3-oss/env-core": "^0.7.1", - "@tanstack/react-query": "^4.35", - "@tauri-apps/api": "1.5.0", + "@tanstack/react-query": "^4.36.1", + "@tauri-apps/api": "1.5.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-router-dom": "6.9.0", + "react-router-dom": "6.17.0", "sonner": "^1.0.3" }, "devDependencies": { "@sd/config": "workspace:*", - "@tauri-apps/cli": "^1.5.2", - "@types/react": "^18.2.28", - "@types/react-dom": "^18.2.13", + "@sentry/vite-plugin": "^2.8.0", + "@tauri-apps/cli": "^1.5.5", + "@types/react": "^18.2.31", + "@types/react-dom": "^18.2.14", "@vitejs/plugin-react": "^4.1.0", - "sass": "^1.69.3", + "sass": "^1.69.4", "typescript": "^5.2.2", - "vite": "^4.4.11", + "vite": "^4.5.0", "vite-plugin-html": "^3.2.0", "vite-plugin-svgr": "^3.3.0", "vite-tsconfig-paths": "^4.2.1" diff --git a/apps/desktop/src/index.html b/apps/desktop/src/index.html index c0f509c3fa20..d232abc31102 100644 --- a/apps/desktop/src/index.html +++ b/apps/desktop/src/index.html @@ -5,6 +5,10 @@ Spacedrive + diff --git a/apps/landing/next.config.js b/apps/landing/next.config.js index 6db09c9e1eb7..ef7c433c135d 100644 --- a/apps/landing/next.config.js +++ b/apps/landing/next.config.js @@ -54,7 +54,7 @@ const nextConfig = { // Convert all other *.svg imports to React components so it's compatible with Vite's plugin. { test: /\.svg$/i, - issuer: /\.[jt]sx?$/, + issuer: { not: /\.(css|scss|sass)$/ }, resourceQuery: { not: /url/ }, // exclude if *.svg?url use: [ { diff --git a/apps/landing/package.json b/apps/landing/package.json index 12193a0698e7..a23559bcfec4 100644 --- a/apps/landing/package.json +++ b/apps/landing/package.json @@ -10,62 +10,54 @@ "typecheck": "contentlayer build && tsc -b" }, "dependencies": { - "@aws-sdk/client-ses": "^3.337.0", "@octokit/webhooks": "^12.0.3", - "@phosphor-icons/react": "^2.1.3", - "@planetscale/database": "^1.7.0", - "@react-three/drei": "^9.78.1", - "@react-three/fiber": "^8.13.4", + "@phosphor-icons/react": "^2.0.13", + "@react-three/drei": "^9.88.4", + "@react-three/fiber": "^8.15.0", "@sd/assets": "workspace:*", "@sd/ui": "workspace:*", - "@t3-oss/env-nextjs": "^0.3.1", - "@vercel/edge-config": "^0.1.11", - "autoprefixer": "^10.4.14", - "clsx": "^1.2.1", - "contentlayer": "^0.3.2", - "dayjs": "^1.11.8", - "framer-motion": "^10.11.5", + "@t3-oss/env-nextjs": "^0.7.1", + "clsx": "^2.0.0", + "contentlayer": "^0.3.4", + "dayjs": "^1.11.10", + "framer-motion": "^10.16.4", "katex": "^0.16.9", - "markdown-to-jsx": "^7.2.0", - "md5": "^2.3.0", - "mdx-loader": "^3.0.2", - "next": "13.5.4", + "markdown-to-jsx": "^7.3.2", + "next": "13.5.6", "next-contentlayer": "^0.3.4", - "octokit": "^3.1.1", "react": "18.2.0", "react-burger-menu": "^3.0.9", "react-device-detect": "^2.2.3", "react-dom": "^18.2.0", - "react-error-boundary": "^3.1.4", + "react-error-boundary": "^4.0.11", "react-github-btn": "^1.4.0", - "react-hook-form": "^7.47.0", - "react-tsparticles": "^2.9.3", + "react-tsparticles": "^2.12.2", "reading-time": "^1.5.0", "rehype-autolink-headings": "^6.1.1", "rehype-external-links": "^2.1.0", "rehype-katex": "^6.0.3", - "rehype-prism-plus": "^1.5.1", + "rehype-prism-plus": "^1.6.3", "rehype-slug": "^5.1.0", "remark-gfm": "^3.0.1", "remark-math": "^5.1.1", - "sharp": "^0.32.1", "tailwind-merge": "^1.14.0", - "three": "^0.153.0", - "tsparticles": "^2.9.3", - "uuid": "^9.0.0", + "three": "^0.157.0", + "tsparticles": "^2.12.0", "zod": "~3.22.4" }, "devDependencies": { - "@next/bundle-analyzer": "^13.5.4", + "@next/bundle-analyzer": "^13.5.6", "@octokit/openapi-types": "^19.0.0", "@sd/config": "workspace:*", "@svgr/webpack": "^8.1.0", "@types/node": "~18.17.19", - "@types/react": "^18.2.28", - "@types/react-burger-menu": "^2.8.4", - "@types/react-dom": "^18.2.13", - "@types/three": "^0.152.1", + "@types/react": "^18.2.31", + "@types/react-burger-menu": "^2.8.5", + "@types/react-dom": "^18.2.14", + "@types/three": "^0.157.2", + "autoprefixer": "^10.4.16", "postcss": "^8.4.31", + "sharp": "^0.32.6", "tailwindcss": "^3.3.3", "typescript": "^5.2.2" } diff --git a/apps/landing/public/images/team/vitor.jpg b/apps/landing/public/images/team/vitor.jpg index 823a482b39cb..211b744a1abb 100644 Binary files a/apps/landing/public/images/team/vitor.jpg and b/apps/landing/public/images/team/vitor.jpg differ diff --git a/apps/landing/src/app/Downloads.tsx b/apps/landing/src/app/Downloads.tsx index bb1836113a44..7dd4cab99a7b 100644 --- a/apps/landing/src/app/Downloads.tsx +++ b/apps/landing/src/app/Downloads.tsx @@ -1,6 +1,6 @@ 'use client'; -import { AndroidLogo, Globe, LinuxLogo, WindowsLogo } from '@phosphor-icons/react/dist/ssr'; +import { AndroidLogo, Globe, LinuxLogo, WindowsLogo } from '@phosphor-icons/react'; import { Apple, Github } from '@sd/assets/svgs/brands'; import clsx from 'clsx'; import { motion } from 'framer-motion'; @@ -80,7 +80,7 @@ export function Downloads({ latestVersion }: Props) { ? `${BASE_DL_LINK}/${currentPlatform.os}/${links[0].arch}` : undefined } - className={`z-5 plausible-event-name=download relative plausible-event-os=${currentPlatform.name}`} + className={`z-5 plausible-event-name=download plausible-event-os= relative${currentPlatform.name}`} icon={Icon ? : undefined} text={`Download for ${currentPlatform.name}`} onClick={() => setSelectedPlatform(currentPlatform)} diff --git a/apps/landing/src/app/HomeCTA.tsx b/apps/landing/src/app/HomeCTA.tsx index 49e396d83353..29afbe46838a 100644 --- a/apps/landing/src/app/HomeCTA.tsx +++ b/apps/landing/src/app/HomeCTA.tsx @@ -19,6 +19,7 @@ export function HomeCTA({ className, text, icon, ...props }: Props) { 'home-button-border-gradient relative z-30 flex cursor-pointer items-center gap-2 !rounded-[7px] border-0 !bg-[#2F3152]/30 py-2 text-sm text-white !backdrop-blur-lg hover:brightness-110 md:text-[16px]', className )} + target="_blank" {...props} > <> diff --git a/apps/landing/src/app/NavBar/MobileDropdown.tsx b/apps/landing/src/app/NavBar/MobileDropdown.tsx index e00771319cb7..22d86d0dbe3e 100644 --- a/apps/landing/src/app/NavBar/MobileDropdown.tsx +++ b/apps/landing/src/app/NavBar/MobileDropdown.tsx @@ -1,6 +1,6 @@ 'use client'; -import { Book, Chat, DotsThreeVertical, MapPin, User } from '@phosphor-icons/react/dist/ssr'; +import { Book, Chat, DotsThreeVertical, MapPin, User } from '@phosphor-icons/react'; import { Academia, Discord, Github } from '@sd/assets/svgs/brands'; import clsx from 'clsx'; import { AppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime'; diff --git a/apps/landing/src/app/api/github/index.ts b/apps/landing/src/app/api/github/index.ts index 693f3caa5a8b..9133af53a31c 100644 --- a/apps/landing/src/app/api/github/index.ts +++ b/apps/landing/src/app/api/github/index.ts @@ -4,11 +4,13 @@ import { env } from '~/env'; type Release = components['schemas']['release']; const FETCH_META = { - headers: { - Authorization: `Bearer ${env.GITHUB_PAT}`, - Accept: 'application/vnd.github+json' - } -} as RequestInit; + headers: new Headers({ + 'Accept': 'application/vnd.github+json', + 'X-GitHub-Api-Version': '2022-11-28' + }) +}; + +if (env.GITHUB_PAT) FETCH_META.headers.set('Authorization', `Bearer ${env.GITHUB_PAT}`); export const RELEASES_PATH = `/repos/${env.GITHUB_ORG}/${env.GITHUB_REPO}/releases`; diff --git a/apps/landing/src/app/api/releases/desktop/[version]/[target]/[arch]/route.ts b/apps/landing/src/app/api/releases/desktop/[version]/[target]/[arch]/route.ts index 716640b96111..60fbc61d014d 100644 --- a/apps/landing/src/app/api/releases/desktop/[version]/[target]/[arch]/route.ts +++ b/apps/landing/src/app/api/releases/desktop/[version]/[target]/[arch]/route.ts @@ -1,3 +1,4 @@ +import { redirect } from 'next/navigation'; import { z } from 'zod'; import { getLatestRelease, getRecentReleases, getRelease, githubFetch } from '~/app/api/github'; @@ -57,5 +58,5 @@ export async function GET( if (!asset) return Response.json({ error: 'Asset not found' }, { status: 404 }); - return Response.redirect(asset.browser_download_url); + return redirect(asset.browser_download_url); } diff --git a/apps/landing/src/app/blog/[slug]/page.tsx b/apps/landing/src/app/blog/[slug]/page.tsx index 00e63ba9fdbf..b6ac3f48637f 100644 --- a/apps/landing/src/app/blog/[slug]/page.tsx +++ b/apps/landing/src/app/blog/[slug]/page.tsx @@ -43,7 +43,7 @@ export default function Page({ params }: Props) { const MDXContent = useMDXComponent(post.body.code); return ( -
+
<>
+

Blog

Get the latest from Spacedrive.

diff --git a/apps/landing/src/app/careers/page.tsx b/apps/landing/src/app/careers/page.tsx index f99a3a015ec7..b6755a128865 100644 --- a/apps/landing/src/app/careers/page.tsx +++ b/apps/landing/src/app/careers/page.tsx @@ -10,7 +10,7 @@ export const metadata = { export default function CareersPage() { return ( -
+
) {
diff --git a/apps/landing/src/app/not-found.tsx b/apps/landing/src/app/not-found.tsx index fab036b095d6..bfff786d0729 100644 --- a/apps/landing/src/app/not-found.tsx +++ b/apps/landing/src/app/not-found.tsx @@ -1,6 +1,6 @@ 'use client'; -import { SmileyXEyes } from '@phosphor-icons/react/dist/ssr'; +import { SmileyXEyes } from '@phosphor-icons/react'; import { useRouter } from 'next/navigation'; import { Button } from '@sd/ui'; import Markdown from '~/components/Markdown'; diff --git a/apps/landing/src/app/roadmap/page.tsx b/apps/landing/src/app/roadmap/page.tsx index 2f7667bababd..e4ed9f401522 100644 --- a/apps/landing/src/app/roadmap/page.tsx +++ b/apps/landing/src/app/roadmap/page.tsx @@ -11,7 +11,7 @@ export const metadata = { export default function Page() { return ( -
+

What's next for Spacedrive? diff --git a/apps/landing/src/app/team/TeamMember.tsx b/apps/landing/src/app/team/TeamMember.tsx index 2b94540aa394..7dcf136c1eb2 100644 --- a/apps/landing/src/app/team/TeamMember.tsx +++ b/apps/landing/src/app/team/TeamMember.tsx @@ -1,4 +1,4 @@ -import { Dribbble, Github, Twitch, Twitter } from '@sd/assets/svgs/brands'; +import { Dribbble, Github, Gitlab, Twitch, Twitter } from '@sd/assets/svgs/brands'; import clsx from 'clsx'; import Image from 'next/image'; import NextLink from 'next/link'; @@ -19,6 +19,7 @@ export interface TeamMemberProps { twitter?: string; twitch?: string; github?: string; + gitlab?: string; dribbble?: string; }; @@ -81,6 +82,11 @@ export function TeamMember(props: TeamMemberProps) { )} + {props.socials?.gitlab && ( + + + + )} {props.socials?.twitch && ( diff --git a/apps/landing/src/app/team/people.tsx b/apps/landing/src/app/team/people.tsx index 6fd040f7444c..094d0e978bd0 100644 --- a/apps/landing/src/app/team/people.tsx +++ b/apps/landing/src/app/team/people.tsx @@ -78,7 +78,9 @@ export const teamMembers: Array = [ role: 'React Engineer & Designer', imageUrl: '/images/team/vitor.jpg', socials: { - github: 'https://github.com/HeavenVolkoff' + github: 'https://github.com/HeavenVolkoff', + gitlab: 'https://gitlab.com/VitorVasconcellos', + twitter: 'https://x.com/vasvas10' } }, { diff --git a/apps/landing/src/components/DocsLayout.tsx b/apps/landing/src/components/DocsLayout.tsx index 9812a6c02406..55dcbdf0a855 100644 --- a/apps/landing/src/components/DocsLayout.tsx +++ b/apps/landing/src/components/DocsLayout.tsx @@ -1,4 +1,4 @@ -import { CaretRight, List, X } from '@phosphor-icons/react'; +import { CaretRight, List, X } from '@phosphor-icons/react/dist/ssr'; import { PropsWithChildren, useState } from 'react'; import { slide as Menu } from 'react-burger-menu'; import { Button } from '@sd/ui'; diff --git a/apps/landing/src/components/DownloadToday.tsx b/apps/landing/src/components/DownloadToday.tsx index 851369551880..f165da894442 100644 --- a/apps/landing/src/components/DownloadToday.tsx +++ b/apps/landing/src/components/DownloadToday.tsx @@ -1,4 +1,4 @@ -import { Download } from '@phosphor-icons/react'; +import { Download } from '@phosphor-icons/react/dist/ssr'; import clsx from 'clsx'; import { useInView } from 'framer-motion'; import React, { useRef } from 'react'; diff --git a/apps/landing/src/components/HomeCTA.tsx b/apps/landing/src/components/HomeCTA.tsx index 5cccec7d57aa..a9164daa715f 100644 --- a/apps/landing/src/components/HomeCTA.tsx +++ b/apps/landing/src/components/HomeCTA.tsx @@ -1,4 +1,4 @@ -import { IconProps } from '@phosphor-icons/react'; +import { type IconProps } from '@phosphor-icons/react'; import clsx from 'clsx'; import { Button, LinkButtonProps } from '@sd/ui'; diff --git a/apps/landing/src/components/MagicCard.tsx b/apps/landing/src/components/MagicCard.tsx index e839ca6f748c..7212a1504829 100644 --- a/apps/landing/src/components/MagicCard.tsx +++ b/apps/landing/src/components/MagicCard.tsx @@ -1,7 +1,7 @@ 'use client'; import clsx, { ClassValue } from 'clsx'; -import { CSSProperties, ReactNode, useEffect, useRef, useState } from 'react'; +import { CSSProperties, ReactNode, useCallback, useEffect, useRef, useState } from 'react'; import { twMerge } from 'tailwind-merge'; export function cn(...inputs: ClassValue[]) { @@ -47,33 +47,14 @@ const MagicContainer = ({ children, className, style }: MagicContainerProps) => const containerSize = useRef<{ w: number; h: number }>({ w: 0, h: 0 }); const [boxes, setBoxes] = useState>([]); - useEffect(() => { - init(); - containerRef.current && - setBoxes(Array.from(containerRef.current.children).map((el) => el as HTMLElement)); - }, []); - - useEffect(() => { - init(); - window.addEventListener('resize', init); - - return () => { - window.removeEventListener('resize', init); - }; - }, [setBoxes]); - - useEffect(() => { - onMouseMove(); - }, [mousePosition]); - - const init = () => { + const init = useCallback(() => { if (containerRef.current) { containerSize.current.w = containerRef.current.offsetWidth; containerSize.current.h = containerRef.current.offsetHeight; } - }; + }, []); - const onMouseMove = () => { + const onMouseMove = useCallback(() => { if (containerRef.current) { const rect = containerRef.current.getBoundingClientRect(); const { w, h } = containerSize.current; @@ -96,7 +77,26 @@ const MagicContainer = ({ children, className, style }: MagicContainerProps) => } }); } - }; + }, [boxes, mousePosition]); + + useEffect(() => { + init(); + containerRef.current && + setBoxes(Array.from(containerRef.current.children).map((el) => el as HTMLElement)); + }, [init]); + + useEffect(() => { + init(); + window.addEventListener('resize', init); + + return () => { + window.removeEventListener('resize', init); + }; + }, [setBoxes, init]); + + useEffect(() => { + onMouseMove(); + }, [mousePosition, onMouseMove]); return (
diff --git a/apps/landing/src/components/Markdown.tsx b/apps/landing/src/components/Markdown.tsx index 19b06695c132..755ff7966f95 100644 --- a/apps/landing/src/components/Markdown.tsx +++ b/apps/landing/src/components/Markdown.tsx @@ -12,7 +12,7 @@ function MarkdownPage(props: PropsWithChildren) {
diff --git a/apps/landing/src/components/NavBar.tsx b/apps/landing/src/components/NavBar.tsx index f3851c0735f2..2c96d9f76215 100644 --- a/apps/landing/src/components/NavBar.tsx +++ b/apps/landing/src/components/NavBar.tsx @@ -1,4 +1,4 @@ -import { Book, Chat, DotsThreeVertical, MapPin, User } from '@phosphor-icons/react'; +import { Book, Chat, DotsThreeVertical, MapPin, User } from '@phosphor-icons/react/dist/ssr'; import { Academia, Discord, Github } from '@sd/assets/svgs/brands'; import clsx from 'clsx'; import Image from 'next/image'; diff --git a/apps/landing/src/components/NewBanner.tsx b/apps/landing/src/components/NewBanner.tsx index 20af83ab3e6e..8d1dd0d5430c 100644 --- a/apps/landing/src/components/NewBanner.tsx +++ b/apps/landing/src/components/NewBanner.tsx @@ -1,4 +1,4 @@ -import { Newspaper } from '@phosphor-icons/react'; +import { Newspaper } from '@phosphor-icons/react/dist/ssr'; import clsx from 'clsx'; import Link from 'next/link'; diff --git a/apps/landing/src/components/PageWrapper.tsx b/apps/landing/src/components/PageWrapper.tsx index 5184fb5b0b23..4dacca4278ab 100644 --- a/apps/landing/src/components/PageWrapper.tsx +++ b/apps/landing/src/components/PageWrapper.tsx @@ -3,7 +3,7 @@ import NavBar from './NavBar'; export default function PageWrapper({ children }: { children: React.ReactNode }) { return ( -
+
{children}