@nexub/tokens 2.9.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/README.md CHANGED
@@ -12,7 +12,7 @@ npx nexub-migrate --rules logical-classes --ignore 'src/legacy/**'
12
12
 
13
13
  | Rule | Does |
14
14
  | --- | --- |
15
- | `legacy-tokens` | `var(--color-text-primary)` → `var(--color-on-surface)`, `--color-{leap,bookub,payub,founderub}-500` → `--color-{brand}`, `--color-brand-primary-500` → `--color-primary`. Map is built from the installed `@nexub/themes` (`base.css` + `light.css`), else an embedded snapshot. Color-mix aliases (`--color-*-border`) are reported, not rewritten. `--color-text-disabled` is a role and is never touched; declarations (`--color-x: …`) are left alone. |
15
+ | `legacy-tokens` | `var(--color-text-primary)` → `var(--color-on-surface)`, `--color-{leap,bookub,payub,founderub}-500` → `--color-{brand}`, `--color-brand-primary-500` → `--color-primary`. Also Tailwind colour utilities on legacy names: `bg-bg-default` → `bg-surface`, `text-text-primary/80` → `text-on-surface/80`. The map is a frozen table of the 2.9 aliases (3.0 removed them from `@nexub/themes`, `@nexub/tokens` and the Tailwind preset). Color-mix aliases (`--color-*-border`) are reported, not rewritten. Never touched: `--color-text-disabled` (a role) and `--color-ring-default`, `--color-ring-offset`, `--color-accent-500` (brand themes override them); declarations (`--color-x: …`) are left alone. |
16
16
  | `logical-classes` | `ml/mr` `pl/pr` `border-l/r` `rounded-l/r/tl/tr/bl/br` `text-left/right` → `ms/me` `ps/pe` `border-s/e` `rounded-s/e/ss/se/es/ee` `text-start/end`, keeping variants, `!` and `-`. `left-*`/`right-*` positions are reported only. |
17
17
  | `tw-animate` | Reports tailwindcss-animate classes (`animate-in`, `fade-in-0`, `zoom-in-95`, `slide-in-from-*` …). Use `nx-motion` / `nx-pop` / `nx-dialog` from `@nexub/themes/base`. |
18
18
  | `opacity-modifier` | Reports `bg-[var(--x)]/10` (Tailwind 3 emits nothing). `--fix` rewrites to `bg-[color-mix(in_srgb,var(--x)_10%,transparent)]`. |
@@ -2,7 +2,6 @@
2
2
  // nexub-migrate — move app code onto current Nexub DS conventions.
3
3
  // Dependency-free (node: built-ins only), Node >= 20. See ./README.md.
4
4
  import { readFileSync, readdirSync, realpathSync, statSync, writeFileSync } from 'node:fs';
5
- import { createRequire } from 'node:module';
6
5
  import path from 'node:path';
7
6
  import { fileURLToPath } from 'node:url';
8
7
  import { parseArgs } from 'node:util';
@@ -13,7 +12,9 @@ const SKIP_DIRS = new Set(['node_modules', 'dist', 'build', '.next', 'out', 'cov
13
12
  const MAX_BYTES = 1024 * 1024;
14
13
 
15
14
  // ─── legacy-tokens: alias map ────────────────────────────────────────────────
16
- const NEVER = new Set(['--color-text-disabled']); // the disabled-state role, not a legacy alias
15
+ // Not legacy aliases: the disabled-state role, and three tokens brand themes override
16
+ // ([data-product] sets ring-default to its tertiary and accent-500 to its scale).
17
+ const NEVER = new Set(['--color-text-disabled', '--color-ring-default', '--color-ring-offset', '--color-accent-500']);
17
18
  const BRAND = {
18
19
  '--color-leap-500': '--color-leap',
19
20
  '--color-bookub-500': '--color-bookub',
@@ -52,8 +53,8 @@ export function buildAliasMap(cssTexts) {
52
53
  return { aliases, mix };
53
54
  }
54
55
 
55
- // Snapshot of buildAliasMap([@nexub/themes base.css, light.css]) at 1.8.0 — used when
56
- // @nexub/themes is not installed. bin/nexub-migrate.test.mjs fails if it drifts from source.
56
+ // buildAliasMap([@nexub/themes 2.9 base.css, light.css]), frozen: 3.0 removed these
57
+ // aliases from @nexub/themes, so this table is the only record of them.
57
58
  export const SNAPSHOT = /* SNAPSHOT:BEGIN */ {
58
59
  "aliases": {
59
60
  "--color-leap-500": "--color-leap",
@@ -82,7 +83,6 @@ export const SNAPSHOT = /* SNAPSHOT:BEGIN */ {
82
83
  "--color-text-success": "--color-on-success-container",
83
84
  "--color-text-warning": "--color-on-warning-container",
84
85
  "--color-text-danger": "--color-on-error-container",
85
- "--color-accent-500": "--color-primary",
86
86
  "--color-bg-default": "--color-surface",
87
87
  "--color-bg-subtle": "--color-surface-container-low",
88
88
  "--color-bg-muted": "--color-surface-container-high",
@@ -98,8 +98,6 @@ export const SNAPSHOT = /* SNAPSHOT:BEGIN */ {
98
98
  "--color-border-subtle": "--color-surface-container-high",
99
99
  "--color-border-strong": "--color-outline",
100
100
  "--color-border-inverse": "--color-inverse-on-surface",
101
- "--color-ring-default": "--color-primary",
102
- "--color-ring-offset": "--color-surface",
103
101
  "--color-surface-muted": "--color-surface-container-low",
104
102
  "--color-surface-raised": "--color-surface-elevated",
105
103
  "--color-surface-sunken": "--color-surface-container-high",
@@ -130,17 +128,6 @@ export const SNAPSHOT = /* SNAPSHOT:BEGIN */ {
130
128
  }
131
129
  } /* SNAPSHOT:END */;
132
130
 
133
- export function loadAliasMap(cwd = process.cwd()) {
134
- for (const from of [path.join(cwd, 'package.json'), import.meta.url]) {
135
- try {
136
- const req = createRequire(from);
137
- const css = ['base', 'light'].map((f) => readFileSync(req.resolve(`@nexub/themes/${f}`), 'utf8'));
138
- return { ...buildAliasMap(css), source: '@nexub/themes' };
139
- } catch { /* not resolvable from here */ }
140
- }
141
- return { ...SNAPSHOT, source: 'snapshot' };
142
- }
143
-
144
131
  // ─── class-string contexts ───────────────────────────────────────────────────
145
132
  /**
146
133
  * Find string-literal bodies in JS/TS source. Handles '…', "…", `…${…}…` (static chunks
@@ -219,6 +206,9 @@ const LOGICAL = [
219
206
  const POSITION = /^(left|right)-/;
220
207
  const TW_ANIMATE = /^(animate-(in|out)|(fade|zoom|spin)-(in|out)(-.+)?|slide-(in-from|out-to)-.+)$/;
221
208
  const OPACITY = /^([\w-]+)-\[var\((--[\w-]+)\)\]\/(\d+)$/;
209
+ // Tailwind colour utilities on a legacy name (bg-bg-default, text-text-primary/80):
210
+ // the preset and tailwind.css dropped these in 3.0. Same utility, role name.
211
+ const COLOR_UTILITY = /^(bg|text|border(?:-[xyselrtb])?|ring|ring-offset|outline|divide|fill|stroke|from|via|to|decoration|shadow|accent|caret|placeholder)-([a-z][\w-]*?)(\/\d+)?$/;
222
212
 
223
213
  /** Split `md:hover:!-ml-2` into { prefix: 'md:hover:', imp: '!', neg: '-', base: 'ml-2' }. */
224
214
  function splitToken(tok) {
@@ -236,7 +226,7 @@ function splitToken(tok) {
236
226
  return { prefix: tok.slice(0, cut), imp, neg, base: rest.slice(neg.length) };
237
227
  }
238
228
 
239
- function rewriteClassText(text, seg, offset, rules, fix, report) {
229
+ function rewriteClassText(text, seg, offset, rules, fix, report, aliasMap) {
240
230
  return text.replace(/\S+/g, (tok, off) => {
241
231
  if ((seg.openLeft && off === 0) || (seg.openRight && off + tok.length === text.length)) return tok; // glued to ${…}
242
232
  const at = offset + off;
@@ -246,6 +236,12 @@ function rewriteClassText(text, seg, offset, rules, fix, report) {
246
236
  for (const [re, fn] of LOGICAL) if (re.test(next)) { next = next.replace(re, fn); break; }
247
237
  if (POSITION.test(base)) report(at, 'logical-classes', `"${tok}" is a physical position; review for start-/end- (not auto-fixed)`);
248
238
  }
239
+ if (rules.has('legacy-tokens')) {
240
+ const m = COLOR_UTILITY.exec(next);
241
+ const name = m && `--color-${m[2]}`;
242
+ if (m && aliasMap.aliases[name]) next = `${m[1]}-${aliasMap.aliases[name].slice('--color-'.length)}${m[3] ?? ''}`;
243
+ else if (m && aliasMap.mix[name]) report(at, 'legacy-tokens', `"${tok}" uses ${name}, a color-mix alias (${aliasMap.mix[name]}); rewrite by hand`);
244
+ }
249
245
  if (rules.has('tw-animate') && TW_ANIMATE.test(base)) {
250
246
  report(at, 'tw-animate', `"${tok}" is a tailwindcss-animate class; use nx-motion / nx-pop / nx-dialog from @nexub/themes/base`);
251
247
  }
@@ -385,12 +381,12 @@ function migrateComponents(src) {
385
381
  export function migrateSource(src, { ext, rules = new Set(RULES), fix = false, aliasMap = SNAPSHOT }) {
386
382
  const items = [];
387
383
  let text = src;
388
- if (['logical-classes', 'tw-animate', 'opacity-modifier'].some((r) => rules.has(r))) {
384
+ if (['logical-classes', 'tw-animate', 'opacity-modifier', 'legacy-tokens'].some((r) => rules.has(r))) {
389
385
  let out = '';
390
386
  let last = 0;
391
387
  for (const seg of classSegments(src, ext)) {
392
388
  out += src.slice(last, seg.start) + rewriteClassText(src.slice(seg.start, seg.end), seg, seg.start, rules, fix,
393
- (at, rule, message) => items.push({ at, rule, message }));
389
+ (at, rule, message) => items.push({ at, rule, message }), aliasMap);
394
390
  last = seg.end;
395
391
  }
396
392
  text = out + src.slice(last);
@@ -457,7 +453,8 @@ Options:
457
453
 
458
454
  Rules:
459
455
  legacy-tokens var(--color-text-primary) -> var(--color-on-surface), brand -500 -> role;
460
- color-mix aliases (e.g. --color-semantic-success-border) reported
456
+ Tailwind utilities too (bg-bg-default -> bg-surface, text-text-primary
457
+ -> text-on-surface); color-mix aliases (--color-semantic-success-border) reported
461
458
  logical-classes ml/mr, pl/pr, border-l/r, rounded-l/r/tl/tr/bl/br, text-left/right
462
459
  -> ms/me, ps/pe, border-s/e, rounded-s/e/ss/se/es/ee, text-start/end;
463
460
  left-/right- positions reported
@@ -492,11 +489,10 @@ export function run(argv, { cwd = process.cwd(), stdout = (s) => process.stdout.
492
489
  const unknown = [...rules].filter((r) => !RULES.includes(r));
493
490
  if (unknown.length) { stderr(`Unknown rule(s): ${unknown.join(', ')}. Known: ${RULES.join(', ')}\n`); return 2; }
494
491
 
495
- const aliasMap = rules.has('legacy-tokens') ? loadAliasMap(cwd) : SNAPSHOT;
496
492
  const results = [];
497
493
  for (const abs of collectFiles(positionals.length ? positionals : ['src'], { cwd, ignore: o.ignore ?? [] })) {
498
494
  const src = readFileSync(abs, 'utf8');
499
- const { output, manual } = migrateSource(src, { ext: path.extname(abs), rules, fix: !!o.fix, aliasMap });
495
+ const { output, manual } = migrateSource(src, { ext: path.extname(abs), rules, fix: !!o.fix });
500
496
  const a = src.split('\n');
501
497
  const b = output.split('\n');
502
498
  const changes = a.flatMap((line, i) => (line === b[i] ? [] : [{ line: i + 1, before: line, after: b[i] }]));
@@ -511,7 +507,7 @@ export function run(argv, { cwd = process.cwd(), stdout = (s) => process.stdout.
511
507
  };
512
508
 
513
509
  if (o.json) {
514
- stdout(`${JSON.stringify({ written: !!o.write, aliasSource: aliasMap.source ?? 'snapshot', results, totals }, null, 2)}\n`);
510
+ stdout(`${JSON.stringify({ written: !!o.write, aliasSource: 'snapshot', results, totals }, null, 2)}\n`);
515
511
  } else {
516
512
  for (const r of results) {
517
513
  stdout(`--- ${r.file}\n+++ ${r.file}\n`);
package/dist/css/rem.css CHANGED
@@ -1,83 +1 @@
1
- /* @nexub/tokens/css/rem: import after @nexub/tokens/css (and @nexub/themes). */
2
- :root {
3
- --spacing-1: 0.25rem;
4
- --spacing-2: 0.5rem;
5
- --spacing-3: 0.75rem;
6
- --spacing-4: 1rem;
7
- --spacing-5: 1.25rem;
8
- --spacing-6: 1.5rem;
9
- --spacing-7: 1.75rem;
10
- --spacing-8: 2rem;
11
- --spacing-9: 2.25rem;
12
- --spacing-10: 2.5rem;
13
- --spacing-11: 2.75rem;
14
- --spacing-12: 3rem;
15
- --spacing-14: 3.5rem;
16
- --spacing-16: 4rem;
17
- --spacing-20: 5rem;
18
- --spacing-24: 6rem;
19
- --spacing-28: 7rem;
20
- --spacing-32: 8rem;
21
- --spacing-40: 10rem;
22
- --spacing-48: 12rem;
23
- --spacing-56: 14rem;
24
- --spacing-64: 16rem;
25
- --spacing-0-5: 0.125rem;
26
- --spacing-1-5: 0.375rem;
27
- --spacing-2-5: 0.625rem;
28
- --spacing-3-5: 0.875rem;
29
- --radius-xs: 0.125rem;
30
- --radius-sm: 0.25rem;
31
- --radius-md: 0.5rem;
32
- --radius-lg: 0.75rem;
33
- --radius-xl: 1rem;
34
- --radius-2xl: 1.5rem;
35
- --radius-3xl: 2rem;
36
- --shape-field: 0.75rem;
37
- --shape-container: 1rem;
38
- --shape-overlay: 1.5rem;
39
- --shape-tooltip: 0.5rem;
40
- --shape-min: 0.25rem;
41
- --size-control-xs: 1.5rem;
42
- --size-control-sm: 2rem;
43
- --size-control-md: 2.5rem;
44
- --size-control-lg: 3rem;
45
- --size-control-xl: 3.5rem;
46
- --type-display-lg-size: 3.5rem;
47
- --type-display-lg-lineHeight: 3.75rem;
48
- --type-display-md-size: 2.75rem;
49
- --type-display-md-lineHeight: 3rem;
50
- --type-display-sm-size: 2.25rem;
51
- --type-display-sm-lineHeight: 2.5rem;
52
- --type-headline-lg-size: 2rem;
53
- --type-headline-lg-lineHeight: 2.375rem;
54
- --type-headline-md-size: 1.75rem;
55
- --type-headline-md-lineHeight: 2.125rem;
56
- --type-headline-sm-size: 1.5rem;
57
- --type-headline-sm-lineHeight: 1.875rem;
58
- --type-title-lg-size: 1.25rem;
59
- --type-title-lg-lineHeight: 1.75rem;
60
- --type-title-md-size: 1rem;
61
- --type-title-md-lineHeight: 1.5rem;
62
- --type-title-sm-size: 0.875rem;
63
- --type-title-sm-lineHeight: 1.25rem;
64
- --type-body-lg-size: 1.125rem;
65
- --type-body-lg-lineHeight: 1.75rem;
66
- --type-body-md-size: 1rem;
67
- --type-body-md-lineHeight: 1.5rem;
68
- --type-body-sm-size: 0.875rem;
69
- --type-body-sm-lineHeight: 1.25rem;
70
- --type-label-lg-size: 0.875rem;
71
- --type-label-lg-lineHeight: 1.25rem;
72
- --type-label-md-size: 0.8125rem;
73
- --type-label-md-lineHeight: 1.125rem;
74
- --type-label-sm-size: 0.75rem;
75
- --type-label-sm-lineHeight: 1rem;
76
- }
77
- [data-density='compact'] {
78
- --size-control-xs: 1.25rem;
79
- --size-control-sm: 1.5rem;
80
- --size-control-md: 2rem;
81
- --size-control-lg: 2.5rem;
82
- --size-control-xl: 3rem;
83
- }
1
+ /* @nexub/tokens/css/rem: since 3.0 @nexub/tokens/css is in rem by default, so this file is empty. Kept so existing imports keep working. */
@@ -515,42 +515,7 @@
515
515
  --color-neutral-950: #080d19;
516
516
  --color-neutral-1000: #000000;
517
517
  --color-surface-warm: #fefce8;
518
- --color-surface-muted: #f8fafc;
519
- --color-surface-raised: #ffffff;
520
- --color-surface-sunken: #f1f5f9;
521
- --color-surface-inverse: #0f172a;
522
- --color-semantic-success-default: #10b981;
523
- --color-semantic-success-bg: #ecfdf5;
524
- --color-semantic-success-border: #a7f3d0;
525
- --color-semantic-success-strong: #047857;
526
- --color-semantic-error-default: #ef4444;
527
- --color-semantic-error-bg: #fef2f2;
528
- --color-semantic-error-border: #fecaca;
529
- --color-semantic-error-strong: #b91c1c;
530
- --color-semantic-warning-default: #f59e0b;
531
- --color-semantic-warning-bg: #fffbeb;
532
- --color-semantic-warning-border: #fde68a;
533
- --color-semantic-warning-strong: #b45309;
534
- --color-semantic-info-default: #4099f1;
535
- --color-semantic-info-bg: #eff6ff;
536
- --color-semantic-info-border: #bfdbfe;
537
- --color-semantic-info-strong: #1d4ed8;
538
- --color-text-primary: #0f172a;
539
- --color-text-secondary: #334155;
540
- --color-text-muted: #64748b;
541
- --color-text-subtle: #94a3b8;
542
- --color-text-inverse: #f8fafc;
543
- --color-text-link: #2563eb;
544
518
  --color-text-disabled: #94a3b8;
545
- --color-bg-default: #ffffff;
546
- --color-bg-subtle: #f8fafc;
547
- --color-bg-muted: #f1f5f9;
548
- --color-bg-raised: #ffffff;
549
- --color-bg-inverse: #0f172a;
550
- --color-border-default: #e2e8f0;
551
- --color-border-subtle: #f1f5f9;
552
- --color-border-strong: #94a3b8;
553
- --color-border-inverse: #334155;
554
519
  --color-ring-default: #4099f1;
555
520
  --color-ring-offset: #ffffff;
556
521
  --color-chart-1: #4099f1;
@@ -615,13 +580,13 @@
615
580
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
616
581
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
617
582
  --radius-none: 0px;
618
- --radius-xs: 2px;
619
- --radius-sm: 4px;
620
- --radius-md: 8px;
621
- --radius-lg: 12px;
622
- --radius-xl: 16px;
623
- --radius-2xl: 24px;
624
- --radius-3xl: 32px;
583
+ --radius-xs: 0.125rem;
584
+ --radius-sm: 0.25rem;
585
+ --radius-md: 0.5rem;
586
+ --radius-lg: 0.75rem;
587
+ --radius-xl: 1rem;
588
+ --radius-2xl: 1.5rem;
589
+ --radius-3xl: 2rem;
625
590
  --radius-full: 9999px;
626
591
  --shadow-xs: 0 1px 2px 0 rgba(0,0,0,0.05);
627
592
  --shadow-sm: 0 1px 3px 0 rgba(0,0,0,0.10), 0 1px 2px -1px rgba(0,0,0,0.10);
@@ -637,16 +602,16 @@
637
602
  --shadow-focus: 0 0 0 2px #ffffff, 0 0 0 4px #4099f1;
638
603
  --shadow-lift: 0 4px 12px -2px rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.08);
639
604
  --shape-control: 9999px; /** Capsule: Button, IconButton, Chip, SegmentedControl, Switch, Badge */
640
- --shape-field: 12px; /** Input, Select, Textarea, Combobox */
641
- --shape-container: 16px; /** Card, Popover, Menu, Toast */
642
- --shape-overlay: 24px; /** Dialog, Sheet, CommandPalette */
643
- --shape-tooltip: 8px; /** Tooltip, Kbd */
644
- --shape-min: 4px; /** Floor for concentric inner radii: max(min, outer - padding) */
645
- --size-control-xs: 24px;
646
- --size-control-sm: 32px;
647
- --size-control-md: 40px;
648
- --size-control-lg: 48px;
649
- --size-control-xl: 56px;
605
+ --shape-field: 0.75rem; /** Input, Select, Textarea, Combobox */
606
+ --shape-container: 1rem; /** Card, Popover, Menu, Toast */
607
+ --shape-overlay: 1.5rem; /** Dialog, Sheet, CommandPalette */
608
+ --shape-tooltip: 0.5rem; /** Tooltip, Kbd */
609
+ --shape-min: 0.25rem; /** Floor for concentric inner radii: max(min, outer - padding) */
610
+ --size-control-xs: 1.5rem;
611
+ --size-control-sm: 2rem;
612
+ --size-control-md: 2.5rem;
613
+ --size-control-lg: 3rem;
614
+ --size-control-xl: 3.5rem;
650
615
  --size-icon-xs: 12px;
651
616
  --size-icon-sm: 16px;
652
617
  --size-icon-md: 20px;
@@ -661,33 +626,33 @@
661
626
  --size-nav-sidebar: 256px;
662
627
  --size-nav-sidebar-collapsed: 64px;
663
628
  --spacing-0: 0px;
664
- --spacing-1: 4px;
665
- --spacing-2: 8px;
666
- --spacing-3: 12px;
667
- --spacing-4: 16px;
668
- --spacing-5: 20px;
669
- --spacing-6: 24px;
670
- --spacing-7: 28px;
671
- --spacing-8: 32px;
672
- --spacing-9: 36px;
673
- --spacing-10: 40px;
674
- --spacing-11: 44px;
675
- --spacing-12: 48px;
676
- --spacing-14: 56px;
677
- --spacing-16: 64px;
678
- --spacing-20: 80px;
679
- --spacing-24: 96px;
680
- --spacing-28: 112px;
681
- --spacing-32: 128px;
682
- --spacing-40: 160px;
683
- --spacing-48: 192px;
684
- --spacing-56: 224px;
685
- --spacing-64: 256px;
629
+ --spacing-1: 0.25rem;
630
+ --spacing-2: 0.5rem;
631
+ --spacing-3: 0.75rem;
632
+ --spacing-4: 1rem;
633
+ --spacing-5: 1.25rem;
634
+ --spacing-6: 1.5rem;
635
+ --spacing-7: 1.75rem;
636
+ --spacing-8: 2rem;
637
+ --spacing-9: 2.25rem;
638
+ --spacing-10: 2.5rem;
639
+ --spacing-11: 2.75rem;
640
+ --spacing-12: 3rem;
641
+ --spacing-14: 3.5rem;
642
+ --spacing-16: 4rem;
643
+ --spacing-20: 5rem;
644
+ --spacing-24: 6rem;
645
+ --spacing-28: 7rem;
646
+ --spacing-32: 8rem;
647
+ --spacing-40: 10rem;
648
+ --spacing-48: 12rem;
649
+ --spacing-56: 14rem;
650
+ --spacing-64: 16rem;
686
651
  --spacing-px: 1px;
687
- --spacing-0-5: 2px;
688
- --spacing-1-5: 6px;
689
- --spacing-2-5: 10px;
690
- --spacing-3-5: 14px;
652
+ --spacing-0-5: 0.125rem;
653
+ --spacing-1-5: 0.375rem;
654
+ --spacing-2-5: 0.625rem;
655
+ --spacing-3-5: 0.875rem;
691
656
  --container-sm: 640px;
692
657
  --container-md: 768px;
693
658
  --container-lg: 1024px;
@@ -757,64 +722,64 @@
757
722
  --text-code-lineHeight: 1.6;
758
723
  --text-code-letterSpacing: 0;
759
724
  --text-code-weight: 400;
760
- --type-display-lg-size: 56px;
761
- --type-display-lg-lineHeight: 60px;
725
+ --type-display-lg-size: 3.5rem;
726
+ --type-display-lg-lineHeight: 3.75rem;
762
727
  --type-display-lg-letterSpacing: -0.03em;
763
728
  --type-display-lg-weight: 700;
764
- --type-display-md-size: 44px;
765
- --type-display-md-lineHeight: 48px;
729
+ --type-display-md-size: 2.75rem;
730
+ --type-display-md-lineHeight: 3rem;
766
731
  --type-display-md-letterSpacing: -0.025em;
767
732
  --type-display-md-weight: 700;
768
- --type-display-sm-size: 36px;
769
- --type-display-sm-lineHeight: 40px;
733
+ --type-display-sm-size: 2.25rem;
734
+ --type-display-sm-lineHeight: 2.5rem;
770
735
  --type-display-sm-letterSpacing: -0.02em;
771
736
  --type-display-sm-weight: 700;
772
- --type-headline-lg-size: 32px;
773
- --type-headline-lg-lineHeight: 38px;
737
+ --type-headline-lg-size: 2rem;
738
+ --type-headline-lg-lineHeight: 2.375rem;
774
739
  --type-headline-lg-letterSpacing: -0.02em;
775
740
  --type-headline-lg-weight: 600;
776
- --type-headline-md-size: 28px;
777
- --type-headline-md-lineHeight: 34px;
741
+ --type-headline-md-size: 1.75rem;
742
+ --type-headline-md-lineHeight: 2.125rem;
778
743
  --type-headline-md-letterSpacing: -0.015em;
779
744
  --type-headline-md-weight: 600;
780
- --type-headline-sm-size: 24px;
781
- --type-headline-sm-lineHeight: 30px;
745
+ --type-headline-sm-size: 1.5rem;
746
+ --type-headline-sm-lineHeight: 1.875rem;
782
747
  --type-headline-sm-letterSpacing: -0.01em;
783
748
  --type-headline-sm-weight: 600;
784
- --type-title-lg-size: 20px;
785
- --type-title-lg-lineHeight: 28px;
749
+ --type-title-lg-size: 1.25rem;
750
+ --type-title-lg-lineHeight: 1.75rem;
786
751
  --type-title-lg-letterSpacing: -0.01em;
787
752
  --type-title-lg-weight: 600;
788
- --type-title-md-size: 16px;
789
- --type-title-md-lineHeight: 24px;
753
+ --type-title-md-size: 1rem;
754
+ --type-title-md-lineHeight: 1.5rem;
790
755
  --type-title-md-letterSpacing: -0.005em;
791
756
  --type-title-md-weight: 600;
792
- --type-title-sm-size: 14px;
793
- --type-title-sm-lineHeight: 20px;
757
+ --type-title-sm-size: 0.875rem;
758
+ --type-title-sm-lineHeight: 1.25rem;
794
759
  --type-title-sm-letterSpacing: 0em;
795
760
  --type-title-sm-weight: 600;
796
- --type-body-lg-size: 18px;
797
- --type-body-lg-lineHeight: 28px;
761
+ --type-body-lg-size: 1.125rem;
762
+ --type-body-lg-lineHeight: 1.75rem;
798
763
  --type-body-lg-letterSpacing: -0.011em;
799
764
  --type-body-lg-weight: 400;
800
- --type-body-md-size: 16px;
801
- --type-body-md-lineHeight: 24px;
765
+ --type-body-md-size: 1rem;
766
+ --type-body-md-lineHeight: 1.5rem;
802
767
  --type-body-md-letterSpacing: -0.011em;
803
768
  --type-body-md-weight: 400;
804
- --type-body-sm-size: 14px;
805
- --type-body-sm-lineHeight: 20px;
769
+ --type-body-sm-size: 0.875rem;
770
+ --type-body-sm-lineHeight: 1.25rem;
806
771
  --type-body-sm-letterSpacing: -0.006em;
807
772
  --type-body-sm-weight: 400;
808
- --type-label-lg-size: 14px;
809
- --type-label-lg-lineHeight: 20px;
773
+ --type-label-lg-size: 0.875rem;
774
+ --type-label-lg-lineHeight: 1.25rem;
810
775
  --type-label-lg-letterSpacing: 0em;
811
776
  --type-label-lg-weight: 500;
812
- --type-label-md-size: 13px;
813
- --type-label-md-lineHeight: 18px;
777
+ --type-label-md-size: 0.8125rem;
778
+ --type-label-md-lineHeight: 1.125rem;
814
779
  --type-label-md-letterSpacing: 0em;
815
780
  --type-label-md-weight: 500;
816
- --type-label-sm-size: 12px;
817
- --type-label-sm-lineHeight: 16px;
781
+ --type-label-sm-size: 0.75rem;
782
+ --type-label-sm-lineHeight: 1rem;
818
783
  --type-label-sm-letterSpacing: 0.01em;
819
784
  --type-label-sm-weight: 500;
820
785
  --z-hide: -1;
@@ -557,59 +557,10 @@ export declare const tokens: {
557
557
  };
558
558
  readonly surface: {
559
559
  readonly warm: "#fefce8";
560
- readonly muted: "#f8fafc";
561
- readonly raised: "#ffffff";
562
- readonly sunken: "#f1f5f9";
563
- readonly inverse: "#0f172a";
564
- };
565
- readonly semantic: {
566
- readonly success: {
567
- readonly default: "#10b981";
568
- readonly bg: "#ecfdf5";
569
- readonly border: "#a7f3d0";
570
- readonly strong: "#047857";
571
- };
572
- readonly error: {
573
- readonly default: "#ef4444";
574
- readonly bg: "#fef2f2";
575
- readonly border: "#fecaca";
576
- readonly strong: "#b91c1c";
577
- };
578
- readonly warning: {
579
- readonly default: "#f59e0b";
580
- readonly bg: "#fffbeb";
581
- readonly border: "#fde68a";
582
- readonly strong: "#b45309";
583
- };
584
- readonly info: {
585
- readonly default: "#4099f1";
586
- readonly bg: "#eff6ff";
587
- readonly border: "#bfdbfe";
588
- readonly strong: "#1d4ed8";
589
- };
590
560
  };
591
561
  readonly text: {
592
- readonly primary: "#0f172a";
593
- readonly secondary: "#334155";
594
- readonly muted: "#64748b";
595
- readonly subtle: "#94a3b8";
596
- readonly inverse: "#f8fafc";
597
- readonly link: "#2563eb";
598
562
  readonly disabled: "#94a3b8";
599
563
  };
600
- readonly bg: {
601
- readonly default: "#ffffff";
602
- readonly subtle: "#f8fafc";
603
- readonly muted: "#f1f5f9";
604
- readonly raised: "#ffffff";
605
- readonly inverse: "#0f172a";
606
- };
607
- readonly border: {
608
- readonly default: "#e2e8f0";
609
- readonly subtle: "#f1f5f9";
610
- readonly strong: "#94a3b8";
611
- readonly inverse: "#334155";
612
- };
613
564
  readonly ring: {
614
565
  readonly default: "#4099f1";
615
566
  readonly offset: "#ffffff";
@@ -558,60 +558,11 @@ export const tokens = {
558
558
  "1000": "#000000"
559
559
  },
560
560
  "surface": {
561
- "warm": "#fefce8",
562
- "muted": "#f8fafc",
563
- "raised": "#ffffff",
564
- "sunken": "#f1f5f9",
565
- "inverse": "#0f172a"
566
- },
567
- "semantic": {
568
- "success": {
569
- "default": "#10b981",
570
- "bg": "#ecfdf5",
571
- "border": "#a7f3d0",
572
- "strong": "#047857"
573
- },
574
- "error": {
575
- "default": "#ef4444",
576
- "bg": "#fef2f2",
577
- "border": "#fecaca",
578
- "strong": "#b91c1c"
579
- },
580
- "warning": {
581
- "default": "#f59e0b",
582
- "bg": "#fffbeb",
583
- "border": "#fde68a",
584
- "strong": "#b45309"
585
- },
586
- "info": {
587
- "default": "#4099f1",
588
- "bg": "#eff6ff",
589
- "border": "#bfdbfe",
590
- "strong": "#1d4ed8"
591
- }
561
+ "warm": "#fefce8"
592
562
  },
593
563
  "text": {
594
- "primary": "#0f172a",
595
- "secondary": "#334155",
596
- "muted": "#64748b",
597
- "subtle": "#94a3b8",
598
- "inverse": "#f8fafc",
599
- "link": "#2563eb",
600
564
  "disabled": "#94a3b8"
601
565
  },
602
- "bg": {
603
- "default": "#ffffff",
604
- "subtle": "#f8fafc",
605
- "muted": "#f1f5f9",
606
- "raised": "#ffffff",
607
- "inverse": "#0f172a"
608
- },
609
- "border": {
610
- "default": "#e2e8f0",
611
- "subtle": "#f1f5f9",
612
- "strong": "#94a3b8",
613
- "inverse": "#334155"
614
- },
615
566
  "ring": {
616
567
  "default": "#4099f1",
617
568
  "offset": "#ffffff"
@@ -511,42 +511,7 @@
511
511
  "color-neutral-950": "#080d19",
512
512
  "color-neutral-1000": "#000000",
513
513
  "color-surface-warm": "#fefce8",
514
- "color-surface-muted": "#f8fafc",
515
- "color-surface-raised": "#ffffff",
516
- "color-surface-sunken": "#f1f5f9",
517
- "color-surface-inverse": "#0f172a",
518
- "color-semantic-success-default": "#10b981",
519
- "color-semantic-success-bg": "#ecfdf5",
520
- "color-semantic-success-border": "#a7f3d0",
521
- "color-semantic-success-strong": "#047857",
522
- "color-semantic-error-default": "#ef4444",
523
- "color-semantic-error-bg": "#fef2f2",
524
- "color-semantic-error-border": "#fecaca",
525
- "color-semantic-error-strong": "#b91c1c",
526
- "color-semantic-warning-default": "#f59e0b",
527
- "color-semantic-warning-bg": "#fffbeb",
528
- "color-semantic-warning-border": "#fde68a",
529
- "color-semantic-warning-strong": "#b45309",
530
- "color-semantic-info-default": "#4099f1",
531
- "color-semantic-info-bg": "#eff6ff",
532
- "color-semantic-info-border": "#bfdbfe",
533
- "color-semantic-info-strong": "#1d4ed8",
534
- "color-text-primary": "#0f172a",
535
- "color-text-secondary": "#334155",
536
- "color-text-muted": "#64748b",
537
- "color-text-subtle": "#94a3b8",
538
- "color-text-inverse": "#f8fafc",
539
- "color-text-link": "#2563eb",
540
514
  "color-text-disabled": "#94a3b8",
541
- "color-bg-default": "#ffffff",
542
- "color-bg-subtle": "#f8fafc",
543
- "color-bg-muted": "#f1f5f9",
544
- "color-bg-raised": "#ffffff",
545
- "color-bg-inverse": "#0f172a",
546
- "color-border-default": "#e2e8f0",
547
- "color-border-subtle": "#f1f5f9",
548
- "color-border-strong": "#94a3b8",
549
- "color-border-inverse": "#334155",
550
515
  "color-ring-default": "#4099f1",
551
516
  "color-ring-offset": "#ffffff",
552
517
  "color-chart-1": "#4099f1",
@@ -45,11 +45,7 @@ const preset = {
45
45
  "founderub-container": "var(--color-founderub-container)",
46
46
  "on-founderub-container": "var(--color-on-founderub-container)",
47
47
  "surface": {
48
- "warm": "var(--color-surface-warm)",
49
- "muted": "var(--color-surface-muted)",
50
- "raised": "var(--color-surface-raised)",
51
- "sunken": "var(--color-surface-sunken)",
52
- "inverse": "var(--color-surface-inverse)"
48
+ "warm": "var(--color-surface-warm)"
53
49
  },
54
50
  "surface-dim": "var(--color-surface-dim)",
55
51
  "surface-bright": "var(--color-surface-bright)",
@@ -627,54 +623,9 @@ const preset = {
627
623
  "950": "var(--color-neutral-950)",
628
624
  "1000": "var(--color-neutral-1000)"
629
625
  },
630
- "semantic": {
631
- "success": {
632
- "default": "var(--color-semantic-success-default)",
633
- "bg": "var(--color-semantic-success-bg)",
634
- "border": "var(--color-semantic-success-border)",
635
- "strong": "var(--color-semantic-success-strong)"
636
- },
637
- "error": {
638
- "default": "var(--color-semantic-error-default)",
639
- "bg": "var(--color-semantic-error-bg)",
640
- "border": "var(--color-semantic-error-border)",
641
- "strong": "var(--color-semantic-error-strong)"
642
- },
643
- "warning": {
644
- "default": "var(--color-semantic-warning-default)",
645
- "bg": "var(--color-semantic-warning-bg)",
646
- "border": "var(--color-semantic-warning-border)",
647
- "strong": "var(--color-semantic-warning-strong)"
648
- },
649
- "info": {
650
- "default": "var(--color-semantic-info-default)",
651
- "bg": "var(--color-semantic-info-bg)",
652
- "border": "var(--color-semantic-info-border)",
653
- "strong": "var(--color-semantic-info-strong)"
654
- }
655
- },
656
626
  "text": {
657
- "primary": "var(--color-text-primary)",
658
- "secondary": "var(--color-text-secondary)",
659
- "muted": "var(--color-text-muted)",
660
- "subtle": "var(--color-text-subtle)",
661
- "inverse": "var(--color-text-inverse)",
662
- "link": "var(--color-text-link)",
663
627
  "disabled": "var(--color-text-disabled)"
664
628
  },
665
- "bg": {
666
- "default": "var(--color-bg-default)",
667
- "subtle": "var(--color-bg-subtle)",
668
- "muted": "var(--color-bg-muted)",
669
- "raised": "var(--color-bg-raised)",
670
- "inverse": "var(--color-bg-inverse)"
671
- },
672
- "border": {
673
- "default": "var(--color-border-default)",
674
- "subtle": "var(--color-border-subtle)",
675
- "strong": "var(--color-border-strong)",
676
- "inverse": "var(--color-border-inverse)"
677
- },
678
629
  "ring": {
679
630
  "default": "var(--color-ring-default)",
680
631
  "offset": "var(--color-ring-offset)"
@@ -43,10 +43,6 @@
43
43
  --color-founderub-container: var(--color-founderub-container);
44
44
  --color-on-founderub-container: var(--color-on-founderub-container);
45
45
  --color-surface-warm: var(--color-surface-warm);
46
- --color-surface-muted: var(--color-surface-muted);
47
- --color-surface-raised: var(--color-surface-raised);
48
- --color-surface-sunken: var(--color-surface-sunken);
49
- --color-surface-inverse: var(--color-surface-inverse);
50
46
  --color-surface-dim: var(--color-surface-dim);
51
47
  --color-surface-bright: var(--color-surface-bright);
52
48
  --color-surface-container-lowest: var(--color-surface-container-lowest);
@@ -579,38 +575,7 @@
579
575
  --color-neutral-900: var(--color-neutral-900);
580
576
  --color-neutral-950: var(--color-neutral-950);
581
577
  --color-neutral-1000: var(--color-neutral-1000);
582
- --color-semantic-success-default: var(--color-semantic-success-default);
583
- --color-semantic-success-bg: var(--color-semantic-success-bg);
584
- --color-semantic-success-border: var(--color-semantic-success-border);
585
- --color-semantic-success-strong: var(--color-semantic-success-strong);
586
- --color-semantic-error-default: var(--color-semantic-error-default);
587
- --color-semantic-error-bg: var(--color-semantic-error-bg);
588
- --color-semantic-error-border: var(--color-semantic-error-border);
589
- --color-semantic-error-strong: var(--color-semantic-error-strong);
590
- --color-semantic-warning-default: var(--color-semantic-warning-default);
591
- --color-semantic-warning-bg: var(--color-semantic-warning-bg);
592
- --color-semantic-warning-border: var(--color-semantic-warning-border);
593
- --color-semantic-warning-strong: var(--color-semantic-warning-strong);
594
- --color-semantic-info-default: var(--color-semantic-info-default);
595
- --color-semantic-info-bg: var(--color-semantic-info-bg);
596
- --color-semantic-info-border: var(--color-semantic-info-border);
597
- --color-semantic-info-strong: var(--color-semantic-info-strong);
598
- --color-text-primary: var(--color-text-primary);
599
- --color-text-secondary: var(--color-text-secondary);
600
- --color-text-muted: var(--color-text-muted);
601
- --color-text-subtle: var(--color-text-subtle);
602
- --color-text-inverse: var(--color-text-inverse);
603
- --color-text-link: var(--color-text-link);
604
578
  --color-text-disabled: var(--color-text-disabled);
605
- --color-bg-default: var(--color-bg-default);
606
- --color-bg-subtle: var(--color-bg-subtle);
607
- --color-bg-muted: var(--color-bg-muted);
608
- --color-bg-raised: var(--color-bg-raised);
609
- --color-bg-inverse: var(--color-bg-inverse);
610
- --color-border-default: var(--color-border-default);
611
- --color-border-subtle: var(--color-border-subtle);
612
- --color-border-strong: var(--color-border-strong);
613
- --color-border-inverse: var(--color-border-inverse);
614
579
  --color-ring-default: var(--color-ring-default);
615
580
  --color-ring-offset: var(--color-ring-offset);
616
581
  --color-chart-1: var(--color-chart-1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexub/tokens",
3
- "version": "2.9.0",
3
+ "version": "3.0.0",
4
4
  "description": "Design tokens for Nexub Design System — colours, typography, spacing, radii, shadows, and motion as CSS variables, Tailwind presets and React Native objects.",
5
5
  "type": "module",
6
6
  "license": "MIT",