|
| 1 | +import { VscPreview, VscWand } from 'react-icons/vsc' |
| 2 | +import { Library } from '.' |
| 3 | +import { FaGithub, FaBolt, FaCogs } from 'react-icons/fa' |
| 4 | +import { BiBookAlt } from 'react-icons/bi' |
| 5 | +import { twMerge } from 'tailwind-merge' |
| 6 | + |
| 7 | +const repo = 'tanstack/optimistic' |
| 8 | + |
| 9 | +const textStyles = `text-orange-600 dark:text-orange-500` |
| 10 | + |
| 11 | +export const optimisticProject = { |
| 12 | + id: 'optimistic', |
| 13 | + name: 'TanStack Optimistic', |
| 14 | + cardStyles: `shadow-xl shadow-orange-700/20 dark:shadow-lg dark:shadow-orange-500/20 text-orange-500 dark:text-orange-400 border-2 border-transparent hover:border-current`, |
| 15 | + to: '/optimistic', |
| 16 | + tagline: `Framework agnostic debouncing, throttling, and queueing utilities`, |
| 17 | + description: `Set the pace of interactions in your applications. Limit the rate at which functions can fire, or intelligently queue long-running tasks with Concurrency Control.`, |
| 18 | + ogImage: |
| 19 | + 'https://github.com/tanstack/optimistic/raw/main/media/repo-header.png', |
| 20 | + badge: 'soon', |
| 21 | + bgStyle: `bg-orange-700`, |
| 22 | + textStyle: `text-orange-500`, |
| 23 | + repo, |
| 24 | + latestBranch: 'main', |
| 25 | + latestVersion: 'v0', |
| 26 | + availableVersions: ['v0'], |
| 27 | + colorFrom: `from-orange-500`, |
| 28 | + colorTo: `to-orange-700`, |
| 29 | + textColor: `text-orange-700`, |
| 30 | + frameworks: ['react', 'solid'], |
| 31 | + scarfId: '302d0fef-cb3f-43c6-b45c-f055b9745edb', |
| 32 | + defaultDocs: 'overview', |
| 33 | + menu: [ |
| 34 | + { |
| 35 | + icon: <VscPreview />, |
| 36 | + label: 'Examples', |
| 37 | + to: '/optimistic/latest/docs/framework/react/examples/simple', |
| 38 | + }, |
| 39 | + { |
| 40 | + icon: <BiBookAlt />, |
| 41 | + label: 'Docs', |
| 42 | + to: '/optimistic/latest/docs', |
| 43 | + }, |
| 44 | + { |
| 45 | + icon: <FaGithub />, |
| 46 | + label: 'Github', |
| 47 | + to: `https://github.com/${repo}`, |
| 48 | + }, |
| 49 | + ], |
| 50 | + featureHighlights: [ |
| 51 | + { |
| 52 | + title: 'Framework Agnostic & Type-Safe', |
| 53 | + icon: <VscWand className={twMerge(textStyles)} />, |
| 54 | + description: ( |
| 55 | + <div> |
| 56 | + TanStack Optimistic provides an intuitive and flexible API that works |
| 57 | + across any JavaScript framework.{' '} |
| 58 | + <span className={twMerge('font-semibold', textStyles)}> |
| 59 | + Every utility is fully type-safe with reactive framework adapters |
| 60 | + </span>{' '} |
| 61 | + that seamlessly connect to your state management of choice. Choose |
| 62 | + from multiple layers of abstraction to confidently control timing in |
| 63 | + your applications. |
| 64 | + </div> |
| 65 | + ), |
| 66 | + }, |
| 67 | + { |
| 68 | + title: 'Flexible Rate Limiting Controls', |
| 69 | + icon: <FaBolt className={twMerge(textStyles)} />, |
| 70 | + description: ( |
| 71 | + <div> |
| 72 | + Take control of your application's timing with powerful utilities for{' '} |
| 73 | + <span className={twMerge('font-semibold', textStyles)}> |
| 74 | + rate limiting, throttling, and debouncing |
| 75 | + </span> |
| 76 | + . Leverage built-in cleanup and cancellation capabilities to help you |
| 77 | + manage execution timing with precision while preventing memory leaks. |
| 78 | + Flexible configuration options let you fine-tune the behavior to match |
| 79 | + your needs. |
| 80 | + </div> |
| 81 | + ), |
| 82 | + }, |
| 83 | + { |
| 84 | + title: 'Async/Sync Queue Management', |
| 85 | + icon: <FaCogs className={twMerge(textStyles)} />, |
| 86 | + description: ( |
| 87 | + <div> |
| 88 | + Handle complex asynchronous workflows with intelligent queuing and |
| 89 | + concurrency control.{' '} |
| 90 | + <span className={twMerge('font-semibold', textStyles)}> |
| 91 | + Manage long-running tasks with FIFO/LIFO ordering, priority queuing, |
| 92 | + and parallel execution |
| 93 | + </span> |
| 94 | + . Built-in pause, resume and cancel capabilities give you complete |
| 95 | + control over your queue's lifecycle. Perfect for managing API calls, |
| 96 | + animations, and other sequential operations. |
| 97 | + </div> |
| 98 | + ), |
| 99 | + }, |
| 100 | + ], |
| 101 | +} satisfies Library |
0 commit comments