andy-note-nuxt 0.2.0
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/LICENSE +21 -0
- package/README.md +127 -0
- package/app/.claude/skills/ai-annotator/SKILL.md +31 -0
- package/app/app.config.ts +20 -0
- package/app/app.vue +7 -0
- package/app/assets/css/main.css +609 -0
- package/app/components/ContentView.vue +838 -0
- package/app/components/LocalStorageChecklist.vue +372 -0
- package/app/components/StackedColumn.vue +81 -0
- package/app/components/StackedColumns.vue +216 -0
- package/app/composables/useStack.ts +331 -0
- package/app/layouts/default.vue +22 -0
- package/app/pages/[...slug].vue +3 -0
- package/app/types/app-config.d.ts +19 -0
- package/content/index.md +25 -0
- package/content/license.md +62 -0
- package/nuxt.config.ts +76 -0
- package/package.json +55 -0
- package/tailwind.config.js +64 -0
- package/tsconfig.json +18 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nguyen Van Duoc
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# andy-note-nuxt
|
|
2
|
+
|
|
3
|
+
Brutalist-terminal **Nuxt 4 + Nuxt Content v3 theme** packaged as a [Nuxt Layer](https://nuxt.com/docs/getting-started/layers). Stacked-column navigation (click a note → new column pushes from the right), warm-dark palette with lime accent + flat 4px stamp shadows. Designed for personal notes, guides, and second-brain knowledge bases.
|
|
4
|
+
|
|
5
|
+
## Quick start — use as a layer
|
|
6
|
+
|
|
7
|
+
Create a fresh Nuxt project (or use any existing one), then add `extends`:
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
// nuxt.config.ts in YOUR project
|
|
11
|
+
export default defineNuxtConfig({
|
|
12
|
+
extends: ['github:nguyenvanduocit/andy-note-nuxt'],
|
|
13
|
+
app: {
|
|
14
|
+
head: { title: 'My Notes' }
|
|
15
|
+
}
|
|
16
|
+
})
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Install minimal deps (the rest come from the layer's `package.json`):
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
bun add nuxt @nuxt/content @nuxtjs/tailwindcss vue vue-router
|
|
23
|
+
bun add -D tailwindcss
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Write your first note:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
mkdir -p content/projects
|
|
30
|
+
cat > content/projects/hello.md <<'EOF'
|
|
31
|
+
---
|
|
32
|
+
title: "Hello"
|
|
33
|
+
description: "My first note."
|
|
34
|
+
---
|
|
35
|
+
# Hello world
|
|
36
|
+
EOF
|
|
37
|
+
|
|
38
|
+
bun dev
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
That's it. Visit `localhost:3000` — the layer ships a landing page, a license page, and the stacked-column navigation engine. Your `content/projects/` folder auto-appears as a section group.
|
|
42
|
+
|
|
43
|
+
## Quick start — clone & customize
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
gh repo clone nguyenvanduocit/andy-note-nuxt my-notes
|
|
47
|
+
cd my-notes
|
|
48
|
+
bun install
|
|
49
|
+
bun dev
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Edit `app/app.config.ts` for branding/menu, `nuxt.config.ts` for `<title>`, and start writing in `content/`.
|
|
53
|
+
|
|
54
|
+
## What's included
|
|
55
|
+
|
|
56
|
+
| Path | Purpose |
|
|
57
|
+
|---|---|
|
|
58
|
+
| `app/components/StackedColumns.vue` | Stacked-column shell — drives the whole UX |
|
|
59
|
+
| `app/components/ContentView.vue` | Per-column renderer (handles index pages, listings, single docs) |
|
|
60
|
+
| `app/components/LocalStorageChecklist.vue` | Persistent checklist embeddable in any markdown |
|
|
61
|
+
| `app/composables/useStack.ts` | Stack state machine (push/pop columns, URL sync) |
|
|
62
|
+
| `app/assets/css/main.css` | Brutalist terminal theme — Tailwind v3 base + custom prose layers |
|
|
63
|
+
| `tailwind.config.js` | Color palette + stamp shadow tokens |
|
|
64
|
+
| `content/index.md` | Default landing page |
|
|
65
|
+
| `content/license.md` | Default license page (override in your child project) |
|
|
66
|
+
|
|
67
|
+
**Not included** — the layer intentionally does NOT ship a `content.config.ts`. Schemas are project-specific, and Nuxt Content v3.13+ requires the consumer to install `zod` + `zod-to-json-schema` themselves. Your child project owns the schema. A minimal starter looks like:
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
// content.config.ts in YOUR project
|
|
71
|
+
import { defineCollection, defineContentConfig, z } from '@nuxt/content'
|
|
72
|
+
|
|
73
|
+
export default defineContentConfig({
|
|
74
|
+
collections: {
|
|
75
|
+
content: defineCollection({
|
|
76
|
+
type: 'page',
|
|
77
|
+
source: '**/*.md',
|
|
78
|
+
schema: z.object({
|
|
79
|
+
description: z.string().optional(),
|
|
80
|
+
tags: z.array(z.string()).optional(),
|
|
81
|
+
created: z.string().optional(),
|
|
82
|
+
updated: z.string().optional(),
|
|
83
|
+
// ...add fields as your notes evolve
|
|
84
|
+
}),
|
|
85
|
+
}),
|
|
86
|
+
},
|
|
87
|
+
})
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Override anything
|
|
91
|
+
|
|
92
|
+
Nuxt Layers deep-merge child over parent. Override semantics:
|
|
93
|
+
|
|
94
|
+
- **Components / pages / layouts / composables** → create a file with the same path in your project (e.g. `app/components/ContentView.vue`) and it replaces the layer's.
|
|
95
|
+
- **`nuxt.config.ts`** → deep-merged. Your `app.head` keys override the layer's.
|
|
96
|
+
- **`app/app.config.ts`** → deep-merged. Override `site.*` and `menu[]`.
|
|
97
|
+
- **`tailwind.config.js`** → NOT auto-merged by Nuxt. If you need a different palette, copy the file into your project; Tailwind picks up your project's config.
|
|
98
|
+
- **Content** → child `content/<path>.md` overrides parent's same-path file (e.g. `content/license.md` in your project replaces the layer's default license page).
|
|
99
|
+
|
|
100
|
+
## Schema
|
|
101
|
+
|
|
102
|
+
`content.config.ts` ships a permissive schema — every field is optional. Common fields available out of the box:
|
|
103
|
+
|
|
104
|
+
- Universal: `title`, `description`, `tags[]`, `status`, `created`, `updated`, `author`, `weight`
|
|
105
|
+
- Game / domain tagging: `game`, `league`, `patch` (renders as badges in headers)
|
|
106
|
+
- Build / recipe: `class`, `ascendancy`, `budget_tier`, `build_tags{}`, `ratings{}`, `pob_link`
|
|
107
|
+
- Economy: `strategy_tier`, `profit_per_hour`, `investment_tier`
|
|
108
|
+
- Skill / technique: `gem_color`, `skill_type`, `level_requirement`, `skill_tags[]`
|
|
109
|
+
- Instance / character: `level`, `progress_stage`
|
|
110
|
+
- Item / class / league: `rarity`, `item_class`, `class_type`, `complexity`, `league_type`
|
|
111
|
+
|
|
112
|
+
Unused fields cost nothing (null in cache). To replace the schema entirely, override `content.config.ts` in your child project.
|
|
113
|
+
|
|
114
|
+
## Conventions baked in
|
|
115
|
+
|
|
116
|
+
- **Stacked-column navigation** — clicking an internal link pushes a new column. Use `[Link](/path)` syntax in markdown; the renderer intercepts and stacks instead of routing away.
|
|
117
|
+
- **`updated` / `created` recency sort** — section listings rank by most recently updated descendant first.
|
|
118
|
+
- **Section auto-grouping** — any subfolder of `content/` becomes a section automatically; no manual registration.
|
|
119
|
+
- **`document_type: convention`** — pages with this frontmatter are excluded from listings (use for template/scaffolding docs).
|
|
120
|
+
|
|
121
|
+
## Tech stack
|
|
122
|
+
|
|
123
|
+
Nuxt 4 · Nuxt Content v3 (SQLite cache via better-sqlite3) · TailwindCSS v3 · Vue 3.5 · Self-hosted fonts (Space Grotesk + Literata via `@fontsource`)
|
|
124
|
+
|
|
125
|
+
## License
|
|
126
|
+
|
|
127
|
+
[MIT](./LICENSE). See [`/license` page](./content/license.md) for usage notes around theme code vs. user content licensing.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-annotator
|
|
3
|
+
description: This skill should be used when the user asks to "check browser feedback", "get user feedback", "capture screenshot", "inspect element", "inject CSS", "inject JS", "read console logs", or mentions AI Annotator, browser session, or UI feedback.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
AI Annotator provides access to the user's live browser session. Users select UI elements and add feedback comments. Use the REST API to read feedback, capture screenshots, inject CSS/JS, and read console logs.
|
|
7
|
+
|
|
8
|
+
Server: `http://127.0.0.1:7318`
|
|
9
|
+
|
|
10
|
+
## REST API
|
|
11
|
+
|
|
12
|
+
All endpoints return JSON. Obtain session ID from `GET /api/sessions` first.
|
|
13
|
+
|
|
14
|
+
| Method | Endpoint | Body/Query | Description |
|
|
15
|
+
|--------|----------|------------|-------------|
|
|
16
|
+
| `GET` | `http://127.0.0.1:7318/api/sessions` | — | List connected browser sessions |
|
|
17
|
+
| `GET` | `http://127.0.0.1:7318/api/sessions/:id/page-context` | — | Page URL, title, selection count |
|
|
18
|
+
| `POST` | `http://127.0.0.1:7318/api/sessions/:id/select` | `{mode?, selector?, selectorType?}` | Trigger feedback selection |
|
|
19
|
+
| `GET` | `http://127.0.0.1:7318/api/sessions/:id/feedback` | `?fields=xpath,attributes,styles,children` | Get selected feedback items |
|
|
20
|
+
| `DELETE` | `http://127.0.0.1:7318/api/sessions/:id/feedback` | — | Clear all selections |
|
|
21
|
+
| `POST` | `http://127.0.0.1:7318/api/sessions/:id/screenshot` | `{type?, selector?, quality?}` | Capture screenshot |
|
|
22
|
+
| `POST` | `http://127.0.0.1:7318/api/sessions/:id/inject-css` | `{css}` | Inject CSS into page |
|
|
23
|
+
| `POST` | `http://127.0.0.1:7318/api/sessions/:id/inject-js` | `{code}` | Execute JS in page context |
|
|
24
|
+
| `GET` | `http://127.0.0.1:7318/api/sessions/:id/console` | `?clear=true` | Get captured console logs |
|
|
25
|
+
|
|
26
|
+
## Workflow
|
|
27
|
+
|
|
28
|
+
1. `GET http://127.0.0.1:7318/api/sessions` → get session ID
|
|
29
|
+
2. `GET http://127.0.0.1:7318/api/sessions/{id}/feedback` → read user feedback
|
|
30
|
+
3. Make code changes based on feedback
|
|
31
|
+
4. `DELETE http://127.0.0.1:7318/api/sessions/{id}/feedback` → clear feedback after addressing it
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Site-wide config consumed by components via `useAppConfig()`.
|
|
2
|
+
// Override every field in your child project by creating your own `app/app.config.ts`
|
|
3
|
+
// — Nuxt deep-merges child over parent layer.
|
|
4
|
+
|
|
5
|
+
export default defineAppConfig({
|
|
6
|
+
site: {
|
|
7
|
+
title: 'Andy Notes',
|
|
8
|
+
description: 'Stacked-column knowledge base — extend, override, publish.',
|
|
9
|
+
tagline: 'A second-brain theme for Nuxt Content',
|
|
10
|
+
author: 'andy-note-nuxt',
|
|
11
|
+
themeColor: '#ff7b6b',
|
|
12
|
+
logo: '/logo.png',
|
|
13
|
+
},
|
|
14
|
+
// Top-level navigation. Empty by default — child projects populate with
|
|
15
|
+
// their own categories. Each entry maps to a `content/<slug>/` folder
|
|
16
|
+
// (or any static route under `pages/`).
|
|
17
|
+
menu: [
|
|
18
|
+
{ name: 'License', url: '/license', weight: 99 },
|
|
19
|
+
],
|
|
20
|
+
})
|