/** * GENERATED by `bun run generate` from react-native 0.88.0. Do not edit. * * 209 declarations reached from 25 roots, plus * the AnimatedNode handle from its declaring module. * Everything Tamagui uses from react-native's types on web lives here, so no * non-`.native` file needs react-native installed. To refresh, bump the repo * root's react-native override and re-run `bun run generate` in this package. */ // react-native declares mixin bases as `interface X { new (): Y }`, which is // the shape this rule objects to. Copied verbatim on purpose. /* oxlint-disable typescript/no-misused-new */ import type * as React from 'react' export type ____BlendMode_Internal = | 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity' | 'plus-lighter' export type ____ColorValue_Internal = null | string | number | NativeColorValue export type ____FontVariant_Internal = | 'small-caps' | 'oldstyle-nums' | 'lining-nums' | 'tabular-nums' | 'common-ligatures' | 'no-common-ligatures' | 'discretionary-ligatures' | 'no-discretionary-ligatures' | 'historical-ligatures' | 'no-historical-ligatures' | 'contextual' | 'no-contextual' | 'proportional-nums' | 'stylistic-one' | 'stylistic-two' | 'stylistic-three' | 'stylistic-four' | 'stylistic-five' | 'stylistic-six' | 'stylistic-seven' | 'stylistic-eight' | 'stylistic-nine' | 'stylistic-ten' | 'stylistic-eleven' | 'stylistic-twelve' | 'stylistic-thirteen' | 'stylistic-fourteen' | 'stylistic-fifteen' | 'stylistic-sixteen' | 'stylistic-seventeen' | 'stylistic-eighteen' | 'stylistic-nineteen' | 'stylistic-twenty' export type ____FontVariantArray_Internal = ReadonlyArray<____FontVariant_Internal> export type ____FontVariationSettings_Internal = | string | Readonly<{ [axis: string]: number }> export type ____FontWeight_Internal = | 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 'ultralight' | 'thin' | 'light' | 'medium' | 'regular' | 'semibold' | 'condensedBold' | 'condensed' | 'heavy' | 'black' export type ____ImageStyle_InternalCore = Readonly< Omit< ViewStyle, 'resizeMode' | 'objectFit' | 'tintColor' | 'overlayColor' | 'overflow' > & { resizeMode?: ImageResizeMode | undefined objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none' | undefined tintColor?: ____ColorValue_Internal | undefined overlayColor?: ColorValue | undefined overflow?: 'visible' | 'hidden' | undefined } > export type ____ImageStyle_InternalOverrides = Readonly<{}> export type ____ImageStyleProp_Internal = StyleProp>> export type ____LayoutStyle_Internal = Readonly<{ /** `display` sets the display type of this component. * * It works similarly to `display` in CSS, but only support 'flex' and 'none'. * 'flex' is the default. */ display?: 'none' | 'flex' | 'contents' | undefined /** `width` sets the width of this component. * * It works similarly to `width` in CSS, but in React Native you * must use points or percentages. Ems and other units are not supported. * See https://developer.mozilla.org/en-US/docs/Web/CSS/width for more details. */ width?: DimensionValue | undefined /** `height` sets the height of this component. * * It works similarly to `height` in CSS, but in React Native you * must use points or percentages. Ems and other units are not supported. * See https://developer.mozilla.org/en-US/docs/Web/CSS/height for more details. */ height?: DimensionValue | undefined /** `bottom` is the number of logical pixels to offset the bottom edge of * this component. * * It works similarly to `bottom` in CSS, but in React Native you * must use points or percentages. Ems and other units are not supported. * * See https://developer.mozilla.org/en-US/docs/Web/CSS/bottom * for more details of how `bottom` affects layout. */ bottom?: DimensionValue | undefined /** * When the direction is `ltr`, `end` is equivalent to `right`. * When the direction is `rtl`, `end` is equivalent to `left`. * * This style takes precedence over the `left` and `right` styles. */ end?: DimensionValue | undefined /** `left` is the number of logical pixels to offset the left edge of * this component. * * It works similarly to `left` in CSS, but in React Native you * must use points or percentages. Ems and other units are not supported. * * See https://developer.mozilla.org/en-US/docs/Web/CSS/left * for more details of how `left` affects layout. */ left?: DimensionValue | undefined /** `right` is the number of logical pixels to offset the right edge of * this component. * * It works similarly to `right` in CSS, but in React Native you * must use points or percentages. Ems and other units are not supported. * * See https://developer.mozilla.org/en-US/docs/Web/CSS/right * for more details of how `right` affects layout. */ right?: DimensionValue | undefined /** * When the direction is `ltr`, `start` is equivalent to `left`. * When the direction is `rtl`, `start` is equivalent to `right`. * * This style takes precedence over the `left`, `right`, and `end` styles. */ start?: DimensionValue | undefined /** `top` is the number of logical pixels to offset the top edge of * this component. * * It works similarly to `top` in CSS, but in React Native you * must use points or percentages. Ems and other units are not supported. * * See https://developer.mozilla.org/en-US/docs/Web/CSS/top * for more details of how `top` affects layout. */ top?: DimensionValue | undefined /** `inset` is a shorthand that corresponds to the top, right, bottom, and/or left properties. * * It works similarly to `inset` in CSS, but in React Native you * must use points or percentages. Ems and other units are not supported. * * See https://developer.mozilla.org/en-US/docs/Web/CSS/inset * for more details of how `inset` affects layout. */ inset?: DimensionValue | undefined /** `insetBlock` is a shorthand that corresponds to the `insetBlockStart` and `insetBlockEnd` properties. * * It works similarly to `inset-block` in CSS, but in React Native you * must use points or percentages. Ems and other units are not supported. * * See https://developer.mozilla.org/en-US/docs/Web/CSS/inset-block * for more details of how `inset-block` affects layout. */ insetBlock?: DimensionValue | undefined /** `insetBlockEnd` is a logical property that sets the length that an * element is offset in the block direction from its ending edge. * * It works similarly to `inset-block-end` in CSS, but in React Native you * must use points or percentages. Ems and other units are not supported. * * See https://developer.mozilla.org/en-US/docs/Web/CSS/inset-block-end * for more details of how `inset-block-end` affects layout. */ insetBlockEnd?: DimensionValue | undefined /** `insetBlockStart` is a logical property that sets the length that an * element is offset in the block direction from its starting edge. * * It works similarly to `inset-block-start` in CSS, but in React Native you * must use points or percentages. Ems and other units are not supported. * * See https://developer.mozilla.org/en-US/docs/Web/CSS/inset-block-start * for more details of how `inset-block-start` affects layout. */ insetBlockStart?: DimensionValue | undefined /** `insetInline` is a shorthand that corresponds to the `insetInlineStart` and `insetInlineEnd` properties. * * It works similarly to `inset-inline` in CSS, but in React Native you * must use points or percentages. Ems and other units are not supported. * * See https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline * for more details of how `inset-inline` affects layout. */ insetInline?: DimensionValue | undefined /** `insetInlineEnd` is a logical property that sets the length that an * element is offset in the starting inline direction. * * It works similarly to `inset-inline-end` in CSS, but in React Native you * must use points or percentages. Ems and other units are not supported. * * See https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline-end * for more details of how `inset-inline-end` affects layout. */ insetInlineEnd?: DimensionValue | undefined /** `insetInlineStart` is a logical property that sets the length that an * element is offset in the starting inline direction. * * It works similarly to `inset-inline-start` in CSS, but in React Native you * must use points or percentages. Ems and other units are not supported. * * See https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline-start * for more details of how `inset-inline-start` affects layout. */ insetInlineStart?: DimensionValue | undefined /** `minWidth` is the minimum width for this component, in logical pixels. * * It works similarly to `min-width` in CSS, but in React Native you * must use points or percentages. Ems and other units are not supported. * * See https://developer.mozilla.org/en-US/docs/Web/CSS/min-width * for more details. */ minWidth?: DimensionValue | undefined /** `maxWidth` is the maximum width for this component, in logical pixels. * * It works similarly to `max-width` in CSS, but in React Native you * must use points or percentages. Ems and other units are not supported. * * See https://developer.mozilla.org/en-US/docs/Web/CSS/max-width * for more details. */ maxWidth?: DimensionValue | undefined /** `minHeight` is the minimum height for this component, in logical pixels. * * It works similarly to `min-height` in CSS, but in React Native you * must use points or percentages. Ems and other units are not supported. * * See https://developer.mozilla.org/en-US/docs/Web/CSS/min-height * for more details. */ minHeight?: DimensionValue | undefined /** `maxHeight` is the maximum height for this component, in logical pixels. * * It works similarly to `max-height` in CSS, but in React Native you * must use points or percentages. Ems and other units are not supported. * * See https://developer.mozilla.org/en-US/docs/Web/CSS/max-height * for more details. */ maxHeight?: DimensionValue | undefined /** Setting `margin` has the same effect as setting each of * `marginTop`, `marginLeft`, `marginBottom`, and `marginRight`. * See https://developer.mozilla.org/en-US/docs/Web/CSS/margin * for more details. */ margin?: DimensionValue | undefined /** Setting `marginBlock` has the same effect as setting both * `marginTop` and `marginBottom`. */ marginBlock?: DimensionValue | undefined /** `marginBlockEnd` works like `margin-block-end`in CSS. Because React * Native doesn not support `writing-mode` this is always mapped to * `margin-bottom`. See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-block-end * for more details. */ marginBlockEnd?: DimensionValue | undefined /** `marginBlockEnd` works like `margin-block-end`in CSS. Because React * Native doesn not support `writing-mode` this is always mapped to * `margin-top`. See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-block-end * for more details. */ marginBlockStart?: DimensionValue | undefined /** `marginBottom` works like `margin-bottom` in CSS. * See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-block-start * for more details. */ marginBottom?: DimensionValue | undefined /** * When direction is `ltr`, `marginEnd` is equivalent to `marginRight`. * When direction is `rtl`, `marginEnd` is equivalent to `marginLeft`. */ marginEnd?: DimensionValue | undefined /** Setting `marginHorizontal` has the same effect as setting * both `marginLeft` and `marginRight`. */ marginHorizontal?: DimensionValue | undefined /** Setting `marginInline` has the same effect as setting * both `marginLeft` and `marginRight`. */ marginInline?: DimensionValue | undefined /** * When direction is `ltr`, `marginInlineEnd` is equivalent to `marginRight`. * When direction is `rtl`, `marginInlineEnd` is equivalent to `marginLeft`. */ marginInlineEnd?: DimensionValue | undefined /** * When direction is `ltr`, `marginInlineStart` is equivalent to `marginLeft`. * When direction is `rtl`, `marginInlineStart` is equivalent to `marginRight`. */ marginInlineStart?: DimensionValue | undefined /** `marginLeft` works like `margin-left` in CSS. * See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left * for more details. */ marginLeft?: DimensionValue | undefined /** `marginRight` works like `margin-right` in CSS. * See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right * for more details. */ marginRight?: DimensionValue | undefined /** * When direction is `ltr`, `marginStart` is equivalent to `marginLeft`. * When direction is `rtl`, `marginStart` is equivalent to `marginRight`. */ marginStart?: DimensionValue | undefined /** `marginTop` works like `margin-top` in CSS. * See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top * for more details. */ marginTop?: DimensionValue | undefined /** Setting `marginVertical` has the same effect as setting both * `marginTop` and `marginBottom`. */ marginVertical?: DimensionValue | undefined /** Setting `padding` has the same effect as setting each of * `paddingTop`, `paddingBottom`, `paddingLeft`, and `paddingRight`. * See https://developer.mozilla.org/en-US/docs/Web/CSS/padding * for more details. */ padding?: DimensionValue | undefined /** Setting `paddingBlock` is like setting both of * `paddingTop` and `paddingBottom`. * See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-block * for more details. */ paddingBlock?: DimensionValue | undefined /** `paddingBlockEnd` works like `padding-bottom` in CSS. * See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-block-end * for more details. */ paddingBlockEnd?: DimensionValue | undefined /** `paddingBlockStart` works like `padding-top` in CSS. * See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-block-start * for more details. */ paddingBlockStart?: DimensionValue | undefined /** `paddingBottom` works like `padding-bottom` in CSS. * See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom * for more details. */ paddingBottom?: DimensionValue | undefined /** * When direction is `ltr`, `paddingEnd` is equivalent to `paddingRight`. * When direction is `rtl`, `paddingEnd` is equivalent to `paddingLeft`. */ paddingEnd?: DimensionValue | undefined /** Setting `paddingHorizontal` is like setting both of * `paddingLeft` and `paddingRight`. */ paddingHorizontal?: DimensionValue | undefined /** Setting `paddingInline` is like setting both of * `paddingLeft` and `paddingRight`. */ paddingInline?: DimensionValue | undefined /** * When direction is `ltr`, `paddingInlineEnd` is equivalent to `paddingRight`. * When direction is `rtl`, `paddingInlineEnd` is equivalent to `paddingLeft`. */ paddingInlineEnd?: DimensionValue | undefined /** * When direction is `ltr`, `paddingInlineStart` is equivalent to `paddingLeft`. * When direction is `rtl`, `paddingInlineStart` is equivalent to `paddingRight`. */ paddingInlineStart?: DimensionValue | undefined /** `paddingLeft` works like `padding-left` in CSS. * See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left * for more details. */ paddingLeft?: DimensionValue | undefined /** `paddingRight` works like `padding-right` in CSS. * See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right * for more details. */ paddingRight?: DimensionValue | undefined /** * When direction is `ltr`, `paddingStart` is equivalent to `paddingLeft`. * When direction is `rtl`, `paddingStart` is equivalent to `paddingRight`. */ paddingStart?: DimensionValue | undefined /** `paddingTop` works like `padding-top` in CSS. * See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top * for more details. */ paddingTop?: DimensionValue | undefined /** Setting `paddingVertical` is like setting both of * `paddingTop` and `paddingBottom`. */ paddingVertical?: DimensionValue | undefined /** `borderWidth` works like `border-width` in CSS. * See https://developer.mozilla.org/en-US/docs/Web/CSS/border-width * for more details. */ borderWidth?: number | undefined /** `borderBottomWidth` works like `border-bottom-width` in CSS. * See https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-width * for more details. */ borderBottomWidth?: number | undefined /** * When direction is `ltr`, `borderEndWidth` is equivalent to `borderRightWidth`. * When direction is `rtl`, `borderEndWidth` is equivalent to `borderLeftWidth`. */ borderEndWidth?: number | undefined /** `borderLeftWidth` works like `border-left-width` in CSS. * See https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-width * for more details. */ borderLeftWidth?: number | undefined /** `borderRightWidth` works like `border-right-width` in CSS. * See https://developer.mozilla.org/en-US/docs/Web/CSS/border-right-width * for more details. */ borderRightWidth?: number | undefined /** * When direction is `ltr`, `borderStartWidth` is equivalent to `borderLeftWidth`. * When direction is `rtl`, `borderStartWidth` is equivalent to `borderRightWidth`. */ borderStartWidth?: number | undefined /** `borderTopWidth` works like `border-top-width` in CSS. * See https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-width * for more details. */ borderTopWidth?: number | undefined /** `position` in React Native is similar to regular CSS, but * everything is set to `relative` by default. * * If you want to position a child using specific numbers of logical * pixels relative to its parent, set the child to have `absolute` * position. * * If you want to position a child relative to something * that is not its parent, set the child to have `absolute` position and the * nodes between to have `static` position. * * Note that `static` is only available on the new renderer. * * See https://github.com/facebook/yoga * for more details on how `position` differs between React Native * and CSS. */ position?: 'absolute' | 'relative' | 'static' | undefined /** `flexDirection` controls which directions children of a container go. * `row` goes left to right, `column` goes top to bottom, and you may * be able to guess what the other two do. It works like `flex-direction` * in CSS, except the default is `column`. * See https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction * for more details. */ flexDirection?: 'row' | 'row-reverse' | 'column' | 'column-reverse' | undefined /** `flexWrap` controls whether children can wrap around after they * hit the end of a flex container. * It works like `flex-wrap` in CSS (default: nowrap). * See https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap * for more details. */ flexWrap?: 'wrap' | 'nowrap' | 'wrap-reverse' | undefined /** `justifyContent` aligns children in the main direction. * For example, if children are flowing vertically, `justifyContent` * controls how they align vertically. * It works like `justify-content` in CSS (default: flex-start). * See https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content * for more details. */ justifyContent?: | 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly' | undefined /** `alignItems` aligns children in the cross direction. * For example, if children are flowing vertically, `alignItems` * controls how they align horizontally. * It works like `align-items` in CSS (default: stretch). * See https://developer.mozilla.org/en-US/docs/Web/CSS/align-items * for more details. */ alignItems?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline' | undefined /** `alignSelf` controls how a child aligns in the cross direction, * overriding the `alignItems` of the parent. It works like `align-self` * in CSS (default: auto). * See https://developer.mozilla.org/en-US/docs/Web/CSS/align-self * for more details. */ alignSelf?: | 'auto' | 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline' | undefined /** `alignContent` controls how rows align in the cross direction, * overriding the `alignContent` of the parent. * See https://developer.mozilla.org/en-US/docs/Web/CSS/align-content * for more details. */ alignContent?: | 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'space-between' | 'space-around' | 'space-evenly' | undefined /** `overflow` controls how children are measured and displayed. * `overflow: hidden` causes views to be clipped while `overflow: scroll` * causes views to be measured independently of their parents main axis. * It works like `overflow` in CSS (default: visible). * See https://developer.mozilla.org/en/docs/Web/CSS/overflow * for more details. * `overflow: visible` only works on iOS. On Android, all views will clip * their children. */ overflow?: 'visible' | 'hidden' | 'scroll' | undefined /** In React Native `flex` does not work the same way that it does in CSS. * `flex` is a number rather than a string, and it works * according to the `Yoga` library * at https://github.com/facebook/yoga * * When `flex` is a positive number, it makes the component flexible * and it will be sized proportional to its flex value. So a * component with `flex` set to 2 will take twice the space as a * component with `flex` set to 1. * * When `flex` is 0, the component is sized according to `width` * and `height` and it is inflexible. * * When `flex` is -1, the component is normally sized according * `width` and `height`. However, if there's not enough space, * the component will shrink to its `minWidth` and `minHeight`. * * flexGrow, flexShrink, and flexBasis work the same as in CSS. */ flex?: number | undefined flexGrow?: number | undefined flexShrink?: number | undefined flexBasis?: number | string | undefined /** * Aspect ratio control the size of the undefined dimension of a node. * * - On a node with a set width/height aspect ratio control the size of the unset dimension * - On a node with a set flex basis aspect ratio controls the size of the node in the cross axis * if unset * - On a node with a measure function aspect ratio works as though the measure function measures * the flex basis * - On a node with flex grow/shrink aspect ratio controls the size of the node in the cross axis * if unset * - Aspect ratio takes min/max dimensions into account * * Supports a number or a ratio, e.g.: * - aspectRatio: '1 / 1' * - aspectRatio: '1' * - aspectRatio: '1' */ aspectRatio?: number | string | undefined /** * Box sizing controls whether certain size properties apply to the node's * content box or border box. The size properties in question include `width`, * `height`, `minWidth`, `minHeight`, `maxWidth`, `maxHeight`, and `flexBasis`. * * e.g: Say a node has 10px of padding and 10px of borders on all * sides and a defined `width` and `height` of 100px and 50px. Then the total * size of the node (content area + padding + border) would be 100px by 50px * under `boxSizing: border-box` and 120px by 70px under * `boxSizing: content-box`. */ boxSizing?: 'border-box' | 'content-box' | undefined /** `zIndex` controls which components display on top of others. * Normally, you don't use `zIndex`. Components render according to * their order in the document tree, so later components draw over * earlier ones. `zIndex` may be useful if you have animations or custom * modal interfaces where you don't want this behavior. * * It works like the CSS `z-index` property - components with a larger * `zIndex` will render on top. Think of the z-direction like it's * pointing from the phone into your eyeball. * See https://developer.mozilla.org/en-US/docs/Web/CSS/z-index for * more details. */ zIndex?: number | undefined /** `direction` specifies the directional flow of the user interface. * The default is `inherit`, except for root node which will have * value based on the current locale. * See https://yogalayout.dev/docs/layout-direction * for more details. * @platform ios */ direction?: 'inherit' | 'ltr' | 'rtl' | undefined /** * In React Native, gap works the same way it does in CSS. * If there are two or more children in a container, they will be separated from each other * by the value of the gap - but the children will not be separated from the edges of their parent container. * For horizontal gaps, use columnGap, for vertical gaps, use rowGap, and to apply both at the same time, it's gap. * When align-content or justify-content are set to space-between or space-around, the separation * between children may be larger than the gap value. * See https://developer.mozilla.org/en-US/docs/Web/CSS/gap for more details. */ rowGap?: number | string | undefined columnGap?: number | string | undefined gap?: number | string | undefined }> export type ____ShadowStyle_Internal = Readonly< Omit<____ShadowStyle_InternalCore, keyof ____ShadowStyle_InternalOverrides | keyof {}> & Omit<____ShadowStyle_InternalOverrides, keyof {}> & {} > export type ____ShadowStyle_InternalCore = Readonly<{ /** * Sets the drop shadow color * @platform ios */ shadowColor?: ____ColorValue_Internal | undefined /** * Sets the drop shadow offset * @platform ios */ shadowOffset?: | Readonly<{ width?: number | undefined height?: number | undefined }> | undefined /** * Sets the drop shadow opacity (multiplied by the color's alpha component) * @platform ios */ shadowOpacity?: number | undefined /** * Sets the drop shadow blur radius * @platform ios */ shadowRadius?: number | undefined }> export type ____ShadowStyle_InternalOverrides = Readonly<{}> export type ____TextStyle_InternalBase = Readonly<{ color?: ____ColorValue_Internal | undefined fontFamily?: string | undefined fontSize?: number | undefined fontStyle?: 'normal' | 'italic' | undefined /** * Specifies font weight. The values 'normal' and 'bold' are supported * for most fonts. Not all fonts have a variant for each of the numeric * values, in that case the closest one is chosen. */ fontWeight?: ____FontWeight_Internal | undefined fontVariant?: ____FontVariantArray_Internal | string | undefined /** * Specifies OpenType font variation axis values using CSS syntax or an * object keyed by four-character axis tags. An empty string or object resets * inherited variation settings. On Android, this requires API level 26 or * later. */ fontVariationSettings?: ____FontVariationSettings_Internal | undefined textShadowOffset?: | Readonly<{ width: number height: number }> | undefined textShadowRadius?: number | undefined textShadowColor?: ____ColorValue_Internal | undefined letterSpacing?: number | undefined lineHeight?: number | undefined textAlign?: | 'auto' | 'left' | 'right' | 'center' | 'justify' | 'start' | 'end' | undefined textAlignVertical?: 'auto' | 'top' | 'bottom' | 'center' | undefined includeFontPadding?: boolean | undefined textDecorationLine?: | 'none' | 'underline' | 'line-through' | 'underline line-through' | undefined textDecorationStyle?: 'solid' | 'double' | 'dotted' | 'dashed' | 'wavy' | undefined textDecorationColor?: ____ColorValue_Internal | undefined textTransform?: 'none' | 'capitalize' | 'uppercase' | 'lowercase' | undefined userSelect?: 'auto' | 'text' | 'none' | 'contain' | 'all' | undefined verticalAlign?: 'auto' | 'top' | 'bottom' | 'middle' | undefined writingDirection?: 'auto' | 'ltr' | 'rtl' | undefined }> export type ____TextStyle_InternalCore = Readonly< Omit & Omit<____TextStyle_InternalBase, keyof {}> & {} > export type ____TextStyle_InternalOverrides = Readonly<{}> export type ____TextStyleProp_Internal = StyleProp>> export type ____TransformStyle_Internal = Readonly<{ /** * `transform` accepts an array of transformation objects. Each object specifies * the property that will be transformed as the key, and the value to use in the * transformation. Objects should not be combined. Use a single key/value pair * per object. * * The rotate transformations require a string so that the transform may be * expressed in degrees (deg) or radians (rad). For example: * * `transform([{ rotateX: '45deg' }, { rotateZ: '0.785398rad' }])` * * The skew transformations require a string so that the transform may be * expressed in degrees (deg). For example: * * `transform([{ skewX: '45deg' }])` */ transform?: | ReadonlyArray< Readonly< MaximumOneOf< MergeUnion< | { readonly perspective: number | AnimatedNode } | { readonly rotate: string | AnimatedNode } | { readonly rotateX: string | AnimatedNode } | { readonly rotateY: string | AnimatedNode } | { readonly rotateZ: string | AnimatedNode } | { readonly scale: number | AnimatedNode } | { readonly scaleX: number | AnimatedNode } | { readonly scaleY: number | AnimatedNode } | { readonly translateX: number | string | AnimatedNode } | { readonly translateY: number | string | AnimatedNode } | { readonly translate: | [number | string | AnimatedNode, number | string | AnimatedNode] | AnimatedNode } | { readonly skewX: string | AnimatedNode } | { readonly skewY: string | AnimatedNode } | { readonly matrix: ReadonlyArray | AnimatedNode } > > > > | string | undefined /** * `transformOrigin` accepts an array with 3 elements - each element either being * a number, or a string of a number ending with `%`. The last element cannot be * a percentage, so must be a number. * * E.g. transformOrigin: ['30%', '80%', 15] * * Alternatively accepts a string of the CSS syntax. You must use `%` or `px`. * * E.g. transformOrigin: '30% 80% 15px' */ transformOrigin?: | [string | number, string | number, string | number] | string | undefined }> export type ____ViewStyle_InternalBase = Readonly<{ backfaceVisibility?: 'visible' | 'hidden' | undefined backgroundColor?: ____ColorValue_Internal | undefined borderColor?: ____ColorValue_Internal | undefined /** * On iOS 13+, it is possible to change the corner curve of borders. * @platform ios */ borderCurve?: 'circular' | 'continuous' | undefined borderBottomColor?: ____ColorValue_Internal | undefined borderEndColor?: ____ColorValue_Internal | undefined borderLeftColor?: ____ColorValue_Internal | undefined borderRightColor?: ____ColorValue_Internal | undefined borderStartColor?: ____ColorValue_Internal | undefined borderTopColor?: ____ColorValue_Internal | undefined borderBlockColor?: ____ColorValue_Internal | undefined borderBlockEndColor?: ____ColorValue_Internal | undefined borderBlockStartColor?: ____ColorValue_Internal | undefined borderRadius?: number | string | undefined borderBottomEndRadius?: number | string | undefined borderBottomLeftRadius?: number | string | undefined borderBottomRightRadius?: number | string | undefined borderBottomStartRadius?: number | string | undefined borderEndEndRadius?: number | string | undefined borderEndStartRadius?: number | string | undefined borderStartEndRadius?: number | string | undefined borderStartStartRadius?: number | string | undefined borderTopEndRadius?: number | string | undefined borderTopLeftRadius?: number | string | undefined borderTopRightRadius?: number | string | undefined borderTopStartRadius?: number | string | undefined borderStyle?: 'solid' | 'dotted' | 'dashed' | undefined borderWidth?: number | undefined borderBottomWidth?: number | undefined borderEndWidth?: number | undefined borderLeftWidth?: number | undefined borderRightWidth?: number | undefined borderStartWidth?: number | undefined borderTopWidth?: number | undefined opacity?: number | undefined outlineColor?: ____ColorValue_Internal | undefined outlineOffset?: number | undefined outlineStyle?: 'solid' | 'dotted' | 'dashed' | undefined outlineWidth?: number | undefined /** * Sets the elevation of a view, using Android's underlying * [elevation API](https://developer.android.com/training/material/shadows-clipping.html#Elevation). * This adds a drop shadow to the item and affects z-order for overlapping views. * Only supported on Android 5.0+, has no effect on earlier versions. * * @platform android */ elevation?: number | undefined /** * Controls whether the View can be the target of touch events. */ pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only' | undefined cursor?: CursorValue | undefined boxShadow?: ReadonlyArray | string | undefined filter?: ReadonlyArray | string | undefined mixBlendMode?: ____BlendMode_Internal | undefined backgroundImage?: ReadonlyArray | string | undefined experimental_backgroundImage?: ReadonlyArray | string | undefined backgroundSize?: ReadonlyArray | string | undefined experimental_backgroundSize?: ReadonlyArray | string | undefined backgroundPosition?: ReadonlyArray | string | undefined experimental_backgroundPosition?: | ReadonlyArray | string | undefined backgroundRepeat?: ReadonlyArray | string | undefined experimental_backgroundRepeat?: | ReadonlyArray | string | undefined isolation?: 'auto' | 'isolate' | undefined }> export type ____ViewStyle_InternalCore = Readonly< Omit< ____LayoutStyle_Internal, | keyof ____ShadowStyle_Internal | keyof ____TransformStyle_Internal | keyof ____ViewStyle_InternalBase | keyof {} > & Omit< ____ShadowStyle_Internal, keyof ____TransformStyle_Internal | keyof ____ViewStyle_InternalBase | keyof {} > & Omit<____TransformStyle_Internal, keyof ____ViewStyle_InternalBase | keyof {}> & Omit<____ViewStyle_InternalBase, keyof {}> & {} > export type ____ViewStyle_InternalOverrides = Readonly<{}> export type ____ViewStyleProp_Internal = StyleProp>> export declare class _TextInputInstance extends ReactNativeElement { /** * Removes all text from the input. */ clear(): void /** * Returns if the input is currently focused. */ isFocused(): boolean getNativeRef(): ReactNativeElement | undefined /** * Sets the start and end positions of text selection. */ setSelection(start: number, end: number): void } export declare const $$Image: ImageType export declare const $$View: typeof View export type AbstractImageAndroid = ( props: Omit & { ref?: React.Ref | undefined } ) => React.ReactNode export type AbstractImageIOS = ( props: Omit & { ref?: React.Ref | undefined } ) => React.ReactNode export type AccessibilityActionEvent = NativeSyntheticEvent< Readonly<{ actionName: string }> > export type AccessibilityActionInfo = Readonly<{ name: AccessibilityActionName | string label?: string | undefined }> export type AccessibilityActionName = /** * Generated when a screen reader user double taps the component. */ | 'activate' /** * Generated when a screen reader user increments an adjustable component. */ | 'increment' /** * Generated when a screen reader user decrements an adjustable component. */ | 'decrement' /** * Generated when a TalkBack user places accessibility focus on the component and double taps and holds one finger on the screen. * @platform android */ | 'longpress' /** * Generated when a VoiceOver user places focus on or inside the component and double taps with two fingers. * @platform ios */ | 'magicTap' /** * Generated when a VoiceOver user places focus on or inside the component and performs a two finger scrub gesture (left, right, left). * @platform ios */ | 'escape' export interface AccessibilityProps extends Readonly< Omit< AccessibilityPropsAndroid, keyof AccessibilityPropsIOS | keyof AccessibilityPropsCore | keyof {} > & Omit & Omit > {} export type AccessibilityPropsAndroid = Readonly<{ /** * Identifies the element that labels the element it is applied to. When the assistive technology focuses on the component with this props, * the text is read aloud. The value should should match the nativeID of the related element. * * @platform android */ accessibilityLabelledBy?: (string | undefined) | (Array | undefined) | undefined /** * Identifies the element that labels the element it is applied to. When the assistive technology focuses on the component with this props, * the text is read aloud. The value should should match the nativeID of the related element. * * @platform android */ 'aria-labelledby'?: string | undefined /** * Indicates to accessibility services whether the user should be notified * when this view changes. Works for Android API >= 19 only. * * @platform android * * See https://reactnative.dev/docs/view#accessibilityliveregion */ accessibilityLiveRegion?: ('none' | 'polite' | 'assertive') | undefined /** * Indicates to accessibility services whether the user should be notified * when this view changes. Works for Android API >= 19 only. * * @platform android * * See https://reactnative.dev/docs/view#accessibilityliveregion */ 'aria-live'?: ('polite' | 'assertive' | 'off') | undefined /** * Controls how view is important for accessibility which is if it fires accessibility events * and if it is reported to accessibility services that query the screen. * Works for Android only. See http://developer.android.com/reference/android/R.attr.html#importantForAccessibility for references. * * Possible values: * 'auto' - The system determines whether the view is important for accessibility - default (recommended). * 'yes' - The view is important for accessibility. * 'no' - The view is not important for accessibility. * 'no-hide-descendants' - The view is not important for accessibility, nor are any of its descendant views. * * @platform android * * See https://reactnative.dev/docs/view#importantforaccessibility */ importantForAccessibility?: ('auto' | 'yes' | 'no' | 'no-hide-descendants') | undefined /** * Enables the view to be screen reader focusable, not keyboard focusable. This has lower priority * than focusable or accessible props. * * @platform android */ screenReaderFocusable?: boolean | undefined }> export type AccessibilityPropsCore = Readonly<{ /** * When `true`, indicates that the view is an accessibility element. * By default, all the touchable elements are accessible. * * See https://reactnative.dev/docs/view#accessible */ accessible?: boolean | undefined /** * Overrides the text that's read by the screen reader when the user interacts * with the element. By default, the label is constructed by traversing all * the children and accumulating all the `Text` nodes separated by space. * * See https://reactnative.dev/docs/view#accessibilitylabel */ accessibilityLabel?: string | undefined /** * An accessibility hint helps users understand what will happen when they perform * an action on the accessibility element when that result is not obvious from the * accessibility label. * * * See https://reactnative.dev/docs/view#accessibilityHint */ accessibilityHint?: string | undefined /** * Alias for accessibilityLabel https://reactnative.dev/docs/view#accessibilitylabel * https://github.com/facebook/react-native/issues/34424 */ 'aria-label'?: string | undefined /** * Indicates to accessibility services to treat UI component like a specific role. */ accessibilityRole?: AccessibilityRole | undefined /** * Alias for accessibilityRole */ role?: Role | undefined /** * Indicates to accessibility services that UI Component is in a specific State. */ accessibilityState?: AccessibilityState | undefined accessibilityValue?: AccessibilityValue | undefined /** * alias for accessibilityState * It represents textual description of a component's value, or for range-based components, such as sliders and progress bars. */ 'aria-valuemax'?: AccessibilityValue['max'] | undefined 'aria-valuemin'?: AccessibilityValue['min'] | undefined 'aria-valuenow'?: AccessibilityValue['now'] | undefined 'aria-valuetext'?: AccessibilityValue['text'] | undefined /** * Provides an array of custom actions available for accessibility. * */ accessibilityActions?: ReadonlyArray | undefined /** * alias for accessibilityState * * see https://reactnative.dev/docs/accessibility#accessibilitystate */ 'aria-busy'?: boolean | undefined 'aria-checked'?: (boolean | undefined) | 'mixed' | undefined 'aria-disabled'?: boolean | undefined 'aria-expanded'?: boolean | undefined 'aria-selected'?: boolean | undefined /** A value indicating whether the accessibility elements contained within * this accessibility element are hidden. * * See https://reactnative.dev/docs/view#aria-hidden */ 'aria-hidden'?: boolean | undefined }> export type AccessibilityPropsIOS = Readonly<{ /** * Prevents view from being inverted if set to true and color inversion is turned on. * * @platform ios */ accessibilityIgnoresInvertColors?: boolean | undefined /** * A value indicating whether VoiceOver should ignore the elements * within views that are siblings of the receiver. * Default is `false`. * * @platform ios * * See https://reactnative.dev/docs/view#accessibilityviewismodal */ accessibilityViewIsModal?: boolean | undefined /** * A Boolean value that indicates whether or not to show the item in the large content viewer. * Available on iOS 13.0+ * * @platform ios * * See https://reactnative.dev/docs/view#accessibilityshowslargecontentviewer */ accessibilityShowsLargeContentViewer?: boolean | undefined /** * When `accessibilityShowsLargeContentViewer` is set, this string will be used as title for the large content viewer. * * @platform ios * * See https://reactnative.dev/docs/view#accessibilitylargecontenttitle */ accessibilityLargeContentTitle?: string | undefined /** * The aria-modal attribute indicates content contained within a modal with aria-modal="true" * should be accessible to the user. * Default is `false`. * * @platform ios */ 'aria-modal'?: boolean | undefined /** * A value indicating whether the accessibility elements contained within * this accessibility element are hidden. * * @platform ios * * See https://reactnative.dev/docs/view#accessibilityElementsHidden */ accessibilityElementsHidden?: boolean | undefined /** * Indicates to the accessibility services that the UI component is in * a specific language. The provided string should be formatted following * the BCP 47 specification (https://www.rfc-editor.org/info/bcp47). * * @platform ios */ accessibilityLanguage?: string | undefined /** * Blocks the user from interacting with the component through keyboard while still allowing * screen reader to interact with it if this View is still accessible. * * @platform ios */ accessibilityRespondsToUserInteraction?: boolean | undefined }> export type AccessibilityRole = | 'none' | 'button' | 'dropdownlist' | 'togglebutton' | 'link' | 'search' | 'image' | 'keyboardkey' | 'text' | 'adjustable' | 'imagebutton' | 'header' | 'summary' | 'alert' | 'checkbox' | 'combobox' | 'menu' | 'menubar' | 'menuitem' | 'progressbar' | 'radio' | 'radiogroup' | 'scrollbar' | 'spinbutton' | 'switch' | 'tab' | 'tabbar' | 'tablist' | 'timer' | 'list' | 'toolbar' | 'grid' | 'pager' | 'scrollview' | 'horizontalscrollview' | 'viewgroup' | 'webview' | 'drawerlayout' | 'slidingdrawer' | 'iconmenu' | string export type AccessibilityState = { /** * When true, informs accessible tools if the element is disabled */ disabled?: boolean | undefined /** * When true, informs accessible tools if the element is selected */ selected?: boolean | undefined /** * For items like Checkboxes and Toggle switches, reports their state to accessible tools */ checked?: (boolean | undefined) | 'mixed' | undefined /** * When present, informs accessible tools if the element is busy */ busy?: boolean | undefined /** * When present, informs accessible tools the element is expanded or collapsed */ expanded?: boolean | undefined } export type AccessibilityValue = Readonly<{ /** * The minimum value of this component's range. (should be an integer) */ min?: number | undefined /** * The maximum value of this component's range. (should be an integer) */ max?: number | undefined /** * The current value of this component's range. (should be an integer) */ now?: number | undefined /** * A textual description of this component's value. (will override minimum, current, and maximum if set) */ text?: string | undefined }> export type AndroidDrawable = AndroidDrawableThemeAttr | AndroidDrawableRipple export type AndroidDrawableRipple = Readonly<{ type: 'RippleAndroid' color?: ProcessedColorValue | undefined borderless?: boolean | undefined rippleRadius?: number | undefined alpha?: number | undefined }> export type AndroidDrawableThemeAttr = Readonly<{ type: 'ThemeAttrAndroid' attribute: string }> export type AndroidKeyboardEvent = Readonly< Omit & { /** * Always set to 0 on Android. */ duration: 0 /** * Always set to "keyboard" on Android. */ easing: 'keyboard' } > export declare class AnimatedInterpolation< OutputT extends InterpolationConfigSupportedOutputType, > extends AnimatedWithChildren { constructor(parent: AnimatedNode, config: InterpolationConfigType) interpolate( config: InterpolationConfigType ): AnimatedInterpolation } export declare class AnimatedNode { constructor( config?: null | undefined | Readonly & {}> ) /** * Adds an asynchronous listener to the value so you can observe updates from * animations. This is useful because there is no way to * synchronously read the value because it might be driven natively. * * See https://reactnative.dev/docs/animatedvalue#addlistener */ addListener(callback: (value: any) => unknown): string /** * Unregister a listener. The `id` param shall match the identifier * previously returned by `addListener()`. * * See https://reactnative.dev/docs/animatedvalue#removelistener */ removeListener(id: string): void /** * Remove all registered listeners. * * See https://reactnative.dev/docs/animatedvalue#removealllisteners */ removeAllListeners(): void hasListeners(): boolean /** * NOTE: This is intended to prevent `JSON.stringify` from throwing "cyclic * structure" errors in React DevTools. Avoid depending on this! */ toJSON(): unknown } export type AnimatedNodeConfig = Readonly<{ debugID?: string | undefined unstable_disableBatchingForNativeCreate?: boolean | undefined }> export declare class AnimatedTracking extends AnimatedNode { constructor( value: AnimatedValue, parent: AnimatedNode, animationClass: any, animationConfig: Object, callback?: null | undefined | EndCallback, config?: null | undefined | AnimatedNodeConfig ) update(): void } export declare class AnimatedValue extends AnimatedWithChildren { constructor(value: number, config?: null | undefined | AnimatedValueConfig) /** * Narrows `AnimatedNode.addListener`: the value of an `AnimatedValue` is * always a number, so listeners always receive `{value: number}`. */ addListener(callback: ValueListenerCallback): string /** * Directly set the value. This will stop any animations running on the value * and update all the bound properties. * * See https://reactnative.dev/docs/animatedvalue#setvalue */ setValue(value: number): void /** * Sets an offset that is applied on top of whatever value is set, whether via * `setValue`, an animation, or `Animated.event`. Useful for compensating * things like the start of a pan gesture. * * See https://reactnative.dev/docs/animatedvalue#setoffset */ setOffset(offset: number): void /** * Merges the offset value into the base value and resets the offset to zero. * The final output of the value is unchanged. * * See https://reactnative.dev/docs/animatedvalue#flattenoffset */ flattenOffset(): void /** * Sets the offset value to the base value, and resets the base value to zero. * The final output of the value is unchanged. * * See https://reactnative.dev/docs/animatedvalue#extractoffset */ extractOffset(): void /** * Stops any running animation or tracking. `callback` is invoked with the * final value after stopping the animation, which is useful for updating * state to match the animation position with layout. * * See https://reactnative.dev/docs/animatedvalue#stopanimation */ stopAnimation(callback?: null | undefined | ((value: number) => void)): void /** * Stops any animation and resets the value to its original. * * See https://reactnative.dev/docs/animatedvalue#resetanimation */ resetAnimation(callback?: null | undefined | ((value: number) => void)): void /** * Interpolates the value before updating the property, e.g. mapping 0-1 to * 0-10. */ interpolate( config: InterpolationConfigType ): AnimatedInterpolation /** * Typically only used internally, but could be used by a custom Animation * class. * * See https://reactnative.dev/docs/animatedvalue#animate */ animate(animation: Animation, callback: null | undefined | EndCallback): void /** * Typically only used internally. */ stopTracking(): void /** * Typically only used internally. */ track(tracking: AnimatedTracking): void } export type AnimatedValueConfig = Readonly< Omit & { useNativeDriver: boolean } > export declare class AnimatedWithChildren extends AnimatedNode {} export declare class Animation { constructor(config: AnimationConfig) start( fromValue: number, onUpdate: (value: number) => void, onEnd: null | undefined | EndCallback, previousAnimation: null | undefined | Animation, animatedValue: AnimatedValue ): void stop(): void } export type AnimationConfig = Readonly<{ isInteraction?: boolean | undefined useNativeDriver: boolean platformConfig?: PlatformConfig | undefined onComplete?: EndCallback | undefined iterations?: number | undefined isLooping?: boolean | undefined debugID?: string | undefined }> export type BackgroundImageValue = LinearGradientValue | RadialGradientValue export type BackgroundPositionValue = | { top: number | string left: number | string } | { top: number | string right: number | string } | { bottom: number | string left: number | string } | { bottom: number | string right: number | string } export type BackgroundRepeatKeyword = 'repeat' | 'space' | 'round' | 'no-repeat' export type BackgroundRepeatValue = { x: BackgroundRepeatKeyword y: BackgroundRepeatKeyword } export type BackgroundSizeValue = { x: string | number y: string | number } export type BaseKeyboardEvent = { duration: number easing: KeyboardEventEasing endCoordinates: KeyboardMetrics } export type BlurEvent = NativeSyntheticEvent export type BoxShadowValue = { offsetX: number | string offsetY: number | string color?: ____ColorValue_Internal | undefined blurRadius?: number | string | undefined spreadDistance?: number | string | undefined inset?: boolean | undefined } export type ColorValue = ____ColorValue_Internal export type CursorValue = 'auto' | 'pointer' export type DecelerationRateType = 'fast' | 'normal' | number export type DimensionValue = number | string | 'auto' | null export type DirectEventProps = Readonly<{ /** * When `accessible` is true, the system will try to invoke this function * when the user performs an accessibility custom action. * */ onAccessibilityAction?: ((event: AccessibilityActionEvent) => unknown) | undefined /** * When `accessible` is true, the system will try to invoke this function * when the user performs accessibility tap gesture. * * See https://reactnative.dev/docs/view#onaccessibilitytap */ onAccessibilityTap?: (() => unknown) | undefined /** * Invoked on mount and layout changes with: * * `{nativeEvent: { layout: {x, y, width, height}}}` * * This event is fired immediately once the layout has been calculated, but * the new layout may not yet be reflected on the screen at the time the * event is received, especially if a layout animation is in progress. * * See https://reactnative.dev/docs/view#onlayout */ onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined /** * When `accessible` is `true`, the system will invoke this function when the * user performs the magic tap gesture. * * See https://reactnative.dev/docs/view#onmagictap */ onMagicTap?: (() => unknown) | undefined /** * When `accessible` is `true`, the system will invoke this function when the * user performs the escape gesture. * * See https://reactnative.dev/docs/view#onaccessibilityescape */ onAccessibilityEscape?: (() => unknown) | undefined }> export type DisplayMetrics = { width: number height: number scale: number fontScale: number } export type DropShadowValue = { offsetX: number | string offsetY: number | string standardDeviation?: number | string | undefined color?: ____ColorValue_Internal | undefined } export type EdgeInsetsOrSizeProp = RectOrSize export type EdgeInsetsProp = Rect export type EndCallback = (result: EndResult) => void export type EndResult = { finished: boolean value?: number | undefined offset?: number | undefined } export type ExtrapolateType = 'extend' | 'identity' | 'clamp' export type FilterFunction = | { brightness: number | string } | { blur: number | string } | { contrast: number | string } | { grayscale: number | string } | { hueRotate: number | string } | { invert: number | string } | { opacity: number | string } | { saturate: number | string } | { sepia: number | string } | { dropShadow: DropShadowValue | string } export type FocusEvent = NativeSyntheticEvent export type FocusEventProps = Readonly<{ /** * Callback that is called when the view is blurred. * * Note: This will only be called if the view is focusable. */ onBlur?: ((event: BlurEvent) => void) | undefined onBlurCapture?: ((event: BlurEvent) => void) | undefined /** * Callback that is called when the view is focused. * * Note: This will only be called if the view is focusable. */ onFocus?: ((event: FocusEvent) => void) | undefined onFocusCapture?: ((event: FocusEvent) => void) | undefined }> export type FontVariant = ____FontVariant_Internal export type GestureResponderEvent = ResponderSyntheticEvent export type GestureResponderHandlers = Readonly<{ /** * Does this view want to "claim" touch responsiveness? This is called for * every touch move on the `View` when it is not the responder. * * `View.props.onMoveShouldSetResponder: (event) => [true | false]`, where * `event` is a synthetic touch event as described above. * * See https://reactnative.dev/docs/view#onmoveshouldsetresponder */ onMoveShouldSetResponder?: ((e: GestureResponderEvent) => boolean) | undefined /** * If a parent `View` wants to prevent a child `View` from becoming responder * on a move, it should have this handler which returns `true`. * * `View.props.onMoveShouldSetResponderCapture: (event) => [true | false]`, * where `event` is a synthetic touch event as described above. * * See https://reactnative.dev/docs/view#onMoveShouldsetrespondercapture */ onMoveShouldSetResponderCapture?: ((e: GestureResponderEvent) => boolean) | undefined /** * The View is now responding for touch events. This is the time to highlight * and show the user what is happening. * * `View.props.onResponderGrant: (event) => {}`, where `event` is a synthetic * touch event as described above. * * Return true from this callback to prevent any other native components from * becoming responder until this responder terminates (Android-only). * * See https://reactnative.dev/docs/view#onrespondergrant */ onResponderGrant?: ((e: GestureResponderEvent) => void | boolean) | undefined /** * The user is moving their finger. * * `View.props.onResponderMove: (event) => {}`, where `event` is a synthetic * touch event as described above. * * See https://reactnative.dev/docs/view#onrespondermove */ onResponderMove?: ((e: GestureResponderEvent) => void) | undefined /** * Another responder is already active and will not release it to that `View` * asking to be the responder. * * `View.props.onResponderReject: (event) => {}`, where `event` is a * synthetic touch event as described above. * * See https://reactnative.dev/docs/view#onresponderreject */ onResponderReject?: ((e: GestureResponderEvent) => void) | undefined /** * Fired at the end of the touch. * * `View.props.onResponderRelease: (event) => {}`, where `event` is a * synthetic touch event as described above. * * See https://reactnative.dev/docs/view#onresponderrelease */ onResponderRelease?: ((e: GestureResponderEvent) => void) | undefined onResponderStart?: ((e: GestureResponderEvent) => void) | undefined onResponderEnd?: ((e: GestureResponderEvent) => void) | undefined /** * The responder has been taken from the `View`. Might be taken by other * views after a call to `onResponderTerminationRequest`, or might be taken * by the OS without asking (e.g., happens with control center/ notification * center on iOS) * * `View.props.onResponderTerminate: (event) => {}`, where `event` is a * synthetic touch event as described above. * * See https://reactnative.dev/docs/view#onresponderterminate */ onResponderTerminate?: ((e: GestureResponderEvent) => void) | undefined /** * Some other `View` wants to become responder and is asking this `View` to * release its responder. Returning `true` allows its release. * * `View.props.onResponderTerminationRequest: (event) => {}`, where `event` * is a synthetic touch event as described above. * * See https://reactnative.dev/docs/view#onresponderterminationrequest */ onResponderTerminationRequest?: ((e: GestureResponderEvent) => boolean) | undefined /** * Does this view want to become responder on the start of a touch? * * `View.props.onStartShouldSetResponder: (event) => [true | false]`, where * `event` is a synthetic touch event as described above. * * See https://reactnative.dev/docs/view#onstartshouldsetresponder */ onStartShouldSetResponder?: ((e: GestureResponderEvent) => boolean) | undefined /** * If a parent `View` wants to prevent a child `View` from becoming responder * on a touch start, it should have this handler which returns `true`. * * `View.props.onStartShouldSetResponderCapture: (event) => [true | false]`, * where `event` is a synthetic touch event as described above. * * See https://reactnative.dev/docs/view#onstartshouldsetrespondercapture */ onStartShouldSetResponderCapture?: ((e: GestureResponderEvent) => boolean) | undefined }> export type HostInstance = ReactNativeElement export declare class HTMLCollection implements Iterable, ArrayLike { [index: number]: T readonly length: number item(index: number): T | null namedItem(name: string): T | null [Symbol.iterator](): Iterator } export type ImageAndroid = AbstractImageAndroid & ImageComponentStaticsAndroid export type ImageComponentStaticsAndroid = Readonly< Omit & { abortPrefetch(requestId: number): void } > export type ImageComponentStaticsIOS = Readonly<{ getSize(uri: string): Promise getSize( uri: string, success: (width: number, height: number) => void, failure?: (error: unknown) => void ): void getSizeWithHeaders( uri: string, headers: { [$$Key$$: string]: string } ): Promise getSizeWithHeaders( uri: string, headers: { [$$Key$$: string]: string }, success: (width: number, height: number) => void, failure?: (error: unknown) => void ): void prefetch(url: string): Promise prefetchWithMetadata( url: string, queryRootName: string, rootTag?: RootTag | undefined ): Promise queryCache(urls: Array): Promise<{ [url: string]: 'memory' | 'disk' | 'disk/memory' }> /** * @see https://reactnative.dev/docs/image#resolveassetsource */ resolveAssetSource(source: ImageSource): ImageResolvedAssetSource | undefined }> export type ImageErrorEvent = NativeSyntheticEvent> export type ImageErrorEventData = { error: string } export type ImageIOS = AbstractImageIOS & ImageComponentStaticsIOS export type ImageLoadEvent = NativeSyntheticEvent> export type ImageLoadEventData = { source: { height: number width: number uri: string } } export type ImageProgressEventDataIOS = { loaded: number total: number } export type ImageProgressEventIOS = NativeSyntheticEvent< Readonly > export interface ImageProps extends Readonly< Omit< ImagePropsIOS, keyof ImagePropsAndroid | keyof ImagePropsBase | keyof ImagePropsCore | keyof {} > & Omit & Omit & Omit > {} export type ImagePropsAndroid = Readonly<{ /** * Resource used to render a loading indicator for the image, displayed * until the image is ready to be displayed. * * @platform android */ loadingIndicatorSource?: (number | Readonly) | undefined /** * When `true`, enables progressive JPEG streaming. * * @default `false` * @platform android */ progressiveRenderingEnabled?: boolean | undefined /** * Duration of the fade-in animation in milliseconds. * * @default `300` * @platform android */ fadeDuration?: number | undefined /** * The mechanism that should be used to resize the image when the image's * dimensions differ from the image view's dimensions. * * - `auto`: Use heuristics to pick between `resize` and `scale`. * * - `resize`: A software operation which changes the encoded image in memory * before it gets decoded. This should be used instead of `scale` when the * image is much larger than the view. * * - `scale`: The image gets drawn downscaled or upscaled. Compared to * `resize`, `scale` is faster (usually hardware accelerated) and produces * higher quality images. This should be used if the image is smaller than * the view. It should also be used if the image is slightly bigger than * the view. * * - `none`: No sampling is performed and the image is displayed in its full * resolution. This should only be used in rare circumstances because it is * considered unsafe as Android throws a runtime exception when trying to * render images that consume too much memory. * * @default `'auto'` * @platform android */ resizeMethod?: ('auto' | 'resize' | 'scale' | 'none') | undefined /** * When `resizeMethod` is set to `resize`, the destination dimensions are * multiplied by this value. The `scale` method is used to perform the * remainder of the resize. This is used to produce higher quality images * when resizing to small dimensions. * * @default `1.0` * @platform android */ resizeMultiplier?: number | undefined }> export interface ImagePropsBase extends Readonly< Omit< Omit< ViewProps, | 'accessibilityLabel' | 'accessible' | 'aria-label' | 'aria-labelledby' | 'children' | 'onLayout' | 'style' | 'testID' >, keyof ImagePropsBaseCore | keyof {} > & Omit > {} export type ImagePropsBaseCore = Readonly<{ /** * When `true`, indicates the image is an accessibility element. */ accessible?: boolean | undefined /** * Internal prop to set an "Analytics Tag" that can will be set on the Image. */ internal_analyticTag?: string | undefined /** * The text that's read by the screen reader when the user interacts with * the image. */ accessibilityLabel?: string | undefined /** * Alias for `accessibilityLabel`. */ 'aria-label'?: string | undefined /** * Represents the `nativeID` of the associated label. When the assistive * technology focuses on the component with this prop. * * @platform android */ 'aria-labelledby'?: string | undefined /** * Alternative text description of the image, read by the screen reader * when the user interacts with it. Automatically marks the element as * accessible. */ alt?: string | undefined /** * The blur radius of the blur filter added to the image. On iOS, needs to * be more than 5. */ blurRadius?: number | undefined /** * When the image is resized, the corners of the size specified by * `capInsets` stay a fixed size, but the center content and borders of * the image are stretched. This is useful for creating resizable rounded * buttons, shadows, and other resizable assets. * * @platform ios */ capInsets?: EdgeInsetsProp | undefined /** * CORS mode for fetching the image resource. When unset, the image * request is made without the CORS header. * * @default `'anonymous'` */ crossOrigin?: ('anonymous' | 'use-credentials') | undefined /** * Height of the image component. */ height?: number | undefined /** * Width of the image component. */ width?: number | undefined /** * Invoked on load error. */ onError?: ((event: ImageErrorEvent) => void) | undefined /** * Invoked on mount and on layout changes. */ onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined /** * Invoked when load completes successfully. */ onLoad?: ((event: ImageLoadEvent) => void) | undefined /** * Invoked when load either succeeds or fails. */ onLoadEnd?: (() => void) | undefined /** * Invoked on load start. */ onLoadStart?: (() => void) | undefined /** * The image source (either a remote URL or a local file resource). * * This prop can also contain several remote URLs, specified together with * their width and height and potentially with scale/other URI arguments. * The native side then chooses the best URI to display based on the * measured size of the image container. A `cache` property can be added to * control how networked request interacts with the local cache. * * The currently supported formats are `png`, `jpg`, `jpeg`, `bmp`, `gif`, * `webp` (Android only), and `psd` (iOS only). */ source?: ImageSource | undefined /** * Which referrer to use when fetching the image resource. * * @default `'strict-origin-when-cross-origin'` */ referrerPolicy?: | ( | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url' ) | undefined /** * Determines how to resize the image when the frame doesn't match the raw * image dimensions. * * - `cover`: Scale the image uniformly (maintain the image's aspect ratio) * so that both dimensions (width and height) of the image are equal to * or larger than the corresponding dimension of the view (minus padding). * * - `contain`: Scale the image uniformly (maintain the image's aspect * ratio) so that both dimensions (width and height) of the image are * equal to or less than the corresponding dimension of the view (minus * padding). * * - `stretch`: Scale width and height independently. This may change the * aspect ratio of the source. * * - `repeat`: Repeat the image to cover the frame of the view. The image * keeps its size and aspect ratio (iOS only). * * - `center`: Scale the image down so that it is completely visible, if * bigger than the area of the view. The image is not scaled up. * * - `none`: Do not resize the image. The image is displayed at its * intrinsic size. * * @default `'cover'` */ resizeMode?: ImageResizeMode | undefined testID?: string | undefined /** * Changes the color of all non-transparent pixels to the `tintColor`. */ tintColor?: ColorValue | undefined /** * A remote URL string for the image resource. Takes precedence over * `source`. */ src?: string | undefined /** * Comma-separated list of candidate image sources with pixel density * descriptors. */ srcSet?: string | undefined children?: never | undefined }> export type ImagePropsCore = Readonly<{ /** * Style applied to the `Image` component. */ style?: ImageStyleProp | undefined }> export type ImagePropsIOS = Readonly<{ /** * A static image to display while loading the image source. * * @platform ios */ defaultSource?: ImageSource | undefined /** * Invoked when a partial load of the image is complete. Definition of what * constitutes a "partial load" is loader specific though this is meant for * progressive JPEG loads. * * @platform ios */ onPartialLoad?: (() => void) | undefined /** * Invoked on download progress. * * @platform ios */ onProgress?: ((event: ImageProgressEventIOS) => void) | undefined }> export type ImageRequireSource = number export type ImageResizeMode = | 'center' | 'contain' | 'cover' | 'repeat' | 'stretch' | 'none' export type ImageResolvedAssetSource = ResolvedAssetSource export type ImageSize = { width: number height: number } export type ImageSource = | ImageRequireSource | ImageURISource | ReadonlyArray export type ImageSourcePropType = ImageSource export interface ImageStyle extends Readonly< Omit<____ImageStyle_InternalCore, keyof ____ImageStyle_InternalOverrides | keyof {}> & Omit<____ImageStyle_InternalOverrides, keyof {}> > {} export type ImageStyleProp = ____ImageStyleProp_Internal export type ImageType = ImageIOS | ImageAndroid export interface ImageURISource { /** * `uri` is a string representing the resource identifier for the image, which * could be an http address, a local file path, or the name of a static image * resource (which should be wrapped in the `require('./path/to/image.png')` * function). */ readonly uri?: string | undefined /** * `bundle` is the iOS asset bundle which the image is included in. This * will default to [NSBundle mainBundle] if not set. * @platform ios */ readonly bundle?: string | undefined /** * `method` is the HTTP Method to use. Defaults to GET if not specified. */ readonly method?: string | undefined /** * `headers` is an object representing the HTTP headers to send along with the * request for a remote image. */ readonly headers?: | { [$$Key$$: string]: string } | undefined /** * `body` is the HTTP body to send with the request. This must be a valid * UTF-8 string, and will be sent exactly as specified, with no * additional encoding (e.g. URL-escaping or base64) applied. */ readonly body?: string | undefined /** * `cache` determines how the requests handles potentially cached * responses. * * - `default`: Use the native platforms default strategy. `useProtocolCachePolicy` on iOS. * * - `reload`: The data for the URL will be loaded from the originating source. * No existing cache data should be used to satisfy a URL load request. * * - `force-cache`: The existing cached data will be used to satisfy the request, * regardless of its age or expiration date. If there is no existing data in the cache * corresponding the request, the data is loaded from the originating source. * * - `only-if-cached`: The existing cache data will be used to satisfy a request, regardless of * its age or expiration date. If there is no existing data in the cache corresponding * to a URL load request, no attempt is made to load the data from the originating source, * and the load is considered to have failed. */ readonly cache?: ('default' | 'reload' | 'force-cache' | 'only-if-cached') | undefined /** * `width` and `height` can be specified if known at build time, in which case * these will be used to set the default `` component dimensions. */ readonly width?: number | undefined readonly height?: number | undefined /** * `scale` is used to indicate the scale factor of the image. Defaults to 1.0 if * unspecified, meaning that one image pixel equates to one display point / DIP. */ readonly scale?: number | undefined } export type InnerViewInstance = React.ComponentRef export type InterpolationConfigSupportedOutputType = number | string | NativeColorValue export type InterpolationConfigType< OutputT extends InterpolationConfigSupportedOutputType, > = Readonly< Omit< AnimatedNodeConfig, | 'inputRange' | 'outputRange' | 'easing' | 'extrapolate' | 'extrapolateLeft' | 'extrapolateRight' > & { inputRange: ReadonlyArray outputRange: ReadonlyArray easing?: ((input: number) => number) | undefined extrapolate?: ExtrapolateType | undefined extrapolateLeft?: ExtrapolateType | undefined extrapolateRight?: ExtrapolateType | undefined } > export type IOSKeyboardEvent = Readonly< Omit & { startCoordinates: KeyboardMetrics isEventFromThisApp: boolean } > export type KeyboardEvent = AndroidKeyboardEvent | IOSKeyboardEvent export type KeyboardEventEasing = | 'easeIn' | 'easeInEaseOut' | 'easeOut' | 'linear' | 'keyboard' export type KeyboardMetrics = Readonly<{ screenX: number screenY: number width: number height: number }> export type KeyDownEvent = NativeSyntheticEvent export type KeyEvent = Readonly<{ /** * The actual key that was pressed. For example, F would be "f" or "F" depending on the shift key. * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key */ key: string /** * The key code of the key that was pressed. For example, F would be "KeyF" * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code */ code: string altKey: boolean ctrlKey: boolean metaKey: boolean shiftKey: boolean /** * A boolean value that is true if the given key is being held down such that it is automatically repeating. * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat */ repeat?: boolean | undefined /** * Returns a boolean value indicating if the event is fired within a composition session * @see https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent/isComposing */ isComposing?: boolean | undefined }> export type KeyEventProps = Readonly<{ onKeyDown?: ((event: KeyDownEvent) => void) | undefined onKeyDownCapture?: ((event: KeyDownEvent) => void) | undefined onKeyUp?: ((event: KeyUpEvent) => void) | undefined onKeyUpCapture?: ((event: KeyUpEvent) => void) | undefined }> export type KeysOfUnion = T extends any ? keyof T : never export type KeyUpEvent = NativeSyntheticEvent export type LayoutChangeEvent = NativeSyntheticEvent< Readonly<{ layout: LayoutRectangle }> > export type LayoutRectangle = Readonly<{ x: number y: number width: number height: number }> export type LinearGradientValue = { type: 'linear-gradient' direction?: string | undefined colorStops: ReadonlyArray<{ color: ____ColorValue_Internal positions?: ReadonlyArray | undefined }> } export type MaximumOneOf = { [K in keyof T]: { [P in keyof T]?: P extends K ? T[P] : never } }[keyof { [K in keyof T]: { [P in keyof T]?: P extends K ? T[P] : never } }] export type MeasureInWindowOnSuccessCallback = ( x: number, y: number, width: number, height: number ) => void export type MeasureLayoutOnSuccessCallback = ( left: number, top: number, width: number, height: number ) => void export type MeasureOnSuccessCallback = ( x: number, y: number, width: number, height: number, pageX: number, pageY: number ) => void export type MergeUnion = { [K in KeysOfUnion]?: ValueOfUnion } export type MouseEvent = NativeSyntheticEvent< Readonly<{ clientX: number clientY: number pageX: number pageY: number timestamp: number }> > export type MouseEventProps = Readonly<{ onMouseEnter?: ((event: MouseEvent) => void) | undefined onMouseLeave?: ((event: MouseEvent) => void) | undefined }> export type NativeColorValue = symbol & { __NativeColorValue__: string } export interface NativeMouseEvent extends NativeUIEvent { /** * The X coordinate of the mouse pointer in global (screen) coordinates. */ readonly screenX: number /** * The Y coordinate of the mouse pointer in global (screen) coordinates. */ readonly screenY: number /** * The X coordinate of the mouse pointer relative to the whole document. */ readonly pageX: number /** * The Y coordinate of the mouse pointer relative to the whole document. */ readonly pageY: number /** * The X coordinate of the mouse pointer in local (DOM content) coordinates. */ readonly clientX: number /** * The Y coordinate of the mouse pointer in local (DOM content) coordinates. */ readonly clientY: number /** * Alias for NativeMouseEvent.clientX */ readonly x: number /** * Alias for NativeMouseEvent.clientY */ readonly y: number /** * Returns true if the control key was down when the mouse event was fired. */ readonly ctrlKey: boolean /** * Returns true if the shift key was down when the mouse event was fired. */ readonly shiftKey: boolean /** * Returns true if the alt key was down when the mouse event was fired. */ readonly altKey: boolean /** * Returns true if the meta key was down when the mouse event was fired. */ readonly metaKey: boolean /** * The button number that was pressed (if applicable) when the mouse event was fired. */ readonly button: number /** * The buttons being depressed (if any) when the mouse event was fired. */ readonly buttons: number /** * The secondary target for the event, if there is one. */ readonly relatedTarget: null | number | HostInstance /** * The X coordinate of the mouse pointer between that event and the padding edge of the target node */ readonly offsetX: number /** * The Y coordinate of the mouse pointer between that event and the padding edge of the target node */ readonly offsetY: number } export interface NativePointerEvent extends NativeMouseEvent { /** * A unique identifier for the pointer causing the event. */ readonly pointerId: number /** * The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer */ readonly width: number /** * The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer. */ readonly height: number /** * The normalized pressure of the pointer input in the range 0 to 1, where 0 and 1 represent * the minimum and maximum pressure the hardware is capable of detecting, respectively. */ readonly pressure: number /** * The normalized tangential pressure of the pointer input (also known as barrel pressure or * cylinder stress) in the range -1 to 1, where 0 is the neutral position of the control. */ readonly tangentialPressure: number /** * The plane angle (in degrees, in the range of -90 to 90) between the Y–Z plane and the plane * containing both the pointer (e.g. pen stylus) axis and the Y axis. */ readonly tiltX: number /** * The plane angle (in degrees, in the range of -90 to 90) between the X–Z plane and the plane * containing both the pointer (e.g. pen stylus) axis and the X axis. */ readonly tiltY: number /** * The clockwise rotation of the pointer (e.g. pen stylus) around its major axis in degrees, * with a value in the range 0 to 359. */ readonly twist: number /** * Indicates the device type that caused the event (mouse, pen, touch, etc.) */ readonly pointerType: string /** * Indicates if the pointer represents the primary pointer of this pointer type. */ readonly isPrimary: boolean } export type NativeScrollEvent = Readonly<{ contentInset: NativeScrollRectangle contentOffset: NativeScrollPoint contentSize: NativeScrollSize layoutMeasurement: NativeScrollSize velocity?: NativeScrollVelocity | undefined zoomScale?: number | undefined responderIgnoreScroll?: boolean | undefined /** * @platform ios */ targetContentOffset?: NativeScrollPoint | undefined }> export type NativeScrollPoint = Readonly<{ y: number x: number }> export type NativeScrollRectangle = Readonly<{ bottom: number left: number right: number top: number }> export type NativeScrollSize = Readonly<{ height: number width: number }> export type NativeScrollVelocity = Readonly<{ y: number x: number }> export type NativeSyntheticEvent = Readonly<{ bubbles: boolean | undefined cancelable: boolean | undefined currentTarget: number | HostInstance defaultPrevented: boolean | undefined dispatchConfig: Readonly<{ registrationName: string }> eventPhase: number | undefined preventDefault: () => void isDefaultPrevented: () => boolean stopPropagation: () => void isPropagationStopped: () => boolean isTrusted: boolean | undefined nativeEvent: T persist: () => void target: (number | undefined) | HostInstance timeStamp: number type: string | undefined }> export type NativeTouchEvent = Readonly<{ /** * Array of all touch events that have changed since the last event */ changedTouches: ReadonlyArray /** * 3D Touch reported force * @platform ios */ force?: number | undefined /** * The ID of the touch */ identifier: number /** * The X position of the touch, relative to the element */ locationX: number /** * The Y position of the touch, relative to the element */ locationY: number /** * The X position of the touch, relative to the screen */ pageX: number /** * The Y position of the touch, relative to the screen */ pageY: number /** * The node id of the element receiving the touch event */ target: number | undefined /** * A time identifier for the touch, useful for velocity calculation */ timestamp: number /** * Array of all current touches on the screen */ touches: ReadonlyArray }> export interface NativeUIEvent { /** * Returns a long with details about the event, depending on the event type. */ readonly detail: number } export declare class NodeList implements Iterable, ArrayLike { [index: number]: T readonly length: number item(index: number): T | null entries(): Iterator<[number, T]> forEach( callbackFn: (value: T, index: number, array: NodeList) => unknown, thisArg?: ThisType ): void keys(): Iterator values(): Iterator [Symbol.iterator](): Iterator } export type PanResponderGestureState = { /** * ID of the gestureState - persisted as long as there at least one touch on screen */ stateID: number /** * The latest screen coordinates of the recently-moved touch */ moveX: number /** * The latest screen coordinates of the recently-moved touch */ moveY: number /** * The screen coordinates of the responder grant */ x0: number /** * The screen coordinates of the responder grant */ y0: number /** * Accumulated distance of the gesture since the touch started */ dx: number /** * Accumulated distance of the gesture since the touch started */ dy: number /** * Current velocity of the gesture */ vx: number /** * Current velocity of the gesture */ vy: number /** * Number of touches currently on screen */ numberActiveTouches: number } export type PlatformConfig = {} export type PointerEvent = NativeSyntheticEvent export type PointerEventProps = Readonly<{ onClick?: ((event: PointerEvent) => void) | undefined onClickCapture?: ((event: PointerEvent) => void) | undefined onPointerEnter?: ((event: PointerEvent) => void) | undefined onPointerEnterCapture?: ((event: PointerEvent) => void) | undefined onPointerLeave?: ((event: PointerEvent) => void) | undefined onPointerLeaveCapture?: ((event: PointerEvent) => void) | undefined onPointerMove?: ((event: PointerEvent) => void) | undefined onPointerMoveCapture?: ((event: PointerEvent) => void) | undefined onPointerCancel?: ((e: PointerEvent) => void) | undefined onPointerCancelCapture?: ((e: PointerEvent) => void) | undefined onPointerDown?: ((e: PointerEvent) => void) | undefined onPointerDownCapture?: ((e: PointerEvent) => void) | undefined onPointerUp?: ((e: PointerEvent) => void) | undefined onPointerUpCapture?: ((e: PointerEvent) => void) | undefined onPointerOver?: ((e: PointerEvent) => void) | undefined onPointerOverCapture?: ((e: PointerEvent) => void) | undefined onPointerOut?: ((e: PointerEvent) => void) | undefined onPointerOutCapture?: ((e: PointerEvent) => void) | undefined onGotPointerCapture?: ((e: PointerEvent) => void) | undefined onGotPointerCaptureCapture?: ((e: PointerEvent) => void) | undefined onLostPointerCapture?: ((e: PointerEvent) => void) | undefined onLostPointerCaptureCapture?: ((e: PointerEvent) => void) | undefined }> export type PointProp = Readonly<{ x: number y: number }> export type PressableAndroidRippleConfig = { color?: ColorValue | undefined borderless?: boolean | undefined radius?: number | undefined foreground?: boolean | undefined alpha?: number | undefined } export type PressableBaseProps = Readonly<{ /** * Whether a press gesture can be interrupted by a parent gesture such as a * scroll event. Defaults to true. */ cancelable?: boolean | undefined /** * Either children or a function that receives a boolean reflecting whether * the component is currently pressed. */ children?: | React.ReactNode | ((state: PressableStateCallbackType) => React.ReactNode) | undefined /** * Duration to wait after hover in before calling `onHoverIn`. * * @platform macos windows */ delayHoverIn?: number | undefined /** * Duration to wait after hover out before calling `onHoverOut`. * * @platform macos windows */ delayHoverOut?: number | undefined /** * Duration (in milliseconds) from `onPressIn` before `onLongPress` is called. * * @default `500` */ delayLongPress?: number | undefined /** * Whether the press behavior is disabled. * * @default `false` */ disabled?: boolean | undefined /** * Additional distance outside of this view in which a press is detected. */ hitSlop?: RectOrSize | undefined /** * Additional distance outside of this view in which a touch is considered a * press before `onPressOut` is triggered. * * @default `{bottom: 30, left: 20, right: 20, top: 20}` */ pressRetentionOffset?: RectOrSize | undefined /** * Called when this view's layout changes. */ onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined /** * Called when the hover is activated. */ onHoverIn?: ((event: MouseEvent) => unknown) | undefined /** * Called when the hover is deactivated. */ onHoverOut?: ((event: MouseEvent) => unknown) | undefined /** * Called if the time after `onPressIn` lasts longer than `delayLongPress`. */ onLongPress?: ((event: GestureResponderEvent) => unknown) | undefined /** * Called after `onPressOut`. */ onPress?: ((event: GestureResponderEvent) => unknown) | undefined /** * Called immediately when a touch is engaged, before `onPressOut` and * `onPress`. */ onPressIn?: ((event: GestureResponderEvent) => unknown) | undefined /** * Called when the press location moves. */ onPressMove?: ((event: GestureResponderEvent) => unknown) | undefined /** * Called when a touch is released. */ onPressOut?: ((event: GestureResponderEvent) => unknown) | undefined /** * Whether to prevent any other native components from becoming responder * while this pressable is responder. */ blockNativeResponder?: boolean | undefined /** * Either view styles or a function that receives a boolean reflecting whether * the component is currently pressed and returns view styles. */ style?: | ViewStyleProp | ((state: PressableStateCallbackType) => ViewStyleProp) | undefined /** * Identifier used to find this view in tests. */ testID?: string | undefined /** * If true, doesn't play Android system sound on press. * * @platform android * @default `false` */ android_disableSound?: boolean | undefined /** * Enables the Android ripple effect and configures its properties. * * @platform android */ android_ripple?: PressableAndroidRippleConfig | undefined /** * Used only for documentation or testing (e.g. snapshot testing). */ testOnly_pressed?: boolean | undefined /** * Duration (in milliseconds) to wait after press down before calling * `onPressIn`. */ unstable_pressDelay?: number | undefined }> export interface PressableProps extends Readonly< Omit< Omit, keyof PressableBaseProps | keyof {} > & Omit > {} export interface PressableStateCallbackType extends PressableStateCallbackTypeCore {} export type PressableStateCallbackTypeCore = Readonly<{ pressed: boolean }> export type PressRetentionOffset = Readonly<{ top: number left: number bottom: number right: number }> export type ProcessedColorValue = number | NativeColorValue export type RadialExtent = | 'closest-corner' | 'closest-side' | 'farthest-corner' | 'farthest-side' export type RadialGradientPosition = | { top: number | string left: number | string } | { top: number | string right: number | string } | { bottom: number | string left: number | string } | { bottom: number | string right: number | string } export type RadialGradientShape = 'circle' | 'ellipse' export type RadialGradientSize = | RadialExtent | { x: string | number y: string | number } export type RadialGradientValue = { type: 'radial-gradient' shape: RadialGradientShape size: RadialGradientSize position: RadialGradientPosition colorStops: ReadonlyArray<{ color: ____ColorValue_Internal positions?: ReadonlyArray | undefined }> } export declare class ReactNativeDocument extends ReadOnlyNode { constructor(rootTag: RootTag, instanceHandle: ReactNativeDocumentInstanceHandle) get childElementCount(): number get children(): HTMLCollection get documentElement(): ReactNativeElement get firstElementChild(): ReadOnlyElement | null get lastElementChild(): ReadOnlyElement | null get nodeName(): string get nodeType(): number get nodeValue(): null get textContent(): null getElementById(id: string): ReadOnlyElement | null } export type ReactNativeDocumentInstanceHandle = symbol & { __ReactNativeDocumentInstanceHandle__: string } export declare class ReactNativeElement extends ReadOnlyElement { protected constructor() get offsetHeight(): number get offsetLeft(): number get offsetParent(): ReadOnlyElement | null get offsetTop(): number get offsetWidth(): number /** * React Native compatibility methods */ /** * Removes focus from an input or view. This is the opposite of `focus()`. */ blur(): void /** * Requests focus for the given input or view. The exact behavior triggered * will depend on the platform and type of view. */ focus(): void /** * Determines the location on screen, width, and height of the given view and * returns the values via an async callback. If successful, the callback will * be called with the following arguments: * * - x * - y * - width * - height * - pageX * - pageY * * Note that these measurements are not available until after the rendering * has been completed in native. If you need the measurements as soon as * possible, consider using the [`onLayout` * prop](docs/view.html#onlayout) instead. */ measure(callback: MeasureOnSuccessCallback): void /** * Determines the location of the given view in the window and returns the * values via an async callback. If the React root view is embedded in * another native view, this will give you the absolute coordinates. If * successful, the callback will be called with the following * arguments: * * - x * - y * - width * - height * * Note that these measurements are not available until after the rendering * has been completed in native. */ measureInWindow(callback: MeasureInWindowOnSuccessCallback): void /** * Like [`measure()`](#measure), but measures the view relative an ancestor, * specified as `relativeToNativeComponentRef`. This means that the returned x, y * are relative to the origin x, y of the ancestor view. * _Can also be called with a relativeNativeNodeHandle but is deprecated._ */ measureLayout( relativeToNativeNode: number | HostInstance, onSuccess: MeasureLayoutOnSuccessCallback, onFail?: () => void ): void /** * This function sends props straight to native. They will not participate in * future diff process - this means that if you do not include them in the * next render, they will remain active (see [Direct * Manipulation](https://reactnative.dev/docs/the-new-architecture/direct-manipulation-new-architecture)). */ setNativeProps(nativeProps: {}): void } export declare class ReadOnlyElement extends ReadOnlyNode { get childElementCount(): number get children(): HTMLCollection get clientHeight(): number get clientLeft(): number get clientTop(): number get clientWidth(): number get firstElementChild(): ReadOnlyElement | null get id(): string get lastElementChild(): ReadOnlyElement | null get nextElementSibling(): ReadOnlyElement | null get nodeName(): string get nodeType(): number get nodeValue(): string | null set nodeValue(value: string) get previousElementSibling(): ReadOnlyElement | null get scrollHeight(): number get scrollLeft(): number get scrollTop(): number get scrollWidth(): number get tagName(): string get textContent(): string getBoundingClientRect(): DOMRect /** * Pointer Capture APIs */ hasPointerCapture(pointerId: number): boolean setPointerCapture(pointerId: number): void releasePointerCapture(pointerId: number): void } export declare class ReadOnlyNode extends ReadOnlyNodeBase { protected constructor() get childNodes(): NodeList get firstChild(): ReadOnlyNode | null get isConnected(): boolean get lastChild(): ReadOnlyNode | null get nextSibling(): ReadOnlyNode | null /** * @abstract */ get nodeName(): string /** * @abstract */ get nodeType(): number /** * @abstract */ get nodeValue(): string | null get ownerDocument(): ReactNativeDocument | null get parentElement(): ReadOnlyElement | null get parentNode(): ReadOnlyNode | null get previousSibling(): ReadOnlyNode | null /** * @abstract */ get textContent(): string compareDocumentPosition(otherNode: ReadOnlyNode): number contains(otherNode: ReadOnlyNode): boolean getRootNode(): ReadOnlyNode hasChildNodes(): boolean /** * Type of Element, HTMLElement and ReactNativeElement instances. */ static ELEMENT_NODE: number /** * Currently Unused in React Native. */ static ATTRIBUTE_NODE: number /** * Text nodes. */ static TEXT_NODE: number /** * @deprecated Unused in React Native. */ static CDATA_SECTION_NODE: number /** * @deprecated */ static ENTITY_REFERENCE_NODE: number /** * @deprecated */ static ENTITY_NODE: number /** * @deprecated Unused in React Native. */ static PROCESSING_INSTRUCTION_NODE: number /** * @deprecated Unused in React Native. */ static COMMENT_NODE: number /** * Document nodes. */ static DOCUMENT_NODE: number /** * @deprecated Unused in React Native. */ static DOCUMENT_TYPE_NODE: number /** * @deprecated Unused in React Native. */ static DOCUMENT_FRAGMENT_NODE: number /** * @deprecated */ static NOTATION_NODE: number /** * Both nodes are in different documents. */ static DOCUMENT_POSITION_DISCONNECTED: number /** * `otherNode` precedes the node in either a pre-order depth-first traversal of a tree containing both * (e.g., as an ancestor or previous sibling or a descendant of a previous sibling or previous sibling of an ancestor) * or (if they are disconnected) in an arbitrary but consistent ordering. */ static DOCUMENT_POSITION_PRECEDING: number /** * `otherNode` follows the node in either a pre-order depth-first traversal of a tree containing both * (e.g., as a descendant or following sibling or a descendant of a following sibling or following sibling of an ancestor) * or (if they are disconnected) in an arbitrary but consistent ordering. */ static DOCUMENT_POSITION_FOLLOWING: number /** * `otherNode` is an ancestor of the node. */ static DOCUMENT_POSITION_CONTAINS: number /** * `otherNode` is a descendant of the node. */ static DOCUMENT_POSITION_CONTAINED_BY: number /** * @deprecated Unused in React Native. */ static DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number } export declare const ReadOnlyNodeBase: typeof Object export type Rect = Readonly<{ bottom?: number | undefined left?: number | undefined right?: number | undefined top?: number | undefined }> export type RectOrSize = Rect | number export type ResolvedAssetSource = { readonly width: number | undefined readonly height: number | undefined readonly uri: string readonly scale: number } export type ResponderSyntheticEvent = Readonly< Omit, 'touchHistory'> & { touchHistory: Readonly<{ indexOfSingleActiveTouch: number mostRecentTimeStamp: number numberActiveTouches: number touchBank: ReadonlyArray< Readonly<{ touchActive: boolean startPageX: number startPageY: number startTimeStamp: number currentPageX: number currentPageY: number currentTimeStamp: number previousPageX: number previousPageY: number previousTimeStamp: number }> > }> } > export type Role = | 'alert' | 'alertdialog' | 'application' | 'article' | 'banner' | 'button' | 'cell' | 'checkbox' | 'columnheader' | 'combobox' | 'complementary' | 'contentinfo' | 'definition' | 'dialog' | 'directory' | 'document' | 'feed' | 'figure' | 'form' | 'grid' | 'group' | 'heading' | 'img' | 'link' | 'list' | 'listitem' | 'log' | 'main' | 'marquee' | 'math' | 'menu' | 'menubar' | 'menuitem' | 'meter' | 'navigation' | 'none' | 'note' | 'option' | 'presentation' | 'progressbar' | 'radio' | 'radiogroup' | 'region' | 'row' | 'rowgroup' | 'rowheader' | 'scrollbar' | 'searchbox' | 'separator' | 'slider' | 'spinbutton' | 'status' | 'summary' | 'switch' | 'tab' | 'table' | 'tablist' | 'tabpanel' | 'term' | 'timer' | 'toolbar' | 'tooltip' | 'tree' | 'treegrid' | 'treeitem' export type RootTag = symbol & { __RootTag__: string } export type ScaledSize = DisplayMetrics export type ScrollEvent = NativeSyntheticEvent export type ScrollResponderType = ScrollViewImperativeMethods export type ScrollViewBaseProps = Readonly<{ /** * These styles will be applied to the scroll view content container which * wraps all of the child views. * * Example: * * ```tsx * return ( * * * ); * ... * const styles = StyleSheet.create({ * contentContainer: { * paddingVertical: 20 * } * }); * ``` */ contentContainerStyle?: ViewStyleProp | undefined /** * Used to manually set the starting scroll offset. * * @default `{x: 0, y: 0}` */ contentOffset?: PointProp | undefined /** * When true, the scroll view stops on the next index (in relation to scroll * position at release) regardless of how fast the gesture is. This can be * used for pagination when the page is less than the width of the * horizontal ScrollView or the height of the vertical ScrollView. * * @default `false` */ disableIntervalMomentum?: boolean | undefined /** * A floating-point number that determines how quickly the scroll view * decelerates after the user lifts their finger. You may also use string * shortcuts `"normal"` and `"fast"` which match the underlying iOS settings * for `UIScrollViewDecelerationRateNormal` and * `UIScrollViewDecelerationRateFast` respectively. * * - `'normal'`: 0.998 on iOS, 0.985 on Android * - `'fast'`: 0.99 on iOS, 0.9 on Android * * @default `'normal'` */ decelerationRate?: DecelerationRateType | undefined /** * *Experimental, iOS Only*. The API is experimental and will change in future releases. * * Controls how much distance is traveled after user stops scrolling. * A value greater than 1 will increase the distance traveled. * A value less than 1 will decrease the distance traveled. * * @deprecated * * @default `1` */ experimental_endDraggingSensitivityMultiplier?: number | undefined /** * When true, the scroll view's children are arranged horizontally in a row * instead of vertically in a column. * * @default `false` */ horizontal?: boolean | undefined /** * If sticky headers should stick at the bottom instead of the top of the * ScrollView. This is usually used with inverted ScrollViews. */ invertStickyHeaders?: boolean | undefined /** * Determines whether the keyboard gets dismissed in response to a drag. * * *Cross platform* * * - `'none'`, drags do not dismiss the keyboard. * - `'on-drag'`, the keyboard is dismissed when a drag begins. * * *iOS Only* * * - `'interactive'`, the keyboard is dismissed interactively with the drag and moves in * synchrony with the touch; dragging upwards cancels the dismissal. * On Android this is not supported and it will have the same behavior as `'none'`. * * @default `'none'` */ keyboardDismissMode?: ('none' | 'on-drag' | 'interactive') | undefined /** * Determines when the keyboard should stay visible after a tap. * * - `'never'`, tapping outside of the focused text input when the keyboard * is up dismisses the keyboard. When this happens, children will not receive the tap. * - `'always'`, the keyboard will not dismiss automatically, and the scroll view will not * catch taps, but children of the scroll view can catch taps. * - `'handled'`, the keyboard will not dismiss automatically when the tap was handled by * children, (or captured by an ancestor). * * @default `'never'` */ keyboardShouldPersistTaps?: ('always' | 'never' | 'handled') | undefined /** * When set, the scroll view will adjust the scroll position so that the first child that is * partially or fully visible and at or beyond `minIndexForVisible` will not change position. * This is useful for lists that are loading content in both directions, e.g. a chat thread, * where new messages coming in might otherwise cause the scroll position to jump. A value of 0 * is common, but other values such as 1 can be used to skip loading spinners or other content * that should not maintain position. * * The optional `autoscrollToTopThreshold` can be used to make the content automatically scroll * to the top after making the adjustment if the user was within the threshold of the top before * the adjustment was made. This is also useful for chat-like applications where you want to see * new messages scroll into place, but not if the user has scrolled up a ways and it would be * disruptive to scroll a bunch. * * Caveat 1: Reordering elements in the scrollview with this enabled will probably cause * jumpiness and jank. It can be fixed, but there are currently no plans to do so. For now, * don't re-order the content of any ScrollViews or Lists that use this feature. * * Caveat 2: This simply uses `contentOffset` and `frame.origin` in native code to compute * visibility. Occlusion, transforms, and other complexity won't be taken into account as to * whether content is "visible" or not. * */ maintainVisibleContentPosition?: | Readonly<{ minIndexForVisible: number autoscrollToTopThreshold?: number | undefined }> | undefined /** * Called when the momentum scroll starts (scroll which occurs as the ScrollView glides to a stop). */ onMomentumScrollBegin?: ((event: ScrollEvent) => void) | undefined /** * Called when the momentum scroll ends (scroll which occurs as the ScrollView glides to a stop). */ onMomentumScrollEnd?: ((event: ScrollEvent) => void) | undefined /** * Fires at most once per frame during scrolling. */ onScroll?: ((event: ScrollEvent) => void) | undefined /** * Called when the user begins to drag the scroll view. */ onScrollBeginDrag?: ((event: ScrollEvent) => void) | undefined /** * Called when the user stops dragging the scroll view and it either stops * or begins to glide. */ onScrollEndDrag?: ((event: ScrollEvent) => void) | undefined /** * Called when scrollable content view of the ScrollView changes. * * Handler function is passed the content width and content height as parameters: * `(contentWidth, contentHeight)` * * It's implemented using onLayout handler attached to the content container * which this ScrollView renders. */ onContentSizeChange?: | ((contentWidth: number, contentHeight: number) => void) | undefined onKeyboardDidShow?: ((event: KeyboardEvent) => void) | undefined onKeyboardDidHide?: ((event: KeyboardEvent) => void) | undefined onKeyboardWillShow?: ((event: KeyboardEvent) => void) | undefined onKeyboardWillHide?: ((event: KeyboardEvent) => void) | undefined /** * When true, the scroll view stops on multiples of the scroll view's size * when scrolling. This can be used for horizontal pagination. * * @default `false` */ pagingEnabled?: boolean | undefined /** * When false, the view cannot be scrolled via touch interaction. * Note that the view can always be scrolled by calling `scrollTo`. * * @default `true` */ scrollEnabled?: boolean | undefined /** * Limits how often scroll events will be fired while scrolling, specified as * a time interval in ms. This may be useful when expensive work is performed * in response to scrolling. Values <= `16` will disable throttling, * regardless of the refresh rate of the device. * * @default `0` */ scrollEventThrottle?: number | undefined /** * When true, shows a vertical scroll indicator. * * @default `true` */ showsVerticalScrollIndicator?: boolean | undefined /** * When true, the sticky header is hidden when scrolling down, and docks * at the top when scrolling up. * * @default `false` */ stickyHeaderHiddenOnScroll?: boolean | undefined /** * An array of child indices determining which children get docked to the * top of the screen when scrolling. For example, passing * `stickyHeaderIndices={[0]}` will cause the first child to be fixed to the * top of the scroll view. This property is not supported in conjunction * with `horizontal={true}`. */ stickyHeaderIndices?: ReadonlyArray | undefined /** * A React Component that will be used to render sticky headers. * To be used together with `stickyHeaderIndices` or with `SectionList`, defaults to `ScrollViewStickyHeader`. * You may need to set this if your sticky header uses custom transforms (eg. translation), * for example when you want your list to have an animated hidable header. */ StickyHeaderComponent?: StickyHeaderComponentType | undefined /** * When `snapToInterval` is set, `snapToAlignment` defines the relationship * of the snapping to the scroll view. * * - `'start'`, aligns the snap at the left (horizontal) or top (vertical). * - `'center'`, aligns the snap in the center. * - `'end'`, aligns the snap at the right (horizontal) or bottom (vertical). * * @default `'start'` */ snapToAlignment?: ('start' | 'center' | 'end') | undefined /** * When set, causes the scroll view to stop at multiples of the value of * `snapToInterval`. This can be used for paginating through children * that have lengths smaller than the scroll view. Typically used in * combination with `snapToAlignment` and `decelerationRate="fast"`. * * Overrides less configurable `pagingEnabled` prop. */ snapToInterval?: number | undefined /** * When set, causes the scroll view to stop at the defined offsets. * This can be used for paginating through variously sized children * that have lengths smaller than the scroll view. Typically used in * combination with `decelerationRate="fast"`. * * Overrides less configurable `pagingEnabled` and `snapToInterval` props. */ snapToOffsets?: ReadonlyArray | undefined /** * Use in conjunction with `snapToOffsets`. By default, the beginning * of the list counts as a snap offset. Set `snapToStart` to `false` to disable * this behavior and allow the list to scroll freely between its start and * the first `snapToOffsets` offset. * * @default `true` */ snapToStart?: boolean | undefined /** * Use in conjunction with `snapToOffsets`. By default, the end * of the list counts as a snap offset. Set `snapToEnd` to `false` to disable * this behavior and allow the list to scroll freely between its end and * the last `snapToOffsets` offset. * * @default `true` */ snapToEnd?: boolean | undefined /** * Experimental: When true, offscreen child views (whose `overflow` value is * `hidden`) are removed from their native backing superview when offscreen. * This can improve scrolling performance on long lists. * * @default `true` */ removeClippedSubviews?: boolean | undefined /** * A RefreshControl component, used to provide pull-to-refresh * functionality for the ScrollView. Only works for vertical ScrollViews * (`horizontal` prop must be `false`). * * See [RefreshControl](docs/refreshcontrol.html). */ refreshControl?: React.JSX.Element | undefined children?: React.ReactNode | undefined /** * A ref to the inner View element of the ScrollView. This should be used * instead of calling `getInnerViewRef`. */ innerViewRef?: React.Ref | undefined /** * A ref to the Native ScrollView component. This ref can be used to call * all of ScrollView's public methods, in addition to native methods like * measure, measureLayout, etc. */ scrollViewRef?: React.Ref | undefined }> export interface ScrollViewImperativeMethods { /** * Returns a reference to the underlying scroll responder, which supports * operations like `scrollTo`. All ScrollView-like components should * implement this method so that they can be composed while providing access * to the underlying scroll responder's methods. */ readonly getScrollResponder: () => ScrollResponderType readonly getScrollableNode: () => number | undefined readonly getInnerViewNode: () => number | undefined readonly getInnerViewRef: () => InnerViewInstance | null /** * Returns a reference to the underlying native scroll view, or null if the * native instance is not mounted. */ readonly getNativeScrollRef: () => ScrollViewInstance | null /** * Scrolls to a given x, y offset, either immediately or with a smooth animation. * Syntax: * * scrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true}) * * Note: The weird argument signature is due to the fact that, for historical reasons, * the function also accepts separate arguments as an alternative to the options object. * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED. */ readonly scrollTo: ( options?: ScrollViewScrollToOptions | number, deprecatedX?: number, deprecatedAnimated?: boolean ) => void /** * A helper function that scrolls to the end of the scrollview; * If this is a vertical ScrollView, it scrolls to the bottom. * If this is a horizontal ScrollView scrolls to the right. * * The options object has an animated prop, that enables the scrolling animation or not. * The animated prop defaults to true */ readonly scrollToEnd: (options?: ScrollViewScrollToOptions | undefined) => void /** * Displays the scroll indicators momentarily. */ readonly flashScrollIndicators: () => void readonly scrollResponderZoomTo: ( rect: { x: number y: number width: number height: number animated?: boolean | undefined }, animated?: boolean ) => void readonly scrollResponderScrollNativeHandleToKeyboard: ( nodeHandle: number | HostInstance, additionalOffset?: number, preventNegativeScrollOffset?: boolean ) => void } export interface ScrollViewInstance extends HostInstance, ScrollViewImperativeMethods {} export interface ScrollViewProps extends Readonly< Omit< Omit, | keyof ScrollViewPropsIOS | keyof ScrollViewPropsAndroid | keyof ScrollViewBaseProps | keyof {} > & Omit< ScrollViewPropsIOS, keyof ScrollViewPropsAndroid | keyof ScrollViewBaseProps | keyof {} > & Omit & Omit > {} export type ScrollViewPropsAndroid = Readonly<{ /** * Enables nested scrolling for Android API level 21+. Nested scrolling is * supported by default on iOS. * * @default `false` * @platform android */ nestedScrollEnabled?: boolean | undefined /** * Sometimes a scrollview takes up more space than its content fills. When this is * the case, this prop will fill the rest of the scrollview with a color to avoid setting * a background and creating unnecessary overdraw. This is an advanced optimization * that is not needed in the general case. * @platform android */ endFillColor?: ColorValue | undefined /** * Tag used to log scroll performance on this scroll view. Will force * momentum events to be turned on (see sendMomentumEvents). This doesn't do * anything out of the box and you need to implement a custom native * FpsListener for it to be useful. * @platform android */ scrollPerfTag?: string | undefined /** * Used to override default value of overScroll mode. * * Possible values: * * - `'auto'` - Default value, allow a user to over-scroll * this view only if the content is large enough to meaningfully scroll. * - `'always'` - Always allow a user to over-scroll this view. * - `'never'` - Never allow a user to over-scroll this view. * * @platform android */ overScrollMode?: ('auto' | 'always' | 'never') | undefined /** * Causes the scrollbars not to turn transparent when they are not in use. * * @default `false` * @platform android */ persistentScrollbar?: boolean | undefined /** * Controls the fading effect at the edges of the scroll content. * * A value greater than 0 will apply the fading effect, indicating more content is available * to scroll. * * You can specify a single number to apply the same fading length to both edges. * Alternatively, use an object with `start` and `end` properties to set different * fading lengths for the start and end of the scroll content. * * The default value is 0. * * @platform android */ fadingEdgeLength?: | (number | undefined) | { start: number end: number } | undefined /** * When false, the ScrollView will not automatically scroll to a focused child when * the child requests focus. This can be useful when you want to control the scroll * position programmatically. * * @default `true` * @platform android */ scrollsChildToFocus?: boolean | undefined }> export type ScrollViewPropsIOS = Readonly<{ /** * Controls whether iOS should automatically adjust the content inset * for scroll views that are placed behind a navigation bar or * tab bar/toolbar. * * @default `true` * @platform ios */ automaticallyAdjustContentInsets?: boolean | undefined /** * Controls whether the ScrollView should automatically adjust its `contentInset` * and `scrollViewInsets` when the Keyboard changes its size. * * @default `false` * @platform ios */ automaticallyAdjustKeyboardInsets?: boolean | undefined /** * Controls whether iOS should automatically adjust the scroll indicator * insets. Available on iOS 13 and later. * * @default `true` * @platform ios */ automaticallyAdjustsScrollIndicatorInsets?: boolean | undefined /** * The amount by which the scroll view content is inset from the edges * of the scroll view. * * @default `{top: 0, left: 0, bottom: 0, right: 0}` * @platform ios */ contentInset?: EdgeInsetsProp | undefined /** * When true, the scroll view bounces when it reaches the end of the * content if the content is larger than the scroll view along the axis of * the scroll direction. When `false`, it disables all bouncing even if * the `alwaysBounce*` props are `true`. * * @default `true` * @platform ios */ bounces?: boolean | undefined /** * By default, ScrollView has an active pan responder that hijacks panresponders * deeper in the render tree in order to prevent accidental touches while scrolling. * However, in certain occasions (such as when using snapToInterval) in a vertical scrollview * You may want to disable this behavior in order to prevent the ScrollView from blocking touches */ disableScrollViewPanResponder?: boolean | undefined /** * When true, gestures can drive zoom past min/max and the zoom will animate * to the min/max value at gesture end, otherwise the zoom will not exceed * the limits. * @platform ios */ bouncesZoom?: boolean | undefined /** * When true, the scroll view bounces horizontally when it reaches the end * even if the content is smaller than the scroll view itself. * * @default {@platform horizontal} `true` * @platform ios */ alwaysBounceHorizontal?: boolean | undefined /** * When true, the scroll view bounces vertically when it reaches the end * even if the content is smaller than the scroll view itself. * * @default {@platform horizontal} `false` * @platform ios */ alwaysBounceVertical?: boolean | undefined /** * When true, the scroll view automatically centers the content when the * content is smaller than the scroll view bounds; when the content is * larger than the scroll view, this property has no effect. * * @default `false` * @platform ios */ centerContent?: boolean | undefined /** * The style of the scroll indicators. * * - `'default'` (the default), same as `black`. * - `'black'`, scroll indicator is black. This style is good against a light background. * - `'white'`, scroll indicator is white. This style is good against a dark background. * * @platform ios */ indicatorStyle?: ('default' | 'black' | 'white') | undefined /** * When true, the ScrollView will try to lock to only vertical or horizontal * scrolling while dragging. * * @default `false` * @platform ios */ directionalLockEnabled?: boolean | undefined /** * When false, once tracking starts, the scroll view will not try to drag * if the touch moves. * * @default `true` * @platform ios */ canCancelContentTouches?: boolean | undefined /** * The maximum allowed zoom scale. * * @default `1.0` * @platform ios */ maximumZoomScale?: number | undefined /** * The minimum allowed zoom scale. * * @default `1.0` * @platform ios */ minimumZoomScale?: number | undefined /** * When true, ScrollView allows use of pinch gestures to zoom in and out. * * @default `true` * @platform ios */ pinchGestureEnabled?: boolean | undefined /** * The amount by which the scroll view indicators are inset from the edges * of the scroll view. This should normally be set to the same value as * the `contentInset`. * * @default `{top: 0, left: 0, bottom: 0, right: 0}` * @platform ios */ scrollIndicatorInsets?: EdgeInsetsProp | undefined /** * When true, the scroll view can be programmatically scrolled beyond its * content size. * * @default `false` * @platform ios */ scrollToOverflowEnabled?: boolean | undefined /** * When true, the scroll view scrolls to top when the status bar is tapped. * * @default `true` * @platform ios */ scrollsToTop?: boolean | undefined /** * Fires when the scroll view scrolls to top after the status bar has been tapped * @platform ios */ onScrollToTop?: ((event: ScrollEvent) => void) | undefined /** * When true, shows a horizontal scroll indicator. * * @default `true` */ showsHorizontalScrollIndicator?: boolean | undefined /** * The current scale of the scroll view content. * * @default `1.0` * @platform ios */ zoomScale?: number | undefined /** * This property specifies how the safe area insets are used to modify the * content area of the scroll view. * * @default `'never'` * @platform ios */ contentInsetAdjustmentBehavior?: | ('automatic' | 'scrollableAxes' | 'never' | 'always') | undefined }> export interface ScrollViewScrollToOptions { x?: number | undefined y?: number | undefined animated?: boolean | undefined } export type ScrollViewStickyHeaderProps = Readonly<{ children?: React.ReactNode | undefined nextHeaderLayoutY: number | undefined onLayout: (event: LayoutChangeEvent) => void scrollAnimatedValue: AnimatedValue inverted: boolean | undefined scrollViewHeight: number | undefined nativeID?: string | undefined hiddenOnScroll?: boolean | undefined }> export type StickyHeaderComponentType = ( props: Omit & { ref?: | React.Ref< Readonly<{ setNextHeaderY: ($$PARAM_0$$: number) => void }> > | undefined } ) => React.ReactNode export type StyleProp = null | void | T | false | '' | ReadonlyArray> export type SwitchChangeEvent = NativeSyntheticEvent export type SwitchChangeEventData = Readonly<{ target: number value: boolean }> export interface SwitchProps extends Readonly< Omit & Omit & Omit > {} export type SwitchPropsBase = { /** * If true, the user won't be able to toggle the switch. * * @default `false` */ disabled?: boolean | undefined /** * The value of the switch. If true the switch will be turned on. * * @default `false` */ value?: boolean | undefined /** * Color of the foreground switch grip. If set on iOS, the switch grip * loses its drop shadow. */ thumbColor?: ColorValue | undefined /** * Custom colors for the switch track. On iOS, when the switch value is * false, the track shrinks into the border. */ trackColor?: | Readonly<{ false?: ColorValue | undefined true?: ColorValue | undefined }> | undefined /** * Custom color for the background. Can be seen when the switch value is * false or when the switch is disabled (and the switch is translucent). * * @platform ios */ ios_backgroundColor?: ColorValue | undefined /** * Invoked when the user tries to change the value of the switch. Receives * the change event as an argument. Use `onValueChange` to receive just * the new value instead. */ onChange?: ((event: SwitchChangeEvent) => Promise | void) | undefined /** * Invoked when the user tries to change the value of the switch. Receives * the new value as an argument. Use `onChange` to receive the event * instead. */ onValueChange?: ((value: boolean) => Promise | void) | undefined } export type SwitchPropsIOS = { /** * Background color when the switch is turned on. * * @deprecated use trackColor instead */ onTintColor?: ColorValue | undefined /** * Color of the foreground switch grip. * * @deprecated use thumbColor instead */ thumbTintColor?: ColorValue | undefined /** * Background color when the switch is turned off. * * @deprecated use trackColor instead */ tintColor?: ColorValue | undefined } export type TargetedEvent = Readonly<{ target: number }> export type TextBaseProps = Readonly<{ onAccessibilityAction?: ((event: AccessibilityActionEvent) => unknown) | undefined /** * Controls whether the `Text` can be the target of touch events. */ pointerEvents?: ('auto' | 'box-none' | 'box-only' | 'none') | undefined /** * Whether fonts should scale to respect Text Size accessibility settings. * * @default `true` */ allowFontScaling?: boolean | undefined /** * Sets automatic hyphenation frequency. * * @default `'none'` * @platform android */ android_hyphenationFrequency?: ('normal' | 'none' | 'full') | undefined children?: React.ReactNode | undefined /** * How text is truncated when `numberOfLines` is set. On Android with * `numberOfLines` greater than 1, only `'tail'` works correctly. * * @default `'tail'` */ ellipsizeMode?: ('clip' | 'head' | 'middle' | 'tail') | undefined id?: string | undefined /** * Largest possible font scale when `allowFontScaling` is enabled. * `null`/`undefined` inherits from the parent node or the global default (0). * `0` means no max (ignores parent/global default). `>= 1` sets the * `maxFontSizeMultiplier` of this node to this value. */ maxFontSizeMultiplier?: number | undefined nativeID?: string | undefined /** * Truncate text with an ellipsis after this many lines. `0` means no * restriction. * * @default `0` */ numberOfLines?: number | undefined onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined /** Called on long press. */ onLongPress?: ((event: GestureResponderEvent) => unknown) | undefined /** Called on press, triggered after `onPressOut`. */ onPress?: ((event: GestureResponderEvent) => unknown) | undefined /** Called immediately when a touch is engaged. */ onPressIn?: ((event: GestureResponderEvent) => unknown) | undefined /** Called when a touch is released. */ onPressOut?: ((event: GestureResponderEvent) => unknown) | undefined onResponderGrant?: ((event: GestureResponderEvent) => void) | undefined onResponderMove?: ((event: GestureResponderEvent) => void) | undefined onResponderRelease?: ((event: GestureResponderEvent) => void) | undefined onResponderTerminate?: ((event: GestureResponderEvent) => void) | undefined onResponderTerminationRequest?: (() => boolean) | undefined onStartShouldSetResponder?: (() => boolean) | undefined onMoveShouldSetResponder?: (() => boolean) | undefined /** Invoked on text layout change. */ onTextLayout?: ((event: TextLayoutEvent) => unknown) | undefined /** * Defines how far your touch may move off of the button, before * deactivating the button. */ pressRetentionOffset?: PressRetentionOffset | undefined /** * Indicates to accessibility services to treat UI component like a specific role. */ role?: Role | undefined /** * Lets the user select text for native copy and paste. * * @default `false` */ selectable?: boolean | undefined style?: TextStyleProp | undefined testID?: string | undefined }> export interface TextInputInstance extends _TextInputInstance {} export interface TextInstance extends HostInstance {} export type TextLayoutEvent = NativeSyntheticEvent export type TextLayoutEventData = Readonly<{ lines: Array }> export type TextLayoutLine = Readonly< Omit & { ascender: number capHeight: number descender: number text: string xHeight: number } > export type TextPointerEventProps = Readonly<{ onPointerEnter?: ((event: PointerEvent) => void) | undefined onPointerLeave?: ((event: PointerEvent) => void) | undefined onPointerMove?: ((event: PointerEvent) => void) | undefined }> export interface TextProps extends Readonly< Omit< TextPointerEventProps, | keyof TextPropsIOS | keyof TextPropsAndroid | keyof TextBaseProps | keyof AccessibilityProps | keyof {} > & Omit< TextPropsIOS, keyof TextPropsAndroid | keyof TextBaseProps | keyof AccessibilityProps | keyof {} > & Omit & Omit & Omit > {} export type TextPropsAndroid = { /** * Specifies the disabled state of the text view for testing purposes. * * @platform android */ disabled?: boolean | undefined /** * Highlight color of the text when selected. * * @platform android */ selectionColor?: ColorValue | undefined /** * Types of data converted to clickable URLs in the text element. * * @default `'none'` * @platform android */ dataDetectorType?: ('phoneNumber' | 'link' | 'email' | 'none' | 'all') | undefined /** * Text break strategy on Android. * * @default `'highQuality'` * @platform android */ textBreakStrategy?: ('balanced' | 'highQuality' | 'simple') | undefined adjustsFontSizeToFit?: boolean | undefined /** * Smallest possible font scale when `adjustsFontSizeToFit` is enabled * (values 0.01-1.0). * * @platform ios */ minimumFontScale?: number | undefined } export type TextPropsIOS = { /** * Whether fonts should be scaled down to fit style constraints. * * @default `false` * @platform ios */ adjustsFontSizeToFit?: boolean | undefined /** * The [Dynamic Type](https://developer.apple.com/documentation/uikit/uifont/textstyle) * ramp to apply. * * @default `'body'` * @platform ios */ dynamicTypeRamp?: | ( | 'caption2' | 'caption1' | 'footnote' | 'subheadline' | 'callout' | 'body' | 'headline' | 'title3' | 'title2' | 'title1' | 'largeTitle' ) | undefined /** * When `true`, no visual change is made when text is pressed down. By * default, a gray oval highlights the text on press down. * * @default `false` * @platform ios */ suppressHighlighting?: boolean | undefined /** * Line break strategy on iOS. * * @default `'none'` * @platform ios */ lineBreakStrategyIOS?: ('none' | 'standard' | 'hangul-word' | 'push-out') | undefined } export interface TextStyle extends Readonly< Omit<____TextStyle_InternalCore, keyof ____TextStyle_InternalOverrides | keyof {}> & Omit<____TextStyle_InternalOverrides, keyof {}> > {} export type TextStyleProp = ____TextStyleProp_Internal export type TouchEventProps = Readonly<{ onTouchCancel?: ((e: GestureResponderEvent) => void) | undefined onTouchCancelCapture?: ((e: GestureResponderEvent) => void) | undefined onTouchEnd?: ((e: GestureResponderEvent) => void) | undefined onTouchEndCapture?: ((e: GestureResponderEvent) => void) | undefined onTouchMove?: ((e: GestureResponderEvent) => void) | undefined onTouchMoveCapture?: ((e: GestureResponderEvent) => void) | undefined onTouchStart?: ((e: GestureResponderEvent) => void) | undefined onTouchStartCapture?: ((e: GestureResponderEvent) => void) | undefined }> export type ValueListenerCallback = (state: { value: number }) => unknown export type ValueOfUnion = T extends any ? K extends keyof T ? T[K] : never : never export type ViewBaseProps = Readonly<{ children?: React.ReactNode | undefined style?: ViewStyleProp | undefined /** * Views that are only used to layout their children or otherwise don't draw * anything may be automatically removed from the native hierarchy as an * optimization. Set this property to `false` to disable this optimization and * ensure that this `View` exists in the native view hierarchy. * * @default `true` */ collapsable?: boolean | undefined /** * Setting to false prevents direct children of the view from being removed * from the native view hierarchy, similar to the effect of setting * `collapsable={false}` on each child. * * @default `true` */ collapsableChildren?: boolean | undefined /** * Used to locate this view from native classes. Has precedence over `nativeID` prop. * * > This disables the 'layout-only view removal' optimization for this view! * * See https://reactnative.dev/docs/view#id */ id?: string | undefined /** * Used to locate this view in end-to-end tests. * * > This disables the 'layout-only view removal' optimization for this view! * * See https://reactnative.dev/docs/view#testid */ testID?: string | undefined /** * Used to locate this view from native classes. * * > This disables the 'layout-only view removal' optimization for this view! * * See https://reactnative.dev/docs/view#nativeid */ nativeID?: string | undefined /** * Whether this `View` needs to be rendered offscreen and composited with an * alpha in order to preserve 100% correct colors and blending behavior. * The default (`false`) falls back to drawing the component and its children * with reduced alpha applied to the paint used to draw each element * instead of rendering the full component offscreen and compositing it back * with an alpha value. This default may be noticeable and undesired in the * case where the `View` you are setting an opacity on has multiple * overlapping elements (e.g. multiple overlapping `View`s, or text and a * background). * * Rendering offscreen to preserve correct alpha behavior is extremely * expensive and hard to debug for non-native developers, which is why it is * not turned on by default. * * @default `false` */ needsOffscreenAlphaCompositing?: boolean | undefined /** * This defines how far a touch event can start away from the view. * Typical interface guidelines recommend touch targets that are at least * 30 - 40 points/density-independent pixels. * * > The touch area never extends past the parent view bounds and the Z-index * > of sibling views always takes precedence if a touch hits two overlapping * > views. * * See https://reactnative.dev/docs/view#hitslop */ hitSlop?: EdgeInsetsOrSizeProp | undefined /** * Controls whether the `View` can be the target of touch events. * * - `'auto'`: The view can be the target of touch events. * - `'none'`: The view is never the target of touch events. * - `'box-none'`: The view is never the target of touch events but its * subviews can be. * - `'box-only'`: The view can be the target of touch events but its * subviews cannot be. */ pointerEvents?: ('auto' | 'box-none' | 'box-only' | 'none') | undefined /** * This is a special performance property exposed by `RCTView` and is useful * for scrolling content when there are many subviews, most of which are * offscreen. For this property to be effective, it must be applied to a * view that contains many subviews that extend outside its bound. The * subviews must also have `overflow: hidden`, as should the containing view * (or one of its superviews). * * See https://reactnative.dev/docs/view#removeclippedsubviews */ removeClippedSubviews?: boolean | undefined /** * Defines the order in which descendant elements receive accessibility focus. * The elements in the array represent nativeID values for the respective * descendant elements. */ experimental_accessibilityOrder?: Array | undefined }> export interface ViewInstance extends HostInstance {} export interface ViewProps extends Readonly< Omit< DirectEventProps, | keyof GestureResponderHandlers | keyof MouseEventProps | keyof PointerEventProps | keyof FocusEventProps | keyof KeyEventProps | keyof TouchEventProps | keyof ViewPropsAndroid | keyof ViewPropsIOS | keyof AccessibilityProps | keyof ViewBaseProps | keyof {} > & Omit< GestureResponderHandlers, | keyof MouseEventProps | keyof PointerEventProps | keyof FocusEventProps | keyof KeyEventProps | keyof TouchEventProps | keyof ViewPropsAndroid | keyof ViewPropsIOS | keyof AccessibilityProps | keyof ViewBaseProps | keyof {} > & Omit< MouseEventProps, | keyof PointerEventProps | keyof FocusEventProps | keyof KeyEventProps | keyof TouchEventProps | keyof ViewPropsAndroid | keyof ViewPropsIOS | keyof AccessibilityProps | keyof ViewBaseProps | keyof {} > & Omit< PointerEventProps, | keyof FocusEventProps | keyof KeyEventProps | keyof TouchEventProps | keyof ViewPropsAndroid | keyof ViewPropsIOS | keyof AccessibilityProps | keyof ViewBaseProps | keyof {} > & Omit< FocusEventProps, | keyof KeyEventProps | keyof TouchEventProps | keyof ViewPropsAndroid | keyof ViewPropsIOS | keyof AccessibilityProps | keyof ViewBaseProps | keyof {} > & Omit< KeyEventProps, | keyof TouchEventProps | keyof ViewPropsAndroid | keyof ViewPropsIOS | keyof AccessibilityProps | keyof ViewBaseProps | keyof {} > & Omit< TouchEventProps, | keyof ViewPropsAndroid | keyof ViewPropsIOS | keyof AccessibilityProps | keyof ViewBaseProps | keyof {} > & Omit< ViewPropsAndroid, keyof ViewPropsIOS | keyof AccessibilityProps | keyof ViewBaseProps | keyof {} > & Omit & Omit & Omit > {} export type ViewPropsAndroid = Readonly<{ nativeBackgroundAndroid?: AndroidDrawable | undefined nativeForegroundAndroid?: AndroidDrawable | undefined /** * Whether this `View` should render itself (and all of its children) into a * single hardware texture on the GPU. * * On Android, this is useful for animations and interactions that only * modify opacity, rotation, translation and/or scale: in those cases, the * view does not have to be redrawn and display lists do not need to be * re-executed. The texture can be re-used and re-composited with different * parameters. The downside is that this can use up limited video memory, so * this prop should be set back to `false` at the end of the interaction/ * animation. * * @default `false` * * @platform android */ renderToHardwareTextureAndroid?: boolean | undefined /** * Whether to force the Android TV focus engine to move focus to this view. * * @platform android * @deprecated Use `focusable` instead */ hasTVPreferredFocus?: boolean | undefined /** * Designates the next view to receive focus when the user navigates down. * The value is the `nativeID` of the target view. * * @platform android */ nextFocusDown?: number | undefined /** * Designates the next view to receive focus when the user navigates * forward. The value is the `nativeID` of the target view. * * @platform android */ nextFocusForward?: number | undefined /** * Designates the next view to receive focus when the user navigates left. * The value is the `nativeID` of the target view. * * @platform android */ nextFocusLeft?: number | undefined /** * Designates the next view to receive focus when the user navigates right. * The value is the `nativeID` of the target view. * * @platform android */ nextFocusRight?: number | undefined /** * Designates the next view to receive focus when the user navigates up. * The value is the `nativeID` of the target view. * * @platform android */ nextFocusUp?: number | undefined /** * Whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard. * * @platform android */ focusable?: boolean | undefined /** * Indicates whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard. * See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex * for more details. * * Supports the following values: * - 0 (View is focusable) * - -1 (View is not focusable) * * @platform android */ tabIndex?: 0 | -1 | undefined /** * The action to perform when this `View` is clicked on by a non-touch click, eg. enter key on a hardware keyboard. * * @platform android */ onClick?: ((event: GestureResponderEvent) => unknown) | undefined }> export type ViewPropsIOS = Readonly<{ /** * Whether this `View` should be rendered as a bitmap before compositing. * * On iOS, this is useful for animations and interactions that do not * modify this component's dimensions nor its children; for example, when * translating the position of a static view, rasterization allows the * renderer to skip re-rendering the view frame and re-use the cached * bitmap. * * Rasterization incurs an offscreen drawing pass and the bitmap consumes * memory. Test and measure when using this property. * * @default `false` * * @platform ios */ shouldRasterizeIOS?: boolean | undefined }> export interface ViewStyle extends Readonly< Omit<____ViewStyle_InternalCore, keyof ____ViewStyle_InternalOverrides | keyof {}> & Omit<____ViewStyle_InternalOverrides, keyof {}> > {} export type ViewStyleProp = ____ViewStyleProp_Internal export { $$Image as Image } export { $$View as View } export { ImageProps as ImagePropsType }