UNPKG

@empirica/core

Version:
54 lines (44 loc) 2.52 kB
import { G as Globals } from './scopes-eb5984a4.js'; export { A as Attribute, b as AttributeChange, c as AttributeOptions, d as AttributeUpdate, J as Json, i as JsonArray, j as JsonValue, f as ScopeIdent, g as ScopeUpdate } from './scopes-eb5984a4.js'; import { T as TajribaConnection } from './tajriba_connection-49a30908.js'; import { BehaviorSubject } from 'rxjs'; import { T as TajribaProvider } from './provider-4150a447.js'; export { P as ParticipantUpdate, b as StepChange, d as StepUpdate } from './provider-4150a447.js'; import { W as WithChildren } from './helpers-3dc821e8.js'; export { a as Consent, C as ConsentProps, b as PlayerCreate, P as PlayerCreateProps } from './helpers-3dc821e8.js'; import '@empirica/tajriba'; import 'react'; declare class ParticipantContext { constructor(url: string, ns: string); get connecting(): BehaviorSubject<boolean>; get connected(): BehaviorSubject<boolean>; register(playerIdentifier: string): Promise<void>; stop(): void; } declare type Mode<T> = (participantID: string, provider: TajribaProvider) => T; declare type EmpiricaMenuProps = { position: "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right"; }; declare function EmpiricaMenu({ position }: EmpiricaMenuProps): JSX.Element | null; declare type EmpiricaParticipantProps = WithChildren<{ url: string; ns: string; modeFunc?: Mode<any>; }>; declare function EmpiricaParticipant({ url, ns, modeFunc, children, }: EmpiricaParticipantProps): JSX.Element; declare function Finished(): JSX.Element; declare function Loading(): JSX.Element; declare function Logo(): JSX.Element; declare function NoGames(): JSX.Element; declare function useParticipantContext(): ParticipantContext | undefined; declare function useTajribaConnecting(): boolean | undefined; declare function useTajribaConnected(): boolean | undefined; declare function useTajriba(): TajribaConnection | undefined; declare function useGlobal(): Globals | undefined; declare function useConsent(ns?: string): [boolean, (() => void) | undefined]; declare function usePlayerID(): [ boolean, string | undefined, ((v: string) => void) | undefined ]; export { EmpiricaMenu, EmpiricaMenuProps, EmpiricaParticipant, EmpiricaParticipantProps, Finished, Globals, Loading, Logo, Mode, NoGames, ParticipantContext, TajribaConnection, TajribaProvider, WithChildren, useConsent, useGlobal, useParticipantContext, usePlayerID, useTajriba, useTajribaConnected, useTajribaConnecting };