@redzone/taunt-logins-ui-react 0.0.5 → 0.0.7

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 (170) hide show
  1. package/dist/assets/fonts/DrukTextWide-Bold-Trial.otf +0 -0
  2. package/dist/coinbase.d.ts +3 -0
  3. package/dist/index.d.ts +7 -0
  4. package/dist/magic.d.ts +3 -0
  5. package/dist/meta.d.ts +3 -0
  6. package/dist/metamask.d.ts +3 -0
  7. package/dist/taunt-logins-ui-react.d.ts +2 -0
  8. package/dist/taunt-logins-ui-react.js +3289 -0
  9. package/dist/taunt-logins-ui-react.js.map +1 -0
  10. package/dist/taunt-logins-ui-react.umd.cjs +7 -0
  11. package/dist/taunt-logins-ui-react.umd.cjs.map +1 -0
  12. package/dist/tauntContext.d.ts +17 -0
  13. package/dist/tauntProvider.d.ts +5 -0
  14. package/dist/telegram.d.ts +3 -0
  15. package/package.json +18 -5
  16. package/.history/babel.config_20251002171845.json +0 -0
  17. package/.history/babel.config_20251002171847.json +0 -3
  18. package/.history/babel.config_20251002172145.json +0 -3
  19. package/.history/babel.config_20251002172313.json +0 -3
  20. package/.history/babel.config_20251002172415.json +0 -8
  21. package/.history/index_20251002141038.html +0 -13
  22. package/.history/index_20251002141344.html +0 -13
  23. package/.history/package_20251002154235.json +0 -32
  24. package/.history/package_20251002160110.json +0 -33
  25. package/.history/package_20251002161109.json +0 -33
  26. package/.history/package_20251002161124.json +0 -32
  27. package/.history/package_20251002161826.json +0 -32
  28. package/.history/package_20251002162139.json +0 -32
  29. package/.history/package_20251002162605.json +0 -35
  30. package/.history/package_20251002162619.json +0 -35
  31. package/.history/package_20251002162631.json +0 -35
  32. package/.history/package_20251002162639.json +0 -35
  33. package/.history/package_20251002162659.json +0 -35
  34. package/.history/package_20251002162811.json +0 -39
  35. package/.history/package_20251002162820.json +0 -39
  36. package/.history/package_20251002171613.json +0 -40
  37. package/.history/package_20251002171644.json +0 -40
  38. package/.history/package_20251002171740.json +0 -43
  39. package/.history/package_20251002172017.json +0 -43
  40. package/.history/package_20251002172634.json +0 -53
  41. package/.history/package_20251002182812.json +0 -52
  42. package/.history/package_20251002183227.json +0 -34
  43. package/.history/package_20251002183258.json +0 -42
  44. package/.history/package_20251002202514.json +0 -46
  45. package/.history/package_20251002202542.json +0 -46
  46. package/.history/package_20251002202550.json +0 -45
  47. package/.history/package_20251002203503.json +0 -46
  48. package/.history/package_20251002204314.json +0 -45
  49. package/.history/package_20251002213111.json +0 -45
  50. package/.history/package_20251002222438.json +0 -47
  51. package/.history/package_20251002222511.json +0 -45
  52. package/.history/package_20251002222541.json +0 -45
  53. package/.history/src/App_20251002141038.tsx +0 -35
  54. package/.history/src/App_20251002142848.tsx +0 -15
  55. package/.history/src/App_20251002152540.tsx +0 -15
  56. package/.history/src/App_20251002152831.tsx +0 -17
  57. package/.history/src/App_20251002153145.tsx +0 -18
  58. package/.history/src/App_20251002153323.tsx +0 -25
  59. package/.history/src/App_20251002153420.tsx +0 -32
  60. package/.history/src/App_20251002153429.tsx +0 -33
  61. package/.history/src/App_20251002153457.tsx +0 -39
  62. package/.history/src/App_20251002153516.tsx +0 -39
  63. package/.history/src/App_20251002153520.tsx +0 -39
  64. package/.history/src/App_20251002153546.tsx +0 -41
  65. package/.history/src/App_20251002154625.tsx +0 -41
  66. package/.history/src/App_20251002154740.tsx +0 -47
  67. package/.history/src/App_20251002154812.tsx +0 -47
  68. package/.history/src/App_20251002154841.tsx +0 -47
  69. package/.history/src/App_20251002154915.tsx +0 -54
  70. package/.history/src/App_20251002160347.tsx +0 -54
  71. package/.history/src/App_20251002205122.tsx +0 -54
  72. package/.history/src/lib/exports_20251002160004.ts +0 -0
  73. package/.history/src/lib/exports_20251002160045.ts +0 -3
  74. package/.history/src/lib/index_20251002162704.ts +0 -0
  75. package/.history/src/lib/index_20251002162712.ts +0 -1
  76. package/.history/src/lib/index_20251002182429.ts +0 -4
  77. package/.history/src/lib/magic_20251002142829.tsx +0 -0
  78. package/.history/src/lib/magic_20251002142848.tsx +0 -44
  79. package/.history/src/lib/magic_20251002152540.tsx +0 -28
  80. package/.history/src/lib/magic_20251002152543.tsx +0 -28
  81. package/.history/src/lib/magic_20251002152546.tsx +0 -28
  82. package/.history/src/lib/magic_20251002152802.tsx +0 -47
  83. package/.history/src/lib/magic_20251002154740.tsx +0 -47
  84. package/.history/src/lib/magic_20251002155035.tsx +0 -47
  85. package/.history/src/lib/magic_20251002160411.tsx +0 -49
  86. package/.history/src/lib/magic_20251002160428.tsx +0 -49
  87. package/.history/src/lib/magic_20251002161028.tsx +0 -50
  88. package/.history/src/lib/magic_20251002162134.tsx +0 -50
  89. package/.history/src/lib/magic_20251002171038.tsx +0 -50
  90. package/.history/src/lib/metamask_20251002141612.tsx +0 -0
  91. package/.history/src/lib/metamask_20251002142622.tsx +0 -38
  92. package/.history/src/lib/metamask_20251002142654.tsx +0 -41
  93. package/.history/src/lib/metamask_20251002142726.tsx +0 -44
  94. package/.history/src/lib/metamask_20251002142848.tsx +0 -0
  95. package/.history/src/lib/metamask_20251002152802.tsx +0 -28
  96. package/.history/src/lib/metamask_20251002153516.tsx +0 -27
  97. package/.history/src/lib/metamask_20251002154228.tsx +0 -27
  98. package/.history/src/lib/metamask_20251002154523.tsx +0 -27
  99. package/.history/src/lib/metamask_20251002162122.tsx +0 -27
  100. package/.history/src/lib/metamask_20251002171636.tsx +0 -27
  101. package/.history/src/lib/styling_20251002154448.css +0 -0
  102. package/.history/src/lib/styling_20251002154523.css +0 -19
  103. package/.history/src/lib/styling_20251002154531.css +0 -19
  104. package/.history/src/lib/styling_20251002154544.css +0 -20
  105. package/.history/src/lib/styling_20251002154548.css +0 -19
  106. package/.history/src/lib/styling_20251002160446.css +0 -20
  107. package/.history/src/lib/styling_20251002160511.css +0 -23
  108. package/.history/src/lib/styling_20251002160515.css +0 -24
  109. package/.history/src/lib/styling_20251002160815.css +0 -24
  110. package/.history/src/lib/styling_20251002160910.css +0 -24
  111. package/.history/src/lib/styling_20251002160915.css +0 -24
  112. package/.history/src/lib/styling_20251002160952.css +0 -24
  113. package/.history/src/lib/styling_20251002161001.css +0 -24
  114. package/.history/src/lib/styling_20251002161011.css +0 -24
  115. package/.history/src/lib/styling_20251002161016.css +0 -24
  116. package/.history/src/lib/styling_20251002161036.css +0 -25
  117. package/.history/src/lib/tauntContext_20251002142359.ts +0 -0
  118. package/.history/src/lib/tauntContext_20251002142622.ts +0 -17
  119. package/.history/src/lib/tauntContext_20251002152540.ts +0 -22
  120. package/.history/src/lib/tauntContext_20251002152802.ts +0 -22
  121. package/.history/src/lib/tauntProvider_20251002142503.tsx +0 -0
  122. package/.history/src/lib/tauntProvider_20251002142622.tsx +0 -15
  123. package/.history/src/lib/tauntProvider_20251002143158.tsx +0 -19
  124. package/.history/src/lib/tauntProvider_20251002144018.tsx +0 -19
  125. package/.history/src/lib/tauntProvider_20251002152234.tsx +0 -40
  126. package/.history/src/lib/tauntProvider_20251002152802.tsx +0 -40
  127. package/.history/src/lib/tauntProvider_20251002153101.tsx +0 -49
  128. package/.history/src/lib/taunt_20251002160026.ts +0 -0
  129. package/.history/src/lib/taunt_20251002160045.ts +0 -2
  130. package/.history/src/main_20251002141038.tsx +0 -10
  131. package/.history/src/main_20251002141444.tsx +0 -12
  132. package/.history/src/main_20251002160347.tsx +0 -12
  133. package/.history/tsconfig.app_20251002141038.json +0 -28
  134. package/.history/tsconfig.app_20251002172720.json +0 -28
  135. package/.history/vite.config_20251002141038.ts +0 -7
  136. package/.history/vite.config_20251002141323.ts +0 -10
  137. package/.history/vite.config_20251002182237.ts +0 -19
  138. package/.history/vite.config_20251002182326.ts +0 -19
  139. package/.history/vite.config_20251002182358.ts +0 -19
  140. package/.history/vite.config_20251002182434.ts +0 -19
  141. package/.history/vite.config_20251002182749.ts +0 -26
  142. package/.history/vite.config_20251002182810.ts +0 -26
  143. package/.history/vite.config_20251002184535.ts +0 -36
  144. package/.history/vite.config_20251002184720.ts +0 -41
  145. package/.history/vite.config_20251002184748.ts +0 -37
  146. package/.history/vite.config_20251002184844.ts +0 -37
  147. package/.history/vite.config_20251002201901.ts +0 -45
  148. package/.history/vite.config_20251002202019.ts +0 -47
  149. package/.history/vite.config_20251002202043.ts +0 -47
  150. package/.history/vite.config_20251002202502.ts +0 -47
  151. package/.history/vite.config_20251002203503.ts +0 -43
  152. package/.prettierrc.mjs +0 -22
  153. package/asdf/tsconfig.app.json +0 -28
  154. package/asdf/tsconfig.json +0 -7
  155. package/asdf/tsconfig.node.json +0 -26
  156. package/eslint.config.js +0 -23
  157. package/index.html +0 -13
  158. package/src/App.css +0 -42
  159. package/src/App.tsx +0 -54
  160. package/src/index.css +0 -68
  161. package/src/lib/index.ts +0 -4
  162. package/src/lib/magic.tsx +0 -50
  163. package/src/lib/metamask.tsx +0 -27
  164. package/src/lib/styling.css +0 -25
  165. package/src/lib/tauntContext.ts +0 -22
  166. package/src/lib/tauntProvider.tsx +0 -49
  167. package/src/main.tsx +0 -12
  168. package/tsconfig.json +0 -25
  169. package/tsconfig.node.json +0 -10
  170. package/vite.config.ts +0 -43
@@ -1,22 +0,0 @@
1
- import { createContext, useContext } from "react"
2
-
3
- type ContextProps = {
4
- tauntServiceEndpoint: string
5
- deets?: { accessToken: string; refreshToken: string }
6
- metamaskLogin: () => void
7
- otpMagicLogin: (email: string) => void
8
- }
9
-
10
- export const TauntContext = createContext<ContextProps>({
11
- tauntServiceEndpoint: "",
12
- metamaskLogin: () => {},
13
- otpMagicLogin: () => {}
14
- })
15
-
16
- export function useTaunt() {
17
- const ctx = useContext(TauntContext)
18
- if (!ctx) {
19
- throw new Error("useTaunt must be used within a TauntProvider")
20
- }
21
- return ctx
22
- }
@@ -1,49 +0,0 @@
1
- import {
2
- tauntMagicEmailOTPLogin,
3
- tauntMetamaskLogin
4
- } from "@redzone/taunt-logins"
5
- import { useCallback, useState } from "react"
6
-
7
- import { TauntContext } from "./tauntContext"
8
-
9
- export const TauntProvider = ({
10
- children,
11
- tauntServiceEndpoint,
12
- magicKey
13
- }: {
14
- children: React.ReactNode
15
- tauntServiceEndpoint?: string
16
- magicKey?: string
17
- }) => {
18
- const [deets, setDeets] = useState<{
19
- accessToken: string
20
- refreshToken: string
21
- }>()
22
-
23
- const otpMagicLogin = useCallback(
24
- (email: string) => {
25
- if (!magicKey) throw new Error("magicKey is required for OTP login")
26
-
27
- tauntMagicEmailOTPLogin(tauntServiceEndpoint!, magicKey, email!).then(
28
- setDeets
29
- )
30
- },
31
- [tauntServiceEndpoint]
32
- )
33
-
34
- const metamaskLogin = useCallback(
35
- () => tauntMetamaskLogin(tauntServiceEndpoint!).then(setDeets),
36
- [tauntServiceEndpoint]
37
- )
38
-
39
- if (!tauntServiceEndpoint) {
40
- return <div>tauntServiceEndpoint is required</div>
41
- }
42
-
43
- return (
44
- <TauntContext.Provider
45
- value={{ tauntServiceEndpoint, deets, otpMagicLogin, metamaskLogin }}>
46
- {children}
47
- </TauntContext.Provider>
48
- )
49
- }
package/src/main.tsx DELETED
@@ -1,12 +0,0 @@
1
- import { StrictMode } from "react"
2
- import { createRoot } from "react-dom/client"
3
-
4
- import App from "./App.tsx"
5
-
6
- // import "./index.css"
7
-
8
- createRoot(document.getElementById("root")!).render(
9
- <StrictMode>
10
- <App />
11
- </StrictMode>
12
- )
package/tsconfig.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "useDefineForClassFields": true,
5
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
6
- "module": "ESNext",
7
- "skipLibCheck": true,
8
-
9
- /* Bundler mode */
10
- "moduleResolution": "bundler",
11
- "allowImportingTsExtensions": true,
12
- "resolveJsonModule": true,
13
- "isolatedModules": true,
14
- "noEmit": true,
15
- "jsx": "react-jsx",
16
-
17
- /* Linting */
18
- "strict": true,
19
- "noUnusedLocals": true,
20
- "noUnusedParameters": true,
21
- "noFallthroughCasesInSwitch": true
22
- },
23
- "include": ["src"],
24
- "references": [{ "path": "./tsconfig.node.json" }]
25
- }
@@ -1,10 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "skipLibCheck": true,
5
- "module": "ESNext",
6
- "moduleResolution": "bundler",
7
- "allowSyntheticDefaultImports": true
8
- },
9
- "include": ["vite.config.ts"]
10
- }
package/vite.config.ts DELETED
@@ -1,43 +0,0 @@
1
- import { resolve } from "path"
2
- // import react from "@vitejs/plugin-react-swc"
3
- import react from "@vitejs/plugin-react"
4
- import { defineConfig } from "vite"
5
- import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js"
6
- import dts from "vite-plugin-dts"
7
-
8
- export default defineConfig({
9
- plugins: [
10
- cssInjectedByJsPlugin(),
11
- react(),
12
- dts({
13
- insertTypesEntry: true
14
- })
15
- ],
16
- build: {
17
- lib: {
18
- entry: resolve(__dirname, "src/lib/index.ts"),
19
- name: "@redzone/taunt-logins-ui-react",
20
- // fileName: (format) => `index.${format}.js`
21
- // the proper extensions will be added
22
- fileName: "taunt-logins-ui-react"
23
- },
24
- rollupOptions: {
25
- external: ["react", "react-dom", "react/jsx-runtime"],
26
- output: {
27
- globals: {
28
- react: "React",
29
- "react-dom": "ReactDOM",
30
- "react/jsx-runtime": "react/jsx-runtime"
31
- }
32
- }
33
- },
34
- //Generates sourcemaps for the built files,
35
- //aiding in debugging.
36
- sourcemap: true,
37
- //Clears the output directory before building.
38
- emptyOutDir: true
39
- },
40
- server: {
41
- open: true
42
- }
43
- })