@underverse-ui/underverse 1.0.28 → 1.0.30
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/AGENTS.md +87 -0
- package/README.md +15 -0
- package/agent-recipes.json +42 -0
- package/api-reference.json +1499 -0
- package/dist/index.cjs +16 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -12
- package/dist/index.js.map +1 -1
- package/llms.txt +49 -0
- package/package.json +9 -3
package/AGENTS.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Underverse Agent Guide
|
|
2
|
+
|
|
3
|
+
This file is for coding agents and automation tools that need to use `@underverse-ui/underverse` quickly and correctly.
|
|
4
|
+
|
|
5
|
+
## Package Summary
|
|
6
|
+
|
|
7
|
+
- Package: `@underverse-ui/underverse`
|
|
8
|
+
- Runtime: React 18+ (supports Next.js and standalone React)
|
|
9
|
+
- Main entry: `@underverse-ui/underverse`
|
|
10
|
+
- Type definitions: `dist/index.d.ts`
|
|
11
|
+
- Machine-readable API snapshot: `api-reference.json`
|
|
12
|
+
- Quick LLM context: `llms.txt`
|
|
13
|
+
- Task recipes: `agent-recipes.json`
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm i @underverse-ui/underverse
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Common peers:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm i react react-dom
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Next.js projects may also need:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm i next next-intl
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Quick Usage
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
import { Button } from "@underverse-ui/underverse";
|
|
37
|
+
|
|
38
|
+
export function Example() {
|
|
39
|
+
return <Button>Click</Button>;
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Overlay Scrollbars (recommended)
|
|
44
|
+
|
|
45
|
+
Use the exported provider to enable overlay scrollbars (no layout width loss):
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
import "overlayscrollbars/overlayscrollbars.css";
|
|
49
|
+
import { OverlayScrollbarProvider } from "@underverse-ui/underverse";
|
|
50
|
+
|
|
51
|
+
export function App() {
|
|
52
|
+
return (
|
|
53
|
+
<>
|
|
54
|
+
<OverlayScrollbarProvider />
|
|
55
|
+
{/* app */}
|
|
56
|
+
</>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## i18n Notes
|
|
62
|
+
|
|
63
|
+
- Components work without `next-intl` using fallback translations.
|
|
64
|
+
- For app-level i18n integration:
|
|
65
|
+
- Use `TranslationProvider` / `UnderverseProvider`.
|
|
66
|
+
- Use `underverseMessages` or `getUnderverseMessages(locale)` for message bundles.
|
|
67
|
+
|
|
68
|
+
## Form Notes
|
|
69
|
+
|
|
70
|
+
- Form components are exported from main entry and depend on `react-hook-form` ecosystem peers.
|
|
71
|
+
- If an app does not use form features, those peers can often be omitted.
|
|
72
|
+
|
|
73
|
+
## API Discovery
|
|
74
|
+
|
|
75
|
+
Preferred order for automated tooling:
|
|
76
|
+
|
|
77
|
+
1. `api-reference.json` (fast machine parse).
|
|
78
|
+
2. `dist/index.d.ts` (accurate TS API surface).
|
|
79
|
+
3. `agent-recipes.json` / `llms.txt` (ready-to-apply usage).
|
|
80
|
+
4. `README.md` (integration guidance and additional context).
|
|
81
|
+
|
|
82
|
+
## Agent Rules
|
|
83
|
+
|
|
84
|
+
- Do not deep-import internal source paths from this package.
|
|
85
|
+
- Always import from `@underverse-ui/underverse`.
|
|
86
|
+
- Prefer exported `Props` types when generating wrappers or stories.
|
|
87
|
+
- Keep usage compatible with React 18+ and Next.js app router defaults.
|
package/README.md
CHANGED
|
@@ -30,6 +30,21 @@ A comprehensive UI component library for React/Next.js applications, extracted f
|
|
|
30
30
|
- Peer dependencies: `react`, `react-dom`
|
|
31
31
|
- Optional: `next`, `next-intl` (for Next.js projects)
|
|
32
32
|
|
|
33
|
+
## Agent-Readable Metadata
|
|
34
|
+
|
|
35
|
+
For coding agents and automation tools:
|
|
36
|
+
|
|
37
|
+
- `AGENTS.md`: concise usage and integration rules.
|
|
38
|
+
- `api-reference.json`: generated export index from `src/index.ts`.
|
|
39
|
+
- `llms.txt`: compact LLM-friendly quickstart.
|
|
40
|
+
- `agent-recipes.json`: structured setup/use recipes.
|
|
41
|
+
|
|
42
|
+
Regenerate API metadata:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm run generate:api
|
|
46
|
+
```
|
|
47
|
+
|
|
33
48
|
## Installation
|
|
34
49
|
|
|
35
50
|
```bash
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"package": "@underverse-ui/underverse",
|
|
3
|
+
"schemaVersion": 1,
|
|
4
|
+
"recipes": [
|
|
5
|
+
{
|
|
6
|
+
"id": "install-basic",
|
|
7
|
+
"title": "Install for React",
|
|
8
|
+
"steps": [
|
|
9
|
+
"npm i @underverse-ui/underverse",
|
|
10
|
+
"npm i react react-dom"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"id": "install-next",
|
|
15
|
+
"title": "Install for Next.js",
|
|
16
|
+
"steps": [
|
|
17
|
+
"npm i @underverse-ui/underverse",
|
|
18
|
+
"npm i react react-dom next next-intl"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "first-component",
|
|
23
|
+
"title": "Use first component",
|
|
24
|
+
"code": "import { Button } from \"@underverse-ui/underverse\";\n\nexport function Example(){\n return <Button>Click</Button>;\n}\n"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "overlay-scrollbar-provider",
|
|
28
|
+
"title": "Enable overlay scrollbars",
|
|
29
|
+
"code": "import \"overlayscrollbars/overlayscrollbars.css\";\nimport { OverlayScrollbarProvider } from \"@underverse-ui/underverse\";\n\nexport function App(){\n return <><OverlayScrollbarProvider />{/* app */}</>;\n}\n"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "api-discovery-order",
|
|
33
|
+
"title": "How agents should discover API",
|
|
34
|
+
"steps": [
|
|
35
|
+
"Read api-reference.json first",
|
|
36
|
+
"Read dist/index.d.ts second",
|
|
37
|
+
"Read AGENTS.md and README.md for integration notes"
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
|