Skip to content

Rewrite README with comprehensive API documentation#2

Merged
msilivonik-sc merged 1 commit intomainfrom
ms/readme
Mar 27, 2026
Merged

Rewrite README with comprehensive API documentation#2
msilivonik-sc merged 1 commit intomainfrom
ms/readme

Conversation

@msilivonik-sc
Copy link
Copy Markdown
Collaborator

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.

Replace the minimal README with full documentation covering all components
(CameraKitProvider, LensPlayer, LiveCanvas/CaptureCanvas), hooks
(useCameraKit, useApplyLens, useApplySource, usePlaybackOptions), media
sources, error handling patterns, and a complete Lens switcher example.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@jciereszko-sc jciereszko-sc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@msilivonik-sc msilivonik-sc merged commit 6e93aa6 into main Mar 27, 2026
1 check passed
@msilivonik-sc msilivonik-sc deleted the ms/readme branch March 27, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants