feat: Complete fleet — 94 skills across 10+ domains
Pulled ALL skills from 15 source repositories: - anthropics/skills: 16 (docs, design, MCP, testing) - obra/superpowers: 14 (TDD, debugging, agents, planning) - coreyhaines31/marketingskills: 25 (marketing, CRO, SEO, growth) - better-auth/skills: 5 (auth patterns) - vercel-labs/agent-skills: 5 (React, design, Vercel) - antfu/skills: 16 (Vue, Vite, Vitest, pnpm, Turborepo) - Plus 13 individual skills from various repos Mosaic Stack is not limited to coding — the Orchestrator and subagents serve coding, business, design, marketing, writing, logistics, analysis, and more. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
90
skills/vueuse-functions/references/useDevicesList.md
Normal file
90
skills/vueuse-functions/references/useDevicesList.md
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
category: Sensors
|
||||
---
|
||||
|
||||
# useDevicesList
|
||||
|
||||
Reactive [enumerateDevices](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices) listing available input/output devices.
|
||||
|
||||
## Usage
|
||||
|
||||
```ts
|
||||
import { useDevicesList } from '@vueuse/core'
|
||||
|
||||
const {
|
||||
devices,
|
||||
videoInputs: cameras,
|
||||
audioInputs: microphones,
|
||||
audioOutputs: speakers,
|
||||
} = useDevicesList()
|
||||
```
|
||||
|
||||
## Requesting Permissions
|
||||
|
||||
To request permissions, use the `ensurePermissions` method.
|
||||
|
||||
```ts
|
||||
import { useDevicesList } from '@vueuse/core'
|
||||
// ---cut---
|
||||
const {
|
||||
ensurePermissions,
|
||||
permissionGranted,
|
||||
} = useDevicesList()
|
||||
|
||||
await ensurePermissions()
|
||||
console.log(permissionsGranted.value)
|
||||
```
|
||||
|
||||
# Component
|
||||
|
||||
```vue
|
||||
<template>
|
||||
<UseDevicesList v-slot="{ videoInputs, audioInputs, audioOutputs }">
|
||||
Cameras: {{ videoInputs }}
|
||||
Microphones: {{ audioInputs }}
|
||||
Speakers: {{ audioOutputs }}
|
||||
</UseDevicesList>
|
||||
</template>
|
||||
```
|
||||
|
||||
## Type Declarations
|
||||
|
||||
```ts
|
||||
export interface UseDevicesListOptions extends ConfigurableNavigator {
|
||||
onUpdated?: (devices: MediaDeviceInfo[]) => void
|
||||
/**
|
||||
* Request for permissions immediately if it's not granted,
|
||||
* otherwise label and deviceIds could be empty
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
requestPermissions?: boolean
|
||||
/**
|
||||
* Request for types of media permissions
|
||||
*
|
||||
* @default { audio: true, video: true }
|
||||
*/
|
||||
constraints?: MediaStreamConstraints
|
||||
}
|
||||
export interface UseDevicesListReturn {
|
||||
/**
|
||||
* All devices
|
||||
*/
|
||||
devices: Ref<MediaDeviceInfo[]>
|
||||
videoInputs: ComputedRef<MediaDeviceInfo[]>
|
||||
audioInputs: ComputedRef<MediaDeviceInfo[]>
|
||||
audioOutputs: ComputedRef<MediaDeviceInfo[]>
|
||||
permissionGranted: ShallowRef<boolean>
|
||||
ensurePermissions: () => Promise<boolean>
|
||||
isSupported: ComputedRef<boolean>
|
||||
}
|
||||
/**
|
||||
* Reactive `enumerateDevices` listing available input/output devices
|
||||
*
|
||||
* @see https://vueuse.org/useDevicesList
|
||||
* @param options
|
||||
*/
|
||||
export declare function useDevicesList(
|
||||
options?: UseDevicesListOptions,
|
||||
): UseDevicesListReturn
|
||||
```
|
||||
Reference in New Issue
Block a user