@nsaa/tokens 0.0.0-stage → 0.1.0-alpha.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.
@@ -0,0 +1,38 @@
1
+ {
2
+ "$description": "shadcn/ui base colour 'neutral' (cssVarsV4) and radius, copied 1:1 from ui.shadcn.com/r/colors/neutral.json on 2026-10-28 (MIT). Decision #84: every component mimics shadcn base-nova 1:1 until the Nsaa feel layer is added. Emitted as plain shadcn variables (--background, --primary, ...) plus --nsaa-shadcn-* copies.",
3
+ "style": "base-nova",
4
+ "$changes": "Light destructive L 0.577 -> 0.565 (#96): shadcn's text-destructive/90 on white is 4.496:1; #E30002 gives 4.67:1, white text on it 4.92:1. Then 0.565 -> 0.52 (#120, browser axe): text-destructive on bg-destructive/10 (destructive Button and Badge) was 4.12:1; #D20000 gives 4.68:1, white on it 5.6:1. Light muted-foreground L 0.556 -> 0.54 (#105): shadcn's 4.34:1 on muted becomes 4.64:1 (5.06:1 on white). Everything else 1:1.",
5
+ "radius": "0.625rem",
6
+ "light": {
7
+ "background": "oklch(1 0 0)", "foreground": "oklch(0.145 0 0)",
8
+ "card": "oklch(1 0 0)", "card-foreground": "oklch(0.145 0 0)",
9
+ "popover": "oklch(1 0 0)", "popover-foreground": "oklch(0.145 0 0)",
10
+ "primary": "oklch(0.205 0 0)", "primary-foreground": "oklch(0.985 0 0)",
11
+ "secondary": "oklch(0.97 0 0)", "secondary-foreground": "oklch(0.205 0 0)",
12
+ "muted": "oklch(0.97 0 0)", "muted-foreground": "oklch(0.54 0 0)",
13
+ "accent": "oklch(0.97 0 0)", "accent-foreground": "oklch(0.205 0 0)",
14
+ "destructive": "oklch(0.52 0.245 27.325)",
15
+ "border": "oklch(0.922 0 0)", "input": "oklch(0.922 0 0)", "ring": "oklch(0.708 0 0)",
16
+ "chart-1": "oklch(0.87 0 0)", "chart-2": "oklch(0.556 0 0)", "chart-3": "oklch(0.439 0 0)", "chart-4": "oklch(0.371 0 0)", "chart-5": "oklch(0.269 0 0)",
17
+ "sidebar": "oklch(0.985 0 0)", "sidebar-foreground": "oklch(0.145 0 0)",
18
+ "sidebar-primary": "oklch(0.205 0 0)", "sidebar-primary-foreground": "oklch(0.985 0 0)",
19
+ "sidebar-accent": "oklch(0.97 0 0)", "sidebar-accent-foreground": "oklch(0.205 0 0)",
20
+ "sidebar-border": "oklch(0.922 0 0)", "sidebar-ring": "oklch(0.708 0 0)"
21
+ },
22
+ "dark": {
23
+ "background": "oklch(0.145 0 0)", "foreground": "oklch(0.985 0 0)",
24
+ "card": "oklch(0.205 0 0)", "card-foreground": "oklch(0.985 0 0)",
25
+ "popover": "oklch(0.205 0 0)", "popover-foreground": "oklch(0.985 0 0)",
26
+ "primary": "oklch(0.922 0 0)", "primary-foreground": "oklch(0.205 0 0)",
27
+ "secondary": "oklch(0.269 0 0)", "secondary-foreground": "oklch(0.985 0 0)",
28
+ "muted": "oklch(0.269 0 0)", "muted-foreground": "oklch(0.708 0 0)",
29
+ "accent": "oklch(0.269 0 0)", "accent-foreground": "oklch(0.985 0 0)",
30
+ "destructive": "oklch(0.704 0.191 22.216)",
31
+ "border": "oklch(1 0 0 / 10%)", "input": "oklch(1 0 0 / 15%)", "ring": "oklch(0.556 0 0)",
32
+ "chart-1": "oklch(0.87 0 0)", "chart-2": "oklch(0.556 0 0)", "chart-3": "oklch(0.439 0 0)", "chart-4": "oklch(0.371 0 0)", "chart-5": "oklch(0.269 0 0)",
33
+ "sidebar": "oklch(0.205 0 0)", "sidebar-foreground": "oklch(0.985 0 0)",
34
+ "sidebar-primary": "oklch(0.488 0.243 264.376)", "sidebar-primary-foreground": "oklch(0.985 0 0)",
35
+ "sidebar-accent": "oklch(0.269 0 0)", "sidebar-accent-foreground": "oklch(0.985 0 0)",
36
+ "sidebar-border": "oklch(1 0 0 / 10%)", "sidebar-ring": "oklch(0.556 0 0)"
37
+ }
38
+ }
package/src/theme.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "$description": "The three shape/voice axes. Each axis is set on any element: data-theme, data-corners, data-surface. Mode (light/dark) is .dark or data-mode.",
3
+ "radiusScale": { "none": 0, "xs": 2, "sm": 6, "md": 8, "lg": 10, "xl": 14, "2xl": 18, "3xl": 22, "4xl": 26, "full": 9999 },
4
+ "$radiusScale": "shadcn scale at --radius 10px (#84/#85): sm x0.6, md x0.8, lg x1, xl x1.4, 2xl x1.8, 3xl x2.2, 4xl x2.6.",
5
+ "theme": {
6
+ "default": {
7
+ "$note": "shadcn/ui base shapes (#81): the 0.625rem radius scale, sans headings.",
8
+ "font-heading": "{font.sans}", "font-body": "{font.sans}", "font-code": "{font.mono}",
9
+ "heading-weight": 500, "heading-tracking": "-0.02em",
10
+ "radius-button-xs": 6, "radius-button-sm": 8, "radius-button-md": 8, "radius-button-lg": 8, "radius-button-xl": 10,
11
+ "radius-control": 8, "radius-control-multiline": 8, "radius-badge": 6, "radius-surface": 14, "radius-popover": 8, "radius-dialog": 10
12
+ },
13
+ "editorial": {
14
+ "$note": "Newsreader headings, default (shadcn) shapes.",
15
+ "font-heading": "{font.serif}", "font-body": "{font.sans}", "font-code": "{font.mono}",
16
+ "heading-weight": 500, "heading-tracking": "-0.01em",
17
+ "radius-button-xs": 6, "radius-button-sm": 8, "radius-button-md": 8, "radius-button-lg": 8, "radius-button-xl": 10,
18
+ "radius-control": 8, "radius-control-multiline": 8, "radius-badge": 6, "radius-surface": 14, "radius-popover": 8, "radius-dialog": 10
19
+ },
20
+ "soft": {
21
+ "$note": "A little rounder than Default everywhere (#78).",
22
+ "font-heading": "{font.sans}", "font-body": "{font.sans}", "font-code": "{font.mono}",
23
+ "heading-weight": 500, "heading-tracking": "-0.02em",
24
+ "radius-button-xs": 8, "radius-button-sm": 10, "radius-button-md": 10, "radius-button-lg": 12, "radius-button-xl": 14,
25
+ "radius-control": 12, "radius-control-multiline": 12, "radius-badge": 8, "radius-surface": 16, "radius-popover": 16, "radius-dialog": 24
26
+ },
27
+ "pill": {
28
+ "$note": "Fully rounded buttons, badges and controls (inputs, selects); rounder surfaces (#78).",
29
+ "font-heading": "{font.sans}", "font-body": "{font.sans}", "font-code": "{font.mono}",
30
+ "heading-weight": 500, "heading-tracking": "-0.02em",
31
+ "radius-button-xs": 9999, "radius-button-sm": 9999, "radius-button-md": 9999, "radius-button-lg": 9999, "radius-button-xl": 9999,
32
+ "radius-control": 9999, "radius-control-multiline": 18, "radius-badge": 9999, "radius-surface": 24, "radius-popover": 20, "radius-dialog": 28
33
+ },
34
+ "sharp": {
35
+ "$note": "Square everywhere (#78); radius-full items (avatars, switches, radios) stay round.",
36
+ "font-heading": "{font.sans}", "font-body": "{font.sans}", "font-code": "{font.mono}",
37
+ "heading-weight": 500, "heading-tracking": "-0.025em",
38
+ "radius-button-xs": 0, "radius-button-sm": 0, "radius-button-md": 0, "radius-button-lg": 0, "radius-button-xl": 0,
39
+ "radius-control": 0, "radius-control-multiline": 0, "radius-badge": 0, "radius-surface": 0, "radius-popover": 0, "radius-dialog": 0
40
+ }
41
+ },
42
+ "corners": {
43
+ "round": { "radius-multiplier": 1, "corner-shape": "round", "figma-smoothing": 0 },
44
+ "squircle": {
45
+ "$note": "Native corner-shape in Chromium 139+; other browsers fall back to round. Figma: 60% smoothing set by script (not bindable to variables).",
46
+ "radius-multiplier": 1.25, "corner-shape": "superellipse(1.8)", "figma-smoothing": 0.6
47
+ }
48
+ },
49
+ "surface": {
50
+ "flat": {
51
+ "light": { "bg": "{@container}", "border": "none", "shadow": "{shadow.default}", "blur": "none", "rim": "none" },
52
+ "dark": { "bg": "{@container}", "border": "none", "shadow": "{shadow.default}", "blur": "none", "rim": "none" }
53
+ },
54
+ "halo": {
55
+ "$note": "Frosted fill plus a gradient rim; rim colours are tokens so brands can change them.",
56
+ "light": { "bg": "{@container}", "border": "1px solid transparent", "shadow": "0 8px 24px -8px {@surface-halo-glow}", "blur": "none", "rim": "linear-gradient(135deg, {blue-a7}, {gray-a4} 50%, {green-a6})" },
57
+ "dark": { "bg": "{@container}", "border": "1px solid transparent", "shadow": "0 8px 24px -8px {@surface-halo-glow}", "blur": "none", "rim": "linear-gradient(135deg, {blue-a8}, {gray-a4} 50%, {green-a7})" }
58
+ },
59
+ "glass": {
60
+ "$note": "Falls back to Flat under prefers-reduced-transparency. Text on glass uses the normal foregrounds; keep content behind it low-contrast.",
61
+ "light": { "bg": "{@surface-glass-fill}", "border": "1px solid {@surface-glass-border}", "shadow": "{shadow.large}", "blur": "blur(20px) saturate(180%)", "rim": "none" },
62
+ "dark": { "bg": "{@surface-glass-fill}", "border": "1px solid {@surface-glass-border}", "shadow": "{shadow.large}", "blur": "blur(20px) saturate(160%)", "rim": "none" }
63
+ },
64
+ "neu": {
65
+ "$note": "Soft extruded surfaces; a hairline border keeps edges visible for low-vision users.",
66
+ "light": { "bg": "{@surface-neu-fill}", "border": "1px solid {@surface-neu-border}", "shadow": "6px 6px 14px {@surface-neu-shadow-dark}, -6px -6px 14px {@surface-neu-shadow-light}", "blur": "none", "rim": "none" },
67
+ "dark": { "bg": "{@surface-neu-fill}", "border": "1px solid {@surface-neu-border}", "shadow": "6px 6px 14px {@surface-neu-shadow-dark}, -4px -4px 12px {@surface-neu-shadow-light}", "blur": "none", "rim": "none" }
68
+ }
69
+ }
70
+ }
package/src/type.json ADDED
@@ -0,0 +1,208 @@
1
+ {
2
+ "$description": "Typography. Families are swappable roles; headings switch family by theme (see theme.json).",
3
+ "family": {
4
+ "sans": "\"Geist\", ui-sans-serif, system-ui, sans-serif",
5
+ "serif": "\"Newsreader\", ui-serif, Georgia, serif",
6
+ "mono": "\"Geist Mono\", ui-monospace, \"SFMono-Regular\", monospace",
7
+ "display-mono": "\"Geist Mono\", ui-monospace, monospace"
8
+ },
9
+ "weight": {
10
+ "normal": 400,
11
+ "semimedium": 450,
12
+ "medium": 500,
13
+ "semimedium-plus": 550,
14
+ "semibold": 600,
15
+ "bold": 700
16
+ },
17
+ "style": {
18
+ "heading-1": {
19
+ "role": "heading",
20
+ "size": 56,
21
+ "lineHeight": 60
22
+ },
23
+ "heading-2": {
24
+ "role": "heading",
25
+ "size": 44,
26
+ "lineHeight": 52
27
+ },
28
+ "heading-3": {
29
+ "role": "heading",
30
+ "size": 36,
31
+ "lineHeight": 44
32
+ },
33
+ "heading-4": {
34
+ "role": "heading",
35
+ "size": 28,
36
+ "lineHeight": 36
37
+ },
38
+ "heading-5": {
39
+ "role": "heading",
40
+ "size": 24,
41
+ "lineHeight": 32
42
+ },
43
+ "heading-6": {
44
+ "role": "heading",
45
+ "size": 20,
46
+ "lineHeight": 28
47
+ },
48
+ "body-lg": {
49
+ "role": "body",
50
+ "size": 18,
51
+ "lineHeight": 28,
52
+ "tracking": "0em"
53
+ },
54
+ "body-base": {
55
+ "role": "body",
56
+ "size": 16,
57
+ "lineHeight": 24,
58
+ "tracking": "0em"
59
+ },
60
+ "body-sm": {
61
+ "role": "body",
62
+ "size": 14,
63
+ "lineHeight": 20,
64
+ "tracking": "0em"
65
+ },
66
+ "body-sm-relaxed": {
67
+ "role": "body",
68
+ "size": 14,
69
+ "lineHeight": 21,
70
+ "tracking": "0em",
71
+ "$note": "shadcn FieldDescription: text-sm leading-normal (#85)."
72
+ },
73
+ "label-lg": {
74
+ "role": "body",
75
+ "size": 16,
76
+ "lineHeight": 24,
77
+ "weight": 500,
78
+ "tracking": "0em",
79
+ "$note": "UI text: buttons, tabs, menu items, form labels."
80
+ },
81
+ "label-base": {
82
+ "role": "body",
83
+ "size": 14,
84
+ "lineHeight": 20,
85
+ "weight": 500,
86
+ "tracking": "0em"
87
+ },
88
+ "label-snug": {
89
+ "role": "body",
90
+ "size": 14,
91
+ "lineHeight": 19.25,
92
+ "weight": 500,
93
+ "tracking": "0em",
94
+ "$note": "shadcn FieldLabel: text-sm font-medium leading-snug (#85)."
95
+ },
96
+ "label-tight": {
97
+ "role": "body",
98
+ "size": 14,
99
+ "lineHeight": 14,
100
+ "weight": 500,
101
+ "tracking": "0em",
102
+ "$note": "shadcn Label: text-sm font-medium leading-none (#85)."
103
+ },
104
+ "label-lg-tight": {
105
+ "role": "body",
106
+ "size": 16,
107
+ "lineHeight": 16,
108
+ "weight": 500,
109
+ "tracking": "0em",
110
+ "$note": "shadcn DialogTitle (and Sheet, Alert Dialog): text-base font-medium leading-none (#84)."
111
+ },
112
+ "label-lg-snug": {
113
+ "role": "body",
114
+ "size": 16,
115
+ "lineHeight": 22,
116
+ "weight": 500,
117
+ "tracking": "0em",
118
+ "$note": "shadcn CardTitle: text-base leading-snug font-medium (#99)."
119
+ },
120
+ "label-compact": {
121
+ "role": "body",
122
+ "size": 12.8,
123
+ "lineHeight": 18.29,
124
+ "weight": 500,
125
+ "tracking": "0em",
126
+ "$note": "shadcn Button size sm: text-[0.8rem] on text-sm line height (#85)."
127
+ },
128
+ "label-sm": {
129
+ "role": "body",
130
+ "size": 12,
131
+ "lineHeight": 16,
132
+ "weight": 500,
133
+ "tracking": "0em"
134
+ },
135
+ "label-heading": {
136
+ "role": "body",
137
+ "size": 14,
138
+ "lineHeight": 20,
139
+ "weight": 500,
140
+ "tracking": "-0.025em",
141
+ "$note": "shadcn EmptyTitle: text-sm font-medium tracking-tight (#122)."
142
+ },
143
+ "body-sm-loose": {
144
+ "role": "body",
145
+ "size": 14,
146
+ "lineHeight": 22.75,
147
+ "tracking": "0em",
148
+ "$note": "shadcn EmptyDescription: text-sm/relaxed, leading 1.625 (#122). body-sm-relaxed is leading-normal (1.5)."
149
+ },
150
+ "shortcut": {
151
+ "role": "body",
152
+ "size": 12,
153
+ "lineHeight": 16,
154
+ "weight": 400,
155
+ "tracking": "0.1em",
156
+ "$note": "shadcn menu and command shortcuts: text-xs tracking-widest (#105)."
157
+ },
158
+ "overline-base": {
159
+ "role": "body",
160
+ "size": 12,
161
+ "lineHeight": 16,
162
+ "weight": 500,
163
+ "tracking": "0.06em",
164
+ "transform": "uppercase",
165
+ "$note": "Eyebrows and section labels."
166
+ },
167
+ "overline-sm": {
168
+ "role": "body",
169
+ "size": 11,
170
+ "lineHeight": 16,
171
+ "weight": 500,
172
+ "tracking": "0.08em",
173
+ "transform": "uppercase"
174
+ },
175
+ "caption-lg": {
176
+ "role": "body",
177
+ "size": 12,
178
+ "lineHeight": 16,
179
+ "tracking": "0em"
180
+ },
181
+ "caption-base": {
182
+ "role": "body",
183
+ "size": 11,
184
+ "lineHeight": 16,
185
+ "tracking": "0.005em"
186
+ },
187
+ "caption-sm": {
188
+ "role": "body",
189
+ "size": 10,
190
+ "lineHeight": 14,
191
+ "tracking": "0.01em",
192
+ "$note": "Labels and metadata only, never body copy."
193
+ },
194
+ "code-sm": {
195
+ "role": "code",
196
+ "size": 14,
197
+ "lineHeight": 20,
198
+ "tracking": "0em"
199
+ },
200
+ "code-xs": {
201
+ "role": "code",
202
+ "size": 12,
203
+ "lineHeight": 16,
204
+ "tracking": "0em"
205
+ }
206
+ },
207
+ "$changes": "From Interfere: Inter/Heldane/Berkeley Mono replaced by Geist/Newsreader/Geist Mono; headings Medium (500) in every theme; heading line heights fixed (h1 56/60 instead of 56/56, h2 44/52 instead of 44/56, h6 20/28); caption-xs (8px) dropped as unreadable."
208
+ }