@noobsociety/nsds 0.2.0 → 0.2.1

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 CHANGED
@@ -2,7 +2,18 @@
2
2
 
3
3
  Reusable design tokens, CSS primitives, Tailwind preset, and pixel-art React components for NoobSociety.
4
4
 
5
- The system is built around a single rule: **Monokai colors are semantic foregrounds; dark surfaces are the world canvas.**
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
+ - [Repository layout](#repository-layout)
14
+ - [Development](#development)
15
+ - [Versioning and releases](#versioning-and-releases)
16
+ - [License](#license)
6
17
 
7
18
  ## Install
8
19
 
@@ -10,19 +21,52 @@ The system is built around a single rule: **Monokai colors are semantic foregrou
10
21
  npm install @noobsociety/nsds
11
22
  ```
12
23
 
24
+ Peer dependencies:
25
+
26
+ ```bash
27
+ npm install react react-dom
28
+ ```
29
+
30
+ ## Quick start
31
+
32
+ Import the CSS entry once in your app:
33
+
13
34
  ```tsx
14
35
  import '@noobsociety/nsds/styles';
15
- import { Button, HUDBar, RPGIcon } from '@noobsociety/nsds';
16
36
  ```
17
37
 
18
- ```ts
19
- import nsdPreset from '@noobsociety/nsds/tailwind';
38
+ Use React components from the package root:
39
+
40
+ ```tsx
41
+ import { Button, FeatureCard, HUDBar, RPGIcon } from '@noobsociety/nsds';
42
+
43
+ export function Example() {
44
+ return (
45
+ <FeatureCard
46
+ icon={<RPGIcon name="sword" />}
47
+ title="World UI"
48
+ body="Pixel-art components mapped to NSDS tokens."
49
+ tag="Live"
50
+ />
51
+ );
52
+ }
53
+ ```
54
+
55
+ Use the Tailwind preset in product apps:
56
+
57
+ ```js
58
+ import nsdsPreset from '@noobsociety/nsds/tailwind';
59
+
60
+ export default {
61
+ presets: [nsdsPreset],
62
+ content: ['./src/**/*.{js,jsx,ts,tsx}'],
63
+ };
20
64
  ```
21
65
 
22
- ## Package Exports
66
+ ## Package exports
23
67
 
24
68
  | Export | Purpose |
25
- |---|---|
69
+ | --- | --- |
26
70
  | `@noobsociety/nsds` | React components |
27
71
  | `@noobsociety/nsds/react` | Compatibility alias for React components |
28
72
  | `@noobsociety/nsds/tailwind` | Tailwind preset mapped to `--ns-*` tokens |
@@ -30,388 +74,95 @@ import nsdPreset from '@noobsociety/nsds/tailwind';
30
74
  | `@noobsociety/nsds/styles.css` | CSS entry compatibility alias |
31
75
  | `@noobsociety/nsds/tokens/*` | Individual token CSS files |
32
76
  | `@noobsociety/nsds/primitives` | Component primitive CSS |
77
+ | `@noobsociety/nsds/components/primitives.css` | Component primitive CSS compatibility alias |
78
+
79
+ The npm package ships `dist/` plus package metadata, changelog, contribution guidance, security policy, and license.
80
+
81
+ ## Components
82
+
83
+ Public React components:
84
+
85
+ - `Button`
86
+ - `FeatureCard`
87
+ - `QuestCard`
88
+ - `HUDBar`
89
+ - `HUDDivider`
90
+ - `HUDLabel`
91
+ - `RPGIcon`
92
+ - `HUDIcon`
93
+ - `SectionArrow`
94
+
95
+ Run Storybook for component documentation:
96
+
97
+ ```bash
98
+ npm run storybook
99
+ ```
100
+
101
+ Build static Storybook documentation:
102
+
103
+ ```bash
104
+ npm run build:storybook
105
+ ```
106
+
107
+ ## Repository layout
108
+
109
+ | Path | Purpose |
110
+ | --- | --- |
111
+ | `styles.css` | Public CSS entry point |
112
+ | `tokens/` | CSS custom properties for color, type, spacing, motion, and HUD values |
113
+ | `components/` | React components, TypeScript declarations, primitive CSS, and stories |
114
+ | `tailwind/` | Tailwind preset source |
115
+
116
+ ## Development
117
+
118
+ Use Node.js 22 or newer.
33
119
 
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.
120
+ ```bash
121
+ npm install
122
+ npm run check
123
+ ```
124
+
125
+ Common scripts:
35
126
 
36
- ## Repo Layout
127
+ | Script | Purpose |
128
+ | --- | --- |
129
+ | `npm run build` | Build the package into `dist/` |
130
+ | `npm run check` | Build, validate package metadata, type-check, and smoke-test imports |
131
+ | `npm run storybook` | Start component documentation locally |
132
+ | `npm run build:storybook` | Build static component documentation |
133
+ | `npm run release:dry-run` | Preview the npm package contents |
134
+ | `npm run changeset` | Add a release note and version intent |
37
135
 
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 |
136
+ ## Versioning and releases
47
137
 
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.
138
+ 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.
49
139
 
50
- ---
140
+ Use Changesets for release intent:
141
+
142
+ ```bash
143
+ npm run changeset
144
+ ```
51
145
 
52
- ## Sources
146
+ Maintainers create release commits with:
53
147
 
54
- This design system was built from the following resources. Readers with access are encouraged to explore them for the most current implementation details.
148
+ ```bash
149
+ npm run changeset:version
150
+ ```
55
151
 
56
- | Source | URL / Path |
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) |
152
+ That command applies Changesets version bumps and promotes the current `[Unreleased]` changelog entries into a dated release section.
63
153
 
64
- ---
154
+ 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
155
 
66
- ## About NoobSociety
156
+ Manual publishing remains available for maintainers after the version commit is prepared:
67
157
 
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.
158
+ ```bash
159
+ npm run check
160
+ npm run release:dry-run
161
+ npm run changeset:publish
162
+ ```
69
163
 
70
- The tagline is **"Society of Beginners — est. 2010"**. The tone is direct, playful, and honest. Not corporate.
164
+ ## License
71
165
 
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.
166
+ 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
167
 
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.
168
+ Only add third-party code, assets, or documentation when the license is compatible with MIT and the source is documented in the relevant change.