one 1.2.69 → 1.2.71

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 (292) hide show
  1. package/dist/cjs/__mocks__/@react-navigation/native-stack.cjs +29 -0
  2. package/dist/cjs/__mocks__/@react-navigation/native-stack.js +24 -0
  3. package/dist/cjs/__mocks__/@react-navigation/native-stack.js.map +6 -0
  4. package/dist/cjs/__mocks__/@react-navigation/native-stack.native.js +38 -0
  5. package/dist/cjs/__mocks__/@react-navigation/native-stack.native.js.map +1 -0
  6. package/dist/cjs/__mocks__/@react-navigation/native.js +45 -0
  7. package/dist/cjs/__mocks__/@react-navigation/native.js.map +1 -0
  8. package/dist/cjs/__mocks__/expo-linking.cjs +36 -0
  9. package/dist/cjs/__mocks__/expo-linking.js +25 -0
  10. package/dist/cjs/__mocks__/expo-linking.js.map +6 -0
  11. package/dist/cjs/__mocks__/expo-linking.native.js +47 -0
  12. package/dist/cjs/__mocks__/expo-linking.native.js.map +1 -0
  13. package/dist/cjs/__mocks__/expo-modules-core.cjs +36 -0
  14. package/dist/cjs/__mocks__/expo-modules-core.js +31 -0
  15. package/dist/cjs/__mocks__/expo-modules-core.js.map +6 -0
  16. package/dist/cjs/__mocks__/expo-modules-core.native.js +67 -0
  17. package/dist/cjs/__mocks__/expo-modules-core.native.js.map +1 -0
  18. package/dist/cjs/__mocks__/react-native-screens.cjs +28 -0
  19. package/dist/cjs/__mocks__/react-native-screens.js +22 -0
  20. package/dist/cjs/__mocks__/react-native-screens.js.map +6 -0
  21. package/dist/cjs/__mocks__/react-native-screens.native.js +31 -0
  22. package/dist/cjs/__mocks__/react-native-screens.native.js.map +1 -0
  23. package/dist/cjs/__mocks__/react-native.js +49 -0
  24. package/dist/cjs/__mocks__/react-native.js.map +1 -0
  25. package/dist/cjs/cli/build.cjs +9 -1
  26. package/dist/cjs/cli/build.js +8 -1
  27. package/dist/cjs/cli/build.js.map +1 -1
  28. package/dist/cjs/cli/build.native.js +13 -1
  29. package/dist/cjs/cli/build.native.js.map +1 -1
  30. package/dist/cjs/fork/NavigationContainer.js.map +1 -1
  31. package/dist/cjs/fork/NavigationContainer.native.js.map +1 -1
  32. package/dist/cjs/index.js.map +1 -1
  33. package/dist/cjs/layouts/Stack.cjs +75 -6
  34. package/dist/cjs/layouts/Stack.js +44 -4
  35. package/dist/cjs/layouts/Stack.js.map +2 -2
  36. package/dist/cjs/layouts/Stack.native.js +81 -6
  37. package/dist/cjs/layouts/Stack.native.js.map +1 -1
  38. package/dist/cjs/layouts/stack-utils/StackHeaderBackButton.cjs +40 -0
  39. package/dist/cjs/layouts/stack-utils/StackHeaderBackButton.js +35 -0
  40. package/dist/cjs/layouts/stack-utils/StackHeaderBackButton.js.map +6 -0
  41. package/dist/cjs/layouts/stack-utils/StackHeaderBackButton.native.js +43 -0
  42. package/dist/cjs/layouts/stack-utils/StackHeaderBackButton.native.js.map +1 -0
  43. package/dist/cjs/layouts/stack-utils/StackHeaderComponent.cjs +90 -0
  44. package/dist/cjs/layouts/stack-utils/StackHeaderComponent.js +68 -0
  45. package/dist/cjs/layouts/stack-utils/StackHeaderComponent.js.map +6 -0
  46. package/dist/cjs/layouts/stack-utils/StackHeaderComponent.native.js +99 -0
  47. package/dist/cjs/layouts/stack-utils/StackHeaderComponent.native.js.map +1 -0
  48. package/dist/cjs/layouts/stack-utils/StackHeaderLeft.cjs +35 -0
  49. package/dist/cjs/layouts/stack-utils/StackHeaderLeft.js +30 -0
  50. package/dist/cjs/layouts/stack-utils/StackHeaderLeft.js.map +6 -0
  51. package/dist/cjs/layouts/stack-utils/StackHeaderLeft.native.js +40 -0
  52. package/dist/cjs/layouts/stack-utils/StackHeaderLeft.native.js.map +1 -0
  53. package/dist/cjs/layouts/stack-utils/StackHeaderRight.cjs +35 -0
  54. package/dist/cjs/layouts/stack-utils/StackHeaderRight.js +30 -0
  55. package/dist/cjs/layouts/stack-utils/StackHeaderRight.js.map +6 -0
  56. package/dist/cjs/layouts/stack-utils/StackHeaderRight.native.js +40 -0
  57. package/dist/cjs/layouts/stack-utils/StackHeaderRight.native.js.map +1 -0
  58. package/dist/cjs/layouts/stack-utils/StackHeaderSearchBar.cjs +35 -0
  59. package/dist/cjs/layouts/stack-utils/StackHeaderSearchBar.js +30 -0
  60. package/dist/cjs/layouts/stack-utils/StackHeaderSearchBar.js.map +6 -0
  61. package/dist/cjs/layouts/stack-utils/StackHeaderSearchBar.native.js +38 -0
  62. package/dist/cjs/layouts/stack-utils/StackHeaderSearchBar.native.js.map +1 -0
  63. package/dist/cjs/layouts/stack-utils/StackHeaderTitle.cjs +65 -0
  64. package/dist/cjs/layouts/stack-utils/StackHeaderTitle.js +52 -0
  65. package/dist/cjs/layouts/stack-utils/StackHeaderTitle.js.map +6 -0
  66. package/dist/cjs/layouts/stack-utils/StackHeaderTitle.native.js +68 -0
  67. package/dist/cjs/layouts/stack-utils/StackHeaderTitle.native.js.map +1 -0
  68. package/dist/cjs/layouts/stack-utils/StackScreen.cjs +57 -0
  69. package/dist/cjs/layouts/stack-utils/StackScreen.js +43 -0
  70. package/dist/cjs/layouts/stack-utils/StackScreen.js.map +6 -0
  71. package/dist/cjs/layouts/stack-utils/StackScreen.native.js +64 -0
  72. package/dist/cjs/layouts/stack-utils/StackScreen.native.js.map +1 -0
  73. package/dist/cjs/layouts/stack-utils/__tests__/composition.test.cjs +455 -0
  74. package/dist/cjs/layouts/stack-utils/__tests__/composition.test.js +406 -0
  75. package/dist/cjs/layouts/stack-utils/__tests__/composition.test.js.map +6 -0
  76. package/dist/cjs/layouts/stack-utils/__tests__/composition.test.native.js +480 -0
  77. package/dist/cjs/layouts/stack-utils/__tests__/composition.test.native.js.map +1 -0
  78. package/dist/cjs/layouts/stack-utils/index.cjs +47 -0
  79. package/dist/cjs/layouts/stack-utils/index.js +36 -0
  80. package/dist/cjs/layouts/stack-utils/index.js.map +6 -0
  81. package/dist/cjs/layouts/stack-utils/index.native.js +50 -0
  82. package/dist/cjs/layouts/stack-utils/index.native.js.map +1 -0
  83. package/dist/cjs/layouts/withLayoutContext.cjs +2 -1
  84. package/dist/cjs/layouts/withLayoutContext.js +2 -2
  85. package/dist/cjs/layouts/withLayoutContext.js.map +1 -1
  86. package/dist/cjs/layouts/withLayoutContext.native.js +3 -2
  87. package/dist/cjs/layouts/withLayoutContext.native.js.map +1 -1
  88. package/dist/cjs/useLoader.cjs +4 -2
  89. package/dist/cjs/useLoader.js +4 -2
  90. package/dist/cjs/useLoader.js.map +1 -1
  91. package/dist/cjs/useLoader.native.js +4 -2
  92. package/dist/cjs/useLoader.native.js.map +1 -1
  93. package/dist/cjs/utils/children.cjs +46 -0
  94. package/dist/cjs/utils/children.js +47 -0
  95. package/dist/cjs/utils/children.js.map +6 -0
  96. package/dist/cjs/utils/children.native.js +76 -0
  97. package/dist/cjs/utils/children.native.js.map +1 -0
  98. package/dist/cjs/utils/style.cjs +28 -0
  99. package/dist/cjs/utils/style.js +24 -0
  100. package/dist/cjs/utils/style.js.map +6 -0
  101. package/dist/cjs/utils/style.native.js +31 -0
  102. package/dist/cjs/utils/style.native.js.map +1 -0
  103. package/dist/esm/__mocks__/@react-navigation/native-stack.js +8 -0
  104. package/dist/esm/__mocks__/@react-navigation/native-stack.js.map +6 -0
  105. package/dist/esm/__mocks__/@react-navigation/native-stack.mjs +6 -0
  106. package/dist/esm/__mocks__/@react-navigation/native-stack.mjs.map +1 -0
  107. package/dist/esm/__mocks__/@react-navigation/native-stack.native.js +12 -0
  108. package/dist/esm/__mocks__/@react-navigation/native-stack.native.js.map +1 -0
  109. package/dist/esm/__mocks__/@react-navigation/native.js +18 -0
  110. package/dist/esm/__mocks__/@react-navigation/native.js.map +1 -0
  111. package/dist/esm/__mocks__/expo-linking.js +9 -0
  112. package/dist/esm/__mocks__/expo-linking.js.map +6 -0
  113. package/dist/esm/__mocks__/expo-linking.mjs +10 -0
  114. package/dist/esm/__mocks__/expo-linking.mjs.map +1 -0
  115. package/dist/esm/__mocks__/expo-linking.native.js +18 -0
  116. package/dist/esm/__mocks__/expo-linking.native.js.map +1 -0
  117. package/dist/esm/__mocks__/expo-modules-core.js +15 -0
  118. package/dist/esm/__mocks__/expo-modules-core.js.map +6 -0
  119. package/dist/esm/__mocks__/expo-modules-core.mjs +10 -0
  120. package/dist/esm/__mocks__/expo-modules-core.mjs.map +1 -0
  121. package/dist/esm/__mocks__/expo-modules-core.native.js +38 -0
  122. package/dist/esm/__mocks__/expo-modules-core.native.js.map +1 -0
  123. package/dist/esm/__mocks__/react-native-screens.js +6 -0
  124. package/dist/esm/__mocks__/react-native-screens.js.map +6 -0
  125. package/dist/esm/__mocks__/react-native-screens.mjs +4 -0
  126. package/dist/esm/__mocks__/react-native-screens.mjs.map +1 -0
  127. package/dist/esm/__mocks__/react-native-screens.native.js +4 -0
  128. package/dist/esm/__mocks__/react-native-screens.native.js.map +1 -0
  129. package/dist/esm/__mocks__/react-native.js +19 -0
  130. package/dist/esm/__mocks__/react-native.js.map +1 -0
  131. package/dist/esm/cli/build.js +8 -1
  132. package/dist/esm/cli/build.js.map +1 -1
  133. package/dist/esm/cli/build.mjs +9 -1
  134. package/dist/esm/cli/build.mjs.map +1 -1
  135. package/dist/esm/cli/build.native.js +13 -1
  136. package/dist/esm/cli/build.native.js.map +1 -1
  137. package/dist/esm/fork/NavigationContainer.js.map +1 -1
  138. package/dist/esm/fork/NavigationContainer.mjs.map +1 -1
  139. package/dist/esm/fork/NavigationContainer.native.js.map +1 -1
  140. package/dist/esm/index.js.map +1 -1
  141. package/dist/esm/index.mjs.map +1 -1
  142. package/dist/esm/index.native.js.map +1 -1
  143. package/dist/esm/layouts/Stack.js +45 -1
  144. package/dist/esm/layouts/Stack.js.map +1 -1
  145. package/dist/esm/layouts/Stack.mjs +59 -1
  146. package/dist/esm/layouts/Stack.mjs.map +1 -1
  147. package/dist/esm/layouts/Stack.native.js +65 -1
  148. package/dist/esm/layouts/Stack.native.js.map +1 -1
  149. package/dist/esm/layouts/stack-utils/StackHeaderBackButton.js +19 -0
  150. package/dist/esm/layouts/stack-utils/StackHeaderBackButton.js.map +6 -0
  151. package/dist/esm/layouts/stack-utils/StackHeaderBackButton.mjs +16 -0
  152. package/dist/esm/layouts/stack-utils/StackHeaderBackButton.mjs.map +1 -0
  153. package/dist/esm/layouts/stack-utils/StackHeaderBackButton.native.js +16 -0
  154. package/dist/esm/layouts/stack-utils/StackHeaderBackButton.native.js.map +1 -0
  155. package/dist/esm/layouts/stack-utils/StackHeaderComponent.js +71 -0
  156. package/dist/esm/layouts/stack-utils/StackHeaderComponent.js.map +6 -0
  157. package/dist/esm/layouts/stack-utils/StackHeaderComponent.mjs +66 -0
  158. package/dist/esm/layouts/stack-utils/StackHeaderComponent.mjs.map +1 -0
  159. package/dist/esm/layouts/stack-utils/StackHeaderComponent.native.js +72 -0
  160. package/dist/esm/layouts/stack-utils/StackHeaderComponent.native.js.map +1 -0
  161. package/dist/esm/layouts/stack-utils/StackHeaderLeft.js +14 -0
  162. package/dist/esm/layouts/stack-utils/StackHeaderLeft.js.map +6 -0
  163. package/dist/esm/layouts/stack-utils/StackHeaderLeft.mjs +11 -0
  164. package/dist/esm/layouts/stack-utils/StackHeaderLeft.mjs.map +1 -0
  165. package/dist/esm/layouts/stack-utils/StackHeaderLeft.native.js +13 -0
  166. package/dist/esm/layouts/stack-utils/StackHeaderLeft.native.js.map +1 -0
  167. package/dist/esm/layouts/stack-utils/StackHeaderRight.js +14 -0
  168. package/dist/esm/layouts/stack-utils/StackHeaderRight.js.map +6 -0
  169. package/dist/esm/layouts/stack-utils/StackHeaderRight.mjs +11 -0
  170. package/dist/esm/layouts/stack-utils/StackHeaderRight.mjs.map +1 -0
  171. package/dist/esm/layouts/stack-utils/StackHeaderRight.native.js +13 -0
  172. package/dist/esm/layouts/stack-utils/StackHeaderRight.native.js.map +1 -0
  173. package/dist/esm/layouts/stack-utils/StackHeaderSearchBar.js +14 -0
  174. package/dist/esm/layouts/stack-utils/StackHeaderSearchBar.js.map +6 -0
  175. package/dist/esm/layouts/stack-utils/StackHeaderSearchBar.mjs +11 -0
  176. package/dist/esm/layouts/stack-utils/StackHeaderSearchBar.mjs.map +1 -0
  177. package/dist/esm/layouts/stack-utils/StackHeaderSearchBar.native.js +11 -0
  178. package/dist/esm/layouts/stack-utils/StackHeaderSearchBar.native.js.map +1 -0
  179. package/dist/esm/layouts/stack-utils/StackHeaderTitle.js +37 -0
  180. package/dist/esm/layouts/stack-utils/StackHeaderTitle.js.map +6 -0
  181. package/dist/esm/layouts/stack-utils/StackHeaderTitle.mjs +41 -0
  182. package/dist/esm/layouts/stack-utils/StackHeaderTitle.mjs.map +1 -0
  183. package/dist/esm/layouts/stack-utils/StackHeaderTitle.native.js +41 -0
  184. package/dist/esm/layouts/stack-utils/StackHeaderTitle.native.js.map +1 -0
  185. package/dist/esm/layouts/stack-utils/StackScreen.js +33 -0
  186. package/dist/esm/layouts/stack-utils/StackScreen.js.map +6 -0
  187. package/dist/esm/layouts/stack-utils/StackScreen.mjs +33 -0
  188. package/dist/esm/layouts/stack-utils/StackScreen.mjs.map +1 -0
  189. package/dist/esm/layouts/stack-utils/StackScreen.native.js +38 -0
  190. package/dist/esm/layouts/stack-utils/StackScreen.native.js.map +1 -0
  191. package/dist/esm/layouts/stack-utils/__tests__/composition.test.js +431 -0
  192. package/dist/esm/layouts/stack-utils/__tests__/composition.test.js.map +6 -0
  193. package/dist/esm/layouts/stack-utils/__tests__/composition.test.mjs +456 -0
  194. package/dist/esm/layouts/stack-utils/__tests__/composition.test.mjs.map +1 -0
  195. package/dist/esm/layouts/stack-utils/__tests__/composition.test.native.js +478 -0
  196. package/dist/esm/layouts/stack-utils/__tests__/composition.test.native.js.map +1 -0
  197. package/dist/esm/layouts/stack-utils/index.js +33 -0
  198. package/dist/esm/layouts/stack-utils/index.js.map +6 -0
  199. package/dist/esm/layouts/stack-utils/index.mjs +16 -0
  200. package/dist/esm/layouts/stack-utils/index.mjs.map +1 -0
  201. package/dist/esm/layouts/stack-utils/index.native.js +16 -0
  202. package/dist/esm/layouts/stack-utils/index.native.js.map +1 -0
  203. package/dist/esm/layouts/withLayoutContext.js +2 -1
  204. package/dist/esm/layouts/withLayoutContext.js.map +1 -1
  205. package/dist/esm/layouts/withLayoutContext.mjs +2 -1
  206. package/dist/esm/layouts/withLayoutContext.mjs.map +1 -1
  207. package/dist/esm/layouts/withLayoutContext.native.js +2 -1
  208. package/dist/esm/layouts/withLayoutContext.native.js.map +1 -1
  209. package/dist/esm/useLoader.js +4 -2
  210. package/dist/esm/useLoader.js.map +1 -1
  211. package/dist/esm/useLoader.mjs +4 -2
  212. package/dist/esm/useLoader.mjs.map +1 -1
  213. package/dist/esm/useLoader.native.js +4 -2
  214. package/dist/esm/useLoader.native.js.map +1 -1
  215. package/dist/esm/utils/children.js +33 -0
  216. package/dist/esm/utils/children.js.map +6 -0
  217. package/dist/esm/utils/children.mjs +19 -0
  218. package/dist/esm/utils/children.mjs.map +1 -0
  219. package/dist/esm/utils/children.native.js +46 -0
  220. package/dist/esm/utils/children.native.js.map +1 -0
  221. package/dist/esm/utils/style.js +8 -0
  222. package/dist/esm/utils/style.js.map +6 -0
  223. package/dist/esm/utils/style.mjs +5 -0
  224. package/dist/esm/utils/style.mjs.map +1 -0
  225. package/dist/esm/utils/style.native.js +5 -0
  226. package/dist/esm/utils/style.native.js.map +1 -0
  227. package/package.json +9 -9
  228. package/src/__mocks__/@react-navigation/native-stack.ts +32 -0
  229. package/src/__mocks__/@react-navigation/native.ts +21 -0
  230. package/src/__mocks__/expo-linking.ts +6 -0
  231. package/src/__mocks__/expo-modules-core.ts +11 -0
  232. package/src/__mocks__/react-native-screens.ts +17 -0
  233. package/src/__mocks__/react-native.ts +20 -0
  234. package/src/cli/build.ts +27 -2
  235. package/src/fork/NavigationContainer.tsx +2 -0
  236. package/src/index.ts +10 -0
  237. package/src/layouts/Stack.tsx +96 -1
  238. package/src/layouts/stack-utils/README.md +211 -0
  239. package/src/layouts/stack-utils/StackHeaderBackButton.tsx +34 -0
  240. package/src/layouts/stack-utils/StackHeaderComponent.tsx +136 -0
  241. package/src/layouts/stack-utils/StackHeaderLeft.tsx +29 -0
  242. package/src/layouts/stack-utils/StackHeaderRight.tsx +29 -0
  243. package/src/layouts/stack-utils/StackHeaderSearchBar.tsx +21 -0
  244. package/src/layouts/stack-utils/StackHeaderTitle.tsx +79 -0
  245. package/src/layouts/stack-utils/StackScreen.tsx +69 -0
  246. package/src/layouts/stack-utils/__tests__/composition.test.tsx +643 -0
  247. package/src/layouts/stack-utils/index.tsx +45 -0
  248. package/src/layouts/withLayoutContext.tsx +6 -2
  249. package/src/router/router.ts +1 -1
  250. package/src/useLoader.ts +14 -6
  251. package/src/utils/children.ts +74 -0
  252. package/src/utils/style.ts +17 -0
  253. package/types/__mocks__/@react-navigation/native-stack.d.ts +30 -0
  254. package/types/__mocks__/@react-navigation/native-stack.d.ts.map +1 -0
  255. package/types/__mocks__/@react-navigation/native.d.ts +17 -0
  256. package/types/__mocks__/@react-navigation/native.d.ts.map +1 -0
  257. package/types/__mocks__/expo-linking.d.ts +9 -0
  258. package/types/__mocks__/expo-linking.d.ts.map +1 -0
  259. package/types/__mocks__/expo-modules-core.d.ts +11 -0
  260. package/types/__mocks__/expo-modules-core.d.ts.map +1 -0
  261. package/types/__mocks__/react-native-screens.d.ts +14 -0
  262. package/types/__mocks__/react-native-screens.d.ts.map +1 -0
  263. package/types/__mocks__/react-native.d.ts +12 -0
  264. package/types/__mocks__/react-native.d.ts.map +1 -0
  265. package/types/cli/build.d.ts.map +1 -1
  266. package/types/fork/NavigationContainer.d.ts.map +1 -1
  267. package/types/index.d.ts +1 -0
  268. package/types/index.d.ts.map +1 -1
  269. package/types/layouts/Stack.d.ts +14 -3
  270. package/types/layouts/Stack.d.ts.map +1 -1
  271. package/types/layouts/stack-utils/StackHeaderBackButton.d.ts +17 -0
  272. package/types/layouts/stack-utils/StackHeaderBackButton.d.ts.map +1 -0
  273. package/types/layouts/stack-utils/StackHeaderComponent.d.ts +36 -0
  274. package/types/layouts/stack-utils/StackHeaderComponent.d.ts.map +1 -0
  275. package/types/layouts/stack-utils/StackHeaderLeft.d.ts +13 -0
  276. package/types/layouts/stack-utils/StackHeaderLeft.d.ts.map +1 -0
  277. package/types/layouts/stack-utils/StackHeaderRight.d.ts +13 -0
  278. package/types/layouts/stack-utils/StackHeaderRight.d.ts.map +1 -0
  279. package/types/layouts/stack-utils/StackHeaderSearchBar.d.ts +10 -0
  280. package/types/layouts/stack-utils/StackHeaderSearchBar.d.ts.map +1 -0
  281. package/types/layouts/stack-utils/StackHeaderTitle.d.ts +26 -0
  282. package/types/layouts/stack-utils/StackHeaderTitle.d.ts.map +1 -0
  283. package/types/layouts/stack-utils/StackScreen.d.ts +22 -0
  284. package/types/layouts/stack-utils/StackScreen.d.ts.map +1 -0
  285. package/types/layouts/stack-utils/index.d.ts +20 -0
  286. package/types/layouts/stack-utils/index.d.ts.map +1 -0
  287. package/types/layouts/withLayoutContext.d.ts.map +1 -1
  288. package/types/useLoader.d.ts.map +1 -1
  289. package/types/utils/children.d.ts +23 -0
  290. package/types/utils/children.d.ts.map +1 -0
  291. package/types/utils/style.d.ts +7 -0
  292. package/types/utils/style.d.ts.map +1 -0
@@ -0,0 +1,455 @@
1
+ var import_vitest = require("vitest"),
2
+ import_react_native = require("react-native-web"),
3
+ import_StackHeaderTitle = require("../StackHeaderTitle.cjs"),
4
+ import_StackHeaderLeft = require("../StackHeaderLeft.cjs"),
5
+ import_StackHeaderRight = require("../StackHeaderRight.cjs"),
6
+ import_StackHeaderBackButton = require("../StackHeaderBackButton.cjs"),
7
+ import_StackHeaderSearchBar = require("../StackHeaderSearchBar.cjs"),
8
+ import_StackHeaderComponent = require("../StackHeaderComponent.cjs"),
9
+ import_StackScreen = require("../StackScreen.cjs"),
10
+ import__ = require("../index.cjs"),
11
+ import_jsx_runtime = require("react/jsx-runtime");
12
+ (0, import_vitest.describe)("Stack Header Composition", () => {
13
+ (0, import_vitest.describe)("StackHeaderTitle", () => {
14
+ (0, import_vitest.it)("sets title from children", () => {
15
+ const result = (0, import_StackHeaderTitle.appendStackHeaderTitlePropsToOptions)({}, {
16
+ children: "My Title"
17
+ });
18
+ (0, import_vitest.expect)(result.title).toBe("My Title");
19
+ }), (0, import_vitest.it)("sets headerLargeTitle when large is true", () => {
20
+ const result = (0, import_StackHeaderTitle.appendStackHeaderTitlePropsToOptions)({}, {
21
+ large: !0
22
+ });
23
+ (0, import_vitest.expect)(result.headerLargeTitle).toBe(!0);
24
+ }), (0, import_vitest.it)("sets headerTitleAlign from style.textAlign", () => {
25
+ const result = (0, import_StackHeaderTitle.appendStackHeaderTitlePropsToOptions)({}, {
26
+ style: {
27
+ textAlign: "center"
28
+ }
29
+ });
30
+ (0, import_vitest.expect)(result.headerTitleAlign).toBe("center");
31
+ }), (0, import_vitest.it)("converts numeric fontWeight to string", () => {
32
+ const result = (0, import_StackHeaderTitle.appendStackHeaderTitlePropsToOptions)({}, {
33
+ style: {
34
+ fontWeight: "700"
35
+ }
36
+ });
37
+ (0, import_vitest.expect)(result.headerTitleStyle).toMatchObject({
38
+ fontWeight: "700"
39
+ });
40
+ }), (0, import_vitest.it)("preserves existing options", () => {
41
+ const result = (0, import_StackHeaderTitle.appendStackHeaderTitlePropsToOptions)({
42
+ animation: "slide_from_right"
43
+ }, {
44
+ children: "Title"
45
+ });
46
+ (0, import_vitest.expect)(result.animation).toBe("slide_from_right"), (0, import_vitest.expect)(result.title).toBe("Title");
47
+ }), (0, import_vitest.it)("sets headerTransparent only on iOS when large is true", () => {
48
+ const originalOS = import_react_native.Platform.OS;
49
+ import_react_native.Platform.OS = "ios";
50
+ const iosResult = (0, import_StackHeaderTitle.appendStackHeaderTitlePropsToOptions)({}, {
51
+ large: !0
52
+ });
53
+ (0, import_vitest.expect)(iosResult.headerTransparent).toBe(!0), import_react_native.Platform.OS = "android";
54
+ const androidResult = (0, import_StackHeaderTitle.appendStackHeaderTitlePropsToOptions)({}, {
55
+ large: !0
56
+ });
57
+ (0, import_vitest.expect)(androidResult.headerTransparent).toBeUndefined(), import_react_native.Platform.OS = "web";
58
+ const webResult = (0, import_StackHeaderTitle.appendStackHeaderTitlePropsToOptions)({}, {
59
+ large: !0
60
+ });
61
+ (0, import_vitest.expect)(webResult.headerTransparent).toBeUndefined(), import_react_native.Platform.OS = originalOS;
62
+ });
63
+ }), (0, import_vitest.describe)("StackHeaderLeft", () => {
64
+ (0, import_vitest.it)("does not set headerLeft without asChild", () => {
65
+ const result = (0, import_StackHeaderLeft.appendStackHeaderLeftPropsToOptions)({}, {
66
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)("button", {
67
+ children: "Back"
68
+ })
69
+ });
70
+ (0, import_vitest.expect)(result.headerLeft).toBeUndefined();
71
+ }), (0, import_vitest.it)("sets headerLeft with asChild", () => {
72
+ const result = (0, import_StackHeaderLeft.appendStackHeaderLeftPropsToOptions)({}, {
73
+ asChild: !0,
74
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(() => /* @__PURE__ */(0, import_jsx_runtime.jsx)("button", {
75
+ children: "Back"
76
+ }), {})
77
+ });
78
+ (0, import_vitest.expect)(result.headerLeft).toBeDefined(), (0, import_vitest.expect)(typeof result.headerLeft).toBe("function");
79
+ }), (0, import_vitest.it)("sets headerLeft with asChild even without children", () => {
80
+ const result = (0, import_StackHeaderLeft.appendStackHeaderLeftPropsToOptions)({}, {
81
+ asChild: !0
82
+ });
83
+ (0, import_vitest.expect)(result.headerLeft).toBeDefined(), (0, import_vitest.expect)(typeof result.headerLeft).toBe("function");
84
+ }), (0, import_vitest.it)("preserves existing options when setting headerLeft", () => {
85
+ const result = (0, import_StackHeaderLeft.appendStackHeaderLeftPropsToOptions)({
86
+ title: "Existing Title",
87
+ animation: "slide_from_right"
88
+ }, {
89
+ asChild: !0,
90
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)("button", {
91
+ children: "Back"
92
+ })
93
+ });
94
+ (0, import_vitest.expect)(result.title).toBe("Existing Title"), (0, import_vitest.expect)(result.animation).toBe("slide_from_right"), (0, import_vitest.expect)(result.headerLeft).toBeDefined();
95
+ }), (0, import_vitest.it)("headerLeft function returns children when called", () => {
96
+ const headerLeftResult = (0, import_StackHeaderLeft.appendStackHeaderLeftPropsToOptions)({}, {
97
+ asChild: !0,
98
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(() => /* @__PURE__ */(0, import_jsx_runtime.jsx)("button", {
99
+ children: "Back"
100
+ }), {})
101
+ }).headerLeft?.({});
102
+ (0, import_vitest.expect)(headerLeftResult).toBeDefined();
103
+ });
104
+ }), (0, import_vitest.describe)("StackHeaderRight", () => {
105
+ (0, import_vitest.it)("does not set headerRight without asChild", () => {
106
+ const result = (0, import_StackHeaderRight.appendStackHeaderRightPropsToOptions)({}, {
107
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)("button", {
108
+ children: "Action"
109
+ })
110
+ });
111
+ (0, import_vitest.expect)(result.headerRight).toBeUndefined();
112
+ }), (0, import_vitest.it)("sets headerRight with asChild", () => {
113
+ const result = (0, import_StackHeaderRight.appendStackHeaderRightPropsToOptions)({}, {
114
+ asChild: !0,
115
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(() => /* @__PURE__ */(0, import_jsx_runtime.jsx)("button", {
116
+ children: "Action"
117
+ }), {})
118
+ });
119
+ (0, import_vitest.expect)(result.headerRight).toBeDefined(), (0, import_vitest.expect)(typeof result.headerRight).toBe("function");
120
+ }), (0, import_vitest.it)("sets headerRight with asChild even without children", () => {
121
+ const result = (0, import_StackHeaderRight.appendStackHeaderRightPropsToOptions)({}, {
122
+ asChild: !0
123
+ });
124
+ (0, import_vitest.expect)(result.headerRight).toBeDefined(), (0, import_vitest.expect)(typeof result.headerRight).toBe("function");
125
+ }), (0, import_vitest.it)("preserves existing options when setting headerRight", () => {
126
+ const result = (0, import_StackHeaderRight.appendStackHeaderRightPropsToOptions)({
127
+ title: "Existing Title",
128
+ headerLargeTitle: !0
129
+ }, {
130
+ asChild: !0,
131
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)("button", {
132
+ children: "Action"
133
+ })
134
+ });
135
+ (0, import_vitest.expect)(result.title).toBe("Existing Title"), (0, import_vitest.expect)(result.headerLargeTitle).toBe(!0), (0, import_vitest.expect)(result.headerRight).toBeDefined();
136
+ }), (0, import_vitest.it)("headerRight function returns children when called", () => {
137
+ const headerRightResult = (0, import_StackHeaderRight.appendStackHeaderRightPropsToOptions)({}, {
138
+ asChild: !0,
139
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(() => /* @__PURE__ */(0, import_jsx_runtime.jsx)("button", {
140
+ children: "Action"
141
+ }), {})
142
+ }).headerRight?.({});
143
+ (0, import_vitest.expect)(headerRightResult).toBeDefined();
144
+ });
145
+ }), (0, import_vitest.describe)("StackHeaderBackButton", () => {
146
+ (0, import_vitest.it)("sets headerBackTitle from children", () => {
147
+ const result = (0, import_StackHeaderBackButton.appendStackHeaderBackButtonPropsToOptions)({}, {
148
+ children: "Go Back"
149
+ });
150
+ (0, import_vitest.expect)(result.headerBackTitle).toBe("Go Back");
151
+ }), (0, import_vitest.it)("sets headerBackVisible to false when hidden", () => {
152
+ const result = (0, import_StackHeaderBackButton.appendStackHeaderBackButtonPropsToOptions)({}, {
153
+ hidden: !0
154
+ });
155
+ (0, import_vitest.expect)(result.headerBackVisible).toBe(!1);
156
+ }), (0, import_vitest.it)("sets headerBackButtonMenuEnabled", () => {
157
+ const result = (0, import_StackHeaderBackButton.appendStackHeaderBackButtonPropsToOptions)({}, {
158
+ withMenu: !0
159
+ });
160
+ (0, import_vitest.expect)(result.headerBackButtonMenuEnabled).toBe(!0);
161
+ }), (0, import_vitest.it)("sets headerBackButtonDisplayMode", () => {
162
+ const result = (0, import_StackHeaderBackButton.appendStackHeaderBackButtonPropsToOptions)({}, {
163
+ displayMode: "minimal"
164
+ });
165
+ (0, import_vitest.expect)(result.headerBackButtonDisplayMode).toBe("minimal");
166
+ });
167
+ }), (0, import_vitest.describe)("StackHeaderSearchBar", () => {
168
+ (0, import_vitest.it)("sets headerSearchBarOptions with placeholder", () => {
169
+ const result = (0, import_StackHeaderSearchBar.appendStackHeaderSearchBarPropsToOptions)({}, {
170
+ placeholder: "Search..."
171
+ });
172
+ (0, import_vitest.expect)(result.headerSearchBarOptions).toMatchObject({
173
+ placeholder: "Search..."
174
+ });
175
+ }), (0, import_vitest.it)("sets headerSearchBarOptions with autoCapitalize", () => {
176
+ const result = (0, import_StackHeaderSearchBar.appendStackHeaderSearchBarPropsToOptions)({}, {
177
+ autoCapitalize: "none"
178
+ });
179
+ (0, import_vitest.expect)(result.headerSearchBarOptions).toMatchObject({
180
+ autoCapitalize: "none"
181
+ });
182
+ }), (0, import_vitest.it)("sets headerSearchBarOptions with multiple props", () => {
183
+ const result = (0, import_StackHeaderSearchBar.appendStackHeaderSearchBarPropsToOptions)({}, {
184
+ placeholder: "Search articles...",
185
+ autoCapitalize: "words",
186
+ hideWhenScrolling: !0,
187
+ obscureBackground: !1
188
+ });
189
+ (0, import_vitest.expect)(result.headerSearchBarOptions).toMatchObject({
190
+ placeholder: "Search articles...",
191
+ autoCapitalize: "words",
192
+ hideWhenScrolling: !0,
193
+ obscureBackground: !1
194
+ });
195
+ }), (0, import_vitest.it)("preserves existing options when setting search bar", () => {
196
+ const result = (0, import_StackHeaderSearchBar.appendStackHeaderSearchBarPropsToOptions)({
197
+ title: "Articles",
198
+ headerLargeTitle: !0
199
+ }, {
200
+ placeholder: "Search..."
201
+ });
202
+ (0, import_vitest.expect)(result.title).toBe("Articles"), (0, import_vitest.expect)(result.headerLargeTitle).toBe(!0), (0, import_vitest.expect)(result.headerSearchBarOptions).toMatchObject({
203
+ placeholder: "Search..."
204
+ });
205
+ }), (0, import_vitest.it)("sets headerSearchBarOptions with placement prop", () => {
206
+ const result = (0, import_StackHeaderSearchBar.appendStackHeaderSearchBarPropsToOptions)({}, {
207
+ placeholder: "Search...",
208
+ placement: "stacked"
209
+ });
210
+ (0, import_vitest.expect)(result.headerSearchBarOptions).toMatchObject({
211
+ placeholder: "Search...",
212
+ placement: "stacked"
213
+ });
214
+ }), (0, import_vitest.it)("sets empty headerSearchBarOptions when no props", () => {
215
+ const result = (0, import_StackHeaderSearchBar.appendStackHeaderSearchBarPropsToOptions)({}, {});
216
+ (0, import_vitest.expect)(result.headerSearchBarOptions).toBeDefined(), (0, import_vitest.expect)(result.headerSearchBarOptions).toEqual({});
217
+ });
218
+ }), (0, import_vitest.describe)("StackHeaderComponent", () => {
219
+ (0, import_vitest.it)("sets headerShown false when hidden", () => {
220
+ const result = (0, import_StackHeaderComponent.appendStackHeaderPropsToOptions)({}, {
221
+ hidden: !0
222
+ });
223
+ (0, import_vitest.expect)(result.headerShown).toBe(!1);
224
+ }), (0, import_vitest.it)("sets headerBlurEffect", () => {
225
+ const result = (0, import_StackHeaderComponent.appendStackHeaderPropsToOptions)({}, {
226
+ blurEffect: "regular"
227
+ });
228
+ (0, import_vitest.expect)(result.headerBlurEffect).toBe("regular");
229
+ }), (0, import_vitest.it)("sets headerShadowVisible false when shadowColor is transparent", () => {
230
+ const result = (0, import_StackHeaderComponent.appendStackHeaderPropsToOptions)({}, {
231
+ style: {
232
+ shadowColor: "transparent"
233
+ }
234
+ });
235
+ (0, import_vitest.expect)(result.headerShadowVisible).toBe(!1);
236
+ }), (0, import_vitest.it)("sets headerTransparent when backgroundColor is transparent", () => {
237
+ const result = (0, import_StackHeaderComponent.appendStackHeaderPropsToOptions)({}, {
238
+ style: {
239
+ backgroundColor: "transparent"
240
+ }
241
+ });
242
+ (0, import_vitest.expect)(result.headerTransparent).toBe(!0), (0, import_vitest.expect)(result.headerStyle).toMatchObject({
243
+ backgroundColor: "transparent"
244
+ });
245
+ }), (0, import_vitest.it)("sets headerTransparent with SearchBar (user controls via options if needed)", () => {
246
+ const result = (0, import_StackHeaderComponent.appendStackHeaderPropsToOptions)({}, {
247
+ style: {
248
+ backgroundColor: "transparent"
249
+ },
250
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackHeaderSearchBar.StackHeaderSearchBar, {
251
+ placeholder: "Search..."
252
+ })
253
+ });
254
+ (0, import_vitest.expect)(result.headerTransparent).toBe(!0), (0, import_vitest.expect)(result.headerSearchBarOptions).toMatchObject({
255
+ placeholder: "Search..."
256
+ });
257
+ }), (0, import_vitest.it)("processes child Title component", () => {
258
+ const result = (0, import_StackHeaderComponent.appendStackHeaderPropsToOptions)({}, {
259
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackHeaderTitle.StackHeaderTitle, {
260
+ large: !0,
261
+ children: "Test Title"
262
+ })
263
+ });
264
+ (0, import_vitest.expect)(result.title).toBe("Test Title"), (0, import_vitest.expect)(result.headerLargeTitle).toBe(!0);
265
+ }), (0, import_vitest.it)("processes child BackButton component", () => {
266
+ const result = (0, import_StackHeaderComponent.appendStackHeaderPropsToOptions)({}, {
267
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackHeaderBackButton.StackHeaderBackButton, {
268
+ hidden: !0,
269
+ children: "Back"
270
+ })
271
+ });
272
+ (0, import_vitest.expect)(result.headerBackTitle).toBe("Back"), (0, import_vitest.expect)(result.headerBackVisible).toBe(!1);
273
+ }), (0, import_vitest.it)("processes multiple children", () => {
274
+ const result = (0, import_StackHeaderComponent.appendStackHeaderPropsToOptions)({}, {
275
+ children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackHeaderTitle.StackHeaderTitle, {
276
+ large: !0,
277
+ children: "My Screen"
278
+ }, "title"), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackHeaderBackButton.StackHeaderBackButton, {
279
+ hidden: !0
280
+ }, "back")]
281
+ });
282
+ (0, import_vitest.expect)(result.title).toBe("My Screen"), (0, import_vitest.expect)(result.headerLargeTitle).toBe(!0), (0, import_vitest.expect)(result.headerBackVisible).toBe(!1);
283
+ }), (0, import_vitest.it)("processes child Left component", () => {
284
+ const result = (0, import_StackHeaderComponent.appendStackHeaderPropsToOptions)({}, {
285
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackHeaderLeft.StackHeaderLeft, {
286
+ asChild: !0,
287
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)("button", {
288
+ children: "Back"
289
+ })
290
+ })
291
+ });
292
+ (0, import_vitest.expect)(result.headerLeft).toBeDefined(), (0, import_vitest.expect)(typeof result.headerLeft).toBe("function");
293
+ }), (0, import_vitest.it)("processes child Right component", () => {
294
+ const result = (0, import_StackHeaderComponent.appendStackHeaderPropsToOptions)({}, {
295
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackHeaderRight.StackHeaderRight, {
296
+ asChild: !0,
297
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)("button", {
298
+ children: "Action"
299
+ })
300
+ })
301
+ });
302
+ (0, import_vitest.expect)(result.headerRight).toBeDefined(), (0, import_vitest.expect)(typeof result.headerRight).toBe("function");
303
+ }), (0, import_vitest.it)("processes child SearchBar component", () => {
304
+ const result = (0, import_StackHeaderComponent.appendStackHeaderPropsToOptions)({}, {
305
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackHeaderSearchBar.StackHeaderSearchBar, {
306
+ placeholder: "Search..."
307
+ })
308
+ });
309
+ (0, import_vitest.expect)(result.headerSearchBarOptions).toMatchObject({
310
+ placeholder: "Search..."
311
+ });
312
+ }), (0, import_vitest.it)("processes all child components together", () => {
313
+ const result = (0, import_StackHeaderComponent.appendStackHeaderPropsToOptions)({}, {
314
+ children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackHeaderTitle.StackHeaderTitle, {
315
+ large: !0,
316
+ children: "Articles"
317
+ }, "title"), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackHeaderLeft.StackHeaderLeft, {
318
+ asChild: !0,
319
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)("button", {
320
+ children: "Back"
321
+ })
322
+ }, "left"), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackHeaderRight.StackHeaderRight, {
323
+ asChild: !0,
324
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)("button", {
325
+ children: "More"
326
+ })
327
+ }, "right"), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackHeaderSearchBar.StackHeaderSearchBar, {
328
+ placeholder: "Search articles..."
329
+ }, "search"), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackHeaderBackButton.StackHeaderBackButton, {
330
+ displayMode: "minimal"
331
+ }, "back")]
332
+ });
333
+ (0, import_vitest.expect)(result.title).toBe("Articles"), (0, import_vitest.expect)(result.headerLargeTitle).toBe(!0), (0, import_vitest.expect)(result.headerLeft).toBeDefined(), (0, import_vitest.expect)(result.headerRight).toBeDefined(), (0, import_vitest.expect)(result.headerSearchBarOptions).toMatchObject({
334
+ placeholder: "Search articles..."
335
+ }), (0, import_vitest.expect)(result.headerBackButtonDisplayMode).toBe("minimal");
336
+ });
337
+ }), (0, import_vitest.describe)("StackScreen composition", () => {
338
+ (0, import_vitest.it)("StackHeader is same reference as StackHeaderComponent", () => {
339
+ (0, import_vitest.expect)(import__.StackHeader).toBe(import_StackHeaderComponent.StackHeaderComponent);
340
+ }), (0, import_vitest.it)("merges options with Header composition", () => {
341
+ const result = (0, import_StackScreen.appendScreenStackPropsToOptions)({
342
+ animation: "slide_from_right"
343
+ }, {
344
+ options: {
345
+ gestureEnabled: !0
346
+ },
347
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackHeaderComponent.StackHeaderComponent, {
348
+ blurEffect: "regular",
349
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackHeaderTitle.StackHeaderTitle, {
350
+ large: !0,
351
+ children: "Composed Title"
352
+ })
353
+ })
354
+ });
355
+ (0, import_vitest.expect)(result.animation).toBe("slide_from_right"), (0, import_vitest.expect)(result.gestureEnabled).toBe(!0), (0, import_vitest.expect)(result.headerBlurEffect).toBe("regular"), (0, import_vitest.expect)(result.title).toBe("Composed Title"), (0, import_vitest.expect)(result.headerLargeTitle).toBe(!0);
356
+ }), (0, import_vitest.it)("works with StackHeader compound component (as used via Stack.Header)", () => {
357
+ const result = (0, import_StackScreen.appendScreenStackPropsToOptions)({}, {
358
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import__.StackHeader, {
359
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import__.StackHeader.Title, {
360
+ large: !0,
361
+ children: "Large Title Test"
362
+ })
363
+ })
364
+ });
365
+ (0, import_vitest.expect)(result.title).toBe("Large Title Test"), (0, import_vitest.expect)(result.headerLargeTitle).toBe(!0);
366
+ }), (0, import_vitest.it)("works with StackHeader compound component with Left child", () => {
367
+ const result = (0, import_StackScreen.appendScreenStackPropsToOptions)({}, {
368
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import__.StackHeader, {
369
+ children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import__.StackHeader.Title, {
370
+ large: !0,
371
+ children: "Articles"
372
+ }), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import__.StackHeader.Left, {
373
+ asChild: !0,
374
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)("button", {
375
+ children: "Back"
376
+ })
377
+ })]
378
+ })
379
+ });
380
+ (0, import_vitest.expect)(result.title).toBe("Articles"), (0, import_vitest.expect)(result.headerLargeTitle).toBe(!0), (0, import_vitest.expect)(result.headerLeft).toBeDefined();
381
+ }), (0, import_vitest.it)("composition overrides options prop", () => {
382
+ const result = (0, import_StackScreen.appendScreenStackPropsToOptions)({}, {
383
+ options: {
384
+ title: "Options Title"
385
+ },
386
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackHeaderComponent.StackHeaderComponent, {
387
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackHeaderTitle.StackHeaderTitle, {
388
+ children: "Composed Title"
389
+ })
390
+ })
391
+ });
392
+ (0, import_vitest.expect)(result.title).toBe("Composed Title");
393
+ }), (0, import_vitest.it)("works with StackHeader compound component with Right child", () => {
394
+ const result = (0, import_StackScreen.appendScreenStackPropsToOptions)({}, {
395
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import__.StackHeader, {
396
+ children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import__.StackHeader.Title, {
397
+ children: "Settings"
398
+ }), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import__.StackHeader.Right, {
399
+ asChild: !0,
400
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)("button", {
401
+ children: "Save"
402
+ })
403
+ })]
404
+ })
405
+ });
406
+ (0, import_vitest.expect)(result.title).toBe("Settings"), (0, import_vitest.expect)(result.headerRight).toBeDefined();
407
+ }), (0, import_vitest.it)("works with StackHeader compound component with SearchBar child", () => {
408
+ const result = (0, import_StackScreen.appendScreenStackPropsToOptions)({}, {
409
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import__.StackHeader, {
410
+ children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import__.StackHeader.Title, {
411
+ large: !0,
412
+ children: "Articles"
413
+ }), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import__.StackHeader.SearchBar, {
414
+ placeholder: "Search articles..."
415
+ })]
416
+ })
417
+ });
418
+ (0, import_vitest.expect)(result.title).toBe("Articles"), (0, import_vitest.expect)(result.headerLargeTitle).toBe(!0), (0, import_vitest.expect)(result.headerSearchBarOptions).toMatchObject({
419
+ placeholder: "Search articles..."
420
+ });
421
+ }), (0, import_vitest.it)("works with full compositional setup", () => {
422
+ const result = (0, import_StackScreen.appendScreenStackPropsToOptions)({}, {
423
+ options: {
424
+ animation: "slide_from_right"
425
+ },
426
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import__.StackHeader, {
427
+ blurEffect: "regular",
428
+ children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import__.StackHeader.Title, {
429
+ large: !0,
430
+ children: "My App"
431
+ }), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import__.StackHeader.Left, {
432
+ asChild: !0,
433
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)("button", {
434
+ children: "Menu"
435
+ })
436
+ }), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import__.StackHeader.Right, {
437
+ asChild: !0,
438
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)("button", {
439
+ children: "Settings"
440
+ })
441
+ }), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import__.StackHeader.BackButton, {
442
+ displayMode: "minimal"
443
+ }), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import__.StackHeader.SearchBar, {
444
+ placeholder: "Search...",
445
+ placement: "stacked"
446
+ })]
447
+ })
448
+ });
449
+ (0, import_vitest.expect)(result.animation).toBe("slide_from_right"), (0, import_vitest.expect)(result.headerBlurEffect).toBe("regular"), (0, import_vitest.expect)(result.title).toBe("My App"), (0, import_vitest.expect)(result.headerLargeTitle).toBe(!0), (0, import_vitest.expect)(result.headerTransparent).toBeUndefined(), (0, import_vitest.expect)(result.headerLeft).toBeDefined(), (0, import_vitest.expect)(result.headerRight).toBeDefined(), (0, import_vitest.expect)(result.headerBackButtonDisplayMode).toBe("minimal"), (0, import_vitest.expect)(result.headerSearchBarOptions).toMatchObject({
450
+ placeholder: "Search...",
451
+ placement: "stacked"
452
+ });
453
+ });
454
+ });
455
+ });