@noobsociety/nsds 0.1.1 → 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.
Files changed (72) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/CONTRIBUTING.md +34 -0
  3. package/LICENSE +21 -0
  4. package/README.md +354 -159
  5. package/SECURITY.md +11 -0
  6. package/dist/components/hud/HUDBar.d.ts +17 -0
  7. package/dist/components/hud/HUDDivider.d.ts +11 -0
  8. package/dist/components/hud/HUDLabel.d.ts +17 -0
  9. package/dist/components/icons/RPGIcon.d.ts +42 -0
  10. package/dist/index.cjs +1 -0
  11. package/dist/index.d.ts +18 -0
  12. package/dist/index.js +587 -0
  13. package/{styles.css → dist/styles.css} +1 -0
  14. package/dist/tailwind/package.json +1 -0
  15. package/dist/tailwind/preset.js +144 -0
  16. package/{tokens → dist/tokens}/colors.css +25 -19
  17. package/dist/tokens/hud.css +133 -0
  18. package/{tokens → dist/tokens}/motion.css +9 -9
  19. package/{tokens → dist/tokens}/spacing.css +9 -16
  20. package/{tokens → dist/tokens}/typography.css +2 -2
  21. package/package.json +47 -54
  22. package/SKILL.md +0 -18
  23. package/assets/bg.png +0 -0
  24. package/assets/bloop.png +0 -0
  25. package/assets/hero.png +0 -0
  26. package/assets/lamp.png +0 -0
  27. package/assets/logo.png +0 -0
  28. package/assets/mailbox.png +0 -0
  29. package/assets/plaza.png +0 -0
  30. package/assets/prickle.png +0 -0
  31. package/assets/sign.png +0 -0
  32. package/components/buttons/Button.js +0 -55
  33. package/components/buttons/Button.prompt.md +0 -22
  34. package/components/buttons/buttons.card.html +0 -24
  35. package/components/cards/FeatureCard.js +0 -36
  36. package/components/cards/FeatureCard.prompt.md +0 -17
  37. package/components/cards/QuestCard.js +0 -27
  38. package/components/cards/QuestCard.prompt.md +0 -19
  39. package/components/cards/cards.card.html +0 -54
  40. package/components/navigation/SectionArrow.js +0 -28
  41. package/components/navigation/navigation.card.html +0 -29
  42. package/components/react/index.d.ts +0 -11
  43. package/components/react/index.js +0 -4
  44. package/components/shared/styles.js +0 -22
  45. package/guidelines/brand.card.html +0 -41
  46. package/guidelines/colors.card.html +0 -43
  47. package/guidelines/motion.card.html +0 -24
  48. package/guidelines/pixel-accents.card.html +0 -50
  49. package/guidelines/radii-shadows.card.html +0 -28
  50. package/guidelines/semantic-colors.card.html +0 -30
  51. package/guidelines/spacing.card.html +0 -53
  52. package/guidelines/sprites.card.html +0 -22
  53. package/guidelines/type.card.html +0 -24
  54. package/index.d.ts +0 -1
  55. package/index.js +0 -1
  56. package/mui-theme/ThemeProvider.tsx +0 -20
  57. package/mui-theme/examples/FeatureCard.tsx +0 -52
  58. package/mui-theme/examples/QuestStatusChip.tsx +0 -41
  59. package/mui-theme/examples/SectionHeader.tsx +0 -44
  60. package/mui-theme/index.ts +0 -2
  61. package/mui-theme/preview.dc.html +0 -195
  62. package/mui-theme/support.js +0 -1513
  63. package/mui-theme/theme.ts +0 -604
  64. package/references/noobsociety-monokai.dc.html +0 -360
  65. package/support.js +0 -1513
  66. package/ui-kits/homepage/index.html +0 -319
  67. /package/{components → dist/components}/buttons/Button.d.ts +0 -0
  68. /package/{components → dist/components}/cards/FeatureCard.d.ts +0 -0
  69. /package/{components → dist/components}/cards/QuestCard.d.ts +0 -0
  70. /package/{components → dist/components}/navigation/SectionArrow.d.ts +0 -0
  71. /package/{components → dist/components}/primitives.css +0 -0
  72. /package/{tokens → dist/tokens}/base.css +0 -0
package/README.md CHANGED
@@ -1,222 +1,417 @@
1
1
  # NoobSociety Design System
2
2
 
3
- **NSDS** is the reusable NoobSociety Design System package: design tokens, CSS primitives, React components, MUI theme source, pixel assets, and reference UI kits for building NoobSociety interfaces.
3
+ Reusable design tokens, CSS primitives, Tailwind preset, and pixel-art React components for NoobSociety.
4
4
 
5
- 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.**
6
6
 
7
7
  ## Install
8
8
 
9
- Install from npm after publish:
10
-
11
9
  ```bash
12
10
  npm install @noobsociety/nsds
13
11
  ```
14
12
 
15
- Use a local workspace package before publish:
13
+ ```tsx
14
+ import '@noobsociety/nsds/styles';
15
+ import { Button, HUDBar, RPGIcon } from '@noobsociety/nsds';
16
+ ```
16
17
 
17
- ```json
18
- {
19
- "dependencies": {
20
- "@noobsociety/nsds": "file:../design-system"
21
- }
22
- }
18
+ ```ts
19
+ import nsdPreset from '@noobsociety/nsds/tailwind';
23
20
  ```
24
21
 
25
- ## Usage
22
+ ## Package Exports
26
23
 
27
- Import the full CSS entry when you want tokens, base styles, and shared primitives:
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 |
28
33
 
29
- ```js
30
- import '@noobsociety/nsds/styles.css';
31
- ```
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.
32
35
 
33
- Use React components with the CSS entry:
36
+ ## Repo Layout
34
37
 
35
- ```jsx
36
- import '@noobsociety/nsds/styles.css';
37
- import { Button, FeatureCard, QuestCard, SectionArrow } from '@noobsociety/nsds/react';
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 |
38
47
 
39
- export function Example() {
40
- return (
41
- <Button href="https://noobsociety.com">▶ Enter the world</Button>
42
- );
43
- }
44
- ```
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.
45
49
 
46
- Use individual token or asset files when a project only needs part of the system:
50
+ ---
47
51
 
48
- ```js
49
- import '@noobsociety/nsds/tokens/colors.css';
50
- import logoUrl from '@noobsociety/nsds/assets/logo.png';
51
- ```
52
+ ## Sources
52
53
 
53
- Use the MUI theme in TypeScript-aware app bundlers:
54
+ This design system was built from the following resources. Readers with access are encouraged to explore them for the most current implementation details.
54
55
 
55
- ```ts
56
- import { NSThemeProvider, theme, NS } from '@noobsociety/nsds/mui';
57
- ```
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) |
58
63
 
59
- The MUI entry currently exports source TypeScript. Add a build step before publishing to consumers that require plain JavaScript MUI runtime files.
64
+ ---
60
65
 
61
- ## Package Exports
66
+ ## About NoobSociety
62
67
 
63
- | Export | Purpose |
64
- |---|---|
65
- | `@noobsociety/nsds` | Root React component entry |
66
- | `@noobsociety/nsds/react` | React components |
67
- | `@noobsociety/nsds/mui` | MUI theme source |
68
- | `@noobsociety/nsds/styles.css` | Full CSS entry |
69
- | `@noobsociety/nsds/package.json` | Package metadata |
70
- | `@noobsociety/nsds/components/primitives.css` | Component primitive classes only |
71
- | `@noobsociety/nsds/tokens/*` | Individual token CSS files |
72
- | `@noobsociety/nsds/assets/*` | Pixel assets and brand images |
73
- | `@noobsociety/nsds/guidelines/*` | Specimen cards |
74
- | `@noobsociety/nsds/references/*` | Polished `.dc.html` references |
75
- | `@noobsociety/nsds/ui-kits/*` | Complete UI kits |
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.
69
+
70
+ The tagline is **"Society of Beginners est. 2010"**. The tone is direct, playful, and honest. Not corporate.
71
+
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.
74
+
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
+ ---
76
112
 
77
- ## Design Model
113
+ ## VISUAL FOUNDATIONS
78
114
 
79
- ### Monokai Foregrounds
115
+ ### Color System
116
+ Two separate systems that never mix roles:
80
117
 
81
- Monokai colors are used on top of the canvas: text, icons, borders, buttons, status pills, accents, and interaction states. Each hue has one semantic role. Do not reassign a color to a different role.
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.
82
119
 
83
120
  | Token | Hex | Role |
84
121
  |---|---|---|
85
122
  | `--ns-ink` | `#f8f8f2` | Primary text |
86
- | `--ns-ink-faint` | `#75715e` | Muted text, captions, placeholders |
87
- | `--ns-gold` | `#e6db74` | Primary accent, CTAs, eyebrows, active nav |
88
- | `--ns-green` | `#a6e22e` | Success, live state, `HOLDS` |
89
- | `--ns-orange` | `#fd971f` | In progress, active state, `BUILDING` |
90
- | `--ns-cyan` | `#66d9e8` | Planned, info, links |
91
- | `--ns-pink` | `#f92672` | Highlight, danger, high-energy accent |
92
- | `--ns-purple` | `#ae81ff` | Decorative, personal, tertiary accent |
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 |
93
131
 
94
- ### Dark Canvas
95
-
96
- Dark colors sit underneath the Monokai foregrounds. They define the world canvas, raised surfaces, headers, cards, and overlays.
132
+ **Dark canvas** — surfaces underneath the foregrounds.
97
133
 
98
134
  | Token | Hex | Role |
99
135
  |---|---|---|
100
- | `--ns-bg-0` | `#1a1a16` | Deepest surface: footer, sidebar, backdrop |
136
+ | `--ns-bg-0` | `#1a1a16` | Deepest: footer, sidebar, backdrop |
101
137
  | `--ns-bg-1` | `#272822` | Page base |
102
- | `--ns-bg-2` | `#32332b` | Raised surface, icon slot, input fill |
138
+ | `--ns-bg-2` | `#32332b` | Raised surfaces, icon slots, input fill |
103
139
  | `--ns-glass` | `rgba(30,31,26,.88)` | Card and header glass |
104
140
 
105
- The default experience is dark. Do not introduce a light-mode default unless it is intentionally designed as a separate theme.
106
-
107
- ## Content Rules
108
-
109
- - **Voice:** Direct, honest, playful. Not corporate.
110
- - **Casing:** Sentence case. Title case only for names and proper nouns.
111
- - **Length:** Short sentences. One idea per sentence.
112
- - **Emoji:** Avoid emoji. Use pixel accents such as `✦`, `▶`, `★`, `✓`, and `◌` when useful.
113
- - **Numbers:** Use numbers only when they are specific and meaningful.
114
- - **Perspective:** Speak directly. Avoid abstract phrases like "users" and "visitors" when "you" is clearer.
115
-
116
- ## Visual Rules
141
+ The default experience is **always dark**. No light mode.
117
142
 
118
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.
119
165
 
120
- - `Press Start 2P`: wordmark, buttons, status pills, card labels, section accents, and pixel UI.
121
- - `Inter`: body copy, navigation, subtitles, paragraphs, and dense information.
122
- - Pixel text must use generous line height. Keep it short.
123
- - Body copy should stay readable and calm.
124
-
125
- ### Layout
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`
126
173
 
127
- - Base spacing follows a 4px grid.
128
- - Default container width is `1080px`.
129
- - Full sections use `min-height: calc(100svh - var(--ns-header-h))`.
130
- - Responsive baseline: `375x667` portrait and `667x375` landscape.
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
+ ---
131
287
 
132
- ### Cards
288
+ ## File Index
133
289
 
134
- - Use glass surfaces with `10px` radius.
135
- - Do not add resting drop shadows.
136
- - Use hover elevation only: `translateY(-4px)` plus the card hover shadow.
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 |
137
358
 
138
- ### Buttons
359
+ ---
139
360
 
140
- - Primary `play` buttons use gold fill, dark text, a gold border, and a physical press shadow.
141
- - `ghost` buttons stay transparent until hover.
142
- - Buttons use `Press Start 2P`.
361
+ ## HUD Components (`components/hud/`)
143
362
 
144
- ### Motion
363
+ Pixel-art game HUD primitives for the in-game player card and character screen. All icons are original geometric designs — no external trademarks.
145
364
 
146
- - Keep interaction motion fast: `150ms ease-out`.
147
- - Keep decorative motion subtle.
148
- - Respect reduced motion; `ns-*` animations are disabled under `prefers-reduced-motion: reduce`.
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 |
149
370
 
150
- ## Component Notes
371
+ ## RPG Icons (`components/icons/`)
151
372
 
152
- ### Button
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`.
153
374
 
154
- Use for primary and secondary actions.
375
+ | Component | File | Description |
376
+ |---|---|---|
377
+ | `RPGIcon` | `RPGIcon.jsx` | 22 pixel-art icons across 4 categories. `HUDIcon` exported as backward-compat alias. |
155
378
 
156
- ```jsx
157
- <Button variant="play" href="https://noobsociety.com">▶ Enter the world</Button>
158
- <Button variant="ghost" href="https://github.com/noobsociety">★ Star on GitHub</Button>
159
- <Button variant="play" size="sm">▶ Play</Button>
160
- ```
379
+ ### RPGIcon categories
161
380
 
162
- ### FeatureCard
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 |
163
387
 
164
- Use for short feature grids. Render inside a `ul`.
388
+ ### Element color tokens (`tokens/hud.css`)
165
389
 
166
- ```jsx
167
- <FeatureCard
168
- icon={<CursorIcon />}
169
- title="The site is a world"
170
- body="Pages are maps, links are interactables."
171
- tag="Spatial"
172
- />
173
- ```
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 |
174
400
 
175
- ### QuestCard
401
+ ### Game View canvas (`_lab/game/index.html`)
176
402
 
177
- Use for gate or roadmap states. Render inside an `ol`.
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.
178
404
 
179
- ```jsx
180
- <QuestCard
181
- gate={3}
182
- title="Objects"
183
- body="In-space sections open content."
184
- status="active"
185
- />
186
- ```
187
405
 
188
- Status mapping:
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.
189
407
 
190
- | Status | Label | Color |
191
- |---|---|---|
192
- | `done` | `HOLDS` | `--ns-green` |
193
- | `active` | `BUILDING` | `--ns-orange` |
194
- | `planned` | `PLANNED` | `--ns-cyan` |
195
- | `locked` | `LATER` | `--ns-ink-faint` |
408
+ ---
196
409
 
197
- ## File Index
410
+ ## Design Principles
198
411
 
199
- | Path | Contents |
200
- |---|---|
201
- | `package.json` | Package metadata, exports, peer dependencies |
202
- | `index.js` / `index.d.ts` | Root React component entry point |
203
- | `styles.css` | Global CSS entry point |
204
- | `support.js` | Runtime support for root `.dc.html` references |
205
- | `tokens/` | Color, typography, spacing, motion, and base CSS tokens |
206
- | `components/primitives.css` | Shared CSS primitives |
207
- | `components/react/` | Public React component barrel export |
208
- | `components/buttons/` | Button component, types, prompt, specimen |
209
- | `components/cards/` | FeatureCard and QuestCard components, types, prompts, specimens |
210
- | `components/navigation/` | SectionArrow component, types, specimen |
211
- | `mui-theme/` | MUI theme source and examples |
212
- | `assets/` | Logo, sprites, and world imagery |
213
- | `guidelines/` | Visual specimen cards |
214
- | `references/` | Polished `.dc.html` references |
215
- | `ui-kits/` | Complete UI kits |
216
- | `SKILL.md` | Agent skill definition |
217
-
218
- ## Repository
219
-
220
- Source repository: `https://github.com/noobsociety/nsds`
221
-
222
- The current package is ready for local reuse and npm publication as `@noobsociety/nsds@0.1.1`. License is intentionally unset until a license is chosen.
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.
package/SECURITY.md ADDED
@@ -0,0 +1,11 @@
1
+ # Security
2
+
3
+ NSDS is a design system package, but security issues can still happen through package metadata, published assets, examples, or dependency changes.
4
+
5
+ Please report security issues through GitHub Security Advisories for this repository when available. Avoid opening a public issue for a vulnerability until it has been reviewed.
6
+
7
+ Supported release line:
8
+
9
+ | Version | Supported |
10
+ |---|---|
11
+ | `0.x` | Yes |
@@ -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;
@@ -0,0 +1,17 @@
1
+ import type * as React from 'react';
2
+
3
+ export interface HUDLabelProps {
4
+ /** Display text */
5
+ text?: string;
6
+ /** Text alignment within the container */
7
+ align?: 'left' | 'center' | 'right';
8
+ /** Uniform scale multiplier applied to fontSize */
9
+ scale?: number;
10
+ /** Text color */
11
+ color?: string;
12
+ /** Base font size in px, before scale */
13
+ fontSize?: number;
14
+ style?: React.CSSProperties;
15
+ }
16
+
17
+ export declare function HUDLabel(props: HUDLabelProps): React.ReactElement;