@noobsociety/nsds 0.2.0 → 0.3.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/CHANGELOG.md +52 -8
- package/CONTRIBUTING.md +113 -10
- package/README.md +155 -377
- package/dist/components/buttons/Button.d.ts +17 -20
- package/dist/components/cards/FeatureCard.d.ts +15 -17
- package/dist/components/cards/QuestCard.d.ts +12 -15
- package/dist/components/hud/HUDBar.d.ts +15 -16
- package/dist/components/hud/HUDDivider.d.ts +9 -10
- package/dist/components/hud/HUDLabel.d.ts +21 -16
- package/dist/components/icons/RPGIcon.d.ts +25 -38
- package/dist/components/navigation/SectionArrow.d.ts +8 -12
- package/dist/components/react/index.d.ts +17 -0
- package/dist/components/shared/styles.d.ts +47 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -18
- package/dist/index.js +1959 -554
- package/dist/tailwind/preset.d.cts +4 -0
- package/dist/tailwind/preset.d.ts +4 -0
- package/package.json +55 -12
package/README.md
CHANGED
|
@@ -2,7 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Reusable design tokens, CSS primitives, Tailwind preset, and pixel-art React components for NoobSociety.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
NSDS is Tailwind-first and token-driven. It ships the public package surface needed by product apps: React components, CSS tokens, primitives, and a Tailwind preset.
|
|
6
|
+
|
|
7
|
+
## Contents
|
|
8
|
+
|
|
9
|
+
- [Install](#install)
|
|
10
|
+
- [Quick start](#quick-start)
|
|
11
|
+
- [Package exports](#package-exports)
|
|
12
|
+
- [Components](#components)
|
|
13
|
+
- [Documentation](#documentation)
|
|
14
|
+
- [Repository layout](#repository-layout)
|
|
15
|
+
- [Development](#development)
|
|
16
|
+
- [Versioning and releases](#versioning-and-releases)
|
|
17
|
+
- [License](#license)
|
|
6
18
|
|
|
7
19
|
## Install
|
|
8
20
|
|
|
@@ -10,19 +22,52 @@ The system is built around a single rule: **Monokai colors are semantic foregrou
|
|
|
10
22
|
npm install @noobsociety/nsds
|
|
11
23
|
```
|
|
12
24
|
|
|
25
|
+
Peer dependencies:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install react react-dom
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Quick start
|
|
32
|
+
|
|
33
|
+
Import the CSS entry once in your app:
|
|
34
|
+
|
|
13
35
|
```tsx
|
|
14
36
|
import '@noobsociety/nsds/styles';
|
|
15
|
-
import { Button, HUDBar, RPGIcon } from '@noobsociety/nsds';
|
|
16
37
|
```
|
|
17
38
|
|
|
18
|
-
|
|
19
|
-
|
|
39
|
+
Use React components from the package root:
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
import { Button, FeatureCard, HUDBar, RPGIcon } from '@noobsociety/nsds';
|
|
43
|
+
|
|
44
|
+
export function Example() {
|
|
45
|
+
return (
|
|
46
|
+
<FeatureCard
|
|
47
|
+
icon={<RPGIcon name="sword" />}
|
|
48
|
+
title="World UI"
|
|
49
|
+
body="Pixel-art components mapped to NSDS tokens."
|
|
50
|
+
tag="Live"
|
|
51
|
+
/>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Use the Tailwind preset in product apps:
|
|
57
|
+
|
|
58
|
+
```js
|
|
59
|
+
import nsdsPreset from '@noobsociety/nsds/tailwind';
|
|
60
|
+
|
|
61
|
+
export default {
|
|
62
|
+
presets: [nsdsPreset],
|
|
63
|
+
content: ['./src/**/*.{js,jsx,ts,tsx}'],
|
|
64
|
+
};
|
|
20
65
|
```
|
|
21
66
|
|
|
22
|
-
## Package
|
|
67
|
+
## Package exports
|
|
23
68
|
|
|
24
69
|
| Export | Purpose |
|
|
25
|
-
|
|
70
|
+
| --- | --- |
|
|
26
71
|
| `@noobsociety/nsds` | React components |
|
|
27
72
|
| `@noobsociety/nsds/react` | Compatibility alias for React components |
|
|
28
73
|
| `@noobsociety/nsds/tailwind` | Tailwind preset mapped to `--ns-*` tokens |
|
|
@@ -30,388 +75,121 @@ import nsdPreset from '@noobsociety/nsds/tailwind';
|
|
|
30
75
|
| `@noobsociety/nsds/styles.css` | CSS entry compatibility alias |
|
|
31
76
|
| `@noobsociety/nsds/tokens/*` | Individual token CSS files |
|
|
32
77
|
| `@noobsociety/nsds/primitives` | Component primitive CSS |
|
|
78
|
+
| `@noobsociety/nsds/components/primitives.css` | Component primitive CSS compatibility alias |
|
|
79
|
+
|
|
80
|
+
The npm package ships `dist/` plus package metadata, changelog, contribution guidance, security policy, and license.
|
|
81
|
+
|
|
82
|
+
## Components
|
|
83
|
+
|
|
84
|
+
Public React components:
|
|
85
|
+
|
|
86
|
+
- `Button`
|
|
87
|
+
- `FeatureCard`
|
|
88
|
+
- `QuestCard`
|
|
89
|
+
- `HUDBar`
|
|
90
|
+
- `HUDDivider`
|
|
91
|
+
- `HUDLabel`
|
|
92
|
+
- `RPGIcon`
|
|
93
|
+
- `HUDIcon`
|
|
94
|
+
- `SectionArrow`
|
|
95
|
+
|
|
96
|
+
Run Storybook for component documentation:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npm run storybook
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Build static Storybook documentation:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
npm run build:storybook
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Documentation
|
|
109
|
+
|
|
110
|
+
Public docs live in [`docs/`](./docs/README.md) and follow the Diataxis model:
|
|
111
|
+
|
|
112
|
+
- tutorials for first-time setup
|
|
113
|
+
- how-to guides for integration tasks
|
|
114
|
+
- reference pages for exports, tokens, classes, and generated API details
|
|
115
|
+
- explanation pages for design, accessibility, and versioning decisions
|
|
116
|
+
|
|
117
|
+
Generate the API reference from TypeScript source:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
npm run docs:api
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The static landing page lives in [`site/`](./site/index.html).
|
|
124
|
+
|
|
125
|
+
## Repository layout
|
|
126
|
+
|
|
127
|
+
| Path | Purpose |
|
|
128
|
+
| --- | --- |
|
|
129
|
+
| `styles.css` | Public CSS entry point |
|
|
130
|
+
| `tokens/` | CSS custom properties for color, type, spacing, motion, and HUD values |
|
|
131
|
+
| `components/` | TypeScript React source, primitive CSS, and Storybook stories |
|
|
132
|
+
| `tailwind/` | Tailwind preset source |
|
|
133
|
+
| `docs/` | Public documentation and generated API reference |
|
|
134
|
+
| `site/` | Static public landing page |
|
|
135
|
+
| `tests/` | Component and browser-rendered visual checks |
|
|
33
136
|
|
|
34
|
-
|
|
137
|
+
## Development
|
|
35
138
|
|
|
36
|
-
|
|
139
|
+
Use Node.js 22 or newer.
|
|
37
140
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
|
46
|
-
|
|
|
141
|
+
```bash
|
|
142
|
+
npm install
|
|
143
|
+
npm run check
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Common scripts:
|
|
147
|
+
|
|
148
|
+
| Script | Purpose |
|
|
149
|
+
| --- | --- |
|
|
150
|
+
| `npm run build` | Build the package into `dist/` |
|
|
151
|
+
| `npm run check` | Run build, package guards, type checks, tests, and import smoke checks |
|
|
152
|
+
| `npm run check:docs` | Regenerate API docs and fail when generated docs drift |
|
|
153
|
+
| `npm run check:exports` | Validate npm exports and declaration entry points |
|
|
154
|
+
| `npm run check:install` | Install the packed package in a temporary consumer project |
|
|
155
|
+
| `npm run docs:api` | Generate markdown API reference from TypeScript source |
|
|
156
|
+
| `npm run storybook` | Start component documentation locally |
|
|
157
|
+
| `npm run build:storybook` | Build static component documentation |
|
|
158
|
+
| `npm run test:components` | Run component behavior tests |
|
|
159
|
+
| `npm run test:visual` | Run browser-rendered visual checks |
|
|
160
|
+
| `npm run release:dry-run` | Preview the npm package contents |
|
|
161
|
+
| `npm run changeset` | Add a release note and version intent |
|
|
162
|
+
|
|
163
|
+
## Versioning and releases
|
|
164
|
+
|
|
165
|
+
NSDS follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html). All release notes use [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) categories.
|
|
47
166
|
|
|
48
|
-
|
|
167
|
+
Use Changesets for release intent:
|
|
49
168
|
|
|
50
|
-
|
|
169
|
+
```bash
|
|
170
|
+
npm run changeset
|
|
171
|
+
```
|
|
51
172
|
|
|
52
|
-
|
|
173
|
+
Maintainers create release commits with:
|
|
53
174
|
|
|
54
|
-
|
|
175
|
+
```bash
|
|
176
|
+
npm run changeset:version
|
|
177
|
+
```
|
|
55
178
|
|
|
56
|
-
|
|
57
|
-
|---|---|
|
|
58
|
-
| GitHub design system repo | https://github.com/noobsociety/nsds |
|
|
59
|
-
| Live product | https://noobsociety.com |
|
|
60
|
-
| Website source | https://github.com/noobsociety/noobsociety.com |
|
|
61
|
-
| Devblog | https://github.com/noobsociety/noobsociety.com/tree/main/docs/devblog |
|
|
62
|
-
| Local codebase | `nsds/` (mounted via File System Access API at time of authoring) |
|
|
179
|
+
That command applies Changesets version bumps and promotes the current `[Unreleased]` changelog entries into a dated release section.
|
|
63
180
|
|
|
64
|
-
|
|
181
|
+
Open and merge the version commit as a normal release pull request. The release workflow publishes from `main` when the package version is not already on npm and `NPM_TOKEN` is configured.
|
|
65
182
|
|
|
66
|
-
|
|
183
|
+
Manual publishing remains available for maintainers after the version commit is prepared:
|
|
67
184
|
|
|
68
|
-
|
|
185
|
+
```bash
|
|
186
|
+
npm run check
|
|
187
|
+
npm run release:dry-run
|
|
188
|
+
npm run changeset:publish
|
|
189
|
+
```
|
|
69
190
|
|
|
70
|
-
|
|
191
|
+
## License
|
|
71
192
|
|
|
72
|
-
|
|
73
|
-
- **noobsociety.com** — The main web experience: a walkable isometric world for portfolios and identity. Single product; no separate mobile app or dashboard.
|
|
193
|
+
NSDS is released under the [MIT License](./LICENSE). MIT was selected using the guidance at [Choose a License](https://choosealicense.com/licenses/mit/) because it permits broad reuse with attribution and warranty disclaimers.
|
|
74
194
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
## CONTENT FUNDAMENTALS
|
|
78
|
-
|
|
79
|
-
### Voice and Tone
|
|
80
|
-
- **Direct.** Say what you mean. Cut filler.
|
|
81
|
-
- **Honest.** Never oversell. Let the work speak.
|
|
82
|
-
- **Playful.** Pixel culture references, dry wit, short punchy lines. Not corporate enthusiasm.
|
|
83
|
-
|
|
84
|
-
### Casing
|
|
85
|
-
- Sentence case everywhere. "Enter the world" — not "Enter The World".
|
|
86
|
-
- Title case only for proper nouns: "NoobSociety", "Phaser", "Cloudflare Pages".
|
|
87
|
-
- Status labels are ALL CAPS pixel text: `HOLDS`, `BUILDING`, `PLANNED`, `LATER`.
|
|
88
|
-
|
|
89
|
-
### Length
|
|
90
|
-
- Short sentences. One idea per sentence. "The site is a world. Pages are maps."
|
|
91
|
-
- Hero body copy: 1–2 sentences max.
|
|
92
|
-
- Button labels: 2–3 words, with a pixel symbol prefix: `▶ Enter the world`, `★ Star on GitHub`.
|
|
93
|
-
|
|
94
|
-
### Perspective
|
|
95
|
-
- Speak directly to the reader: "your cursor", "your work", "you walk".
|
|
96
|
-
- Avoid abstract third-person: never "users experience" — write "you experience".
|
|
97
|
-
|
|
98
|
-
### Emoji and Symbols
|
|
99
|
-
- **No emoji.** The product uses SVG pixel glyphs instead.
|
|
100
|
-
- Unicode pixel accents are used deliberately: `✦` (eyebrow/star), `▶` (play/CTA), `★` (GitHub star), `✓` (holds/done), `◌` (planned), `✦` (later/locked).
|
|
101
|
-
- Numbers only when specific and meaningful: "Gate 3", "9 gates", "32px".
|
|
102
|
-
|
|
103
|
-
### Specific Examples
|
|
104
|
-
- "Express identity and portfolio in a shared world." — hero subtitle
|
|
105
|
-
- "Not a card grid. A world." — section h2
|
|
106
|
-
- "Walk the world as a character. Objects open your work. No card grid." — CTA body
|
|
107
|
-
- "Live now. No download or sign-up." — live status line
|
|
108
|
-
- "Earlier gates must hold before later ones unlock." — roadmap subtitle
|
|
109
|
-
- "Society of Beginners · est. 2010" — footer byline
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
## VISUAL FOUNDATIONS
|
|
114
|
-
|
|
115
|
-
### Color System
|
|
116
|
-
Two separate systems that never mix roles:
|
|
117
|
-
|
|
118
|
-
**Monokai foregrounds** — used on top of the canvas as text, icons, borders, accents, buttons, and status colors. One hue, one semantic role. Do not reassign.
|
|
119
|
-
|
|
120
|
-
| Token | Hex | Role |
|
|
121
|
-
|---|---|---|
|
|
122
|
-
| `--ns-ink` | `#f8f8f2` | Primary text |
|
|
123
|
-
| `--ns-ink-dim` | `#a8a28c` | Secondary / body copy |
|
|
124
|
-
| `--ns-ink-faint` | `#75715e` | Captions, timestamps, Monokai comment |
|
|
125
|
-
| `--ns-gold` | `#e6db74` | Primary accent — CTAs, wordmark "Society", eyebrows, active nav |
|
|
126
|
-
| `--ns-green` | `#a6e22e` | Holds / success / live |
|
|
127
|
-
| `--ns-orange` | `#fd971f` | Building / in-progress |
|
|
128
|
-
| `--ns-cyan` | `#66d9e8` | Planned / info |
|
|
129
|
-
| `--ns-pink` | `#f92672` | Highlight / danger / high-energy |
|
|
130
|
-
| `--ns-purple` | `#ae81ff` | Decorative / personal / identity |
|
|
131
|
-
|
|
132
|
-
**Dark canvas** — surfaces underneath the foregrounds.
|
|
133
|
-
|
|
134
|
-
| Token | Hex | Role |
|
|
135
|
-
|---|---|---|
|
|
136
|
-
| `--ns-bg-0` | `#1a1a16` | Deepest: footer, sidebar, backdrop |
|
|
137
|
-
| `--ns-bg-1` | `#272822` | Page base |
|
|
138
|
-
| `--ns-bg-2` | `#32332b` | Raised surfaces, icon slots, input fill |
|
|
139
|
-
| `--ns-glass` | `rgba(30,31,26,.88)` | Card and header glass |
|
|
140
|
-
|
|
141
|
-
The default experience is **always dark**. No light mode.
|
|
142
|
-
|
|
143
|
-
### Typography
|
|
144
|
-
Two fonts. No others.
|
|
145
|
-
|
|
146
|
-
- **Press Start 2P** — wordmark, buttons, status pills, card headings, section accents, and any pixel UI. Always with generous line height (`1.45–1.5`). Keep it short — it gets unreadable when it wraps.
|
|
147
|
-
- **Inter** — body copy, nav links, subtitles, paragraphs, dense information. Clean, readable at any size.
|
|
148
|
-
|
|
149
|
-
**Type scale:**
|
|
150
|
-
- Hero h1: `clamp(2rem, 1rem + 3vw, 3.5rem)` Press Start 2P
|
|
151
|
-
- Section h2: `clamp(1.8rem, 1rem + 2vw, 2.4rem)` Inter 700
|
|
152
|
-
- Card h3: `11px` Press Start 2P
|
|
153
|
-
- Body lead: `1.25rem` Inter 500
|
|
154
|
-
- Body: `1rem` Inter 400, `color: --ns-ink-dim`
|
|
155
|
-
- Caption: `0.875rem` Inter, `color: --ns-ink-faint`
|
|
156
|
-
- Eyebrow: `13px` Inter 700, uppercase, `letter-spacing: 0.18em`, gold
|
|
157
|
-
|
|
158
|
-
### Backgrounds and Surfaces
|
|
159
|
-
- **Page body**: `#272822` base + subtle radial gradients (pink top-right 11% opacity, purple top-left 7% opacity) + fixed attachment for depth.
|
|
160
|
-
- **Hero section**: full-bleed `bg.png` world image with a left-to-right dark gradient overlay (97%→20% opacity). Scanline overlay (`repeating-linear-gradient`) for pixel-screen texture. Animated star field (radial dot pattern, twinkle animation).
|
|
161
|
-
- **Cards**: glass surface — `rgba(30,31,26,.88)` + `backdrop-filter: blur(8px)`. No resting shadow.
|
|
162
|
-
- **Header**: glass — `rgba(30,31,26,.88)` + `backdrop-filter: blur(12px)`.
|
|
163
|
-
- **Footer**: solid `#1a1a16` (bg-0), the deepest surface.
|
|
164
|
-
- **Imagery**: pixel-art sprites with `image-rendering: pixelated`. World screenshots are cooler-toned with slight desaturation. No grain, no warm toning.
|
|
165
|
-
|
|
166
|
-
### Cards
|
|
167
|
-
- Glass surface: `rgba(30,31,26,.88)` + `backdrop-filter: blur(8px)`
|
|
168
|
-
- Border: `1px solid rgba(255,255,255,.22)` (strong) or `.12` (soft)
|
|
169
|
-
- Radius: `10px` (lg) for feature/quest cards
|
|
170
|
-
- Resting shadow: **none**
|
|
171
|
-
- Hover: `transform: translateY(-4px)` + `box-shadow: 0 16px 34px rgba(0,0,0,.38)` + border-color shifts to `rgba(230,219,116,.55)` (gold glow)
|
|
172
|
-
- Hover transition: `150ms ease-out`
|
|
173
|
-
|
|
174
|
-
### Buttons
|
|
175
|
-
- **Play (primary)**: gold fill `#e6db74`, dark text `#1c1c17`, `border: 2px solid #cabb50`, `box-shadow: 0 3px 0 #b5a83f` (physical press shadow). On hover: `background: #f4f099`. On active: shadow disappears, `translateY(2px)`.
|
|
176
|
-
- **Ghost (secondary)**: transparent background, gold text, `border: 1px solid rgba(248,248,242,.45)`. On hover: gold fill, dark text.
|
|
177
|
-
- Both use Press Start 2P. Never Inter for buttons.
|
|
178
|
-
- Sizes: sm `9px / 0.625rem 0.875rem`, md `12px / 1rem 1.625rem`, lg `13px / 1.125rem 2rem`.
|
|
179
|
-
|
|
180
|
-
### Borders
|
|
181
|
-
- Soft border: `1px solid rgba(255,255,255,.08)`
|
|
182
|
-
- Default border: `1px solid rgba(255,255,255,.12)`
|
|
183
|
-
- Strong border: `1px solid rgba(255,255,255,.22)`
|
|
184
|
-
- Gold accent border: `2px solid #cabb50`
|
|
185
|
-
|
|
186
|
-
### Shadows
|
|
187
|
-
- Card resting: none
|
|
188
|
-
- Card hover: `0 1rem 2.125rem rgba(0,0,0,.38)`
|
|
189
|
-
- Modal: `0 1.5rem 3.5rem rgba(0,0,0,.5)`
|
|
190
|
-
- Button press: `0 3px 0 #b5a83f` (gold physical shadow)
|
|
191
|
-
- Section arrow: `0 0 0 4px rgba(230,219,116,.12), 0 12px 28px rgba(0,0,0,.36)`
|
|
192
|
-
|
|
193
|
-
### Corner Radii
|
|
194
|
-
- `4px` — tags, pills, icon slots, small UI
|
|
195
|
-
- `8px` — small buttons (sm)
|
|
196
|
-
- `10px` — cards, feature cards, quest cards
|
|
197
|
-
- `12px` — large containers (hero art frame, CTA panel)
|
|
198
|
-
- `9999px` — section arrow, live dot, full pills
|
|
199
|
-
|
|
200
|
-
### Spacing
|
|
201
|
-
4px grid, rem-based. Container max-width: `1080px`. Header height: `4rem` (64px) fixed. Section min-height: `100svh - 4rem`. Fluid container padding: `clamp(1rem, 4vw, 2rem)`.
|
|
202
|
-
|
|
203
|
-
### Motion and Animation
|
|
204
|
-
- **Interaction**: `150ms ease-out` for all hover/active transitions (color, border, shadow, transform).
|
|
205
|
-
- **Decorative**: slow and subtle. Bob: 3.6s ease-in-out. Blink: 1.5s steps(1). Live pulse: 2.4s. Star twinkle: 5.5s. Arrow nudge: 2s.
|
|
206
|
-
- **Spring easing**: `cubic-bezier(0.34, 1.56, 0.64, 1)` — used sparingly.
|
|
207
|
-
- **Reduced motion**: all `ns-*` animations are disabled via `@media (prefers-reduced-motion: reduce)`.
|
|
208
|
-
- No aggressive bounces or spins. Calm decorative motion only.
|
|
209
|
-
|
|
210
|
-
### Hover States
|
|
211
|
-
- Text/nav: color shifts to `--ns-gold` or `--ns-gold-pale`. No underline except nav active state.
|
|
212
|
-
- Cards: lift `translateY(-4px)` + shadow + gold border glow.
|
|
213
|
-
- Play button: lighter gold fill.
|
|
214
|
-
- Ghost button: fills with gold.
|
|
215
|
-
- Footer links: dimmed → primary ink.
|
|
216
|
-
|
|
217
|
-
### Transparency and Blur
|
|
218
|
-
- Glass cards and headers use `backdrop-filter: blur(8px–12px)`.
|
|
219
|
-
- Only applied over dark/neutral surfaces — never over bright imagery.
|
|
220
|
-
- Transparency layers reinforce depth without competing with foreground content.
|
|
221
|
-
|
|
222
|
-
### HUD Grid and Touch Targets
|
|
223
|
-
|
|
224
|
-
The in-game HUD lives in a **640×360 design canvas**, divided into a **3×3 cross layout** (matching the world grid). Each outer cell is 213×120px. With 5% padding per axis, the inner **8×8 grid cells** are:
|
|
225
|
-
|
|
226
|
-
- Each cell: **24×13.5px** (`--hud-grid-cell-w` / `--hud-grid-cell-h`)
|
|
227
|
-
- **Minimum element size: 2×2 cells = 48×27px** (`--hud-min-tap-w` / `--hud-min-tap-h`)
|
|
228
|
-
|
|
229
|
-
No interactive HUD element — button, hotbar slot, inventory cell, icon — may be smaller than 2×2 inner grid cells. Smaller is un-tappable on mobile and invisible at a glance. Passive elements (bars, dividers, borders) are exempt — their thin axis is intentional. At runtime the HUD scales by `--hud-scale` (~2–3×), mapping 48×27 design px to ~96×54 real px — above the 44px mobile minimum. the HUD scales by `--hud-scale` (~2–3×), mapping 48×27 design px to ~96×54 real px — above the 44px mobile minimum.
|
|
230
|
-
|
|
231
|
-
### Layout Rules
|
|
232
|
-
- Fixed header: `position: sticky; top: 0; z-index: 50`.
|
|
233
|
-
- Sections are full-viewport-height: `min-height: calc(100svh - 4rem)`.
|
|
234
|
-
- Container: `max-width: 1080px; margin-inline: auto`.
|
|
235
|
-
- Section arrow (`SectionArrow`): `position: absolute; left: 50%; bottom: 1.5rem`.
|
|
236
|
-
- Feature grid: `repeat(4, 1fr)` — collapses to `repeat(2, 1fr)` on mobile.
|
|
237
|
-
- Quest grid: `repeat(3, 1fr)` — collapses to `repeat(2, 1fr)` on mobile.
|
|
238
|
-
- Responsive baseline: `375×667` portrait and `667×375` landscape.
|
|
239
|
-
|
|
240
|
-
---
|
|
241
|
-
|
|
242
|
-
## ICONOGRAPHY
|
|
243
|
-
|
|
244
|
-
NoobSociety does not use an icon font or icon library. All icons are one of two types:
|
|
245
|
-
|
|
246
|
-
### RPG pixel-art icons
|
|
247
|
-
Original geometric SVG icons representing game taxonomy. All artwork is purpose-built — no external icon libraries or trademarks. Rendered at `16×16` viewBox with `image-rendering: pixelated`. Available via `RPGIcon` (or legacy `HUDIcon`) with a `name` prop. Full reference: `components/icons/rpgicons.card.html`.
|
|
248
|
-
|
|
249
|
-
### 1. Inline SVG glyphs
|
|
250
|
-
Simple, hand-crafted SVG shapes used as UI icons within components. They are small (10×10 or 12×8 viewBox) and always `fill="currentColor"` or `stroke="currentColor"` so they inherit the parent's Monokai color.
|
|
251
|
-
|
|
252
|
-
Key SVG icons:
|
|
253
|
-
- **Play triangle**: `viewBox="0 0 10 10"` polygon `1,0.5 9.5,5 1,9.5` — used in play buttons, BUILDING status
|
|
254
|
-
- **Star**: `viewBox="0 0 10 10"` polygon — used in eyebrows, GitHub CTA, LATER status
|
|
255
|
-
- **Chevron down**: `viewBox="0 0 12 8"` polyline `1,1.5 6,6.5 11,1.5` — used in SectionArrow
|
|
256
|
-
- **Cursor/lightning**: path icons for feature cards (unique per card)
|
|
257
|
-
|
|
258
|
-
These SVGs are inlined directly in JSX/HTML — not imported from files.
|
|
259
|
-
|
|
260
|
-
### 2. Pixel sprite PNGs
|
|
261
|
-
Pixel-art images for in-world interactables and the hero character. Rendered with `image-rendering: pixelated`. Always block-displayed, never inline. Used with `filter: drop-shadow()` for depth.
|
|
262
|
-
|
|
263
|
-
| File | Usage |
|
|
264
|
-
|---|---|
|
|
265
|
-
| `assets/logo.png` | Brand logo — header, footer, CTA panel |
|
|
266
|
-
| `assets/hero.png` | Main player character sprite |
|
|
267
|
-
| `assets/bloop.png` | Companion creature |
|
|
268
|
-
| `assets/lamp.png` | In-world lamp object |
|
|
269
|
-
| `assets/sign.png` | In-world notice sign |
|
|
270
|
-
| `assets/mailbox.png` | In-world mailbox object |
|
|
271
|
-
| `assets/prickle.png` | In-world cactus/plant |
|
|
272
|
-
| `assets/bg.png` | Hero section world background |
|
|
273
|
-
| `assets/plaza.png` | Plaza screenshot (world preview) |
|
|
274
|
-
|
|
275
|
-
### Unicode pixel accents
|
|
276
|
-
Used as decorative text marks — never as standalone icon replacements:
|
|
277
|
-
- `✦` — eyebrow marker, locked/later state
|
|
278
|
-
- `▶` — play/building state
|
|
279
|
-
- `✓` — holds/done state
|
|
280
|
-
- `◌` — planned/empty state
|
|
281
|
-
- `★` — GitHub star
|
|
282
|
-
|
|
283
|
-
### No emoji
|
|
284
|
-
Emoji are never used in NoobSociety interfaces.
|
|
285
|
-
|
|
286
|
-
---
|
|
287
|
-
|
|
288
|
-
## File Index
|
|
289
|
-
|
|
290
|
-
### Tokens & Styles
|
|
291
|
-
| Path | Contents |
|
|
292
|
-
|---|---|
|
|
293
|
-
| `styles.css` | Global CSS entry point — `@import` this one file |
|
|
294
|
-
| `tokens/colors.css` | Monokai foreground + dark canvas color tokens |
|
|
295
|
-
| `tokens/typography.css` | Font families, type scale, line heights, weights |
|
|
296
|
-
| `tokens/spacing.css` | 4px grid, fluid clamp tokens, radii, shadows, blur |
|
|
297
|
-
| `tokens/motion.css` | Duration, easing, transition shorthand, keyframes |
|
|
298
|
-
| `tokens/base.css` | Box-sizing reset, body defaults, focus ring, selection |
|
|
299
|
-
| `tokens/hud.css` | Game HUD, RPG element, and character panel tokens |
|
|
300
|
-
| `components/primitives.css` | Shared CSS primitive classes (`ns-button`, `ns-card`, `ns-site-nav`, etc.) |
|
|
301
|
-
|
|
302
|
-
### Components
|
|
303
|
-
| Path | Contents |
|
|
304
|
-
|---|---|
|
|
305
|
-
| `components/shared/styles.js` | Shared JS utilities: `cx`, `mergeStyles`, `nsTokens`, deprecated `NS`, `questStatus` |
|
|
306
|
-
| `components/buttons/Button.jsx` | Button — `play` and `ghost` variants, 3 sizes |
|
|
307
|
-
| `components/buttons/Button.d.ts` | Button TypeScript props interface + starting point tag |
|
|
308
|
-
| `components/buttons/Button.prompt.md` | Button usage guide for agents |
|
|
309
|
-
| `components/cards/FeatureCard.jsx` | FeatureCard — icon, title, body, semantic tag |
|
|
310
|
-
| `components/cards/FeatureCard.d.ts` | FeatureCard TypeScript props interface + starting point tag |
|
|
311
|
-
| `components/cards/FeatureCard.prompt.md` | FeatureCard usage guide for agents |
|
|
312
|
-
| `components/cards/QuestCard.jsx` | QuestCard — roadmap gate with done/active/planned/locked status |
|
|
313
|
-
| `components/cards/QuestCard.d.ts` | QuestCard TypeScript props interface + starting point tag |
|
|
314
|
-
| `components/cards/QuestCard.prompt.md` | QuestCard usage guide for agents |
|
|
315
|
-
| `components/hud/HUDBar.jsx` | HUDBar — stat bar with fill %, value overlay, and configurable colors |
|
|
316
|
-
| `components/hud/HUDBar.d.ts` | HUDBar TypeScript props interface |
|
|
317
|
-
| `components/hud/HUDLabel.jsx` | HUDLabel — pixel-font label with left/center/right alignment and scale |
|
|
318
|
-
| `components/hud/HUDLabel.d.ts` | HUDLabel TypeScript props interface |
|
|
319
|
-
| `components/hud/HUDDivider.jsx` | HUDDivider — vertical or horizontal 1px HUD rule |
|
|
320
|
-
| `components/hud/HUDDivider.d.ts` | HUDDivider TypeScript props interface |
|
|
321
|
-
| `components/icons/RPGIcon.jsx` | RPGIcon — 22 pixel-art icons: weapons, elements, races, sizes (exports `HUDIcon` alias for backward compat) |
|
|
322
|
-
| `components/icons/RPGIcon.d.ts` | RPGIcon TypeScript props interface |
|
|
323
|
-
| `components/navigation/SectionArrow.jsx` | SectionArrow — animated gold section scroll indicator |
|
|
324
|
-
| `components/navigation/SectionArrow.d.ts` | SectionArrow TypeScript props interface |
|
|
325
|
-
| `components/navigation/SectionArrow.prompt.md` | SectionArrow usage guide for agents |
|
|
326
|
-
|
|
327
|
-
### Guidelines (Design System tab cards)
|
|
328
|
-
| Path | Group | Contents |
|
|
329
|
-
|---|---|---|
|
|
330
|
-
| `guidelines/colors.card.html` | Colors | Full Monokai + dark background palette |
|
|
331
|
-
| `guidelines/semantic-colors.card.html` | Colors | Per-color semantic role table |
|
|
332
|
-
| `guidelines/type.card.html` | Type | Inter + Press Start 2P scale |
|
|
333
|
-
| `guidelines/pixel-accents.card.html` | Type | SVG pixel glyph reference |
|
|
334
|
-
| `guidelines/spacing.card.html` | Spacing | 4px grid + fluid clamp tokens |
|
|
335
|
-
| `guidelines/radii-shadows.card.html` | Spacing | Radius scale + shadow system |
|
|
336
|
-
| `guidelines/brand.card.html` | Brand | Logo and wordmark usage |
|
|
337
|
-
| `guidelines/sprites.card.html` | Brand | World sprite reference |
|
|
338
|
-
| `guidelines/backgrounds.card.html` | Brand | Surface and background treatments |
|
|
339
|
-
| `guidelines/motion.card.html` | Brand | Animation keyframes and timing tokens |
|
|
340
|
-
| `tailwind/preset.js` | — | Tailwind CSS preset — maps all `--ns-*` tokens into Tailwind theme |
|
|
341
|
-
| `components/buttons/buttons.card.html` | Components | Button specimen |
|
|
342
|
-
| `components/cards/cards.card.html` | Components | FeatureCard + QuestCard specimen |
|
|
343
|
-
| `components/navigation/navigation.card.html` | Components | SiteNav + SectionArrow specimen |
|
|
344
|
-
| `components/hud/hud.card.html` | Components | HUDBar + HUDLabel + HUDDivider specimen |
|
|
345
|
-
| `components/icons/rpgicons.card.html` | Components | RPGIcon — all 22 pixel-art icons by category |
|
|
346
|
-
| `_lab/game/index.html` | Lab | 667×375 drag-and-drop HUD canvas — 8×8 inner grid, player card (internal design tool) |
|
|
347
|
-
| `_lab/homepage/index.html` | Lab | Full homepage reference implementation (internal design tool) |
|
|
348
|
-
|
|
349
|
-
### Assets
|
|
350
|
-
| Path | Contents |
|
|
351
|
-
|---|---|
|
|
352
|
-
| `assets/logo.png` | Brand logo (pixel art) |
|
|
353
|
-
| `assets/hero.png` | Player character sprite |
|
|
354
|
-
| `assets/bloop.png` | Companion creature sprite |
|
|
355
|
-
| `assets/lamp.png`, `sign.png`, `mailbox.png`, `prickle.png` | World object sprites |
|
|
356
|
-
| `assets/bg.png` | Hero section world background |
|
|
357
|
-
| `assets/plaza.png` | Plaza world screenshot |
|
|
358
|
-
|
|
359
|
-
---
|
|
360
|
-
|
|
361
|
-
## HUD Components (`components/hud/`)
|
|
362
|
-
|
|
363
|
-
Pixel-art game HUD primitives for the in-game player card and character screen. All icons are original geometric designs — no external trademarks.
|
|
364
|
-
|
|
365
|
-
| Component | File | Description |
|
|
366
|
-
|---|---|---|
|
|
367
|
-
| `HUDBar` | `HUDBar.jsx` | Stat bar with fill %, value overlay, configurable colors |
|
|
368
|
-
| `HUDLabel` | `HUDLabel.jsx` | Pixel-font label — left / center / right alignment + scale |
|
|
369
|
-
| `HUDDivider` | `HUDDivider.jsx` | 1px rule — vertical (default) or horizontal, `--ns-line` color |
|
|
370
|
-
|
|
371
|
-
## RPG Icons (`components/icons/`)
|
|
372
|
-
|
|
373
|
-
Pixel-art game icons. Separate from HUD layout primitives — these represent game taxonomy (weapon type, element, race, body size). All artwork is original geometric design on a 16×16 viewBox with `image-rendering: pixelated`.
|
|
374
|
-
|
|
375
|
-
| Component | File | Description |
|
|
376
|
-
|---|---|---|
|
|
377
|
-
| `RPGIcon` | `RPGIcon.jsx` | 22 pixel-art icons across 4 categories. `HUDIcon` exported as backward-compat alias. |
|
|
378
|
-
|
|
379
|
-
### RPGIcon categories
|
|
380
|
-
|
|
381
|
-
| Category | Names |
|
|
382
|
-
|---|---|
|
|
383
|
-
| **Weapons (6)** | sword · staff · bow · katar · book · hammer |
|
|
384
|
-
| **Elements (8)** | neutral · earth · wind · water · fire · light · dark · void |
|
|
385
|
-
| **Races (5)** | human · beast · demon · angel · spirit |
|
|
386
|
-
| **Sizes (3)** | small · medium · large |
|
|
387
|
-
|
|
388
|
-
### Element color tokens (`tokens/hud.css`)
|
|
389
|
-
|
|
390
|
-
| Token | Hex | Element |
|
|
391
|
-
|---|---|---|
|
|
392
|
-
| `--hud-el-neutral` | `#888780` | Neutral |
|
|
393
|
-
| `--hud-el-earth` | `#8b6914` | Earth |
|
|
394
|
-
| `--hud-el-wind` | `#5dcaa5` | Wind |
|
|
395
|
-
| `--hud-el-water` | `#378add` | Water |
|
|
396
|
-
| `--hud-el-fire` | `#ba7517` | Fire |
|
|
397
|
-
| `--hud-el-dark` | `#888780` | Dark |
|
|
398
|
-
| `--hud-el-light` | `#fac775` | Light |
|
|
399
|
-
| `--hud-el-void` | `#7f77dd` | Void |
|
|
400
|
-
|
|
401
|
-
### Game View canvas (`_lab/game/index.html`)
|
|
402
|
-
|
|
403
|
-
667×375px drag-and-drop HUD builder. Each element is a draggable, resizable cell on an 8×8 pixel grid. Press **G** or click **GRID ON/OFF** to toggle edit mode.
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
The Tailwind preset (`tailwind/preset.js`) maps every `--ns-*` token to Tailwind theme keys. Add it once in `tailwind.config.ts` and use `bg-ns-bg-1`, `text-ns-gold`, `rounded-ns-md`, `font-pixel`, etc. throughout the app. See `guidelines/tailwind.card.html` for the full reference.
|
|
407
|
-
|
|
408
|
-
---
|
|
409
|
-
|
|
410
|
-
## Design Principles
|
|
411
|
-
|
|
412
|
-
1. **Monokai foregrounds only**: each Monokai color has one semantic role. Never reassign.
|
|
413
|
-
2. **Dark by default**: the canvas is always dark. No light-mode default.
|
|
414
|
-
3. **Pixel and Inter together**: Press Start 2P for identity and labels; Inter for reading.
|
|
415
|
-
4. **Calm motion**: decorative animations are slow and subtle. Interaction transitions are fast (150ms).
|
|
416
|
-
5. **Glass, not flat**: surfaces use `backdrop-filter` glass. Cards have no resting shadow.
|
|
417
|
-
6. **Minimal copy**: short sentences, pixel symbol prefixes, no emoji.
|
|
195
|
+
Only add third-party code, assets, or documentation when the license is compatible with MIT and the source is documented in the relevant change.
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
style?: React.CSSProperties;
|
|
18
|
-
type?: 'button' | 'submit' | 'reset';
|
|
1
|
+
import type { AnchorHTMLAttributes, HTMLAttributes, MouseEventHandler, ReactElement, ReactNode } from 'react';
|
|
2
|
+
export type ButtonVariant = 'play' | 'ghost';
|
|
3
|
+
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface ButtonProps extends Omit<HTMLAttributes<HTMLElement>, 'onClick'> {
|
|
5
|
+
/** Visual style. */
|
|
6
|
+
variant?: ButtonVariant;
|
|
7
|
+
/** Control size. */
|
|
8
|
+
size?: ButtonSize;
|
|
9
|
+
/** Render as an anchor when provided. */
|
|
10
|
+
href?: string;
|
|
11
|
+
rel?: string;
|
|
12
|
+
target?: AnchorHTMLAttributes<HTMLAnchorElement>['target'];
|
|
13
|
+
onClick?: MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>;
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
type?: 'button' | 'submit' | 'reset';
|
|
19
17
|
}
|
|
20
|
-
|
|
21
|
-
export declare function Button(props: ButtonProps): React.ReactElement;
|
|
18
|
+
export declare function Button({ variant, size, href, onClick, children, disabled, className, type, ...props }: ButtonProps): ReactElement;
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
export interface FeatureCardProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
style?: React.CSSProperties;
|
|
1
|
+
import type { LiHTMLAttributes, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { NSStyle } from '../shared/styles.js';
|
|
3
|
+
export interface FeatureCardProps extends Omit<LiHTMLAttributes<HTMLLIElement>, 'children' | 'style' | 'title'> {
|
|
4
|
+
/** Pixel-art icon element. */
|
|
5
|
+
icon: ReactNode;
|
|
6
|
+
/** Card heading. */
|
|
7
|
+
title: string;
|
|
8
|
+
/** Body copy. */
|
|
9
|
+
body: string;
|
|
10
|
+
/** Small tag label. */
|
|
11
|
+
tag?: string;
|
|
12
|
+
/** Icon accent color. */
|
|
13
|
+
iconColor?: string;
|
|
14
|
+
style?: NSStyle;
|
|
16
15
|
}
|
|
17
|
-
|
|
18
|
-
export declare function FeatureCard(props: FeatureCardProps): React.ReactElement;
|
|
16
|
+
export declare function FeatureCard({ icon, title, body, tag, iconColor, className, style, ...props }: FeatureCardProps): ReactElement;
|