@rocapine/react-native-onboarding-ui 1.0.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 (275) hide show
  1. package/dist/UI/Components/CircularProgress.d.ts +8 -0
  2. package/dist/UI/Components/CircularProgress.d.ts.map +1 -0
  3. package/dist/UI/Components/CircularProgress.js +104 -0
  4. package/dist/UI/Components/CircularProgress.js.map +1 -0
  5. package/dist/UI/Components/ProgressBar.d.ts +12 -0
  6. package/dist/UI/Components/ProgressBar.d.ts.map +1 -0
  7. package/dist/UI/Components/ProgressBar.js +121 -0
  8. package/dist/UI/Components/ProgressBar.js.map +1 -0
  9. package/dist/UI/Components/StaggeredTextList.d.ts +11 -0
  10. package/dist/UI/Components/StaggeredTextList.d.ts.map +1 -0
  11. package/dist/UI/Components/StaggeredTextList.js +111 -0
  12. package/dist/UI/Components/StaggeredTextList.js.map +1 -0
  13. package/dist/UI/Components/index.d.ts +4 -0
  14. package/dist/UI/Components/index.d.ts.map +1 -0
  15. package/dist/UI/Components/index.js +20 -0
  16. package/dist/UI/Components/index.js.map +1 -0
  17. package/dist/UI/ErrorBoundary/ErrorBoundary.d.ts +19 -0
  18. package/dist/UI/ErrorBoundary/ErrorBoundary.d.ts.map +1 -0
  19. package/dist/UI/ErrorBoundary/ErrorBoundary.js +123 -0
  20. package/dist/UI/ErrorBoundary/ErrorBoundary.js.map +1 -0
  21. package/dist/UI/ErrorBoundary/index.d.ts +3 -0
  22. package/dist/UI/ErrorBoundary/index.d.ts.map +1 -0
  23. package/dist/UI/ErrorBoundary/index.js +8 -0
  24. package/dist/UI/ErrorBoundary/index.js.map +1 -0
  25. package/dist/UI/ErrorBoundary/withErrorBoundary.d.ts +6 -0
  26. package/dist/UI/ErrorBoundary/withErrorBoundary.d.ts.map +1 -0
  27. package/dist/UI/ErrorBoundary/withErrorBoundary.js +13 -0
  28. package/dist/UI/ErrorBoundary/withErrorBoundary.js.map +1 -0
  29. package/dist/UI/OnboardingPage.d.ts +16 -0
  30. package/dist/UI/OnboardingPage.d.ts.map +1 -0
  31. package/dist/UI/OnboardingPage.js +38 -0
  32. package/dist/UI/OnboardingPage.js.map +1 -0
  33. package/dist/UI/Pages/Carousel/Renderer.d.ts +13 -0
  34. package/dist/UI/Pages/Carousel/Renderer.d.ts.map +1 -0
  35. package/dist/UI/Pages/Carousel/Renderer.js +121 -0
  36. package/dist/UI/Pages/Carousel/Renderer.js.map +1 -0
  37. package/dist/UI/Pages/Carousel/index.d.ts +3 -0
  38. package/dist/UI/Pages/Carousel/index.d.ts.map +1 -0
  39. package/dist/UI/Pages/Carousel/index.js +19 -0
  40. package/dist/UI/Pages/Carousel/index.js.map +1 -0
  41. package/dist/UI/Pages/Carousel/types.d.ts +32 -0
  42. package/dist/UI/Pages/Carousel/types.d.ts.map +1 -0
  43. package/dist/UI/Pages/Carousel/types.js +24 -0
  44. package/dist/UI/Pages/Carousel/types.js.map +1 -0
  45. package/dist/UI/Pages/Commitment/Renderer.d.ts +13 -0
  46. package/dist/UI/Pages/Commitment/Renderer.d.ts.map +1 -0
  47. package/dist/UI/Pages/Commitment/Renderer.js +173 -0
  48. package/dist/UI/Pages/Commitment/Renderer.js.map +1 -0
  49. package/dist/UI/Pages/Commitment/index.d.ts +3 -0
  50. package/dist/UI/Pages/Commitment/index.d.ts.map +1 -0
  51. package/dist/UI/Pages/Commitment/index.js +19 -0
  52. package/dist/UI/Pages/Commitment/index.js.map +1 -0
  53. package/dist/UI/Pages/Commitment/types.d.ts +41 -0
  54. package/dist/UI/Pages/Commitment/types.d.ts.map +1 -0
  55. package/dist/UI/Pages/Commitment/types.js +27 -0
  56. package/dist/UI/Pages/Commitment/types.js.map +1 -0
  57. package/dist/UI/Pages/Loader/Renderer.d.ts +10 -0
  58. package/dist/UI/Pages/Loader/Renderer.d.ts.map +1 -0
  59. package/dist/UI/Pages/Loader/Renderer.js +215 -0
  60. package/dist/UI/Pages/Loader/Renderer.js.map +1 -0
  61. package/dist/UI/Pages/Loader/index.d.ts +3 -0
  62. package/dist/UI/Pages/Loader/index.d.ts.map +1 -0
  63. package/dist/UI/Pages/Loader/index.js +19 -0
  64. package/dist/UI/Pages/Loader/index.js.map +1 -0
  65. package/dist/UI/Pages/Loader/types.d.ts +57 -0
  66. package/dist/UI/Pages/Loader/types.d.ts.map +1 -0
  67. package/dist/UI/Pages/Loader/types.js +30 -0
  68. package/dist/UI/Pages/Loader/types.js.map +1 -0
  69. package/dist/UI/Pages/MediaContent/Renderer.d.ts +13 -0
  70. package/dist/UI/Pages/MediaContent/Renderer.d.ts.map +1 -0
  71. package/dist/UI/Pages/MediaContent/Renderer.js +76 -0
  72. package/dist/UI/Pages/MediaContent/Renderer.js.map +1 -0
  73. package/dist/UI/Pages/MediaContent/index.d.ts +3 -0
  74. package/dist/UI/Pages/MediaContent/index.d.ts.map +1 -0
  75. package/dist/UI/Pages/MediaContent/index.js +19 -0
  76. package/dist/UI/Pages/MediaContent/index.js.map +1 -0
  77. package/dist/UI/Pages/MediaContent/types.d.ts +44 -0
  78. package/dist/UI/Pages/MediaContent/types.d.ts.map +1 -0
  79. package/dist/UI/Pages/MediaContent/types.js +22 -0
  80. package/dist/UI/Pages/MediaContent/types.js.map +1 -0
  81. package/dist/UI/Pages/Picker/Renderer.d.ts +13 -0
  82. package/dist/UI/Pages/Picker/Renderer.d.ts.map +1 -0
  83. package/dist/UI/Pages/Picker/Renderer.js +268 -0
  84. package/dist/UI/Pages/Picker/Renderer.js.map +1 -0
  85. package/dist/UI/Pages/Picker/index.d.ts +3 -0
  86. package/dist/UI/Pages/Picker/index.d.ts.map +1 -0
  87. package/dist/UI/Pages/Picker/index.js +19 -0
  88. package/dist/UI/Pages/Picker/index.js.map +1 -0
  89. package/dist/UI/Pages/Picker/types.d.ts +49 -0
  90. package/dist/UI/Pages/Picker/types.d.ts.map +1 -0
  91. package/dist/UI/Pages/Picker/types.js +30 -0
  92. package/dist/UI/Pages/Picker/types.js.map +1 -0
  93. package/dist/UI/Pages/Question/Renderer.d.ts +18 -0
  94. package/dist/UI/Pages/Question/Renderer.d.ts.map +1 -0
  95. package/dist/UI/Pages/Question/Renderer.js +128 -0
  96. package/dist/UI/Pages/Question/Renderer.js.map +1 -0
  97. package/dist/UI/Pages/Question/components.d.ts +57 -0
  98. package/dist/UI/Pages/Question/components.d.ts.map +1 -0
  99. package/dist/UI/Pages/Question/components.js +57 -0
  100. package/dist/UI/Pages/Question/components.js.map +1 -0
  101. package/dist/UI/Pages/Question/index.d.ts +4 -0
  102. package/dist/UI/Pages/Question/index.d.ts.map +1 -0
  103. package/dist/UI/Pages/Question/index.js +20 -0
  104. package/dist/UI/Pages/Question/index.js.map +1 -0
  105. package/dist/UI/Pages/Question/types.d.ts +47 -0
  106. package/dist/UI/Pages/Question/types.d.ts.map +1 -0
  107. package/dist/UI/Pages/Question/types.js +28 -0
  108. package/dist/UI/Pages/Question/types.js.map +1 -0
  109. package/dist/UI/Pages/Ratings/Renderer.d.ts +13 -0
  110. package/dist/UI/Pages/Ratings/Renderer.d.ts.map +1 -0
  111. package/dist/UI/Pages/Ratings/Renderer.js +201 -0
  112. package/dist/UI/Pages/Ratings/Renderer.js.map +1 -0
  113. package/dist/UI/Pages/Ratings/index.d.ts +3 -0
  114. package/dist/UI/Pages/Ratings/index.d.ts.map +1 -0
  115. package/dist/UI/Pages/Ratings/index.js +19 -0
  116. package/dist/UI/Pages/Ratings/index.js.map +1 -0
  117. package/dist/UI/Pages/Ratings/types.d.ts +32 -0
  118. package/dist/UI/Pages/Ratings/types.d.ts.map +1 -0
  119. package/dist/UI/Pages/Ratings/types.js +25 -0
  120. package/dist/UI/Pages/Ratings/types.js.map +1 -0
  121. package/dist/UI/Pages/index.d.ts +9 -0
  122. package/dist/UI/Pages/index.d.ts.map +1 -0
  123. package/dist/UI/Pages/index.js +26 -0
  124. package/dist/UI/Pages/index.js.map +1 -0
  125. package/dist/UI/Pages/types.d.ts +19 -0
  126. package/dist/UI/Pages/types.d.ts.map +1 -0
  127. package/dist/UI/Pages/types.js +25 -0
  128. package/dist/UI/Pages/types.js.map +1 -0
  129. package/dist/UI/Provider/OnboardingProgressProvider.d.ts +18 -0
  130. package/dist/UI/Provider/OnboardingProgressProvider.d.ts.map +1 -0
  131. package/dist/UI/Provider/OnboardingProgressProvider.js +23 -0
  132. package/dist/UI/Provider/OnboardingProgressProvider.js.map +1 -0
  133. package/dist/UI/Provider/index.d.ts +2 -0
  134. package/dist/UI/Provider/index.d.ts.map +1 -0
  135. package/dist/UI/Provider/index.js +7 -0
  136. package/dist/UI/Provider/index.js.map +1 -0
  137. package/dist/UI/Templates/OnboardingTemplate.d.ts +15 -0
  138. package/dist/UI/Templates/OnboardingTemplate.d.ts.map +1 -0
  139. package/dist/UI/Templates/OnboardingTemplate.js +48 -0
  140. package/dist/UI/Templates/OnboardingTemplate.js.map +1 -0
  141. package/dist/UI/Templates/index.d.ts +2 -0
  142. package/dist/UI/Templates/index.d.ts.map +1 -0
  143. package/dist/UI/Templates/index.js +6 -0
  144. package/dist/UI/Templates/index.js.map +1 -0
  145. package/dist/UI/Theme/ThemeProvider.d.ts +27 -0
  146. package/dist/UI/Theme/ThemeProvider.d.ts.map +1 -0
  147. package/dist/UI/Theme/ThemeProvider.js +49 -0
  148. package/dist/UI/Theme/ThemeProvider.js.map +1 -0
  149. package/dist/UI/Theme/defaultTheme.d.ts +7 -0
  150. package/dist/UI/Theme/defaultTheme.d.ts.map +1 -0
  151. package/dist/UI/Theme/defaultTheme.js +14 -0
  152. package/dist/UI/Theme/defaultTheme.js.map +1 -0
  153. package/dist/UI/Theme/helpers.d.ts +12 -0
  154. package/dist/UI/Theme/helpers.d.ts.map +1 -0
  155. package/dist/UI/Theme/helpers.js +21 -0
  156. package/dist/UI/Theme/helpers.js.map +1 -0
  157. package/dist/UI/Theme/index.d.ts +8 -0
  158. package/dist/UI/Theme/index.d.ts.map +1 -0
  159. package/dist/UI/Theme/index.js +24 -0
  160. package/dist/UI/Theme/index.js.map +1 -0
  161. package/dist/UI/Theme/token.d.ts +107 -0
  162. package/dist/UI/Theme/token.d.ts.map +1 -0
  163. package/dist/UI/Theme/token.js +108 -0
  164. package/dist/UI/Theme/token.js.map +1 -0
  165. package/dist/UI/Theme/tokens/darkTokens.d.ts +24 -0
  166. package/dist/UI/Theme/tokens/darkTokens.d.ts.map +1 -0
  167. package/dist/UI/Theme/tokens/darkTokens.js +27 -0
  168. package/dist/UI/Theme/tokens/darkTokens.js.map +1 -0
  169. package/dist/UI/Theme/tokens/index.d.ts +4 -0
  170. package/dist/UI/Theme/tokens/index.d.ts.map +1 -0
  171. package/dist/UI/Theme/tokens/index.js +20 -0
  172. package/dist/UI/Theme/tokens/index.js.map +1 -0
  173. package/dist/UI/Theme/tokens/lightTokens.d.ts +24 -0
  174. package/dist/UI/Theme/tokens/lightTokens.d.ts.map +1 -0
  175. package/dist/UI/Theme/tokens/lightTokens.js +27 -0
  176. package/dist/UI/Theme/tokens/lightTokens.js.map +1 -0
  177. package/dist/UI/Theme/tokens/typography.d.ts +65 -0
  178. package/dist/UI/Theme/tokens/typography.d.ts.map +1 -0
  179. package/dist/UI/Theme/tokens/typography.js +68 -0
  180. package/dist/UI/Theme/tokens/typography.js.map +1 -0
  181. package/dist/UI/Theme/types.d.ts +65 -0
  182. package/dist/UI/Theme/types.d.ts.map +1 -0
  183. package/dist/UI/Theme/types.js +3 -0
  184. package/dist/UI/Theme/types.js.map +1 -0
  185. package/dist/UI/Theme/useTheme.d.ts +7 -0
  186. package/dist/UI/Theme/useTheme.d.ts.map +1 -0
  187. package/dist/UI/Theme/useTheme.js +23 -0
  188. package/dist/UI/Theme/useTheme.js.map +1 -0
  189. package/dist/UI/Theme/utils.d.ts +12 -0
  190. package/dist/UI/Theme/utils.d.ts.map +1 -0
  191. package/dist/UI/Theme/utils.js +55 -0
  192. package/dist/UI/Theme/utils.js.map +1 -0
  193. package/dist/UI/index.d.ts +8 -0
  194. package/dist/UI/index.d.ts.map +1 -0
  195. package/dist/UI/index.js +24 -0
  196. package/dist/UI/index.js.map +1 -0
  197. package/dist/UI/types.d.ts +23 -0
  198. package/dist/UI/types.d.ts.map +1 -0
  199. package/dist/UI/types.js +3 -0
  200. package/dist/UI/types.js.map +1 -0
  201. package/dist/assets/laurel-left.png +0 -0
  202. package/dist/assets/laurel-right.png +0 -0
  203. package/dist/assets/star-filled.png +0 -0
  204. package/dist/index.d.ts +9 -0
  205. package/dist/index.d.ts.map +1 -0
  206. package/dist/index.js +33 -0
  207. package/dist/index.js.map +1 -0
  208. package/dist/provider/CustomComponentsContext.d.ts +57 -0
  209. package/dist/provider/CustomComponentsContext.d.ts.map +1 -0
  210. package/dist/provider/CustomComponentsContext.js +19 -0
  211. package/dist/provider/CustomComponentsContext.js.map +1 -0
  212. package/dist/provider/OnboardingUIProvider.d.ts +44 -0
  213. package/dist/provider/OnboardingUIProvider.d.ts.map +1 -0
  214. package/dist/provider/OnboardingUIProvider.js +33 -0
  215. package/dist/provider/OnboardingUIProvider.js.map +1 -0
  216. package/dist/provider/OnboardingUIProvider.old.d.ts +60 -0
  217. package/dist/provider/OnboardingUIProvider.old.d.ts.map +1 -0
  218. package/dist/provider/OnboardingUIProvider.old.js +53 -0
  219. package/dist/provider/OnboardingUIProvider.old.js.map +1 -0
  220. package/package.json +77 -0
  221. package/src/UI/Components/CircularProgress.tsx +146 -0
  222. package/src/UI/Components/ProgressBar.tsx +143 -0
  223. package/src/UI/Components/StaggeredTextList.tsx +152 -0
  224. package/src/UI/Components/index.ts +3 -0
  225. package/src/UI/ErrorBoundary/ErrorBoundary.tsx +181 -0
  226. package/src/UI/ErrorBoundary/README.md +71 -0
  227. package/src/UI/ErrorBoundary/index.ts +2 -0
  228. package/src/UI/ErrorBoundary/withErrorBoundary.tsx +19 -0
  229. package/src/UI/OnboardingPage.tsx +53 -0
  230. package/src/UI/Pages/Carousel/Renderer.tsx +210 -0
  231. package/src/UI/Pages/Carousel/index.ts +2 -0
  232. package/src/UI/Pages/Carousel/types.ts +26 -0
  233. package/src/UI/Pages/Commitment/Renderer.tsx +312 -0
  234. package/src/UI/Pages/Commitment/index.ts +2 -0
  235. package/src/UI/Pages/Commitment/types.ts +28 -0
  236. package/src/UI/Pages/Loader/Renderer.tsx +417 -0
  237. package/src/UI/Pages/Loader/index.ts +2 -0
  238. package/src/UI/Pages/Loader/types.ts +32 -0
  239. package/src/UI/Pages/MediaContent/Renderer.tsx +130 -0
  240. package/src/UI/Pages/MediaContent/index.ts +2 -0
  241. package/src/UI/Pages/MediaContent/types.ts +26 -0
  242. package/src/UI/Pages/Picker/Renderer.tsx +618 -0
  243. package/src/UI/Pages/Picker/index.ts +2 -0
  244. package/src/UI/Pages/Picker/types.ts +34 -0
  245. package/src/UI/Pages/Question/Renderer.tsx +208 -0
  246. package/src/UI/Pages/Question/components.tsx +130 -0
  247. package/src/UI/Pages/Question/index.ts +3 -0
  248. package/src/UI/Pages/Question/types.ts +29 -0
  249. package/src/UI/Pages/Ratings/Renderer.tsx +282 -0
  250. package/src/UI/Pages/Ratings/index.ts +2 -0
  251. package/src/UI/Pages/Ratings/types.ts +22 -0
  252. package/src/UI/Pages/index.ts +10 -0
  253. package/src/UI/Pages/types.ts +25 -0
  254. package/src/UI/Provider/OnboardingProgressProvider.tsx +40 -0
  255. package/src/UI/Provider/index.ts +1 -0
  256. package/src/UI/Templates/OnboardingTemplate.tsx +86 -0
  257. package/src/UI/Templates/index.ts +1 -0
  258. package/src/UI/Theme/ThemeProvider.tsx +100 -0
  259. package/src/UI/Theme/defaultTheme.ts +12 -0
  260. package/src/UI/Theme/helpers.ts +24 -0
  261. package/src/UI/Theme/index.ts +7 -0
  262. package/src/UI/Theme/token.ts +106 -0
  263. package/src/UI/Theme/tokens/darkTokens.ts +25 -0
  264. package/src/UI/Theme/tokens/index.ts +3 -0
  265. package/src/UI/Theme/tokens/lightTokens.ts +25 -0
  266. package/src/UI/Theme/tokens/typography.ts +66 -0
  267. package/src/UI/Theme/types.ts +72 -0
  268. package/src/UI/Theme/useTheme.ts +22 -0
  269. package/src/UI/Theme/utils.ts +67 -0
  270. package/src/UI/index.ts +7 -0
  271. package/src/UI/types.ts +41 -0
  272. package/src/assets/laurel-left.png +0 -0
  273. package/src/assets/laurel-right.png +0 -0
  274. package/src/assets/star-filled.png +0 -0
  275. package/src/index.ts +28 -0
@@ -0,0 +1,23 @@
1
+ import { CarouselStepType, CommitmentStepType, LoaderStepType, MediaContentStepType, PickerStepType, RatingsStepType, QuestionStepType } from "./Pages";
2
+ export type CustomStepType<StepPayload = any> = {
3
+ id: string;
4
+ type: "CustomScreen";
5
+ name: string;
6
+ displayProgressHeader: boolean;
7
+ payload: {
8
+ customScreenId: string;
9
+ type: string;
10
+ };
11
+ customPayload: StepPayload;
12
+ figmaUrl?: string | null;
13
+ };
14
+ export type BaseStepType = {
15
+ id: string;
16
+ type: string;
17
+ name: string;
18
+ displayProgressHeader?: boolean;
19
+ payload?: any;
20
+ customPayload?: any;
21
+ };
22
+ export type OnboardingStepType = RatingsStepType | MediaContentStepType | PickerStepType | CommitmentStepType | CarouselStepType | LoaderStepType | QuestionStepType | CustomStepType;
23
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/UI/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,cAAc,CAAC,WAAW,GAAG,GAAG,IAAI;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,qBAAqB,EAAE,OAAO,CAAC;IAC/B,OAAO,EAAE;QACP,cAAc,EAAE,MAAM,CAAC;QACvB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,aAAa,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAC1B,eAAe,GACf,oBAAoB,GACpB,cAAc,GACd,kBAAkB,GAClB,gBAAgB,GAChB,cAAc,GACd,gBAAgB,GAChB,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/UI/types.ts"],"names":[],"mappings":""}
Binary file
Binary file
Binary file
@@ -0,0 +1,9 @@
1
+ export type { BaseStepType, Onboarding, OnboardingMetadata, OnboardingStudioClientOptions, } from "@rocapine/react-native-onboarding";
2
+ export { OnboardingPage } from "./UI/OnboardingPage";
3
+ export * from "./UI/Pages";
4
+ export * from "./UI/Templates";
5
+ export * from "./UI/Components";
6
+ export * from "./UI/Theme";
7
+ export * from "./UI/ErrorBoundary";
8
+ export * from "./UI/types";
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,mCAAmC,CAAC;AAG3C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,cAAc,YAAY,CAAC;AAG3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAGhC,cAAc,YAAY,CAAC;AAG3B,cAAc,oBAAoB,CAAC;AAKnC,cAAc,YAAY,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.OnboardingPage = void 0;
18
+ // UI Components and Router
19
+ var OnboardingPage_1 = require("./UI/OnboardingPage");
20
+ Object.defineProperty(exports, "OnboardingPage", { enumerable: true, get: function () { return OnboardingPage_1.OnboardingPage; } });
21
+ // All page types and renderers
22
+ __exportStar(require("./UI/Pages"), exports);
23
+ // Templates and shared components
24
+ __exportStar(require("./UI/Templates"), exports);
25
+ __exportStar(require("./UI/Components"), exports);
26
+ // Theme system
27
+ __exportStar(require("./UI/Theme"), exports);
28
+ // Error boundary
29
+ __exportStar(require("./UI/ErrorBoundary"), exports);
30
+ // Custom components system
31
+ // UI-specific types
32
+ __exportStar(require("./UI/types"), exports);
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAQA,2BAA2B;AAC3B,sDAAqD;AAA5C,gHAAA,cAAc,OAAA;AAEvB,+BAA+B;AAC/B,6CAA2B;AAE3B,kCAAkC;AAClC,iDAA+B;AAC/B,kDAAgC;AAEhC,eAAe;AACf,6CAA2B;AAE3B,iBAAiB;AACjB,qDAAmC;AAEnC,2BAA2B;AAE3B,oBAAoB;AACpB,6CAA2B"}
@@ -0,0 +1,57 @@
1
+ import React from "react";
2
+ import { QuestionAnswerButtonProps, QuestionAnswersListProps } from "../UI/Pages/Question/components";
3
+ /**
4
+ * Custom components that can be provided to override default implementations.
5
+ * Allows full UI customization for specific parts of the onboarding flow.
6
+ */
7
+ export interface CustomComponents {
8
+ /**
9
+ * Custom component for individual Question answer buttons.
10
+ * Replaces the default button styling while keeping list logic.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * const MyButton = ({ answer, selected, onPress, theme }) => (
15
+ * <TouchableOpacity onPress={onPress} style={{ height: 96 }}>
16
+ * <Text>{answer.label}</Text>
17
+ * </TouchableOpacity>
18
+ * );
19
+ *
20
+ * <OnboardingProvider customComponents={{ QuestionAnswerButton: MyButton }} />
21
+ * ```
22
+ */
23
+ QuestionAnswerButton?: React.ComponentType<QuestionAnswerButtonProps>;
24
+ /**
25
+ * Custom component for the entire Question answers list.
26
+ * Provides full control over list rendering, animations, and layout.
27
+ * Takes priority over QuestionAnswerButton.
28
+ *
29
+ * @example
30
+ * ```tsx
31
+ * const MyList = ({ answers, selected, onAnswerPress, theme }) => (
32
+ * <Animated.View>
33
+ * {answers.map(answer => (
34
+ * <MyButton key={answer.value} answer={answer} />
35
+ * ))}
36
+ * </Animated.View>
37
+ * );
38
+ *
39
+ * <OnboardingProvider customComponents={{ QuestionAnswersList: MyList }} />
40
+ * ```
41
+ */
42
+ QuestionAnswersList?: React.ComponentType<QuestionAnswersListProps>;
43
+ }
44
+ /**
45
+ * Provider for custom components.
46
+ * Wraps the app to make custom components available to all renderers.
47
+ */
48
+ export declare const CustomComponentsProvider: React.FC<{
49
+ children: React.ReactNode;
50
+ components?: CustomComponents;
51
+ }>;
52
+ /**
53
+ * Hook to access custom components from context.
54
+ * Returns empty object if no custom components are provided.
55
+ */
56
+ export declare const useCustomComponents: () => CustomComponents;
57
+ //# sourceMappingURL=CustomComponentsContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomComponentsContext.d.ts","sourceRoot":"","sources":["../../src/provider/CustomComponentsContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,iCAAiC,CAAC;AAEzC;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;;;;;;;OAcG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IAEtE;;;;;;;;;;;;;;;;;OAiBG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,wBAAwB,CAAC,CAAC;CAMrE;AAID;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC;IAC9C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B,CAIA,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,wBAA4C,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useCustomComponents = exports.CustomComponentsProvider = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const CustomComponentsContext = (0, react_1.createContext)({});
7
+ /**
8
+ * Provider for custom components.
9
+ * Wraps the app to make custom components available to all renderers.
10
+ */
11
+ const CustomComponentsProvider = ({ children, components = {} }) => ((0, jsx_runtime_1.jsx)(CustomComponentsContext.Provider, { value: components, children: children }));
12
+ exports.CustomComponentsProvider = CustomComponentsProvider;
13
+ /**
14
+ * Hook to access custom components from context.
15
+ * Returns empty object if no custom components are provided.
16
+ */
17
+ const useCustomComponents = () => (0, react_1.useContext)(CustomComponentsContext);
18
+ exports.useCustomComponents = useCustomComponents;
19
+ //# sourceMappingURL=CustomComponentsContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomComponentsContext.js","sourceRoot":"","sources":["../../src/provider/CustomComponentsContext.tsx"],"names":[],"mappings":";;;;AAAA,iCAAyD;AAsDzD,MAAM,uBAAuB,GAAG,IAAA,qBAAa,EAAmB,EAAE,CAAC,CAAC;AAEpE;;;GAGG;AACI,MAAM,wBAAwB,GAGhC,CAAC,EAAE,QAAQ,EAAE,UAAU,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CACtC,uBAAC,uBAAuB,CAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,YAChD,QAAQ,GACwB,CACpC,CAAC;AAPW,QAAA,wBAAwB,4BAOnC;AAEF;;;GAGG;AACI,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,IAAA,kBAAU,EAAC,uBAAuB,CAAC,CAAC;AAAhE,QAAA,mBAAmB,uBAA6C"}
@@ -0,0 +1,44 @@
1
+ import { ColorScheme, DeepPartial, Theme } from "../UI/Theme/types";
2
+ import { CustomComponents } from "./CustomComponentsContext";
3
+ interface OnboardingUIProviderProps {
4
+ children: React.ReactNode;
5
+ initialColorScheme?: ColorScheme;
6
+ locale?: string;
7
+ customAudienceParams?: Record<string, any>;
8
+ /**
9
+ * Custom theme to override default theme tokens for both light and dark modes.
10
+ * Partial overrides are supported - only provide the tokens you want to customize.
11
+ */
12
+ theme?: DeepPartial<Theme>;
13
+ /**
14
+ * Custom theme tokens for light mode only.
15
+ * Partial overrides are supported - only provide the tokens you want to customize.
16
+ */
17
+ lightTheme?: DeepPartial<Theme>;
18
+ /**
19
+ * Custom theme tokens for dark mode only.
20
+ * Partial overrides are supported - only provide the tokens you want to customize.
21
+ */
22
+ darkTheme?: DeepPartial<Theme>;
23
+ /**
24
+ * Custom components to replace default implementations.
25
+ * Allows full UI customization for specific parts of the onboarding flow.
26
+ * @example
27
+ * ```tsx
28
+ * <OnboardingUIProvider
29
+ * customComponents={{
30
+ * QuestionAnswerButton: MyCustomButton,
31
+ * QuestionAnswersList: MyCustomList
32
+ * }}
33
+ * />
34
+ * ```
35
+ */
36
+ customComponents?: CustomComponents;
37
+ }
38
+ /**
39
+ * UI Provider that wraps the headless OnboardingProvider with theme, progress tracking, and custom components.
40
+ * Use this provider when you want the complete UI experience with all features.
41
+ */
42
+ export declare const OnboardingUIProvider: ({ children, client, initialColorScheme, locale, customAudienceParams, theme, lightTheme, darkTheme, customComponents, }: OnboardingUIProviderProps) => import("react/jsx-runtime").JSX.Element;
43
+ export {};
44
+ //# sourceMappingURL=OnboardingUIProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OnboardingUIProvider.d.ts","sourceRoot":"","sources":["../../src/provider/OnboardingUIProvider.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAEL,gBAAgB,EACjB,MAAM,2BAA2B,CAAC;AAGnC,UAAU,yBAAyB;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,kBAAkB,CAAC,EAAE,WAAW,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3C;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3B;;;OAGG;IACH,UAAU,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAChC;;;OAGG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC/B;;;;;;;;;;;;OAYG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,yHAUlC,yBAAyB,4CAwC3B,CAAC"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OnboardingUIProvider = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const react_native_onboarding_1 = require("@rocapine/react-native-onboarding");
7
+ const ThemeProvider_1 = require("../UI/Theme/ThemeProvider");
8
+ const CustomComponentsContext_1 = require("./CustomComponentsContext");
9
+ /**
10
+ * UI Provider that wraps the headless OnboardingProvider with theme, progress tracking, and custom components.
11
+ * Use this provider when you want the complete UI experience with all features.
12
+ */
13
+ const OnboardingUIProvider = ({ children, client, initialColorScheme = "light", locale = "en", customAudienceParams = {}, theme, lightTheme, darkTheme, customComponents, }) => {
14
+ const [activeStep, setActiveStep] = (0, react_1.useState)({
15
+ number: 0,
16
+ displayProgressHeader: false,
17
+ });
18
+ const [totalSteps, setTotalSteps] = (0, react_1.useState)(0);
19
+ const [onboarding, setOnboarding] = (0, react_1.useState)(null);
20
+ return ((0, jsx_runtime_1.jsx)(react_native_onboarding_1.OnboardingProvider, { client: client, locale: locale, customAudienceParams: customAudienceParams, children: (0, jsx_runtime_1.jsx)(ThemeProvider_1.ThemeProvider, { initialColorScheme: initialColorScheme, customTheme: theme, customLightTheme: lightTheme, customDarkTheme: darkTheme, children: (0, jsx_runtime_1.jsx)(CustomComponentsContext_1.CustomComponentsProvider, { components: customComponents, children: (0, jsx_runtime_1.jsx)(OnboardingProgressContext.Provider, { value: {
21
+ activeStep,
22
+ setActiveStep,
23
+ totalSteps,
24
+ setTotalSteps,
25
+ client,
26
+ locale,
27
+ customAudienceParams,
28
+ onboarding,
29
+ setOnboarding,
30
+ }, children: children }) }) }) }));
31
+ };
32
+ exports.OnboardingUIProvider = OnboardingUIProvider;
33
+ //# sourceMappingURL=OnboardingUIProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OnboardingUIProvider.js","sourceRoot":"","sources":["../../src/provider/OnboardingUIProvider.tsx"],"names":[],"mappings":";;;;AAAA,iCAAgD;AAChD,+EAK2C;AAC3C,6DAA0D;AAE1D,uEAGmC;AAuCnC;;;GAGG;AACI,MAAM,oBAAoB,GAAG,CAAC,EACnC,QAAQ,EACR,MAAM,EACN,kBAAkB,GAAG,OAAO,EAC5B,MAAM,GAAG,IAAI,EACb,oBAAoB,GAAG,EAAE,EACzB,KAAK,EACL,UAAU,EACV,SAAS,EACT,gBAAgB,GACU,EAAE,EAAE;IAC9B,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC;QAC3C,MAAM,EAAE,CAAC;QACT,qBAAqB,EAAE,KAAK;KAC7B,CAAC,CAAC;IACH,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,CAAC,CAAC;IAChD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAwC,IAAI,CAAC,CAAC;IAE1F,OAAO,CACL,uBAAC,4CAAkB,IACjB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,oBAAoB,EAAE,oBAAoB,YAE1C,uBAAC,6BAAa,IACZ,kBAAkB,EAAE,kBAAkB,EACtC,WAAW,EAAE,KAAK,EAClB,gBAAgB,EAAE,UAAU,EAC5B,eAAe,EAAE,SAAS,YAE1B,uBAAC,kDAAwB,IAAC,UAAU,EAAE,gBAAgB,YACpD,uBAAC,yBAAyB,CAAC,QAAQ,IACjC,KAAK,EAAE;wBACL,UAAU;wBACV,aAAa;wBACb,UAAU;wBACV,aAAa;wBACb,MAAM;wBACN,MAAM;wBACN,oBAAoB;wBACpB,UAAU;wBACV,aAAa;qBACd,YAEA,QAAQ,GAC0B,GACZ,GACb,GACG,CACtB,CAAC;AACJ,CAAC,CAAC;AAlDW,QAAA,oBAAoB,wBAkD/B"}
@@ -0,0 +1,60 @@
1
+ import { OnboardingStudioClient, Onboarding } from "@rocapine/react-native-onboarding";
2
+ import { ColorScheme, DeepPartial, Theme } from "../UI/Theme/types";
3
+ import { CustomComponents } from "./CustomComponentsContext";
4
+ import { OnboardingStepType } from "../UI/types";
5
+ interface OnboardingProviderProps {
6
+ children: React.ReactNode;
7
+ client: OnboardingStudioClient;
8
+ initialColorScheme?: ColorScheme;
9
+ locale?: string;
10
+ customAudienceParams?: Record<string, any>;
11
+ /**
12
+ * Custom theme to override default theme tokens for both light and dark modes.
13
+ * Partial overrides are supported - only provide the tokens you want to customize.
14
+ */
15
+ theme?: DeepPartial<Theme>;
16
+ /**
17
+ * Custom theme tokens for light mode only.
18
+ * Partial overrides are supported - only provide the tokens you want to customize.
19
+ */
20
+ lightTheme?: DeepPartial<Theme>;
21
+ /**
22
+ * Custom theme tokens for dark mode only.
23
+ * Partial overrides are supported - only provide the tokens you want to customize.
24
+ */
25
+ darkTheme?: DeepPartial<Theme>;
26
+ /**
27
+ * Custom components to replace default implementations.
28
+ * Allows full UI customization for specific parts of the onboarding flow.
29
+ * @example
30
+ * ```tsx
31
+ * <OnboardingProvider
32
+ * customComponents={{
33
+ * QuestionAnswerButton: MyCustomButton,
34
+ * QuestionAnswersList: MyCustomList
35
+ * }}
36
+ * />
37
+ * ```
38
+ */
39
+ customComponents?: CustomComponents;
40
+ }
41
+ export declare const OnboardingProvider: ({ children, client, initialColorScheme, locale, customAudienceParams, theme, lightTheme, darkTheme, customComponents, }: OnboardingProviderProps) => import("react/jsx-runtime").JSX.Element;
42
+ export declare const OnboardingProgressContext: import("react").Context<{
43
+ activeStep: {
44
+ number: number;
45
+ displayProgressHeader: boolean;
46
+ };
47
+ setActiveStep: (step: {
48
+ number: number;
49
+ displayProgressHeader: boolean;
50
+ }) => void;
51
+ totalSteps: number;
52
+ setTotalSteps: (steps: number) => void;
53
+ client: OnboardingStudioClient;
54
+ locale: string;
55
+ customAudienceParams: Record<string, any>;
56
+ onboarding: Onboarding<OnboardingStepType> | null;
57
+ setOnboarding: (onboarding: Onboarding<OnboardingStepType>) => void;
58
+ }>;
59
+ export {};
60
+ //# sourceMappingURL=OnboardingUIProvider.old.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OnboardingUIProvider.old.d.ts","sourceRoot":"","sources":["../../src/provider/OnboardingUIProvider.old.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EACtB,UAAU,EACX,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAEL,gBAAgB,EACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAUjD,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,sBAAsB,CAAC;IAC/B,kBAAkB,CAAC,EAAE,WAAW,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3C;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3B;;;OAGG;IACH,UAAU,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAChC;;;OAGG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC/B;;;;;;;;;;;;OAYG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC;AAED,eAAO,MAAM,kBAAkB,GAAI,yHAUhC,uBAAuB,4CAsCzB,CAAC;AAEF,eAAO,MAAM,yBAAyB;gBACxB;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,qBAAqB,EAAE,OAAO,CAAA;KAAE;mBAC/C,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,qBAAqB,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI;gBACrE,MAAM;mBACH,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;YAC9B,sBAAsB;YACtB,MAAM;0BACQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;gBAC7B,UAAU,CAAC,kBAAkB,CAAC,GAAG,IAAI;mBAClC,CAAC,UAAU,EAAE,UAAU,CAAC,kBAAkB,CAAC,KAAK,IAAI;EAWnE,CAAC"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OnboardingProgressContext = exports.OnboardingProvider = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const react_native_onboarding_1 = require("@rocapine/react-native-onboarding");
7
+ const ThemeProvider_1 = require("../UI/Theme/ThemeProvider");
8
+ const CustomComponentsContext_1 = require("./CustomComponentsContext");
9
+ const queryClient = new QueryClient({
10
+ defaultOptions: {
11
+ queries: {
12
+ staleTime: Infinity,
13
+ },
14
+ },
15
+ });
16
+ const OnboardingProvider = ({ children, client, initialColorScheme = "light", // @todo To move in the Onboarding Layout
17
+ locale = "en", customAudienceParams = {}, theme, // @todo To move in the Onboarding Layout
18
+ lightTheme, // @todo To move in the Onboarding Layout
19
+ darkTheme, // @todo To move in the Onboarding Layout
20
+ customComponents, // @todo To move in the Onboarding Layout
21
+ }) => {
22
+ const [activeStep, setActiveStep] = (0, react_1.useState)({
23
+ number: 0,
24
+ displayProgressHeader: false,
25
+ });
26
+ const [totalSteps, setTotalSteps] = (0, react_1.useState)(0);
27
+ const [onboarding, setOnboarding] = (0, react_1.useState)(null);
28
+ queryClient.prefetchQuery(getOnboardingQuery(client, locale, customAudienceParams, setOnboarding));
29
+ return ((0, jsx_runtime_1.jsx)(QueryClientProvider, { client: queryClient, children: (0, jsx_runtime_1.jsx)(ThemeProvider_1.ThemeProvider, { initialColorScheme: initialColorScheme, customTheme: theme, customLightTheme: lightTheme, customDarkTheme: darkTheme, children: (0, jsx_runtime_1.jsx)(CustomComponentsContext_1.CustomComponentsProvider, { components: customComponents, children: (0, jsx_runtime_1.jsx)(exports.OnboardingProgressContext.Provider, { value: {
30
+ activeStep,
31
+ setActiveStep,
32
+ totalSteps,
33
+ setTotalSteps,
34
+ client,
35
+ locale,
36
+ customAudienceParams,
37
+ onboarding,
38
+ setOnboarding,
39
+ }, children: children }) }) }) }));
40
+ };
41
+ exports.OnboardingProvider = OnboardingProvider;
42
+ exports.OnboardingProgressContext = (0, react_1.createContext)({
43
+ activeStep: { number: 0, displayProgressHeader: false },
44
+ setActiveStep: () => { },
45
+ totalSteps: 0,
46
+ setTotalSteps: () => { },
47
+ client: new react_native_onboarding_1.OnboardingStudioClient('', {}),
48
+ locale: "en",
49
+ customAudienceParams: {},
50
+ onboarding: null,
51
+ setOnboarding: () => { },
52
+ });
53
+ //# sourceMappingURL=OnboardingUIProvider.old.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OnboardingUIProvider.old.js","sourceRoot":"","sources":["../../src/provider/OnboardingUIProvider.old.tsx"],"names":[],"mappings":";;;;AAAA,iCAAgD;AAChD,+EAG2C;AAC3C,6DAA0D;AAE1D,uEAGmC;AAGnC,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC;IAClC,cAAc,EAAE;QACd,OAAO,EAAE;YACP,SAAS,EAAE,QAAQ;SACpB;KACF;CACF,CAAC,CAAA;AAuCK,MAAM,kBAAkB,GAAG,CAAC,EACjC,QAAQ,EACR,MAAM,EACN,kBAAkB,GAAG,OAAO,EAAE,yCAAyC;AACvE,MAAM,GAAG,IAAI,EACb,oBAAoB,GAAG,EAAE,EACzB,KAAK,EAAE,yCAAyC;AAChD,UAAU,EAAE,yCAAyC;AACrD,SAAS,EAAE,yCAAyC;AACpD,gBAAgB,EAAE,yCAAyC;EACnC,EAAE,EAAE;IAC5B,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC;QAC3C,MAAM,EAAE,CAAC;QACT,qBAAqB,EAAE,KAAK;KAC7B,CAAC,CAAC;IACH,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,CAAC,CAAC;IAChD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAwC,IAAI,CAAC,CAAC;IAE1F,WAAW,CAAC,aAAa,CAAC,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,oBAAoB,EAAE,aAAa,CAAC,CAAC,CAAA;IAElG,OAAO,CACL,uBAAC,mBAAmB,IAAC,MAAM,EAAE,WAAW,YACtC,uBAAC,6BAAa,IACZ,kBAAkB,EAAE,kBAAkB,EACtC,WAAW,EAAE,KAAK,EAClB,gBAAgB,EAAE,UAAU,EAC5B,eAAe,EAAE,SAAS,YAE1B,uBAAC,kDAAwB,IAAC,UAAU,EAAE,gBAAgB,YACpD,uBAAC,iCAAyB,CAAC,QAAQ,IACjC,KAAK,EAAE;wBACL,UAAU;wBACV,aAAa;wBACb,UAAU;wBACV,aAAa;wBACb,MAAM;wBACN,MAAM;wBACN,oBAAoB;wBACpB,UAAU;wBACV,aAAa;qBACd,YAEA,QAAQ,GAC0B,GACZ,GACb,GACI,CACvB,CAAC;AACJ,CAAC,CAAC;AAhDW,QAAA,kBAAkB,sBAgD7B;AAEW,QAAA,yBAAyB,GAAG,IAAA,qBAAa,EAUnD;IACD,UAAU,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,qBAAqB,EAAE,KAAK,EAAE;IACvD,aAAa,EAAE,GAAG,EAAE,GAAG,CAAC;IACxB,UAAU,EAAE,CAAC;IACb,aAAa,EAAE,GAAG,EAAE,GAAG,CAAC;IACxB,MAAM,EAAE,IAAI,gDAAsB,CAAC,EAAE,EAAE,EAAE,CAAC;IAC1C,MAAM,EAAE,IAAI;IACZ,oBAAoB,EAAE,EAAE;IACxB,UAAU,EAAE,IAAI;IAChB,aAAa,EAAE,GAAG,EAAE,GAAG,CAAC;CACzB,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,77 @@
1
+ {
2
+ "name": "@rocapine/react-native-onboarding-ui",
3
+ "version": "1.0.0",
4
+ "description": "UI components and renderers for Rocapine Onboarding Studio - Built on top of the headless SDK",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "tsc && cp -r src/assets dist/",
9
+ "prepare": "npm run build",
10
+ "watch": "tsc --watch",
11
+ "patch": "npm version patch && npm run build && npm publish"
12
+ },
13
+ "keywords": [
14
+ "react-native",
15
+ "onboarding",
16
+ "rocapine",
17
+ "ui",
18
+ "components",
19
+ "onboarding-studio"
20
+ ],
21
+ "author": "Rocapine",
22
+ "license": "MIT",
23
+ "dependencies": {
24
+ "lucide-react-native": "^0.545.0",
25
+ "react-native-gesture-handler": ">=2.0.0",
26
+ "react-native-reanimated": ">=3.0.0",
27
+ "react-native-svg": ">=13.0.0",
28
+ "zod": "^4.1.11"
29
+ },
30
+ "devDependencies": {
31
+ "@react-native-picker/picker": "^2.11.2",
32
+ "@shopify/react-native-skia": "^2.3.0",
33
+ "@types/react": "^19.0.0",
34
+ "expo-router": "^4.0.0",
35
+ "expo-store-review": "^9.0.8",
36
+ "react": "19.1.0",
37
+ "react-native": "0.81.4",
38
+ "react-native-gesture-handler": "^2.28.0",
39
+ "react-native-reanimated": "^4.1.2",
40
+ "react-native-safe-area-context": "^5.6.1",
41
+ "react-native-svg": "^15.13.0",
42
+ "typescript": "^5.0.0"
43
+ },
44
+ "peerDependencies": {
45
+ "@react-native-picker/picker": "*",
46
+ "@rocapine/react-native-onboarding": "^1.0.0",
47
+ "@shopify/react-native-skia": ">=1.0.0",
48
+ "@tanstack/react-query": ">=5.0.0",
49
+ "@types/react": "*",
50
+ "expo-router": ">=3.0.0",
51
+ "expo-store-review": "*",
52
+ "react": "*",
53
+ "react-native": "*",
54
+ "react-native-safe-area-context": "*"
55
+ },
56
+ "peerDependenciesMeta": {
57
+ "@react-native-picker/picker": {
58
+ "optional": true
59
+ },
60
+ "@shopify/react-native-skia": {
61
+ "optional": true
62
+ },
63
+ "expo-store-review": {
64
+ "optional": true
65
+ }
66
+ },
67
+ "files": [
68
+ "dist",
69
+ "src",
70
+ "README.md"
71
+ ],
72
+ "repository": {
73
+ "type": "git",
74
+ "url": "https://github.com/rocapine/react-native-onboarding-studio.git",
75
+ "directory": "packages/onboarding-ui"
76
+ }
77
+ }
@@ -0,0 +1,146 @@
1
+ import React, { useEffect, useState } from "react";
2
+ import { View, StyleSheet, Dimensions, Text } from "react-native";
3
+ import Animated, {
4
+ useSharedValue,
5
+ useAnimatedProps,
6
+ withTiming,
7
+ Easing,
8
+ runOnJS,
9
+ useAnimatedReaction,
10
+ } from "react-native-reanimated";
11
+ import Svg, { Circle, Defs, LinearGradient, Stop } from "react-native-svg";
12
+ import { useTheme } from "../Theme/useTheme";
13
+ import { Theme } from "../Theme/types";
14
+
15
+ const AnimatedCircle = Animated.createAnimatedComponent(Circle);
16
+
17
+ type CircularProgressProps = {
18
+ onProgressComplete?: () => void;
19
+ duration: number;
20
+ totalSteps: number;
21
+ };
22
+
23
+ export const CircularProgress = ({
24
+ onProgressComplete,
25
+ duration,
26
+ totalSteps,
27
+ }: CircularProgressProps) => {
28
+ const { theme } = useTheme();
29
+ const { width } = Dimensions.get("window");
30
+
31
+ const CIRCLE_RADIUS = 45;
32
+ const CIRCUMFERENCE = 2 * Math.PI * CIRCLE_RADIUS;
33
+ const strokeWidth = width * 0.02;
34
+
35
+ const progress = useSharedValue(0);
36
+ const [percentage, setPercentage] = useState(0);
37
+
38
+ // Update percentage text using useAnimatedReaction
39
+ useAnimatedReaction(
40
+ () => progress.value,
41
+ (currentValue) => {
42
+ runOnJS(setPercentage)(Math.round(currentValue));
43
+ }
44
+ );
45
+
46
+ useEffect(() => {
47
+ // Reset progress
48
+ progress.value = 0;
49
+
50
+ // Match StaggeredTextList timing: (totalSteps - 1) * duration + duration * 1.5
51
+ const totalDuration = duration * (totalSteps + 0.5);
52
+
53
+ // Animate progress from 0 to 100
54
+ progress.value = withTiming(
55
+ 100,
56
+ {
57
+ duration: totalDuration,
58
+ easing: Easing.bezier(0.25, 0.1, 0.25, 1),
59
+ },
60
+ (finished) => {
61
+ if (finished && onProgressComplete) {
62
+ runOnJS(onProgressComplete)();
63
+ }
64
+ }
65
+ );
66
+ }, [progress, duration, totalSteps, onProgressComplete]);
67
+
68
+ // Animate strokeDashoffset based on progress
69
+ const animatedCircleProps = useAnimatedProps(() => ({
70
+ strokeDashoffset: CIRCUMFERENCE * (1 - progress.value / 100),
71
+ }));
72
+
73
+ const styles = createStyles(theme, width);
74
+
75
+ return (
76
+ <View style={styles.container}>
77
+ <Svg height="100%" width="100%" viewBox="0 0 100 100">
78
+ <Defs>
79
+ <LinearGradient id="progressGrad" x1="0" y1="0" x2="0.2" y2="1.1">
80
+ <Stop offset="0" stopColor={theme.colors.neutral.medium} />
81
+ <Stop offset="0.33" stopColor={theme.colors.neutral.medium} />
82
+ <Stop offset="0.67" stopColor={theme.colors.neutral.low} />
83
+ <Stop offset="1" stopColor={theme.colors.neutral.low} />
84
+ </LinearGradient>
85
+ </Defs>
86
+
87
+ {/* Background Circle */}
88
+ <Circle
89
+ cx="50"
90
+ cy="50"
91
+ r={CIRCLE_RADIUS}
92
+ stroke={theme.colors.neutral.lower}
93
+ strokeWidth={strokeWidth}
94
+ fill="none"
95
+ />
96
+
97
+ {/* Animated Progress Circle */}
98
+ <AnimatedCircle
99
+ cx="50"
100
+ cy="50"
101
+ r={CIRCLE_RADIUS}
102
+ stroke="url(#progressGrad)"
103
+ strokeWidth={strokeWidth}
104
+ fill="none"
105
+ strokeDasharray={CIRCUMFERENCE}
106
+ animatedProps={animatedCircleProps}
107
+ strokeLinecap="round"
108
+ rotation="-90"
109
+ origin="50, 50"
110
+ />
111
+ </Svg>
112
+
113
+ {/* Percentage Text */}
114
+ <View style={styles.textContainer}>
115
+ <Text style={styles.percentageText}>{percentage}%</Text>
116
+ </View>
117
+ </View>
118
+ );
119
+ };
120
+
121
+ const createStyles = (theme: Theme, width: number) =>
122
+ StyleSheet.create({
123
+ container: {
124
+ width: width * 0.7,
125
+ height: width * 0.7,
126
+ justifyContent: "center",
127
+ alignItems: "center",
128
+ position: "relative",
129
+ },
130
+ textContainer: {
131
+ position: "absolute",
132
+ justifyContent: "center",
133
+ alignItems: "center",
134
+ width: "100%",
135
+ height: "100%",
136
+ },
137
+ percentageText: {
138
+ fontFamily: theme.typography.textStyles.heading1.fontFamily,
139
+ fontSize: theme.typography.textStyles.heading1.fontSize,
140
+ fontWeight: theme.typography.fontWeight.bold,
141
+ color: theme.colors.text.primary,
142
+ textAlign: "center",
143
+ includeFontPadding: false,
144
+ padding: 0,
145
+ },
146
+ });