@cirkay-eng/cirkay-components 0.7.1

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/README.md +87 -0
  2. package/dist/_virtual/_commonjsHelpers.js +6 -0
  3. package/dist/_virtual/_commonjsHelpers.js.map +1 -0
  4. package/dist/_virtual/index.js +8 -0
  5. package/dist/_virtual/index.js.map +1 -0
  6. package/dist/base/magic/MagicAPI.d.ts +7 -0
  7. package/dist/base/magic/MagicAPI.d.ts.map +1 -0
  8. package/dist/base/magic/MagicAPI.js +20 -0
  9. package/dist/base/magic/MagicAPI.js.map +1 -0
  10. package/dist/base/n3xus/N3xusAPI.d.ts +12 -0
  11. package/dist/base/n3xus/N3xusAPI.d.ts.map +1 -0
  12. package/dist/base/n3xus/N3xusAPI.js +121 -0
  13. package/dist/base/n3xus/N3xusAPI.js.map +1 -0
  14. package/dist/base/n3xus/types.d.ts +68 -0
  15. package/dist/base/n3xus/types.d.ts.map +1 -0
  16. package/dist/base/n3xus/types.js +10 -0
  17. package/dist/base/n3xus/types.js.map +1 -0
  18. package/dist/components/error-screen/error-screen.d.ts +14 -0
  19. package/dist/components/error-screen/error-screen.d.ts.map +1 -0
  20. package/dist/components/error-screen/error-screen.js +65 -0
  21. package/dist/components/error-screen/error-screen.js.map +1 -0
  22. package/dist/components/error-screen/index.d.ts +3 -0
  23. package/dist/components/error-screen/index.d.ts.map +1 -0
  24. package/dist/components/fan-pass-claim/fan-pass-claim.d.ts +63 -0
  25. package/dist/components/fan-pass-claim/fan-pass-claim.d.ts.map +1 -0
  26. package/dist/components/fan-pass-claim/fan-pass-claim.js +837 -0
  27. package/dist/components/fan-pass-claim/fan-pass-claim.js.map +1 -0
  28. package/dist/components/fan-pass-claim/index.d.ts +3 -0
  29. package/dist/components/fan-pass-claim/index.d.ts.map +1 -0
  30. package/dist/components/fan-pass-claim/types.d.ts +20 -0
  31. package/dist/components/fan-pass-claim/types.d.ts.map +1 -0
  32. package/dist/components/fan-pass-claim/types.js +24 -0
  33. package/dist/components/fan-pass-claim/types.js.map +1 -0
  34. package/dist/components/fan-pass-unlock/fan-pass-unlock.d.ts +52 -0
  35. package/dist/components/fan-pass-unlock/fan-pass-unlock.d.ts.map +1 -0
  36. package/dist/components/fan-pass-unlock/fan-pass-unlock.js +498 -0
  37. package/dist/components/fan-pass-unlock/fan-pass-unlock.js.map +1 -0
  38. package/dist/components/fan-pass-unlock/index.d.ts +3 -0
  39. package/dist/components/fan-pass-unlock/index.d.ts.map +1 -0
  40. package/dist/components/fan-pass-unlock/types.d.ts +12 -0
  41. package/dist/components/fan-pass-unlock/types.d.ts.map +1 -0
  42. package/dist/components/fan-pass-unlock/types.js +16 -0
  43. package/dist/components/fan-pass-unlock/types.js.map +1 -0
  44. package/dist/components/frame/frame.d.ts +21 -0
  45. package/dist/components/frame/frame.d.ts.map +1 -0
  46. package/dist/components/frame/frame.js +190 -0
  47. package/dist/components/frame/frame.js.map +1 -0
  48. package/dist/components/frame/index.d.ts +3 -0
  49. package/dist/components/frame/index.d.ts.map +1 -0
  50. package/dist/components/index.d.ts +4 -0
  51. package/dist/components/index.d.ts.map +1 -0
  52. package/dist/components/index.js +4 -0
  53. package/dist/components/index.js.map +1 -0
  54. package/dist/components/login/index.d.ts +3 -0
  55. package/dist/components/login/index.d.ts.map +1 -0
  56. package/dist/components/login/login.d.ts +72 -0
  57. package/dist/components/login/login.d.ts.map +1 -0
  58. package/dist/components/login/login.js +924 -0
  59. package/dist/components/login/login.js.map +1 -0
  60. package/dist/components/login/types.d.ts +22 -0
  61. package/dist/components/login/types.d.ts.map +1 -0
  62. package/dist/components/login/types.js +15 -0
  63. package/dist/components/login/types.js.map +1 -0
  64. package/dist/constants/apis.d.ts +12 -0
  65. package/dist/constants/apis.d.ts.map +1 -0
  66. package/dist/constants/apis.js +17 -0
  67. package/dist/constants/apis.js.map +1 -0
  68. package/dist/constants/components.d.ts +3 -0
  69. package/dist/constants/components.d.ts.map +1 -0
  70. package/dist/constants/components.js +4 -0
  71. package/dist/constants/components.js.map +1 -0
  72. package/dist/constants/magic.d.ts +15 -0
  73. package/dist/constants/magic.d.ts.map +1 -0
  74. package/dist/controllers/LoginController.d.ts +35 -0
  75. package/dist/controllers/LoginController.d.ts.map +1 -0
  76. package/dist/controllers/LoginController.js +218 -0
  77. package/dist/controllers/LoginController.js.map +1 -0
  78. package/dist/controllers/types.d.ts +9 -0
  79. package/dist/controllers/types.d.ts.map +1 -0
  80. package/dist/docs/error-screen/designTokens.d.ts +5 -0
  81. package/dist/docs/error-screen/designTokens.d.ts.map +1 -0
  82. package/dist/docs/error-screen/error-screen.stories.d.ts +6 -0
  83. package/dist/docs/error-screen/error-screen.stories.d.ts.map +1 -0
  84. package/dist/docs/fan-pass-claim/designTokens.d.ts +3 -0
  85. package/dist/docs/fan-pass-claim/designTokens.d.ts.map +1 -0
  86. package/dist/docs/fan-pass-claim/fan-pass-claim.stories.d.ts +6 -0
  87. package/dist/docs/fan-pass-claim/fan-pass-claim.stories.d.ts.map +1 -0
  88. package/dist/docs/fan-pass-unlock/designTokens.d.ts +3 -0
  89. package/dist/docs/fan-pass-unlock/designTokens.d.ts.map +1 -0
  90. package/dist/docs/fan-pass-unlock/fan-pass-unlock.stories.d.ts +6 -0
  91. package/dist/docs/fan-pass-unlock/fan-pass-unlock.stories.d.ts.map +1 -0
  92. package/dist/docs/login/designTokens.d.ts +5 -0
  93. package/dist/docs/login/designTokens.d.ts.map +1 -0
  94. package/dist/docs/login/login.stories.d.ts +7 -0
  95. package/dist/docs/login/login.stories.d.ts.map +1 -0
  96. package/dist/events/claim.d.ts +17 -0
  97. package/dist/events/claim.d.ts.map +1 -0
  98. package/dist/events/claim.js +8 -0
  99. package/dist/events/claim.js.map +1 -0
  100. package/dist/events/event.d.ts +15 -0
  101. package/dist/events/event.d.ts.map +1 -0
  102. package/dist/events/login.d.ts +31 -0
  103. package/dist/events/login.d.ts.map +1 -0
  104. package/dist/events/login.js +10 -0
  105. package/dist/events/login.js.map +1 -0
  106. package/dist/events/unlock.d.ts +17 -0
  107. package/dist/events/unlock.d.ts.map +1 -0
  108. package/dist/events/unlock.js +8 -0
  109. package/dist/events/unlock.js.map +1 -0
  110. package/dist/internal/CirkayElement.d.ts +10 -0
  111. package/dist/internal/CirkayElement.d.ts.map +1 -0
  112. package/dist/internal/CirkayElement.js +40 -0
  113. package/dist/internal/CirkayElement.js.map +1 -0
  114. package/dist/node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.29.1_tslib@2.8.1_typescript@5.7.2/node_modules/tslib/tslib.es6.js +31 -0
  115. package/dist/node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.29.1_tslib@2.8.1_typescript@5.7.2/node_modules/tslib/tslib.es6.js.map +1 -0
  116. package/dist/node_modules/.pnpm/axios-rate-limit@1.4.0_axios@1.7.9/node_modules/axios-rate-limit/src/index.js +182 -0
  117. package/dist/node_modules/.pnpm/axios-rate-limit@1.4.0_axios@1.7.9/node_modules/axios-rate-limit/src/index.js.map +1 -0
  118. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/adapters.js +82 -0
  119. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/adapters.js.map +1 -0
  120. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/fetch.js +230 -0
  121. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/fetch.js.map +1 -0
  122. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/xhr.js +200 -0
  123. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/xhr.js.map +1 -0
  124. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/axios.js +87 -0
  125. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/axios.js.map +1 -0
  126. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/cancel/CancelToken.js +134 -0
  127. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/cancel/CancelToken.js.map +1 -0
  128. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/cancel/CanceledError.js +24 -0
  129. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/cancel/CanceledError.js.map +1 -0
  130. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/cancel/isCancel.js +6 -0
  131. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/cancel/isCancel.js.map +1 -0
  132. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/Axios.js +232 -0
  133. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/Axios.js.map +1 -0
  134. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/AxiosError.js +102 -0
  135. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/AxiosError.js.map +1 -0
  136. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/AxiosHeaders.js +301 -0
  137. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/AxiosHeaders.js.map +1 -0
  138. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/InterceptorManager.js +70 -0
  139. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/InterceptorManager.js.map +1 -0
  140. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/buildFullPath.js +22 -0
  141. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/buildFullPath.js.map +1 -0
  142. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/dispatchRequest.js +82 -0
  143. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/dispatchRequest.js.map +1 -0
  144. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/mergeConfig.js +107 -0
  145. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/mergeConfig.js.map +1 -0
  146. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/settle.js +28 -0
  147. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/settle.js.map +1 -0
  148. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/transformData.js +29 -0
  149. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/transformData.js.map +1 -0
  150. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/defaults/index.js +160 -0
  151. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/defaults/index.js.map +1 -0
  152. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/defaults/transitional.js +8 -0
  153. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/defaults/transitional.js.map +1 -0
  154. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/env/data.js +4 -0
  155. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/env/data.js.map +1 -0
  156. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +57 -0
  157. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/AxiosURLSearchParams.js.map +1 -0
  158. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/HttpStatusCode.js +72 -0
  159. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/HttpStatusCode.js.map +1 -0
  160. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/bind.js +8 -0
  161. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/bind.js.map +1 -0
  162. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/buildURL.js +70 -0
  163. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/buildURL.js.map +1 -0
  164. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/combineURLs.js +16 -0
  165. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/combineURLs.js.map +1 -0
  166. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/composeSignals.js +49 -0
  167. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/composeSignals.js.map +1 -0
  168. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/cookies.js +44 -0
  169. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/cookies.js.map +1 -0
  170. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/formDataToJSON.js +94 -0
  171. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/formDataToJSON.js.map +1 -0
  172. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/isAbsoluteURL.js +16 -0
  173. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/isAbsoluteURL.js.map +1 -0
  174. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/isAxiosError.js +15 -0
  175. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/isAxiosError.js.map +1 -0
  176. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/isURLSameOrigin.js +17 -0
  177. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/isURLSameOrigin.js.map +1 -0
  178. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/null.js +5 -0
  179. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/null.js.map +1 -0
  180. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/parseHeaders.js +56 -0
  181. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/parseHeaders.js.map +1 -0
  182. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/parseProtocol.js +7 -0
  183. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/parseProtocol.js.map +1 -0
  184. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/progressEventReducer.js +47 -0
  185. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/progressEventReducer.js.map +1 -0
  186. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/resolveConfig.js +59 -0
  187. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/resolveConfig.js.map +1 -0
  188. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/speedometer.js +54 -0
  189. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/speedometer.js.map +1 -0
  190. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/spread.js +29 -0
  191. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/spread.js.map +1 -0
  192. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/throttle.js +45 -0
  193. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/throttle.js.map +1 -0
  194. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/toFormData.js +216 -0
  195. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/toFormData.js.map +1 -0
  196. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/toURLEncodedForm.js +19 -0
  197. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/toURLEncodedForm.js.map +1 -0
  198. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/trackStream.js +89 -0
  199. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/trackStream.js.map +1 -0
  200. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/validator.js +100 -0
  201. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/validator.js.map +1 -0
  202. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/classes/Blob.js +4 -0
  203. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/classes/Blob.js.map +1 -0
  204. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/classes/FormData.js +4 -0
  205. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/classes/FormData.js.map +1 -0
  206. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +6 -0
  207. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js.map +1 -0
  208. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/index.js +16 -0
  209. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/index.js.map +1 -0
  210. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/common/utils.js +46 -0
  211. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/common/utils.js.map +1 -0
  212. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/index.js +10 -0
  213. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/index.js.map +1 -0
  214. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/utils.js +761 -0
  215. package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/utils.js.map +1 -0
  216. package/dist/theme/global.d.ts +2 -0
  217. package/dist/theme/global.d.ts.map +1 -0
  218. package/dist/theme/global.js +25 -0
  219. package/dist/theme/global.js.map +1 -0
  220. package/dist/types.d.ts +29 -0
  221. package/dist/types.d.ts.map +1 -0
  222. package/dist/utils/helpers.d.ts +5 -0
  223. package/dist/utils/helpers.d.ts.map +1 -0
  224. package/dist/utils/helpers.js +49 -0
  225. package/dist/utils/helpers.js.map +1 -0
  226. package/dist/utils/settings.d.ts +5 -0
  227. package/dist/utils/settings.d.ts.map +1 -0
  228. package/dist/utils/settings.js +7 -0
  229. package/dist/utils/settings.js.map +1 -0
  230. package/package.json +32 -0
package/README.md ADDED
@@ -0,0 +1,87 @@
1
+
2
+ # Fan Pass Web Components Library README
3
+ Welcome to the Fan Pass Web Components library! This library provides a collection of UX frontend components designed to be fast, reusable, and highly customisable for any project, without relying on proprietary technologies or frameworks. These components leverage standard Web APIs and are compatible with all modern browsers.
4
+
5
+ ## Installation
6
+ Requires Node v20.0+ minimum.
7
+
8
+ 1. Install Node.js globally using one of the following methods:
9
+ - Mac: [NVM](https://github.com/nvm-sh/nvm)
10
+ - Windows: [NVM for Windows](https://github.com/coreybutler/nvm-windows)
11
+ - Direct download: [Node.js](https://nodejs.org/en/download)
12
+
13
+ 2. Install PNPM globally using one of the following methods:
14
+ - Mac: ``brew install pnpm``
15
+ - Windows PowerShell: Run the command ``iwr https://get.pnpm.io/install.ps1 -useb | iex``
16
+
17
+ For more details, check the: [PNPM documentation](https://pnpm.io/)
18
+
19
+ 1. Clone the project repository using this command:
20
+ ```
21
+ git clone git@github.com:Push-Entertainment/push-web-components.git
22
+ ```
23
+
24
+ 2. Initialise the project by running the following command in your terminal within the project's root directory:
25
+ ```
26
+ pnpm install
27
+ ```
28
+
29
+ ## Build scripts
30
+
31
+ We've provided the following build scripts to streamline the development process:
32
+
33
+ Fan Pass application:
34
+ - Develop main library: `pnpm fan-pass:serve`
35
+ - Build main library: `pnpm fan-pass:build`
36
+ - Build main library docs: `pnpm fan-pass:build:docs`
37
+
38
+ ## Importing components into your project
39
+ Our components are written as ES6 modules for seamless integration into your project without the need for transpilation through tools like Webpack or Babel. You can still use pre-processors like Vite, Webpack, or Roll-up for tree shaking and minification while preserving ES modules.
40
+
41
+ ## Package installation
42
+ 1. Install the latest version of the Fan Pass components and core packages:
43
+ ```
44
+ npm i @pushengineering/push-web-components @pushengineering/fan-pass-web-components
45
+ ```
46
+
47
+ 2. Or the beta version using the -beta tag:
48
+ ```
49
+ npm i @pushengineering/push-web-components @pushengineering/fan-pass-web-components@beta
50
+ ```
51
+
52
+ To initialise a web component and render it in your HTML and the DOM, simply import the component script within your page's entry scripts or as a script tag directly inside your page.
53
+
54
+ For example, to import the main Fan Pass app component and its internal component dependencies, add the following to your main script or as a script tag in your page:
55
+
56
+ ```
57
+ import '@pushengineering/fan-pass-web-components/app'
58
+ ```
59
+
60
+ Or use a script tag like this:
61
+
62
+ ```
63
+ <script async type="module" src="path-to-component-modules/app.js">
64
+ ```
65
+
66
+ If a component uses requires the use of external components you'll also need to import them:
67
+
68
+ ```
69
+ import '@pushengineering/fan-pass-web-components/some-child-compionent'
70
+ ```
71
+
72
+ Any child components which themselves use child components should also be imported:
73
+
74
+ ```
75
+ import '@pushengineering/fan-pass-web-components/child-child-compoinent'
76
+ ```
77
+
78
+ Once imported, you can use these components throughout your page without further imports.
79
+
80
+ # Learn More about Web Components
81
+ To deepen your understanding of web components, their key concepts, and the specific web APIs we employ, we recommend reading the [MDN guide on Web Components](https://developer.mozilla.org/en-US/docs/Web/API/Web_components).
82
+
83
+ ## Lit - Lightning-Fast Components
84
+
85
+ Our library is built using Lit, a framework that simplifies component development without sacrificing performance or relying on non-standard frameworks. Lit builds on web component standards, is lightweight, and reduces boilerplate code. You can find Lit 2's documentation [here](https://lit.dev/docs/).
86
+
87
+ To save time, minimise errors, and future-proof your code, we've written this library in TypeScript and utilise Lit's decorator methods, which TypeScript transpiles into browser-compatible JavaScript.
@@ -0,0 +1,6 @@
1
+ function getDefaultExportFromCjs (x) {
2
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3
+ }
4
+
5
+ export { getDefaultExportFromCjs };
6
+ //# sourceMappingURL=_commonjsHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_commonjsHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -0,0 +1,8 @@
1
+ import { getDefaultExportFromCjs } from './_commonjsHelpers.js';
2
+ import { __require as requireSrc } from '../node_modules/.pnpm/axios-rate-limit@1.4.0_axios@1.7.9/node_modules/axios-rate-limit/src/index.js';
3
+
4
+ var srcExports = requireSrc();
5
+ var rateLimit = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
6
+
7
+ export { rateLimit as default };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,7 @@
1
+ import { Magic } from 'magic-sdk';
2
+ export interface MagicOptions {
3
+ overideApiKey?: string | undefined;
4
+ staging: boolean;
5
+ }
6
+ export declare const MagicAPI: (_options?: MagicOptions) => Magic;
7
+ //# sourceMappingURL=MagicAPI.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MagicAPI.d.ts","sourceRoot":"","sources":["../../../src/base/magic/MagicAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAWjC,MAAM,WAAW,YAAY;IACzB,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,OAAO,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,QAAQ,cAAc,YAAY,KAG3C,KAaH,CAAA"}
@@ -0,0 +1,20 @@
1
+ import { Magic } from 'magic-sdk';
2
+ import { MAGIC_STAGE_API, MAGIC_PROD_API } from '../../constants/apis.js';
3
+
4
+ const MagicAPI = (_options = {
5
+ staging: false,
6
+ overideApiKey: undefined
7
+ }) => {
8
+ const magicApiKey = _options.staging ? MAGIC_STAGE_API : MAGIC_PROD_API;
9
+ const magicConfig = {
10
+ network: {
11
+ rpcUrl: 'https://polygon-rpc.com/',
12
+ chainId: 137
13
+ }
14
+ };
15
+ const magicApi = new Magic(magicApiKey, magicConfig);
16
+ return magicApi;
17
+ };
18
+
19
+ export { MagicAPI };
20
+ //# sourceMappingURL=MagicAPI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MagicAPI.js","sources":["../../../src/base/magic/MagicAPI.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAgBO,MAAM,QAAQ,GAAG,CAAC,QAAyB,GAAA;AAC9C,IAAA,OAAO,EAAE,KAAK;AACd,IAAA,aAAa,EAAE;AAClB,CAAA,KAAW;AACR,IAAA,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,GAAG,eAAe,GAAG,cAAc;AACvE,IAAA,MAAM,WAAW,GAAgB;AAC7B,QAAA,OAAO,EAAE;AACL,YAAA,MAAM,EAAE,0BAA0B;AAClC,YAAA,OAAO,EAAE;AACZ;KACJ;IACD,MAAM,QAAQ,GAAG,IAAI,KAAK,CACtB,WAAW,EACX,WAAW,CACd;AACD,IAAA,OAAO,QAAQ;AACnB;;;;"}
@@ -0,0 +1,12 @@
1
+ import { AccessCheckData, MintData, StatusData, ActivationData, N3xusApiConfig } from './types';
2
+ declare class N3xusApi {
3
+ private client;
4
+ private n3xusSettings;
5
+ constructor(options: N3xusApiConfig);
6
+ checkTokenStatus(token: string): Promise<StatusData>;
7
+ checkWalletForNft(didToken: string): Promise<AccessCheckData>;
8
+ mint(didToken: string, issuanceCode: string): Promise<MintData>;
9
+ logActivation(contract_address: string, type: string, wallet_address: string): Promise<ActivationData>;
10
+ }
11
+ export default N3xusApi;
12
+ //# sourceMappingURL=N3xusAPI.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"N3xusAPI.d.ts","sourceRoot":"","sources":["../../../src/base/n3xus/N3xusAPI.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAoB,MAAM,SAAS,CAAC;AAQjH,cAAM,QAAQ;IAEV,OAAO,CAAC,MAAM,CAA2B;IACzC,OAAO,CAAC,aAAa,CAAgC;gBAGjD,OAAO,EAAE,cAAc;IAkCrB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IA8BpD,iBAAiB,CAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IA6B9D,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAI,OAAO,CAAC,QAAQ,CAAC;IA2BhE,aAAa,CAAC,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;CA4B/G;AAED,eAAe,QAAQ,CAAA"}
@@ -0,0 +1,121 @@
1
+ import axios from '../../node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/axios.js';
2
+ import rateLimit from '../../_virtual/index.js';
3
+ import { N3XUS_STAGE_API, N3XUS_API } from '../../constants/apis.js';
4
+ import { getErrorMessage } from '../../utils/helpers.js';
5
+
6
+ const formatDate = (date) => `${date.getHours()}:${String(date.getMinutes()).padStart(2, '0')} ${String(date.getSeconds()).padStart(2, '0')}.${String(date.getMilliseconds()).padStart(3, '0')}`;
7
+ class N3xusApi {
8
+ constructor(options) {
9
+ this.n3xusSettings = null;
10
+ if (options.apiKey.length < 5) {
11
+ throw new Error('Invalid API key');
12
+ }
13
+ const key = options.apiKey.substring(5);
14
+ const mid = Math.floor(key.length / 2);
15
+ const user = key.substring(0, mid);
16
+ const password = key.substring(mid);
17
+ this.n3xusSettings = options.stagging ? N3XUS_STAGE_API : N3XUS_API;
18
+ this.client = rateLimit(axios.create({
19
+ baseURL: `${this.n3xusSettings.HOST}${this.n3xusSettings.ENDPOINT}${this.n3xusSettings.VERSION}/`,
20
+ auth: {
21
+ username: user,
22
+ password: password
23
+ },
24
+ headers: {
25
+ 'x-api-key': options.apiKey,
26
+ 'Content-Type': 'application/json',
27
+ 'X-Env': this.n3xusSettings.ENV,
28
+ },
29
+ }), {
30
+ maxRequests: 1,
31
+ perMilliseconds: 7000,
32
+ });
33
+ }
34
+ async checkTokenStatus(token) {
35
+ try {
36
+ const response = await this.client.get(`/public/issuance/${token}`);
37
+ const { data, errors } = response;
38
+ if (response.status === 200 && data) {
39
+ return Object.assign(data, { fetchedAt: formatDate(new Date()), ok: true });
40
+ }
41
+ else if (response.status === 403) {
42
+ console.error(errors);
43
+ return Object.assign({ ok: false, error: "Invalid API key" }, { fetchedAt: formatDate(new Date()), ok: false });
44
+ }
45
+ else {
46
+ console.error(errors);
47
+ return Object.assign({ ok: false, error: "Status Error" }, { fetchedAt: formatDate(new Date()), ok: false });
48
+ }
49
+ }
50
+ catch (error) {
51
+ const errorMessage = getErrorMessage(error);
52
+ console.error(errorMessage);
53
+ return Object.assign({ ok: false, error: errorMessage }, { fetchedAt: formatDate(new Date()), ok: false });
54
+ }
55
+ }
56
+ async checkWalletForNft(didToken) {
57
+ try {
58
+ const response = await this.client.get('/public/wallet/holds', {
59
+ headers: {
60
+ 'x-did-token': didToken,
61
+ }
62
+ });
63
+ const { data, errors } = response;
64
+ if (response.status === 200 && data) {
65
+ return Object.assign(data);
66
+ }
67
+ else {
68
+ return Promise.reject(new Error(`Failed to fetch token status: ${errors?.[0].message}`));
69
+ }
70
+ }
71
+ catch (error) {
72
+ const errorMessage = getErrorMessage(error);
73
+ console.error(errorMessage);
74
+ return Promise.reject(new Error(`Error fetching token status:${errorMessage}`));
75
+ }
76
+ }
77
+ async mint(didToken, issuanceCode) {
78
+ try {
79
+ const response = await this.client.post('/public/issuance/mint', {
80
+ "didToken": didToken,
81
+ "issuanceCode": issuanceCode,
82
+ });
83
+ const { data, errors } = response;
84
+ if (response.status === 200 && data) {
85
+ return Object.assign(data);
86
+ }
87
+ else {
88
+ return Promise.reject(new Error(`Failed to fetch token status: ${errors?.[0].message}`));
89
+ }
90
+ }
91
+ catch (error) {
92
+ const errorMessage = getErrorMessage(error);
93
+ console.error(errorMessage);
94
+ return Promise.reject(new Error(`Error fetching token status:${errorMessage}`));
95
+ }
96
+ }
97
+ async logActivation(contract_address, type, wallet_address) {
98
+ try {
99
+ const response = await this.client.post('activation/log', {
100
+ "contract_address": contract_address,
101
+ "type": type,
102
+ "wallet_address": wallet_address
103
+ });
104
+ const { data, errors } = response;
105
+ if (response.status === 200 && data) {
106
+ return Object.assign(data);
107
+ }
108
+ else {
109
+ return Promise.reject(new Error(`Failed to fetch token status: ${errors?.[0].message}`));
110
+ }
111
+ }
112
+ catch (error) {
113
+ const errorMessage = getErrorMessage(error);
114
+ console.error(errorMessage);
115
+ return Promise.reject(new Error(`Error fetching token status:${errorMessage}`));
116
+ }
117
+ }
118
+ }
119
+
120
+ export { N3xusApi as default };
121
+ //# sourceMappingURL=N3xusAPI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"N3xusAPI.js","sources":["../../../src/base/n3xus/N3xusAPI.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAQA,MAAM,UAAU,GAAG,CAAC,IAAU,KAC7B,CAAG,EAAA,IAAI,CAAC,QAAQ,EAAE,CAAA,CAAA,EAAI,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAI,CAAA,EAAA,MAAM,CACzE,IAAI,CAAC,UAAU,EAAE,CACjB,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAI,CAAA,EAAA,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA,CAAE;AAExE,MAAM,QAAQ,CAAA;AAKV,IAAA,WAAA,CACI,OAAuB,EAAA;QAHnB,IAAa,CAAA,aAAA,GAA4B,IAAI;QAKjD,IAAI,OAAO,CAAC,MAAM,CA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: {
5
+ domain?: string;
6
+ endpoint?: string;
7
+ version?: string;
8
+ env?: string;
9
+ };
10
+ };
11
+ export type N3xusApiSettings = {
12
+ HOST: string;
13
+ ENDPOINT: string;
14
+ VERSION: string;
15
+ ENV: string;
16
+ };
17
+ export declare enum MintStatus {
18
+ redeemed = "REDEEMED",
19
+ available = "AVAILABLE",
20
+ minting = "MINTING",
21
+ error = "ERROR"
22
+ }
23
+ export type StatusData = {
24
+ ok: boolean;
25
+ error?: string;
26
+ data?: {
27
+ code: string;
28
+ status: MintStatus;
29
+ wallet?: string;
30
+ };
31
+ };
32
+ export type AccessCheckData = {
33
+ ok: boolean;
34
+ error?: string;
35
+ data?: {
36
+ sessionToken: string;
37
+ holds: boolean;
38
+ expired: boolean;
39
+ };
40
+ };
41
+ export type MintData = {
42
+ ok: boolean;
43
+ error?: string;
44
+ data?: {
45
+ issuanceCode: string;
46
+ contract_address: string;
47
+ title: string;
48
+ wallet_address: string;
49
+ estimate_seconds: number;
50
+ message: string;
51
+ message_data: {
52
+ contractAddress: string;
53
+ id: number;
54
+ quantity: number;
55
+ uID: string;
56
+ walletAddresss: string;
57
+ xCallbackUrl: string;
58
+ xRequestId: string;
59
+ };
60
+ queue_position: number;
61
+ };
62
+ };
63
+ export type ActivationData = {
64
+ ok: boolean;
65
+ error?: string;
66
+ data?: {};
67
+ };
68
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/base/n3xus/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IACzB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,GAAG,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;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AC;YACrB,UAAU,EAAE,MAAM,CAAA;SACrB,CAAC;QACF,cAAc,EAAE,MAAM,CAAA;KACzB,CAAA;CACJ,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IACzB,EAAE,EAAE,OAAO,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,EAAE,CAAA;CACZ,CAAA"}
@@ -0,0 +1,10 @@
1
+ var MintStatus;
2
+ (function (MintStatus) {
3
+ MintStatus["redeemed"] = "REDEEMED";
4
+ MintStatus["available"] = "AVAILABLE";
5
+ MintStatus["minting"] = "MINTING";
6
+ MintStatus["error"] = "ERROR";
7
+ })(MintStatus || (MintStatus = {}));
8
+
9
+ export { MintStatus };
10
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":["../../../src/base/n3xus/types.ts"],"sourcesContent":[null],"names":[],"mappings":"IAkBY;AAAZ,CAAA,UAAY,UAAU,EAAA;AAClB,IAAA,UAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,UAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,UAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,UAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACnB,CAAC,EALW,UAAU,KAAV,UAAU,GAKrB,EAAA,CAAA,CAAA;;;;"}
@@ -0,0 +1,14 @@
1
+ import { LitElement } from 'lit';
2
+ import '@pushengineering/push-web-components/text';
3
+ import '@pushengineering/push-web-components/button';
4
+ import '@pushengineering/push-web-components/vertical-stack';
5
+ import '@pushengineering/push-web-components/link';
6
+ export declare class ErrorScreen extends LitElement {
7
+ errorText: string;
8
+ faqUrl?: string;
9
+ constructor();
10
+ connectedCallback(): void;
11
+ render(): import("lit").TemplateResult<1>;
12
+ static styles: import("lit").CSSResult[];
13
+ }
14
+ //# sourceMappingURL=error-screen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-screen.d.ts","sourceRoot":"","sources":["../../../src/components/error-screen/error-screen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAA;AAI3C,OAAO,2CAA2C,CAAA;AAClD,OAAO,6CAA6C,CAAA;AACpD,OAAO,qDAAqD,CAAA;AAC5D,OAAO,2CAA2C,CAAA;AAQlD,qBACa,WAAY,SAAQ,UAAU;IAGvC,SAAS,EAAE,MAAM,CAA0B;IAI3C,MAAM,CAAC,EAAE,MAAM,CAAA;;IAMf,iBAAiB;IAIjB,MAAM;IA+BN,MAAM,CAAC,MAAM,4BAAkB;CAClC"}
@@ -0,0 +1,65 @@
1
+ import { __decorate } from '../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.29.1_tslib@2.8.1_typescript@5.7.2/node_modules/tslib/tslib.es6.js';
2
+ import { css, LitElement, html } from 'lit';
3
+ import { customElement } from 'lit/decorators/custom-element.js';
4
+ import { property } from 'lit/decorators/property.js';
5
+ import '@pushengineering/push-web-components/text';
6
+ import '@pushengineering/push-web-components/button';
7
+ import '@pushengineering/push-web-components/vertical-stack';
8
+ import '@pushengineering/push-web-components/link';
9
+ import { global } from '../../theme/global.js';
10
+ import { settings } from '../../utils/settings.js';
11
+ import { ifDefined } from 'lit/directives/if-defined.js';
12
+
13
+ const { prefix } = settings;
14
+ let ErrorScreen = class ErrorScreen extends LitElement {
15
+ constructor() {
16
+ super();
17
+ this.errorText = 'Something went wrong.';
18
+ }
19
+ connectedCallback() {
20
+ super.connectedCallback();
21
+ }
22
+ render() {
23
+ return html `
24
+ <pu-vertical-stack
25
+ spacing="32"
26
+ mobileSpacing="24"
27
+ align="center"
28
+ mobileAlign="center"
29
+ justify="center"
30
+ mobileJustify="center"
31
+ >
32
+ <pu-text as="p" variant="bodyLg" withoutMargin>
33
+ ${this.errorText}
34
+ </pu-text>
35
+ <slot name="button"></slot>
36
+
37
+ ${this.faqUrl
38
+ ? html `<pu-text as="p" variant="bodySm" withoutMargin>
39
+ For more help, visit our
40
+ <pu-link
41
+ url=${ifDefined(this.faqUrl)}
42
+ underline
43
+ target="_blank"
44
+ >
45
+ FAQ.
46
+ </pu-link>
47
+ </pu-text>`
48
+ : html ``}
49
+ </pu-vertical-stack>
50
+ `;
51
+ }
52
+ };
53
+ ErrorScreen.styles = [global, css ``];
54
+ __decorate([
55
+ property({ type: String })
56
+ ], ErrorScreen.prototype, "errorText", void 0);
57
+ __decorate([
58
+ property({ type: String })
59
+ ], ErrorScreen.prototype, "faqUrl", void 0);
60
+ ErrorScreen = __decorate([
61
+ customElement(`${prefix}-error-screen`)
62
+ ], ErrorScreen);
63
+
64
+ export { ErrorScreen };
65
+ //# sourceMappingURL=error-screen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-screen.js","sources":["../../../src/components/error-screen/error-screen.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;AAaA,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ;AAGpB,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU,CAAA;AASvC,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,EAAE;QAPX,IAAS,CAAA,SAAA,GAAW,uBAAuB;;IAU3C,iBAAiB,GAAA;QACb,KAAK,CAAC,iBAAiB,EAAE;;IAG7B,MAAM,GAAA;AACF,QAAA,OAAO,IAAI,CAAA;;;;;;;;;;AAUG,oBAAA,EAAA,IAAI,CAAC,SAAS;;;;AAIlB,gBAAA,EAAA,IAAI,CAAC;cACD,IAAI,CAAA,CAAA;;;AAGU,kCAAA,EAAA,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;;;;;;AAMzB,gCAAA;cACX,IAAI,CAAA,CAAE,CAAA;;SAEnB;;;AAGE,WAAM,CAAA,MAAA,GAAG,CAAC,MAAM,EAAE,GAAG,CAAA,CAAA,CAAE,CAAjB;AA7Cb,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;AACiB,CAAA,EAAA,WAAA,CAAA,SAAA,EAAA,WAAA,EAAA,KAAA,CAAA,CAAA;AAI3C,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;AACX,CAAA,EAAA,WAAA,CAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,CAAA;AAPN,WAAW,GAAA,UAAA,CAAA;AADvB,IAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,aAAA,CAAe;AAC1B,CAAA,EAAA,WAAW,CAiDvB;;;;"}
@@ -0,0 +1,3 @@
1
+ import { ErrorScreen } from './error-screen';
2
+ export { ErrorScreen };
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/error-screen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAE5C,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,63 @@
1
+ import { PropertyValues, TemplateResult } from 'lit';
2
+ import '@pushengineering/push-web-components/button';
3
+ import '@pushengineering/push-web-components/button-icon';
4
+ import '@pushengineering/push-web-components/text';
5
+ import '@pushengineering/push-web-components/vertical-stack';
6
+ import '@pushengineering/push-web-components/overlay';
7
+ import CirkayElement from '../../internal/CirkayElement';
8
+ import { StatusData } from '../../base/n3xus/types';
9
+ import '../login/login';
10
+ import '../frame/frame';
11
+ import '../error-screen/error-screen';
12
+ import { ClaimStateTypes, LoginState } from './types';
13
+ import { FanPassUser } from '../../controllers/types';
14
+ import { LogoSet } from '../login/types';
15
+ export declare class FanPassClaim extends CirkayElement {
16
+ private loginController;
17
+ private nexusAPI;
18
+ apiKey: string;
19
+ logoSet: LogoSet;
20
+ fanPassTitle: string;
21
+ redeemToken: string;
22
+ modal: boolean;
23
+ validateAfterModal: boolean;
24
+ staging: boolean;
25
+ debugLogging: boolean;
26
+ successUrl: string;
27
+ autoRedirect: boolean;
28
+ showRedeemInput: boolean;
29
+ success: boolean;
30
+ error: string;
31
+ btnBackgroundColor: string;
32
+ btnTextColor: string;
33
+ faqUrl: string;
34
+ _claimState: ClaimStateTypes;
35
+ _pageNumber: Number;
36
+ _user: FanPassUser | undefined;
37
+ _loginState: LoginState | undefined;
38
+ _tokenStatus: StatusData | null;
39
+ constructor();
40
+ connectedCallback(): void;
41
+ update(changedProperties: PropertyValues): void;
42
+ private setUpdateState;
43
+ private setTokenStatus;
44
+ private validateMint;
45
+ private handleClaim;
46
+ private setSessionToken;
47
+ logout(): Promise<void>;
48
+ private closeOverlay;
49
+ private openOverlay;
50
+ private logging;
51
+ private buttonStyles;
52
+ private renderClaimSuccess;
53
+ private renderContent;
54
+ renderFrame(innerContent: TemplateResult): TemplateResult;
55
+ render(): TemplateResult;
56
+ static styles: import("lit").CSSResult;
57
+ }
58
+ declare global {
59
+ interface HTMLElementTagNameMap {
60
+ 'fan-pass-claim': FanPassClaim;
61
+ }
62
+ }
63
+ //# sourceMappingURL=fan-pass-claim.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fan-pass-claim.d.ts","sourceRoot":"","sources":["../../../src/components/fan-pass-claim/fan-pass-claim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAG/D,OAAO,6CAA6C,CAAA;AACpD,OAAO,kDAAkD,CAAA;AACzD,OAAO,2CAA2C,CAAA;AAClD,OAAO,qDAAqD,CAAA;AAC5D,OAAO,8CAA8C,CAAA;AAOrD,OAAO,aAAa,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,UAAU,EAA8B,MAAM,wBAAwB,CAAA;AAC/E,OAAO,gBAAgB,CAAA;AACvB,OAAO,gBAAgB,CAAA;AACvB,OAAO,8BAA8B,CAAA;AAErC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACrD,OAAO,EAAE,W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