@mediacubeco/expo-template-fsd 2.3.1 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (333) hide show
  1. package/.claude/commands/git-commit.md +164 -0
  2. package/.claude/rules/architecture.md +38 -0
  3. package/.claude/rules/{prettier-eslint-typescript.mdc → prettier-eslint-typescript.md} +5 -10
  4. package/.claude/settings.json +2 -2
  5. package/.claude/skills/api/SKILL.md +362 -0
  6. package/.claude/skills/api/references/client/overview.md +106 -0
  7. package/.claude/skills/api/references/hooks/index.ts +3 -0
  8. package/.claude/skills/api/references/hooks/use-api-health.ts +25 -0
  9. package/.claude/skills/api/references/hooks/use-api-post.ts +46 -0
  10. package/.claude/skills/api/references/hooks/use-api-posts.ts +24 -0
  11. package/.claude/skills/api/references/mock/post.mock.ts +29 -0
  12. package/.claude/skills/{generate-api-model/references → api/references/model}/entities/common.ts +5 -2
  13. package/.claude/skills/api/references/model/resources/common.ts +9 -0
  14. package/.claude/skills/api/references/queries/health.ts +14 -0
  15. package/.claude/skills/api/references/queries/index.ts +2 -0
  16. package/.claude/skills/api/references/queries/post.ts +23 -0
  17. package/.claude/skills/api/references/repository/health/health.ts +11 -0
  18. package/.claude/skills/api/references/repository/health/health.types.ts +25 -0
  19. package/.claude/skills/api/references/repository/health/index.ts +2 -0
  20. package/.claude/skills/api/references/repository/post/index.ts +9 -0
  21. package/.claude/skills/api/references/repository/post/post.ts +34 -0
  22. package/.claude/skills/api/references/repository/post/post.types.ts +61 -0
  23. package/.claude/skills/code-style/SKILL.md +1025 -1
  24. package/.claude/skills/code-style/references/components/payout-speed-option/index.ts +2 -0
  25. package/.claude/skills/code-style/references/components/payout-speed-option/payout-speed-option.styles.ts +76 -0
  26. package/.claude/skills/code-style/references/components/payout-speed-option/payout-speed-option.tsx +58 -0
  27. package/.claude/skills/code-style/references/components/payout-speed-option/payout-speed-option.types.ts +22 -0
  28. package/.claude/skills/code-style/references/components/post/index.ts +2 -0
  29. package/.claude/skills/code-style/references/components/post/post.styles.ts +19 -0
  30. package/.claude/skills/code-style/references/components/post/post.tsx +21 -0
  31. package/.claude/skills/code-style/references/components/post/post.types.ts +9 -0
  32. package/.claude/skills/code-style/references/components/wrap/index.ts +2 -0
  33. package/.claude/skills/code-style/references/components/wrap/wrap.styles.ts +15 -0
  34. package/.claude/skills/code-style/references/components/wrap/wrap.tsx +31 -0
  35. package/.claude/skills/code-style/references/components/wrap/wrap.types.ts +10 -0
  36. package/.claude/skills/code-style/references/hooks/use-posts.ts +37 -0
  37. package/.claude/skills/code-style/references/pages/post/index.ts +4 -0
  38. package/.claude/skills/code-style/references/pages/post/post-details/index.ts +1 -0
  39. package/.claude/skills/code-style/references/pages/post/post-details/post-details.tsx +13 -0
  40. package/.claude/skills/code-style/references/pages/post/post-guide/index.ts +1 -0
  41. package/.claude/skills/code-style/references/pages/post/post-guide/post-guide.tsx +17 -0
  42. package/.claude/skills/code-style/references/pages/post/post-list/index.ts +1 -0
  43. package/.claude/skills/code-style/references/pages/post/post-list/post-list.styles.ts +17 -0
  44. package/.claude/skills/code-style/references/pages/post/post-list/post-list.tsx +25 -0
  45. package/.claude/skills/code-style/references/pages/post/post-share/index.ts +1 -0
  46. package/.claude/skills/code-style/references/pages/post/post-share/post-share.tsx +13 -0
  47. package/.claude/skills/code-style/references/routes/(stack)/_layout.tsx +18 -0
  48. package/.claude/skills/code-style/references/routes/(stack)/details.tsx +8 -0
  49. package/.claude/skills/code-style/references/routes/(stack)/guide.tsx +8 -0
  50. package/.claude/skills/code-style/references/routes/(stack)/index.tsx +8 -0
  51. package/.claude/skills/code-style/references/routes/(stack)/share.tsx +8 -0
  52. package/.claude/skills/code-style/references/routes/(tabs)/(post-details)/index.tsx +8 -0
  53. package/.claude/skills/code-style/references/routes/(tabs)/(post-list)/index.tsx +8 -0
  54. package/.claude/skills/code-style/references/routes/(tabs)/_layout.tsx +50 -0
  55. package/.claude/skills/code-style/references/routes/_app.tsx +20 -0
  56. package/.claude/skills/code-style/references/routes/guide.tsx +8 -0
  57. package/.claude/skills/code-style/references/routes/share.tsx +8 -0
  58. package/.claude/skills/code-style/references/store/use-post-draft-store.ts +62 -0
  59. package/.claude/skills/design-style/SKILL.md +320 -0
  60. package/.env +3 -1
  61. package/.env.example +3 -1
  62. package/CLAUDE.md +5 -11
  63. package/app.json +6 -3
  64. package/axios.d.ts +5 -0
  65. package/env.d.ts +3 -1
  66. package/package.json +33 -40
  67. package/patches/react-native-screens+4.25.2.patch +118 -0
  68. package/react-query.d.ts +13 -0
  69. package/src/app/(root)/(home)/_layout.tsx +2 -2
  70. package/src/app/(root)/(home)/index.tsx +2 -2
  71. package/src/app/(root)/(settings)/_layout.tsx +2 -2
  72. package/src/app/(root)/(settings)/index.tsx +2 -2
  73. package/src/app/(root)/_layout.tsx +35 -32
  74. package/src/pages/home/home-main.tsx +3 -7
  75. package/src/pages/settings/settings-main.tsx +3 -7
  76. package/src/shared/assets/fonts/index.ts +3 -3
  77. package/src/shared/assets/fonts/sf-pro-text-bold.ttf +0 -0
  78. package/src/shared/assets/fonts/sf-pro-text-regular.ttf +0 -0
  79. package/src/shared/assets/fonts/sf-pro-text-semibold.ttf +0 -0
  80. package/src/shared/assets/icons/back.tsx +21 -0
  81. package/src/shared/assets/icons/close.tsx +21 -0
  82. package/src/shared/assets/icons/common.ts +8 -0
  83. package/src/shared/assets/icons/default.tsx +44 -0
  84. package/src/shared/assets/icons/index.ts +13 -1
  85. package/src/shared/assets/icons/refresh.tsx +23 -0
  86. package/src/shared/assets/icons/share.tsx +38 -0
  87. package/src/shared/assets/icons/type.ts +7 -0
  88. package/src/shared/assets/translations/index.ts +4 -4
  89. package/src/shared/constants/config.ts +13 -0
  90. package/src/shared/constants/environment.ts +16 -4
  91. package/src/shared/constants/index.ts +1 -0
  92. package/src/shared/hooks/index.ts +1 -4
  93. package/src/shared/hooks/use-compose.ts +23 -0
  94. package/src/shared/lib/api/api.client.ts +157 -0
  95. package/src/shared/lib/api/api.provider.tsx +14 -36
  96. package/src/shared/lib/api/api.ts +1 -5
  97. package/src/shared/lib/api/api.types.ts +6 -3
  98. package/src/shared/lib/api/hooks/index.ts +1 -0
  99. package/src/shared/lib/api/index.ts +2 -3
  100. package/src/shared/lib/api/models/api-instance/api-instance.client.ts +50 -0
  101. package/src/shared/lib/api/models/api-instance/api-instance.ts +30 -82
  102. package/src/shared/lib/api/models/api-instance/api-instance.types.ts +16 -18
  103. package/src/shared/lib/api/models/api-instance/api-instance.utils.ts +13 -20
  104. package/src/shared/lib/api/models/api-instance/index.ts +3 -0
  105. package/src/shared/lib/api/queries/index.ts +1 -0
  106. package/src/shared/lib/api/repositories/index.ts +1 -1
  107. package/src/shared/lib/localization/constants/index.ts +16 -5
  108. package/src/shared/lib/localization/index.ts +5 -1
  109. package/src/shared/lib/navigation/hooks/index.ts +8 -3
  110. package/src/shared/{hooks/use-breakpoints.ts → lib/navigation/hooks/use-navigation-breakpoints.ts} +2 -5
  111. package/src/shared/lib/navigation/hooks/use-navigation-dimensions.ts +12 -0
  112. package/src/shared/lib/navigation/hooks/use-navigation-options.tsx +175 -0
  113. package/src/shared/lib/navigation/hooks/{use-navigation.ts → use-navigation-route.ts} +2 -2
  114. package/src/shared/lib/navigation/hooks/use-navigation-safe-area.ts +61 -0
  115. package/src/shared/lib/navigation/hooks/use-navigation-tabs-native.ts +10 -0
  116. package/src/shared/lib/navigation/hooks/use-navigation-tabs.tsx +10 -0
  117. package/src/shared/lib/navigation/hooks/use-navigation-transition.ts +27 -0
  118. package/src/shared/lib/navigation/index.ts +11 -4
  119. package/src/shared/lib/navigation/navigation-tabs-native.context.tsx +5 -0
  120. package/src/shared/lib/navigation/navigation-tabs-native.provider.tsx +17 -0
  121. package/src/shared/lib/navigation/navigation-tabs.context.tsx +10 -0
  122. package/src/shared/lib/navigation/navigation-tabs.provider.tsx +22 -0
  123. package/src/shared/lib/navigation/navigation.provider.tsx +6 -1
  124. package/src/shared/lib/storage/index.ts +1 -1
  125. package/src/shared/lib/storage/storage.provider.tsx +4 -0
  126. package/src/shared/lib/storage/storage.ts +29 -25
  127. package/src/shared/lib/theme/constants/animations.ts +26 -0
  128. package/src/shared/lib/theme/constants/colors.ts +336 -43
  129. package/src/shared/lib/theme/constants/delays.ts +1 -1
  130. package/src/shared/lib/theme/constants/durations.ts +1 -1
  131. package/src/shared/lib/theme/constants/fonts.ts +2 -1
  132. package/src/shared/lib/theme/constants/index.ts +42 -20
  133. package/src/shared/lib/theme/constants/shadows.ts +7 -25
  134. package/src/shared/lib/theme/constants/sizes.ts +11 -2
  135. package/src/shared/lib/theme/constants/transparencies.ts +1 -1
  136. package/src/shared/lib/theme/hooks/use-theme-setup.ts +3 -1
  137. package/src/shared/lib/theme/index.ts +10 -1
  138. package/src/shared/lib/theme/theme.provider.tsx +45 -19
  139. package/src/shared/lib/theme/theme.scope.tsx +43 -0
  140. package/src/shared/lib/theme/theme.types.ts +15 -3
  141. package/src/shared/lib/theme/utils/color.ts +81 -0
  142. package/src/shared/lib/theme/utils/index.ts +2 -0
  143. package/src/shared/lib/theme/utils/snapshot.ts +17 -0
  144. package/src/shared/lib/theme/utils/storage.ts +5 -2
  145. package/src/shared/services/browser/browser.ts +66 -0
  146. package/src/shared/services/browser/index.ts +1 -0
  147. package/src/shared/services/cookies/cookies.ts +73 -0
  148. package/src/shared/services/cookies/index.ts +1 -0
  149. package/src/shared/services/index.ts +5 -0
  150. package/src/shared/services/linking/index.ts +1 -0
  151. package/src/shared/services/linking/linking.ts +22 -0
  152. package/src/shared/services/share/index.ts +1 -0
  153. package/src/shared/services/share/share.ts +28 -0
  154. package/src/shared/services/universal-links/index.ts +104 -0
  155. package/src/shared/services/universal-links/universal-links.ts +25 -0
  156. package/src/shared/services/universal-links/universal-links.types.ts +5 -0
  157. package/src/shared/ui/atoms/blur/blur.tsx +9 -4
  158. package/src/shared/ui/atoms/blur/blur.types.ts +1 -1
  159. package/src/shared/ui/atoms/blur-progress/blur-progress.styles.ts +16 -0
  160. package/src/shared/ui/atoms/blur-progress/blur-progress.tsx +30 -0
  161. package/src/shared/ui/atoms/blur-progress/blur-progress.types.tsx +5 -0
  162. package/src/shared/ui/atoms/blur-progress/index.ts +1 -0
  163. package/src/shared/ui/atoms/glass/glass.tsx +13 -5
  164. package/src/shared/ui/atoms/glass/glass.types.ts +1 -1
  165. package/src/shared/ui/atoms/icon/icon.styles.ts +82 -0
  166. package/src/shared/ui/atoms/icon/icon.tsx +21 -0
  167. package/src/shared/ui/atoms/icon/icon.types.ts +23 -0
  168. package/src/shared/ui/atoms/icon/index.ts +2 -0
  169. package/src/shared/ui/atoms/index.ts +7 -0
  170. package/src/shared/ui/atoms/skeleton/index.ts +2 -0
  171. package/src/shared/ui/atoms/skeleton/skeleton.styles.ts +69 -0
  172. package/src/shared/ui/atoms/skeleton/skeleton.tsx +26 -0
  173. package/src/shared/ui/atoms/skeleton/skeleton.types.ts +9 -0
  174. package/src/shared/ui/atoms/spinner/index.ts +2 -0
  175. package/src/shared/ui/atoms/spinner/spinner.styles.ts +102 -0
  176. package/src/shared/ui/atoms/spinner/spinner.tsx +48 -0
  177. package/src/shared/ui/atoms/spinner/spinner.types.ts +25 -0
  178. package/src/shared/ui/atoms/text/index.ts +2 -0
  179. package/src/shared/ui/atoms/text/text.styles.ts +186 -0
  180. package/src/shared/ui/atoms/text/text.tsx +37 -0
  181. package/src/shared/ui/atoms/text/text.types.ts +35 -0
  182. package/src/shared/ui/atoms/touch/components/haptics/haptics.styles.ts +21 -0
  183. package/src/shared/ui/atoms/touch/components/haptics/haptics.tsx +28 -0
  184. package/src/shared/ui/atoms/touch/components/haptics/haptics.types.ts +17 -0
  185. package/src/shared/ui/atoms/touch/components/haptics/index.ts +2 -0
  186. package/src/shared/ui/atoms/touch/components/index.ts +3 -0
  187. package/src/shared/ui/atoms/touch/components/ripple/index.ts +2 -0
  188. package/src/shared/ui/atoms/touch/components/ripple/ripple.styles.ts +78 -0
  189. package/src/shared/ui/atoms/touch/components/ripple/ripple.tsx +29 -0
  190. package/src/shared/ui/atoms/touch/components/ripple/ripple.types.ts +17 -0
  191. package/src/shared/ui/atoms/touch/components/spring/index.ts +2 -0
  192. package/src/shared/ui/atoms/touch/components/spring/spring.styles.ts +31 -0
  193. package/src/shared/ui/atoms/touch/components/spring/spring.tsx +28 -0
  194. package/src/shared/ui/atoms/touch/components/spring/spring.types.ts +17 -0
  195. package/src/shared/ui/atoms/touch/index.ts +2 -0
  196. package/src/shared/ui/atoms/touch/touch.styles.ts +14 -0
  197. package/src/shared/ui/atoms/touch/touch.tsx +137 -0
  198. package/src/shared/ui/atoms/touch/touch.types.ts +27 -0
  199. package/src/shared/ui/atoms/visibility/index.ts +2 -0
  200. package/src/shared/ui/atoms/visibility/visibility.styles.ts +85 -0
  201. package/src/shared/ui/atoms/visibility/visibility.tsx +61 -0
  202. package/src/shared/ui/atoms/visibility/visibility.types.ts +34 -0
  203. package/src/shared/ui/molecules/keyboard-area/keyboard-area.styles.ts +11 -9
  204. package/src/shared/ui/molecules/keyboard-area/keyboard-area.tsx +3 -6
  205. package/src/shared/ui/molecules/refresh-control/refresh-control.tsx +3 -5
  206. package/src/shared/ui/molecules/refresh-control/refresh-control.types.ts +1 -1
  207. package/src/shared/ui/molecules/slider/components/indicator/components/dot/dot.styles.ts +41 -0
  208. package/src/shared/ui/molecules/slider/components/indicator/components/dot/dot.tsx +12 -0
  209. package/src/shared/ui/molecules/slider/components/indicator/components/dot/dot.types.ts +13 -0
  210. package/src/shared/ui/molecules/slider/components/indicator/components/dot/index.ts +2 -0
  211. package/src/shared/ui/molecules/slider/components/indicator/index.ts +2 -0
  212. package/src/shared/ui/molecules/slider/components/indicator/indicator.styles.ts +20 -0
  213. package/src/shared/ui/molecules/slider/components/indicator/indicator.tsx +22 -0
  214. package/src/shared/ui/molecules/slider/components/indicator/indicator.types.ts +10 -0
  215. package/src/shared/ui/molecules/slider/index.ts +3 -0
  216. package/src/shared/ui/molecules/slider/slider.styles.ts +68 -0
  217. package/src/shared/ui/molecules/slider/slider.tsx +64 -0
  218. package/src/shared/ui/molecules/slider/slider.types.ts +28 -0
  219. package/src/shared/ui/organisms/bar/bar.styles.ts +100 -0
  220. package/src/shared/ui/organisms/bar/bar.tsx +89 -0
  221. package/src/shared/ui/organisms/bar/bar.types.ts +49 -0
  222. package/src/shared/ui/organisms/bar/index.ts +2 -0
  223. package/src/shared/ui/organisms/bar-tab/bar-tab.tsx +9 -0
  224. package/src/shared/ui/organisms/bar-tab/bar-tab.types.ts +5 -0
  225. package/src/shared/ui/organisms/bar-tab/components/index.ts +1 -0
  226. package/src/shared/ui/organisms/bar-tab/components/tab/index.ts +2 -0
  227. package/src/shared/ui/organisms/bar-tab/components/tab/tab.styles.ts +21 -0
  228. package/src/shared/ui/organisms/bar-tab/components/tab/tab.tsx +18 -0
  229. package/src/shared/ui/organisms/bar-tab/components/tab/tab.types.ts +5 -0
  230. package/src/shared/ui/organisms/bar-tab/index.ts +2 -0
  231. package/src/shared/ui/organisms/bar-tab-navigation/bar-tab-navigation.styles.ts +22 -0
  232. package/src/shared/ui/organisms/bar-tab-navigation/bar-tab-navigation.tsx +66 -0
  233. package/src/shared/ui/organisms/bar-tab-navigation/bar-tab-navigation.types.ts +5 -0
  234. package/src/shared/ui/organisms/bar-tab-navigation/components/index.ts +1 -0
  235. package/src/shared/ui/organisms/bar-tab-navigation/components/tab-navigation/index.ts +2 -0
  236. package/src/shared/ui/organisms/bar-tab-navigation/components/tab-navigation/tab-navigation.styles.ts +56 -0
  237. package/src/shared/ui/organisms/bar-tab-navigation/components/tab-navigation/tab-navigation.tsx +30 -0
  238. package/src/shared/ui/organisms/bar-tab-navigation/components/tab-navigation/tab-navigation.types.ts +7 -0
  239. package/src/shared/ui/organisms/bar-tab-navigation/index.ts +2 -0
  240. package/src/shared/ui/organisms/index.ts +4 -1
  241. package/src/shared/ui/organisms/slider/components/indicator/components/dot/dot.styles.ts +41 -0
  242. package/src/shared/ui/organisms/slider/components/indicator/components/dot/dot.tsx +12 -0
  243. package/src/shared/ui/organisms/slider/components/indicator/components/dot/dot.types.ts +13 -0
  244. package/src/shared/ui/organisms/slider/components/indicator/components/dot/index.ts +2 -0
  245. package/src/shared/ui/organisms/slider/components/indicator/index.ts +2 -0
  246. package/src/shared/ui/organisms/slider/components/indicator/indicator.styles.ts +20 -0
  247. package/src/shared/ui/organisms/slider/components/indicator/indicator.tsx +22 -0
  248. package/src/shared/ui/organisms/slider/components/indicator/indicator.types.ts +10 -0
  249. package/src/shared/ui/organisms/slider/index.ts +3 -0
  250. package/src/shared/ui/organisms/slider/slider.styles.ts +68 -0
  251. package/src/shared/ui/organisms/slider/slider.tsx +64 -0
  252. package/src/shared/ui/organisms/slider/slider.types.ts +28 -0
  253. package/src/shared/ui/templates/index.ts +3 -0
  254. package/src/shared/ui/templates/modal-container/index.ts +13 -0
  255. package/src/shared/ui/templates/modal-container/modal-container-list.tsx +45 -0
  256. package/src/shared/ui/templates/modal-container/modal-container-scroll.tsx +66 -0
  257. package/src/shared/ui/templates/modal-container/modal-container-section-list.tsx +46 -0
  258. package/src/shared/ui/templates/modal-container/modal-container.hooks.tsx +172 -0
  259. package/src/shared/ui/templates/modal-container/modal-container.styles.ts +121 -0
  260. package/src/shared/ui/templates/modal-container/modal-container.types.ts +69 -0
  261. package/src/shared/ui/templates/screen-container/index.ts +1 -1
  262. package/src/shared/ui/templates/screen-container/screen-container-list.tsx +28 -10
  263. package/src/shared/ui/templates/screen-container/screen-container-scroll.tsx +28 -10
  264. package/src/shared/ui/templates/screen-container/screen-container-section-list.tsx +29 -11
  265. package/src/shared/ui/templates/screen-container/screen-container.hooks.tsx +79 -8
  266. package/src/shared/ui/templates/screen-container/screen-container.styles.ts +105 -15
  267. package/src/shared/ui/templates/screen-container/screen-container.types.tsx +34 -7
  268. package/src/shared/ui/templates/screen-header/components/index.ts +6 -0
  269. package/src/shared/ui/templates/screen-header/components/screen-header-description/index.ts +2 -0
  270. package/src/shared/ui/templates/screen-header/components/screen-header-description/screen-header-description.tsx +15 -0
  271. package/src/shared/ui/templates/screen-header/components/screen-header-description/screen-header-description.types.ts +11 -0
  272. package/src/shared/ui/templates/screen-header/components/screen-header-icon/index.ts +2 -0
  273. package/src/shared/ui/templates/screen-header/components/screen-header-icon/screen-header-icon.styles.ts +44 -0
  274. package/src/shared/ui/templates/screen-header/components/screen-header-icon/screen-header-icon.tsx +65 -0
  275. package/src/shared/ui/templates/screen-header/components/screen-header-icon/screen-header-icon.types.ts +14 -0
  276. package/src/shared/ui/templates/screen-header/components/screen-header-icon-back/index.ts +2 -0
  277. package/src/shared/ui/templates/screen-header/components/screen-header-icon-back/screen-header-icon-back.tsx +17 -0
  278. package/src/shared/ui/templates/screen-header/components/screen-header-icon-back/screen-header-icon-back.types.ts +6 -0
  279. package/src/shared/ui/templates/screen-header/components/screen-header-icon-close/index.ts +2 -0
  280. package/src/shared/ui/templates/screen-header/components/screen-header-icon-close/screen-header-icon-close.tsx +27 -0
  281. package/src/shared/ui/templates/screen-header/components/screen-header-icon-close/screen-header-icon-close.types.ts +10 -0
  282. package/src/shared/ui/templates/screen-header/components/screen-header-info/index.ts +2 -0
  283. package/src/shared/ui/templates/screen-header/components/screen-header-info/screen-header-info.tsx +15 -0
  284. package/src/shared/ui/templates/screen-header/components/screen-header-info/screen-header-info.types.ts +10 -0
  285. package/src/shared/ui/templates/screen-header/components/screen-header-title/index.ts +2 -0
  286. package/src/shared/ui/templates/screen-header/components/screen-header-title/screen-header-title.tsx +19 -0
  287. package/src/shared/ui/templates/screen-header/components/screen-header-title/screen-header-title.types.ts +13 -0
  288. package/src/shared/ui/templates/screen-header/index.ts +3 -0
  289. package/src/shared/ui/templates/screen-header/screen-header.styles.ts +49 -0
  290. package/src/shared/ui/templates/screen-header/screen-header.tsx +26 -0
  291. package/src/shared/ui/templates/screen-header/screen-header.types.ts +15 -0
  292. package/src/shared/ui/templates/web-container/index.ts +2 -0
  293. package/src/shared/ui/templates/web-container/web-container.styles.ts +34 -0
  294. package/src/shared/ui/templates/web-container/web-container.tsx +172 -0
  295. package/src/shared/ui/templates/web-container/web-container.types.ts +21 -0
  296. package/.claude/rules/app-routing.mdc +0 -47
  297. package/.claude/rules/exports-at-end.mdc +0 -55
  298. package/.claude/rules/kebab-case-naming.mdc +0 -29
  299. package/.claude/rules/mediacubeco-packages.mdc +0 -56
  300. package/.claude/skills/generate-api-model/SKILL.md +0 -230
  301. package/.claude/skills/generate-api-model/references/resources/common.ts +0 -8
  302. package/.claude/skills/generate-api-model-mock/SKILL.md +0 -56
  303. package/.claude/skills/git-commit/SKILL.md +0 -139
  304. package/.gitignore +0 -34
  305. package/src/shared/assets/icons/like.tsx +0 -17
  306. package/src/shared/hooks/use-animated.ts +0 -200
  307. package/src/shared/hooks/use-mixins.ts +0 -36
  308. package/src/shared/hooks/use-safe-area.ts +0 -75
  309. package/src/shared/lib/api/repositories/auth/auth.ts +0 -23
  310. package/src/shared/lib/api/repositories/auth/auth.types.ts +0 -22
  311. package/src/shared/lib/api/repositories/auth/index.ts +0 -1
  312. package/src/shared/lib/navigation/hooks/use-navigation-native-tabs.ts +0 -10
  313. package/src/shared/lib/navigation/hooks/use-navigation-options.ts +0 -123
  314. package/src/shared/lib/navigation/navigation-native-tabs.context.tsx +0 -5
  315. package/src/shared/lib/navigation/navigation-native-tabs.provider.tsx +0 -12
  316. package/src/shared/lib/theme/constants/borders.ts +0 -8
  317. package/src/shared/lib/theme/constants/weights.ts +0 -13
  318. /package/.claude/skills/{generate-api-model/references → api/references/model}/entities/index.ts +0 -0
  319. /package/.claude/skills/{generate-api-model/references → api/references/model}/entities/post/index.ts +0 -0
  320. /package/.claude/skills/{generate-api-model/references → api/references/model}/entities/post/post-comment.ts +0 -0
  321. /package/.claude/skills/{generate-api-model/references → api/references/model}/entities/post/post.ts +0 -0
  322. /package/.claude/skills/{generate-api-model/references → api/references/model}/entities/user/index.ts +0 -0
  323. /package/.claude/skills/{generate-api-model/references → api/references/model}/entities/user/user-settings.ts +0 -0
  324. /package/.claude/skills/{generate-api-model/references → api/references/model}/entities/user/user-verification.ts +0 -0
  325. /package/.claude/skills/{generate-api-model/references → api/references/model}/entities/user/user.ts +0 -0
  326. /package/.claude/skills/{generate-api-model/references → api/references/model}/resources/index.ts +0 -0
  327. /package/.claude/skills/{generate-api-model/references → api/references/model}/resources/post/index.ts +0 -0
  328. /package/.claude/skills/{generate-api-model/references → api/references/model}/resources/post/post-comment.ts +0 -0
  329. /package/.claude/skills/{generate-api-model/references → api/references/model}/resources/post/post.ts +0 -0
  330. /package/.claude/skills/{generate-api-model/references → api/references/model}/resources/user/index.ts +0 -0
  331. /package/.claude/skills/{generate-api-model/references → api/references/model}/resources/user/user-settings.ts +0 -0
  332. /package/.claude/skills/{generate-api-model/references → api/references/model}/resources/user/user-verification.ts +0 -0
  333. /package/.claude/skills/{generate-api-model/references → api/references/model}/resources/user/user.ts +0 -0
@@ -0,0 +1,121 @@
1
+ import { Platform } from '@mediacubeco/base-react-native/helpers'
2
+ import { StyleSheet, useWindowDimensions } from 'react-native'
3
+ import { useSafeAreaInsets } from 'react-native-safe-area-context'
4
+ import { useThemeMode, withTransparency } from '../../../lib'
5
+
6
+ /**
7
+ * Запас между верхом окна (за вычетом safe-area) и максимальной высотой листа. На iOS 26
8
+ * лист, чей детент приближается к максимальному, «пристыковывается» к краям экрана с
9
+ * собственной нативной геометрией, которую JS не знает, — из-за этого враппер расходится с
10
+ * листом (обрезка контента, мёртвая полоса снизу). Запас держит лист ниже порога стыковки,
11
+ * поэтому он всегда плавающий и точно обнимает враппер. На Android лист всегда прижат к
12
+ * краям, стыковки нет — запас минимальный.
13
+ */
14
+ const SHEET_TOP_CLEARANCE = Platform.OS === 'ios' ? 120 : 40
15
+
16
+ /**
17
+ * Зазор между safe-area и верхом листа, когда система сдвигает лист из-под клавиатуры до
18
+ * упора: выше safe-area + этот отступ лист не поднимается. Через него считается перекрытие
19
+ * листа клавиатурой для подъёма футера (`footerLiftStyle`). На iOS сдвигает UIKit, стоп-линия
20
+ * замерена на iOS 26; на Android react-native-screens транслирует лист, пока его верх не
21
+ * упрётся ровно в safe-area — запаса нет.
22
+ */
23
+ const SHEET_KEYBOARD_TOP_MARGIN = Platform.OS === 'ios' ? 10 : 0
24
+
25
+ /**
26
+ * Визуальная логика контейнера модалки. Лист презентится с `fitToContents`, поэтому его
27
+ * высота равна натуральной высоте контента. Шапка и футер — абсолютные оверлеи с
28
+ * прогрессивным блюром: контент скроллится под ними и плавно растворяется у краёв. Тело
29
+ * отступает от краёв на высоту оверлеев (`paddingTop`/`paddingBottom` считаются в хуке по
30
+ * замеренным высотам), поэтому первый и последний элементы не прячутся под шапкой/футером.
31
+ * Пока контент помещается — тело облегает его; когда выше `MAX_SHEET_HEIGHT`, враппер
32
+ * фиксируется на этой высоте (`wrapperCapped`) и тело начинает скроллиться. Нижний отступ —
33
+ * из сырого safe-area (`useSafeAreaInsets`), без таб-бар-логики `useNavigationSafeArea`. Клавиатура на
34
+ * высоту листа НЕ влияет: смена детента `fitToContents` во время клавиатурной анимации
35
+ * сбивает собственный сдвиг листа UIKit (лист «переоткрывается»), поэтому детент стабилен,
36
+ * лист двигает сам UIKit, а футер приподнимается внутри листа (см. `useModalContainerProps`).
37
+ * Поверх блюра шапки и футера кладётся градиент цвета фона
38
+ * (`headerGradientColorList`/`footerGradientColorList`): контент у кромки растворяется
39
+ * полностью, и жёсткой линии обрезки не видно.
40
+ */
41
+ const useModalContainerStyles = () => {
42
+ const { COLORS, SIZES, TRANSPARENCIES } = useThemeMode()
43
+ const { top, bottom } = useSafeAreaInsets()
44
+ const { height: WINDOW_HEIGHT } = useWindowDimensions()
45
+
46
+ // Плавающий iOS-лист сам держится над home indicator — хватает небольшого отступа под
47
+ // скруглённые края; прижатый Android-лист учитывает системный inset вручную.
48
+ const BOTTOM = Platform.OS === 'ios' ? SIZES['2XL'] : Math.max(bottom, SIZES['2XL'])
49
+ const MAX_SHEET_HEIGHT = WINDOW_HEIGHT - top - SHEET_TOP_CLEARANCE
50
+ // Минимальный верх листа при клавиатурном сдвиге UIKit — точка отсчёта перекрытия.
51
+ const SHEET_KEYBOARD_TOP = top + SHEET_KEYBOARD_TOP_MARGIN
52
+ // Верхний отступ контента, когда шапки нет (с шапкой отступ равен её замеренной высоте).
53
+ const TOP = SIZES['4XL']
54
+
55
+ const GRADIENT_VISIBLE = withTransparency(COLORS.BACKGROUND.BASE, TRANSPARENCIES.VISIBLE)
56
+ const GRADIENT_INVISIBLE = withTransparency(COLORS.BACKGROUND.BASE, TRANSPARENCIES.INVISIBLE)
57
+
58
+ const headerGradientColorList = [GRADIENT_VISIBLE, GRADIENT_INVISIBLE] as const
59
+ const footerGradientColorList = [GRADIENT_INVISIBLE, GRADIENT_VISIBLE] as const
60
+
61
+ const styles = StyleSheet.create({
62
+ wrapper: {
63
+ maxHeight: MAX_SHEET_HEIGHT,
64
+ overflow: 'hidden',
65
+ backgroundColor: COLORS.BACKGROUND.BASE,
66
+ },
67
+ wrapperCapped: {
68
+ height: MAX_SHEET_HEIGHT,
69
+ },
70
+ body: {
71
+ flex: 1,
72
+ },
73
+ content: {
74
+ gap: SIZES['3XL'],
75
+ paddingHorizontal: SIZES['4XL'],
76
+ },
77
+ header: {
78
+ position: 'absolute',
79
+ top: 0,
80
+ left: 0,
81
+ right: 0,
82
+ zIndex: 2,
83
+ gap: SIZES['3XL'],
84
+ paddingTop: SIZES['4XL'],
85
+ paddingBottom: SIZES['3XL'],
86
+ paddingHorizontal: SIZES['4XL'],
87
+ },
88
+ footerShell: {
89
+ position: 'absolute',
90
+ bottom: 0,
91
+ left: 0,
92
+ right: 0,
93
+ zIndex: 2,
94
+ },
95
+ footer: {
96
+ gap: SIZES['2XL'],
97
+ paddingTop: SIZES['3XL'],
98
+ paddingBottom: BOTTOM,
99
+ paddingHorizontal: SIZES['4XL'],
100
+ },
101
+ blur: {
102
+ ...StyleSheet.absoluteFill,
103
+ },
104
+ scrollGuard: {
105
+ width: 0,
106
+ height: 0,
107
+ },
108
+ })
109
+
110
+ return {
111
+ styles,
112
+ headerGradientColorList,
113
+ footerGradientColorList,
114
+ MAX_SHEET_HEIGHT,
115
+ SHEET_KEYBOARD_TOP,
116
+ TOP,
117
+ BOTTOM,
118
+ }
119
+ }
120
+
121
+ export { useModalContainerStyles }
@@ -0,0 +1,69 @@
1
+ import { type ReactNode, type Ref } from 'react'
2
+ import {
3
+ type FlatList,
4
+ type FlatListProps,
5
+ type ListRenderItemInfo,
6
+ type ScrollView,
7
+ type ScrollViewProps,
8
+ type SectionList,
9
+ type SectionListData,
10
+ type SectionListProps,
11
+ type SectionListRenderItemInfo,
12
+ type StyleProp,
13
+ type ViewStyle,
14
+ } from 'react-native'
15
+
16
+ /** Нативные пропсы, которыми контейнер управляет сам: стиль, паддинги и замер контента. */
17
+ type ModalContainerExcludeNativeProps<
18
+ Props extends ScrollViewProps | FlatListProps<unknown> | SectionListProps<unknown>,
19
+ > = Omit<
20
+ Props,
21
+ 'style' | 'contentContainerStyle' | 'onContentSizeChange' | 'refreshControl' | 'refreshing'
22
+ >
23
+
24
+ /** Общие слоты и стили слоёв для всех вариантов контейнера модалки. */
25
+ type ModalContainerProps<Component extends ScrollView | FlatList | SectionList> = {
26
+ ref?: Ref<Component>
27
+ wrapperStyle?: StyleProp<ViewStyle>
28
+ outerStyle?: StyleProp<ViewStyle>
29
+ innerStyle?: StyleProp<ViewStyle>
30
+ header?: ReactNode
31
+ footer?: ReactNode
32
+ }
33
+
34
+ /** Пропсы скролл-варианта: контент передаётся как children. */
35
+ type ModalContainerScrollProps = ModalContainerExcludeNativeProps<ScrollViewProps> &
36
+ ModalContainerProps<ScrollView> & {}
37
+
38
+ /** Пропсы списочного варианта поверх FlatList. */
39
+ type ModalContainerListProps<Item = unknown> = ModalContainerExcludeNativeProps<
40
+ FlatListProps<Item>
41
+ > &
42
+ ModalContainerProps<FlatList<Item>> & {}
43
+
44
+ /** Пропсы секшен-варианта поверх SectionList. */
45
+ type ModalContainerSectionListProps<Item = unknown> = ModalContainerExcludeNativeProps<
46
+ SectionListProps<Item>
47
+ > &
48
+ ModalContainerProps<SectionList<Item>> & {}
49
+
50
+ /** Инфо элемента для renderItem списочного варианта. */
51
+ type ModalContainerListRenderItemInfo<Item = unknown> = ListRenderItemInfo<Item>
52
+
53
+ /** Инфо элемента для renderItem секшен-варианта. */
54
+ type ModalContainerSectionListRenderItemInfo<Item = unknown> = SectionListRenderItemInfo<Item>
55
+
56
+ /** Инфо секции для renderSectionHeader секшен-варианта. */
57
+ type ModalContainerSectionListRenderHeaderInfo<Item = unknown> = {
58
+ section: SectionListData<Item>
59
+ }
60
+
61
+ export type {
62
+ ModalContainerProps,
63
+ ModalContainerScrollProps,
64
+ ModalContainerListProps,
65
+ ModalContainerSectionListProps,
66
+ ModalContainerListRenderItemInfo,
67
+ ModalContainerSectionListRenderItemInfo,
68
+ ModalContainerSectionListRenderHeaderInfo,
69
+ }
@@ -1,5 +1,5 @@
1
- export { default as ScreenContainerScroll } from './screen-container-scroll'
2
1
  export { default as ScreenContainerList } from './screen-container-list'
2
+ export { default as ScreenContainerScroll } from './screen-container-scroll'
3
3
  export { default as ScreenContainerSectionList } from './screen-container-section-list'
4
4
  export type {
5
5
  ScreenContainerListProps,
@@ -3,19 +3,37 @@ import { useScreenContainerProps } from './screen-container.hooks'
3
3
  import { type ScreenContainerListProps } from './screen-container.types'
4
4
 
5
5
  const ScreenContainerList = <Item,>(props: ScreenContainerListProps<Item>) => {
6
- const { reference, header, footer, wrapperStyle, outerStyle, innerStyle, ...flatListProps } =
7
- useScreenContainerProps<ScreenContainerListProps<Item>>(props)
6
+ const {
7
+ ref,
8
+ overlay,
9
+ blurTop,
10
+ blurBottom,
11
+ screenHeader,
12
+ header,
13
+ footer,
14
+ wrapperStyle,
15
+ bodyStyle,
16
+ outerStyle,
17
+ innerStyle,
18
+ ...flatListProps
19
+ } = useScreenContainerProps<ScreenContainerListProps<Item>>(props)
8
20
 
9
21
  return (
10
22
  <View style={wrapperStyle}>
11
- {header}
12
- <FlatList
13
- ref={reference}
14
- style={outerStyle}
15
- contentContainerStyle={innerStyle}
16
- {...flatListProps}
17
- />
18
- {footer}
23
+ {overlay}
24
+ <View style={bodyStyle}>
25
+ {blurTop}
26
+ {screenHeader}
27
+ {header}
28
+ <FlatList
29
+ ref={ref}
30
+ style={outerStyle}
31
+ contentContainerStyle={innerStyle}
32
+ {...flatListProps}
33
+ />
34
+ {footer}
35
+ {blurBottom}
36
+ </View>
19
37
  </View>
20
38
  )
21
39
  }
@@ -3,19 +3,37 @@ import { useScreenContainerProps } from './screen-container.hooks'
3
3
  import { type ScreenContainerScrollProps } from './screen-container.types'
4
4
 
5
5
  const ScreenContainerScroll = (props: ScreenContainerScrollProps) => {
6
- const { reference, header, footer, wrapperStyle, outerStyle, innerStyle, ...scrollViewProps } =
7
- useScreenContainerProps<ScreenContainerScrollProps>(props)
6
+ const {
7
+ ref,
8
+ overlay,
9
+ blurTop,
10
+ blurBottom,
11
+ screenHeader,
12
+ header,
13
+ footer,
14
+ wrapperStyle,
15
+ bodyStyle,
16
+ outerStyle,
17
+ innerStyle,
18
+ ...scrollViewProps
19
+ } = useScreenContainerProps<ScreenContainerScrollProps>(props)
8
20
 
9
21
  return (
10
22
  <View style={wrapperStyle}>
11
- {header}
12
- <ScrollView
13
- ref={reference}
14
- style={outerStyle}
15
- contentContainerStyle={innerStyle}
16
- {...scrollViewProps}
17
- />
18
- {footer}
23
+ {overlay}
24
+ <View style={bodyStyle}>
25
+ {blurTop}
26
+ {screenHeader}
27
+ {header}
28
+ <ScrollView
29
+ ref={ref}
30
+ style={outerStyle}
31
+ contentContainerStyle={innerStyle}
32
+ {...scrollViewProps}
33
+ />
34
+ {footer}
35
+ {blurBottom}
36
+ </View>
19
37
  </View>
20
38
  )
21
39
  }
@@ -3,20 +3,38 @@ import { useScreenContainerProps } from './screen-container.hooks'
3
3
  import { type ScreenContainerSectionListProps } from './screen-container.types'
4
4
 
5
5
  const ScreenContainerSectionList = <Item,>(props: ScreenContainerSectionListProps<Item>) => {
6
- const { reference, header, footer, wrapperStyle, outerStyle, innerStyle, ...sectionListProps } =
7
- useScreenContainerProps<ScreenContainerSectionListProps<Item>>(props)
6
+ const {
7
+ ref,
8
+ overlay,
9
+ blurTop,
10
+ blurBottom,
11
+ screenHeader,
12
+ header,
13
+ footer,
14
+ wrapperStyle,
15
+ bodyStyle,
16
+ outerStyle,
17
+ innerStyle,
18
+ ...sectionListProps
19
+ } = useScreenContainerProps<ScreenContainerSectionListProps<Item>>(props)
8
20
 
9
21
  return (
10
22
  <View style={wrapperStyle}>
11
- {header}
12
- <SectionList
13
- ref={reference}
14
- style={outerStyle}
15
- contentContainerStyle={innerStyle}
16
- stickySectionHeadersEnabled={false}
17
- {...sectionListProps}
18
- />
19
- {footer}
23
+ {overlay}
24
+ <View style={bodyStyle}>
25
+ {blurTop}
26
+ {screenHeader}
27
+ {header}
28
+ <SectionList
29
+ ref={ref}
30
+ style={outerStyle}
31
+ contentContainerStyle={innerStyle}
32
+ stickySectionHeadersEnabled={false}
33
+ {...sectionListProps}
34
+ />
35
+ {footer}
36
+ {blurBottom}
37
+ </View>
20
38
  </View>
21
39
  )
22
40
  }
@@ -1,5 +1,6 @@
1
1
  import { useMemo } from 'react'
2
2
  import { View } from 'react-native'
3
+ import { BlurProgress } from '../../atoms'
3
4
  import { KeyboardArea, RefreshControl } from '../../molecules'
4
5
  import { useScreenContainerStyles } from './screen-container.styles'
5
6
  import {
@@ -22,49 +23,119 @@ const useScreenContainerProps = <
22
23
  // @ts-ignore
23
24
  refreshing,
24
25
  // internal
26
+ variant = 'base',
27
+ withScroll = true,
28
+ withBlurTop = true,
29
+ withBlurBottom = true,
30
+ withAreaTop = true,
31
+ withAreaBottom = true,
32
+ withIndentTop = true,
33
+ withIndentBottom = true,
25
34
  withOverflowTop = false,
26
35
  withOverflowBottom = false,
27
36
  // native
37
+ overlay: initOverlay,
38
+ screenHeader: initScreenHeader,
28
39
  header: initHeader,
29
40
  footer: initFooter,
30
41
  wrapperStyle,
42
+ bodyStyle,
31
43
  outerStyle,
32
44
  innerStyle,
33
45
  onRefresh,
34
46
  ...props
35
47
  }: Props) => {
36
- const { styles } = useScreenContainerStyles({
37
- withOverflowTop: withOverflowTop || !!initHeader,
38
- withOverflowBottom: withOverflowBottom || !!initFooter,
48
+ const withHeader = !!initHeader
49
+ const withFooter = !!initFooter
50
+
51
+ const { OFFSET, styles, stylesByVariant } = useScreenContainerStyles({
52
+ withScreenHeader: !!initScreenHeader,
53
+ withScreenFooter: false,
54
+ withHeader,
55
+ withFooter,
56
+ withAreaTop,
57
+ withAreaBottom,
58
+ withIndentTop,
59
+ withIndentBottom,
60
+ withOverflowTop,
61
+ withOverflowBottom,
39
62
  })
40
63
 
64
+ const overlay = useMemo(() => {
65
+ return <View style={styles.overlay}>{initOverlay}</View>
66
+ }, [styles.overlay, initOverlay])
67
+
68
+ const screenHeader = useMemo(() => {
69
+ return <View style={styles.screenHeader}>{initScreenHeader}</View>
70
+ }, [styles.screenHeader, initScreenHeader])
71
+
72
+ const blurTop = useMemo(() => {
73
+ return (
74
+ withBlurTop &&
75
+ !withHeader && <BlurProgress direction={'blurredTopClearBottom'} style={styles.blurTop} />
76
+ )
77
+ }, [styles.blurTop, withBlurTop, withHeader])
78
+
79
+ const blurBottom = useMemo(() => {
80
+ return (
81
+ withBlurBottom &&
82
+ !withFooter && <BlurProgress direction={'blurredBottomClearTop'} style={styles.blurBottom} />
83
+ )
84
+ }, [styles.blurBottom, withBlurBottom, withFooter])
85
+
86
+ const headerBlur = useMemo(() => {
87
+ return (
88
+ withBlurTop &&
89
+ withHeader && <BlurProgress direction={'blurredTopClearBottom'} style={styles.headerBlur} />
90
+ )
91
+ }, [styles.headerBlur, withBlurTop, withHeader])
92
+
93
+ const footerBlur = useMemo(() => {
94
+ return (
95
+ withBlurBottom &&
96
+ withFooter && <BlurProgress direction={'blurredBottomClearTop'} style={styles.footerBlur} />
97
+ )
98
+ }, [styles.footerBlur, withBlurBottom, withFooter])
99
+
41
100
  const header = useMemo(() => {
42
- return <View style={styles.header}>{initHeader}</View>
43
- }, [styles.header, initHeader])
101
+ return (
102
+ <View style={styles.header}>
103
+ {headerBlur}
104
+ {initHeader}
105
+ </View>
106
+ )
107
+ }, [styles.header, initHeader, headerBlur])
44
108
 
45
109
  const footer = useMemo(() => {
46
110
  return (
47
111
  <View style={styles.footer}>
112
+ {footerBlur}
48
113
  {initFooter}
49
114
  <KeyboardArea />
50
115
  </View>
51
116
  )
52
- }, [styles.footer, initFooter])
117
+ }, [styles.footer, initFooter, footerBlur])
53
118
 
54
119
  return {
55
120
  ...props,
121
+ overlay,
122
+ screenHeader,
123
+ blurTop,
124
+ blurBottom,
56
125
  header,
57
126
  footer,
58
- wrapperStyle: [styles.wrapper, wrapperStyle],
127
+ wrapperStyle: [styles.wrapper, stylesByVariant[variant], wrapperStyle],
128
+ bodyStyle: [styles.body, bodyStyle],
59
129
  outerStyle: [styles.outer, outerStyle],
60
130
  innerStyle: [styles.inner, innerStyle],
131
+ scrollEnabled: withScroll,
61
132
  showsVerticalScrollIndicator: false,
62
133
  showsHorizontalScrollIndicator: false,
63
134
  keyboardDismissMode: 'interactive',
64
135
  keyboardShouldPersistTaps: 'handled',
65
136
  contentInsetAdjustmentBehavior: 'never',
66
137
  refreshControl: onRefresh ? (
67
- <RefreshControl withOffset={!withOverflowTop && !initHeader} onRefresh={onRefresh} />
138
+ <RefreshControl offset={OFFSET} onRefresh={onRefresh} />
68
139
  ) : undefined,
69
140
  }
70
141
  }
@@ -1,21 +1,53 @@
1
1
  import { StyleSheet } from 'react-native'
2
- import { useSafeArea } from '../../../hooks'
3
- import { useThemeMode } from '../../../lib'
2
+ import { useNavigationSafeArea, useThemeMode } from '../../../lib'
4
3
  import { type ScreenContainerStylesConfig } from './screen-container.types'
5
4
 
5
+ // TODO: Может быть добавить блюр на with overflow true. Половину Intent Забрать уврапера и дать для инера.
6
6
  const useScreenContainerStyles = ({
7
+ withScreenHeader,
8
+ withScreenFooter,
9
+ withHeader,
10
+ withFooter,
11
+ withAreaTop,
12
+ withAreaBottom,
13
+ withIndentTop,
14
+ withIndentBottom,
7
15
  withOverflowTop,
8
16
  withOverflowBottom,
9
17
  }: ScreenContainerStylesConfig) => {
10
- const { COLORS } = useThemeMode()
11
- const { TOP, BOTTOM } = useSafeArea()
18
+ const withTop = withOverflowTop || withHeader
19
+ const withBottom = withOverflowBottom || withFooter
20
+
21
+ const { COLORS, SIZES } = useThemeMode()
22
+ const { TOP, BOTTOM, HEADER, FOOTER } = useNavigationSafeArea()
23
+
24
+ const OFFSET = withTop
25
+ ? 0
26
+ : (withScreenHeader ? HEADER : 0) + (withAreaTop ? TOP : 0) + (withIndentTop ? SIZES['2XL'] : 0)
27
+
28
+ const TOP_AREA = withAreaTop ? TOP : 0
29
+ const BOTTOM_AREA = withAreaBottom ? BOTTOM : 0
30
+
31
+ const TOP_INSET = withScreenHeader ? TOP_AREA + HEADER : TOP_AREA
32
+ const BOTTOM_INSET = withScreenFooter ? BOTTOM_AREA + FOOTER : BOTTOM_AREA
33
+
34
+ const WRAPPER_INTEND_TOP = withIndentTop ? SIZES['2XL'] : 0
35
+ const WRAPPER_INTEND_BOTTOM = withIndentBottom ? SIZES['2XL'] : 0
36
+
37
+ const INNER_INTEND_TOP = withHeader ? SIZES['L'] : 0
38
+ const INNER_INTEND_BOTTOM = withFooter ? SIZES['L'] : 0
39
+
40
+ const INNER_AREA_TOP = withIndentTop ? SIZES['2XL'] : 0
41
+ const INNER_AREA_BOTTOM = withIndentBottom ? SIZES['2XL'] : 0
12
42
 
13
43
  const styles = StyleSheet.create({
14
44
  wrapper: {
15
45
  flex: 1,
16
- paddingTop: withOverflowTop ? TOP + 16 : 0,
17
- paddingBottom: withOverflowBottom ? BOTTOM + 16 : 0,
18
- backgroundColor: COLORS.FILL.BASE,
46
+ },
47
+ body: {
48
+ flex: 1,
49
+ paddingTop: withTop ? TOP_INSET + WRAPPER_INTEND_TOP : 0,
50
+ paddingBottom: withBottom ? BOTTOM_INSET + WRAPPER_INTEND_BOTTOM : 0,
19
51
  },
20
52
  outer: {
21
53
  zIndex: 1,
@@ -23,23 +55,81 @@ const useScreenContainerStyles = ({
23
55
  },
24
56
  inner: {
25
57
  flexGrow: 1,
26
- paddingTop: withOverflowTop ? 8 : TOP + 16,
27
- paddingBottom: withOverflowBottom ? 8 : BOTTOM + 16,
28
- paddingHorizontal: 16,
58
+ paddingTop: withTop ? INNER_INTEND_TOP : TOP_INSET + INNER_AREA_TOP,
59
+ paddingBottom: withBottom ? INNER_INTEND_BOTTOM : BOTTOM_INSET + INNER_AREA_BOTTOM,
60
+ paddingHorizontal: SIZES['2XL'],
61
+ },
62
+ overlay: {
63
+ position: 'absolute',
64
+ zIndex: 0,
65
+ top: 0,
66
+ left: 0,
67
+ right: 0,
68
+ bottom: 0,
69
+ },
70
+ screenHeader: {
71
+ zIndex: 2,
72
+ position: 'absolute',
73
+ top: 0,
74
+ left: 0,
75
+ right: 0,
76
+ paddingHorizontal: SIZES['2XL'],
77
+ },
78
+ screenFooter: {},
79
+ blurTop: {
80
+ zIndex: 2,
81
+ position: 'absolute',
82
+ top: 0,
83
+ left: 0,
84
+ right: 0,
85
+ height: TOP_INSET + INNER_AREA_TOP,
86
+ },
87
+ blurBottom: {
88
+ zIndex: 2,
89
+ position: 'absolute',
90
+ bottom: 0,
91
+ left: 0,
92
+ right: 0,
93
+ height: BOTTOM_INSET + INNER_AREA_BOTTOM,
29
94
  },
30
95
  header: {
31
96
  zIndex: 2,
32
- paddingBottom: withOverflowTop ? 8 : 0,
33
- paddingHorizontal: 16,
97
+ paddingBottom: withHeader ? SIZES['L'] : 0,
98
+ paddingHorizontal: SIZES['2XL'],
34
99
  },
35
100
  footer: {
36
101
  zIndex: 2,
37
- paddingTop: withOverflowBottom ? 8 : 0,
38
- paddingHorizontal: 16,
102
+ paddingTop: withFooter ? SIZES['L'] : 0,
103
+ paddingHorizontal: SIZES['2XL'],
104
+ },
105
+ headerBlur: {
106
+ zIndex: 2,
107
+ position: 'absolute',
108
+ top: SIZES['MAX'],
109
+ left: 0,
110
+ right: 0,
111
+ height: INNER_INTEND_TOP + SIZES['L'],
112
+ },
113
+ footerBlur: {
114
+ zIndex: 2,
115
+ position: 'absolute',
116
+ bottom: SIZES['MAX'],
117
+ left: 0,
118
+ right: 0,
119
+ height: INNER_INTEND_BOTTOM + SIZES['L'],
120
+ },
121
+ })
122
+
123
+ const stylesByVariant = StyleSheet.create({
124
+ base: {
125
+ backgroundColor: COLORS.BACKGROUND.BASE,
126
+ },
127
+ secondary: {
128
+ backgroundColor: COLORS.BACKGROUND.SECONDARY,
39
129
  },
40
130
  })
41
131
 
42
- return { styles }
132
+ return { OFFSET, styles, stylesByVariant }
43
133
  }
44
134
 
45
135
  export { useScreenContainerStyles }