@otto-code/highlight 0.8.8 → 0.8.9

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/colors.js CHANGED
@@ -21,8 +21,12 @@ export const darkHighlightColors = {
21
21
  link: "#a5d6ff",
22
22
  diffAdded: "rgba(46, 160, 67, 0.15)",
23
23
  diffRemoved: "rgba(248, 81, 73, 0.1)",
24
+ diffAddedForeground: "#4ade80",
25
+ diffRemovedForeground: "#ef4444",
24
26
  diffAddedEmphasis: "rgba(46, 160, 67, 0.4)",
25
27
  diffRemovedEmphasis: "rgba(248, 81, 73, 0.35)",
28
+ diffFormatting: "rgba(210, 168, 255, 0.15)",
29
+ diffMoved: "#d2a8ff",
26
30
  };
27
31
  export const lightHighlightColors = {
28
32
  keyword: "#cf222e",
@@ -47,7 +51,11 @@ export const lightHighlightColors = {
47
51
  link: "#0a3069",
48
52
  diffAdded: "rgba(46, 160, 67, 0.15)",
49
53
  diffRemoved: "rgba(248, 81, 73, 0.1)",
54
+ diffAddedForeground: "#15803d",
55
+ diffRemovedForeground: "#b91c1c",
50
56
  diffAddedEmphasis: "rgba(46, 160, 67, 0.4)",
51
57
  diffRemovedEmphasis: "rgba(248, 81, 73, 0.35)",
58
+ diffFormatting: "rgba(130, 80, 223, 0.1)",
59
+ diffMoved: "#8250df",
52
60
  };
53
61
  //# sourceMappingURL=colors.js.map
package/dist/themes.js CHANGED
@@ -51,8 +51,12 @@ function expandRolePalette(r) {
51
51
  link: r.string,
52
52
  diffAdded: r.diffAdded,
53
53
  diffRemoved: r.diffRemoved,
54
+ diffAddedForeground: r.diffAddedForeground,
55
+ diffRemovedForeground: r.diffRemovedForeground,
54
56
  diffAddedEmphasis: withAlpha(r.diffAdded, 0.4),
55
57
  diffRemovedEmphasis: withAlpha(r.diffRemoved, 0.35),
58
+ diffFormatting: r.diffFormatting,
59
+ diffMoved: r.diffMoved,
56
60
  };
57
61
  }
58
62
  // --- Default (high-contrast primary hues - the CGA-basic baseline) -------
@@ -69,6 +73,10 @@ const defaultLight = {
69
73
  operator: "#000000",
70
74
  diffAdded: "rgba(0, 128, 0, 0.12)",
71
75
  diffRemoved: "rgba(170, 0, 0, 0.12)",
76
+ diffAddedForeground: "#008000",
77
+ diffRemovedForeground: "#aa0000",
78
+ diffFormatting: "rgba(122, 62, 157, 0.12)",
79
+ diffMoved: "#7a3e9d",
72
80
  };
73
81
  const defaultDark = {
74
82
  base: "#ffffff",
@@ -83,6 +91,10 @@ const defaultDark = {
83
91
  operator: "#ffffff",
84
92
  diffAdded: "rgba(85, 255, 85, 0.18)",
85
93
  diffRemoved: "rgba(255, 85, 85, 0.18)",
94
+ diffAddedForeground: "#55ff55",
95
+ diffRemovedForeground: "#ff5555",
96
+ diffFormatting: "rgba(214, 140, 255, 0.18)",
97
+ diffMoved: "#d68cff",
86
98
  };
87
99
  // --- VS Code (Light+ / Dark+) ---------------------------------------------
88
100
  const vscodeLight = {
@@ -98,6 +110,10 @@ const vscodeLight = {
98
110
  operator: "#000000",
99
111
  diffAdded: "rgba(46, 125, 50, 0.14)",
100
112
  diffRemoved: "rgba(198, 40, 40, 0.14)",
113
+ diffAddedForeground: "#2e7d32",
114
+ diffRemovedForeground: "#c62828",
115
+ diffFormatting: "rgba(111, 66, 193, 0.14)",
116
+ diffMoved: "#6f42c1",
101
117
  };
102
118
  const vscodeDark = {
103
119
  base: "#d4d4d4",
@@ -112,6 +128,10 @@ const vscodeDark = {
112
128
  operator: "#d4d4d4",
113
129
  diffAdded: "rgba(75, 139, 31, 0.22)",
114
130
  diffRemoved: "rgba(190, 17, 0, 0.22)",
131
+ diffAddedForeground: "#89d185",
132
+ diffRemovedForeground: "#f48771",
133
+ diffFormatting: "rgba(197, 134, 192, 0.2)",
134
+ diffMoved: "#c586c0",
115
135
  };
116
136
  // --- JetBrains (IntelliJ Light / Darcula) ---------------------------------
117
137
  const jetbrainsLight = {
@@ -127,6 +147,10 @@ const jetbrainsLight = {
127
147
  operator: "#000000",
128
148
  diffAdded: "rgba(56, 142, 60, 0.15)",
129
149
  diffRemoved: "rgba(198, 40, 40, 0.15)",
150
+ diffAddedForeground: "#388e3c",
151
+ diffRemovedForeground: "#c62828",
152
+ diffFormatting: "rgba(122, 62, 157, 0.15)",
153
+ diffMoved: "#7a3e9d",
130
154
  };
131
155
  const jetbrainsDark = {
132
156
  base: "#a9b7c6",
@@ -141,6 +165,10 @@ const jetbrainsDark = {
141
165
  operator: "#a9b7c6",
142
166
  diffAdded: "rgba(46, 107, 62, 0.3)",
143
167
  diffRemoved: "rgba(107, 46, 46, 0.3)",
168
+ diffAddedForeground: "#629755",
169
+ diffRemovedForeground: "#a64a4a",
170
+ diffFormatting: "rgba(199, 146, 234, 0.22)",
171
+ diffMoved: "#c792ea",
144
172
  };
145
173
  // --- Monokai (Light / Dark) ------------------------------------------------
146
174
  const monokaiLight = {
@@ -156,6 +184,10 @@ const monokaiLight = {
156
184
  operator: "#c4133b",
157
185
  diffAdded: "rgba(75, 139, 31, 0.14)",
158
186
  diffRemoved: "rgba(179, 37, 31, 0.14)",
187
+ diffAddedForeground: "#4b8b1f",
188
+ diffRemovedForeground: "#b3251f",
189
+ diffFormatting: "rgba(124, 63, 181, 0.14)",
190
+ diffMoved: "#7c3fb5",
159
191
  };
160
192
  const monokaiDark = {
161
193
  base: "#f8f8f2",
@@ -170,6 +202,10 @@ const monokaiDark = {
170
202
  operator: "#f92672",
171
203
  diffAdded: "rgba(166, 226, 46, 0.18)",
172
204
  diffRemoved: "rgba(248, 53, 53, 0.18)",
205
+ diffAddedForeground: "#a6e22e",
206
+ diffRemovedForeground: "#f83535",
207
+ diffFormatting: "rgba(174, 129, 255, 0.18)",
208
+ diffMoved: "#ae81ff",
173
209
  };
174
210
  // --- Nightshade (Light / Dark - gothic pink/purple/cyan, formerly "Dracula";
175
211
  // renamed once it grew a light variant the original theme never had) --------
@@ -186,6 +222,10 @@ const nightshadeLight = {
186
222
  operator: "#bd2f7a",
187
223
  diffAdded: "rgba(31, 156, 74, 0.14)",
188
224
  diffRemoved: "rgba(179, 54, 54, 0.14)",
225
+ diffAddedForeground: "#1f9c4a",
226
+ diffRemovedForeground: "#b33636",
227
+ diffFormatting: "rgba(124, 79, 209, 0.14)",
228
+ diffMoved: "#7c4fd1",
189
229
  };
190
230
  const nightshadeDark = {
191
231
  base: "#f8f8f2",
@@ -200,6 +240,10 @@ const nightshadeDark = {
200
240
  operator: "#ff79c6",
201
241
  diffAdded: "rgba(80, 250, 123, 0.18)",
202
242
  diffRemoved: "rgba(255, 85, 85, 0.18)",
243
+ diffAddedForeground: "#50fa7b",
244
+ diffRemovedForeground: "#ff5555",
245
+ diffFormatting: "rgba(189, 147, 249, 0.18)",
246
+ diffMoved: "#bd93f9",
203
247
  };
204
248
  // --- Neotokyo (Light / Dark - cyber yellow, hot pink, neon cyan) ----------
205
249
  const neotokyoLight = {
@@ -215,6 +259,10 @@ const neotokyoLight = {
215
259
  operator: "#0089a3",
216
260
  diffAdded: "rgba(31, 156, 26, 0.14)",
217
261
  diffRemoved: "rgba(194, 31, 61, 0.14)",
262
+ diffAddedForeground: "#1f9c1a",
263
+ diffRemovedForeground: "#c21f3d",
264
+ diffFormatting: "rgba(123, 47, 212, 0.14)",
265
+ diffMoved: "#7b2fd4",
218
266
  };
219
267
  const neotokyoDark = {
220
268
  base: "#e4e4f4",
@@ -229,6 +277,10 @@ const neotokyoDark = {
229
277
  operator: "#0ff0fc",
230
278
  diffAdded: "rgba(57, 255, 20, 0.18)",
231
279
  diffRemoved: "rgba(255, 43, 78, 0.18)",
280
+ diffAddedForeground: "#39ff14",
281
+ diffRemovedForeground: "#ff2b4e",
282
+ diffFormatting: "rgba(185, 103, 255, 0.18)",
283
+ diffMoved: "#b967ff",
232
284
  };
233
285
  export function isSyntaxThemeId(value) {
234
286
  return SYNTAX_THEME_IDS.includes(value);
package/dist/types.d.ts CHANGED
@@ -6,7 +6,11 @@ export interface HighlightToken {
6
6
  export interface DiffBackgroundColors {
7
7
  diffAdded: string;
8
8
  diffRemoved: string;
9
+ diffAddedForeground: string;
10
+ diffRemovedForeground: string;
9
11
  diffAddedEmphasis: string;
10
12
  diffRemovedEmphasis: string;
13
+ diffFormatting: string;
14
+ diffMoved: string;
11
15
  }
12
16
  //# sourceMappingURL=types.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otto-code/highlight",
3
- "version": "0.8.8",
3
+ "version": "0.8.9",
4
4
  "license": "AGPL-3.0-or-later",
5
5
  "files": [
6
6
  "dist",