@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,37 +0,0 @@
1
- import path from "path"
2
- // import react from "@vitejs/plugin-react-swc"
3
- import react from "@vitejs/plugin-react"
4
- import { defineConfig } from "vite"
5
- import dts from "vite-plugin-dts"
6
-
7
- // https://vite.dev/config/
8
- export default defineConfig({
9
- build: {
10
- lib: {
11
- entry: path.resolve("src", "lib/index.tsx"),
12
- name: "@redzone/taunt-logins-ui-react",
13
- fileName: (format) => `index.${format}.js`
14
- },
15
- rollupOptions: {
16
- external: ["react", "react-dom"],
17
- output: {
18
- globals: {
19
- react: "React",
20
- "react-dom": "ReactDOM"
21
- }
22
- }
23
- },
24
- //Generates sourcemaps for the built files,
25
- //aiding in debugging.
26
- sourcemap: true,
27
- //Clears the output directory before building.
28
- emptyOutDir: true
29
- },
30
- //react() enables React support.
31
- //dts() generates TypeScript declaration files (*.d.ts)
32
- //during the build.
33
- plugins: [react(), dts()],
34
- server: {
35
- open: true
36
- }
37
- })
@@ -1,45 +0,0 @@
1
- import path 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
- // https://vite.dev/config/
9
- export default defineConfig({
10
- build: {
11
- lib: {
12
- entry: path.resolve("src", "lib/index.tsx"),
13
- name: "@redzone/taunt-logins-ui-react",
14
- fileName: (format) => `index.${format}.js`
15
- },
16
- rollupOptions: {
17
- external: ["react", "react-dom", "react/jsx-runtime"],
18
- output: {
19
- globals: {
20
- react: "React",
21
- "react-dom": "ReactDOM",
22
- "react/jsx-runtime": "react/jsx-runtime"
23
- }
24
- }
25
- },
26
- //Generates sourcemaps for the built files,
27
- //aiding in debugging.
28
- sourcemap: true,
29
- //Clears the output directory before building.
30
- emptyOutDir: true
31
- },
32
- //react() enables React support.
33
- //dts() generates TypeScript declaration files (*.d.ts)
34
- //during the build.
35
- plugins: [
36
- cssInjectedByJsPlugin(),
37
- react(),
38
- dts({
39
- insertTypesEntry: true
40
- })
41
- ],
42
- server: {
43
- open: true
44
- }
45
- })
@@ -1,47 +0,0 @@
1
- import path 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
- // https://vite.dev/config/
9
- export default defineConfig({
10
- build: {
11
- lib: {
12
- entry: path.resolve("src", "lib/index.tsx"),
13
- name: "@redzone/taunt-logins-ui-react",
14
- // fileName: (format) => `index.${format}.js`
15
- // the proper extensions will be added
16
- fileName: "taunt-logins-ui-react"
17
- },
18
- rollupOptions: {
19
- external: ["react", "react-dom", "react/jsx-runtime"],
20
- output: {
21
- globals: {
22
- react: "React",
23
- "react-dom": "ReactDOM",
24
- "react/jsx-runtime": "react/jsx-runtime"
25
- }
26
- }
27
- },
28
- //Generates sourcemaps for the built files,
29
- //aiding in debugging.
30
- sourcemap: true,
31
- //Clears the output directory before building.
32
- emptyOutDir: true
33
- },
34
- //react() enables React support.
35
- //dts() generates TypeScript declaration files (*.d.ts)
36
- //during the build.
37
- plugins: [
38
- cssInjectedByJsPlugin(),
39
- react(),
40
- dts({
41
- insertTypesEntry: true
42
- })
43
- ],
44
- server: {
45
- open: true
46
- }
47
- })
@@ -1,47 +0,0 @@
1
- import path 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
- // https://vite.dev/config/
9
- export default defineConfig({
10
- build: {
11
- lib: {
12
- entry: path.resolve("src", "lib/index.ts"),
13
- name: "@redzone/taunt-logins-ui-react",
14
- // fileName: (format) => `index.${format}.js`
15
- // the proper extensions will be added
16
- fileName: "taunt-logins-ui-react"
17
- },
18
- rollupOptions: {
19
- external: ["react", "react-dom", "react/jsx-runtime"],
20
- output: {
21
- globals: {
22
- react: "React",
23
- "react-dom": "ReactDOM",
24
- "react/jsx-runtime": "react/jsx-runtime"
25
- }
26
- }
27
- },
28
- //Generates sourcemaps for the built files,
29
- //aiding in debugging.
30
- sourcemap: true,
31
- //Clears the output directory before building.
32
- emptyOutDir: true
33
- },
34
- //react() enables React support.
35
- //dts() generates TypeScript declaration files (*.d.ts)
36
- //during the build.
37
- plugins: [
38
- cssInjectedByJsPlugin(),
39
- react(),
40
- dts({
41
- insertTypesEntry: true
42
- })
43
- ],
44
- server: {
45
- open: true
46
- }
47
- })
@@ -1,47 +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
- // https://vite.dev/config/
9
- export default defineConfig({
10
- //react() enables React support.
11
- //dts() generates TypeScript declaration files (*.d.ts)
12
- //during the build.
13
- plugins: [
14
- cssInjectedByJsPlugin(),
15
- react(),
16
- dts({
17
- insertTypesEntry: true
18
- })
19
- ],
20
- build: {
21
- lib: {
22
- entry: resolve(__dirname, "src/lib/index.ts"),
23
- name: "@redzone/taunt-logins-ui-react",
24
- // fileName: (format) => `index.${format}.js`
25
- // the proper extensions will be added
26
- fileName: "taunt-logins-ui-react"
27
- },
28
- rollupOptions: {
29
- external: ["react", "react-dom", "react/jsx-runtime"],
30
- output: {
31
- globals: {
32
- react: "React",
33
- "react-dom": "ReactDOM",
34
- "react/jsx-runtime": "react/jsx-runtime"
35
- }
36
- }
37
- },
38
- //Generates sourcemaps for the built files,
39
- //aiding in debugging.
40
- sourcemap: true,
41
- //Clears the output directory before building.
42
- emptyOutDir: true
43
- },
44
- server: {
45
- open: true
46
- }
47
- })
@@ -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
- })
package/.prettierrc.mjs DELETED
@@ -1,22 +0,0 @@
1
- /**
2
- * @type {import('prettier').Options}
3
- */
4
- export default {
5
- printWidth: 80,
6
- tabWidth: 2,
7
- useTabs: false,
8
- semi: false,
9
- singleQuote: false,
10
- trailingComma: "none",
11
- bracketSpacing: true,
12
- bracketSameLine: true,
13
- plugins: ["@ianvs/prettier-plugin-sort-imports"],
14
- importOrder: [
15
- "<BUILTIN_MODULES>", // Node.js built-in modules
16
- "<THIRD_PARTY_MODULES>", // Imports not matched by other special words or groups.
17
- "",
18
- "^~(.*)$",
19
- "",
20
- "^[./]"
21
- ]
22
- }
@@ -1,28 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4
- "target": "ES2022",
5
- "useDefineForClassFields": true,
6
- "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
- "module": "ESNext",
8
- "types": ["vite/client"],
9
- "skipLibCheck": true,
10
-
11
- /* Bundler mode */
12
- "moduleResolution": "bundler",
13
- "allowImportingTsExtensions": true,
14
- "verbatimModuleSyntax": true,
15
- "moduleDetection": "force",
16
- "noEmit": true,
17
- "jsx": "react-jsx",
18
-
19
- /* Linting */
20
- "strict": true,
21
- "noUnusedLocals": true,
22
- "noUnusedParameters": true,
23
- "erasableSyntaxOnly": false,
24
- "noFallthroughCasesInSwitch": true,
25
- "noUncheckedSideEffectImports": true
26
- },
27
- "include": ["src"]
28
- }
@@ -1,7 +0,0 @@
1
- {
2
- "files": [],
3
- "references": [
4
- { "path": "./tsconfig.app.json" },
5
- { "path": "./tsconfig.node.json" }
6
- ]
7
- }
@@ -1,26 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
- "target": "ES2023",
5
- "lib": ["ES2023"],
6
- "module": "ESNext",
7
- "types": ["node"],
8
- "skipLibCheck": true,
9
-
10
- /* Bundler mode */
11
- "moduleResolution": "bundler",
12
- "allowImportingTsExtensions": true,
13
- "verbatimModuleSyntax": true,
14
- "moduleDetection": "force",
15
- "noEmit": true,
16
-
17
- /* Linting */
18
- "strict": true,
19
- "noUnusedLocals": true,
20
- "noUnusedParameters": true,
21
- "erasableSyntaxOnly": true,
22
- "noFallthroughCasesInSwitch": true,
23
- "noUncheckedSideEffectImports": true
24
- },
25
- "include": ["vite.config.ts"]
26
- }
package/eslint.config.js DELETED
@@ -1,23 +0,0 @@
1
- import js from '@eslint/js'
2
- import globals from 'globals'
3
- import reactHooks from 'eslint-plugin-react-hooks'
4
- import reactRefresh from 'eslint-plugin-react-refresh'
5
- import tseslint from 'typescript-eslint'
6
- import { defineConfig, globalIgnores } from 'eslint/config'
7
-
8
- export default defineConfig([
9
- globalIgnores(['dist']),
10
- {
11
- files: ['**/*.{ts,tsx}'],
12
- extends: [
13
- js.configs.recommended,
14
- tseslint.configs.recommended,
15
- reactHooks.configs['recommended-latest'],
16
- reactRefresh.configs.vite,
17
- ],
18
- languageOptions: {
19
- ecmaVersion: 2020,
20
- globals: globals.browser,
21
- },
22
- },
23
- ])
package/index.html DELETED
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>redzone-taunt-logins-ui-react</title>
8
- </head>
9
- <body>
10
- <div id="root"></div>
11
- <script type="module" src="/src/main.tsx"></script>
12
- </body>
13
- </html>
package/src/App.css DELETED
@@ -1,42 +0,0 @@
1
- #root {
2
- max-width: 1280px;
3
- margin: 0 auto;
4
- padding: 2rem;
5
- text-align: center;
6
- }
7
-
8
- .logo {
9
- height: 6em;
10
- padding: 1.5em;
11
- will-change: filter;
12
- transition: filter 300ms;
13
- }
14
- .logo:hover {
15
- filter: drop-shadow(0 0 2em #646cffaa);
16
- }
17
- .logo.react:hover {
18
- filter: drop-shadow(0 0 2em #61dafbaa);
19
- }
20
-
21
- @keyframes logo-spin {
22
- from {
23
- transform: rotate(0deg);
24
- }
25
- to {
26
- transform: rotate(360deg);
27
- }
28
- }
29
-
30
- @media (prefers-reduced-motion: no-preference) {
31
- a:nth-of-type(2) .logo {
32
- animation: logo-spin infinite 20s linear;
33
- }
34
- }
35
-
36
- .card {
37
- padding: 2em;
38
- }
39
-
40
- .read-the-docs {
41
- color: #888;
42
- }
package/src/App.tsx DELETED
@@ -1,54 +0,0 @@
1
- // import "./App.css"
2
-
3
- import { MagicEmailInput } from "./lib/magic"
4
- import { MetaMaskButton } from "./lib/metamask"
5
- import { useTaunt } from "./lib/tauntContext"
6
- import { TauntProvider } from "./lib/tauntProvider"
7
-
8
- function App() {
9
- return (
10
- <TauntProvider
11
- tauntServiceEndpoint={process.env.VITE_TAUNT_SERVICE_ENDPOINT}
12
- magicKey={process.env.VITE_MAGIC_KEY}>
13
- <div
14
- style={{
15
- display: "flex",
16
- flexDirection: "column",
17
- gap: 8,
18
- alignItems: "center"
19
- }}>
20
- <MagicEmailInput />
21
- <MetaMaskButton />
22
- <LogoutButton />
23
- <TauntDeets />
24
- </div>
25
- </TauntProvider>
26
- )
27
- }
28
-
29
- function LogoutButton() {
30
- const { deets } = useTaunt()
31
- if (!deets) return null
32
-
33
- return (
34
- <button
35
- className="ml-2 p-2 bg-blue-500 text-white rounded-md"
36
- type="button">
37
- Logout
38
- </button>
39
- )
40
- }
41
-
42
- function TauntDeets() {
43
- const { deets } = useTaunt()
44
- return (
45
- <textarea
46
- rows={5}
47
- cols={50}
48
- value={JSON.stringify(deets, null, 2)}
49
- readOnly
50
- />
51
- )
52
- }
53
-
54
- export default App
package/src/index.css DELETED
@@ -1,68 +0,0 @@
1
- :root {
2
- font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3
- line-height: 1.5;
4
- font-weight: 400;
5
-
6
- color-scheme: light dark;
7
- color: rgba(255, 255, 255, 0.87);
8
- background-color: #242424;
9
-
10
- font-synthesis: none;
11
- text-rendering: optimizeLegibility;
12
- -webkit-font-smoothing: antialiased;
13
- -moz-osx-font-smoothing: grayscale;
14
- }
15
-
16
- a {
17
- font-weight: 500;
18
- color: #646cff;
19
- text-decoration: inherit;
20
- }
21
- a:hover {
22
- color: #535bf2;
23
- }
24
-
25
- body {
26
- margin: 0;
27
- display: flex;
28
- place-items: center;
29
- min-width: 320px;
30
- min-height: 100vh;
31
- }
32
-
33
- h1 {
34
- font-size: 3.2em;
35
- line-height: 1.1;
36
- }
37
-
38
- button {
39
- border-radius: 8px;
40
- border: 1px solid transparent;
41
- padding: 0.6em 1.2em;
42
- font-size: 1em;
43
- font-weight: 500;
44
- font-family: inherit;
45
- background-color: #1a1a1a;
46
- cursor: pointer;
47
- transition: border-color 0.25s;
48
- }
49
- button:hover {
50
- border-color: #646cff;
51
- }
52
- button:focus,
53
- button:focus-visible {
54
- outline: 4px auto -webkit-focus-ring-color;
55
- }
56
-
57
- @media (prefers-color-scheme: light) {
58
- :root {
59
- color: #213547;
60
- background-color: #ffffff;
61
- }
62
- a:hover {
63
- color: #747bff;
64
- }
65
- button {
66
- background-color: #f9f9f9;
67
- }
68
- }
package/src/lib/index.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from "./magic"
2
- export * from "./metamask"
3
- export * from "./tauntContext"
4
- export * from "./tauntProvider"
package/src/lib/magic.tsx DELETED
@@ -1,50 +0,0 @@
1
- import { useCallback, useMemo, useState } from "react"
2
-
3
- import "./styling.css"
4
-
5
- import { useTaunt } from "./tauntContext"
6
-
7
- export const MagicEmailInput = ({
8
- onEmail
9
- }: {
10
- onEmail?: (email: string) => void
11
- }) => {
12
- const { otpMagicLogin } = useTaunt()
13
- const [email, setEmail] = useState<string>()
14
-
15
- const initialised = useMemo(() => email !== undefined, [email])
16
-
17
- const validEmail = useMemo(() => {
18
- const validRegex =
19
- /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/
20
- return email?.match(validRegex) ? email : undefined
21
- }, [email])
22
-
23
- const runMagic = useCallback(() => {
24
- if (!validEmail) return
25
-
26
- if (onEmail) {
27
- onEmail(email!)
28
- } else {
29
- otpMagicLogin(email!)
30
- }
31
- }, [validEmail, onEmail])
32
-
33
- return (
34
- <div style={{ display: "flex", flexDirection: "row", gap: 8 }}>
35
- {initialised && !validEmail && (
36
- <div style={{ color: "red" }}>Please enter a valid email</div>
37
- )}
38
- <input
39
- className="rdz-input"
40
- onChange={(e) => setEmail(e.target.value ? e.target.value : undefined)}
41
- placeholder="Enter your email"
42
- type="email"
43
- value={email}
44
- />
45
- <button className="rdz-button" onClick={runMagic} type="button">
46
- Send Magic Link
47
- </button>
48
- </div>
49
- )
50
- }
@@ -1,27 +0,0 @@
1
- import { useCallback } from "react"
2
-
3
- import "./styling.css"
4
-
5
- import { useTaunt } from "./tauntContext"
6
-
7
- export const MetaMaskButton = ({
8
- openMetamask
9
- }: {
10
- openMetamask?: () => void
11
- }) => {
12
- const { metamaskLogin } = useTaunt()
13
-
14
- const runMetamask = useCallback(() => {
15
- if (openMetamask) {
16
- openMetamask()
17
- } else {
18
- metamaskLogin()
19
- }
20
- }, [metamaskLogin, openMetamask])
21
-
22
- return (
23
- <button className="rdz-button" onClick={runMetamask}>
24
- Login with Metamask
25
- </button>
26
- )
27
- }
@@ -1,25 +0,0 @@
1
- .rdz-button,
2
- .rdz-input {
3
- font-family: Avenir, Helvetica, Arial, sans-serif !important;
4
- line-height: 1.5;
5
- font-weight: 400 !important;
6
-
7
- color: lightgray;
8
- border-radius: 8px;
9
- border: 1px solid transparent;
10
- padding: 0.6em 1.2em;
11
- font-size: 1em;
12
- font-weight: 500;
13
- font-family: inherit;
14
- background-color: #1a1a1a;
15
- cursor: pointer;
16
- transition: border-color 0.25s;
17
-
18
- &:hover {
19
- border-color: #646cff;
20
- }
21
- &:focus,
22
- &:focus-visible {
23
- outline: 4px auto -webkit-focus-ring-color;
24
- }
25
- }