diff --git a/.gitignore b/.gitignore
index 6e115fa..da90a8b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -63,3 +63,6 @@ website/
# Optional eslint cache
.eslintcache
+
+website/
+manual/
\ No newline at end of file
diff --git a/package.json b/package.json
index f61ae72..29969c1 100644
--- a/package.json
+++ b/package.json
@@ -1,90 +1,90 @@
{
- "name": "@catalystlabs/typedfetch",
- "version": "0.2.0",
- "description": "Type-safe HTTP client that doesn't suck - Fetch for humans who have stuff to build",
- "type": "module",
- "main": "./dist/index.js",
- "module": "./dist/index.js",
- "types": "./dist/index.d.ts",
- "bin": {
- "typedfetch": "./dist/cli.js"
- },
- "exports": {
- ".": {
- "import": "./dist/index.js",
- "require": "./dist/index.cjs",
- "types": "./dist/index.d.ts"
- }
- },
- "files": [
- "dist",
- "README.md",
- "LICENSE"
- ],
- "scripts": {
- "build": "bun run build:clean && bun run build:esm && bun run build:cjs && bun run build:cli && 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": "esbuild src/index.ts --bundle --outfile=dist/index.cjs --target=node16 --format=cjs --platform=node",
- "build:cli": "bun build src/cli.ts --outfile dist/cli.js --target node --format esm",
- "build:types": "tsc --emitDeclarationOnly --outDir dist",
- "typecheck": "tsc --noEmit",
- "test": "bun x vitest run",
- "sync-version": "node scripts/sync-version.js",
- "prepublishOnly": "bun run build && bun run typecheck"
- },
- "keywords": [
- "http",
- "fetch",
- "client",
- "typescript",
- "type-safe",
- "api",
- "rest",
- "xhr",
- "request",
- "response",
- "cache",
- "retry",
- "resilience",
- "proxy",
- "interceptor",
- "transform"
- ],
- "author": "TypedFetch Contributors",
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "git+https://git.catalystlab.cc/caseycollier/TypeFetched.git"
- },
- "bugs": {
- "url": "https://git.catalystlab.cc/caseycollier/TypeFetched/issues"
- },
- "homepage": "https://typedfetch.dev",
- "devDependencies": {
- "@types/node": "^20.0.0",
- "@typescript-eslint/eslint-plugin": "^6.0.0",
- "@typescript-eslint/parser": "^6.0.0",
- "esbuild": "^0.19.0",
- "eslint": "^8.0.0",
- "gzip-size-cli": "^5.1.0",
- "typescript": "^5.8.3",
- "vitest": "^1.0.0"
- },
- "peerDependencies": {
- "typescript": ">=4.7.0"
- },
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
- },
- "engines": {
- "node": ">=16.0.0"
- },
- "sideEffects": false,
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/typedfetch"
- }
+ "name": "@catalystlabs/typedfetch",
+ "version": "0.3.0",
+ "description": "Type-safe HTTP client that doesn't suck - Fetch for humans who have stuff to build",
+ "type": "module",
+ "main": "./dist/index.js",
+ "module": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "bin": {
+ "typedfetch": "./dist/cli.js"
+ },
+ "exports": {
+ ".": {
+ "import": "./dist/index.js",
+ "require": "./dist/index.cjs",
+ "types": "./dist/index.d.ts"
+ }
+ },
+ "files": [
+ "dist",
+ "README.md",
+ "LICENSE"
+ ],
+ "scripts": {
+ "build": "bun run build:clean && bun run build:esm && bun run build:cjs && bun run build:cli && 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": "esbuild src/index.ts --bundle --outfile=dist/index.cjs --target=node16 --format=cjs --platform=node",
+ "build:cli": "bun build src/cli.ts --outfile dist/cli.js --target node --format esm",
+ "build:types": "tsc --emitDeclarationOnly --outDir dist",
+ "typecheck": "tsc --noEmit",
+ "test": "bun x vitest run",
+ "sync-version": "node scripts/sync-version.js",
+ "prepublishOnly": "bun run build && bun run typecheck"
+ },
+ "keywords": [
+ "http",
+ "fetch",
+ "client",
+ "typescript",
+ "type-safe",
+ "api",
+ "rest",
+ "xhr",
+ "request",
+ "response",
+ "cache",
+ "retry",
+ "resilience",
+ "proxy",
+ "interceptor",
+ "transform"
+ ],
+ "author": "TypedFetch Contributors",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://git.catalystlab.cc/caseycollier/TypeFetched.git"
+ },
+ "bugs": {
+ "url": "https://git.catalystlab.cc/caseycollier/TypeFetched/issues"
+ },
+ "homepage": "https://typedfetch.dev",
+ "devDependencies": {
+ "@types/node": "^20.0.0",
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
+ "@typescript-eslint/parser": "^6.0.0",
+ "esbuild": "^0.19.0",
+ "eslint": "^8.0.0",
+ "gzip-size-cli": "^5.1.0",
+ "typescript": "^5.8.3",
+ "vitest": "^1.0.0"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.7.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ },
+ "engines": {
+ "node": ">=16.0.0"
+ },
+ "sideEffects": false,
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/typedfetch"
+ }
}
diff --git a/website/package.json b/website/package.json
index 50cefef..717d3d2 100644
--- a/website/package.json
+++ b/website/package.json
@@ -16,6 +16,7 @@
"@mantine/spotlight": "^8.0.0",
"@tabler/icons-react": "^3.26.0",
"@vercel/analytics": "^1.5.0",
+ "@vercel/speed-insights": "^1.2.0",
"framer-motion": "^11.15.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
@@ -30,4 +31,4 @@
"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 0daa03b..27e926b 100644
--- a/website/src/App.tsx
+++ b/website/src/App.tsx
@@ -1,4 +1,4 @@
-import { MantineProvider } from '@mantine/core';
+import { MantineProvider, Loader, Stack, Text } from '@mantine/core';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import { CodeHighlightAdapterProvider } from '@mantine/code-highlight';
import { lazy, Suspense } from 'react';
@@ -7,6 +7,7 @@ import { shikiAdapter } from './utils/shikiAdapter';
import { theme } from './theme';
import { LandingPage } from './pages/LandingPage';
import { DocsLayout } from './layouts/DocsLayout';
+import { ErrorBoundary } from './components/ErrorBoundary';
// Lazy load documentation pages for better performance
const GettingStarted = lazy(() => import('./pages/docs/GettingStarted'));
@@ -26,6 +27,16 @@ import '@mantine/spotlight/styles.css';
import './styles/global.css';
import './styles/fonts.css';
+// Loading component for Suspense fallbacks
+function LoadingFallback() {
+ return (
+
+
+ Loading page...
+
+ );
+}
+
export function App() {
return (
@@ -35,59 +46,81 @@ export function App() {
} />
}>
Loading...}>
-
-
+
+ }>
+
+
+
} />
Loading...}>
-
-
+
+ }>
+
+
+
} />
Loading...}>
-
-
+
+ }>
+
+
+
} />
Loading...}>
-
-
+
+ }>
+
+
+
} />
Loading...}>
-
-
+
+ }>
+
+
+
} />
Loading...}>
-
-
+
+ }>
+
+
+
} />
Loading...}>
-
-
+
+ }>
+
+
+
} />
Loading...}>
-
-
+
+ }>
+
+
+
} />
Loading...}>
-
-
+
+ }>
+
+
+
} />
Loading...}>
-
-
+
+ }>
+
+
+
} />
Loading...}>
-
-
+
+ }>
+
+
+
} />