Skip to content

Commit 15844e0

Browse files
committed
upgrade deps && docs [skip ci]
1 parent 2bc8242 commit 15844e0

File tree

15 files changed

+377
-225
lines changed

15 files changed

+377
-225
lines changed

TODO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
- [ ] 🌟 Enable [private vulnerability reporting](https://github.com/react18-tools/git-json-resolver-semver/security)
1818
- [ ] Set up `CodeCov`
1919
- Visit Codecov and set up your repo
20-
- Create [repository secret]((https://github.com/react18-tools/git-json-resolver-semver/settings/secrets/actions)) for `CODECOV_TOKEN`
20+
- Create [repository secret](<(https://github.com/react18-tools/git-json-resolver-semver/settings/secrets/actions)>) for `CODECOV_TOKEN`
2121
- [ ] Set up `CodeClimate`
2222
- Visit CodeClimate and set up your repo
2323
- Create [repository secret] for `CC_TEST_REPORTER_ID`

docs/_config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
remote_theme: just-the-docs/just-the-docs
2+
title: React18 Loaders
3+
search_enabled: true
4+
nav_sort: case_insensitive
5+
footer_content: <p align="center" style="text-align:center">with 💖 by <a href="https://mayank-chaudhari.vercel.app" target="_blank">Mayank Kumar Chaudhari</a></p>

docs/index.md

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
---
2+
layout: default
3+
title: Home
4+
nav_order: 1
5+
---
6+
7+
# Git Json Resolver Semver <img src="https://raw.githubusercontent.com/mayank1513/mayank1513/main/popper.png" style="height: 40px"/>
8+
9+
[![test](https://github.com/react18-tools/git-json-resolver-semver/actions/workflows/test.yml/badge.svg)](https://github.com/react18-tools/git-json-resolver-semver/actions/workflows/test.yml)
10+
[![Maintainability](https://qlty.sh/gh/react18-tools/projects/git-json-resolver-semver/maintainability.svg)](https://qlty.sh/gh/react18-tools/projects/git-json-resolver-semver)
11+
[![codecov](https://codecov.io/gh/react18-tools/git-json-resolver-semver/graph/badge.svg)](https://codecov.io/gh/react18-tools/git-json-resolver-semver)
12+
[![Version](https://img.shields.io/npm/v/git-json-resolver-semver.svg?colorB=green)](https://www.npmjs.com/package/git-json-resolver-semver)
13+
[![Downloads](https://img.jsdelivr.com/img.shields.io/npm/d18m/git-json-resolver-semver.svg)](https://www.npmjs.com/package/git-json-resolver-semver)
14+
![npm bundle size](https://img.shields.io/bundlephobia/minzip/git-json-resolver-semver)
15+
16+
Git Json Resolver Semver is a comprehensive library designed to unlock the full potential of React 18 server components. It provides customizable loading animation components and a fullscreen loader container, seamlessly integrating with React and Next.js.
17+
18+
✅ Fully Treeshakable (import from `git-json-resolver-semver/client/loader-container`)
19+
20+
✅ Fully TypeScript Supported
21+
22+
✅ Leverages the power of React 18 Server components
23+
24+
✅ Compatible with all React 18 build systems/tools/frameworks
25+
26+
✅ Documented with [Typedoc](https://react18-tools.github.io/git-json-resolver-semver) ([Docs](https://react18-tools.github.io/git-json-resolver-semver))
27+
28+
✅ Examples for Next.js, and Vite
29+
30+
> <img src="https://raw.githubusercontent.com/mayank1513/mayank1513/main/popper.png" style="height: 20px"/> Star [this repository](https://github.com/react18-tools/git-json-resolver-semver) and share it with your friends.
31+
32+
## Getting Started
33+
34+
### Installation
35+
36+
```bash
37+
pnpm add git-json-resolver-semver
38+
```
39+
40+
**_or_**
41+
42+
```bash
43+
npm install git-json-resolver-semver
44+
```
45+
46+
**_or_**
47+
48+
```bash
49+
yarn add git-json-resolver-semver
50+
```
51+
52+
## Want Lite Version? [![npm bundle size](https://img.shields.io/bundlephobia/minzip/git-json-resolver-semver-lite)](https://www.npmjs.com/package/git-json-resolver-semver-lite) [![Version](https://img.shields.io/npm/v/git-json-resolver-semver-lite.svg?colorB=green)](https://www.npmjs.com/package/git-json-resolver-semver-lite) [![Downloads](https://img.jsdelivr.com/img.shields.io/npm/d18m/git-json-resolver-semver-lite.svg)](https://www.npmjs.com/package/git-json-resolver-semver-lite)
53+
54+
```bash
55+
pnpm add git-json-resolver-semver-lite
56+
```
57+
58+
**or**
59+
60+
```bash
61+
npm install git-json-resolver-semver-lite
62+
```
63+
64+
**or**
65+
66+
```bash
67+
yarn add git-json-resolver-semver-lite
68+
```
69+
70+
> You need `r18gs` as a peer-dependency
71+
72+
### Import Styles
73+
74+
You can import styles globally or within specific components.
75+
76+
```css
77+
/* globals.css */
78+
@import "git-json-resolver-semver/dist";
79+
```
80+
81+
```tsx
82+
// layout.tsx
83+
import "git-json-resolver-semver/dist/index.css";
84+
```
85+
86+
For selective imports:
87+
88+
```css
89+
/* globals.css */
90+
@import "git-json-resolver-semver/dist/client"; /** required if you are using LoaderContainer */
91+
@import "git-json-resolver-semver/dist/server/bars/bars1";
92+
```
93+
94+
### Usage
95+
96+
Using loaders is straightforward.
97+
98+
```tsx
99+
import { Bars1 } from "git-json-resolver-semver/dist/server/bars/bars1";
100+
101+
export default function MyComponent() {
102+
return someCondition ? <Bars1 /> : <>Something else...</>;
103+
}
104+
```
105+
106+
For detailed API and options, refer to [the API documentation](https://react18-tools.github.io/git-json-resolver-semver).
107+
108+
**Using LoaderContainer**
109+
110+
`LoaderContainer` is a fullscreen component. You can add this component directly in your layout and then use `useLoader` hook to toggle its visibility.
111+
112+
```tsx
113+
// layout.tsx
114+
<LoaderContainer />
115+
...
116+
```
117+
118+
```tsx
119+
// some other page or component
120+
import { useLoader } from "git-json-resolver-semver/dist/hooks";
121+
122+
export default MyComponent() {
123+
const { setLoading } = useLoader();
124+
useCallback(()=>{
125+
setLoading(true);
126+
...do some work
127+
setLoading(false);
128+
}, [])
129+
...
130+
}
131+
```
132+
133+
## License
134+
135+
This library is licensed under the MPL-2.0 open-source license.
136+
137+
> <img src="https://raw.githubusercontent.com/mayank1513/mayank1513/main/popper.png" style="height: 20px"/> Please enroll in [our courses](https://mayank-chaudhari.vercel.app/courses) or [sponsor](https://github.com/sponsors/mayank1513) our work.
138+
139+
<hr />
140+
141+
<p align="center" style="text-align:center">with 💖 by <a href="https://mayank-chaudhari.vercel.app" target="_blank">Mayank Kumar Chaudhari</a></p>
142+
143+
## Modules
144+
145+
- [index](index.md)
146+
- [index.test](index.test.md)

docs/index.test.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
layout: default
3+
title: Index.Test
4+
nav_order: 2
5+
---
6+
7+
# index.test

examples/nextjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@
3131
"@types/react-dom": "^19.1.9",
3232
"typescript": "^5.9.2"
3333
}
34-
}
34+
}

examples/vite/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@
3030
"typescript": "^5.9.2",
3131
"vite": "^7.1.3"
3232
}
33-
}
33+
}

lib/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ export default MyComponent() {
128128

129129
This library is licensed under the MPL-2.0 open-source license.
130130

131-
132-
133131
> <img src="https://raw.githubusercontent.com/mayank1513/mayank1513/main/popper.png" style="height: 20px"/> Please enroll in [our courses](https://mayank-chaudhari.vercel.app/courses) or [sponsor](https://github.com/sponsors/mayank1513) our work.
134132

135133
<hr />

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@
4242
"next@>=15.0.0 <15.2.3": ">=15.2.3"
4343
}
4444
}
45-
}
45+
}

packages/config-typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
"publishConfig": {
77
"access": "public"
88
}
9-
}
9+
}

packages/eslint-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
"typescript": "^5.9.2",
1818
"typescript-eslint": "^8.41.0"
1919
}
20-
}
20+
}

0 commit comments

Comments
 (0)