create-near-app 6.0.0-beta.2 → 6.0.0-beta.3
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.
- package/dist/app.js +6 -11
- package/dist/make.js +44 -81
- package/dist/messages.js +31 -23
- package/dist/package-json.js +16 -16
- package/dist/tracking.js +1 -1
- package/dist/types.js +5 -4
- package/dist/user-input.js +81 -89
- package/package.json +1 -1
- package/templates/contracts/{rust → rs}/Cargo.toml +0 -3
- package/templates/contracts/{rust → rs}/README.md +14 -5
- package/templates/contracts/rs/build.sh +3 -0
- package/templates/contracts/rs/deploy.sh +2 -0
- package/templates/contracts/{rust → rs}/src/lib.rs +4 -6
- package/templates/contracts/rs/test-rs.sh +9 -0
- package/templates/contracts/rs/test-ts.sh +10 -0
- package/templates/contracts/{js → ts}/README.md +1 -0
- package/templates/contracts/ts/package.json +20 -0
- package/templates/frontend/next/.eslintrc.json +3 -0
- package/templates/frontend/next/README.md +36 -0
- package/templates/frontend/next/jsconfig.json +7 -0
- package/templates/frontend/next/next.config.js +6 -0
- package/templates/frontend/next/package.json +40 -0
- package/templates/frontend/next/public/near-logo.svg +43 -0
- package/templates/frontend/next/public/near.svg +1 -0
- package/templates/frontend/next/src/app/app.module.css +228 -0
- package/templates/frontend/next/src/app/globals.css +95 -0
- package/templates/frontend/next/src/app/hello-components/page.js +44 -0
- package/templates/frontend/next/src/app/hello-near/page.js +64 -0
- package/templates/frontend/next/src/app/layout.js +22 -0
- package/templates/frontend/next/src/app/page.js +37 -0
- package/templates/frontend/next/src/components/cards.js +46 -0
- package/templates/frontend/next/src/components/navigation.js +36 -0
- package/templates/frontend/next/src/components/vm-component.js +26 -0
- package/templates/frontend/next/src/config.js +21 -0
- package/templates/frontend/next/src/wallets/wallet-selector.js +128 -0
- package/templates/frontend/{gateway/src/data/web3.ts → next/src/wallets/web3-wallet.ts} +4 -7
- package/templates/frontend/vanilla/.babelrc +7 -0
- package/templates/frontend/vanilla/package.json +27 -13
- package/templates/frontend/vanilla/{assets → src/assets}/global.css +25 -56
- package/templates/frontend/vanilla/src/components.html +61 -0
- package/templates/frontend/vanilla/src/components.js +63 -0
- package/templates/frontend/vanilla/src/hello-near.html +80 -0
- package/templates/frontend/vanilla/src/hello.js +61 -0
- package/templates/frontend/vanilla/src/index.html +65 -0
- package/templates/frontend/vanilla/{near-wallet.js → src/near-wallet.js} +20 -18
- package/templates/frontend/vanilla/webpack.config.js +79 -0
- package/templates/{integration-tests/rust-tests → sandbox-tests/sandbox-rs}/Cargo.toml +5 -5
- package/templates/{integration-tests/js-tests → sandbox-tests/sandbox-ts}/package.json +6 -6
- package/templates/contracts/js/build.sh +0 -5
- package/templates/contracts/js/deploy.sh +0 -18
- package/templates/contracts/js/package.json +0 -19
- package/templates/contracts/rust/build.sh +0 -6
- package/templates/contracts/rust/deploy.sh +0 -18
- package/templates/frontend/gateway/.env +0 -1
- package/templates/frontend/gateway/.nvmrc +0 -1
- package/templates/frontend/gateway/.prettierrc +0 -6
- package/templates/frontend/gateway/next.config.js +0 -15
- package/templates/frontend/gateway/package.json +0 -74
- package/templates/frontend/gateway/public/apple-touch-icon.png +0 -0
- package/templates/frontend/gateway/public/bos-meta.png +0 -0
- package/templates/frontend/gateway/public/favicon.png +0 -0
- package/templates/frontend/gateway/public/fonts/FKGrotesk.woff2 +0 -0
- package/templates/frontend/gateway/public/fonts/Mona-Sans.woff2 +0 -0
- package/templates/frontend/gateway/public/logo192.png +0 -0
- package/templates/frontend/gateway/public/robots.txt +0 -3
- package/templates/frontend/gateway/public/site.webmanifest +0 -8
- package/templates/frontend/gateway/src/assets/images/near-icon.svg +0 -3
- package/templates/frontend/gateway/src/components/MetaTags.tsx +0 -22
- package/templates/frontend/gateway/src/components/component/ComponentWrapperPage.tsx +0 -27
- package/templates/frontend/gateway/src/components/layouts/DefaultLayout.tsx +0 -16
- package/templates/frontend/gateway/src/components/layouts/SimpleLayout.tsx +0 -9
- package/templates/frontend/gateway/src/components/lib/Button/Button.tsx +0 -379
- package/templates/frontend/gateway/src/components/lib/Button/index.tsx +0 -1
- package/templates/frontend/gateway/src/components/lib/Spinner/Spinner.tsx +0 -33
- package/templates/frontend/gateway/src/components/lib/Spinner/index.ts +0 -1
- package/templates/frontend/gateway/src/components/lib/Text/Text.tsx +0 -14
- package/templates/frontend/gateway/src/components/lib/Text/index.tsx +0 -1
- package/templates/frontend/gateway/src/components/lib/Toast/README.md +0 -83
- package/templates/frontend/gateway/src/components/lib/Toast/Toast.tsx +0 -25
- package/templates/frontend/gateway/src/components/lib/Toast/Toaster.tsx +0 -48
- package/templates/frontend/gateway/src/components/lib/Toast/api.ts +0 -6
- package/templates/frontend/gateway/src/components/lib/Toast/index.ts +0 -3
- package/templates/frontend/gateway/src/components/lib/Toast/store.ts +0 -83
- package/templates/frontend/gateway/src/components/lib/Toast/styles.ts +0 -126
- package/templates/frontend/gateway/src/components/navigation/Navigation.tsx +0 -23
- package/templates/frontend/gateway/src/components/navigation/UserDropdownMenu.tsx +0 -209
- package/templates/frontend/gateway/src/components/navigation/desktop/DesktopNavigation.tsx +0 -109
- package/templates/frontend/gateway/src/components/navigation/desktop/MainNavigationMenu.tsx +0 -170
- package/templates/frontend/gateway/src/components/navigation/icons/close.svg +0 -22
- package/templates/frontend/gateway/src/components/navigation/icons/near-icon.svg +0 -3
- package/templates/frontend/gateway/src/components/navigation/icons/near-logo.svg +0 -14
- package/templates/frontend/gateway/src/components/navigation/icons/return.svg +0 -29
- package/templates/frontend/gateway/src/components/navigation/icons/search.svg +0 -3
- package/templates/frontend/gateway/src/components/navigation/mobile/AccordionMenu.tsx +0 -141
- package/templates/frontend/gateway/src/components/navigation/mobile/Menu.tsx +0 -86
- package/templates/frontend/gateway/src/components/navigation/mobile/MobileNavigation.tsx +0 -131
- package/templates/frontend/gateway/src/components/navigation/navigation-categories.ts +0 -75
- package/templates/frontend/gateway/src/components/vm/VmCommitButton.tsx +0 -20
- package/templates/frontend/gateway/src/components/vm/VmComponent.tsx +0 -29
- package/templates/frontend/gateway/src/components/vm/VmInitializer.tsx +0 -124
- package/templates/frontend/gateway/src/data/components.ts +0 -50
- package/templates/frontend/gateway/src/hooks/useBosComponents.ts +0 -14
- package/templates/frontend/gateway/src/hooks/useBosLoaderInitializer.ts +0 -60
- package/templates/frontend/gateway/src/hooks/useFlags.ts +0 -40
- package/templates/frontend/gateway/src/hooks/useLayout.tsx +0 -12
- package/templates/frontend/gateway/src/index.d.ts +0 -9
- package/templates/frontend/gateway/src/pages/_app.tsx +0 -47
- package/templates/frontend/gateway/src/pages/_document.tsx +0 -27
- package/templates/frontend/gateway/src/pages/dig.tsx +0 -25
- package/templates/frontend/gateway/src/pages/flags.tsx +0 -83
- package/templates/frontend/gateway/src/pages/hello-api.tsx +0 -105
- package/templates/frontend/gateway/src/pages/hello-component.tsx +0 -23
- package/templates/frontend/gateway/src/pages/hello-ethereum.tsx +0 -23
- package/templates/frontend/gateway/src/pages/hello-social.tsx +0 -31
- package/templates/frontend/gateway/src/pages/index.tsx +0 -51
- package/templates/frontend/gateway/src/pages/nui.tsx +0 -25
- package/templates/frontend/gateway/src/stores/auth.ts +0 -29
- package/templates/frontend/gateway/src/stores/bos-loader.ts +0 -20
- package/templates/frontend/gateway/src/stores/current-component.ts +0 -11
- package/templates/frontend/gateway/src/stores/vm.ts +0 -24
- package/templates/frontend/gateway/src/styles/globals.css +0 -68
- package/templates/frontend/gateway/src/styles/theme.css +0 -129
- package/templates/frontend/gateway/src/utils/config.ts +0 -49
- package/templates/frontend/gateway/src/utils/form-validation.ts +0 -18
- package/templates/frontend/gateway/src/utils/keypom-options.ts +0 -59
- package/templates/frontend/gateway/src/utils/route/privateRoute.tsx +0 -20
- package/templates/frontend/gateway/src/utils/route/signedOutRoute.tsx +0 -21
- package/templates/frontend/gateway/src/utils/types.ts +0 -33
- package/templates/frontend/gateway/tsconfig.json +0 -24
- package/templates/frontend/vanilla/.env +0 -1
- package/templates/frontend/vanilla/index.html +0 -97
- package/templates/frontend/vanilla/index.js +0 -70
- package/templates/shared/template.gitignore +0 -31
- /package/templates/contracts/{rust → rs}/.cargo/config +0 -0
- /package/templates/contracts/{rust → rs}/rust-toolchain.toml +0 -0
- /package/templates/contracts/{js → ts}/package-lock.json +0 -0
- /package/templates/contracts/{js → ts}/src/contract.ts +0 -0
- /package/templates/contracts/{js → ts}/tsconfig.json +0 -0
- /package/templates/frontend/{gateway → next}/public/next.svg +0 -0
- /package/templates/frontend/{gateway → next}/public/vercel.svg +0 -0
- /package/templates/frontend/{gateway/public → next/src/app}/favicon.ico +0 -0
- /package/templates/{shared → frontend/vanilla}/.gitpod.yml +0 -0
- /package/templates/{shared → frontend/vanilla}/README.md +0 -0
- /package/templates/frontend/vanilla/{assets → src/assets}/favicon.ico +0 -0
- /package/templates/frontend/vanilla/{assets → src/assets}/logo-black.svg +0 -0
- /package/templates/frontend/vanilla/{assets → src/assets}/logo-white.svg +0 -0
- /package/templates/{integration-tests/rust-tests → sandbox-tests/sandbox-rs}/src/tests.rs +0 -0
- /package/templates/{integration-tests/js-tests → sandbox-tests/sandbox-ts}/ava.config.cjs +0 -0
- /package/templates/{integration-tests/js-tests → sandbox-tests/sandbox-ts}/package-lock.json +0 -0
- /package/templates/{integration-tests/js-tests → sandbox-tests/sandbox-ts}/src/main.ava.ts +0 -0
|
@@ -42,14 +42,23 @@ impl Contract {
|
|
|
42
42
|
|
|
43
43
|
<br />
|
|
44
44
|
|
|
45
|
-
## 1. Build and Deploy
|
|
46
|
-
|
|
45
|
+
## 1. Build, Test and Deploy
|
|
46
|
+
To build the contract you can execute the `./build.sh` script, which will in turn run:
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
|
|
49
|
+
rustup target add wasm32-unknown-unknown
|
|
50
|
+
cargo build --target wasm32-unknown-unknown --release
|
|
50
51
|
```
|
|
51
52
|
|
|
52
|
-
|
|
53
|
+
Then, run the `./deploy.sh` script, which will in turn run:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
near dev-deploy --wasmFile ./target/wasm32-unknown-unknown/release/hello_near.wasm
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
the command [`near dev-deploy`](https://docs.near.org/tools/near-cli#near-dev-deploy) automatically creates an account in the NEAR testnet, and deploys the compiled contract on it.
|
|
60
|
+
|
|
61
|
+
Once finished, check the `./neardev/dev-account` file to find the address in which the contract was deployed:
|
|
53
62
|
|
|
54
63
|
```bash
|
|
55
64
|
cat ./neardev/dev-account
|
|
@@ -74,7 +83,7 @@ near view <dev-account> get_greeting
|
|
|
74
83
|
## 3. Store a New Greeting
|
|
75
84
|
`set_greeting` changes the contract's state, for which it is a `change` method.
|
|
76
85
|
|
|
77
|
-
`Change` methods can only be invoked using a NEAR account, since the account needs to pay GAS for the transaction.
|
|
86
|
+
`Change` methods can only be invoked using a NEAR account, since the account needs to pay GAS for the transaction. In this case, we are asking the account we created in step 1 to sign the transaction.
|
|
78
87
|
|
|
79
88
|
```bash
|
|
80
89
|
# Use near-cli to set a new greeting
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
// Find all our documentation at https://docs.near.org
|
|
2
2
|
use near_sdk::borsh::{self, BorshDeserialize, BorshSerialize};
|
|
3
|
-
use near_sdk::
|
|
4
|
-
|
|
5
|
-
// Define the default greeting
|
|
6
|
-
const DEFAULT_GREETING: &str = "Hello";
|
|
3
|
+
use near_sdk::env::log_str;
|
|
4
|
+
use near_sdk::near_bindgen;
|
|
7
5
|
|
|
8
6
|
// Define the contract structure
|
|
9
7
|
#[near_bindgen]
|
|
@@ -15,7 +13,7 @@ pub struct Contract {
|
|
|
15
13
|
// Define the default, which automatically initializes the contract
|
|
16
14
|
impl Default for Contract {
|
|
17
15
|
fn default() -> Self {
|
|
18
|
-
Self { greeting:
|
|
16
|
+
Self { greeting: "Hello".to_string() }
|
|
19
17
|
}
|
|
20
18
|
}
|
|
21
19
|
|
|
@@ -29,7 +27,7 @@ impl Contract {
|
|
|
29
27
|
|
|
30
28
|
// Public method - accepts a greeting, such as "howdy", and records it
|
|
31
29
|
pub fn set_greeting(&mut self, greeting: String) {
|
|
32
|
-
|
|
30
|
+
log_str(&format!("Saving greeting: {greeting}"));
|
|
33
31
|
self.greeting = greeting;
|
|
34
32
|
}
|
|
35
33
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hello_near",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"license": "(MIT AND Apache-2.0)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "near-sdk-js build src/contract.ts build/hello_near.wasm",
|
|
8
|
+
"deploy": "near dev-deploy --wasmFile build/hello_near.wasm",
|
|
9
|
+
"test": "cd sandbox-ts && $npm_execpath run test -- -- ../build/hello_near.wasm",
|
|
10
|
+
"postinstall": "cd sandbox-ts && $npm_execpath i"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"near-cli": "^3.4.2",
|
|
14
|
+
"near-sdk-js": "1.0.0"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"typescript": "^5.2.2",
|
|
18
|
+
"ts-morph": "^20.0.0"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
|
2
|
+
|
|
3
|
+
## Getting Started
|
|
4
|
+
|
|
5
|
+
First, run the development server:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm run dev
|
|
9
|
+
# or
|
|
10
|
+
yarn dev
|
|
11
|
+
# or
|
|
12
|
+
pnpm dev
|
|
13
|
+
# or
|
|
14
|
+
bun dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
|
18
|
+
|
|
19
|
+
You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.
|
|
20
|
+
|
|
21
|
+
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
|
|
22
|
+
|
|
23
|
+
## Learn More
|
|
24
|
+
|
|
25
|
+
To learn more about Next.js, take a look at the following resources:
|
|
26
|
+
|
|
27
|
+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
|
28
|
+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
|
29
|
+
|
|
30
|
+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
|
|
31
|
+
|
|
32
|
+
## Deploy on Vercel
|
|
33
|
+
|
|
34
|
+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
|
35
|
+
|
|
36
|
+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hello-near",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "next dev",
|
|
7
|
+
"build": "next build",
|
|
8
|
+
"start": "next start",
|
|
9
|
+
"lint": "next lint"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@near-wallet-selector/core": "^8.5.1",
|
|
13
|
+
"@near-wallet-selector/here-wallet": "^8.5.1",
|
|
14
|
+
"@near-wallet-selector/modal-ui": "^8.5.1",
|
|
15
|
+
"@near-wallet-selector/my-near-wallet": "^8.5.1",
|
|
16
|
+
"@web3-onboard/core": "^2.20.2",
|
|
17
|
+
"@web3-onboard/injected-wallets": "^2.10.1",
|
|
18
|
+
"@web3-onboard/ledger": "^2.4.6",
|
|
19
|
+
"@web3-onboard/react": "^2.8.7",
|
|
20
|
+
"@web3-onboard/walletconnect": "^2.3.9",
|
|
21
|
+
"base64-js": "^1.5.1",
|
|
22
|
+
"bootstrap": "^5.3.2",
|
|
23
|
+
"bootstrap-icons": "^1.11.1",
|
|
24
|
+
"ieee754": "^1.2.1",
|
|
25
|
+
"near-api-js": "^2.1.4",
|
|
26
|
+
"near-social-vm": "github:NearSocial/VM#2.5.2",
|
|
27
|
+
"next": "14.0.1",
|
|
28
|
+
"pino-pretty": "^10.2.3",
|
|
29
|
+
"react": "^18",
|
|
30
|
+
"react-bootstrap": "2.9.1",
|
|
31
|
+
"react-bootstrap-icons": "^1.10.3",
|
|
32
|
+
"react-dom": "^18",
|
|
33
|
+
"react-singleton-hook": "^4.0.1",
|
|
34
|
+
"zustand": "^4.4.4"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"eslint": "^8.53",
|
|
38
|
+
"eslint-config-next": "14.0.1"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
width="26.707293"
|
|
4
|
+
height="26.619026"
|
|
5
|
+
viewBox="0 0 26.707293 26.619026"
|
|
6
|
+
fill="none"
|
|
7
|
+
version="1.1"
|
|
8
|
+
id="svg196"
|
|
9
|
+
sodipodi:docname="near-logo.svg"
|
|
10
|
+
inkscape:version="1.2.1 (9c6d41e, 2022-07-14)"
|
|
11
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
12
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
|
15
|
+
<sodipodi:namedview
|
|
16
|
+
id="namedview198"
|
|
17
|
+
pagecolor="#ffffff"
|
|
18
|
+
bordercolor="#000000"
|
|
19
|
+
borderopacity="0.25"
|
|
20
|
+
inkscape:showpageshadow="2"
|
|
21
|
+
inkscape:pageopacity="0.0"
|
|
22
|
+
inkscape:pagecheckerboard="0"
|
|
23
|
+
inkscape:deskcolor="#d1d1d1"
|
|
24
|
+
showgrid="false"
|
|
25
|
+
inkscape:zoom="4.305628"
|
|
26
|
+
inkscape:cx="52.721693"
|
|
27
|
+
inkscape:cy="16.025537"
|
|
28
|
+
inkscape:window-width="1403"
|
|
29
|
+
inkscape:window-height="430"
|
|
30
|
+
inkscape:window-x="0"
|
|
31
|
+
inkscape:window-y="25"
|
|
32
|
+
inkscape:window-maximized="0"
|
|
33
|
+
inkscape:current-layer="svg196" />
|
|
34
|
+
<g
|
|
35
|
+
clip-path="url(#clip0_1_1899)"
|
|
36
|
+
id="g192"
|
|
37
|
+
transform="translate(-0.217407,-0.690475)">
|
|
38
|
+
<path
|
|
39
|
+
d="m 24.079,0.690475 c -0.9891,0 -1.9075,0.511145 -2.4256,1.351425 l -5.5825,8.261 c -0.1819,0.2723 -0.1081,0.6393 0.1651,0.8206 0.2214,0.1471 0.5143,0.1289 0.716,-0.044 l 5.495,-4.75049 c 0.0913,-0.0819 0.232,-0.07356 0.3142,0.01744 0.0373,0.04171 0.0571,0.09556 0.0571,0.15092 V 21.3707 c 0,0.1228 -0.0997,0.2214 -0.223,0.2214 -0.0662,0 -0.1285,-0.0288 -0.1704,-0.0796 L 5.81436,1.69457 C 5.27339,1.05829 4.47904,0.691234 3.64284,0.690475 H 3.0623 C 1.4911,0.690475 0.217407,1.96 0.217407,3.52605 V 24.4739 c 0,1.5661 1.273693,2.8356 2.844893,2.8356 0.98913,0 1.9075,-0.5111 2.42565,-1.3514 l 5.58255,-8.261 c 0.1818,-0.2723 0.108,-0.6393 -0.1652,-0.8206 -0.2214,-0.1471 -0.5143,-0.1289 -0.7159,0.044 L 4.69436,21.671 C 4.60306,21.7529 4.4623,21.7445 4.38013,21.6535 4.34284,21.6118 4.32306,21.558 4.32382,21.5026 V 6.62554 c 0,-0.12286 0.09967,-0.22145 0.22293,-0.22145 0.06544,0 0.12859,0.02882 0.17044,0.07963 L 21.3255,26.3054 c 0.5409,0.6363 1.3353,1.0034 2.1715,1.0041 h 0.5805 c 1.5712,8e-4 2.8457,-1.268 2.8472,-2.834 V 3.52605 C 26.9247,1.96 25.651,0.690475 24.0798,0.690475 Z"
|
|
40
|
+
fill="#000000"
|
|
41
|
+
id="path190" />
|
|
42
|
+
</g>
|
|
43
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="110" height="28" viewBox="0 0 110 28" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1_1899)"><path d="M45.5211 4.46114C43.4964 4.46114 42.0241 4.93816 40.7733 6.03856L38.5644 7.94588C38.3803 8.09301 38.0121 8.20297 37.7549 7.98228C37.4969 7.76235 37.4604 7.46886 37.6811 7.17537L38.8589 5.41442C39.043 5.15733 38.8962 4.82743 38.5644 4.82743H35.7302C35.3992 4.82743 35.1413 5.08452 35.1413 5.41442V22.5841C35.1413 22.914 35.3992 23.1711 35.7302 23.1711H38.6748C39.0058 23.1711 39.2637 22.914 39.2637 22.5841V12.8988C39.2637 8.46006 42.9813 7.76311 44.3798 7.76311C47.3609 7.76311 48.4284 9.89112 48.4284 11.5049V22.5841C48.4284 22.914 48.6863 23.1711 49.0173 23.1711H51.9618C52.2928 23.1711 52.5508 22.914 52.5508 22.5841V11.1379C52.5508 7.029 49.8634 4.46114 45.5203 4.46114H45.5211Z" fill="black"/><path d="M64.5489 4.38757C58.8439 4.38757 55.2001 7.87307 55.2001 12.6053V15.2104C55.2001 20.1997 58.8439 23.6117 64.5489 23.6117C69.5912 23.6117 73.1246 21.0067 73.4929 17.4848C73.5302 17.1177 73.2723 16.8614 72.904 16.8614H70.0332C69.7753 16.8614 69.5546 17.0085 69.4808 17.2648C69.1126 18.4388 67.3831 20.1997 64.5489 20.1997C61.7146 20.1997 59.0645 18.1453 59.1011 15.2104L59.1383 11.9456C59.1749 9.48766 61.7519 7.80027 64.5489 7.80027C67.0887 7.80027 69.5546 9.23133 69.8118 11.5793C69.8331 11.8508 69.6459 12.0957 69.3774 12.1473L61.125 13.7437C60.794 13.8172 60.5361 14.1107 60.5361 14.477V14.5134C60.5361 14.8433 60.867 15.1368 61.3456 15.1368H73.1977C73.5233 15.1368 73.7866 14.8737 73.7866 14.5498V12.2391C73.7866 7.87383 69.9952 4.38833 64.5481 4.38833L64.5489 4.38757Z" fill="black"/><path d="M85.0863 4.38757C80.4853 4.38757 76.5105 7.0654 76.5105 10.5873C76.5105 10.8808 76.7685 11.1007 77.0994 11.1007H80.0805C80.375 11.1007 80.5956 10.8808 80.6329 10.5873C80.9274 8.97348 82.8782 7.79951 84.976 7.79951C87.4785 7.79951 89.1722 9.34053 89.1722 11.982V15.174C89.1722 18.4388 86.7427 20.0898 83.7243 20.0898C81.3687 20.0898 80.0067 19.2093 80.0067 17.7782C80.0067 16.5307 80.6694 15.4667 83.3926 14.8433L87.3309 13.7793C87.7356 13.6693 87.8832 13.3387 87.8094 12.9724C87.7729 12.6789 87.4419 12.5318 87.1467 12.5318H83.0616C79.6019 12.5318 76.105 14.7326 76.105 17.961V18.4744C76.105 21.7764 79.2337 23.5002 82.8037 23.5002C85.0855 23.5002 87.0364 22.6197 88.2507 21.5929L90.0548 20.0519C90.3492 19.7948 90.6437 19.7948 90.9008 20.0519C91.1215 20.2718 91.0477 20.6024 90.8636 20.8588L89.7595 22.5833C89.5754 22.8404 89.7223 23.1703 90.054 23.1703H92.7041C93.0351 23.1703 93.293 22.9132 93.293 22.5833V11.467C93.293 7.21177 90.2381 4.38681 85.0848 4.38681L85.0863 4.38757Z" fill="black"/><path d="M109.194 4.82819H105.071C103.636 4.82819 102.237 5.70866 101.243 6.55274L99.6243 7.94663C99.4401 8.09376 99.1084 8.20372 98.8877 8.0202C98.6298 7.83667 98.5195 7.46962 98.7409 7.17612L99.9187 5.41517C100.103 5.15808 99.956 4.82819 99.6243 4.82819H96.8638C96.5328 4.82819 96.2749 5.08528 96.2749 5.41517V22.5848C96.2749 22.9147 96.5328 23.1718 96.8638 23.1718H99.8822C100.213 23.1718 100.471 22.9147 100.471 22.5848V13.7801C100.471 10.0011 102.017 8.31369 105.367 8.31369H109.194C109.525 8.31369 109.783 8.0566 109.783 7.7267V5.41517C109.783 5.08528 109.525 4.82819 109.194 4.82819H109.194Z" fill="black"/><path d="M24.079 0.690475C23.0899 0.690475 22.1715 1.20162 21.6534 2.0419L16.0709 10.3029C15.889 10.5752 15.9628 10.9422 16.236 11.1235C16.4574 11.2706 16.7503 11.2524 16.952 11.0795L22.447 6.32901C22.5383 6.24711 22.679 6.25545 22.7612 6.34645C22.7985 6.38816 22.8183 6.44201 22.8183 6.49737V21.3707C22.8183 21.4935 22.7186 21.5921 22.5953 21.5921C22.5291 21.5921 22.4668 21.5633 22.4249 21.5125L5.81436 1.69457C5.27339 1.05829 4.47904 0.691234 3.64284 0.690475H3.0623C1.4911 0.690475 0.217407 1.96 0.217407 3.52605V24.4739C0.217407 26.04 1.4911 27.3095 3.0623 27.3095C4.05143 27.3095 4.9698 26.7984 5.48795 25.9581L11.0705 17.6971C11.2523 17.4248 11.1785 17.0578 10.9053 16.8765C10.6839 16.7294 10.391 16.7476 10.1894 16.9205L4.69436 21.671C4.60306 21.7529 4.4623 21.7445 4.38013 21.6535C4.34284 21.6118 4.32306 21.558 4.32382 21.5026V6.62554C4.32382 6.50268 4.42349 6.40409 4.54675 6.40409C4.61219 6.40409 4.67534 6.43291 4.71719 6.48372L21.3255 26.3054C21.8664 26.9417 22.6608 27.3088 23.497 27.3095H24.0775C25.6487 27.3103 26.9232 26.0415 26.9247 24.4755V3.52605C26.9247 1.96 25.651 0.690475 24.0798 0.690475H24.079Z" fill="black"/></g></svg>
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
.main {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
align-items: center;
|
|
6
|
+
padding: 6rem;
|
|
7
|
+
min-height: 100vh;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.description {
|
|
11
|
+
display: inherit;
|
|
12
|
+
justify-content: inherit;
|
|
13
|
+
align-items: inherit;
|
|
14
|
+
font-size: 0.85rem;
|
|
15
|
+
max-width: var(--max-width);
|
|
16
|
+
width: 100%;
|
|
17
|
+
z-index: 2;
|
|
18
|
+
font-family: var(--font-mono);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.description a {
|
|
22
|
+
display: flex;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: 0.5rem;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.description p {
|
|
29
|
+
position: relative;
|
|
30
|
+
margin: 0;
|
|
31
|
+
padding: 1rem;
|
|
32
|
+
background-color: rgba(var(--callout-rgb), 0.5);
|
|
33
|
+
border: 1px solid rgba(var(--callout-border-rgb), 0.3);
|
|
34
|
+
border-radius: var(--border-radius);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.code {
|
|
38
|
+
font-weight: 700;
|
|
39
|
+
font-family: var(--font-mono);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.grid {
|
|
43
|
+
display: grid;
|
|
44
|
+
grid-template-columns: repeat(2, minmax(25%, auto));
|
|
45
|
+
max-width: 100%;
|
|
46
|
+
width: var(--max-width);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.card {
|
|
50
|
+
padding: 1rem 1.2rem;
|
|
51
|
+
border-radius: var(--border-radius);
|
|
52
|
+
background: rgba(var(--card-rgb), 0);
|
|
53
|
+
border: 1px solid rgba(var(--card-border-rgb), 0);
|
|
54
|
+
transition: background 200ms, border 200ms;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.card span {
|
|
58
|
+
display: inline-block;
|
|
59
|
+
transition: transform 200ms;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.card h2 {
|
|
63
|
+
font-weight: 600;
|
|
64
|
+
margin-bottom: 0.7rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.card p {
|
|
68
|
+
margin: 0;
|
|
69
|
+
opacity: 0.6;
|
|
70
|
+
font-size: 0.9rem;
|
|
71
|
+
line-height: 1.5;
|
|
72
|
+
max-width: 30ch;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.center {
|
|
76
|
+
display: flex;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
align-items: center;
|
|
79
|
+
position: relative;
|
|
80
|
+
padding: 4rem 0;
|
|
81
|
+
width: 100%;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.center::before {
|
|
85
|
+
background: var(--secondary-glow);
|
|
86
|
+
border-radius: 50%;
|
|
87
|
+
width: 480px;
|
|
88
|
+
height: 360px;
|
|
89
|
+
margin-left: -400px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.center::after {
|
|
93
|
+
background: var(--primary-glow);
|
|
94
|
+
width: 240px;
|
|
95
|
+
height: 180px;
|
|
96
|
+
z-index: -1;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.center::before,
|
|
100
|
+
.center::after {
|
|
101
|
+
content: '';
|
|
102
|
+
left: 50%;
|
|
103
|
+
position: absolute;
|
|
104
|
+
filter: blur(45px);
|
|
105
|
+
transform: translateZ(0);
|
|
106
|
+
opacity: 0.3;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.logo {
|
|
110
|
+
position: relative;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* Enable hover only on non-touch devices */
|
|
114
|
+
@media (hover: hover) and (pointer: fine) {
|
|
115
|
+
.card:hover {
|
|
116
|
+
background: rgba(var(--card-rgb), 0.1);
|
|
117
|
+
border: 1px solid rgba(var(--card-border-rgb), 0.15);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.card:hover span {
|
|
121
|
+
transform: translateX(4px);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@media (prefers-reduced-motion) {
|
|
126
|
+
.card:hover span {
|
|
127
|
+
transform: none;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Mobile */
|
|
132
|
+
@media (max-width: 700px) {
|
|
133
|
+
.content {
|
|
134
|
+
padding: 4rem;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.grid {
|
|
138
|
+
grid-template-columns: 1fr;
|
|
139
|
+
margin-bottom: 120px;
|
|
140
|
+
max-width: 320px;
|
|
141
|
+
text-align: center;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.card {
|
|
145
|
+
padding: 1rem 2.5rem;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.card h2 {
|
|
149
|
+
margin-bottom: 0.5rem;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.center {
|
|
153
|
+
padding: 8rem 0 6rem;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.center::before {
|
|
157
|
+
transform: none;
|
|
158
|
+
height: 300px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.description {
|
|
162
|
+
font-size: 0.8rem;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.description a {
|
|
166
|
+
padding: 1rem;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.description p,
|
|
170
|
+
.description div {
|
|
171
|
+
display: flex;
|
|
172
|
+
justify-content: center;
|
|
173
|
+
width: 100%;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.description p {
|
|
177
|
+
align-items: center;
|
|
178
|
+
inset: 0 0 auto;
|
|
179
|
+
padding: 2rem 1rem 1.4rem;
|
|
180
|
+
border-radius: 0;
|
|
181
|
+
border: none;
|
|
182
|
+
border-bottom: 1px solid rgba(var(--callout-border-rgb), 0.25);
|
|
183
|
+
background: linear-gradient(to bottom,
|
|
184
|
+
rgba(var(--background-start-rgb), 1),
|
|
185
|
+
rgba(var(--callout-rgb), 0.5));
|
|
186
|
+
background-clip: padding-box;
|
|
187
|
+
backdrop-filter: blur(24px);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.description div {
|
|
191
|
+
align-items: flex-end;
|
|
192
|
+
pointer-events: none;
|
|
193
|
+
inset: auto 0 0;
|
|
194
|
+
padding: 2rem;
|
|
195
|
+
height: 200px;
|
|
196
|
+
background: linear-gradient(to bottom,
|
|
197
|
+
transparent 0%,
|
|
198
|
+
rgb(var(--background-end-rgb)) 40%);
|
|
199
|
+
z-index: 1;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* Tablet and Smaller Desktop */
|
|
204
|
+
@media (min-width: 701px) and (max-width: 1120px) {
|
|
205
|
+
.grid {
|
|
206
|
+
grid-template-columns: repeat(2, 50%);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@media (prefers-color-scheme: dark) {
|
|
211
|
+
.vercelLogo {
|
|
212
|
+
filter: invert(1);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.logo {
|
|
216
|
+
filter: invert(1) drop-shadow(0 0 0.3rem #ffffff70);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
@keyframes rotate {
|
|
221
|
+
from {
|
|
222
|
+
transform: rotate(360deg);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
to {
|
|
226
|
+
transform: rotate(0deg);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
@import 'bootstrap';
|
|
2
|
+
@import 'bootstrap-icons';
|
|
3
|
+
|
|
4
|
+
:root {
|
|
5
|
+
--max-width: 1100px;
|
|
6
|
+
--border-radius: 12px;
|
|
7
|
+
|
|
8
|
+
--foreground-rgb: 0, 0, 0;
|
|
9
|
+
--background-start-rgb: 214, 219, 220;
|
|
10
|
+
--background-end-rgb: 255, 255, 255;
|
|
11
|
+
|
|
12
|
+
--primary-glow: conic-gradient(from 180deg at 50% 50%,
|
|
13
|
+
#16abff33 0deg,
|
|
14
|
+
#0885ff33 55deg,
|
|
15
|
+
#54d6ff33 120deg,
|
|
16
|
+
#0071ff33 160deg,
|
|
17
|
+
transparent 360deg);
|
|
18
|
+
--secondary-glow: radial-gradient(rgba(255, 255, 255, 1),
|
|
19
|
+
rgba(255, 255, 255, 0));
|
|
20
|
+
|
|
21
|
+
--tile-start-rgb: 239, 245, 249;
|
|
22
|
+
--tile-end-rgb: 228, 232, 233;
|
|
23
|
+
--tile-border: conic-gradient(#00000080,
|
|
24
|
+
#00000040,
|
|
25
|
+
#00000030,
|
|
26
|
+
#00000020,
|
|
27
|
+
#00000010,
|
|
28
|
+
#00000010,
|
|
29
|
+
#00000080);
|
|
30
|
+
|
|
31
|
+
--callout-rgb: 238, 240, 241;
|
|
32
|
+
--callout-border-rgb: 172, 175, 176;
|
|
33
|
+
--card-rgb: 180, 185, 188;
|
|
34
|
+
--card-border-rgb: 131, 134, 135;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media (prefers-color-scheme: dark) {
|
|
38
|
+
:root {
|
|
39
|
+
--foreground-rgb: 255, 255, 255;
|
|
40
|
+
--background-start-rgb: 0, 0, 0;
|
|
41
|
+
--background-end-rgb: 0, 0, 0;
|
|
42
|
+
|
|
43
|
+
--primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0));
|
|
44
|
+
--secondary-glow: linear-gradient(to bottom right,
|
|
45
|
+
rgba(1, 65, 255, 0),
|
|
46
|
+
rgba(1, 65, 255, 0),
|
|
47
|
+
rgba(1, 65, 255, 0.3));
|
|
48
|
+
|
|
49
|
+
--tile-start-rgb: 2, 13, 46;
|
|
50
|
+
--tile-end-rgb: 2, 5, 19;
|
|
51
|
+
--tile-border: conic-gradient(#ffffff80,
|
|
52
|
+
#ffffff40,
|
|
53
|
+
#ffffff30,
|
|
54
|
+
#ffffff20,
|
|
55
|
+
#ffffff10,
|
|
56
|
+
#ffffff10,
|
|
57
|
+
#ffffff80);
|
|
58
|
+
|
|
59
|
+
--callout-rgb: 20, 20, 20;
|
|
60
|
+
--callout-border-rgb: 108, 108, 108;
|
|
61
|
+
--card-rgb: 100, 100, 100;
|
|
62
|
+
--card-border-rgb: 200, 200, 200;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
* {
|
|
67
|
+
box-sizing: border-box;
|
|
68
|
+
padding: 0;
|
|
69
|
+
margin: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
html,
|
|
73
|
+
body {
|
|
74
|
+
max-width: 100vw;
|
|
75
|
+
overflow-x: hidden;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
body {
|
|
79
|
+
color: rgb(var(--foreground-rgb));
|
|
80
|
+
background: linear-gradient(to bottom,
|
|
81
|
+
transparent,
|
|
82
|
+
rgb(var(--background-end-rgb))) rgb(var(--background-start-rgb));
|
|
83
|
+
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Droid Sans, Helvetica Neue, sans-serif;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
a {
|
|
87
|
+
color: inherit;
|
|
88
|
+
text-decoration: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@media (prefers-color-scheme: dark) {
|
|
92
|
+
html {
|
|
93
|
+
color-scheme: dark;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import dynamic from 'next/dynamic';
|
|
2
|
+
|
|
3
|
+
import styles from '@/app/app.module.css'
|
|
4
|
+
import { DocsCard, HelloNearCard } from '@/components/cards';
|
|
5
|
+
import { NetworkId, ComponentMap } from '@/config';
|
|
6
|
+
|
|
7
|
+
const Component = dynamic(() => import('@/components/vm-component'), { ssr: false });
|
|
8
|
+
|
|
9
|
+
const socialComponents = ComponentMap[NetworkId];
|
|
10
|
+
|
|
11
|
+
export default function HelloComponents() {
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<>
|
|
15
|
+
<main className={styles.main}>
|
|
16
|
+
<div className={styles.description}>
|
|
17
|
+
<p>
|
|
18
|
+
Loading components from:
|
|
19
|
+
<code className={styles.code}>{socialComponents.socialDB}</code>
|
|
20
|
+
</p>
|
|
21
|
+
</div>
|
|
22
|
+
<div className={styles.center}>
|
|
23
|
+
<h1> <code>Multi-chain</code> Components Made Simple </h1>
|
|
24
|
+
</div>
|
|
25
|
+
<div className='row'>
|
|
26
|
+
<div class="col-6">
|
|
27
|
+
<Component src={socialComponents.HelloNear} />
|
|
28
|
+
<p class="my-4"> </p>
|
|
29
|
+
<Component src={socialComponents.LoveNear} />
|
|
30
|
+
</div>
|
|
31
|
+
<div class="col-6">
|
|
32
|
+
<Component src={socialComponents.Lido} />
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<hr />
|
|
36
|
+
|
|
37
|
+
<div className={styles.grid}>
|
|
38
|
+
<DocsCard />
|
|
39
|
+
<HelloNearCard />
|
|
40
|
+
</div>
|
|
41
|
+
</main>
|
|
42
|
+
</>
|
|
43
|
+
);
|
|
44
|
+
}
|