docs: add advanced skills for Vitest, Pinia, and Vue built-ins
Add comprehensive reference documentation for: - Vitest: environments, projects/workspaces, type testing, vi utilities - Pinia: HMR, Nuxt integration, SSR setup - Vue: built-in components (Transition, Teleport, Suspense, KeepAlive) and advanced directives
This commit is contained in:
38
.agents/skills/vueuse-functions/references/useProjection.md
Normal file
38
.agents/skills/vueuse-functions/references/useProjection.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
category: '@Math'
|
||||
related: createGenericProjection
|
||||
---
|
||||
|
||||
# useProjection
|
||||
|
||||
Reactive numeric projection from one domain to another.
|
||||
|
||||
## Usage
|
||||
|
||||
```ts
|
||||
import { useProjection } from '@vueuse/math'
|
||||
|
||||
const input = ref(0)
|
||||
const projected = useProjection(input, [0, 10], [0, 100])
|
||||
|
||||
input.value = 5 // projected.value === 50
|
||||
input.value = 10 // projected.value === 100
|
||||
```
|
||||
|
||||
## Type Declarations
|
||||
|
||||
```ts
|
||||
/**
|
||||
* Reactive numeric projection from one domain to another.
|
||||
*
|
||||
* @see https://vueuse.org/useProjection
|
||||
*
|
||||
* @__NO_SIDE_EFFECTS__
|
||||
*/
|
||||
export declare function useProjection(
|
||||
input: MaybeRefOrGetter<number>,
|
||||
fromDomain: MaybeRefOrGetter<readonly [number, number]>,
|
||||
toDomain: MaybeRefOrGetter<readonly [number, number]>,
|
||||
projector?: ProjectorFunction<number, number>,
|
||||
): ComputedRef<number>
|
||||
```
|
||||
Reference in New Issue
Block a user