@abelfubu/dv 0.1.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.
Files changed (118) hide show
  1. package/dist/ansi-html.d.ts +42 -0
  2. package/dist/ansi-html.d.ts.map +1 -0
  3. package/dist/ansi-html.js +327 -0
  4. package/dist/ansi-output.d.ts +22 -0
  5. package/dist/ansi-output.d.ts.map +1 -0
  6. package/dist/ansi-output.js +154 -0
  7. package/dist/balance-delimiters.d.ts +25 -0
  8. package/dist/balance-delimiters.d.ts.map +1 -0
  9. package/dist/balance-delimiters.js +539 -0
  10. package/dist/balance-delimiters.test.d.ts +2 -0
  11. package/dist/balance-delimiters.test.d.ts.map +1 -0
  12. package/dist/balance-delimiters.test.js +1029 -0
  13. package/dist/cli-copy-notification.test.d.ts +2 -0
  14. package/dist/cli-copy-notification.test.d.ts.map +1 -0
  15. package/dist/cli-copy-notification.test.js +80 -0
  16. package/dist/cli-scroll.test.d.ts +2 -0
  17. package/dist/cli-scroll.test.d.ts.map +1 -0
  18. package/dist/cli-scroll.test.js +283 -0
  19. package/dist/cli.d.ts +9 -0
  20. package/dist/cli.d.ts.map +1 -0
  21. package/dist/cli.js +976 -0
  22. package/dist/clipboard.d.ts +16 -0
  23. package/dist/clipboard.d.ts.map +1 -0
  24. package/dist/clipboard.js +128 -0
  25. package/dist/components/diff-view.d.ts +32 -0
  26. package/dist/components/diff-view.d.ts.map +1 -0
  27. package/dist/components/diff-view.js +123 -0
  28. package/dist/components/diff-view.test.d.ts +5 -0
  29. package/dist/components/diff-view.test.d.ts.map +1 -0
  30. package/dist/components/diff-view.test.js +312 -0
  31. package/dist/components/directory-tree-view.d.ts +33 -0
  32. package/dist/components/directory-tree-view.d.ts.map +1 -0
  33. package/dist/components/directory-tree-view.js +262 -0
  34. package/dist/components/index.d.ts +4 -0
  35. package/dist/components/index.d.ts.map +1 -0
  36. package/dist/components/index.js +5 -0
  37. package/dist/components/toast.d.ts +21 -0
  38. package/dist/components/toast.d.ts.map +1 -0
  39. package/dist/components/toast.js +47 -0
  40. package/dist/diff-cursor-utils.d.ts +20 -0
  41. package/dist/diff-cursor-utils.d.ts.map +1 -0
  42. package/dist/diff-cursor-utils.js +105 -0
  43. package/dist/diff-cursor-utils.test.d.ts +2 -0
  44. package/dist/diff-cursor-utils.test.d.ts.map +1 -0
  45. package/dist/diff-cursor-utils.test.js +40 -0
  46. package/dist/diff-surface-copy.d.ts +23 -0
  47. package/dist/diff-surface-copy.d.ts.map +1 -0
  48. package/dist/diff-surface-copy.js +64 -0
  49. package/dist/diff-surface-copy.test.d.ts +5 -0
  50. package/dist/diff-surface-copy.test.d.ts.map +1 -0
  51. package/dist/diff-surface-copy.test.js +142 -0
  52. package/dist/diff-utils.d.ts +196 -0
  53. package/dist/diff-utils.d.ts.map +1 -0
  54. package/dist/diff-utils.js +682 -0
  55. package/dist/diff-utils.test.d.ts +2 -0
  56. package/dist/diff-utils.test.d.ts.map +1 -0
  57. package/dist/diff-utils.test.js +727 -0
  58. package/dist/directory-tree.d.ts +72 -0
  59. package/dist/directory-tree.d.ts.map +1 -0
  60. package/dist/directory-tree.js +161 -0
  61. package/dist/directory-tree.test.d.ts +2 -0
  62. package/dist/directory-tree.test.d.ts.map +1 -0
  63. package/dist/directory-tree.test.js +383 -0
  64. package/dist/dropdown.d.ts +26 -0
  65. package/dist/dropdown.d.ts.map +1 -0
  66. package/dist/dropdown.js +172 -0
  67. package/dist/dropdown.test.d.ts +2 -0
  68. package/dist/dropdown.test.d.ts.map +1 -0
  69. package/dist/dropdown.test.js +106 -0
  70. package/dist/filter-submodule.e2e.test.d.ts +2 -0
  71. package/dist/filter-submodule.e2e.test.d.ts.map +1 -0
  72. package/dist/filter-submodule.e2e.test.js +109 -0
  73. package/dist/hooks/use-copy-selection.d.ts +29 -0
  74. package/dist/hooks/use-copy-selection.d.ts.map +1 -0
  75. package/dist/hooks/use-copy-selection.js +46 -0
  76. package/dist/kv-codec.d.ts +16 -0
  77. package/dist/kv-codec.d.ts.map +1 -0
  78. package/dist/kv-codec.js +36 -0
  79. package/dist/license.d.ts +14 -0
  80. package/dist/license.d.ts.map +1 -0
  81. package/dist/license.js +63 -0
  82. package/dist/logger.d.ts +9 -0
  83. package/dist/logger.d.ts.map +1 -0
  84. package/dist/logger.js +78 -0
  85. package/dist/monochrome.d.ts +34 -0
  86. package/dist/monochrome.d.ts.map +1 -0
  87. package/dist/monochrome.js +613 -0
  88. package/dist/monotone.d.ts +22 -0
  89. package/dist/monotone.d.ts.map +1 -0
  90. package/dist/monotone.js +185 -0
  91. package/dist/parsers-config.d.ts +19 -0
  92. package/dist/parsers-config.d.ts.map +1 -0
  93. package/dist/parsers-config.js +271 -0
  94. package/dist/patch-terminal-dimensions.d.ts +2 -0
  95. package/dist/patch-terminal-dimensions.d.ts.map +1 -0
  96. package/dist/patch-terminal-dimensions.js +45 -0
  97. package/dist/stdin-pager.test.d.ts +2 -0
  98. package/dist/stdin-pager.test.d.ts.map +1 -0
  99. package/dist/stdin-pager.test.js +497 -0
  100. package/dist/store.d.ts +16 -0
  101. package/dist/store.d.ts.map +1 -0
  102. package/dist/store.js +48 -0
  103. package/dist/themes/github.json +247 -0
  104. package/dist/themes.d.ts +59 -0
  105. package/dist/themes.d.ts.map +1 -0
  106. package/dist/themes.js +248 -0
  107. package/dist/tree-icons.d.ts +4 -0
  108. package/dist/tree-icons.d.ts.map +1 -0
  109. package/dist/tree-icons.js +18 -0
  110. package/dist/utils.d.ts +2 -0
  111. package/dist/utils.d.ts.map +1 -0
  112. package/dist/utils.js +13 -0
  113. package/dist/web-utils.d.ts +56 -0
  114. package/dist/web-utils.d.ts.map +1 -0
  115. package/dist/web-utils.js +363 -0
  116. package/package.json +37 -0
  117. package/public/jetbrains-mono-nerd.ttf +0 -0
  118. package/public/jetbrains-mono-nerd.woff2 +0 -0
@@ -0,0 +1,613 @@
1
+ // Monochrome theme generator for creating grayscale color schemes.
2
+ // Generates VS Code-compatible themes by blending between background and foreground.
3
+ // Supports various contrast levels from subtle to amplified.
4
+ const exceptions = [
5
+ "scrollbarSlider.activeBackground",
6
+ "scrollbarSlider.background",
7
+ "scrollbarSlider.hoverBackground",
8
+ ];
9
+ function hexToRgb(hex) {
10
+ const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
11
+ return result
12
+ ? [
13
+ parseInt(result[1], 16),
14
+ parseInt(result[2], 16),
15
+ parseInt(result[3], 16),
16
+ ]
17
+ : [0, 0, 0];
18
+ }
19
+ function rgbToHex(r, g, b) {
20
+ return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
21
+ }
22
+ function luminance(hex) {
23
+ const [r, g, b] = hexToRgb(hex);
24
+ const [rs, gs, bs] = [r / 255, g / 255, b / 255].map((val) => val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4));
25
+ return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;
26
+ }
27
+ function blend(bg, fg, alpha) {
28
+ const [r1, g1, b1] = hexToRgb(bg);
29
+ const [r2, g2, b2] = hexToRgb(fg);
30
+ const r = Math.round(r1 + (r2 - r1) * alpha);
31
+ const g = Math.round(g1 + (g2 - g1) * alpha);
32
+ const b = Math.round(b1 + (b2 - b1) * alpha);
33
+ return rgbToHex(r, g, b);
34
+ }
35
+ function alpha(color, alpha) {
36
+ const [r, g, b] = hexToRgb(color);
37
+ const alphaHex = Math.round(alpha * 255)
38
+ .toString(16)
39
+ .padStart(2, "0");
40
+ return rgbToHex(r, g, b) + alphaHex;
41
+ }
42
+ function warningColor(foreground, targetColor, amount) {
43
+ const [r1, g1, b1] = hexToRgb(foreground);
44
+ const [r2, g2, b2] = hexToRgb(targetColor);
45
+ const r = Math.round(r1 + (r2 - r1) * amount);
46
+ const g = Math.round(g1 + (g2 - g1) * amount);
47
+ const b = Math.round(b1 + (b2 - b1) * amount);
48
+ return rgbToHex(r, g, b);
49
+ }
50
+ function base() {
51
+ return {
52
+ colors: {
53
+ "activityBar.activeBorder": 0,
54
+ "activityBar.background": 0,
55
+ "activityBar.border": 0.0392156862745098,
56
+ "activityBar.foreground": 0.7490196078431373,
57
+ "activityBar.inactiveForeground": 0.23921568627450981,
58
+ "activityBarBadge.background": 0.3764705882352941,
59
+ "badge.background": 0.10196078431372549,
60
+ "badge.foreground": 0.7490196078431373,
61
+ "button.background": 0.09411764705882353,
62
+ "button.hoverBackground": 0.12156862745098039,
63
+ "checkbox.border": 0.0392156862745098,
64
+ "dart.closingLabels": 0.0784313725490196,
65
+ "debugIcon.breakpointCurrentStackframeForeground": 0.5686274509803921,
66
+ "debugIcon.breakpointDisabledForeground": 0.5686274509803921,
67
+ "debugIcon.breakpointForeground": 0.5686274509803921,
68
+ "debugIcon.breakpointStackframeForeground": 0.5686274509803921,
69
+ "debugIcon.breakpointUnverifiedForeground": 0.5686274509803921,
70
+ "debugIcon.continueForeground": 0.5686274509803921,
71
+ "debugIcon.disconnectForeground": 0.5686274509803921,
72
+ "debugIcon.pauseForeground": 0.5686274509803921,
73
+ "debugIcon.restartForeground": 0.5686274509803921,
74
+ "debugIcon.startForeground": 0.5686274509803921,
75
+ "debugIcon.stepBackForeground": 0.5686274509803921,
76
+ "debugIcon.stepIntoForeground": 0.5686274509803921,
77
+ "debugIcon.stepOutForeground": 0.5686274509803921,
78
+ "debugIcon.stepOverForeground": 0.5686274509803921,
79
+ "debugIcon.stopForeground": 0.5686274509803921,
80
+ "debugToolBar.background": 0,
81
+ "dropdown.background": 0,
82
+ "dropdown.foreground": 0.5686274509803921,
83
+ "editor.background": 0,
84
+ "editor.findMatchBackground": 0,
85
+ "editor.findMatchBorder": 0.5019607843137255,
86
+ "editor.findMatchHighlightBackground": 0,
87
+ "editor.findMatchHighlightBorder": 0.23921568627450981,
88
+ "editor.foldBackground": 0,
89
+ "editor.foreground": 0.7019607843137254,
90
+ "editor.hoverHighlightBackground": 0.058823529411764705,
91
+ "editor.lineHighlightBackground": 0.025,
92
+ "editor.selectionBackground": 0.058823529411764705,
93
+ "editorBracketMatch.background": 0,
94
+ "editorBracketMatch.border": 0.23921568627450981,
95
+ "editorCursor.foreground": 0.7019607843137254,
96
+ "editorError.foreground": 0.3607843137254902,
97
+ "editorGroup.border": 0.0392156862745098,
98
+ "editorGroupHeader.tabsBackground": 0,
99
+ "editorGroupHeader.tabsBorder": 0.0392156862745098,
100
+ "editorIndentGuide.activeBackground": 0.24,
101
+ "editorIndentGuide.background": 0.08,
102
+ "editorInfo.foreground": 0.3607843137254902,
103
+ "editorLightBulb.foreground": 0.5686274509803921,
104
+ "editorLineNumber.activeForeground": 0.25882352941176473,
105
+ "editorLineNumber.foreground": 0.10196078431372549,
106
+ "editorLink.activeForeground": 0.7490196078431373,
107
+ "editorOverviewRuler.border": 0.0392156862745098,
108
+ "editorRuler.foreground": 0.08,
109
+ "editorSuggestWidget.foreground": 0.3764705882352941,
110
+ "editorSuggestWidget.highlightForeground": 0.7490196078431373,
111
+ "editorWarning.foreground": 0.3607843137254902,
112
+ "editorWhitespace.foreground": 0.10196078431372549,
113
+ "editorWidget.background": 0,
114
+ "editorHoverWidget.statusBarBackground": 0,
115
+ "focusBorder": 0,
116
+ "gitDecoration.ignoredResourceForeground": 0.154,
117
+ "gitDecoration.addedResourceForeground": 0.752,
118
+ "gitDecoration.modifiedResourceForeground": 0.752,
119
+ "gitDecoration.deletedResourceForeground": 0.3764705882352941,
120
+ "gitDecoration.untrackedResourceForeground": 0.752,
121
+ "gitDecoration.conflictingResourceForeground": 0.752,
122
+ "gitDecoration.submoduleResourceForeground": 0.3764705882352941,
123
+ "icon.foreground": 0.2196078431372549,
124
+ "input.background": 0,
125
+ "input.border": 0,
126
+ "input.foreground": 0.5686274509803921,
127
+ "list.activeSelectionBackground": 0.0392156862745098,
128
+ "list.activeSelectionForeground": 0.7490196078431373,
129
+ "list.filterMatchBackground": 0.10196078431372549,
130
+ "list.filterMatchBorder": 0,
131
+ "list.focusBackground": 0.0392156862745098,
132
+ "list.highlightForeground": 0.6,
133
+ "list.hoverBackground": 0,
134
+ "list.inactiveSelectionBackground": 0,
135
+ "list.inactiveSelectionForeground": 0.7490196078431373,
136
+ "listFilterWidget.background": 0,
137
+ "listFilterWidget.outline": 0.23921568627450981,
138
+ "menu.background": 0,
139
+ "menu.foreground": 0.5686274509803921,
140
+ "menubar.selectionBackground": 0.0392156862745098,
141
+ "panel.border": 0.0392156862745098,
142
+ "panelTitle.activeBorder": 0,
143
+ "panelTitle.activeForeground": 0.7490196078431373,
144
+ "panelTitle.inactiveForeground": 0.23921568627450981,
145
+ "peekView.border": 0.2196078431372549,
146
+ "peekViewEditor.background": 0,
147
+ "peekViewEditor.matchHighlightBackground": 0,
148
+ "peekViewEditor.matchHighlightBorder": 0.23921568627450981,
149
+ "peekViewEditorGutter.background": 0,
150
+ "peekViewResult.background": 0.023529411764705882,
151
+ "peekViewResult.fileForeground": 0.6,
152
+ "peekViewResult.lineForeground": 0.23921568627450981,
153
+ "peekViewResult.matchHighlightBackground": 0.058823529411764705,
154
+ "peekViewResult.selectionBackground": 0,
155
+ "peekViewResult.selectionForeground": 0.7490196078431373,
156
+ "pickerGroup.foreground": 0.615686274509804,
157
+ "sash.hoverBorder": 0.058823529411764705,
158
+ "scrollbar.shadow": 0,
159
+ "scrollbarSlider.activeBackground": 0.058823529411764705,
160
+ "scrollbarSlider.background": 0.058823529411764705,
161
+ "scrollbarSlider.hoverBackground": 0.058823529411764705,
162
+ "settings.checkboxBorder": 0.0392156862745098,
163
+ "settings.dropdownBorder": 0.0392156862745098,
164
+ "settings.modifiedItemIndicator": 0.2196078431372549,
165
+ "settings.textInputBorder": 0.0392156862745098,
166
+ "sideBar.background": 0,
167
+ "sideBar.border": 0.0392156862745098,
168
+ "sideBar.foreground": 0.3764705882352941,
169
+ "sideBarSectionHeader.background": 0,
170
+ "sideBarSectionHeader.border": 0.0392156862745098,
171
+ "statusBar.background": 0,
172
+ "statusBar.border": 0.0392156862745098,
173
+ "statusBar.debuggingBackground": 0,
174
+ "statusBar.debuggingBorder": 0.0392156862745098,
175
+ "statusBar.debuggingForeground": 0.5686274509803921,
176
+ "statusBar.foreground": 0.5686274509803921,
177
+ "statusBar.noFolderBackground": 0,
178
+ "statusBar.noFolderBorder": 0.0392156862745098,
179
+ "statusBar.noFolderForeground": 0.5686274509803921,
180
+ "statusBarItem.activeBackground": 0,
181
+ "statusBarItem.hoverBackground": 0,
182
+ "symbolIcon.arrayForeground": 0.5686274509803921,
183
+ "symbolIcon.booleanForeground": 0.5686274509803921,
184
+ "symbolIcon.classForeground": 0.5686274509803921,
185
+ "symbolIcon.colorForeground": 0.5686274509803921,
186
+ "symbolIcon.constantForeground": 0.5686274509803921,
187
+ "symbolIcon.constructorForeground": 0.5686274509803921,
188
+ "symbolIcon.enumeratorForeground": 0.5686274509803921,
189
+ "symbolIcon.enumeratorMemberForeground": 0.5686274509803921,
190
+ "symbolIcon.eventForeground": 0.5686274509803921,
191
+ "symbolIcon.fieldForeground": 0.5686274509803921,
192
+ "symbolIcon.fileForeground": 0.5686274509803921,
193
+ "symbolIcon.folderForeground": 0.5686274509803921,
194
+ "symbolIcon.functionForeground": 0.5686274509803921,
195
+ "symbolIcon.interfaceForeground": 0.5686274509803921,
196
+ "symbolIcon.keyForeground": 0.5686274509803921,
197
+ "symbolIcon.keywordForeground": 0.5686274509803921,
198
+ "symbolIcon.methodForeground": 0.5686274509803921,
199
+ "symbolIcon.moduleForeground": 0.5686274509803921,
200
+ "symbolIcon.namespaceForeground": 0.5686274509803921,
201
+ "symbolIcon.nullForeground": 0.5686274509803921,
202
+ "symbolIcon.numberForeground": 0.5686274509803921,
203
+ "symbolIcon.objectForeground": 0.5686274509803921,
204
+ "symbolIcon.operatorForeground": 0.5686274509803921,
205
+ "symbolIcon.packageForeground": 0.5686274509803921,
206
+ "symbolIcon.propertyForeground": 0.5686274509803921,
207
+ "symbolIcon.referenceForeground": 0.5686274509803921,
208
+ "symbolIcon.snippetForeground": 0.5686274509803921,
209
+ "symbolIcon.stringForeground": 0.5686274509803921,
210
+ "symbolIcon.structForeground": 0.5686274509803921,
211
+ "symbolIcon.textForeground": 0.5686274509803921,
212
+ "symbolIcon.typeParameterForeground": 0.5686274509803921,
213
+ "symbolIcon.unitForeground": 0.5686274509803921,
214
+ "symbolIcon.variableForeground": 0.5686274509803921,
215
+ "tab.activeForeground": 0.7490196078431373,
216
+ "tab.border": 0,
217
+ "tab.inactiveBackground": 0,
218
+ "tab.inactiveForeground": 0.23921568627450981,
219
+ "terminal.ansiBrightBlack": 0.1,
220
+ "terminal.ansiBrightBlue": 0.2,
221
+ "terminal.ansiBrightGreen": 0.3,
222
+ "terminal.ansiBrightCyan": 0.4,
223
+ "terminal.ansiBrightRed": 0.5,
224
+ "terminal.ansiBrightMagenta": 0.6,
225
+ "terminal.ansiBrightYellow": 0.7,
226
+ "terminal.ansiBrightWhite": 1,
227
+ "terminal.ansiBlack": 0,
228
+ "terminal.ansiBlue": 0.2,
229
+ "terminal.ansiGreen": 0.3,
230
+ "terminal.ansiCyan": 0.4,
231
+ "terminal.ansiRed": 0.5,
232
+ "terminal.ansiMagenta": 0.6,
233
+ "terminal.ansiYellow": 0.7,
234
+ "terminal.ansiWhite": 0.8,
235
+ "terminal.background": 0,
236
+ "terminal.foreground": 0.6,
237
+ "terminalCursor.background": 0,
238
+ "terminalCursor.foreground": 0.7019607843137254,
239
+ "textLink.activeForeground": 1,
240
+ "textLink.foreground": 1,
241
+ "textPreformat.foreground": 0.5686274509803921,
242
+ "titleBar.activeBackground": 0,
243
+ "titleBar.activeForeground": 0.5686274509803921,
244
+ "titleBar.border": 0.0392156862745098,
245
+ "titleBar.inactiveBackground": 0,
246
+ "tree.indentGuidesStroke": 0.0784313725490196,
247
+ "window.activeBorder": 0.0392156862745098,
248
+ },
249
+ tokenColors: [
250
+ {
251
+ scope: "variable.parameter.function",
252
+ settings: {
253
+ foreground: 0.7019607843137254,
254
+ },
255
+ },
256
+ {
257
+ scope: "comment, punctuation.definition.comment",
258
+ settings: {
259
+ foreground: 0.1803921568627451,
260
+ },
261
+ },
262
+ {
263
+ scope: "punctuation.definition.string, punctuation.definition.variable, punctuation.definition.parameters, punctuation.definition.array",
264
+ settings: {
265
+ foreground: 0.7019607843137254,
266
+ },
267
+ },
268
+ {
269
+ scope: "none",
270
+ settings: {
271
+ foreground: 0.7019607843137254,
272
+ },
273
+ },
274
+ {
275
+ scope: "keyword.operator",
276
+ settings: {
277
+ foreground: 0.7019607843137254,
278
+ },
279
+ },
280
+ {
281
+ scope: "keyword",
282
+ settings: {
283
+ foreground: 0.4196078431372549,
284
+ },
285
+ },
286
+ {
287
+ scope: "variable",
288
+ settings: {
289
+ foreground: 0.4392156862745098,
290
+ },
291
+ },
292
+ {
293
+ scope: "entity.name.function, meta.require, support.function.any-method",
294
+ settings: {
295
+ foreground: 0.3764705882352941,
296
+ },
297
+ },
298
+ {
299
+ scope: "support.class, entity.name.class, entity.name.type.class",
300
+ settings: {
301
+ foreground: 0.6,
302
+ },
303
+ },
304
+ {
305
+ scope: "meta.class",
306
+ settings: {
307
+ foreground: 0.9607843137254902,
308
+ },
309
+ },
310
+ {
311
+ scope: "keyword.other.special-method",
312
+ settings: {
313
+ foreground: 0.3764705882352941,
314
+ },
315
+ },
316
+ {
317
+ scope: "storage",
318
+ settings: {
319
+ foreground: 0.4196078431372549,
320
+ },
321
+ },
322
+ {
323
+ scope: "support.function",
324
+ settings: {
325
+ foreground: 0.5019607843137255,
326
+ },
327
+ },
328
+ {
329
+ scope: "string, constant.other.symbol, entity.other.inherited-class",
330
+ settings: {
331
+ foreground: 0.5411764705882353,
332
+ },
333
+ },
334
+ {
335
+ scope: "constant.numeric",
336
+ settings: {
337
+ foreground: 0.5686274509803921,
338
+ },
339
+ },
340
+ {
341
+ scope: "none",
342
+ settings: {
343
+ foreground: 0.5686274509803921,
344
+ },
345
+ },
346
+ {
347
+ scope: "none",
348
+ settings: {
349
+ foreground: 0.5686274509803921,
350
+ },
351
+ },
352
+ {
353
+ scope: "constant",
354
+ settings: {
355
+ foreground: 0.5686274509803921,
356
+ },
357
+ },
358
+ {
359
+ scope: "entity.name.tag",
360
+ settings: {
361
+ foreground: 0.4392156862745098,
362
+ },
363
+ },
364
+ {
365
+ scope: "entity.other.attribute-name",
366
+ settings: {
367
+ foreground: 0.5686274509803921,
368
+ },
369
+ },
370
+ {
371
+ scope: "entity.other.attribute-name.id, punctuation.definition.entity",
372
+ settings: {
373
+ foreground: 0.3764705882352941,
374
+ },
375
+ },
376
+ {
377
+ scope: "meta.selector",
378
+ settings: {
379
+ foreground: 0.4196078431372549,
380
+ },
381
+ },
382
+ {
383
+ scope: "none",
384
+ settings: {
385
+ foreground: 0.5686274509803921,
386
+ },
387
+ },
388
+ {
389
+ scope: "markup.heading punctuation.definition.heading, entity.name.section",
390
+ settings: {
391
+ foreground: 0.3764705882352941,
392
+ fontStyle: "",
393
+ },
394
+ },
395
+ {
396
+ scope: "keyword.other.unit",
397
+ settings: {
398
+ foreground: 0.5686274509803921,
399
+ },
400
+ },
401
+ {
402
+ scope: "markup.bold, punctuation.definition.bold",
403
+ settings: {
404
+ foreground: 0.6,
405
+ fontStyle: "bold",
406
+ },
407
+ },
408
+ {
409
+ scope: "markup.italic, punctuation.definition.italic",
410
+ settings: {
411
+ foreground: 0.4196078431372549,
412
+ fontStyle: "italic",
413
+ },
414
+ },
415
+ {
416
+ scope: "markup.raw.inline",
417
+ settings: {
418
+ foreground: 0.5411764705882353,
419
+ },
420
+ },
421
+ {
422
+ scope: "string.other.link, punctuation.definition.string.end.markdown",
423
+ settings: {
424
+ foreground: 0.4392156862745098,
425
+ },
426
+ },
427
+ {
428
+ scope: "meta.link",
429
+ settings: {
430
+ foreground: 0.5686274509803921,
431
+ },
432
+ },
433
+ {
434
+ scope: "markup.list",
435
+ settings: {
436
+ foreground: 0.4392156862745098,
437
+ },
438
+ },
439
+ {
440
+ scope: "markup.quote",
441
+ settings: {
442
+ foreground: 0.5686274509803921,
443
+ },
444
+ },
445
+ {
446
+ scope: "meta.separator",
447
+ settings: {
448
+ foreground: 0.7019607843137254,
449
+ },
450
+ },
451
+ {
452
+ scope: "markup.inserted",
453
+ settings: {
454
+ foreground: 0.5411764705882353,
455
+ },
456
+ },
457
+ {
458
+ scope: "markup.deleted",
459
+ settings: {
460
+ foreground: 0.4392156862745098,
461
+ },
462
+ },
463
+ {
464
+ scope: "markup.changed",
465
+ settings: {
466
+ foreground: 0.4196078431372549,
467
+ },
468
+ },
469
+ {
470
+ scope: "constant.other.color",
471
+ settings: {
472
+ foreground: 0.5019607843137255,
473
+ },
474
+ },
475
+ {
476
+ scope: "string.regexp",
477
+ settings: {
478
+ foreground: 0.5019607843137255,
479
+ },
480
+ },
481
+ {
482
+ scope: "constant.character.escape",
483
+ settings: {
484
+ foreground: 0.5019607843137255,
485
+ },
486
+ },
487
+ {
488
+ scope: "punctuation.section.embedded, variable.interpolation",
489
+ settings: {
490
+ foreground: 0.4196078431372549,
491
+ },
492
+ },
493
+ {
494
+ scope: "invalid.illegal",
495
+ settings: {
496
+ foreground: 0.9607843137254902,
497
+ },
498
+ },
499
+ {
500
+ scope: "invalid.broken",
501
+ settings: {
502
+ foreground: 0,
503
+ },
504
+ },
505
+ {
506
+ scope: "invalid.deprecated",
507
+ settings: {
508
+ foreground: 0.9607843137254902,
509
+ },
510
+ },
511
+ {
512
+ scope: "invalid.unimplemented",
513
+ settings: {
514
+ foreground: 0.9607843137254902,
515
+ },
516
+ },
517
+ ],
518
+ };
519
+ }
520
+ function deepTransform(obj, test, transform) {
521
+ for (const key in obj) {
522
+ if (obj[key] !== null && typeof obj[key] === "object") {
523
+ obj[key] = deepTransform(obj[key], test, transform);
524
+ continue;
525
+ }
526
+ if (!test(key, obj[key]))
527
+ continue;
528
+ obj[key] = transform(key, obj[key]) || obj[key];
529
+ }
530
+ return obj;
531
+ }
532
+ function createMonochromeTheme(options) {
533
+ const { name, background, foreground, amplifier = 1, override } = options;
534
+ const draft = {
535
+ background,
536
+ foreground,
537
+ ...base(),
538
+ };
539
+ const errorColor = warningColor(foreground, "#ff0000", 0.75);
540
+ const warningColorVal = warningColor(foreground, "#ffa500", 0.75);
541
+ if (!draft.colors)
542
+ draft.colors = {};
543
+ draft.colors["listFilterWidget.noMatchesOutline"] = errorColor;
544
+ draft.colors["list.errorForeground"] = errorColor;
545
+ draft.colors["list.warningForeground"] = warningColorVal;
546
+ if (override) {
547
+ if (override.colors) {
548
+ Object.assign(draft.colors, override.colors);
549
+ }
550
+ if (override.tokenColors) {
551
+ draft.tokenColors = [...draft.tokenColors, ...override.tokenColors];
552
+ }
553
+ }
554
+ if (amplifier !== 1) {
555
+ deepTransform(draft, (_, v) => typeof v === "number", (_, v) => Math.min(Math.max(0, v * amplifier), 1));
556
+ }
557
+ deepTransform(draft, (_, v) => typeof v === "number", (key, value) => {
558
+ const isException = exceptions.includes(key);
559
+ return isException ? alpha(foreground, value) : blend(background, foreground, value);
560
+ });
561
+ const themeType = luminance(background) > 0.5 ? "light" : "dark";
562
+ return {
563
+ name,
564
+ type: themeType,
565
+ colors: draft.colors,
566
+ tokenColors: draft.tokenColors,
567
+ };
568
+ }
569
+ export function generateMonochromeThemes() {
570
+ return [
571
+ createMonochromeTheme({
572
+ name: "monochrome-dark",
573
+ background: "#101010",
574
+ foreground: "#EBEBEB",
575
+ }),
576
+ createMonochromeTheme({
577
+ name: "monochrome-light",
578
+ background: "#EBEBEB",
579
+ foreground: "#101010",
580
+ }),
581
+ createMonochromeTheme({
582
+ name: "monochrome-dark-subtle",
583
+ background: "#0A1219",
584
+ foreground: "#F1F5F9",
585
+ }),
586
+ createMonochromeTheme({
587
+ name: "monochrome-light-subtle",
588
+ background: "#F1F5F9",
589
+ foreground: "#0A1219",
590
+ }),
591
+ createMonochromeTheme({
592
+ name: "monochrome-dark-amplified",
593
+ background: "#000000",
594
+ foreground: "#FFFFFF",
595
+ }),
596
+ createMonochromeTheme({
597
+ name: "monochrome-light-amplified",
598
+ background: "#FFFFFF",
599
+ foreground: "#000000",
600
+ }),
601
+ createMonochromeTheme({
602
+ name: "monochrome-dark-cool-gray",
603
+ background: "#111827",
604
+ foreground: "#F9FAFB",
605
+ }),
606
+ createMonochromeTheme({
607
+ name: "monochrome-light-cool-gray",
608
+ background: "#F9FAFB",
609
+ foreground: "#111827",
610
+ }),
611
+ ];
612
+ }
613
+ export { createMonochromeTheme };
@@ -0,0 +1,22 @@
1
+ type VSCodeTheme = {
2
+ name: string;
3
+ type: "light" | "dark";
4
+ colors: Record<string, string>;
5
+ tokenColors: Array<{
6
+ scope: string | string[];
7
+ settings: {
8
+ foreground?: string;
9
+ fontStyle?: string;
10
+ };
11
+ }>;
12
+ };
13
+ declare function createMonotoneTheme(options: {
14
+ name: string;
15
+ hue: number;
16
+ isDark?: boolean;
17
+ saturation?: number;
18
+ lightnessAdjust?: number;
19
+ }): VSCodeTheme;
20
+ export declare function generateMonotoneThemes(): VSCodeTheme[];
21
+ export { createMonotoneTheme };
22
+ //# sourceMappingURL=monotone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monotone.d.ts","sourceRoot":"","sources":["../src/monotone.ts"],"names":[],"mappings":"AAIA,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,WAAW,EAAE,KAAK,CAAC;QACjB,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QACzB,QAAQ,EAAE;YACR,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB,CAAC;KACH,CAAC,CAAC;CACJ,CAAC;AA6CF,iBAAS,mBAAmB,CAAC,OAAO,EAAE;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,WAAW,CAqId;AAED,wBAAgB,sBAAsB,kBAerC;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}