From ffab204b171dea01c0715d7dd866614b1219f135 Mon Sep 17 00:00:00 2001 From: Alduin Date: Thu, 7 Nov 2024 13:56:12 -0300 Subject: [PATCH] Integrate levana UI package --- frontend/package.json | 2 + frontend/pnpm-lock.yaml | 361 ++++++++- frontend/src/app.tsx | 28 +- .../components/common/ConnectButton/index.tsx | 6 +- .../common/ConnectionModal/index.tsx | 144 ++-- .../common/TermsDisclaimer/index.tsx | 138 ---- .../common/TermsDisclaimerModal/index.tsx | 135 ++++ .../components/lib/MoreInfoButton/index.tsx | 63 +- frontend/src/config/theme.tsx | 726 ------------------ .../MarketBetting/CoinsAmountField/index.tsx | 17 +- .../MarketBetting/SharesAmountField/index.tsx | 17 +- frontend/src/main.tsx | 11 +- frontend/src/state/modals.tsx | 62 -- 13 files changed, 622 insertions(+), 1088 deletions(-) delete mode 100644 frontend/src/components/common/TermsDisclaimer/index.tsx create mode 100644 frontend/src/components/common/TermsDisclaimerModal/index.tsx delete mode 100644 frontend/src/config/theme.tsx delete mode 100644 frontend/src/state/modals.tsx diff --git a/frontend/package.json b/frontend/package.json index 47f50da..b411172 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -15,6 +15,8 @@ "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", "@fontsource/inter": "^5.0.20", + "@levana-protocol/ui": "^0.1.0", + "@levana-protocol/utils": "^0.0.3", "@mui/joy": "5.0.0-beta.48", "@mui/system": "^6.0.2", "@tanstack/react-query": "^5.54.1", diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index 982c8ee..422dc2a 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -23,6 +23,12 @@ importers: '@fontsource/inter': specifier: ^5.0.20 version: 5.0.20 + '@levana-protocol/ui': + specifier: ^0.1.0 + version: 0.1.0(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1)) + '@levana-protocol/utils': + specifier: ^0.0.3 + version: 0.0.3(@types/react@18.3.5) '@mui/joy': specifier: 5.0.0-beta.48 version: 5.0.0-beta.48(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -191,6 +197,10 @@ packages: resolution: {integrity: sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==} engines: {node: '>=6.9.0'} + '@babel/runtime@7.26.0': + resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} + engines: {node: '>=6.9.0'} + '@babel/template@7.25.0': resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==} engines: {node: '>=6.9.0'} @@ -374,6 +384,9 @@ packages: '@emotion/serialize@1.3.1': resolution: {integrity: sha512-dEPNKzBPU+vFPGa+z3axPRn8XVDetYORmDC0wAiej+TNcOZE70ZMJa0X7JdeoM6q/nWTMZeLpN/fTnD9o8MQBA==} + '@emotion/serialize@1.3.2': + resolution: {integrity: sha512-grVnMvVPK9yUVE6rkKfAJlYZgo0cu3l9iMC77V7DW6E1DUIrU68pSEXRmFZFOFB1QFo57TncmOcvcbMDWsL4yA==} + '@emotion/sheet@1.4.0': resolution: {integrity: sha512-fTBW9/8r2w3dXWYM4HCB1Rdp8NLibOw2+XELH5m5+AkWiL/KqYX6dc0kKYlaYyKjrQ6ds33MCdMPEwgs2z1rqg==} @@ -398,6 +411,9 @@ packages: '@emotion/utils@1.4.0': resolution: {integrity: sha512-spEnrA1b6hDR/C68lC2M7m6ALPUHZC0lIY7jAS/B/9DuuO1ZP04eov8SMv/6fwRd8pzmsn2AuJEznRREWlQrlQ==} + '@emotion/utils@1.4.1': + resolution: {integrity: sha512-BymCXzCG3r72VKJxaYVwOXATqXIZ85cuvg0YOUDxMGNrKc1DJRZk8MgV5wyXRyEayIMd4FuXJIUgTBXvDNW5cA==} + '@emotion/weak-memoize@0.4.0': resolution: {integrity: sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==} @@ -624,9 +640,15 @@ packages: '@floating-ui/utils@0.2.7': resolution: {integrity: sha512-X8R8Oj771YRl/w+c1HqAC1szL8zWQRwFvgDwT129k9ACdBoud/+/rX9V0qiMl6LWUdP9voC2nDVZYPMQQsb6eA==} + '@fontsource/barlow-semi-condensed@5.1.0': + resolution: {integrity: sha512-hTlARiOlj43hAOm17jUhjlfQxS+UXetZiqN0aHkNiADXJTgtRuMIBmoIvFq+YoSj6mj9U4cC/KuA/xpuIL+BdQ==} + '@fontsource/inter@5.0.20': resolution: {integrity: sha512-rtw2F7xfM7rJmmnncXnR4ADr5wXsp4GyN1O1jmQJ1PMjAK+bm620/ZkQkeOYOkGoa09OksGinOeMA+Mkt6K9PQ==} + '@fontsource/montserrat@5.1.0': + resolution: {integrity: sha512-HB4+rWP9Y8g6T9RGRVJk2SvAJtx2eBAXuivvPOqQdD806/9WESUfucfH9LqFj3bGgdhNCfh0Rv0NGuwEmBLRiw==} + '@jridgewell/gen-mapping@0.3.5': resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} engines: {node: '>=6.0.0'} @@ -678,6 +700,12 @@ packages: '@leapwallet/cosmos-social-login-core@0.0.1': resolution: {integrity: sha512-hGJrBYR8CQAVvmOOCvK2RmZ5ykSjxueXZfsRBXGNFyBw6YEo2oRXedJ2g4X9MDAL7pqQ6ExkltTbSkr+ea2uKg==} + '@levana-protocol/ui@0.1.0': + resolution: {integrity: sha512-QQ+z7uxYwBsPqyq6oUWUiEwgPQnjem2dvxn0azaQRNzKEPS7/oDuHgwTCD+XnDCOJwLPfkMLpiN3DKffwwisFA==} + + '@levana-protocol/utils@0.0.3': + resolution: {integrity: sha512-luYx+rVnUU+57I4CRiJUSBljuDRjHynw9PO53IfcDzV2oM+ijm9vxfgaSvIZx0ALbiCNQKYy9ytDWzynKRKWxQ==} + '@lit-labs/ssr-dom-shim@1.2.1': resolution: {integrity: sha512-wx4aBmgeGvFmOKucFKY+8VFJSYZxs9poN3SDNQFF6lT6NrQUnHiPB2PWz2sc4ieEcAaYYzN+1uWahEeTq2aRIQ==} @@ -755,6 +783,17 @@ packages: '@types/react': optional: true + '@mui/base@5.0.0-beta.58': + resolution: {integrity: sha512-P0E7ZrxOuyYqBvVv9w8k7wm+Xzx/KRu+BGgFcR2htTsGCpJNQJCSUXNUZ50MUmSU9hzqhwbQWNXhV1MBTl6F7A==} + engines: {node: '>=14.0.0'} + peerDependencies: + '@types/react': ^17.0.0 || ^18.0.0 + react: ^17.0.0 || ^18.0.0 + react-dom: ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@mui/core-downloads-tracker@5.16.7': resolution: {integrity: sha512-RtsCt4Geed2/v74sbihWzzRs+HsIQCfclHeORh5Ynu2fS4icIKozcSubwuG7vtzq2uW3fOR1zITSP84TNt2GoQ==} @@ -795,6 +834,16 @@ packages: '@types/react': optional: true + '@mui/private-theming@6.1.6': + resolution: {integrity: sha512-ioAiFckaD/fJSnTrUMWgjl9HYBWt7ixCh7zZw7gDZ+Tae7NuprNV6QJK95EidDT7K0GetR2rU3kAeIR61Myttw==} + engines: {node: '>=14.0.0'} + peerDependencies: + '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@mui/styled-engine@5.16.6': resolution: {integrity: sha512-zaThmS67ZmtHSWToTiHslbI8jwrmITcN93LQaR2lKArbvS7Z3iLkwRoiikNWutx9MBs8Q6okKvbZq1RQYB3v7g==} engines: {node: '>=12.0.0'} @@ -821,6 +870,19 @@ packages: '@emotion/styled': optional: true + '@mui/styled-engine@6.1.6': + resolution: {integrity: sha512-I+yS1cSuSvHnZDBO7e7VHxTWpj+R7XlSZvTC4lS/OIbUNJOMMSd3UDP6V2sfwzAdmdDNBi7NGCRv2SZ6O9hGDA==} + engines: {node: '>=14.0.0'} + peerDependencies: + '@emotion/react': ^11.4.1 + '@emotion/styled': ^11.3.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@emotion/react': + optional: true + '@emotion/styled': + optional: true + '@mui/system@5.16.7': resolution: {integrity: sha512-Jncvs/r/d/itkxh7O7opOunTqbbSSzMTHzZkNLM+FjAOg+cYAZHrPDlYe1ZGKUYORwwb2XexlWnpZp0kZ4AHuA==} engines: {node: '>=12.0.0'} @@ -853,6 +915,22 @@ packages: '@types/react': optional: true + '@mui/system@6.1.3': + resolution: {integrity: sha512-ILaD9UsLTBLjMcep3OumJMXh1PYr7aqnkHm/L47bH46+YmSL1zWAX6tWG8swEQROzW2GvYluEMp5FreoxOOC6w==} + engines: {node: '>=14.0.0'} + peerDependencies: + '@emotion/react': ^11.5.0 + '@emotion/styled': ^11.3.0 + '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@emotion/react': + optional: true + '@emotion/styled': + optional: true + '@types/react': + optional: true + '@mui/types@7.2.16': resolution: {integrity: sha512-qI8TV3M7ShITEEc8Ih15A2vLzZGLhD+/UPNwck/hcls2gwg7dyRjNGXcQYHKLB5Q7PuTRfrTkAoPa2VV1s67Ag==} peerDependencies: @@ -861,6 +939,22 @@ packages: '@types/react': optional: true + '@mui/types@7.2.18': + resolution: {integrity: sha512-uvK9dWeyCJl/3ocVnTOS6nlji/Knj8/tVqVX03UVTpdmTJYu/s4jtDd9Kvv0nRGE0CUSNW1UYAci7PYypjealg==} + peerDependencies: + '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + + '@mui/types@7.2.19': + resolution: {integrity: sha512-6XpZEM/Q3epK9RN8ENoXuygnqUQxE+siN/6rGRi2iwJPgBUR25mphYQ9ZI87plGh58YoZ5pp40bFvKYOCDJ3tA==} + peerDependencies: + '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@mui/utils@5.16.6': resolution: {integrity: sha512-tWiQqlhxAt3KENNiSRL+DIn9H5xNVK6Jjf70x3PnfQPz1MPBdh7yyIcAyVBT9xiw7hP3SomRhPR7hzBMBCjqEA==} engines: {node: '>=12.0.0'} @@ -871,6 +965,16 @@ packages: '@types/react': optional: true + '@mui/utils@6.0.0-rc.0': + resolution: {integrity: sha512-tBp0ILEXDL0bbDDT8PnZOjCqSm5Dfk2N0Z45uzRw+wVl6fVvloC9zw8avl+OdX1Bg3ubs/ttKn8nRNv17bpM5A==} + engines: {node: '>=14.0.0'} + peerDependencies: + '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@mui/utils@6.0.2': resolution: {integrity: sha512-TeFrYsxcmeoDSlkoPhX+LjIuuqC5Pyj+xz2kRceKCkUpwMNTEeVOfowXDPe+mboZwmpJ5ZxP4eiAgQMdeEasjg==} engines: {node: '>=14.0.0'} @@ -881,6 +985,16 @@ packages: '@types/react': optional: true + '@mui/utils@6.1.6': + resolution: {integrity: sha512-sBS6D9mJECtELASLM+18WUcXF6RH3zNxBRFeyCRg8wad6NbyNrdxLuwK+Ikvc38sTZwBzAz691HmSofLqHd9sQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + '@types/react': ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + '@types/react': + optional: true + '@noble/curves@1.4.2': resolution: {integrity: sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==} @@ -1298,8 +1412,8 @@ packages: '@types/babel__traverse@7.20.6': resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} - '@types/bn.js@5.1.5': - resolution: {integrity: sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==} + '@types/bn.js@5.1.6': + resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==} '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} @@ -1349,6 +1463,9 @@ packages: '@types/prop-types@15.7.12': resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==} + '@types/prop-types@15.7.13': + resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==} + '@types/react-dom@18.3.0': resolution: {integrity: sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==} @@ -1358,6 +1475,9 @@ packages: '@types/secp256k1@4.0.6': resolution: {integrity: sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==} + '@types/sortablejs@1.15.8': + resolution: {integrity: sha512-b79830lW+RZfwaztgs1aVPgbasJ8e7AXtZYHTELNXZPsERt4ymJdjV4OccDbHQAvHrCcFpbF78jkm0R6h/pZVg==} + '@types/trusted-types@2.0.7': resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} @@ -1882,6 +2002,9 @@ packages: elliptic@6.5.7: resolution: {integrity: sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==} + elliptic@6.6.0: + resolution: {integrity: sha512-dpwoQcLc/2WLQvJvLRHKZ+f9FgOdjnq11rurqwekGQygGPsYSK29OMMD2WalatiqQ+XGFDglTNixpPfI+lpaAA==} + emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -2014,6 +2137,15 @@ packages: debug: optional: true + follow-redirects@1.15.9: + resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} @@ -2560,6 +2692,9 @@ packages: node-addon-api@2.0.2: resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} + node-addon-api@5.1.0: + resolution: {integrity: sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==} + node-addon-api@7.1.1: resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==} @@ -2939,9 +3074,9 @@ packages: scrypt-js@3.0.1: resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} - secp256k1@4.0.3: - resolution: {integrity: sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==} - engines: {node: '>=10.0.0'} + secp256k1@4.0.4: + resolution: {integrity: sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==} + engines: {node: '>=18.0.0'} semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} @@ -2994,6 +3129,9 @@ packages: sonic-boom@2.8.0: resolution: {integrity: sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg==} + sortablejs@1.15.2: + resolution: {integrity: sha512-FJF5jgdfvoKn1MAKSdGs33bIqLi3LmsgVTliuX6iITj834F+JRQZN90Z93yql8h0K2t0RwDPBmxwlbZfDcxNZA==} + source-map-js@1.2.0: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} @@ -3139,6 +3277,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@5.6.3: + resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} + engines: {node: '>=14.17'} + hasBin: true + ufo@1.5.4: resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} @@ -3411,6 +3554,21 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + zustand@4.5.2: + resolution: {integrity: sha512-2cN1tPkDVkwCy5ickKrI7vijSjPksFRfqS6237NzT0vqSsztTNnQdHw9mmN7uBdk3gceVXU0a+21jFzFzAc9+g==} + engines: {node: '>=12.7.0'} + peerDependencies: + '@types/react': '>=16.8' + immer: '>=9.0.6' + react: '>=16.8' + peerDependenciesMeta: + '@types/react': + optional: true + immer: + optional: true + react: + optional: true + zustand@4.5.5: resolution: {integrity: sha512-+0PALYNJNgK6hldkgDq2vLrw5f6g/jCInz52n9RTpropGgeAf/ioFUCdtsjCqu4gNhW9D01rUQBROoRjdzyn2Q==} engines: {node: '>=12.7.0'} @@ -3540,6 +3698,10 @@ snapshots: dependencies: regenerator-runtime: 0.14.1 + '@babel/runtime@7.26.0': + dependencies: + regenerator-runtime: 0.14.1 + '@babel/template@7.25.0': dependencies: '@babel/code-frame': 7.24.7 @@ -3604,12 +3766,12 @@ snapshots: '@celo/utils@3.2.0(fp-ts@2.16.9)': dependencies: '@celo/base': 3.2.0 - '@types/bn.js': 5.1.5 + '@types/bn.js': 5.1.6 '@types/elliptic': 6.4.18 '@types/ethereumjs-util': 5.2.0 '@types/node': 10.17.60 bignumber.js: 9.1.2 - elliptic: 6.5.7 + elliptic: 6.6.0 ethereumjs-util: 5.2.1 io-ts: 2.0.1(fp-ts@2.16.9) web3-eth-abi: 1.3.6 @@ -3667,7 +3829,7 @@ snapshots: '@cosmjs/utils': 0.27.1 bip39: 3.1.0 bn.js: 5.2.1 - elliptic: 6.5.7 + elliptic: 6.6.0 js-sha3: 0.8.0 libsodium-wrappers: 0.7.15 ripemd160: 2.0.2 @@ -3680,7 +3842,7 @@ snapshots: '@cosmjs/utils': 0.31.3 '@noble/hashes': 1.5.0 bn.js: 5.2.1 - elliptic: 6.5.7 + elliptic: 6.6.0 libsodium-wrappers-sumo: 0.7.15 '@cosmjs/crypto@0.32.4': @@ -3881,6 +4043,14 @@ snapshots: '@emotion/utils': 1.4.0 csstype: 3.1.3 + '@emotion/serialize@1.3.2': + dependencies: + '@emotion/hash': 0.9.2 + '@emotion/memoize': 0.9.0 + '@emotion/unitless': 0.10.0 + '@emotion/utils': 1.4.1 + csstype: 3.1.3 + '@emotion/sheet@1.4.0': {} '@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react@18.3.1)': @@ -3906,6 +4076,8 @@ snapshots: '@emotion/utils@1.4.0': {} + '@emotion/utils@1.4.1': {} + '@emotion/weak-memoize@0.4.0': {} '@esbuild/aix-ppc64@0.21.5': @@ -4137,8 +4309,12 @@ snapshots: '@floating-ui/utils@0.2.7': {} + '@fontsource/barlow-semi-condensed@5.1.0': {} + '@fontsource/inter@5.0.20': {} + '@fontsource/montserrat@5.1.0': {} + '@jridgewell/gen-mapping@0.3.5': dependencies: '@jridgewell/set-array': 1.2.1 @@ -4231,7 +4407,37 @@ snapshots: dependencies: '@cosmjs/amino': 0.31.3 '@cosmjs/proto-signing': 0.31.3 - typescript: 5.5.4 + typescript: 5.6.3 + + '@levana-protocol/ui@0.1.0(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))': + dependencies: + '@emotion/cache': 11.13.1 + '@emotion/react': 11.13.3(@types/react@18.3.5)(react@18.3.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react@18.3.1) + '@fontsource/barlow-semi-condensed': 5.1.0 + '@fontsource/montserrat': 5.1.0 + '@levana-protocol/utils': 0.0.3(@types/react@18.3.5) + '@mui/base': 5.0.0-beta.58(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mui/joy': 5.0.0-beta.48(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mui/system': 6.1.3(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react@18.3.1) + '@mui/types': 7.2.18(@types/react@18.3.5) + '@types/sortablejs': 1.15.8 + react: 18.3.1 + sortablejs: 1.15.2 + zustand: 4.5.2(@types/react@18.3.5)(react@18.3.1) + transitivePeerDependencies: + - '@types/react' + - immer + - react-dom + - supports-color + + '@levana-protocol/utils@0.0.3(@types/react@18.3.5)': + dependencies: + react: 18.3.1 + zustand: 4.5.2(@types/react@18.3.5)(react@18.3.1) + transitivePeerDependencies: + - '@types/react' + - immer '@lit-labs/ssr-dom-shim@1.2.1': {} @@ -4370,6 +4576,20 @@ snapshots: optionalDependencies: '@types/react': 18.3.5 + '@mui/base@5.0.0-beta.58(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@babel/runtime': 7.26.0 + '@floating-ui/react-dom': 2.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mui/types': 7.2.19(@types/react@18.3.5) + '@mui/utils': 6.0.0-rc.0(@types/react@18.3.5)(react@18.3.1) + '@popperjs/core': 2.11.8 + clsx: 2.1.1 + prop-types: 15.8.1 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.5 + '@mui/core-downloads-tracker@5.16.7': {} '@mui/joy@5.0.0-beta.48(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': @@ -4407,6 +4627,15 @@ snapshots: optionalDependencies: '@types/react': 18.3.5 + '@mui/private-theming@6.1.6(@types/react@18.3.5)(react@18.3.1)': + dependencies: + '@babel/runtime': 7.26.0 + '@mui/utils': 6.1.6(@types/react@18.3.5)(react@18.3.1) + prop-types: 15.8.1 + react: 18.3.1 + optionalDependencies: + '@types/react': 18.3.5 + '@mui/styled-engine@5.16.6(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 @@ -4429,6 +4658,19 @@ snapshots: '@emotion/react': 11.13.3(@types/react@18.3.5)(react@18.3.1) '@emotion/styled': 11.13.0(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react@18.3.1) + '@mui/styled-engine@6.1.6(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react@18.3.1))(react@18.3.1)': + dependencies: + '@babel/runtime': 7.26.0 + '@emotion/cache': 11.13.1 + '@emotion/serialize': 1.3.2 + '@emotion/sheet': 1.4.0 + csstype: 3.1.3 + prop-types: 15.8.1 + react: 18.3.1 + optionalDependencies: + '@emotion/react': 11.13.3(@types/react@18.3.5)(react@18.3.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react@18.3.1) + '@mui/system@5.16.7(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 @@ -4461,10 +4703,34 @@ snapshots: '@emotion/styled': 11.13.0(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react@18.3.1) '@types/react': 18.3.5 + '@mui/system@6.1.3(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react@18.3.1)': + dependencies: + '@babel/runtime': 7.26.0 + '@mui/private-theming': 6.1.6(@types/react@18.3.5)(react@18.3.1) + '@mui/styled-engine': 6.1.6(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react@18.3.1))(react@18.3.1) + '@mui/types': 7.2.19(@types/react@18.3.5) + '@mui/utils': 6.1.6(@types/react@18.3.5)(react@18.3.1) + clsx: 2.1.1 + csstype: 3.1.3 + prop-types: 15.8.1 + react: 18.3.1 + optionalDependencies: + '@emotion/react': 11.13.3(@types/react@18.3.5)(react@18.3.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.3(@types/react@18.3.5)(react@18.3.1))(@types/react@18.3.5)(react@18.3.1) + '@types/react': 18.3.5 + '@mui/types@7.2.16(@types/react@18.3.5)': optionalDependencies: '@types/react': 18.3.5 + '@mui/types@7.2.18(@types/react@18.3.5)': + optionalDependencies: + '@types/react': 18.3.5 + + '@mui/types@7.2.19(@types/react@18.3.5)': + optionalDependencies: + '@types/react': 18.3.5 + '@mui/utils@5.16.6(@types/react@18.3.5)(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 @@ -4477,6 +4743,18 @@ snapshots: optionalDependencies: '@types/react': 18.3.5 + '@mui/utils@6.0.0-rc.0(@types/react@18.3.5)(react@18.3.1)': + dependencies: + '@babel/runtime': 7.26.0 + '@mui/types': 7.2.19(@types/react@18.3.5) + '@types/prop-types': 15.7.13 + clsx: 2.1.1 + prop-types: 15.8.1 + react: 18.3.1 + react-is: 18.3.1 + optionalDependencies: + '@types/react': 18.3.5 + '@mui/utils@6.0.2(@types/react@18.3.5)(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 @@ -4489,6 +4767,18 @@ snapshots: optionalDependencies: '@types/react': 18.3.5 + '@mui/utils@6.1.6(@types/react@18.3.5)(react@18.3.1)': + dependencies: + '@babel/runtime': 7.26.0 + '@mui/types': 7.2.19(@types/react@18.3.5) + '@types/prop-types': 15.7.13 + clsx: 2.1.1 + prop-types: 15.8.1 + react: 18.3.1 + react-is: 18.3.1 + optionalDependencies: + '@types/react': 18.3.5 + '@noble/curves@1.4.2': dependencies: '@noble/hashes': 1.4.0 @@ -4847,7 +5137,7 @@ snapshots: dependencies: '@babel/types': 7.25.6 - '@types/bn.js@5.1.5': + '@types/bn.js@5.1.6': dependencies: '@types/node': 22.5.2 @@ -4857,7 +5147,7 @@ snapshots: '@types/elliptic@6.4.18': dependencies: - '@types/bn.js': 5.1.5 + '@types/bn.js': 5.1.6 '@types/estree-jsx@1.0.5': dependencies: @@ -4867,7 +5157,7 @@ snapshots: '@types/ethereumjs-util@5.2.0': dependencies: - '@types/bn.js': 5.1.5 + '@types/bn.js': 5.1.6 '@types/node': 22.5.2 '@types/gtag.js@0.0.20': {} @@ -4900,6 +5190,8 @@ snapshots: '@types/prop-types@15.7.12': {} + '@types/prop-types@15.7.13': {} + '@types/react-dom@18.3.0': dependencies: '@types/react': 18.3.5 @@ -4913,6 +5205,8 @@ snapshots: dependencies: '@types/node': 22.5.2 + '@types/sortablejs@1.15.8': {} + '@types/trusted-types@2.0.7': {} '@types/unist@2.0.11': {} @@ -5267,7 +5561,7 @@ snapshots: axios@0.21.4: dependencies: - follow-redirects: 1.15.6 + follow-redirects: 1.15.9 transitivePeerDependencies: - debug @@ -5691,6 +5985,16 @@ snapshots: minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 + elliptic@6.6.0: + dependencies: + bn.js: 4.12.0 + brorand: 1.1.0 + hash.js: 1.1.7 + hmac-drbg: 1.0.1 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + emoji-regex@8.0.0: {} encode-utf8@1.0.3: {} @@ -5748,7 +6052,7 @@ snapshots: eth-lib@0.2.8: dependencies: bn.js: 4.12.0 - elliptic: 6.5.7 + elliptic: 6.6.0 xhr-request-promise: 0.1.3 eth-rpc-errors@4.0.3: @@ -5774,7 +6078,7 @@ snapshots: randombytes: 2.1.0 safe-buffer: 5.2.1 scrypt-js: 3.0.1 - secp256k1: 4.0.3 + secp256k1: 4.0.4 setimmediate: 1.0.5 ethereum-cryptography@2.2.1: @@ -5788,7 +6092,7 @@ snapshots: dependencies: bn.js: 4.12.0 create-hash: 1.2.0 - elliptic: 6.5.7 + elliptic: 6.6.0 ethereum-cryptography: 0.1.3 ethjs-util: 0.1.6 rlp: 2.2.7 @@ -5796,7 +6100,7 @@ snapshots: ethereumjs-util@7.1.5: dependencies: - '@types/bn.js': 5.1.5 + '@types/bn.js': 5.1.6 bn.js: 5.2.1 create-hash: 1.2.0 ethereum-cryptography: 0.1.3 @@ -5865,6 +6169,8 @@ snapshots: follow-redirects@1.15.6: {} + follow-redirects@1.15.9: {} + for-each@0.3.3: dependencies: is-callable: 1.2.7 @@ -6579,6 +6885,8 @@ snapshots: node-addon-api@2.0.2: {} + node-addon-api@5.1.0: {} + node-addon-api@7.1.1: {} node-fetch-native@1.6.4: {} @@ -7042,10 +7350,10 @@ snapshots: scrypt-js@3.0.1: {} - secp256k1@4.0.3: + secp256k1@4.0.4: dependencies: - elliptic: 6.5.7 - node-addon-api: 2.0.2 + elliptic: 6.6.0 + node-addon-api: 5.1.0 node-gyp-build: 4.8.2 semver@6.3.1: {} @@ -7099,6 +7407,8 @@ snapshots: dependencies: atomic-sleep: 1.0.0 + sortablejs@1.15.2: {} + source-map-js@1.2.0: {} source-map@0.5.7: {} @@ -7218,6 +7528,8 @@ snapshots: typescript@5.5.4: {} + typescript@5.6.3: {} + ufo@1.5.4: {} uint8arrays@3.1.0: @@ -7482,6 +7794,13 @@ snapshots: yocto-queue@0.1.0: {} + zustand@4.5.2(@types/react@18.3.5)(react@18.3.1): + dependencies: + use-sync-external-store: 1.2.0(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.5 + react: 18.3.1 + zustand@4.5.5(@types/react@18.3.5)(react@18.3.1): dependencies: use-sync-external-store: 1.2.2(react@18.3.1) diff --git a/frontend/src/app.tsx b/frontend/src/app.tsx index 1345bfe..3402bd0 100644 --- a/frontend/src/app.tsx +++ b/frontend/src/app.tsx @@ -1,12 +1,29 @@ +import { useEffect } from "react" import { Stack } from "@mui/joy" import { Outlet, ScrollRestoration } from "react-router-dom" +import { ModalPresenter, useModal } from "@levana-protocol/utils/modal" import { Navbar } from "@common/Navbar" import { Footer } from "@common/Footer" import { Geoblock } from "@common/Geoblock" -import { TermsDisclaimer } from "@common/TermsDisclaimer" +import { + TERMS_ACCEPTED_KEY, + TERMS_ACCEPTED_VALUE, + TermsDisclaimerModal, +} from "@common/TermsDisclaimerModal" +import { ConnectionModal } from "@common/ConnectionModal" const App = () => { + const { present } = useModal() + // biome-ignore lint/correctness/useExhaustiveDependencies: only do once + useEffect(() => { + const termsAccepted = + localStorage.getItem(TERMS_ACCEPTED_KEY) === TERMS_ACCEPTED_VALUE + if (!termsAccepted) { + present(TermsDisclaimerModal.name) + } + }, []) + return ( @@ -15,7 +32,14 @@ const App = () => {