@astryxdesign/theme-gothic 0.7.3 → 0.7.4-canary.3f6ea7d

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.
@@ -6,7 +6,6 @@
6
6
  * A dark-only theme with deep blue-gray tones and a distressed display
7
7
  * heading. Inspired by ink, manuscript, and noir typography.
8
8
  *
9
- * Core palette: #E8F1F6, #96A0AB, #495056, #24292D, #101314
10
9
  * Categorical colors follow a pastel-on-dark pattern (light backgrounds
11
10
  * with dark text) — same in any system color preference.
12
11
  *
@@ -15,6 +14,12 @@
15
14
 
16
15
  import {defineTheme, defineSyntaxTheme} from '@astryxdesign/core/theme';
17
16
  import {gothicIconRegistry} from './icons';
17
+ import {gothicPaletteRefs} from './gothicPaletteRefs.generated';
18
+
19
+ const {blue, cyan, green, neutral, orange, pink, purple, red, teal, yellow} =
20
+ gothicPaletteRefs;
21
+
22
+ const withAlpha = (color: string, alpha: string): string => `${color}${alpha}`;
18
23
 
19
24
  /**
20
25
  * Gothic syntax palette — atmospheric tones drawn from the gothic
@@ -26,29 +31,24 @@ import {gothicIconRegistry} from './icons';
26
31
  const gothicSyntax = defineSyntaxTheme({
27
32
  name: 'astryx-gothic',
28
33
  tokens: {
29
- keyword: '#c39adb', // Cathedral plum
30
- string: '#a3c987', // Forest moss
31
- comment: '#6b7079', // Faded ink
32
- number: '#dec074', // Aged gold
33
- function: '#8aa1d8', // Midnight indigo
34
- type: '#c39adb', // Cathedral plum
35
- variable: '#E8F1F6', // Parchment
36
- operator: '#96A0AB', // Mid neutral
37
- constant: '#e6b85e', // Candlelight amber
38
- tag: '#d97580', // Blood crimson
39
- attribute: '#dec074', // Aged gold
40
- property: '#7cc5b3', // Verdigris
41
- punctuation: '#7a8290', // Mid neutral
42
- background: '#101314',
43
- // Diff rows on the near-black background: any lighter wash lowers every
44
- // light token's contrast, so the rows take opaque hues at the
45
- // background's own luminance — a deep green and a deep red that read as
46
- // colour, not brightness — and every token keeps the contrast it has on
47
- // the plain background. Markers: forest moss and blood crimson.
48
- added: '#081408',
49
- removed: '#1e0a0a',
50
- 'added-marker': '#a3c987',
51
- 'removed-marker': '#d97580',
34
+ keyword: purple.dark[80],
35
+ string: green.dark[70],
36
+ comment: neutral.dark[65],
37
+ number: yellow.dark[70],
38
+ function: blue.dark[65],
39
+ type: purple.dark[80],
40
+ variable: neutral.dark[95],
41
+ operator: neutral.dark[75],
42
+ constant: yellow.dark[65],
43
+ tag: pink.dark[65],
44
+ attribute: yellow.dark[70],
45
+ property: teal.dark[70],
46
+ punctuation: neutral.dark[65],
47
+ background: neutral.dark[10],
48
+ added: green.dark[5],
49
+ removed: red.dark[5],
50
+ 'added-marker': green.dark[70],
51
+ 'removed-marker': pink.dark[65],
52
52
  },
53
53
  });
54
54
 
@@ -114,129 +114,99 @@ export const gothicTheme = defineTheme({
114
114
  syntax: gothicSyntax,
115
115
 
116
116
  tokens: {
117
- // =========================================================================
118
- // Colors — gothic dark palette (single values, dark-only)
119
- // Core: #E8F1F6, #96A0AB, #495056, #24292D, #101314
120
- // =========================================================================
121
-
122
- // Core semantic
123
- '--color-accent': '#E8F1F6',
124
- '--color-accent-muted': '#E8F1F620',
125
- '--color-neutral': '#E8F1F61A',
126
- '--color-background-surface': '#101314',
127
- '--color-background-body': '#101314',
128
- '--color-overlay': '#101314CC',
129
- '--color-overlay-hover': '#E8F1F60D',
130
- '--color-overlay-pressed': '#E8F1F61A',
131
- '--color-background-muted': '#24292D',
132
-
133
- // Text
134
- '--color-text-primary': '#E8F1F6',
135
- '--color-text-secondary': '#96A0AB',
136
- '--color-text-disabled': '#495056',
137
- '--color-text-accent': '#E8F1F6',
138
- '--color-on-dark': '#E8F1F6',
139
- '--color-on-light': '#101314',
140
- '--color-on-accent': '#101314',
141
- '--color-on-success': '#101314',
142
- '--color-on-error': '#101314',
143
- '--color-on-warning': '#101314',
144
-
145
- // Icon
146
- '--color-icon-accent': '#E8F1F6',
147
- '--color-icon-primary': '#E8F1F6',
148
- '--color-icon-secondary': '#96A0AB',
149
- '--color-icon-disabled': '#495056',
150
-
151
- // Surface variants
152
- '--color-background-card': '#1a1d20',
153
- '--color-background-popover': '#24292D',
154
- '--color-background-inverted': '#E8F1F6',
155
-
156
- // Status / Sentiment — dusty pastels matching the categorical
157
- // pattern. Used for status surfaces, destructive button bg, etc.
158
- '--color-success': '#b3c79a', // sage moss
159
- '--color-success-muted': '#b3c79a',
160
- '--color-error': '#c6a6a2', // dusty rose
161
- '--color-error-muted': '#c6a6a2',
162
- '--color-warning': '#d3c490', // aged gold
163
- '--color-warning-muted': '#d3c490',
164
-
165
- // Border
166
- '--color-border': '#E8F1F61A',
167
- '--color-border-emphasized': '#495056',
168
-
169
- // Effects
170
- '--color-skeleton': '#495056',
171
- '--color-shadow': '#0000004D',
172
- '--color-tint-hover': 'white',
173
-
174
- // =========================================================================
175
- // Categorical — dusty pastel-on-dark pattern
176
- // Hand-tuned dusty pastels (T75 with reduced chroma) — confident
177
- // but never bright. Neutral is a dark slate with white text — the
178
- // "no-color" variant earns its hierarchy by matching the page mood.
179
- // =========================================================================
180
-
181
- // Blue (periwinkle midnight)
182
- '--color-background-blue': '#a3b5d6',
183
- '--color-border-blue': '#8696b8',
184
- '--color-icon-blue': '#2a3b6e',
185
- '--color-text-blue': '#1f2c54',
186
-
187
- // Cyan (cathedral mist)
188
- '--color-background-cyan': '#a3c2cf',
189
- '--color-border-cyan': '#86a4b1',
190
- '--color-icon-cyan': '#2a5e75',
191
- '--color-text-cyan': '#204858',
192
-
193
- // Gray (dark slate — special: dark bg + light text)
194
- '--color-background-gray': '#3d4248',
195
- '--color-border-gray': '#5d646b',
196
- '--color-icon-gray': '#E8F1F6',
197
- '--color-text-gray': '#E8F1F6',
198
-
199
- // Green (sage moss)
200
- '--color-background-green': '#b3c79a',
201
- '--color-border-green': '#96a880',
202
- '--color-icon-green': '#3a5e2c',
203
- '--color-text-green': '#244023',
204
-
205
- // Orange (warm tan)
206
- '--color-background-orange': '#d3b89a',
207
- '--color-border-orange': '#b6987d',
208
- '--color-icon-orange': '#8a4818',
209
- '--color-text-orange': '#6e3812',
210
-
211
- // Pink (dusty rose)
212
- '--color-background-pink': '#c89aab',
213
- '--color-border-pink': '#aa7d8e',
214
- '--color-icon-pink': '#8d2d4c',
215
- '--color-text-pink': '#71223c',
216
-
217
- // Purple (muted plum)
218
- '--color-background-purple': '#b29bc4',
219
- '--color-border-purple': '#947da6',
220
- '--color-icon-purple': '#5a2370',
221
- '--color-text-purple': '#481b58',
222
-
223
- // Red (dusty rose)
224
- '--color-background-red': '#c6a6a2',
225
- '--color-border-red': '#a48581',
226
- '--color-icon-red': '#5e3a35',
227
- '--color-text-red': '#4a2520',
228
-
229
- // Teal (sage verdigris)
230
- '--color-background-teal': '#a3c2b6',
231
- '--color-border-teal': '#86a499',
232
- '--color-icon-teal': '#1f5e52',
233
- '--color-text-teal': '#174a40',
234
-
235
- // Yellow (aged gold)
236
- '--color-background-yellow': '#d3c490',
237
- '--color-border-yellow': '#b6a775',
238
- '--color-icon-yellow': '#876515',
239
- '--color-text-yellow': '#6c5010',
117
+ '--color-accent': neutral.dark[95],
118
+ '--color-accent-muted': withAlpha(neutral.dark[95], '20'),
119
+ '--color-neutral': withAlpha(neutral.dark[95], '1a'),
120
+ '--color-background-surface': neutral.dark[10],
121
+ '--color-background-body': neutral.dark[10],
122
+ '--color-overlay': withAlpha(neutral.dark[10], 'cc'),
123
+ '--color-overlay-hover': withAlpha(neutral.dark[95], '0d'),
124
+ '--color-overlay-pressed': withAlpha(neutral.dark[95], '1a'),
125
+ '--color-background-muted': neutral.dark[20],
126
+
127
+ '--color-text-primary': neutral.dark[95],
128
+ '--color-text-secondary': neutral.dark[75],
129
+ '--color-text-disabled': neutral.dark[40],
130
+ '--color-text-accent': neutral.dark[95],
131
+ '--color-on-dark': neutral.dark[95],
132
+ '--color-on-light': neutral.dark[10],
133
+ '--color-on-accent': neutral.dark[10],
134
+ '--color-on-success': neutral.dark[10],
135
+ '--color-on-error': neutral.dark[10],
136
+ '--color-on-warning': neutral.dark[10],
137
+
138
+ '--color-icon-accent': neutral.dark[95],
139
+ '--color-icon-primary': neutral.dark[95],
140
+ '--color-icon-secondary': neutral.dark[75],
141
+ '--color-icon-disabled': neutral.dark[40],
142
+
143
+ '--color-background-card': neutral.dark[15],
144
+ '--color-background-popover': neutral.dark[20],
145
+ '--color-background-inverted': neutral.dark[95],
146
+
147
+ '--color-success': green.dark[75],
148
+ '--color-success-muted': green.dark[75],
149
+ '--color-error': red.dark[75],
150
+ '--color-error-muted': red.dark[75],
151
+ '--color-warning': yellow.dark[75],
152
+ '--color-warning-muted': yellow.dark[75],
153
+
154
+ '--color-border': withAlpha(neutral.dark[95], '1a'),
155
+ '--color-border-emphasized': neutral.dark[40],
156
+
157
+ '--color-skeleton': neutral.dark[40],
158
+ '--color-shadow': withAlpha(neutral.dark[0], '4d'),
159
+ '--color-tint-hover': neutral.dark[100],
160
+
161
+ '--color-background-blue': blue.dark[75],
162
+ '--color-border-blue': blue.dark[60],
163
+ '--color-icon-blue': blue.dark[30],
164
+ '--color-text-blue': blue.dark[20],
165
+
166
+ '--color-background-cyan': cyan.dark[75],
167
+ '--color-border-cyan': cyan.dark[60],
168
+ '--color-icon-cyan': cyan.dark[30],
169
+ '--color-text-cyan': cyan.dark[20],
170
+
171
+ '--color-background-gray': neutral.dark[35],
172
+ '--color-border-gray': neutral.dark[50],
173
+ '--color-icon-gray': neutral.dark[95],
174
+ '--color-text-gray': neutral.dark[95],
175
+
176
+ '--color-background-green': green.dark[75],
177
+ '--color-border-green': green.dark[60],
178
+ '--color-icon-green': green.dark[30],
179
+ '--color-text-green': green.dark[20],
180
+
181
+ '--color-background-orange': orange.dark[75],
182
+ '--color-border-orange': orange.dark[60],
183
+ '--color-icon-orange': orange.dark[30],
184
+ '--color-text-orange': orange.dark[20],
185
+
186
+ '--color-background-pink': pink.dark[75],
187
+ '--color-border-pink': pink.dark[60],
188
+ '--color-icon-pink': pink.dark[30],
189
+ '--color-text-pink': pink.dark[15],
190
+
191
+ '--color-background-purple': purple.dark[75],
192
+ '--color-border-purple': purple.dark[60],
193
+ '--color-icon-purple': purple.dark[30],
194
+ '--color-text-purple': purple.dark[20],
195
+
196
+ '--color-background-red': red.dark[75],
197
+ '--color-border-red': red.dark[60],
198
+ '--color-icon-red': red.dark[30],
199
+ '--color-text-red': red.dark[20],
200
+
201
+ '--color-background-teal': teal.dark[75],
202
+ '--color-border-teal': teal.dark[60],
203
+ '--color-icon-teal': teal.dark[30],
204
+ '--color-text-teal': teal.dark[20],
205
+
206
+ '--color-background-yellow': yellow.dark[75],
207
+ '--color-border-yellow': yellow.dark[60],
208
+ '--color-icon-yellow': yellow.dark[30],
209
+ '--color-text-yellow': yellow.dark[15],
240
210
 
241
211
  // =========================================================================
242
212
  // Radius — subtle rounding (original gothic)
@@ -254,14 +224,14 @@ export const gothicTheme = defineTheme({
254
224
  // =========================================================================
255
225
  // Shadows — restrained, atmospheric
256
226
  // =========================================================================
257
- '--shadow-low': '0 2px 4px #00000033, 0 4px 8px #00000040',
258
- '--shadow-med': '0 2px 4px #00000033, 0 4px 12px #00000040',
259
- '--shadow-high': '0 4px 6px #00000040, 0 12px 24px #0000004D',
260
- '--shadow-inset-hover': 'inset 0px 0px 0px 1px #96A0AB30',
261
- '--shadow-inset-selected': 'inset 0px 0px 0px 2px #96A0AB50',
262
- '--shadow-inset-success': 'inset 0px 0px 0px 1px #87b06a50',
263
- '--shadow-inset-warning': 'inset 0px 0px 0px 1px #d6b56a50',
264
- '--shadow-inset-error': 'inset 0px 0px 0px 1px #d4485150',
227
+ '--shadow-low': `0 2px 4px ${withAlpha(neutral.dark[0], '33')}, 0 4px 8px ${withAlpha(neutral.dark[0], '40')}`,
228
+ '--shadow-med': `0 2px 4px ${withAlpha(neutral.dark[0], '33')}, 0 4px 12px ${withAlpha(neutral.dark[0], '40')}`,
229
+ '--shadow-high': `0 4px 6px ${withAlpha(neutral.dark[0], '40')}, 0 12px 24px ${withAlpha(neutral.dark[0], '4d')}`,
230
+ '--shadow-inset-hover': `inset 0 0 0 1px ${withAlpha(neutral.dark[75], '30')}`,
231
+ '--shadow-inset-selected': `inset 0 0 0 2px ${withAlpha(neutral.dark[75], '50')}`,
232
+ '--shadow-inset-success': `inset 0 0 0 1px ${withAlpha(green.dark[55], '50')}`,
233
+ '--shadow-inset-warning': `inset 0 0 0 1px ${withAlpha(yellow.dark[75], '50')}`,
234
+ '--shadow-inset-error': `inset 0 0 0 1px ${withAlpha(red.dark[75], '50')}`,
265
235
  },
266
236
 
267
237
  components: {
@@ -424,11 +394,11 @@ export const gothicTheme = defineTheme({
424
394
  });
425
395
 
426
396
  /**
427
- * Raw tonal palettes — every color at every tone step (0–100 in 5s).
428
- * Use these for custom components or data visualization.
429
- *
430
- * Categorical hues (blue, green, etc.) follow gothic gem-tone hues.
431
- * Neutral mirrors the original gothic blue-gray palette (H≈210).
397
+ * Frozen released compatibility palettes. These values preserve the public
398
+ * `gothicPalettes` shape and values for existing consumers; the maintained
399
+ * theme renders selected stops from `gothicPalettes.generated.ts` instead.
400
+ * Components should consume semantic theme tokens, and charts should use the
401
+ * data-visualization color API.
432
402
  */
433
403
  export const gothicPalettes = {
434
404
  // Neutral — H=210 C=4 (cool blue-gray, original gothic)
package/src/source.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- export {gothicTheme, gothicPalettes} from './gothicTheme';
3
+ export {gothicPalettes, gothicTheme} from './gothicTheme';
4
4
  export {gothicIconRegistry} from './icons';