@apexnative/navigation 1.0.0-alpha.3 → 1.0.0-alpha.4

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 (193) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/android/CLAUDE.md +17 -7
  3. package/android/CORE.md +8 -3
  4. package/android/RECIPES.md +9 -3
  5. package/android/src/main/java/dev/apexnative/navigation/NavigationApplication.kt +34 -13
  6. package/android/src/main/java/dev/apexnative/navigation/layout/LayoutChecks.kt +5 -1
  7. package/android/src/main/java/dev/apexnative/navigation/layout/LayoutNode.kt +6 -2
  8. package/android/src/main/java/dev/apexnative/navigation/nativescreen/NativeScreenContext.kt +2 -2
  9. package/android/src/main/java/dev/apexnative/navigation/options/ButtonMenuOptions.kt +2 -2
  10. package/android/src/main/java/dev/apexnative/navigation/options/ButtonOptions.kt +2 -2
  11. package/android/src/main/java/dev/apexnative/navigation/options/OptionsCache.kt +8 -4
  12. package/android/src/main/java/dev/apexnative/navigation/options/UserChoices.kt +159 -0
  13. package/android/src/main/java/dev/apexnative/navigation/react/CommandAnswer.kt +2 -24
  14. package/android/src/main/java/dev/apexnative/navigation/react/CommandContract.kt +59 -0
  15. package/android/src/main/java/dev/apexnative/navigation/react/Hinge.kt +27 -19
  16. package/android/src/main/java/dev/apexnative/navigation/react/NavigationTurboModule.kt +5 -4
  17. package/android/src/main/java/dev/apexnative/navigation/react/PendingCalls.kt +48 -0
  18. package/android/src/main/java/dev/apexnative/navigation/react/events/AppearanceDispatcher.kt +17 -7
  19. package/android/src/main/java/dev/apexnative/navigation/slots/SlotContainers.kt +10 -7
  20. package/android/src/main/java/dev/apexnative/navigation/slots/SlotView.kt +4 -3
  21. package/android/src/main/java/dev/apexnative/navigation/slots/SlotViews.kt +40 -0
  22. package/android/src/main/java/dev/apexnative/navigation/utils/ImageKey.kt +66 -0
  23. package/android/src/main/java/dev/apexnative/navigation/utils/ImageLoader.kt +7 -89
  24. package/android/src/main/java/dev/apexnative/navigation/utils/ImageRequests.kt +76 -0
  25. package/android/src/main/java/dev/apexnative/navigation/utils/OptionImages.kt +262 -0
  26. package/android/src/main/java/dev/apexnative/navigation/utils/ViewController.kt +3 -1
  27. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/bottomtabs/AppliedTabCalls.kt +49 -0
  28. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/bottomtabs/BottomTabsController.kt +16 -6
  29. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/bottomtabs/BottomTabsPresenter.kt +25 -24
  30. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/component/ContentReadiness.kt +1 -1
  31. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/component/RenderWait.kt +27 -7
  32. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/modal/ModalCoordinator.kt +5 -5
  33. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/navigator/Navigator.kt +4 -3
  34. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/navigator/RootCoordinator.kt +6 -3
  35. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/overlay/OverlayCoordinator.kt +8 -8
  36. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/parent/Capabilities.kt +11 -4
  37. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/sidemenu/SideMenuController.kt +1 -1
  38. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/splitview/SplitPanes.kt +23 -0
  39. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/splitview/SplitViewController.kt +58 -15
  40. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/StackCommands.kt +28 -18
  41. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/StackController.kt +16 -7
  42. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/StackDisplay.kt +2 -1
  43. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/StackQueue.kt +85 -29
  44. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/StackViews.kt +2 -2
  45. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/fab/FabPresenter.kt +7 -5
  46. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/search/StackSearchPresenter.kt +3 -3
  47. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/topbar/MenuChecks.kt +13 -56
  48. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/topbar/TopBarPresenter.kt +10 -2
  49. package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/viewcontroller/ViewController.kt +56 -21
  50. package/android/src/main/java/dev/apexnative/navigation/views/bottomtabs/BottomTabs.kt +4 -2
  51. package/android/src/main/java/dev/apexnative/navigation/views/stack/fab/Fab.kt +14 -10
  52. package/cli/doctor/checks/app.js +61 -13
  53. package/cli/migrate/native.js +18 -0
  54. package/cli/setup/source.js +2 -1
  55. package/cli/setup/steps/mainApplication.js +134 -19
  56. package/docs-md/architecture/transitions.md +6 -7
  57. package/docs-md/help/glossary.md +1 -1
  58. package/docs-md/help/troubleshooting.md +20 -3
  59. package/docs-md/index.json +4 -0
  60. package/docs-md/migration/from-react-native-navigation.md +8 -2
  61. package/docs-md/screen-ui/back-and-gestures.md +2 -2
  62. package/docs-md/start/installation.md +3 -1
  63. package/ios/CLAUDE.md +17 -5
  64. package/ios/CORE.md +13 -8
  65. package/ios/Contract/ANNCommandAnswer.mm +5 -20
  66. package/ios/Contract/ANNCommandContract.h +15 -0
  67. package/ios/Contract/ANNCommandContract.mm +78 -0
  68. package/ios/Core/ANNAppearanceDispatcher.mm +1 -1
  69. package/ios/Core/ANNErrorHandler.h +1 -1
  70. package/ios/Core/ANNErrorHandler.mm +3 -1
  71. package/ios/Core/ANNEventEmitter.h +1 -1
  72. package/ios/Core/ANNEventEmitter.mm +2 -2
  73. package/ios/Core/ANNJavaScriptCalls.h +34 -0
  74. package/ios/Core/ANNJavaScriptCalls.mm +61 -0
  75. package/ios/Core/ANNNavigationState.h +7 -3
  76. package/ios/Core/ANNNavigationState.mm +10 -5
  77. package/ios/Core/ANNNodeHelper.h +32 -12
  78. package/ios/Core/ANNNodeHelper.mm +100 -3
  79. package/ios/Core/ANNRenderWait.h +15 -1
  80. package/ios/Core/ANNRenderWait.mm +119 -17
  81. package/ios/Core/UIViewController+LayoutProtocol.h +9 -2
  82. package/ios/Core/UIViewController+LayoutProtocol.mm +8 -0
  83. package/ios/Layouts/Modal/ANNModalCoordinator.h +1 -1
  84. package/ios/Layouts/Modal/ANNModalCoordinator.mm +55 -14
  85. package/ios/Layouts/Screen/ANNComponentViewController.h +8 -0
  86. package/ios/Layouts/Screen/ANNComponentViewController.mm +32 -5
  87. package/ios/Layouts/Screen/ANNScreenPlace.h +41 -0
  88. package/ios/Layouts/Screen/ANNScreenPlace.mm +175 -0
  89. package/ios/Layouts/SplitView/ANNSplitViewCommands.h +3 -2
  90. package/ios/Layouts/SplitView/ANNSplitViewCommands.mm +105 -39
  91. package/ios/Layouts/SplitView/ANNSplitViewController.mm +4 -2
  92. package/ios/Layouts/Stack/ANNStackCommands.mm +1 -0
  93. package/ios/Layouts/Stack/ANNStackController.mm +26 -3
  94. package/ios/Layouts/Stack/ANNStackQueue.h +3 -1
  95. package/ios/Layouts/Stack/ANNStackQueue.mm +56 -43
  96. package/ios/Layouts/Stack/UINavigationController+ANNCommands.h +4 -2
  97. package/ios/Layouts/Stack/UINavigationController+ANNCommands.mm +2 -3
  98. package/ios/Layouts/Tabs/ANNBottomTabItemBuilder.h +4 -0
  99. package/ios/Layouts/Tabs/ANNBottomTabItemBuilder.mm +11 -0
  100. package/ios/Layouts/Tabs/ANNBottomTabsController.mm +13 -5
  101. package/ios/Layouts/Tabs/ANNBottomTabsPresenter.h +2 -2
  102. package/ios/Layouts/Tabs/ANNBottomTabsPresenter.mm +109 -7
  103. package/ios/Options/ANNOptionsCache.h +7 -6
  104. package/ios/Options/ANNSearchBarOptions.h +4 -3
  105. package/ios/Options/ANNUserChoice.h +57 -0
  106. package/ios/Options/ANNUserChoice.mm +44 -0
  107. package/ios/Options/Params/ANNImageSource.h +61 -0
  108. package/ios/Options/Params/ANNImageSource.mm +101 -0
  109. package/ios/Options/Params/ANNOptionImages.h +37 -0
  110. package/ios/Options/Params/ANNOptionImages.mm +284 -0
  111. package/ios/Options/Params/Image.h +11 -2
  112. package/ios/Options/Params/Image.mm +15 -2
  113. package/ios/Options/Params/ImageParser.h +5 -5
  114. package/ios/Options/Params/ImageParser.mm +28 -46
  115. package/ios/Public/ApexNavigation/ApexNavigation.h +1 -1
  116. package/ios/RECIPES.md +11 -5
  117. package/ios/React/Slots/ANNSlotComponentView.mm +24 -17
  118. package/ios/React/Slots/ANNSlotContainers.h +14 -6
  119. package/ios/React/Slots/ANNSlotContainers.mm +75 -2
  120. package/ios/TopBar/ANNBarButtons.h +9 -5
  121. package/ios/TopBar/ANNBarButtons.mm +211 -63
  122. package/ios/TopBar/ANNIconButtonImage.h +1 -0
  123. package/ios/TopBar/ANNIconButtonImage.mm +34 -1
  124. package/ios/TopBar/ANNLargeTitlePresenter.h +13 -0
  125. package/ios/TopBar/ANNLargeTitlePresenter.mm +26 -3
  126. package/ios/TopBar/ANNSearchPresenter.mm +170 -19
  127. package/ios/TopBar/ANNTopBarPresenter.h +5 -0
  128. package/ios/TopBar/ANNTopBarPresenter.mm +60 -11
  129. package/ios/TurboModules/ANNTurboModule.mm +39 -21
  130. package/lib/module/ARCHITECTURE.md +18 -18
  131. package/lib/module/adapters/NativeANNTurboModule.js.map +1 -1
  132. package/lib/module/api/navigation.js.map +1 -1
  133. package/lib/module/engine/commands.js +9 -7
  134. package/lib/module/engine/commands.js.map +1 -1
  135. package/lib/module/engine/layout.js +13 -9
  136. package/lib/module/engine/layout.js.map +1 -1
  137. package/lib/module/engine/options.js +44 -11
  138. package/lib/module/engine/options.js.map +1 -1
  139. package/lib/module/engine/places.js +44 -7
  140. package/lib/module/engine/places.js.map +1 -1
  141. package/lib/module/engine/props.js +30 -1
  142. package/lib/module/engine/props.js.map +1 -1
  143. package/lib/module/engine/rememberedOptions.js +1 -1
  144. package/lib/module/engine/rememberedOptions.js.map +1 -1
  145. package/lib/module/engine/screens.js +22 -12
  146. package/lib/module/engine/screens.js.map +1 -1
  147. package/lib/module/interfaces/contract/commands.json +101 -0
  148. package/lib/typescript/adapters/NativeANNTurboModule.d.ts +5 -2
  149. package/lib/typescript/adapters/NativeANNTurboModule.d.ts.map +1 -1
  150. package/lib/typescript/api/events/navigationEvents.d.ts +1 -1
  151. package/lib/typescript/api/events/navigationEvents.d.ts.map +1 -1
  152. package/lib/typescript/api/hooks/useNavigation.d.ts +1 -1
  153. package/lib/typescript/api/hooks/useNavigation.d.ts.map +1 -1
  154. package/lib/typescript/api/navigation.d.ts +4 -1
  155. package/lib/typescript/api/navigation.d.ts.map +1 -1
  156. package/lib/typescript/engine/commands.d.ts.map +1 -1
  157. package/lib/typescript/engine/options.d.ts +5 -2
  158. package/lib/typescript/engine/options.d.ts.map +1 -1
  159. package/lib/typescript/engine/places.d.ts +5 -2
  160. package/lib/typescript/engine/places.d.ts.map +1 -1
  161. package/lib/typescript/engine/props.d.ts +8 -1
  162. package/lib/typescript/engine/props.d.ts.map +1 -1
  163. package/lib/typescript/engine/rememberedOptions.d.ts.map +1 -1
  164. package/lib/typescript/engine/screens.d.ts.map +1 -1
  165. package/lib/typescript/interfaces/ComponentEvents.d.ts +2 -2
  166. package/lib/typescript/interfaces/ComponentEvents.d.ts.map +1 -1
  167. package/lib/typescript/interfaces/Events.d.ts +19 -10
  168. package/lib/typescript/interfaces/Events.d.ts.map +1 -1
  169. package/lib/typescript/interfaces/options/animations.d.ts +5 -2
  170. package/lib/typescript/interfaces/options/animations.d.ts.map +1 -1
  171. package/lib/typescript/interfaces/options/buttons.d.ts +13 -5
  172. package/lib/typescript/interfaces/options/buttons.d.ts.map +1 -1
  173. package/lib/typescript/interfaces/options/topBar.d.ts +22 -9
  174. package/lib/typescript/interfaces/options/topBar.d.ts.map +1 -1
  175. package/package.json +1 -1
  176. package/src/ARCHITECTURE.md +18 -18
  177. package/src/adapters/NativeANNTurboModule.ts +5 -2
  178. package/src/api/events/navigationEvents.ts +1 -1
  179. package/src/api/hooks/useNavigation.ts +1 -1
  180. package/src/api/navigation.ts +4 -1
  181. package/src/engine/commands.ts +19 -7
  182. package/src/engine/layout.ts +16 -9
  183. package/src/engine/options.ts +39 -11
  184. package/src/engine/places.ts +56 -7
  185. package/src/engine/props.ts +30 -1
  186. package/src/engine/rememberedOptions.ts +4 -1
  187. package/src/engine/screens.tsx +23 -13
  188. package/src/interfaces/ComponentEvents.ts +2 -2
  189. package/src/interfaces/Events.ts +19 -10
  190. package/src/interfaces/contract/commands.json +101 -0
  191. package/src/interfaces/options/animations.ts +5 -2
  192. package/src/interfaces/options/buttons.ts +13 -5
  193. package/src/interfaces/options/topBar.ts +22 -9
@@ -0,0 +1,101 @@
1
+ {
2
+ "description": "Every command with a promise (an async method of src/adapters/NativeANNTurboModule.ts): what it resolves with, whether the navigation state goes before its answer (`state`), and whether `ANN.CommandCompleted` follows the answer (`completed`). scripts/contract.mjs makes ios/Contract/ANNCommandContract.{h,mm} and android/.../react/CommandContract.kt from it, and fails when a command of the spec is missing here or a command here is not in the spec.",
3
+ "commands": [
4
+ {
5
+ "name": "setRoot",
6
+ "resolves": "the id of the root, once the root and the layout's modals and overlays show",
7
+ "state": true,
8
+ "completed": true
9
+ },
10
+ {
11
+ "name": "push",
12
+ "resolves": "the id of the screen that shows; of a pair, the pair's id",
13
+ "state": true,
14
+ "completed": true
15
+ },
16
+ {
17
+ "name": "preparePush",
18
+ "resolves": "the frame `{ width, height, padding }` of the prepared screen, or null; always null on iOS",
19
+ "state": false,
20
+ "completed": false
21
+ },
22
+ {
23
+ "name": "pop",
24
+ "resolves": "the id of the screen that went",
25
+ "state": true,
26
+ "completed": true
27
+ },
28
+ {
29
+ "name": "popTo",
30
+ "resolves": "the id of the screen it went back to",
31
+ "state": true,
32
+ "completed": true
33
+ },
34
+ {
35
+ "name": "popToRoot",
36
+ "resolves": "the id of the first screen of the stack",
37
+ "state": true,
38
+ "completed": true
39
+ },
40
+ {
41
+ "name": "setStackRoot",
42
+ "resolves": "the id of the new top screen",
43
+ "state": true,
44
+ "completed": true
45
+ },
46
+ {
47
+ "name": "showModal",
48
+ "resolves": "the id of the modal's root",
49
+ "state": true,
50
+ "completed": true
51
+ },
52
+ {
53
+ "name": "dismissModal",
54
+ "resolves": "the id of the modal's root",
55
+ "state": true,
56
+ "completed": true
57
+ },
58
+ {
59
+ "name": "dismissAllModals",
60
+ "resolves": "an empty string",
61
+ "state": true,
62
+ "completed": true
63
+ },
64
+ {
65
+ "name": "showOverlay",
66
+ "resolves": "the id of the overlay's root",
67
+ "state": true,
68
+ "completed": true
69
+ },
70
+ {
71
+ "name": "dismissOverlay",
72
+ "resolves": "the id of the overlay's root",
73
+ "state": true,
74
+ "completed": true
75
+ },
76
+ {
77
+ "name": "dismissAllOverlays",
78
+ "resolves": "an empty string",
79
+ "state": true,
80
+ "completed": true
81
+ },
82
+ {
83
+ "name": "showInColumn",
84
+ "resolves": "the id of the screen that shows",
85
+ "state": true,
86
+ "completed": true
87
+ },
88
+ {
89
+ "name": "setColumnShown",
90
+ "resolves": "nothing once the columns stopped moving (`undefined` on iOS, `null` on Android)",
91
+ "state": true,
92
+ "completed": false
93
+ },
94
+ {
95
+ "name": "getLaunchLink",
96
+ "resolves": "the link that launched the app, or null",
97
+ "state": false,
98
+ "completed": false
99
+ }
100
+ ]
101
+ }
@@ -354,8 +354,11 @@ export interface StackAnimationOptions {
354
354
  enabled?: boolean;
355
355
  /**
356
356
  * Whether to wait for the new top screen to be drawn before the transition. Without it, the transition waits for the
357
- * content of a screen with an animation of its own for half a second at most, `true` waits as long as it takes,
358
- * `false` starts at once, also with an animation of its own.
357
+ * first mount of the new top's content, half a second at most, with the platform's transition as with an animation
358
+ * of its own; on a push the options the screen sets as it renders for the first time (`useScreenOptions`, such as
359
+ * its title) are in its bar from the first frame. `true` waits as long as it takes, `false` starts at once, the
360
+ * content drawing as it comes ((Android) a push with `appProvider` still renders the screen first). (iOS) The
361
+ * components of the bar are waited for too, each to its own limit.
359
362
  */
360
363
  waitForRender?: boolean;
361
364
  /**
@@ -138,8 +138,10 @@ export type OptionsTopBarButtonMenuElement =
138
138
  /**
139
139
  * A menu of the top bar: the menu of a button, the overflow menu, the menu of the title. A list of `items` sent with
140
140
  * `mergeOptions` replaces the earlier list as a whole, and `items: []` removes the menu; `title` and
141
- * `singleSelection` merge field by field (iOS). What the user picks in a `singleSelection` menu is written back into
142
- * the options of the screen and survives the screen showing again.
141
+ * `singleSelection` merge field by field (iOS). What the user picks in a `singleSelection` menu stays with the screen,
142
+ * through it showing again, a `mergeOptions` that sends the same items again and `setDefaultOptions`; a `mergeOptions`
143
+ * into the screen that changes the checks of that menu's level, or takes the item away, replaces it. A merge into the
144
+ * stack or the tabs around the screen doesn't.
143
145
  */
144
146
  export interface OptionsTopBarButtonMenu {
145
147
  /** The title above the items. (iOS) Android doesn't show it. */
@@ -285,8 +287,10 @@ export interface OptionsTopBarButton {
285
287
  badgeTextColor?: Color;
286
288
  /**
287
289
  * (iOS) Whether the button is a toggle: every press flips `selected` and sends a press with the new state. The state
288
- * is written into the options of the screen under the button's id, so it survives the screen showing again, and a
289
- * button set again without `selected` takes the state of the button with the same id. Not for component buttons,
290
+ * stays with the screen under the button's id, through it showing again, a `mergeOptions` that sends the same
291
+ * buttons again and `setDefaultOptions`; a `mergeOptions` into the screen that changes `selected` replaces it (a merge
292
+ * into the stack around it doesn't). A button set again
293
+ * without `selected` takes the state of the button with the same id. Not for component buttons,
290
294
  * buttons with `iconBackground`, and `showText` buttons.
291
295
  */
292
296
  toggle?: boolean;
@@ -351,7 +355,11 @@ export interface OptionsTopBarButton {
351
355
  * replaces it.
352
356
  */
353
357
  export interface OptionsTopBarButtonComponent {
354
- /** The id of the component. Without it, the library gives one. The same `name` and `id` mean the same component. */
358
+ /**
359
+ * The id of the component. Without it, the library gives one made of the screen, the component's place in the
360
+ * options and its `name`: it stays the same for every `mergeOptions` of the screen, so the mounted component stays
361
+ * and only its props change. The same `name` and `id` mean the same component.
362
+ */
355
363
  id?: string;
356
364
  /** The name of the registered component. */
357
365
  name: string;
@@ -11,7 +11,11 @@ import type { Color, FontFamily, FontStyle, FontWeight, ImageResource } from './
11
11
  * `name` replaces it.
12
12
  */
13
13
  export interface OptionsTopBarTitleComponent {
14
- /** The id of the component. Without it, the library gives one. The same `name` and `id` mean the same component. */
14
+ /**
15
+ * The id of the component. Without it, the library gives one made of the screen, the component's place in the
16
+ * options and its `name`: it stays the same for every `mergeOptions` of the screen, so the mounted component stays
17
+ * and only its props change. The same `name` and `id` mean the same component.
18
+ */
15
19
  id?: string;
16
20
  /** The name of the registered component. */
17
21
  name: string;
@@ -276,7 +280,11 @@ export interface OptionsTopBarBackground {
276
280
 
277
281
  /** The React component that is the background of the bar. */
278
282
  export interface OptionsTopBarBackgroundComponent {
279
- /** The id of the component. Without it, the library gives one. The same `name` and `id` mean the same component. */
283
+ /**
284
+ * The id of the component. Without it, the library gives one made of the screen, the component's place in the
285
+ * options and its `name`: it stays the same for every `mergeOptions` of the screen, so the mounted component stays
286
+ * and only its props change. The same `name` and `id` mean the same component.
287
+ */
280
288
  id?: string;
281
289
  /** The name of the registered component. */
282
290
  name: string;
@@ -432,7 +440,11 @@ export interface OptionsSearchBarSuggestion {
432
440
  * component; a different `id` or `name` replaces the component, and so the search.
433
441
  */
434
442
  export interface OptionsSearchBarResultsComponent {
435
- /** The id of the component. Without it, the library gives one. The same `name` and `id` mean the same component. */
443
+ /**
444
+ * The id of the component. Without it, the library gives one made of the screen, the component's place in the
445
+ * options and its `name`: it stays the same for every `mergeOptions` of the screen, so the mounted component stays
446
+ * and only its props change. The same `name` and `id` mean the same component.
447
+ */
436
448
  id?: string;
437
449
  /** The name of the registered component. */
438
450
  name: string;
@@ -518,8 +530,9 @@ export interface OptionsSearchBar {
518
530
  */
519
531
  scopes?: OptionsSearchBarScope[];
520
532
  /**
521
- * The id of the selected scope; without it, or with an unknown id, the first. The user's pick is written into the
522
- * options of the screen and stays after coming back. `mergeOptions` switches the scope without an event.
533
+ * The id of the selected scope; without it, or with an unknown id, the first. The user's pick stays with the screen,
534
+ * after coming back, through a `mergeOptions` that sends the same value again and `setDefaultOptions`. A
535
+ * `mergeOptions` into the screen with another value switches the scope without an event.
523
536
  */
524
537
  selectedScope?: string;
525
538
  /**
@@ -531,15 +544,15 @@ export interface OptionsSearchBar {
531
544
  scopeBarActivation?: 'automatic' | 'onTextEntry' | 'onSearchActivation';
532
545
  /**
533
546
  * (iOS) Tokens in front of the text of the field. The search events carry the ids of the tokens in the field as
534
- * `tokens`; deleting a token sends a search-updated event, and the deleted tokens (and ones brought back with Undo)
535
- * are written to the options of the screen. Closing the search clears the field and its tokens. An empty list removes
547
+ * `tokens`; deleting a token sends a search-updated event, and what the user deleted (or brought back with Undo)
548
+ * stays with the screen until a `mergeOptions` gives other tokens. Closing the search clears the field and its tokens. An empty list removes
536
549
  * them all.
537
550
  */
538
551
  tokens?: OptionsSearchBarToken[];
539
552
  /**
540
553
  * (iOS 16+, Android) The suggestions shown while searching. Picking one sends a suggestion-picked event with its id
541
- * to the screen; the text stays and the list goes. They also go when the user types on, and new ones come with
542
- * `mergeOptions`, usually on a search-updated event. An empty list removes them.
554
+ * to the screen; the text stays and the list goes. They also go when the user types on; the list a `mergeOptions`
555
+ * gives shows again, the same one too, usually on a search-updated event. An empty list removes them.
543
556
  */
544
557
  suggestions?: OptionsSearchBarSuggestion[];
545
558
  /**