@granite-js/react-native 0.1.33 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +12 -557
  2. package/dist/app/Granite.d.ts +2 -2
  3. package/dist/async-bridges.js +6 -6
  4. package/dist/async-bridges.mjs +2 -2
  5. package/dist/chunk-7GFSQK76.mjs +7 -0
  6. package/dist/constant-bridges.js +4 -4
  7. package/dist/constant-bridges.mjs +2 -2
  8. package/dist/image/Image.d.ts +77 -0
  9. package/dist/image/SvgImage.d.ts +47 -0
  10. package/dist/image/index.d.ts +1 -0
  11. package/dist/image/types.d.ts +3 -0
  12. package/dist/index.d.ts +4 -3
  13. package/dist/intersection-observer/IOFlatList.d.ts +2 -2
  14. package/dist/lottie/Lottie.d.ts +22 -0
  15. package/dist/lottie/ensureSafeLottie.d.ts +3 -0
  16. package/dist/lottie/index.d.ts +1 -0
  17. package/dist/lottie/useFetchResource.d.ts +2 -0
  18. package/dist/native-modules/index.d.ts +0 -1
  19. package/dist/native-modules/natives/GraniteBrownfieldModule.brick.d.ts +14 -0
  20. package/dist/router/Router.d.ts +11 -3
  21. package/dist/router/components/CanGoBackGuard.d.ts +2 -1
  22. package/dist/router/components/ErrorBoundary.d.ts +16 -0
  23. package/dist/router/components/StackNavigator.d.ts +40 -43
  24. package/dist/router/components/useRouterBackHandler.d.ts +3 -3
  25. package/dist/router/createRoute.d.ts +4 -1
  26. package/dist/router/hooks/useRouterControls.d.ts +3 -2
  27. package/dist/router/types/ErrorComponent.d.ts +6 -0
  28. package/dist/router/types/RouteScreen.d.ts +6 -0
  29. package/dist/router/types/index.d.ts +1 -0
  30. package/dist/status-bar/utils.d.ts +2 -2
  31. package/dist/video/Video.d.ts +5 -18
  32. package/package.json +22 -19
  33. package/src/app/Granite.tsx +2 -2
  34. package/src/image/Image.tsx +125 -0
  35. package/src/image/SvgImage.tsx +124 -0
  36. package/src/image/index.ts +1 -0
  37. package/src/image/types.ts +6 -0
  38. package/src/index.ts +14 -3
  39. package/src/intersection-observer/IOFlatList.ts +2 -2
  40. package/src/intersection-observer/withIO.tsx +71 -17
  41. package/src/lottie/Lottie.tsx +87 -0
  42. package/src/lottie/ensureSafeLottie.ts +15 -0
  43. package/src/lottie/index.ts +1 -0
  44. package/src/lottie/useFetchResource.ts +31 -0
  45. package/src/native-modules/index.ts +0 -1
  46. package/src/native-modules/natives/GraniteBrownfieldModule.brick.ts +15 -0
  47. package/src/native-modules/natives/closeView.ts +2 -2
  48. package/src/native-modules/natives/getSchemeUri.ts +2 -2
  49. package/src/polyfills/index.ts +7 -0
  50. package/src/router/Router.tsx +40 -12
  51. package/src/router/components/CanGoBackGuard.tsx +2 -3
  52. package/src/router/components/ErrorBoundary.tsx +38 -0
  53. package/src/router/components/useRouterBackHandler.tsx +3 -3
  54. package/src/router/createRoute.ts +6 -2
  55. package/src/router/hooks/useRouterControls.tsx +21 -7
  56. package/src/router/types/ErrorComponent.ts +8 -0
  57. package/src/router/types/RouteScreen.ts +6 -0
  58. package/src/router/types/index.ts +1 -0
  59. package/src/router/utils/screen.tsx +2 -0
  60. package/src/status-bar/utils.ts +2 -2
  61. package/src/types/global.ts +1 -1
  62. package/src/video/Video.tsx +6 -17
  63. package/src/visibility/VisibilityProvider.tsx +3 -3
  64. package/src/visibility/utils/usePrevious.tsx +1 -1
  65. package/dist/blur/BlurView.d.ts +0 -78
  66. package/dist/blur/ReactNativeBlurModule.d.ts +0 -6
  67. package/dist/blur/constants.d.ts +0 -1
  68. package/dist/blur/index.d.ts +0 -1
  69. package/dist/chunk-A3JGM5OI.mjs +0 -7
  70. package/dist/native-event-emitter/eventEmitters/index.d.ts +0 -2
  71. package/dist/native-event-emitter/eventEmitters/types.d.ts +0 -4
  72. package/dist/native-event-emitter/eventEmitters/visibilityChanged.d.ts +0 -10
  73. package/dist/native-event-emitter/index.d.ts +0 -1
  74. package/dist/native-event-emitter/nativeEventEmitter.d.ts +0 -15
  75. package/dist/native-modules/core/GraniteCoreModule.d.ts +0 -8
  76. package/dist/native-modules/natives/GraniteModule.d.ts +0 -7
  77. package/dist/video/instance.d.ts +0 -9
  78. package/src/blur/BlurView.tsx +0 -103
  79. package/src/blur/ReactNativeBlurModule.ts +0 -19
  80. package/src/blur/constants.ts +0 -3
  81. package/src/blur/index.ts +0 -1
  82. package/src/native-event-emitter/eventEmitters/index.ts +0 -3
  83. package/src/native-event-emitter/eventEmitters/types.ts +0 -4
  84. package/src/native-event-emitter/eventEmitters/visibilityChanged.ts +0 -11
  85. package/src/native-event-emitter/index.ts +0 -1
  86. package/src/native-event-emitter/nativeEventEmitter.ts +0 -18
  87. package/src/native-modules/core/GraniteCoreModule.ts +0 -9
  88. package/src/native-modules/natives/GraniteModule.ts +0 -8
  89. package/src/video/instance.tsx +0 -28
@@ -0,0 +1,77 @@
1
+ import { GraniteImageProps, OnErrorEvent, OnLoadEndEvent, OnLoadStartEvent } from '@granite-js/native/react-native-fast-image';
2
+ import { NativeSyntheticEvent } from 'react-native';
3
+ type Source = {
4
+ uri?: string;
5
+ headers?: Record<string, string>;
6
+ priority?: 'low' | 'normal' | 'high';
7
+ cache?: 'immutable' | 'web' | 'cacheOnly';
8
+ };
9
+ export interface ImageProps extends Omit<GraniteImageProps, 'source' | 'onError'> {
10
+ source?: Source;
11
+ onLoadStart?: (event: NativeSyntheticEvent<OnLoadStartEvent> | Readonly<{
12
+ type: 'svg';
13
+ }>) => void;
14
+ onLoadEnd?: (event: NativeSyntheticEvent<OnLoadEndEvent> | Readonly<{
15
+ type: 'svg';
16
+ }>) => void;
17
+ onError?: (event: NativeSyntheticEvent<OnErrorEvent> | Readonly<{
18
+ type: 'svg';
19
+ }>) => void;
20
+ }
21
+ /**
22
+ * @public
23
+ * @category UI
24
+ * @name Image
25
+ * @description You can use the `Image` component to load and render bitmap images (such as PNG, JPG) or vector images (SVG). It automatically renders with the appropriate method depending on the image format.
26
+ *
27
+ * @param {object} [props] - The `props` object passed to the component.
28
+ * @param {object} [props.style] - An object that defines the style for the image component. It can include layout-related properties like `width` and `height`.
29
+ * @param {object} [props.source] - An object containing information about the image resource to load.
30
+ * @param {string} [props.source.uri] - The URI address representing the image resource to load.
31
+ * @param {'immutable' | 'web' | 'cacheOnly'} [props.source.cache = 'immutable'] - An option to set the image caching strategy. This applies only to bitmap images. The default value is `immutable`.
32
+ * @param {() => void} [props.onLoadStart] - A callback function that is called when image loading starts.
33
+ * @param {() => void} [props.onLoadEnd] - A callback function that is called when image loading finishes.
34
+ * @param {() => void} [props.onError] - A callback function that is called when an error occurs during image loading.
35
+ *
36
+ * @example
37
+ * ### Example: Loading and rendering an image
38
+ *
39
+ * The following example shows how to load bitmap and vector image resources, and how to print an error message to `console.log` if an error occurs.
40
+ *
41
+ * ```tsx
42
+ * import { Image } from '@granite-js/react-native';
43
+ * import { View } from 'react-native';
44
+ *
45
+ * export function ImageExample() {
46
+ * return (
47
+ * <View>
48
+ * <Image
49
+ * source={{ uri: 'my-image-link' }}
50
+ * style={{
51
+ * width: 300,
52
+ * height: 300,
53
+ * borderWidth: 1,
54
+ * }}
55
+ * onError={() => {
56
+ * console.log('Failed to load image');
57
+ * }}
58
+ * />
59
+ *
60
+ * <Image
61
+ * source={{ uri: 'my-svg-link' }}
62
+ * style={{
63
+ * width: 300,
64
+ * height: 300,
65
+ * borderWidth: 1,
66
+ * }}
67
+ * onError={() => {
68
+ * console.log('Failed to load image');
69
+ * }}
70
+ * />
71
+ * </View>
72
+ * );
73
+ * }
74
+ * ```
75
+ */
76
+ declare function Image(props: ImageProps): import("react/jsx-runtime").JSX.Element | null;
77
+ export { Image };
@@ -0,0 +1,47 @@
1
+ import { type StyleProp } from 'react-native';
2
+ import type { DimensionValue } from './types';
3
+ export interface SvgImageProps {
4
+ url: string;
5
+ width?: DimensionValue;
6
+ height?: DimensionValue;
7
+ style?: StyleProp<any>;
8
+ testID?: string;
9
+ onLoadStart?: (event: object) => void;
10
+ onLoadEnd?: (event: object) => void;
11
+ onError?: () => void;
12
+ }
13
+ /**
14
+ * @name SvgImage
15
+ * @category Components
16
+ * @description The `SvgImage` component loads and renders SVG images from a given external URL.
17
+ * @link https://github.com/software-mansion/react-native-svg/tree/v13.14.0/README.md
18
+ *
19
+ * @param {object} props - The `props` object passed to the component.
20
+ * @param {string} props.url - The URI address of the SVG image to load.
21
+ * @param {number | string} [props.width = '100%'] - Sets the horizontal size of the SVG image. Default value is '`100%`'.
22
+ * @param {number | string} [props.height = '100%'] - Sets the vertical size of the SVG image. Default value is '`100%`'.
23
+ * @param {object} props.style - Sets the style of the image component.
24
+ * @param {() => void} props.onLoadStart - A callback function called when the SVG image resource starts loading.
25
+ * @param {() => void} props.onLoadEnd - A callback function called after the SVG image resource is loaded.
26
+ * @param {() => void} props.onError - A callback function called when an error occurs during SVG image loading.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * import { SvgImage } from './SvgImage';
31
+ * import { View } from 'react-native';
32
+ *
33
+ * function MyComponent() {
34
+ * return (
35
+ * <View>
36
+ * <SvgImage
37
+ * url="https://example.com/icon.svg"
38
+ * width={100}
39
+ * height={100}
40
+ * onError={() => console.log('An error occurred while loading the SVG')}
41
+ * />
42
+ * </View>
43
+ * );
44
+ * }
45
+ * ```
46
+ */
47
+ export declare function SvgImage({ url, width, height, style, testID, onLoadStart: _onLoadStart, onLoadEnd: _onLoadEnd, onError: _onError, }: SvgImageProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { Image, type ImageProps } from './Image';
@@ -0,0 +1,3 @@
1
+ import type { Animated } from 'react-native';
2
+ export type DimensionValue = string | number | 'auto' | `${number}%` | Animated.AnimatedNode | null;
3
+ export type NumberValue = number | string;
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import './types/global';
2
2
  export { Granite, useInitialSearchParams, useInitialProps } from './app';
3
3
  export * from '@granite-js/style-utils';
4
- export * from '@granite-js/image';
5
- export * from '@granite-js/lottie';
4
+ export { type GraniteImageSource, type GraniteImageStatic, type ResizeMode, type CachePolicy, type Priority, type OnLoadEvent, type OnProgressEvent, } from '@granite-js/native/react-native-fast-image';
5
+ export * from './image';
6
+ export * from './lottie';
6
7
  export * from './dev-entrypoint';
7
8
  export * from './native-modules/natives';
8
9
  export * from './visibility';
@@ -16,7 +17,7 @@ export * from './router/hooks/useIsInitialScreen';
16
17
  export * from './event';
17
18
  export * from './video';
18
19
  export * from './status-bar';
19
- export * from './blur';
20
+ export * from '@granite-js/blur-view';
20
21
  export { BackButton, useRouterBackHandler } from './router';
21
22
  export type { InitialProps, ColorPreference } from './initial-props';
22
23
  export type { GraniteProps } from './app';
@@ -1,4 +1,4 @@
1
- import { RefAttributes } from 'react';
1
+ import React, { RefAttributes } from 'react';
2
2
  import { FlatList, FlatListProps } from 'react-native';
3
3
  import { IOComponentProps } from './withIO';
4
4
  export type IOFlatListController = FlatList;
@@ -51,5 +51,5 @@ export type IOFlatListProps<ItemT = any> = IOComponentProps & FlatListProps<Item
51
51
  * ```
52
52
  */
53
53
  declare const IOFlatList: typeof IOFlatListFunction;
54
- declare function IOFlatListFunction<ItemT = any>(props: IOFlatListProps<ItemT> & RefAttributes<IOFlatListController>): JSX.Element;
54
+ declare function IOFlatListFunction<ItemT = any>(props: IOFlatListProps<ItemT> & RefAttributes<IOFlatListController>): React.JSX.Element;
55
55
  export default IOFlatList;
@@ -0,0 +1,22 @@
1
+ import LottieView, { type AnimationObject } from '@granite-js/native/lottie-react-native';
2
+ import type { ComponentProps } from 'react';
3
+ type LottieViewProps = ComponentProps<typeof LottieView>;
4
+ type BaseProps = Omit<LottieViewProps, 'source'> & {
5
+ /**
6
+ * Height is required to prevent layout shifting.
7
+ */
8
+ height: number | '100%';
9
+ width?: number | '100%';
10
+ maxWidth?: number;
11
+ };
12
+ export type RemoteLottieProps = BaseProps & {
13
+ src: string;
14
+ };
15
+ export type AnimationObjectLottieProps = BaseProps & {
16
+ animationObject: AnimationObject;
17
+ };
18
+ export declare function Lottie({ width, maxWidth, height, src, autoPlay, speed, style, onAnimationFailure, ...props }: RemoteLottieProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare namespace Lottie {
20
+ var AnimationObject: ({ width, maxWidth, height, animationObject, autoPlay, speed, style, onAnimationFailure, ...props }: AnimationObjectLottieProps) => import("react/jsx-runtime").JSX.Element;
21
+ }
22
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { AnimationObject } from '@granite-js/native/lottie-react-native';
2
+ export declare function hasFonts(animationData: AnimationObject): boolean;
3
+ export declare function ensureSafeLottie(animationData: AnimationObject): AnimationObject;
@@ -0,0 +1 @@
1
+ export { Lottie, type RemoteLottieProps, type AnimationObjectLottieProps } from './Lottie';
@@ -0,0 +1,2 @@
1
+ import type { AnimationObject } from '@granite-js/native/lottie-react-native';
2
+ export declare function useFetchResource(src: string, onAnimationFailure?: (error: string) => void): AnimationObject | null;
@@ -1,3 +1,2 @@
1
1
  /** Bridges API */
2
2
  export * from './natives';
3
- export { GraniteCoreModule } from './core/GraniteCoreModule';
@@ -0,0 +1,14 @@
1
+ import { BrickModuleSpec } from 'brick-module';
2
+ import { CodegenTypes } from 'react-native';
3
+ interface GraniteBrownfieldModuleSpec extends BrickModuleSpec {
4
+ readonly moduleName: 'GraniteBrownfieldModule';
5
+ readonly onVisibilityChanged: CodegenTypes.EventEmitter<{
6
+ visible: boolean;
7
+ }>;
8
+ getConstants(): {
9
+ schemeUri: string;
10
+ };
11
+ closeView(): Promise<void>;
12
+ }
13
+ export declare const GraniteModule: GraniteBrownfieldModuleSpec;
14
+ export {};
@@ -1,6 +1,7 @@
1
1
  import { NavigationContainer, NavigationContainerRefWithCurrent, ParamListBase, RouteProp } from '@granite-js/native/@react-navigation/native';
2
2
  import { NativeStackNavigationOptions } from '@granite-js/native/@react-navigation/native-stack';
3
3
  import { ComponentProps, ComponentType, PropsWithChildren, ReactElement } from 'react';
4
+ import type { ErrorComponent } from './types';
4
5
  export type RouterProps = StackNavigatorProps & NavigationContainerProps;
5
6
  interface StackNavigatorProps {
6
7
  /**
@@ -8,7 +9,7 @@ interface StackNavigatorProps {
8
9
  * @description
9
10
  * You can create and pass a NavigationContainerRef from @react-navigation/native externally. This allows external control of the router.
10
11
  */
11
- navigationContainerRef?: NavigationContainerRefWithCurrent<any>;
12
+ navigationContainerRef?: NavigationContainerRefWithCurrent<never>;
12
13
  /**
13
14
  * @name defaultScreenOption
14
15
  * @description
@@ -24,6 +25,12 @@ interface StackNavigatorProps {
24
25
  * Container component that wraps each Screen component.
25
26
  */
26
27
  screenContainer?: ComponentType<PropsWithChildren<any>>;
28
+ /**
29
+ * @name defaultErrorComponent
30
+ * @description
31
+ * Error boundary component used when a route does not provide its own error component.
32
+ */
33
+ defaultErrorComponent?: ErrorComponent;
27
34
  }
28
35
  type NavigationContainerProps = Pick<ComponentProps<typeof NavigationContainer>, 'ref' | 'documentTitle' | 'fallback' | 'onReady' | 'onUnhandledAction' | 'onStateChange' | 'initialState'>;
29
36
  /**
@@ -37,11 +44,12 @@ type NavigationContainerProps = Pick<ComponentProps<typeof NavigationContainer>,
37
44
  *
38
45
  * @param {string} prefix Prefix to use when the scheme is executed. For example, to enter 'scheme://my-service/intro', you need to set 'scheme://my-service' as the prefix.
39
46
  * @param {RequireContext} context Object containing information about screens for file-based routing.
40
- * @param {NavigationContainerRefWithCurrent<any>} [navigationContainerRef] You can create and pass a NavigationContainerRef from @react-navigation/native externally. This allows external control of the router.
47
+ * @param {NavigationContainerRefWithCurrent<never>} [navigationContainerRef] You can create and pass a NavigationContainerRef from @react-navigation/native externally. This allows external control of the router.
41
48
  * @param {NativeStackNavigationOptions | ((props: { route: RouteProp<ParamListBase>; navigation: any }) => NativeStackNavigationOptions)} [defaultScreenOption] Default options for screens. You can set options to be applied commonly to screens, such as title or headerStyle.
42
49
  * @param {boolean} [canGoBack=true] Whether navigation back is possible. Default is true, and when set to true, you can use the back gesture or back button from @react-navigation/native.
43
50
  * @param {() => void} [onBack] Callback function called when the user presses the back button or uses the back gesture. For example, you can set it to log when the user presses the back button.
44
51
  * @param {ComponentType<{ children: ReactNode }>} [container=Fragment] Container component that wraps the Navigator from @react-navigation/native.
52
+ * @param {ComponentType<{ error: unknown; reset: () => void }>} [defaultErrorComponent] Default error component for screens without a route-specific error component.
45
53
  * @param {NavigationContainerProps} [navigationContainerProps] - You can set props to be passed to NavigationContainer from @react-navigation/native.
46
54
  *
47
55
  * @returns {ReactElement} - Returns the router component.
@@ -55,5 +63,5 @@ type NavigationContainerProps = Pick<ComponentProps<typeof NavigationContainer>,
55
63
  * }
56
64
  * ```
57
65
  */
58
- export declare function Router({ prefix, context, container: Container, initialProps, initialScheme, navigationContainerRef, defaultScreenOption, screenContainer, setIosSwipeGestureEnabled, getInitialUrl, ...navigationContainerProps }: InternalRouterProps & RouterProps): ReactElement;
66
+ export declare function Router({ prefix, context, container: Container, initialProps, initialScheme, navigationContainerRef, defaultScreenOption, screenContainer, defaultErrorComponent, setIosSwipeGestureEnabled, getInitialUrl, ...navigationContainerProps }: InternalRouterProps & RouterProps): ReactElement;
59
67
  export {};
@@ -1,6 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
- export declare function CanGoBackGuard({ children, canGoBack, onBack, setIosSwipeGestureEnabled, }: {
2
+ export declare function CanGoBackGuard({ children, canGoBack, onBack, isInitialScreen, setIosSwipeGestureEnabled, }: {
3
3
  canGoBack: boolean;
4
+ isInitialScreen: boolean;
4
5
  children: ReactNode;
5
6
  onBack?: () => void;
6
7
  setIosSwipeGestureEnabled?: ({ isEnabled }: {
@@ -0,0 +1,16 @@
1
+ import { Component, type ReactNode } from 'react';
2
+ import type { ErrorComponent } from '../types';
3
+ interface ErrorBoundaryProps {
4
+ fallback: ErrorComponent;
5
+ children: ReactNode;
6
+ }
7
+ interface ErrorBoundaryState {
8
+ error: unknown | null;
9
+ }
10
+ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
11
+ state: ErrorBoundaryState;
12
+ static getDerivedStateFromError(error: unknown): ErrorBoundaryState;
13
+ render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
14
+ private reset;
15
+ }
16
+ export {};
@@ -1,54 +1,51 @@
1
1
  export declare const StackNavigator: {
2
- Navigator: import("react").ComponentType<Omit<import("@react-navigation/routers").DefaultRouterOptions<string> & {
3
- id?: string;
2
+ Navigator: import("react").ComponentType<Omit<import("@react-navigation/native-stack").NativeStackNavigatorProps, "children" | "id" | "initialRouteName" | "layout" | "screenListeners" | "screenOptions" | "screenLayout" | "UNSTABLE_router" | "UNSTABLE_routeNamesChangeBehavior"> & import("@react-navigation/routers").DefaultRouterOptions<string> & ({
4
3
  children: React.ReactNode;
4
+ layout?: ((props: {
5
+ state: import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>;
6
+ navigation: import("@react-navigation/core").NavigationHelpers<import("@react-navigation/routers").ParamListBase, {}>;
7
+ descriptors: Record<string, import("@react-navigation/core").Descriptor<import("@react-navigation/native-stack").NativeStackNavigationOptions, import("@react-navigation/core").NavigationProp<import("@react-navigation/routers").ParamListBase, string, string | undefined, import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>, import("@react-navigation/native-stack").NativeStackNavigationOptions, import("@react-navigation/native-stack").NativeStackNavigationEventMap>, import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>>>;
8
+ children: React.ReactNode;
9
+ }) => React.ReactElement) | undefined;
5
10
  screenListeners?: Partial<{
6
- transitionStart: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "transitionStart">;
7
- transitionEnd: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "transitionEnd">;
8
- focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "focus">;
9
- blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "blur">;
10
- state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "state">;
11
- beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "beforeRemove">;
11
+ transitionStart: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "transitionStart", unknown>;
12
+ transitionEnd: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "transitionEnd", unknown>;
13
+ gestureCancel: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "gestureCancel", unknown>;
14
+ sheetDetentChange: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "sheetDetentChange", unknown>;
15
+ focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "focus", unknown>;
16
+ blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "blur", unknown>;
17
+ state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "state", unknown>;
18
+ beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "beforeRemove", true>;
12
19
  }> | ((props: {
13
20
  route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
14
- navigation: any;
21
+ navigation: import("@react-navigation/native-stack").NativeStackNavigationProp<import("@react-navigation/routers").ParamListBase, string, string | undefined>;
15
22
  }) => Partial<{
16
- transitionStart: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "transitionStart">;
17
- transitionEnd: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "transitionEnd">;
18
- focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "focus">;
19
- blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "blur">;
20
- state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "state">;
21
- beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "beforeRemove">;
23
+ transitionStart: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "transitionStart", unknown>;
24
+ transitionEnd: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "transitionEnd", unknown>;
25
+ gestureCancel: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "gestureCancel", unknown>;
26
+ sheetDetentChange: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "sheetDetentChange", unknown>;
27
+ focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "focus", unknown>;
28
+ blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "blur", unknown>;
29
+ state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "state", unknown>;
30
+ beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "beforeRemove", true>;
22
31
  }>) | undefined;
23
32
  screenOptions?: import("@react-navigation/native-stack").NativeStackNavigationOptions | ((props: {
24
33
  route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
25
- navigation: any;
34
+ navigation: import("@react-navigation/native-stack").NativeStackNavigationProp<import("@react-navigation/routers").ParamListBase, string, string | undefined>;
35
+ theme: ReactNavigation.Theme;
26
36
  }) => import("@react-navigation/native-stack").NativeStackNavigationOptions) | undefined;
27
- } & import("@react-navigation/routers").StackRouterOptions, "children" | "id" | "initialRouteName" | "screenListeners" | "screenOptions"> & import("@react-navigation/routers").DefaultRouterOptions<string> & {
28
- id?: string;
29
- children: React.ReactNode;
30
- screenListeners?: Partial<{
31
- transitionStart: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "transitionStart">;
32
- transitionEnd: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "transitionEnd">;
33
- focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "focus">;
34
- blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "blur">;
35
- state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "state">;
36
- beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "beforeRemove">;
37
- }> | ((props: {
38
- route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
39
- navigation: any;
40
- }) => Partial<{
41
- transitionStart: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "transitionStart">;
42
- transitionEnd: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "transitionEnd">;
43
- focus: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "focus">;
44
- blur: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "blur">;
45
- state: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "state">;
46
- beforeRemove: import("@react-navigation/core").EventListenerCallback<import("@react-navigation/native-stack").NativeStackNavigationEventMap & import("@react-navigation/core").EventMapCore<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>>, "beforeRemove">;
47
- }>) | undefined;
48
- screenOptions?: import("@react-navigation/native-stack").NativeStackNavigationOptions | ((props: {
49
- route: import("@react-navigation/core").RouteProp<import("@react-navigation/routers").ParamListBase, string>;
50
- navigation: any;
51
- }) => import("@react-navigation/native-stack").NativeStackNavigationOptions) | undefined;
52
- }>;
53
- Screen: <RouteName extends string>(_: import("@react-navigation/core").RouteConfig<import("@react-navigation/routers").ParamListBase, RouteName, import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>, import("@react-navigation/native-stack").NativeStackNavigationOptions, import("@react-navigation/native-stack").NativeStackNavigationEventMap>) => null;
37
+ screenLayout?: ((props: import("@react-navigation/core").ScreenLayoutArgs<import("@react-navigation/routers").ParamListBase, string, import("@react-navigation/native-stack").NativeStackNavigationOptions, import("@react-navigation/native-stack").NativeStackNavigationProp<import("@react-navigation/routers").ParamListBase, string, string | undefined>>) => React.ReactElement) | undefined;
38
+ UNSTABLE_router?: (<Action extends Readonly<{
39
+ type: string;
40
+ payload?: object;
41
+ source?: string;
42
+ target?: string;
43
+ }>>(original: import("@react-navigation/routers").Router<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>, Action>) => Partial<import("@react-navigation/routers").Router<import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>, Action>>) | undefined;
44
+ UNSTABLE_routeNamesChangeBehavior?: "firstMatch" | "lastUnhandled";
45
+ } & ({
46
+ id?: undefined;
47
+ } | {
48
+ id: string;
49
+ }))>;
50
+ Screen: <RouteName extends string>(_: import("@react-navigation/core").RouteConfig<import("@react-navigation/routers").ParamListBase, RouteName, import("@react-navigation/routers").StackNavigationState<import("@react-navigation/routers").ParamListBase>, import("@react-navigation/native-stack").NativeStackNavigationOptions, import("@react-navigation/native-stack").NativeStackNavigationEventMap, import("@react-navigation/native-stack").NativeStackNavigationProp<import("@react-navigation/routers").ParamListBase, string, string | undefined>>) => null;
54
51
  };
@@ -6,7 +6,7 @@ import { NavigationContainerRefWithCurrent } from '@granite-js/native/@react-nav
6
6
  * @description
7
7
  * A hook that provides a handler for handling back navigation actions. This can be used when you need to close a view directly when the back button is pressed in modals or independent screens where there's no navigation stack. This hook uses `NavigationContainerRef` from `@react-navigation/native` to navigate to the previous screen if there's a remaining navigation stack, or executes the user-defined `onClose` function if the stack is empty.
8
8
  *
9
- * @param {NavigationContainerRefWithCurrent<any>} navigationContainerRef - A `NavigationContainerRef` that can reference the current navigation state. Used when executing back navigation actions.
9
+ * @param {NavigationContainerRefWithCurrent<never>} navigationContainerRef - A `NavigationContainerRef` that can reference the current navigation state. Used when executing back navigation actions.
10
10
  * @param {() => void} [onClose] - A function to execute when the navigation stack is empty. For example, you can pass a function that closes a React Native View.
11
11
  *
12
12
  * @returns {{ handler: () => void }} A handler function that can be used in back buttons or similar components.
@@ -42,13 +42,13 @@ import { NavigationContainerRefWithCurrent } from '@granite-js/native/@react-nav
42
42
  * }
43
43
  */
44
44
  export declare function useRouterBackHandler({ navigationContainerRef, onClose, }: {
45
- navigationContainerRef: NavigationContainerRefWithCurrent<any>;
45
+ navigationContainerRef: NavigationContainerRefWithCurrent<never>;
46
46
  onClose?: () => void;
47
47
  }): {
48
48
  handler: () => void;
49
49
  };
50
50
  export declare function useInternalRouterBackHandler({ navigationContainerRef, onClose, }: {
51
- navigationContainerRef: NavigationContainerRefWithCurrent<any>;
51
+ navigationContainerRef: NavigationContainerRefWithCurrent<never>;
52
52
  onClose?: () => void;
53
53
  }): {
54
54
  handler: () => void;
@@ -1,12 +1,14 @@
1
1
  import { type ParamListBase } from '@granite-js/native/@react-navigation/native';
2
2
  import { NativeStackNavigationOptions, NativeStackNavigationProp } from '@granite-js/native/@react-navigation/native-stack';
3
3
  import type { StandardSchemaV1 } from '@standard-schema/spec';
4
+ import type { ErrorComponent } from './types';
4
5
  import { defaultParserParams } from './utils/defaultParserParams';
5
6
  import { type InferOutput, type InferInput } from './utils/standardSchema';
6
7
  export interface RouteOptions<T extends Readonly<object | undefined>> {
7
8
  parserParams?: (params: Record<string, unknown>) => Record<string, unknown>;
8
9
  validateParams?: ((params: Readonly<object | undefined>) => T) | StandardSchemaV1<any, T>;
9
10
  component: React.FC<any>;
11
+ errorComponent?: ErrorComponent;
10
12
  screenOptions?: NativeStackNavigationOptions | ((context: {
11
13
  params: T;
12
14
  }) => NativeStackNavigationOptions);
@@ -25,8 +27,9 @@ export type RouteHooksOptions<TScreen extends keyof RegisterScreen> = {
25
27
  from?: never;
26
28
  };
27
29
  export declare const routeMap: Map<keyof RegisterScreenInput, {
28
- options: Omit<RouteOptions<any>, "component" | "screenOptions">;
30
+ options: Omit<RouteOptions<any>, "component" | "screenOptions" | "errorComponent">;
29
31
  component: React.FC<any>;
32
+ errorComponent?: ErrorComponent;
30
33
  screenOptions?: NativeStackNavigationOptions | ((context: {
31
34
  params: any;
32
35
  }) => NativeStackNavigationOptions);
@@ -1,13 +1,14 @@
1
1
  import { type ComponentType, type PropsWithChildren } from 'react';
2
- import { RequireContext } from '../types/RequireContext';
2
+ import type { ErrorComponent, RequireContext } from '../types';
3
3
  export interface RouterControlsConfig {
4
4
  prefix: string;
5
5
  initialScheme: string;
6
6
  context: RequireContext;
7
7
  getInitialUrl?: (initialScheme: string) => string | undefined | Promise<string | undefined>;
8
8
  screenContainer?: ComponentType<PropsWithChildren<any>>;
9
+ defaultErrorComponent?: ErrorComponent;
9
10
  }
10
- export declare function useRouterControls({ prefix, context, screenContainer: ScreenContainer, getInitialUrl, initialScheme, }: RouterControlsConfig): {
11
+ export declare function useRouterControls({ prefix, context, screenContainer: ScreenContainer, getInitialUrl, initialScheme, defaultErrorComponent, }: RouterControlsConfig): {
11
12
  Screens: import("react/jsx-runtime").JSX.Element[];
12
13
  linkingOptions: import("@react-navigation/native").LinkingOptions<{}>;
13
14
  };
@@ -0,0 +1,6 @@
1
+ import type { ComponentType } from 'react';
2
+ export interface ErrorComponentProps {
3
+ error: unknown;
4
+ reset: () => void;
5
+ }
6
+ export type ErrorComponent = ComponentType<ErrorComponentProps>;
@@ -1,4 +1,5 @@
1
1
  import { NativeStackNavigationOptions } from '@granite-js/native/@react-navigation/native-stack';
2
+ import type { ErrorComponent } from './ErrorComponent';
2
3
  import { Screen } from './Screen';
3
4
  /**
4
5
  * @name RouteScreen
@@ -14,6 +15,11 @@ export interface RouteScreen {
14
15
  * @description Screen component
15
16
  */
16
17
  component: Screen;
18
+ /**
19
+ * @name errorComponent
20
+ * @description Error boundary component for this screen
21
+ */
22
+ errorComponent?: ErrorComponent;
17
23
  /**
18
24
  * @name screenOptions
19
25
  * @description Screen options for React Navigation (can be static or a function that receives route params)
@@ -1,3 +1,4 @@
1
1
  export * from './RequireContext';
2
2
  export * from './RouteScreen';
3
3
  export * from './Screen';
4
+ export * from './ErrorComponent';
@@ -1,3 +1,3 @@
1
+ import { ColorSchemeName } from 'react-native';
1
2
  import type { StatusBarStyle } from './types';
2
- import type { ColorPreference } from '../initial-props';
3
- export declare function toStatusBarContentStyle(statusBarStyle?: StatusBarStyle, colorPreference?: ColorPreference): 'light-content' | 'dark-content';
3
+ export declare function toStatusBarContentStyle(statusBarStyle?: StatusBarStyle, colorPreference?: ColorSchemeName): 'light-content' | 'dark-content';
@@ -1,8 +1,9 @@
1
- import type { default as VideoRef } from '@granite-js/native/react-native-video';
1
+ import { type VideoRef } from '@granite-js/video';
2
2
  import { ComponentProps } from 'react';
3
3
  import { Animated } from 'react-native';
4
- import * as instance from './instance';
5
- declare const AnimatedRNVideo: Animated.AnimatedComponent<import("react").ComponentType<instance.VideoNativeProps>>;
4
+ declare const AnimatedRNVideo: Animated.AnimatedComponent<import("react").ForwardRefExoticComponent<import("@granite-js/video").VideoProps & import("react").RefAttributes<VideoRef>> & {
5
+ isAvailable: boolean;
6
+ }>;
6
7
  type VideoProps = ComponentProps<typeof AnimatedRNVideo>;
7
8
  /**
8
9
  * @public
@@ -11,13 +12,8 @@ type VideoProps = ComponentProps<typeof AnimatedRNVideo>;
11
12
  * @description
12
13
  * The Video component implements audio focus control logic to prevent the sandbox app from stopping music playing in other apps. It automatically plays or pauses based on the app's state. For example, when the app transitions to the background, the video automatically pauses.
13
14
  *
14
- * ::: warning
15
- * The Video component uses [react-native-video version (6.0.0-alpha.6)](https://github.com/TheWidlarzGroup/react-native-video/tree/v6.0.0-alpha.6). Therefore, some types or features may not be compatible with the latest version.
16
- * :::
17
- *
18
15
  * @property {boolean} [isAvailable] Value to check if the `Video` component can be used. You can check this value to determine if the user can render the video or if video functionality is unavailable due to environmental constraints (e.g., network connection issues, unsupported devices). If this value is `false`, you should handle it by not rendering the video or providing alternative content.
19
16
  *
20
- * @param {VideoProperties} [props] Properties provided by [`react-native-video`](https://github.com/TheWidlarzGroup/react-native-video/tree/v6.0.0-alpha.6).
21
17
  * @param {string} [props.source.uri] Source of the video to play. Can be set to a file path or URL.
22
18
  * @param {boolean} [props.muted=false] Controls the mute state of the video. If `true`, the video's audio is muted; if `false`, the audio plays. Default is `false`.
23
19
  * @param {boolean} [props.paused=false] Property to control video playback. If `true`, the video is paused; if `false`, the video plays. Default is `false`, and it autoplays.
@@ -26,11 +22,6 @@ type VideoProps = ComponentProps<typeof AnimatedRNVideo>;
26
22
  *
27
23
  * @returns {JSX.Element} Returns a JSX element that renders the video. Uses `Animated` to provide smooth animation effects during video playback.
28
24
  *
29
- * @see [react-native-video] https://github.com/react-native-video/react-native-video
30
- * For detailed properties of the video component, please refer to the official documentation.
31
- * @see [react-native-video-6.0.0] https://github.com/TheWidlarzGroup/react-native-video/releases/tag/v6.0.0
32
- * This is the source code of the version currently installed in the sandbox app.
33
- *
34
25
  * @example
35
26
  *
36
27
  * ### Video Autoplay Example
@@ -58,11 +49,7 @@ type VideoProps = ComponentProps<typeof AnimatedRNVideo>;
58
49
  * }
59
50
  * ```
60
51
  */
61
- declare const VideoImpl: import("react").ForwardRefExoticComponent<Omit<import("react-native-video").VideoProperties, "onAudioFocusChanged"> & {
62
- onAudioFocusChanged?: (event: {
63
- hasAudioFocus: boolean;
64
- }) => void;
65
- } & import("react").RefAttributes<VideoRef>>;
52
+ declare const VideoImpl: import("react").ForwardRefExoticComponent<Omit<Animated.AnimatedProps<import("@granite-js/video").VideoProps & import("react").RefAttributes<VideoRef>>, "ref"> & import("react").RefAttributes<VideoRef>>;
66
53
  export declare const Video: typeof VideoImpl & {
67
54
  isAvailable: boolean;
68
55
  };