@noobsociety/nsds 0.1.2 → 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/CHANGELOG.md +24 -3
- package/README.md +347 -193
- package/dist/components/hud/HUDBar.d.ts +17 -0
- package/dist/components/hud/HUDDivider.d.ts +11 -0
- package/dist/components/hud/HUDLabel.d.ts +17 -0
- package/dist/components/icons/RPGIcon.d.ts +42 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +587 -0
- package/{styles.css → dist/styles.css} +1 -0
- package/dist/tailwind/package.json +1 -0
- package/dist/tailwind/preset.js +144 -0
- package/{tokens → dist/tokens}/colors.css +25 -19
- package/dist/tokens/hud.css +133 -0
- package/{tokens → dist/tokens}/motion.css +9 -9
- package/{tokens → dist/tokens}/spacing.css +9 -16
- package/{tokens → dist/tokens}/typography.css +2 -2
- package/package.json +34 -62
- package/SKILL.md +0 -18
- package/assets/bg.png +0 -0
- package/assets/bloop.png +0 -0
- package/assets/hero.png +0 -0
- package/assets/lamp.png +0 -0
- package/assets/logo.png +0 -0
- package/assets/mailbox.png +0 -0
- package/assets/plaza.png +0 -0
- package/assets/prickle.png +0 -0
- package/assets/sign.png +0 -0
- package/components/buttons/Button.js +0 -55
- package/components/buttons/Button.prompt.md +0 -22
- package/components/buttons/buttons.card.html +0 -24
- package/components/cards/FeatureCard.js +0 -36
- package/components/cards/FeatureCard.prompt.md +0 -17
- package/components/cards/QuestCard.js +0 -27
- package/components/cards/QuestCard.prompt.md +0 -19
- package/components/cards/cards.card.html +0 -54
- package/components/navigation/SectionArrow.js +0 -28
- package/components/navigation/navigation.card.html +0 -29
- package/components/react/index.d.ts +0 -11
- package/components/react/index.js +0 -4
- package/components/shared/styles.js +0 -22
- package/guidelines/brand.card.html +0 -41
- package/guidelines/colors.card.html +0 -43
- package/guidelines/motion.card.html +0 -24
- package/guidelines/pixel-accents.card.html +0 -50
- package/guidelines/radii-shadows.card.html +0 -28
- package/guidelines/semantic-colors.card.html +0 -30
- package/guidelines/spacing.card.html +0 -53
- package/guidelines/sprites.card.html +0 -22
- package/guidelines/type.card.html +0 -24
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/mui-theme/ThemeProvider.js +0 -14
- package/mui-theme/ThemeProvider.tsx +0 -20
- package/mui-theme/examples/FeatureCard.tsx +0 -52
- package/mui-theme/examples/QuestStatusChip.tsx +0 -41
- package/mui-theme/examples/SectionHeader.tsx +0 -44
- package/mui-theme/index.d.ts +0 -49
- package/mui-theme/index.js +0 -2
- package/mui-theme/index.ts +0 -2
- package/mui-theme/preview.dc.html +0 -195
- package/mui-theme/support.js +0 -1513
- package/mui-theme/theme.js +0 -594
- package/mui-theme/theme.ts +0 -604
- package/references/noobsociety-monokai.dc.html +0 -360
- package/support.js +0 -1513
- package/ui-kits/homepage/index.html +0 -319
- /package/{components → dist/components}/buttons/Button.d.ts +0 -0
- /package/{components → dist/components}/cards/FeatureCard.d.ts +0 -0
- /package/{components → dist/components}/cards/QuestCard.d.ts +0 -0
- /package/{components → dist/components}/navigation/SectionArrow.d.ts +0 -0
- /package/{components → dist/components}/primitives.css +0 -0
- /package/{tokens → dist/tokens}/base.css +0 -0
package/README.md
CHANGED
|
@@ -1,263 +1,417 @@
|
|
|
1
1
|
# NoobSociety Design System
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://www.npmjs.com/package/@noobsociety/nsds)
|
|
5
|
-
[](LICENSE)
|
|
3
|
+
Reusable design tokens, CSS primitives, Tailwind preset, and pixel-art React components for NoobSociety.
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
The system is built around a simple rule: **Monokai colors are semantic foregrounds, dark surfaces are the world canvas.**
|
|
5
|
+
The system is built around a single rule: **Monokai colors are semantic foregrounds; dark surfaces are the world canvas.**
|
|
10
6
|
|
|
11
7
|
## Install
|
|
12
8
|
|
|
13
|
-
Install from npm:
|
|
14
|
-
|
|
15
9
|
```bash
|
|
16
10
|
npm install @noobsociety/nsds
|
|
17
11
|
```
|
|
18
12
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
{
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@noobsociety/nsds": "file:../design-system"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
13
|
+
```tsx
|
|
14
|
+
import '@noobsociety/nsds/styles';
|
|
15
|
+
import { Button, HUDBar, RPGIcon } from '@noobsociety/nsds';
|
|
27
16
|
```
|
|
28
17
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
Import the full CSS entry when you want tokens, base styles, and shared primitives:
|
|
32
|
-
|
|
33
|
-
```js
|
|
34
|
-
import '@noobsociety/nsds/styles.css';
|
|
18
|
+
```ts
|
|
19
|
+
import nsdPreset from '@noobsociety/nsds/tailwind';
|
|
35
20
|
```
|
|
36
21
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
```jsx
|
|
40
|
-
import '@noobsociety/nsds/styles.css';
|
|
41
|
-
import { Button, FeatureCard, QuestCard, SectionArrow } from '@noobsociety/nsds/react';
|
|
42
|
-
|
|
43
|
-
export function Example() {
|
|
44
|
-
return (
|
|
45
|
-
<Button href="https://noobsociety.com">▶ Enter the world</Button>
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
```
|
|
22
|
+
## Package Exports
|
|
49
23
|
|
|
50
|
-
|
|
24
|
+
| Export | Purpose |
|
|
25
|
+
|---|---|
|
|
26
|
+
| `@noobsociety/nsds` | React components |
|
|
27
|
+
| `@noobsociety/nsds/react` | Compatibility alias for React components |
|
|
28
|
+
| `@noobsociety/nsds/tailwind` | Tailwind preset mapped to `--ns-*` tokens |
|
|
29
|
+
| `@noobsociety/nsds/styles` | Full CSS entry |
|
|
30
|
+
| `@noobsociety/nsds/styles.css` | CSS entry compatibility alias |
|
|
31
|
+
| `@noobsociety/nsds/tokens/*` | Individual token CSS files |
|
|
32
|
+
| `@noobsociety/nsds/primitives` | Component primitive CSS |
|
|
51
33
|
|
|
52
|
-
|
|
53
|
-
import '@noobsociety/nsds/tokens/colors.css';
|
|
54
|
-
import logoUrl from '@noobsociety/nsds/assets/logo.png';
|
|
55
|
-
```
|
|
34
|
+
The npm package ships `dist/` plus standard package metadata. Source cards, lab files, assets, and guidelines stay in the repository for design-system development.
|
|
56
35
|
|
|
57
|
-
|
|
36
|
+
## Repo Layout
|
|
58
37
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
38
|
+
| Folder / file | Audience | Purpose |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `styles.css` | Public source | CSS entry point |
|
|
41
|
+
| `tokens/` | Public source | CSS custom properties: colors, type, spacing, motion, HUD |
|
|
42
|
+
| `components/` | Public source | React components, TypeScript declarations, primitive CSS |
|
|
43
|
+
| `tailwind/` | Public source | Tailwind preset |
|
|
44
|
+
| `guidelines/` | Design-system authors | Reference cards for the DS tab |
|
|
45
|
+
| `_lab/` | Internal | NS-team experiments and design tools |
|
|
46
|
+
| `assets/` | Internal | Product sprites and imagery used by lab/reference surfaces |
|
|
62
47
|
|
|
63
|
-
|
|
48
|
+
`_lab/` follows the underscore-prefix convention of generated files (`_ds_bundle.js`, `_ds_manifest.json`). The compiler skips underscore-prefixed folders, so `_lab/` files are invisible to DS consumers.
|
|
64
49
|
|
|
65
|
-
|
|
66
|
-
import { NSThemeProvider, theme, NS } from '@noobsociety/nsds/mui';
|
|
67
|
-
```
|
|
50
|
+
---
|
|
68
51
|
|
|
69
|
-
|
|
52
|
+
## Sources
|
|
70
53
|
|
|
71
|
-
|
|
54
|
+
This design system was built from the following resources. Readers with access are encouraged to explore them for the most current implementation details.
|
|
72
55
|
|
|
73
|
-
|
|
|
56
|
+
| Source | URL / Path |
|
|
74
57
|
|---|---|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
| `@noobsociety/nsds/components/primitives.css` | Component primitive classes only |
|
|
81
|
-
| `@noobsociety/nsds/tokens/*` | Individual token CSS files |
|
|
82
|
-
| `@noobsociety/nsds/assets/*` | Pixel assets and brand images |
|
|
83
|
-
| `@noobsociety/nsds/guidelines/*` | Specimen cards |
|
|
84
|
-
| `@noobsociety/nsds/references/*` | Polished `.dc.html` references |
|
|
85
|
-
| `@noobsociety/nsds/ui-kits/*` | Complete UI kits |
|
|
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) |
|
|
86
63
|
|
|
87
|
-
|
|
64
|
+
---
|
|
88
65
|
|
|
89
|
-
|
|
66
|
+
## About NoobSociety
|
|
90
67
|
|
|
91
|
-
|
|
68
|
+
NoobSociety is a pixel-art MMO-style website where the site itself is the portfolio. Pages are maps. Your cursor is a character. Objects open content overlays instead of new tabs. The project is built in the open using Phaser (game world), React (UI overlays), TypeScript, and Vite, deployed on Cloudflare Pages.
|
|
92
69
|
|
|
93
|
-
|
|
94
|
-
|---|---|---|
|
|
95
|
-
| `--ns-ink` | `#f8f8f2` | Primary text |
|
|
96
|
-
| `--ns-ink-faint` | `#75715e` | Muted text, captions, placeholders |
|
|
97
|
-
| `--ns-gold` | `#e6db74` | Primary accent, CTAs, eyebrows, active nav |
|
|
98
|
-
| `--ns-green` | `#a6e22e` | Success, live state, `HOLDS` |
|
|
99
|
-
| `--ns-orange` | `#fd971f` | In progress, active state, `BUILDING` |
|
|
100
|
-
| `--ns-cyan` | `#66d9e8` | Planned, info, links |
|
|
101
|
-
| `--ns-pink` | `#f92672` | Highlight, danger, high-energy accent |
|
|
102
|
-
| `--ns-purple` | `#ae81ff` | Decorative, personal, tertiary accent |
|
|
70
|
+
The tagline is **"Society of Beginners — est. 2010"**. The tone is direct, playful, and honest. Not corporate.
|
|
103
71
|
|
|
104
|
-
|
|
72
|
+
**Core products:**
|
|
73
|
+
- **noobsociety.com** — The main web experience: a walkable isometric world for portfolios and identity. Single product; no separate mobile app or dashboard.
|
|
105
74
|
|
|
106
|
-
|
|
75
|
+
---
|
|
107
76
|
|
|
108
|
-
|
|
109
|
-
|---|---|---|
|
|
110
|
-
| `--ns-bg-0` | `#1a1a16` | Deepest surface: footer, sidebar, backdrop |
|
|
111
|
-
| `--ns-bg-1` | `#272822` | Page base |
|
|
112
|
-
| `--ns-bg-2` | `#32332b` | Raised surface, icon slot, input fill |
|
|
113
|
-
| `--ns-glass` | `rgba(30,31,26,.88)` | Card and header glass |
|
|
77
|
+
## CONTENT FUNDAMENTALS
|
|
114
78
|
|
|
115
|
-
|
|
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.
|
|
116
83
|
|
|
117
|
-
|
|
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`.
|
|
118
88
|
|
|
119
|
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
123
|
-
- **Numbers:** Use numbers only when they are specific and meaningful.
|
|
124
|
-
- **Perspective:** Speak directly. Avoid abstract phrases like "users" and "visitors" when "you" is clearer.
|
|
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`.
|
|
125
93
|
|
|
126
|
-
|
|
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".
|
|
127
97
|
|
|
128
|
-
###
|
|
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".
|
|
129
102
|
|
|
130
|
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
-
|
|
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
|
|
134
110
|
|
|
135
|
-
|
|
111
|
+
---
|
|
136
112
|
|
|
137
|
-
|
|
138
|
-
- Default container width is `1080px`.
|
|
139
|
-
- Full sections use `min-height: calc(100svh - var(--ns-header-h))`.
|
|
140
|
-
- Responsive baseline: `375x667` portrait and `667x375` landscape.
|
|
113
|
+
## VISUAL FOUNDATIONS
|
|
141
114
|
|
|
142
|
-
###
|
|
115
|
+
### Color System
|
|
116
|
+
Two separate systems that never mix roles:
|
|
143
117
|
|
|
144
|
-
|
|
145
|
-
- Do not add resting drop shadows.
|
|
146
|
-
- Use hover elevation only: `translateY(-4px)` plus the card hover shadow.
|
|
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.
|
|
147
119
|
|
|
148
|
-
|
|
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 |
|
|
149
131
|
|
|
150
|
-
|
|
151
|
-
- `ghost` buttons stay transparent until hover.
|
|
152
|
-
- Buttons use `Press Start 2P`.
|
|
132
|
+
**Dark canvas** — surfaces underneath the foregrounds.
|
|
153
133
|
|
|
154
|
-
|
|
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 |
|
|
155
140
|
|
|
156
|
-
|
|
157
|
-
- Keep decorative motion subtle.
|
|
158
|
-
- Respect reduced motion; `ns-*` animations are disabled under `prefers-reduced-motion: reduce`.
|
|
141
|
+
The default experience is **always dark**. No light mode.
|
|
159
142
|
|
|
160
|
-
|
|
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.
|
|
161
165
|
|
|
162
|
-
###
|
|
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`
|
|
163
173
|
|
|
164
|
-
|
|
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
|
+
---
|
|
165
287
|
|
|
166
|
-
|
|
167
|
-
<Button variant="play" href="https://noobsociety.com">▶ Enter the world</Button>
|
|
168
|
-
<Button variant="ghost" href="https://github.com/noobsociety">★ Star on GitHub</Button>
|
|
169
|
-
<Button variant="play" size="sm">▶ Play</Button>
|
|
170
|
-
```
|
|
288
|
+
## File Index
|
|
171
289
|
|
|
172
|
-
###
|
|
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 |
|
|
173
358
|
|
|
174
|
-
|
|
359
|
+
---
|
|
175
360
|
|
|
176
|
-
|
|
177
|
-
<FeatureCard
|
|
178
|
-
icon={<CursorIcon />}
|
|
179
|
-
title="The site is a world"
|
|
180
|
-
body="Pages are maps, links are interactables."
|
|
181
|
-
tag="Spatial"
|
|
182
|
-
/>
|
|
183
|
-
```
|
|
361
|
+
## HUD Components (`components/hud/`)
|
|
184
362
|
|
|
185
|
-
|
|
363
|
+
Pixel-art game HUD primitives for the in-game player card and character screen. All icons are original geometric designs — no external trademarks.
|
|
186
364
|
|
|
187
|
-
|
|
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 |
|
|
188
370
|
|
|
189
|
-
|
|
190
|
-
<QuestCard
|
|
191
|
-
gate={3}
|
|
192
|
-
title="Objects"
|
|
193
|
-
body="In-space sections open content."
|
|
194
|
-
status="active"
|
|
195
|
-
/>
|
|
196
|
-
```
|
|
371
|
+
## RPG Icons (`components/icons/`)
|
|
197
372
|
|
|
198
|
-
|
|
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`.
|
|
199
374
|
|
|
200
|
-
|
|
|
375
|
+
| Component | File | Description |
|
|
201
376
|
|---|---|---|
|
|
202
|
-
| `
|
|
203
|
-
| `active` | `BUILDING` | `--ns-orange` |
|
|
204
|
-
| `planned` | `PLANNED` | `--ns-cyan` |
|
|
205
|
-
| `locked` | `LATER` | `--ns-ink-faint` |
|
|
377
|
+
| `RPGIcon` | `RPGIcon.jsx` | 22 pixel-art icons across 4 categories. `HUDIcon` exported as backward-compat alias. |
|
|
206
378
|
|
|
207
|
-
|
|
379
|
+
### RPGIcon categories
|
|
208
380
|
|
|
209
|
-
|
|
|
381
|
+
| Category | Names |
|
|
210
382
|
|---|---|
|
|
211
|
-
|
|
|
212
|
-
|
|
|
213
|
-
|
|
|
214
|
-
|
|
|
215
|
-
| `tokens/` | Color, typography, spacing, motion, and base CSS tokens |
|
|
216
|
-
| `components/primitives.css` | Shared CSS primitives |
|
|
217
|
-
| `components/react/` | Public React component barrel export |
|
|
218
|
-
| `components/buttons/` | Button component, types, prompt, specimen |
|
|
219
|
-
| `components/cards/` | FeatureCard and QuestCard components, types, prompts, specimens |
|
|
220
|
-
| `components/navigation/` | SectionArrow component, types, specimen |
|
|
221
|
-
| `mui-theme/` | MUI theme runtime, TypeScript source, and examples |
|
|
222
|
-
| `assets/` | Logo, sprites, and world imagery |
|
|
223
|
-
| `guidelines/` | Visual specimen cards |
|
|
224
|
-
| `references/` | Polished `.dc.html` references |
|
|
225
|
-
| `ui-kits/` | Complete UI kits |
|
|
226
|
-
| `SKILL.md` | Agent skill definition |
|
|
227
|
-
|
|
228
|
-
## Development
|
|
229
|
-
|
|
230
|
-
Run the package checks before publishing:
|
|
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 |
|
|
231
387
|
|
|
232
|
-
|
|
233
|
-
npm install
|
|
234
|
-
npm run check
|
|
235
|
-
npm run release:dry-run
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
Use patch versions for public package metadata or documentation polish. Use minor versions for new components, tokens, or breaking-adjacent behavior.
|
|
388
|
+
### Element color tokens (`tokens/hud.css`)
|
|
239
389
|
|
|
240
|
-
|
|
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 |
|
|
241
400
|
|
|
242
|
-
|
|
401
|
+
### Game View canvas (`_lab/game/index.html`)
|
|
243
402
|
|
|
244
|
-
|
|
245
|
-
2. Add component tests for class names, variants, invalid props, and accessibility attributes.
|
|
246
|
-
3. Add package linting for npm exports, types, and install behavior.
|
|
247
|
-
4. Add component documentation with live examples.
|
|
248
|
-
5. Add visual regression coverage for specimen cards and UI kits.
|
|
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.
|
|
249
404
|
|
|
250
|
-
## Reference Standards
|
|
251
405
|
|
|
252
|
-
-
|
|
253
|
-
- Changelog format: [Keep a Changelog](https://keepachangelog.com/)
|
|
254
|
-
- Versioning: [Semantic Versioning](https://semver.org/)
|
|
255
|
-
- Release workflow: [Changesets](https://github.com/changesets/changesets)
|
|
256
|
-
- Component documentation: [Storybook](https://storybook.js.org/)
|
|
257
|
-
- License guidance: [Choose a License](https://choosealicense.com/)
|
|
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.
|
|
258
407
|
|
|
259
|
-
|
|
408
|
+
---
|
|
260
409
|
|
|
261
|
-
|
|
410
|
+
## Design Principles
|
|
262
411
|
|
|
263
|
-
|
|
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.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
|
|
3
|
+
export interface HUDBarProps {
|
|
4
|
+
/** Current stat value */
|
|
5
|
+
value?: number;
|
|
6
|
+
/** Maximum stat value */
|
|
7
|
+
max?: number;
|
|
8
|
+
/** Bar fill color */
|
|
9
|
+
fillColor?: string;
|
|
10
|
+
/** Bar track color */
|
|
11
|
+
trackColor?: string;
|
|
12
|
+
/** Bar height in px */
|
|
13
|
+
height?: number;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export declare function HUDBar(props: HUDBarProps): React.ReactElement;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
|
|
3
|
+
export interface HUDDividerProps {
|
|
4
|
+
/** Vertical by default; use horizontal for a 1px row rule. */
|
|
5
|
+
direction?: 'vertical' | 'horizontal';
|
|
6
|
+
/** Line color */
|
|
7
|
+
color?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export declare function HUDDivider(props: HUDDividerProps): React.ReactElement;
|