@nebutra/tokens 0.1.1 → 0.1.2

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 (57) hide show
  1. package/.turbo/turbo-build.log +5 -2
  2. package/.turbo/turbo-typecheck.log +1 -1
  3. package/AGENTS.md +5 -2
  4. package/CHANGELOG.md +23 -0
  5. package/DESIGN.md +30 -8
  6. package/LICENSE +21 -676
  7. package/README.md +41 -8
  8. package/brands/gsap/brand.json +180 -0
  9. package/brands/linear/brand.json +202 -0
  10. package/brands/notion/brand.json +189 -0
  11. package/brands/raycast/brand.json +167 -0
  12. package/brands/stripe/brand.json +183 -0
  13. package/brands/vanta/brand.json +198 -0
  14. package/brands/vercel/brand.json +207 -0
  15. package/package.json +17 -8
  16. package/recipe.css +114 -0
  17. package/scripts/compile-brand-run.ts +79 -0
  18. package/scripts/compile-brand.mjs +25 -0
  19. package/scripts/emit-skins-run.ts +62 -0
  20. package/scripts/emit-skins.mjs +31 -0
  21. package/scripts/sync-styles.mjs +29 -0
  22. package/skins/README.md +151 -0
  23. package/skins/gsap.css +247 -0
  24. package/skins/linear.css +282 -0
  25. package/skins/notion.css +248 -0
  26. package/skins/raycast.css +272 -0
  27. package/skins/stripe.css +248 -0
  28. package/skins/vanta.css +255 -0
  29. package/skins/vercel.css +283 -0
  30. package/src/brand-package/__tests__/compile-refero.test.ts +427 -0
  31. package/src/brand-package/__tests__/emit-css.test.ts +130 -0
  32. package/src/brand-package/apply-brand.ts +92 -0
  33. package/src/brand-package/compile-helpers.ts +170 -0
  34. package/src/brand-package/compile-refero.ts +69 -0
  35. package/src/brand-package/emit-css.ts +468 -0
  36. package/src/brand-package/hex-to-hsl.ts +100 -0
  37. package/src/brand-package/index.ts +71 -0
  38. package/src/brand-package/infer-recipe.ts +198 -0
  39. package/src/brand-package/normalize.ts +295 -0
  40. package/src/brand-package/presets/context.ts +17 -0
  41. package/src/brand-package/presets/generic.ts +214 -0
  42. package/src/brand-package/presets/gsap.ts +146 -0
  43. package/src/brand-package/presets/index.ts +31 -0
  44. package/src/brand-package/presets/linear.ts +183 -0
  45. package/src/brand-package/presets/notion.ts +208 -0
  46. package/src/brand-package/presets/raycast.ts +138 -0
  47. package/src/brand-package/presets/recipe.ts +61 -0
  48. package/src/brand-package/presets/stripe.ts +207 -0
  49. package/src/brand-package/presets/vanta.ts +220 -0
  50. package/src/brand-package/presets/vercel.ts +187 -0
  51. package/src/brand-package/types.ts +285 -0
  52. package/src/brand-package/use-brand.ts +207 -0
  53. package/src/brand-package/validate.ts +108 -0
  54. package/src/index.ts +31 -1
  55. package/src/theme-provider.tsx +5 -3
  56. package/styles.css +153 -69
  57. package/turbo.json +15 -0
@@ -0,0 +1,167 @@
1
+ {
2
+ "id": "raycast",
3
+ "name": "Raycast",
4
+ "darkDefault": true,
5
+ "version": "1.0.0",
6
+ "semantic": {
7
+ "background": "210 20% 2%",
8
+ "foreground": "0 0% 100%",
9
+ "card": "220 18% 3%",
10
+ "cardForeground": "0 0% 100%",
11
+ "popover": "220 18% 3%",
12
+ "popoverForeground": "0 0% 100%",
13
+ "primary": "0 0% 90%",
14
+ "primaryForeground": "210 1% 27%",
15
+ "secondary": "220 5% 11%",
16
+ "secondaryForeground": "0 0% 100%",
17
+ "muted": "220 8% 7%",
18
+ "mutedForeground": "210 1% 42%",
19
+ "accent": "0 100% 69%",
20
+ "accentForeground": "210 1% 27%",
21
+ "destructive": "0 72% 51%",
22
+ "destructiveForeground": "0 0% 100%",
23
+ "border": "210 2% 19%",
24
+ "input": "220 8% 7%",
25
+ "ring": "240 1% 61%",
26
+ "success": "151 59% 59%",
27
+ "successForeground": "210 20% 2%",
28
+ "info": "202 100% 67%",
29
+ "infoForeground": "210 20% 2%"
30
+ },
31
+ "recipe": {
32
+ "buttonDefault": "solid",
33
+ "density": "compact",
34
+ "badgeDefault": "muted",
35
+ "radii": {
36
+ "button": "8px",
37
+ "card": "16px",
38
+ "badge": "6px",
39
+ "input": "8px",
40
+ "pill": "9999px"
41
+ },
42
+ "elevationTokens": {
43
+ "card": "rgba(255, 255, 255, 0.05) 0px 1px 0px 0px inset, rgba(255, 255, 255, 0.25) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px -1px 0px 0px inset",
44
+ "control": "0 0 #0000",
45
+ "raised": "rgba(255, 255, 255, 0.05) 0px 1px 0px 0px inset, rgba(255, 255, 255, 0.25) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px -1px 0px 0px inset"
46
+ }
47
+ },
48
+ "typography": {
49
+ "fontSans": "'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif",
50
+ "fontMono": "'Geist Mono', 'GeistMono', ui-monospace, Menlo, monospace",
51
+ "fontDisplay": "'Inter', ui-sans-serif, system-ui, sans-serif",
52
+ "headingWeight": 400,
53
+ "faces": [
54
+ {
55
+ "family": "Inter",
56
+ "src": [
57
+ {
58
+ "url": "https://cdn.jsdelivr.net/fontsource/fonts/inter:vf@latest/latin-wght-normal.woff2",
59
+ "format": "woff2"
60
+ }
61
+ ],
62
+ "weight": "100 900",
63
+ "display": "swap"
64
+ }
65
+ ]
66
+ },
67
+ "zones": {
68
+ "product": {
69
+ "caption": {
70
+ "fontSize": "11px",
71
+ "lineHeight": 0.91,
72
+ "fontWeight": 500,
73
+ "letterSpacing": "0.8px"
74
+ },
75
+ "bodySm": {
76
+ "fontSize": "13px",
77
+ "lineHeight": 1.2,
78
+ "fontWeight": 500
79
+ },
80
+ "body": {
81
+ "fontSize": "16px",
82
+ "lineHeight": 1.15,
83
+ "fontWeight": 400
84
+ },
85
+ "bodyLg": {
86
+ "fontSize": "18px",
87
+ "lineHeight": 1.15,
88
+ "fontWeight": 400
89
+ },
90
+ "subheading": {
91
+ "fontSize": "20px",
92
+ "lineHeight": 1.2,
93
+ "fontWeight": 400,
94
+ "letterSpacing": "0.2px"
95
+ },
96
+ "headingSm": {
97
+ "fontSize": "24px",
98
+ "lineHeight": 1.15,
99
+ "fontWeight": 500
100
+ },
101
+ "heading": {
102
+ "fontSize": "32px",
103
+ "lineHeight": 1.15,
104
+ "fontWeight": 500
105
+ }
106
+ },
107
+ "marketing": {
108
+ "body": {
109
+ "fontSize": "16px",
110
+ "lineHeight": 1.15,
111
+ "fontWeight": 400
112
+ },
113
+ "heading": {
114
+ "fontSize": "32px",
115
+ "lineHeight": 1.15,
116
+ "fontWeight": 500
117
+ },
118
+ "headingLg": {
119
+ "fontSize": "56px",
120
+ "lineHeight": 1.17,
121
+ "fontWeight": 400,
122
+ "letterSpacing": "0.22px"
123
+ },
124
+ "display": {
125
+ "fontSize": "64px",
126
+ "lineHeight": 1.1,
127
+ "fontWeight": 600
128
+ }
129
+ }
130
+ },
131
+ "extensions": {
132
+ "categories": {
133
+ "brand": "#ff6363",
134
+ "ember": "#452324",
135
+ "sky": "#63a1ff"
136
+ },
137
+ "sourceUrl": "https://raycast.com",
138
+ "notes": [
139
+ "Primary CTA = Mist fill + Iron text (neutral solid).",
140
+ "Coral Pulse is brand mark only — do not use for general product chrome CTAs.",
141
+ "Cards use elevation=key (keyboard-key inset shadow stack)."
142
+ ]
143
+ },
144
+ "roles": {
145
+ "canvas": "210 20% 2%",
146
+ "canvasForeground": "0 0% 100%",
147
+ "surface": "220 18% 3%",
148
+ "surfaceForeground": "0 0% 100%",
149
+ "action": "0 0% 90%",
150
+ "actionForeground": "210 1% 27%",
151
+ "quiet": "220 5% 11%",
152
+ "quietForeground": "0 0% 100%",
153
+ "muted": "220 8% 7%",
154
+ "mutedForeground": "210 1% 42%",
155
+ "border": "210 2% 19%",
156
+ "input": "220 8% 7%",
157
+ "ring": "240 1% 61%",
158
+ "destructive": "0 72% 51%",
159
+ "destructiveForeground": "0 0% 100%",
160
+ "brand": "0 100% 69%",
161
+ "brandForeground": "210 1% 27%",
162
+ "success": "151 59% 59%",
163
+ "successForeground": "210 20% 2%",
164
+ "info": "202 100% 67%",
165
+ "infoForeground": "210 20% 2%"
166
+ }
167
+ }
@@ -0,0 +1,183 @@
1
+ {
2
+ "id": "stripe",
3
+ "name": "Stripe",
4
+ "darkDefault": false,
5
+ "version": "1.0.0",
6
+ "roles": {
7
+ "canvas": "0 0% 100%",
8
+ "canvasForeground": "211 78% 11%",
9
+ "surface": "0 0% 100%",
10
+ "surfaceForeground": "211 78% 11%",
11
+ "action": "248 98% 61%",
12
+ "actionForeground": "0 0% 100%",
13
+ "quiet": "237 100% 95%",
14
+ "quietForeground": "248 98% 61%",
15
+ "muted": "216 56% 98%",
16
+ "mutedForeground": "217 17% 47%",
17
+ "border": "210 44% 93%",
18
+ "input": "0 0% 100%",
19
+ "ring": "248 98% 61%",
20
+ "destructive": "0 72% 51%",
21
+ "destructiveForeground": "0 0% 100%",
22
+ "brand": "211 78% 11%",
23
+ "brandForeground": "0 0% 100%",
24
+ "info": "231 100% 73%",
25
+ "infoForeground": "211 78% 11%"
26
+ },
27
+ "semantic": {
28
+ "background": "0 0% 100%",
29
+ "foreground": "211 78% 11%",
30
+ "card": "0 0% 100%",
31
+ "cardForeground": "211 78% 11%",
32
+ "popover": "0 0% 100%",
33
+ "popoverForeground": "211 78% 11%",
34
+ "primary": "248 98% 61%",
35
+ "primaryForeground": "0 0% 100%",
36
+ "secondary": "237 100% 95%",
37
+ "secondaryForeground": "248 98% 61%",
38
+ "muted": "216 56% 98%",
39
+ "mutedForeground": "217 17% 47%",
40
+ "accent": "211 78% 11%",
41
+ "accentForeground": "0 0% 100%",
42
+ "destructive": "0 72% 51%",
43
+ "destructiveForeground": "0 0% 100%",
44
+ "border": "210 44% 93%",
45
+ "input": "0 0% 100%",
46
+ "ring": "248 98% 61%",
47
+ "info": "231 100% 73%",
48
+ "infoForeground": "211 78% 11%"
49
+ },
50
+ "recipe": {
51
+ "buttonDefault": "solid",
52
+ "density": "comfortable",
53
+ "badgeDefault": "muted",
54
+ "radii": {
55
+ "button": "4px",
56
+ "card": "4px",
57
+ "badge": "9999px",
58
+ "input": "4px",
59
+ "pill": "9999px"
60
+ },
61
+ "elevationTokens": {
62
+ "card": "0 0 #0000",
63
+ "control": "0 0 #0000",
64
+ "raised": "0 0 #0000"
65
+ },
66
+ "outlineBorder": "#b9b9f9"
67
+ },
68
+ "typography": {
69
+ "fontSans": "'sohne-var', 'Inter Tight', 'Inter', ui-sans-serif, system-ui, sans-serif",
70
+ "fontDisplay": "'sohne-var', 'Inter Tight', ui-sans-serif, system-ui, sans-serif",
71
+ "headingWeight": 300,
72
+ "faces": [
73
+ {
74
+ "family": "sohne-var",
75
+ "src": [
76
+ {
77
+ "url": "/brand-assets/sohne-var.woff2",
78
+ "format": "woff2"
79
+ }
80
+ ],
81
+ "weight": "300 400",
82
+ "display": "swap"
83
+ }
84
+ ]
85
+ },
86
+ "zones": {
87
+ "product": {
88
+ "caption": {
89
+ "fontSize": "12px",
90
+ "lineHeight": 1.45,
91
+ "fontWeight": 300,
92
+ "letterSpacing": "-0.12px"
93
+ },
94
+ "bodySm": {
95
+ "fontSize": "14px",
96
+ "lineHeight": 1.4,
97
+ "fontWeight": 400,
98
+ "letterSpacing": "-0.14px"
99
+ },
100
+ "body": {
101
+ "fontSize": "16px",
102
+ "lineHeight": 1.2,
103
+ "fontWeight": 400,
104
+ "letterSpacing": "-0.16px"
105
+ },
106
+ "bodyLg": {
107
+ "fontSize": "20px",
108
+ "lineHeight": 1.4,
109
+ "fontWeight": 300,
110
+ "letterSpacing": "-0.2px"
111
+ },
112
+ "subheading": {
113
+ "fontSize": "22px",
114
+ "lineHeight": 1.1,
115
+ "fontWeight": 300,
116
+ "letterSpacing": "-0.22px"
117
+ },
118
+ "headingSm": {
119
+ "fontSize": "26px",
120
+ "lineHeight": 1.12,
121
+ "fontWeight": 300,
122
+ "letterSpacing": "-0.26px"
123
+ },
124
+ "heading": {
125
+ "fontSize": "32px",
126
+ "lineHeight": 1.1,
127
+ "fontWeight": 300,
128
+ "letterSpacing": "-0.64px"
129
+ }
130
+ },
131
+ "marketing": {
132
+ "body": {
133
+ "fontSize": "16px",
134
+ "lineHeight": 1.4,
135
+ "fontWeight": 300,
136
+ "letterSpacing": "-0.16px"
137
+ },
138
+ "heading": {
139
+ "fontSize": "32px",
140
+ "lineHeight": 1.1,
141
+ "fontWeight": 300,
142
+ "letterSpacing": "-0.64px"
143
+ },
144
+ "headingLg": {
145
+ "fontSize": "48px",
146
+ "lineHeight": 1.03,
147
+ "fontWeight": 300,
148
+ "letterSpacing": "-0.96px"
149
+ },
150
+ "display": {
151
+ "fontSize": "56px",
152
+ "lineHeight": 1.03,
153
+ "fontWeight": 300,
154
+ "letterSpacing": "-1.4px"
155
+ }
156
+ }
157
+ },
158
+ "extensions": {
159
+ "categories": {
160
+ "brand": "#061b31",
161
+ "action": "#533afd",
162
+ "link": "#533afd",
163
+ "hover": "#7389ff",
164
+ "ghostBorder": "#b9b9f9",
165
+ "wash": "#e8e9ff",
166
+ "deep": "#182659",
167
+ "smoke": "#839bc8",
168
+ "steel": "#50617a"
169
+ },
170
+ "decorative": {
171
+ "section-band": "#f8fafd",
172
+ "frost": "#e5edf5"
173
+ },
174
+ "sourceUrl": "https://stripe.com",
175
+ "notes": [
176
+ "roles.action = Indigo Ink filled CTA; roles.brand = Midnight Ink wordmark.",
177
+ "Elevation none — tint ladder + 1px frost rules; never box-shadow.",
178
+ "Control radius 4px (not pill); tags may stay full-pill.",
179
+ "Typography weight 300 is the product signature (Inter Tight substitute).",
180
+ "Pair solid CTA with ghost outline (lavender border) as secondary."
181
+ ]
182
+ }
183
+ }
@@ -0,0 +1,198 @@
1
+ {
2
+ "id": "vanta",
3
+ "name": "Vanta",
4
+ "darkDefault": false,
5
+ "version": "1.0.0",
6
+ "roles": {
7
+ "canvas": "220 23% 97%",
8
+ "canvasForeground": "240 17% 11%",
9
+ "surface": "0 0% 100%",
10
+ "surfaceForeground": "240 17% 11%",
11
+ "action": "268 95% 39%",
12
+ "actionForeground": "0 0% 100%",
13
+ "quiet": "250 100% 92%",
14
+ "quietForeground": "272 100% 14%",
15
+ "muted": "240 20% 93%",
16
+ "mutedForeground": "238 11% 48%",
17
+ "border": "240 17% 11%",
18
+ "input": "0 0% 100%",
19
+ "ring": "268 95% 39%",
20
+ "destructive": "0 72% 51%",
21
+ "destructiveForeground": "0 0% 100%",
22
+ "brand": "272 100% 14%",
23
+ "brandForeground": "0 0% 100%",
24
+ "warning": "44 100% 53%",
25
+ "warningForeground": "240 17% 11%",
26
+ "info": "270 63% 56%",
27
+ "infoForeground": "0 0% 100%"
28
+ },
29
+ "semantic": {
30
+ "background": "220 23% 97%",
31
+ "foreground": "240 17% 11%",
32
+ "card": "0 0% 100%",
33
+ "cardForeground": "240 17% 11%",
34
+ "popover": "0 0% 100%",
35
+ "popoverForeground": "240 17% 11%",
36
+ "primary": "268 95% 39%",
37
+ "primaryForeground": "0 0% 100%",
38
+ "secondary": "250 100% 92%",
39
+ "secondaryForeground": "272 100% 14%",
40
+ "muted": "240 20% 93%",
41
+ "mutedForeground": "238 11% 48%",
42
+ "accent": "272 100% 14%",
43
+ "accentForeground": "0 0% 100%",
44
+ "destructive": "0 72% 51%",
45
+ "destructiveForeground": "0 0% 100%",
46
+ "border": "240 17% 11%",
47
+ "input": "0 0% 100%",
48
+ "ring": "268 95% 39%",
49
+ "warning": "44 100% 53%",
50
+ "warningForeground": "240 17% 11%",
51
+ "info": "270 63% 56%",
52
+ "infoForeground": "0 0% 100%"
53
+ },
54
+ "recipe": {
55
+ "buttonDefault": "solid",
56
+ "density": "comfortable",
57
+ "badgeDefault": "muted",
58
+ "radii": {
59
+ "button": "999px",
60
+ "card": "16px",
61
+ "badge": "999px",
62
+ "input": "999px",
63
+ "pill": "9999px"
64
+ },
65
+ "elevationTokens": {
66
+ "card": "0 0 #0000",
67
+ "control": "0 0 #0000",
68
+ "raised": "0 0 #0000"
69
+ },
70
+ "outlineBorder": "#181822"
71
+ },
72
+ "typography": {
73
+ "fontSans": "'Inter Variable', 'Inter', ui-sans-serif, system-ui, sans-serif",
74
+ "fontDisplay": "'Reckless', 'Source Serif 4', 'Lora', ui-serif, Georgia, serif",
75
+ "headingWeight": 500,
76
+ "faces": [
77
+ {
78
+ "family": "Inter Variable",
79
+ "src": [
80
+ {
81
+ "url": "https://cdn.jsdelivr.net/fontsource/fonts/inter:vf@latest/latin-wght-normal.woff2",
82
+ "format": "woff2"
83
+ }
84
+ ],
85
+ "weight": "100 900",
86
+ "display": "swap"
87
+ },
88
+ {
89
+ "family": "Reckless",
90
+ "src": [
91
+ {
92
+ "url": "/brand-assets/reckless-regular.woff2",
93
+ "format": "woff2"
94
+ }
95
+ ],
96
+ "weight": 400,
97
+ "display": "swap"
98
+ },
99
+ {
100
+ "family": "Reckless",
101
+ "src": [
102
+ {
103
+ "url": "/brand-assets/reckless-medium.woff2",
104
+ "format": "woff2"
105
+ }
106
+ ],
107
+ "weight": 500,
108
+ "display": "swap"
109
+ }
110
+ ]
111
+ },
112
+ "zones": {
113
+ "product": {
114
+ "caption": {
115
+ "fontSize": "12px",
116
+ "lineHeight": 1.5,
117
+ "fontWeight": 500,
118
+ "letterSpacing": "-0.02px"
119
+ },
120
+ "bodySm": {
121
+ "fontSize": "14px",
122
+ "lineHeight": 1.43,
123
+ "fontWeight": 400,
124
+ "letterSpacing": "-0.02px"
125
+ },
126
+ "body": {
127
+ "fontSize": "16px",
128
+ "lineHeight": 1.5,
129
+ "fontWeight": 400,
130
+ "letterSpacing": "-0.02px"
131
+ },
132
+ "subheading": {
133
+ "fontSize": "20px",
134
+ "lineHeight": 1.4,
135
+ "fontWeight": 500
136
+ },
137
+ "headingSm": {
138
+ "fontSize": "24px",
139
+ "lineHeight": 1.35,
140
+ "fontWeight": 500
141
+ },
142
+ "heading": {
143
+ "fontSize": "32px",
144
+ "lineHeight": 1.3,
145
+ "fontWeight": 500
146
+ }
147
+ },
148
+ "marketing": {
149
+ "body": {
150
+ "fontSize": "16px",
151
+ "lineHeight": 1.5,
152
+ "fontWeight": 400,
153
+ "letterSpacing": "-0.02px"
154
+ },
155
+ "heading": {
156
+ "fontSize": "42px",
157
+ "lineHeight": 1.2,
158
+ "fontWeight": 400,
159
+ "letterSpacing": "-0.84px"
160
+ },
161
+ "headingLg": {
162
+ "fontSize": "56px",
163
+ "lineHeight": 1.15,
164
+ "fontWeight": 400,
165
+ "letterSpacing": "-1.12px"
166
+ },
167
+ "display": {
168
+ "fontSize": "90px",
169
+ "lineHeight": 1.1,
170
+ "fontWeight": 400,
171
+ "letterSpacing": "-1.62px"
172
+ }
173
+ }
174
+ },
175
+ "extensions": {
176
+ "categories": {
177
+ "brand": "#260048",
178
+ "action": "#5e05c4",
179
+ "link": "#8f47d5",
180
+ "heroWash": "#ddd6ff",
181
+ "warning": "#ffbe0f",
182
+ "steel": "#9e9fb7",
183
+ "ash": "#dfdfe9"
184
+ },
185
+ "decorative": {
186
+ "hero-wash": "#ddd6ff"
187
+ },
188
+ "sourceUrl": "https://www.vanta.com",
189
+ "notes": [
190
+ "roles.action = Vivid Violet (filled CTA only).",
191
+ "roles.brand = Indigo Ink (logo / wordmark / brand-mark).",
192
+ "Elevation none — 1px carbon borders frame cards; no drop-shadow.",
193
+ "Full-pill controls (999px); cards 16px.",
194
+ "UI = Inter Variable; marketing display = Reckless serif.",
195
+ "Lavender wash is marketing hero surface (decorative), not product chrome fill."
196
+ ]
197
+ }
198
+ }