@astryxdesign/theme-neutral 0.7.0-canary.e3c1cfd → 0.7.0-canary.e48e2ef

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/dist/neutral.js CHANGED
@@ -520,7 +520,24 @@ export const neutralTheme = {
520
520
  "xl": 1280,
521
521
  "2xl": 1536
522
522
  },
523
- "rules": []
523
+ "rules": [
524
+ {
525
+ "when": {
526
+ "pointer": "coarse",
527
+ "width": {
528
+ "below": "lg"
529
+ }
530
+ },
531
+ "value": {
532
+ "typography": {
533
+ "scale": {
534
+ "base": 16,
535
+ "ratio": 1.1736
536
+ }
537
+ }
538
+ }
539
+ }
540
+ ]
524
541
  },
525
542
  __axes: {
526
543
  "typography": {
@@ -18,7 +18,6 @@ export declare const neutralPaletteRefs: {
18
18
  readonly light: {
19
19
  readonly 25: "#00490b";
20
20
  readonly 30: "#0b5615";
21
- readonly 40: "#237028";
22
21
  readonly 45: "#2f7d33";
23
22
  readonly 65: "#6ab26b";
24
23
  readonly 75: "#90ca90";
@@ -35,13 +34,9 @@ export declare const neutralPaletteRefs: {
35
34
  readonly 0: "#000000";
36
35
  readonly 5: "#111111";
37
36
  readonly 10: "#1b1b1b";
38
- readonly 15: "#262626";
39
37
  readonly 30: "#474747";
40
- readonly 35: "#525252";
41
38
  readonly 45: "#6a6a6a";
42
- readonly 50: "#777777";
43
39
  readonly 60: "#919191";
44
- readonly 65: "#9e9e9e";
45
40
  readonly 85: "#d4d4d4";
46
41
  readonly 90: "#e2e2e2";
47
42
  readonly 95: "#f1f1f1";
@@ -93,7 +88,6 @@ export declare const neutralPaletteRefs: {
93
88
  readonly light: {
94
89
  readonly 25: "#76000c";
95
90
  readonly 30: "#8a0011";
96
- readonly 35: "#9e0015";
97
91
  readonly 55: "#de4745";
98
92
  readonly 65: "#fa6762";
99
93
  readonly 70: "#ff7f77";
@@ -112,7 +106,6 @@ export declare const neutralPaletteRefs: {
112
106
  readonly light: {
113
107
  readonly 25: "#4b3900";
114
108
  readonly 30: "#584400";
115
- readonly 40: "#745b00";
116
109
  readonly 65: "#c29900";
117
110
  readonly 75: "#e2b623";
118
111
  readonly 80: "#eec448";
@@ -147,13 +140,11 @@ export declare const neutralPaletteRefs: {
147
140
  };
148
141
  readonly light: {
149
142
  readonly 25: "#004351";
150
- readonly 30: "#00505f";
151
143
  };
152
144
  };
153
145
  readonly pink: {
154
146
  readonly light: {
155
147
  readonly 25: "#70003f";
156
- readonly 30: "#83004b";
157
148
  readonly 70: "#fc78b1";
158
149
  readonly 85: "#ffc0d7";
159
150
  };
@@ -1 +1 @@
1
- {"version":3,"file":"neutralPaletteRefs.generated.d.ts","sourceRoot":"","sources":["../src/neutralPaletteRefs.generated.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCrB,CAAC;AAEX,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"neutralPaletteRefs.generated.d.ts","sourceRoot":"","sources":["../src/neutralPaletteRefs.generated.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCrB,CAAC;AAEX,eAAe,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"neutralTheme.d.ts","sourceRoot":"","sources":["../src/neutralTheme.ts"],"names":[],"mappings":"AAqEA,eAAO,MAAM,YAAY,yDA2YvB,CAAC"}
1
+ {"version":3,"file":"neutralTheme.d.ts","sourceRoot":"","sources":["../src/neutralTheme.ts"],"names":[],"mappings":"AAqEA,eAAO,MAAM,YAAY,yDAuZvB,CAAC"}
package/dist/source.js CHANGED
@@ -75,11 +75,11 @@ var neutralPaletteRefs = {
75
75
  dark: { 25: "#4a2f51", 80: "#eaacf8" }
76
76
  },
77
77
  green: {
78
- light: { 25: "#00490b", 30: "#0b5615", 40: "#237028", 45: "#2f7d33", 65: "#6ab26b", 75: "#90ca90", 80: "#a4d6a3" },
78
+ light: { 25: "#00490b", 30: "#0b5615", 45: "#2f7d33", 65: "#6ab26b", 75: "#90ca90", 80: "#a4d6a3" },
79
79
  dark: { 25: "#2b422b", 80: "#aad4a9", 85: "#bce0bb" }
80
80
  },
81
81
  neutral: {
82
- light: { 0: "#000000", 5: "#111111", 10: "#1b1b1b", 15: "#262626", 30: "#474747", 35: "#525252", 45: "#6a6a6a", 50: "#777777", 60: "#919191", 65: "#9e9e9e", 85: "#d4d4d4", 90: "#e2e2e2", 95: "#f1f1f1", 100: "#ffffff" },
82
+ light: { 0: "#000000", 5: "#111111", 10: "#1b1b1b", 30: "#474747", 45: "#6a6a6a", 60: "#919191", 85: "#d4d4d4", 90: "#e2e2e2", 95: "#f1f1f1", 100: "#ffffff" },
83
83
  dark: { 0: "#000000", 5: "#111111", 10: "#1b1b1b", 15: "#262626", 20: "#303030", 35: "#525252", 65: "#9e9e9e", 85: "#d4d4d4", 90: "#e2e2e2", 95: "#f1f1f1", 100: "#ffffff" }
84
84
  },
85
85
  orange: {
@@ -91,11 +91,11 @@ var neutralPaletteRefs = {
91
91
  dark: { 25: "#253c5a", 65: "#5aa0f8", 75: "#88bcff", 80: "#a1caff" }
92
92
  },
93
93
  red: {
94
- light: { 25: "#76000c", 30: "#8a0011", 35: "#9e0015", 55: "#de4745", 65: "#fa6762", 70: "#ff7f77", 80: "#ffaea7", 85: "#ffc4be" },
94
+ light: { 25: "#76000c", 30: "#8a0011", 55: "#de4745", 65: "#fa6762", 70: "#ff7f77", 80: "#ffaea7", 85: "#ffc4be" },
95
95
  dark: { 25: "#5b2b28", 65: "#ee736c", 75: "#ff9890", 80: "#ffaea7", 85: "#ffc4be" }
96
96
  },
97
97
  yellow: {
98
- light: { 25: "#4b3900", 30: "#584400", 40: "#745b00", 65: "#c29900", 75: "#e2b623", 80: "#eec448", 85: "#f8d36a" },
98
+ light: { 25: "#4b3900", 30: "#584400", 65: "#c29900", 75: "#e2b623", 80: "#eec448", 85: "#f8d36a" },
99
99
  dark: { 25: "#453a1c", 80: "#e3c36c", 90: "#fae19e" }
100
100
  },
101
101
  teal: {
@@ -104,10 +104,10 @@ var neutralPaletteRefs = {
104
104
  },
105
105
  cyan: {
106
106
  dark: { 25: "#274046", 65: "#49adc4", 75: "#71c7dd", 80: "#85d5e9", 85: "#9ae2f4" },
107
- light: { 25: "#004351", 30: "#00505f" }
107
+ light: { 25: "#004351" }
108
108
  },
109
109
  pink: {
110
- light: { 25: "#70003f", 30: "#83004b", 70: "#fc78b1", 85: "#ffc0d7" },
110
+ light: { 25: "#70003f", 70: "#fc78b1", 85: "#ffc0d7" },
111
111
  dark: { 25: "#572b3d", 75: "#fd92bd", 80: "#ffa9ca" }
112
112
  }
113
113
  };
@@ -190,6 +190,17 @@ var neutralTheme = (0, import_theme.defineTheme)({
190
190
  fallbacks: '"SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace'
191
191
  }
192
192
  },
193
+ // Touch + narrow (Mobile Type, Pin): floor base to the 16px floor and
194
+ // re-derive the ratio so Display 1 keeps its desktop size:
195
+ // ratio' = 1.2 * (14/16)^(1/6) ~= 1.1736. Body 14 -> 16px, display-1 stays 42px.
196
+ adaptations: {
197
+ rules: [
198
+ {
199
+ when: { pointer: "coarse", width: { below: "lg" } },
200
+ value: { typography: { scale: { base: 16, ratio: 1.1736 } } }
201
+ }
202
+ ]
203
+ },
193
204
  // Motion: snappier than default to match shadcn/Tailwind conventions.
194
205
  // Produces: fast-min=95ms, fast=125ms, fast-max=165ms,
195
206
  // medium-min=225ms, medium=300ms, medium-max=400ms.
package/dist/source.mjs CHANGED
@@ -80,11 +80,11 @@ var neutralPaletteRefs = {
80
80
  dark: { 25: "#4a2f51", 80: "#eaacf8" }
81
81
  },
82
82
  green: {
83
- light: { 25: "#00490b", 30: "#0b5615", 40: "#237028", 45: "#2f7d33", 65: "#6ab26b", 75: "#90ca90", 80: "#a4d6a3" },
83
+ light: { 25: "#00490b", 30: "#0b5615", 45: "#2f7d33", 65: "#6ab26b", 75: "#90ca90", 80: "#a4d6a3" },
84
84
  dark: { 25: "#2b422b", 80: "#aad4a9", 85: "#bce0bb" }
85
85
  },
86
86
  neutral: {
87
- light: { 0: "#000000", 5: "#111111", 10: "#1b1b1b", 15: "#262626", 30: "#474747", 35: "#525252", 45: "#6a6a6a", 50: "#777777", 60: "#919191", 65: "#9e9e9e", 85: "#d4d4d4", 90: "#e2e2e2", 95: "#f1f1f1", 100: "#ffffff" },
87
+ light: { 0: "#000000", 5: "#111111", 10: "#1b1b1b", 30: "#474747", 45: "#6a6a6a", 60: "#919191", 85: "#d4d4d4", 90: "#e2e2e2", 95: "#f1f1f1", 100: "#ffffff" },
88
88
  dark: { 0: "#000000", 5: "#111111", 10: "#1b1b1b", 15: "#262626", 20: "#303030", 35: "#525252", 65: "#9e9e9e", 85: "#d4d4d4", 90: "#e2e2e2", 95: "#f1f1f1", 100: "#ffffff" }
89
89
  },
90
90
  orange: {
@@ -96,11 +96,11 @@ var neutralPaletteRefs = {
96
96
  dark: { 25: "#253c5a", 65: "#5aa0f8", 75: "#88bcff", 80: "#a1caff" }
97
97
  },
98
98
  red: {
99
- light: { 25: "#76000c", 30: "#8a0011", 35: "#9e0015", 55: "#de4745", 65: "#fa6762", 70: "#ff7f77", 80: "#ffaea7", 85: "#ffc4be" },
99
+ light: { 25: "#76000c", 30: "#8a0011", 55: "#de4745", 65: "#fa6762", 70: "#ff7f77", 80: "#ffaea7", 85: "#ffc4be" },
100
100
  dark: { 25: "#5b2b28", 65: "#ee736c", 75: "#ff9890", 80: "#ffaea7", 85: "#ffc4be" }
101
101
  },
102
102
  yellow: {
103
- light: { 25: "#4b3900", 30: "#584400", 40: "#745b00", 65: "#c29900", 75: "#e2b623", 80: "#eec448", 85: "#f8d36a" },
103
+ light: { 25: "#4b3900", 30: "#584400", 65: "#c29900", 75: "#e2b623", 80: "#eec448", 85: "#f8d36a" },
104
104
  dark: { 25: "#453a1c", 80: "#e3c36c", 90: "#fae19e" }
105
105
  },
106
106
  teal: {
@@ -109,10 +109,10 @@ var neutralPaletteRefs = {
109
109
  },
110
110
  cyan: {
111
111
  dark: { 25: "#274046", 65: "#49adc4", 75: "#71c7dd", 80: "#85d5e9", 85: "#9ae2f4" },
112
- light: { 25: "#004351", 30: "#00505f" }
112
+ light: { 25: "#004351" }
113
113
  },
114
114
  pink: {
115
- light: { 25: "#70003f", 30: "#83004b", 70: "#fc78b1", 85: "#ffc0d7" },
115
+ light: { 25: "#70003f", 70: "#fc78b1", 85: "#ffc0d7" },
116
116
  dark: { 25: "#572b3d", 75: "#fd92bd", 80: "#ffa9ca" }
117
117
  }
118
118
  };
@@ -195,6 +195,17 @@ var neutralTheme = defineTheme({
195
195
  fallbacks: '"SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace'
196
196
  }
197
197
  },
198
+ // Touch + narrow (Mobile Type, Pin): floor base to the 16px floor and
199
+ // re-derive the ratio so Display 1 keeps its desktop size:
200
+ // ratio' = 1.2 * (14/16)^(1/6) ~= 1.1736. Body 14 -> 16px, display-1 stays 42px.
201
+ adaptations: {
202
+ rules: [
203
+ {
204
+ when: { pointer: "coarse", width: { below: "lg" } },
205
+ value: { typography: { scale: { base: 16, ratio: 1.1736 } } }
206
+ }
207
+ ]
208
+ },
198
209
  // Motion: snappier than default to match shadcn/Tailwind conventions.
199
210
  // Produces: fast-min=95ms, fast=125ms, fast-max=165ms,
200
211
  // medium-min=225ms, medium=300ms, medium-max=400ms.
package/dist/theme.css CHANGED
@@ -6,6 +6,8 @@
6
6
  * Core: @astryxdesign/core@0.7.0
7
7
  */
8
8
 
9
+ @layer reset, astryx-base, astryx-theme;
10
+
9
11
  @layer reset {
10
12
  @scope ([data-astryx-theme="neutral"]) to ([data-astryx-theme]) {
11
13
  :where(h1, h2, h3, h4, h5, h6) {
@@ -77,67 +79,6 @@
77
79
  }
78
80
  }
79
81
 
80
- @layer astryx-base {
81
- :root {
82
- --color-data-categorical-blue: light-dark(#0171E3, #0171E3);
83
- --color-data-categorical-orange: light-dark(#EB6E00, #EB6E00);
84
- --color-data-categorical-purple: light-dark(#6B1EFD, #6B1EFD);
85
- --color-data-categorical-green: light-dark(#0B991F, #0B991F);
86
- --color-data-categorical-pink: light-dark(#F351C0, #F351C0);
87
- --color-data-categorical-cyan: light-dark(#0171A4, #0171A4);
88
- --color-data-categorical-red: light-dark(#F5394F, #F5394F);
89
- --color-data-categorical-teal: light-dark(#08A3A3, #08A3A3);
90
- --color-data-categorical-brown: light-dark(#965E03, #965E03);
91
- --color-data-categorical-indigo: light-dark(#6F8AFF, #6F8AFF);
92
- --color-data-neutral: light-dark(#8494A3, #8C939B);
93
- --color-data-blue-5: light-dark(#02165E, #02165E);
94
- --color-data-blue-4: light-dark(#004CBC, #004CBC);
95
- --color-data-blue-3: light-dark(#2694FE, #2694FE);
96
- --color-data-blue-2: light-dark(#78BEFF, #78BEFF);
97
- --color-data-blue-1: light-dark(#DBECFF, #DBECFF);
98
- --color-data-shamrock-5: light-dark(#0B603D, #0B603D);
99
- --color-data-shamrock-4: light-dark(#138546, #138546);
100
- --color-data-shamrock-3: light-dark(#24BB5E, #24BB5E);
101
- --color-data-shamrock-2: light-dark(#8EF7AA, #8EF7AA);
102
- --color-data-shamrock-1: light-dark(#D6FEE4, #D6FEE4);
103
- --color-data-orange-5: light-dark(#A13F04, #A13F04);
104
- --color-data-orange-4: light-dark(#D66100, #D66100);
105
- --color-data-orange-3: light-dark(#FD9537, #FD9537);
106
- --color-data-orange-2: light-dark(#FDB876, #FDB876);
107
- --color-data-orange-1: light-dark(#FFE6CF, #FFE6CF);
108
- --color-data-pink-5: light-dark(#8E1073, #8E1073);
109
- --color-data-pink-4: light-dark(#D123A1, #D123A1);
110
- --color-data-pink-3: light-dark(#F989D3, #F989D3);
111
- --color-data-pink-2: light-dark(#FEADE3, #FEADE3);
112
- --color-data-pink-1: light-dark(#FCE3F4, #FCE3F4);
113
- --color-data-purple-5: light-dark(#3E0697, #3E0697);
114
- --color-data-purple-4: light-dark(#6B1EFD, #6B1EFD);
115
- --color-data-purple-3: light-dark(#9081FF, #9081FF);
116
- --color-data-purple-2: light-dark(#B3B0FE, #B3B0FE);
117
- --color-data-purple-1: light-dark(#E8E8FB, #E8E8FB);
118
- --color-data-red-5: light-dark(#9D0519, #9D0519);
119
- --color-data-red-4: light-dark(#D31130, #D31130);
120
- --color-data-red-3: light-dark(#FB7D87, #FB7D87);
121
- --color-data-red-2: light-dark(#FFB2B8, #FFB2B8);
122
- --color-data-red-1: light-dark(#FEE4E6, #FEE4E6);
123
- --color-data-teal-5: light-dark(#08767D, #08767D);
124
- --color-data-teal-4: light-dark(#0C9293, #0C9293);
125
- --color-data-teal-3: light-dark(#0DB7AF, #0DB7AF);
126
- --color-data-teal-2: light-dark(#6CE6D8, #6CE6D8);
127
- --color-data-teal-1: light-dark(#D7FCF8, #D7FCF8);
128
- --color-data-yellow-5: light-dark(#8A5001, #8A5001);
129
- --color-data-yellow-4: light-dark(#D69804, #D69804);
130
- --color-data-yellow-3: light-dark(#FBCE03, #FBCE03);
131
- --color-data-yellow-2: light-dark(#FCEC85, #FCEC85);
132
- --color-data-yellow-1: light-dark(#FDF6BA, #FDF6BA);
133
- --color-data-gray-5: light-dark(#25363F, #333338);
134
- --color-data-gray-4: light-dark(#5D6C7B, #666A72);
135
- --color-data-gray-3: light-dark(#AFB9C4, #B2B8BE);
136
- --color-data-gray-2: light-dark(#CCD3DB, #D0D3D6);
137
- --color-data-gray-1: light-dark(#F1F4F7, #F2F4F6);
138
- }
139
- }
140
-
141
82
  @layer astryx-theme {
142
83
  :root { color-scheme: light dark; }
143
84
  html[data-theme="light"] { color-scheme: light; }
@@ -697,6 +638,72 @@
697
638
  }
698
639
  }
699
640
 
641
+ @layer astryx-theme {
642
+ @media (width < 1024px) and (pointer: coarse) {
643
+ @scope ([data-astryx-theme="neutral"]) to ([data-astryx-theme]) {
644
+ :scope {
645
+ --font-size-4xs: 0.4375rem;
646
+ --font-size-3xs: 0.5rem;
647
+ --font-size-2xs: 0.625rem;
648
+ --font-size-xs: 0.75rem;
649
+ --font-size-sm: 0.875rem;
650
+ --font-size-base: 1rem;
651
+ --font-size-lg: 1.1875rem;
652
+ --font-size-xl: 1.375rem;
653
+ --font-size-2xl: 1.625rem;
654
+ --font-size-3xl: 1.875rem;
655
+ --font-size-4xl: 2.25rem;
656
+ --font-size-5xl: 2.625rem;
657
+ --text-heading-1-size: var(--font-size-2xl);
658
+ --text-heading-1-weight: var(--font-weight-semibold);
659
+ --text-heading-1-leading: 1.3846;
660
+ --text-heading-2-size: var(--font-size-xl);
661
+ --text-heading-2-weight: var(--font-weight-semibold);
662
+ --text-heading-2-leading: 1.4545;
663
+ --text-heading-3-size: var(--font-size-lg);
664
+ --text-heading-3-weight: var(--font-weight-bold);
665
+ --text-heading-3-leading: 1.4737;
666
+ --text-heading-4-size: var(--font-size-base);
667
+ --text-heading-4-weight: var(--font-weight-bold);
668
+ --text-heading-4-leading: 1.5;
669
+ --text-heading-5-size: var(--font-size-sm);
670
+ --text-heading-5-weight: var(--font-weight-semibold);
671
+ --text-heading-5-leading: 1.4286;
672
+ --text-heading-6-size: var(--font-size-xs);
673
+ --text-heading-6-weight: var(--font-weight-semibold);
674
+ --text-heading-6-leading: 1.6667;
675
+ --text-body-size: var(--font-size-base);
676
+ --text-body-weight: var(--font-weight-normal);
677
+ --text-body-leading: 1.5;
678
+ --text-large-size: var(--font-size-lg);
679
+ --text-large-weight: var(--font-weight-semibold);
680
+ --text-large-leading: 1.4737;
681
+ --text-label-size: var(--font-size-base);
682
+ --text-label-weight: var(--font-weight-medium);
683
+ --text-label-leading: 1.5;
684
+ --text-code-size: var(--font-size-base);
685
+ --text-code-weight: var(--font-weight-normal);
686
+ --text-code-leading: 1.5;
687
+ --text-supporting-size: var(--font-size-sm);
688
+ --text-supporting-weight: var(--font-weight-normal);
689
+ --text-supporting-leading: 1.4286;
690
+ --text-display-1-size: var(--font-size-5xl);
691
+ --text-display-1-weight: var(--font-weight-normal);
692
+ --text-display-1-leading: 1.2381;
693
+ --text-display-2-size: var(--font-size-4xl);
694
+ --text-display-2-weight: var(--font-weight-normal);
695
+ --text-display-2-leading: 1.2222;
696
+ --text-display-3-size: var(--font-size-3xl);
697
+ --text-display-3-weight: var(--font-weight-normal);
698
+ --text-display-3-leading: 1.4667;
699
+ --font-family-body: Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
700
+ --font-family-heading: Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
701
+ --font-family-code: ui-monospace, "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
702
+ }
703
+ }
704
+ }
705
+ }
706
+
700
707
  @layer astryx-theme {
701
708
  @scope ([data-astryx-theme="neutral"]) to ([data-astryx-theme]) {
702
709
  [data-astryx-media="dark"] {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/theme-neutral",
3
- "version": "0.7.0-canary.e3c1cfd",
3
+ "version": "0.7.0-canary.e48e2ef",
4
4
  "displayName": "Neutral Theme",
5
5
  "private": false,
6
6
  "description": "Restrained warm grays. Minimal and quiet, so the content stays the focus.",
@@ -58,14 +58,14 @@
58
58
  "lucide-react": "^1.18.0"
59
59
  },
60
60
  "peerDependencies": {
61
- "@astryxdesign/core": "0.7.0-canary.e3c1cfd",
61
+ "@astryxdesign/core": "0.7.0-canary.e48e2ef",
62
62
  "react": ">=19"
63
63
  },
64
64
  "devDependencies": {
65
- "@astryxdesign/cli": "0.7.0-canary.e3c1cfd"
65
+ "@astryxdesign/cli": "0.7.0-canary.e48e2ef"
66
66
  },
67
67
  "module": "./dist/source.mjs",
68
68
  "scripts": {
69
- "build": "node ../../../scripts/clean-dist.mjs && astryx theme build src/neutralTheme.ts -o dist/theme.css --icons-specifier ./icons.mjs && tsup && tsc --project tsconfig.build.json && node ../../../scripts/check-fully-specified.mjs"
69
+ "build": "node ../../../scripts/clean-dist.mjs && node ../../../scripts/generate-neutral-palette-refs.mjs --check && astryx theme build src/neutralTheme.ts -o dist/theme.css --icons-specifier ./icons.mjs && tsup && tsc --project tsconfig.build.json && node ../../../scripts/check-fully-specified.mjs"
70
70
  }
71
71
  }
@@ -1,8 +1,9 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- // Generated from neutralPalettes.generated.ts for the stops used by
4
- // neutralTheme.ts. Keep the complete palette available for authoring and
5
- // audits, but do not make consumers pay for unused palette stops.
3
+ // Generated from the committed full palette for the stops used by Neutral's
4
+ // theme source. Regenerate with `pnpm generate:neutral-palette-refs`.
5
+ // Keep the complete palette available for authoring and audits without
6
+ // making consumers pay for unused palette stops.
6
7
  // prettier-ignore
7
8
  export const neutralPaletteRefs = {
8
9
  purple: {
@@ -10,11 +11,11 @@ export const neutralPaletteRefs = {
10
11
  dark: {25: '#4a2f51', 80: '#eaacf8'},
11
12
  },
12
13
  green: {
13
- light: {25: '#00490b', 30: '#0b5615', 40: '#237028', 45: '#2f7d33', 65: '#6ab26b', 75: '#90ca90', 80: '#a4d6a3'},
14
+ light: {25: '#00490b', 30: '#0b5615', 45: '#2f7d33', 65: '#6ab26b', 75: '#90ca90', 80: '#a4d6a3'},
14
15
  dark: {25: '#2b422b', 80: '#aad4a9', 85: '#bce0bb'},
15
16
  },
16
17
  neutral: {
17
- light: {0: '#000000', 5: '#111111', 10: '#1b1b1b', 15: '#262626', 30: '#474747', 35: '#525252', 45: '#6a6a6a', 50: '#777777', 60: '#919191', 65: '#9e9e9e', 85: '#d4d4d4', 90: '#e2e2e2', 95: '#f1f1f1', 100: '#ffffff'},
18
+ light: {0: '#000000', 5: '#111111', 10: '#1b1b1b', 30: '#474747', 45: '#6a6a6a', 60: '#919191', 85: '#d4d4d4', 90: '#e2e2e2', 95: '#f1f1f1', 100: '#ffffff'},
18
19
  dark: {0: '#000000', 5: '#111111', 10: '#1b1b1b', 15: '#262626', 20: '#303030', 35: '#525252', 65: '#9e9e9e', 85: '#d4d4d4', 90: '#e2e2e2', 95: '#f1f1f1', 100: '#ffffff'},
19
20
  },
20
21
  orange: {
@@ -26,11 +27,11 @@ export const neutralPaletteRefs = {
26
27
  dark: {25: '#253c5a', 65: '#5aa0f8', 75: '#88bcff', 80: '#a1caff'},
27
28
  },
28
29
  red: {
29
- light: {25: '#76000c', 30: '#8a0011', 35: '#9e0015', 55: '#de4745', 65: '#fa6762', 70: '#ff7f77', 80: '#ffaea7', 85: '#ffc4be'},
30
+ light: {25: '#76000c', 30: '#8a0011', 55: '#de4745', 65: '#fa6762', 70: '#ff7f77', 80: '#ffaea7', 85: '#ffc4be'},
30
31
  dark: {25: '#5b2b28', 65: '#ee736c', 75: '#ff9890', 80: '#ffaea7', 85: '#ffc4be'},
31
32
  },
32
33
  yellow: {
33
- light: {25: '#4b3900', 30: '#584400', 40: '#745b00', 65: '#c29900', 75: '#e2b623', 80: '#eec448', 85: '#f8d36a'},
34
+ light: {25: '#4b3900', 30: '#584400', 65: '#c29900', 75: '#e2b623', 80: '#eec448', 85: '#f8d36a'},
34
35
  dark: {25: '#453a1c', 80: '#e3c36c', 90: '#fae19e'},
35
36
  },
36
37
  teal: {
@@ -39,10 +40,10 @@ export const neutralPaletteRefs = {
39
40
  },
40
41
  cyan: {
41
42
  dark: {25: '#274046', 65: '#49adc4', 75: '#71c7dd', 80: '#85d5e9', 85: '#9ae2f4'},
42
- light: {25: '#004351', 30: '#00505f'},
43
+ light: {25: '#004351'},
43
44
  },
44
45
  pink: {
45
- light: {25: '#70003f', 30: '#83004b', 70: '#fc78b1', 85: '#ffc0d7'},
46
+ light: {25: '#70003f', 70: '#fc78b1', 85: '#ffc0d7'},
46
47
  dark: {25: '#572b3d', 75: '#fd92bd', 80: '#ffa9ca'},
47
48
  },
48
49
  } as const;
@@ -1,6 +1,7 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
3
  import {describe, expect, it} from 'vitest';
4
+ import {generateThemeCSS} from '@astryxdesign/core/theme';
4
5
  import {neutralPalettes} from './neutralPalettes';
5
6
  import {neutralTheme} from './neutralTheme';
6
7
 
@@ -407,3 +408,23 @@ describe('neutral theme component overrides', () => {
407
408
  });
408
409
  });
409
410
  });
411
+
412
+ describe('neutral touch + narrow type pin', () => {
413
+ it('floors body to 16px and holds Display 1 at its desktop size', () => {
414
+ const rule = neutralTheme.__adaptationRules?.[0];
415
+
416
+ expect(neutralTheme.__adaptations.rules).toHaveLength(1);
417
+ expect(rule?.when).toEqual({pointer: 'coarse', width: {below: 'lg'}});
418
+ expect(rule?.query).toBe('(width < 1024px) and (pointer: coarse)');
419
+ // Pinned ladder: base 16 (was 14), ratio 1.2 -> 1.1736, Display 1 pinned.
420
+ expect(rule?.tokens['--font-size-base']).toBe('1rem');
421
+ expect(rule?.tokens['--font-size-lg']).toBe('1.1875rem');
422
+ expect(rule?.tokens['--font-size-5xl']).toBe('2.625rem');
423
+ // Desktop scale is untouched.
424
+ expect(neutralTheme.tokens['--font-size-base']).toBe('0.875rem');
425
+ expect(neutralTheme.tokens['--font-size-5xl']).toBe('2.625rem');
426
+ expect(generateThemeCSS(neutralTheme).component).toContain(
427
+ '@media (width < 1024px) and (pointer: coarse)',
428
+ );
429
+ });
430
+ });
@@ -95,6 +95,18 @@ export const neutralTheme = defineTheme({
95
95
  },
96
96
  },
97
97
 
98
+ // Touch + narrow (Mobile Type, Pin): floor base to the 16px floor and
99
+ // re-derive the ratio so Display 1 keeps its desktop size:
100
+ // ratio' = 1.2 * (14/16)^(1/6) ~= 1.1736. Body 14 -> 16px, display-1 stays 42px.
101
+ adaptations: {
102
+ rules: [
103
+ {
104
+ when: {pointer: 'coarse', width: {below: 'lg'}},
105
+ value: {typography: {scale: {base: 16, ratio: 1.1736}}},
106
+ },
107
+ ],
108
+ },
109
+
98
110
  // Motion: snappier than default to match shadcn/Tailwind conventions.
99
111
  // Produces: fast-min=95ms, fast=125ms, fast-max=165ms,
100
112
  // medium-min=225ms, medium=300ms, medium-max=400ms.