diff --git a/package.json b/package.json index 21f618b5f..d022bb9f2 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "private": true, "sideEffects": false, "repository": "https://github.com/TanStack/tanstack.com.git", - "packageManager": "pnpm@9.4.0", + "packageManager": "pnpm@10.26.0", "type": "module", "scripts": { "dev": "pnpm run with-env vite dev", @@ -59,12 +59,12 @@ "hast-util-to-string": "^3.0.1", "html-react-parser": "^5.1.10", "lru-cache": "^7.13.1", + "lucide-react": "^0.561.0", "mermaid": "^11.11.0", "postgres": "^3.4.7", "react": "^19.2.0", "react-colorful": "^5.6.1", "react-dom": "^19.2.0", - "react-icons": "^5.3.0", "react-instantsearch": "7", "rehype-autolink-headings": "^7.1.0", "rehype-callouts": "^2.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c4ac35f19..aa98532d2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -125,6 +125,9 @@ importers: lru-cache: specifier: ^7.13.1 version: 7.18.3 + lucide-react: + specifier: ^0.561.0 + version: 0.561.0(react@19.2.0) mermaid: specifier: ^11.11.0 version: 11.11.0 @@ -140,9 +143,6 @@ importers: react-dom: specifier: ^19.2.0 version: 19.2.0(react@19.2.0) - react-icons: - specifier: ^5.3.0 - version: 5.3.0(react@19.2.0) react-instantsearch: specifier: '7' version: 7.15.5(algoliasearch@5.23.4)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) @@ -5157,6 +5157,11 @@ packages: resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} engines: {node: '>=12'} + lucide-react@0.561.0: + resolution: {integrity: sha512-Y59gMY38tl4/i0qewcqohPdEbieBy7SovpBL9IFebhc2mDd8x4PZSOsiFRkpPcOq6bj1r/mjH/Rk73gSlIJP2A==} + peerDependencies: + react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 + luxon@3.5.0: resolution: {integrity: sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==} engines: {node: '>=12'} @@ -5898,11 +5903,6 @@ packages: peerDependencies: react: ^19.2.0 - react-icons@5.3.0: - resolution: {integrity: sha512-DnUk8aFbTyQPSkCfF8dbX6kQjXA9DktMeJqfjrg6cK9vwQVMxmcA3BfP4QoiztVmEHtwlTgLFsPuH2NskKT6eg==} - peerDependencies: - react: '*' - react-instantsearch-core@7.15.5: resolution: {integrity: sha512-SFxiwwMf0f5F/8U0Y4ullvQ7bZtbYE516UOJbxaHhjV8yY0i8c22K4lrBFrYbxVRT7QAcp2wLGHiB7r/lD7eRA==} peerDependencies: @@ -12439,6 +12439,10 @@ snapshots: lru-cache@7.18.3: {} + lucide-react@0.561.0(react@19.2.0): + dependencies: + react: 19.2.0 + luxon@3.5.0: {} magic-string@0.30.17: @@ -13341,10 +13345,6 @@ snapshots: react: 19.2.0 scheduler: 0.27.0 - react-icons@5.3.0(react@19.2.0): - dependencies: - react: 19.2.0 - react-instantsearch-core@7.15.5(algoliasearch@5.23.4)(react@19.2.0): dependencies: '@babel/runtime': 7.24.5 diff --git a/src/components/CodeExplorerTopBar.tsx b/src/components/CodeExplorerTopBar.tsx index b998ca205..94aedc329 100644 --- a/src/components/CodeExplorerTopBar.tsx +++ b/src/components/CodeExplorerTopBar.tsx @@ -1,6 +1,11 @@ import React from 'react' -import { FaExpand, FaCompress } from 'react-icons/fa' -import { CgMenuLeft } from 'react-icons/cg' +import { + ArrowLeftFromLine, + ArrowRightFromLine, + Maximize, + Minimize, + TextAlignStart, +} from 'lucide-react' interface CodeExplorerTopBarProps { activeTab: 'code' | 'sandbox' @@ -23,16 +28,26 @@ export function CodeExplorerTopBar({
{activeTab === 'code' ? ( - + isSidebarOpen ? ( + + ) : ( + + ) ) : (
- +
)}
diff --git a/src/components/CopyMarkdownButton.tsx b/src/components/CopyMarkdownButton.tsx index 04062db22..21f68c895 100644 --- a/src/components/CopyMarkdownButton.tsx +++ b/src/components/CopyMarkdownButton.tsx @@ -1,9 +1,9 @@ 'use client' import { useState, useTransition } from 'react' -import { FaCheck, FaCopy } from 'react-icons/fa' import { type MouseEventHandler, useEffect, useRef } from 'react' import { useToast } from '~/components/ToastProvider' +import { Check, Copy } from 'lucide-react' export function useCopyButton( onCopy: () => void | Promise, @@ -115,11 +115,11 @@ export function CopyMarkdownButton({
{checked ? ( <> - Copied to Clipboard + Copied to Clipboard ) : ( <> - Copy Markdown + Copy Markdown )}
diff --git a/src/components/Doc.tsx b/src/components/Doc.tsx index 488fa8333..88f7d6114 100644 --- a/src/components/Doc.tsx +++ b/src/components/Doc.tsx @@ -1,9 +1,5 @@ import * as React from 'react' -import { - BsArrowsCollapseVertical, - BsArrowsExpandVertical, -} from 'react-icons/bs' -import { FaEdit } from 'react-icons/fa' +import { FoldHorizontal, SquarePen, UnfoldHorizontal } from 'lucide-react' import { twMerge } from 'tailwind-merge' import { useWidthToggle } from '~/components/DocsLayout' import { DocTitle } from '~/components/DocTitle' @@ -146,9 +142,9 @@ function DocContent({ title={isFullWidth ? 'Constrain width' : 'Expand width'} > {isFullWidth ? ( - + ) : ( - + )} )} @@ -186,7 +182,7 @@ function DocContent({ href={`https://github.com/${repo}/edit/${branch}/${filePath}`} className="flex items-center gap-2" > - Edit on GitHub + Edit on GitHub
diff --git a/src/components/DocFeedbackFloatingButton.tsx b/src/components/DocFeedbackFloatingButton.tsx index 60e5cb978..75d2b9a5a 100644 --- a/src/components/DocFeedbackFloatingButton.tsx +++ b/src/components/DocFeedbackFloatingButton.tsx @@ -1,6 +1,6 @@ import * as React from 'react' -import { FaPlus, FaComment, FaLightbulb } from 'react-icons/fa' import { twMerge } from 'tailwind-merge' +import { Lightbulb, MessageSquare, Plus } from 'lucide-react' interface DocFeedbackFloatingButtonProps { onAddNote: () => void @@ -111,7 +111,7 @@ export function DocFeedbackFloatingButton({ )} title="Add feedback" > - - +
Add Note @@ -148,7 +148,7 @@ export function DocFeedbackFloatingButton({ onClick={handleFeedbackClick} className="w-full px-4 py-3 flex items-center gap-3 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors text-left" > - +
Suggest Improvement diff --git a/src/components/DocFeedbackNote.tsx b/src/components/DocFeedbackNote.tsx index cc1e4b5d3..b8220a8a2 100644 --- a/src/components/DocFeedbackNote.tsx +++ b/src/components/DocFeedbackNote.tsx @@ -1,22 +1,21 @@ import * as React from 'react' import { twMerge } from 'tailwind-merge' -import { - FaComment, - FaLightbulb, - FaTrash, - FaChevronDown, - FaChevronUp, - FaSave, - FaTimes, -} from 'react-icons/fa' import { useMutation, useQueryClient } from '@tanstack/react-query' import { deleteDocFeedback, updateDocFeedback, updateDocFeedbackCollapsed, } from '~/utils/docFeedback.functions' -import { useToast } from '~/components/ToastProvider' import type { DocFeedback } from '~/db/schema' +import { + ChevronDown, + ChevronUp, + Lightbulb, + MessageSquare, + Save, + Trash, + X, +} from 'lucide-react' interface DocFeedbackNoteProps { note: DocFeedback @@ -42,13 +41,13 @@ export function DocFeedbackNote({ // Theme based on type const isImprovement = note.type === 'improvement' - const Icon = isImprovement ? FaLightbulb : FaComment + const Icon = isImprovement ? Lightbulb : MessageSquare const colors = isImprovement ? { bg: 'bg-yellow-50 dark:bg-yellow-900/20', border: 'border-yellow-400 dark:border-yellow-600', header: 'bg-yellow-100 dark:bg-yellow-900/30', - icon: 'text-yellow-600 dark:text-yellow-500', + icon: 'text-yellow-600 dark:text-yellow-500 text-[14px]', text: 'text-yellow-800 dark:text-yellow-300', timestamp: 'text-yellow-700 dark:text-yellow-400', deleteHover: 'hover:text-yellow-600 dark:hover:text-yellow-400', @@ -57,7 +56,7 @@ export function DocFeedbackNote({ bg: 'bg-blue-50 dark:bg-blue-900/20', border: 'border-blue-400 dark:border-blue-600', header: 'bg-blue-100 dark:bg-blue-900/30', - icon: 'text-blue-600 dark:text-blue-500', + icon: 'text-blue-600 dark:text-blue-500 text-[14px]', text: 'text-blue-800 dark:text-blue-300', timestamp: 'text-blue-700 dark:text-blue-400', deleteHover: 'hover:text-blue-600 dark:hover:text-blue-400', @@ -377,7 +376,7 @@ export function DocFeedbackNote({ title={isImprovement ? 'Delete improvement' : 'Delete note'} disabled={isDeleting || isSaving} > - + )} @@ -394,9 +393,9 @@ export function DocFeedbackNote({ } > {note.isCollapsed ? ( - + ) : ( - + )}
@@ -444,7 +443,7 @@ export function DocFeedbackNote({ )} disabled={isSaving} > - + {isSaving ? 'Saving...' : 'Save'}
diff --git a/src/components/DocFeedbackProvider.tsx b/src/components/DocFeedbackProvider.tsx index 3ca046c08..a0a6cde08 100644 --- a/src/components/DocFeedbackProvider.tsx +++ b/src/components/DocFeedbackProvider.tsx @@ -2,7 +2,6 @@ import * as React from 'react' import * as ReactDOM from 'react-dom' import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query' import { twMerge } from 'tailwind-merge' -import { FaComment, FaLightbulb } from 'react-icons/fa' import { DocFeedbackNote } from './DocFeedbackNote' import { DocFeedbackFloatingButton } from './DocFeedbackFloatingButton' import { getDocFeedbackForPageQueryOptions } from '~/queries/docFeedback' @@ -13,6 +12,7 @@ import { getBlockIdentifier, } from '~/utils/docFeedback.client' import type { DocFeedback } from '~/db/schema' +import { Lightbulb, MessageSquare } from 'lucide-react' interface DocFeedbackProviderProps { children: React.ReactNode @@ -536,21 +536,21 @@ function CreatingFeedbackNote({ // Theme based on type const isImprovement = type === 'improvement' - const Icon = isImprovement ? FaLightbulb : FaComment + const Icon = isImprovement ? Lightbulb : MessageSquare const colors = isImprovement ? { bg: 'bg-yellow-50 dark:bg-yellow-900/20', border: 'border-yellow-400 dark:border-yellow-600', header: 'bg-yellow-100 dark:bg-yellow-900/30', - icon: 'text-yellow-600 dark:text-yellow-500', + icon: 'text-yellow-600 dark:text-yellow-500 text-[14px]', text: 'text-yellow-800 dark:text-yellow-300', } : { bg: 'bg-blue-50 dark:bg-blue-900/20', border: 'border-blue-400 dark:border-blue-600', header: 'bg-blue-100 dark:bg-blue-900/30', - icon: 'text-blue-600 dark:text-blue-500', + icon: 'text-blue-600 dark:text-blue-500 text-[14px]', text: 'text-blue-800 dark:text-blue-300', } diff --git a/src/components/DocsLayout.tsx b/src/components/DocsLayout.tsx index 68d7e155b..9a10df7c2 100644 --- a/src/components/DocsLayout.tsx +++ b/src/components/DocsLayout.tsx @@ -1,6 +1,7 @@ import * as React from 'react' -import { CgClose, CgMenuLeft } from 'react-icons/cg' -import { FaArrowLeft, FaArrowRight, FaDiscord, FaGithub } from 'react-icons/fa' +import { X, TextAlignStart, ArrowLeft, ArrowRight } from 'lucide-react' +import { GithubIcon } from '~/components/icons/GithubIcon' +import { DiscordIcon } from '~/components/icons/DiscordIcon' import { Link, useMatches, useParams } from '@tanstack/react-router' import { useLocalStorage } from '~/utils/useLocalStorage' import { last } from '~/utils/utils' @@ -79,7 +80,7 @@ const useMenuConfig = ({ { label: (
- GitHub + GitHub
), to: `https://github.com/${repo}`, @@ -87,7 +88,7 @@ const useMenuConfig = ({ { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', @@ -140,14 +141,11 @@ type DocsLayoutProps = { } export function DocsLayout({ - name, - version, colorFrom, colorTo, textColor, config, frameworks, - versions, repo, children, }: DocsLayoutProps) { @@ -155,8 +153,6 @@ export function DocsLayout({ from: '/$libraryId/$version/docs', }) const { _splat } = useParams({ strict: false }) - // const frameworkConfig = useFrameworkConfig({ frameworks }) - // const versionConfig = useVersionConfig({ versions }) const menuConfig = useMenuConfig({ config, frameworks, repo }) const matches = useMatches() @@ -292,8 +288,8 @@ export function DocsLayout({ >
- - + + Documentation
@@ -363,7 +359,7 @@ export function DocsLayout({ className="py-1 px-2 bg-white/70 text-black dark:bg-gray-500/40 dark:text-white shadow-lg shadow-black/20 flex items-center justify-center backdrop-blur-sm z-20 rounded-lg overflow-hidden" >
- + {prevItem.label}
@@ -383,7 +379,7 @@ export function DocsLayout({ > {nextItem.label} {' '} - +
) : null} diff --git a/src/components/FeatureGrid.tsx b/src/components/FeatureGrid.tsx index ac332652e..df1b44434 100644 --- a/src/components/FeatureGrid.tsx +++ b/src/components/FeatureGrid.tsx @@ -1,5 +1,5 @@ import * as React from 'react' -import { FaCheckCircle } from 'react-icons/fa' +import { CheckCircleIcon } from '~/components/icons/CheckCircleIcon' type FeatureGridProps = { title?: string @@ -25,7 +25,7 @@ export function FeatureGrid({ title, items, gridClassName }: FeatureGridProps) { > {items.map((d, i) => ( - {d} + {d} ))}
diff --git a/src/components/FeedEntry.tsx b/src/components/FeedEntry.tsx index 80a5e1b18..b90a36844 100644 --- a/src/components/FeedEntry.tsx +++ b/src/components/FeedEntry.tsx @@ -3,9 +3,9 @@ import { Markdown } from '~/components/Markdown' import { libraries } from '~/libraries' import { partners } from '~/utils/partners' import { twMerge } from 'tailwind-merge' -import { FaEdit, FaTrash, FaEye, FaEyeSlash, FaStar } from 'react-icons/fa' import { Link } from '@tanstack/react-router' import { TableRow, TableCell } from '~/components/TableComponents' +import { Eye, EyeOff, SquarePen, Star, Trash } from 'lucide-react' export interface FeedEntry { _id: string @@ -303,7 +303,7 @@ export function FeedEntry({ className="p-0.5 hover:bg-gray-100 dark:hover:bg-gray-700 rounded transition-colors text-gray-600 dark:text-gray-400" title="Edit" > - + )} {adminActions.onToggleVisibility && ( @@ -315,9 +315,9 @@ export function FeedEntry({ title={entry.isVisible ? 'Hide' : 'Show'} > {entry.isVisible ? ( - + ) : ( - + )} )} @@ -333,7 +333,7 @@ export function FeedEntry({ }`} title="Toggle Featured" > - + )} {adminActions.onDelete && ( @@ -342,7 +342,7 @@ export function FeedEntry({ className="p-0.5 hover:bg-red-100 dark:hover:bg-red-900 rounded transition-colors text-red-500" title="Delete" > - + )}
diff --git a/src/components/FeedEntryTimeline.tsx b/src/components/FeedEntryTimeline.tsx index 5fd745bd3..70d97780a 100644 --- a/src/components/FeedEntryTimeline.tsx +++ b/src/components/FeedEntryTimeline.tsx @@ -4,9 +4,9 @@ import { Markdown } from '~/components/Markdown' import { libraries } from '~/libraries' import { partners } from '~/utils/partners' import { twMerge } from 'tailwind-merge' -import { FaEdit, FaTrash, FaEye, FaEyeSlash, FaStar } from 'react-icons/fa' import { FeedEntry } from './FeedEntry' import { Link } from '@tanstack/react-router' +import { Eye, EyeOff, SquarePen, Star, Trash } from 'lucide-react' interface FeedEntryTimelineProps { entry: FeedEntry @@ -250,7 +250,7 @@ export function FeedEntryTimeline({ className="p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded transition-colors text-gray-600 dark:text-gray-400" title="Edit" > - + )} {adminActions.onToggleVisibility && ( @@ -262,9 +262,9 @@ export function FeedEntryTimeline({ title={entry.isVisible ? 'Hide' : 'Show'} > {entry.isVisible ? ( - + ) : ( - + )} )} @@ -281,7 +281,7 @@ export function FeedEntryTimeline({ )} title="Toggle Featured" > - + )} {adminActions.onDelete && ( @@ -290,7 +290,7 @@ export function FeedEntryTimeline({ className="p-2 hover:bg-red-100 dark:hover:bg-red-900 rounded transition-colors text-red-500" title="Delete" > - + )} diff --git a/src/components/FeedFilters.tsx b/src/components/FeedFilters.tsx index edabfcdc7..deae897b8 100644 --- a/src/components/FeedFilters.tsx +++ b/src/components/FeedFilters.tsx @@ -1,10 +1,9 @@ import * as React from 'react' import { useState } from 'react' -import { LuHelpCircle, LuRotateCcw } from 'react-icons/lu' +import { RotateCcw } from 'lucide-react' import { useDebouncedValue } from '@tanstack/react-pacer' import { Library, type LibraryId } from '~/libraries' import { partners } from '~/utils/partners' -import { Tooltip } from '~/components/Tooltip' import { FEED_CATEGORIES, RELEASE_LEVELS, @@ -477,7 +476,7 @@ export function FeedFilters({ onClick={onClearFilters} className="flex items-center gap-1.5 px-2.5 py-1.5 text-xs font-medium bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-700 dark:text-gray-300 rounded transition-colors" > - + Reset Filters diff --git a/src/components/FeedbackLeaderboard.tsx b/src/components/FeedbackLeaderboard.tsx index 1e747e638..0f9a7b051 100644 --- a/src/components/FeedbackLeaderboard.tsx +++ b/src/components/FeedbackLeaderboard.tsx @@ -14,7 +14,7 @@ import { } from './TableComponents' import { PaginationControls } from './PaginationControls' import { twMerge } from 'tailwind-merge' -import { FaTrophy, FaMedal, FaAward } from 'react-icons/fa' +import { Award, Medal, Trophy } from 'lucide-react' export function FeedbackLeaderboard() { const navigate = useNavigate({ from: '/_libraries/feedback-leaderboard' }) @@ -67,9 +67,9 @@ export function FeedbackLeaderboard() { } const getRankIcon = (rank: number) => { - if (rank === 1) return - if (rank === 2) return - if (rank === 3) return + if (rank === 1) return + if (rank === 2) return + if (rank === 3) return return null } @@ -79,7 +79,7 @@ export function FeedbackLeaderboard() {
- +

Documentation Feedback Leaderboard

diff --git a/src/components/FeedbackModerationList.tsx b/src/components/FeedbackModerationList.tsx index aa7e32511..45f4d973d 100644 --- a/src/components/FeedbackModerationList.tsx +++ b/src/components/FeedbackModerationList.tsx @@ -1,12 +1,5 @@ import * as React from 'react' import { twMerge } from 'tailwind-merge' -import { - FaCheck, - FaTimes, - FaComment, - FaLightbulb, - FaExclamationTriangle, -} from 'react-icons/fa' import { Table, TableHeader, @@ -20,6 +13,8 @@ import { PaginationControls } from './PaginationControls' import { Spinner } from './Spinner' import type { DocFeedback } from '~/db/schema' import { calculatePoints } from '~/utils/docFeedback.client' +import { Check, Lightbulb, TriangleAlert } from 'lucide-react' +import { MessageSquare, X } from 'lucide-react' interface FeedbackModerationListProps { data: @@ -174,9 +169,9 @@ export function FeedbackModerationList({
{feedback.type === 'note' ? ( - + ) : ( - + )} {feedback.type === 'note' ? 'Note' : 'Improvement'} @@ -213,7 +208,7 @@ export function FeedbackModerationList({ {feedback.isDetached && (
- + Detached
)} @@ -235,14 +230,14 @@ export function FeedbackModerationList({ className="px-3 py-1 text-xs font-medium text-white bg-green-600 hover:bg-green-700 rounded transition-colors" title="Approve" > - +
)} @@ -309,7 +304,10 @@ export function FeedbackModerationList({ {/* Moderation Note Input (for pending only) */} {isPending && (
-