@noobsociety/nsds 0.3.1 → 0.4.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +34 -1
  2. package/CONTRIBUTING.md +43 -2
  3. package/README.md +87 -36
  4. package/SECURITY.md +38 -4
  5. package/dist/client/index.cjs +1 -0
  6. package/dist/client/index.d.cts +6 -0
  7. package/dist/client/index.d.ts +6 -0
  8. package/dist/client/index.js +5 -0
  9. package/dist/components/_card-base.css +99 -0
  10. package/dist/components/hud/HUDBar.d.ts +16 -3
  11. package/dist/components/hud/HUDChat.d.ts +26 -0
  12. package/dist/components/hud/HUDJoystick.d.ts +21 -0
  13. package/dist/components/hud/HUDMinimap.d.ts +14 -0
  14. package/dist/components/hud/HUDPanel.d.ts +25 -0
  15. package/dist/components/hud/HUDTabWindow.d.ts +37 -0
  16. package/dist/components/hud-editor.css +197 -0
  17. package/dist/components/icons/RPGIcon.d.ts +15 -11
  18. package/dist/components/icons/registry.d.ts +37 -0
  19. package/dist/components/primitives.css +50 -20
  20. package/dist/components/react/index.d.ts +12 -2
  21. package/dist/components/scene-builder.css +740 -0
  22. package/dist/components/scene-builder.js +3039 -0
  23. package/dist/components/shared/constants.d.ts +41 -0
  24. package/dist/components/shared/styles.d.ts +1 -42
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.js +6173 -1821
  27. package/dist/registry-BizUEm6W.js +136 -0
  28. package/dist/registry-Cyq-qspU.cjs +1 -0
  29. package/dist/styles.css +1 -0
  30. package/dist/tokens/base.css +17 -4
  31. package/dist/tokens/colors.css +57 -53
  32. package/dist/tokens/hud.css +119 -78
  33. package/dist/tokens/motion.css +57 -23
  34. package/dist/tokens/spacing.css +39 -39
  35. package/dist/tokens/typography.css +20 -20
  36. package/package.json +37 -8
@@ -0,0 +1,136 @@
1
+ //#region components/shared/constants.ts
2
+ var e = {
3
+ gold: "var(--ns-gold)",
4
+ pink: "var(--ns-pink)",
5
+ purple: "var(--ns-purple)",
6
+ cyan: "var(--ns-cyan)",
7
+ green: "var(--ns-green)",
8
+ orange: "var(--ns-orange)",
9
+ later: "var(--ns-ink-faint)"
10
+ }, t = e, n = {
11
+ done: {
12
+ className: "ns-quest-card--done",
13
+ label: "HOLDS",
14
+ icon: "✓"
15
+ },
16
+ active: {
17
+ className: "ns-quest-card--active",
18
+ label: "BUILDING",
19
+ icon: "▶"
20
+ },
21
+ planned: {
22
+ className: "ns-quest-card--planned",
23
+ label: "PLANNED",
24
+ icon: "◌"
25
+ },
26
+ locked: {
27
+ className: "ns-quest-card--locked",
28
+ label: "LATER",
29
+ icon: "✦"
30
+ }
31
+ }, r = [
32
+ "sword",
33
+ "bow",
34
+ "staff",
35
+ "katar",
36
+ "book",
37
+ "hammer"
38
+ ], i = [
39
+ "neutral",
40
+ "fire",
41
+ "earth",
42
+ "wind",
43
+ "water",
44
+ "light",
45
+ "dark",
46
+ "void"
47
+ ], a = [
48
+ "human",
49
+ "beast",
50
+ "demon",
51
+ "angel",
52
+ "spirit"
53
+ ], o = [
54
+ "small",
55
+ "medium",
56
+ "large"
57
+ ], s = [
58
+ "attack-sword",
59
+ "attack-bow",
60
+ "attack-staff",
61
+ "attack-katar",
62
+ "attack-book",
63
+ "attack-hammer"
64
+ ], c = [
65
+ "passive",
66
+ "active",
67
+ "combo",
68
+ "stance",
69
+ "buff",
70
+ "debuff"
71
+ ], l = [
72
+ "potion",
73
+ "ether",
74
+ "scroll",
75
+ "gem",
76
+ "relic",
77
+ "key"
78
+ ], u = [
79
+ "helm",
80
+ "armor",
81
+ "cloak",
82
+ "shield",
83
+ "ring",
84
+ "greaves"
85
+ ], d = [
86
+ "hat",
87
+ "emblem",
88
+ "cape",
89
+ "badge",
90
+ "boots"
91
+ ], f = [
92
+ "menu",
93
+ "inventory",
94
+ "party",
95
+ "quest",
96
+ "map",
97
+ "shop",
98
+ "settings",
99
+ "save"
100
+ ], p = [
101
+ "emote-tysm",
102
+ "emote-sos",
103
+ "emote-lol",
104
+ "emote-win",
105
+ "emote-lgo",
106
+ "emote-ugh",
107
+ "emote-myb",
108
+ "emote-wut",
109
+ "emote-grr"
110
+ ], m = {
111
+ weapons: r,
112
+ elements: i,
113
+ races: a,
114
+ sizes: o,
115
+ attack: s,
116
+ skills: c,
117
+ items: l,
118
+ equip: u,
119
+ skins: d,
120
+ menu: f,
121
+ emotes: p
122
+ }, h = [
123
+ ...r,
124
+ ...i,
125
+ ...a,
126
+ ...o,
127
+ ...s,
128
+ ...c,
129
+ ...l,
130
+ ...u,
131
+ ...d,
132
+ ...f,
133
+ ...p
134
+ ];
135
+ //#endregion
136
+ export { m as a, h as c, c as d, r as f, n as h, u as i, a as l, e as m, i as n, l as o, t as p, p as r, f as s, s as t, o as u };
@@ -0,0 +1 @@
1
+ var e={gold:`var(--ns-gold)`,pink:`var(--ns-pink)`,purple:`var(--ns-purple)`,cyan:`var(--ns-cyan)`,green:`var(--ns-green)`,orange:`var(--ns-orange)`,later:`var(--ns-ink-faint)`},t=e,n={done:{className:`ns-quest-card--done`,label:`HOLDS`,icon:`✓`},active:{className:`ns-quest-card--active`,label:`BUILDING`,icon:`▶`},planned:{className:`ns-quest-card--planned`,label:`PLANNED`,icon:`◌`},locked:{className:`ns-quest-card--locked`,label:`LATER`,icon:`✦`}},r=[`sword`,`bow`,`staff`,`katar`,`book`,`hammer`],i=[`neutral`,`fire`,`earth`,`wind`,`water`,`light`,`dark`,`void`],a=[`human`,`beast`,`demon`,`angel`,`spirit`],o=[`small`,`medium`,`large`],s=[`attack-sword`,`attack-bow`,`attack-staff`,`attack-katar`,`attack-book`,`attack-hammer`],c=[`passive`,`active`,`combo`,`stance`,`buff`,`debuff`],l=[`potion`,`ether`,`scroll`,`gem`,`relic`,`key`],u=[`helm`,`armor`,`cloak`,`shield`,`ring`,`greaves`],d=[`hat`,`emblem`,`cape`,`badge`,`boots`],f=[`menu`,`inventory`,`party`,`quest`,`map`,`shop`,`settings`,`save`],p=[`emote-tysm`,`emote-sos`,`emote-lol`,`emote-win`,`emote-lgo`,`emote-ugh`,`emote-myb`,`emote-wut`,`emote-grr`],m={weapons:r,elements:i,races:a,sizes:o,attack:s,skills:c,items:l,equip:u,skins:d,menu:f,emotes:p},h=[...r,...i,...a,...o,...s,...c,...l,...u,...d,...f,...p];Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return o}});
package/dist/styles.css CHANGED
@@ -11,3 +11,4 @@
11
11
  @import './tokens/hud.css';
12
12
  @import './tokens/base.css';
13
13
  @import './components/primitives.css';
14
+ @import './components/hud-editor.css';
@@ -1,5 +1,9 @@
1
1
  /* NoobSociety — Base resets and body defaults */
2
- *, *::before, *::after { box-sizing: border-box; }
2
+ *,
3
+ *::before,
4
+ *::after {
5
+ box-sizing: border-box;
6
+ }
3
7
 
4
8
  html {
5
9
  scroll-behavior: smooth;
@@ -23,9 +27,18 @@ body {
23
27
  text-rendering: optimizeLegibility;
24
28
  }
25
29
 
26
- img { display: block; max-width: 100%; }
27
- a { color: var(--ns-gold); text-decoration: none; transition: color var(--ns-transition-fast); }
28
- a:hover { color: var(--ns-gold-pale); }
30
+ img {
31
+ display: block;
32
+ max-width: 100%;
33
+ }
34
+ a {
35
+ color: var(--ns-gold);
36
+ text-decoration: none;
37
+ transition: color var(--ns-transition-fast);
38
+ }
39
+ a:hover {
40
+ color: var(--ns-gold-pale);
41
+ }
29
42
 
30
43
  button,
31
44
  input,
@@ -1,79 +1,83 @@
1
1
  /* NoobSociety — Color tokens (Monokai dark) */
2
2
  :root {
3
3
  /* ── Surfaces ─────────────────────────────────────────────── */
4
- --ns-bg-0: #1a1a16; /* deepest — footer, sidebar */
5
- --ns-bg-1: #272822; /* page base */
6
- --ns-bg-2: #32332b; /* raised surfaces, icon slots */
7
- --ns-glass: rgba(30, 31, 26, 0.88); /* card, header backdrop */
8
- --ns-glass-2: rgba(30, 31, 26, 0.60); /* lighter glass */
4
+ --ns-bg-0: #1a1a16; /* deepest — footer, sidebar */
5
+ --ns-bg-1: #272822; /* page base */
6
+ --ns-bg-2: #32332b; /* raised surfaces, icon slots */
7
+ --ns-glass: rgba(30, 31, 26, 0.88); /* card, header backdrop */
8
+ --ns-glass-2: rgba(30, 31, 26, 0.6); /* lighter glass */
9
9
  --ns-glass-soft: rgba(30, 31, 26, 0.75); /* subtle card surface */
10
10
 
11
- --ns-bg-0-rgb: 26 26 22; /* @kind other */
12
- --ns-bg-1-rgb: 39 40 34; /* @kind other */
13
- --ns-bg-2-rgb: 50 51 43; /* @kind other */
14
- --ns-glass-rgb: 30 31 26; /* @kind other */
11
+ --ns-bg-0-rgb: 26 26 22; /* @kind other */
12
+ --ns-bg-1-rgb: 39 40 34; /* @kind other */
13
+ --ns-bg-2-rgb: 50 51 43; /* @kind other */
14
+ --ns-glass-rgb: 30 31 26; /* @kind other */
15
15
 
16
16
  /* ── Borders ──────────────────────────────────────────────── */
17
- --ns-line: rgba(255, 255, 255, 0.12);
17
+ --ns-line: rgba(255, 255, 255, 0.12);
18
18
  --ns-line-strong: rgba(255, 255, 255, 0.22);
19
- --ns-line-soft: rgba(255, 255, 255, 0.08);
19
+ --ns-line-soft: rgba(255, 255, 255, 0.08);
20
20
 
21
21
  /* ── Ink (text) ───────────────────────────────────────────── */
22
- --ns-ink: #f8f8f2; /* primary text — Monokai foreground */
23
- --ns-ink-dim: #a8a28c; /* secondary text */
24
- --ns-ink-faint: #75715e; /* placeholder, captions — Monokai comment */
25
- --ns-ink-rgb: 248 248 242; /* @kind other */
26
- --ns-ink-dim-rgb: 168 162 140; /* @kind other */
27
- --ns-ink-faint-rgb: 117 113 94; /* @kind other */
22
+ --ns-ink: #f8f8f2; /* primary text — Monokai foreground */
23
+ --ns-ink-dim: #a8a28c; /* secondary text */
24
+ --ns-ink-faint: #75715e; /* placeholder, captions — Monokai comment */
25
+ --ns-ink-rgb: 248 248 242; /* @kind other */
26
+ --ns-ink-dim-rgb: 168 162 140; /* @kind other */
27
+ --ns-ink-faint-rgb: 117 113 94; /* @kind other */
28
28
 
29
29
  /* ── Brand yellow (gold) — primary accent ─────────────────── */
30
- --ns-gold: #e6db74;
31
- --ns-gold-pale: #f4f099;
32
- --ns-gold-deep: #cabb50;
30
+ --ns-gold: #e6db74;
31
+ --ns-gold-pale: #f4f099;
32
+ --ns-gold-deep: #cabb50;
33
33
  --ns-gold-shadow: #b5a83f;
34
34
  --ns-gold-btn-fg: #1c1c17; /* text on gold buttons */
35
- --ns-gold-rgb: 230 219 116; /* @kind other */
36
- --ns-gold-pale-rgb: 244 240 153; /* @kind other */
37
- --ns-gold-deep-rgb: 202 187 80; /* @kind other */
38
- --ns-gold-shadow-rgb: 181 168 63; /* @kind other */
35
+ --ns-gold-rgb: 230 219 116; /* @kind other */
36
+ --ns-gold-pale-rgb: 244 240 153; /* @kind other */
37
+ --ns-gold-deep-rgb: 202 187 80; /* @kind other */
38
+ --ns-gold-shadow-rgb: 181 168 63; /* @kind other */
39
39
 
40
40
  /* ── Monokai semantic accents ─────────────────────────────── */
41
- --ns-green: #a6e22e; /* "Holds" / success */
42
- --ns-green-deep: #7fb81e;
43
- --ns-cyan: #66d9e8; /* "Planned" / info */
44
- --ns-cyan-deep: #5bc8d7;
45
- --ns-orange: #fd971f; /* "Building" / in-progress */
41
+ --ns-green: #a6e22e; /* "Holds" / success */
42
+ --ns-green-deep: #7fb81e;
43
+ --ns-cyan: #66d9e8; /* "Planned" / info */
44
+ --ns-cyan-deep: #5bc8d7;
45
+ --ns-orange: #fd971f; /* "Building" / in-progress */
46
46
  --ns-orange-deep: #c96f00;
47
- --ns-pink: #f92672; /* danger / highlight */
48
- --ns-purple: #ae81ff; /* decorative */
49
- --ns-green-rgb: 166 226 46; /* @kind other */
50
- --ns-green-deep-rgb: 127 184 30; /* @kind other */
51
- --ns-cyan-rgb: 102 217 232; /* @kind other */
52
- --ns-cyan-deep-rgb: 91 200 215; /* @kind other */
53
- --ns-orange-rgb: 253 151 31; /* @kind other */
54
- --ns-orange-deep-rgb: 201 111 0; /* @kind other */
55
- --ns-pink-rgb: 249 38 114; /* @kind other */
56
- --ns-purple-rgb: 174 129 255; /* @kind other */
47
+ --ns-pink: #f92672; /* danger / highlight */
48
+ --ns-purple: #ae81ff; /* decorative */
49
+ --ns-green-rgb: 166 226 46; /* @kind other */
50
+ --ns-green-deep-rgb: 127 184 30; /* @kind other */
51
+ --ns-cyan-rgb: 102 217 232; /* @kind other */
52
+ --ns-cyan-deep-rgb: 91 200 215; /* @kind other */
53
+ --ns-orange-rgb: 253 151 31; /* @kind other */
54
+ --ns-orange-deep-rgb: 201 111 0; /* @kind other */
55
+ --ns-pink-rgb: 249 38 114; /* @kind other */
56
+ --ns-purple-rgb: 174 129 255; /* @kind other */
57
57
 
58
58
  /* ── Semantic aliases ─────────────────────────────────────── */
59
- --ns-surface-page: var(--ns-bg-1);
60
- --ns-surface-card: var(--ns-glass);
59
+ --ns-surface-page: var(--ns-bg-1);
60
+ --ns-surface-card: var(--ns-glass);
61
61
  --ns-surface-raised: var(--ns-bg-2);
62
- --ns-text-primary: var(--ns-ink);
62
+ --ns-text-primary: var(--ns-ink);
63
63
  --ns-text-secondary: var(--ns-ink-dim);
64
- --ns-text-muted: var(--ns-ink-faint);
65
- --ns-accent: var(--ns-gold);
66
- --ns-accent-hover: var(--ns-gold-pale);
67
- --ns-status-holds: var(--ns-green);
64
+ --ns-text-muted: var(--ns-ink-faint);
65
+ --ns-accent: var(--ns-gold);
66
+ --ns-accent-hover: var(--ns-gold-pale);
67
+ --ns-status-holds: var(--ns-green);
68
68
  --ns-status-building: var(--ns-orange);
69
- --ns-status-planned: var(--ns-cyan);
70
- --ns-status-later: var(--ns-ink-faint);
69
+ --ns-status-planned: var(--ns-cyan);
70
+ --ns-status-later: var(--ns-ink-faint);
71
71
 
72
72
  /* ── Quest card status pill backgrounds ──────────────────────── */
73
- --ns-quest-pill-done: rgba(166, 226, 46, 0.10);
74
- --ns-quest-pill-active: rgba(253, 151, 31, 0.12);
73
+ --ns-quest-pill-done: rgba(166, 226, 46, 0.1);
74
+ --ns-quest-pill-active: rgba(253, 151, 31, 0.12);
75
75
  --ns-quest-pill-planned: rgba(102, 217, 232, 0.12);
76
- --ns-quest-pill-locked: rgba(255, 255, 255, 0.05);
77
- --ns-focus-ring: rgba(230, 219, 116, 0.35);
78
- --ns-selection-bg: rgba(249, 38, 114, 0.28);
76
+ --ns-quest-pill-locked: rgba(255, 255, 255, 0.05);
77
+ --ns-focus-ring: rgba(230, 219, 116, 0.35);
78
+ --ns-selection-bg: rgba(249, 38, 114, 0.28);
79
+
80
+ /* ── Quest card component variables (overridden per-status in primitives) ── */
81
+ --ns-quest-color: var(--ns-status-later); /* default: locked/later */
82
+ --ns-quest-pill-bg: var(--ns-quest-pill-locked); /* default: locked */
79
83
  }
@@ -9,125 +9,166 @@
9
9
  vital bar colours that have no homepage analogue) the token is defined independently. */
10
10
 
11
11
  :root {
12
-
13
12
  /* ── Fonts ─────────────────────────────────────────────────── */
14
- --hud-font: var(--ns-font-pixel); /* chrome labels, tab caps, key glyphs */
15
- --hud-font-ui: var(--ns-font-body); /* draggable windows, dialogue, inventory */
13
+ --hud-font: var(--ns-font-pixel); /* chrome labels, tab caps, key glyphs */
14
+ --hud-font-ui: var(--ns-font-body); /* draggable windows, dialogue, inventory */
15
+
16
+ /* ── HUD text scale (pixel-perfect at 24×24 grid) ───────────── */
17
+ --hud-text-xs: 4px;
18
+ --hud-text-sm: 5px;
19
+ --hud-text-md: 7px;
20
+ --hud-text-lg: 9px;
21
+ --hud-text-xl: 11px;
16
22
 
17
23
  /* ── Accent / currency ─────────────────────────────────────── */
18
24
  /* DS is source of truth: game migrates from #ffe066 → --ns-gold (#e6db74). */
19
- --hud-gold: var(--ns-gold);
20
- --hud-talents: var(--ns-gold); /* Talents wallet number */
25
+ --hud-gold: var(--ns-gold);
26
+ --hud-talents: var(--ns-gold); /* Talents wallet number */
21
27
 
22
28
  /* ── Text ───────────────────────────────────────────────────── */
23
- --hud-text: var(--ns-ink);
29
+ --hud-text: var(--ns-ink);
24
30
  --hud-text-dim: var(--ns-ink-dim);
25
- --hud-shadow: none; /* no text-shadow at HUD pixel sizes */
31
+ --hud-shadow: none; /* no text-shadow at HUD pixel sizes */
26
32
  --hud-bar-shadow: none;
27
33
 
28
34
  /* ── Surfaces ───────────────────────────────────────────────── */
29
35
  /* Game chrome glass: lighter than --ns-glass so the world reads through. */
30
- --hud-glass: rgba(12, 16, 22, 0.62);
36
+ --hud-glass: rgba(12, 16, 22, 0.62);
31
37
  --hud-glass-blur: 6px;
32
- --hud-bg: rgba(0, 0, 0, 0.35);
33
- --hud-bg-strong: rgba(0, 0, 0, 0.72);
34
- --hud-track: rgba(255, 255, 255, 0.10); /* bar + XP track background */
35
- --hud-line: rgba(255, 255, 255, 0.18);
36
- --hud-avatar-bg: rgba(72, 86, 116, 0.82);
38
+ --hud-bg: rgba(0, 0, 0, 0.35);
39
+ --hud-bg-strong: rgba(0, 0, 0, 0.72);
40
+ --hud-track: rgba(255, 255, 255, 0.1); /* bar + XP track background */
41
+ --hud-line: rgba(255, 255, 255, 0.18);
42
+ --hud-divider: var(--hud-line);
43
+ --hud-avatar-bg: rgba(72, 86, 116, 0.82);
37
44
 
38
45
  /* ── Input / selection ─────────────────────────────────────── */
39
- --hud-input-bg: rgba(10, 14, 20, 0.55);
40
- --hud-sel-bg: var(--ns-ink);
41
- --hud-sel-fg: var(--ns-bg-1);
46
+ --hud-input-bg: rgba(10, 14, 20, 0.55);
47
+ --hud-sel-bg: var(--ns-ink);
48
+ --hud-sel-fg: var(--ns-bg-1);
42
49
 
43
50
  /* ── Elements (identity.ts ELEMENT_DISPLAY) ───────────────────── */
44
51
  /* ── Elements (identity.ts ELEMENT_DISPLAY exact colors) ─────────── */
45
52
  --hud-el-neutral: #888780;
46
- --hud-el-earth: #639922;
47
- --hud-el-wind: #5dcaa5;
48
- --hud-el-water: #378add;
49
- --hud-el-fire: #ba7517;
50
- --hud-el-light: #fac775;
51
- --hud-el-dark: #888780;
52
- --hud-el-void: #7f77dd;
53
+ --hud-el-earth: #639922;
54
+ --hud-el-wind: #5dcaa5;
55
+ --hud-el-water: #378add;
56
+ --hud-el-fire: #ba7517;
57
+ --hud-el-light: #fac775;
58
+ --hud-el-dark: #888780;
59
+ --hud-el-void: #7f77dd;
53
60
 
54
61
  /* ── Vital bars ─────────────────────────────────────────────── */
55
62
  /* HP — green track, bright fill, low-HP red warning */
56
- --hud-hp: var(--hud-track); /* track background */
57
- --hud-hp-fill: #4caf73; /* normal fill */
58
- --hud-hp-low: #cc3333; /* fill under 30% → also pulses */
59
- --hud-hp-label: #88ee88; /* "HP" label text in classic bar */
63
+ --hud-hp: var(--hud-track); /* track background */
64
+ --hud-hp-fill: #4caf73; /* normal fill */
65
+ --hud-hp-low: #cc3333; /* fill under 30% → also pulses */
66
+ --hud-hp-label: #88ee88; /* "HP" label text in classic bar */
60
67
  /* MP — blue track, bright fill, low-MP muted */
61
- --hud-mp: var(--hud-track); /* track background (internal id: sp) */
62
- --hud-mp-fill: #5b9bd5; /* normal fill */
63
- --hud-mp-low: #4f7fc0; /* fill under 30% */
64
- --hud-mp-label: #8888ee; /* "MP"/"SP" label text */
68
+ --hud-mp: var(--hud-track); /* track background (internal id: sp) */
69
+ --hud-mp-fill: #5b9bd5; /* normal fill */
70
+ --hud-mp-low: #4f7fc0; /* fill under 30% */
71
+ --hud-mp-label: #8888ee; /* "MP"/"SP" label text */
72
+
73
+ /* Stamina — segmented endurance bar */
74
+ --hud-stamina-fill: #5dcaa5; /* teal fill */
75
+ --hud-stamina-label: #8fe6cc; /* stamina label text */
65
76
 
66
77
  /* ── XP tracks ──────────────────────────────────────────────── */
67
78
  /* Three independent mastery tracks: Base (BXP), Tech (TXP), Weapon (WXP). */
68
- --hud-xp-base: #4488cc; /* BXP fill — steel blue */
69
- --hud-xp-base-rgb: 68 136 204; /* @kind other */
70
- --hud-xp-base-label: #88aaee; /* BXP label */
71
- --hud-xp-job: #8855cc; /* TXP fill — purple */
72
- --hud-xp-job-rgb: 136 85 204; /* @kind other */
73
- --hud-xp-job-label: #aa88ee; /* TXP label */
74
- --hud-xp-weapon: #cc8844; /* WXP fill — amber */
75
- --hud-xp-weapon-rgb: 204 136 68; /* @kind other */
76
- --hud-xp-weapon-label: #eeaa66; /* WXP label */
79
+ --hud-xp-base: #4488cc; /* BXP fill — steel blue */
80
+ --hud-xp-base-rgb: 68 136 204; /* @kind other */
81
+ --hud-xp-base-label: #88aaee; /* BXP label */
82
+ --hud-xp-job: #8855cc; /* TXP fill — purple */
83
+ --hud-xp-job-rgb: 136 85 204; /* @kind other */
84
+ --hud-xp-job-label: #aa88ee; /* TXP label */
85
+ --hud-xp-weapon: #cc8844; /* WXP fill — amber */
86
+ --hud-xp-weapon-rgb: 204 136 68; /* @kind other */
87
+ --hud-xp-weapon-label: #eeaa66; /* WXP label */
77
88
 
78
89
  /* Progress bars in the player card detail (Marks / Craft). */
79
- --hud-marks-track: #3a2e6e;
80
- --hud-marks-fill: #7f77dd;
81
- --hud-craft-track: #4a2e0a;
82
- --hud-craft-fill: #ba7517;
90
+ --hud-marks-track: #3a2e6e;
91
+ --hud-marks-fill: #7f77dd;
92
+ --hud-craft-track: #4a2e0a;
93
+ --hud-craft-fill: #ba7517;
83
94
 
84
95
  /* ── Chat log channel tones ─────────────────────────────────── */
85
96
  /* Logs tab (battle narration) vs Chat tab (social stream). */
86
- --hud-tone-battle: #ff8888; /* combat hits, defeat lines */
87
- --hud-tone-world: #88ccff; /* map announcements, world events */
88
- --hud-tone-gain: #aaffaa; /* EXP / loot / discovery / rewards */
89
- --hud-tone-say: #cccccc; /* player speech, system messages */
97
+ --hud-tone-battle: #ff8888; /* combat hits, defeat lines */
98
+ --hud-tone-world: #88ccff; /* map announcements, world events */
99
+ --hud-tone-gain: #aaffaa; /* EXP / loot / discovery / rewards */
100
+ --hud-tone-say: #cccccc; /* player speech, system messages */
90
101
 
91
102
  /* ── Status / buffs ─────────────────────────────────────────── */
92
- --hud-danger: var(--ns-pink); /* death zone, error states */
93
- --hud-buff: var(--ns-green); /* positive effect glyphs */
94
- --hud-debuff: #ee6666; /* negative effect glyphs */
103
+ --hud-danger: var(--ns-pink); /* death zone, error states */
104
+ --hud-buff: var(--ns-green); /* positive effect glyphs */
105
+ --hud-debuff: #ee6666; /* negative effect glyphs */
95
106
 
96
107
  /* ── Minimap ────────────────────────────────────────────────── */
97
- --hud-minimap-bg: #091509; /* canvas fill */
98
- --hud-minimap-edge: #2a4a2a; /* outer diamond stroke */
99
- --hud-minimap-player: #ffffff; /* player dot */
100
- --hud-minimap-enemy: #ff5a5a; /* aggressive mob dot */
101
- --hud-minimap-npc: #f4c542; /* interactable / NPC dot */
102
- --hud-minimap-dest: var(--ns-cyan); /* walk-goal diamond */
108
+ --hud-minimap-bg: #091509; /* canvas fill */
109
+ --hud-minimap-edge: #2a4a2a; /* outer diamond stroke */
110
+ --hud-minimap-path: var(--hud-gold); /* paths / points of interest */
111
+ --hud-minimap-player: #ffffff; /* player dot */
112
+ --hud-minimap-enemy: #ff5a5a; /* aggressive mob dot */
113
+ --hud-minimap-npc: #f4c542; /* interactable / NPC dot */
114
+ --hud-minimap-dest: var(--ns-cyan); /* walk-goal diamond */
103
115
 
104
116
  /* ── Geometry ───────────────────────────────────────────────── */
105
- --hud-radius: 4px;
117
+ --hud-radius: 4px;
106
118
  --hud-radius-sm: 2px;
119
+ --hud-grid-overlay: rgba(255, 255, 255, 0.07); /* drag-mode grid line tint */
120
+
121
+ /* ── Scene Builder editor chrome ────────────────────────────── */
122
+ /* Canvas-editing affordances for the HUD composer (resize handles, delete
123
+ buttons, align bar, swatches, ghost, tooltips). Consumed by
124
+ components/scene-builder.css — the source of truth for the editor's look.
125
+ The black-ink shadows below live in tokens (not literals) so every editing
126
+ overlay shares one stroke/ring vocabulary. */
127
+ --hud-edit-handle: 5px; /* resize-handle box */
128
+ --hud-edit-handle-fill: rgb(var(--ns-gold-rgb) / 0.95);
129
+ --hud-edit-handle-ring: 0 0 0 1px rgba(0, 0, 0, 0.6);
130
+ --hud-edit-del: 10px; /* per-element + floating delete */
131
+ --hud-edit-btn: 22px; /* header chrome buttons */
132
+ --hud-edit-toggle-h: 18px; /* grid / hud / bg toggles */
133
+ --hud-edit-ring: rgba(0, 0, 0, 0.5); /* floater & tooltip 1px ring / drop shadow */
134
+ --hud-edit-hover: rgba(255, 255, 255, 0.06); /* subtle chrome hover fill */
135
+ --hud-edit-overlay: rgba(255, 255, 255, 0.1); /* align-button resting fill */
136
+ /* White HUD text over the world: 4-corner pixel stroke (+ soft glow on labels). */
137
+ --hud-edit-stroke:
138
+ -1px -1px 0 rgba(0, 0, 0, 0.92), 1px -1px 0 rgba(0, 0, 0, 0.92), -1px 1px 0 rgba(0, 0, 0, 0.92),
139
+ 1px 1px 0 rgba(0, 0, 0, 0.92), 0 0 4px rgba(0, 0, 0, 0.6);
140
+ --hud-edit-stroke-bar:
141
+ -1px -1px 0 rgba(0, 0, 0, 0.92), 1px -1px 0 rgba(0, 0, 0, 0.92), -1px 1px 0 rgba(0, 0, 0, 0.92),
142
+ 1px 1px 0 rgba(0, 0, 0, 0.92);
107
143
 
108
144
  /* ── Cross-layout geometry (640×360 design space) ───────────── */
109
145
  /* The HUD lives in a 3×3 grid over the 640×360 canvas.
110
146
  Each corner pocket sits inside its cell with 5% padding per axis. */
111
- --hud-cross-cell-w: calc(640px / 3); /* @kind other */ /* 213.33px */
112
- --hud-cross-cell-h: calc(360px / 3); /* @kind other */ /* 120px */
113
- --hud-cross-pad-x: calc(var(--hud-cross-cell-w) * 0.05); /* 10.67px */
147
+ --hud-cross-cell-w: calc(640px / 3); /* @kind other */ /* 213.33px */
148
+ --hud-cross-cell-h: calc(360px / 3); /* @kind other */ /* 120px */
149
+ --hud-cross-pad-x: calc(var(--hud-cross-cell-w) * 0.05); /* 10.67px */
114
150
  /* NOTE: CSS percentage padding always resolves to % of the element WIDTH,
115
151
  so pad-y equals pad-x, not 5% of the cell height. */
116
- --hud-cross-pad-y: calc(var(--hud-cross-cell-w) * 0.05); /* 10.67px — same as pad-x */
117
-
118
- /* ── Inner 8×8 grid cell size (padded pocket ÷ 8) ──────────── */
119
- /* The padded pocket is 90% of the cell (5% pad each side). */
120
- /* Padded inner area: width = cell-w - 2*pad = 192px, height = cell-h - 2*pad = 98.67px */
121
- --hud-grid-cell-w: calc((var(--hud-cross-cell-w) - 2 * var(--hud-cross-pad-x)) / 8); /* @kind spacing */ /* 24px */
122
- --hud-grid-cell-h: calc((var(--hud-cross-cell-h) - 2 * var(--hud-cross-pad-y)) / 8); /* @kind spacing */ /* 12.33px */
123
-
124
- /* ── Minimum interactive element: 2×2 inner grid cells ─────── */
125
- /* No HUD element (button, slot, pip row, icon) may be smaller than this.
126
- Smaller than 2×2 is invisible at a glance and un-tappable on mobile.
127
- At runtime the HUD scales by --hud-scale (~2–3×), so 48×27 design px
128
- maps to ~96×54 real px on a typical phone — the 44px mobile floor. */
129
- /* Interactive elements only buttons, slots, icons, cells.
130
- Passive elements (bars, dividers, borders) are exempt. */
131
- --hud-min-tap-w: calc(var(--hud-grid-cell-w) * 2); /* @kind spacing */ /* 48px */
132
- --hud-min-tap-h: calc(var(--hud-grid-cell-h) * 2); /* @kind spacing */ /* 27px */
152
+ --hud-cross-pad-y: calc(var(--hud-cross-cell-w) * 0.05); /* 10.67px — same as pad-x */
153
+
154
+ /* ── Game canvas & 24×24 drag grid ─────────────────────────── */
155
+ /* Source of truth for the 667×375 HUD canvas and its 24×24 placement grid.
156
+ All HUD element positioning uses grid-column / grid-row spans.
157
+ No element may span fewer than 1 cell on either axis. */
158
+ --hud-canvas-bg: #000; /* outer background behind the game canvas */
159
+ --hud-canvas-w: 667px; /* design canvas width */
160
+ --hud-canvas-h: 375px; /* design canvas height */
161
+ --hud-grid-cols: 24; /* @kind other */
162
+ --hud-grid-rows: 24; /* @kind other */
163
+ --hud-grid-gap: 2px; /* gap between cells */
164
+ /* Cell dimensions (canvas minus gaps, divided by count) */
165
+ --hud-cell-w: calc((667px - 23 * 2px) / 24); /* @kind spacing */ /* ≈27.8px */
166
+ --hud-cell-h: calc((375px - 23 * 2px) / 24); /* @kind spacing */ /* ≈15.6px */
167
+
168
+ /* ── Minimum interactive tap target: 2×2 cells ──────────────── */
169
+ /* No HUD button, slot, or icon may be smaller than this.
170
+ Passive elements (bars, dividers, borders) are exempt.
171
+ At runtime HUD scales ~2–3×, mapping these to ≥44px real px. */
172
+ --hud-min-tap-w: calc(var(--hud-cell-w) * 2); /* @kind spacing */ /* ≈55.6px */
173
+ --hud-min-tap-h: calc(var(--hud-cell-h) * 2); /* @kind spacing */ /* ≈31.2px */
133
174
  }