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

114
node_modules/react-native/flow/HermesInternalType.js generated vendored Normal file
View File

@@ -0,0 +1,114 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
// Declarations for functionality exposed by the Hermes VM.
//
// For backwards-compatibility, code that uses such functionality must also
// check explicitly at run-time whether the object(s) and method(s) exist, and
// fail safely if not.
/**
* HermesInternalType is an object containing functions used to interact with
* the VM in a way that is not standardized by the JS spec.
* There are limited guarantees about these functions, and they should not be
* widely used. Consult with the Hermes team before using any of these.
* There may be other visible properties on this object; however, those are
* only exposed for testing purposes: do not use them.
*/
declare type $HermesInternalType = {
// All members are optional because they may not exist when OTA'd to older
// VMs.
+getNumGCs?: () => number,
+getGCTime?: () => number,
+getNativeCallTime?: () => number,
+getNativeCallCount?: () => number,
+getGCCPUTime?: () => number,
/**
* Hermes can embed an "epilogue" to the bytecode file with arbitrary bytes.
* At most one epilogue will exist per bytecode module (which can be
* different than a JS module).
* Calling this function will return all such epilogues and convert the
* bytes to numbers in the range of 0-255.
*/
+getEpilogues?: () => Array<Array<number>>,
/**
* Query the VM for various statistics about performance.
* There are no guarantees about what keys exist in it, but they can be
* printed for informational purposes.
* @return An object that maps strings to various types of performance
* statistics.
*/
+getInstrumentedStats?: () => {[string]: number | string, ...},
/**
* Query the VM for any sort of runtime properties that it wants to report.
* There are no guarantees about what keys exist in it, but they can be
* printed for informational purposes.
* @return An object that maps strings to various types of runtime properties.
*/
+getRuntimeProperties?: () => {
'OSS Release Version': string,
Build: string,
[string]: mixed,
},
/**
* Tell Hermes that at this point the surface has transitioned from TTI to
* post-TTI. The VM can change some of its internal behavior to optimize for
* post-TTI scenarios.
* This can be called several times but will have no effect after the first
* call.
*/
+ttiReached?: () => void,
/**
* Tell Hermes that at this point the surface has transitioned from TTRC to
* post-TTRC. The VM can change some of its internal behavior to optimize for
* post-TTRC scenarios.
* This can be called several times but will have no effect after the first
* call.
*/
+ttrcReached?: () => void,
/**
* Query the VM to see whether or not it enabled Promise.
*/
+hasPromise?: () => boolean,
/**
* Enable promise rejection tracking with the given options.
* The API mirrored the `promise` npm package, therefore it's typed same as
* the `enable` function of module `promise/setimmediate/rejection-tracking`
* declared in ./flow-typed/npm/promise_v8.x.x.js.
*/
+enablePromiseRejectionTracker?: (
options: ?{
whitelist?: ?Array<mixed>,
allRejections?: ?boolean,
onUnhandled?: ?(number, mixed) => void,
onHandled?: ?(number, mixed) => void,
},
) => void,
/**
* Query the VM to see whether or not it use the engine Job queue.
*/
+useEngineQueue?: () => boolean,
/**
* Enqueue a JavaScript callback function as a Job into the engine Job queue.
*/
+enqueueJob?: <TArguments: Array<mixed>>(
jobCallback: (...args: TArguments) => mixed,
) => void,
};

14
node_modules/react-native/flow/Stringish.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
// This type allows Facebook to internally Override
// this type to allow our internationalization type which
// is a string at runtime but Flow doesn't know that.
declare type Stringish = string;

712
node_modules/react-native/flow/bom.js.flow generated vendored Normal file
View File

@@ -0,0 +1,712 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
/* BOM */
declare var window: typeof globalThis;
type DevToolsColor =
| 'primary'
| 'primary-light'
| 'primary-dark'
| 'secondary'
| 'secondary-light'
| 'secondary-dark'
| 'tertiary'
| 'tertiary-light'
| 'tertiary-dark'
| 'warning'
| 'error';
// $FlowExpectedError[libdef-override] Flow core definitions are incomplete.
declare var console: {
// Logging
log(...data: $ReadOnlyArray<mixed>): void,
trace(...data: $ReadOnlyArray<mixed>): void,
debug(...data: $ReadOnlyArray<mixed>): void,
info(...data: $ReadOnlyArray<mixed>): void,
warn(...data: $ReadOnlyArray<mixed>): void,
error(...data: $ReadOnlyArray<mixed>): void,
// Grouping
group(...data: $ReadOnlyArray<mixed>): void,
groupCollapsed(...data: $ReadOnlyArray<mixed>): void,
groupEnd(): void,
// Printing
table(
tabularData:
| $ReadOnly<{[key: string]: mixed, ...}>
| $ReadOnlyArray<$ReadOnly<{[key: string]: mixed, ...}>>
| $ReadOnlyArray<$ReadOnlyArray<mixed>>,
): void,
dir(...data: $ReadOnlyArray<mixed>): void,
dirxml(...data: $ReadOnlyArray<mixed>): void,
clear(): void,
// Utilities
assert(condition: mixed, ...data: $ReadOnlyArray<mixed>): void,
// Profiling
profile(name?: string): void,
profileEnd(name?: string): void,
// Counts
count(label?: string): void,
countReset(label?: string): void,
// Timing / tracing
time(label?: string): void,
timeEnd(label?: string): void,
timeStamp(
label?: string,
start?: string | number,
end?: string | number,
trackName?: string,
trackGroup?: string,
color?: DevToolsColor,
detail?: {[string]: mixed},
): void,
...
};
declare class Navigator {
product: 'ReactNative';
appName?: ?string;
}
declare var navigator: Navigator;
// https://www.w3.org/TR/hr-time-2/#dom-domhighrestimestamp
// https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp
declare type DOMHighResTimeStamp = number;
type PerformanceEntryFilterOptions = {
entryType: string,
name: string,
...
};
// https://www.w3.org/TR/performance-timeline-2/
declare class PerformanceEntry {
duration: DOMHighResTimeStamp;
entryType: string;
name: string;
startTime: DOMHighResTimeStamp;
toJSON(): string;
}
// https://w3c.github.io/user-timing/#performancemark
declare class PerformanceMark extends PerformanceEntry {
constructor(name: string, markOptions?: PerformanceMarkOptions): void;
+detail: mixed;
}
// https://w3c.github.io/user-timing/#performancemeasure
declare class PerformanceMeasure extends PerformanceEntry {
+detail: mixed;
}
// https://w3c.github.io/server-timing/#the-performanceservertiming-interface
declare class PerformanceServerTiming {
description: string;
duration: DOMHighResTimeStamp;
name: string;
toJSON(): string;
}
// https://www.w3.org/TR/resource-timing-2/#sec-performanceresourcetiming
// https://w3c.github.io/server-timing/#extension-to-the-performanceresourcetiming-interface
declare class PerformanceResourceTiming extends PerformanceEntry {
connectEnd: number;
connectStart: number;
decodedBodySize: number;
domainLookupEnd: number;
domainLookupStart: number;
encodedBodySize: number;
fetchStart: number;
initiatorType: string;
nextHopProtocol: string;
redirectEnd: number;
redirectStart: number;
requestStart: number;
responseEnd: number;
responseStart: number;
secureConnectionStart: number;
serverTiming: Array<PerformanceServerTiming>;
transferSize: number;
workerStart: number;
}
// https://w3c.github.io/event-timing/#sec-performance-event-timing
declare class PerformanceEventTiming extends PerformanceEntry {
cancelable: boolean;
interactionId: number;
processingEnd: number;
processingStart: number;
target: ?Node;
}
// https://w3c.github.io/longtasks/#taskattributiontiming
declare class TaskAttributionTiming extends PerformanceEntry {
containerId: string;
containerName: string;
containerSrc: string;
containerType: string;
}
// https://w3c.github.io/longtasks/#sec-PerformanceLongTaskTiming
declare class PerformanceLongTaskTiming extends PerformanceEntry {
attribution: $ReadOnlyArray<TaskAttributionTiming>;
}
// https://www.w3.org/TR/user-timing/#extensions-performance-interface
declare type PerformanceMarkOptions = {
detail?: mixed,
startTime?: number,
};
declare type PerformanceMeasureOptions = {
detail?: mixed,
duration?: number,
end?: number | string,
start?: number | string,
};
type EventCountsForEachCallbackType =
| (() => void)
| ((value: number) => void)
| ((value: number, key: string) => void)
| ((value: number, key: string, map: Map<string, number>) => void);
// https://www.w3.org/TR/event-timing/#eventcounts
declare interface EventCounts {
entries(): Iterator<[string, number]>;
forEach(callback: EventCountsForEachCallbackType): void;
get(key: string): ?number;
has(key: string): boolean;
keys(): Iterator<string>;
size: number;
values(): Iterator<number>;
}
declare class Performance {
+eventCounts: EventCounts;
+timeOrigin: DOMHighResTimeStamp;
clearMarks(name?: string): void;
clearMeasures(name?: string): void;
getEntries: (
options?: PerformanceEntryFilterOptions,
) => Array<PerformanceEntry>;
getEntriesByName: (name: string, type?: string) => Array<PerformanceEntry>;
getEntriesByType: (type: string) => Array<PerformanceEntry>;
mark(name: string, options?: PerformanceMarkOptions): PerformanceMark;
measure(
name: string,
startMarkOrOptions?: string | PerformanceMeasureOptions,
endMark?: string,
): PerformanceMeasure;
now(): DOMHighResTimeStamp;
toJSON(): string;
}
declare var performance: Performance;
type PerformanceEntryList = Array<PerformanceEntry>;
declare interface PerformanceObserverEntryList {
getEntries(): PerformanceEntryList;
getEntriesByName(name: string, type: ?string): PerformanceEntryList;
getEntriesByType(type: string): PerformanceEntryList;
}
type PerformanceObserverInit = {
buffered?: boolean,
entryTypes?: Array<string>,
type?: string,
...
};
declare class PerformanceObserver {
constructor(
callback: (
entries: PerformanceObserverEntryList,
observer: PerformanceObserver,
) => mixed,
): void;
disconnect(): void;
observe(options: ?PerformanceObserverInit): void;
static supportedEntryTypes: Array<string>;
takeRecords(): PerformanceEntryList;
}
type FormDataEntryValue = string | File;
declare class FormData {
append(name: string, value: string): void;
append(name: string, value: Blob, filename?: string): void;
append(name: string, value: File, filename?: string): void;
constructor(form?: HTMLFormElement, submitter?: HTMLElement | null): void;
delete(name: string): void;
entries(): Iterator<[string, FormDataEntryValue]>;
get(name: string): ?FormDataEntryValue;
getAll(name: string): Array<FormDataEntryValue>;
has(name: string): boolean;
keys(): Iterator<string>;
set(name: string, value: string): void;
set(name: string, value: Blob, filename?: string): void;
set(name: string, value: File, filename?: string): void;
values(): Iterator<FormDataEntryValue>;
}
declare class DOMRectReadOnly {
+bottom: number;
constructor(x: number, y: number, width: number, height: number): void;
static fromRect(rectangle?: {
height: number,
width: number,
x: number,
y: number,
...
}): DOMRectReadOnly;
+height: number;
+left: number;
+right: number;
+top: number;
+width: number;
+x: number;
+y: number;
}
declare class DOMRect extends DOMRectReadOnly {
bottom: number;
static fromRect(rectangle?: {
height: number,
width: number,
x: number,
y: number,
...
}): DOMRect;
height: number;
left: number;
right: number;
top: number;
width: number;
x: number;
y: number;
}
declare class DOMRectList {
@@iterator(): Iterator<DOMRect>;
item(index: number): DOMRect;
length: number;
[index: number]: DOMRect;
}
declare class CloseEvent extends Event {
code: number;
reason: string;
wasClean: boolean;
}
declare class WebSocket extends EventTarget {
binaryType: 'blob' | 'arraybuffer';
bufferedAmount: number;
close(code?: number, reason?: string): void;
static CLOSED: 3;
CLOSED: 3;
static CLOSING: 2;
CLOSING: 2;
static CONNECTING: 0;
CONNECTING: 0;
constructor(url: string, protocols?: string | Array<string>): void;
extensions: string;
onclose: (ev: CloseEvent) => mixed;
onerror: (ev: $FlowFixMe) => mixed;
onmessage: (ev: MessageEvent) => mixed;
onopen: (ev: $FlowFixMe) => mixed;
static OPEN: 1;
OPEN: 1;
protocol: string;
readyState: number;
send(data: string): void;
send(data: Blob): void;
send(data: ArrayBuffer): void;
send(data: $ArrayBufferView): void;
url: string;
}
declare class XMLHttpRequest extends EventTarget {
abort(): void;
static DONE: number;
DONE: number;
getAllResponseHeaders(): string;
getResponseHeader(header: string): string;
static HEADERS_RECEIVED: number;
HEADERS_RECEIVED: number;
static LOADING: number;
LOADING: number;
msCaching: string;
msCachingEnabled(): boolean;
onabort: ProgressEventHandler;
onerror: ProgressEventHandler;
onload: ProgressEventHandler;
onloadend: ProgressEventHandler;
onloadstart: ProgressEventHandler;
onprogress: ProgressEventHandler;
onreadystatechange: (ev: $FlowFixMe) => mixed;
ontimeout: ProgressEventHandler;
open(
method: string,
url: string,
async?: boolean,
user?: string,
password?: string,
): void;
static OPENED: number;
OPENED: number;
overrideMimeType(mime: string): void;
readyState: number;
response: $FlowFixMe;
responseBody: $FlowFixMe;
responseText: string;
responseType: string;
responseURL: string;
responseXML: $FlowFixMe;
send(data?: $FlowFixMe): void;
setRequestHeader(header: string, value: string): void;
statics: {create(): XMLHttpRequest, ...};
status: number;
statusText: string;
timeout: number;
static UNSENT: number;
UNSENT: number;
upload: XMLHttpRequestEventTarget;
withCredentials: boolean;
}
declare class XMLHttpRequestEventTarget extends EventTarget {
onabort: ProgressEventHandler;
onerror: ProgressEventHandler;
onload: ProgressEventHandler;
onloadend: ProgressEventHandler;
onloadstart: ProgressEventHandler;
onprogress: ProgressEventHandler;
ontimeout: ProgressEventHandler;
}
// this part of spec is not finished yet, apparently
// https://stackoverflow.com/questions/35296664/can-fetch-get-object-as-headers
type HeadersInit =
| Headers
| Array<[string, string]>
| {[key: string]: string, ...};
// TODO Heades and URLSearchParams are almost the same thing.
// Could it somehow be abstracted away?
declare class Headers {
@@iterator(): Iterator<[string, string]>;
append(name: string, value: string): void;
constructor(init?: HeadersInit): void;
delete(name: string): void;
entries(): Iterator<[string, string]>;
forEach<This>(
callback: (
this: This,
value: string,
name: string,
headers: Headers,
) => mixed,
thisArg: This,
): void;
get(name: string): null | string;
has(name: string): boolean;
keys(): Iterator<string>;
set(name: string, value: string): void;
values(): Iterator<string>;
}
declare class URLSearchParams {
@@iterator(): Iterator<[string, string]>;
append(name: string, value: string): void;
constructor(
init?:
| string
| URLSearchParams
| Array<[string, string]>
| {[string]: string, ...},
): void;
delete(name: string, value?: string): void;
entries(): Iterator<[string, string]>;
forEach<This>(
callback: (
this: This,
value: string,
name: string,
params: URLSearchParams,
) => mixed,
thisArg: This,
): void;
get(name: string): null | string;
getAll(name: string): Array<string>;
has(name: string, value?: string): boolean;
keys(): Iterator<string>;
set(name: string, value: string): void;
size: number;
sort(): void;
toString(): string;
values(): Iterator<string>;
}
type CacheType =
| 'default'
| 'no-store'
| 'reload'
| 'no-cache'
| 'force-cache'
| 'only-if-cached';
type CredentialsType = 'omit' | 'same-origin' | 'include';
type ModeType = 'cors' | 'no-cors' | 'same-origin' | 'navigate';
type RedirectType = 'follow' | 'error' | 'manual';
type ReferrerPolicyType =
| ''
| 'no-referrer'
| 'no-referrer-when-downgrade'
| 'same-origin'
| 'origin'
| 'strict-origin'
| 'origin-when-cross-origin'
| 'strict-origin-when-cross-origin'
| 'unsafe-url';
type ResponseType =
| 'basic'
| 'cors'
| 'default'
| 'error'
| 'opaque'
| 'opaqueredirect';
type BodyInit =
| string
| URLSearchParams
| FormData
| Blob
| ArrayBuffer
| $ArrayBufferView
| ReadableStream;
type RequestInfo = Request | URL | string;
type RequestOptions = {
body?: ?BodyInit,
cache?: CacheType,
credentials?: CredentialsType,
headers?: HeadersInit,
integrity?: string,
keepalive?: boolean,
method?: string,
mode?: ModeType,
redirect?: RedirectType,
referrer?: string,
referrerPolicy?: ReferrerPolicyType,
signal?: ?AbortSignal,
window?: $FlowFixMe,
...
};
type ResponseOptions = {
headers?: HeadersInit,
status?: number,
statusText?: string,
...
};
declare class Response {
arrayBuffer(): Promise<ArrayBuffer>;
blob(): Promise<Blob>;
body: ?ReadableStream;
// Body methods and attributes
bodyUsed: boolean;
clone(): Response;
constructor(input?: ?BodyInit, init?: ResponseOptions): void;
static error(): Response;
formData(): Promise<FormData>;
headers: Headers;
json(): Promise<$FlowFixMe>;
ok: boolean;
static redirect(url: string, status?: number): Response;
redirected: boolean;
status: number;
statusText: string;
text(): Promise<string>;
trailer: Promise<Headers>;
type: ResponseType;
url: string;
}
declare class Request {
arrayBuffer(): Promise<ArrayBuffer>;
blob(): Promise<Blob>;
// Body methods and attributes
bodyUsed: boolean;
cache: CacheType;
clone(): Request;
constructor(input: RequestInfo, init?: RequestOptions): void;
credentials: CredentialsType;
formData(): Promise<FormData>;
headers: Headers;
integrity: string;
json(): Promise<$FlowFixMe>;
method: string;
mode: ModeType;
redirect: RedirectType;
referrer: string;
referrerPolicy: ReferrerPolicyType;
+signal: AbortSignal;
text(): Promise<string>;
url: string;
}
declare class AbortController {
abort(reason?: $FlowFixMe): void;
constructor(): void;
+signal: AbortSignal;
}
declare class AbortSignal extends EventTarget {
abort(reason?: $FlowFixMe): AbortSignal;
+aborted: boolean;
onabort: (event: Event) => mixed;
+reason: $FlowFixMe;
throwIfAborted(): void;
timeout(time: number): AbortSignal;
}
declare function fetch(
input: RequestInfo,
init?: RequestOptions,
): Promise<Response>;
declare class Location {
ancestorOrigins: Array<string>;
assign(url: string): void;
hash: string;
host: string;
hostname: string;
href: string;
origin: string;
pathname: string;
port: string;
protocol: string;
reload(flag?: boolean): void;
replace(url: string): void;
search: string;
toString(): string;
}
declare class CanvasCaptureMediaStream extends MediaStream {
canvas: HTMLCanvasElement;
requestFrame(): void;
}
declare type FileSystemHandleKind = 'file' | 'directory';
// https://wicg.github.io/file-system-access/#api-filesystemhandle
declare class FileSystemHandle {
+kind: FileSystemHandleKind;
+name: string;
isSameEntry: (other: FileSystemHandle) => Promise<boolean>;
queryPermission?: (
descriptor: FileSystemHandlePermissionDescriptor,
) => Promise<PermissionStatus>;
requestPermission?: (
descriptor: FileSystemHandlePermissionDescriptor,
) => Promise<PermissionStatus>;
}
// https://fs.spec.whatwg.org/#api-filesystemfilehandle
declare class FileSystemFileHandle extends FileSystemHandle {
+kind: 'file';
constructor(name: string): void;
getFile(): Promise<File>;
createSyncAccessHandle(): Promise<FileSystemSyncAccessHandle>;
createWritable(options?: {|
keepExistingData?: boolean,
|}): Promise<FileSystemWritableFileStream>;
}
// https://fs.spec.whatwg.org/#api-filesystemdirectoryhandle
declare class FileSystemDirectoryHandle extends FileSystemHandle {
+kind: 'directory';
constructor(name: string): void;
getDirectoryHandle(
name: string,
options?: {|create?: boolean|},
): Promise<FileSystemDirectoryHandle>;
getFileHandle(
name: string,
options?: {|create?: boolean|},
): Promise<FileSystemFileHandle>;
removeEntry(name: string, options?: {|recursive?: boolean|}): Promise<void>;
resolve(possibleDescendant: FileSystemHandle): Promise<Array<string> | null>;
// Async iterator functions
@@asyncIterator(): AsyncIterator<[string, FileSystemHandle]>;
entries(): AsyncIterator<[string, FileSystemHandle]>;
keys(): AsyncIterator<string>;
values(): AsyncIterator<FileSystemHandle>;
}
// https://fs.spec.whatwg.org/#api-filesystemsyncaccesshandle
declare class FileSystemSyncAccessHandle {
close(): void;
flush(): void;
getSize(): number;
read(buffer: ArrayBuffer, options?: {|at: number|}): number;
truncate(newSize: number): void;
write(buffer: ArrayBuffer, options?: {|at: number|}): number;
}
declare class MediaStream {}
declare class USBDevice {}
declare class PermissionStatus {}
declare class FileSystemWritableFileStream {}
type PermissionState = 'granted' | 'denied' | 'prompt';
type FileSystemHandlePermissionDescriptor = {|
mode: 'read' | 'readwrite',
|};

49
node_modules/react-native/flow/console.js generated vendored Normal file
View File

@@ -0,0 +1,49 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
declare module 'console' {
declare function assert(value: any, ...message: any): void;
declare function dir(
obj: Object,
options: {
showHidden: boolean,
depth: number,
colors: boolean,
...
},
): void;
declare function error(...data: any): void;
declare function info(...data: any): void;
declare function log(...data: any): void;
declare function time(label: any): void;
declare function timeEnd(label: any): void;
declare function trace(first: any, ...rest: any): void;
declare function warn(...data: any): void;
declare class Console {
constructor(stdout: stream$Writable, stdin?: stream$Writable): void;
assert(value: any, ...message: any): void;
dir(
obj: Object,
options: {
showHidden: boolean,
depth: number,
colors: boolean,
...
},
): void;
error(...data: any): void;
info(...data: any): void;
log(...data: any): void;
time(label: any): void;
timeEnd(label: any): void;
trace(first: any, ...rest: any): void;
warn(...data: any): void;
}
}

575
node_modules/react-native/flow/cssom.js.flow generated vendored Normal file
View File

@@ -0,0 +1,575 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
declare class StyleSheet {
disabled: boolean;
+href: string;
+media: MediaList;
+ownerNode: Node;
+parentStyleSheet: ?StyleSheet;
+title: string;
+type: string;
}
declare class StyleSheetList {
@@iterator(): Iterator<StyleSheet>;
length: number;
[index: number]: StyleSheet;
}
declare class MediaList {
@@iterator(): Iterator<string>;
appendMedium(newMedium: string): void;
deleteMedium(oldMedium: string): void;
item(index: number): ?string;
length: number;
mediaText: string;
[index: number]: string;
}
declare class CSSStyleSheet extends StyleSheet {
+cssRules: CSSRuleList;
deleteRule(index: number): void;
insertRule(rule: string, index: number): number;
+ownerRule: ?CSSRule;
replace(text: string): Promise<CSSStyleSheet>;
replaceSync(text: string): void;
}
declare class CSSRule {
static CHARSET_RULE: number;
static COUNTER_STYLE_RULE: number;
cssText: string;
static DOCUMENT_RULE: number;
static FONT_FACE_RULE: number;
static FONT_FEATURE_VALUES_RULE: number;
static IMPORT_RULE: number;
static KEYFRAME_RULE: number;
static KEYFRAMES_RULE: number;
static MEDIA_RULE: number;
static NAMESPACE_RULE: number;
static PAGE_RULE: number;
+parentRule: ?CSSRule;
+parentStyleSheet: ?CSSStyleSheet;
static REGION_STYLE_RULE: number;
static STYLE_RULE: number;
static SUPPORTS_RULE: number;
+type: number;
static UNKNOWN_RULE: number;
static VIEWPORT_RULE: number;
}
declare class CSSKeyframeRule extends CSSRule {
keyText: string;
+style: CSSStyleDeclaration;
}
declare class CSSKeyframesRule extends CSSRule {
appendRule(rule: string): void;
+cssRules: CSSRuleList;
deleteRule(select: string): void;
findRule(select: string): CSSKeyframeRule | null;
name: string;
}
declare class CSSRuleList {
@@iterator(): Iterator<CSSRule>;
item(index: number): ?CSSRule;
length: number;
[index: number]: CSSRule;
}
declare class CSSStyleDeclaration {
@@iterator(): Iterator<string>;
/* DOM CSS Properties */
alignContent: string;
alignItems: string;
alignSelf: string;
all: string;
animation: string;
animationDelay: string;
animationDirection: string;
animationDuration: string;
animationFillMode: string;
animationIterationCount: string;
animationName: string;
animationPlayState: string;
animationTimingFunction: string;
backdropFilter: string;
backfaceVisibility: string;
background: string;
backgroundAttachment: string;
backgroundBlendMode: string;
backgroundClip: string;
backgroundColor: string;
backgroundImage: string;
backgroundOrigin: string;
backgroundPosition: string;
backgroundPositionX: string;
backgroundPositionY: string;
backgroundRepeat: string;
backgroundSize: string;
blockSize: string;
border: string;
borderBlockEnd: string;
borderBlockEndColor: string;
borderBlockEndStyle: string;
borderBlockEndWidth: string;
borderBlockStart: string;
borderBlockStartColor: string;
borderBlockStartStyle: string;
borderBlockStartWidth: string;
borderBottom: string;
borderBottomColor: string;
borderBottomLeftRadius: string;
borderBottomRightRadius: string;
borderBottomStyle: string;
borderBottomWidth: string;
borderCollapse: string;
borderColor: string;
borderImage: string;
borderImageOutset: string;
borderImageRepeat: string;
borderImageSlice: string;
borderImageSource: string;
borderImageWidth: string;
borderInlineEnd: string;
borderInlineEndColor: string;
borderInlineEndStyle: string;
borderInlineEndWidth: string;
borderInlineStart: string;
borderInlineStartColor: string;
borderInlineStartStyle: string;
borderInlineStartWidth: string;
borderLeft: string;
borderLeftColor: string;
borderLeftStyle: string;
borderLeftWidth: string;
borderRadius: string;
borderRight: string;
borderRightColor: string;
borderRightStyle: string;
borderRightWidth: string;
borderSpacing: string;
borderStyle: string;
borderTop: string;
borderTopColor: string;
borderTopLeftRadius: string;
borderTopRightRadius: string;
borderTopStyle: string;
borderTopWidth: string;
borderWidth: string;
bottom: string;
boxDecorationBreak: string;
boxShadow: string;
boxSizing: string;
breakAfter: string;
breakBefore: string;
breakInside: string;
captionSide: string;
clear: string;
clip: string;
clipPath: string;
color: string;
columnCount: string;
columnFill: string;
columnGap: string;
columnRule: string;
columnRuleColor: string;
columnRuleStyle: string;
columnRuleWidth: string;
columns: string;
columnSpan: string;
columnWidth: string;
contain: string;
content: string;
counterIncrement: string;
counterReset: string;
cssFloat: string;
cssText: string;
cursor: string;
direction: string;
display: string;
emptyCells: string;
filter: string;
flex: string;
flexBasis: string;
flexDirection: string;
flexFlow: string;
flexGrow: string;
flexShrink: string;
flexWrap: string;
float: string;
font: string;
fontFamily: string;
fontFeatureSettings: string;
fontKerning: string;
fontLanguageOverride: string;
fontSize: string;
fontSizeAdjust: string;
fontStretch: string;
fontStyle: string;
fontSynthesis: string;
fontVariant: string;
fontVariantAlternates: string;
fontVariantCaps: string;
fontVariantEastAsian: string;
fontVariantLigatures: string;
fontVariantNumeric: string;
fontVariantPosition: string;
fontWeight: string;
getPropertyPriority(property: string): string;
getPropertyValue(property: string): string;
grad: string;
grid: string;
gridArea: string;
gridAutoColumns: string;
gridAutoFlow: string;
gridAutoPosition: string;
gridAutoRows: string;
gridColumn: string;
gridColumnEnd: string;
gridColumnStart: string;
gridRow: string;
gridRowEnd: string;
gridRowStart: string;
gridTemplate: string;
gridTemplateAreas: string;
gridTemplateColumns: string;
gridTemplateRows: string;
height: string;
hyphens: string;
imageOrientation: string;
imageRendering: string;
imageResolution: string;
imeMode: string;
inherit: string;
initial: string;
inlineSize: string;
isolation: string;
item(index: number): string;
justifyContent: string;
left: string;
length: number;
letterSpacing: string;
lineBreak: string;
lineHeight: string;
listStyle: string;
listStyleImage: string;
listStylePosition: string;
listStyleType: string;
margin: string;
marginBlockEnd: string;
marginBlockStart: string;
marginBottom: string;
marginInlineEnd: string;
marginInlineStart: string;
marginLeft: string;
marginRight: string;
marginTop: string;
marks: string;
mask: string;
maskType: string;
maxBlockSize: string;
maxHeight: string;
maxInlineSize: string;
maxWidth: string;
minBlockSize: string;
minHeight: string;
minInlineSize: string;
minWidth: string;
mixBlendMode: string;
mozTransform: string;
mozTransformOrigin: string;
mozTransitionDelay: string;
mozTransitionDuration: string;
mozTransitionProperty: string;
mozTransitionTimingFunction: string;
objectFit: string;
objectPosition: string;
offsetBlockEnd: string;
offsetBlockStart: string;
offsetInlineEnd: string;
offsetInlineStart: string;
opacity: string;
order: string;
orphans: string;
outline: string;
outlineColor: string;
outlineOffset: string;
outlineStyle: string;
outlineWidth: string;
overflow: string;
overflowWrap: string;
overflowX: string;
overflowY: string;
padding: string;
paddingBlockEnd: string;
paddingBlockStart: string;
paddingBottom: string;
paddingInlineEnd: string;
paddingInlineStart: string;
paddingLeft: string;
paddingRight: string;
paddingTop: string;
pageBreakAfter: string;
pageBreakBefore: string;
pageBreakInside: string;
parentRule: CSSRule;
perspective: string;
perspectiveOrigin: string;
pointerEvents: string;
position: string;
quotes: string;
rad: string;
removeProperty(property: string): string;
resize: string;
right: string;
rubyAlign: string;
rubyMerge: string;
rubyPosition: string;
scrollBehavior: string;
scrollSnapCoordinate: string;
scrollSnapDestination: string;
scrollSnapPointsX: string;
scrollSnapPointsY: string;
scrollSnapType: string;
setProperty(property: string, value: ?string, priority: ?string): void;
setPropertyPriority(property: string, priority: string): void;
shapeImageThreshold: string;
shapeMargin: string;
shapeOutside: string;
tableLayout: string;
tabSize: string;
textAlign: string;
textAlignLast: string;
textCombineUpright: string;
textDecoration: string;
textDecorationColor: string;
textDecorationLine: string;
textDecorationStyle: string;
textIndent: string;
textOrientation: string;
textOverflow: string;
textRendering: string;
textShadow: string;
textTransform: string;
textUnderlinePosition: string;
top: string;
touchAction: string;
transform: string;
transformOrigin: string;
transformStyle: string;
transition: string;
transitionDelay: string;
transitionDuration: string;
transitionProperty: string;
transitionTimingFunction: string;
turn: string;
unicodeBidi: string;
unicodeRange: string;
userSelect: string;
verticalAlign: string;
visibility: string;
webkitBackdropFilter: string;
webkitOverflowScrolling: string;
webkitTransform: string;
webkitTransformOrigin: string;
webkitTransitionDelay: string;
webkitTransitionDuration: string;
webkitTransitionProperty: string;
webkitTransitionTimingFunction: string;
whiteSpace: string;
widows: string;
width: string;
willChange: string;
[index: number]: string;
wordBreak: string;
wordSpacing: string;
wordWrap: string;
writingMode: string;
zIndex: string;
}
declare class TransitionEvent extends Event {
elapsedTime: number; // readonly
propertyName: string; // readonly
pseudoElement: string; // readonly
}
type AnimationPlayState = 'idle' | 'running' | 'paused' | 'finished';
type AnimationReplaceState = 'active' | 'removed' | 'persisted';
type FillMode = 'none' | 'forwards' | 'backwards' | 'both' | 'auto';
type PlaybackDirection =
| 'normal'
| 'reverse'
| 'alternate'
| 'alternate-reverse';
type IterationCompositeOperation = 'replace' | 'accumulate';
type CompositeOperation = 'replace' | 'add' | 'accumulate';
type CompositeOperationOrAuto = CompositeOperation | 'auto';
declare class AnimationTimeline {
+currentTime: number | null;
}
type DocumentTimelineOptions = {
originTime?: DOMHighResTimeStamp,
...
};
declare class DocumentTimeline extends AnimationTimeline {
constructor(options?: DocumentTimelineOptions): void;
}
type EffectTiming = {
delay: number,
direction: PlaybackDirection,
duration: number | string,
easing: string,
endDelay: number,
fill: FillMode,
iterations: number,
iterationStart: number,
...
};
type OptionalEffectTiming = Partial<EffectTiming>;
type ComputedEffectTiming = EffectTiming & {
activeDuration: number,
currentIteration: number | null,
endTime: number,
localTime: number | null,
progress: number | null,
...
};
declare class AnimationEffect {
getComputedTiming(): ComputedEffectTiming;
getTiming(): EffectTiming;
updateTiming(timing?: OptionalEffectTiming): void;
}
type Keyframe = {
composite?: CompositeOperationOrAuto,
easing?: string,
offset?: number | null,
[property: string]: string | number | null | void,
...
};
type ComputedKeyframe = {
composite: CompositeOperationOrAuto,
computedOffset: number,
easing: string,
offset: number | null,
[property: string]: string | number | null | void,
...
};
type PropertyIndexedKeyframes = {
composite?: CompositeOperationOrAuto | CompositeOperationOrAuto[],
easing?: string | string[],
offset?: number | (number | null)[],
[property: string]:
| string
| string[]
| number
| null
| (number | null)[]
| void,
...
};
type KeyframeEffectOptions = Partial<EffectTiming> & {
composite?: CompositeOperation,
iterationComposite?: IterationCompositeOperation,
...
};
declare class KeyframeEffect extends AnimationEffect {
composite: CompositeOperation;
constructor(
target: Element | null,
keyframes: Keyframe[] | PropertyIndexedKeyframes | null,
options?: number | KeyframeEffectOptions,
): void;
constructor(source: KeyframeEffect): void;
getKeyframes(): ComputedKeyframe[];
iterationComposite: IterationCompositeOperation;
setKeyframes(keyframes: Keyframe[] | PropertyIndexedKeyframes | null): void;
target: Element | null;
}
declare class Animation extends EventTarget {
cancel(): void;
commitStyles(): void;
constructor(
effect?: AnimationEffect | null,
timeline?: AnimationTimeline | null,
): void;
currentTime: number | null;
effect: AnimationEffect | null;
finish(): void;
+finished: Promise<Animation>;
id: string;
oncancel: ?(ev: AnimationPlaybackEvent) => mixed;
onfinish: ?(ev: AnimationPlaybackEvent) => mixed;
onremove: ?(ev: AnimationPlaybackEvent) => mixed;
pause(): void;
+pending: boolean;
persist(): void;
play(): void;
playbackRate: number;
+playState: AnimationPlayState;
+ready: Promise<Animation>;
+replaceState: AnimationReplaceState;
reverse(): void;
startTime: number | null;
timeline: AnimationTimeline | null;
updatePlaybackRate(playbackRate: number): void;
}
type KeyframeAnimationOptions = KeyframeEffectOptions & {
id?: string,
...
};
type GetAnimationsOptions = {
subtree?: boolean,
...
};
interface Animatable {
animate(
keyframes: Keyframe[] | PropertyIndexedKeyframes | null,
options?: number | KeyframeAnimationOptions,
): Animation;
getAnimations(options?: GetAnimationsOptions): Animation[];
}
type AnimationPlaybackEvent$Init = Event$Init & {
currentTime?: number | null,
timelineTime?: number | null,
...
};
declare class AnimationPlaybackEvent extends Event {
constructor(
type: string,
animationEventInitDict?: AnimationPlaybackEvent$Init,
): void;
+currentTime: number | null;
+timelineTime: number | null;
}

6289
node_modules/react-native/flow/dom.js.flow generated vendored Normal file

File diff suppressed because it is too large Load Diff

88
node_modules/react-native/flow/global.js generated vendored Normal file
View File

@@ -0,0 +1,88 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
/**
* `global` is a object containing all the global variables for React Native.
*
* NOTE: Consider cross-platform as well as JS environments compatibility
* when defining the types here. Consider both presence (`?`) as well as
* writeability (`+`) when defining types.
*/
// $FlowFixMe[libdef-override]
declare var global: {
// setUpGlobals
+window: typeof global,
+self: typeof global,
+process: {
+env: {
+NODE_ENV: 'development' | 'production',
},
+argv?: $ReadOnlyArray<string>,
},
// setUpPerformance
+performance: Performance,
// setUpXHR
+XMLHttpRequest: typeof XMLHttpRequest,
+FormData: typeof FormData,
+fetch: typeof fetch,
+Headers: typeof Headers,
+Request: typeof Request,
+Response: typeof Response,
+WebSocket: typeof WebSocket,
+Blob: typeof Blob,
+File: typeof File,
+FileReader: typeof FileReader,
+URL: typeof URL,
+URLSearchParams: typeof URLSearchParams,
+AbortController: typeof AbortController,
+AbortSignal: typeof AbortSignal,
// setUpAlert
+alert: typeof alert,
// setUpNavigator
+navigator: {
+product: 'ReactNative',
+appName?: ?string,
...
},
// setUpTimers
+setInterval: typeof setInterval,
+clearInterval: typeof clearInterval,
+setTimeout: typeof setTimeout,
+clearTimeout: typeof clearTimeout,
+requestAnimationFrame: typeof requestAnimationFrame,
+cancelAnimationFrame: typeof cancelAnimationFrame,
+requestIdleCallback: typeof requestIdleCallback,
+cancelIdleCallback: typeof cancelIdleCallback,
+queueMicrotask: typeof queueMicrotask,
+setImmediate: typeof setImmediate,
+clearImmediate: typeof clearImmediate,
// Polyfills
+console: typeof console,
// JavaScript environments specific
+HermesInternal: ?$HermesInternalType,
// Internal-specific
+__DEV__?: boolean,
+RN$Bridgeless?: boolean,
// setupDOM
+DOMRect: typeof DOMRect,
+DOMRectReadOnly: typeof DOMRectReadOnly,
// Undeclared properties are implicitly `any`.
[string | symbol]: any,
};

14
node_modules/react-native/flow/prettier.js.flow generated vendored Normal file
View File

@@ -0,0 +1,14 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
// $FlowFixMe[unsupported-syntax]
declare module 'prettier' {
declare module.exports: $FlowFixMe;
}

140
node_modules/react-native/flow/streams.js.flow generated vendored Normal file
View File

@@ -0,0 +1,140 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
// Adapted from https://github.com/flow-typed/flow-typed/blob/main/definitions/environments/streams/flow_v0.261.x-/streams.js
type TextEncodeOptions = {options?: boolean, ...};
declare class TextEncoder {
encode(buffer: string, options?: TextEncodeOptions): Uint8Array;
}
declare class ReadableStreamController {
close(): void;
constructor(
stream: ReadableStream,
underlyingSource: UnderlyingSource,
size: number,
highWaterMark: number,
): void;
desiredSize: number;
// $FlowFixMe[unclear-type]
enqueue(chunk: any): void;
error(error: Error): void;
}
declare class ReadableStreamReader {
cancel(reason: string): void;
closed: boolean;
constructor(stream: ReadableStream): void;
read(): Promise<{
done: boolean,
// $FlowFixMe[unclear-type]
value: ?any,
...
}>;
releaseLock(): void;
}
declare interface UnderlyingSource {
autoAllocateChunkSize?: number;
cancel?: (reason: string) => ?Promise<void>;
pull?: (controller: ReadableStreamController) => ?Promise<void>;
start?: (controller: ReadableStreamController) => ?Promise<void>;
type?: string;
}
declare class TransformStream {
readable: ReadableStream;
writable: WritableStream;
}
interface PipeThroughTransformStream {
readable: ReadableStream;
writable: WritableStream;
}
type PipeToOptions = {
preventAbort?: boolean,
preventCancel?: boolean,
preventClose?: boolean,
...
};
type QueuingStrategy = {
highWaterMark: number,
// $FlowFixMe[unclear-type]
size(chunk: ?any): number,
...
};
declare class ReadableStream {
cancel(reason: string): void;
constructor(
underlyingSource: ?UnderlyingSource,
queuingStrategy: ?QueuingStrategy,
): void;
getReader(): ReadableStreamReader;
locked: boolean;
// $FlowFixMe[unclear-type]
pipeThrough(transform: PipeThroughTransformStream, options: ?any): void;
pipeTo(dest: WritableStream, options: ?PipeToOptions): Promise<void>;
tee(): [ReadableStream, ReadableStream];
}
declare interface WritableStreamController {
error(error: Error): void;
}
declare interface UnderlyingSink {
abort?: (reason: string) => ?Promise<void>;
autoAllocateChunkSize?: number;
close?: (controller: WritableStreamController) => ?Promise<void>;
start?: (controller: WritableStreamController) => ?Promise<void>;
type?: string;
// $FlowFixMe[unclear-type]
write?: (chunk: any, controller: WritableStreamController) => ?Promise<void>;
}
declare interface WritableStreamWriter {
// $FlowFixMe[unclear-type]
abort(reason: string): ?Promise<any>;
// $FlowFixMe[unclear-type]
close(): Promise<any>;
// $FlowFixMe[unclear-type]
closed: Promise<any>;
desiredSize?: number;
// $FlowFixMe[unclear-type]
ready: Promise<any>;
releaseLock(): void;
// $FlowFixMe[unclear-type]
write(chunk: any): Promise<any>;
}
declare class WritableStream {
abort(reason: string): void;
constructor(
underlyingSink: ?UnderlyingSink,
queuingStrategy: QueuingStrategy,
): void;
getWriter(): WritableStreamWriter;
locked: boolean;
}