react-native-navigation的迁移库

Options.ts 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954
  1. // tslint:disable jsdoc-format
  2. import { ImageRequireSource, Insets } from 'react-native';
  3. type Color = string;
  4. type FontFamily = string;
  5. type LayoutOrientation = 'portrait' | 'landscape';
  6. type AndroidDensityNumber = number;
  7. type SystemItemIcon = 'done' | 'cancel' | 'edit'
  8. | 'save' | 'add' | 'flexibleSpace' | 'fixedSpace'
  9. | 'compose' | 'reply' | 'action' | 'organize'
  10. | 'bookmarks' | 'search' | 'refresh' | 'stop'
  11. | 'camera' | 'trash' | 'play' | 'pause'
  12. | 'rewind' | 'fastForward' | 'undo' | 'redo';
  13. export interface OptionsSplitView {
  14. /**
  15. * Master view display mode
  16. * @default 'auto'
  17. */
  18. displayMode?: 'auto' | 'visible' | 'hidden' | 'overlay';
  19. /**
  20. * Master view side. Leading is left. Trailing is right.
  21. * @default 'leading'
  22. */
  23. primaryEdge?: 'leading' | 'trailing';
  24. /**
  25. * Set the minimum width of master view
  26. */
  27. minWidth?: number;
  28. /**
  29. * Set the maximum width of master view
  30. */
  31. maxWidth?: number;
  32. }
  33. export interface OptionsStatusBar {
  34. /**
  35. * Set the status bar visibility
  36. * @default true
  37. */
  38. visible?: boolean;
  39. /**
  40. * Set the text color of the status bar
  41. * @default 'light'
  42. */
  43. style?: 'light' | 'dark';
  44. /**
  45. * Set the background color of the status bar
  46. * #### (Android specific)
  47. */
  48. backgroundColor?: Color;
  49. /**
  50. * Draw screen behind the status bar
  51. * #### (Android specific)
  52. */
  53. drawBehind?: boolean;
  54. }
  55. export interface OptionsLayout {
  56. /**
  57. * Set the screen background color
  58. */
  59. backgroundColor?: Color;
  60. /**
  61. * Set background color only for components, helps reduce overdraw if background color is set in default options.
  62. * #### (Android specific)
  63. */
  64. componentBackgroundColor?: Color;
  65. /**
  66. * Set the allowed orientations
  67. */
  68. orientation?: LayoutOrientation[];
  69. /**
  70. * Layout top margin
  71. * #### (Android specific)
  72. */
  73. topMargin?: number;
  74. /**
  75. * Set language direction.
  76. * only works with DefaultOptions
  77. */
  78. direction?: 'rtl' | 'ltr';
  79. }
  80. export enum OptionsModalPresentationStyle {
  81. formSheet = 'formSheet',
  82. pageSheet = 'pageSheet',
  83. overFullScreen = 'overFullScreen',
  84. overCurrentContext = 'overCurrentContext',
  85. currentContext = 'currentContext',
  86. popOver = 'popOver',
  87. fullScreen = 'fullScreen',
  88. none = 'none'
  89. }
  90. export enum OptionsModalTransitionStyle {
  91. coverVertical = 'coverVertical',
  92. crossDissolve = 'crossDissolve',
  93. flipHorizontal = 'flipHorizontal',
  94. partialCurl = 'partialCurl'
  95. }
  96. export interface OptionsTopBarLargeTitle {
  97. /**
  98. * Enable large titles
  99. */
  100. visible?: boolean;
  101. /**
  102. * Set the font size of large title's text
  103. */
  104. fontSize?: number;
  105. /**
  106. * Set the color of large title's text
  107. */
  108. color?: Color;
  109. /**
  110. * Set the font family of large title's text
  111. */
  112. fontFamily?: FontFamily;
  113. }
  114. export interface OptionsTopBarTitle {
  115. /**
  116. * Text to display in the title area
  117. */
  118. text?: string;
  119. /**
  120. * Font size
  121. */
  122. fontSize?: number;
  123. /**
  124. * Text color
  125. */
  126. color?: Color;
  127. /**
  128. * Title font family
  129. *
  130. * Make sure that the font is available
  131. */
  132. fontFamily?: FontFamily;
  133. /**
  134. * Custom component as the title view
  135. */
  136. component?: {
  137. /**
  138. * Component reference id, Auto generated if empty
  139. */
  140. id?: string;
  141. /**
  142. * Name of your component
  143. */
  144. name: string;
  145. /**
  146. * Set component alignment
  147. */
  148. alignment?: 'center' | 'fill';
  149. /**
  150. * Properties to pass down to the component
  151. */
  152. passProps?: object;
  153. };
  154. /**
  155. * Top Bar title height in densitiy pixels
  156. * #### (Android specific)
  157. */
  158. height?: number;
  159. /**
  160. * Title alignment
  161. * #### (Android specific)
  162. */
  163. alignment?: 'center' | 'fill';
  164. }
  165. export interface OptionsTopBarSubtitle {
  166. /**
  167. * Set subtitle text
  168. */
  169. text?: string;
  170. /**
  171. * Set subtitle font size
  172. */
  173. fontSize?: number;
  174. /**
  175. * Set subtitle color
  176. */
  177. color?: Color;
  178. /**
  179. * Set subtitle font family
  180. */
  181. fontFamily?: FontFamily;
  182. /**
  183. * Set subtitle alignment
  184. */
  185. alignment?: 'center';
  186. }
  187. export interface OptionsTopBarBackButton {
  188. /**
  189. * Image to show as the back button
  190. */
  191. icon?: ImageRequireSource;
  192. /**
  193. * Weither the back button is visible or not
  194. * @default true
  195. */
  196. visible?: boolean;
  197. /**
  198. * Set the back button title
  199. * #### (iOS specific)
  200. */
  201. title?: string;
  202. /**
  203. * Show title or just the icon
  204. * #### (iOS specific)
  205. */
  206. showTitle?: boolean;
  207. /**
  208. * Back button icon and text color
  209. */
  210. color?: Color;
  211. }
  212. export interface OptionsTopBarBackground {
  213. /**
  214. * Background color of the top bar
  215. */
  216. color?: Color;
  217. /**
  218. * Clip the top bar background to bounds if set to true.
  219. * #### (iOS specific)
  220. */
  221. clipToBounds?: boolean;
  222. /**
  223. * Set a custom component for the Top Bar background
  224. */
  225. component?: {
  226. name?: string;
  227. };
  228. /**
  229. * Allows the NavBar to be translucent (blurred)
  230. * #### (iOS specific)
  231. */
  232. translucent?: boolean;
  233. /**
  234. * Enable background blur
  235. * #### (iOS specific)
  236. */
  237. blur?: boolean;
  238. }
  239. export interface OptionsTopBarButton {
  240. /**
  241. * Button id for reference press event
  242. */
  243. id: string;
  244. /**
  245. * Set the button icon
  246. */
  247. icon?: ImageRequireSource;
  248. /**
  249. * Set the button icon insets
  250. */
  251. iconInsets?: IconInsets;
  252. /**
  253. * Set the button as a custom component
  254. */
  255. component?: {
  256. name: string;
  257. /**
  258. * Properties to pass down to the component
  259. */
  260. passProps?: object;
  261. };
  262. /**
  263. * (iOS only) Set the button as an iOS system icon
  264. */
  265. systemItem?: SystemItemIcon;
  266. /**
  267. * Set the button text
  268. */
  269. text?: string;
  270. /**
  271. * Set the button font family
  272. */
  273. fontFamily?: string;
  274. /**
  275. * Set the button enabled or disabled
  276. * @default true
  277. */
  278. enabled?: boolean;
  279. /**
  280. * Disable icon tinting
  281. */
  282. disableIconTint?: boolean;
  283. /**
  284. * Set text color
  285. */
  286. color?: Color;
  287. /**
  288. * Set text color in disabled state
  289. */
  290. disabledColor?: Color;
  291. /**
  292. * Set testID for reference in E2E tests
  293. */
  294. testID?: string;
  295. }
  296. export interface OptionsTopBar {
  297. /**
  298. * Show or hide the top bar
  299. */
  300. visible?: boolean;
  301. /**
  302. * Controls whether TopBar visibility changes should be animated
  303. */
  304. animate?: boolean;
  305. /**
  306. * Top bar will hide and show based on users scroll direction
  307. */
  308. hideOnScroll?: boolean;
  309. /**
  310. * Change button colors in the top bar
  311. */
  312. buttonColor?: Color;
  313. /**
  314. * Draw behind the navbar
  315. */
  316. drawBehind?: boolean;
  317. /**
  318. * Can be used to reference the top bar in E2E tests
  319. */
  320. testID?: string;
  321. /**
  322. * Title configuration
  323. */
  324. title?: OptionsTopBarTitle;
  325. /**
  326. * Subtitle configuration
  327. */
  328. subtitle?: OptionsTopBarSubtitle;
  329. /**
  330. * Back button configuration
  331. */
  332. backButton?: OptionsTopBarBackButton;
  333. /**
  334. * List of buttons to the left
  335. */
  336. leftButtons?: OptionsTopBarButton[];
  337. /**
  338. * List of buttons to the right
  339. */
  340. rightButtons?: OptionsTopBarButton[];
  341. /**
  342. * Background configuration
  343. */
  344. background?: OptionsTopBarBackground;
  345. /**
  346. * Control the NavBar blur style
  347. * #### (iOS specific)
  348. * @requires translucent: true
  349. * @default 'default'
  350. */
  351. barStyle?: 'default' | 'black';
  352. /**
  353. * Disable the border on bottom of the navbar
  354. * #### (iOS specific)
  355. * @default false
  356. */
  357. noBorder?: boolean;
  358. /**
  359. * Show a UISearchBar in the Top Bar
  360. * #### (iOS 11+ specific)
  361. */
  362. searchBar?: boolean;
  363. /**
  364. * Hides the UISearchBar when scrolling
  365. * #### (iOS 11+ specific)
  366. */
  367. searchBarHiddenWhenScrolling?: boolean;
  368. /**
  369. * The placeholder value in the UISearchBar
  370. * #### (iOS 11+ specific)
  371. */
  372. searchBarPlaceholder?: string;
  373. /**
  374. * Controls Hiding NavBar on focus UISearchBar
  375. * #### (iOS 11+ specific)
  376. */
  377. hideNavBarOnFocusSearchBar?: boolean;
  378. /**
  379. * Control the Large Title configuration
  380. * #### (iOS 11+ specific)
  381. */
  382. largeTitle?: OptionsTopBarLargeTitle;
  383. /**
  384. * Set the height of the navbar in dp
  385. * #### (Android specific)
  386. */
  387. height?: AndroidDensityNumber;
  388. /**
  389. * Change the navbar border color
  390. * #### (Android specific)
  391. */
  392. borderColor?: Color;
  393. /**
  394. * Set the border height of the navbar in dp
  395. * #### (Android specific)
  396. */
  397. borderHeight?: AndroidDensityNumber;
  398. /**
  399. * Set the elevation of the navbar in dp
  400. * #### (Android specific)
  401. */
  402. elevation?: AndroidDensityNumber;
  403. }
  404. export interface OptionsFab {
  405. id: string;
  406. backgroundColor?: Color;
  407. clickColor?: Color;
  408. rippleColor?: Color;
  409. visible?: boolean;
  410. icon?: ImageRequireSource;
  411. iconColor?: Color;
  412. alignHorizontally?: 'left' | 'right';
  413. alignVertically?: 'top' | 'bottom';
  414. hideOnScroll?: boolean;
  415. size?: number;
  416. actions?: OptionsFab[];
  417. }
  418. export interface OptionsBottomTabs {
  419. /**
  420. * Show or hide the bottom tabs
  421. */
  422. visible?: boolean;
  423. /**
  424. * Enable animations when toggling visibility
  425. */
  426. animate?: boolean;
  427. /**
  428. * Switch to another screen within the bottom tabs via index (starting from 0)
  429. */
  430. currentTabIndex?: number;
  431. /**
  432. * Switch to another screen within the bottom tabs via screen name
  433. */
  434. currentTabId?: string;
  435. /**
  436. * Set a testID to reference the bottom tabs
  437. */
  438. testID?: string;
  439. /**
  440. * Draw screen component under the tab bar
  441. */
  442. drawBehind?: boolean;
  443. /**
  444. * Set a background color for the bottom tabs
  445. */
  446. backgroundColor?: Color;
  447. /**
  448. * Set when tabs are attached to hierarchy consequently when the
  449. * RootView's constructor is called.
  450. */
  451. tabsAttachMode?: 'together' | 'afterInitialTab' | 'onSwitchToTab';
  452. /**
  453. * Control the Bottom Tabs blur style
  454. * #### (iOS specific)
  455. * @requires translucent: true
  456. * @default 'default'
  457. */
  458. barStyle?: 'default' | 'black';
  459. /**
  460. * Allows the Bottom Tabs to be translucent (blurred)
  461. * #### (iOS specific)
  462. */
  463. translucent?: boolean;
  464. /**
  465. * Hide the top line of the Tab Bar
  466. * #### (iOS specific)
  467. */
  468. hideShadow?: boolean;
  469. /**
  470. * Control the text display mode below the tab icon
  471. * #### (Android specific)
  472. */
  473. titleDisplayMode?: 'alwaysShow' | 'showWhenActive' | 'alwaysHide';
  474. /**
  475. * Set the elevation of the Bottom Tabs in dp
  476. * #### (Android specific)
  477. */
  478. elevation?: AndroidDensityNumber;
  479. }
  480. export interface OptionsBottomTab {
  481. /**
  482. * Set the text to display below the icon
  483. */
  484. text?: string;
  485. /**
  486. * Set the text in a badge that is overlayed over the component
  487. */
  488. badge?: string;
  489. /**
  490. * Set the background color of the badge that is overlayed over the component
  491. */
  492. badgeColor?: string;
  493. /**
  494. * Set a testID to reference the tab in E2E tests
  495. */
  496. testID?: string;
  497. /**
  498. * Set the tab icon
  499. */
  500. icon?: ImageRequireSource;
  501. /**
  502. * Set the icon tint
  503. */
  504. iconColor?: Color;
  505. /**
  506. * Set the text color
  507. */
  508. textColor?: Color;
  509. /**
  510. * Set the selected icon tint
  511. */
  512. selectedIconColor?: Color;
  513. /**
  514. * Set the selected text color
  515. */
  516. selectedTextColor?: Color;
  517. /**
  518. * Set the text font family
  519. */
  520. fontFamily?: FontFamily;
  521. /**
  522. * Set the text font size
  523. */
  524. fontSize?: number;
  525. /**
  526. * Set the insets of the icon
  527. * #### (iOS specific)
  528. */
  529. iconInsets?: Insets;
  530. /**
  531. * Set selected icon image
  532. * #### (iOS specific)
  533. */
  534. selectedIcon?: ImageRequireSource;
  535. /**
  536. * Set true if you want to disable the icon tinting
  537. * #### (iOS specific)
  538. */
  539. disableIconTint?: boolean;
  540. /**
  541. * Set true if you want to disable the text tinting
  542. * #### (iOS specific)
  543. */
  544. disableSelectedIconTint?: boolean;
  545. /**
  546. * Set the font size for selected tabs
  547. * #### (Android specific)
  548. */
  549. selectedFontSize?: number;
  550. }
  551. export interface SideMenuSide {
  552. /**
  553. * Show or hide the side menu
  554. */
  555. visible?: boolean;
  556. /**
  557. * Enable or disable the side menu
  558. */
  559. enabled?: boolean;
  560. }
  561. export interface OptionsSideMenu {
  562. /**
  563. * Configure the left side menu
  564. */
  565. left?: SideMenuSide;
  566. /**
  567. * Configure the right side menu
  568. */
  569. right?: SideMenuSide;
  570. /**
  571. * Configure how a user is allowed to open a drawer using gestures
  572. * #### (iOS specific)
  573. * @default 'entireScreen'
  574. */
  575. openGestureMode?: 'entireScreen' | 'bezel';
  576. }
  577. export interface OptionsOverlay {
  578. /**
  579. * Capture touches outside of the Component View
  580. */
  581. interceptTouchOutside?: boolean;
  582. }
  583. export interface OptionsPreviewAction {
  584. /**
  585. * Reference ID to get callbacks from
  586. */
  587. id: string;
  588. /**
  589. * Action text
  590. */
  591. title: string;
  592. /**
  593. * Action style
  594. */
  595. style?: 'default' | 'selected' | 'destructive';
  596. /**
  597. * Subactions that will be shown when this action is pressed.
  598. */
  599. actions?: OptionsPreviewAction[];
  600. }
  601. export interface OptionsPreview {
  602. /**
  603. * Pass a react node tag to mark a SourceRect for a specific
  604. * peek and pop preview element.
  605. */
  606. reactTag?: number;
  607. /**
  608. * You can set this property specify the width of the preview.
  609. * If the width is greater than the device width, it will be zoomed in.
  610. */
  611. width?: number;
  612. /**
  613. * Height of the preview
  614. */
  615. height?: 100;
  616. /**
  617. * You can control if the users gesture will result in pushing
  618. * the preview screen into the stack.
  619. */
  620. commit?: boolean;
  621. /**
  622. * List of actions that will appear underneath the preview window.
  623. * They can be nested for sub actions.
  624. */
  625. actions?: OptionsPreviewAction[];
  626. }
  627. export interface OptionsAnimationPropertyConfig {
  628. /**
  629. * Animate from this value, ex. 0
  630. */
  631. from?: number;
  632. /**
  633. * Animate to this value, ex. 1
  634. */
  635. to?: number;
  636. /**
  637. * Animation duration
  638. * @default 300
  639. */
  640. duration?: number;
  641. /**
  642. * Animation delay
  643. * @default 0
  644. */
  645. startDelay?: number;
  646. /**
  647. * Animation interplation
  648. */
  649. interpolation?: 'accelerate' | 'decelerate';
  650. }
  651. export interface OptionsAnimationProperties {
  652. /**
  653. * Animate the element over translateX
  654. */
  655. x?: OptionsAnimationPropertyConfig;
  656. /**
  657. * Animate the element over translateY
  658. */
  659. y?: OptionsAnimationPropertyConfig;
  660. /**
  661. * Animate the element over opacity
  662. */
  663. alpha?: OptionsAnimationPropertyConfig;
  664. /**
  665. * Animate the element over scaleX
  666. */
  667. scaleX?: OptionsAnimationPropertyConfig;
  668. /**
  669. * Animate the element over scaleY
  670. */
  671. scaleY?: OptionsAnimationPropertyConfig;
  672. /**
  673. * Animate the element over rotationX
  674. */
  675. rotationX?: OptionsAnimationPropertyConfig;
  676. /**
  677. * Animate the element over rotationY
  678. */
  679. rotationY?: OptionsAnimationPropertyConfig;
  680. /**
  681. * Animate the element over rotation
  682. */
  683. rotation?: OptionsAnimationPropertyConfig;
  684. /**
  685. * Wait for the root view to render before start animation
  686. */
  687. waitForRender?: boolean;
  688. /**
  689. * Enable or disable the animation
  690. * @default true
  691. */
  692. enabled?: boolean;
  693. }
  694. export interface IconInsets {
  695. /**
  696. * Configure top inset
  697. */
  698. top?: number;
  699. /**
  700. * Configure left inset
  701. */
  702. left?: number;
  703. /**
  704. * Configure bottom inset
  705. */
  706. bottom?: number;
  707. /**
  708. * Configure right inset
  709. */
  710. right?: number;
  711. }
  712. export interface OptionsAnimationPropertiesId extends OptionsAnimationProperties {
  713. /**
  714. * ID of the Top Bar we want to animate
  715. */
  716. id?: string;
  717. }
  718. export interface OptionsAnimationSeparate {
  719. /**
  720. * Wait for the View to render before start animation
  721. * Example:
  722. ```js
  723. animations: {
  724. push: {
  725. waitForRender: true
  726. },
  727. showModal: {
  728. waitForRender: true
  729. },
  730. setRoot: {
  731. waitForRender: true
  732. }
  733. }
  734. }
  735. ```
  736. */
  737. waitForRender?: boolean;
  738. /**
  739. * Configure animations for the top bar
  740. */
  741. topBar?: OptionsAnimationPropertiesId;
  742. /**
  743. * Configure animations for the bottom tabs
  744. */
  745. bottomTabs?: OptionsAnimationPropertiesId;
  746. /**
  747. * Configure animations for the content (Screen)
  748. */
  749. content?: OptionsAnimationPropertiesId;
  750. }
  751. export interface OptionsAnimations {
  752. /**
  753. * Configure the setRoot animation
  754. */
  755. setRoot?: OptionsAnimationProperties;
  756. /**
  757. * Configure what animates when a screen is pushed
  758. */
  759. push?: OptionsAnimationSeparate;
  760. /**
  761. * Configure what animates when a screen is popped
  762. */
  763. pop?: OptionsAnimationSeparate;
  764. /**
  765. * Configure what animates when modal is shown
  766. */
  767. showModal?: OptionsAnimationProperties;
  768. /**
  769. * Configure what animates when modal is dismissed
  770. */
  771. dismissModal?: OptionsAnimationProperties;
  772. }
  773. export interface OptionsCustomTransition {
  774. animations: OptionsCustomTransitionAnimation[];
  775. duration?: number;
  776. }
  777. export interface OptionsCustomTransitionAnimation {
  778. /**
  779. * Animation type, only support sharedElement currently
  780. */
  781. type: 'sharedElement';
  782. /**
  783. * Transition from element Id
  784. */
  785. fromId: string;
  786. /**
  787. * Transition to element Id
  788. */
  789. toId: string;
  790. /**
  791. * Animation delay
  792. */
  793. startDelay?: number;
  794. /**
  795. * Animation spring Velocity
  796. */
  797. springVelocity?: number;
  798. /**
  799. * Animation duration
  800. */
  801. duration?: number;
  802. }
  803. export interface Options {
  804. /**
  805. * Configure the status bar
  806. */
  807. statusBar?: OptionsStatusBar;
  808. /**
  809. * Configure the layout
  810. */
  811. layout?: OptionsLayout;
  812. /**
  813. * Configure the presentation style of the modal
  814. */
  815. modalPresentationStyle?: OptionsModalPresentationStyle;
  816. /**
  817. * Configure the transition style of the modal
  818. *
  819. * #### (Android specific)
  820. */
  821. modalTransitionStyle?: OptionsModalTransitionStyle;
  822. /**
  823. * Configure the top bar
  824. */
  825. topBar?: OptionsTopBar;
  826. fab?: OptionsFab;
  827. /**
  828. * Configure the bottom tabs
  829. */
  830. bottomTabs?: OptionsBottomTabs;
  831. /**
  832. * Configure the bottom tab associated to the screen
  833. */
  834. bottomTab?: OptionsBottomTab;
  835. /**
  836. * Configure the side menu
  837. */
  838. sideMenu?: OptionsSideMenu;
  839. /**
  840. * Configure the splitView controller
  841. */
  842. splitView?: OptionsSplitView;
  843. /**
  844. * Configure the overlay
  845. */
  846. overlay?: OptionsOverlay;
  847. /**
  848. * Animation used for navigation commands that modify the layout
  849. * hierarchy can be controlled in options.
  850. *
  851. * Animations can be modified per command and it's also possible
  852. * to change the default animation for each command.
  853. *
  854. * Example:
  855. ```js
  856. setRoot: {
  857. y: {
  858. from: 1000,
  859. to: 0,
  860. duration: 500,
  861. interpolation: 'accelerate',
  862. },
  863. alpha: {
  864. from: 0,
  865. to: 1,
  866. duration: 400,
  867. startDelay: 100,
  868. interpolation: 'accelerate'
  869. }
  870. }
  871. ```
  872. */
  873. animations?: OptionsAnimations;
  874. /**
  875. * Custom Transition used for animate shared element between two screens
  876. * Example:
  877. ```js
  878. Navigation.push(this.props.componentId, {
  879. component: {
  880. name: 'second.screen',
  881. options: {
  882. customTransition: {
  883. animations: [
  884. { type: 'sharedElement', fromId: 'image1', toId: 'image2', startDelay: 0, springVelocity: 0.2, duration: 0.5 }
  885. ],
  886. duration: 0.8
  887. }
  888. }
  889. }
  890. });
  891. ```
  892. */
  893. customTransition?: OptionsCustomTransition;
  894. /**
  895. * Preview configuration for Peek and Pop
  896. * #### (iOS specific)
  897. */
  898. preview?: OptionsPreview;
  899. /**
  900. * Enable or disable swipe back to pop gesture
  901. * #### (iOS specific)
  902. * @default true
  903. */
  904. popGesture?: boolean;
  905. /**
  906. * Background image for the screen
  907. * #### (iOS specific)
  908. */
  909. backgroundImage?: ImageRequireSource;
  910. /**
  911. * Background image for the Navigation View
  912. * #### (iOS specific)
  913. */
  914. rootBackgroundImage?: ImageRequireSource;
  915. /**
  916. * Enable or disable automatically blurring focused input, dismissing keyboard on unmount
  917. * #### (Android specific)
  918. * @default false
  919. */
  920. blurOnUnmount?: boolean;
  921. }