@prototyp/skeletor 1.0.19 → 1.1.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 (391) hide show
  1. package/README.md +72 -63
  2. package/lib/commonjs/@types/Font.d.js +2 -0
  3. package/lib/commonjs/@types/Font.d.js.map +1 -0
  4. package/lib/commonjs/components/Block/Block.js +117 -0
  5. package/lib/commonjs/components/Block/Block.js.map +1 -0
  6. package/lib/commonjs/components/Block/index.js +17 -0
  7. package/lib/commonjs/components/Block/index.js.map +1 -0
  8. package/lib/commonjs/components/InputFocusScrollView/InputFocusScrollView.js +111 -0
  9. package/lib/commonjs/components/InputFocusScrollView/InputFocusScrollView.js.map +1 -0
  10. package/lib/commonjs/components/InputFocusScrollView/index.js +17 -0
  11. package/lib/commonjs/components/InputFocusScrollView/index.js.map +1 -0
  12. package/lib/commonjs/components/Screen/Screen.js +58 -0
  13. package/lib/commonjs/components/Screen/Screen.js.map +1 -0
  14. package/lib/commonjs/components/Screen/index.js +17 -0
  15. package/lib/commonjs/components/Screen/index.js.map +1 -0
  16. package/lib/commonjs/components/SkeletorProvider/SkeletorContext.js +17 -0
  17. package/lib/commonjs/components/SkeletorProvider/SkeletorContext.js.map +1 -0
  18. package/lib/commonjs/components/SkeletorProvider/SkeletorProvider.js +24 -0
  19. package/lib/commonjs/components/SkeletorProvider/SkeletorProvider.js.map +1 -0
  20. package/lib/commonjs/components/SkeletorProvider/index.js +28 -0
  21. package/lib/commonjs/components/SkeletorProvider/index.js.map +1 -0
  22. package/lib/commonjs/components/Text/Text.js +73 -0
  23. package/lib/commonjs/components/Text/Text.js.map +1 -0
  24. package/lib/commonjs/components/Text/index.js +17 -0
  25. package/lib/commonjs/components/Text/index.js.map +1 -0
  26. package/lib/commonjs/components/index.js +61 -0
  27. package/lib/commonjs/components/index.js.map +1 -0
  28. package/lib/commonjs/components/package.json +3 -0
  29. package/lib/commonjs/hooks/index.js +72 -0
  30. package/lib/commonjs/hooks/index.js.map +1 -0
  31. package/lib/commonjs/hooks/package.json +3 -0
  32. package/lib/commonjs/hooks/skeleform/README.md +100 -0
  33. package/lib/commonjs/hooks/skeleform/package.json +48 -0
  34. package/lib/commonjs/hooks/skeleform/src/index.js +209 -0
  35. package/lib/commonjs/hooks/skeleform/src/index.js.map +1 -0
  36. package/lib/commonjs/hooks/skeleform/tsconfig.json +14 -0
  37. package/lib/commonjs/hooks/skeleform/yarn.lock +2215 -0
  38. package/lib/commonjs/hooks/useAndroidBackHandler.js +30 -0
  39. package/lib/commonjs/hooks/useAndroidBackHandler.js.map +1 -0
  40. package/lib/commonjs/hooks/useAnimation.js +39 -0
  41. package/lib/commonjs/hooks/useAnimation.js.map +1 -0
  42. package/lib/commonjs/hooks/useAnimationTimeline.js +106 -0
  43. package/lib/commonjs/hooks/useAnimationTimeline.js.map +1 -0
  44. package/lib/commonjs/hooks/useAppState.js +26 -0
  45. package/lib/commonjs/hooks/useAppState.js.map +1 -0
  46. package/lib/commonjs/hooks/useSkeletor.js +12 -0
  47. package/lib/commonjs/hooks/useSkeletor.js.map +1 -0
  48. package/lib/commonjs/index.js +50 -0
  49. package/lib/commonjs/index.js.map +1 -0
  50. package/lib/commonjs/models/Alignment.js +6 -0
  51. package/lib/commonjs/models/Alignment.js.map +1 -0
  52. package/lib/commonjs/models/Animation.js +6 -0
  53. package/lib/commonjs/models/Animation.js.map +1 -0
  54. package/lib/commonjs/models/Border.js +6 -0
  55. package/lib/commonjs/models/Border.js.map +1 -0
  56. package/lib/commonjs/models/Flex.js +6 -0
  57. package/lib/commonjs/models/Flex.js.map +1 -0
  58. package/lib/commonjs/models/NonAnimatedDimensionValue.js +6 -0
  59. package/lib/commonjs/models/NonAnimatedDimensionValue.js.map +1 -0
  60. package/lib/commonjs/models/Position.js +6 -0
  61. package/lib/commonjs/models/Position.js.map +1 -0
  62. package/lib/commonjs/models/Size.js +6 -0
  63. package/lib/commonjs/models/Size.js.map +1 -0
  64. package/lib/commonjs/models/SkeletorConfig.js +6 -0
  65. package/lib/commonjs/models/SkeletorConfig.js.map +1 -0
  66. package/lib/commonjs/models/Spacing.js +6 -0
  67. package/lib/commonjs/models/Spacing.js.map +1 -0
  68. package/lib/commonjs/models/TupleTypes.js +2 -0
  69. package/lib/commonjs/models/TupleTypes.js.map +1 -0
  70. package/lib/commonjs/models/index.js +116 -0
  71. package/lib/commonjs/models/index.js.map +1 -0
  72. package/lib/commonjs/models/package.json +3 -0
  73. package/lib/commonjs/package.json +1 -0
  74. package/lib/commonjs/utils/animations.js +224 -0
  75. package/lib/commonjs/utils/animations.js.map +1 -0
  76. package/lib/commonjs/utils/extract-alignment-properties.js +15 -0
  77. package/lib/commonjs/utils/extract-alignment-properties.js.map +1 -0
  78. package/lib/commonjs/utils/extract-animation-properties.js +52 -0
  79. package/lib/commonjs/utils/extract-animation-properties.js.map +1 -0
  80. package/lib/commonjs/utils/extract-flex-properties.js +30 -0
  81. package/lib/commonjs/utils/extract-flex-properties.js.map +1 -0
  82. package/lib/commonjs/utils/extract-gap-properties.js +26 -0
  83. package/lib/commonjs/utils/extract-gap-properties.js.map +1 -0
  84. package/lib/commonjs/utils/extract-position-properties.js +25 -0
  85. package/lib/commonjs/utils/extract-position-properties.js.map +1 -0
  86. package/lib/commonjs/utils/extract-size-properties.js +17 -0
  87. package/lib/commonjs/utils/extract-size-properties.js.map +1 -0
  88. package/lib/commonjs/utils/index.js +94 -0
  89. package/lib/commonjs/utils/index.js.map +1 -0
  90. package/lib/commonjs/utils/normalize-spacing-values.js +104 -0
  91. package/lib/commonjs/utils/normalize-spacing-values.js.map +1 -0
  92. package/lib/commonjs/utils/package.json +3 -0
  93. package/lib/module/@types/Font.d.js +2 -0
  94. package/lib/module/@types/Font.d.js.map +1 -0
  95. package/lib/module/components/Block/Block.js +44 -33
  96. package/lib/module/components/Block/Block.js.map +1 -1
  97. package/lib/module/components/Block/index.js +3 -1
  98. package/lib/module/components/Block/index.js.map +1 -1
  99. package/lib/module/components/InputFocusScrollView/InputFocusScrollView.js +17 -13
  100. package/lib/module/components/InputFocusScrollView/InputFocusScrollView.js.map +1 -1
  101. package/lib/module/components/InputFocusScrollView/index.js +3 -1
  102. package/lib/module/components/InputFocusScrollView/index.js.map +1 -1
  103. package/lib/module/components/Screen/Screen.js +39 -32
  104. package/lib/module/components/Screen/Screen.js.map +1 -1
  105. package/lib/module/components/Screen/index.js +3 -1
  106. package/lib/module/components/Screen/index.js.map +1 -1
  107. package/lib/module/components/SkeletorProvider/SkeletorContext.js +3 -2
  108. package/lib/module/components/SkeletorProvider/SkeletorContext.js.map +1 -1
  109. package/lib/module/components/SkeletorProvider/SkeletorProvider.js +8 -5
  110. package/lib/module/components/SkeletorProvider/SkeletorProvider.js.map +1 -1
  111. package/lib/module/components/SkeletorProvider/index.js +4 -2
  112. package/lib/module/components/SkeletorProvider/index.js.map +1 -1
  113. package/lib/module/components/Text/Text.js +30 -27
  114. package/lib/module/components/Text/Text.js.map +1 -1
  115. package/lib/module/components/Text/index.js +3 -1
  116. package/lib/module/components/Text/index.js.map +1 -1
  117. package/lib/module/components/index.js +7 -5
  118. package/lib/module/components/index.js.map +1 -1
  119. package/lib/module/components/package.json +1 -1
  120. package/lib/module/hooks/index.js +8 -6
  121. package/lib/module/hooks/index.js.map +1 -1
  122. package/lib/module/hooks/package.json +1 -1
  123. package/lib/module/hooks/skeleform/src/index.js +5 -8
  124. package/lib/module/hooks/skeleform/src/index.js.map +1 -1
  125. package/lib/module/hooks/useAndroidBackHandler.js +2 -0
  126. package/lib/module/hooks/useAndroidBackHandler.js.map +1 -1
  127. package/lib/module/hooks/useAnimation.js +3 -0
  128. package/lib/module/hooks/useAnimation.js.map +1 -1
  129. package/lib/module/hooks/useAnimationTimeline.js +11 -5
  130. package/lib/module/hooks/useAnimationTimeline.js.map +1 -1
  131. package/lib/module/hooks/useAppState.js +4 -2
  132. package/lib/module/hooks/useAppState.js.map +1 -1
  133. package/lib/module/hooks/useSkeletor.js +3 -1
  134. package/lib/module/hooks/useSkeletor.js.map +1 -1
  135. package/lib/module/index.js +6 -4
  136. package/lib/module/index.js.map +1 -1
  137. package/lib/module/models/Alignment.js +2 -0
  138. package/lib/module/models/Alignment.js.map +1 -1
  139. package/lib/module/models/Animation.js +2 -0
  140. package/lib/module/models/Animation.js.map +1 -1
  141. package/lib/module/models/Border.js +2 -0
  142. package/lib/module/models/Border.js.map +1 -1
  143. package/lib/module/models/Flex.js +2 -0
  144. package/lib/module/models/Flex.js.map +1 -1
  145. package/lib/module/models/NonAnimatedDimensionValue.js +4 -0
  146. package/lib/module/models/NonAnimatedDimensionValue.js.map +1 -0
  147. package/lib/module/models/Position.js +2 -0
  148. package/lib/module/models/Position.js.map +1 -1
  149. package/lib/module/models/Size.js +2 -0
  150. package/lib/module/models/Size.js.map +1 -1
  151. package/lib/module/models/SkeletorConfig.js +2 -0
  152. package/lib/module/models/SkeletorConfig.js.map +1 -1
  153. package/lib/module/models/Spacing.js +2 -0
  154. package/lib/module/models/Spacing.js.map +1 -1
  155. package/lib/module/models/TupleTypes.js +2 -0
  156. package/lib/module/models/TupleTypes.js.map +1 -0
  157. package/lib/module/models/index.js +12 -8
  158. package/lib/module/models/index.js.map +1 -1
  159. package/lib/module/models/package.json +1 -1
  160. package/lib/module/package.json +1 -0
  161. package/lib/module/utils/animations.js +22 -12
  162. package/lib/module/utils/animations.js.map +1 -1
  163. package/lib/module/utils/{extractAlignmentProperties.js → extract-alignment-properties.js} +3 -1
  164. package/lib/module/utils/extract-alignment-properties.js.map +1 -0
  165. package/lib/module/utils/{extractAnimationProperties.js → extract-animation-properties.js} +3 -7
  166. package/lib/module/utils/extract-animation-properties.js.map +1 -0
  167. package/lib/module/utils/{extractFlexProperties.js → extract-flex-properties.js} +3 -1
  168. package/lib/module/utils/extract-flex-properties.js.map +1 -0
  169. package/lib/module/utils/{extractGapProperties.js → extract-gap-properties.js} +3 -1
  170. package/lib/module/utils/extract-gap-properties.js.map +1 -0
  171. package/lib/module/utils/{extractPositionProperties.js → extract-position-properties.js} +4 -3
  172. package/lib/module/utils/extract-position-properties.js.map +1 -0
  173. package/lib/module/utils/{extractSizeProperties.js → extract-size-properties.js} +3 -1
  174. package/lib/module/utils/extract-size-properties.js.map +1 -0
  175. package/lib/module/utils/index.js +10 -7
  176. package/lib/module/utils/index.js.map +1 -1
  177. package/lib/module/utils/normalize-spacing-values.js +99 -0
  178. package/lib/module/utils/normalize-spacing-values.js.map +1 -0
  179. package/lib/module/utils/package.json +1 -1
  180. package/lib/typescript/commonjs/components/Block/Block.d.ts.map +1 -0
  181. package/lib/typescript/commonjs/components/Block/index.d.ts.map +1 -0
  182. package/lib/typescript/{components → commonjs/components}/InputFocusScrollView/InputFocusScrollView.d.ts +0 -1
  183. package/lib/typescript/commonjs/components/InputFocusScrollView/InputFocusScrollView.d.ts.map +1 -0
  184. package/lib/typescript/commonjs/components/InputFocusScrollView/index.d.ts.map +1 -0
  185. package/lib/typescript/commonjs/components/Screen/Screen.d.ts +19 -0
  186. package/lib/typescript/commonjs/components/Screen/Screen.d.ts.map +1 -0
  187. package/lib/typescript/commonjs/components/Screen/index.d.ts.map +1 -0
  188. package/lib/typescript/commonjs/components/SkeletorProvider/SkeletorContext.d.ts.map +1 -0
  189. package/lib/typescript/{components → commonjs/components}/SkeletorProvider/SkeletorProvider.d.ts +1 -1
  190. package/lib/typescript/commonjs/components/SkeletorProvider/SkeletorProvider.d.ts.map +1 -0
  191. package/lib/typescript/commonjs/components/SkeletorProvider/index.d.ts.map +1 -0
  192. package/lib/typescript/commonjs/components/Text/Text.d.ts.map +1 -0
  193. package/lib/typescript/commonjs/components/Text/index.d.ts.map +1 -0
  194. package/lib/typescript/commonjs/components/index.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/hooks/index.d.ts.map +1 -0
  196. package/lib/typescript/commonjs/hooks/skeleform/src/index.d.ts.map +1 -0
  197. package/lib/typescript/commonjs/hooks/useAndroidBackHandler.d.ts.map +1 -0
  198. package/lib/typescript/{hooks → commonjs/hooks}/useAnimation.d.ts +1 -0
  199. package/lib/typescript/commonjs/hooks/useAnimation.d.ts.map +1 -0
  200. package/lib/typescript/{hooks → commonjs/hooks}/useAnimationTimeline.d.ts +5 -1
  201. package/lib/typescript/commonjs/hooks/useAnimationTimeline.d.ts.map +1 -0
  202. package/lib/typescript/commonjs/hooks/useAppState.d.ts.map +1 -0
  203. package/lib/typescript/commonjs/hooks/useSkeletor.d.ts.map +1 -0
  204. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  205. package/lib/typescript/commonjs/models/Alignment.d.ts.map +1 -0
  206. package/lib/typescript/{models → commonjs/models}/Animation.d.ts +1 -3
  207. package/lib/typescript/commonjs/models/Animation.d.ts.map +1 -0
  208. package/lib/typescript/{models → commonjs/models}/Border.d.ts +1 -1
  209. package/lib/typescript/commonjs/models/Border.d.ts.map +1 -0
  210. package/lib/typescript/commonjs/models/Flex.d.ts.map +1 -0
  211. package/lib/typescript/commonjs/models/NonAnimatedDimensionValue.d.ts +4 -0
  212. package/lib/typescript/commonjs/models/NonAnimatedDimensionValue.d.ts.map +1 -0
  213. package/lib/typescript/commonjs/models/Position.d.ts.map +1 -0
  214. package/lib/typescript/{models → commonjs/models}/Size.d.ts +1 -1
  215. package/lib/typescript/commonjs/models/Size.d.ts.map +1 -0
  216. package/lib/typescript/commonjs/models/SkeletorConfig.d.ts +20 -0
  217. package/lib/typescript/commonjs/models/SkeletorConfig.d.ts.map +1 -0
  218. package/lib/typescript/commonjs/models/Spacing.d.ts +25 -0
  219. package/lib/typescript/commonjs/models/Spacing.d.ts.map +1 -0
  220. package/lib/typescript/commonjs/models/TupleTypes.d.ts +2 -0
  221. package/lib/typescript/commonjs/models/TupleTypes.d.ts.map +1 -0
  222. package/lib/typescript/{models → commonjs/models}/index.d.ts +2 -0
  223. package/lib/typescript/commonjs/models/index.d.ts.map +1 -0
  224. package/lib/typescript/commonjs/package.json +1 -0
  225. package/lib/typescript/{utils → commonjs/utils}/animations.d.ts +10 -2
  226. package/lib/typescript/commonjs/utils/animations.d.ts.map +1 -0
  227. package/lib/typescript/{utils/extractAlignmentProperties.d.ts → commonjs/utils/extract-alignment-properties.d.ts} +1 -1
  228. package/lib/typescript/commonjs/utils/extract-alignment-properties.d.ts.map +1 -0
  229. package/lib/typescript/{utils/extractAnimationProperties.d.ts → commonjs/utils/extract-animation-properties.d.ts} +1 -1
  230. package/lib/typescript/commonjs/utils/extract-animation-properties.d.ts.map +1 -0
  231. package/lib/typescript/{utils/extractFlexProperties.d.ts → commonjs/utils/extract-flex-properties.d.ts} +1 -1
  232. package/lib/typescript/commonjs/utils/extract-flex-properties.d.ts.map +1 -0
  233. package/lib/typescript/{utils/extractGapProperties.d.ts → commonjs/utils/extract-gap-properties.d.ts} +1 -1
  234. package/lib/typescript/commonjs/utils/extract-gap-properties.d.ts.map +1 -0
  235. package/lib/typescript/{utils/extractPositionProperties.d.ts → commonjs/utils/extract-position-properties.d.ts} +1 -1
  236. package/lib/typescript/commonjs/utils/extract-position-properties.d.ts.map +1 -0
  237. package/lib/typescript/{utils/extractSizeProperties.d.ts → commonjs/utils/extract-size-properties.d.ts} +1 -1
  238. package/lib/typescript/commonjs/utils/extract-size-properties.d.ts.map +1 -0
  239. package/lib/typescript/commonjs/utils/index.d.ts +9 -0
  240. package/lib/typescript/commonjs/utils/index.d.ts.map +1 -0
  241. package/lib/typescript/commonjs/utils/normalize-spacing-values.d.ts +5 -0
  242. package/lib/typescript/commonjs/utils/normalize-spacing-values.d.ts.map +1 -0
  243. package/lib/typescript/module/components/Block/Block.d.ts +25 -0
  244. package/lib/typescript/module/components/Block/Block.d.ts.map +1 -0
  245. package/lib/typescript/module/components/Block/index.d.ts +2 -0
  246. package/lib/typescript/module/components/Block/index.d.ts.map +1 -0
  247. package/lib/typescript/module/components/InputFocusScrollView/InputFocusScrollView.d.ts +26 -0
  248. package/lib/typescript/module/components/InputFocusScrollView/InputFocusScrollView.d.ts.map +1 -0
  249. package/lib/typescript/module/components/InputFocusScrollView/index.d.ts +2 -0
  250. package/lib/typescript/module/components/InputFocusScrollView/index.d.ts.map +1 -0
  251. package/lib/typescript/module/components/Screen/Screen.d.ts +19 -0
  252. package/lib/typescript/module/components/Screen/Screen.d.ts.map +1 -0
  253. package/lib/typescript/module/components/Screen/index.d.ts +2 -0
  254. package/lib/typescript/module/components/Screen/index.d.ts.map +1 -0
  255. package/lib/typescript/module/components/SkeletorProvider/SkeletorContext.d.ts +5 -0
  256. package/lib/typescript/module/components/SkeletorProvider/SkeletorContext.d.ts.map +1 -0
  257. package/lib/typescript/module/components/SkeletorProvider/SkeletorProvider.d.ts +8 -0
  258. package/lib/typescript/module/components/SkeletorProvider/SkeletorProvider.d.ts.map +1 -0
  259. package/lib/typescript/module/components/SkeletorProvider/index.d.ts +3 -0
  260. package/lib/typescript/module/components/SkeletorProvider/index.d.ts.map +1 -0
  261. package/lib/typescript/module/components/Text/Text.d.ts +21 -0
  262. package/lib/typescript/module/components/Text/Text.d.ts.map +1 -0
  263. package/lib/typescript/module/components/Text/index.d.ts +2 -0
  264. package/lib/typescript/module/components/Text/index.d.ts.map +1 -0
  265. package/lib/typescript/module/components/index.d.ts +6 -0
  266. package/lib/typescript/module/components/index.d.ts.map +1 -0
  267. package/lib/typescript/module/hooks/index.d.ts +7 -0
  268. package/lib/typescript/module/hooks/index.d.ts.map +1 -0
  269. package/lib/typescript/module/hooks/skeleform/src/index.d.ts +50 -0
  270. package/lib/typescript/module/hooks/skeleform/src/index.d.ts.map +1 -0
  271. package/lib/typescript/module/hooks/useAndroidBackHandler.d.ts +16 -0
  272. package/lib/typescript/module/hooks/useAndroidBackHandler.d.ts.map +1 -0
  273. package/lib/typescript/module/hooks/useAnimation.d.ts +21 -0
  274. package/lib/typescript/module/hooks/useAnimation.d.ts.map +1 -0
  275. package/lib/typescript/module/hooks/useAnimationTimeline.d.ts +34 -0
  276. package/lib/typescript/module/hooks/useAnimationTimeline.d.ts.map +1 -0
  277. package/lib/typescript/module/hooks/useAppState.d.ts +7 -0
  278. package/lib/typescript/module/hooks/useAppState.d.ts.map +1 -0
  279. package/lib/typescript/module/hooks/useSkeletor.d.ts +3 -0
  280. package/lib/typescript/module/hooks/useSkeletor.d.ts.map +1 -0
  281. package/lib/typescript/module/index.d.ts +5 -0
  282. package/lib/typescript/module/index.d.ts.map +1 -0
  283. package/lib/typescript/module/models/Alignment.d.ts +8 -0
  284. package/lib/typescript/module/models/Alignment.d.ts.map +1 -0
  285. package/lib/typescript/module/models/Animation.d.ts +45 -0
  286. package/lib/typescript/module/models/Animation.d.ts.map +1 -0
  287. package/lib/typescript/module/models/Border.d.ts +10 -0
  288. package/lib/typescript/module/models/Border.d.ts.map +1 -0
  289. package/lib/typescript/module/models/Flex.d.ts +15 -0
  290. package/lib/typescript/module/models/Flex.d.ts.map +1 -0
  291. package/lib/typescript/module/models/NonAnimatedDimensionValue.d.ts +4 -0
  292. package/lib/typescript/module/models/NonAnimatedDimensionValue.d.ts.map +1 -0
  293. package/lib/typescript/module/models/Position.d.ts +20 -0
  294. package/lib/typescript/module/models/Position.d.ts.map +1 -0
  295. package/lib/typescript/module/models/Size.d.ts +10 -0
  296. package/lib/typescript/module/models/Size.d.ts.map +1 -0
  297. package/lib/typescript/module/models/SkeletorConfig.d.ts +20 -0
  298. package/lib/typescript/module/models/SkeletorConfig.d.ts.map +1 -0
  299. package/lib/typescript/module/models/Spacing.d.ts +25 -0
  300. package/lib/typescript/module/models/Spacing.d.ts.map +1 -0
  301. package/lib/typescript/module/models/TupleTypes.d.ts +2 -0
  302. package/lib/typescript/module/models/TupleTypes.d.ts.map +1 -0
  303. package/lib/typescript/module/models/index.d.ts +11 -0
  304. package/lib/typescript/module/models/index.d.ts.map +1 -0
  305. package/lib/typescript/module/package.json +1 -0
  306. package/lib/typescript/module/utils/animations.d.ts +29 -0
  307. package/lib/typescript/module/utils/animations.d.ts.map +1 -0
  308. package/lib/typescript/module/utils/extract-alignment-properties.d.ts +11 -0
  309. package/lib/typescript/module/utils/extract-alignment-properties.d.ts.map +1 -0
  310. package/lib/typescript/module/utils/extract-animation-properties.d.ts +6 -0
  311. package/lib/typescript/module/utils/extract-animation-properties.d.ts.map +1 -0
  312. package/lib/typescript/module/utils/extract-flex-properties.d.ts +3 -0
  313. package/lib/typescript/module/utils/extract-flex-properties.d.ts.map +1 -0
  314. package/lib/typescript/module/utils/extract-gap-properties.d.ts +8 -0
  315. package/lib/typescript/module/utils/extract-gap-properties.d.ts.map +1 -0
  316. package/lib/typescript/module/utils/extract-position-properties.d.ts +13 -0
  317. package/lib/typescript/module/utils/extract-position-properties.d.ts.map +1 -0
  318. package/lib/typescript/module/utils/extract-size-properties.d.ts +3 -0
  319. package/lib/typescript/module/utils/extract-size-properties.d.ts.map +1 -0
  320. package/lib/typescript/module/utils/index.d.ts +9 -0
  321. package/lib/typescript/module/utils/index.d.ts.map +1 -0
  322. package/lib/typescript/module/utils/normalize-spacing-values.d.ts +5 -0
  323. package/lib/typescript/module/utils/normalize-spacing-values.d.ts.map +1 -0
  324. package/package.json +42 -12
  325. package/lib/module/types/Font.d.js +0 -2
  326. package/lib/module/types/Font.d.js.map +0 -1
  327. package/lib/module/utils/extractAlignmentProperties.js.map +0 -1
  328. package/lib/module/utils/extractAnimationProperties.js.map +0 -1
  329. package/lib/module/utils/extractFlexProperties.js.map +0 -1
  330. package/lib/module/utils/extractGapProperties.js.map +0 -1
  331. package/lib/module/utils/extractPositionProperties.js.map +0 -1
  332. package/lib/module/utils/extractSizeProperties.js.map +0 -1
  333. package/lib/typescript/components/Block/Block.d.ts.map +0 -1
  334. package/lib/typescript/components/Block/index.d.ts.map +0 -1
  335. package/lib/typescript/components/InputFocusScrollView/InputFocusScrollView.d.ts.map +0 -1
  336. package/lib/typescript/components/InputFocusScrollView/index.d.ts.map +0 -1
  337. package/lib/typescript/components/Screen/Screen.d.ts +0 -15
  338. package/lib/typescript/components/Screen/Screen.d.ts.map +0 -1
  339. package/lib/typescript/components/Screen/index.d.ts.map +0 -1
  340. package/lib/typescript/components/SkeletorProvider/SkeletorContext.d.ts.map +0 -1
  341. package/lib/typescript/components/SkeletorProvider/SkeletorProvider.d.ts.map +0 -1
  342. package/lib/typescript/components/SkeletorProvider/index.d.ts.map +0 -1
  343. package/lib/typescript/components/Text/Text.d.ts.map +0 -1
  344. package/lib/typescript/components/Text/index.d.ts.map +0 -1
  345. package/lib/typescript/components/index.d.ts.map +0 -1
  346. package/lib/typescript/hooks/index.d.ts.map +0 -1
  347. package/lib/typescript/hooks/skeleform/src/index.d.ts.map +0 -1
  348. package/lib/typescript/hooks/useAndroidBackHandler.d.ts.map +0 -1
  349. package/lib/typescript/hooks/useAnimation.d.ts.map +0 -1
  350. package/lib/typescript/hooks/useAnimationTimeline.d.ts.map +0 -1
  351. package/lib/typescript/hooks/useAppState.d.ts.map +0 -1
  352. package/lib/typescript/hooks/useSkeletor.d.ts.map +0 -1
  353. package/lib/typescript/index.d.ts.map +0 -1
  354. package/lib/typescript/models/Alignment.d.ts.map +0 -1
  355. package/lib/typescript/models/Animation.d.ts.map +0 -1
  356. package/lib/typescript/models/Border.d.ts.map +0 -1
  357. package/lib/typescript/models/Flex.d.ts.map +0 -1
  358. package/lib/typescript/models/Position.d.ts.map +0 -1
  359. package/lib/typescript/models/Size.d.ts.map +0 -1
  360. package/lib/typescript/models/SkeletorConfig.d.ts +0 -11
  361. package/lib/typescript/models/SkeletorConfig.d.ts.map +0 -1
  362. package/lib/typescript/models/Spacing.d.ts +0 -21
  363. package/lib/typescript/models/Spacing.d.ts.map +0 -1
  364. package/lib/typescript/models/index.d.ts.map +0 -1
  365. package/lib/typescript/utils/animations.d.ts.map +0 -1
  366. package/lib/typescript/utils/extractAlignmentProperties.d.ts.map +0 -1
  367. package/lib/typescript/utils/extractAnimationProperties.d.ts.map +0 -1
  368. package/lib/typescript/utils/extractFlexProperties.d.ts.map +0 -1
  369. package/lib/typescript/utils/extractGapProperties.d.ts.map +0 -1
  370. package/lib/typescript/utils/extractPositionProperties.d.ts.map +0 -1
  371. package/lib/typescript/utils/extractSizeProperties.d.ts.map +0 -1
  372. package/lib/typescript/utils/index.d.ts +0 -8
  373. package/lib/typescript/utils/index.d.ts.map +0 -1
  374. /package/lib/typescript/{components → commonjs/components}/Block/Block.d.ts +0 -0
  375. /package/lib/typescript/{components → commonjs/components}/Block/index.d.ts +0 -0
  376. /package/lib/typescript/{components → commonjs/components}/InputFocusScrollView/index.d.ts +0 -0
  377. /package/lib/typescript/{components → commonjs/components}/Screen/index.d.ts +0 -0
  378. /package/lib/typescript/{components → commonjs/components}/SkeletorProvider/SkeletorContext.d.ts +0 -0
  379. /package/lib/typescript/{components → commonjs/components}/SkeletorProvider/index.d.ts +0 -0
  380. /package/lib/typescript/{components → commonjs/components}/Text/Text.d.ts +0 -0
  381. /package/lib/typescript/{components → commonjs/components}/Text/index.d.ts +0 -0
  382. /package/lib/typescript/{components → commonjs/components}/index.d.ts +0 -0
  383. /package/lib/typescript/{hooks → commonjs/hooks}/index.d.ts +0 -0
  384. /package/lib/typescript/{hooks → commonjs/hooks}/skeleform/src/index.d.ts +0 -0
  385. /package/lib/typescript/{hooks → commonjs/hooks}/useAndroidBackHandler.d.ts +0 -0
  386. /package/lib/typescript/{hooks → commonjs/hooks}/useAppState.d.ts +0 -0
  387. /package/lib/typescript/{hooks → commonjs/hooks}/useSkeletor.d.ts +0 -0
  388. /package/lib/typescript/{index.d.ts → commonjs/index.d.ts} +0 -0
  389. /package/lib/typescript/{models → commonjs/models}/Alignment.d.ts +0 -0
  390. /package/lib/typescript/{models → commonjs/models}/Flex.d.ts +0 -0
  391. /package/lib/typescript/{models → commonjs/models}/Position.d.ts +0 -0
package/README.md CHANGED
@@ -29,12 +29,20 @@ Configure the SkeletorProvider properties with whatever you desire. Here is the
29
29
  interface SkeletorConfig {
30
30
  defaultFont: Font | undefined;
31
31
  defaultFontSize: [number, number] | number;
32
- defaultStatusBarType: "dark-content" | "light-content" | "default";
33
- defaultTextColor: string;
34
- /** Defaults to false */
32
+ defaultStatusBarType: StatusBarStyle;
33
+ /** Defaults to transparent if not set.
34
+ * Can be overriden via the Screen component per-screen. */
35
+ defaultStatusBarBackground?: ColorValue;
36
+ /** When set to true, the application will draw under the status bar.
37
+ * Defaults to false if not set.
38
+ * Can be overriden via the Screen component per-screen. */
39
+ defaultStatusBarTranslucent?: boolean;
40
+ defaultTextColor: ColorValue;
41
+ /** When set to true, font size will scale based on the user's device settings.
42
+ * Defaults to false */
35
43
  allowFontScaling: boolean;
36
- /** Defaults to 1 */
37
- maxFontSizeMultiplier: number;
44
+ /** Clamp the maximum font size multiplier that can be applied to the original scale. */
45
+ defaultMaxFontSizeMultiplier?: number;
38
46
  }
39
47
  ```
40
48
 
@@ -62,63 +70,46 @@ return <SomeComponent style={{ fontFamily: skeletor.defaultFont }} />;
62
70
 
63
71
  ```javascript
64
72
  type Spacing = {
65
- /** All margin properties from ViewStyle */
66
- margins?: {...}
67
- /** All padding properties from ViewStyle */
68
- paddings?: {...}
69
- gap?: { row?: number; col?: number } | [number, number] | number;
70
- }
73
+ /** Supports CSS-like shorthands as well as ViewStyle object - 20, [0, 20], [20, 0, 30], [20, 0, 10, 40], { marginLeft: 20 } */
74
+ margins?: MarginStyles,
75
+ /** Supports CSS-like shorthands as well as ViewStyle object - 20, [0, 20], [20, 0, 30], [20, 0, 10, 40], { paddingLeft: 20 } */
76
+ paddings?: PaddingStyles,
77
+ gap?: { row?: number, col?: number } | [number, number] | number,
78
+ };
71
79
 
72
80
  type Alignment = {
73
- align?: ViewStyle["alignItems"];
74
- alignSelf?: ViewStyle["alignSelf"];
75
- justify?: ViewStyle["justifyContent"];
76
- flexDirection?: ViewStyle["flexDirection"];
77
- }
81
+ align?: ViewStyle["alignItems"],
82
+ alignSelf?: ViewStyle["alignSelf"],
83
+ justify?: ViewStyle["justifyContent"],
84
+ flexDirection?: ViewStyle["flexDirection"],
85
+ };
78
86
 
79
87
  type Border = {
80
- /** All border properties from ViewStyle */
81
- border: {...}
82
- }
88
+ /** All border properties from ViewStyle */
89
+ border: { ... },
90
+ };
83
91
 
84
92
  type Flex = {
85
- /** Either just a number or all flex properties from ViewStyle + gap, columnGap & rowGap for backwards compatibility */
86
- flex?: number | {...}
87
- }
88
-
89
- type Offsets =
90
- | [ViewStyle["top"]]
91
- | [ViewStyle["top"], ViewStyle["left"]]
92
- | [ViewStyle["top"], ViewStyle["left"], ViewStyle["bottom"]]
93
- | [
94
- ViewStyle["top"],
95
- ViewStyle["left"],
96
- ViewStyle["bottom"],
97
- ViewStyle["right"],
98
- ]
99
- | {
100
- top?: ViewStyle["top"];
101
- bottom?: ViewStyle["bottom"];
102
- left?: ViewStyle["left"];
103
- right?: ViewStyle["right"];
104
- };
93
+ /** Either just a number or all flex properties from ViewStyle + gap, columnGap & rowGap for backwards compatibility */
94
+ flex?: number | { ... },
95
+ };
105
96
 
106
97
  type Position = {
107
- absolute?: boolean;
108
- zIndex?: number;
109
- offsets?: Offsets;
110
- overflow?: ViewStyle["overflow"];
111
- }
98
+ absolute?: boolean,
99
+ zIndex?: number,
100
+ /** Supports CSS-like shorthands as well as a ViewStyle object - [20], [0, 20], [10, 0, 20], [10, 0, 20, 40], { top: 20, bottom: 20, left: 20, right: 20} */
101
+ offsets?: Offsets,
102
+ overflow?: ViewStyle["overflow"],
103
+ };
112
104
 
113
105
  type Size = {
114
- width?: DimensionValue;
115
- height?: DimensionValue;
116
- minHeight?: DimensionValue;
117
- minWidth?: DimensionValue;
118
- maxHeight?: DimensionValue;
119
- maxWidth?: DimensionValue;
120
- }
121
-
106
+ width?: DimensionValue,
107
+ height?: DimensionValue,
108
+ minHeight?: DimensionValue,
109
+ minWidth?: DimensionValue,
110
+ maxHeight?: DimensionValue,
111
+ maxWidth?: DimensionValue,
112
+ };
122
113
  ```
123
114
 
124
115
  ## Components
@@ -132,16 +123,16 @@ Use this as the top-level wrapper for every screen you navigate to. Is not inten
132
123
  #### Props
133
124
 
134
125
  ```javascript
135
- /** Pass a specific background view (gradients, animated backgrounds etc) OR just a background color value. Custom components should be 100% height and width to span the full screen area. */
136
- background?: JSX.Element | string;
137
- hideTopSafeArea?: boolean;
138
- hideBottomSafeArea?: boolean;
139
- /** Set bottom safe area background color */
140
- bottomSafeAreaColor?: string;
141
- /** Set top safe area background color */
142
- topSafeAreaColor?: string;
143
- /** Set device status bar color type. */
144
- statusBarType?: "default" | "light-content" | "dark-content";
126
+ /** Pass a specific background view OR just a background color value. Custom components should be 100% height and width. */
127
+ background?: React.ReactNode | ColorValue;
128
+ hideTopSafeArea?: boolean;
129
+ hideBottomSafeArea?: boolean;
130
+ bottomSafeAreaColor?: ColorValue;
131
+ topSafeAreaColor?: ColorValue;
132
+ statusBarType?: StatusBarStyle;
133
+ statusBarBackground?: ColorValue;
134
+ /** When set to true, the application will draw under the status bar. */
135
+ statusBarTranslucent?: StatusBarProps["translucent"];
145
136
  ```
146
137
 
147
138
  #### Usage
@@ -285,6 +276,24 @@ height?: "full" | "auto";
285
276
 
286
277
  New utilities have been created to reduce boilerplate when using animations Animated from react-native. The previous hook-based approach is still available.
287
278
 
279
+ ### Breaking change >1.1.0
280
+
281
+ Looped animations are no longer configured when creating the animation due to a performance issue associated with using Animated.loop, especially when the app is backgrounded or the phone is locked.
282
+
283
+ Starting with 1.1.0, use the `loopAnimation` function to create a looped animation. The function blueprint is the same as the regular animation, except this one does not support an `onFinished` handler on the `start` call for obvious reasons.
284
+
285
+ Usage
286
+
287
+ ```javascript
288
+ const element1 = loopAnimation(
289
+ animateParallel({
290
+ opacity: [0, 1],
291
+ translateX: [20, 0],
292
+ translateY: [20, 0],
293
+ })
294
+ );
295
+ ```
296
+
288
297
  ### Overview
289
298
 
290
299
  The concept behind this approach is to:
@@ -406,7 +415,7 @@ useEffect(() => {
406
415
 
407
416
  Read documentation about useForm here: https://github.com/prototypdigital/skeleform
408
417
 
409
- ### LEGACY: useAnimation & useAnimationTimeline
418
+ ### DEPRECATED (<1.0.10): useAnimation & useAnimationTimeline
410
419
 
411
420
  This approach is not going to be maintained anymore starting from version 1.0.10. New utilities have been created that are more performant and more flexible, but the following hooks will still be available for the foreseeable future. For more information on the new approach, see <b>Animations</b> above.
412
421
 
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=Font.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["@types/Font.d.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Block = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _index = require("../../utils/index.js");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
+ const BlockElement = ({
13
+ children,
14
+ ...props
15
+ }) => {
16
+ const {
17
+ border,
18
+ paddings,
19
+ margins,
20
+ background,
21
+ style,
22
+ overflow,
23
+ animations,
24
+ opacity,
25
+ flex,
26
+ gap,
27
+ ...view
28
+ } = props;
29
+ const sizeProps = (0, _index.extractSizeProperties)(props);
30
+ const positionProps = (0, _index.extractPositionProperties)(props);
31
+ const alignmentProps = (0, _index.extractAlignmentProperties)(props);
32
+ const flexProps = (0, _react.useMemo)(() => (0, _index.extractFlexProperties)({
33
+ flex
34
+ }), [flex]);
35
+ const gapProps = (0, _react.useMemo)(() => (0, _index.extractGapProperties)({
36
+ gap
37
+ }), [gap]);
38
+ const animationProps = (0, _react.useMemo)(() => (0, _index.extractAnimationProperties)(animations), [animations]);
39
+ const normalizedMargins = (0, _react.useMemo)(() => (0, _index.normalizeMarginValues)(margins), [margins]);
40
+ const normalizedPaddings = (0, _react.useMemo)(() => (0, _index.normalizePaddingValues)(paddings), [paddings]);
41
+ const styles = _reactNative.StyleSheet.flatten([{
42
+ backgroundColor: typeof background === "string" ? background : undefined,
43
+ overflow,
44
+ opacity
45
+ }, alignmentProps, normalizedMargins, normalizedPaddings, border, flexProps, sizeProps, positionProps, gapProps, style]);
46
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
47
+ ...view,
48
+ style: [styles, animationProps],
49
+ children: children
50
+ });
51
+ };
52
+ function isScrollable(props) {
53
+ return !!props.scrollable;
54
+ }
55
+
56
+ /** Can be switched to a scrollable view by passing in `scrollable`. When scrollable, control ScrollView related parameters through `scrollProps`. Default values for `scrollProps` are:
57
+ * @param keyboardShouldPersistTaps `handled`
58
+ * @param showsVerticalScrollIndicator `false`
59
+ * @param showsHorizontalScrollIndicator `false`
60
+ * @param bounces `false`
61
+ * @param contentContainerStyle `{ flexGrow: 1, backgroundColor: rest.background }` */
62
+ const Block = ({
63
+ children,
64
+ ...props
65
+ }) => {
66
+ if (!isScrollable(props)) {
67
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(BlockElement, {
68
+ ...props,
69
+ children: [props.background && typeof props.background !== "string" && /*#__PURE__*/(0, _jsxRuntime.jsx)(BlockElement, {
70
+ absolute: true,
71
+ zIndex: -1,
72
+ offsets: {
73
+ top: 0,
74
+ bottom: 0,
75
+ left: 0,
76
+ right: 0
77
+ },
78
+ children: props.background
79
+ }), children]
80
+ });
81
+ }
82
+ const {
83
+ scrollProps,
84
+ ...rest
85
+ } = props;
86
+ const {
87
+ horizontal,
88
+ keyboardShouldPersistTaps = "handled",
89
+ showsVerticalScrollIndicator = false,
90
+ showsHorizontalScrollIndicator = false,
91
+ bounces = false,
92
+ contentContainerStyle
93
+ } = scrollProps || {};
94
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
95
+ horizontal: horizontal,
96
+ keyboardShouldPersistTaps: keyboardShouldPersistTaps,
97
+ showsHorizontalScrollIndicator: showsHorizontalScrollIndicator,
98
+ showsVerticalScrollIndicator: showsVerticalScrollIndicator,
99
+ bounces: bounces,
100
+ contentContainerStyle: [{
101
+ flexGrow: 1,
102
+ backgroundColor: typeof rest.background === "string" ? rest.background : undefined
103
+ }, contentContainerStyle],
104
+ ...scrollProps,
105
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(BlockElement, {
106
+ ...rest,
107
+ children: [rest.background && typeof rest.background !== "string" && /*#__PURE__*/(0, _jsxRuntime.jsx)(BlockElement, {
108
+ absolute: true,
109
+ zIndex: -1,
110
+ offsets: [0, 0, 0, 0],
111
+ children: rest.background
112
+ }), children]
113
+ })
114
+ });
115
+ };
116
+ exports.Block = Block;
117
+ //# sourceMappingURL=Block.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BlockElement","children","props","border","paddings","margins","background","style","overflow","animations","opacity","flex","gap","view","sizeProps","extractSizeProperties","positionProps","extractPositionProperties","alignmentProps","extractAlignmentProperties","flexProps","useMemo","extractFlexProperties","gapProps","extractGapProperties","animationProps","extractAnimationProperties","normalizedMargins","normalizeMarginValues","normalizedPaddings","normalizePaddingValues","styles","StyleSheet","flatten","backgroundColor","undefined","jsx","Animated","View","isScrollable","scrollable","Block","jsxs","absolute","zIndex","offsets","top","bottom","left","right","scrollProps","rest","horizontal","keyboardShouldPersistTaps","showsVerticalScrollIndicator","showsHorizontalScrollIndicator","bounces","contentContainerStyle","ScrollView","flexGrow","exports"],"sourceRoot":"../../../../src","sources":["components/Block/Block.tsx"],"mappings":";;;;;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EA,UAAW;IACvBC,yBAAyB,EAAEA,yBAA0B;IACrDE,8BAA8B,EAAEA,8BAA+B;IAC/DD,4BAA4B,EAAEA,4BAA6B;IAC3DE,OAAO,EAAEA,OAAQ;IACjBC,qBAAqB,EAAE,CACtB;MACCE,QAAQ,EAAE,CAAC;MACXzB,eAAe,EACd,OAAOiB,IAAI,CAAC7C,UAAU,KAAK,QAAQ,GAAG6C,IAAI,CAAC7C,UAAU,GAAG6B;IAC1D,CAAC,EACDsB,qBAAqB,CACpB;IAAA,GACEP,WAAW;IAAAjD,QAAA,eAEf,IAAArB,WAAA,CAAA8D,IAAA,EAAC1C,YAAY;MAAA,GAAKmD,IAAI;MAAAlD,QAAA,GACpBkD,IAAI,CAAC7C,UAAU,IAAI,OAAO6C,IAAI,CAAC7C,UAAU,KAAK,QAAQ,iBACtD,IAAA1B,WAAA,CAAAwD,GAAA,EAACpC,YAAY;QAAC2C,QAAQ;QAACC,MAAM,EAAE,CAAC,CAAE;QAACC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAE;QAAA5C,QAAA,EACvDkD,IAAI,CAAC7C;MAAU,CACH,CACd,EACAL,QAAQ;IAAA,CACI;EAAC,CACJ,CAAC;AAEf,CAAC;AAAC2D,OAAA,CAAAnB,KAAA,GAAAA,KAAA","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _Block = require("./Block.js");
7
+ Object.keys(_Block).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _Block[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _Block[key];
14
+ }
15
+ });
16
+ });
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_Block","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../src","sources":["components/Block/index.ts"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.InputFocusScrollView = void 0;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _index = require("../../utils/index.js");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ /**
12
+ * This scroll view will automatically scroll to an active input field rendered within it, provided you attach the `onInputFocus` callback to the input onFocus prop.
13
+ *
14
+ * The return value is a lambda component, returning a callback which you attach to input fields rendered within it.
15
+ * @example <InputFocusScrollView>{(onInputFocus) => <TextInput onFocus={onInputFocus} ... />}</InputFocusScrollView>
16
+ * NOTE: This works on iOS only, Android does this by default with @param android:windowSoftInputMode
17
+ *
18
+ * Default props are:
19
+ * @param height `full`
20
+ * @param focusPositionOffset `0.3`
21
+ * @param showsVerticalScrollIndicator `false`
22
+ * @param showsHorizontalScrollIndicator `false`
23
+ * @param bounces `false`
24
+ * @param contentContainerStyle `{flexGrow: 1, paddingBottom: 30}`
25
+ */
26
+ const InputFocusScrollView = ({
27
+ children,
28
+ style,
29
+ contentContainerStyle,
30
+ height = "full",
31
+ focusPositionOffset = 0.3,
32
+ margins,
33
+ paddings,
34
+ gap,
35
+ showsVerticalScrollIndicator = false,
36
+ showsHorizontalScrollIndicator = false,
37
+ bounces = false,
38
+ ...rest
39
+ }) => {
40
+ const ref = (0, _react.useRef)(null);
41
+ const scrollTarget = (0, _react.useRef)();
42
+ const elementOffset = (0, _react.useRef)(0);
43
+ const contentHeight = (0, _react.useRef)(0);
44
+ /** Cached scroll position to keep focus on input if layout shifts. */
45
+ const scrollPosition = (0, _react.useRef)(0);
46
+ const focusOffset = (0, _react.useRef)(0);
47
+ function onInputFocus(e) {
48
+ if (_reactNative.Platform.OS !== "ios" || !scrollTarget.current) {
49
+ return;
50
+ }
51
+ e.currentTarget.measureLayout(scrollTarget.current, (_nope, top, _nuuh, elementHeight) => {
52
+ focusOffset.current = focusPositionOffset !== undefined ? _reactNative.Dimensions.get("screen").height * focusPositionOffset : 0;
53
+ // bottom of element
54
+ elementOffset.current = top + elementHeight;
55
+ const scrollY = elementOffset.current - focusOffset.current;
56
+ scrollPosition.current = scrollY;
57
+ ref.current?.scrollTo({
58
+ y: scrollY
59
+ });
60
+ }, () => console.error("failed to measure layout"));
61
+ }
62
+ (0, _react.useEffect)(() => {
63
+ const listener = _reactNative.Keyboard.addListener("keyboardWillHide", () => {
64
+ const keyboardHeight = _reactNative.Keyboard.metrics()?.height || 0;
65
+ const leftoverSpace = contentHeight.current - elementOffset.current;
66
+ // If we haven't reached scroll view overflow yet, do nothing
67
+ if (leftoverSpace < keyboardHeight) ref.current?.scrollToEnd();
68
+ });
69
+ return listener.remove;
70
+ });
71
+ const gapProps = (0, _react.useMemo)(() => (0, _index.extractGapProperties)({
72
+ gap
73
+ }), [gap]);
74
+ const normalizedMargins = (0, _react.useMemo)(() => (0, _index.normalizeMarginValues)(margins), [margins]);
75
+ const normalizedPaddings = (0, _react.useMemo)(() => (0, _index.normalizePaddingValues)(paddings), [paddings]);
76
+ const containerStyles = _reactNative.StyleSheet.flatten([styles[height], normalizedMargins, style]);
77
+ const contentStyles = _reactNative.StyleSheet.flatten([styles.content, normalizedPaddings, gapProps, contentContainerStyle]);
78
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
79
+ ref: ref,
80
+ scrollToOverflowEnabled: true,
81
+ scrollEventThrottle: 33,
82
+ onLayout: ({
83
+ currentTarget
84
+ }) => {
85
+ scrollTarget.current = currentTarget;
86
+ },
87
+ onContentSizeChange: (_, height) => {
88
+ contentHeight.current = height;
89
+ },
90
+ showsVerticalScrollIndicator: showsVerticalScrollIndicator,
91
+ showsHorizontalScrollIndicator: showsHorizontalScrollIndicator,
92
+ bounces: bounces,
93
+ style: containerStyles,
94
+ contentContainerStyle: contentStyles,
95
+ ...rest,
96
+ children: children(onInputFocus)
97
+ });
98
+ };
99
+ exports.InputFocusScrollView = InputFocusScrollView;
100
+ const styles = _reactNative.StyleSheet.create({
101
+ full: {
102
+ height: "100%"
103
+ },
104
+ auto: {
105
+ height: "auto"
106
+ },
107
+ content: {
108
+ flexGrow: 1
109
+ }
110
+ });
111
+ //# sourceMappingURL=InputFocusScrollView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_index","_jsxRuntime","InputFocusScrollView","children","style","contentContainerStyle","height","focusPositionOffset","margins","paddings","gap","showsVerticalScrollIndicator","showsHorizontalScrollIndicator","bounces","rest","ref","useRef","scrollTarget","elementOffset","contentHeight","scrollPosition","focusOffset","onInputFocus","e","Platform","OS","current","currentTarget","measureLayout","_nope","top","_nuuh","elementHeight","undefined","Dimensions","get","scrollY","scrollTo","y","console","error","useEffect","listener","Keyboard","addListener","keyboardHeight","metrics","leftoverSpace","scrollToEnd","remove","gapProps","useMemo","extractGapProperties","normalizedMargins","normalizeMarginValues","normalizedPaddings","normalizePaddingValues","containerStyles","StyleSheet","flatten","styles","contentStyles","content","jsx","ScrollView","scrollToOverflowEnabled","scrollEventThrottle","onLayout","onContentSizeChange","_","exports","create","full","auto","flexGrow"],"sourceRoot":"../../../../src","sources":["components/InputFocusScrollView/InputFocusScrollView.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAA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AAO,CAAC,CACxCC,MAAM,CAACE,OAAO,EACdP,kBAAkB,EAClBL,QAAQ,EACR7C,qBAAqB,CACrB,CAAC;EAEF,oBACC,IAAAJ,WAAA,CAAA8D,GAAA,EAAChE,YAAA,CAAAiE,UAAU;IACVjD,GAAG,EAAEA,GAAI;IACTkD,uBAAuB;IACvBC,mBAAmB,EAAE,EAAG;IACxBC,QAAQ,EAAEA,CAAC;MAAExC;IAAc,CAAC,KAAK;MAChCV,YAAY,CAACS,OAAO,GAAGC,aAAa;IACrC,CAAE;IACFyC,mBAAmB,EAAEA,CAACC,CAAC,EAAE/D,MAAM,KAAK;MACnCa,aAAa,CAACO,OAAO,GAAGpB,MAAM;IAC/B,CAAE;IACFK,4BAA4B,EAAEA,4BAA6B;IAC3DC,8BAA8B,EAAEA,8BAA+B;IAC/DC,OAAO,EAAEA,OAAQ;IACjBT,KAAK,EAAEqD,eAAgB;IACvBpD,qBAAqB,EAAEwD,aAAc;IAAA,GACjC/C,IAAI;IAAAX,QAAA,EAEPA,QAAQ,CAACmB,YAAY;EAAC,CACZ,CAAC;AAEf,CAAC;AAACgD,OAAA,CAAApE,oBAAA,GAAAA,oBAAA;AAEF,MAAM0D,MAAM,GAAGF,uBAAU,CAACa,MAAM,CAAC;EAChCC,IAAI,EAAE;IAAElE,MAAM,EAAE;EAAO,CAAC;EACxBmE,IAAI,EAAE;IAAEnE,MAAM,EAAE;EAAO,CAAC;EACxBwD,OAAO,EAAE;IAAEY,QAAQ,EAAE;EAAE;AACxB,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _InputFocusScrollView = require("./InputFocusScrollView.js");
7
+ Object.keys(_InputFocusScrollView).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _InputFocusScrollView[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _InputFocusScrollView[key];
14
+ }
15
+ });
16
+ });
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_InputFocusScrollView","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../src","sources":["components/InputFocusScrollView/index.ts"],"mappings":";;;;;AAAA,IAAAA,qBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,qBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,qBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,qBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Screen = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _index = require("../../hooks/index.js");
9
+ var _index2 = require("../Block/index.js");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ const Screen = ({
12
+ background,
13
+ children,
14
+ hideBottomSafeArea,
15
+ hideTopSafeArea,
16
+ bottomSafeAreaColor,
17
+ topSafeAreaColor,
18
+ statusBarType,
19
+ statusBarBackground,
20
+ statusBarTranslucent,
21
+ paddings,
22
+ ...blockProps
23
+ }) => {
24
+ const {
25
+ defaultStatusBarType,
26
+ defaultStatusBarBackground,
27
+ defaultStatusBarTranslucent
28
+ } = (0, _index.useSkeletor)();
29
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
30
+ children: [background && (typeof background === "string" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Block, {
31
+ style: [_reactNative.StyleSheet.absoluteFill, {
32
+ backgroundColor: background
33
+ }]
34
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Block, {
35
+ style: _reactNative.StyleSheet.absoluteFill,
36
+ children: background
37
+ })), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.StatusBar, {
38
+ translucent: statusBarTranslucent || defaultStatusBarTranslucent || false,
39
+ barStyle: statusBarType || defaultStatusBarType,
40
+ backgroundColor: statusBarBackground || defaultStatusBarBackground || "transparent"
41
+ }), !hideTopSafeArea && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.SafeAreaView, {
42
+ style: {
43
+ backgroundColor: topSafeAreaColor
44
+ }
45
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Block, {
46
+ flex: 1,
47
+ paddings: paddings,
48
+ ...blockProps,
49
+ children: children
50
+ }), !hideBottomSafeArea && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.SafeAreaView, {
51
+ style: {
52
+ backgroundColor: bottomSafeAreaColor
53
+ }
54
+ })]
55
+ });
56
+ };
57
+ exports.Screen = Screen;
58
+ //# sourceMappingURL=Screen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_index","_index2","_jsxRuntime","Screen","background","children","hideBottomSafeArea","hideTopSafeArea","bottomSafeAreaColor","topSafeAreaColor","statusBarType","statusBarBackground","statusBarTranslucent","paddings","blockProps","defaultStatusBarType","defaultStatusBarBackground","defaultStatusBarTranslucent","useSkeletor","jsxs","Fragment","jsx","Block","style","StyleSheet","absoluteFill","backgroundColor","StatusBar","translucent","barStyle","SafeAreaView","flex","exports"],"sourceRoot":"../../../../src","sources":["components/Screen/Screen.tsx"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AASA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAAkD,IAAAG,WAAA,GAAAH,OAAA;AAiB3C,MAAMI,MAAgD,GAAGA,CAAC;EAChE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,CAAC,EAEP,CAACC,kBAAkB,iBACnB,IAAAJ,WAAA,CAAAmB,GAAA,EAACvB,YAAA,CAAAgC,YAAY;MACZP,KAAK,EAAE;QACNG,eAAe,EAAElB;MAClB;IAAE,CACF,CACD;EAAA,CACA,CAAC;AAEL,CAAC;AAACwB,OAAA,CAAA7B,MAAA,GAAAA,MAAA","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _Screen = require("./Screen.js");
7
+ Object.keys(_Screen).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _Screen[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _Screen[key];
14
+ }
15
+ });
16
+ });
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_Screen","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../src","sources":["components/Screen/index.ts"],"mappings":";;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SkeletorDefaults = exports.SkeletorContext = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ const SkeletorDefaults = exports.SkeletorDefaults = {
10
+ defaultFont: undefined,
11
+ defaultFontSize: [12, 16],
12
+ defaultStatusBarType: "dark-content",
13
+ defaultTextColor: "black",
14
+ allowFontScaling: false
15
+ };
16
+ const SkeletorContext = exports.SkeletorContext = /*#__PURE__*/_react.default.createContext(SkeletorDefaults);
17
+ //# sourceMappingURL=SkeletorContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","e","__esModule","default","SkeletorDefaults","exports","defaultFont","undefined","defaultFontSize","defaultStatusBarType","defaultTextColor","allowFontScaling","SkeletorContext","React","createContext"],"sourceRoot":"../../../../src","sources":["components/SkeletorProvider/SkeletorContext.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0B,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGnB,MAAMG,gBAAgC,GAAAC,OAAA,CAAAD,gBAAA,GAAG;EAC/CE,WAAW,EAAEC,SAAS;EACtBC,eAAe,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;EACzBC,oBAAoB,EAAE,cAAc;EACpCC,gBAAgB,EAAE,OAAO;EACzBC,gBAAgB,EAAE;AACnB,CAAC;AAEM,MAAMC,eAAe,GAAAP,OAAA,CAAAO,eAAA,gBAC3BC,cAAK,CAACC,aAAa,CAAiBV,gBAAgB,CAAC","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SkeletorProvider = void 0;
7
+ var _SkeletorContext = require("./SkeletorContext.js");
8
+ var _jsxRuntime = require("react/jsx-runtime");
9
+ /** Create a Font.d.ts type in your typescript types directory and define fonts as follows:
10
+ * @example type Font = "Helvetica" | "Montserrat" ... */
11
+ const SkeletorProvider = ({
12
+ children,
13
+ ...config
14
+ }) => {
15
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SkeletorContext.SkeletorContext.Provider, {
16
+ value: {
17
+ ..._SkeletorContext.SkeletorDefaults,
18
+ ...config
19
+ },
20
+ children: children
21
+ });
22
+ };
23
+ exports.SkeletorProvider = SkeletorProvider;
24
+ //# sourceMappingURL=SkeletorProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_SkeletorContext","require","_jsxRuntime","SkeletorProvider","children","config","jsx","SkeletorContext","Provider","value","SkeletorDefaults","exports"],"sourceRoot":"../../../../src","sources":["components/SkeletorProvider/SkeletorProvider.tsx"],"mappings":";;;;;;AAEA,IAAAA,gBAAA,GAAAC,OAAA;AAAsE,IAAAC,WAAA,GAAAD,OAAA;AAItE;AACA;AACO,MAAME,gBAAoD,GAAGA,CAAC;EACpEC,QAAQ;EACR,GAAGC;AACJ,CAAC,KAAK;EACL,oBACC,IAAAH,WAAA,CAAAI,GAAA,EAACN,gBAAA,CAAAO,eAAe,CAACC,QAAQ;IAACC,KAAK,EAAE;MAAE,GAAGC,iCAAgB;MAAE,GAAGL;IAAO,CAAE;IAAAD,QAAA,EAClEA;EAAQ,CACgB,CAAC;AAE7B,CAAC;AAACO,OAAA,CAAAR,gBAAA,GAAAA,gBAAA","ignoreList":[]}