@notionhive/menus 0.1.0 → 0.1.2
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/README.md +102 -0
- package/package.json +4 -3
package/README.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# @notionhive/menus
|
|
2
|
+
|
|
3
|
+
Copy **editable menus** into your Next.js project — source you own and can change locally, not a black-box `node_modules` import.
|
|
4
|
+
|
|
5
|
+
Works like `shadcn add`: run once per component to eject files into your app.
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
Your project needs:
|
|
10
|
+
|
|
11
|
+
- **Node.js** 18+
|
|
12
|
+
- **Next.js** 16+
|
|
13
|
+
- **Tailwind CSS** v4
|
|
14
|
+
- **prop-types**
|
|
15
|
+
|
|
16
|
+
Path alias `@/` should resolve to your project root (default in Next.js).
|
|
17
|
+
|
|
18
|
+
## Quick start
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx @notionhive/menus add menu-01
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Target a specific app directory:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx @notionhive/menus add menu-01 --dir ./my-app
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
List all available menus:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx @notionhive/menus list
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Use in your app
|
|
37
|
+
|
|
38
|
+
```jsx
|
|
39
|
+
import { Menu01 } from "@/components/Menu01";
|
|
40
|
+
|
|
41
|
+
export default function Page() {
|
|
42
|
+
return <Menu01 />;
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Props are defined in `Menu01.propTypes.js` inside the copied folder. Override any prop in JSX or spread defaults from that file.
|
|
47
|
+
|
|
48
|
+
## What gets copied
|
|
49
|
+
|
|
50
|
+
| Path | Description |
|
|
51
|
+
|------|-------------|
|
|
52
|
+
| `components/<Name>/` | Component source + `propTypes` |
|
|
53
|
+
| `components/_shared/` | SafeImage, hooks, molecules (only what the component needs) |
|
|
54
|
+
| `public/menus/...` | Static assets when the design uses them |
|
|
55
|
+
|
|
56
|
+
Re-run with `--force` to overwrite existing files:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npx @notionhive/menus add menu-01 --force
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Available menus
|
|
63
|
+
|
|
64
|
+
- `menu-01` → `Menu01`
|
|
65
|
+
- `menu-02` → `Menu02`
|
|
66
|
+
- `menu-03` → `Menu03`
|
|
67
|
+
- `menu-04` → `Menu04`
|
|
68
|
+
- `menu-05` → `Menu05`
|
|
69
|
+
- `menu-06` → `Menu06`
|
|
70
|
+
|
|
71
|
+
## CLI reference
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npx @notionhive/menus add <menu-id> [--dir <path>] [--force]
|
|
75
|
+
npx @notionhive/menus list
|
|
76
|
+
npx @notionhive/menus --help
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
| Flag | Description |
|
|
80
|
+
|------|-------------|
|
|
81
|
+
| `--dir` | Target project root (default: current directory) |
|
|
82
|
+
| `--force` | Overwrite files that already exist |
|
|
83
|
+
|
|
84
|
+
## Other categories
|
|
85
|
+
|
|
86
|
+
| Package | Example |
|
|
87
|
+
|---------|---------|
|
|
88
|
+
| `@notionhive/heroes` | `npx @notionhive/heroes add hero-05` |
|
|
89
|
+
| `@notionhive/about` | `npx @notionhive/about add about-01` |
|
|
90
|
+
| `@notionhive/services` | `npx @notionhive/services add service-01` |
|
|
91
|
+
| `@notionhive/testimonials` | `npx @notionhive/testimonials add testimonial-01` |
|
|
92
|
+
| `@notionhive/contacts` | `npx @notionhive/contacts add contact-01` |
|
|
93
|
+
| `@notionhive/footers` | `npx @notionhive/footers add footer-07` |
|
|
94
|
+
| `@notionhive/ctas` | `npx @notionhive/ctas add cta-03` |
|
|
95
|
+
|
|
96
|
+
## Browse components
|
|
97
|
+
|
|
98
|
+
See the Notionhive component library Storybook for previews, props, and eject commands for every variant.
|
|
99
|
+
|
|
100
|
+
## License
|
|
101
|
+
|
|
102
|
+
UNLICENSED — internal Notionhive use unless otherwise specified.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@notionhive/menus",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Add editable menus into your Next.js project.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"bin": {
|
|
@@ -10,13 +10,14 @@
|
|
|
10
10
|
"bin",
|
|
11
11
|
"registry",
|
|
12
12
|
"templates",
|
|
13
|
-
"category.config.json"
|
|
13
|
+
"category.config.json",
|
|
14
|
+
"README.md"
|
|
14
15
|
],
|
|
15
16
|
"scripts": {
|
|
16
17
|
"prepublishOnly": "node ../../scripts/sync-templates.js"
|
|
17
18
|
},
|
|
18
19
|
"dependencies": {
|
|
19
|
-
"@notionhive/core": "0.1.
|
|
20
|
+
"@notionhive/core": "0.1.2"
|
|
20
21
|
},
|
|
21
22
|
"engines": {
|
|
22
23
|
"node": ">=18"
|