diff --git a/manual/imgs/marcus-base.png b/manual/imgs/marcus-base.png new file mode 100644 index 0000000..99a99bf Binary files /dev/null and b/manual/imgs/marcus-base.png differ diff --git a/manual/imgs/sarah-base.png b/manual/imgs/sarah-base.png new file mode 100644 index 0000000..aafca83 Binary files /dev/null and b/manual/imgs/sarah-base.png differ diff --git a/manual/imgs/sarah-realization-at-the-resturant.png b/manual/imgs/sarah-realization-at-the-resturant.png new file mode 100644 index 0000000..486bac8 Binary files /dev/null and b/manual/imgs/sarah-realization-at-the-resturant.png differ diff --git a/manual/imgs/the-boss-base.png b/manual/imgs/the-boss-base.png new file mode 100644 index 0000000..e88bf41 Binary files /dev/null and b/manual/imgs/the-boss-base.png differ diff --git a/package.json b/package.json index c5c6c87..0d4de93 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@catalystlabs/typedfetch", - "version": "0.1.0", + "version": "0.1.1", "description": "Type-safe HTTP client that doesn't suck - Fetch for humans who have stuff to build", "type": "module", "main": "./dist/index.js", @@ -19,9 +19,10 @@ "LICENSE" ], "scripts": { - "build": "bun run build:clean && bun run build:esm && bun run build:types", + "build": "bun run build:clean && bun run build:esm && bun run build:cjs && bun run build:types", "build:clean": "rm -rf dist && mkdir dist", "build:esm": "bun build src/index.ts --outdir dist --target browser --format esm", + "build:cjs": "bun build src/index.ts --outfile dist/index.cjs --target node --format cjs", "build:types": "tsc --emitDeclarationOnly --outDir dist", "typecheck": "tsc --noEmit", "prepublishOnly": "bun run build && bun run typecheck" diff --git a/website/package.json b/website/package.json index a3ed679..cd3d313 100644 --- a/website/package.json +++ b/website/package.json @@ -9,22 +9,25 @@ "preview": "vite preview" }, "dependencies": { + "@catalystlabs/typedfetch": "^0.1.1", + "@mantine/code-highlight": "^8.0.0", "@mantine/core": "^8.0.0", "@mantine/hooks": "^8.0.0", - "@mantine/prism": "^7.13.4", "@mantine/spotlight": "^8.0.0", "@tabler/icons-react": "^3.26.0", + "@vercel/analytics": "^1.5.0", + "framer-motion": "^11.15.0", "react": "^18.3.1", "react-dom": "^18.3.1", "react-router-dom": "^7.1.1", - "framer-motion": "^11.15.0", - "@catalystlabs/typedfetch": "^0.1.0" + "shiki": "^3.8.1" }, "devDependencies": { "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", "@vitejs/plugin-react": "^4.3.4", - "vite": "^6.0.7", - "typescript": "^5.8.3" + "sharp": "^0.34.3", + "typescript": "^5.8.3", + "vite": "^6.0.7" } } \ No newline at end of file diff --git a/website/src/App.tsx b/website/src/App.tsx index 150033f..b98ab80 100644 --- a/website/src/App.tsx +++ b/website/src/App.tsx @@ -1,41 +1,87 @@ import { MantineProvider } from '@mantine/core'; import { BrowserRouter, Routes, Route } from 'react-router-dom'; +import { CodeHighlightAdapterProvider } from '@mantine/code-highlight'; +import { lazy, Suspense } from 'react'; +import { Analytics } from '@vercel/analytics/react'; +import { shikiAdapter } from './utils/shikiAdapter'; import { theme } from './theme'; import { LandingPage } from './pages/LandingPage'; import { DocsLayout } from './layouts/DocsLayout'; -import { GettingStarted } from './pages/docs/GettingStarted'; -import { Installation } from './pages/docs/Installation'; -import { BasicUsage } from './pages/docs/BasicUsage'; -import { Configuration } from './pages/docs/Configuration'; -import { ErrorHandling } from './pages/docs/ErrorHandling'; -import { TypeInference } from './pages/docs/TypeInference'; -import { Caching } from './pages/docs/Caching'; -import { Interceptors } from './pages/docs/Interceptors'; -import { APIReference } from './pages/docs/APIReference'; + +// Lazy load documentation pages for better performance +const GettingStarted = lazy(() => import('./pages/docs/GettingStarted')); +const Installation = lazy(() => import('./pages/docs/Installation')); +const BasicUsage = lazy(() => import('./pages/docs/BasicUsage')); +const Configuration = lazy(() => import('./pages/docs/Configuration')); +const ErrorHandling = lazy(() => import('./pages/docs/ErrorHandling')); +const TypeInference = lazy(() => import('./pages/docs/TypeInference')); +const Caching = lazy(() => import('./pages/docs/Caching')); +const Interceptors = lazy(() => import('./pages/docs/Interceptors')); +const APIReference = lazy(() => import('./pages/docs/APIReference')); import '@mantine/core/styles.css'; -import '@mantine/prism/styles.css'; +import '@mantine/code-highlight/styles.css'; import '@mantine/spotlight/styles.css'; import './styles/global.css'; +import './styles/fonts.css'; export function App() { return ( - - - } /> - }> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - - - + + + + } /> + }> + Loading...}> + + + } /> + Loading...}> + + + } /> + Loading...}> + + + } /> + Loading...}> + + + } /> + Loading...}> + + + } /> + Loading...}> + + + } /> + Loading...}> + + + } /> + Loading...}> + + + } /> + Loading...}> + + + } /> + + + + + ); } \ No newline at end of file