├── .nvmrc ├── .prettierignore ├── src ├── components │ ├── App │ │ ├── index.ts │ │ ├── App.test.jsx │ │ └── App.tsx │ ├── Page │ │ ├── index.ts │ │ ├── Page.test.jsx │ │ └── Page.tsx │ ├── AppBar │ │ ├── index.ts │ │ └── AppBar.tsx │ ├── Drawer │ │ ├── index.ts │ │ └── Drawer.tsx │ ├── Footer │ │ ├── index.ts │ │ ├── Footer.test.jsx │ │ └── Footer.tsx │ ├── Layout │ │ ├── index.ts │ │ ├── Layout.test.jsx │ │ └── Layout.tsx │ ├── PageTitle │ │ ├── index.ts │ │ ├── PageTitle.test.jsx │ │ └── PageTitle.tsx │ ├── AddressChip │ │ ├── index.ts │ │ └── AddressChip.tsx │ ├── ClaimBanner │ │ ├── index.ts │ │ └── ClaimBanner.tsx │ ├── DialogTitle │ │ ├── index.ts │ │ └── DialogTitle.tsx │ ├── LinkPreview │ │ ├── index.ts │ │ └── LinkPreview.tsx │ ├── ThemeToggle │ │ ├── index.ts │ │ └── ThemeToggle.tsx │ ├── MySpacesList │ │ ├── index.ts │ │ └── MySpacesList.tsx │ ├── PageSubtitle │ │ ├── index.ts │ │ ├── PageSubtitle.test.jsx │ │ └── PageSubtitle.tsx │ ├── WhatIsASpace │ │ ├── index.ts │ │ └── WhatIsASpace.tsx │ ├── ActivityTable │ │ └── index.ts │ ├── ClaimedDialog │ │ ├── index.ts │ │ └── ClaimedDialog.tsx │ ├── ErrorBoundary │ │ ├── index.ts │ │ ├── ErrorBoundary.test.jsx │ │ └── ErrorBoundary.tsx │ ├── LifelineDialog │ │ ├── index.ts │ │ ├── LifelineDoneDialog.tsx │ │ └── LifelineDialog.tsx │ ├── MetaMaskSelect │ │ ├── index.ts │ │ └── MetaMaskSelect.tsx │ ├── MoveSpaceDialog │ │ ├── index.ts │ │ ├── MoveSpaceSuccessDialog.tsx │ │ └── MoveSpaceDialog.tsx │ ├── TypewrittingInput │ │ ├── index.ts │ │ └── TypewrittingInput.tsx │ ├── TransferFundsDialog │ │ ├── index.ts │ │ ├── NoFundsDialog.tsx │ │ └── TransferFundsSuccessDialog.tsx │ ├── DeleteKeyValueDialog │ │ ├── index.ts │ │ └── DeleteKeyValueDialog.tsx │ ├── KeyValueInput │ │ ├── index.ts │ │ ├── KeyValueInputEdit.tsx │ │ └── KeyValueInput.tsx │ └── README.md ├── vite-env.d.ts ├── theming │ ├── README.md │ ├── rainbowText.ts │ ├── customPalette.ts │ ├── palette.ts │ ├── purpleButton.ts │ ├── typography.ts │ ├── rainbowButton.ts │ ├── theme.ts │ └── overrides.ts ├── assets │ ├── activity.jpg │ ├── terminal.png │ ├── javascript.png │ ├── spaces-logo.png │ ├── nothing-here.jpg │ ├── whats-a-space.jpg │ ├── README.md │ ├── avax-logo-official.svg │ └── metamask-fox.svg ├── hooks │ ├── README.md │ ├── useThemeLocalStorage.ts │ ├── useThemeLocalStorage.test.jsx │ ├── useEventListener.ts │ └── useLocalStorage.ts ├── utils │ ├── shuffleArray.ts │ ├── verifyAddress.ts │ ├── numberUtils.ts │ ├── encoding.ts │ ├── obfuscateAddress.ts │ ├── detectOperatingSystem.ts │ ├── parseJSON.ts │ ├── typewritting.ts │ ├── setClipboard.ts │ ├── getMeta.ts │ ├── parseJSON.test.ts │ ├── tryNTimes.ts │ ├── calculateCost.ts │ └── spacesVM.ts ├── constants │ ├── README.md │ └── index.ts ├── pages │ ├── CustomSignature │ │ ├── SubmitButton.tsx │ │ └── CustomSignature.tsx │ ├── PingSpaces │ │ └── PingSpaces.tsx │ ├── Routes.tsx │ ├── Page404 │ │ └── Page404.tsx │ ├── KeyDetails │ │ └── KeyDetails.tsx │ └── SpaceDetails │ │ └── SpaceKeyValueRow.tsx ├── main.tsx ├── types │ └── index.ts ├── auto-imports.d.ts ├── test-utils.tsx └── providers │ └── MetaMaskProvider.tsx ├── .eslintignore ├── public ├── _headers ├── googledca5ff4666e43251.html ├── robots.txt ├── spaces_og.png └── spaces_og2.png ├── .gitignore ├── .editorconfig ├── .prettierrc ├── .vscode ├── extensions.json └── settings.json ├── __mocks__ ├── cssMock.js ├── svgMock.js ├── jest.setup.js └── api │ └── metrics.json ├── babel.config.js ├── .eslintrc-auto-import.json ├── auto-imports.d.ts ├── tsconfig.json ├── README.md ├── LICENSE ├── vite.config.ts ├── index.html ├── package.json ├── .eslintrc.js └── badges ├── coverage-lines.svg ├── coverage-branches.svg ├── coverage-functions.svg ├── coverage-statements.svg └── coverage-jest coverage.svg /.nvmrc: -------------------------------------------------------------------------------- 1 | v16 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | package.json 2 | -------------------------------------------------------------------------------- /src/components/App/index.ts: -------------------------------------------------------------------------------- 1 | export { App } from './App' 2 | -------------------------------------------------------------------------------- /src/components/Page/index.ts: -------------------------------------------------------------------------------- 1 | export { Page } from './Page' 2 | -------------------------------------------------------------------------------- /src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /src/components/AppBar/index.ts: -------------------------------------------------------------------------------- 1 | export { AppBar } from './AppBar' 2 | -------------------------------------------------------------------------------- /src/components/Drawer/index.ts: -------------------------------------------------------------------------------- 1 | export { Drawer } from './Drawer' 2 | -------------------------------------------------------------------------------- /src/components/Footer/index.ts: -------------------------------------------------------------------------------- 1 | export { Footer } from './Footer' 2 | -------------------------------------------------------------------------------- /src/components/Layout/index.ts: -------------------------------------------------------------------------------- 1 | export { Layout } from './Layout' 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | public 4 | 5 | /**/*.d.ts 6 | -------------------------------------------------------------------------------- /public/_headers: -------------------------------------------------------------------------------- 1 | https://:project.pages.dev/* 2 | X-Robots-Tag: noindex 3 | -------------------------------------------------------------------------------- /src/components/PageTitle/index.ts: -------------------------------------------------------------------------------- 1 | export { PageTitle } from './PageTitle' 2 | -------------------------------------------------------------------------------- /src/components/AddressChip/index.ts: -------------------------------------------------------------------------------- 1 | export { AddressChip } from './AddressChip' 2 | -------------------------------------------------------------------------------- /src/components/ClaimBanner/index.ts: -------------------------------------------------------------------------------- 1 | export { ClaimBanner } from './ClaimBanner' 2 | -------------------------------------------------------------------------------- /src/components/DialogTitle/index.ts: -------------------------------------------------------------------------------- 1 | export { DialogTitle } from './DialogTitle' 2 | -------------------------------------------------------------------------------- /src/components/LinkPreview/index.ts: -------------------------------------------------------------------------------- 1 | export { LinkPreview } from './LinkPreview' 2 | -------------------------------------------------------------------------------- /src/components/ThemeToggle/index.ts: -------------------------------------------------------------------------------- 1 | export { ThemeToggle } from './ThemeToggle' 2 | -------------------------------------------------------------------------------- /src/theming/README.md: -------------------------------------------------------------------------------- 1 | # Theming 2 | 3 | Minimal styling layer on top of MUI. 4 | -------------------------------------------------------------------------------- /public/googledca5ff4666e43251.html: -------------------------------------------------------------------------------- 1 | google-site-verification: googledca5ff4666e43251.html -------------------------------------------------------------------------------- /src/components/MySpacesList/index.ts: -------------------------------------------------------------------------------- 1 | export { MySpacesList } from './MySpacesList' 2 | -------------------------------------------------------------------------------- /src/components/PageSubtitle/index.ts: -------------------------------------------------------------------------------- 1 | export { PageSubtitle } from './PageSubtitle' 2 | -------------------------------------------------------------------------------- /src/components/WhatIsASpace/index.ts: -------------------------------------------------------------------------------- 1 | export { WhatIsASpace } from './WhatIsASpace' 2 | -------------------------------------------------------------------------------- /src/components/ActivityTable/index.ts: -------------------------------------------------------------------------------- 1 | export { ActivityTable } from './ActivityTable' 2 | -------------------------------------------------------------------------------- /src/components/ClaimedDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { ClaimedDialog } from './ClaimedDialog' 2 | -------------------------------------------------------------------------------- /src/components/ErrorBoundary/index.ts: -------------------------------------------------------------------------------- 1 | export { ErrorBoundary } from './ErrorBoundary' 2 | -------------------------------------------------------------------------------- /src/components/LifelineDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { LifelineDialog } from './LifelineDialog' 2 | -------------------------------------------------------------------------------- /src/components/MetaMaskSelect/index.ts: -------------------------------------------------------------------------------- 1 | export { MetaMaskSelect } from './MetaMaskSelect' 2 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /public/spaces_og.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ava-labs/spacesvm-js/HEAD/public/spaces_og.png -------------------------------------------------------------------------------- /public/spaces_og2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ava-labs/spacesvm-js/HEAD/public/spaces_og2.png -------------------------------------------------------------------------------- /src/components/MoveSpaceDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { MoveSpaceDialog } from './MoveSpaceDialog' 2 | -------------------------------------------------------------------------------- /src/assets/activity.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ava-labs/spacesvm-js/HEAD/src/assets/activity.jpg -------------------------------------------------------------------------------- /src/assets/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ava-labs/spacesvm-js/HEAD/src/assets/terminal.png -------------------------------------------------------------------------------- /src/components/TypewrittingInput/index.ts: -------------------------------------------------------------------------------- 1 | export { TypewrittingInput } from './TypewrittingInput' 2 | -------------------------------------------------------------------------------- /src/assets/javascript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ava-labs/spacesvm-js/HEAD/src/assets/javascript.png -------------------------------------------------------------------------------- /src/assets/spaces-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ava-labs/spacesvm-js/HEAD/src/assets/spaces-logo.png -------------------------------------------------------------------------------- /src/components/TransferFundsDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { TransferFundsDialog } from './TransferFundsDialog' 2 | -------------------------------------------------------------------------------- /src/hooks/README.md: -------------------------------------------------------------------------------- 1 | # Hooks 2 | 3 | Everything should be re-exported from the `hoos/index.ts` file. 4 | -------------------------------------------------------------------------------- /src/assets/nothing-here.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ava-labs/spacesvm-js/HEAD/src/assets/nothing-here.jpg -------------------------------------------------------------------------------- /src/assets/whats-a-space.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ava-labs/spacesvm-js/HEAD/src/assets/whats-a-space.jpg -------------------------------------------------------------------------------- /src/components/DeleteKeyValueDialog/index.ts: -------------------------------------------------------------------------------- 1 | export { DeleteKeyValueDialog } from './DeleteKeyValueDialog' 2 | -------------------------------------------------------------------------------- /src/utils/shuffleArray.ts: -------------------------------------------------------------------------------- 1 | export const shuffleArray = (arr: any[]): any[] => arr.sort(() => Math.random() - 0.5) 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | dist 4 | dist-ssr 5 | *.local 6 | stats.html 7 | coverage 8 | yarn-error.log 9 | -------------------------------------------------------------------------------- /src/utils/verifyAddress.ts: -------------------------------------------------------------------------------- 1 | export const isValidWalletAddress = (address: string) => /^0x[a-fA-F0-9]{40}$/.test(address) 2 | -------------------------------------------------------------------------------- /src/utils/numberUtils.ts: -------------------------------------------------------------------------------- 1 | export const numberWithCommas = (num: number) => num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') 2 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | charset = utf-8 6 | indent_style = tab 7 | indent_size = 2 8 | insert_final_newline = true -------------------------------------------------------------------------------- /src/assets/README.md: -------------------------------------------------------------------------------- 1 | # Assets 2 | 3 | Here goes anything that's can be directly linked as an asset. 4 | 5 | - Logos 6 | - Favicons 7 | - Fonts 8 | -------------------------------------------------------------------------------- /src/components/KeyValueInput/index.ts: -------------------------------------------------------------------------------- 1 | export { KeyValueInput } from './KeyValueInput' 2 | export { KeyValueInputEdit } from './KeyValueInputEdit' 3 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "trailingComma": "all", 4 | "tabWidth": 2, 5 | "singleQuote": true, 6 | "printWidth": 120, 7 | "useTabs": true 8 | } -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "esbenp.prettier-vscode", 4 | "dbaeumer.vscode-eslint", 5 | "EditorConfig.EditorConfig" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /src/constants/README.md: -------------------------------------------------------------------------------- 1 | # Constants 2 | 3 | Any constant that can be used in multiple places. 4 | 5 | - localStorage keys 6 | - global layout variables 7 | - global colors 8 | - generic constants 9 | -------------------------------------------------------------------------------- /src/utils/encoding.ts: -------------------------------------------------------------------------------- 1 | export const utf8_to_b64 = (str: string) => btoa(unescape(encodeURIComponent(str))) 2 | 3 | export const b64_to_utf8 = (str: string) => decodeURIComponent(escape(atob(str))) 4 | -------------------------------------------------------------------------------- /__mocks__/cssMock.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | process() { 3 | return 'module.exports = {};' 4 | }, 5 | getCacheKey() { 6 | // The output is always the same. 7 | return 'cssTransform' 8 | }, 9 | } 10 | -------------------------------------------------------------------------------- /__mocks__/svgMock.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | process() { 3 | return 'module.exports = {};' 4 | }, 5 | getCacheKey() { 6 | // The output is always the same. 7 | return 'svgTransform' 8 | }, 9 | } 10 | -------------------------------------------------------------------------------- /src/components/README.md: -------------------------------------------------------------------------------- 1 | # Components 2 | 3 | Our components. 4 | 5 | Here's a little overview of the components we have: 6 | 7 | ## AreaChart 8 | 9 | TODO 10 | 11 | ## LineChart 12 | 13 | TODO 14 | -------------------------------------------------------------------------------- /src/components/App/App.test.jsx: -------------------------------------------------------------------------------- 1 | import { render } from '@testing-library/react' 2 | 3 | import { App } from './App' 4 | 5 | it('renders document.body', () => { 6 | render() 7 | 8 | expect(document.body).toBeInTheDocument() 9 | }) 10 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Make import.meta work with jest... 3 | plugins: [ 4 | () => ({ 5 | visitor: { 6 | MetaProperty(path) { 7 | path.replaceWithSourceString('process') 8 | }, 9 | }, 10 | }), 11 | ], 12 | } 13 | -------------------------------------------------------------------------------- /src/pages/CustomSignature/SubmitButton.tsx: -------------------------------------------------------------------------------- 1 | import { Button, styled } from '@mui/material' 2 | 3 | import { purpleButton } from '@/theming/purpleButton' 4 | 5 | export const SubmitButton = styled(Button)(({ theme }: any) => ({ 6 | ...purpleButton(theme), 7 | })) 8 | -------------------------------------------------------------------------------- /src/main.tsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react' 2 | import ReactDOM from 'react-dom' 3 | 4 | import { App } from '@/components/App' 5 | 6 | ReactDOM.render( 7 | 8 | 9 | , 10 | document.getElementById('root'), 11 | ) 12 | -------------------------------------------------------------------------------- /src/utils/obfuscateAddress.ts: -------------------------------------------------------------------------------- 1 | export const obfuscateAddress = (str?: string): string => { 2 | if (str) { 3 | const firstChars = str.substr(0, 5) 4 | const lastChars = str.substr(-4) 5 | return `${firstChars}...${lastChars}` 6 | } 7 | 8 | return '' 9 | } 10 | -------------------------------------------------------------------------------- /src/components/Layout/Layout.test.jsx: -------------------------------------------------------------------------------- 1 | import { render } from './../../test-utils' 2 | import { Layout } from './Layout' 3 | 4 | it('renders children', () => { 5 | const { getByText } = render(hello) 6 | 7 | expect(getByText(/hello/i)).toBeInTheDocument() 8 | }) 9 | -------------------------------------------------------------------------------- /src/components/PageTitle/PageTitle.test.jsx: -------------------------------------------------------------------------------- 1 | import { render } from './../../test-utils' 2 | import { PageTitle } from './PageTitle' 3 | 4 | it('renders children', () => { 5 | const { getByText } = render(hello) 6 | 7 | expect(getByText(/hello/i)).toBeInTheDocument() 8 | }) 9 | -------------------------------------------------------------------------------- /.eslintrc-auto-import.json: -------------------------------------------------------------------------------- 1 | { 2 | "globals": { 3 | "createContext": true, 4 | "memo": true, 5 | "useCallback": true, 6 | "useContext": true, 7 | "useEffect": true, 8 | "useMemo": true, 9 | "useReducer": true, 10 | "useRef": true, 11 | "useState": true 12 | } 13 | } -------------------------------------------------------------------------------- /src/components/PageSubtitle/PageSubtitle.test.jsx: -------------------------------------------------------------------------------- 1 | import { render } from './../../test-utils' 2 | import { PageSubtitle } from './PageSubtitle' 3 | 4 | it('renders children', () => { 5 | const { getByText } = render(hello) 6 | 7 | expect(getByText(/hello/i)).toBeInTheDocument() 8 | }) 9 | -------------------------------------------------------------------------------- /src/components/Footer/Footer.test.jsx: -------------------------------------------------------------------------------- 1 | import { render } from './../../test-utils' 2 | import { Footer } from './Footer' 3 | 4 | it('renders copyright text', () => { 5 | const { getByText } = render(