├── .nvmrc
├── .cursorignore
├── .npmrc
├── packages
├── react-pacer
│ ├── src
│ │ ├── provider
│ │ │ └── index.ts
│ │ ├── types
│ │ │ └── index.ts
│ │ ├── utils
│ │ │ └── index.ts
│ │ ├── batcher
│ │ │ └── index.ts
│ │ ├── async-queuer
│ │ │ └── index.ts
│ │ ├── async-batcher
│ │ │ └── index.ts
│ │ ├── async-retryer
│ │ │ └── index.ts
│ │ ├── queuer
│ │ │ └── index.ts
│ │ ├── rate-limiter
│ │ │ └── index.ts
│ │ ├── async-debouncer
│ │ │ └── index.ts
│ │ ├── async-throttler
│ │ │ └── index.ts
│ │ ├── async-rate-limiter
│ │ │ └── index.ts
│ │ ├── debouncer
│ │ │ └── index.ts
│ │ └── throttler
│ │ │ └── index.ts
│ ├── tsconfig.docs.json
│ ├── tsconfig.json
│ └── vitest.config.ts
├── solid-pacer
│ ├── src
│ │ ├── provider
│ │ │ └── index.ts
│ │ ├── types
│ │ │ └── index.ts
│ │ ├── utils
│ │ │ └── index.ts
│ │ ├── batcher
│ │ │ └── index.ts
│ │ ├── async-batcher
│ │ │ └── index.ts
│ │ ├── async-queuer
│ │ │ └── index.ts
│ │ ├── queuer
│ │ │ └── index.ts
│ │ ├── rate-limiter
│ │ │ └── index.ts
│ │ ├── async-debouncer
│ │ │ └── index.ts
│ │ ├── async-throttler
│ │ │ └── index.ts
│ │ ├── async-rate-limiter
│ │ │ └── index.ts
│ │ ├── debouncer
│ │ │ └── index.ts
│ │ └── throttler
│ │ │ └── index.ts
│ ├── tsconfig.docs.json
│ ├── tsconfig.json
│ ├── eslint.config.js
│ └── vitest.config.ts
├── pacer
│ ├── tests
│ │ └── test-setup.ts
│ ├── tsconfig.docs.json
│ ├── tsconfig.json
│ ├── eslint.config.js
│ ├── vitest.config.ts
│ └── src
│ │ ├── utils.ts
│ │ └── types.ts
├── preact-pacer
│ ├── src
│ │ ├── provider
│ │ │ └── index.ts
│ │ ├── types
│ │ │ └── index.ts
│ │ ├── utils
│ │ │ └── index.ts
│ │ ├── batcher
│ │ │ └── index.ts
│ │ ├── async-queuer
│ │ │ └── index.ts
│ │ ├── async-batcher
│ │ │ └── index.ts
│ │ ├── async-retryer
│ │ │ └── index.ts
│ │ ├── queuer
│ │ │ └── index.ts
│ │ ├── rate-limiter
│ │ │ └── index.ts
│ │ ├── async-debouncer
│ │ │ └── index.ts
│ │ ├── async-throttler
│ │ │ └── index.ts
│ │ ├── async-rate-limiter
│ │ │ └── index.ts
│ │ ├── debouncer
│ │ │ └── index.ts
│ │ └── throttler
│ │ │ └── index.ts
│ ├── tsconfig.docs.json
│ ├── tsconfig.json
│ ├── vitest.config.ts
│ ├── eslint.config.js
│ └── CHANGELOG.md
├── pacer-devtools
│ ├── tests
│ │ ├── test-setup.ts
│ │ └── index.test.ts
│ ├── tsconfig.docs.json
│ ├── src
│ │ ├── production.ts
│ │ ├── PacerDevtools.tsx
│ │ ├── index.ts
│ │ └── core.tsx
│ ├── eslint.config.js
│ ├── tsconfig.json
│ ├── vitest.config.ts
│ └── tsdown.config.ts
├── react-pacer-devtools
│ ├── tests
│ │ ├── test-setup.ts
│ │ └── index.test.ts
│ ├── tsconfig.docs.json
│ ├── tsconfig.json
│ ├── src
│ │ ├── production.ts
│ │ ├── plugin.tsx
│ │ ├── ReactPacerDevtools.tsx
│ │ └── index.ts
│ ├── vitest.config.ts
│ └── tsdown.config.ts
├── solid-pacer-devtools
│ ├── tests
│ │ ├── test-setup.ts
│ │ └── index.test.ts
│ ├── tsconfig.docs.json
│ ├── src
│ │ ├── production.ts
│ │ ├── plugin.tsx
│ │ ├── SolidPacerDevtools.tsx
│ │ └── index.ts
│ ├── eslint.config.js
│ ├── tsconfig.json
│ ├── vitest.config.ts
│ └── tsdown.config.ts
├── pacer-lite
│ ├── tsconfig.json
│ ├── src
│ │ └── index.ts
│ ├── vitest.config.ts
│ ├── CHANGELOG.md
│ └── tsdown.config.ts
└── preact-pacer-devtools
│ ├── tests
│ ├── index.test.ts
│ └── test-setup.ts
│ ├── src
│ ├── production.ts
│ ├── plugin.tsx
│ ├── PreactPacerDevtools.tsx
│ └── index.ts
│ ├── eslint.config.js
│ ├── tsconfig.json
│ ├── CHANGELOG.md
│ ├── vitest.config.ts
│ └── tsdown.config.ts
├── .gitattributes
├── media
└── header_pacer.png
├── .github
├── FUNDING.yml
└── ISSUE_TEMPLATE
│ └── config.yml
├── docs
├── guides
│ └── server-rate-limiting.md
├── reference
│ ├── variables
│ │ └── pacerEventClient.md
│ ├── type-aliases
│ │ ├── PacerEventName.md
│ │ ├── OptionalKeys.md
│ │ ├── QueuePosition.md
│ │ ├── AnyFunction.md
│ │ └── AnyAsyncFunction.md
│ └── functions
│ │ └── isFunction.md
└── framework
│ ├── react
│ └── reference
│ │ └── functions
│ │ ├── usePacerContext.md
│ │ ├── useDefaultPacerOptions.md
│ │ └── PacerProvider.md
│ ├── solid
│ └── reference
│ │ └── functions
│ │ ├── usePacerContext.md
│ │ ├── useDefaultPacerOptions.md
│ │ └── PacerProvider.md
│ └── preact
│ └── reference
│ └── functions
│ ├── usePacerContext.md
│ ├── useDefaultPacerOptions.md
│ └── PacerProvider.md
├── examples
├── preact
│ ├── batch
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ └── index.html
│ ├── debounce
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ └── index.html
│ ├── queue
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ └── index.html
│ ├── throttle
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ └── index.html
│ ├── asyncBatch
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ └── index.html
│ ├── asyncDebounce
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── asyncRetry
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ └── index.html
│ ├── asyncThrottle
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── rateLimit
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ └── index.html
│ ├── useBatcher
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ └── index.html
│ ├── useDebouncer
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useQueuer
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ └── index.html
│ ├── useThrottler
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── asyncRateLimit
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useAsyncBatcher
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useAsyncDebouncer
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useAsyncQueuer
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useAsyncThrottler
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useBatchedCallback
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useDebouncedState
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useDebouncedValue
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useQueuedState
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useQueuedValue
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useRateLimiter
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useThrottledState
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useThrottledValue
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── util-comparison
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useAsyncBatchedCallback
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useAsyncQueuedState
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useAsyncRateLimiter
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useDebouncedCallback
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useQueuerWithPersister
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useRateLimitedCallback
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useRateLimitedState
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useRateLimitedValue
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useThrottledCallback
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useAsyncDebouncedCallback
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useAsyncThrottledCallback
│ │ ├── README.md
│ │ └── vite.config.ts
│ ├── useRateLimiterWithPersister
│ │ ├── README.md
│ │ └── vite.config.ts
│ └── useAsyncRateLimiterWithPersister
│ │ ├── README.md
│ │ └── vite.config.ts
├── react
│ ├── batch
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── debounce
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── queue
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── rateLimit
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── throttle
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useQueuer
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── asyncDebounce
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── asyncRateLimit
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── asyncThrottle
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useAsyncQueuer
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useBatcher
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useDebouncer
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useQueuedState
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useQueuedValue
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useRateLimiter
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useThrottler
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useAsyncDebouncer
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useAsyncQueuedState
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useAsyncRateLimiter
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useAsyncThrottler
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useBatchedCallback
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useDebouncedState
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useDebouncedValue
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useRateLimitedState
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useRateLimitedValue
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useThrottledState
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useThrottledValue
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useAsyncBatchedCallback
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ └── index.html
│ ├── useDebouncedCallback
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useRateLimitedCallback
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useThrottledCallback
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── react-query-queued-prefetch
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useAsyncDebouncedCallback
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ └── index.html
│ ├── useAsyncThrottledCallback
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ └── index.html
│ ├── react-query-debounced-prefetch
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── react-query-throttled-prefetch
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── useAsyncBatcher
│ │ ├── README.md
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── asyncBatch
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── asyncRetry
│ │ ├── .eslintrc.cjs
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ ├── util-comparison
│ │ ├── vite.config.ts
│ │ └── index.html
│ └── useQueuerWithPersister
│ │ └── vite.config.ts
├── solid
│ ├── batch
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ ├── .gitignore
│ │ └── index.html
│ ├── debounce
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── queue
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ ├── .gitignore
│ │ └── index.html
│ ├── rateLimit
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── throttle
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── asyncDebounce
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── asyncRateLimit
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── asyncThrottle
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── createBatcher
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── createQueuer
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── createAsyncQueuer
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── createDebouncer
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── createRateLimiter
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── createThrottler
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── createAsyncDebouncer
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── createAsyncRateLimiter
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── createAsyncThrottler
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── createDebouncedSignal
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── createDebouncedValue
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── createRateLimitedSignal
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── createRateLimitedValue
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── createThrottledSignal
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── createThrottledValue
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ ├── .eslintrc.cjs
│ │ └── .gitignore
│ ├── asyncBatch
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ └── index.html
│ ├── createAsyncBatcher
│ │ ├── README.md
│ │ ├── vite.config.ts
│ │ └── .gitignore
│ └── createQueuedSignal
│ │ └── vite.config.ts
└── vanilla
│ ├── LiteQueuer
│ ├── vite.config.ts
│ ├── package.json
│ └── index.html
│ ├── liteBatch
│ ├── vite.config.ts
│ ├── package.json
│ └── index.html
│ ├── liteQueue
│ ├── vite.config.ts
│ ├── package.json
│ └── index.html
│ ├── LiteBatcher
│ ├── vite.config.ts
│ ├── package.json
│ └── index.html
│ ├── LiteDebouncer
│ ├── vite.config.ts
│ ├── package.json
│ └── index.html
│ ├── LiteRateLimiter
│ ├── vite.config.ts
│ ├── package.json
│ └── index.html
│ ├── LiteThrottler
│ ├── vite.config.ts
│ ├── package.json
│ └── index.html
│ ├── liteDebounce
│ ├── vite.config.ts
│ ├── package.json
│ └── index.html
│ ├── liteRateLimit
│ ├── vite.config.ts
│ ├── package.json
│ └── index.html
│ └── liteThrottle
│ ├── vite.config.ts
│ ├── package.json
│ └── index.html
├── .vscode
└── extensions.json
├── .nx
└── workflows
│ └── dynamic-changesets.yaml
├── pnpm-workspace.yaml
├── .prettierignore
├── .editorconfig
├── knip.json
├── prettier.config.js
└── .changeset
└── config.json
/.nvmrc:
--------------------------------------------------------------------------------
1 | 24.8.0
2 |
--------------------------------------------------------------------------------
/.cursorignore:
--------------------------------------------------------------------------------
1 | **/reference/**
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | provenance=true
2 |
--------------------------------------------------------------------------------
/packages/react-pacer/src/provider/index.ts:
--------------------------------------------------------------------------------
1 | export * from './PacerProvider'
2 |
--------------------------------------------------------------------------------
/packages/solid-pacer/src/provider/index.ts:
--------------------------------------------------------------------------------
1 | export * from './PacerProvider'
2 |
--------------------------------------------------------------------------------
/packages/pacer/tests/test-setup.ts:
--------------------------------------------------------------------------------
1 | import '@testing-library/jest-dom/vitest'
2 |
--------------------------------------------------------------------------------
/packages/preact-pacer/src/provider/index.ts:
--------------------------------------------------------------------------------
1 | export * from './PacerProvider'
2 |
--------------------------------------------------------------------------------
/packages/preact-pacer/src/types/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/types'
2 |
--------------------------------------------------------------------------------
/packages/preact-pacer/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/utils'
2 |
--------------------------------------------------------------------------------
/packages/react-pacer/src/types/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/types'
2 |
--------------------------------------------------------------------------------
/packages/react-pacer/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/utils'
2 |
--------------------------------------------------------------------------------
/packages/solid-pacer/src/types/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/types'
2 |
--------------------------------------------------------------------------------
/packages/solid-pacer/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/utils'
2 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/packages/pacer-devtools/tests/test-setup.ts:
--------------------------------------------------------------------------------
1 | import '@testing-library/jest-dom/vitest'
2 |
--------------------------------------------------------------------------------
/media/header_pacer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TanStack/pacer/HEAD/media/header_pacer.png
--------------------------------------------------------------------------------
/packages/react-pacer-devtools/tests/test-setup.ts:
--------------------------------------------------------------------------------
1 | import '@testing-library/jest-dom/vitest'
2 |
--------------------------------------------------------------------------------
/packages/solid-pacer-devtools/tests/test-setup.ts:
--------------------------------------------------------------------------------
1 | import '@testing-library/jest-dom/vitest'
2 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: tannerlinsley
4 |
--------------------------------------------------------------------------------
/packages/pacer/tsconfig.docs.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "include": ["tests", "src"]
4 | }
5 |
--------------------------------------------------------------------------------
/docs/guides/server-rate-limiting.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Server Rate Limiting Guide
3 | id: server-rate-limiting
4 | ---
5 |
6 |
--------------------------------------------------------------------------------
/examples/preact/batch/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/debounce/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/queue/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/throttle/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/batch/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/debounce/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/queue/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/rateLimit/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/throttle/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useQueuer/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/batch/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/debounce/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/queue/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/rateLimit/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/throttle/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/asyncBatch/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/asyncDebounce/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/asyncRetry/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/asyncThrottle/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/rateLimit/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useBatcher/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useDebouncer/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useQueuer/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useThrottler/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/asyncDebounce/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/asyncRateLimit/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/asyncThrottle/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useAsyncQueuer/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useBatcher/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useDebouncer/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useQueuedState/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useQueuedValue/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useRateLimiter/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useThrottler/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/asyncDebounce/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/asyncRateLimit/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/asyncThrottle/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/createBatcher/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/createQueuer/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/packages/pacer-devtools/tsconfig.docs.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "include": ["tests", "src"]
4 | }
5 |
--------------------------------------------------------------------------------
/packages/solid-pacer/src/batcher/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/batcher'
2 |
3 | export * from './createBatcher'
4 |
--------------------------------------------------------------------------------
/examples/preact/asyncRateLimit/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncBatcher/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncDebouncer/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncQueuer/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncThrottler/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useBatchedCallback/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useDebouncedState/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useDebouncedValue/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useQueuedState/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useQueuedValue/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useRateLimiter/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useThrottledState/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useThrottledValue/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/util-comparison/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useAsyncDebouncer/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useAsyncQueuedState/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useAsyncRateLimiter/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useAsyncThrottler/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useBatchedCallback/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useDebouncedState/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useDebouncedValue/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useRateLimitedState/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useRateLimitedValue/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useThrottledState/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useThrottledValue/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/createAsyncQueuer/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/createDebouncer/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/createRateLimiter/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/createThrottler/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/packages/pacer-lite/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["src", "vitest.config.ts"]
4 | }
5 |
--------------------------------------------------------------------------------
/packages/react-pacer-devtools/tsconfig.docs.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "include": ["tests", "src"]
4 | }
5 |
--------------------------------------------------------------------------------
/packages/solid-pacer-devtools/tsconfig.docs.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "include": ["tests", "src"]
4 | }
5 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncBatchedCallback/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncQueuedState/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncRateLimiter/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useDebouncedCallback/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useQueuerWithPersister/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useRateLimitedCallback/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useRateLimitedState/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useRateLimitedValue/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useThrottledCallback/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useAsyncBatchedCallback/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useDebouncedCallback/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useRateLimitedCallback/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useThrottledCallback/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/createAsyncDebouncer/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/createAsyncRateLimiter/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/createAsyncThrottler/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/createDebouncedSignal/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/createDebouncedValue/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/createRateLimitedSignal/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/createRateLimitedValue/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/createThrottledSignal/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/createThrottledValue/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncDebouncedCallback/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncThrottledCallback/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/preact/useRateLimiterWithPersister/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/react-query-queued-prefetch/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useAsyncDebouncedCallback/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useAsyncThrottledCallback/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/asyncBatch/README.md:
--------------------------------------------------------------------------------
1 | # createAsyncBatcher Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/packages/solid-pacer/src/async-batcher/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/async-batcher'
2 |
3 | export * from './createAsyncBatcher'
4 |
--------------------------------------------------------------------------------
/packages/solid-pacer/src/async-queuer/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/async-queuer'
2 |
3 | export * from './createAsyncQueuer'
4 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncRateLimiterWithPersister/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/react-query-debounced-prefetch/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/react-query-throttled-prefetch/README.md:
--------------------------------------------------------------------------------
1 | # Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/react/useAsyncBatcher/README.md:
--------------------------------------------------------------------------------
1 | # useAsyncBatcher Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/examples/solid/createAsyncBatcher/README.md:
--------------------------------------------------------------------------------
1 | # createAsyncBatcher Example
2 |
3 | To run this example:
4 |
5 | - `npm install`
6 | - `npm run dev`
7 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | "vitest.explorer",
4 | "dbaeumer.vscode-eslint",
5 | "esbenp.prettier-vscode"
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/packages/pacer-devtools/src/production.ts:
--------------------------------------------------------------------------------
1 | 'use client'
2 |
3 | export { PacerDevtoolsCore } from './core'
4 |
5 | export type { PacerDevtoolsInit } from './core'
6 |
--------------------------------------------------------------------------------
/packages/preact-pacer/src/batcher/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/batcher'
2 |
3 | export * from './useBatcher'
4 | export * from './useBatchedCallback'
5 |
--------------------------------------------------------------------------------
/packages/react-pacer/src/batcher/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/batcher'
2 |
3 | export * from './useBatcher'
4 | export * from './useBatchedCallback'
5 |
--------------------------------------------------------------------------------
/packages/solid-pacer/src/queuer/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/queuer'
2 |
3 | export * from './createQueuer'
4 | export * from './createQueuedSignal'
5 |
--------------------------------------------------------------------------------
/packages/pacer/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["src", "vite.config.ts", "tests"],
4 | "exclude": ["eslint.config.js"]
5 | }
6 |
--------------------------------------------------------------------------------
/.nx/workflows/dynamic-changesets.yaml:
--------------------------------------------------------------------------------
1 | distribute-on:
2 | small-changeset: 3 linux-medium-js
3 | medium-changeset: 6 linux-medium-js
4 | large-changeset: 10 linux-medium-js
5 |
--------------------------------------------------------------------------------
/packages/preact-pacer/src/async-queuer/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/async-queuer'
2 |
3 | export * from './useAsyncQueuer'
4 | export * from './useAsyncQueuedState'
5 |
--------------------------------------------------------------------------------
/packages/react-pacer/src/async-queuer/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/async-queuer'
2 |
3 | export * from './useAsyncQueuer'
4 | export * from './useAsyncQueuedState'
5 |
--------------------------------------------------------------------------------
/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | cleanupUnusedCatalogs: true
2 | linkWorkspacePackages: true
3 | preferWorkspacePackages: true
4 |
5 | packages:
6 | - 'examples/**/*'
7 | - 'packages/*'
8 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | **/.nx/
2 | **/.nx/cache
3 | **/.svelte-kit
4 | **/build
5 | **/coverage
6 | **/dist
7 | **/docs
8 | **/old-examples
9 | pnpm-lock.yaml
10 |
11 | .angular
12 |
--------------------------------------------------------------------------------
/packages/preact-pacer/src/async-batcher/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/async-batcher'
2 |
3 | export * from './useAsyncBatcher'
4 | export * from './useAsyncBatchedCallback'
5 |
--------------------------------------------------------------------------------
/packages/react-pacer/src/async-batcher/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/async-batcher'
2 |
3 | export * from './useAsyncBatcher'
4 | export * from './useAsyncBatchedCallback'
5 |
--------------------------------------------------------------------------------
/packages/react-pacer/src/async-retryer/index.ts:
--------------------------------------------------------------------------------
1 | // re-export everything from the core pacer package, BUT ONLY from the async-retryer module
2 | export * from '@tanstack/pacer/async-retryer'
3 |
--------------------------------------------------------------------------------
/packages/preact-pacer/src/async-retryer/index.ts:
--------------------------------------------------------------------------------
1 | // re-export everything from the core pacer package, BUT ONLY from the async-retryer module
2 | export * from '@tanstack/pacer/async-retryer'
3 |
--------------------------------------------------------------------------------
/packages/preact-pacer/src/queuer/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/queuer'
2 |
3 | export * from './useQueuer'
4 | export * from './useQueuedState'
5 | export * from './useQueuedValue'
6 |
--------------------------------------------------------------------------------
/packages/react-pacer/src/queuer/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/queuer'
2 |
3 | export * from './useQueuer'
4 | export * from './useQueuedState'
5 | export * from './useQueuedValue'
6 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/packages/pacer-devtools/tests/index.test.ts:
--------------------------------------------------------------------------------
1 | import { describe, expect, it } from 'vitest'
2 |
3 | describe('test suite', () => {
4 | it('should work', () => {
5 | expect(true).toBe(true)
6 | })
7 | })
8 |
--------------------------------------------------------------------------------
/packages/pacer-lite/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './lite-debouncer'
2 | export * from './lite-throttler'
3 | export * from './lite-rate-limiter'
4 | export * from './lite-queuer'
5 | export * from './lite-batcher'
6 |
--------------------------------------------------------------------------------
/examples/solid/batch/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/queue/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/packages/react-pacer-devtools/tests/index.test.ts:
--------------------------------------------------------------------------------
1 | import { describe, expect, it } from 'vitest'
2 |
3 | describe('test suite', () => {
4 | it('should work', () => {
5 | expect(true).toBe(true)
6 | })
7 | })
8 |
--------------------------------------------------------------------------------
/packages/solid-pacer-devtools/tests/index.test.ts:
--------------------------------------------------------------------------------
1 | import { describe, expect, it } from 'vitest'
2 |
3 | describe('test suite', () => {
4 | it('should work', () => {
5 | expect(true).toBe(true)
6 | })
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/batch/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/queue/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/asyncBatch/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/debounce/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/rateLimit/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/throttle/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/asyncBatch/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/asyncRetry/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/debounce/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/rateLimit/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/throttle/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useBatcher/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useDebouncer/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useQueuer/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useThrottler/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/asyncDebounce/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/asyncRateLimit/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/asyncThrottle/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/createBatcher/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/createDebouncer/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/createQueuer/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/createThrottler/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/packages/react-pacer/tsconfig.docs.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "paths": {
5 | "@tanstack/pacer": ["../pacer/src"]
6 | }
7 | },
8 | "include": ["src"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/solid-pacer/src/rate-limiter/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/rate-limiter'
2 |
3 | export * from './createRateLimiter'
4 | export * from './createRateLimitedSignal'
5 | export * from './createRateLimitedValue'
6 |
--------------------------------------------------------------------------------
/packages/solid-pacer/tsconfig.docs.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "paths": {
5 | "@tanstack/pacer": ["../pacer/src"]
6 | }
7 | },
8 | "include": ["src"]
9 | }
10 |
--------------------------------------------------------------------------------
/examples/preact/asyncDebounce/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/asyncRateLimit/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/asyncThrottle/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncBatcher/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncDebouncer/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncQueuer/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncThrottler/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useDebouncedState/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useDebouncedValue/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useQueuedState/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useQueuedValue/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useRateLimiter/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useThrottledState/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useThrottledValue/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/util-comparison/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/createAsyncBatcher/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/createAsyncDebouncer/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/createAsyncQueuer/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/createAsyncThrottler/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/createDebouncedValue/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/createQueuedSignal/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/createRateLimiter/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/createThrottledValue/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/packages/preact-pacer/tsconfig.docs.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "paths": {
5 | "@tanstack/pacer": ["../pacer/src"]
6 | }
7 | },
8 | "include": ["src"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/react-pacer/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "jsx": "react"
5 | },
6 | "include": ["src", "vitest.config.ts", "tests"],
7 | "exclude": ["eslint.config.js"]
8 | }
9 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncQueuedState/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncRateLimiter/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useBatchedCallback/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useDebouncedCallback/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useQueuerWithPersister/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useRateLimitedCallback/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useRateLimitedState/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useRateLimitedValue/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useThrottledCallback/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/createAsyncRateLimiter/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/createDebouncedSignal/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/createRateLimitedSignal/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/createRateLimitedValue/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/createThrottledSignal/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import solid from 'vite-plugin-solid'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [solid({})],
7 | })
8 |
--------------------------------------------------------------------------------
/packages/solid-pacer-devtools/src/production.ts:
--------------------------------------------------------------------------------
1 | export { PacerDevtoolsPanel } from './SolidPacerDevtools'
2 |
3 | export type { PacerDevtoolsSolidInit } from './SolidPacerDevtools'
4 |
5 | export { pacerDevtoolsPlugin } from './plugin'
6 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncBatchedCallback/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncDebouncedCallback/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncThrottledCallback/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/preact/useRateLimiterWithPersister/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/react/useAsyncBatchedCallback/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vitejs.dev/config/
5 | export default defineConfig({
6 | plugins: [react()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/react/useAsyncDebouncedCallback/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vitejs.dev/config/
5 | export default defineConfig({
6 | plugins: [react()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/react/useAsyncThrottledCallback/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vitejs.dev/config/
5 | export default defineConfig({
6 | plugins: [react()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/batch/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/debounce/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/queue/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/throttle/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/packages/react-pacer-devtools/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["src", "vitest.config.ts", "tests"],
4 | "exclude": ["eslint.config.js"],
5 | "compilerOptions": {
6 | "jsx": "react"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/packages/solid-pacer/src/async-debouncer/index.ts:
--------------------------------------------------------------------------------
1 | // re-export everything from the core pacer package, BUT ONLY from the async-debouncer module
2 | export * from '@tanstack/pacer/async-debouncer'
3 |
4 | export * from './createAsyncDebouncer'
5 |
--------------------------------------------------------------------------------
/packages/solid-pacer/src/async-throttler/index.ts:
--------------------------------------------------------------------------------
1 | // re-export everything from the core pacer package, BUT ONLY from the async-throttler module
2 | export * from '@tanstack/pacer/async-throttler'
3 |
4 | export * from './createAsyncThrottler'
5 |
--------------------------------------------------------------------------------
/examples/preact/useAsyncRateLimiterWithPersister/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import preact from '@preact/preset-vite'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [preact()],
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/asyncDebounce/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/asyncThrottle/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/createBatcher/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/createQueuer/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/rateLimit/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/packages/preact-pacer-devtools/tests/index.test.ts:
--------------------------------------------------------------------------------
1 | import { describe, it, expect } from 'vitest'
2 |
3 | describe('preact-pacer-devtools', () => {
4 | it('should export pacerDevtoolsPlugin', () => {
5 | expect(true).toBe(true)
6 | })
7 | })
8 |
--------------------------------------------------------------------------------
/examples/solid/asyncRateLimit/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/createAsyncQueuer/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/createDebouncer/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/createRateLimiter/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/createThrottler/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/packages/pacer/eslint.config.js:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | import rootConfig from '../../eslint.config.js'
4 |
5 | /** @type {import('eslint').Linter.Config[]} */
6 | export default [
7 | ...rootConfig,
8 | {
9 | rules: {},
10 | },
11 | ]
12 |
--------------------------------------------------------------------------------
/packages/solid-pacer/src/async-rate-limiter/index.ts:
--------------------------------------------------------------------------------
1 | // re-export everything from the core pacer package, BUT ONLY from the async-rate-limiter module
2 | export * from '@tanstack/pacer/async-rate-limiter'
3 |
4 | export * from './createAsyncRateLimiter'
5 |
--------------------------------------------------------------------------------
/examples/solid/createAsyncDebouncer/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/createAsyncRateLimiter/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/createAsyncThrottler/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/createDebouncedSignal/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/createDebouncedValue/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/createRateLimitedSignal/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/createRateLimitedValue/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/createThrottledSignal/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/examples/solid/createThrottledValue/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: [],
7 | rules: {},
8 | },
9 | }
10 |
11 | module.exports = config
12 |
--------------------------------------------------------------------------------
/packages/react-pacer-devtools/src/production.ts:
--------------------------------------------------------------------------------
1 | 'use client'
2 |
3 | export { PacerDevtoolsPanel } from './ReactPacerDevtools'
4 |
5 | export type { PacerDevtoolsReactInit } from './ReactPacerDevtools'
6 |
7 | export { pacerDevtoolsPlugin } from './plugin'
8 |
--------------------------------------------------------------------------------
/packages/pacer-devtools/eslint.config.js:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | import rootConfig from '../../eslint.config.js'
4 |
5 | /** @type {import('eslint').Linter.Config[]} */
6 | export default [
7 | ...rootConfig,
8 | {
9 | rules: {},
10 | },
11 | ]
12 |
--------------------------------------------------------------------------------
/packages/preact-pacer-devtools/src/production.ts:
--------------------------------------------------------------------------------
1 | 'use client'
2 |
3 | export { PacerDevtoolsPanel } from './PreactPacerDevtools'
4 |
5 | export type { PacerDevtoolsPreactInit } from './PreactPacerDevtools'
6 |
7 | export { pacerDevtoolsPlugin } from './plugin'
8 |
--------------------------------------------------------------------------------
/packages/preact-pacer/src/rate-limiter/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/rate-limiter'
2 |
3 | export * from './useRateLimitedCallback'
4 | export * from './useRateLimiter'
5 | export * from './useRateLimitedState'
6 | export * from './useRateLimitedValue'
7 |
--------------------------------------------------------------------------------
/packages/react-pacer/src/rate-limiter/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@tanstack/pacer/rate-limiter'
2 |
3 | export * from './useRateLimitedCallback'
4 | export * from './useRateLimiter'
5 | export * from './useRateLimitedState'
6 | export * from './useRateLimitedValue'
7 |
--------------------------------------------------------------------------------
/packages/solid-pacer-devtools/eslint.config.js:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | import rootConfig from '../../eslint.config.js'
4 |
5 | /** @type {import('eslint').Linter.Config[]} */
6 | export default [
7 | ...rootConfig,
8 | {
9 | rules: {},
10 | },
11 | ]
12 |
--------------------------------------------------------------------------------
/examples/vanilla/LiteQueuer/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 |
3 | export default defineConfig({
4 | root: '.',
5 | publicDir: 'public',
6 | build: {
7 | outDir: 'dist',
8 | },
9 | server: {
10 | port: 3005,
11 | },
12 | })
13 |
--------------------------------------------------------------------------------
/examples/vanilla/liteBatch/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 |
3 | export default defineConfig({
4 | root: '.',
5 | publicDir: 'public',
6 | build: {
7 | outDir: 'dist',
8 | },
9 | server: {
10 | port: 3005,
11 | },
12 | })
13 |
--------------------------------------------------------------------------------
/examples/vanilla/liteQueue/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 |
3 | export default defineConfig({
4 | root: '.',
5 | publicDir: 'public',
6 | build: {
7 | outDir: 'dist',
8 | },
9 | server: {
10 | port: 3005,
11 | },
12 | })
13 |
--------------------------------------------------------------------------------
/knip.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://unpkg.com/knip@5/schema.json",
3 | "ignoreDependencies": ["@faker-js/faker"],
4 | "ignoreWorkspaces": ["examples/**"],
5 | "workspaces": {
6 | "packages/react-pacer": {
7 | "ignore": []
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/packages/preact-pacer-devtools/eslint.config.js:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | import rootConfig from '../../eslint.config.js'
4 |
5 | /** @type {import('eslint').Linter.Config[]} */
6 | export default [
7 | ...rootConfig,
8 | {
9 | rules: {},
10 | },
11 | ]
12 |
--------------------------------------------------------------------------------
/examples/vanilla/LiteBatcher/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 |
3 | export default defineConfig({
4 | root: '.',
5 | publicDir: 'public',
6 | build: {
7 | outDir: 'dist',
8 | },
9 | server: {
10 | port: 3005,
11 | },
12 | })
13 |
--------------------------------------------------------------------------------
/examples/vanilla/LiteDebouncer/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 |
3 | export default defineConfig({
4 | root: '.',
5 | publicDir: 'public',
6 | build: {
7 | outDir: 'dist',
8 | },
9 | server: {
10 | port: 3005,
11 | },
12 | })
13 |
--------------------------------------------------------------------------------
/examples/vanilla/LiteRateLimiter/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 |
3 | export default defineConfig({
4 | root: '.',
5 | publicDir: 'public',
6 | build: {
7 | outDir: 'dist',
8 | },
9 | server: {
10 | port: 3005,
11 | },
12 | })
13 |
--------------------------------------------------------------------------------
/examples/vanilla/LiteThrottler/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 |
3 | export default defineConfig({
4 | root: '.',
5 | publicDir: 'public',
6 | build: {
7 | outDir: 'dist',
8 | },
9 | server: {
10 | port: 3005,
11 | },
12 | })
13 |
--------------------------------------------------------------------------------
/examples/vanilla/liteDebounce/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 |
3 | export default defineConfig({
4 | root: '.',
5 | publicDir: 'public',
6 | build: {
7 | outDir: 'dist',
8 | },
9 | server: {
10 | port: 3005,
11 | },
12 | })
13 |
--------------------------------------------------------------------------------
/examples/vanilla/liteRateLimit/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 |
3 | export default defineConfig({
4 | root: '.',
5 | publicDir: 'public',
6 | build: {
7 | outDir: 'dist',
8 | },
9 | server: {
10 | port: 3005,
11 | },
12 | })
13 |
--------------------------------------------------------------------------------
/examples/vanilla/liteThrottle/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 |
3 | export default defineConfig({
4 | root: '.',
5 | publicDir: 'public',
6 | build: {
7 | outDir: 'dist',
8 | },
9 | server: {
10 | port: 3005,
11 | },
12 | })
13 |
--------------------------------------------------------------------------------
/packages/preact-pacer/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "jsx": "react-jsx",
5 | "jsxImportSource": "preact"
6 | },
7 | "include": ["src", "vite.config.ts", "tests"],
8 | "exclude": ["eslint.config.js"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/pacer-devtools/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "jsx": "preserve",
5 | "jsxImportSource": "solid-js"
6 | },
7 | "include": ["src", "vitest.config.ts", "tests"],
8 | "exclude": ["eslint.config.js"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/preact-pacer/src/async-debouncer/index.ts:
--------------------------------------------------------------------------------
1 | // re-export everything from the core pacer package, BUT ONLY from the async-debouncer module
2 | export * from '@tanstack/pacer/async-debouncer'
3 |
4 | export * from './useAsyncDebouncer'
5 | export * from './useAsyncDebouncedCallback'
6 |
--------------------------------------------------------------------------------
/packages/preact-pacer/src/async-throttler/index.ts:
--------------------------------------------------------------------------------
1 | // re-export everything from the core pacer package, BUT ONLY from the async-throttler module
2 | export * from '@tanstack/pacer/async-throttler'
3 |
4 | export * from './useAsyncThrottler'
5 | export * from './useAsyncThrottledCallback'
6 |
--------------------------------------------------------------------------------
/packages/react-pacer/src/async-debouncer/index.ts:
--------------------------------------------------------------------------------
1 | // re-export everything from the core pacer package, BUT ONLY from the async-debouncer module
2 | export * from '@tanstack/pacer/async-debouncer'
3 |
4 | export * from './useAsyncDebouncer'
5 | export * from './useAsyncDebouncedCallback'
6 |
--------------------------------------------------------------------------------
/packages/react-pacer/src/async-throttler/index.ts:
--------------------------------------------------------------------------------
1 | // re-export everything from the core pacer package, BUT ONLY from the async-throttler module
2 | export * from '@tanstack/pacer/async-throttler'
3 |
4 | export * from './useAsyncThrottler'
5 | export * from './useAsyncThrottledCallback'
6 |
--------------------------------------------------------------------------------
/packages/solid-pacer/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "jsx": "preserve",
5 | "jsxImportSource": "solid-js"
6 | },
7 | "include": ["src", "vitest.config.ts", "tests"],
8 | "exclude": ["eslint.config.js"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/preact-pacer-devtools/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["src", "vite.config.ts", "tests"],
4 | "exclude": ["eslint.config.js"],
5 | "compilerOptions": {
6 | "jsx": "react-jsx",
7 | "jsxImportSource": "preact"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/packages/solid-pacer-devtools/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["src", "vitest.config.ts", "tests"],
4 | "exclude": ["eslint.config.js"],
5 | "compilerOptions": {
6 | "jsx": "preserve",
7 | "jsxImportSource": "solid-js"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/packages/preact-pacer/src/async-rate-limiter/index.ts:
--------------------------------------------------------------------------------
1 | // re-export everything from the core pacer package, BUT ONLY from the async-rate-limiter module
2 | export * from '@tanstack/pacer/async-rate-limiter'
3 |
4 | export * from './useAsyncRateLimiter'
5 | export * from './useAsyncRateLimitedCallback'
6 |
--------------------------------------------------------------------------------
/packages/react-pacer/src/async-rate-limiter/index.ts:
--------------------------------------------------------------------------------
1 | // re-export everything from the core pacer package, BUT ONLY from the async-rate-limiter module
2 | export * from '@tanstack/pacer/async-rate-limiter'
3 |
4 | export * from './useAsyncRateLimiter'
5 | export * from './useAsyncRateLimitedCallback'
6 |
--------------------------------------------------------------------------------
/packages/preact-pacer-devtools/tests/test-setup.ts:
--------------------------------------------------------------------------------
1 | import { expect, afterEach } from 'vitest'
2 | import { cleanup } from '@testing-library/preact'
3 | import * as matchers from '@testing-library/jest-dom/matchers'
4 |
5 | expect.extend(matchers)
6 |
7 | afterEach(() => {
8 | cleanup()
9 | })
10 |
--------------------------------------------------------------------------------
/packages/solid-pacer/src/debouncer/index.ts:
--------------------------------------------------------------------------------
1 | // re-export everything from the core pacer package, BUT ONLY from the debouncer module
2 | export * from '@tanstack/pacer/debouncer'
3 |
4 | export * from './createDebouncedSignal'
5 | export * from './createDebouncedValue'
6 | export * from './createDebouncer'
7 |
--------------------------------------------------------------------------------
/packages/solid-pacer/src/throttler/index.ts:
--------------------------------------------------------------------------------
1 | // re-export everything from the core pacer package, BUT ONLY from the throttler module
2 | export * from '@tanstack/pacer/throttler'
3 |
4 | export * from './createThrottledSignal'
5 | export * from './createThrottledValue'
6 | export * from './createThrottler'
7 |
--------------------------------------------------------------------------------
/packages/pacer-devtools/src/PacerDevtools.tsx:
--------------------------------------------------------------------------------
1 | import { PacerContextProvider } from './PacerContextProvider'
2 | import { Shell } from './components/Shell'
3 |
4 | export default function PacerDevtools() {
5 | return (
6 |
7 |
8 |
9 | )
10 | }
11 |
--------------------------------------------------------------------------------
/packages/pacer-devtools/src/index.ts:
--------------------------------------------------------------------------------
1 | 'use client'
2 |
3 | import * as Devtools from './core'
4 |
5 | export const PacerDevtoolsCore =
6 | process.env.NODE_ENV !== 'development'
7 | ? Devtools.PacerDevtoolsCoreNoOp
8 | : Devtools.PacerDevtoolsCore
9 |
10 | export type { PacerDevtoolsInit } from './core'
11 |
--------------------------------------------------------------------------------
/packages/preact-pacer/src/debouncer/index.ts:
--------------------------------------------------------------------------------
1 | // re-export everything from the core pacer package, BUT ONLY from the debouncer module
2 | export * from '@tanstack/pacer/debouncer'
3 |
4 | export * from './useDebouncedCallback'
5 | export * from './useDebouncedState'
6 | export * from './useDebouncedValue'
7 | export * from './useDebouncer'
8 |
--------------------------------------------------------------------------------
/packages/preact-pacer/src/throttler/index.ts:
--------------------------------------------------------------------------------
1 | // re-export everything from the core pacer package, BUT ONLY from the throttler module
2 | export * from '@tanstack/pacer/throttler'
3 |
4 | export * from './useThrottledCallback'
5 | export * from './useThrottledState'
6 | export * from './useThrottledValue'
7 | export * from './useThrottler'
8 |
--------------------------------------------------------------------------------
/packages/react-pacer/src/debouncer/index.ts:
--------------------------------------------------------------------------------
1 | // re-export everything from the core pacer package, BUT ONLY from the debouncer module
2 | export * from '@tanstack/pacer/debouncer'
3 |
4 | export * from './useDebouncedCallback'
5 | export * from './useDebouncedState'
6 | export * from './useDebouncedValue'
7 | export * from './useDebouncer'
8 |
--------------------------------------------------------------------------------
/packages/react-pacer/src/throttler/index.ts:
--------------------------------------------------------------------------------
1 | // re-export everything from the core pacer package, BUT ONLY from the throttler module
2 | export * from '@tanstack/pacer/throttler'
3 |
4 | export * from './useThrottledCallback'
5 | export * from './useThrottledState'
6 | export * from './useThrottledValue'
7 | export * from './useThrottler'
8 |
--------------------------------------------------------------------------------
/prettier.config.js:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('prettier').Config} */
4 | const config = {
5 | semi: false,
6 | singleQuote: true,
7 | trailingComma: 'all',
8 | plugins: ['prettier-plugin-svelte'],
9 | overrides: [{ files: '*.svelte', options: { parser: 'svelte' } }],
10 | }
11 |
12 | export default config
13 |
--------------------------------------------------------------------------------
/docs/reference/variables/pacerEventClient.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: pacerEventClient
3 | title: pacerEventClient
4 | ---
5 |
6 | # Variable: pacerEventClient
7 |
8 | ```ts
9 | const pacerEventClient: PacerEventClient;
10 | ```
11 |
12 | Defined in: [event-client.ts:68](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/event-client.ts#L68)
13 |
--------------------------------------------------------------------------------
/examples/react/batch/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/debounce/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/queue/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/rateLimit/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/throttle/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useQueuer/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/asyncBatch/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/asyncDebounce/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/asyncRateLimit/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/asyncRetry/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/asyncThrottle/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useAsyncQueuer/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useBatcher/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useDebouncer/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useQueuedState/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useQueuedValue/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useRateLimiter/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useThrottler/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useAsyncBatcher/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useAsyncDebouncer/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useAsyncQueuedState/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useAsyncRateLimiter/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useAsyncThrottler/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useBatchedCallback/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useDebouncedState/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useDebouncedValue/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useRateLimitedState/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useRateLimitedValue/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useThrottledState/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useThrottledValue/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useDebouncedCallback/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useRateLimitedCallback/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/useThrottledCallback/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/batch/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/queue/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/react-query-queued-prefetch/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/asyncBatch/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/asyncRetry/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/debounce/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/rateLimit/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/react-query-debounced-prefetch/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/react-query-throttled-prefetch/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | /** @type {import('eslint').Linter.Config} */
4 | const config = {
5 | settings: {
6 | extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
7 | rules: {
8 | 'react/no-children-prop': 'off',
9 | },
10 | },
11 | }
12 |
13 | module.exports = config
14 |
--------------------------------------------------------------------------------
/examples/react/throttle/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useBatcher/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useDebouncer/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useQueuer/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useThrottler/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/asyncDebounce/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/asyncRateLimit/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/asyncThrottle/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useAsyncBatcher/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useAsyncDebouncer/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useAsyncQueuer/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useAsyncThrottler/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useDebouncedState/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useDebouncedValue/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useQueuedState/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useQueuedValue/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useRateLimiter/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useThrottledState/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useThrottledValue/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/util-comparison/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/packages/pacer-lite/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vitest/config'
2 | import packageJson from './package.json' with { type: 'json' }
3 |
4 | export default defineConfig({
5 | test: {
6 | name: packageJson.name,
7 | dir: './',
8 | watch: false,
9 | environment: 'happy-dom',
10 | setupFiles: [],
11 | globals: true,
12 | },
13 | })
14 |
--------------------------------------------------------------------------------
/docs/reference/type-aliases/PacerEventName.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: PacerEventName
3 | title: PacerEventName
4 | ---
5 |
6 | # Type Alias: PacerEventName
7 |
8 | ```ts
9 | type PacerEventName = keyof PacerEventMap extends `pacer:${infer T}` ? T : never;
10 | ```
11 |
12 | Defined in: [event-client.ts:39](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/event-client.ts#L39)
13 |
--------------------------------------------------------------------------------
/examples/react/useAsyncQueuedState/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useAsyncRateLimiter/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useBatchedCallback/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useDebouncedCallback/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useQueuerWithPersister/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useRateLimitedCallback/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useRateLimitedState/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useRateLimitedValue/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/useThrottledCallback/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/react-query-queued-prefetch/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/react-query-debounced-prefetch/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/examples/react/react-query-throttled-prefetch/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vite.dev/config/
5 | export default defineConfig({
6 | plugins: [
7 | react({
8 | // babel: {
9 | // plugins: [['babel-plugin-react-compiler', { target: '19' }]],
10 | // },
11 | }),
12 | ],
13 | })
14 |
--------------------------------------------------------------------------------
/packages/pacer/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vitest/config'
2 | import packageJson from './package.json' with { type: 'json' }
3 |
4 | export default defineConfig({
5 | test: {
6 | name: packageJson.name,
7 | dir: './',
8 | watch: false,
9 | environment: 'happy-dom',
10 | setupFiles: ['./tests/test-setup.ts'],
11 | globals: true,
12 | },
13 | })
14 |
--------------------------------------------------------------------------------
/packages/react-pacer-devtools/src/plugin.tsx:
--------------------------------------------------------------------------------
1 | import { createReactPlugin } from '@tanstack/devtools-utils/react'
2 | import { PacerDevtoolsPanel } from './ReactPacerDevtools'
3 |
4 | const [pacerDevtoolsPlugin, pacerDevtoolsNoOpPlugin] = createReactPlugin({
5 | name: 'TanStack Pacer',
6 | Component: PacerDevtoolsPanel,
7 | })
8 |
9 | export { pacerDevtoolsPlugin, pacerDevtoolsNoOpPlugin }
10 |
--------------------------------------------------------------------------------
/packages/solid-pacer-devtools/src/plugin.tsx:
--------------------------------------------------------------------------------
1 | import { createSolidPlugin } from '@tanstack/devtools-utils/solid'
2 | import { PacerDevtoolsPanel } from './SolidPacerDevtools'
3 |
4 | const [pacerDevtoolsPlugin, pacerDevtoolsNoOpPlugin] = createSolidPlugin({
5 | name: 'TanStack Pacer',
6 | Component: PacerDevtoolsPanel,
7 | })
8 |
9 | export { pacerDevtoolsPlugin, pacerDevtoolsNoOpPlugin }
10 |
--------------------------------------------------------------------------------
/packages/pacer-devtools/src/core.tsx:
--------------------------------------------------------------------------------
1 | import { constructCoreClass } from '@tanstack/devtools-utils/solid'
2 | import { lazy } from 'solid-js'
3 |
4 | const Component = lazy(() => import('./PacerDevtools'))
5 |
6 | export interface PacerDevtoolsInit {}
7 |
8 | const [PacerDevtoolsCore, PacerDevtoolsCoreNoOp] = constructCoreClass(Component)
9 |
10 | export { PacerDevtoolsCore, PacerDevtoolsCoreNoOp }
11 |
--------------------------------------------------------------------------------
/packages/preact-pacer-devtools/src/plugin.tsx:
--------------------------------------------------------------------------------
1 | import { createPreactPlugin } from '@tanstack/devtools-utils/preact'
2 | import { PacerDevtoolsPanel } from './PreactPacerDevtools'
3 |
4 | const [pacerDevtoolsPlugin, pacerDevtoolsNoOpPlugin] = createPreactPlugin({
5 | name: 'TanStack Pacer',
6 | Component: PacerDevtoolsPanel,
7 | })
8 |
9 | export { pacerDevtoolsPlugin, pacerDevtoolsNoOpPlugin }
10 |
--------------------------------------------------------------------------------
/packages/solid-pacer/eslint.config.js:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | import rootConfig from '../../eslint.config.js'
4 |
5 | /** @type {import('eslint').Linter.Config[]} */
6 | export default [
7 | ...rootConfig,
8 | {
9 | files: ['**/*.{ts,tsx}'],
10 | },
11 | {
12 | plugins: {},
13 | rules: {},
14 | },
15 | {
16 | files: ['**/__tests__/**'],
17 | rules: {},
18 | },
19 | ]
20 |
--------------------------------------------------------------------------------
/packages/preact-pacer-devtools/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @tanstack/preact-pacer-devtools
2 |
3 | ## 0.5.0
4 |
5 | ### Minor Changes
6 |
7 | - feat: add preact adapter\ ([#112](https://github.com/TanStack/pacer/pull/112))
8 |
9 | ### Patch Changes
10 |
11 | - Updated dependencies [[`2906cd3`](https://github.com/TanStack/pacer/commit/2906cd3ca1a4bc54460cf8558dbff2d8f4089f6c)]:
12 | - @tanstack/pacer-devtools@1.1.0
13 |
--------------------------------------------------------------------------------
/packages/pacer/src/utils.ts:
--------------------------------------------------------------------------------
1 | import type { AnyFunction } from './types'
2 |
3 | export function isFunction(value: any): value is T {
4 | return typeof value === 'function'
5 | }
6 |
7 | export function parseFunctionOrValue>(
8 | value: T | ((...args: TArgs) => T),
9 | ...args: TArgs
10 | ): T {
11 | return isFunction(value) ? value(...args) : value
12 | }
13 |
--------------------------------------------------------------------------------
/examples/vanilla/LiteQueuer/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@tanstack/pacer-example-vanilla-lite-queuer",
3 | "private": true,
4 | "type": "module",
5 | "scripts": {
6 | "dev": "vite --port=3005",
7 | "build": "vite build",
8 | "preview": "vite preview",
9 | "test:types": "tsc"
10 | },
11 | "dependencies": {
12 | "@tanstack/pacer-lite": "0.2.0"
13 | },
14 | "devDependencies": {
15 | "vite": "^7.3.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/examples/vanilla/liteBatch/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@tanstack/pacer-example-vanilla-lite-batch",
3 | "private": true,
4 | "type": "module",
5 | "scripts": {
6 | "dev": "vite --port=3005",
7 | "build": "vite build",
8 | "preview": "vite preview",
9 | "test:types": "tsc"
10 | },
11 | "dependencies": {
12 | "@tanstack/pacer-lite": "0.2.0"
13 | },
14 | "devDependencies": {
15 | "vite": "^7.3.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/examples/vanilla/liteQueue/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@tanstack/pacer-example-vanilla-lite-queue",
3 | "private": true,
4 | "type": "module",
5 | "scripts": {
6 | "dev": "vite --port=3005",
7 | "build": "vite build",
8 | "preview": "vite preview",
9 | "test:types": "tsc"
10 | },
11 | "dependencies": {
12 | "@tanstack/pacer-lite": "0.2.0"
13 | },
14 | "devDependencies": {
15 | "vite": "^7.3.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/examples/vanilla/LiteBatcher/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@tanstack/pacer-example-vanilla-lite-batcher",
3 | "private": true,
4 | "type": "module",
5 | "scripts": {
6 | "dev": "vite --port=3005",
7 | "build": "vite build",
8 | "preview": "vite preview",
9 | "test:types": "tsc"
10 | },
11 | "dependencies": {
12 | "@tanstack/pacer-lite": "0.2.0"
13 | },
14 | "devDependencies": {
15 | "vite": "^7.3.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/examples/vanilla/liteDebounce/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@tanstack/pacer-example-vanilla-lite-debounce",
3 | "private": true,
4 | "type": "module",
5 | "scripts": {
6 | "dev": "vite --port=3005",
7 | "build": "vite build",
8 | "preview": "vite preview",
9 | "test:types": "tsc"
10 | },
11 | "dependencies": {
12 | "@tanstack/pacer-lite": "0.2.0"
13 | },
14 | "devDependencies": {
15 | "vite": "^7.3.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/examples/vanilla/liteThrottle/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@tanstack/pacer-example-vanilla-lite-throttle",
3 | "private": true,
4 | "type": "module",
5 | "scripts": {
6 | "dev": "vite --port=3005",
7 | "build": "vite build",
8 | "preview": "vite preview",
9 | "test:types": "tsc"
10 | },
11 | "dependencies": {
12 | "@tanstack/pacer-lite": "0.2.0"
13 | },
14 | "devDependencies": {
15 | "vite": "^7.3.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/examples/vanilla/LiteDebouncer/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@tanstack/pacer-example-vanilla-lite-debouncer",
3 | "private": true,
4 | "type": "module",
5 | "scripts": {
6 | "dev": "vite --port=3005",
7 | "build": "vite build",
8 | "preview": "vite preview",
9 | "test:types": "tsc"
10 | },
11 | "dependencies": {
12 | "@tanstack/pacer-lite": "0.2.0"
13 | },
14 | "devDependencies": {
15 | "vite": "^7.3.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/examples/vanilla/LiteThrottler/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@tanstack/pacer-example-vanilla-lite-throttler",
3 | "private": true,
4 | "type": "module",
5 | "scripts": {
6 | "dev": "vite --port=3005",
7 | "build": "vite build",
8 | "preview": "vite preview",
9 | "test:types": "tsc"
10 | },
11 | "dependencies": {
12 | "@tanstack/pacer-lite": "0.2.0"
13 | },
14 | "devDependencies": {
15 | "vite": "^7.3.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/examples/vanilla/liteRateLimit/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@tanstack/pacer-example-vanilla-lite-rate-limit",
3 | "private": true,
4 | "type": "module",
5 | "scripts": {
6 | "dev": "vite --port=3005",
7 | "build": "vite build",
8 | "preview": "vite preview",
9 | "test:types": "tsc"
10 | },
11 | "dependencies": {
12 | "@tanstack/pacer-lite": "0.2.0"
13 | },
14 | "devDependencies": {
15 | "vite": "^7.3.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/examples/vanilla/LiteRateLimiter/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@tanstack/pacer-example-vanilla-lite-rate-limiter",
3 | "private": true,
4 | "type": "module",
5 | "scripts": {
6 | "dev": "vite --port=3005",
7 | "build": "vite build",
8 | "preview": "vite preview",
9 | "test:types": "tsc"
10 | },
11 | "dependencies": {
12 | "@tanstack/pacer-lite": "0.2.0"
13 | },
14 | "devDependencies": {
15 | "vite": "^7.3.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/packages/pacer-devtools/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vitest/config'
2 | import solid from 'vite-plugin-solid'
3 | import packageJson from './package.json' with { type: 'json' }
4 |
5 | export default defineConfig({
6 | plugins: [solid()],
7 | test: {
8 | name: packageJson.name,
9 | dir: './',
10 | watch: false,
11 | environment: 'happy-dom',
12 | setupFiles: ['./tests/test-setup.ts'],
13 | globals: true,
14 | },
15 | })
16 |
--------------------------------------------------------------------------------
/packages/pacer-lite/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @tanstack/pacer-lite
2 |
3 | ## 0.2.0
4 |
5 | ### Minor Changes
6 |
7 | - feat: add preact adapter\ ([#112](https://github.com/TanStack/pacer/pull/112))
8 |
9 | ## 0.1.1
10 |
11 | ### Patch Changes
12 |
13 | - build: migrate to tsdown ([#113](https://github.com/TanStack/pacer/pull/113))
14 |
15 | ## 0.1.0
16 |
17 | ### Minor Changes
18 |
19 | - feat: add pacer-lite library ([#100](https://github.com/TanStack/pacer/pull/100))
20 |
--------------------------------------------------------------------------------
/docs/framework/react/reference/functions/usePacerContext.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: usePacerContext
3 | title: usePacerContext
4 | ---
5 |
6 | # Function: usePacerContext()
7 |
8 | ```ts
9 | function usePacerContext(): PacerContextValue | null;
10 | ```
11 |
12 | Defined in: [react-pacer/src/provider/PacerProvider.tsx:62](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L62)
13 |
14 | ## Returns
15 |
16 | `PacerContextValue` \| `null`
17 |
--------------------------------------------------------------------------------
/docs/framework/solid/reference/functions/usePacerContext.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: usePacerContext
3 | title: usePacerContext
4 | ---
5 |
6 | # Function: usePacerContext()
7 |
8 | ```ts
9 | function usePacerContext(): PacerContextValue | null;
10 | ```
11 |
12 | Defined in: [solid-pacer/src/provider/PacerProvider.tsx:56](https://github.com/TanStack/pacer/blob/main/packages/solid-pacer/src/provider/PacerProvider.tsx#L56)
13 |
14 | ## Returns
15 |
16 | `PacerContextValue` \| `null`
17 |
--------------------------------------------------------------------------------
/docs/reference/type-aliases/OptionalKeys.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: OptionalKeys
3 | title: OptionalKeys
4 | ---
5 |
6 | # Type Alias: OptionalKeys\
7 |
8 | ```ts
9 | type OptionalKeys = Omit & Partial>;
10 | ```
11 |
12 | Defined in: [types.ts:11](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/types.ts#L11)
13 |
14 | ## Type Parameters
15 |
16 | ### T
17 |
18 | `T`
19 |
20 | ### TKey
21 |
22 | `TKey` *extends* keyof `T`
23 |
--------------------------------------------------------------------------------
/examples/solid/asyncBatch/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Solid Pacer asyncBatch Example
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/packages/solid-pacer-devtools/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vitest/config'
2 | import solid from 'vite-plugin-solid'
3 | import packageJson from './package.json' with { type: 'json' }
4 |
5 | export default defineConfig({
6 | plugins: [solid()],
7 | test: {
8 | name: packageJson.name,
9 | dir: './',
10 | watch: false,
11 | environment: 'happy-dom',
12 | setupFiles: ['./tests/test-setup.ts'],
13 | globals: true,
14 | },
15 | })
16 |
--------------------------------------------------------------------------------
/packages/solid-pacer/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vitest/config'
2 | import solid from 'vite-plugin-solid'
3 | import packageJson from './package.json' with { type: 'json' }
4 |
5 | export default defineConfig({
6 | plugins: [solid()],
7 | test: {
8 | name: packageJson.name,
9 | dir: './tests',
10 | watch: false,
11 | environment: 'happy-dom',
12 | // setupFiles: ['./tests/test-setup.ts'],
13 | globals: true,
14 | },
15 | })
16 |
--------------------------------------------------------------------------------
/docs/framework/preact/reference/functions/usePacerContext.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: usePacerContext
3 | title: usePacerContext
4 | ---
5 |
6 | # Function: usePacerContext()
7 |
8 | ```ts
9 | function usePacerContext(): PacerContextValue | null;
10 | ```
11 |
12 | Defined in: [preact-pacer/src/provider/PacerProvider.tsx:63](https://github.com/TanStack/pacer/blob/main/packages/preact-pacer/src/provider/PacerProvider.tsx#L63)
13 |
14 | ## Returns
15 |
16 | `PacerContextValue` \| `null`
17 |
--------------------------------------------------------------------------------
/examples/vanilla/liteBatch/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | TanStack Pacer - Vanilla Batch Examples
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/examples/vanilla/liteQueue/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | TanStack Pacer - Vanilla Queue Examples
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/packages/pacer-devtools/tsdown.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'tsdown'
2 | import solid from 'vite-plugin-solid'
3 |
4 | export default defineConfig({
5 | plugins: [solid()],
6 | entry: ['./src/index.ts', './src/production.ts'],
7 | format: ['esm'],
8 | unbundle: true,
9 | dts: true,
10 | sourcemap: true,
11 | clean: true,
12 | minify: false,
13 | fixedExtension: false,
14 | exports: true,
15 | publint: {
16 | strict: true,
17 | },
18 | })
19 |
--------------------------------------------------------------------------------
/packages/preact-pacer-devtools/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vitest/config'
2 | import preact from '@preact/preset-vite'
3 | import packageJson from './package.json' with { type: 'json' }
4 |
5 | export default defineConfig({
6 | plugins: [preact()],
7 | test: {
8 | name: packageJson.name,
9 | dir: './',
10 | watch: false,
11 | environment: 'happy-dom',
12 | setupFiles: ['./tests/test-setup.ts'],
13 | globals: true,
14 | },
15 | })
16 |
--------------------------------------------------------------------------------
/packages/preact-pacer/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vitest/config'
2 | import preact from '@preact/preset-vite'
3 | import packageJson from './package.json' with { type: 'json' }
4 |
5 | export default defineConfig({
6 | plugins: [preact()],
7 | test: {
8 | name: packageJson.name,
9 | dir: './tests',
10 | watch: false,
11 | environment: 'happy-dom',
12 | // setupFiles: ['./tests/test-setup.ts'],
13 | globals: true,
14 | },
15 | })
16 |
--------------------------------------------------------------------------------
/packages/react-pacer-devtools/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vitest/config'
2 | import react from '@vitejs/plugin-react'
3 | import packageJson from './package.json' with { type: 'json' }
4 |
5 | export default defineConfig({
6 | plugins: [react()],
7 | test: {
8 | name: packageJson.name,
9 | dir: './',
10 | watch: false,
11 | environment: 'happy-dom',
12 | setupFiles: ['./tests/test-setup.ts'],
13 | globals: true,
14 | },
15 | })
16 |
--------------------------------------------------------------------------------
/packages/react-pacer/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vitest/config'
2 | import react from '@vitejs/plugin-react'
3 | import packageJson from './package.json' with { type: 'json' }
4 |
5 | export default defineConfig({
6 | plugins: [react()],
7 | test: {
8 | name: packageJson.name,
9 | dir: './tests',
10 | watch: false,
11 | environment: 'happy-dom',
12 | // setupFiles: ['./tests/test-setup.ts'],
13 | globals: true,
14 | },
15 | })
16 |
--------------------------------------------------------------------------------
/examples/vanilla/LiteBatcher/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | TanStack Pacer - Vanilla Batcher Examples
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/examples/vanilla/LiteQueuer/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | TanStack Pacer - Vanilla Queuer Examples
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/packages/react-pacer-devtools/tsdown.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'tsdown'
2 | import react from '@vitejs/plugin-react'
3 |
4 | export default defineConfig({
5 | plugins: [react()],
6 | entry: ['./src/index.ts', './src/production.ts'],
7 | format: ['esm'],
8 | unbundle: true,
9 | dts: true,
10 | sourcemap: true,
11 | clean: true,
12 | minify: false,
13 | fixedExtension: false,
14 | exports: true,
15 | publint: {
16 | strict: true,
17 | },
18 | })
19 |
--------------------------------------------------------------------------------
/packages/solid-pacer-devtools/tsdown.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'tsdown'
2 | import solid from 'vite-plugin-solid'
3 |
4 | export default defineConfig({
5 | plugins: [solid()],
6 | entry: ['./src/index.ts', './src/production.ts'],
7 | format: ['esm'],
8 | unbundle: true,
9 | dts: true,
10 | sourcemap: true,
11 | clean: true,
12 | minify: false,
13 | fixedExtension: false,
14 | exports: true,
15 | publint: {
16 | strict: true,
17 | },
18 | })
19 |
--------------------------------------------------------------------------------
/examples/vanilla/liteDebounce/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | TanStack Pacer - Vanilla Debounce Examples
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/examples/vanilla/liteRateLimit/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | TanStack Pacer - Vanilla Rate Limit Examples
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/examples/vanilla/liteThrottle/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | TanStack Pacer - Vanilla Throttle Examples
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/packages/preact-pacer-devtools/tsdown.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'tsdown'
2 | import preact from '@preact/preset-vite'
3 |
4 | export default defineConfig({
5 | plugins: [preact()],
6 | entry: ['./src/index.ts', './src/production.ts'],
7 | format: ['esm'],
8 | unbundle: true,
9 | dts: true,
10 | sourcemap: true,
11 | clean: true,
12 | minify: false,
13 | fixedExtension: false,
14 | exports: true,
15 | publint: {
16 | strict: true,
17 | },
18 | })
19 |
--------------------------------------------------------------------------------
/examples/vanilla/LiteDebouncer/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | TanStack Pacer - Vanilla LiteDebouncer Examples
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/examples/vanilla/LiteRateLimiter/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | TanStack Pacer - Vanilla Rate Limiter Examples
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/examples/vanilla/LiteThrottler/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | TanStack Pacer - Vanilla LiteThrottler Examples
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/packages/pacer/src/types.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Represents a function that can be called with any arguments and returns any value.
3 | */
4 | export type AnyFunction = (...args: Array) => any
5 |
6 | /**
7 | * Represents an asynchronous function that can be called with any arguments and returns a promise.
8 | */
9 | export type AnyAsyncFunction = (...args: Array) => Promise
10 |
11 | export type OptionalKeys = Omit &
12 | Partial>
13 |
--------------------------------------------------------------------------------
/packages/preact-pacer/eslint.config.js:
--------------------------------------------------------------------------------
1 | // @ts-check
2 |
3 | import pluginReactHooks from 'eslint-plugin-react-hooks'
4 | import rootConfig from '../../eslint.config.js'
5 |
6 | /** @type {import('eslint').Linter.Config[]} */
7 | export default [
8 | ...rootConfig,
9 | {
10 | plugins: {
11 | 'react-hooks': pluginReactHooks,
12 | },
13 | rules: {
14 | 'react-hooks/exhaustive-deps': 'error',
15 | 'react-hooks/rules-of-hooks': 'error',
16 | },
17 | },
18 | ]
19 |
--------------------------------------------------------------------------------
/docs/reference/type-aliases/QueuePosition.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: QueuePosition
3 | title: QueuePosition
4 | ---
5 |
6 | # Type Alias: QueuePosition
7 |
8 | ```ts
9 | type QueuePosition = "front" | "back";
10 | ```
11 |
12 | Defined in: [queuer.ts:193](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/queuer.ts#L193)
13 |
14 | Position type for addItem and getNextItem operations.
15 |
16 | - 'front': Operate on the front of the queue (FIFO)
17 | - 'back': Operate on the back of the queue (LIFO)
18 |
--------------------------------------------------------------------------------
/examples/react/asyncBatch/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
--------------------------------------------------------------------------------
/examples/react/asyncRetry/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
--------------------------------------------------------------------------------
/examples/react/batch/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/queue/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useAsyncBatchedCallback/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | TanStack Pacer - useAsyncDebouncedCallback Example
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/examples/solid/batch/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/queue/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/packages/solid-pacer-devtools/src/SolidPacerDevtools.tsx:
--------------------------------------------------------------------------------
1 | import { createSolidPanel } from '@tanstack/devtools-utils/solid'
2 | import { PacerDevtoolsCore } from '@tanstack/pacer-devtools'
3 | import type { DevtoolsPanelProps } from '@tanstack/devtools-utils/solid'
4 |
5 | const [PacerDevtoolsPanel, PacerDevtoolsPanelNoOp] =
6 | createSolidPanel(PacerDevtoolsCore)
7 | export interface PacerDevtoolsSolidInit extends DevtoolsPanelProps {}
8 |
9 | export { PacerDevtoolsPanel, PacerDevtoolsPanelNoOp }
10 |
--------------------------------------------------------------------------------
/docs/reference/type-aliases/AnyFunction.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: AnyFunction
3 | title: AnyFunction
4 | ---
5 |
6 | # Type Alias: AnyFunction()
7 |
8 | ```ts
9 | type AnyFunction = (...args) => any;
10 | ```
11 |
12 | Defined in: [types.ts:4](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/types.ts#L4)
13 |
14 | Represents a function that can be called with any arguments and returns any value.
15 |
16 | ## Parameters
17 |
18 | ### args
19 |
20 | ...`any`[]
21 |
22 | ## Returns
23 |
24 | `any`
25 |
--------------------------------------------------------------------------------
/examples/react/debounce/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/rateLimit/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/throttle/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useAsyncBatcher/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
--------------------------------------------------------------------------------
/examples/react/useAsyncDebouncedCallback/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | TanStack Pacer - useAsyncDebouncedCallback Example
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/examples/react/useAsyncThrottledCallback/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | TanStack Pacer - useAsyncThrottledCallback Example
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/examples/react/useBatcher/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useDebouncer/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useQueuer/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useThrottler/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/createQueuer/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/debounce/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/rateLimit/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/throttle/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/packages/react-pacer-devtools/src/ReactPacerDevtools.tsx:
--------------------------------------------------------------------------------
1 | import { createReactPanel } from '@tanstack/devtools-utils/react'
2 | import { PacerDevtoolsCore } from '@tanstack/pacer-devtools'
3 | import type { DevtoolsPanelProps } from '@tanstack/devtools-utils/react'
4 |
5 | export interface PacerDevtoolsReactInit extends DevtoolsPanelProps {}
6 |
7 | const [PacerDevtoolsPanel, PacerDevtoolsPanelNoOp] =
8 | createReactPanel(PacerDevtoolsCore)
9 |
10 | export { PacerDevtoolsPanel, PacerDevtoolsPanelNoOp }
11 |
--------------------------------------------------------------------------------
/examples/react/asyncDebounce/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/asyncRateLimit/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/asyncThrottle/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useAsyncDebouncer/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useAsyncQueuer/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useAsyncThrottler/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useDebouncedState/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useDebouncedValue/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useQueuedState/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useQueuedValue/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useRateLimiter/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useThrottledState/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useThrottledValue/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/asyncDebounce/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/asyncRateLimit/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/asyncThrottle/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/createAsyncBatcher/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
--------------------------------------------------------------------------------
/examples/solid/createAsyncQueuer/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/createBatcher/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/createDebouncer/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/createRateLimiter/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/createThrottler/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/packages/preact-pacer-devtools/src/PreactPacerDevtools.tsx:
--------------------------------------------------------------------------------
1 | import { createPreactPanel } from '@tanstack/devtools-utils/preact'
2 | import { PacerDevtoolsCore } from '@tanstack/pacer-devtools'
3 | import type { DevtoolsPanelProps } from '@tanstack/devtools-utils/preact'
4 |
5 | export interface PacerDevtoolsPreactInit extends DevtoolsPanelProps {}
6 |
7 | const [PacerDevtoolsPanel, PacerDevtoolsPanelNoOp] =
8 | createPreactPanel(PacerDevtoolsCore)
9 |
10 | export { PacerDevtoolsPanel, PacerDevtoolsPanelNoOp }
11 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: 🤔 Feature Requests & Questions
4 | url: https://github.com/TanStack/pacer/discussions
5 | about: Please ask and answer questions here.
6 | - name: 💬 Community Chat
7 | url: https://discord.gg/mQd7egN
8 | about: A dedicated discord server hosted by TanStack
9 | - name: 🦋 TanStack Bluesky
10 | url: https://bsky.app/profile/tanstack.com
11 | about: Stay up to date with new releases of our libraries
12 |
--------------------------------------------------------------------------------
/examples/react/useAsyncQueuedState/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useAsyncRateLimiter/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useBatchedCallback/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useDebouncedCallback/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useRateLimitedCallback/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useRateLimitedState/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useRateLimitedValue/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/useThrottledCallback/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/createAsyncDebouncer/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/createAsyncRateLimiter/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/createAsyncThrottler/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/createDebouncedSignal/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/createDebouncedValue/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/createRateLimitedValue/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/createThrottledSignal/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/createThrottledValue/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/react-query-queued-prefetch/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/solid/createRateLimitedSignal/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/react-query-debounced-prefetch/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/examples/react/react-query-throttled-prefetch/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | pnpm-lock.yaml
15 | yarn.lock
16 | package-lock.json
17 |
18 | # misc
19 | .DS_Store
20 | .env.local
21 | .env.development.local
22 | .env.test.local
23 | .env.production.local
24 |
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
--------------------------------------------------------------------------------
/docs/reference/functions/isFunction.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: isFunction
3 | title: isFunction
4 | ---
5 |
6 | # Function: isFunction()
7 |
8 | ```ts
9 | function isFunction(value): value is T;
10 | ```
11 |
12 | Defined in: [utils.ts:3](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/utils.ts#L3)
13 |
14 | ## Type Parameters
15 |
16 | ### T
17 |
18 | `T` *extends* [`AnyFunction`](../type-aliases/AnyFunction.md)
19 |
20 | ## Parameters
21 |
22 | ### value
23 |
24 | `any`
25 |
26 | ## Returns
27 |
28 | `value is T`
29 |
--------------------------------------------------------------------------------
/packages/preact-pacer/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @tanstack/preact-pacer
2 |
3 | ## 0.19.0
4 |
5 | ### Minor Changes
6 |
7 | - add Subscribe API to all util hooks ([#121](https://github.com/TanStack/pacer/pull/121))
8 |
9 | ## 0.18.0
10 |
11 | ### Minor Changes
12 |
13 | - feat: add preact adapter\ ([#112](https://github.com/TanStack/pacer/pull/112))
14 |
15 | ### Patch Changes
16 |
17 | - Updated dependencies [[`2906cd3`](https://github.com/TanStack/pacer/commit/2906cd3ca1a4bc54460cf8558dbff2d8f4089f6c)]:
18 | - @tanstack/pacer@0.17.0
19 |
--------------------------------------------------------------------------------
/.changeset/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
3 | "changelog": [
4 | "@svitejs/changesets-changelog-github-compact",
5 | { "repo": "TanStack/pacer" }
6 | ],
7 | "commit": false,
8 | "access": "public",
9 | "baseBranch": "main",
10 | "updateInternalDependencies": "patch",
11 | "fixed": [],
12 | "linked": [],
13 | "ignore": [],
14 | "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
15 | "onlyUpdatePeerDependentsWhenOutOfRange": true
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/docs/framework/react/reference/functions/useDefaultPacerOptions.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: useDefaultPacerOptions
3 | title: useDefaultPacerOptions
4 | ---
5 |
6 | # Function: useDefaultPacerOptions()
7 |
8 | ```ts
9 | function useDefaultPacerOptions(): PacerProviderOptions;
10 | ```
11 |
12 | Defined in: [react-pacer/src/provider/PacerProvider.tsx:66](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L66)
13 |
14 | ## Returns
15 |
16 | [`PacerProviderOptions`](../interfaces/PacerProviderOptions.md)
17 |
--------------------------------------------------------------------------------
/docs/framework/solid/reference/functions/useDefaultPacerOptions.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: useDefaultPacerOptions
3 | title: useDefaultPacerOptions
4 | ---
5 |
6 | # Function: useDefaultPacerOptions()
7 |
8 | ```ts
9 | function useDefaultPacerOptions(): PacerProviderOptions;
10 | ```
11 |
12 | Defined in: [solid-pacer/src/provider/PacerProvider.tsx:60](https://github.com/TanStack/pacer/blob/main/packages/solid-pacer/src/provider/PacerProvider.tsx#L60)
13 |
14 | ## Returns
15 |
16 | [`PacerProviderOptions`](../interfaces/PacerProviderOptions.md)
17 |
--------------------------------------------------------------------------------
/docs/framework/preact/reference/functions/useDefaultPacerOptions.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: useDefaultPacerOptions
3 | title: useDefaultPacerOptions
4 | ---
5 |
6 | # Function: useDefaultPacerOptions()
7 |
8 | ```ts
9 | function useDefaultPacerOptions(): PacerProviderOptions;
10 | ```
11 |
12 | Defined in: [preact-pacer/src/provider/PacerProvider.tsx:67](https://github.com/TanStack/pacer/blob/main/packages/preact-pacer/src/provider/PacerProvider.tsx#L67)
13 |
14 | ## Returns
15 |
16 | [`PacerProviderOptions`](../interfaces/PacerProviderOptions.md)
17 |
--------------------------------------------------------------------------------
/packages/solid-pacer-devtools/src/index.ts:
--------------------------------------------------------------------------------
1 | import * as Devtools from './SolidPacerDevtools'
2 | import * as plugin from './plugin'
3 |
4 | export const PacerDevtoolsPanel =
5 | process.env.NODE_ENV !== 'development'
6 | ? Devtools.PacerDevtoolsPanelNoOp
7 | : Devtools.PacerDevtoolsPanel
8 |
9 | export const pacerDevtoolsPlugin =
10 | process.env.NODE_ENV !== 'development'
11 | ? plugin.pacerDevtoolsNoOpPlugin
12 | : plugin.pacerDevtoolsPlugin
13 |
14 | export type { PacerDevtoolsSolidInit } from './SolidPacerDevtools'
15 |
--------------------------------------------------------------------------------
/docs/framework/solid/reference/functions/PacerProvider.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: PacerProvider
3 | title: PacerProvider
4 | ---
5 |
6 | # Function: PacerProvider()
7 |
8 | ```ts
9 | function PacerProvider(props): Element;
10 | ```
11 |
12 | Defined in: [solid-pacer/src/provider/PacerProvider.tsx:44](https://github.com/TanStack/pacer/blob/main/packages/solid-pacer/src/provider/PacerProvider.tsx#L44)
13 |
14 | ## Parameters
15 |
16 | ### props
17 |
18 | [`PacerProviderProps`](../interfaces/PacerProviderProps.md)
19 |
20 | ## Returns
21 |
22 | `Element`
23 |
--------------------------------------------------------------------------------
/examples/react/util-comparison/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | TanStack Pacer Utilities Comparison
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/docs/reference/type-aliases/AnyAsyncFunction.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: AnyAsyncFunction
3 | title: AnyAsyncFunction
4 | ---
5 |
6 | # Type Alias: AnyAsyncFunction()
7 |
8 | ```ts
9 | type AnyAsyncFunction = (...args) => Promise;
10 | ```
11 |
12 | Defined in: [types.ts:9](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/types.ts#L9)
13 |
14 | Represents an asynchronous function that can be called with any arguments and returns a promise.
15 |
16 | ## Parameters
17 |
18 | ### args
19 |
20 | ...`any`[]
21 |
22 | ## Returns
23 |
24 | `Promise`\<`any`\>
25 |
--------------------------------------------------------------------------------
/packages/preact-pacer-devtools/src/index.ts:
--------------------------------------------------------------------------------
1 | 'use client'
2 |
3 | import * as Devtools from './PreactPacerDevtools'
4 | import * as plugin from './plugin'
5 |
6 | export const PacerDevtoolsPanel =
7 | process.env.NODE_ENV !== 'development'
8 | ? Devtools.PacerDevtoolsPanelNoOp
9 | : Devtools.PacerDevtoolsPanel
10 |
11 | export const pacerDevtoolsPlugin =
12 | process.env.NODE_ENV !== 'development'
13 | ? plugin.pacerDevtoolsNoOpPlugin
14 | : plugin.pacerDevtoolsPlugin
15 |
16 | export type { PacerDevtoolsPreactInit } from './PreactPacerDevtools'
17 |
--------------------------------------------------------------------------------
/packages/react-pacer-devtools/src/index.ts:
--------------------------------------------------------------------------------
1 | 'use client'
2 |
3 | import * as Devtools from './ReactPacerDevtools'
4 | import * as plugin from './plugin'
5 |
6 | export const PacerDevtoolsPanel =
7 | process.env.NODE_ENV !== 'development'
8 | ? Devtools.PacerDevtoolsPanelNoOp
9 | : Devtools.PacerDevtoolsPanel
10 |
11 | export const pacerDevtoolsPlugin =
12 | process.env.NODE_ENV !== 'development'
13 | ? plugin.pacerDevtoolsNoOpPlugin
14 | : plugin.pacerDevtoolsPlugin
15 |
16 | export type { PacerDevtoolsReactInit } from './ReactPacerDevtools'
17 |
--------------------------------------------------------------------------------
/docs/framework/react/reference/functions/PacerProvider.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: PacerProvider
3 | title: PacerProvider
4 | ---
5 |
6 | # Function: PacerProvider()
7 |
8 | ```ts
9 | function PacerProvider(__namedParameters): Element;
10 | ```
11 |
12 | Defined in: [react-pacer/src/provider/PacerProvider.tsx:44](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L44)
13 |
14 | ## Parameters
15 |
16 | ### \_\_namedParameters
17 |
18 | [`PacerProviderProps`](../interfaces/PacerProviderProps.md)
19 |
20 | ## Returns
21 |
22 | `Element`
23 |
--------------------------------------------------------------------------------
/docs/framework/preact/reference/functions/PacerProvider.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: PacerProvider
3 | title: PacerProvider
4 | ---
5 |
6 | # Function: PacerProvider()
7 |
8 | ```ts
9 | function PacerProvider(__namedParameters): Element;
10 | ```
11 |
12 | Defined in: [preact-pacer/src/provider/PacerProvider.tsx:45](https://github.com/TanStack/pacer/blob/main/packages/preact-pacer/src/provider/PacerProvider.tsx#L45)
13 |
14 | ## Parameters
15 |
16 | ### \_\_namedParameters
17 |
18 | [`PacerProviderProps`](../interfaces/PacerProviderProps.md)
19 |
20 | ## Returns
21 |
22 | `Element`
23 |
--------------------------------------------------------------------------------
/packages/pacer-lite/tsdown.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'tsdown'
2 |
3 | export default defineConfig({
4 | entry: [
5 | './src/index.ts',
6 | './src/lite-batcher.ts',
7 | './src/lite-debouncer.ts',
8 | './src/lite-queuer.ts',
9 | './src/lite-rate-limiter.ts',
10 | './src/lite-throttler.ts',
11 | ],
12 | format: ['esm', 'cjs'],
13 | unbundle: true,
14 | dts: true,
15 | sourcemap: true,
16 | clean: true,
17 | minify: false,
18 | fixedExtension: false,
19 | exports: true,
20 | publint: {
21 | strict: true,
22 | },
23 | })
24 |
--------------------------------------------------------------------------------
/examples/preact/batch/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | TanStack Pacer Example
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/preact/queue/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | TanStack Pacer Example
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/preact/asyncBatch/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | TanStack Pacer Example
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/preact/asyncRetry/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | TanStack Pacer Example
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/preact/debounce/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | TanStack Pacer Example
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/preact/rateLimit/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | TanStack Pacer Example
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/preact/throttle/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | TanStack Pacer Example
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/preact/useBatcher/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | TanStack Pacer Example
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/preact/useQueuer/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | TanStack Pacer Example
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/solid/batch/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | TanStack Pacer Example
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/solid/queue/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | TanStack Pacer Example
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------