@opexa/portal-components 0.0.287 → 0.0.289

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 (230) hide show
  1. package/dist/client/hooks/index.d.ts +65 -0
  2. package/dist/client/hooks/index.js +65 -0
  3. package/dist/client/hooks/useAuthenticateMutation.js +4 -0
  4. package/dist/client/hooks/useSignInMutation.js +4 -0
  5. package/dist/client/services/index.d.ts +4 -0
  6. package/dist/client/services/index.js +4 -0
  7. package/dist/client/utils/index.d.ts +3 -0
  8. package/dist/client/utils/index.js +3 -0
  9. package/dist/client/utils/recaptcha.d.ts +14 -0
  10. package/dist/client/utils/recaptcha.js +18 -0
  11. package/dist/components/Bonus/Bonus.client.js +1 -1
  12. package/dist/components/Cashback/Cashback.client.js +1 -1
  13. package/dist/components/CashbackBonus/CashbackBonus.client.d.ts +2 -0
  14. package/dist/components/CashbackBonus/CashbackBonus.client.js +9 -0
  15. package/dist/components/CashbackBonus/CashbackBonus.d.ts +10 -0
  16. package/dist/components/CashbackBonus/CashbackBonus.js +5 -0
  17. package/dist/components/CashbackBonus/index.d.ts +1 -0
  18. package/dist/components/CashbackBonus/index.js +1 -0
  19. package/dist/components/CustomPromo/CustomPromo.js +1 -1
  20. package/dist/components/DepositWithdrawal/Deposit/LibanganDeposit/LibanganDeposit.js +1 -1
  21. package/dist/components/DepositWithdrawal/Deposit/PisoPayDeposit/PisoPayDeposit.js +1 -1
  22. package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.d.ts +2 -3
  23. package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.js +1 -1
  24. package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +2 -2
  25. package/dist/components/DigitainLauncher/DigitianContainter.js +2 -2
  26. package/dist/components/DigitainLauncher/types.d.ts +6 -1
  27. package/dist/components/Disclaimer/DisclaimerV2.js +11 -2
  28. package/dist/components/Empty.d.ts +9 -0
  29. package/dist/components/Empty.js +7 -0
  30. package/dist/components/GameLaunch/GameLaunch.lazy.js +1 -1
  31. package/dist/components/Games/GameContext.d.ts +2 -0
  32. package/dist/components/Games/GameContext.js +2 -0
  33. package/dist/components/GamesSearch/GamesSearch.js +1 -1
  34. package/dist/components/InfiniteScroll.d.ts +10 -0
  35. package/dist/components/InfiniteScroll.js +25 -0
  36. package/dist/components/JackpotCounter/JackpotCounter.client.d.ts +2 -0
  37. package/dist/components/JackpotCounter/JackpotCounter.client.js +66 -0
  38. package/dist/components/JackpotCounter/JackpotCounter.d.ts +17 -0
  39. package/dist/components/JackpotCounter/JackpotCounter.js +21 -0
  40. package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +18 -0
  41. package/dist/components/JackpotCounter/JackpotCounterItem.js +109 -0
  42. package/dist/components/JackpotCounter/JackpotCounterItem.module.css +184 -0
  43. package/dist/components/JackpotCounter/index.d.ts +1 -0
  44. package/dist/components/JackpotCounter/index.js +1 -0
  45. package/dist/components/Jackpots/JackpotDesktop.d.ts +1 -0
  46. package/dist/components/Jackpots/JackpotDesktop.js +45 -0
  47. package/dist/components/Jackpots/JackpotGameProviders.d.ts +5 -0
  48. package/dist/components/Jackpots/JackpotGameProviders.js +41 -0
  49. package/dist/components/Jackpots/JackpotItemDesktop.d.ts +9 -0
  50. package/dist/components/Jackpots/JackpotItemDesktop.js +43 -0
  51. package/dist/components/Jackpots/JackpotItemMobile.d.ts +9 -0
  52. package/dist/components/Jackpots/JackpotItemMobile.js +44 -0
  53. package/dist/components/Jackpots/JackpotMobile.d.ts +1 -0
  54. package/dist/components/Jackpots/JackpotMobile.js +46 -0
  55. package/dist/components/Jackpots/JackpotRules.d.ts +5 -0
  56. package/dist/components/Jackpots/JackpotRules.js +11 -0
  57. package/dist/components/Jackpots/Jackpots.client.d.ts +2 -0
  58. package/dist/components/Jackpots/Jackpots.client.js +29 -0
  59. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  60. package/dist/components/Jackpots/JackpotsContext.d.ts +4 -0
  61. package/dist/components/Jackpots/JackpotsContext.js +3 -0
  62. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  63. package/dist/components/Jackpots/useJackpotData.d.ts +14 -0
  64. package/dist/components/Jackpots/useJackpotData.js +93 -0
  65. package/dist/components/Jackpots/useJackpotItemData.d.ts +20 -0
  66. package/dist/components/Jackpots/useJackpotItemData.js +87 -0
  67. package/dist/components/KYC/AutoOpen.js +8 -3
  68. package/dist/components/KYC/Header.d.ts +1 -0
  69. package/dist/components/KYC/Header.js +8 -0
  70. package/dist/components/KYC/Step1.d.ts +1 -0
  71. package/dist/components/KYC/Step1.js +13 -0
  72. package/dist/components/KYC/Step2.d.ts +1 -0
  73. package/dist/components/KYC/Step2.js +13 -0
  74. package/dist/components/KYC/Step3.d.ts +1 -0
  75. package/dist/components/KYC/Step3.js +13 -0
  76. package/dist/components/KYC/Step4.d.ts +1 -0
  77. package/dist/components/KYC/Step4.js +7 -0
  78. package/dist/components/KYC/utils.js +18 -18
  79. package/dist/components/Messages/Message.js +2 -3
  80. package/dist/components/Messages/MessageItem.d.ts +4 -0
  81. package/dist/components/Messages/MessageItem.js +34 -0
  82. package/dist/components/Messages/MessagePopup.js +2 -3
  83. package/dist/components/News/News.js +1 -1
  84. package/dist/components/PortalProvider/FeatureFlag.js +1 -1
  85. package/dist/components/PortalProvider/PortalProvider.d.ts +1 -5
  86. package/dist/components/PortalProvider/PortalProvider.js +4 -5
  87. package/dist/components/Promo/Promo.client.js +1 -1
  88. package/dist/components/Promo/PromoContent.d.ts +2 -0
  89. package/dist/components/Promo/PromoContent.js +9 -0
  90. package/dist/components/Promos/PromoCarousel.d.ts +2 -0
  91. package/dist/components/Promos/PromoCarousel.js +41 -0
  92. package/dist/components/Promos/PromoGrid.d.ts +2 -0
  93. package/dist/components/Promos/PromoGrid.js +12 -0
  94. package/dist/components/Promos/PromoItem.d.ts +7 -0
  95. package/dist/components/Promos/PromoItem.js +10 -0
  96. package/dist/components/Search/Search.lazy.js +1 -1
  97. package/dist/components/SignUp/SignUpDefault/SignUpForm.js +7 -3
  98. package/dist/components/SignUp/SignUpForm.js +4 -0
  99. package/dist/components/SignUp/SignUpKYC/utils.js +18 -18
  100. package/dist/components/TournamentCounter/TournamentCounter.client.d.ts +2 -0
  101. package/dist/components/TournamentCounter/TournamentCounter.client.js +50 -0
  102. package/dist/components/TournamentCounter/TournamentCounter.d.ts +8 -0
  103. package/dist/components/TournamentCounter/TournamentCounter.js +21 -0
  104. package/dist/components/TournamentCounter/TournamentCounterItem.d.ts +8 -0
  105. package/dist/components/TournamentCounter/TournamentCounterItem.js +106 -0
  106. package/dist/components/TournamentCounter/index.d.ts +1 -0
  107. package/dist/components/TournamentCounter/index.js +1 -0
  108. package/dist/components/Tournaments/TournamentDesktop.d.ts +1 -0
  109. package/dist/components/Tournaments/TournamentDesktop.js +57 -0
  110. package/dist/components/Tournaments/TournamentGameProviders.d.ts +5 -0
  111. package/dist/components/Tournaments/TournamentGameProviders.js +38 -0
  112. package/dist/components/Tournaments/TournamentItemDesktop.d.ts +7 -0
  113. package/dist/components/Tournaments/TournamentItemDesktop.js +56 -0
  114. package/dist/components/Tournaments/TournamentItemMobile.d.ts +7 -0
  115. package/dist/components/Tournaments/TournamentItemMobile.js +54 -0
  116. package/dist/components/Tournaments/TournamentMobile.d.ts +1 -0
  117. package/dist/components/Tournaments/TournamentMobile.js +55 -0
  118. package/dist/components/Tournaments/TournamentRules.d.ts +5 -0
  119. package/dist/components/Tournaments/TournamentRules.js +11 -0
  120. package/dist/components/Tournaments/Tournaments.client.d.ts +2 -0
  121. package/dist/components/Tournaments/Tournaments.client.js +20 -0
  122. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  123. package/dist/components/Tournaments/TournamentsContext.d.ts +4 -0
  124. package/dist/components/Tournaments/TournamentsContext.js +3 -0
  125. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  126. package/dist/components/Tournaments/useTournamentData.d.ts +10 -0
  127. package/dist/components/Tournaments/useTournamentData.js +72 -0
  128. package/dist/components/Tournaments/useTournamentItemData.d.ts +16 -0
  129. package/dist/components/Tournaments/useTournamentItemData.js +64 -0
  130. package/dist/components/index.d.ts +33 -0
  131. package/dist/components/index.js +33 -0
  132. package/dist/constants/EnvVar.d.ts +2 -1
  133. package/dist/constants/EnvVar.js +6 -0
  134. package/dist/constants/endpoints.d.ts +10 -0
  135. package/dist/constants/endpoints.js +41 -0
  136. package/dist/constants/envVars.d.ts +5 -0
  137. package/dist/constants/envVars.js +28 -0
  138. package/dist/constants/gameProviders.d.ts +76 -0
  139. package/dist/constants/gameProviders.js +361 -0
  140. package/dist/constants/gameTypes.d.ts +3 -0
  141. package/dist/constants/gameTypes.js +64 -0
  142. package/dist/constants/headerKeys.d.ts +2 -0
  143. package/dist/constants/headerKeys.js +2 -0
  144. package/dist/constants/secretQuestions.d.ts +3 -0
  145. package/dist/constants/secretQuestions.js +24 -0
  146. package/dist/constants/storageKeys.d.ts +2 -0
  147. package/dist/constants/storageKeys.js +2 -0
  148. package/dist/handlers/index.d.ts +2 -2
  149. package/dist/icons/index.d.ts +65 -0
  150. package/dist/icons/index.js +65 -0
  151. package/dist/images/hacksaw-gaming.png +0 -0
  152. package/dist/server/services/index.d.ts +4 -0
  153. package/dist/server/services/index.js +4 -0
  154. package/dist/server/utils/index.d.ts +29 -0
  155. package/dist/server/utils/index.js +29 -0
  156. package/dist/services/queries.js +2574 -2574
  157. package/dist/styles/theme.css +701 -697
  158. package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
  159. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +8 -8
  160. package/dist/ui/Badge/Badge.d.ts +12 -12
  161. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  162. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  163. package/dist/ui/Carousel/Carousel.d.ts +72 -72
  164. package/dist/ui/Carousel/carousel.recipe.d.ts +8 -8
  165. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  166. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  167. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  168. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  169. package/dist/ui/Collapsible/Collapsible.d.ts +32 -32
  170. package/dist/ui/Collapsible/collapsible.recipe.d.ts +8 -8
  171. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  172. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  173. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  174. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  175. package/dist/ui/Dialog/Dialog.d.ts +88 -88
  176. package/dist/ui/Dialog/dialog.recipe.d.ts +8 -8
  177. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  178. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  179. package/dist/ui/Field/Field.d.ts +21 -21
  180. package/dist/ui/Field/field.recipe.d.ts +3 -3
  181. package/dist/ui/Menu/Menu.d.ts +306 -306
  182. package/dist/ui/Menu/menu.recipe.d.ts +17 -17
  183. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  184. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  185. package/dist/ui/Popover/Popover.d.ts +88 -88
  186. package/dist/ui/Popover/popover.recipe.d.ts +8 -8
  187. package/dist/ui/Presence.d.ts +2 -0
  188. package/dist/ui/Presence.js +7 -0
  189. package/dist/ui/Progress/Progress.d.ts +27 -27
  190. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  191. package/dist/ui/Prose.d.ts +2 -0
  192. package/dist/ui/Prose.js +5 -0
  193. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  194. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  195. package/dist/ui/Select/Select.d.ts +45 -45
  196. package/dist/ui/Select/select.recipe.d.ts +3 -3
  197. package/dist/ui/Table/Table.d.ts +21 -21
  198. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  199. package/dist/ui/Table/table.recipe.d.ts +3 -3
  200. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  201. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  202. package/dist/ui/index.d.ts +26 -0
  203. package/dist/ui/index.js +26 -0
  204. package/dist/utils/createErrorFromCode.d.ts +2 -0
  205. package/dist/utils/createErrorFromCode.js +11 -0
  206. package/dist/utils/index.d.ts +17 -0
  207. package/dist/utils/index.js +17 -0
  208. package/dist/utils/isMobile.d.ts +5 -0
  209. package/dist/utils/isMobile.js +9 -0
  210. package/dist/utils/resizeImageSize.d.ts +0 -1
  211. package/dist/utils/resizeImageSize.js +0 -5
  212. package/package.json +163 -163
  213. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +0 -1
  214. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +0 -198
  215. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +0 -1
  216. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +0 -251
  217. package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +0 -10
  218. package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +0 -41
  219. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +0 -1
  220. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +0 -429
  221. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +0 -13
  222. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +0 -26
  223. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +0 -7
  224. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +0 -2
  225. package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +0 -11
  226. package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +0 -20
  227. package/dist/handlers/postTransformIdFrontImage.d.ts +0 -3
  228. package/dist/handlers/postTransformIdFrontImage.js +0 -67
  229. package/dist/handlers/postTransformSelfieImage.d.ts +0 -3
  230. package/dist/handlers/postTransformSelfieImage.js +0 -71
package/package.json CHANGED
@@ -1,163 +1,163 @@
1
- {
2
- "name": "@opexa/portal-components",
3
- "version": "0.0.287",
4
- "exports": {
5
- "./ui/*": {
6
- "types": "./dist/ui/*/index.d.ts",
7
- "default": "./dist/ui/*/index.js"
8
- },
9
- "./utils/*": {
10
- "types": "./dist/utils/*.d.ts",
11
- "import": "./dist/utils/*.js"
12
- },
13
- "./types": {
14
- "types": "./dist/types/index.d.ts",
15
- "import": "./dist/types/index.js"
16
- },
17
- "./handlers": {
18
- "types": "./dist/handlers/index.d.ts",
19
- "default": "./dist/handlers/index.js"
20
- },
21
- "./middleware": {
22
- "types": "./dist/middleware.d.ts",
23
- "default": "./dist/middleware.js"
24
- },
25
- "./constants": {
26
- "types": "./dist/constants/index.d.ts",
27
- "default": "./dist/constants/index.js"
28
- },
29
- "./services/*": {
30
- "types": "./dist/services/*.d.ts",
31
- "default": "./dist/services/*.js"
32
- },
33
- "./client-utils/*": {
34
- "types": "./dist/client/utils/*.d.ts",
35
- "default": "./dist/client/utils/*.js"
36
- },
37
- "./client-hooks/*": {
38
- "types": "./dist/client/hooks/*.d.ts",
39
- "default": "./dist/client/hooks/*.js"
40
- },
41
- "./client-services/*": {
42
- "types": "./dist/client/services/*.d.ts",
43
- "default": "./dist/client/services/*.js"
44
- },
45
- "./server-utils/*": {
46
- "types": "./dist/server/utils/*.d.ts",
47
- "default": "./dist/server/utils/*.js"
48
- },
49
- "./server-services/*": {
50
- "types": "./dist/server/services/*.d.ts",
51
- "default": "./dist/server/services/*.js"
52
- },
53
- "./next.config": {
54
- "types": "./dist/next.config.d.ts",
55
- "default": "./dist/next.config.js"
56
- },
57
- "./theme.css": "./dist/styles/theme.css",
58
- "./*": {
59
- "types": "./dist/components/*/index.d.ts",
60
- "default": "./dist/components/*/index.js"
61
- }
62
- },
63
- "files": [
64
- "dist",
65
- "!dist/tsconfig.tsbuildinfo",
66
- "!dist/tsconfig.build.tsbuildinfo"
67
- ],
68
- "publishConfig": {
69
- "access": "public"
70
- },
71
- "scripts": {
72
- "dev": "next dev --port 4000",
73
- "build": "tsc --project tsconfig.build.json && tsc-alias -p tsconfig.build.json && copy-files-from-to",
74
- "build:app": "next build",
75
- "start": "next start",
76
- "lint": "next lint",
77
- "release": "release-it"
78
- },
79
- "dependencies": {
80
- "@ark-ui/react": "^5.16.0",
81
- "@date-fns/tz": "^1.2.0",
82
- "@mediapipe/tasks-vision": "0.10.22-rc.20250304",
83
- "@next/third-parties": "^15.3.4",
84
- "@tailwindcss/typography": "^0.5.16",
85
- "date-fns": "^4.1.0",
86
- "embla-carousel-autoplay": "^8.6.0",
87
- "embla-carousel-react": "^8.6.0",
88
- "is-mobile": "^5.0.0",
89
- "lodash-es": "^4.17.21",
90
- "tailwind-merge": "^3.3.1",
91
- "tailwind-variants": "^1.0.0",
92
- "tailwind-zag": "^1.0.2",
93
- "tiny-invariant": "^1.3.3",
94
- "type-fest": "^4.41.0",
95
- "usehooks-ts": "^3.1.1",
96
- "zustand": "^5.0.6"
97
- },
98
- "devDependencies": {
99
- "@eslint/eslintrc": "3",
100
- "@hookform/resolvers": "5.1.1",
101
- "@opexa/object-id": "0.1.6",
102
- "@tailwindcss/postcss": "4",
103
- "@tanstack/react-query": "5.81.5",
104
- "@tanstack/react-query-devtools": "5.81.5",
105
- "@total-typescript/ts-reset": "0.6.1",
106
- "@types/lodash-es": "4.17.12",
107
- "@types/node": "24",
108
- "@types/react": "19",
109
- "@types/react-dom": "19",
110
- "copy-files-from-to": "3.12.1",
111
- "eslint": "9",
112
- "eslint-config-next": "15.3.4",
113
- "next": "15.4.0-canary.116",
114
- "react": "19.1.0",
115
- "react-dom": "19.1.0",
116
- "react-hook-form": "7.59.0",
117
- "release-it": "19.0.3",
118
- "tailwindcss": "4.1.11",
119
- "tsc-alias": "1.8.16",
120
- "typescript": "5",
121
- "zod": "3.25.71"
122
- },
123
- "peerDependencies": {
124
- "@hookform/resolvers": "^4.0.0 || ^5.0.0",
125
- "@opexa/object-id": "^0.1.0",
126
- "@tanstack/react-query": "^5.0.0",
127
- "next": "^15.4.0-canary.1",
128
- "react": "^19.0.0",
129
- "react-dom": "^19.0.0",
130
- "react-hook-form": "^7.0.0",
131
- "tailwindcss": "^4.0.0",
132
- "zod": "^3.0.0"
133
- },
134
- "release-it": {
135
- "git": {
136
- "commitMessage": "chore: release ${npm.name} v${version}",
137
- "tagName": "${npm.name}@${version}"
138
- },
139
- "github": {
140
- "release": false
141
- },
142
- "hooks": {
143
- "before:bump": [
144
- "pnpm lint"
145
- ],
146
- "after:bump": [
147
- "pnpm build"
148
- ]
149
- }
150
- },
151
- "copyFiles": [
152
- {
153
- "from": "src/lib/**/*.{png,jpg,jpeg,gif,svg,css,json}",
154
- "to": "dist/",
155
- "toFlat": false
156
- }
157
- ],
158
- "copyFilesSettings": {
159
- "whenFileExists": "overwrite",
160
- "removeSourceMappingURL": true,
161
- "ignoreDotFilesAndFolders": false
162
- }
163
- }
1
+ {
2
+ "name": "@opexa/portal-components",
3
+ "version": "0.0.289",
4
+ "exports": {
5
+ "./ui/*": {
6
+ "types": "./dist/ui/*/index.d.ts",
7
+ "default": "./dist/ui/*/index.js"
8
+ },
9
+ "./utils/*": {
10
+ "types": "./dist/utils/*.d.ts",
11
+ "import": "./dist/utils/*.js"
12
+ },
13
+ "./types": {
14
+ "types": "./dist/types/index.d.ts",
15
+ "import": "./dist/types/index.js"
16
+ },
17
+ "./handlers": {
18
+ "types": "./dist/handlers/index.d.ts",
19
+ "default": "./dist/handlers/index.js"
20
+ },
21
+ "./middleware": {
22
+ "types": "./dist/middleware.d.ts",
23
+ "default": "./dist/middleware.js"
24
+ },
25
+ "./constants": {
26
+ "types": "./dist/constants/index.d.ts",
27
+ "default": "./dist/constants/index.js"
28
+ },
29
+ "./services/*": {
30
+ "types": "./dist/services/*.d.ts",
31
+ "default": "./dist/services/*.js"
32
+ },
33
+ "./client-utils/*": {
34
+ "types": "./dist/client/utils/*.d.ts",
35
+ "default": "./dist/client/utils/*.js"
36
+ },
37
+ "./client-hooks/*": {
38
+ "types": "./dist/client/hooks/*.d.ts",
39
+ "default": "./dist/client/hooks/*.js"
40
+ },
41
+ "./client-services/*": {
42
+ "types": "./dist/client/services/*.d.ts",
43
+ "default": "./dist/client/services/*.js"
44
+ },
45
+ "./server-utils/*": {
46
+ "types": "./dist/server/utils/*.d.ts",
47
+ "default": "./dist/server/utils/*.js"
48
+ },
49
+ "./server-services/*": {
50
+ "types": "./dist/server/services/*.d.ts",
51
+ "default": "./dist/server/services/*.js"
52
+ },
53
+ "./next.config": {
54
+ "types": "./dist/next.config.d.ts",
55
+ "default": "./dist/next.config.js"
56
+ },
57
+ "./theme.css": "./dist/styles/theme.css",
58
+ "./*": {
59
+ "types": "./dist/components/*/index.d.ts",
60
+ "default": "./dist/components/*/index.js"
61
+ }
62
+ },
63
+ "files": [
64
+ "dist",
65
+ "!dist/tsconfig.tsbuildinfo",
66
+ "!dist/tsconfig.build.tsbuildinfo"
67
+ ],
68
+ "publishConfig": {
69
+ "access": "public"
70
+ },
71
+ "scripts": {
72
+ "dev": "next dev --port 4000",
73
+ "build": "tsc --project tsconfig.build.json && tsc-alias -p tsconfig.build.json && copy-files-from-to",
74
+ "build:app": "next build",
75
+ "start": "next start",
76
+ "lint": "next lint",
77
+ "release": "release-it"
78
+ },
79
+ "dependencies": {
80
+ "@ark-ui/react": "^5.16.0",
81
+ "@date-fns/tz": "^1.2.0",
82
+ "@mediapipe/tasks-vision": "0.10.22-rc.20250304",
83
+ "@next/third-parties": "^15.3.4",
84
+ "@tailwindcss/typography": "^0.5.16",
85
+ "date-fns": "^4.1.0",
86
+ "embla-carousel-autoplay": "^8.6.0",
87
+ "embla-carousel-react": "^8.6.0",
88
+ "is-mobile": "^5.0.0",
89
+ "lodash-es": "^4.17.21",
90
+ "tailwind-merge": "^3.3.1",
91
+ "tailwind-variants": "^1.0.0",
92
+ "tailwind-zag": "^1.0.2",
93
+ "tiny-invariant": "^1.3.3",
94
+ "type-fest": "^4.41.0",
95
+ "usehooks-ts": "^3.1.1",
96
+ "zustand": "^5.0.6"
97
+ },
98
+ "devDependencies": {
99
+ "@eslint/eslintrc": "3",
100
+ "@hookform/resolvers": "5.1.1",
101
+ "@opexa/object-id": "0.1.6",
102
+ "@tailwindcss/postcss": "4",
103
+ "@tanstack/react-query": "5.81.5",
104
+ "@tanstack/react-query-devtools": "5.81.5",
105
+ "@total-typescript/ts-reset": "0.6.1",
106
+ "@types/lodash-es": "4.17.12",
107
+ "@types/node": "24",
108
+ "@types/react": "19",
109
+ "@types/react-dom": "19",
110
+ "copy-files-from-to": "3.12.1",
111
+ "eslint": "9",
112
+ "eslint-config-next": "15.3.4",
113
+ "next": "15.4.0-canary.116",
114
+ "react": "19.1.0",
115
+ "react-dom": "19.1.0",
116
+ "react-hook-form": "7.59.0",
117
+ "release-it": "19.0.3",
118
+ "tailwindcss": "4.1.11",
119
+ "tsc-alias": "1.8.16",
120
+ "typescript": "5",
121
+ "zod": "3.25.71"
122
+ },
123
+ "peerDependencies": {
124
+ "@hookform/resolvers": "^4.0.0 || ^5.0.0",
125
+ "@opexa/object-id": "^0.1.0",
126
+ "@tanstack/react-query": "^5.0.0",
127
+ "next": "^15.4.0-canary.1",
128
+ "react": "^19.0.0",
129
+ "react-dom": "^19.0.0",
130
+ "react-hook-form": "^7.0.0",
131
+ "tailwindcss": "^4.0.0",
132
+ "zod": "^3.0.0"
133
+ },
134
+ "release-it": {
135
+ "git": {
136
+ "commitMessage": "chore: release ${npm.name} v${version}",
137
+ "tagName": "${npm.name}@${version}"
138
+ },
139
+ "github": {
140
+ "release": false
141
+ },
142
+ "hooks": {
143
+ "before:bump": [
144
+ "pnpm lint"
145
+ ],
146
+ "after:bump": [
147
+ "pnpm build"
148
+ ]
149
+ }
150
+ },
151
+ "copyFiles": [
152
+ {
153
+ "from": "src/lib/**/*.{png,jpg,jpeg,gif,svg,css,json}",
154
+ "to": "dist/",
155
+ "toFlat": false
156
+ }
157
+ ],
158
+ "copyFilesSettings": {
159
+ "whenFileExists": "overwrite",
160
+ "removeSourceMappingURL": true,
161
+ "ignoreDotFilesAndFolders": false
162
+ }
163
+ }
@@ -1 +0,0 @@
1
- export declare function CaptureIdDocument(): import("react/jsx-runtime").JSX.Element;
@@ -1,198 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useEffect, useRef, useState } from 'react';
4
- import { twMerge } from 'tailwind-merge';
5
- import { ArrowLeftIcon } from '../../../icons/ArrowLeftIcon.js';
6
- import { Camera01Icon } from '../../../icons/Camera01Icon.js';
7
- import { CheckCircleIcon } from '../../../icons/CheckCircleIcon.js';
8
- import { XIcon } from '../../../icons/XIcon.js';
9
- import { Button } from '../../../ui/Button/index.js';
10
- import { Dialog } from '../../../ui/Dialog/index.js';
11
- import { Portal } from '../../../ui/Portal/index.js';
12
- import { dataURLtoBlob, resizeFile } from '../../KYC/utils.js';
13
- import { useSignUpPagcorPropsContext } from './SignUpPagcorContext.js';
14
- export function CaptureIdDocument() {
15
- const props = useSignUpPagcorPropsContext();
16
- const [videoStream, setVideoStream] = useState(null);
17
- const [cameraError, setCameraError] = useState(null);
18
- const [isLoading, setIsLoading] = useState(false);
19
- const [selectedImage, setSelectedImage] = useState(null);
20
- const [captureInProgress, setCaptureInProgress] = useState(false);
21
- const [proccessImageCanvas, setProccessImageCanvas] = useState(null);
22
- const videoElement = useRef(null);
23
- const containerRef = useRef(null);
24
- function stopCamera() {
25
- if (videoStream) {
26
- videoStream.getTracks().forEach((track) => track.stop());
27
- setVideoStream(null);
28
- }
29
- }
30
- useEffect(() => {
31
- return () => {
32
- stopCamera();
33
- };
34
- }, [videoStream]);
35
- async function startCamera() {
36
- try {
37
- setIsLoading(true);
38
- setCameraError(null);
39
- setCaptureInProgress(true);
40
- console.log('Starting camera...');
41
- const stream = await navigator.mediaDevices.getUserMedia({
42
- video: {
43
- facingMode: 'environment',
44
- aspectRatio: 16 / 9,
45
- width: { ideal: 1920, max: 1920 },
46
- height: { ideal: 1080, max: 1080 },
47
- frameRate: {
48
- ideal: 30,
49
- max: 60,
50
- },
51
- },
52
- audio: false,
53
- });
54
- // Set the stream directly to the video element
55
- if (videoElement.current) {
56
- videoElement.current.srcObject = stream;
57
- videoElement.current.onloadedmetadata = () => {
58
- console.log('Video metadata loaded, starting playback...');
59
- videoElement.current
60
- ?.play()
61
- .then(() => {
62
- setVideoStream(stream);
63
- setIsLoading(false);
64
- })
65
- .catch(() => {
66
- setCameraError('Failed to start camera stream. Please try again.');
67
- setIsLoading(false);
68
- // Stop the stream if playback fails
69
- stream.getTracks().forEach((track) => track.stop());
70
- });
71
- };
72
- videoElement.current.onerror = (err) => {
73
- console.error('Video element error:', err);
74
- setCameraError('Video playback error. Please try again.');
75
- setIsLoading(false);
76
- stream.getTracks().forEach((track) => track.stop());
77
- };
78
- }
79
- else {
80
- console.error('Video element not available');
81
- setCameraError('Camera initialization failed. Please try again.');
82
- setCaptureInProgress(false);
83
- setIsLoading(false);
84
- stream.getTracks().forEach((track) => track.stop());
85
- }
86
- }
87
- catch (error) {
88
- setIsLoading(false);
89
- if (error instanceof DOMException) {
90
- console.error('Error accessing camera:', error.message);
91
- setCameraError(error.message);
92
- }
93
- else {
94
- console.error('Unknown error accessing camera:', error);
95
- setCameraError('An unknown error occurred. Please check permissions and try again.');
96
- }
97
- setCaptureInProgress(false);
98
- }
99
- }
100
- function captureAndProcessImage() {
101
- if (!videoElement.current || !videoStream) {
102
- console.error('Video element or stream not available for capture');
103
- return;
104
- }
105
- try {
106
- const canvas = document.createElement('canvas');
107
- const parentDiv = document.getElementById('parent');
108
- canvas.width = parentDiv?.clientWidth || videoElement.current.width;
109
- canvas.height = parentDiv?.clientHeight || videoElement.current.height;
110
- const ctx = canvas.getContext('2d');
111
- if (!ctx) {
112
- console.error('Could not get 2D context for canvas');
113
- setCameraError('Failed to process image. Please try again.');
114
- setCaptureInProgress(false);
115
- return;
116
- }
117
- ctx.drawImage(videoElement.current, 0, 0, canvas.width, canvas.height);
118
- const imageSrc = canvas.toDataURL('image/png', 1.0);
119
- setSelectedImage({ src: imageSrc });
120
- setCaptureInProgress(false);
121
- stopCamera();
122
- const newImg = document.createElement('img');
123
- newImg.src = imageSrc;
124
- //@ts-expect-error jscanify is not typed
125
- const scanner = new jscanify();
126
- newImg.onload = () => {
127
- try {
128
- if (containerRef.current) {
129
- // containerRef.current.innerHTML = '';
130
- const paperWidth = parentDiv?.clientWidth || videoElement.current?.videoWidth;
131
- const paperHeight = parentDiv?.clientHeight || videoElement.current?.videoHeight;
132
- //@ts-expect-error jscanify is not typed
133
- const contour = scanner.findPaperContour(cv.imread(newImg));
134
- const cornerPoints = scanner.getCornerPoints(contour);
135
- const resultCanvas = scanner.extractPaper(newImg, paperWidth, paperHeight, cornerPoints);
136
- newImg.className =
137
- 'absolute inset-0 m-auto w-full h-auto md:max-h-[333px] md:max-w-[643px] aspect-video rounded-lg object-contain';
138
- setProccessImageCanvas(resultCanvas);
139
- containerRef.current.appendChild(resultCanvas);
140
- setCaptureInProgress(false);
141
- setSelectedImage({ src: resultCanvas.toDataURL('image/png') });
142
- }
143
- }
144
- catch (error) {
145
- console.error('Error processing image:', error);
146
- setCameraError('Failed to process image. Please try again.');
147
- }
148
- };
149
- newImg.onerror = () => {
150
- console.error('Error loading image');
151
- setCameraError('Failed to load image. Please try again.');
152
- };
153
- }
154
- catch (error) {
155
- console.error('Error capturing image:', error);
156
- setCameraError('Failed to capture image. Please try again.');
157
- setCaptureInProgress(false);
158
- }
159
- }
160
- async function uploadPhoto() {
161
- if (!proccessImageCanvas) {
162
- console.error('Failed to process the image. Please try again.');
163
- return;
164
- }
165
- const blob = proccessImageCanvas.toDataURL('image/png', 1.0);
166
- const processedBlob = dataURLtoBlob(blob);
167
- const img = new File([processedBlob], 'frontImage', { type: 'image/jpeg' });
168
- const resizedImage = (await resizeFile(img));
169
- if (resizedImage) {
170
- props.setFrontImage(resizedImage);
171
- props.setCapturing(null);
172
- stopCamera();
173
- }
174
- }
175
- function retakePhoto() {
176
- setSelectedImage(null);
177
- setCaptureInProgress(true);
178
- setCameraError(null);
179
- if (containerRef.current) {
180
- const canvas = containerRef.current.querySelector('canvas');
181
- if (canvas) {
182
- canvas.width = canvas.width;
183
- }
184
- containerRef.current.innerHTML = '';
185
- }
186
- if (videoElement.current) {
187
- videoElement.current.play();
188
- }
189
- startCamera();
190
- }
191
- return (_jsx(Dialog.Root, { open: props.capturing === 'ID_DOCUMENT', lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsx(Dialog.Content, { className: twMerge('bg-bg-primary-alt mx-auto h-full w-full items-start p-3xl pb-4xl lg:h-auto lg:w-fit lg:rounded-xl', props.className), children: _jsxs("div", { className: "w-full p-4 lg:w-[640px] lg:px-12 lg:py-4xl", children: [_jsxs("button", { type: "button", className: "flex items-center gap-lg lg:absolute lg:right-5 lg:top-5 lg:p-md", onClick: () => {
192
- stopCamera();
193
- props.setCapturing(null);
194
- }, children: [_jsx(XIcon, { className: "text-text-senary-300 hidden size-5 lg:block" }), _jsx(ArrowLeftIcon, { className: "text-text-senary-300 size-5 lg:hidden" }), _jsx("span", { className: "text-lg font-semibold lg:hidden", children: "Back" })] }), _jsx(Dialog.Title, { className: "mt-6 text-center text-lg font-semibold lg:mt-0", children: "Take a Picture of Your Front ID" }), _jsxs(Dialog.Description, { className: "lg:max-w-auto text-text-tertiary-600 mx-auto mt-sm max-w-[19rem] text-center text-sm lg:max-w-full", children: ["Make sure your ID is clearly visible, well-lit, and not blurry.", _jsx("br", { className: "hidden lg:block" }), " Avoid glare or reflections, and ensure all corners are within the frame."] }), _jsx("div", { id: "parent", className: "border-border-disabled mt-6 aspect-video rounded-xl border bg-black lg:mt-8", children: cameraError ? (_jsx("div", { className: "flex h-full items-center justify-center p-4", children: _jsxs("div", { className: "text-center", children: [_jsx("p", { className: "text-red-500 mb-2 text-sm", children: "Camera Error" }), _jsx("p", { className: "text-gray-400 text-xs", children: cameraError })] }) })) : captureInProgress ? (_jsxs("div", { className: "relative flex h-fit w-full flex-col items-center justify-center", children: [_jsx("video", { ref: videoElement, autoPlay: true, muted: true, playsInline: true, className: "relative h-[60vh] w-full rounded-lg object-cover md:aspect-video md:max-h-[333px]", width: "100%", height: "100%" }), _jsxs("div", { className: "pointer-events-none absolute inset-0 z-50", children: [_jsx("div", { className: twMerge('absolute inset-0 w-full bg-black/60 backdrop-blur-sm [clip-path:polygon(0%_0%,0%_100%,calc(50%-158px)_100%,calc(50%-158px)_calc(50%-100px),calc(50%+158px)_calc(50%-100px),calc(50%+158px)_calc(50%+100px),calc(50%-158px)_calc(50%+100px),calc(50%-158px)_100%,100%_100%,100%_0%)] md:[clip-path:polygon(0%_0%,0%_100%,calc(50%-225px)_100%,calc(50%-225px)_calc(50%-142px),calc(50%+225px)_calc(50%-142px),calc(50%+225px)_calc(50%+142px),calc(50%-225px)_calc(50%+142px),calc(50%-225px)_100%,100%_100%,100%_0%)]') }), _jsx("div", { className: "absolute inset-0 z-[60] mx-auto flex items-center justify-center", children: _jsx("div", { className: "relative aspect-[1011/638] h-[200px] md:h-[295px] md:w-[450px]", children: _jsx("div", { className: "h-full w-full rounded-lg border-4 border-dashed border-[#B54708]" }) }) })] })] })) : (_jsx("div", { ref: containerRef, className: "relative grid h-full w-full place-items-center rounded-lg object-contain md:max-h-[333px]" })) }), cameraError ? (_jsx("div", { className: "mt-4 text-center", children: _jsx(Button, { className: "mx-auto px-xl lg:w-fit", onClick: () => {
195
- setCameraError(null);
196
- startCamera();
197
- }, children: "Try Again" }) })) : captureInProgress ? (_jsxs(Button, { className: "disabled:bg-bg-disabled disabled:text-text-disabled mx-auto mt-6 px-xl disabled:opacity-100 lg:mt-8 lg:w-fit", onClick: captureAndProcessImage, children: ["Capture Image", _jsx(Camera01Icon, { className: "size-5" })] })) : selectedImage && selectedImage.src ? (_jsxs("div", { className: "mt-4 flex flex-col items-center justify-center gap-2 md:flex-row", children: [_jsxs(Button, { className: "lg:w-fit", type: "button", onClick: retakePhoto, children: ["Retake Photo ", _jsx(Camera01Icon, { className: "ml-1" })] }), _jsxs(Button, { className: "lg:w-fit", type: "button", onClick: uploadPhoto, children: ["Use Photo ", _jsx(CheckCircleIcon, { className: "ml-1" })] })] })) : (_jsxs(Button, { className: "disabled:bg-bg-disabled disabled:text-text-disabled mx-auto mt-6 px-xl disabled:opacity-100 lg:mt-8 lg:w-fit", onClick: startCamera, disabled: isLoading || !!videoStream, children: [isLoading ? 'Starting Camera...' : 'Start Camera', _jsx(Camera01Icon, { className: "size-5" })] }))] }) }) })] }) }));
198
- }
@@ -1 +0,0 @@
1
- export declare function CaptureSelfie(): import("react/jsx-runtime").JSX.Element;