react-native-terra-ui 0.1.0 → 0.2.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 (304) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/lib/module/components/avatar/Avatar.js +118 -35
  3. package/lib/module/components/avatar/Avatar.js.map +1 -1
  4. package/lib/module/components/avatar/index.js.map +1 -1
  5. package/lib/module/components/box/Box.js +15 -2
  6. package/lib/module/components/box/Box.js.map +1 -1
  7. package/lib/module/components/box/index.js.map +1 -1
  8. package/lib/module/components/box/utils.js +5 -2
  9. package/lib/module/components/box/utils.js.map +1 -1
  10. package/lib/module/components/button/Button.js +7 -14
  11. package/lib/module/components/button/Button.js.map +1 -1
  12. package/lib/module/components/button/index.js.map +1 -1
  13. package/lib/module/components/chip/Chip.js +372 -0
  14. package/lib/module/components/chip/Chip.js.map +1 -0
  15. package/lib/module/components/chip/index.js +4 -0
  16. package/lib/module/components/chip/index.js.map +1 -0
  17. package/lib/module/components/chip/types.js +2 -0
  18. package/lib/module/components/chip/types.js.map +1 -0
  19. package/lib/module/components/chip/utils.js +36 -0
  20. package/lib/module/components/chip/utils.js.map +1 -0
  21. package/lib/module/components/empty-state/EmptyState.js +200 -0
  22. package/lib/module/components/empty-state/EmptyState.js.map +1 -0
  23. package/lib/module/components/empty-state/index.js +4 -0
  24. package/lib/module/components/empty-state/index.js.map +1 -0
  25. package/lib/module/components/empty-state/types.js +2 -0
  26. package/lib/module/components/empty-state/types.js.map +1 -0
  27. package/lib/module/components/header/Header.js.map +1 -1
  28. package/lib/module/components/header/header-buttons.js +31 -36
  29. package/lib/module/components/header/header-buttons.js.map +1 -1
  30. package/lib/module/components/header/index.js +1 -1
  31. package/lib/module/components/header/index.js.map +1 -1
  32. package/lib/module/components/header/parts/HeaderGradientOverlay.js +38 -0
  33. package/lib/module/components/header/parts/HeaderGradientOverlay.js.map +1 -0
  34. package/lib/module/components/header/variants/LargeTitleHeader/index.js +71 -101
  35. package/lib/module/components/header/variants/LargeTitleHeader/index.js.map +1 -1
  36. package/lib/module/components/header/variants/TitleHeader/index.js +34 -65
  37. package/lib/module/components/header/variants/TitleHeader/index.js.map +1 -1
  38. package/lib/module/components/icon/Icon.js +21 -9
  39. package/lib/module/components/icon/Icon.js.map +1 -1
  40. package/lib/module/components/icon/index.js.map +1 -1
  41. package/lib/module/components/image/Image.js +54 -0
  42. package/lib/module/components/image/Image.js.map +1 -0
  43. package/lib/module/components/image/index.js +4 -0
  44. package/lib/module/components/image/index.js.map +1 -0
  45. package/lib/module/components/image/types.js +4 -0
  46. package/lib/module/components/image/types.js.map +1 -0
  47. package/lib/module/components/index.js +4 -0
  48. package/lib/module/components/index.js.map +1 -1
  49. package/lib/module/components/page-indicator/PageIndicator.js.map +1 -1
  50. package/lib/module/components/page-indicator/PageIndicatorRoot.js.map +1 -1
  51. package/lib/module/components/page-indicator/hooks/use-page-indicator-colors.js +1 -1
  52. package/lib/module/components/page-indicator/hooks/use-page-indicator-colors.js.map +1 -1
  53. package/lib/module/components/page-indicator/hooks/use-page-indicator-core.js.map +1 -1
  54. package/lib/module/components/page-indicator/hooks/use-page-indicator-progress.js.map +1 -1
  55. package/lib/module/components/page-indicator/index.js.map +1 -1
  56. package/lib/module/components/page-indicator/variants/DotIndicator/InactiveDot.js.map +1 -1
  57. package/lib/module/components/page-indicator/variants/DotIndicator/LoadingOrbit.js.map +1 -1
  58. package/lib/module/components/page-indicator/variants/DotIndicator/TravelingPill.js.map +1 -1
  59. package/lib/module/components/page-indicator/variants/DotIndicator/index.js.map +1 -1
  60. package/lib/module/components/page-indicator/variants/PillIndicator/PillIndicatorDot.js.map +1 -1
  61. package/lib/module/components/page-indicator/variants/PillIndicator/index.js.map +1 -1
  62. package/lib/module/components/portal/Portal.js +42 -0
  63. package/lib/module/components/portal/Portal.js.map +1 -0
  64. package/lib/module/components/portal/PortalContext.js +1 -16
  65. package/lib/module/components/portal/PortalContext.js.map +1 -1
  66. package/lib/module/components/portal/PortalHost.js +16 -14
  67. package/lib/module/components/portal/PortalHost.js.map +1 -1
  68. package/lib/module/components/portal/PortalProvider.js +51 -19
  69. package/lib/module/components/portal/PortalProvider.js.map +1 -1
  70. package/lib/module/components/portal/index.js +1 -1
  71. package/lib/module/components/portal/index.js.map +1 -1
  72. package/lib/module/components/screen/Screen.js +26 -29
  73. package/lib/module/components/screen/Screen.js.map +1 -1
  74. package/lib/module/components/screen/ScreenContext.js +7 -5
  75. package/lib/module/components/screen/ScreenContext.js.map +1 -1
  76. package/lib/module/components/screen/ScreenFlashList.js +144 -0
  77. package/lib/module/components/screen/ScreenFlashList.js.map +1 -0
  78. package/lib/module/components/screen/ScreenFlatList.js +88 -27
  79. package/lib/module/components/screen/ScreenFlatList.js.map +1 -1
  80. package/lib/module/components/screen/ScreenScrollView.js +101 -34
  81. package/lib/module/components/screen/ScreenScrollView.js.map +1 -1
  82. package/lib/module/components/screen/index.js +1 -0
  83. package/lib/module/components/screen/index.js.map +1 -1
  84. package/lib/module/components/screen/parts/BottomSafeArea.js +62 -0
  85. package/lib/module/components/screen/parts/BottomSafeArea.js.map +1 -0
  86. package/lib/module/components/screen/parts/ScreenPlaceholder.js +50 -0
  87. package/lib/module/components/screen/parts/ScreenPlaceholder.js.map +1 -0
  88. package/lib/module/components/screen/types.js +4 -0
  89. package/lib/module/components/screen/types.js.map +1 -0
  90. package/lib/module/components/screen/utils.js +12 -9
  91. package/lib/module/components/screen/utils.js.map +1 -1
  92. package/lib/module/components/slot/Slot.js.map +1 -1
  93. package/lib/module/components/slot/index.js.map +1 -1
  94. package/lib/module/components/spinner/Spinner.js +1 -1
  95. package/lib/module/components/spinner/Spinner.js.map +1 -1
  96. package/lib/module/components/spinner/index.js.map +1 -1
  97. package/lib/module/components/surface/Surface.js +16 -9
  98. package/lib/module/components/surface/Surface.js.map +1 -1
  99. package/lib/module/components/surface/index.js.map +1 -1
  100. package/lib/module/components/text/Text.js +25 -7
  101. package/lib/module/components/text/Text.js.map +1 -1
  102. package/lib/module/components/text/index.js.map +1 -1
  103. package/lib/module/components/toast/Toast.js +8 -8
  104. package/lib/module/components/toast/Toast.js.map +1 -1
  105. package/lib/module/components/toast/ToastProvider.js.map +1 -1
  106. package/lib/module/components/toast/index.js.map +1 -1
  107. package/lib/module/components/toolbar/Toolbar.js +268 -0
  108. package/lib/module/components/toolbar/Toolbar.js.map +1 -0
  109. package/lib/module/components/toolbar/index.js +4 -0
  110. package/lib/module/components/toolbar/index.js.map +1 -0
  111. package/lib/module/context/ThemeProvider.js +5 -2
  112. package/lib/module/context/ThemeProvider.js.map +1 -1
  113. package/lib/module/context/index.js.map +1 -1
  114. package/lib/module/index.js.map +1 -1
  115. package/lib/module/{components/icon/utils.js → theme/defaults/icons.js} +1 -1
  116. package/lib/module/theme/defaults/icons.js.map +1 -0
  117. package/lib/module/theme/defaults/image.js +30 -0
  118. package/lib/module/theme/defaults/image.js.map +1 -0
  119. package/lib/module/theme/index.js +6 -6
  120. package/lib/module/theme/index.js.map +1 -1
  121. package/lib/module/theme/{configure.js → registry.js} +23 -30
  122. package/lib/module/theme/registry.js.map +1 -0
  123. package/lib/module/theme/runtime.js +1 -1
  124. package/lib/module/theme/runtime.js.map +1 -1
  125. package/lib/module/theme/theme.js +92 -11
  126. package/lib/module/theme/theme.js.map +1 -1
  127. package/lib/module/theme/tokens/dark.js +59 -68
  128. package/lib/module/theme/tokens/dark.js.map +1 -1
  129. package/lib/module/theme/tokens/light.js +49 -67
  130. package/lib/module/theme/tokens/light.js.map +1 -1
  131. package/lib/module/theme/tokens/primitives.js +241 -20
  132. package/lib/module/theme/tokens/primitives.js.map +1 -1
  133. package/lib/module/utils/accent-utils.js +4 -4
  134. package/lib/module/utils/accent-utils.js.map +1 -1
  135. package/lib/typescript/src/components/avatar/Avatar.d.ts.map +1 -1
  136. package/lib/typescript/src/components/avatar/types.d.ts +5 -5
  137. package/lib/typescript/src/components/avatar/types.d.ts.map +1 -1
  138. package/lib/typescript/src/components/box/Box.d.ts.map +1 -1
  139. package/lib/typescript/src/components/box/utils.d.ts +6 -1
  140. package/lib/typescript/src/components/box/utils.d.ts.map +1 -1
  141. package/lib/typescript/src/components/button/Button.d.ts +2 -2
  142. package/lib/typescript/src/components/button/Button.d.ts.map +1 -1
  143. package/lib/typescript/src/components/chip/Chip.d.ts +24 -0
  144. package/lib/typescript/src/components/chip/Chip.d.ts.map +1 -0
  145. package/lib/typescript/src/components/chip/index.d.ts +4 -0
  146. package/lib/typescript/src/components/chip/index.d.ts.map +1 -0
  147. package/lib/typescript/src/components/chip/types.d.ts +8 -0
  148. package/lib/typescript/src/components/chip/types.d.ts.map +1 -0
  149. package/lib/typescript/src/components/chip/utils.d.ts +8 -0
  150. package/lib/typescript/src/components/chip/utils.d.ts.map +1 -0
  151. package/lib/typescript/src/components/empty-state/EmptyState.d.ts +45 -0
  152. package/lib/typescript/src/components/empty-state/EmptyState.d.ts.map +1 -0
  153. package/lib/typescript/src/components/empty-state/index.d.ts +4 -0
  154. package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -0
  155. package/lib/typescript/src/components/empty-state/types.d.ts +6 -0
  156. package/lib/typescript/src/components/empty-state/types.d.ts.map +1 -0
  157. package/lib/typescript/src/components/header/header-buttons.d.ts +27 -0
  158. package/lib/typescript/src/components/header/header-buttons.d.ts.map +1 -1
  159. package/lib/typescript/src/components/header/index.d.ts +1 -1
  160. package/lib/typescript/src/components/header/index.d.ts.map +1 -1
  161. package/lib/typescript/src/components/header/parts/HeaderGradientOverlay.d.ts +7 -0
  162. package/lib/typescript/src/components/header/parts/HeaderGradientOverlay.d.ts.map +1 -0
  163. package/lib/typescript/src/components/header/variants/LargeTitleHeader/index.d.ts +1 -1
  164. package/lib/typescript/src/components/header/variants/LargeTitleHeader/index.d.ts.map +1 -1
  165. package/lib/typescript/src/components/header/variants/TitleHeader/index.d.ts +19 -8
  166. package/lib/typescript/src/components/header/variants/TitleHeader/index.d.ts.map +1 -1
  167. package/lib/typescript/src/components/icon/Icon.d.ts +1 -1
  168. package/lib/typescript/src/components/icon/Icon.d.ts.map +1 -1
  169. package/lib/typescript/src/components/image/Image.d.ts +16 -0
  170. package/lib/typescript/src/components/image/Image.d.ts.map +1 -0
  171. package/lib/typescript/src/components/image/index.d.ts +3 -0
  172. package/lib/typescript/src/components/image/index.d.ts.map +1 -0
  173. package/lib/typescript/src/components/image/types.d.ts +7 -0
  174. package/lib/typescript/src/components/image/types.d.ts.map +1 -0
  175. package/lib/typescript/src/components/index.d.ts +4 -0
  176. package/lib/typescript/src/components/index.d.ts.map +1 -1
  177. package/lib/typescript/src/components/page-indicator/PageIndicator.d.ts +1 -1
  178. package/lib/typescript/src/components/page-indicator/hooks/use-page-indicator-colors.d.ts +1 -1
  179. package/lib/typescript/src/components/page-indicator/variants/DotIndicator/index.d.ts +1 -1
  180. package/lib/typescript/src/components/page-indicator/variants/PillIndicator/index.d.ts +1 -1
  181. package/lib/typescript/src/components/portal/Portal.d.ts +26 -0
  182. package/lib/typescript/src/components/portal/Portal.d.ts.map +1 -0
  183. package/lib/typescript/src/components/portal/PortalContext.d.ts +11 -14
  184. package/lib/typescript/src/components/portal/PortalContext.d.ts.map +1 -1
  185. package/lib/typescript/src/components/portal/PortalHost.d.ts +9 -4
  186. package/lib/typescript/src/components/portal/PortalHost.d.ts.map +1 -1
  187. package/lib/typescript/src/components/portal/PortalProvider.d.ts +3 -3
  188. package/lib/typescript/src/components/portal/PortalProvider.d.ts.map +1 -1
  189. package/lib/typescript/src/components/portal/index.d.ts +4 -2
  190. package/lib/typescript/src/components/portal/index.d.ts.map +1 -1
  191. package/lib/typescript/src/components/screen/Screen.d.ts +19 -14
  192. package/lib/typescript/src/components/screen/Screen.d.ts.map +1 -1
  193. package/lib/typescript/src/components/screen/ScreenContext.d.ts +12 -9
  194. package/lib/typescript/src/components/screen/ScreenContext.d.ts.map +1 -1
  195. package/lib/typescript/src/components/screen/ScreenFlashList.d.ts +43 -0
  196. package/lib/typescript/src/components/screen/ScreenFlashList.d.ts.map +1 -0
  197. package/lib/typescript/src/components/screen/ScreenFlatList.d.ts +17 -7
  198. package/lib/typescript/src/components/screen/ScreenFlatList.d.ts.map +1 -1
  199. package/lib/typescript/src/components/screen/ScreenScrollView.d.ts +51 -16
  200. package/lib/typescript/src/components/screen/ScreenScrollView.d.ts.map +1 -1
  201. package/lib/typescript/src/components/screen/index.d.ts +3 -0
  202. package/lib/typescript/src/components/screen/index.d.ts.map +1 -1
  203. package/lib/typescript/src/components/screen/parts/BottomSafeArea.d.ts +30 -0
  204. package/lib/typescript/src/components/screen/parts/BottomSafeArea.d.ts.map +1 -0
  205. package/lib/typescript/src/components/screen/parts/ScreenPlaceholder.d.ts +22 -0
  206. package/lib/typescript/src/components/screen/parts/ScreenPlaceholder.d.ts.map +1 -0
  207. package/lib/typescript/src/components/screen/types.d.ts +42 -0
  208. package/lib/typescript/src/components/screen/types.d.ts.map +1 -0
  209. package/lib/typescript/src/components/screen/utils.d.ts +9 -9
  210. package/lib/typescript/src/components/screen/utils.d.ts.map +1 -1
  211. package/lib/typescript/src/components/spinner/Spinner.d.ts +1 -1
  212. package/lib/typescript/src/components/surface/Surface.d.ts +8 -1
  213. package/lib/typescript/src/components/surface/Surface.d.ts.map +1 -1
  214. package/lib/typescript/src/components/text/Text.d.ts +1 -1
  215. package/lib/typescript/src/components/text/Text.d.ts.map +1 -1
  216. package/lib/typescript/src/components/toast/Toast.d.ts +1 -1
  217. package/lib/typescript/src/components/toolbar/Toolbar.d.ts +115 -0
  218. package/lib/typescript/src/components/toolbar/Toolbar.d.ts.map +1 -0
  219. package/lib/typescript/src/components/toolbar/index.d.ts +3 -0
  220. package/lib/typescript/src/components/toolbar/index.d.ts.map +1 -0
  221. package/lib/typescript/src/context/ThemeProvider.d.ts.map +1 -1
  222. package/lib/typescript/src/{components/icon/utils.d.ts → theme/defaults/icons.d.ts} +2 -2
  223. package/lib/typescript/src/theme/defaults/icons.d.ts.map +1 -0
  224. package/lib/typescript/src/theme/defaults/image.d.ts +4 -0
  225. package/lib/typescript/src/theme/defaults/image.d.ts.map +1 -0
  226. package/lib/typescript/src/theme/index.d.ts +7 -7
  227. package/lib/typescript/src/theme/index.d.ts.map +1 -1
  228. package/lib/typescript/src/theme/{configure.d.ts → registry.d.ts} +1 -1
  229. package/lib/typescript/src/theme/registry.d.ts.map +1 -0
  230. package/lib/typescript/src/theme/theme.d.ts +21 -1
  231. package/lib/typescript/src/theme/theme.d.ts.map +1 -1
  232. package/lib/typescript/src/theme/tokens/dark.d.ts +41 -64
  233. package/lib/typescript/src/theme/tokens/dark.d.ts.map +1 -1
  234. package/lib/typescript/src/theme/tokens/light.d.ts +44 -65
  235. package/lib/typescript/src/theme/tokens/light.d.ts.map +1 -1
  236. package/lib/typescript/src/theme/tokens/primitives.d.ts +228 -17
  237. package/lib/typescript/src/theme/tokens/primitives.d.ts.map +1 -1
  238. package/lib/typescript/src/theme/types.d.ts +66 -36
  239. package/lib/typescript/src/theme/types.d.ts.map +1 -1
  240. package/lib/typescript/src/utils/accent-utils.d.ts +1 -1
  241. package/lib/typescript/src/utils/resolve-theme-color.d.ts +1 -1
  242. package/lib/typescript/src/utils/typography.d.ts +1 -1
  243. package/package.json +28 -12
  244. package/skills/terra-ui/SKILL.md +193 -0
  245. package/skills/terra-ui/references/recipes.md +198 -0
  246. package/skills/terra-ui/references/troubleshooting.md +112 -0
  247. package/src/components/avatar/Avatar.tsx +128 -38
  248. package/src/components/avatar/types.ts +5 -5
  249. package/src/components/box/Box.tsx +13 -1
  250. package/src/components/box/utils.ts +10 -0
  251. package/src/components/button/Button.tsx +7 -15
  252. package/src/components/chip/Chip.tsx +444 -0
  253. package/src/components/chip/index.ts +3 -0
  254. package/src/components/chip/types.ts +15 -0
  255. package/src/components/chip/utils.ts +34 -0
  256. package/src/components/empty-state/EmptyState.tsx +209 -0
  257. package/src/components/empty-state/index.ts +3 -0
  258. package/src/components/empty-state/types.ts +5 -0
  259. package/src/components/header/header-buttons.tsx +33 -45
  260. package/src/components/header/index.ts +2 -0
  261. package/src/components/header/parts/HeaderGradientOverlay.tsx +29 -0
  262. package/src/components/header/variants/LargeTitleHeader/index.tsx +68 -102
  263. package/src/components/header/variants/TitleHeader/index.tsx +47 -56
  264. package/src/components/icon/Icon.tsx +20 -15
  265. package/src/components/image/Image.tsx +48 -0
  266. package/src/components/image/index.ts +2 -0
  267. package/src/components/image/types.ts +7 -0
  268. package/src/components/index.ts +4 -0
  269. package/src/components/portal/Portal.tsx +55 -0
  270. package/src/components/portal/PortalContext.tsx +14 -22
  271. package/src/components/portal/PortalHost.tsx +17 -10
  272. package/src/components/portal/PortalProvider.tsx +58 -21
  273. package/src/components/portal/index.ts +4 -2
  274. package/src/components/screen/Screen.tsx +45 -59
  275. package/src/components/screen/ScreenContext.tsx +19 -12
  276. package/src/components/screen/ScreenFlashList.tsx +196 -0
  277. package/src/components/screen/ScreenFlatList.tsx +100 -39
  278. package/src/components/screen/ScreenScrollView.tsx +114 -53
  279. package/src/components/screen/index.ts +3 -0
  280. package/src/components/screen/parts/BottomSafeArea.tsx +60 -0
  281. package/src/components/screen/parts/ScreenPlaceholder.tsx +55 -0
  282. package/src/components/screen/types.ts +43 -0
  283. package/src/components/screen/utils.ts +29 -15
  284. package/src/components/surface/Surface.tsx +17 -20
  285. package/src/components/text/Text.tsx +23 -5
  286. package/src/components/toast/Toast.tsx +8 -8
  287. package/src/components/toolbar/Toolbar.tsx +353 -0
  288. package/src/components/toolbar/index.ts +6 -0
  289. package/src/context/ThemeProvider.tsx +5 -4
  290. package/src/{components/icon/utils.tsx → theme/defaults/icons.tsx} +1 -1
  291. package/src/theme/defaults/image.tsx +34 -0
  292. package/src/theme/index.ts +1 -1
  293. package/src/theme/{configure.ts → registry.ts} +19 -34
  294. package/src/theme/runtime.ts +1 -1
  295. package/src/theme/theme.ts +127 -13
  296. package/src/theme/tokens/dark.ts +60 -69
  297. package/src/theme/tokens/light.ts +50 -68
  298. package/src/theme/tokens/primitives.ts +248 -20
  299. package/src/theme/types.ts +67 -35
  300. package/src/utils/accent-utils.ts +4 -4
  301. package/lib/module/components/icon/utils.js.map +0 -1
  302. package/lib/module/theme/configure.js.map +0 -1
  303. package/lib/typescript/src/components/icon/utils.d.ts.map +0 -1
  304. package/lib/typescript/src/theme/configure.d.ts.map +0 -1
@@ -1,70 +1,104 @@
1
1
  "use strict";
2
2
 
3
- import { createElement, isValidElement } from 'react';
4
3
  import { View } from 'react-native';
5
4
  import Animated, { useAnimatedScrollHandler, useComposedEventHandler } from 'react-native-reanimated';
6
- import { useSafeAreaInsets } from 'react-native-safe-area-context';
7
- import { useUnistyles } from 'react-native-unistyles';
5
+ import { StyleSheet } from 'react-native-unistyles';
8
6
  import { PortalHost } from "../portal/index.js";
9
- import { useScreen } from "./ScreenContext.js";
10
- import { resolveScreenContentInsets } from "./utils.js";
11
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
- function renderListHeader(ListHeaderComponent) {
13
- if (!ListHeaderComponent) return null;
14
- if (/*#__PURE__*/isValidElement(ListHeaderComponent)) return ListHeaderComponent;
15
- return /*#__PURE__*/createElement(ListHeaderComponent);
16
- }
17
-
7
+ import { BottomSafeArea } from "./parts/BottomSafeArea.js";
8
+ import { renderScreenPlaceholder } from "./parts/ScreenPlaceholder.js";
9
+ import { SCREEN_HEADER_PORTAL_HOST, useScreen } from "./ScreenContext.js";
10
+ import { hasXMargin, hasYMargin, renderListHeader } from "./utils.js";
11
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
18
12
  /**
19
13
  * `FlatList` variant of `Screen.ScrollView`: binds the screen's shared scroll
20
14
  * ref, mirrors offset into `scrollY`, hosts the portal target above the list,
21
15
  * and applies token-driven content padding.
22
16
  *
17
+ * Shares `loading` / `LoadingComponent` / `EmptyComponent` / `margins` /
18
+ * `horizontal` with `Screen.ScrollView`, so a screen can swap one container for
19
+ * another without relearning its API.
20
+ *
23
21
  * @example
24
22
  * ```tsx
25
23
  * <Screen.FlatList data={items} renderItem={({ item }) => <Row item={item} />} />
26
24
  * ```
25
+ *
26
+ * @example Loading and empty placeholders
27
+ * ```tsx
28
+ * <Screen.FlatList
29
+ * data={items}
30
+ * loading={isLoading}
31
+ * EmptyComponent={<EmptyState icon="status.info" title="Nothing yet" fill />}
32
+ * renderItem={({ item }) => <Row item={item} />}
33
+ * />
34
+ * ```
27
35
  */
28
36
  export function ScreenFlatList({
37
+ data,
29
38
  style,
30
39
  contentContainerStyle,
31
40
  ListHeaderComponent,
41
+ ListFooterComponent,
42
+ ListEmptyComponent,
43
+ horizontal = false,
44
+ loading = false,
45
+ LoadingComponent,
46
+ EmptyComponent,
32
47
  margins,
33
48
  bottomInset,
34
49
  onScroll,
35
50
  ...rest
36
51
  }) {
37
52
  const {
38
- theme
39
- } = useUnistyles();
40
- const {
41
- top
42
- } = useSafeAreaInsets();
43
- const {
53
+ background,
44
54
  scrollRef,
45
55
  scrollHandler,
46
56
  headerSnapOffsets,
47
57
  margins: screenMargins,
48
58
  hasHeader
49
59
  } = useScreen();
50
- const margin = theme.layout.screen.margin;
51
- const marginsEnabled = margins ?? screenMargins;
52
- const compactHeaderHeight = hasHeader ? top + theme.layout.header.height : 0;
53
- const {
54
- contentPadding
55
- } = resolveScreenContentInsets(margin, marginsEnabled, bottomInset, compactHeaderHeight);
60
+ const resolvedMargins = margins ?? screenMargins;
61
+ // The placeholder rides in on `ListEmptyComponent` rather than replacing the
62
+ // list, so the header portal, scroll binding and snap offsets all stay put.
63
+ // While loading the list is fed an empty `data` so that slot is the one that
64
+ // renders.
65
+ const placeholder = renderScreenPlaceholder({
66
+ loading,
67
+ LoadingComponent,
68
+ EmptyComponent,
69
+ isEmpty: !data || data.length === 0
70
+ });
56
71
  const jsScrollHandler = useAnimatedScrollHandler(event => {
57
72
  if (onScroll) onScroll(event);
58
73
  }, [onScroll]);
59
74
  const composedHandler = useComposedEventHandler([scrollHandler, jsScrollHandler]);
75
+
76
+ // A caller naming its own `bottomInset` has taken the bottom over entirely,
77
+ // and a horizontal list has no bottom edge to clear.
78
+ const needsBottomSafeArea = bottomInset === undefined && !horizontal;
79
+ const footerComponent = /*#__PURE__*/_jsxs(_Fragment, {
80
+ children: [renderListHeader(ListFooterComponent), needsBottomSafeArea ? /*#__PURE__*/_jsx(BottomSafeArea, {}) : null]
81
+ });
60
82
  const headerComponent = /*#__PURE__*/_jsxs(View, {
61
- children: [/*#__PURE__*/_jsx(PortalHost, {}), renderListHeader(ListHeaderComponent)]
83
+ style: styles.headerWrapper(resolvedMargins),
84
+ children: [hasHeader ? /*#__PURE__*/_jsx(View, {
85
+ style: styles.header
86
+ }) : null, /*#__PURE__*/_jsx(PortalHost, {
87
+ name: SCREEN_HEADER_PORTAL_HOST
88
+ }), renderListHeader(ListHeaderComponent)]
62
89
  });
63
90
  return /*#__PURE__*/_jsx(Animated.FlatList, {
64
91
  ref: scrollRef,
65
- style: style,
66
- contentContainerStyle: [contentPadding, contentContainerStyle],
92
+ data: loading ? [] : data,
93
+ style: [{
94
+ backgroundColor: background
95
+ }, style],
96
+ horizontal: horizontal,
97
+ contentInsetAdjustmentBehavior: hasHeader ? 'never' : undefined,
98
+ contentContainerStyle: [styles.content(resolvedMargins, hasHeader, bottomInset), contentContainerStyle],
67
99
  ListHeaderComponent: headerComponent,
100
+ ListFooterComponent: footerComponent,
101
+ ListEmptyComponent: placeholder ?? ListEmptyComponent,
68
102
  showsVerticalScrollIndicator: false,
69
103
  scrollEventThrottle: 16,
70
104
  snapToOffsets: headerSnapOffsets,
@@ -72,4 +106,31 @@ export function ScreenFlatList({
72
106
  onScroll: composedHandler
73
107
  });
74
108
  }
109
+ const styles = StyleSheet.create((theme, runtime) => ({
110
+ scrollContent: {
111
+ flexGrow: 1
112
+ },
113
+ content: (margins, hasHeader, bottomInset) => ({
114
+ flexGrow: 1,
115
+ // The header is absolutely positioned, so the list reserves its full
116
+ // height — bar plus top safe area. This assumes the scroll view does not
117
+ // also get UIKit's automatic inset adjustment: on a native tab screen
118
+ // that means `disableAutomaticContentInsets` on the tab, or the two
119
+ // insets are counted twice.
120
+ paddingTop: (hasHeader ? theme.layout.header.height + runtime.insets.top : 0) + (hasYMargin(margins) ? theme.layout.screen.margin.y : 0),
121
+ paddingHorizontal: hasXMargin(margins) ? theme.layout.screen.margin.x : 0,
122
+ // The safe area is `BottomSafeArea`'s job; counting it here as well would
123
+ // leave a gap the height of the gesture bar.
124
+ paddingBottom: bottomInset ?? (hasYMargin(margins) ? theme.layout.screen.margin.y : 0)
125
+ }),
126
+ safeArea: {
127
+ height: runtime.insets.top
128
+ },
129
+ headerWrapper: margins => ({
130
+ marginHorizontal: hasXMargin(margins) ? -theme.layout.screen.margin.x : 0
131
+ }),
132
+ header: {
133
+ height: theme.layout.header.height
134
+ }
135
+ }));
75
136
  //# sourceMappingURL=ScreenFlatList.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createElement","isValidElement","View","Animated","useAnimatedScrollHandler","useComposedEventHandler","useSafeAreaInsets","useUnistyles","PortalHost","useScreen","resolveScreenContentInsets","jsx","_jsx","jsxs","_jsxs","renderListHeader","ListHeaderComponent","ScreenFlatList","style","contentContainerStyle","margins","bottomInset","onScroll","rest","theme","top","scrollRef","scrollHandler","headerSnapOffsets","screenMargins","hasHeader","margin","layout","screen","marginsEnabled","compactHeaderHeight","header","height","contentPadding","jsScrollHandler","event","composedHandler","headerComponent","children","FlatList","ref","showsVerticalScrollIndicator","scrollEventThrottle","snapToOffsets"],"sourceRoot":"../../../../src","sources":["components/screen/ScreenFlatList.tsx"],"mappings":";;AAAA,SACEA,aAAa,EAEbC,cAAc,QAET,OAAO;AACd,SAIEC,IAAI,QACC,cAAc;AAErB,OAAOC,QAAQ,IAEbC,wBAAwB,EACxBC,uBAAuB,QAClB,yBAAyB;AAChC,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,YAAY,QAAQ,wBAAwB;AAErD,SAASC,UAAU,QAAQ,oBAAW;AACtC,SAASC,SAAS,QAAQ,oB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MmB,eAAe,GAAGpC,uBAAuB,CAAC,CAC9CsB,aAAa,EACbY,eAAe,CAChB,CAAC;EAEF,MAAMG,eAAe,gBACnB5B,KAAA,CAACZ,IAAI;IAAAyC,QAAA,gBACH/B,IAAA,CAACJ,UAAU,IAAE,CAAC,EACbO,gBAAgB,CAACC,mBAAmB,CAAC;EAAA,CAClC,CACP;EAED,oBACEJ,IAAA,CAACT,QAAQ,CAACyC,QAAQ;IAChBC,GAAG,EAAEnB,SAA0D;IAC/DR,KAAK,EAAEA,KAAM;IACbC,qBAAqB,EAAE,CAACmB,cAAc,EAAEnB,qBAAqB,CAAE;IAC/DH,mBAAmB,EAAE0B,eAAgB;IACrCI,4BAA4B,EAAE,KAAM;IACpCC,mBAAmB,EAAE,EAAG;IACxBC,aAAa,EAAEpB,iBAAkB;IAAA,GAC7BL,IAAI;IACRD,QAAQ,EAAEmB;EAAgB,CAC3B,CAAC;AAEN","ignoreList":[]}
1
+ {"version":3,"names":["View","Animated","useAnimatedScrollHandler","useComposedEventHandler","StyleSheet","PortalHost","BottomSafeArea","renderScreenPlaceholder","SCREEN_HEADER_PORTAL_HOST","useScreen","hasXMargin","hasYMargin","renderListHeader","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","ScreenFlatList","data","style","contentContainerStyle","ListHeaderComponent","ListFooterComponent","ListEmptyComponent","horizontal","loading","LoadingComponent","EmptyComponent","margins","bottomInset","onScroll","rest","background","scrollRef","scrollHandler","headerSnapOffsets","screenMargins","hasHeader","resolvedMargins","placeholder","isEmpty","length","jsScrollHandler","event","composedHandler","needsBottomSafeArea","undefined","footerComponent","children","headerComponent","styles","headerWrapper","header","name","FlatList","ref","backgroundColor","contentInsetAdjustmentBehavior","content","showsVerticalScrollIndicator","scrollEventThrottle","snapToOffsets","create","theme","runtime","scrollContent","flexGrow","paddingTop","layout","height","insets","top","screen","margin","y","paddingHorizontal","x","paddingBottom","safeArea","marginHorizontal"],"sourceRoot":"../../../../src","sources":["components/screen/ScreenFl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,EAAE;IACNiB,MAAM,EAAEN,KAAK,CAACK,MAAM,CAAChB,MAAM,CAACiB;EAC9B;AACF,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -1,82 +1,149 @@
1
1
  "use strict";
2
2
 
3
+ import { Children } from 'react';
3
4
  import { View } from 'react-native';
4
5
  import Animated, { useAnimatedScrollHandler, useComposedEventHandler } from 'react-native-reanimated';
5
- import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
- import { useUnistyles } from 'react-native-unistyles';
6
+ import { StyleSheet } from 'react-native-unistyles';
7
+ import { scheduleOnRN } from 'react-native-worklets';
7
8
  import { PortalHost } from "../portal/index.js";
8
- import { useScreen } from "./ScreenContext.js";
9
- import { resolveScreenContentInsets } from "./utils.js";
9
+ import { BottomSafeArea } from "./parts/BottomSafeArea.js";
10
+ import { renderScreenPlaceholder } from "./parts/ScreenPlaceholder.js";
11
+ import { SCREEN_HEADER_PORTAL_HOST, useScreen } from "./ScreenContext.js";
12
+ import { hasXMargin, hasYMargin } from "./utils.js";
10
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
14
  /**
12
15
  * Scrollable content container for a `Screen`. Binds the screen's shared scroll
13
16
  * ref, mirrors offset into `scrollY`, hosts the portal target at the top (where
14
17
  * header content is injected), and applies token-driven content padding.
15
18
  *
19
+ * For simple side effects (analytics, infinite-scroll triggers), pass a plain
20
+ * `onScroll` callback. For scroll-driven animation, pass your own
21
+ * `useAnimatedScrollHandler` via `scrollHandler` instead — it runs on the UI
22
+ * thread alongside the screen's own handler, with no JS-thread round trip.
23
+ *
16
24
  * @example
17
25
  * ```tsx
18
26
  * <Screen.ScrollView>
19
27
  * <Text>Scrollable content</Text>
20
28
  * </Screen.ScrollView>
21
29
  * ```
30
+ *
31
+ * @example Loading placeholder instead of a per-screen spinner branch
32
+ * ```tsx
33
+ * const { data, loading } = useQuery();
34
+ *
35
+ * <Screen.ScrollView loading={loading}>
36
+ * <Text>{data?.title}</Text>
37
+ * </Screen.ScrollView>
38
+ * ```
39
+ *
40
+ * @example Empty placeholder when there is nothing to render
41
+ * ```tsx
42
+ * <Screen.ScrollView EmptyComponent={<EmptyState icon="status.info" title="Nothing yet" fill />}>
43
+ * {items.map((item) => <Row key={item.id} item={item} />)}
44
+ * </Screen.ScrollView>
45
+ * ```
46
+ *
47
+ * @example Simple JS-side scroll callback
48
+ * ```tsx
49
+ * <Screen.ScrollView onScroll={(e) => console.log(e.nativeEvent.contentOffset.y)}>
50
+ * <Text>Scrollable content</Text>
51
+ * </Screen.ScrollView>
52
+ * ```
53
+ *
54
+ * @example Custom scroll-driven animation
55
+ * ```tsx
56
+ * const headerOpacity = useSharedValue(1);
57
+ * const scrollHandler = useAnimatedScrollHandler({
58
+ * onScroll: (event) => {
59
+ * headerOpacity.value = interpolate(event.contentOffset.y, [0, 100], [1, 0]);
60
+ * // Need a JS-side side effect too? Call scheduleOnRN(fn, ...args) here.
61
+ * },
62
+ * });
63
+ *
64
+ * <Screen.ScrollView scrollHandler={scrollHandler}>
65
+ * <Text>Scrollable content</Text>
66
+ * </Screen.ScrollView>
67
+ * ```
22
68
  */
23
69
  export function ScreenScrollView({
24
70
  children,
25
71
  style,
26
72
  contentContainerStyle,
27
- hasMargins,
28
- bottomInset,
29
73
  scrollHandler: externalScrollHandler,
30
74
  onScroll: onScrollProp,
31
75
  horizontal = false,
76
+ loading = false,
77
+ LoadingComponent,
78
+ EmptyComponent,
79
+ margins,
32
80
  ...rest
33
81
  }) {
34
- const {
35
- theme
36
- } = useUnistyles();
37
- const {
38
- top
39
- } = useSafeAreaInsets();
40
82
  const {
41
83
  scrollRef,
42
84
  scrollHandler: screenScrollHandler,
43
- headerSnapOffsets,
44
85
  margins: screenMargins,
45
- hasHeader
86
+ hasHeader,
87
+ background
46
88
  } = useScreen();
47
- const jsScrollHandler = useAnimatedScrollHandler(onScrollProp ? {
89
+ const resolvedMargins = margins ?? screenMargins;
90
+ // `toArray` drops the nullish/boolean children a conditional render leaves
91
+ // behind, so `{items.map(...)}` over an empty array counts as empty.
92
+ const placeholder = renderScreenPlaceholder({
93
+ loading,
94
+ LoadingComponent,
95
+ EmptyComponent,
96
+ isEmpty: Children.toArray(children).length === 0
97
+ });
98
+ const jsScrollHandler = useAnimatedScrollHandler({
48
99
  onScroll: event => {
49
- onScrollProp({
50
- nativeEvent: event
51
- });
100
+ if (onScrollProp) {
101
+ scheduleOnRN(onScrollProp, {
102
+ nativeEvent: event
103
+ });
104
+ }
52
105
  }
53
- } : {});
106
+ });
54
107
  const handlers = [screenScrollHandler, ...(externalScrollHandler ? [externalScrollHandler] : []), ...(onScrollProp ? [jsScrollHandler] : [])];
55
108
  const composedHandler = useComposedEventHandler(handlers);
56
- const margin = theme.layout.screen.margin;
57
- const marginsEnabled = hasMargins ?? screenMargins;
58
- const compactHeaderHeight = hasHeader ? top + theme.layout.header.height : 0;
59
- const {
60
- contentPadding
61
- } = resolveScreenContentInsets(margin, marginsEnabled, bottomInset, compactHeaderHeight);
62
109
  return /*#__PURE__*/_jsxs(Animated.ScrollView, {
63
110
  ref: scrollRef,
64
- style: style,
111
+ style: [{
112
+ backgroundColor: background
113
+ }, style],
65
114
  horizontal: horizontal,
115
+ contentInsetAdjustmentBehavior: hasHeader ? 'never' : undefined,
66
116
  showsVerticalScrollIndicator: false,
67
117
  scrollEventThrottle: 16,
68
- contentContainerStyle: contentPadding,
69
- snapToOffsets: headerSnapOffsets,
118
+ contentContainerStyle: styles.scrollContent(hasHeader, resolvedMargins)
119
+ // snapToOffsets={headerSnapOffsets}
120
+ ,
70
121
  ...rest,
71
122
  onScroll: composedHandler,
72
123
  children: [/*#__PURE__*/_jsx(View, {
73
- children: /*#__PURE__*/_jsx(PortalHost, {})
124
+ children: /*#__PURE__*/_jsx(PortalHost, {
125
+ name: SCREEN_HEADER_PORTAL_HOST
126
+ })
74
127
  }), /*#__PURE__*/_jsx(View, {
75
- style: [contentContainerStyle, {
76
- flexDirection: horizontal ? 'row' : 'column'
77
- }],
78
- children: children
79
- })]
128
+ style: [styles.content(horizontal, resolvedMargins), contentContainerStyle],
129
+ children: placeholder ?? children
130
+ }), horizontal ? null : /*#__PURE__*/_jsx(BottomSafeArea, {})]
80
131
  });
81
132
  }
133
+ const styles = StyleSheet.create((theme, rt) => ({
134
+ scrollContent: (hasHeader, margins) => ({
135
+ flexGrow: 1,
136
+ // The header inset and the safe area are structural — they apply whether
137
+ // or not margins are on; the y margin stacks on top of them.
138
+ paddingTop: (hasHeader ? theme.layout.header.height + rt.insets.top : 0) + (hasYMargin(margins) ? theme.layout.screen.margin.y : 0),
139
+ // The safe area is `BottomSafeArea`'s job; counting it here as well would
140
+ // leave a gap the height of the gesture bar.
141
+ paddingBottom: hasYMargin(margins) ? theme.layout.screen.margin.y : 0
142
+ }),
143
+ content: (horizontal, margins) => ({
144
+ flexGrow: 1,
145
+ paddingHorizontal: hasXMargin(margins) ? theme.layout.screen.margin.x : 0,
146
+ flexDirection: horizontal ? 'row' : 'column'
147
+ })
148
+ }));
82
149
  //# sourceMappingURL=ScreenScrollView.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["View","Animated","useAnimatedScrollHandler","useComposedEventHandler","useSafeAreaInsets","useUnistyles","PortalHost","useScreen","resolveScreenContentInsets","jsx","_jsx","jsxs","_jsxs","ScreenScrollView","children","style","contentContainerStyle","hasMargins","bottomInset","scrollHandler","externalScrollHandler","onScroll","onScrollProp","horizontal","rest","theme","top","scrollRef","screenScrollHandler","headerSnapOffsets","margins","screenMargins","hasHeader","jsScrollHandler","event","nativeEvent","handlers","composedHandler","margin","layout","screen","marginsEnabled","compactHeaderHeight","header","height","contentPadding","ScrollView","ref","showsVerticalScrollIndicator","scrollEventThrottle","snapToOffsets","flexDirection"],"sourceRoot":"../../../../src","sources":["components/screen/ScreenScrollView.tsx"],"mappings":";;AACA,SAIEA,IAAI,QACC,cAAc;AAErB,OAAOC,QAAQ,IAEbC,wBAAwB,EACxBC,uBAAuB,QAClB,yBAAyB;AAChC,SAASC,iBAAi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AAMG,cAAc,GAAGxB,UAAU,IAAIc,aAAa;EAClD,MAAMW,mBAAmB,GAAGV,SAAS,GAAGN,GAAG,GAAGD,KAAK,CAACc,MAAM,CAACI,MAAM,CAACC,MAAM,GAAG,CAAC;EAC5E,MAAM;IAAEC;EAAe,CAAC,GAAGrC,0BAA0B,CACnD8B,MAAM,EACNG,cAAc,EACdvB,WAAW,EACXwB,mBACF,CAAC;EAED,oBACE9B,KAAA,CAACX,QAAQ,CAAC6C,UAAU;IAClBC,GAAG,EAAEpB,SAAU;IACfZ,KAAK,EAAEA,KAAM;IACbQ,UAAU,EAAEA,UAAW;IACvByB,4BAA4B,EAAE,KAAM;IACpCC,mBAAmB,EAAE,EAAG;IACxBjC,qBAAqB,EAAE6B,cAAe;IACtCK,aAAa,EAAErB,iBAAkB;IAAA,GAC7BL,IAAI;IACRH,QAAQ,EAAEgB,eAAgB;IAAAvB,QAAA,gBAE1BJ,IAAA,CAACV,IAAI;MAAAc,QAAA,eACHJ,IAAA,CAACJ,UAAU,IAAE;IAAC,CACV,CAAC,eACPI,IAAA,CAACV,IAAI;MACHe,KAAK,EAAE,CACLC,qBAAqB,EACrB;QAAEmC,aAAa,EAAE5B,UAAU,GAAG,KAAK,GAAG;MAAS,CAAC,CAChD;MAAAT,QAAA,EAGDA;IAAQ,CACL,CAAC;EAAA,CACY,CAAC;AAE1B","ignoreList":[]}
1
+ {"version":3,"names":["Children","View","Animated","useAnimatedScrollHandler","useComposedEventHandler","StyleSheet","scheduleOnRN","PortalHost","BottomSafeArea","renderScreenPlaceholder","SCREEN_HEADER_PORTAL_HOST","useScreen","hasXMargin","hasYMargin","jsx","_jsx","jsxs","_jsxs","ScreenScrollView","children","style","contentContainerStyle","scrollHandler","externalScrollHandler","onScroll","onScrollProp","horizontal","loading","LoadingComponent","EmptyComponent","margins","rest","scrollRef","screenScrollHandler","screenMargins","hasHeader","background","resolvedMargins","placeholder","isEmpty","toArray","length","jsScrollHandler","event","nativeEvent","handlers","composedHandler","ScrollView","ref","backgroundColor","contentInsetAdjustmentBehavior","undefined","showsVerticalScrollIndicator","scrollEventThrottle","styles","scrollContent","name","content","create","theme","rt","flexGrow","paddingTop","layout","header","height","insets","top","screen","margin","y","paddingBottom","paddingHorizontal","x","flexDirection"],"sourceRoot":"../../../../src","sources":["components/screen/ScreenScrollView.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAwB,OAAO;AAChD,SAIEC,IAAI,QACC,cAAc;AAErB,OAAOC,QAAQ,IAEbC,wBAAwB,EACxBC,uBAAuB,QAClB,yBAAyB;AAChC,SAASC,UAAU,QAAQ,wBAAwB;AACnD,SAASC,YAAY,QAAQ,uBAAuB;AACpD,SAASC,UAAU;AACnB,SAASC,cAAc;AACvB,SAASC,uBAAuB;AAChC,SAASC,yBAAyB,EAAEC,SAAS;AAE7C,SAASC,UAAU,EAAEC,UAAU;AAAkB,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAejD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAAC;EAC/BC,QAAQ;EACRC,KAAK;EACLC,qBAAqB;EACrBC,aAAa,EAAEC,qBAAqB;EACpCC,QAAQ,EAAEC,YAAY;EACtBC,UAAU,GAAG,KAAK;EAClBC,OAAO,GAAG,KAAK;EACfC,gBAAgB;EAChBC,cAAc;EACdC,OAAO;EACP,GAAGC;AACkB,CAAC,EAAE;EACxB,MAAM;IACJC,SAAS;IACTV,aAAa,EAAEW,mBAAmB;IAClCH,OAAO,EAAEI,aAAa;IACtBC,SAAS;IACTC;EACF,CAAC,GAAGzB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} from "./ScreenContext.js";
5
+ export { ScreenFlashList } from "./ScreenFlashList.js";
5
6
  export { ScreenFlatList } from "./ScreenFlatList.js";
6
7
  export { ScreenScrollView } from "./ScreenScrollView.js";
7
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Screen","useScreen","ScreenFlatList","ScreenScrollView"],"sourceRoot":"../../../../src","sources":["components/screen/index.ts"],"mappings":";;AACA,SAASA,MAAM,QAAQ,aAAU;AAEjC,SAASC,SAAS,QAAQ,oBAAiB;AAE3C,SAASC,cAAc,QAAQ,qBAAkB;AAEjD,SAASC,gBAAgB,QAAQ,uBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["Screen","useScreen","ScreenFlashList","ScreenFlatList","ScreenScrollView"],"sourceRoot":"../../../../src","sources":["components/screen/index.ts"],"mappings":";;AACA,SAASA,MAAM;AAEf,SAASC,SAAS;AAElB,SAASC,eAAe;AAExB,SAASC,cAAc;AAEvB,SAASC,gBAAgB","ignoreList":[]}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ /**
5
+ * `SafeAreaView` is not re-exported from the `react-native-screens` root, so it
6
+ * has to be reached by path — and it has to be the TypeScript source entry, the
7
+ * one the package points React Native at. The built `lib/module` copy of the
8
+ * native component never went through React Native's codegen, so loading it
9
+ * fails at bundle time with "Could not find component config for native
10
+ * component".
11
+ *
12
+ * `require` rather than `import` so the dependency's own `.tsx` is not pulled
13
+ * into this package's build, where it trips compiler options it was never
14
+ * written against.
15
+ */
16
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
17
+ const {
18
+ SafeAreaView
19
+ } = require('react-native-screens/src/components/safe-area');
20
+ const BOTTOM_EDGE = {
21
+ bottom: true
22
+ };
23
+ const SPACER = {
24
+ flex: 0
25
+ };
26
+
27
+ /**
28
+ * Bottom clearance that measures itself.
29
+ *
30
+ * The insets Unistyles reports are the window's, which cover the system bars and
31
+ * nothing else — 24dp for the gesture bar on a Pixel — while a native tab bar
32
+ * sits on top of them for another 80dp and overlaps the content beneath it.
33
+ * `react-native-screens` tracks that second one separately, as an *interface*
34
+ * inset, and reports it to its own `SafeAreaView`; asking a view is the only way
35
+ * to learn it. Neither `runtime.insets.bottom` nor `useSafeAreaInsets()` knows
36
+ * about it — both read 24 on a tab screen — and a constant would be wrong the
37
+ * moment the bar is absent, which is every pushed screen.
38
+ *
39
+ * `insetType="all"` covers system and interface both, so this view owns the
40
+ * whole bottom edge — which is why the scroll containers pad only their margin;
41
+ * adding the window inset there too would double-count the gesture bar.
42
+ * `"interface"` alone would be wrong: it measures the same on a tab screen (the
43
+ * bar's inset already spans the gesture bar beneath it) but reports nothing on a
44
+ * pushed screen, which would then lose its gesture-bar clearance.
45
+ *
46
+ * `insetType` is Android-only; on iOS the bottom safe area of a view inside a
47
+ * tab controller already includes the bar. Measured on a tab screen: 132dp on a
48
+ * Pixel, 95pt on an iPhone 17 — against the 24dp / 34pt the window insets
49
+ * report, which is the gap this closes.
50
+ *
51
+ * `flex: 0` cancels the `flex: 1` that `SafeAreaView` sets on itself, which
52
+ * would otherwise stretch it into the leftover space of a list shorter than the
53
+ * viewport. With no children, its height is exactly the padding it applies.
54
+ */
55
+ export function BottomSafeArea() {
56
+ return /*#__PURE__*/_jsx(SafeAreaView, {
57
+ edges: BOTTOM_EDGE,
58
+ insetType: "all",
59
+ style: SPACER
60
+ });
61
+ }
62
+ //# sourceMappingURL=BottomSafeArea.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SafeAreaView","require","BOTTOM_EDGE","bottom","SPACER","flex","BottomSafeArea","_jsx","edges","insetType","style"],"sourceRoot":"../../../../../src","sources":["components/screen/parts/BottomSafeArea.tsx"],"mappings":";;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;EAAEA;AAAa,CAAC,GACpBC,OAAO,CAAC,+CAA+C,CAEtD;AAEH,MAAMC,WAAW,GAAG;EAAEC,MAAM,EAAE;AAAK,CAAU;AAC7C,MAAMC,MAAM,GAAG;EAAEC,IAAI,EAAE;AAAE,CAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAA,EAAG;EAC/B,oBAAOC,IAAA,CAACP,YAAY;IAACQ,KAAK,EAAEN,WAAY;IAACO,SAAS,EAAC,KAAK;IAACC,KAAK,EAAEN;EAAO,CAAE,CAAC;AAC5E","ignoreList":[]}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ import { View } from 'react-native';
4
+ import { StyleSheet } from 'react-native-unistyles';
5
+ import { Spinner } from "../../spinner/index.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ /**
8
+ * Centres a loading/empty placeholder in whatever space the content leaves.
9
+ * Grows so the placeholder sits in the middle of the content area rather than
10
+ * hugging the top, which needs the content container to grow as well.
11
+ */
12
+ export function ScreenPlaceholder({
13
+ children
14
+ }) {
15
+ return /*#__PURE__*/_jsx(View, {
16
+ style: styles.placeholder,
17
+ children: children
18
+ });
19
+ }
20
+ /**
21
+ * The placeholder a scroll container should show instead of its content, or
22
+ * `null` to render the content. Loading wins over empty: while data is in
23
+ * flight there is nothing to be empty about yet.
24
+ */
25
+ export function renderScreenPlaceholder({
26
+ loading,
27
+ LoadingComponent,
28
+ EmptyComponent,
29
+ isEmpty
30
+ }) {
31
+ if (loading) {
32
+ return /*#__PURE__*/_jsx(ScreenPlaceholder, {
33
+ children: LoadingComponent ?? /*#__PURE__*/_jsx(Spinner, {})
34
+ });
35
+ }
36
+ if (isEmpty && EmptyComponent) {
37
+ return /*#__PURE__*/_jsx(ScreenPlaceholder, {
38
+ children: EmptyComponent
39
+ });
40
+ }
41
+ return null;
42
+ }
43
+ const styles = StyleSheet.create(() => ({
44
+ placeholder: {
45
+ flexGrow: 1,
46
+ alignItems: 'center',
47
+ justifyContent: 'center'
48
+ }
49
+ }));
50
+ //# sourceMappingURL=ScreenPlaceholder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["View","StyleSheet","Spinner","jsx","_jsx","ScreenPlaceholder","children","style","styles","placeholder","renderScreenPlaceholder","loading","LoadingComponent","EmptyComponent","isEmpty","create","flexGrow","alignItems","justifyContent"],"sourceRoot":"../../../../../src","sources":["components/screen/parts/ScreenPlaceholder.tsx"],"mappings":";;AACA,SAASA,IAAI,QAAQ,cAAc;AAEnC,SAASC,UAAU,QAAQ,wBAAwB;AAEnD,SAASC,OAAO;AAAwB,SAAAC,GAAA,IAAAC,IAAA;AAGxC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAC;EAAEC;AAAkC,CAAC,EAAE;EACvE,oBAAOF,IAAA,CAACJ,IAAI;IAACO,KAAK,EAAEC,MAAM,CAACC,WAAY;IAAAH,QAAA,EAAEA;EAAQ,CAAO,CAAC;AAC3D;AAWA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,uBAAuBA,CAAC;EACtCC,OAAO;EACPC,gBAAgB;EAChBC,cAAc;EACdC;AACgB,CAAC,EAAuB;EACxC,IAAIH,OAAO,EAAE;IACX,oBACEP,IAAA,CAACC,iBAAiB;MAAAC,QAAA,EAAEM,gBAAgB,iBAAIR,IAAA,CAACF,OAAO,IAAE;IAAC,CAAoB,CAAC;EAE5E;EACA,IAAIY,OAAO,IAAID,cAAc,EAAE;IAC7B,oBAAOT,IAAA,CAACC,iBAAiB;MAAAC,QAAA,EAAEO;IAAc,CAAoB,CAAC;EAChE;EACA,OAAO,IAAI;AACb;AAEA,MAAML,MAAM,GAAGP,UAAU,CAACc,MAAM,CAAC,OAAO;EACtCN,WAAW,EAAE;IACXO,QAAQ,EAAE,CAAC;IACXC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/screen/types.ts"],"mappings":"","ignoreList":[]}
@@ -1,13 +1,16 @@
1
1
  "use strict";
2
2
 
3
- export function resolveScreenContentInsets(margin, margins, bottomInset, topInset) {
4
- return {
5
- contentPadding: {
6
- flexGrow: 1,
7
- paddingTop: topInset ?? 0,
8
- paddingHorizontal: margins ? margin.x : 0,
9
- paddingBottom: bottomInset ?? (margins ? margin.y : 0)
10
- }
11
- };
3
+ import { createElement, isValidElement } from 'react';
4
+ /** Renders a `ListHeaderComponent`-shaped prop (element, component, or nullish) into an element. */
5
+ export function renderListHeader(ListHeaderComponent) {
6
+ if (!ListHeaderComponent) return null;
7
+ if (/*#__PURE__*/isValidElement(ListHeaderComponent)) return ListHeaderComponent;
8
+ return /*#__PURE__*/createElement(ListHeaderComponent);
12
9
  }
10
+
11
+ /** Whether `margins` pads the horizontal axis. */
12
+ export const hasXMargin = margins => margins === 'all' || margins === 'x';
13
+
14
+ /** Whether `margins` pads the vertical axis (the bottom of the content area). */
15
+ export const hasYMargin = margins => margins === 'all' || margins === 'y';
13
16
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["resolveScreenContentInsets","margin","margins","bottomInset","topInset","contentPadding","flexGrow","paddingTop","paddingHorizontal","x","paddingBottom","y"],"sourceRoot":"../../../../src","sources":["components/screen/utils.ts"],"mappings":";;AAEA,OAAO,SAASA,0BAA0BA,CACxCC,MAAwC,EACxCC,OAAgB,EAChBC,WAAoB,EACpBC,QAAiB,EACjB;EACA,OAAO;IACLC,cAAc,EAAE;MACdC,QAAQ,EAAE,CAAU;MACpBC,UAAU,EAAEH,QAAQ,IAAI,CAAC;MACzBI,iBAAiB,EAAEN,OAAO,GAAGD,MAAM,CAACQ,CAAC,GAAG,CAAC;MACzCC,aAAa,EAAEP,WAAW,KAAKD,OAAO,GAAGD,MAAM,CAACU,CAAC,GAAG,CAAC;IACvD;EACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["createElement","isValidElement","renderListHeader","ListHeaderComponent","hasXMargin","margins","hasYMargin"],"sourceRoot":"../../../../src","sources":["components/screen/utils.ts"],"mappings":";;AAAA,SAEEA,aAAa,EACbC,cAAc,QAET,OAAO;AAUd;AACA,OAAO,SAASC,gBAAgBA,CAC9BC,mBAAwC,EACnB;EACrB,IAAI,CAACA,mBAAmB,EAAE,OAAO,IAAI;EACrC,iBAAIF,cAAc,CAACE,mBAAmB,CAAC,EAAE,OAAOA,mBAAmB;EACnE,oBAAOH,aAAa,CAACG,mBAAmB,CAAC;AAC3C;;AAEA;AACA,OAAO,MAAMC,UAAU,GAAIC,OAAsB,IAC/CA,OAAO,KAAK,KAAK,IAAIA,OAAO,KAAK,GAAG;;AAEtC;AACA,OAAO,MAAMC,UAAU,GAAID,OAAsB,IAC/CA,OAAO,KAAK,KAAK,IAAIA,OAAO,KAAK,GAAG","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["cloneElement","isValidElement","composeRefs","mergeProps","Slot","slotProps","ownerName","children","__DEV__","console","error","child","childProps","props","ref","slotRef","restSlotProps","childRef","restChildProps","merged","composedRef"],"sourceRoot":"../../../../src","sources":["components/slot/Slot.tsx"],"mappings":";;AAAA,SACEA,YAAY,EACZC,cAAc,QAIT,OAAO;AAEd,SAASC,WAAW,EAAEC,UAAU,QAAQ,YAAS;AAYjD;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,IAAIA,CAAC;EACnBC,SAAS;EACTC,SAAS,GAAG,WAAW;EACvBC;AACS,CAAC,EAAuB;EACjC,IAAI,eAACN,cAAc,CAACM,QAAQ,CAAC,EAAE;IAC7B,IAAIC,OAAO,IAAID,QAAQ,IAAI,IAAI,EAAE;MAC/BE,OAAO,CAACC,KAAK,CACX,IAAIJ,SAAS,wDACf,CAAC;IACH;IACA,OAAO,IAAI;EACb;EAEA,MAAMK,KAAK,GAAGJ,QAAwB;EACtC,MAAMK,UAAU,GAAID,KAAK,CAACE,KAAK,IAAI,CAAC,CAAc;EAElD,MAAM;IAAEC,GAAG,EAAEC,OAAO;IAAE,GAAGC;EAAc,CAAC,GAAGX,SAAS;EACpD,MAAM;IAAES,GAAG,EAAEG,QAAQ;IAAE,GAAGC;EAAe,CAAC,GAAGN,UAAU;EAEvD,MAAMO,MAAM,GAAGhB,UAAU,CAACa,aAAa,EAAEE,cAAc,CAAC;EACxD,MAAME,WAAW,GAAGlB,WAAW,CAC7Ba,OAAO,EACPE,QACF,CAAC;EAED,oBAAOjB,YAAY,CAACW,KAAK,EAAE;IACzB,GAAGQ,MAAM;IACTL,GAAG,EAAEM;EACP,CAAgC,CAAC;AACnC","ignoreList":[]}
1
+ {"version":3,"names":["cloneElement","isValidElement","composeRefs","mergeProps","Slot","slotProps","ownerName","children","__DEV__","console","error","child","childProps","props","ref","slotRef","restSlotProps","childRef","restChildProps","merged","composedRef"],"sourceRoot":"../../../../src","sources":["components/slot/Slot.tsx"],"mappings":";;AAAA,SACEA,YAAY,EACZC,cAAc,QAIT,OAAO;AAEd,SAASC,WAAW,EAAEC,UAAU;AAYhC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,IAAIA,CAAC;EACnBC,SAAS;EACTC,SAAS,GAAG,WAAW;EACvBC;AACS,CAAC,EAAuB;EACjC,IAAI,eAACN,cAAc,CAACM,QAAQ,CAAC,EAAE;IAC7B,IAAIC,OAAO,IAAID,QAAQ,IAAI,IAAI,EAAE;MAC/BE,OAAO,CAACC,KAAK,CACX,IAAIJ,SAAS,wDACf,CAAC;IACH;IACA,OAAO,IAAI;EACb;EAEA,MAAMK,KAAK,GAAGJ,QAAwB;EACtC,MAAMK,UAAU,GAAID,KAAK,CAACE,KAAK,IAAI,CAAC,CAAc;EAElD,MAAM;IAAEC,GAAG,EAAEC,OAAO;IAAE,GAAGC;EAAc,CAAC,GAAGX,SAAS;EACpD,MAAM;IAAES,GAAG,EAAEG,QAAQ;IAAE,GAAGC;EAAe,CAAC,GAAGN,UAAU;EAEvD,MAAMO,MAAM,GAAGhB,UAAU,CAACa,aAAa,EAAEE,cAAc,CAAC;EACxD,MAAME,WAAW,GAAGlB,WAAW,CAC7Ba,OAAO,EACPE,QACF,CAAC;EAED,oBAAOjB,YAAY,CAACW,KAAK,EAAE;IACzB,GAAGQ,MAAM;IACTL,GAAG,EAAEM;EACP,CAAgC,CAAC;AACnC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["Slot","composeRefs","mergeProps"],"sourceRoot":"../../../../src","sources":["components/slot/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAGA,SAASA,IAAI,QAAQ,WAAQ;AAC7B,SAASC,WAAW,EAAEC,UAAU,QAAQ,YAAS","ignoreList":[]}
1
+ {"version":3,"names":["Slot","composeRefs","mergeProps"],"sourceRoot":"../../../../src","sources":["components/slot/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAGA,SAASA,IAAI;AACb,SAASC,WAAW,EAAEC,UAAU","ignoreList":[]}
@@ -4,7 +4,7 @@ import { memo, useEffect, useId } from 'react';
4
4
  import Animated, { cancelAnimation, Easing, useAnimatedStyle, useSharedValue, withRepeat, withTiming } from 'react-native-reanimated';
5
5
  import Svg, { Defs, G, LinearGradient, Path, Stop } from 'react-native-svg';
6
6
  import { useUnistyles } from 'react-native-unistyles';
7
- import { resolveThemeColor } from '#utils/resolve-theme-color';
7
+ import { resolveThemeColor } from "../../utils/resolve-theme-color.js";
8
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
9
  const DIMENSION = {
10
10
  sm: 16,
@@ -1 +1 @@
1
- {"version":3,"names":["memo","useEffect","useId","Animated","cancelAnimation","Easing","useAnimatedStyle","useSharedValue","withRepeat","withTiming","Svg","Defs","G","LinearGradient","Path","Stop","useUnistyles","resolveThemeColor","jsx","_jsx","jsxs","_jsxs","DIMENSION","sm","md","lg","ROTATION_DURATION","LEFT_ARC","RIGHT_ARC","ARC_TRANSFORM","SpinnerIcon","size","color","gradientId1","gradientId2","width","height","viewBox","children","id","x1","x2","y1","y2","offset","stopColor","stopOpacity","fill","d","transform","Spinner","theme","resolvedColor","dim","rotation","value","duration","easing","linear","animStyle","rotate","View","accessible","accessibilityRole","accessibilityLabel","collapsable","style"],"sourceRoot":"../../../../src","sources":["components/spinner/Spinner.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,SAAS,EAAEC,KAAK,QAAQ,OAAO;AAE9C,OAAOC,QAAQ,IACbC,eAAe,EACfC,MAAM,EACNC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,EACVC,UAAU,QACL,yBAAyB;AAChC,OAAOC,GAAG,IAAIC,IAAI,EAAEC,CAAC,EAAEC,cAAc,EAAEC,IAAI,EAAEC,IAAI,QAAQ,kBAAkB;AAE3E,SAASC,YAAY,QAAQ,wBAAwB;AAGrD,SAASC,iBAAiB,QAAQ,4BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAW/D,MAAMC,SAAsC,GAAG;EAAEC,EAAE,EAAE,EAAE;EAAEC,EAAE,EAAE,EAAE;EAAEC,EAAE,EAAE;AAAG,CAAC;AAEzE,MAAMC,iBAAiB,GAAG,GAAG;;AAE7B;AACA,MAAMC,QAAQ,GACZ,2IAA2I;AAC7I,MAAMC,SAAS,GACb,sJAAsJ;AACxJ,MAAMC,aAAa,GAAG,sBAAsB;AAS5C,MAAMC,WAAW,gBAAG9B,IAAI,CAAC,SAAS8B,WAAWA,CAAC;EAC5CC,IAAI;EACJC,KAAK;EACLC,WAAW;EACXC;AACgB,CAAC,EAAE;EACnB,oBACEb,KAAA,CAACX,GAAG;IAACyB,KAAK,EAAEJ,IAAK;IAACK,MAAM,EAAEL,IAAK;IAACM,OAAO,EAAC,WAAW;IAAAC,QAAA,gBACjDjB,KAAA,CAACV,IAAI;M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,aAAa;IAC/BC,kBAAkB,EAAC,SAAS;IAC5BC,WAAW,EAAE,KAAM;IACnBC,KAAK,EAAE,CAAC;MAAE/B,KAAK,EAAEkB,GAAG;MAAEjB,MAAM,EAAEiB;IAAI,CAAC,EAAEM,SAAS,CAAE;IAAArB,QAAA,eAEhDnB,IAAA,CAACW,WAAW;MACVC,IAAI,EAAEsB,GAAI;MACVrB,KAAK,EAAEoB,aAAc;MACrBnB,WAAW,EAAEA,WAAY;MACzBC,WAAW,EAAEA;IAAY,CAC1B;EAAC,CACW,CAAC;AAEpB","ignoreList":[]}
1
+ {"version":3,"names":["memo","useEffect","useId","Animated","cancelAnimation","Easing","useAnimatedStyle","useSharedValue","withRepeat","withTiming","Svg","Defs","G","LinearGradient","Path","Stop","useUnistyles","resolveThemeColor","jsx","_jsx","jsxs","_jsxs","DIMENSION","sm","md","lg","ROTATION_DURATION","LEFT_ARC","RIGHT_ARC","ARC_TRANSFORM","SpinnerIcon","size","color","gradientId1","gradientId2","width","height","viewBox","children","id","x1","x2","y1","y2","offset","stopColor","stopOpacity","fill","d","transform","Spinner","theme","resolvedColor","dim","rotation","value","duration","easing","linear","animStyle","rotate","View","accessible","accessibilityRole","accessibilityLabel","collapsable","style"],"sourceRoot":"../../../../src","sources":["components/spinner/Spinner.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,SAAS,EAAEC,KAAK,QAAQ,OAAO;AAE9C,OAAOC,QAAQ,IACbC,eAAe,EACfC,MAAM,EACNC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,EACVC,UAAU,QACL,yBAAyB;AAChC,OAAOC,GAAG,IAAIC,IAAI,EAAEC,CAAC,EAAEC,cAAc,EAAEC,IAAI,EAAEC,IAAI,QAAQ,kBAAkB;AAE3E,SAASC,YAAY,QAAQ,wBAAwB;AAGrD,SAASC,iBAAiB;AAAqC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAW/D,MAAMC,SAAsC,GAAG;EAAE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