import.rs

  1use crate::ThemeColorsRefinement;
  2
  3struct ImportedThemeFamily {
  4    pub id: String,
  5    pub name: String,
  6    pub author: String,
  7    pub url: String,
  8    pub license: String,
  9    pub themes: Vec<ImportedThemeVariant>,
 10}
 11
 12#[derive(Debug)]
 13pub struct VSCodeColors {
 14    terminal_background: String,
 15    terminal_foreground: String,
 16    terminal_ansi_bright_black: String,
 17    terminal_ansi_bright_red: String,
 18    terminal_ansi_bright_green: String,
 19    terminal_ansi_bright_yellow: String,
 20    terminal_ansi_bright_blue: String,
 21    terminal_ansi_bright_magenta: String,
 22    terminal_ansi_bright_cyan: String,
 23    terminal_ansi_bright_white: String,
 24    terminal_ansi_black: String,
 25    terminal_ansi_red: String,
 26    terminal_ansi_green: String,
 27    terminal_ansi_yellow: String,
 28    terminal_ansi_blue: String,
 29    terminal_ansi_magenta: String,
 30    terminal_ansi_cyan: String,
 31    terminal_ansi_white: String,
 32    focus_border: String,
 33    foreground: String,
 34    selection_background: String,
 35    error_foreground: String,
 36    button_background: String,
 37    button_foreground: String,
 38    button_secondary_background: String,
 39    button_secondary_foreground: String,
 40    button_secondary_hover_background: String,
 41    dropdown_background: String,
 42    dropdown_border: String,
 43    dropdown_foreground: String,
 44    input_background: String,
 45    input_foreground: String,
 46    input_border: String,
 47    input_placeholder_foreground: String,
 48    input_option_active_border: String,
 49    input_validation_info_border: String,
 50    input_validation_warning_border: String,
 51    input_validation_error_border: String,
 52    badge_foreground: String,
 53    badge_background: String,
 54    progress_bar_background: String,
 55    list_active_selection_background: String,
 56    list_active_selection_foreground: String,
 57    list_drop_background: String,
 58    list_focus_background: String,
 59    list_highlight_foreground: String,
 60    list_hover_background: String,
 61    list_inactive_selection_background: String,
 62    list_warning_foreground: String,
 63    list_error_foreground: String,
 64    activity_bar_background: String,
 65    activity_bar_inactive_foreground: String,
 66    activity_bar_foreground: String,
 67    activity_bar_active_border: String,
 68    activity_bar_active_background: String,
 69    activity_bar_badge_background: String,
 70    activity_bar_badge_foreground: String,
 71    side_bar_background: String,
 72    side_bar_title_foreground: String,
 73    side_bar_section_header_background: String,
 74    side_bar_section_header_border: String,
 75    editor_group_border: String,
 76    editor_group_drop_background: String,
 77    editor_group_header_tabs_background: String,
 78    tab_active_background: String,
 79    tab_active_foreground: String,
 80    tab_border: String,
 81    tab_active_border_top: String,
 82    tab_inactive_background: String,
 83    tab_inactive_foreground: String,
 84    editor_foreground: String,
 85    editor_background: String,
 86    editor_line_number_foreground: String,
 87    editor_selection_background: String,
 88    editor_selection_highlight_background: String,
 89    editor_fold_background: String,
 90    editor_word_highlight_background: String,
 91    editor_word_highlight_strong_background: String,
 92    editor_find_match_background: String,
 93    editor_find_match_highlight_background: String,
 94    editor_find_range_highlight_background: String,
 95    editor_hover_highlight_background: String,
 96    editor_line_highlight_border: String,
 97    editor_link_active_foreground: String,
 98    editor_range_highlight_background: String,
 99    editor_snippet_tabstop_highlight_background: String,
100    editor_snippet_tabstop_highlight_border: String,
101    editor_snippet_final_tabstop_highlight_background: String,
102    editor_snippet_final_tabstop_highlight_border: String,
103    editor_whitespace_foreground: String,
104    editor_indent_guide_background: String,
105    editor_indent_guide_active_background: String,
106    editor_ruler_foreground: String,
107    editor_code_lens_foreground: String,
108    editor_bracket_highlight_foreground1: String,
109    editor_bracket_highlight_foreground2: String,
110    editor_bracket_highlight_foreground3: String,
111    editor_bracket_highlight_foreground4: String,
112    editor_bracket_highlight_foreground5: String,
113    editor_bracket_highlight_foreground6: String,
114    editor_bracket_highlight_unexpected_bracket_foreground: String,
115    editor_overview_ruler_border: String,
116    editor_overview_ruler_selection_highlight_foreground: String,
117    editor_overview_ruler_word_highlight_foreground: String,
118    editor_overview_ruler_word_highlight_strong_foreground: String,
119    editor_overview_ruler_modified_foreground: String,
120    editor_overview_ruler_added_foreground: String,
121    editor_overview_ruler_deleted_foreground: String,
122    editor_overview_ruler_error_foreground: String,
123    editor_overview_ruler_warning_foreground: String,
124    editor_overview_ruler_info_foreground: String,
125    editor_error_foreground: String,
126    editor_warning_foreground: String,
127    editor_gutter_modified_background: String,
128    editor_gutter_added_background: String,
129    editor_gutter_deleted_background: String,
130    git_decoration_modified_resource_foreground: String,
131    git_decoration_deleted_resource_foreground: String,
132    git_decoration_untracked_resource_foreground: String,
133    git_decoration_ignored_resource_foreground: String,
134    git_decoration_conflicting_resource_foreground: String,
135    diff_editor_inserted_text_background: String,
136    diff_editor_removed_text_background: String,
137    inline_chat_region_highlight: String,
138    editor_widget_background: String,
139    editor_suggest_widget_background: String,
140    editor_suggest_widget_foreground: String,
141    editor_suggest_widget_selected_background: String,
142    editor_hover_widget_background: String,
143    editor_hover_widget_border: String,
144    editor_marker_navigation_background: String,
145    peek_view_border: String,
146    peek_view_editor_background: String,
147    peek_view_editor_match_highlight_background: String,
148    peek_view_result_background: String,
149    peek_view_result_file_foreground: String,
150    peek_view_result_line_foreground: String,
151    peek_view_result_match_highlight_background: String,
152    peek_view_result_selection_background: String,
153    peek_view_result_selection_foreground: String,
154    peek_view_title_background: String,
155    peek_view_title_description_foreground: String,
156    peek_view_title_label_foreground: String,
157    merge_current_header_background: String,
158    merge_incoming_header_background: String,
159    editor_overview_ruler_current_content_foreground: String,
160    editor_overview_ruler_incoming_content_foreground: String,
161    panel_background: String,
162    panel_border: String,
163    panel_title_active_border: String,
164    panel_title_active_foreground: String,
165    panel_title_inactive_foreground: String,
166    status_bar_background: String,
167    status_bar_foreground: String,
168    status_bar_debugging_background: String,
169    status_bar_debugging_foreground: String,
170    status_bar_no_folder_background: String,
171    status_bar_no_folder_foreground: String,
172    status_bar_item_prominent_background: String,
173    status_bar_item_prominent_hover_background: String,
174    status_bar_item_remote_foreground: String,
175    status_bar_item_remote_background: String,
176    title_bar_active_background: String,
177    title_bar_active_foreground: String,
178    title_bar_inactive_background: String,
179    title_bar_inactive_foreground: String,
180    extension_button_prominent_foreground: String,
181    extension_button_prominent_background: String,
182    extension_button_prominent_hover_background: String,
183    picker_group_border: String,
184    picker_group_foreground: String,
185    debug_tool_bar_background: String,
186    walk_through_embedded_editor_background: String,
187    settings_header_foreground: String,
188    settings_modified_item_indicator: String,
189    settings_dropdown_background: String,
190    settings_dropdown_foreground: String,
191    settings_dropdown_border: String,
192    settings_checkbox_background: String,
193    settings_checkbox_foreground: String,
194    settings_checkbox_border: String,
195    settings_text_input_background: String,
196    settings_text_input_foreground: String,
197    settings_text_input_border: String,
198    settings_number_input_background: String,
199    settings_number_input_foreground: String,
200    settings_number_input_border: String,
201    breadcrumb_foreground: String,
202    breadcrumb_background: String,
203    breadcrumb_focus_foreground: String,
204    breadcrumb_active_selection_foreground: String,
205    breadcrumb_picker_background: String,
206    list_filter_widget_background: String,
207    list_filter_widget_outline: String,
208    list_filter_widget_no_matches_outline: String,
209}
210
211pub fn try_vscode_colors_to_theme_colors(colors: VSCodeColors) -> ThemeColorsRefinement {
212    let mut theme_colors = ThemeColorsRefinement::default();
213
214    theme_colors
215}
216
217pub fn vscode_colors_to_theme_colors(color: String) -> ThemeColorsRefinement {
218    ThemeColorsRefinement {
219        text: Some(color),
220        ..Default::default()
221    }
222}