Skip to content

Commit ae45a90

Browse files
committed
docs: update docs, remove unused files from demo
1 parent 776f3e9 commit ae45a90

25 files changed

+229
-650
lines changed
Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,53 @@
11
---
2-
name: Bug report
3-
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
2+
name: 🐛 Bug report
3+
about: Report a problem so we can fix it
4+
title: '[Bug]: '
5+
labels: ['bug']
66
assignees: ''
7+
---
8+
9+
## 🐞 Description
10+
11+
Clear and concise description of the bug.
12+
13+
---
14+
15+
## 🔁 Reproduction Steps
16+
17+
1. Go to ``
18+
2. Perform ``
19+
3. Observe ``
20+
21+
_Provide a minimal reproduction (CodeSandbox, repo, etc.) if possible._
22+
23+
---
24+
25+
## ✅ Expected Behavior
26+
27+
What you expected to happen.
28+
29+
---
30+
31+
## 🚫 Actual Behavior
32+
33+
What actually happened.
734

835
---
936

10-
**Describe the bug**
11-
A clear and concise description of what the bug is.
37+
## 🖥 Environment
38+
39+
- **OS:** [e.g. macOS 14.5]
40+
- **Browser / Runtime:** [e.g. Chrome 125, Node 18.18.2]
41+
- **Package Version:** [`@austinserb/[email protected]`]
1242

13-
**Reproduction steps**
14-
Provide step-by-step instructions so we can reproduce the issue. Include a minimal repo or code snippet if possible.
15-
1. Go to '...'
16-
2. Click on '....'
17-
3. Scroll down to '....'
18-
4. See error
43+
---
1944

20-
**Environment info**
21-
- OS: [e.g. macOS 14]
22-
- Browser: [e.g. Chrome 116]
23-
- Node version: [e.g. 20.x]
24-
- Package version: [e.g. [email protected]]
45+
## 📸 Screenshots / Logs (if applicable)
2546

26-
**Expected behavior**
27-
A clear and concise description of what you expected to happen.
47+
_Please add visual proof or error logs here._
48+
49+
---
2850

29-
**Screenshots**
30-
If applicable, add screenshots to help explain your problem.
51+
## 🧩 Additional Context
3152

32-
**Additional context**
33-
Add any other context about the problem here.
53+
Any other details? Custom config, frameworks in use, relevant links?
Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
11
---
2-
name: Feature request
3-
about: Suggest an idea for this project
4-
title: ''
5-
labels: ''
2+
name: 🚀 Feature request
3+
about: Suggest an improvement or new idea for React Zero-UI
4+
title: '[Feature]: '
5+
labels: ['enhancement']
66
assignees: ''
7+
---
8+
9+
## ✨ Problem
10+
11+
Is your feature request related to a problem or pain point?
12+
13+
> Ex: "I'm often frustrated when trying to do X because…"
714
815
---
916

10-
**Is your feature request related to a problem? Please describe.**
11-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
17+
## ✅ Proposed Solution
1218

13-
**Describe the solution you'd like**
14-
A clear and concise description of what you want to happen.
19+
How would you like this to work? Be specific.
1520

16-
**Reproduction or use case**
17-
Provide steps or a short scenario that demonstrates when this feature would be useful.
21+
---
1822

19-
**Environment info**
20-
- OS: [e.g. macOS 14]
21-
- Browser: [e.g. Chrome 116]
22-
- Node version: [e.g. 20.x]
23+
## 🔄 Alternatives Considered
2324

24-
**Expected behavior**
25-
What outcome do you expect when this feature is implemented?
25+
Have you tried workarounds or other approaches? Share them here.
2626

27-
**Describe alternatives you've considered**
28-
A clear and concise description of any alternative solutions or features you've considered.
27+
---
28+
29+
## 📎 Additional Context
2930

30-
**Additional context**
31-
Add any other context or screenshots about the feature request here.
31+
Add screenshots, references, or related discussions if relevant.
32+
33+
---

.github/pull_request_template.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
1+
## Summary
2+
3+
<!-- Briefly describe the purpose of this PR and what it changes. If fixing an issue, reference it with "Closes #123". -->
4+
5+
---
6+
7+
## Type of Change
8+
9+
<!-- Select one or more by replacing `[ ]` with `[x]` -->
10+
11+
- [ ] 🐛 Bug fix
12+
- [ ] ✨ New feature
13+
- [ ] 🛠 Refactor
14+
- [ ] 🧪 Test improvement
15+
- [ ] 📝 Docs update
16+
- [ ] ⚙️ CI/tooling
17+
18+
---
19+
120
## Checklist
2-
- [ ] All tests are passing
3-
- [ ] Documentation updated if needed
4-
- [ ] Lint and formatting run
5-
- [ ] PR title and description clearly describe the change
21+
22+
- [ ] All tests pass (`pnpm test`)
23+
- [ ] Linting and formatting pass (`pnpm lint && pnpm format`)
24+
- [ ] PR title follows semantic commit format (`feat:`, `fix:`, etc.)
25+
- [ ] Changes are documented (README, JSDoc, or comments if needed)
26+
- [ ] Ready for review — not a draft
27+
28+
---
29+
30+
## Notes for Reviewer
31+
32+
<!-- Optional: Anything specific you'd like feedback on, or explain complex decisions here. -->

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- '.github/workflows/ci.yml'
99
- 'scripts/**'
1010
- 'pnpm-lock.yaml'
11+
- '!packages/**/README.md'
1112
pull_request:
1213

1314
concurrency:

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
/examples
2+
pnpm-lock.yaml
3+
packages/core/__tests__/fixtures/vite/vite.config.ts
4+
packages/core/__tests__/fixtures/next/tsconfig.json
5+
packages/core/__tests__/fixtures/next/postcss.config.mjs
6+
attributes.**

CONTRIBUTING.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Contributing to React Zero-UI
2+
3+
**Thanks for stopping by.** This project exists because builders like you push boundaries. If you're here to experiment, break things, or ship speed — you're in the right place.
4+
5+
---
6+
7+
## ⚡ Core Philosophy
8+
9+
**React Zero-UI** is built on a radical idea:
10+
11+
> UI state should not require re-rendering.
12+
> CSS and `data-*` attributes can be enough.
13+
14+
It's fast because it **skips the VDOM entirely** — no state triggers, no diffing, no component redraws.
15+
16+
### If you contribute:
17+
Stay **pre-rendered, declarative, and brutally fast.**
18+
19+
---
20+
21+
## 🧠 Monorepo Structure
22+
23+
```
24+
packages/
25+
├── core → @austinserb/react-zero-ui (library logic + postcss)
26+
└── cli → create-zero-ui (npx installer)
27+
```
28+
29+
---
30+
31+
## ⚙️ Local Setup
32+
33+
```bash
34+
pnpm bootstrap # builds + installs local tarball into test fixtures
35+
pnpm test # runs all tests (unit + E2E)
36+
```
37+
38+
> Node 18+ and PNPM required.
39+
> Run from repo root.
40+
41+
---
42+
43+
## ✅ Contribution Flow
44+
45+
### 1. [Start a Discussion](https://github.com/Austin1serb/React-Zero-UI/discussions)
46+
47+
For questions, proposals, or early feedback. Share ideas before building.
48+
49+
### 2. [Open an Issue](https://github.com/Austin1serb/React-Zero-UI/issues)
50+
51+
Use the templates.
52+
53+
* **Bug** → Include steps to reproduce, expected vs. actual behavior.
54+
* **Feature** → Explain the *why*, and sketch a possible approach.
55+
56+
### 3. Pull Requests
57+
58+
* Use semantic commit prefixes: `feat:`, `fix:`, `chore:`, `refactor:`
59+
* Add tests if you touch logic, CLI, or rendering behavior.
60+
* Keep PRs focused — one change per pull.
61+
* Fill out the PR template — no empty descriptions.
62+
63+
---
64+
65+
## 🧪 Test Commands
66+
67+
```bash
68+
pnpm test:unit # Core logic tests
69+
pnpm test:cli # CLI creation flow
70+
pnpm test:vite # E2E tests on Vite fixture
71+
pnpm test:next # E2E tests on Next.js fixture
72+
pnpm test # Runs all of the above
73+
```
74+
75+
---
76+
77+
## 🤝 Code of Conduct
78+
79+
Keep it respectful. Push ideas hard, not people.
80+
81+
---
82+
83+
## 📬 Contact
84+
85+
> Got a big idea? DM me:
86+
> [linkedin.com/in/austin-serb](https://www.linkedin.com/in/austin-serb/)
87+

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44

55
Pre‑render your UI once, flip a `data-*` attribute to update — that's it.
66

7-
<a href="https://bundlephobia.com/package/@austinserb/[email protected]" target="_blank" rel="noopener noreferrer"><img src="https://badgen.net/bundlephobia/min/@austinserb/[email protected]" alt="npm version" /> </a><a href="https://www.npmjs.com/package/@austinserb/react-zero-ui" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/npm/v/@austinserb/react-zero-ui" alt="npm version" /></a> <a href="https://opensource.org/licenses/MIT" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a> ![CI](https://github.com/austin1serb/react-zero-ui/actions/workflows/ci.yml/badge.svg?branch=main)
7+
<a href="https://bundlephobia.com/package/@austinserb/[email protected]" target="_blank" rel="noopener noreferrer"><img src="https://badgen.net/bundlephobia/minzip/@austinserb/[email protected]" alt="npm version" /> </a><a href="https://www.npmjs.com/package/@austinserb/react-zero-ui" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/npm/v/@austinserb/react-zero-ui" alt="npm version" /></a> <a href="https://opensource.org/licenses/MIT" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a> ![CI](https://github.com/austin1serb/react-zero-ui/actions/workflows/ci.yml/badge.svg?branch=main)
88

99
---
1010

11-
1211
## 📚 Quick Links
1312

1413
- [⚡️ Quick Start](#️-quick-start)
@@ -130,7 +129,7 @@ const [staleValue, setValue] = useUI<'open' | 'closed'>('sidebar', 'closed');
130129
```
131130

132131
- `key` → becomes `data-{key}` on `<body>`.
133-
- `defaultValue`optional, prevents FOUC.
132+
- `defaultValue`SSR, prevents FOUC.
134133
- **Note:** the returned `staleValue` does **not** update (`useUI` is write‑only).
135134

136135
### Tailwind variants
@@ -148,18 +147,18 @@ Any `data-{key}="{value}"` pair becomes a variant: `{key}-{value}:`.
148147
1. **`useUI`** → writes to `data-*` attributes on `<body>`.
149148
2. **Babel plugin** → scans code, finds every `key/value`, injects them into **PostCSS**.
150149
3. **PostCSS plugin** → generates static Tailwind classes **at build‑time**.
151-
4. **Runtime** → changing state only touches the attribute — no VDOM, no reconciliation, no re‑paint.
150+
4. **Runtime** → changing state only touches the attribute — no VDOM, no reconciliation, ZERO re‑renders.
152151

153152
---
154153

155154
## ✅ Features
156155

157156
- **Zero React re‑renders** for UI‑only state.
158157
- **Global setters** — call from any component or util.
159-
- **Tiny**: < 1 KB gzipped runtime.
158+
- **Tiny**: < 391 Byte gzipped runtime.
160159
- **TypeScript‑first**.
161160
- **SSR‑friendly** (Next.js & Vite SSR).
162-
- **Framework‑agnostic CSS** — generated classes work in plain HTML / Vue / Svelte as well.
161+
- **Framework‑agnostic CSS** — generated classes work in plain HTML / Vue / Svelte as well with extra config.
163162

164163
---
165164

examples/demo/src/app/layout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default function RootLayout({
1818
children: React.ReactNode;
1919
}>) {
2020
return (
21+
2122
<html lang="en">
2223
<body className="py-24 md:py-10 antialiased" {...bodyAttributes}>
2324
<TopBarV2 />

examples/demo/src/hooks/useLag.tsx

Lines changed: 0 additions & 25 deletions
This file was deleted.

examples/demo/src/hooks/useRAFstate.ts

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)