@naviedu/room-platform-react 0.0.11 → 0.0.12
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.
- package/README.md +8 -3
- package/index.d.ts +1 -1
- package/index.esm.js +638 -447
- package/package.json +1 -1
- package/styles.css +38 -2
package/README.md
CHANGED
|
@@ -27,14 +27,12 @@ runtime dependencies are installed automatically with the package.
|
|
|
27
27
|
|
|
28
28
|
## Basic usage
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
launch ticket returned by your backend:
|
|
30
|
+
Render `RoomPlatformRoom` with the launch ticket returned by your backend:
|
|
32
31
|
|
|
33
32
|
```tsx
|
|
34
33
|
'use client'
|
|
35
34
|
|
|
36
35
|
import { type RoomLaunchTicketRenewalReason, RoomPlatformRoom } from '@naviedu/room-platform-react'
|
|
37
|
-
import '@naviedu/room-platform-react/styles.css'
|
|
38
36
|
|
|
39
37
|
type RoomTicketResponse = { launchToken: string }
|
|
40
38
|
|
|
@@ -61,6 +59,10 @@ export function Room({ launchToken }: { launchToken: string }) {
|
|
|
61
59
|
}
|
|
62
60
|
```
|
|
63
61
|
|
|
62
|
+
`RoomPlatformRoom` renders its default room UI in an isolated Shadow Root and installs the package stylesheet itself. Do not import `@naviedu/room-platform-react/styles.css` for the default component.
|
|
63
|
+
|
|
64
|
+
`RoomPlatformProvider` is advanced composition only; a consumer using it instead of `RoomPlatformRoom` owns its own DOM and stylesheet boundary.
|
|
65
|
+
|
|
64
66
|
`apiBaseUrl` is the URL prefix before `/rooms`. The package calls these routes
|
|
65
67
|
relative to it:
|
|
66
68
|
|
|
@@ -158,6 +160,9 @@ whiteboard surface. Omit either integration when the host does not use it.
|
|
|
158
160
|
Extensions keep host-specific UI outside the shared room implementation. Every
|
|
159
161
|
extension receives `RoomPlatformExtensionProps`:
|
|
160
162
|
|
|
163
|
+
Host extensions with independent framework CSS must own their own DOM and
|
|
164
|
+
stylesheet boundary.
|
|
165
|
+
|
|
161
166
|
```tsx
|
|
162
167
|
import type { RoomPlatformExtensionProps } from '@naviedu/room-platform-react'
|
|
163
168
|
|
package/index.d.ts
CHANGED
|
@@ -616,7 +616,7 @@ export declare type RoomPlatformProviderProps = PropsWithChildren<{
|
|
|
616
616
|
}>;
|
|
617
617
|
}>;
|
|
618
618
|
|
|
619
|
-
export declare function RoomPlatformRoom(
|
|
619
|
+
export declare function RoomPlatformRoom(props: RoomPlatformRoomProps): JSX.Element;
|
|
620
620
|
|
|
621
621
|
export declare type RoomPlatformRoomProps = {
|
|
622
622
|
apiBaseUrl: string;
|