Commit 6e93aa6
authored
Rewrite README with comprehensive API documentation (#2)
**Background**
The existing README was a minimal overview with a few usage snippets and external links. It didn't document the full API surface — props, hooks, types, and utilities — making it hard for new users to integrate the library without reading the source code.
**Change**
- Rewrote the introduction to clearly describe what the package does and link to both the live demo and official Camera Kit docs.
- Added a **Quick start** section with a minimal working example.
- Documented all component props in tables:
- `CameraKitProvider` (7 props including `stabilityKey`, `extendContainer`, `createBootstrapEventHandler`)
- `LensPlayer` (15 props with cross-reference to `LiveCanvas`/`CaptureCanvas` children pattern)
- `LiveCanvas` / `CaptureCanvas`
- Documented all hooks with signatures, parameter tables, and examples:
- `useCameraKit` — full state properties (11) and methods (12)
- `useApplyLens`, `useApplySource`, `usePlaybackOptions`
- Added **Media sources** section covering camera, video, and image `SourceInput` types with options tables.
- Added **Handling loading and error states** section showing SDK/source/Lens status patterns.
- Added a **Full example: Lens switcher** with a complete working component.
- Added **Utilities** table (`createConsoleLogger`, type guards, `CameraRotationOptions`).
- Consolidated prerequisites into a concise **Requirements** block with peer dependency versions.
- Condensed the **Development** commands section.
**Test Plan**
- Documentation-only change — no code modified. Verified all documented props, hooks, methods, and types against the source code for accuracy.1 parent 2c1eb54 commit 6e93aa6
1 file changed
Lines changed: 304 additions & 64 deletions
0 commit comments