Skip to content

Commit eba0867

Browse files
committed
Hyperliquid Names fork of @rainbow-me/rainbow@2.2.4
0 parents  commit eba0867

403 files changed

Lines changed: 54259 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# The readme is copied from the root before release
2+
packages/rainbowkit/README.md
3+
4+
# Logs
5+
logs
6+
*.log
7+
npm-debug.log*
8+
yarn-debug.log*
9+
yarn-error.log*
10+
lerna-debug.log*
11+
12+
# Diagnostic reports (https://nodejs.org/api/report.html)
13+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
14+
15+
# Runtime data
16+
pids
17+
*.pid
18+
*.seed
19+
*.pid.lock
20+
21+
# Directory for instrumented libs generated by jscoverage/JSCover
22+
lib-cov
23+
24+
# Coverage directory used by tools like istanbul
25+
coverage
26+
*.lcov
27+
28+
# nyc test coverage
29+
.nyc_output
30+
31+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
32+
.grunt
33+
34+
# Bower dependency directory (https://bower.io/)
35+
bower_components
36+
37+
# node-waf configuration
38+
.lock-wscript
39+
40+
# Compiled binary addons (https://nodejs.org/api/addons.html)
41+
build/Release
42+
43+
# Dependency directories
44+
node_modules/
45+
jspm_packages/
46+
47+
# TypeScript v1 declaration files
48+
typings/
49+
50+
# TypeScript cache
51+
*.tsbuildinfo
52+
53+
# Optional npm cache directory
54+
.npm
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env
73+
.env.test
74+
.env.local
75+
.envrc
76+
77+
# parcel-bundler cache (https://parceljs.org/)
78+
.cache
79+
80+
# Next.js build output
81+
.next
82+
83+
# Nuxt.js build / generate output
84+
.nuxt
85+
dist
86+
87+
# Gatsby files
88+
.cache/
89+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
90+
# https://nextjs.org/blog/next-9-1#public-directory-support
91+
# public
92+
93+
# vuepress build output
94+
.vuepress/dist
95+
96+
# Serverless directories
97+
.serverless/
98+
99+
# FuseBox cache
100+
.fusebox/
101+
102+
# DynamoDB Local files
103+
.dynamodb/
104+
105+
# TernJS port file
106+
.tern-port
107+
108+
# Content layer
109+
.contentlayer
110+
111+
# Others
112+
.DS_Store

.npmrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
link-workspace-packages = true
2+
shamefully-hoist = false
3+
shared-workspace-shrinkwrap = true
4+
access = public
5+
enable-pre-post-scripts = true
6+
package-lock = true
7+
strict-peer-dependencies = false
8+
dedupe-peer-dependents = true
9+
package-manager-strict = false

.pnpmfile.cjs

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
function readPackage(pkg) {
2+
// Filter dependencies in app templates that are present in the root package.json.
3+
// This allows us to provide complete package.json files for all app templates.
4+
if (
5+
/^packages\/create-rainbowkit\/.*-app$/.test(pkg.name) || // create-rainbowkit templates (e.g. next-app)
6+
/^with-/.test(pkg.name) // example apps (e.g. with-next)
7+
) {
8+
pkg.dependencies = omitRootDependencies(pkg.name, pkg.dependencies);
9+
pkg.devDependencies = omitRootDependencies(pkg.name, pkg.devDependencies);
10+
}
11+
12+
return pkg;
13+
}
14+
15+
module.exports = {
16+
hooks: {
17+
readPackage,
18+
},
19+
};
20+
21+
function omitRootDependencies(packageName, dependencies) {
22+
const packageJson = require('./package.json');
23+
const rootDependencies = {
24+
...packageJson.dependencies,
25+
...packageJson.devDependencies,
26+
};
27+
28+
const filteredDependencies = {};
29+
const allowedDuplicatePackages = [
30+
// None for now
31+
];
32+
33+
for (const dep of Object.keys(dependencies)) {
34+
if (!rootDependencies[dep] || allowedDuplicatePackages.includes(dep)) {
35+
// Keep the dependency in the app template's package.json since it's not in the
36+
// root package.json (or in the list of allowed duplicate packages).
37+
filteredDependencies[dep] = dependencies[dep];
38+
} else if (rootDependencies[dep] !== dependencies[dep]) {
39+
throw new Error(
40+
[
41+
`Dependency ${dep} has different version in root package.json. Root: ${rootDependencies[dep]}, ${packageName}: ${dependencies[dep]}`,
42+
packageName === 'generated-test-app' &&
43+
'You might have stale files left over from a past create-rainbowkit run. Try running "pnpm test:cli:clean" and then "pnpm test:cli:dev" after install to regenerate test app.',
44+
]
45+
.filter(Boolean)
46+
.join('\n'),
47+
);
48+
}
49+
}
50+
51+
return filteredDependencies;
52+
}

FUNDING.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"drips": {
3+
"ethereum": {
4+
"ownedBy": "0x7a3d05c70581bD345fe117c06e45f9669205384f"
5+
}
6+
}
7+
}

LICENSE

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Rainbow
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
![rainbowkit showing .hl](image.png)
2+
3+
# Hyperliquid Names - RainbowKit
4+
5+
**The best way to connect a wallet 🌈 - Now with Hyperliquid Names support**
6+
7+
This repo is a fork of `@rainbow-me/rainbowkit@2.2.4` that includes support for `.hl` Primary Names. Users will see their `.hl` name in both the ConnectButton and AccountModal.
8+
9+
- See the changes at this [commit](https://github.com/HLnames/rainbowkit/commit/8c3a9458d24b00e89b265edcc6991b1826f8020e)
10+
- Learn more about [@rainbow-me/rainbowkit](https://github.com/rainbow-me/rainbowkit)
11+
- Learn more about [Hyperliquid Names](https://hyperliquid-names.gitbook.io/hyperliquid-names)
12+
13+
## Quick start
14+
There are two ways to consume `@hlnames/rainbowkit`
15+
16+
### If you're starting a new project without any dependencies
17+
You can install `@hlnames/rainbowkit`:
18+
```bash
19+
npm install @hlnames/rainbowkit@latest
20+
# or
21+
pnpm add @hlnames/rainbowkit@latest
22+
```
23+
24+
And use `@hlnames/rainbowkit` wherever you would have previously used `@rainbow-me/rainbowkit`:
25+
```javascript
26+
import { ConnectButton } from '@hlnames/rainbowkit';
27+
28+
export const YourApp = () => {
29+
return <ConnectButton />;
30+
};
31+
```
32+
33+
### If your project already uses `@rainbow-me/rainbowkit`
34+
You can install our forked version of `@rainbow-me/rainbowkit@2.2.4`. With this option you won't need to change any of your imports.
35+
36+
```bash
37+
npm install https://raw.githubusercontent.com/HLnames/rainbowkit/refs/heads/main/packages/rainbowkit/rainbow-me-rainbowkit-2.2.4.tgz
38+
# or
39+
pnpm add https://raw.githubusercontent.com/HLnames/rainbowkit/refs/heads/main/packages/rainbowkit/rainbow-me-rainbowkit-2.2.4.tgz
40+
```
41+
42+
Use `@rainbow-me/rainbowkit` as you would normally.
43+
```javascript
44+
import { ConnectButton } from '@rainbow-me/rainbowkit';
45+
46+
export const YourApp = () => {
47+
return <ConnectButton />;
48+
};
49+
```
50+
51+
You can find the .tgz file here hosted here: https://github.com/HLnames/rainbowkit/tree/main/packages/rainbowkit
52+
53+
## Examples
54+
55+
You can find a example of `@hlnames/rainbowkit` in [/examples/with-next-app](./examples/with-next-app/).
56+
57+
Run the example with:
58+
```bash
59+
pnpm install
60+
cd examples/with-next-app
61+
pnpm run dev
62+
```
63+
64+
## License
65+
66+
Licensed under the MIT License, Copyright © 2022-present [Rainbow](https://rainbow.me).
67+
68+
See [LICENSE](/LICENSE) for more information.

biome.json

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
3+
"files": {
4+
"ignore": [
5+
"CHANGELOG.md",
6+
"pnpm-lock.yaml",
7+
"package.json",
8+
"tsconfig.json",
9+
"tsconfig.*.json",
10+
"./packages/create-rainbowkit/generated-test-app/",
11+
"build/",
12+
".react-router",
13+
"examples/with-next-mint-nft/contract/"
14+
]
15+
},
16+
"formatter": {
17+
"enabled": true,
18+
"formatWithErrors": false,
19+
"indentStyle": "space",
20+
"indentWidth": 2,
21+
"lineWidth": 80
22+
},
23+
"linter": {
24+
"enabled": true,
25+
"rules": {
26+
"recommended": true,
27+
"a11y": {
28+
"useButtonType": "off"
29+
},
30+
"complexity": {
31+
"noBannedTypes": "off",
32+
"useLiteralKeys": "off"
33+
},
34+
"correctness": {
35+
"noUnusedVariables": "error"
36+
},
37+
"performance": {
38+
"noDelete": "off"
39+
},
40+
"style": {
41+
"noNonNullAssertion": "off",
42+
"useShorthandArrayType": "error"
43+
},
44+
"suspicious": {
45+
"noArrayIndexKey": "off",
46+
"noAssignInExpressions": "off",
47+
"noConfusingVoidType": "off",
48+
"noExplicitAny": "off",
49+
"noRedeclare": "off"
50+
}
51+
}
52+
},
53+
"javascript": {
54+
"formatter": {
55+
"quoteStyle": "single",
56+
"trailingCommas": "all",
57+
"semicolons": "always"
58+
}
59+
},
60+
"organizeImports": {
61+
"enabled": false
62+
},
63+
"vcs": {
64+
"enabled": true,
65+
"clientKind": "git",
66+
"useIgnoreFile": true
67+
}
68+
}

crowdin.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
files:
2+
- source: /packages/rainbowkit/src/locales/en_US.json
3+
translation: /packages/rainbowkit/src/locales/%locale_with_underscore%.json
4+
- source: /site/data/en-US/docs/*.mdx
5+
translation: /site/data/%locale%/docs/%original_file_name%
6+
- source: /site/data/en-US/guides/*.mdx
7+
translation: /site/data/%locale%/guides/%original_file_name%
8+
- source: /site/locales/en-US.json
9+
translation: /site/locales/%locale%.json
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "https://codesandbox.io/schemas/tasks.json",
3+
"setupTasks": ["yarn add @rainbow-me/rainbowkit@latest", "yarn build"],
4+
"tasks": {
5+
"install-dependencies": {
6+
"name": "Install Dependencies",
7+
"command": "yarn add @rainbow-me/rainbowkit@latest"
8+
},
9+
"start-app": {
10+
"name": "Run Dev Server",
11+
"command": "yarn dev",
12+
"runAtStart": true,
13+
"preview": {
14+
"port": 3000
15+
}
16+
}
17+
}
18+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "RainbowKit Dev Container",
3+
"image": "mcr.microsoft.com/devcontainers/javascript-node:20"
4+
}

0 commit comments

Comments
 (0)