Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ What actually happened.

- **OS:** [e.g. macOS 14.5]
- **Browser / Runtime:** [e.g. Chrome 125, Node 18.18.2]
- **Package Version:** [`@austinserb/[email protected]`]
- **Package Version:** [`@react-zero-ui/core@1.0.21`]

---

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:

- name: Install Playwright browsers (if cache miss)
if: steps.pw-cache.outputs.cache-hit != 'true'
run: pnpm --filter @austinserb/react-zero-ui exec playwright install --with-deps
run: pnpm --filter @react-zero-ui/core exec playwright install --with-deps

- name: Save Playwright cache
if: steps.pw-cache.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packages": {
"packages/core": { "package-name": "@austinserb/react-zero-ui", "release-type": "node" },
"packages/core": { "package-name": "@react-zero-ui/core", "release-type": "node" },
"packages/cli": { "package-name": "create-zero-ui", "release-type": "node" }
},
"monorepo-tags": true,
Expand Down
1 change: 0 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const [staleValue, setValue] = useUI<'open' | 'closed'>('sidebar', 'closed');
- ✅ Do **NOT** use the first value from `useUI()` for logic — it DOES NOT UPDATE.
- ✅ You can call setters **from anywhere** in the app — no prop drilling or context needed.
- ✅ Tailwind classes must use `key-value:` pattern:

- `theme-dark:bg-black`
- `accent-blue:text-blue-500`
- `sidebar-open:translate-x-0`
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Stay **pre-rendered, declarative, and brutally fast.**

```
packages/
├── core → @austinserb/react-zero-ui (library logic + postcss)
├── core → @react-zero-ui/core (library logic + postcss)
└── cli → create-zero-ui (npx installer)
```

Expand All @@ -43,11 +43,11 @@ pnpm test # runs all tests (unit + E2E)

## ✅ Contribution Flow

### 1. [Start a Discussion](https://github.com/Austin1serb/React-Zero-UI/discussions)
### 1. [Start a Discussion](https://github.com/react-zero-ui/core/discussions)

For questions, proposals, or early feedback. Share ideas before building.

### 2. [Open an Issue](https://github.com/Austin1serb/React-Zero-UI/issues)
### 2. [Open an Issue](https://github.com/react-zero-ui/core/issues)

Use the templates.

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

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

<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)
<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/react-zero-ui/core/actions/workflows/ci.yml/badge.svg?branch=main)

---

## 📚 Quick Links

- [⚡️ Quick Start](#️-quick-start)
- [🏄‍♂️ Usage](#-usage)
- [🏄 Usage](#-usage)
- [🧬 How it works](#-how-it-works)
- [✅ Features](#-features)
- [🏗 Best Practices](#-best-practices)
Expand All @@ -20,11 +20,11 @@ Pre‑render your UI once, flip a `data-*` attribute to update — that's it.

## 🚀 Live Demo

| Example | Link | What it shows | Link to Code |
| --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Interactive menu with render tracker | <a href="https://react-zero-ui.vercel.app/" target="_blank" rel="noopener noreferrer"><strong>Main Demo↗</strong></a> | Compare Zero‑UI vs. React side‑by‑side while toggling a menu. | <a href="https://github.com/Austin1serb/React-Zero-UI/tree/main/examples/demo" target="_blank" rel="noopener noreferrer">Github</a> |
| React benchmark (10 000 nested nodes) | <a href="https://react-zero-ui.vercel.app/react" target="_blank" rel="noopener noreferrer"><strong>React 10k↗</strong></a> | How long the traditional React render path takes. | <a href="https://github.com/Austin1serb/React-Zero-UI/tree/main/examples/demo/src/app/react" target="_blank" rel="noopener noreferrer">Github</a> |
| Zero‑UI benchmark (10 000 nested nodes) | <a href="https://react-zero-ui.vercel.app/zero-ui" target="_blank" rel="noopener noreferrer"><strong style="text-align: nowrap;">Zero‑UI 10k↗</strong></a> | Identical DOM, but powered by Zero‑UI's `data-*` switch. | <a href="https://github.com/Austin1serb/React-Zero-UI/tree/main/examples/demo/src/app/zero-ui" target="_blank" rel="noopener noreferrer">Github</a> |
| Example | Link | What it shows | Link to Code |
| --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| Interactive menu with render tracker | <a href="https://react-zero-ui.vercel.app/" target="_blank" rel="noopener noreferrer"><strong>Main Demo↗</strong></a> | Compare Zero‑UI vs. React side‑by‑side while toggling a menu. | <a href="https://github.com/react-zero-ui/core/tree/main/examples/demo" target="_blank" rel="noopener noreferrer">Github</a> |
| React benchmark (10 000 nested nodes) | <a href="https://react-zero-ui.vercel.app/react" target="_blank" rel="noopener noreferrer"><strong>React 10k↗</strong></a> | How long the traditional React render path takes. | <a href="https://github.com/react-zero-ui/core/tree/main/examples/demo/src/app/react" target="_blank" rel="noopener noreferrer">Github</a> |
| Zero‑UI benchmark (10 000 nested nodes) | <a href="https://react-zero-ui.vercel.app/zero-ui" target="_blank" rel="noopener noreferrer"><strong style="text-align: nowrap;">Zero‑UI 10k↗</strong></a> | Identical DOM, but powered by Zero‑UI's `data-*` switch. | <a href="https://github.com/react-zero-ui/core/tree/main/examples/demo/src/app/zero-ui" target="_blank" rel="noopener noreferrer">Github</a> |

---

Expand Down Expand Up @@ -114,7 +114,7 @@ export default {

---

## 🏄‍♂️ Usage
## 🏄 Usage

![react zero ui usage explained](docs/assets/useui-explained.webp)

Expand Down
2 changes: 1 addition & 1 deletion examples/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"clean": "rm -rf .next"
},
"dependencies": {
"@austinserb/react-zero-ui": "^1.0.21",
"@react-zero-ui/core": "^0.1.0",
"@vercel/analytics": "^1.5.0",
"clsx": "^2.1.1",
"motion": "^12.16.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// postcss.config.mjs

const config = { plugins: ['@austinserb/react-zero-ui/postcss', '@tailwindcss/postcss'] };
const config = { plugins: ['@react-zero-ui/core/postcss', '@tailwindcss/postcss'] };

export default config;
2 changes: 1 addition & 1 deletion examples/demo/src/app/(test)/ZeroState.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import useUI from '@austinserb/react-zero-ui';
import useUI from '@react-zero-ui/core';
import { useRenderTracker } from './ReactTracker';

export function TestComponentZero() {
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/src/app/(test)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { Icon } from '@/app/components/Icon';
import { TestComponentWithState } from './ReactState';
import { TestComponentZero } from './ZeroState';
import { useUI } from '@austinserb/react-zero-ui';
import { useUI } from '@react-zero-ui/core';

export default function Page() {
const [, setActive] = useUI<'react' | 'zero'>('active', 'zero');
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/src/app/components/MobileMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use client';
import useUI from '@austinserb/react-zero-ui';
import useUI from '@react-zero-ui/core';
import clsx from 'clsx';
import Link from 'next/link';

Expand Down
2 changes: 1 addition & 1 deletion examples/demo/src/app/components/MobileMenuButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import clsx from 'clsx';
import { useMotionValueEvent } from 'motion/react';
import { useScroll } from 'motion/react';

import useUI from '@austinserb/react-zero-ui';
import useUI from '@react-zero-ui/core';
import { useIsMobile } from '@/hooks/useIsMobile';
import { DotMenuIcon } from './DotMenuIcon';

Expand Down
2 changes: 1 addition & 1 deletion examples/demo/src/app/components/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const TopBarV2: React.FC = () => {
))}
<li className="flex">
<Link
href="https://github.com/Austin1serb/React-Zero-UI"
href="https://github.com/react-zero-ui/core"
target="_blank"
className="bubble-hover hidden w-fit !flex-row items-center gap-2 rounded-full border border-gray-200 px-3 py-1 font-medium shadow-md duration-300 hover:translate-y-0.5 hover:border-white hover:shadow-none md:flex">
<Icon
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/src/app/zero-ui/Dashboard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use client';
import useUI from '@austinserb/react-zero-ui';
import useUI from '@react-zero-ui/core';
import { InnerDot } from './InnerDot';
import Link from 'next/link';

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"bootstrap": "pnpm install --frozen-lockfile && pnpm prepack:core && pnpm i-tarball",
"test": "cd packages/core && pnpm test:all",
"test:all": "pnpm install --frozen-lockfile && pnpm prepack:core && pnpm lint && pnpm i-tarball && cd packages/core && pnpm test:all",
"prepack:core": "pnpm -F @austinserb/react-zero-ui pack --pack-destination ./dist",
"prepack:core": "pnpm -F @react-zero-ui/core pack --pack-destination ./dist",
"i-tarball": "node scripts/install-local-tarball.js",
"test:vite": "cd packages/core && pnpm test:vite",
"test:next": "cd packages/core && pnpm test:next",
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ It works by:
3. Updating `data-*` attributes on `<body>` to drive the UI instantly

👉 Live Demo: [https://react-zero-ui.vercel.app](https://react-zero-ui.vercel.app)
👉 Package: [https://www.npmjs.com/package/@austinserb/react-zero-ui](https://www.npmjs.com/package/@austinserb/react-zero-ui)
👉 Package: [https://www.npmjs.com/package/@react-zero-ui/core](https://www.npmjs.com/package/@react-zero-ui/core)

---

Expand All @@ -52,19 +52,19 @@ That's it — you'll get:
Powered by:

```json
"@austinserb/react-zero-ui": "^1.0.21"
"@react-zero-ui/core": "^1.0.21"
```

Full docs and live benchmarks:
👉 [https://github.com/austin1serb/react-zero-ui](https://github.com/austin1serb/react-zero-ui)
👉 [https://github.com/react-zero-ui/core](https://github.com/react-zero-ui/core)

---

## 🧬 Example Usage

## 🏄‍♂️ Usage

![react zero ui usage explained](https://raw.githubusercontent.com/Austin1serb/React-Zero-UI/main/docs/assets/useui-explained.webp)
![react zero ui usage explained](https://raw.githubusercontent.com/react-zero-ui/core/main/docs/assets/useui-explained.webp)

---

Expand Down
5 changes: 3 additions & 2 deletions packages/cli/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ const exec = (cmd, args) => spawnSync(pm, [cmd, ...args], { cwd: target, stdio:
if (!existsSync(resolve(target, 'package.json'))) exec('init', ['-y']);

/* 2️⃣ runtime dependency */
exec(pm === 'yarn' ? 'add' : 'install', ['@austinserb/react-zero-ui']);
exec(pm === 'yarn' ? 'add' : 'install', ['@react-zero-ui/core']);

/* 3️⃣ dev deps */
// TODO figure out if we can do it without tailwindcss and only the postcss plugin
exec(pm === 'yarn' ? 'add' : 'install', ['postcss', 'tailwindcss', '@tailwindcss/postcss', '--save-dev']);

/* 4️⃣ handoff */
const { default: zeroUiCli } = await import('@austinserb/react-zero-ui/cli');
const { default: zeroUiCli } = await import('@react-zero-ui/core/cli');
if (typeof zeroUiCli === 'function') {
zeroUiCli(process.argv.slice(3));
console.log(`\n🎉 Zero-UI installed. Run \`${pm} run dev\`!\n`);
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-zero-ui",
"version": "1.0.6",
"version": "1.0.7",
"type": "module",
"main": "./bin.js",
"bin": {
Expand All @@ -16,7 +16,7 @@
"LICENSE"
],
"dependencies": {
"@austinserb/react-zero-ui": "^1.0.21",
"@react-zero-ui/core": "^0.1.0",
"postcss": "^8.4.27",
"tailwindcss": "^4.0.0",
"@tailwindcss/postcss": "^4.1.8"
Expand Down
Loading