@conference-kit/nextjs 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +50 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # @conference-kit/nextjs
2
+
3
+ Next.js-friendly entry point for the React bindings plus client-only helpers.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @conference-kit/nextjs
9
+ ```
10
+
11
+ Peer deps: Next 13+, React 18+.
12
+
13
+ ## What you get
14
+
15
+ - Re-exports everything from `@conference-kit/react` for direct use in app/router components.
16
+ - `isClient`: boolean flag (`typeof window !== "undefined"`).
17
+ - `dynamicClient(factory, loading?)`: wraps `next/dynamic` with `ssr: false` to load browser-only components (e.g., ones that call `getUserMedia`).
18
+
19
+ ## Usage
20
+
21
+ ```tsx
22
+ import { dynamicClient, useMeshRoom } from "@conference-kit/nextjs";
23
+
24
+ const MeshClient = dynamicClient(() => import("./Mesh"));
25
+
26
+ export default function Page() {
27
+ return <MeshClient />;
28
+ }
29
+
30
+ // Mesh.tsx (client component)
31
+ ("use client");
32
+ import { useMeshRoom } from "@conference-kit/nextjs";
33
+
34
+ export default function Mesh() {
35
+ const mesh = useMeshRoom({
36
+ peerId: "a",
37
+ room: "lobby",
38
+ signalingUrl: "ws://localhost:8787",
39
+ });
40
+ return <div>Peers: {mesh.participants.length}</div>;
41
+ }
42
+ ```
43
+
44
+ ## Build
45
+
46
+ ```bash
47
+ npm run build
48
+ ```
49
+
50
+ Emits ESM + types to `dist/`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conference-kit/nextjs",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",