first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

59
node_modules/expo/build/hooks/useEvent.d.ts generated vendored Normal file
View File

@@ -0,0 +1,59 @@
import type { EventEmitter } from 'expo-modules-core/types';
type AnyEventListener = (...args: any[]) => any;
/**
* Type helper that infers the event name from the emitter's events map.
*/
type InferEventName<TEventsMap> = TEventsMap extends Record<infer TEventName extends keyof TEventsMap, AnyEventListener> ? TEventName : never;
/**
* Type helper that infers the event listener from the emitter's events map.
*/
type InferEventListener<TEventsMap, TEventName extends keyof TEventsMap> = TEventsMap extends Record<TEventName, infer TEventListener extends AnyEventListener> ? TEventListener : never;
/**
* Type helper that infers the first parameter of the event listener.
*/
type InferEventParameter<TEventListener extends AnyEventListener, TInitialValue> = TInitialValue extends Parameters<TEventListener>[0] ? Parameters<TEventListener>[0] : Parameters<TEventListener>[0] | TInitialValue | null;
/**
* React hook that listens to events emitted by the given object. The returned value is an event parameter
* that gets updated whenever a new event is dispatched.
* @param eventEmitter An object that emits events. For example, a native module or shared object or an instance of [`EventEmitter`](#eventemittertype).
* @param eventName Name of the event to listen to.
* @param initialValue An event parameter to use until the event is called for the first time.
* @returns A parameter of the event listener.
* @example
* ```tsx
* import { useEvent } from 'expo';
* import { VideoPlayer } from 'expo-video';
*
* export function PlayerStatus({ videoPlayer }: { videoPlayer: VideoPlayer }) {
* const { status } = useEvent(videoPlayer, 'statusChange', { status: videoPlayer.status });
*
* return <Text>{`Player status: ${status}`}</Text>;
* }
* ```
*/
export declare function useEvent<TEventsMap extends Record<string, AnyEventListener>, TEventName extends InferEventName<TEventsMap>, TEventListener extends InferEventListener<TEventsMap, TEventName>, TInitialValue extends Parameters<TEventListener>[0] | null>(eventEmitter: EventEmitter<TEventsMap>, eventName: TEventName, initialValue?: TInitialValue | null): InferEventParameter<TEventListener, TInitialValue>;
/**
* React hook that listens to events emitted by the given object and calls the listener function whenever a new event is dispatched.
* The event listener is automatically added during the first render and removed when the component unmounts.
* @param eventEmitter An object that emits events. For example, a native module or shared object or an instance of [`EventEmitter`](#eventemittertype).
* @param eventName Name of the event to listen to.
* @param listener A function to call when the event is dispatched.
* @example
* ```tsx
* import { useEventListener } from 'expo';
* import { useVideoPlayer, VideoView } from 'expo-video';
*
* export function VideoPlayerView() {
* const player = useVideoPlayer(videoSource);
*
* useEventListener(player, 'playingChange', ({ isPlaying }) => {
* console.log('Player is playing:', isPlaying);
* });
*
* return <VideoView player={player} />;
* }
* ```
*/
export declare function useEventListener<TEventsMap extends Record<string, AnyEventListener>, TEventName extends InferEventName<TEventsMap>, TEventListener extends InferEventListener<TEventsMap, TEventName>>(eventEmitter: EventEmitter<TEventsMap>, eventName: TEventName, listener: TEventListener): void;
export {};
//# sourceMappingURL=useEvent.d.ts.map

1
node_modules/expo/build/hooks/useEvent.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"useEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/useEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAG5D,KAAK,gBAAgB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAEhD;;GAEG;AACH,KAAK,cAAc,CAAC,UAAU,IAC5B,UAAU,SAAS,MAAM,CAAC,MAAM,UAAU,SAAS,MAAM,UAAU,EAAE,gBAAgB,CAAC,GAClF,UAAU,GACV,KAAK,CAAC;AAEZ;;GAEG;AACH,KAAK,kBAAkB,CAAC,UAAU,EAAE,UAAU,SAAS,MAAM,UAAU,IACrE,UAAU,SAAS,MAAM,CAAC,UAAU,EAAE,MAAM,cAAc,SAAS,gBAAgB,CAAC,GAChF,cAAc,GACd,KAAK,CAAC;AAEZ;;GAEG;AACH,KAAK,mBAAmB,CACtB,cAAc,SAAS,gBAAgB,EACvC,aAAa,IACX,aAAa,SAAS,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,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