@nurvus/ui 0.1.0-alpha.3 → 0.1.0-alpha.5

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.
@@ -1,3 +1,4 @@
1
+ // GENERATED by tools/build-tokens.js from tools/vars.json + src/themes/*.json. Do not edit.
1
2
  $--pure--white: var(--pure--white);
2
3
  $--pure--black: var(--pure--black);
3
4
  $--pure-white-opacity--48: var(--pure-white-opacity--48);
@@ -241,265 +242,3 @@ $--shadow---lg: var(--shadow---lg);
241
242
  $--shadow---xl: var(--shadow---xl);
242
243
  $--shadow---2-xl: var(--shadow---2-xl);
243
244
  $--shadow---3-xl: var(--shadow---3-xl);
244
-
245
- :root {
246
- --pure--white: rgba(255, 255, 255, 1);
247
- --pure--black: rgba(0, 0, 0, 1);
248
- --pure-white-opacity--48: rgba(255, 255, 255, 0.47999998927116394);
249
- --pure-white-opacity--40: rgba(255, 255, 255, 0.4000000059604645);
250
- --pure-white-opacity--32: rgba(255, 255, 255, 0.3199999928474426);
251
- --pure-white-opacity--24: rgba(255, 255, 255, 0.23999999463558197);
252
- --pure-white-opacity--16: rgba(255, 255, 255, 0.1599999964237213);
253
- --pure-white-opacity--8: rgba(255, 255, 255, 0.07999999821186066);
254
- --pure-white-opacity--4: rgba(255, 255, 255, 0.03999999910593033);
255
- --pure-black-opacity--48: rgba(0, 0, 0, 0.47999998927116394);
256
- --pure-black-opacity--40: rgba(0, 0, 0, 0.4000000059604645);
257
- --pure-black-opacity--32: rgba(0, 0, 0, 0.3199999928474426);
258
- --pure-black-opacity--24: rgba(0, 0, 0, 0.23999999463558197);
259
- --pure-black-opacity--16: rgba(0, 0, 0, 0.1599999964237213);
260
- --pure-black-opacity--8: rgba(0, 0, 0, 0.07999999821186066);
261
- --pure-black-opacity--4: rgba(0, 0, 0, 0.03999999910593033);
262
- --base--1200: rgba(21, 22, 36, 1);
263
- --base--1100: rgba(26, 28, 45, 1);
264
- --base--1000: rgba(33, 36, 54, 1);
265
- --base--900: rgba(40, 44, 65, 1);
266
- --base--800: rgba(54, 59, 85, 1);
267
- --base--700: rgba(91, 98, 138, 1);
268
- --base--600: rgba(146, 151, 183, 1);
269
- --base--500: rgba(183, 186, 208, 1);
270
- --base--400: rgba(207, 209, 224, 1);
271
- --base--300: rgba(225, 226, 236, 1);
272
- --base--200: rgba(233, 234, 242, 1);
273
- --base--100: rgba(241, 242, 247, 1);
274
- --base--50: rgba(249, 249, 252, 1);
275
- --base-opacity--48: rgba(146, 151, 183, 0.47999998927116394);
276
- --base-opacity--40: rgba(146, 151, 183, 0.4000000059604645);
277
- --base-opacity--32: rgba(146, 151, 183, 0.3199999928474426);
278
- --base-opacity--24: rgba(146, 151, 183, 0.23999999463558197);
279
- --base-opacity--16: rgba(146, 151, 183, 0.1599999964237213);
280
- --base-opacity--8: rgba(146, 151, 183, 0.07999999821186066);
281
- --base-opacity--4: rgba(146, 151, 183, 0.03999999910593033);
282
- --primary--900: rgba(6, 3, 141, 1);
283
- --primary--800: rgba(6, 1, 184, 1);
284
- --primary--700: rgba(8, 0, 231, 1);
285
- --primary--600: rgba(47, 45, 249, 1);
286
- --primary--500: rgba(80, 79, 246, 1);
287
- --primary--400: rgba(110, 109, 248, 1);
288
- --primary--300: rgba(138, 137, 250, 1);
289
- --primary--200: rgba(168, 168, 251, 1);
290
- --primary--100: rgba(198, 198, 254, 1);
291
- --primary--50: rgba(227, 227, 255, 1);
292
- --primary-opacity--48: rgba(80, 79, 246, 0.47999998927116394);
293
- --primary-opacity--40: rgba(80, 79, 246, 0.4000000059604645);
294
- --primary-opacity--32: rgba(80, 79, 246, 0.3199999928474426);
295
- --primary-opacity--24: rgba(80, 79, 246, 0.23999999463558197);
296
- --primary-opacity--16: rgba(80, 79, 246, 0.1599999964237213);
297
- --primary-opacity--8: rgba(80, 79, 246, 0.07999999821186066);
298
- --primary-opacity--4: rgba(80, 79, 246, 0.03999999910593033);
299
- --green--900: rgba(1, 71, 17, 1);
300
- --green--800: rgba(0, 105, 29, 1);
301
- --green--700: rgba(1, 138, 41, 1);
302
- --green--600: rgba(4, 170, 53, 1);
303
- --green--500: rgba(17, 199, 66, 1);
304
- --green--400: rgba(54, 218, 87, 1);
305
- --green--300: rgba(96, 234, 119, 1);
306
- --green--200: rgba(159, 244, 168, 1);
307
- --green--100: rgba(217, 250, 219, 1);
308
- --green--50: rgba(234, 252, 235, 1);
309
- --green-opacity--48: rgba(4, 170, 53, 0.47999998927116394);
310
- --green-opacity--40: rgba(4, 170, 53, 0.4000000059604645);
311
- --green-opacity--32: rgba(4, 170, 53, 0.3199999928474426);
312
- --green-opacity--24: rgba(4, 170, 53, 0.23999999463558197);
313
- --green-opacity--16: rgba(4, 170, 53, 0.1599999964237213);
314
- --green-opacity--8: rgba(4, 170, 53, 0.07999999821186066);
315
- --green-opacity--4: rgba(4, 170, 53, 0.03999999910593033);
316
- --blue--900: rgba(0, 59, 87, 1);
317
- --blue--800: rgba(0, 83, 132, 1);
318
- --blue--700: rgba(0, 106, 174, 1);
319
- --blue--600: rgba(0, 129, 215, 1);
320
- --blue--500: rgba(0, 155, 230, 1);
321
- --blue--400: rgba(0, 179, 244, 1);
322
- --blue--300: rgba(70, 203, 255, 1);
323
- --blue--200: rgba(131, 220, 255, 1);
324
- --blue--100: rgba(178, 236, 255, 1);
325
- --blue--50: rgba(219, 247, 255, 1);
326
- --blue-opacity--48: rgba(0, 129, 215, 0.47999998927116394);
327
- --blue-opacity--40: rgba(0, 129, 215, 0.4000000059604645);
328
- --blue-opacity--32: rgba(0, 129, 215, 0.3199999928474426);
329
- --blue-opacity--24: rgba(0, 129, 215, 0.23999999463558197);
330
- --blue-opacity--16: rgba(0, 129, 215, 0.1599999964237213);
331
- --blue-opacity--8: rgba(0, 129, 215, 0.07999999821186066);
332
- --blue-opacity--4: rgba(0, 129, 215, 0.03999999910593033);
333
- --red--900: rgba(150, 0, 2, 1);
334
- --red--800: rgba(179, 0, 4, 1);
335
- --red--700: rgba(206, 1, 6, 1);
336
- --red--600: rgba(239, 2, 9, 1);
337
- --red--500: rgba(255, 54, 55, 1);
338
- --red--400: rgba(255, 101, 102, 1);
339
- --red--300: rgba(255, 138, 139, 1);
340
- --red--200: rgba(255, 171, 171, 1);
341
- --red--100: rgba(255, 203, 203, 1);
342
- --red--50: rgba(255, 234, 234, 1);
343
- --red-opacity--48: rgba(255, 54, 55, 0.47999998927116394);
344
- --red-opacity--40: rgba(255, 54, 55, 0.4000000059604645);
345
- --red-opacity--32: rgba(255, 54, 55, 0.3199999928474426);
346
- --red-opacity--24: rgba(255, 54, 55, 0.23999999463558197);
347
- --red-opacity--16: rgba(255, 54, 55, 0.1599999964237213);
348
- --red-opacity--8: rgba(255, 54, 55, 0.07999999821186066);
349
- --red-opacity--4: rgba(255, 54, 55, 0.03999999910593033);
350
- --orange--900: rgba(156, 57, 0, 1);
351
- --orange--800: rgba(186, 68, 0, 1);
352
- --orange--700: rgba(212, 78, 1, 1);
353
- --orange--600: rgba(237, 92, 2, 1);
354
- --orange--500: rgba(255, 108, 19, 1);
355
- --orange--400: rgba(255, 138, 90, 1);
356
- --orange--300: rgba(255, 168, 135, 1);
357
- --orange--200: rgba(255, 197, 174, 1);
358
- --orange--100: rgba(255, 225, 212, 1);
359
- --orange--50: rgba(255, 243, 238, 1);
360
- --orange-opacity--48: rgba(237, 92, 2, 0.47999998927116394);
361
- --orange-opacity--40: rgba(237, 92, 2, 0.4000000059604645);
362
- --orange-opacity--32: rgba(237, 92, 2, 0.3199999928474426);
363
- --orange-opacity--24: rgba(237, 92, 2, 0.23999999463558197);
364
- --orange-opacity--16: rgba(237, 92, 2, 0.1599999964237213);
365
- --orange-opacity--8: rgba(237, 92, 2, 0.07999999821186066);
366
- --orange-opacity--4: rgba(237, 92, 2, 0.03999999910593033);
367
- --yellow--900: rgba(90, 66, 0, 1);
368
- --yellow--800: rgba(119, 86, 0, 1);
369
- --yellow--700: rgba(147, 107, 0, 1);
370
- --yellow--600: rgba(177, 129, 19, 1);
371
- --yellow--500: rgba(195, 147, 35, 1);
372
- --yellow--400: rgba(215, 165, 37, 1);
373
- --yellow--300: rgba(238, 181, 0, 1);
374
- --yellow--200: rgba(255, 197, 0, 1);
375
- --yellow--100: rgba(255, 215, 117, 1);
376
- --yellow--50: rgba(255, 237, 204, 1);
377
- --yellow-opacity--48: rgba(177, 129, 19, 0.47999998927116394);
378
- --yellow-opacity--40: rgba(177, 129, 19, 0.4000000059604645);
379
- --yellow-opacity--32: rgba(177, 129, 19, 0.3199999928474426);
380
- --yellow-opacity--24: rgba(177, 129, 19, 0.23999999463558197);
381
- --yellow-opacity--16: rgba(177, 129, 19, 0.1599999964237213);
382
- --yellow-opacity--8: rgba(177, 129, 19, 0.07999999821186066);
383
- --yellow-opacity--4: rgba(177, 129, 19, 0.03999999910593033);
384
- --aqua--900: rgba(1, 61, 49, 1);
385
- --aqua--800: rgba(1, 84, 66, 1);
386
- --aqua--700: rgba(1, 108, 87, 1);
387
- --aqua--600: rgba(1, 135, 108, 1);
388
- --aqua--500: rgba(0, 165, 132, 1);
389
- --aqua--400: rgba(12, 199, 160, 1);
390
- --aqua--300: rgba(67, 220, 179, 1);
391
- --aqua--200: rgba(98, 233, 194, 1);
392
- --aqua--100: rgba(126, 242, 207, 1);
393
- --aqua--50: rgba(172, 247, 223, 1);
394
- --aqua-opacity--48: rgba(4, 170, 137, 0.47999998927116394);
395
- --aqua-opacity--40: rgba(4, 170, 137, 0.4000000059604645);
396
- --aqua-opacity--32: rgba(4, 170, 137, 0.3199999928474426);
397
- --aqua-opacity--24: rgba(4, 170, 137, 0.23999999463558197);
398
- --aqua-opacity--16: rgba(4, 170, 137, 0.1599999964237213);
399
- --aqua-opacity--8: rgba(4, 170, 137, 0.07999999821186066);
400
- --aqua-opacity--4: rgba(4, 170, 137, 0.03999999910593033);
401
- --fushia--900: rgba(122, 0, 59, 1);
402
- --fushia--800: rgba(179, 1, 87, 1);
403
- --fushia--700: rgba(214, 1, 104, 1);
404
- --fushia--600: rgba(254, 1, 123, 1);
405
- --fushia--500: rgba(255, 77, 163, 1);
406
- --fushia--400: rgba(255, 113, 201, 1);
407
- --fushia--300: rgba(255, 146, 213, 1);
408
- --fushia--200: rgba(255, 177, 225, 1);
409
- --fushia--100: rgba(254, 220, 241, 1);
410
- --fushia--50: rgba(255, 242, 250, 1);
411
- --fushia-opacity--48: rgba(254, 1, 123, 0.47999998927116394);
412
- --fushia-opacity--40: rgba(254, 1, 123, 0.4000000059604645);
413
- --fushia-opacity--32: rgba(254, 1, 123, 0.3199999928474426);
414
- --fushia-opacity--24: rgba(254, 1, 123, 0.23999999463558197);
415
- --fushia-opacity--16: rgba(254, 1, 123, 0.1599999964237213);
416
- --fushia-opacity--8: rgba(254, 1, 123, 0.07999999821186066);
417
- --fushia-opacity--4: rgba(254, 1, 123, 0.03999999910593033);
418
- --pink--900: rgba(113, 0, 113, 1);
419
- --pink--800: rgba(148, 1, 148, 1);
420
- --pink--700: rgba(183, 1, 183, 1);
421
- --pink--600: rgba(214, 1, 214, 1);
422
- --pink--500: rgba(246, 0, 246, 1);
423
- --pink--400: rgba(244, 86, 255, 1);
424
- --pink--300: rgba(241, 130, 255, 1);
425
- --pink--200: rgba(244, 165, 255, 1);
426
- --pink--100: rgba(246, 202, 254, 1);
427
- --pink--50: rgba(251, 230, 255, 1);
428
- --pink-opacity--48: rgba(214, 1, 214, 0.47999998927116394);
429
- --pink-opacity--40: rgba(214, 1, 214, 0.4000000059604645);
430
- --pink-opacity--32: rgba(214, 1, 214, 0.3199999928474426);
431
- --pink-opacity--24: rgba(214, 1, 214, 0.23999999463558197);
432
- --pink-opacity--16: rgba(214, 1, 214, 0.1599999964237213);
433
- --pink-opacity--8: rgba(214, 1, 214, 0.07999999821186066);
434
- --pink-opacity--4: rgba(214, 1, 214, 0.03999999910593033);
435
- --36--regular: 36px;
436
- --36--semi-bold: 36px;
437
- --36--bold: 36px;
438
- --24--regular: 24px;
439
- --24--medium: 24px;
440
- --24--semi-bold: 24px;
441
- --24--bold: 24px;
442
- --16--regular: 16px;
443
- --16--medium: 16px;
444
- --16--semi-bold: 16px;
445
- --16--bold: 16px;
446
- --14--regular: 14px;
447
- --14--medium: 14px;
448
- --14--semibold: 14px;
449
- --14--bold: 14px;
450
- --13--regular: 13px;
451
- --13--medium: 13px;
452
- --13--semi-bold: 13px;
453
- --13--bold: 13px;
454
- --12--regular: 12px;
455
- --12--medium: 12px;
456
- --12--semi-bold: 12px;
457
- --12--bold: 12px;
458
- --11--regular: 11px;
459
- --11--medium: 11px;
460
- --11--semibold: 11px;
461
- --11--bold: 11px;
462
- --10--regular: 10px;
463
- --10--medium: 10px;
464
- --10--semibold: 10px;
465
- --10--bold: 10px;
466
- --32--medium: 32px;
467
- --space--0: 0px;
468
- --space--2: 2px;
469
- --space--4: 4px;
470
- --space--8: 8px;
471
- --space--12: 12px;
472
- --space--16: 16px;
473
- --space--24: 24px;
474
- --space--32: 32px;
475
- --space--48: 48px;
476
- --space--64: 64px;
477
- --radius--2: 2px;
478
- --radius--4: 4px;
479
- --radius--8: 8px;
480
- --radius--12: 12px;
481
- --radius--full: 9999px;
482
- --shadow---xs: 0px 1px 2px rgba(16, 24, 40, 0.04);
483
- --shadow---sm: 0px 1px 3px rgba(16, 24, 40, 0.06);
484
- --shadow---md: 0px 4px 8px rgba(16, 24, 40, 0.1);
485
- --shadow---lg: 0px 12px 16px rgba(16, 24, 40, 0.08);
486
- --shadow---xl: 0px 20px 24px rgba(16, 24, 40, 0.08);
487
- --shadow---2-xl: 0px 24px 48px rgba(16, 24, 40, 0.18);
488
- --shadow---3-xl: 0px 32px 64px rgba(16, 24, 40, 0.14);
489
- }
490
-
491
- :root[data-theme="dark"] {
492
- --base--1200: rgba(249, 249, 252, 1);
493
- --base--1100: rgba(241, 242, 247, 1);
494
- --base--1000: rgba(233, 234, 242, 1);
495
- --base--900: rgba(225, 226, 236, 1);
496
- --base--800: rgba(207, 209, 224, 1);
497
- --base--700: rgba(183, 186, 208, 1);
498
- --base--600: rgba(146, 151, 183, 1);
499
- --base--500: rgba(91, 98, 138, 1);
500
- --base--400: rgba(54, 59, 85, 1);
501
- --base--300: rgba(40, 44, 65, 1);
502
- --base--200: rgba(33, 36, 54, 1);
503
- --base--100: rgba(26, 28, 45, 1);
504
- --base--50: rgba(21, 22, 36, 1);
505
- }
package/src/theme.js ADDED
@@ -0,0 +1,48 @@
1
+ import { themes, DEFAULT_THEME } from './themes';
2
+
3
+ /** localStorage key that remembers the chosen theme. */
4
+ export const THEME_STORAGE_KEY = 'nurvus.theme';
5
+
6
+ /** Fired on the themed element (bubbles) after setTheme; detail = the theme. */
7
+ export const THEME_CHANGE_EVENT = 'nurvus:themechange';
8
+
9
+ /** A theme object by id, or undefined. */
10
+ export function getTheme(id) {
11
+ return themes.find((theme) => theme.id === id);
12
+ }
13
+
14
+ /** The theme currently applied to `root` (defaults to <html>). */
15
+ export function currentTheme(root = document.documentElement) {
16
+ return getTheme(root.getAttribute('data-theme')) || getTheme(DEFAULT_THEME);
17
+ }
18
+
19
+ /**
20
+ * Apply a theme. Sets data-theme on `root` (default <html>), which swaps every
21
+ * --nv-* custom property underneath it. Pass any element as `root` to theme
22
+ * just that part of the page; themes nest.
23
+ *
24
+ * setTheme('tokyo-neon');
25
+ * setTheme('apollo-white', { root: sidebarEl, persist: false });
26
+ */
27
+ export function setTheme(id, { root = document.documentElement, persist = true } = {}) {
28
+ const theme = getTheme(id);
29
+ if (!theme) throw new Error(`@nurvus/ui: unknown theme "${id}". Known: ${themes.map((t) => t.id).join(', ')}`);
30
+ root.setAttribute('data-theme', theme.id);
31
+ if (persist) {
32
+ try { window.localStorage.setItem(THEME_STORAGE_KEY, theme.id); } catch (e) { /* storage blocked */ }
33
+ }
34
+ root.dispatchEvent(new CustomEvent(THEME_CHANGE_EVENT, { detail: theme, bubbles: true }));
35
+ return theme;
36
+ }
37
+
38
+ /**
39
+ * Apply the saved theme, or `fallback` when nothing (valid) is saved.
40
+ * Call once at startup.
41
+ */
42
+ export function initTheme(fallback = DEFAULT_THEME, options = {}) {
43
+ let saved = null;
44
+ try { saved = window.localStorage.getItem(THEME_STORAGE_KEY); } catch (e) { /* storage blocked */ }
45
+ return setTheme(getTheme(saved) ? saved : fallback, { persist: false, ...options });
46
+ }
47
+
48
+ export { themes, DEFAULT_THEME };
@@ -0,0 +1,52 @@
1
+ {
2
+ "id": "apollo-white",
3
+ "name": "Apollo White",
4
+ "mode": "light",
5
+ "status": "demo",
6
+ "order": 1,
7
+ "keywords": "Bright. Refined. Minimal.",
8
+ "summary": "Pure white and quiet greys, with color only where it means something.",
9
+ "description": "Marble in morning light. The chrome steps back into pure white and quiet greys, so color only appears where it means something: blue for what runs, violet for what decides, raspberry for what renders.",
10
+ "bestFor": "Documentation, forms, long reading, daylight work and anything that gets printed.",
11
+ "showcase": {
12
+ "label": "text-subtle",
13
+ "title": "text",
14
+ "tagline": "text-subtle",
15
+ "swatches": [
16
+ "accent",
17
+ "syntax-keyword",
18
+ "syntax-tag",
19
+ "surface",
20
+ "syntax-string"
21
+ ]
22
+ },
23
+ "colors": {
24
+ "bg": "#FFFFFF",
25
+ "bg-alt": "#F5F6F8",
26
+ "bg-deep": "#EEF0F4",
27
+ "surface": "#F0F2F5",
28
+ "surface-hover": "#E6E9EF",
29
+ "border": "#E2E5EB",
30
+ "border-strong": "#868E9E",
31
+ "text": "#242938",
32
+ "text-muted": "#4A5163",
33
+ "text-subtle": "#687080",
34
+ "accent": "#245CC7",
35
+ "accent-fill": "#245CC7",
36
+ "on-accent": "#FFFFFF",
37
+ "accent-soft": "rgba(36, 92, 199, 0.10)",
38
+ "selection": "#E5EDFF",
39
+ "cursor": "#245CC7",
40
+ "success": "#168367",
41
+ "warning": "#9A5B00",
42
+ "danger": "#C42B3B",
43
+ "info": "#245CC7",
44
+ "syntax-comment": "#687080",
45
+ "syntax-keyword": "#8952BD",
46
+ "syntax-function": "#245CC7",
47
+ "syntax-tag": "#C44067",
48
+ "syntax-attr": "#9A5B00",
49
+ "syntax-string": "#168367",
50
+ "syntax-number": "#B04A00"
51
+ }
52
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "id": "arcane",
3
+ "name": "Arcane",
4
+ "mode": "dark",
5
+ "status": "demo",
6
+ "order": 7,
7
+ "keywords": "Mystic. Charged. Forbidden.",
8
+ "summary": "Deep violet shadows charged with orchid and magenta.",
9
+ "description": "Knowledge meant for few. Deep violet shadows charged with orchid and magenta, like a spell caught mid-cast. Calm surfaces, then a crackle of color exactly where the power is.",
10
+ "bestFor": "Music and art apps, creative tools and night modes with personality.",
11
+ "showcase": {
12
+ "label": "syntax-keyword",
13
+ "title": "accent",
14
+ "tagline": "text-muted",
15
+ "swatches": [
16
+ "accent",
17
+ "syntax-keyword",
18
+ "accent-fill",
19
+ "syntax-string",
20
+ "syntax-number"
21
+ ]
22
+ },
23
+ "colors": {
24
+ "bg": "#120B1F",
25
+ "bg-alt": "#0E0818",
26
+ "bg-deep": "#0A0612",
27
+ "surface": "#1C1230",
28
+ "surface-hover": "#26193F",
29
+ "border": "#2E2147",
30
+ "border-strong": "#76619F",
31
+ "text": "#ECE3FF",
32
+ "text-muted": "#BFAEE3",
33
+ "text-subtle": "#9381B8",
34
+ "accent": "#C77DFF",
35
+ "accent-fill": "#9D4EDD",
36
+ "on-accent": "#FFFFFF",
37
+ "accent-soft": "rgba(199, 125, 255, 0.16)",
38
+ "selection": "#3A2560",
39
+ "cursor": "#FF4FD8",
40
+ "success": "#7EE8C6",
41
+ "warning": "#FFD166",
42
+ "danger": "#FF4F8B",
43
+ "info": "#7AA2F7",
44
+ "syntax-comment": "#9D8CC2",
45
+ "syntax-keyword": "#FF4FD8",
46
+ "syntax-function": "#C77DFF",
47
+ "syntax-tag": "#FF79C6",
48
+ "syntax-attr": "#E0AAFF",
49
+ "syntax-string": "#7EE8C6",
50
+ "syntax-number": "#FFD166"
51
+ }
52
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "id": "dopamine",
3
+ "name": "Dopamine",
4
+ "mode": "light",
5
+ "status": "demo",
6
+ "order": 2,
7
+ "keywords": "Vivid. Joyful. Addictive.",
8
+ "summary": "Warm cream paper with saturated pink, purple and blue.",
9
+ "description": "Named after the brain's reward chemical. Warm cream paper, then color that wants to be clicked: hot pink for action, electric purple for logic, a confident blue for anything that moves. Every interaction should feel like a small win.",
10
+ "bestFor": "Playful products, onboarding, celebrations, social and anything where delight is the point.",
11
+ "showcase": {
12
+ "label": "accent",
13
+ "title": "accent",
14
+ "tagline": "text-muted",
15
+ "swatches": [
16
+ "accent-fill",
17
+ "syntax-keyword",
18
+ "syntax-function",
19
+ "syntax-number",
20
+ "syntax-string"
21
+ ]
22
+ },
23
+ "colors": {
24
+ "bg": "#FFFCF7",
25
+ "bg-alt": "#FFF5EA",
26
+ "bg-deep": "#FDEBDB",
27
+ "surface": "#FFEFE4",
28
+ "surface-hover": "#FFE3D4",
29
+ "border": "#F3DACB",
30
+ "border-strong": "#A67F72",
31
+ "text": "#2B1B3D",
32
+ "text-muted": "#55446A",
33
+ "text-subtle": "#7D6A8F",
34
+ "accent": "#C8186F",
35
+ "accent-fill": "#D81B7A",
36
+ "on-accent": "#FFFFFF",
37
+ "accent-soft": "rgba(216, 27, 122, 0.10)",
38
+ "selection": "#FFD6EC",
39
+ "cursor": "#D81B7A",
40
+ "success": "#0B7A52",
41
+ "warning": "#A35200",
42
+ "danger": "#C71F37",
43
+ "info": "#1A5FD0",
44
+ "syntax-comment": "#76658A",
45
+ "syntax-keyword": "#7B2FF7",
46
+ "syntax-function": "#1A5FD0",
47
+ "syntax-tag": "#C8186F",
48
+ "syntax-attr": "#A35200",
49
+ "syntax-string": "#0B7A52",
50
+ "syntax-number": "#B8400A"
51
+ }
52
+ }
@@ -0,0 +1,22 @@
1
+ // The NURVUS themes. Each one is a complete, standalone palette: every role
2
+ // token has a value, and no theme inherits from another. Add a theme by adding
3
+ // a JSON file here (see roles.json for what each token is for) and listing it
4
+ // below; tools/build-tokens.js turns them into [data-theme="<id>"] CSS blocks.
5
+ import apolloWhite from './apollo-white.json';
6
+ import dopamine from './dopamine.json';
7
+ import tokyoNeon from './tokyo-neon.json';
8
+ import nether from './nether.json';
9
+ import netherNeon from './nether-neon.json';
10
+ import outworld from './outworld.json';
11
+ import arcane from './arcane.json';
12
+ import roles from './roles.json';
13
+
14
+ /** All themes, in display order (light first). */
15
+ export const themes = [apolloWhite, dopamine, tokyoNeon, nether, netherNeon, outworld, arcane]
16
+ .sort((a, b) => a.order - b.order);
17
+
18
+ /** The theme a page gets with no data-theme attribute at all. */
19
+ export const DEFAULT_THEME = 'apollo-white';
20
+
21
+ /** What each role token is for, and the contrast it must meet. */
22
+ export { roles };
@@ -0,0 +1,52 @@
1
+ {
2
+ "id": "nether-neon",
3
+ "name": "Nether Neon",
4
+ "mode": "dark",
5
+ "status": "demo",
6
+ "order": 5,
7
+ "keywords": "Deep. Wired. Electric.",
8
+ "summary": "Nether's near-black greys and violet, with the code lit in neon.",
9
+ "description": "Nether with the lights on. The same near-black ground, the same true greys and the same single violet for actions, but the code glows: cyan for what runs, pink for what renders, violet for what decides, lime for what it says.",
10
+ "bestFor": "Code-heavy tools that want Nether's calm chrome without giving up syntax color.",
11
+ "showcase": {
12
+ "label": "text-subtle",
13
+ "title": "syntax-function",
14
+ "tagline": "text",
15
+ "swatches": [
16
+ "accent-fill",
17
+ "syntax-function",
18
+ "syntax-tag",
19
+ "syntax-number",
20
+ "syntax-string"
21
+ ]
22
+ },
23
+ "colors": {
24
+ "bg": "#0B0C10",
25
+ "bg-alt": "#0F1015",
26
+ "bg-deep": "#08090C",
27
+ "surface": "#17181F",
28
+ "surface-hover": "#1F2129",
29
+ "border": "#22242D",
30
+ "border-strong": "#5E6272",
31
+ "text": "#E7E9EE",
32
+ "text-muted": "#B4B8C4",
33
+ "text-subtle": "#8B90A0",
34
+ "accent": "#8A89FA",
35
+ "accent-fill": "#504FF6",
36
+ "on-accent": "#FFFFFF",
37
+ "accent-soft": "rgba(110, 109, 248, 0.16)",
38
+ "selection": "#26264A",
39
+ "cursor": "#00F5FF",
40
+ "success": "#5FD08A",
41
+ "warning": "#F5B83D",
42
+ "danger": "#FF6B6B",
43
+ "info": "#00D5FF",
44
+ "syntax-comment": "#8B90A0",
45
+ "syntax-keyword": "#BB9AF7",
46
+ "syntax-function": "#00D5FF",
47
+ "syntax-tag": "#FF4FD8",
48
+ "syntax-attr": "#FF9E64",
49
+ "syntax-string": "#9ECE6A",
50
+ "syntax-number": "#FF9E64"
51
+ }
52
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "id": "nether",
3
+ "name": "Nether",
4
+ "mode": "dark",
5
+ "status": "demo",
6
+ "order": 4,
7
+ "keywords": "Deep. Silent. Absolute.",
8
+ "summary": "Near-black and true greys, with one NURVUS violet accent.",
9
+ "description": "The world below. Near-black ground and true greys with no tint at all, and a single NURVUS violet that only shows up where you act. Nothing glows unless it has to.",
10
+ "bestFor": "Focus modes, long sessions, media and canvases where the content should be the only light in the room.",
11
+ "showcase": {
12
+ "label": "text-subtle",
13
+ "title": "text",
14
+ "tagline": "text-muted",
15
+ "swatches": [
16
+ "accent-fill",
17
+ "accent",
18
+ "text-muted",
19
+ "surface-hover",
20
+ "warning"
21
+ ]
22
+ },
23
+ "colors": {
24
+ "bg": "#0B0C10",
25
+ "bg-alt": "#0F1015",
26
+ "bg-deep": "#08090C",
27
+ "surface": "#17181F",
28
+ "surface-hover": "#1F2129",
29
+ "border": "#22242D",
30
+ "border-strong": "#5E6272",
31
+ "text": "#E7E9EE",
32
+ "text-muted": "#B4B8C4",
33
+ "text-subtle": "#8B90A0",
34
+ "accent": "#8A89FA",
35
+ "accent-fill": "#504FF6",
36
+ "on-accent": "#FFFFFF",
37
+ "accent-soft": "rgba(110, 109, 248, 0.16)",
38
+ "selection": "#26264A",
39
+ "cursor": "#8A89FA",
40
+ "success": "#5FD08A",
41
+ "warning": "#F5B83D",
42
+ "danger": "#FF6B6B",
43
+ "info": "#8A89FA",
44
+ "syntax-comment": "#8B90A0",
45
+ "syntax-keyword": "#A5A4FB",
46
+ "syntax-function": "#F5F6F8",
47
+ "syntax-tag": "#8A89FA",
48
+ "syntax-attr": "#C9CCD6",
49
+ "syntax-string": "#B4B8C4",
50
+ "syntax-number": "#F5B83D"
51
+ }
52
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "id": "outworld",
3
+ "name": "Outworld",
4
+ "mode": "dark",
5
+ "status": "demo",
6
+ "order": 6,
7
+ "keywords": "Alien. Molten. Untamed.",
8
+ "summary": "Plum dusk with molten amber, ember red and an acid green.",
9
+ "description": "A realm under a strange sky. Deep plum dusk lit by molten amber and ember red, with an acid green that doesn't belong to this world. Warm where every other dark theme is cold.",
10
+ "bestFor": "Games, creative tools and launch pages that should feel like stepping somewhere else.",
11
+ "showcase": {
12
+ "label": "syntax-keyword",
13
+ "title": "accent",
14
+ "tagline": "text",
15
+ "swatches": [
16
+ "accent",
17
+ "syntax-function",
18
+ "syntax-tag",
19
+ "syntax-keyword",
20
+ "syntax-string"
21
+ ]
22
+ },
23
+ "colors": {
24
+ "bg": "#1A1020",
25
+ "bg-alt": "#140C19",
26
+ "bg-deep": "#0F0913",
27
+ "surface": "#24172A",
28
+ "surface-hover": "#2E1E35",
29
+ "border": "#38253F",
30
+ "border-strong": "#7D6385",
31
+ "text": "#F3E6E0",
32
+ "text-muted": "#CDB7BD",
33
+ "text-subtle": "#9C8496",
34
+ "accent": "#FF8A3D",
35
+ "accent-fill": "#FF8A3D",
36
+ "on-accent": "#1A1020",
37
+ "accent-soft": "rgba(255, 138, 61, 0.14)",
38
+ "selection": "#3E2442",
39
+ "cursor": "#FFB35C",
40
+ "success": "#9BE564",
41
+ "warning": "#FFC857",
42
+ "danger": "#FF5470",
43
+ "info": "#C792EA",
44
+ "syntax-comment": "#A08A99",
45
+ "syntax-keyword": "#C792EA",
46
+ "syntax-function": "#FFB35C",
47
+ "syntax-tag": "#FF6B5B",
48
+ "syntax-attr": "#FFC857",
49
+ "syntax-string": "#9BE564",
50
+ "syntax-number": "#FF8A3D"
51
+ }
52
+ }