callskit
Version:
A toolkit for building call experience using Cloudflare Realtime
17 lines (13 loc) • 779 B
text/typescript
import { c as CallClient, b as CallClientOptions } from './call-client-Bg6Zezz0.cjs';
import React from 'react';
import 'partytracks/client';
type CallProviderProps = {
call: CallClient | undefined;
fallback?: React.ReactNode;
};
declare function CallProvider({ call, fallback, children, }: React.PropsWithChildren<CallProviderProps>): React.JSX.Element;
declare function useCall(): CallClient;
type StateSelector<O extends object, S> = (obj: O) => S;
declare function useCallSelector<CallSlice>(selector: StateSelector<CallClient, CallSlice>): CallSlice;
declare function useCreateCall(): readonly [CallClient | undefined, (options: CallClientOptions) => Promise<CallClient>];
export { CallProvider, type CallProviderProps, useCall, useCallSelector, useCreateCall };