From d1361f7dfcd87d2adec4bff0a06caca9ac74ba2f Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Sat, 16 Jul 2022 11:39:45 -0400 Subject: [PATCH 01/22] Add new icons We will need to do an assets clean up soon, we are currently shipping assets we are not using in the app. --- assets/icons/Icon12CircleXMark.svg | 3 +++ assets/icons/Icon12FolderTree.svg | 3 +++ assets/icons/Icon16ArrowLeft.svg | 3 +++ assets/icons/Icon16ArrowRight.svg | 3 +++ assets/icons/Icon16CircleCheck.svg | 3 +++ assets/icons/Icon16CircleInfo.svg | 3 +++ assets/icons/Icon16CircleXMark.svg | 3 +++ assets/icons/Icon16FolderTree.svg | 3 +++ assets/icons/Icon16MagnifyingGlass.svg | 3 +++ assets/icons/Icon16TriangleExclamation.svg | 3 +++ assets/icons/Icon16UserGroup.svg | 3 +++ assets/icons/split.svg | 6 ++++-- 12 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 assets/icons/Icon12CircleXMark.svg create mode 100644 assets/icons/Icon12FolderTree.svg create mode 100644 assets/icons/Icon16ArrowLeft.svg create mode 100644 assets/icons/Icon16ArrowRight.svg create mode 100644 assets/icons/Icon16CircleCheck.svg create mode 100644 assets/icons/Icon16CircleInfo.svg create mode 100644 assets/icons/Icon16CircleXMark.svg create mode 100644 assets/icons/Icon16FolderTree.svg create mode 100644 assets/icons/Icon16MagnifyingGlass.svg create mode 100644 assets/icons/Icon16TriangleExclamation.svg create mode 100644 assets/icons/Icon16UserGroup.svg diff --git a/assets/icons/Icon12CircleXMark.svg b/assets/icons/Icon12CircleXMark.svg new file mode 100644 index 0000000000..cf4f783aa0 --- /dev/null +++ b/assets/icons/Icon12CircleXMark.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/Icon12FolderTree.svg b/assets/icons/Icon12FolderTree.svg new file mode 100644 index 0000000000..411b98d5b8 --- /dev/null +++ b/assets/icons/Icon12FolderTree.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/Icon16ArrowLeft.svg b/assets/icons/Icon16ArrowLeft.svg new file mode 100644 index 0000000000..905d643f1b --- /dev/null +++ b/assets/icons/Icon16ArrowLeft.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/Icon16ArrowRight.svg b/assets/icons/Icon16ArrowRight.svg new file mode 100644 index 0000000000..24cd660ab2 --- /dev/null +++ b/assets/icons/Icon16ArrowRight.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/Icon16CircleCheck.svg b/assets/icons/Icon16CircleCheck.svg new file mode 100644 index 0000000000..0b01e957c5 --- /dev/null +++ b/assets/icons/Icon16CircleCheck.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/Icon16CircleInfo.svg b/assets/icons/Icon16CircleInfo.svg new file mode 100644 index 0000000000..e7058a0645 --- /dev/null +++ b/assets/icons/Icon16CircleInfo.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/Icon16CircleXMark.svg b/assets/icons/Icon16CircleXMark.svg new file mode 100644 index 0000000000..f9e82dd4b0 --- /dev/null +++ b/assets/icons/Icon16CircleXMark.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/Icon16FolderTree.svg b/assets/icons/Icon16FolderTree.svg new file mode 100644 index 0000000000..425bfa6c43 --- /dev/null +++ b/assets/icons/Icon16FolderTree.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/Icon16MagnifyingGlass.svg b/assets/icons/Icon16MagnifyingGlass.svg new file mode 100644 index 0000000000..0f82f266ff --- /dev/null +++ b/assets/icons/Icon16MagnifyingGlass.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/Icon16TriangleExclamation.svg b/assets/icons/Icon16TriangleExclamation.svg new file mode 100644 index 0000000000..86a41d8160 --- /dev/null +++ b/assets/icons/Icon16TriangleExclamation.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/Icon16UserGroup.svg b/assets/icons/Icon16UserGroup.svg new file mode 100644 index 0000000000..4f72d4b6b4 --- /dev/null +++ b/assets/icons/Icon16UserGroup.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/split.svg b/assets/icons/split.svg index 298de95092..9e7d3607eb 100644 --- a/assets/icons/split.svg +++ b/assets/icons/split.svg @@ -1,3 +1,5 @@ - - + + + + From 4ca44493946bc174d99b242632d9c0e1a6fd1a45 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Sat, 16 Jul 2022 11:51:10 -0400 Subject: [PATCH 02/22] Update icons in rust Updated icons - Diagnostic states - Sidebar icons (project, contacts) - Navigation arrows --- crates/diagnostics/src/items.rs | 6 +++--- crates/workspace/src/toolbar.rs | 4 ++-- crates/zed/src/zed.rs | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/diagnostics/src/items.rs b/crates/diagnostics/src/items.rs index e2961ff3bd..498ea6616c 100644 --- a/crates/diagnostics/src/items.rs +++ b/crates/diagnostics/src/items.rs @@ -101,7 +101,7 @@ impl View for DiagnosticIndicator { let mut summary_row = Flex::row(); if self.summary.error_count > 0 { summary_row.add_children([ - Svg::new("icons/error-solid-14.svg") + Svg::new("icons/Icon16CircleXMark.svg") .with_color(style.icon_color_error) .constrained() .with_width(style.icon_width) @@ -117,7 +117,7 @@ impl View for DiagnosticIndicator { if self.summary.warning_count > 0 { summary_row.add_children([ - Svg::new("icons/warning-solid-14.svg") + Svg::new("icons/Icon16TriangleExclamation.svg") .with_color(style.icon_color_warning) .constrained() .with_width(style.icon_width) @@ -138,7 +138,7 @@ impl View for DiagnosticIndicator { if self.summary.error_count == 0 && self.summary.warning_count == 0 { summary_row.add_child( - Svg::new("icons/no-error-solid-14.svg") + Svg::new("icons/Icon16CircleCheck.svg") .with_color(style.icon_color_ok) .constrained() .with_width(style.icon_width) diff --git a/crates/workspace/src/toolbar.rs b/crates/workspace/src/toolbar.rs index 636df9a039..de4a0083ac 100644 --- a/crates/workspace/src/toolbar.rs +++ b/crates/workspace/src/toolbar.rs @@ -118,7 +118,7 @@ impl View for Toolbar { .with_child( Flex::row() .with_child(nav_button( - "icons/arrow-left.svg", + "icons/Icon16ArrowLeft.svg", button_style, tooltip_style.clone(), enable_go_backward, @@ -131,7 +131,7 @@ impl View for Toolbar { cx, )) .with_child(nav_button( - "icons/arrow-right.svg", + "icons/Icon16ArrowRight.svg", button_style, tooltip_style.clone(), enable_go_forward, diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index d27a5b7c5b..e3304fe6e9 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -244,7 +244,7 @@ pub fn initialize_workspace( workspace.left_sidebar().update(cx, |sidebar, cx| { sidebar.add_item( - "icons/folder-tree-solid-14.svg", + "icons/Icon16FolderTree.svg", "Project Panel".to_string(), project_panel.into(), cx, @@ -252,7 +252,7 @@ pub fn initialize_workspace( }); workspace.right_sidebar().update(cx, |sidebar, cx| { sidebar.add_item( - "icons/contacts-solid-14.svg", + "icons/Icon16UserGroup.svg", "Contacts Panel".to_string(), contact_panel.into(), cx, From 145d59d47a8955181c8e0e6130064274433774b8 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Sat, 16 Jul 2022 11:51:59 -0400 Subject: [PATCH 03/22] Remove unneeded/state generated tokens These will be located in a different repo going forwards since they are primarily for figma. --- styles/dist/cave-dark.json | 519 ---- styles/dist/cave-light.json | 519 ---- styles/dist/core.json | 1181 -------- styles/dist/solarized-dark.json | 519 ---- styles/dist/solarized-light.json | 519 ---- styles/dist/sulphurpool-dark.json | 519 ---- styles/dist/sulphurpool-light.json | 519 ---- styles/dist/tokens.json | 4297 ---------------------------- 8 files changed, 8592 deletions(-) delete mode 100644 styles/dist/cave-dark.json delete mode 100644 styles/dist/cave-light.json delete mode 100644 styles/dist/core.json delete mode 100644 styles/dist/solarized-dark.json delete mode 100644 styles/dist/solarized-light.json delete mode 100644 styles/dist/sulphurpool-dark.json delete mode 100644 styles/dist/sulphurpool-light.json delete mode 100644 styles/dist/tokens.json diff --git a/styles/dist/cave-dark.json b/styles/dist/cave-dark.json deleted file mode 100644 index 21daaf9731..0000000000 --- a/styles/dist/cave-dark.json +++ /dev/null @@ -1,519 +0,0 @@ -{ - "meta": { - "themeName": "cave-dark" - }, - "text": { - "primary": { - "value": "#e2dfe7", - "type": "color" - }, - "secondary": { - "value": "#8b8792", - "type": "color" - }, - "muted": { - "value": "#8b8792", - "type": "color" - }, - "placeholder": { - "value": "#7e7887", - "type": "color" - }, - "active": { - "value": "#efecf4", - "type": "color" - }, - "feature": { - "value": "#576ddb", - "type": "color" - }, - "ok": { - "value": "#2a9292", - "type": "color" - }, - "error": { - "value": "#be4678", - "type": "color" - }, - "warning": { - "value": "#a06e3b", - "type": "color" - }, - "info": { - "value": "#576ddb", - "type": "color" - } - }, - "icon": { - "primary": { - "value": "#e2dfe7", - "type": "color" - }, - "secondary": { - "value": "#8b8792", - "type": "color" - }, - "muted": { - "value": "#8b8792", - "type": "color" - }, - "placeholder": { - "value": "#7e7887", - "type": "color" - }, - "active": { - "value": "#efecf4", - "type": "color" - }, - "feature": { - "value": "#576ddb", - "type": "color" - }, - "ok": { - "value": "#2a9292", - "type": "color" - }, - "error": { - "value": "#be4678", - "type": "color" - }, - "warning": { - "value": "#a06e3b", - "type": "color" - }, - "info": { - "value": "#576ddb", - "type": "color" - } - }, - "background": { - "100": { - "base": { - "value": "#332f38", - "type": "color" - }, - "hovered": { - "value": "#3f3b45", - "type": "color" - }, - "active": { - "value": "#4c4653", - "type": "color" - } - }, - "300": { - "base": { - "value": "#26232a", - "type": "color" - }, - "hovered": { - "value": "#332f38", - "type": "color" - }, - "active": { - "value": "#3f3b45", - "type": "color" - } - }, - "500": { - "base": { - "value": "#19171c", - "type": "color" - }, - "hovered": { - "value": "#1c1a20", - "type": "color" - }, - "active": { - "value": "#201d23", - "type": "color" - } - }, - "on300": { - "base": { - "value": "#19171c", - "type": "color" - }, - "hovered": { - "value": "#1c1a20", - "type": "color" - }, - "active": { - "value": "#201d23", - "type": "color" - } - }, - "on500": { - "base": { - "value": "#332f38", - "type": "color" - }, - "hovered": { - "value": "#3f3b45", - "type": "color" - }, - "active": { - "value": "#4c4653", - "type": "color" - } - }, - "ok": { - "base": { - "value": "#2a929226", - "type": "color" - }, - "hovered": { - "value": "#2a929233", - "type": "color" - }, - "active": { - "value": "#2a929240", - "type": "color" - } - }, - "error": { - "base": { - "value": "#be467826", - "type": "color" - }, - "hovered": { - "value": "#be467833", - "type": "color" - }, - "active": { - "value": "#be467840", - "type": "color" - } - }, - "warning": { - "base": { - "value": "#a06e3b26", - "type": "color" - }, - "hovered": { - "value": "#a06e3b33", - "type": "color" - }, - "active": { - "value": "#a06e3b40", - "type": "color" - } - }, - "info": { - "base": { - "value": "#576ddb26", - "type": "color" - }, - "hovered": { - "value": "#576ddb33", - "type": "color" - }, - "active": { - "value": "#576ddb40", - "type": "color" - } - } - }, - "border": { - "primary": { - "value": "#19171c", - "type": "color" - }, - "secondary": { - "value": "#26232a", - "type": "color" - }, - "muted": { - "value": "#655f6d", - "type": "color" - }, - "active": { - "value": "#655f6d", - "type": "color" - }, - "onMedia": { - "value": "#19171c1a", - "type": "color" - }, - "ok": { - "value": "#2a929226", - "type": "color" - }, - "error": { - "value": "#be467826", - "type": "color" - }, - "warning": { - "value": "#a06e3b26", - "type": "color" - }, - "info": { - "value": "#576ddb26", - "type": "color" - } - }, - "editor": { - "background": { - "value": "#19171c", - "type": "color" - }, - "indent_guide": { - "value": "#655f6d", - "type": "color" - }, - "indent_guide_active": { - "value": "#26232a", - "type": "color" - }, - "line": { - "active": { - "value": "#26232a", - "type": "color" - }, - "highlighted": { - "value": "#332f38", - "type": "color" - } - }, - "highlight": { - "selection": { - "value": "#576ddb3d", - "type": "color" - }, - "occurrence": { - "value": "#5852603d", - "type": "color" - }, - "activeOccurrence": { - "value": "#5852607a", - "type": "color" - }, - "matchingBracket": { - "value": "#201d23", - "type": "color" - }, - "match": { - "value": "#3d1576", - "type": "color" - }, - "activeMatch": { - "value": "#782edf7a", - "type": "color" - }, - "related": { - "value": "#1c1a20", - "type": "color" - } - }, - "gutter": { - "primary": { - "value": "#7e7887", - "type": "color" - }, - "active": { - "value": "#efecf4", - "type": "color" - } - } - }, - "syntax": { - "primary": { - "value": "#efecf4", - "type": "color" - }, - "comment": { - "value": "#8b8792", - "type": "color" - }, - "keyword": { - "value": "#576ddb", - "type": "color" - }, - "function": { - "value": "#a06e3b", - "type": "color" - }, - "type": { - "value": "#398bc6", - "type": "color" - }, - "variant": { - "value": "#576ddb", - "type": "color" - }, - "property": { - "value": "#576ddb", - "type": "color" - }, - "enum": { - "value": "#aa573c", - "type": "color" - }, - "operator": { - "value": "#aa573c", - "type": "color" - }, - "string": { - "value": "#aa573c", - "type": "color" - }, - "number": { - "value": "#2a9292", - "type": "color" - }, - "boolean": { - "value": "#2a9292", - "type": "color" - } - }, - "player": { - "1": { - "baseColor": { - "value": "#576ddb", - "type": "color" - }, - "cursorColor": { - "value": "#576ddb", - "type": "color" - }, - "selectionColor": { - "value": "#576ddb3d", - "type": "color" - }, - "borderColor": { - "value": "#576ddbcc", - "type": "color" - } - }, - "2": { - "baseColor": { - "value": "#2a9292", - "type": "color" - }, - "cursorColor": { - "value": "#2a9292", - "type": "color" - }, - "selectionColor": { - "value": "#2a92923d", - "type": "color" - }, - "borderColor": { - "value": "#2a9292cc", - "type": "color" - } - }, - "3": { - "baseColor": { - "value": "#bf40bf", - "type": "color" - }, - "cursorColor": { - "value": "#bf40bf", - "type": "color" - }, - "selectionColor": { - "value": "#bf40bf3d", - "type": "color" - }, - "borderColor": { - "value": "#bf40bfcc", - "type": "color" - } - }, - "4": { - "baseColor": { - "value": "#aa573c", - "type": "color" - }, - "cursorColor": { - "value": "#aa573c", - "type": "color" - }, - "selectionColor": { - "value": "#aa573c3d", - "type": "color" - }, - "borderColor": { - "value": "#aa573ccc", - "type": "color" - } - }, - "5": { - "baseColor": { - "value": "#955ae7", - "type": "color" - }, - "cursorColor": { - "value": "#955ae7", - "type": "color" - }, - "selectionColor": { - "value": "#955ae73d", - "type": "color" - }, - "borderColor": { - "value": "#955ae7cc", - "type": "color" - } - }, - "6": { - "baseColor": { - "value": "#398bc6", - "type": "color" - }, - "cursorColor": { - "value": "#398bc6", - "type": "color" - }, - "selectionColor": { - "value": "#398bc63d", - "type": "color" - }, - "borderColor": { - "value": "#398bc6cc", - "type": "color" - } - }, - "7": { - "baseColor": { - "value": "#be4678", - "type": "color" - }, - "cursorColor": { - "value": "#be4678", - "type": "color" - }, - "selectionColor": { - "value": "#be46783d", - "type": "color" - }, - "borderColor": { - "value": "#be4678cc", - "type": "color" - } - }, - "8": { - "baseColor": { - "value": "#a06e3b", - "type": "color" - }, - "cursorColor": { - "value": "#a06e3b", - "type": "color" - }, - "selectionColor": { - "value": "#a06e3b3d", - "type": "color" - }, - "borderColor": { - "value": "#a06e3bcc", - "type": "color" - } - } - }, - "shadowAlpha": { - "value": 0.24, - "type": "number" - } -} \ No newline at end of file diff --git a/styles/dist/cave-light.json b/styles/dist/cave-light.json deleted file mode 100644 index 93ad50e8da..0000000000 --- a/styles/dist/cave-light.json +++ /dev/null @@ -1,519 +0,0 @@ -{ - "meta": { - "themeName": "cave-light" - }, - "text": { - "primary": { - "value": "#26232a", - "type": "color" - }, - "secondary": { - "value": "#585260", - "type": "color" - }, - "muted": { - "value": "#585260", - "type": "color" - }, - "placeholder": { - "value": "#655f6d", - "type": "color" - }, - "active": { - "value": "#19171c", - "type": "color" - }, - "feature": { - "value": "#576ddb", - "type": "color" - }, - "ok": { - "value": "#2a9292", - "type": "color" - }, - "error": { - "value": "#be4678", - "type": "color" - }, - "warning": { - "value": "#a06e3b", - "type": "color" - }, - "info": { - "value": "#576ddb", - "type": "color" - } - }, - "icon": { - "primary": { - "value": "#26232a", - "type": "color" - }, - "secondary": { - "value": "#585260", - "type": "color" - }, - "muted": { - "value": "#585260", - "type": "color" - }, - "placeholder": { - "value": "#655f6d", - "type": "color" - }, - "active": { - "value": "#19171c", - "type": "color" - }, - "feature": { - "value": "#576ddb", - "type": "color" - }, - "ok": { - "value": "#2a9292", - "type": "color" - }, - "error": { - "value": "#be4678", - "type": "color" - }, - "warning": { - "value": "#a06e3b", - "type": "color" - }, - "info": { - "value": "#576ddb", - "type": "color" - } - }, - "background": { - "100": { - "base": { - "value": "#ccc9d2", - "type": "color" - }, - "hovered": { - "value": "#b7b3bd", - "type": "color" - }, - "active": { - "value": "#a19da7", - "type": "color" - } - }, - "300": { - "base": { - "value": "#e2dfe7", - "type": "color" - }, - "hovered": { - "value": "#ccc9d2", - "type": "color" - }, - "active": { - "value": "#b7b3bd", - "type": "color" - } - }, - "500": { - "base": { - "value": "#efecf4", - "type": "color" - }, - "hovered": { - "value": "#ece9f1", - "type": "color" - }, - "active": { - "value": "#e9e6ee", - "type": "color" - } - }, - "on300": { - "base": { - "value": "#efecf4", - "type": "color" - }, - "hovered": { - "value": "#ece9f1", - "type": "color" - }, - "active": { - "value": "#e9e6ee", - "type": "color" - } - }, - "on500": { - "base": { - "value": "#ccc9d2", - "type": "color" - }, - "hovered": { - "value": "#b7b3bd", - "type": "color" - }, - "active": { - "value": "#a19da7", - "type": "color" - } - }, - "ok": { - "base": { - "value": "#2a929226", - "type": "color" - }, - "hovered": { - "value": "#2a929233", - "type": "color" - }, - "active": { - "value": "#2a929240", - "type": "color" - } - }, - "error": { - "base": { - "value": "#be467826", - "type": "color" - }, - "hovered": { - "value": "#be467833", - "type": "color" - }, - "active": { - "value": "#be467840", - "type": "color" - } - }, - "warning": { - "base": { - "value": "#a06e3b26", - "type": "color" - }, - "hovered": { - "value": "#a06e3b33", - "type": "color" - }, - "active": { - "value": "#a06e3b40", - "type": "color" - } - }, - "info": { - "base": { - "value": "#576ddb26", - "type": "color" - }, - "hovered": { - "value": "#576ddb33", - "type": "color" - }, - "active": { - "value": "#576ddb40", - "type": "color" - } - } - }, - "border": { - "primary": { - "value": "#b7b3bd", - "type": "color" - }, - "secondary": { - "value": "#ccc9d2", - "type": "color" - }, - "muted": { - "value": "#e2dfe7", - "type": "color" - }, - "active": { - "value": "#655f6d", - "type": "color" - }, - "onMedia": { - "value": "#efecf41a", - "type": "color" - }, - "ok": { - "value": "#2a929226", - "type": "color" - }, - "error": { - "value": "#be467826", - "type": "color" - }, - "warning": { - "value": "#a06e3b26", - "type": "color" - }, - "info": { - "value": "#576ddb26", - "type": "color" - } - }, - "editor": { - "background": { - "value": "#efecf4", - "type": "color" - }, - "indent_guide": { - "value": "#e2dfe7", - "type": "color" - }, - "indent_guide_active": { - "value": "#ccc9d2", - "type": "color" - }, - "line": { - "active": { - "value": "#e2dfe7", - "type": "color" - }, - "highlighted": { - "value": "#ccc9d2", - "type": "color" - } - }, - "highlight": { - "selection": { - "value": "#576ddb3d", - "type": "color" - }, - "occurrence": { - "value": "#8b87921f", - "type": "color" - }, - "activeOccurrence": { - "value": "#8b87923d", - "type": "color" - }, - "matchingBracket": { - "value": "#e9e6ee", - "type": "color" - }, - "match": { - "value": "#d5bdfa", - "type": "color" - }, - "activeMatch": { - "value": "#a775ee3d", - "type": "color" - }, - "related": { - "value": "#ece9f1", - "type": "color" - } - }, - "gutter": { - "primary": { - "value": "#655f6d", - "type": "color" - }, - "active": { - "value": "#19171c", - "type": "color" - } - } - }, - "syntax": { - "primary": { - "value": "#19171c", - "type": "color" - }, - "comment": { - "value": "#585260", - "type": "color" - }, - "keyword": { - "value": "#576ddb", - "type": "color" - }, - "function": { - "value": "#a06e3b", - "type": "color" - }, - "type": { - "value": "#398bc6", - "type": "color" - }, - "variant": { - "value": "#576ddb", - "type": "color" - }, - "property": { - "value": "#576ddb", - "type": "color" - }, - "enum": { - "value": "#aa573c", - "type": "color" - }, - "operator": { - "value": "#aa573c", - "type": "color" - }, - "string": { - "value": "#aa573c", - "type": "color" - }, - "number": { - "value": "#2a9292", - "type": "color" - }, - "boolean": { - "value": "#2a9292", - "type": "color" - } - }, - "player": { - "1": { - "baseColor": { - "value": "#576ddb", - "type": "color" - }, - "cursorColor": { - "value": "#576ddb", - "type": "color" - }, - "selectionColor": { - "value": "#576ddb3d", - "type": "color" - }, - "borderColor": { - "value": "#576ddbcc", - "type": "color" - } - }, - "2": { - "baseColor": { - "value": "#2a9292", - "type": "color" - }, - "cursorColor": { - "value": "#2a9292", - "type": "color" - }, - "selectionColor": { - "value": "#2a92923d", - "type": "color" - }, - "borderColor": { - "value": "#2a9292cc", - "type": "color" - } - }, - "3": { - "baseColor": { - "value": "#bf40bf", - "type": "color" - }, - "cursorColor": { - "value": "#bf40bf", - "type": "color" - }, - "selectionColor": { - "value": "#bf40bf3d", - "type": "color" - }, - "borderColor": { - "value": "#bf40bfcc", - "type": "color" - } - }, - "4": { - "baseColor": { - "value": "#aa573c", - "type": "color" - }, - "cursorColor": { - "value": "#aa573c", - "type": "color" - }, - "selectionColor": { - "value": "#aa573c3d", - "type": "color" - }, - "borderColor": { - "value": "#aa573ccc", - "type": "color" - } - }, - "5": { - "baseColor": { - "value": "#955ae7", - "type": "color" - }, - "cursorColor": { - "value": "#955ae7", - "type": "color" - }, - "selectionColor": { - "value": "#955ae73d", - "type": "color" - }, - "borderColor": { - "value": "#955ae7cc", - "type": "color" - } - }, - "6": { - "baseColor": { - "value": "#398bc6", - "type": "color" - }, - "cursorColor": { - "value": "#398bc6", - "type": "color" - }, - "selectionColor": { - "value": "#398bc63d", - "type": "color" - }, - "borderColor": { - "value": "#398bc6cc", - "type": "color" - } - }, - "7": { - "baseColor": { - "value": "#be4678", - "type": "color" - }, - "cursorColor": { - "value": "#be4678", - "type": "color" - }, - "selectionColor": { - "value": "#be46783d", - "type": "color" - }, - "borderColor": { - "value": "#be4678cc", - "type": "color" - } - }, - "8": { - "baseColor": { - "value": "#a06e3b", - "type": "color" - }, - "cursorColor": { - "value": "#a06e3b", - "type": "color" - }, - "selectionColor": { - "value": "#a06e3b3d", - "type": "color" - }, - "borderColor": { - "value": "#a06e3bcc", - "type": "color" - } - } - }, - "shadowAlpha": { - "value": 0.12, - "type": "number" - } -} \ No newline at end of file diff --git a/styles/dist/core.json b/styles/dist/core.json deleted file mode 100644 index 6540c809ac..0000000000 --- a/styles/dist/core.json +++ /dev/null @@ -1,1181 +0,0 @@ -{ - "color": { - "neutral": { - "0": { - "value": "#ffffff", - "description": "Step: 0", - "type": "color" - }, - "25": { - "value": "#f8f8f8", - "description": "Step: 25", - "type": "color" - }, - "50": { - "value": "#f1f1f1", - "description": "Step: 50", - "type": "color" - }, - "75": { - "value": "#eaeaea", - "description": "Step: 75", - "type": "color" - }, - "100": { - "value": "#e3e3e3", - "description": "Step: 100", - "type": "color" - }, - "125": { - "value": "#dcdcdc", - "description": "Step: 125", - "type": "color" - }, - "150": { - "value": "#d5d5d5", - "description": "Step: 150", - "type": "color" - }, - "175": { - "value": "#cdcdcd", - "description": "Step: 175", - "type": "color" - }, - "200": { - "value": "#c6c6c6", - "description": "Step: 200", - "type": "color" - }, - "225": { - "value": "#bfbfbf", - "description": "Step: 225", - "type": "color" - }, - "250": { - "value": "#b8b8b8", - "description": "Step: 250", - "type": "color" - }, - "275": { - "value": "#b1b1b1", - "description": "Step: 275", - "type": "color" - }, - "300": { - "value": "#aaaaaa", - "description": "Step: 300", - "type": "color" - }, - "325": { - "value": "#a3a3a3", - "description": "Step: 325", - "type": "color" - }, - "350": { - "value": "#9c9c9c", - "description": "Step: 350", - "type": "color" - }, - "375": { - "value": "#959595", - "description": "Step: 375", - "type": "color" - }, - "400": { - "value": "#8e8e8e", - "description": "Step: 400", - "type": "color" - }, - "425": { - "value": "#878787", - "description": "Step: 425", - "type": "color" - }, - "450": { - "value": "#808080", - "description": "Step: 450", - "type": "color" - }, - "475": { - "value": "#787878", - "description": "Step: 475", - "type": "color" - }, - "500": { - "value": "#717171", - "description": "Step: 500", - "type": "color" - }, - "525": { - "value": "#6a6a6a", - "description": "Step: 525", - "type": "color" - }, - "550": { - "value": "#636363", - "description": "Step: 550", - "type": "color" - }, - "575": { - "value": "#5c5c5c", - "description": "Step: 575", - "type": "color" - }, - "600": { - "value": "#555555", - "description": "Step: 600", - "type": "color" - }, - "625": { - "value": "#4e4e4e", - "description": "Step: 625", - "type": "color" - }, - "650": { - "value": "#474747", - "description": "Step: 650", - "type": "color" - }, - "675": { - "value": "#404040", - "description": "Step: 675", - "type": "color" - }, - "700": { - "value": "#393939", - "description": "Step: 700", - "type": "color" - }, - "725": { - "value": "#323232", - "description": "Step: 725", - "type": "color" - }, - "750": { - "value": "#2b2b2b", - "description": "Step: 750", - "type": "color" - }, - "775": { - "value": "#232323", - "description": "Step: 775", - "type": "color" - }, - "800": { - "value": "#1c1c1c", - "description": "Step: 800", - "type": "color" - }, - "825": { - "value": "#151515", - "description": "Step: 825", - "type": "color" - }, - "850": { - "value": "#0e0e0e", - "description": "Step: 850", - "type": "color" - }, - "875": { - "value": "#070707", - "description": "Step: 875", - "type": "color" - }, - "900": { - "value": "#000000", - "description": "Step: 900", - "type": "color" - } - }, - "rose": { - "0": { - "value": "#feecef", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#fcc5cf", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#fa9fae", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#f8788e", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#f5526e", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#f0284a", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#cd1434", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#97142a", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#64101e", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#330a11", - "description": "Step: 900", - "type": "color" - } - }, - "red": { - "0": { - "value": "#feecec", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#fcc6c6", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#f9a0a0", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#f57b7b", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#f15656", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#eb2d2d", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#c91818", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#951515", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#631111", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#330a0a", - "description": "Step: 900", - "type": "color" - } - }, - "orange": { - "0": { - "value": "#fef3ec", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#fcd6bd", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#fab98e", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#f99d5f", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#f9812e", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#ee670a", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#bb550e", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#8b4210", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#5d2f0e", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#331b0a", - "description": "Step: 900", - "type": "color" - } - }, - "amber": { - "0": { - "value": "#fef7ec", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#fce2ba", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#f9ce89", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#f7bb57", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#f6a724", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#de900c", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#b0740f", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#845910", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#5a3e0e", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#33240a", - "description": "Step: 900", - "type": "color" - } - }, - "yellow": { - "0": { - "value": "#fef9ec", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#fce9b7", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#f9da82", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#f8cc4d", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#f7bf17", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#d3a20b", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#a8820e", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#7e630f", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#58460e", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#33290a", - "description": "Step: 900", - "type": "color" - } - }, - "lime": { - "0": { - "value": "#f7feec", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#dffab5", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#c7f57f", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#aeef4b", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#96e818", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#79ba16", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#639714", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#4e7412", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#38530f", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#23330a", - "description": "Step: 900", - "type": "color" - } - }, - "green": { - "0": { - "value": "#ecfef2", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#b7f9ce", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#84f2ab", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#54e989", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#27dd69", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#20b456", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#1b9447", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#157338", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#105328", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#0a3319", - "description": "Step: 900", - "type": "color" - } - }, - "emerald": { - "0": { - "value": "#ecfef8", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#b0fae1", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#74f6cb", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#39f0b3", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#12d796", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#10a977", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#118a62", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#106c4e", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#0d4f3a", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#0a3326", - "description": "Step: 900", - "type": "color" - } - }, - "teal": { - "0": { - "value": "#ecfefc", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#b1faf2", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#76f5e7", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#3eeeda", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#16d6c1", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#14a898", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#138a7d", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#116c62", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#0e4f48", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#0a332f", - "description": "Step: 900", - "type": "color" - } - }, - "cyan": { - "0": { - "value": "#ecfcfe", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#b2f3fb", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#78eaf9", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#3de2f8", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#07d5f1", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#09aac0", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#0c8a9a", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#0e6a75", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#0d4c53", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#0a2f33", - "description": "Step: 900", - "type": "color" - } - }, - "sky": { - "0": { - "value": "#ecf8fe", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#b9e5fb", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#86d3f8", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#53c1f5", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#20b0f2", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#1096d3", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#1179a8", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#115c7f", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#0e4158", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#0a2633", - "description": "Step: 900", - "type": "color" - } - }, - "blue": { - "0": { - "value": "#ecf3fe", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#c5dafc", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#9ec1fa", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#76a8f8", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#4f8ff7", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#2472f2", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#135acd", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#134697", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#103063", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#0a1a33", - "description": "Step: 900", - "type": "color" - } - }, - "indigo": { - "0": { - "value": "#ececfe", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#cdcdfc", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#aeaff9", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#9091f6", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#7274f3", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#484bed", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#1b1edc", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#1819a1", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#121269", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#0a0a33", - "description": "Step: 900", - "type": "color" - } - }, - "violet": { - "0": { - "value": "#f1ecfe", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#daccfc", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#c3acfb", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#ac8cf9", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#966cf7", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#7741f2", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#5316e0", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#3f15a3", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#2b116a", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#160a33", - "description": "Step: 900", - "type": "color" - } - }, - "purple": { - "0": { - "value": "#f5ecfe", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#e4cbfc", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#d2a9fb", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#c188f9", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#b066f8", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#993bf3", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#7b14dd", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#5c14a1", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#3e1169", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#1f0a33", - "description": "Step: 900", - "type": "color" - } - }, - "fuschia": { - "0": { - "value": "#fdecfe", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#f8c5fb", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#f19ff6", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#e87af0", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#de57e8", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#d430e0", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#b31fbc", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#87198e", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#5c1260", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#310a33", - "description": "Step: 900", - "type": "color" - } - }, - "pink": { - "0": { - "value": "#feecf5", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#fbc6e1", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#f8a1cc", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#f47db8", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#ef59a3", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#e8318c", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#c71a71", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#941756", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#63113b", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#330a1f", - "description": "Step: 900", - "type": "color" - } - } - }, - "text": { - "family": { - "sans": { - "value": "Zed Sans", - "type": "fontFamily" - }, - "mono": { - "value": "Zed Mono", - "type": "fontFamily" - } - }, - "weight": { - "thin": { - "value": "thin", - "type": "fontWeight" - }, - "extra_light": { - "value": "extra_light", - "type": "fontWeight" - }, - "light": { - "value": "light", - "type": "fontWeight" - }, - "normal": { - "value": "normal", - "type": "fontWeight" - }, - "medium": { - "value": "medium", - "type": "fontWeight" - }, - "semibold": { - "value": "semibold", - "type": "fontWeight" - }, - "bold": { - "value": "bold", - "type": "fontWeight" - }, - "extra_bold": { - "value": "extra_bold", - "type": "fontWeight" - }, - "black": { - "value": "black", - "type": "fontWeight" - } - } - }, - "size": { - "px": { - "value": 1, - "type": "size" - }, - "xs": { - "value": 2, - "type": "size" - }, - "sm": { - "value": 4, - "type": "size" - }, - "md": { - "value": 6, - "type": "size" - }, - "lg": { - "value": 8, - "type": "size" - }, - "xl": { - "value": 12, - "type": "size" - } - }, - "fontSize": { - "3xs": { - "value": 8, - "type": "fontSize" - }, - "2xs": { - "value": 10, - "type": "fontSize" - }, - "xs": { - "value": 12, - "type": "fontSize" - }, - "sm": { - "value": 14, - "type": "fontSize" - }, - "md": { - "value": 16, - "type": "fontSize" - }, - "lg": { - "value": 18, - "type": "fontSize" - }, - "xl": { - "value": 20, - "type": "fontSize" - } - } -} \ No newline at end of file diff --git a/styles/dist/solarized-dark.json b/styles/dist/solarized-dark.json deleted file mode 100644 index 68d97906bf..0000000000 --- a/styles/dist/solarized-dark.json +++ /dev/null @@ -1,519 +0,0 @@ -{ - "meta": { - "themeName": "solarized-dark" - }, - "text": { - "primary": { - "value": "#eee8d5", - "type": "color" - }, - "secondary": { - "value": "#93a1a1", - "type": "color" - }, - "muted": { - "value": "#93a1a1", - "type": "color" - }, - "placeholder": { - "value": "#839496", - "type": "color" - }, - "active": { - "value": "#fdf6e3", - "type": "color" - }, - "feature": { - "value": "#268bd2", - "type": "color" - }, - "ok": { - "value": "#859900", - "type": "color" - }, - "error": { - "value": "#dc322f", - "type": "color" - }, - "warning": { - "value": "#b58900", - "type": "color" - }, - "info": { - "value": "#268bd2", - "type": "color" - } - }, - "icon": { - "primary": { - "value": "#eee8d5", - "type": "color" - }, - "secondary": { - "value": "#93a1a1", - "type": "color" - }, - "muted": { - "value": "#93a1a1", - "type": "color" - }, - "placeholder": { - "value": "#839496", - "type": "color" - }, - "active": { - "value": "#fdf6e3", - "type": "color" - }, - "feature": { - "value": "#268bd2", - "type": "color" - }, - "ok": { - "value": "#859900", - "type": "color" - }, - "error": { - "value": "#dc322f", - "type": "color" - }, - "warning": { - "value": "#b58900", - "type": "color" - }, - "info": { - "value": "#268bd2", - "type": "color" - } - }, - "background": { - "100": { - "base": { - "value": "#1b444f", - "type": "color" - }, - "hovered": { - "value": "#30525c", - "type": "color" - }, - "active": { - "value": "#446068", - "type": "color" - } - }, - "300": { - "base": { - "value": "#073642", - "type": "color" - }, - "hovered": { - "value": "#1b444f", - "type": "color" - }, - "active": { - "value": "#30525c", - "type": "color" - } - }, - "500": { - "base": { - "value": "#002b36", - "type": "color" - }, - "hovered": { - "value": "#022e39", - "type": "color" - }, - "active": { - "value": "#04313c", - "type": "color" - } - }, - "on300": { - "base": { - "value": "#002b36", - "type": "color" - }, - "hovered": { - "value": "#022e39", - "type": "color" - }, - "active": { - "value": "#04313c", - "type": "color" - } - }, - "on500": { - "base": { - "value": "#1b444f", - "type": "color" - }, - "hovered": { - "value": "#30525c", - "type": "color" - }, - "active": { - "value": "#446068", - "type": "color" - } - }, - "ok": { - "base": { - "value": "#85990026", - "type": "color" - }, - "hovered": { - "value": "#85990033", - "type": "color" - }, - "active": { - "value": "#85990040", - "type": "color" - } - }, - "error": { - "base": { - "value": "#dc322f26", - "type": "color" - }, - "hovered": { - "value": "#dc322f33", - "type": "color" - }, - "active": { - "value": "#dc322f40", - "type": "color" - } - }, - "warning": { - "base": { - "value": "#b5890026", - "type": "color" - }, - "hovered": { - "value": "#b5890033", - "type": "color" - }, - "active": { - "value": "#b5890040", - "type": "color" - } - }, - "info": { - "base": { - "value": "#268bd226", - "type": "color" - }, - "hovered": { - "value": "#268bd233", - "type": "color" - }, - "active": { - "value": "#268bd240", - "type": "color" - } - } - }, - "border": { - "primary": { - "value": "#002b36", - "type": "color" - }, - "secondary": { - "value": "#073642", - "type": "color" - }, - "muted": { - "value": "#657b83", - "type": "color" - }, - "active": { - "value": "#657b83", - "type": "color" - }, - "onMedia": { - "value": "#002b361a", - "type": "color" - }, - "ok": { - "value": "#85990026", - "type": "color" - }, - "error": { - "value": "#dc322f26", - "type": "color" - }, - "warning": { - "value": "#b5890026", - "type": "color" - }, - "info": { - "value": "#268bd226", - "type": "color" - } - }, - "editor": { - "background": { - "value": "#002b36", - "type": "color" - }, - "indent_guide": { - "value": "#657b83", - "type": "color" - }, - "indent_guide_active": { - "value": "#073642", - "type": "color" - }, - "line": { - "active": { - "value": "#073642", - "type": "color" - }, - "highlighted": { - "value": "#1b444f", - "type": "color" - } - }, - "highlight": { - "selection": { - "value": "#268bd23d", - "type": "color" - }, - "occurrence": { - "value": "#586e753d", - "type": "color" - }, - "activeOccurrence": { - "value": "#586e757a", - "type": "color" - }, - "matchingBracket": { - "value": "#04313c", - "type": "color" - }, - "match": { - "value": "#1b1f6b", - "type": "color" - }, - "activeMatch": { - "value": "#434abc7a", - "type": "color" - }, - "related": { - "value": "#022e39", - "type": "color" - } - }, - "gutter": { - "primary": { - "value": "#839496", - "type": "color" - }, - "active": { - "value": "#fdf6e3", - "type": "color" - } - } - }, - "syntax": { - "primary": { - "value": "#fdf6e3", - "type": "color" - }, - "comment": { - "value": "#93a1a1", - "type": "color" - }, - "keyword": { - "value": "#268bd2", - "type": "color" - }, - "function": { - "value": "#b58900", - "type": "color" - }, - "type": { - "value": "#2aa198", - "type": "color" - }, - "variant": { - "value": "#268bd2", - "type": "color" - }, - "property": { - "value": "#268bd2", - "type": "color" - }, - "enum": { - "value": "#cb4b16", - "type": "color" - }, - "operator": { - "value": "#cb4b16", - "type": "color" - }, - "string": { - "value": "#cb4b16", - "type": "color" - }, - "number": { - "value": "#859900", - "type": "color" - }, - "boolean": { - "value": "#859900", - "type": "color" - } - }, - "player": { - "1": { - "baseColor": { - "value": "#268bd2", - "type": "color" - }, - "cursorColor": { - "value": "#268bd2", - "type": "color" - }, - "selectionColor": { - "value": "#268bd23d", - "type": "color" - }, - "borderColor": { - "value": "#268bd2cc", - "type": "color" - } - }, - "2": { - "baseColor": { - "value": "#859900", - "type": "color" - }, - "cursorColor": { - "value": "#859900", - "type": "color" - }, - "selectionColor": { - "value": "#8599003d", - "type": "color" - }, - "borderColor": { - "value": "#859900cc", - "type": "color" - } - }, - "3": { - "baseColor": { - "value": "#d33682", - "type": "color" - }, - "cursorColor": { - "value": "#d33682", - "type": "color" - }, - "selectionColor": { - "value": "#d336823d", - "type": "color" - }, - "borderColor": { - "value": "#d33682cc", - "type": "color" - } - }, - "4": { - "baseColor": { - "value": "#cb4b16", - "type": "color" - }, - "cursorColor": { - "value": "#cb4b16", - "type": "color" - }, - "selectionColor": { - "value": "#cb4b163d", - "type": "color" - }, - "borderColor": { - "value": "#cb4b16cc", - "type": "color" - } - }, - "5": { - "baseColor": { - "value": "#6c71c4", - "type": "color" - }, - "cursorColor": { - "value": "#6c71c4", - "type": "color" - }, - "selectionColor": { - "value": "#6c71c43d", - "type": "color" - }, - "borderColor": { - "value": "#6c71c4cc", - "type": "color" - } - }, - "6": { - "baseColor": { - "value": "#2aa198", - "type": "color" - }, - "cursorColor": { - "value": "#2aa198", - "type": "color" - }, - "selectionColor": { - "value": "#2aa1983d", - "type": "color" - }, - "borderColor": { - "value": "#2aa198cc", - "type": "color" - } - }, - "7": { - "baseColor": { - "value": "#dc322f", - "type": "color" - }, - "cursorColor": { - "value": "#dc322f", - "type": "color" - }, - "selectionColor": { - "value": "#dc322f3d", - "type": "color" - }, - "borderColor": { - "value": "#dc322fcc", - "type": "color" - } - }, - "8": { - "baseColor": { - "value": "#b58900", - "type": "color" - }, - "cursorColor": { - "value": "#b58900", - "type": "color" - }, - "selectionColor": { - "value": "#b589003d", - "type": "color" - }, - "borderColor": { - "value": "#b58900cc", - "type": "color" - } - } - }, - "shadowAlpha": { - "value": 0.24, - "type": "number" - } -} \ No newline at end of file diff --git a/styles/dist/solarized-light.json b/styles/dist/solarized-light.json deleted file mode 100644 index acd8d133df..0000000000 --- a/styles/dist/solarized-light.json +++ /dev/null @@ -1,519 +0,0 @@ -{ - "meta": { - "themeName": "solarized-light" - }, - "text": { - "primary": { - "value": "#073642", - "type": "color" - }, - "secondary": { - "value": "#586e75", - "type": "color" - }, - "muted": { - "value": "#586e75", - "type": "color" - }, - "placeholder": { - "value": "#657b83", - "type": "color" - }, - "active": { - "value": "#002b36", - "type": "color" - }, - "feature": { - "value": "#268bd2", - "type": "color" - }, - "ok": { - "value": "#859900", - "type": "color" - }, - "error": { - "value": "#dc322f", - "type": "color" - }, - "warning": { - "value": "#b58900", - "type": "color" - }, - "info": { - "value": "#268bd2", - "type": "color" - } - }, - "icon": { - "primary": { - "value": "#073642", - "type": "color" - }, - "secondary": { - "value": "#586e75", - "type": "color" - }, - "muted": { - "value": "#586e75", - "type": "color" - }, - "placeholder": { - "value": "#657b83", - "type": "color" - }, - "active": { - "value": "#002b36", - "type": "color" - }, - "feature": { - "value": "#268bd2", - "type": "color" - }, - "ok": { - "value": "#859900", - "type": "color" - }, - "error": { - "value": "#dc322f", - "type": "color" - }, - "warning": { - "value": "#b58900", - "type": "color" - }, - "info": { - "value": "#268bd2", - "type": "color" - } - }, - "background": { - "100": { - "base": { - "value": "#d7d6c8", - "type": "color" - }, - "hovered": { - "value": "#c1c5bb", - "type": "color" - }, - "active": { - "value": "#aab3ae", - "type": "color" - } - }, - "300": { - "base": { - "value": "#eee8d5", - "type": "color" - }, - "hovered": { - "value": "#d7d6c8", - "type": "color" - }, - "active": { - "value": "#c1c5bb", - "type": "color" - } - }, - "500": { - "base": { - "value": "#fdf6e3", - "type": "color" - }, - "hovered": { - "value": "#f9f3e0", - "type": "color" - }, - "active": { - "value": "#f6efdc", - "type": "color" - } - }, - "on300": { - "base": { - "value": "#fdf6e3", - "type": "color" - }, - "hovered": { - "value": "#f9f3e0", - "type": "color" - }, - "active": { - "value": "#f6efdc", - "type": "color" - } - }, - "on500": { - "base": { - "value": "#d7d6c8", - "type": "color" - }, - "hovered": { - "value": "#c1c5bb", - "type": "color" - }, - "active": { - "value": "#aab3ae", - "type": "color" - } - }, - "ok": { - "base": { - "value": "#85990026", - "type": "color" - }, - "hovered": { - "value": "#85990033", - "type": "color" - }, - "active": { - "value": "#85990040", - "type": "color" - } - }, - "error": { - "base": { - "value": "#dc322f26", - "type": "color" - }, - "hovered": { - "value": "#dc322f33", - "type": "color" - }, - "active": { - "value": "#dc322f40", - "type": "color" - } - }, - "warning": { - "base": { - "value": "#b5890026", - "type": "color" - }, - "hovered": { - "value": "#b5890033", - "type": "color" - }, - "active": { - "value": "#b5890040", - "type": "color" - } - }, - "info": { - "base": { - "value": "#268bd226", - "type": "color" - }, - "hovered": { - "value": "#268bd233", - "type": "color" - }, - "active": { - "value": "#268bd240", - "type": "color" - } - } - }, - "border": { - "primary": { - "value": "#c1c5bb", - "type": "color" - }, - "secondary": { - "value": "#d7d6c8", - "type": "color" - }, - "muted": { - "value": "#eee8d5", - "type": "color" - }, - "active": { - "value": "#657b83", - "type": "color" - }, - "onMedia": { - "value": "#fdf6e31a", - "type": "color" - }, - "ok": { - "value": "#85990026", - "type": "color" - }, - "error": { - "value": "#dc322f26", - "type": "color" - }, - "warning": { - "value": "#b5890026", - "type": "color" - }, - "info": { - "value": "#268bd226", - "type": "color" - } - }, - "editor": { - "background": { - "value": "#fdf6e3", - "type": "color" - }, - "indent_guide": { - "value": "#eee8d5", - "type": "color" - }, - "indent_guide_active": { - "value": "#d7d6c8", - "type": "color" - }, - "line": { - "active": { - "value": "#eee8d5", - "type": "color" - }, - "highlighted": { - "value": "#d7d6c8", - "type": "color" - } - }, - "highlight": { - "selection": { - "value": "#268bd23d", - "type": "color" - }, - "occurrence": { - "value": "#93a1a11f", - "type": "color" - }, - "activeOccurrence": { - "value": "#93a1a13d", - "type": "color" - }, - "matchingBracket": { - "value": "#f6efdc", - "type": "color" - }, - "match": { - "value": "#bcc0f6", - "type": "color" - }, - "activeMatch": { - "value": "#7f84d73d", - "type": "color" - }, - "related": { - "value": "#f9f3e0", - "type": "color" - } - }, - "gutter": { - "primary": { - "value": "#657b83", - "type": "color" - }, - "active": { - "value": "#002b36", - "type": "color" - } - } - }, - "syntax": { - "primary": { - "value": "#002b36", - "type": "color" - }, - "comment": { - "value": "#586e75", - "type": "color" - }, - "keyword": { - "value": "#268bd2", - "type": "color" - }, - "function": { - "value": "#b58900", - "type": "color" - }, - "type": { - "value": "#2aa198", - "type": "color" - }, - "variant": { - "value": "#268bd2", - "type": "color" - }, - "property": { - "value": "#268bd2", - "type": "color" - }, - "enum": { - "value": "#cb4b16", - "type": "color" - }, - "operator": { - "value": "#cb4b16", - "type": "color" - }, - "string": { - "value": "#cb4b16", - "type": "color" - }, - "number": { - "value": "#859900", - "type": "color" - }, - "boolean": { - "value": "#859900", - "type": "color" - } - }, - "player": { - "1": { - "baseColor": { - "value": "#268bd2", - "type": "color" - }, - "cursorColor": { - "value": "#268bd2", - "type": "color" - }, - "selectionColor": { - "value": "#268bd23d", - "type": "color" - }, - "borderColor": { - "value": "#268bd2cc", - "type": "color" - } - }, - "2": { - "baseColor": { - "value": "#859900", - "type": "color" - }, - "cursorColor": { - "value": "#859900", - "type": "color" - }, - "selectionColor": { - "value": "#8599003d", - "type": "color" - }, - "borderColor": { - "value": "#859900cc", - "type": "color" - } - }, - "3": { - "baseColor": { - "value": "#d33682", - "type": "color" - }, - "cursorColor": { - "value": "#d33682", - "type": "color" - }, - "selectionColor": { - "value": "#d336823d", - "type": "color" - }, - "borderColor": { - "value": "#d33682cc", - "type": "color" - } - }, - "4": { - "baseColor": { - "value": "#cb4b16", - "type": "color" - }, - "cursorColor": { - "value": "#cb4b16", - "type": "color" - }, - "selectionColor": { - "value": "#cb4b163d", - "type": "color" - }, - "borderColor": { - "value": "#cb4b16cc", - "type": "color" - } - }, - "5": { - "baseColor": { - "value": "#6c71c4", - "type": "color" - }, - "cursorColor": { - "value": "#6c71c4", - "type": "color" - }, - "selectionColor": { - "value": "#6c71c43d", - "type": "color" - }, - "borderColor": { - "value": "#6c71c4cc", - "type": "color" - } - }, - "6": { - "baseColor": { - "value": "#2aa198", - "type": "color" - }, - "cursorColor": { - "value": "#2aa198", - "type": "color" - }, - "selectionColor": { - "value": "#2aa1983d", - "type": "color" - }, - "borderColor": { - "value": "#2aa198cc", - "type": "color" - } - }, - "7": { - "baseColor": { - "value": "#dc322f", - "type": "color" - }, - "cursorColor": { - "value": "#dc322f", - "type": "color" - }, - "selectionColor": { - "value": "#dc322f3d", - "type": "color" - }, - "borderColor": { - "value": "#dc322fcc", - "type": "color" - } - }, - "8": { - "baseColor": { - "value": "#b58900", - "type": "color" - }, - "cursorColor": { - "value": "#b58900", - "type": "color" - }, - "selectionColor": { - "value": "#b589003d", - "type": "color" - }, - "borderColor": { - "value": "#b58900cc", - "type": "color" - } - } - }, - "shadowAlpha": { - "value": 0.12, - "type": "number" - } -} \ No newline at end of file diff --git a/styles/dist/sulphurpool-dark.json b/styles/dist/sulphurpool-dark.json deleted file mode 100644 index a2a6273bb9..0000000000 --- a/styles/dist/sulphurpool-dark.json +++ /dev/null @@ -1,519 +0,0 @@ -{ - "meta": { - "themeName": "sulphurpool-dark" - }, - "text": { - "primary": { - "value": "#dfe2f1", - "type": "color" - }, - "secondary": { - "value": "#979db4", - "type": "color" - }, - "muted": { - "value": "#979db4", - "type": "color" - }, - "placeholder": { - "value": "#898ea4", - "type": "color" - }, - "active": { - "value": "#f5f7ff", - "type": "color" - }, - "feature": { - "value": "#3d8fd1", - "type": "color" - }, - "ok": { - "value": "#ac9739", - "type": "color" - }, - "error": { - "value": "#c94922", - "type": "color" - }, - "warning": { - "value": "#c08b30", - "type": "color" - }, - "info": { - "value": "#3d8fd1", - "type": "color" - } - }, - "icon": { - "primary": { - "value": "#dfe2f1", - "type": "color" - }, - "secondary": { - "value": "#979db4", - "type": "color" - }, - "muted": { - "value": "#979db4", - "type": "color" - }, - "placeholder": { - "value": "#898ea4", - "type": "color" - }, - "active": { - "value": "#f5f7ff", - "type": "color" - }, - "feature": { - "value": "#3d8fd1", - "type": "color" - }, - "ok": { - "value": "#ac9739", - "type": "color" - }, - "error": { - "value": "#c94922", - "type": "color" - }, - "warning": { - "value": "#c08b30", - "type": "color" - }, - "info": { - "value": "#3d8fd1", - "type": "color" - } - }, - "background": { - "100": { - "base": { - "value": "#363f62", - "type": "color" - }, - "hovered": { - "value": "#444c6f", - "type": "color" - }, - "active": { - "value": "#51597b", - "type": "color" - } - }, - "300": { - "base": { - "value": "#293256", - "type": "color" - }, - "hovered": { - "value": "#363f62", - "type": "color" - }, - "active": { - "value": "#444c6f", - "type": "color" - } - }, - "500": { - "base": { - "value": "#202746", - "type": "color" - }, - "hovered": { - "value": "#222a4a", - "type": "color" - }, - "active": { - "value": "#252d4e", - "type": "color" - } - }, - "on300": { - "base": { - "value": "#202746", - "type": "color" - }, - "hovered": { - "value": "#222a4a", - "type": "color" - }, - "active": { - "value": "#252d4e", - "type": "color" - } - }, - "on500": { - "base": { - "value": "#363f62", - "type": "color" - }, - "hovered": { - "value": "#444c6f", - "type": "color" - }, - "active": { - "value": "#51597b", - "type": "color" - } - }, - "ok": { - "base": { - "value": "#ac973926", - "type": "color" - }, - "hovered": { - "value": "#ac973933", - "type": "color" - }, - "active": { - "value": "#ac973940", - "type": "color" - } - }, - "error": { - "base": { - "value": "#c9492226", - "type": "color" - }, - "hovered": { - "value": "#c9492233", - "type": "color" - }, - "active": { - "value": "#c9492240", - "type": "color" - } - }, - "warning": { - "base": { - "value": "#c08b3026", - "type": "color" - }, - "hovered": { - "value": "#c08b3033", - "type": "color" - }, - "active": { - "value": "#c08b3040", - "type": "color" - } - }, - "info": { - "base": { - "value": "#3d8fd126", - "type": "color" - }, - "hovered": { - "value": "#3d8fd133", - "type": "color" - }, - "active": { - "value": "#3d8fd140", - "type": "color" - } - } - }, - "border": { - "primary": { - "value": "#202746", - "type": "color" - }, - "secondary": { - "value": "#293256", - "type": "color" - }, - "muted": { - "value": "#6b7394", - "type": "color" - }, - "active": { - "value": "#6b7394", - "type": "color" - }, - "onMedia": { - "value": "#2027461a", - "type": "color" - }, - "ok": { - "value": "#ac973926", - "type": "color" - }, - "error": { - "value": "#c9492226", - "type": "color" - }, - "warning": { - "value": "#c08b3026", - "type": "color" - }, - "info": { - "value": "#3d8fd126", - "type": "color" - } - }, - "editor": { - "background": { - "value": "#202746", - "type": "color" - }, - "indent_guide": { - "value": "#6b7394", - "type": "color" - }, - "indent_guide_active": { - "value": "#293256", - "type": "color" - }, - "line": { - "active": { - "value": "#293256", - "type": "color" - }, - "highlighted": { - "value": "#363f62", - "type": "color" - } - }, - "highlight": { - "selection": { - "value": "#3d8fd13d", - "type": "color" - }, - "occurrence": { - "value": "#5e66873d", - "type": "color" - }, - "activeOccurrence": { - "value": "#5e66877a", - "type": "color" - }, - "matchingBracket": { - "value": "#252d4e", - "type": "color" - }, - "match": { - "value": "#1a2a6d", - "type": "color" - }, - "activeMatch": { - "value": "#3d56c47a", - "type": "color" - }, - "related": { - "value": "#222a4a", - "type": "color" - } - }, - "gutter": { - "primary": { - "value": "#898ea4", - "type": "color" - }, - "active": { - "value": "#f5f7ff", - "type": "color" - } - } - }, - "syntax": { - "primary": { - "value": "#f5f7ff", - "type": "color" - }, - "comment": { - "value": "#979db4", - "type": "color" - }, - "keyword": { - "value": "#3d8fd1", - "type": "color" - }, - "function": { - "value": "#c08b30", - "type": "color" - }, - "type": { - "value": "#22a2c9", - "type": "color" - }, - "variant": { - "value": "#3d8fd1", - "type": "color" - }, - "property": { - "value": "#3d8fd1", - "type": "color" - }, - "enum": { - "value": "#c76b29", - "type": "color" - }, - "operator": { - "value": "#c76b29", - "type": "color" - }, - "string": { - "value": "#c76b29", - "type": "color" - }, - "number": { - "value": "#ac9739", - "type": "color" - }, - "boolean": { - "value": "#ac9739", - "type": "color" - } - }, - "player": { - "1": { - "baseColor": { - "value": "#3d8fd1", - "type": "color" - }, - "cursorColor": { - "value": "#3d8fd1", - "type": "color" - }, - "selectionColor": { - "value": "#3d8fd13d", - "type": "color" - }, - "borderColor": { - "value": "#3d8fd1cc", - "type": "color" - } - }, - "2": { - "baseColor": { - "value": "#ac9739", - "type": "color" - }, - "cursorColor": { - "value": "#ac9739", - "type": "color" - }, - "selectionColor": { - "value": "#ac97393d", - "type": "color" - }, - "borderColor": { - "value": "#ac9739cc", - "type": "color" - } - }, - "3": { - "baseColor": { - "value": "#9c637a", - "type": "color" - }, - "cursorColor": { - "value": "#9c637a", - "type": "color" - }, - "selectionColor": { - "value": "#9c637a3d", - "type": "color" - }, - "borderColor": { - "value": "#9c637acc", - "type": "color" - } - }, - "4": { - "baseColor": { - "value": "#c76b29", - "type": "color" - }, - "cursorColor": { - "value": "#c76b29", - "type": "color" - }, - "selectionColor": { - "value": "#c76b293d", - "type": "color" - }, - "borderColor": { - "value": "#c76b29cc", - "type": "color" - } - }, - "5": { - "baseColor": { - "value": "#6679cc", - "type": "color" - }, - "cursorColor": { - "value": "#6679cc", - "type": "color" - }, - "selectionColor": { - "value": "#6679cc3d", - "type": "color" - }, - "borderColor": { - "value": "#6679cccc", - "type": "color" - } - }, - "6": { - "baseColor": { - "value": "#22a2c9", - "type": "color" - }, - "cursorColor": { - "value": "#22a2c9", - "type": "color" - }, - "selectionColor": { - "value": "#22a2c93d", - "type": "color" - }, - "borderColor": { - "value": "#22a2c9cc", - "type": "color" - } - }, - "7": { - "baseColor": { - "value": "#c94922", - "type": "color" - }, - "cursorColor": { - "value": "#c94922", - "type": "color" - }, - "selectionColor": { - "value": "#c949223d", - "type": "color" - }, - "borderColor": { - "value": "#c94922cc", - "type": "color" - } - }, - "8": { - "baseColor": { - "value": "#c08b30", - "type": "color" - }, - "cursorColor": { - "value": "#c08b30", - "type": "color" - }, - "selectionColor": { - "value": "#c08b303d", - "type": "color" - }, - "borderColor": { - "value": "#c08b30cc", - "type": "color" - } - } - }, - "shadowAlpha": { - "value": 0.24, - "type": "number" - } -} \ No newline at end of file diff --git a/styles/dist/sulphurpool-light.json b/styles/dist/sulphurpool-light.json deleted file mode 100644 index 779850149f..0000000000 --- a/styles/dist/sulphurpool-light.json +++ /dev/null @@ -1,519 +0,0 @@ -{ - "meta": { - "themeName": "sulphurpool-light" - }, - "text": { - "primary": { - "value": "#293256", - "type": "color" - }, - "secondary": { - "value": "#5e6687", - "type": "color" - }, - "muted": { - "value": "#5e6687", - "type": "color" - }, - "placeholder": { - "value": "#6b7394", - "type": "color" - }, - "active": { - "value": "#202746", - "type": "color" - }, - "feature": { - "value": "#3d8fd1", - "type": "color" - }, - "ok": { - "value": "#ac9739", - "type": "color" - }, - "error": { - "value": "#c94922", - "type": "color" - }, - "warning": { - "value": "#c08b30", - "type": "color" - }, - "info": { - "value": "#3d8fd1", - "type": "color" - } - }, - "icon": { - "primary": { - "value": "#293256", - "type": "color" - }, - "secondary": { - "value": "#5e6687", - "type": "color" - }, - "muted": { - "value": "#5e6687", - "type": "color" - }, - "placeholder": { - "value": "#6b7394", - "type": "color" - }, - "active": { - "value": "#202746", - "type": "color" - }, - "feature": { - "value": "#3d8fd1", - "type": "color" - }, - "ok": { - "value": "#ac9739", - "type": "color" - }, - "error": { - "value": "#c94922", - "type": "color" - }, - "warning": { - "value": "#c08b30", - "type": "color" - }, - "info": { - "value": "#3d8fd1", - "type": "color" - } - }, - "background": { - "100": { - "base": { - "value": "#cdd1e2", - "type": "color" - }, - "hovered": { - "value": "#bbc0d3", - "type": "color" - }, - "active": { - "value": "#a9aec3", - "type": "color" - } - }, - "300": { - "base": { - "value": "#dfe2f1", - "type": "color" - }, - "hovered": { - "value": "#cdd1e2", - "type": "color" - }, - "active": { - "value": "#bbc0d3", - "type": "color" - } - }, - "500": { - "base": { - "value": "#f5f7ff", - "type": "color" - }, - "hovered": { - "value": "#f0f2fc", - "type": "color" - }, - "active": { - "value": "#eaedf8", - "type": "color" - } - }, - "on300": { - "base": { - "value": "#f5f7ff", - "type": "color" - }, - "hovered": { - "value": "#f0f2fc", - "type": "color" - }, - "active": { - "value": "#eaedf8", - "type": "color" - } - }, - "on500": { - "base": { - "value": "#cdd1e2", - "type": "color" - }, - "hovered": { - "value": "#bbc0d3", - "type": "color" - }, - "active": { - "value": "#a9aec3", - "type": "color" - } - }, - "ok": { - "base": { - "value": "#ac973926", - "type": "color" - }, - "hovered": { - "value": "#ac973933", - "type": "color" - }, - "active": { - "value": "#ac973940", - "type": "color" - } - }, - "error": { - "base": { - "value": "#c9492226", - "type": "color" - }, - "hovered": { - "value": "#c9492233", - "type": "color" - }, - "active": { - "value": "#c9492240", - "type": "color" - } - }, - "warning": { - "base": { - "value": "#c08b3026", - "type": "color" - }, - "hovered": { - "value": "#c08b3033", - "type": "color" - }, - "active": { - "value": "#c08b3040", - "type": "color" - } - }, - "info": { - "base": { - "value": "#3d8fd126", - "type": "color" - }, - "hovered": { - "value": "#3d8fd133", - "type": "color" - }, - "active": { - "value": "#3d8fd140", - "type": "color" - } - } - }, - "border": { - "primary": { - "value": "#bbc0d3", - "type": "color" - }, - "secondary": { - "value": "#cdd1e2", - "type": "color" - }, - "muted": { - "value": "#dfe2f1", - "type": "color" - }, - "active": { - "value": "#6b7394", - "type": "color" - }, - "onMedia": { - "value": "#f5f7ff1a", - "type": "color" - }, - "ok": { - "value": "#ac973926", - "type": "color" - }, - "error": { - "value": "#c9492226", - "type": "color" - }, - "warning": { - "value": "#c08b3026", - "type": "color" - }, - "info": { - "value": "#3d8fd126", - "type": "color" - } - }, - "editor": { - "background": { - "value": "#f5f7ff", - "type": "color" - }, - "indent_guide": { - "value": "#dfe2f1", - "type": "color" - }, - "indent_guide_active": { - "value": "#cdd1e2", - "type": "color" - }, - "line": { - "active": { - "value": "#dfe2f1", - "type": "color" - }, - "highlighted": { - "value": "#cdd1e2", - "type": "color" - } - }, - "highlight": { - "selection": { - "value": "#3d8fd13d", - "type": "color" - }, - "occurrence": { - "value": "#979db41f", - "type": "color" - }, - "activeOccurrence": { - "value": "#979db43d", - "type": "color" - }, - "matchingBracket": { - "value": "#eaedf8", - "type": "color" - }, - "match": { - "value": "#bcc6f7", - "type": "color" - }, - "activeMatch": { - "value": "#7b8ddc3d", - "type": "color" - }, - "related": { - "value": "#f0f2fc", - "type": "color" - } - }, - "gutter": { - "primary": { - "value": "#6b7394", - "type": "color" - }, - "active": { - "value": "#202746", - "type": "color" - } - } - }, - "syntax": { - "primary": { - "value": "#202746", - "type": "color" - }, - "comment": { - "value": "#5e6687", - "type": "color" - }, - "keyword": { - "value": "#3d8fd1", - "type": "color" - }, - "function": { - "value": "#c08b30", - "type": "color" - }, - "type": { - "value": "#22a2c9", - "type": "color" - }, - "variant": { - "value": "#3d8fd1", - "type": "color" - }, - "property": { - "value": "#3d8fd1", - "type": "color" - }, - "enum": { - "value": "#c76b29", - "type": "color" - }, - "operator": { - "value": "#c76b29", - "type": "color" - }, - "string": { - "value": "#c76b29", - "type": "color" - }, - "number": { - "value": "#ac9739", - "type": "color" - }, - "boolean": { - "value": "#ac9739", - "type": "color" - } - }, - "player": { - "1": { - "baseColor": { - "value": "#3d8fd1", - "type": "color" - }, - "cursorColor": { - "value": "#3d8fd1", - "type": "color" - }, - "selectionColor": { - "value": "#3d8fd13d", - "type": "color" - }, - "borderColor": { - "value": "#3d8fd1cc", - "type": "color" - } - }, - "2": { - "baseColor": { - "value": "#ac9739", - "type": "color" - }, - "cursorColor": { - "value": "#ac9739", - "type": "color" - }, - "selectionColor": { - "value": "#ac97393d", - "type": "color" - }, - "borderColor": { - "value": "#ac9739cc", - "type": "color" - } - }, - "3": { - "baseColor": { - "value": "#9c637a", - "type": "color" - }, - "cursorColor": { - "value": "#9c637a", - "type": "color" - }, - "selectionColor": { - "value": "#9c637a3d", - "type": "color" - }, - "borderColor": { - "value": "#9c637acc", - "type": "color" - } - }, - "4": { - "baseColor": { - "value": "#c76b29", - "type": "color" - }, - "cursorColor": { - "value": "#c76b29", - "type": "color" - }, - "selectionColor": { - "value": "#c76b293d", - "type": "color" - }, - "borderColor": { - "value": "#c76b29cc", - "type": "color" - } - }, - "5": { - "baseColor": { - "value": "#6679cc", - "type": "color" - }, - "cursorColor": { - "value": "#6679cc", - "type": "color" - }, - "selectionColor": { - "value": "#6679cc3d", - "type": "color" - }, - "borderColor": { - "value": "#6679cccc", - "type": "color" - } - }, - "6": { - "baseColor": { - "value": "#22a2c9", - "type": "color" - }, - "cursorColor": { - "value": "#22a2c9", - "type": "color" - }, - "selectionColor": { - "value": "#22a2c93d", - "type": "color" - }, - "borderColor": { - "value": "#22a2c9cc", - "type": "color" - } - }, - "7": { - "baseColor": { - "value": "#c94922", - "type": "color" - }, - "cursorColor": { - "value": "#c94922", - "type": "color" - }, - "selectionColor": { - "value": "#c949223d", - "type": "color" - }, - "borderColor": { - "value": "#c94922cc", - "type": "color" - } - }, - "8": { - "baseColor": { - "value": "#c08b30", - "type": "color" - }, - "cursorColor": { - "value": "#c08b30", - "type": "color" - }, - "selectionColor": { - "value": "#c08b303d", - "type": "color" - }, - "borderColor": { - "value": "#c08b30cc", - "type": "color" - } - } - }, - "shadowAlpha": { - "value": 0.12, - "type": "number" - } -} \ No newline at end of file diff --git a/styles/dist/tokens.json b/styles/dist/tokens.json deleted file mode 100644 index 29cec82032..0000000000 --- a/styles/dist/tokens.json +++ /dev/null @@ -1,4297 +0,0 @@ -{ - "core": { - "color": { - "neutral": { - "0": { - "value": "#ffffff", - "description": "Step: 0", - "type": "color" - }, - "25": { - "value": "#f8f8f8", - "description": "Step: 25", - "type": "color" - }, - "50": { - "value": "#f1f1f1", - "description": "Step: 50", - "type": "color" - }, - "75": { - "value": "#eaeaea", - "description": "Step: 75", - "type": "color" - }, - "100": { - "value": "#e3e3e3", - "description": "Step: 100", - "type": "color" - }, - "125": { - "value": "#dcdcdc", - "description": "Step: 125", - "type": "color" - }, - "150": { - "value": "#d5d5d5", - "description": "Step: 150", - "type": "color" - }, - "175": { - "value": "#cdcdcd", - "description": "Step: 175", - "type": "color" - }, - "200": { - "value": "#c6c6c6", - "description": "Step: 200", - "type": "color" - }, - "225": { - "value": "#bfbfbf", - "description": "Step: 225", - "type": "color" - }, - "250": { - "value": "#b8b8b8", - "description": "Step: 250", - "type": "color" - }, - "275": { - "value": "#b1b1b1", - "description": "Step: 275", - "type": "color" - }, - "300": { - "value": "#aaaaaa", - "description": "Step: 300", - "type": "color" - }, - "325": { - "value": "#a3a3a3", - "description": "Step: 325", - "type": "color" - }, - "350": { - "value": "#9c9c9c", - "description": "Step: 350", - "type": "color" - }, - "375": { - "value": "#959595", - "description": "Step: 375", - "type": "color" - }, - "400": { - "value": "#8e8e8e", - "description": "Step: 400", - "type": "color" - }, - "425": { - "value": "#878787", - "description": "Step: 425", - "type": "color" - }, - "450": { - "value": "#808080", - "description": "Step: 450", - "type": "color" - }, - "475": { - "value": "#787878", - "description": "Step: 475", - "type": "color" - }, - "500": { - "value": "#717171", - "description": "Step: 500", - "type": "color" - }, - "525": { - "value": "#6a6a6a", - "description": "Step: 525", - "type": "color" - }, - "550": { - "value": "#636363", - "description": "Step: 550", - "type": "color" - }, - "575": { - "value": "#5c5c5c", - "description": "Step: 575", - "type": "color" - }, - "600": { - "value": "#555555", - "description": "Step: 600", - "type": "color" - }, - "625": { - "value": "#4e4e4e", - "description": "Step: 625", - "type": "color" - }, - "650": { - "value": "#474747", - "description": "Step: 650", - "type": "color" - }, - "675": { - "value": "#404040", - "description": "Step: 675", - "type": "color" - }, - "700": { - "value": "#393939", - "description": "Step: 700", - "type": "color" - }, - "725": { - "value": "#323232", - "description": "Step: 725", - "type": "color" - }, - "750": { - "value": "#2b2b2b", - "description": "Step: 750", - "type": "color" - }, - "775": { - "value": "#232323", - "description": "Step: 775", - "type": "color" - }, - "800": { - "value": "#1c1c1c", - "description": "Step: 800", - "type": "color" - }, - "825": { - "value": "#151515", - "description": "Step: 825", - "type": "color" - }, - "850": { - "value": "#0e0e0e", - "description": "Step: 850", - "type": "color" - }, - "875": { - "value": "#070707", - "description": "Step: 875", - "type": "color" - }, - "900": { - "value": "#000000", - "description": "Step: 900", - "type": "color" - } - }, - "rose": { - "0": { - "value": "#feecef", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#fcc5cf", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#fa9fae", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#f8788e", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#f5526e", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#f0284a", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#cd1434", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#97142a", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#64101e", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#330a11", - "description": "Step: 900", - "type": "color" - } - }, - "red": { - "0": { - "value": "#feecec", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#fcc6c6", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#f9a0a0", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#f57b7b", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#f15656", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#eb2d2d", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#c91818", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#951515", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#631111", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#330a0a", - "description": "Step: 900", - "type": "color" - } - }, - "orange": { - "0": { - "value": "#fef3ec", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#fcd6bd", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#fab98e", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#f99d5f", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#f9812e", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#ee670a", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#bb550e", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#8b4210", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#5d2f0e", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#331b0a", - "description": "Step: 900", - "type": "color" - } - }, - "amber": { - "0": { - "value": "#fef7ec", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#fce2ba", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#f9ce89", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#f7bb57", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#f6a724", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#de900c", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#b0740f", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#845910", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#5a3e0e", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#33240a", - "description": "Step: 900", - "type": "color" - } - }, - "yellow": { - "0": { - "value": "#fef9ec", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#fce9b7", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#f9da82", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#f8cc4d", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#f7bf17", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#d3a20b", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#a8820e", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#7e630f", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#58460e", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#33290a", - "description": "Step: 900", - "type": "color" - } - }, - "lime": { - "0": { - "value": "#f7feec", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#dffab5", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#c7f57f", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#aeef4b", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#96e818", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#79ba16", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#639714", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#4e7412", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#38530f", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#23330a", - "description": "Step: 900", - "type": "color" - } - }, - "green": { - "0": { - "value": "#ecfef2", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#b7f9ce", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#84f2ab", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#54e989", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#27dd69", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#20b456", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#1b9447", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#157338", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#105328", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#0a3319", - "description": "Step: 900", - "type": "color" - } - }, - "emerald": { - "0": { - "value": "#ecfef8", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#b0fae1", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#74f6cb", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#39f0b3", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#12d796", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#10a977", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#118a62", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#106c4e", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#0d4f3a", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#0a3326", - "description": "Step: 900", - "type": "color" - } - }, - "teal": { - "0": { - "value": "#ecfefc", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#b1faf2", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#76f5e7", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#3eeeda", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#16d6c1", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#14a898", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#138a7d", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#116c62", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#0e4f48", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#0a332f", - "description": "Step: 900", - "type": "color" - } - }, - "cyan": { - "0": { - "value": "#ecfcfe", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#b2f3fb", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#78eaf9", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#3de2f8", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#07d5f1", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#09aac0", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#0c8a9a", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#0e6a75", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#0d4c53", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#0a2f33", - "description": "Step: 900", - "type": "color" - } - }, - "sky": { - "0": { - "value": "#ecf8fe", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#b9e5fb", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#86d3f8", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#53c1f5", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#20b0f2", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#1096d3", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#1179a8", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#115c7f", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#0e4158", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#0a2633", - "description": "Step: 900", - "type": "color" - } - }, - "blue": { - "0": { - "value": "#ecf3fe", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#c5dafc", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#9ec1fa", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#76a8f8", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#4f8ff7", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#2472f2", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#135acd", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#134697", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#103063", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#0a1a33", - "description": "Step: 900", - "type": "color" - } - }, - "indigo": { - "0": { - "value": "#ececfe", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#cdcdfc", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#aeaff9", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#9091f6", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#7274f3", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#484bed", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#1b1edc", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#1819a1", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#121269", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#0a0a33", - "description": "Step: 900", - "type": "color" - } - }, - "violet": { - "0": { - "value": "#f1ecfe", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#daccfc", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#c3acfb", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#ac8cf9", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#966cf7", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#7741f2", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#5316e0", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#3f15a3", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#2b116a", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#160a33", - "description": "Step: 900", - "type": "color" - } - }, - "purple": { - "0": { - "value": "#f5ecfe", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#e4cbfc", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#d2a9fb", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#c188f9", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#b066f8", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#993bf3", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#7b14dd", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#5c14a1", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#3e1169", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#1f0a33", - "description": "Step: 900", - "type": "color" - } - }, - "fuschia": { - "0": { - "value": "#fdecfe", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#f8c5fb", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#f19ff6", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#e87af0", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#de57e8", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#d430e0", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#b31fbc", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#87198e", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#5c1260", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#310a33", - "description": "Step: 900", - "type": "color" - } - }, - "pink": { - "0": { - "value": "#feecf5", - "description": "Step: 0", - "type": "color" - }, - "100": { - "value": "#fbc6e1", - "description": "Step: 100", - "type": "color" - }, - "200": { - "value": "#f8a1cc", - "description": "Step: 200", - "type": "color" - }, - "300": { - "value": "#f47db8", - "description": "Step: 300", - "type": "color" - }, - "400": { - "value": "#ef59a3", - "description": "Step: 400", - "type": "color" - }, - "500": { - "value": "#e8318c", - "description": "Step: 500", - "type": "color" - }, - "600": { - "value": "#c71a71", - "description": "Step: 600", - "type": "color" - }, - "700": { - "value": "#941756", - "description": "Step: 700", - "type": "color" - }, - "800": { - "value": "#63113b", - "description": "Step: 800", - "type": "color" - }, - "900": { - "value": "#330a1f", - "description": "Step: 900", - "type": "color" - } - } - }, - "text": { - "family": { - "sans": { - "value": "Zed Sans", - "type": "fontFamily" - }, - "mono": { - "value": "Zed Mono", - "type": "fontFamily" - } - }, - "weight": { - "thin": { - "value": "thin", - "type": "fontWeight" - }, - "extra_light": { - "value": "extra_light", - "type": "fontWeight" - }, - "light": { - "value": "light", - "type": "fontWeight" - }, - "normal": { - "value": "normal", - "type": "fontWeight" - }, - "medium": { - "value": "medium", - "type": "fontWeight" - }, - "semibold": { - "value": "semibold", - "type": "fontWeight" - }, - "bold": { - "value": "bold", - "type": "fontWeight" - }, - "extra_bold": { - "value": "extra_bold", - "type": "fontWeight" - }, - "black": { - "value": "black", - "type": "fontWeight" - } - } - }, - "size": { - "px": { - "value": 1, - "type": "size" - }, - "xs": { - "value": 2, - "type": "size" - }, - "sm": { - "value": 4, - "type": "size" - }, - "md": { - "value": 6, - "type": "size" - }, - "lg": { - "value": 8, - "type": "size" - }, - "xl": { - "value": 12, - "type": "size" - } - }, - "fontSize": { - "3xs": { - "value": 8, - "type": "fontSize" - }, - "2xs": { - "value": 10, - "type": "fontSize" - }, - "xs": { - "value": 12, - "type": "fontSize" - }, - "sm": { - "value": 14, - "type": "fontSize" - }, - "md": { - "value": 16, - "type": "fontSize" - }, - "lg": { - "value": 18, - "type": "fontSize" - }, - "xl": { - "value": 20, - "type": "fontSize" - } - } - }, - "cave-dark": { - "meta": { - "themeName": "cave-dark" - }, - "text": { - "primary": { - "value": "#e2dfe7", - "type": "color" - }, - "secondary": { - "value": "#8b8792", - "type": "color" - }, - "muted": { - "value": "#8b8792", - "type": "color" - }, - "placeholder": { - "value": "#7e7887", - "type": "color" - }, - "active": { - "value": "#efecf4", - "type": "color" - }, - "feature": { - "value": "#576ddb", - "type": "color" - }, - "ok": { - "value": "#2a9292", - "type": "color" - }, - "error": { - "value": "#be4678", - "type": "color" - }, - "warning": { - "value": "#a06e3b", - "type": "color" - }, - "info": { - "value": "#576ddb", - "type": "color" - } - }, - "icon": { - "primary": { - "value": "#e2dfe7", - "type": "color" - }, - "secondary": { - "value": "#8b8792", - "type": "color" - }, - "muted": { - "value": "#8b8792", - "type": "color" - }, - "placeholder": { - "value": "#7e7887", - "type": "color" - }, - "active": { - "value": "#efecf4", - "type": "color" - }, - "feature": { - "value": "#576ddb", - "type": "color" - }, - "ok": { - "value": "#2a9292", - "type": "color" - }, - "error": { - "value": "#be4678", - "type": "color" - }, - "warning": { - "value": "#a06e3b", - "type": "color" - }, - "info": { - "value": "#576ddb", - "type": "color" - } - }, - "background": { - "100": { - "base": { - "value": "#332f38", - "type": "color" - }, - "hovered": { - "value": "#3f3b45", - "type": "color" - }, - "active": { - "value": "#4c4653", - "type": "color" - } - }, - "300": { - "base": { - "value": "#26232a", - "type": "color" - }, - "hovered": { - "value": "#332f38", - "type": "color" - }, - "active": { - "value": "#3f3b45", - "type": "color" - } - }, - "500": { - "base": { - "value": "#19171c", - "type": "color" - }, - "hovered": { - "value": "#1c1a20", - "type": "color" - }, - "active": { - "value": "#201d23", - "type": "color" - } - }, - "on300": { - "base": { - "value": "#19171c", - "type": "color" - }, - "hovered": { - "value": "#1c1a20", - "type": "color" - }, - "active": { - "value": "#201d23", - "type": "color" - } - }, - "on500": { - "base": { - "value": "#332f38", - "type": "color" - }, - "hovered": { - "value": "#3f3b45", - "type": "color" - }, - "active": { - "value": "#4c4653", - "type": "color" - } - }, - "ok": { - "base": { - "value": "#2a929226", - "type": "color" - }, - "hovered": { - "value": "#2a929233", - "type": "color" - }, - "active": { - "value": "#2a929240", - "type": "color" - } - }, - "error": { - "base": { - "value": "#be467826", - "type": "color" - }, - "hovered": { - "value": "#be467833", - "type": "color" - }, - "active": { - "value": "#be467840", - "type": "color" - } - }, - "warning": { - "base": { - "value": "#a06e3b26", - "type": "color" - }, - "hovered": { - "value": "#a06e3b33", - "type": "color" - }, - "active": { - "value": "#a06e3b40", - "type": "color" - } - }, - "info": { - "base": { - "value": "#576ddb26", - "type": "color" - }, - "hovered": { - "value": "#576ddb33", - "type": "color" - }, - "active": { - "value": "#576ddb40", - "type": "color" - } - } - }, - "border": { - "primary": { - "value": "#19171c", - "type": "color" - }, - "secondary": { - "value": "#26232a", - "type": "color" - }, - "muted": { - "value": "#655f6d", - "type": "color" - }, - "active": { - "value": "#655f6d", - "type": "color" - }, - "onMedia": { - "value": "#19171c1a", - "type": "color" - }, - "ok": { - "value": "#2a929226", - "type": "color" - }, - "error": { - "value": "#be467826", - "type": "color" - }, - "warning": { - "value": "#a06e3b26", - "type": "color" - }, - "info": { - "value": "#576ddb26", - "type": "color" - } - }, - "editor": { - "background": { - "value": "#19171c", - "type": "color" - }, - "indent_guide": { - "value": "#655f6d", - "type": "color" - }, - "indent_guide_active": { - "value": "#26232a", - "type": "color" - }, - "line": { - "active": { - "value": "#26232a", - "type": "color" - }, - "highlighted": { - "value": "#332f38", - "type": "color" - } - }, - "highlight": { - "selection": { - "value": "#576ddb3d", - "type": "color" - }, - "occurrence": { - "value": "#5852603d", - "type": "color" - }, - "activeOccurrence": { - "value": "#5852607a", - "type": "color" - }, - "matchingBracket": { - "value": "#201d23", - "type": "color" - }, - "match": { - "value": "#3d1576", - "type": "color" - }, - "activeMatch": { - "value": "#782edf7a", - "type": "color" - }, - "related": { - "value": "#1c1a20", - "type": "color" - } - }, - "gutter": { - "primary": { - "value": "#7e7887", - "type": "color" - }, - "active": { - "value": "#efecf4", - "type": "color" - } - } - }, - "syntax": { - "primary": { - "value": "#efecf4", - "type": "color" - }, - "comment": { - "value": "#8b8792", - "type": "color" - }, - "keyword": { - "value": "#576ddb", - "type": "color" - }, - "function": { - "value": "#a06e3b", - "type": "color" - }, - "type": { - "value": "#398bc6", - "type": "color" - }, - "variant": { - "value": "#576ddb", - "type": "color" - }, - "property": { - "value": "#576ddb", - "type": "color" - }, - "enum": { - "value": "#aa573c", - "type": "color" - }, - "operator": { - "value": "#aa573c", - "type": "color" - }, - "string": { - "value": "#aa573c", - "type": "color" - }, - "number": { - "value": "#2a9292", - "type": "color" - }, - "boolean": { - "value": "#2a9292", - "type": "color" - } - }, - "player": { - "1": { - "baseColor": { - "value": "#576ddb", - "type": "color" - }, - "cursorColor": { - "value": "#576ddb", - "type": "color" - }, - "selectionColor": { - "value": "#576ddb3d", - "type": "color" - }, - "borderColor": { - "value": "#576ddbcc", - "type": "color" - } - }, - "2": { - "baseColor": { - "value": "#2a9292", - "type": "color" - }, - "cursorColor": { - "value": "#2a9292", - "type": "color" - }, - "selectionColor": { - "value": "#2a92923d", - "type": "color" - }, - "borderColor": { - "value": "#2a9292cc", - "type": "color" - } - }, - "3": { - "baseColor": { - "value": "#bf40bf", - "type": "color" - }, - "cursorColor": { - "value": "#bf40bf", - "type": "color" - }, - "selectionColor": { - "value": "#bf40bf3d", - "type": "color" - }, - "borderColor": { - "value": "#bf40bfcc", - "type": "color" - } - }, - "4": { - "baseColor": { - "value": "#aa573c", - "type": "color" - }, - "cursorColor": { - "value": "#aa573c", - "type": "color" - }, - "selectionColor": { - "value": "#aa573c3d", - "type": "color" - }, - "borderColor": { - "value": "#aa573ccc", - "type": "color" - } - }, - "5": { - "baseColor": { - "value": "#955ae7", - "type": "color" - }, - "cursorColor": { - "value": "#955ae7", - "type": "color" - }, - "selectionColor": { - "value": "#955ae73d", - "type": "color" - }, - "borderColor": { - "value": "#955ae7cc", - "type": "color" - } - }, - "6": { - "baseColor": { - "value": "#398bc6", - "type": "color" - }, - "cursorColor": { - "value": "#398bc6", - "type": "color" - }, - "selectionColor": { - "value": "#398bc63d", - "type": "color" - }, - "borderColor": { - "value": "#398bc6cc", - "type": "color" - } - }, - "7": { - "baseColor": { - "value": "#be4678", - "type": "color" - }, - "cursorColor": { - "value": "#be4678", - "type": "color" - }, - "selectionColor": { - "value": "#be46783d", - "type": "color" - }, - "borderColor": { - "value": "#be4678cc", - "type": "color" - } - }, - "8": { - "baseColor": { - "value": "#a06e3b", - "type": "color" - }, - "cursorColor": { - "value": "#a06e3b", - "type": "color" - }, - "selectionColor": { - "value": "#a06e3b3d", - "type": "color" - }, - "borderColor": { - "value": "#a06e3bcc", - "type": "color" - } - } - }, - "shadowAlpha": { - "value": 0.24, - "type": "number" - } - }, - "cave-light": { - "meta": { - "themeName": "cave-light" - }, - "text": { - "primary": { - "value": "#26232a", - "type": "color" - }, - "secondary": { - "value": "#585260", - "type": "color" - }, - "muted": { - "value": "#585260", - "type": "color" - }, - "placeholder": { - "value": "#655f6d", - "type": "color" - }, - "active": { - "value": "#19171c", - "type": "color" - }, - "feature": { - "value": "#576ddb", - "type": "color" - }, - "ok": { - "value": "#2a9292", - "type": "color" - }, - "error": { - "value": "#be4678", - "type": "color" - }, - "warning": { - "value": "#a06e3b", - "type": "color" - }, - "info": { - "value": "#576ddb", - "type": "color" - } - }, - "icon": { - "primary": { - "value": "#26232a", - "type": "color" - }, - "secondary": { - "value": "#585260", - "type": "color" - }, - "muted": { - "value": "#585260", - "type": "color" - }, - "placeholder": { - "value": "#655f6d", - "type": "color" - }, - "active": { - "value": "#19171c", - "type": "color" - }, - "feature": { - "value": "#576ddb", - "type": "color" - }, - "ok": { - "value": "#2a9292", - "type": "color" - }, - "error": { - "value": "#be4678", - "type": "color" - }, - "warning": { - "value": "#a06e3b", - "type": "color" - }, - "info": { - "value": "#576ddb", - "type": "color" - } - }, - "background": { - "100": { - "base": { - "value": "#ccc9d2", - "type": "color" - }, - "hovered": { - "value": "#b7b3bd", - "type": "color" - }, - "active": { - "value": "#a19da7", - "type": "color" - } - }, - "300": { - "base": { - "value": "#e2dfe7", - "type": "color" - }, - "hovered": { - "value": "#ccc9d2", - "type": "color" - }, - "active": { - "value": "#b7b3bd", - "type": "color" - } - }, - "500": { - "base": { - "value": "#efecf4", - "type": "color" - }, - "hovered": { - "value": "#ece9f1", - "type": "color" - }, - "active": { - "value": "#e9e6ee", - "type": "color" - } - }, - "on300": { - "base": { - "value": "#efecf4", - "type": "color" - }, - "hovered": { - "value": "#ece9f1", - "type": "color" - }, - "active": { - "value": "#e9e6ee", - "type": "color" - } - }, - "on500": { - "base": { - "value": "#ccc9d2", - "type": "color" - }, - "hovered": { - "value": "#b7b3bd", - "type": "color" - }, - "active": { - "value": "#a19da7", - "type": "color" - } - }, - "ok": { - "base": { - "value": "#2a929226", - "type": "color" - }, - "hovered": { - "value": "#2a929233", - "type": "color" - }, - "active": { - "value": "#2a929240", - "type": "color" - } - }, - "error": { - "base": { - "value": "#be467826", - "type": "color" - }, - "hovered": { - "value": "#be467833", - "type": "color" - }, - "active": { - "value": "#be467840", - "type": "color" - } - }, - "warning": { - "base": { - "value": "#a06e3b26", - "type": "color" - }, - "hovered": { - "value": "#a06e3b33", - "type": "color" - }, - "active": { - "value": "#a06e3b40", - "type": "color" - } - }, - "info": { - "base": { - "value": "#576ddb26", - "type": "color" - }, - "hovered": { - "value": "#576ddb33", - "type": "color" - }, - "active": { - "value": "#576ddb40", - "type": "color" - } - } - }, - "border": { - "primary": { - "value": "#b7b3bd", - "type": "color" - }, - "secondary": { - "value": "#ccc9d2", - "type": "color" - }, - "muted": { - "value": "#e2dfe7", - "type": "color" - }, - "active": { - "value": "#655f6d", - "type": "color" - }, - "onMedia": { - "value": "#efecf41a", - "type": "color" - }, - "ok": { - "value": "#2a929226", - "type": "color" - }, - "error": { - "value": "#be467826", - "type": "color" - }, - "warning": { - "value": "#a06e3b26", - "type": "color" - }, - "info": { - "value": "#576ddb26", - "type": "color" - } - }, - "editor": { - "background": { - "value": "#efecf4", - "type": "color" - }, - "indent_guide": { - "value": "#e2dfe7", - "type": "color" - }, - "indent_guide_active": { - "value": "#ccc9d2", - "type": "color" - }, - "line": { - "active": { - "value": "#e2dfe7", - "type": "color" - }, - "highlighted": { - "value": "#ccc9d2", - "type": "color" - } - }, - "highlight": { - "selection": { - "value": "#576ddb3d", - "type": "color" - }, - "occurrence": { - "value": "#8b87921f", - "type": "color" - }, - "activeOccurrence": { - "value": "#8b87923d", - "type": "color" - }, - "matchingBracket": { - "value": "#e9e6ee", - "type": "color" - }, - "match": { - "value": "#d5bdfa", - "type": "color" - }, - "activeMatch": { - "value": "#a775ee3d", - "type": "color" - }, - "related": { - "value": "#ece9f1", - "type": "color" - } - }, - "gutter": { - "primary": { - "value": "#655f6d", - "type": "color" - }, - "active": { - "value": "#19171c", - "type": "color" - } - } - }, - "syntax": { - "primary": { - "value": "#19171c", - "type": "color" - }, - "comment": { - "value": "#585260", - "type": "color" - }, - "keyword": { - "value": "#576ddb", - "type": "color" - }, - "function": { - "value": "#a06e3b", - "type": "color" - }, - "type": { - "value": "#398bc6", - "type": "color" - }, - "variant": { - "value": "#576ddb", - "type": "color" - }, - "property": { - "value": "#576ddb", - "type": "color" - }, - "enum": { - "value": "#aa573c", - "type": "color" - }, - "operator": { - "value": "#aa573c", - "type": "color" - }, - "string": { - "value": "#aa573c", - "type": "color" - }, - "number": { - "value": "#2a9292", - "type": "color" - }, - "boolean": { - "value": "#2a9292", - "type": "color" - } - }, - "player": { - "1": { - "baseColor": { - "value": "#576ddb", - "type": "color" - }, - "cursorColor": { - "value": "#576ddb", - "type": "color" - }, - "selectionColor": { - "value": "#576ddb3d", - "type": "color" - }, - "borderColor": { - "value": "#576ddbcc", - "type": "color" - } - }, - "2": { - "baseColor": { - "value": "#2a9292", - "type": "color" - }, - "cursorColor": { - "value": "#2a9292", - "type": "color" - }, - "selectionColor": { - "value": "#2a92923d", - "type": "color" - }, - "borderColor": { - "value": "#2a9292cc", - "type": "color" - } - }, - "3": { - "baseColor": { - "value": "#bf40bf", - "type": "color" - }, - "cursorColor": { - "value": "#bf40bf", - "type": "color" - }, - "selectionColor": { - "value": "#bf40bf3d", - "type": "color" - }, - "borderColor": { - "value": "#bf40bfcc", - "type": "color" - } - }, - "4": { - "baseColor": { - "value": "#aa573c", - "type": "color" - }, - "cursorColor": { - "value": "#aa573c", - "type": "color" - }, - "selectionColor": { - "value": "#aa573c3d", - "type": "color" - }, - "borderColor": { - "value": "#aa573ccc", - "type": "color" - } - }, - "5": { - "baseColor": { - "value": "#955ae7", - "type": "color" - }, - "cursorColor": { - "value": "#955ae7", - "type": "color" - }, - "selectionColor": { - "value": "#955ae73d", - "type": "color" - }, - "borderColor": { - "value": "#955ae7cc", - "type": "color" - } - }, - "6": { - "baseColor": { - "value": "#398bc6", - "type": "color" - }, - "cursorColor": { - "value": "#398bc6", - "type": "color" - }, - "selectionColor": { - "value": "#398bc63d", - "type": "color" - }, - "borderColor": { - "value": "#398bc6cc", - "type": "color" - } - }, - "7": { - "baseColor": { - "value": "#be4678", - "type": "color" - }, - "cursorColor": { - "value": "#be4678", - "type": "color" - }, - "selectionColor": { - "value": "#be46783d", - "type": "color" - }, - "borderColor": { - "value": "#be4678cc", - "type": "color" - } - }, - "8": { - "baseColor": { - "value": "#a06e3b", - "type": "color" - }, - "cursorColor": { - "value": "#a06e3b", - "type": "color" - }, - "selectionColor": { - "value": "#a06e3b3d", - "type": "color" - }, - "borderColor": { - "value": "#a06e3bcc", - "type": "color" - } - } - }, - "shadowAlpha": { - "value": 0.12, - "type": "number" - } - }, - "solarized-dark": { - "meta": { - "themeName": "solarized-dark" - }, - "text": { - "primary": { - "value": "#eee8d5", - "type": "color" - }, - "secondary": { - "value": "#93a1a1", - "type": "color" - }, - "muted": { - "value": "#93a1a1", - "type": "color" - }, - "placeholder": { - "value": "#839496", - "type": "color" - }, - "active": { - "value": "#fdf6e3", - "type": "color" - }, - "feature": { - "value": "#268bd2", - "type": "color" - }, - "ok": { - "value": "#859900", - "type": "color" - }, - "error": { - "value": "#dc322f", - "type": "color" - }, - "warning": { - "value": "#b58900", - "type": "color" - }, - "info": { - "value": "#268bd2", - "type": "color" - } - }, - "icon": { - "primary": { - "value": "#eee8d5", - "type": "color" - }, - "secondary": { - "value": "#93a1a1", - "type": "color" - }, - "muted": { - "value": "#93a1a1", - "type": "color" - }, - "placeholder": { - "value": "#839496", - "type": "color" - }, - "active": { - "value": "#fdf6e3", - "type": "color" - }, - "feature": { - "value": "#268bd2", - "type": "color" - }, - "ok": { - "value": "#859900", - "type": "color" - }, - "error": { - "value": "#dc322f", - "type": "color" - }, - "warning": { - "value": "#b58900", - "type": "color" - }, - "info": { - "value": "#268bd2", - "type": "color" - } - }, - "background": { - "100": { - "base": { - "value": "#1b444f", - "type": "color" - }, - "hovered": { - "value": "#30525c", - "type": "color" - }, - "active": { - "value": "#446068", - "type": "color" - } - }, - "300": { - "base": { - "value": "#073642", - "type": "color" - }, - "hovered": { - "value": "#1b444f", - "type": "color" - }, - "active": { - "value": "#30525c", - "type": "color" - } - }, - "500": { - "base": { - "value": "#002b36", - "type": "color" - }, - "hovered": { - "value": "#022e39", - "type": "color" - }, - "active": { - "value": "#04313c", - "type": "color" - } - }, - "on300": { - "base": { - "value": "#002b36", - "type": "color" - }, - "hovered": { - "value": "#022e39", - "type": "color" - }, - "active": { - "value": "#04313c", - "type": "color" - } - }, - "on500": { - "base": { - "value": "#1b444f", - "type": "color" - }, - "hovered": { - "value": "#30525c", - "type": "color" - }, - "active": { - "value": "#446068", - "type": "color" - } - }, - "ok": { - "base": { - "value": "#85990026", - "type": "color" - }, - "hovered": { - "value": "#85990033", - "type": "color" - }, - "active": { - "value": "#85990040", - "type": "color" - } - }, - "error": { - "base": { - "value": "#dc322f26", - "type": "color" - }, - "hovered": { - "value": "#dc322f33", - "type": "color" - }, - "active": { - "value": "#dc322f40", - "type": "color" - } - }, - "warning": { - "base": { - "value": "#b5890026", - "type": "color" - }, - "hovered": { - "value": "#b5890033", - "type": "color" - }, - "active": { - "value": "#b5890040", - "type": "color" - } - }, - "info": { - "base": { - "value": "#268bd226", - "type": "color" - }, - "hovered": { - "value": "#268bd233", - "type": "color" - }, - "active": { - "value": "#268bd240", - "type": "color" - } - } - }, - "border": { - "primary": { - "value": "#002b36", - "type": "color" - }, - "secondary": { - "value": "#073642", - "type": "color" - }, - "muted": { - "value": "#657b83", - "type": "color" - }, - "active": { - "value": "#657b83", - "type": "color" - }, - "onMedia": { - "value": "#002b361a", - "type": "color" - }, - "ok": { - "value": "#85990026", - "type": "color" - }, - "error": { - "value": "#dc322f26", - "type": "color" - }, - "warning": { - "value": "#b5890026", - "type": "color" - }, - "info": { - "value": "#268bd226", - "type": "color" - } - }, - "editor": { - "background": { - "value": "#002b36", - "type": "color" - }, - "indent_guide": { - "value": "#657b83", - "type": "color" - }, - "indent_guide_active": { - "value": "#073642", - "type": "color" - }, - "line": { - "active": { - "value": "#073642", - "type": "color" - }, - "highlighted": { - "value": "#1b444f", - "type": "color" - } - }, - "highlight": { - "selection": { - "value": "#268bd23d", - "type": "color" - }, - "occurrence": { - "value": "#586e753d", - "type": "color" - }, - "activeOccurrence": { - "value": "#586e757a", - "type": "color" - }, - "matchingBracket": { - "value": "#04313c", - "type": "color" - }, - "match": { - "value": "#1b1f6b", - "type": "color" - }, - "activeMatch": { - "value": "#434abc7a", - "type": "color" - }, - "related": { - "value": "#022e39", - "type": "color" - } - }, - "gutter": { - "primary": { - "value": "#839496", - "type": "color" - }, - "active": { - "value": "#fdf6e3", - "type": "color" - } - } - }, - "syntax": { - "primary": { - "value": "#fdf6e3", - "type": "color" - }, - "comment": { - "value": "#93a1a1", - "type": "color" - }, - "keyword": { - "value": "#268bd2", - "type": "color" - }, - "function": { - "value": "#b58900", - "type": "color" - }, - "type": { - "value": "#2aa198", - "type": "color" - }, - "variant": { - "value": "#268bd2", - "type": "color" - }, - "property": { - "value": "#268bd2", - "type": "color" - }, - "enum": { - "value": "#cb4b16", - "type": "color" - }, - "operator": { - "value": "#cb4b16", - "type": "color" - }, - "string": { - "value": "#cb4b16", - "type": "color" - }, - "number": { - "value": "#859900", - "type": "color" - }, - "boolean": { - "value": "#859900", - "type": "color" - } - }, - "player": { - "1": { - "baseColor": { - "value": "#268bd2", - "type": "color" - }, - "cursorColor": { - "value": "#268bd2", - "type": "color" - }, - "selectionColor": { - "value": "#268bd23d", - "type": "color" - }, - "borderColor": { - "value": "#268bd2cc", - "type": "color" - } - }, - "2": { - "baseColor": { - "value": "#859900", - "type": "color" - }, - "cursorColor": { - "value": "#859900", - "type": "color" - }, - "selectionColor": { - "value": "#8599003d", - "type": "color" - }, - "borderColor": { - "value": "#859900cc", - "type": "color" - } - }, - "3": { - "baseColor": { - "value": "#d33682", - "type": "color" - }, - "cursorColor": { - "value": "#d33682", - "type": "color" - }, - "selectionColor": { - "value": "#d336823d", - "type": "color" - }, - "borderColor": { - "value": "#d33682cc", - "type": "color" - } - }, - "4": { - "baseColor": { - "value": "#cb4b16", - "type": "color" - }, - "cursorColor": { - "value": "#cb4b16", - "type": "color" - }, - "selectionColor": { - "value": "#cb4b163d", - "type": "color" - }, - "borderColor": { - "value": "#cb4b16cc", - "type": "color" - } - }, - "5": { - "baseColor": { - "value": "#6c71c4", - "type": "color" - }, - "cursorColor": { - "value": "#6c71c4", - "type": "color" - }, - "selectionColor": { - "value": "#6c71c43d", - "type": "color" - }, - "borderColor": { - "value": "#6c71c4cc", - "type": "color" - } - }, - "6": { - "baseColor": { - "value": "#2aa198", - "type": "color" - }, - "cursorColor": { - "value": "#2aa198", - "type": "color" - }, - "selectionColor": { - "value": "#2aa1983d", - "type": "color" - }, - "borderColor": { - "value": "#2aa198cc", - "type": "color" - } - }, - "7": { - "baseColor": { - "value": "#dc322f", - "type": "color" - }, - "cursorColor": { - "value": "#dc322f", - "type": "color" - }, - "selectionColor": { - "value": "#dc322f3d", - "type": "color" - }, - "borderColor": { - "value": "#dc322fcc", - "type": "color" - } - }, - "8": { - "baseColor": { - "value": "#b58900", - "type": "color" - }, - "cursorColor": { - "value": "#b58900", - "type": "color" - }, - "selectionColor": { - "value": "#b589003d", - "type": "color" - }, - "borderColor": { - "value": "#b58900cc", - "type": "color" - } - } - }, - "shadowAlpha": { - "value": 0.24, - "type": "number" - } - }, - "solarized-light": { - "meta": { - "themeName": "solarized-light" - }, - "text": { - "primary": { - "value": "#073642", - "type": "color" - }, - "secondary": { - "value": "#586e75", - "type": "color" - }, - "muted": { - "value": "#586e75", - "type": "color" - }, - "placeholder": { - "value": "#657b83", - "type": "color" - }, - "active": { - "value": "#002b36", - "type": "color" - }, - "feature": { - "value": "#268bd2", - "type": "color" - }, - "ok": { - "value": "#859900", - "type": "color" - }, - "error": { - "value": "#dc322f", - "type": "color" - }, - "warning": { - "value": "#b58900", - "type": "color" - }, - "info": { - "value": "#268bd2", - "type": "color" - } - }, - "icon": { - "primary": { - "value": "#073642", - "type": "color" - }, - "secondary": { - "value": "#586e75", - "type": "color" - }, - "muted": { - "value": "#586e75", - "type": "color" - }, - "placeholder": { - "value": "#657b83", - "type": "color" - }, - "active": { - "value": "#002b36", - "type": "color" - }, - "feature": { - "value": "#268bd2", - "type": "color" - }, - "ok": { - "value": "#859900", - "type": "color" - }, - "error": { - "value": "#dc322f", - "type": "color" - }, - "warning": { - "value": "#b58900", - "type": "color" - }, - "info": { - "value": "#268bd2", - "type": "color" - } - }, - "background": { - "100": { - "base": { - "value": "#d7d6c8", - "type": "color" - }, - "hovered": { - "value": "#c1c5bb", - "type": "color" - }, - "active": { - "value": "#aab3ae", - "type": "color" - } - }, - "300": { - "base": { - "value": "#eee8d5", - "type": "color" - }, - "hovered": { - "value": "#d7d6c8", - "type": "color" - }, - "active": { - "value": "#c1c5bb", - "type": "color" - } - }, - "500": { - "base": { - "value": "#fdf6e3", - "type": "color" - }, - "hovered": { - "value": "#f9f3e0", - "type": "color" - }, - "active": { - "value": "#f6efdc", - "type": "color" - } - }, - "on300": { - "base": { - "value": "#fdf6e3", - "type": "color" - }, - "hovered": { - "value": "#f9f3e0", - "type": "color" - }, - "active": { - "value": "#f6efdc", - "type": "color" - } - }, - "on500": { - "base": { - "value": "#d7d6c8", - "type": "color" - }, - "hovered": { - "value": "#c1c5bb", - "type": "color" - }, - "active": { - "value": "#aab3ae", - "type": "color" - } - }, - "ok": { - "base": { - "value": "#85990026", - "type": "color" - }, - "hovered": { - "value": "#85990033", - "type": "color" - }, - "active": { - "value": "#85990040", - "type": "color" - } - }, - "error": { - "base": { - "value": "#dc322f26", - "type": "color" - }, - "hovered": { - "value": "#dc322f33", - "type": "color" - }, - "active": { - "value": "#dc322f40", - "type": "color" - } - }, - "warning": { - "base": { - "value": "#b5890026", - "type": "color" - }, - "hovered": { - "value": "#b5890033", - "type": "color" - }, - "active": { - "value": "#b5890040", - "type": "color" - } - }, - "info": { - "base": { - "value": "#268bd226", - "type": "color" - }, - "hovered": { - "value": "#268bd233", - "type": "color" - }, - "active": { - "value": "#268bd240", - "type": "color" - } - } - }, - "border": { - "primary": { - "value": "#c1c5bb", - "type": "color" - }, - "secondary": { - "value": "#d7d6c8", - "type": "color" - }, - "muted": { - "value": "#eee8d5", - "type": "color" - }, - "active": { - "value": "#657b83", - "type": "color" - }, - "onMedia": { - "value": "#fdf6e31a", - "type": "color" - }, - "ok": { - "value": "#85990026", - "type": "color" - }, - "error": { - "value": "#dc322f26", - "type": "color" - }, - "warning": { - "value": "#b5890026", - "type": "color" - }, - "info": { - "value": "#268bd226", - "type": "color" - } - }, - "editor": { - "background": { - "value": "#fdf6e3", - "type": "color" - }, - "indent_guide": { - "value": "#eee8d5", - "type": "color" - }, - "indent_guide_active": { - "value": "#d7d6c8", - "type": "color" - }, - "line": { - "active": { - "value": "#eee8d5", - "type": "color" - }, - "highlighted": { - "value": "#d7d6c8", - "type": "color" - } - }, - "highlight": { - "selection": { - "value": "#268bd23d", - "type": "color" - }, - "occurrence": { - "value": "#93a1a11f", - "type": "color" - }, - "activeOccurrence": { - "value": "#93a1a13d", - "type": "color" - }, - "matchingBracket": { - "value": "#f6efdc", - "type": "color" - }, - "match": { - "value": "#bcc0f6", - "type": "color" - }, - "activeMatch": { - "value": "#7f84d73d", - "type": "color" - }, - "related": { - "value": "#f9f3e0", - "type": "color" - } - }, - "gutter": { - "primary": { - "value": "#657b83", - "type": "color" - }, - "active": { - "value": "#002b36", - "type": "color" - } - } - }, - "syntax": { - "primary": { - "value": "#002b36", - "type": "color" - }, - "comment": { - "value": "#586e75", - "type": "color" - }, - "keyword": { - "value": "#268bd2", - "type": "color" - }, - "function": { - "value": "#b58900", - "type": "color" - }, - "type": { - "value": "#2aa198", - "type": "color" - }, - "variant": { - "value": "#268bd2", - "type": "color" - }, - "property": { - "value": "#268bd2", - "type": "color" - }, - "enum": { - "value": "#cb4b16", - "type": "color" - }, - "operator": { - "value": "#cb4b16", - "type": "color" - }, - "string": { - "value": "#cb4b16", - "type": "color" - }, - "number": { - "value": "#859900", - "type": "color" - }, - "boolean": { - "value": "#859900", - "type": "color" - } - }, - "player": { - "1": { - "baseColor": { - "value": "#268bd2", - "type": "color" - }, - "cursorColor": { - "value": "#268bd2", - "type": "color" - }, - "selectionColor": { - "value": "#268bd23d", - "type": "color" - }, - "borderColor": { - "value": "#268bd2cc", - "type": "color" - } - }, - "2": { - "baseColor": { - "value": "#859900", - "type": "color" - }, - "cursorColor": { - "value": "#859900", - "type": "color" - }, - "selectionColor": { - "value": "#8599003d", - "type": "color" - }, - "borderColor": { - "value": "#859900cc", - "type": "color" - } - }, - "3": { - "baseColor": { - "value": "#d33682", - "type": "color" - }, - "cursorColor": { - "value": "#d33682", - "type": "color" - }, - "selectionColor": { - "value": "#d336823d", - "type": "color" - }, - "borderColor": { - "value": "#d33682cc", - "type": "color" - } - }, - "4": { - "baseColor": { - "value": "#cb4b16", - "type": "color" - }, - "cursorColor": { - "value": "#cb4b16", - "type": "color" - }, - "selectionColor": { - "value": "#cb4b163d", - "type": "color" - }, - "borderColor": { - "value": "#cb4b16cc", - "type": "color" - } - }, - "5": { - "baseColor": { - "value": "#6c71c4", - "type": "color" - }, - "cursorColor": { - "value": "#6c71c4", - "type": "color" - }, - "selectionColor": { - "value": "#6c71c43d", - "type": "color" - }, - "borderColor": { - "value": "#6c71c4cc", - "type": "color" - } - }, - "6": { - "baseColor": { - "value": "#2aa198", - "type": "color" - }, - "cursorColor": { - "value": "#2aa198", - "type": "color" - }, - "selectionColor": { - "value": "#2aa1983d", - "type": "color" - }, - "borderColor": { - "value": "#2aa198cc", - "type": "color" - } - }, - "7": { - "baseColor": { - "value": "#dc322f", - "type": "color" - }, - "cursorColor": { - "value": "#dc322f", - "type": "color" - }, - "selectionColor": { - "value": "#dc322f3d", - "type": "color" - }, - "borderColor": { - "value": "#dc322fcc", - "type": "color" - } - }, - "8": { - "baseColor": { - "value": "#b58900", - "type": "color" - }, - "cursorColor": { - "value": "#b58900", - "type": "color" - }, - "selectionColor": { - "value": "#b589003d", - "type": "color" - }, - "borderColor": { - "value": "#b58900cc", - "type": "color" - } - } - }, - "shadowAlpha": { - "value": 0.12, - "type": "number" - } - }, - "sulphurpool-dark": { - "meta": { - "themeName": "sulphurpool-dark" - }, - "text": { - "primary": { - "value": "#dfe2f1", - "type": "color" - }, - "secondary": { - "value": "#979db4", - "type": "color" - }, - "muted": { - "value": "#979db4", - "type": "color" - }, - "placeholder": { - "value": "#898ea4", - "type": "color" - }, - "active": { - "value": "#f5f7ff", - "type": "color" - }, - "feature": { - "value": "#3d8fd1", - "type": "color" - }, - "ok": { - "value": "#ac9739", - "type": "color" - }, - "error": { - "value": "#c94922", - "type": "color" - }, - "warning": { - "value": "#c08b30", - "type": "color" - }, - "info": { - "value": "#3d8fd1", - "type": "color" - } - }, - "icon": { - "primary": { - "value": "#dfe2f1", - "type": "color" - }, - "secondary": { - "value": "#979db4", - "type": "color" - }, - "muted": { - "value": "#979db4", - "type": "color" - }, - "placeholder": { - "value": "#898ea4", - "type": "color" - }, - "active": { - "value": "#f5f7ff", - "type": "color" - }, - "feature": { - "value": "#3d8fd1", - "type": "color" - }, - "ok": { - "value": "#ac9739", - "type": "color" - }, - "error": { - "value": "#c94922", - "type": "color" - }, - "warning": { - "value": "#c08b30", - "type": "color" - }, - "info": { - "value": "#3d8fd1", - "type": "color" - } - }, - "background": { - "100": { - "base": { - "value": "#363f62", - "type": "color" - }, - "hovered": { - "value": "#444c6f", - "type": "color" - }, - "active": { - "value": "#51597b", - "type": "color" - } - }, - "300": { - "base": { - "value": "#293256", - "type": "color" - }, - "hovered": { - "value": "#363f62", - "type": "color" - }, - "active": { - "value": "#444c6f", - "type": "color" - } - }, - "500": { - "base": { - "value": "#202746", - "type": "color" - }, - "hovered": { - "value": "#222a4a", - "type": "color" - }, - "active": { - "value": "#252d4e", - "type": "color" - } - }, - "on300": { - "base": { - "value": "#202746", - "type": "color" - }, - "hovered": { - "value": "#222a4a", - "type": "color" - }, - "active": { - "value": "#252d4e", - "type": "color" - } - }, - "on500": { - "base": { - "value": "#363f62", - "type": "color" - }, - "hovered": { - "value": "#444c6f", - "type": "color" - }, - "active": { - "value": "#51597b", - "type": "color" - } - }, - "ok": { - "base": { - "value": "#ac973926", - "type": "color" - }, - "hovered": { - "value": "#ac973933", - "type": "color" - }, - "active": { - "value": "#ac973940", - "type": "color" - } - }, - "error": { - "base": { - "value": "#c9492226", - "type": "color" - }, - "hovered": { - "value": "#c9492233", - "type": "color" - }, - "active": { - "value": "#c9492240", - "type": "color" - } - }, - "warning": { - "base": { - "value": "#c08b3026", - "type": "color" - }, - "hovered": { - "value": "#c08b3033", - "type": "color" - }, - "active": { - "value": "#c08b3040", - "type": "color" - } - }, - "info": { - "base": { - "value": "#3d8fd126", - "type": "color" - }, - "hovered": { - "value": "#3d8fd133", - "type": "color" - }, - "active": { - "value": "#3d8fd140", - "type": "color" - } - } - }, - "border": { - "primary": { - "value": "#202746", - "type": "color" - }, - "secondary": { - "value": "#293256", - "type": "color" - }, - "muted": { - "value": "#6b7394", - "type": "color" - }, - "active": { - "value": "#6b7394", - "type": "color" - }, - "onMedia": { - "value": "#2027461a", - "type": "color" - }, - "ok": { - "value": "#ac973926", - "type": "color" - }, - "error": { - "value": "#c9492226", - "type": "color" - }, - "warning": { - "value": "#c08b3026", - "type": "color" - }, - "info": { - "value": "#3d8fd126", - "type": "color" - } - }, - "editor": { - "background": { - "value": "#202746", - "type": "color" - }, - "indent_guide": { - "value": "#6b7394", - "type": "color" - }, - "indent_guide_active": { - "value": "#293256", - "type": "color" - }, - "line": { - "active": { - "value": "#293256", - "type": "color" - }, - "highlighted": { - "value": "#363f62", - "type": "color" - } - }, - "highlight": { - "selection": { - "value": "#3d8fd13d", - "type": "color" - }, - "occurrence": { - "value": "#5e66873d", - "type": "color" - }, - "activeOccurrence": { - "value": "#5e66877a", - "type": "color" - }, - "matchingBracket": { - "value": "#252d4e", - "type": "color" - }, - "match": { - "value": "#1a2a6d", - "type": "color" - }, - "activeMatch": { - "value": "#3d56c47a", - "type": "color" - }, - "related": { - "value": "#222a4a", - "type": "color" - } - }, - "gutter": { - "primary": { - "value": "#898ea4", - "type": "color" - }, - "active": { - "value": "#f5f7ff", - "type": "color" - } - } - }, - "syntax": { - "primary": { - "value": "#f5f7ff", - "type": "color" - }, - "comment": { - "value": "#979db4", - "type": "color" - }, - "keyword": { - "value": "#3d8fd1", - "type": "color" - }, - "function": { - "value": "#c08b30", - "type": "color" - }, - "type": { - "value": "#22a2c9", - "type": "color" - }, - "variant": { - "value": "#3d8fd1", - "type": "color" - }, - "property": { - "value": "#3d8fd1", - "type": "color" - }, - "enum": { - "value": "#c76b29", - "type": "color" - }, - "operator": { - "value": "#c76b29", - "type": "color" - }, - "string": { - "value": "#c76b29", - "type": "color" - }, - "number": { - "value": "#ac9739", - "type": "color" - }, - "boolean": { - "value": "#ac9739", - "type": "color" - } - }, - "player": { - "1": { - "baseColor": { - "value": "#3d8fd1", - "type": "color" - }, - "cursorColor": { - "value": "#3d8fd1", - "type": "color" - }, - "selectionColor": { - "value": "#3d8fd13d", - "type": "color" - }, - "borderColor": { - "value": "#3d8fd1cc", - "type": "color" - } - }, - "2": { - "baseColor": { - "value": "#ac9739", - "type": "color" - }, - "cursorColor": { - "value": "#ac9739", - "type": "color" - }, - "selectionColor": { - "value": "#ac97393d", - "type": "color" - }, - "borderColor": { - "value": "#ac9739cc", - "type": "color" - } - }, - "3": { - "baseColor": { - "value": "#9c637a", - "type": "color" - }, - "cursorColor": { - "value": "#9c637a", - "type": "color" - }, - "selectionColor": { - "value": "#9c637a3d", - "type": "color" - }, - "borderColor": { - "value": "#9c637acc", - "type": "color" - } - }, - "4": { - "baseColor": { - "value": "#c76b29", - "type": "color" - }, - "cursorColor": { - "value": "#c76b29", - "type": "color" - }, - "selectionColor": { - "value": "#c76b293d", - "type": "color" - }, - "borderColor": { - "value": "#c76b29cc", - "type": "color" - } - }, - "5": { - "baseColor": { - "value": "#6679cc", - "type": "color" - }, - "cursorColor": { - "value": "#6679cc", - "type": "color" - }, - "selectionColor": { - "value": "#6679cc3d", - "type": "color" - }, - "borderColor": { - "value": "#6679cccc", - "type": "color" - } - }, - "6": { - "baseColor": { - "value": "#22a2c9", - "type": "color" - }, - "cursorColor": { - "value": "#22a2c9", - "type": "color" - }, - "selectionColor": { - "value": "#22a2c93d", - "type": "color" - }, - "borderColor": { - "value": "#22a2c9cc", - "type": "color" - } - }, - "7": { - "baseColor": { - "value": "#c94922", - "type": "color" - }, - "cursorColor": { - "value": "#c94922", - "type": "color" - }, - "selectionColor": { - "value": "#c949223d", - "type": "color" - }, - "borderColor": { - "value": "#c94922cc", - "type": "color" - } - }, - "8": { - "baseColor": { - "value": "#c08b30", - "type": "color" - }, - "cursorColor": { - "value": "#c08b30", - "type": "color" - }, - "selectionColor": { - "value": "#c08b303d", - "type": "color" - }, - "borderColor": { - "value": "#c08b30cc", - "type": "color" - } - } - }, - "shadowAlpha": { - "value": 0.24, - "type": "number" - } - }, - "sulphurpool-light": { - "meta": { - "themeName": "sulphurpool-light" - }, - "text": { - "primary": { - "value": "#293256", - "type": "color" - }, - "secondary": { - "value": "#5e6687", - "type": "color" - }, - "muted": { - "value": "#5e6687", - "type": "color" - }, - "placeholder": { - "value": "#6b7394", - "type": "color" - }, - "active": { - "value": "#202746", - "type": "color" - }, - "feature": { - "value": "#3d8fd1", - "type": "color" - }, - "ok": { - "value": "#ac9739", - "type": "color" - }, - "error": { - "value": "#c94922", - "type": "color" - }, - "warning": { - "value": "#c08b30", - "type": "color" - }, - "info": { - "value": "#3d8fd1", - "type": "color" - } - }, - "icon": { - "primary": { - "value": "#293256", - "type": "color" - }, - "secondary": { - "value": "#5e6687", - "type": "color" - }, - "muted": { - "value": "#5e6687", - "type": "color" - }, - "placeholder": { - "value": "#6b7394", - "type": "color" - }, - "active": { - "value": "#202746", - "type": "color" - }, - "feature": { - "value": "#3d8fd1", - "type": "color" - }, - "ok": { - "value": "#ac9739", - "type": "color" - }, - "error": { - "value": "#c94922", - "type": "color" - }, - "warning": { - "value": "#c08b30", - "type": "color" - }, - "info": { - "value": "#3d8fd1", - "type": "color" - } - }, - "background": { - "100": { - "base": { - "value": "#cdd1e2", - "type": "color" - }, - "hovered": { - "value": "#bbc0d3", - "type": "color" - }, - "active": { - "value": "#a9aec3", - "type": "color" - } - }, - "300": { - "base": { - "value": "#dfe2f1", - "type": "color" - }, - "hovered": { - "value": "#cdd1e2", - "type": "color" - }, - "active": { - "value": "#bbc0d3", - "type": "color" - } - }, - "500": { - "base": { - "value": "#f5f7ff", - "type": "color" - }, - "hovered": { - "value": "#f0f2fc", - "type": "color" - }, - "active": { - "value": "#eaedf8", - "type": "color" - } - }, - "on300": { - "base": { - "value": "#f5f7ff", - "type": "color" - }, - "hovered": { - "value": "#f0f2fc", - "type": "color" - }, - "active": { - "value": "#eaedf8", - "type": "color" - } - }, - "on500": { - "base": { - "value": "#cdd1e2", - "type": "color" - }, - "hovered": { - "value": "#bbc0d3", - "type": "color" - }, - "active": { - "value": "#a9aec3", - "type": "color" - } - }, - "ok": { - "base": { - "value": "#ac973926", - "type": "color" - }, - "hovered": { - "value": "#ac973933", - "type": "color" - }, - "active": { - "value": "#ac973940", - "type": "color" - } - }, - "error": { - "base": { - "value": "#c9492226", - "type": "color" - }, - "hovered": { - "value": "#c9492233", - "type": "color" - }, - "active": { - "value": "#c9492240", - "type": "color" - } - }, - "warning": { - "base": { - "value": "#c08b3026", - "type": "color" - }, - "hovered": { - "value": "#c08b3033", - "type": "color" - }, - "active": { - "value": "#c08b3040", - "type": "color" - } - }, - "info": { - "base": { - "value": "#3d8fd126", - "type": "color" - }, - "hovered": { - "value": "#3d8fd133", - "type": "color" - }, - "active": { - "value": "#3d8fd140", - "type": "color" - } - } - }, - "border": { - "primary": { - "value": "#bbc0d3", - "type": "color" - }, - "secondary": { - "value": "#cdd1e2", - "type": "color" - }, - "muted": { - "value": "#dfe2f1", - "type": "color" - }, - "active": { - "value": "#6b7394", - "type": "color" - }, - "onMedia": { - "value": "#f5f7ff1a", - "type": "color" - }, - "ok": { - "value": "#ac973926", - "type": "color" - }, - "error": { - "value": "#c9492226", - "type": "color" - }, - "warning": { - "value": "#c08b3026", - "type": "color" - }, - "info": { - "value": "#3d8fd126", - "type": "color" - } - }, - "editor": { - "background": { - "value": "#f5f7ff", - "type": "color" - }, - "indent_guide": { - "value": "#dfe2f1", - "type": "color" - }, - "indent_guide_active": { - "value": "#cdd1e2", - "type": "color" - }, - "line": { - "active": { - "value": "#dfe2f1", - "type": "color" - }, - "highlighted": { - "value": "#cdd1e2", - "type": "color" - } - }, - "highlight": { - "selection": { - "value": "#3d8fd13d", - "type": "color" - }, - "occurrence": { - "value": "#979db41f", - "type": "color" - }, - "activeOccurrence": { - "value": "#979db43d", - "type": "color" - }, - "matchingBracket": { - "value": "#eaedf8", - "type": "color" - }, - "match": { - "value": "#bcc6f7", - "type": "color" - }, - "activeMatch": { - "value": "#7b8ddc3d", - "type": "color" - }, - "related": { - "value": "#f0f2fc", - "type": "color" - } - }, - "gutter": { - "primary": { - "value": "#6b7394", - "type": "color" - }, - "active": { - "value": "#202746", - "type": "color" - } - } - }, - "syntax": { - "primary": { - "value": "#202746", - "type": "color" - }, - "comment": { - "value": "#5e6687", - "type": "color" - }, - "keyword": { - "value": "#3d8fd1", - "type": "color" - }, - "function": { - "value": "#c08b30", - "type": "color" - }, - "type": { - "value": "#22a2c9", - "type": "color" - }, - "variant": { - "value": "#3d8fd1", - "type": "color" - }, - "property": { - "value": "#3d8fd1", - "type": "color" - }, - "enum": { - "value": "#c76b29", - "type": "color" - }, - "operator": { - "value": "#c76b29", - "type": "color" - }, - "string": { - "value": "#c76b29", - "type": "color" - }, - "number": { - "value": "#ac9739", - "type": "color" - }, - "boolean": { - "value": "#ac9739", - "type": "color" - } - }, - "player": { - "1": { - "baseColor": { - "value": "#3d8fd1", - "type": "color" - }, - "cursorColor": { - "value": "#3d8fd1", - "type": "color" - }, - "selectionColor": { - "value": "#3d8fd13d", - "type": "color" - }, - "borderColor": { - "value": "#3d8fd1cc", - "type": "color" - } - }, - "2": { - "baseColor": { - "value": "#ac9739", - "type": "color" - }, - "cursorColor": { - "value": "#ac9739", - "type": "color" - }, - "selectionColor": { - "value": "#ac97393d", - "type": "color" - }, - "borderColor": { - "value": "#ac9739cc", - "type": "color" - } - }, - "3": { - "baseColor": { - "value": "#9c637a", - "type": "color" - }, - "cursorColor": { - "value": "#9c637a", - "type": "color" - }, - "selectionColor": { - "value": "#9c637a3d", - "type": "color" - }, - "borderColor": { - "value": "#9c637acc", - "type": "color" - } - }, - "4": { - "baseColor": { - "value": "#c76b29", - "type": "color" - }, - "cursorColor": { - "value": "#c76b29", - "type": "color" - }, - "selectionColor": { - "value": "#c76b293d", - "type": "color" - }, - "borderColor": { - "value": "#c76b29cc", - "type": "color" - } - }, - "5": { - "baseColor": { - "value": "#6679cc", - "type": "color" - }, - "cursorColor": { - "value": "#6679cc", - "type": "color" - }, - "selectionColor": { - "value": "#6679cc3d", - "type": "color" - }, - "borderColor": { - "value": "#6679cccc", - "type": "color" - } - }, - "6": { - "baseColor": { - "value": "#22a2c9", - "type": "color" - }, - "cursorColor": { - "value": "#22a2c9", - "type": "color" - }, - "selectionColor": { - "value": "#22a2c93d", - "type": "color" - }, - "borderColor": { - "value": "#22a2c9cc", - "type": "color" - } - }, - "7": { - "baseColor": { - "value": "#c94922", - "type": "color" - }, - "cursorColor": { - "value": "#c94922", - "type": "color" - }, - "selectionColor": { - "value": "#c949223d", - "type": "color" - }, - "borderColor": { - "value": "#c94922cc", - "type": "color" - } - }, - "8": { - "baseColor": { - "value": "#c08b30", - "type": "color" - }, - "cursorColor": { - "value": "#c08b30", - "type": "color" - }, - "selectionColor": { - "value": "#c08b303d", - "type": "color" - }, - "borderColor": { - "value": "#c08b30cc", - "type": "color" - } - } - }, - "shadowAlpha": { - "value": 0.12, - "type": "number" - } - } -} \ No newline at end of file From ef2b42c3fbcc0e94872a3d067fe2a82a13d4e4c1 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Sat, 16 Jul 2022 11:52:30 -0400 Subject: [PATCH 04/22] UI / Theme improvements --- styles/src/styleTree/app.ts | 2 +- styles/src/styleTree/statusBar.ts | 10 +++++----- styles/src/styleTree/tooltip.ts | 2 +- styles/src/styleTree/workspace.ts | 27 +++++++++++++++++---------- styles/src/themes/common/base16.ts | 8 ++++---- 5 files changed, 28 insertions(+), 21 deletions(-) diff --git a/styles/src/styleTree/app.ts b/styles/src/styleTree/app.ts index fe67cf701d..33bcafcdae 100644 --- a/styles/src/styleTree/app.ts +++ b/styles/src/styleTree/app.ts @@ -17,7 +17,7 @@ import tooltip from "./tooltip"; import terminal from "./terminal"; export const panel = { - padding: { top: 12, bottom: 12 }, + padding: { top: 12, bottom: 12 } }; export default function app(theme: Theme): Object { diff --git a/styles/src/styleTree/statusBar.ts b/styles/src/styleTree/statusBar.ts index 47050fe3ca..549858dbef 100644 --- a/styles/src/styleTree/statusBar.ts +++ b/styles/src/styleTree/statusBar.ts @@ -35,7 +35,7 @@ export default function statusBar(theme: Theme) { iconColor: iconColor(theme, "muted"), hover: { message: text(theme, "sans", "primary"), - iconColor: iconColor(theme, "primary"), + iconColor: iconColor(theme, "active"), background: backgroundColor(theme, 300, "hovered"), } }, @@ -49,7 +49,7 @@ export default function statusBar(theme: Theme) { }, diagnosticSummary: { height: 16, - iconWidth: 14, + iconWidth: 16, iconSpacing: 2, summarySpacing: 6, text: text(theme, "sans", "primary", { size: "sm" }), @@ -71,7 +71,7 @@ export default function statusBar(theme: Theme) { border: border(theme, "error"), }, hover: { - iconColorOk: iconColor(theme, "primary"), + iconColorOk: iconColor(theme, "active"), containerOk: { cornerRadius: 6, padding: { top: 3, bottom: 3, left: 7, right: 7 }, @@ -94,10 +94,10 @@ export default function statusBar(theme: Theme) { groupRight: {}, item: { ...statusContainer, - iconSize: 14, + iconSize: 16, iconColor: iconColor(theme, "secondary"), hover: { - iconColor: iconColor(theme, "primary"), + iconColor: iconColor(theme, "active"), background: backgroundColor(theme, 300, "hovered"), }, active: { diff --git a/styles/src/styleTree/tooltip.ts b/styles/src/styleTree/tooltip.ts index c395b9ff3d..0a4ab19d46 100644 --- a/styles/src/styleTree/tooltip.ts +++ b/styles/src/styleTree/tooltip.ts @@ -14,7 +14,7 @@ export default function tooltip(theme: Theme) { background: backgroundColor(theme, "on500"), cornerRadius: 4, margin: { left: 6 }, - padding: { left: 3, right: 3 }, + padding: { left: 4, right: 4 }, ...text(theme, "mono", "muted", { size: "xs", weight: "bold" }) }, maxTextWidth: 200, diff --git a/styles/src/styleTree/workspace.ts b/styles/src/styleTree/workspace.ts index 36d47bed92..0e9762f321 100644 --- a/styles/src/styleTree/workspace.ts +++ b/styles/src/styleTree/workspace.ts @@ -60,7 +60,7 @@ export default function workspace(theme: Theme) { border: { ...tab.border }, - iconWidth: 14, + iconWidth: 12, buttonWidth: tab.height, hover: { color: iconColor(theme, "active"), @@ -110,17 +110,24 @@ export default function workspace(theme: Theme) { }, border: border(theme, "primary", { bottom: true, overlay: true }), signInPrompt: { - border: border(theme, "primary"), + background: backgroundColor(theme, 100), + border: border(theme, "secondary"), cornerRadius: 6, margin: { top: 1, }, padding: { - left: 6, - right: 6, + top: 1, + bottom: 1, + left: 7, + right: 7, }, ...text(theme, "sans", "secondary", { size: "xs" }), - hover: text(theme, "sans", "active", { size: "xs" }), + hover: { + ...text(theme, "sans", "active", { size: "xs" }), + background: backgroundColor(theme, "on300", "hovered"), + border: border(theme, "primary"), + } }, offlineIcon: { color: iconColor(theme, "secondary"), @@ -152,9 +159,9 @@ export default function workspace(theme: Theme) { border: border(theme, "secondary", { bottom: true }), itemSpacing: 8, navButton: { - color: iconColor(theme, "secondary"), - iconWidth: 8, - buttonWidth: 18, + color: iconColor(theme, "primary"), + iconWidth: 12, + buttonWidth: 24, cornerRadius: 6, hover: { color: iconColor(theme, "active"), @@ -164,7 +171,7 @@ export default function workspace(theme: Theme) { color: withOpacity(iconColor(theme, "muted"), 0.6), }, }, - padding: { left: 16, right: 8, top: 4, bottom: 4 }, + padding: { left: 8, right: 8, top: 4, bottom: 4 }, }, breadcrumbs: { ...text(theme, "mono", "secondary"), @@ -183,7 +190,7 @@ export default function workspace(theme: Theme) { shadow: modalShadow(theme), }, notifications: { - width: 380, + width: 400, margin: { right: 10, bottom: 10 }, } }; diff --git a/styles/src/themes/common/base16.ts b/styles/src/themes/common/base16.ts index 729cf32ee5..e7b71a49bb 100644 --- a/styles/src/themes/common/base16.ts +++ b/styles/src/themes/common/base16.ts @@ -62,13 +62,13 @@ export function createTheme( }, on300: { base: sample(ramps.neutral, 0), - hovered: sample(ramps.neutral, 0.25), - active: sample(ramps.neutral, 0.5), + hovered: sample(ramps.neutral, 0.5), + active: sample(ramps.neutral, 1), }, on500: { - base: sample(ramps.neutral, 1.25), + base: sample(ramps.neutral, 1), hovered: sample(ramps.neutral, 1.5), - active: sample(ramps.neutral, 1.75), + active: sample(ramps.neutral, 2), }, ok: { base: withOpacity(sample(ramps.green, 0.5), 0.15), From 45ea412d2c92d94bb911179f2af45c0850e2f274 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Sat, 16 Jul 2022 11:52:40 -0400 Subject: [PATCH 05/22] Add the One Dark/ One Light themes --- styles/src/themes/one-dark.ts | 46 ++++++++++++++++++++++++++++++++++ styles/src/themes/one-light.ts | 46 ++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 styles/src/themes/one-dark.ts create mode 100644 styles/src/themes/one-light.ts diff --git a/styles/src/themes/one-dark.ts b/styles/src/themes/one-dark.ts new file mode 100644 index 0000000000..8f65dffd76 --- /dev/null +++ b/styles/src/themes/one-dark.ts @@ -0,0 +1,46 @@ +import chroma from "chroma-js"; +import { colorRamp, createTheme } from "./common/base16"; + +const name = "one"; +const author = "Chris Kempson (http://chriskempson.com)" +const url = "https://github.com/chriskempson/base16-vim/blob/master/colors/base16-onedark.vim" + +const base00 = "#282c34" +const base01 = "#353b45" +const base02 = "#3e4451" +const base03 = "#545862" +const base04 = "#565c64" +const base05 = "#abb2bf" +const base06 = "#b6bdca" +const base07 = "#c8ccd4" +const base08 = "#e06c75" +const base09 = "#d19a66" +const base0A = "#e5c07b" +const base0B = "#98c379" +const base0C = "#56b6c2" +const base0D = "#61afef" +const base0E = "#c678dd" +const base0F = "#be5046" + +const ramps = { + neutral: chroma.scale([ + base00, + base01, + base02, + base03, + base04, + base05, + base06, + base07 + ]), + red: colorRamp(chroma(base08)), + orange: colorRamp(chroma(base09)), + yellow: colorRamp(chroma(base0A)), + green: colorRamp(chroma(base0B)), + cyan: colorRamp(chroma(base0C)), + blue: colorRamp(chroma(base0D)), + violet: colorRamp(chroma(base0E)), + magenta: colorRamp(chroma(base0F)), +}; + +export const dark = createTheme(`${name}-dark`, false, ramps); \ No newline at end of file diff --git a/styles/src/themes/one-light.ts b/styles/src/themes/one-light.ts new file mode 100644 index 0000000000..d78f00ff55 --- /dev/null +++ b/styles/src/themes/one-light.ts @@ -0,0 +1,46 @@ +import chroma from "chroma-js"; +import { colorRamp, createTheme } from "./common/base16"; + +const name = "one"; +const author = "Daniel Pfeifer (http://github.com/purpleKarrot)" +const url = "https://github.com/purpleKarrot/base16-one-light-scheme/blob/master/one-light.yaml" + +const base00 = "#090a0b" +const base01 = "#202227" +const base02 = "#383a42" +const base03 = "#a0a1a7" +const base04 = "#696c77" +const base05 = "#a0a1a7" +const base06 = "#e5e5e6" +const base07 = "#f0f0f1" +const base08 = "#fafafa" +const base09 = "#d75f00" +const base0A = "#c18401" +const base0B = "#50a14f" +const base0C = "#0184bc" +const base0D = "#4078f2" +const base0E = "#a626a4" +const base0F = "#986801" + +const ramps = { + neutral: chroma.scale([ + base00, + base01, + base02, + base03, + base04, + base05, + base06, + base07 + ]), + red: colorRamp(chroma(base08)), + orange: colorRamp(chroma(base09)), + yellow: colorRamp(chroma(base0A)), + green: colorRamp(chroma(base0B)), + cyan: colorRamp(chroma(base0C)), + blue: colorRamp(chroma(base0D)), + violet: colorRamp(chroma(base0E)), + magenta: colorRamp(chroma(base0F)), +}; + +export const light = createTheme(`${name}-light`, true, ramps); \ No newline at end of file From 668af83cd600eea20a23575650cc8c3243f9e13c Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Sat, 16 Jul 2022 11:53:27 -0400 Subject: [PATCH 06/22] Format `styles` directory with prettier. --- styles/package-lock.json | 618 ++++++++++---------- styles/package.json | 34 +- styles/src/buildThemes.ts | 10 +- styles/src/common.ts | 9 +- styles/src/styleTree/app.ts | 2 +- styles/src/styleTree/chatPanel.ts | 2 +- styles/src/styleTree/commandPalette.ts | 8 +- styles/src/styleTree/components.ts | 7 +- styles/src/styleTree/contactFinder.ts | 6 +- styles/src/styleTree/contactNotification.ts | 16 +- styles/src/styleTree/contactsPanel.ts | 33 +- styles/src/styleTree/contextMenu.ts | 16 +- styles/src/styleTree/editor.ts | 4 +- styles/src/styleTree/hoverPopover.ts | 8 +- styles/src/styleTree/picker.ts | 10 +- styles/src/styleTree/projectDiagnostics.ts | 7 +- styles/src/styleTree/projectPanel.ts | 2 +- styles/src/styleTree/search.ts | 3 +- styles/src/styleTree/statusBar.ts | 20 +- styles/src/styleTree/terminal.ts | 4 +- styles/src/styleTree/tooltip.ts | 6 +- styles/src/styleTree/updateNotification.ts | 16 +- styles/src/styleTree/workspace.ts | 24 +- styles/src/themes/cave.ts | 2 +- styles/src/themes/common/base16.ts | 30 +- styles/src/themes/common/theme.ts | 4 +- styles/src/themes/one-dark.ts | 41 +- styles/src/themes/one-light.ts | 41 +- styles/src/utils/snakeCase.ts | 18 +- styles/tsconfig.json | 22 +- 30 files changed, 527 insertions(+), 496 deletions(-) diff --git a/styles/package-lock.json b/styles/package-lock.json index 2eb6d3a1bf..5499f1852c 100644 --- a/styles/package-lock.json +++ b/styles/package-lock.json @@ -1,315 +1,315 @@ { - "name": "styles", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "@types/chroma-js": "^2.1.3", - "@types/node": "^17.0.23", - "case-anything": "^2.1.10", - "chroma-js": "^2.4.2", - "ts-node": "^10.7.0" - } - }, - "node_modules/@cspotcode/source-map-consumer": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", - "engines": { - "node": ">= 12" - } - }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", - "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", - "dependencies": { - "@cspotcode/source-map-consumer": "0.8.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@tsconfig/node10": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", - "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==" - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", - "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==" - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", - "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==" - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", - "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==" - }, - "node_modules/@types/chroma-js": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@types/chroma-js/-/chroma-js-2.1.3.tgz", - "integrity": "sha512-1xGPhoSGY1CPmXLCBcjVZSQinFjL26vlR8ZqprsBWiFyED4JacJJ9zHhh5aaUXqbY9B37mKQ73nlydVAXmr1+g==" - }, - "node_modules/@types/node": { - "version": "17.0.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz", - "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==" - }, - "node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" - }, - "node_modules/case-anything": { - "version": "2.1.10", - "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.10.tgz", - "integrity": "sha512-JczJwVrCP0jPKh05McyVsuOg6AYosrB9XWZKbQzXeDAm2ClE/PJE/BcrrQrVyGYH7Jg8V/LDupmyL4kFlVsVFQ==", - "engines": { - "node": ">=12.13" - }, - "funding": { - "url": "https://github.com/sponsors/mesqueeb" - } - }, - "node_modules/chroma-js": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chroma-js/-/chroma-js-2.4.2.tgz", - "integrity": "sha512-U9eDw6+wt7V8z5NncY2jJfZa+hUH8XEj8FQHgFJTrUFnJfXYf4Ml4adI2vXZOjqRDpFWtYVWypDfZwnJ+HIR4A==" - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" - }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" - }, - "node_modules/ts-node": { - "version": "10.7.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz", - "integrity": "sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==", - "dependencies": { - "@cspotcode/source-map-support": "0.7.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.0", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/typescript": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", - "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz", - "integrity": "sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==" - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "engines": { - "node": ">=6" - } - } + "name": "styles", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@types/chroma-js": "^2.1.3", + "@types/node": "^17.0.23", + "case-anything": "^2.1.10", + "chroma-js": "^2.4.2", + "ts-node": "^10.7.0" + } }, - "dependencies": { - "@cspotcode/source-map-consumer": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==" + "node_modules/@cspotcode/source-map-consumer": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", + "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", + "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", + "dependencies": { + "@cspotcode/source-map-consumer": "0.8.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", + "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", + "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", + "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", + "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==" + }, + "node_modules/@types/chroma-js": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@types/chroma-js/-/chroma-js-2.1.3.tgz", + "integrity": "sha512-1xGPhoSGY1CPmXLCBcjVZSQinFjL26vlR8ZqprsBWiFyED4JacJJ9zHhh5aaUXqbY9B37mKQ73nlydVAXmr1+g==" + }, + "node_modules/@types/node": { + "version": "17.0.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz", + "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==" + }, + "node_modules/acorn": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + }, + "node_modules/case-anything": { + "version": "2.1.10", + "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.10.tgz", + "integrity": "sha512-JczJwVrCP0jPKh05McyVsuOg6AYosrB9XWZKbQzXeDAm2ClE/PJE/BcrrQrVyGYH7Jg8V/LDupmyL4kFlVsVFQ==", + "engines": { + "node": ">=12.13" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, + "node_modules/chroma-js": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chroma-js/-/chroma-js-2.4.2.tgz", + "integrity": "sha512-U9eDw6+wt7V8z5NncY2jJfZa+hUH8XEj8FQHgFJTrUFnJfXYf4Ml4adI2vXZOjqRDpFWtYVWypDfZwnJ+HIR4A==" + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + }, + "node_modules/ts-node": { + "version": "10.7.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz", + "integrity": "sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==", + "dependencies": { + "@cspotcode/source-map-support": "0.7.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.0", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true }, - "@cspotcode/source-map-support": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", - "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", - "requires": { - "@cspotcode/source-map-consumer": "0.8.0" - } - }, - "@tsconfig/node10": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", - "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==" - }, - "@tsconfig/node12": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", - "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==" - }, - "@tsconfig/node14": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", - "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==" - }, - "@tsconfig/node16": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", - "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==" - }, - "@types/chroma-js": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@types/chroma-js/-/chroma-js-2.1.3.tgz", - "integrity": "sha512-1xGPhoSGY1CPmXLCBcjVZSQinFjL26vlR8ZqprsBWiFyED4JacJJ9zHhh5aaUXqbY9B37mKQ73nlydVAXmr1+g==" - }, - "@types/node": { - "version": "17.0.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz", - "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==" - }, - "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==" - }, - "acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==" - }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" - }, - "case-anything": { - "version": "2.1.10", - "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.10.tgz", - "integrity": "sha512-JczJwVrCP0jPKh05McyVsuOg6AYosrB9XWZKbQzXeDAm2ClE/PJE/BcrrQrVyGYH7Jg8V/LDupmyL4kFlVsVFQ==" - }, - "chroma-js": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chroma-js/-/chroma-js-2.4.2.tgz", - "integrity": "sha512-U9eDw6+wt7V8z5NncY2jJfZa+hUH8XEj8FQHgFJTrUFnJfXYf4Ml4adI2vXZOjqRDpFWtYVWypDfZwnJ+HIR4A==" - }, - "create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" - }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" - }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" - }, - "ts-node": { - "version": "10.7.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz", - "integrity": "sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==", - "requires": { - "@cspotcode/source-map-support": "0.7.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.0", - "yn": "3.1.1" - } - }, - "typescript": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", - "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", - "peer": true - }, - "v8-compile-cache-lib": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz", - "integrity": "sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==" - }, - "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" + "@swc/wasm": { + "optional": true } + } + }, + "node_modules/typescript": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", + "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz", + "integrity": "sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==" + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "engines": { + "node": ">=6" + } } + }, + "dependencies": { + "@cspotcode/source-map-consumer": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", + "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==" + }, + "@cspotcode/source-map-support": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", + "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", + "requires": { + "@cspotcode/source-map-consumer": "0.8.0" + } + }, + "@tsconfig/node10": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", + "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==" + }, + "@tsconfig/node12": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", + "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==" + }, + "@tsconfig/node14": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", + "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==" + }, + "@tsconfig/node16": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", + "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==" + }, + "@types/chroma-js": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@types/chroma-js/-/chroma-js-2.1.3.tgz", + "integrity": "sha512-1xGPhoSGY1CPmXLCBcjVZSQinFjL26vlR8ZqprsBWiFyED4JacJJ9zHhh5aaUXqbY9B37mKQ73nlydVAXmr1+g==" + }, + "@types/node": { + "version": "17.0.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz", + "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==" + }, + "acorn": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==" + }, + "acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==" + }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + }, + "case-anything": { + "version": "2.1.10", + "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.10.tgz", + "integrity": "sha512-JczJwVrCP0jPKh05McyVsuOg6AYosrB9XWZKbQzXeDAm2ClE/PJE/BcrrQrVyGYH7Jg8V/LDupmyL4kFlVsVFQ==" + }, + "chroma-js": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chroma-js/-/chroma-js-2.4.2.tgz", + "integrity": "sha512-U9eDw6+wt7V8z5NncY2jJfZa+hUH8XEj8FQHgFJTrUFnJfXYf4Ml4adI2vXZOjqRDpFWtYVWypDfZwnJ+HIR4A==" + }, + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + }, + "ts-node": { + "version": "10.7.0", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz", + "integrity": "sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==", + "requires": { + "@cspotcode/source-map-support": "0.7.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.0", + "yn": "3.1.1" + } + }, + "typescript": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", + "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", + "peer": true + }, + "v8-compile-cache-lib": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz", + "integrity": "sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==" + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" + } + } } diff --git a/styles/package.json b/styles/package.json index ccdaca0853..38412aa1da 100644 --- a/styles/package.json +++ b/styles/package.json @@ -1,19 +1,19 @@ { - "name": "styles", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "build": "npm run build-themes && npm run build-tokens", - "build-themes": "ts-node ./src/buildThemes.ts" - }, - "author": "", - "license": "ISC", - "dependencies": { - "@types/chroma-js": "^2.1.3", - "@types/node": "^17.0.23", - "case-anything": "^2.1.10", - "chroma-js": "^2.4.2", - "ts-node": "^10.7.0" - } + "name": "styles", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "build": "npm run build-themes && npm run build-tokens", + "build-themes": "ts-node ./src/buildThemes.ts" + }, + "author": "", + "license": "ISC", + "dependencies": { + "@types/chroma-js": "^2.1.3", + "@types/node": "^17.0.23", + "case-anything": "^2.1.10", + "chroma-js": "^2.4.2", + "ts-node": "^10.7.0" + } } diff --git a/styles/src/buildThemes.ts b/styles/src/buildThemes.ts index c43be067a8..22178163b6 100644 --- a/styles/src/buildThemes.ts +++ b/styles/src/buildThemes.ts @@ -1,18 +1,18 @@ import * as fs from "fs"; import * as path from "path"; -import { tmpdir } from 'os'; +import { tmpdir } from "os"; import app from "./styleTree/app"; import themes from "./themes"; import snakeCase from "./utils/snakeCase"; const themeDirectory = `${__dirname}/../../assets/themes/`; -const tempDirectory = fs.mkdtempSync(path.join(tmpdir(), 'build-themes')); +const tempDirectory = fs.mkdtempSync(path.join(tmpdir(), "build-themes")); // Clear existing themes for (const file of fs.readdirSync(themeDirectory)) { - if (file.endsWith('.json')) { - const name = file.replace(/\.json$/, ''); - if (!themes.find(theme => theme.name === name)) { + if (file.endsWith(".json")) { + const name = file.replace(/\.json$/, ""); + if (!themes.find((theme) => theme.name === name)) { fs.unlinkSync(path.join(themeDirectory, file)); } } diff --git a/styles/src/common.ts b/styles/src/common.ts index 713401f348..9f636596d4 100644 --- a/styles/src/common.ts +++ b/styles/src/common.ts @@ -1,7 +1,7 @@ export const fontFamilies = { sans: "Zed Sans", mono: "Zed Mono", -} +}; export const fontSizes = { "3xs": 8, @@ -13,7 +13,8 @@ export const fontSizes = { xl: 20, }; -export type FontWeight = "thin" +export type FontWeight = + | "thin" | "extra_light" | "light" | "normal" @@ -31,7 +32,7 @@ export const fontWeights: { [key: string]: FontWeight } = { semibold: "semibold", bold: "bold", extra_bold: "extra_bold", - black: "black" + black: "black", }; export const sizes = { @@ -62,4 +63,4 @@ export const sizes = { // purple: colorRamp("#A855F7FF"), // fuschia: colorRamp("#D946E4FF"), // pink: colorRamp("#EC4899FF"), -// } \ No newline at end of file +// } diff --git a/styles/src/styleTree/app.ts b/styles/src/styleTree/app.ts index 33bcafcdae..fe67cf701d 100644 --- a/styles/src/styleTree/app.ts +++ b/styles/src/styleTree/app.ts @@ -17,7 +17,7 @@ import tooltip from "./tooltip"; import terminal from "./terminal"; export const panel = { - padding: { top: 12, bottom: 12 } + padding: { top: 12, bottom: 12 }, }; export default function app(theme: Theme): Object { diff --git a/styles/src/styleTree/chatPanel.ts b/styles/src/styleTree/chatPanel.ts index 103b8d2a3f..e2b83237dd 100644 --- a/styles/src/styleTree/chatPanel.ts +++ b/styles/src/styleTree/chatPanel.ts @@ -6,7 +6,7 @@ import { player, text, TextColor, - popoverShadow + popoverShadow, } from "./components"; export default function chatPanel(theme: Theme) { diff --git a/styles/src/styleTree/commandPalette.ts b/styles/src/styleTree/commandPalette.ts index 7b94f1cfae..6d38051eb2 100644 --- a/styles/src/styleTree/commandPalette.ts +++ b/styles/src/styleTree/commandPalette.ts @@ -16,11 +16,11 @@ export default function commandPalette(theme: Theme) { right: 8, }, margin: { - left: 2 + left: 2, }, active: { text: text(theme, "mono", "active", { size: "xs" }), - } - } - } + }, + }, + }; } diff --git a/styles/src/styleTree/components.ts b/styles/src/styleTree/components.ts index 020005b301..10e70ba3ef 100644 --- a/styles/src/styleTree/components.ts +++ b/styles/src/styleTree/components.ts @@ -60,10 +60,7 @@ export interface Player { selection: string; }; } -export function player( - theme: Theme, - playerNumber: PlayerIndex, -): Player { +export function player(theme: Theme, playerNumber: PlayerIndex): Player { return { selection: { cursor: theme.player[playerNumber].cursorColor, @@ -77,7 +74,7 @@ export type BackgroundState = keyof BackgroundColorSet; export function backgroundColor( theme: Theme, name: BackgroundColor, - state?: BackgroundState, + state?: BackgroundState ): string { return theme.backgroundColor[name][state || "base"]; } diff --git a/styles/src/styleTree/contactFinder.ts b/styles/src/styleTree/contactFinder.ts index fdefa34b8a..e34fac4b2d 100644 --- a/styles/src/styleTree/contactFinder.ts +++ b/styles/src/styleTree/contactFinder.ts @@ -26,13 +26,13 @@ export default function contactFinder(theme: Theme) { contactButton: { ...contactButton, hover: { - background: backgroundColor(theme, 100, "hovered") - } + background: backgroundColor(theme, 100, "hovered"), + }, }, disabledContactButton: { ...contactButton, background: backgroundColor(theme, 100), color: iconColor(theme, "muted"), }, - } + }; } diff --git a/styles/src/styleTree/contactNotification.ts b/styles/src/styleTree/contactNotification.ts index 0ed9636399..8006a95541 100644 --- a/styles/src/styleTree/contactNotification.ts +++ b/styles/src/styleTree/contactNotification.ts @@ -13,7 +13,7 @@ export default function contactNotification(theme: Theme): Object { }, headerMessage: { ...text(theme, "sans", "primary", { size: "xs" }), - margin: { left: headerPadding, right: headerPadding } + margin: { left: headerPadding, right: headerPadding }, }, headerHeight: 18, bodyMessage: { @@ -27,8 +27,8 @@ export default function contactNotification(theme: Theme): Object { cornerRadius: 6, margin: { left: 6 }, hover: { - background: backgroundColor(theme, "on300", "hovered") - } + background: backgroundColor(theme, "on300", "hovered"), + }, }, dismissButton: { color: iconColor(theme, "secondary"), @@ -37,8 +37,8 @@ export default function contactNotification(theme: Theme): Object { buttonWidth: 8, buttonHeight: 8, hover: { - color: iconColor(theme, "primary") - } - } - } -} \ No newline at end of file + color: iconColor(theme, "primary"), + }, + }, + }; +} diff --git a/styles/src/styleTree/contactsPanel.ts b/styles/src/styleTree/contactsPanel.ts index 2bfa4e94e2..51e35c9003 100644 --- a/styles/src/styleTree/contactsPanel.ts +++ b/styles/src/styleTree/contactsPanel.ts @@ -1,6 +1,13 @@ import Theme from "../themes/common/theme"; import { panel } from "./app"; -import { backgroundColor, border, borderColor, iconColor, player, text } from "./components"; +import { + backgroundColor, + border, + borderColor, + iconColor, + player, + text, +} from "./components"; export default function contactsPanel(theme: Theme) { const nameMargin = 8; @@ -24,7 +31,7 @@ export default function contactsPanel(theme: Theme) { margin: { left: nameMargin, right: nameMargin, - } + }, }, padding: { left: sidePadding, @@ -59,7 +66,7 @@ export default function contactsPanel(theme: Theme) { margin: { left: sidePadding, right: sidePadding, - } + }, }, userQueryEditorHeight: 32, addContactButton: { @@ -86,16 +93,16 @@ export default function contactsPanel(theme: Theme) { active: { ...text(theme, "mono", "primary", { size: "sm" }), background: backgroundColor(theme, 100, "active"), - } + }, }, contactRow: { padding: { left: sidePadding, - right: sidePadding + right: sidePadding, }, active: { background: backgroundColor(theme, 100, "active"), - } + }, }, treeBranch: { color: borderColor(theme, "active"), @@ -105,7 +112,7 @@ export default function contactsPanel(theme: Theme) { }, active: { color: borderColor(theme, "active"), - } + }, }, contactAvatar: { cornerRadius: 10, @@ -141,18 +148,18 @@ export default function contactsPanel(theme: Theme) { }, active: { background: backgroundColor(theme, 300, "active"), - } + }, }, inviteRow: { padding: { left: sidePadding, - right: sidePadding + right: sidePadding, }, border: { top: true, width: 1, color: borderColor(theme, "primary") }, text: text(theme, "sans", "primary", { size: "sm" }), hover: { - text: text(theme, "sans", "primary", { size: "sm", underline: true }) - } - } - } + text: text(theme, "sans", "primary", { size: "sm", underline: true }), + }, + }, + }; } diff --git a/styles/src/styleTree/contextMenu.ts b/styles/src/styleTree/contextMenu.ts index 43b3a200b1..a7c69d7660 100644 --- a/styles/src/styleTree/contextMenu.ts +++ b/styles/src/styleTree/contextMenu.ts @@ -1,5 +1,11 @@ import Theme from "../themes/common/theme"; -import { backgroundColor, border, borderColor, popoverShadow, text } from "./components"; +import { + backgroundColor, + border, + borderColor, + popoverShadow, + text, +} from "./components"; export default function contextMenu(theme: Theme) { return { @@ -15,7 +21,7 @@ export default function contextMenu(theme: Theme) { label: text(theme, "sans", "secondary", { size: "sm" }), keystroke: { ...text(theme, "sans", "muted", { size: "sm", weight: "bold" }), - padding: { left: 3, right: 3 } + padding: { left: 3, right: 3 }, }, hover: { background: backgroundColor(theme, 300, "hovered"), @@ -28,11 +34,11 @@ export default function contextMenu(theme: Theme) { activeHover: { background: backgroundColor(theme, 300, "hovered"), text: text(theme, "sans", "active", { size: "sm" }), - } + }, }, separator: { background: borderColor(theme, "primary"), - margin: { top: 2, bottom: 2 } + margin: { top: 2, bottom: 2 }, }, - } + }; } diff --git a/styles/src/styleTree/editor.ts b/styles/src/styleTree/editor.ts index 8031a229c4..7e2c512a7c 100644 --- a/styles/src/styleTree/editor.ts +++ b/styles/src/styleTree/editor.ts @@ -6,7 +6,7 @@ import { player, popoverShadow, text, - TextColor + TextColor, } from "./components"; import hoverPopover from "./hoverPopover"; @@ -157,7 +157,7 @@ export default function editor(theme: Theme) { hover: { color: iconColor(theme, "active"), background: backgroundColor(theme, "on500", "base"), - } + }, }, syntax, }; diff --git a/styles/src/styleTree/hoverPopover.ts b/styles/src/styleTree/hoverPopover.ts index 353706d0a0..d6665cacff 100644 --- a/styles/src/styleTree/hoverPopover.ts +++ b/styles/src/styleTree/hoverPopover.ts @@ -10,7 +10,7 @@ export default function HoverPopover(theme: Theme) { left: 8, right: 8, top: 4, - bottom: 4 + bottom: 4, }, shadow: popoverShadow(theme), border: border(theme, "primary"), @@ -21,7 +21,7 @@ export default function HoverPopover(theme: Theme) { block_style: { padding: { top: 4 }, }, - prose: text(theme, "sans", "primary", { "size": "sm" }), + prose: text(theme, "sans", "primary", { size: "sm" }), highlight: theme.editor.highlight.occurrence, - } -} \ No newline at end of file + }; +} diff --git a/styles/src/styleTree/picker.ts b/styles/src/styleTree/picker.ts index b3ff654e34..84a72aabcc 100644 --- a/styles/src/styleTree/picker.ts +++ b/styles/src/styleTree/picker.ts @@ -1,5 +1,11 @@ import Theme from "../themes/common/theme"; -import { backgroundColor, border, player, modalShadow, text } from "./components"; +import { + backgroundColor, + border, + player, + modalShadow, + text, +} from "./components"; export default function picker(theme: Theme) { return { @@ -22,7 +28,7 @@ export default function picker(theme: Theme) { }, hover: { background: backgroundColor(theme, 300, "hovered"), - } + }, }, border: border(theme, "primary"), empty: { diff --git a/styles/src/styleTree/projectDiagnostics.ts b/styles/src/styleTree/projectDiagnostics.ts index fe2d3e5f3b..ca6eb7c808 100644 --- a/styles/src/styleTree/projectDiagnostics.ts +++ b/styles/src/styleTree/projectDiagnostics.ts @@ -1,8 +1,5 @@ import Theme from "../themes/common/theme"; -import { - backgroundColor, - text, -} from "./components"; +import { backgroundColor, text } from "./components"; export default function projectDiagnostics(theme: Theme) { return { @@ -11,5 +8,5 @@ export default function projectDiagnostics(theme: Theme) { tabIconWidth: 13, tabSummarySpacing: 10, emptyMessage: text(theme, "sans", "secondary", { size: "md" }), - } + }; } diff --git a/styles/src/styleTree/projectPanel.ts b/styles/src/styleTree/projectPanel.ts index f68f69711c..7007a5da2d 100644 --- a/styles/src/styleTree/projectPanel.ts +++ b/styles/src/styleTree/projectPanel.ts @@ -24,7 +24,7 @@ export default function projectPanel(theme: Theme) { activeHover: { background: backgroundColor(theme, 300, "hovered"), text: text(theme, "mono", "active", { size: "sm" }), - } + }, }, cutEntryFade: 0.4, ignoredEntryFade: 0.6, diff --git a/styles/src/styleTree/search.ts b/styles/src/styleTree/search.ts index 989b9f6b7a..3e9c30d8d9 100644 --- a/styles/src/styleTree/search.ts +++ b/styles/src/styleTree/search.ts @@ -2,7 +2,6 @@ import Theme from "../themes/common/theme"; import { backgroundColor, border, player, text } from "./components"; export default function search(theme: Theme) { - // Search input const editor = { background: backgroundColor(theme, 500), @@ -51,7 +50,7 @@ export default function search(theme: Theme) { ...text(theme, "mono", "active"), background: backgroundColor(theme, "on500", "hovered"), border: border(theme, "muted"), - } + }, }, editor, invalidEditor: { diff --git a/styles/src/styleTree/statusBar.ts b/styles/src/styleTree/statusBar.ts index 549858dbef..d5d63fdadf 100644 --- a/styles/src/styleTree/statusBar.ts +++ b/styles/src/styleTree/statusBar.ts @@ -5,13 +5,13 @@ import { workspaceBackground } from "./workspace"; export default function statusBar(theme: Theme) { const statusContainer = { cornerRadius: 6, - padding: { top: 3, bottom: 3, left: 6, right: 6 } - } + padding: { top: 3, bottom: 3, left: 6, right: 6 }, + }; const diagnosticStatusContainer = { cornerRadius: 6, - padding: { top: 1, bottom: 1, left: 6, right: 6 } - } + padding: { top: 1, bottom: 1, left: 6, right: 6 }, + }; return { height: 30, @@ -37,7 +37,7 @@ export default function statusBar(theme: Theme) { message: text(theme, "sans", "primary"), iconColor: iconColor(theme, "active"), background: backgroundColor(theme, 300, "hovered"), - } + }, }, diagnosticMessage: { ...text(theme, "sans", "muted"), @@ -86,7 +86,7 @@ export default function statusBar(theme: Theme) { ...diagnosticStatusContainer, background: backgroundColor(theme, "error", "hovered"), border: border(theme, "error"), - } + }, }, }, sidebarButtons: { @@ -103,7 +103,7 @@ export default function statusBar(theme: Theme) { active: { iconColor: iconColor(theme, "active"), background: backgroundColor(theme, 300, "active"), - } + }, }, badge: { cornerRadius: 3, @@ -111,7 +111,7 @@ export default function statusBar(theme: Theme) { margin: { bottom: -1, right: -1 }, border: { width: 1, color: workspaceBackground(theme) }, background: iconColor(theme, "feature"), - } - } - } + }, + }, + }; } diff --git a/styles/src/styleTree/terminal.ts b/styles/src/styleTree/terminal.ts index bc133f09c8..2868959b7c 100644 --- a/styles/src/styleTree/terminal.ts +++ b/styles/src/styleTree/terminal.ts @@ -44,6 +44,6 @@ export default function terminal(theme: Theme) { margin: 25, border: border(theme, "primary"), shadow: modalShadow(theme), - } + }, }; -} \ No newline at end of file +} diff --git a/styles/src/styleTree/tooltip.ts b/styles/src/styleTree/tooltip.ts index 0a4ab19d46..8d1bb8078d 100644 --- a/styles/src/styleTree/tooltip.ts +++ b/styles/src/styleTree/tooltip.ts @@ -15,8 +15,8 @@ export default function tooltip(theme: Theme) { cornerRadius: 4, margin: { left: 6 }, padding: { left: 4, right: 4 }, - ...text(theme, "mono", "muted", { size: "xs", weight: "bold" }) + ...text(theme, "mono", "muted", { size: "xs", weight: "bold" }), }, maxTextWidth: 200, - } -} \ No newline at end of file + }; +} diff --git a/styles/src/styleTree/updateNotification.ts b/styles/src/styleTree/updateNotification.ts index 7a9ba196c0..53d8327331 100644 --- a/styles/src/styleTree/updateNotification.ts +++ b/styles/src/styleTree/updateNotification.ts @@ -7,14 +7,14 @@ export default function updateNotification(theme: Theme): Object { return { message: { ...text(theme, "sans", "primary", { size: "xs" }), - margin: { left: headerPadding, right: headerPadding } + margin: { left: headerPadding, right: headerPadding }, }, actionMessage: { ...text(theme, "sans", "secondary", { size: "xs" }), margin: { left: headerPadding, top: 6, bottom: 6 }, hover: { - color: theme.textColor["active"] - } + color: theme.textColor["active"], + }, }, dismissButton: { color: iconColor(theme, "secondary"), @@ -23,8 +23,8 @@ export default function updateNotification(theme: Theme): Object { buttonWidth: 8, buttonHeight: 8, hover: { - color: iconColor(theme, "primary") - } - } - } -} \ No newline at end of file + color: iconColor(theme, "primary"), + }, + }, + }; +} diff --git a/styles/src/styleTree/workspace.ts b/styles/src/styleTree/workspace.ts index 0e9762f321..6b0be34532 100644 --- a/styles/src/styleTree/workspace.ts +++ b/styles/src/styleTree/workspace.ts @@ -1,10 +1,16 @@ import Theme from "../themes/common/theme"; import { withOpacity } from "../utils/color"; -import { backgroundColor, border, iconColor, modalShadow, text } from "./components"; +import { + backgroundColor, + border, + iconColor, + modalShadow, + text, +} from "./components"; import statusBar from "./statusBar"; export function workspaceBackground(theme: Theme) { - return backgroundColor(theme, 300) + return backgroundColor(theme, 300); } export default function workspace(theme: Theme) { @@ -49,7 +55,7 @@ export default function workspace(theme: Theme) { }, joiningProjectMessage: { padding: 12, - ...text(theme, "sans", "primary", { size: "lg" }) + ...text(theme, "sans", "primary", { size: "lg" }), }, leaderBorderOpacity: 0.7, leaderBorderWidth: 2.0, @@ -58,21 +64,21 @@ export default function workspace(theme: Theme) { paneButton: { color: iconColor(theme, "secondary"), border: { - ...tab.border + ...tab.border, }, iconWidth: 12, buttonWidth: tab.height, hover: { color: iconColor(theme, "active"), background: backgroundColor(theme, 300), - } + }, }, modal: { margin: { bottom: 52, top: 52, }, - cursor: "Arrow" + cursor: "Arrow", }, sidebarResizeHandle: { background: border(theme, "primary").color, @@ -105,7 +111,7 @@ export default function workspace(theme: Theme) { avatarRibbon: { height: 3, width: 12, - // TODO: The background for this ideally should be + // TODO: The background for this ideally should be // set with a token, not hardcoded in rust }, border: border(theme, "primary", { bottom: true, overlay: true }), @@ -127,7 +133,7 @@ export default function workspace(theme: Theme) { ...text(theme, "sans", "active", { size: "xs" }), background: backgroundColor(theme, "on300", "hovered"), border: border(theme, "primary"), - } + }, }, offlineIcon: { color: iconColor(theme, "secondary"), @@ -192,6 +198,6 @@ export default function workspace(theme: Theme) { notifications: { width: 400, margin: { right: 10, bottom: 10 }, - } + }, }; } diff --git a/styles/src/themes/cave.ts b/styles/src/themes/cave.ts index aab020d626..2e66f4baf4 100644 --- a/styles/src/themes/cave.ts +++ b/styles/src/themes/cave.ts @@ -25,4 +25,4 @@ const ramps = { }; export const dark = createTheme(`${name}-dark`, false, ramps); -export const light = createTheme(`${name}-light`, true, ramps); \ No newline at end of file +export const light = createTheme(`${name}-light`, true, ramps); diff --git a/styles/src/themes/common/base16.ts b/styles/src/themes/common/base16.ts index e7b71a49bb..a73ac7f0cf 100644 --- a/styles/src/themes/common/base16.ts +++ b/styles/src/themes/common/base16.ts @@ -1,5 +1,5 @@ import chroma, { Color, Scale } from "chroma-js"; -import { fontWeights, } from "../../common"; +import { fontWeights } from "../../common"; import { withOpacity } from "../../utils/color"; import Theme, { buildPlayer, Syntax } from "./theme"; @@ -13,25 +13,33 @@ export function colorRamp(color: Color): Scale { export function createTheme( name: string, isLight: boolean, - color_ramps: { [rampName: string]: Scale }, + color_ramps: { [rampName: string]: Scale } ): Theme { let ramps: typeof color_ramps = {}; // Chromajs mutates the underlying ramp when you call domain. This causes problems because - // we now store the ramps object in the theme so that we can pull colors out of them. + // we now store the ramps object in the theme so that we can pull colors out of them. // So instead of calling domain and storing the result, we have to construct new ramps for each // theme so that we don't modify the passed in ramps. // This combined with an error in the type definitions for chroma js means we have to cast the colors // function to any in order to get the colors back out from the original ramps. if (isLight) { for (var rampName in color_ramps) { - ramps[rampName] = chroma.scale((color_ramps[rampName].colors as any)()).domain([1, 0]); + ramps[rampName] = chroma + .scale((color_ramps[rampName].colors as any)()) + .domain([1, 0]); } - ramps.neutral = chroma.scale((color_ramps.neutral.colors as any)()).domain([7, 0]); + ramps.neutral = chroma + .scale((color_ramps.neutral.colors as any)()) + .domain([7, 0]); } else { for (var rampName in color_ramps) { - ramps[rampName] = chroma.scale((color_ramps[rampName].colors as any)()).domain([0, 1]); + ramps[rampName] = chroma + .scale((color_ramps[rampName].colors as any)()) + .domain([0, 1]); } - ramps.neutral = chroma.scale((color_ramps.neutral.colors as any)()).domain([0, 7]); + ramps.neutral = chroma + .scale((color_ramps.neutral.colors as any)()) + .domain([0, 7]); } let blend = isLight ? 0.12 : 0.24; @@ -242,8 +250,12 @@ export function createTheme( }; const shadow = withOpacity( - ramps.neutral(isLight ? 7 : 0).darken().hex(), - blend); + ramps + .neutral(isLight ? 7 : 0) + .darken() + .hex(), + blend + ); return { name, diff --git a/styles/src/themes/common/theme.ts b/styles/src/themes/common/theme.ts index 7f32f48974..ac0902d8a2 100644 --- a/styles/src/themes/common/theme.ts +++ b/styles/src/themes/common/theme.ts @@ -61,7 +61,7 @@ export interface Syntax { export default interface Theme { name: string; - isLight: boolean, + isLight: boolean; backgroundColor: { // Basically just Title Bar // Lowest background level @@ -155,7 +155,7 @@ export default interface Theme { 6: Player; 7: Player; 8: Player; - }, + }; shadow: string; ramps: { [rampName: string]: Scale }; } diff --git a/styles/src/themes/one-dark.ts b/styles/src/themes/one-dark.ts index 8f65dffd76..2fbabb5c80 100644 --- a/styles/src/themes/one-dark.ts +++ b/styles/src/themes/one-dark.ts @@ -2,25 +2,26 @@ import chroma from "chroma-js"; import { colorRamp, createTheme } from "./common/base16"; const name = "one"; -const author = "Chris Kempson (http://chriskempson.com)" -const url = "https://github.com/chriskempson/base16-vim/blob/master/colors/base16-onedark.vim" +const author = "Chris Kempson (http://chriskempson.com)"; +const url = + "https://github.com/chriskempson/base16-vim/blob/master/colors/base16-onedark.vim"; -const base00 = "#282c34" -const base01 = "#353b45" -const base02 = "#3e4451" -const base03 = "#545862" -const base04 = "#565c64" -const base05 = "#abb2bf" -const base06 = "#b6bdca" -const base07 = "#c8ccd4" -const base08 = "#e06c75" -const base09 = "#d19a66" -const base0A = "#e5c07b" -const base0B = "#98c379" -const base0C = "#56b6c2" -const base0D = "#61afef" -const base0E = "#c678dd" -const base0F = "#be5046" +const base00 = "#282c34"; +const base01 = "#353b45"; +const base02 = "#3e4451"; +const base03 = "#545862"; +const base04 = "#565c64"; +const base05 = "#abb2bf"; +const base06 = "#b6bdca"; +const base07 = "#c8ccd4"; +const base08 = "#e06c75"; +const base09 = "#d19a66"; +const base0A = "#e5c07b"; +const base0B = "#98c379"; +const base0C = "#56b6c2"; +const base0D = "#61afef"; +const base0E = "#c678dd"; +const base0F = "#be5046"; const ramps = { neutral: chroma.scale([ @@ -31,7 +32,7 @@ const ramps = { base04, base05, base06, - base07 + base07, ]), red: colorRamp(chroma(base08)), orange: colorRamp(chroma(base09)), @@ -43,4 +44,4 @@ const ramps = { magenta: colorRamp(chroma(base0F)), }; -export const dark = createTheme(`${name}-dark`, false, ramps); \ No newline at end of file +export const dark = createTheme(`${name}-dark`, false, ramps); diff --git a/styles/src/themes/one-light.ts b/styles/src/themes/one-light.ts index d78f00ff55..7e468b9427 100644 --- a/styles/src/themes/one-light.ts +++ b/styles/src/themes/one-light.ts @@ -2,25 +2,26 @@ import chroma from "chroma-js"; import { colorRamp, createTheme } from "./common/base16"; const name = "one"; -const author = "Daniel Pfeifer (http://github.com/purpleKarrot)" -const url = "https://github.com/purpleKarrot/base16-one-light-scheme/blob/master/one-light.yaml" +const author = "Daniel Pfeifer (http://github.com/purpleKarrot)"; +const url = + "https://github.com/purpleKarrot/base16-one-light-scheme/blob/master/one-light.yaml"; -const base00 = "#090a0b" -const base01 = "#202227" -const base02 = "#383a42" -const base03 = "#a0a1a7" -const base04 = "#696c77" -const base05 = "#a0a1a7" -const base06 = "#e5e5e6" -const base07 = "#f0f0f1" -const base08 = "#fafafa" -const base09 = "#d75f00" -const base0A = "#c18401" -const base0B = "#50a14f" -const base0C = "#0184bc" -const base0D = "#4078f2" -const base0E = "#a626a4" -const base0F = "#986801" +const base00 = "#090a0b"; +const base01 = "#202227"; +const base02 = "#383a42"; +const base03 = "#a0a1a7"; +const base04 = "#696c77"; +const base05 = "#a0a1a7"; +const base06 = "#e5e5e6"; +const base07 = "#f0f0f1"; +const base08 = "#fafafa"; +const base09 = "#d75f00"; +const base0A = "#c18401"; +const base0B = "#50a14f"; +const base0C = "#0184bc"; +const base0D = "#4078f2"; +const base0E = "#a626a4"; +const base0F = "#986801"; const ramps = { neutral: chroma.scale([ @@ -31,7 +32,7 @@ const ramps = { base04, base05, base06, - base07 + base07, ]), red: colorRamp(chroma(base08)), orange: colorRamp(chroma(base09)), @@ -43,4 +44,4 @@ const ramps = { magenta: colorRamp(chroma(base0F)), }; -export const light = createTheme(`${name}-light`, true, ramps); \ No newline at end of file +export const light = createTheme(`${name}-light`, true, ramps); diff --git a/styles/src/utils/snakeCase.ts b/styles/src/utils/snakeCase.ts index 85a038c663..b95c28d89f 100644 --- a/styles/src/utils/snakeCase.ts +++ b/styles/src/utils/snakeCase.ts @@ -3,21 +3,21 @@ import { snakeCase } from "case-anything"; // https://stackoverflow.com/questions/60269936/typescript-convert-generic-object-from-snake-to-camel-case // Typescript magic to convert any string from camelCase to snake_case at compile time -type SnakeCase = - S extends string ? - S extends `${infer T}${infer U}` ? - `${T extends Capitalize ? "_" : ""}${Lowercase}${SnakeCase}` : - S : - S; +type SnakeCase = S extends string + ? S extends `${infer T}${infer U}` + ? `${T extends Capitalize ? "_" : ""}${Lowercase}${SnakeCase}` + : S + : S; type SnakeCased = { - [Property in keyof Type as SnakeCase]: SnakeCased -} + [Property in keyof Type as SnakeCase]: SnakeCased; +}; export default function snakeCaseTree(object: T): SnakeCased { const snakeObject: any = {}; for (const key in object) { - snakeObject[snakeCase(key, { keepSpecialCharacters: true })] = snakeCaseValue(object[key]); + snakeObject[snakeCase(key, { keepSpecialCharacters: true })] = + snakeCaseValue(object[key]); } return snakeObject; } diff --git a/styles/tsconfig.json b/styles/tsconfig.json index fa3e3062c9..fc09fdb0a4 100644 --- a/styles/tsconfig.json +++ b/styles/tsconfig.json @@ -1,14 +1,12 @@ { - "compilerOptions": { - "target": "es2015", - "module": "commonjs", - "esModuleInterop": true, - "noImplicitAny": true, - "removeComments": true, - "preserveConstEnums": true, - "sourceMap": true - }, - "exclude": [ - "node_modules" - ] + "compilerOptions": { + "target": "es2015", + "module": "commonjs", + "esModuleInterop": true, + "noImplicitAny": true, + "removeComments": true, + "preserveConstEnums": true, + "sourceMap": true + }, + "exclude": ["node_modules"] } From 8add81350eeb37c8929a4aff78931b96276c71f2 Mon Sep 17 00:00:00 2001 From: K Simmons Date: Sun, 17 Jul 2022 23:19:32 -0700 Subject: [PATCH 07/22] Rework presenter and MouseRegion to use Handler hashmap rather than individual fields --- .../src/activity_indicator.rs | 6 +- crates/auto_update/src/update_notification.rs | 8 +- crates/chat_panel/src/chat_panel.rs | 6 +- crates/contacts_panel/src/contacts_panel.rs | 29 +- crates/contacts_panel/src/notifications.rs | 10 +- crates/context_menu/src/context_menu.rs | 10 +- crates/diagnostics/src/items.rs | 10 +- crates/editor/src/editor.rs | 10 +- crates/editor/src/element.rs | 12 +- crates/gpui/src/app.rs | 4 +- crates/gpui/src/elements/event_handler.rs | 28 +- .../gpui/src/elements/mouse_event_handler.rs | 93 ++----- crates/gpui/src/elements/tooltip.rs | 6 +- crates/gpui/src/platform/event.rs | 40 ++- crates/gpui/src/platform/mac/event.rs | 8 +- crates/gpui/src/platform/mac/window.rs | 4 +- crates/gpui/src/presenter.rs | 209 ++++++--------- crates/gpui/src/scene.rs | 250 ++++++++++++++++-- crates/gpui/src/views/select.rs | 10 +- crates/picker/src/picker.rs | 8 +- crates/project_panel/src/project_panel.rs | 54 ++-- crates/search/src/buffer_search.rs | 12 +- crates/search/src/project_search.rs | 12 +- crates/terminal/src/terminal_element.rs | 119 +++++---- crates/workspace/src/pane.rs | 20 +- crates/workspace/src/sidebar.rs | 38 +-- crates/workspace/src/toolbar.rs | 6 +- crates/workspace/src/workspace.rs | 10 +- crates/zed/src/feedback.rs | 4 +- styles/package-lock.json | 1 + 30 files changed, 616 insertions(+), 421 deletions(-) diff --git a/crates/activity_indicator/src/activity_indicator.rs b/crates/activity_indicator/src/activity_indicator.rs index 8bc84f911c..8de3ceda3c 100644 --- a/crates/activity_indicator/src/activity_indicator.rs +++ b/crates/activity_indicator/src/activity_indicator.rs @@ -3,7 +3,7 @@ use editor::Editor; use futures::StreamExt; use gpui::{ actions, elements::*, platform::CursorStyle, Action, AppContext, Entity, ModelHandle, - MutableAppContext, RenderContext, View, ViewContext, ViewHandle, + MouseButton, MutableAppContext, RenderContext, View, ViewContext, ViewHandle, }; use language::{LanguageRegistry, LanguageServerBinaryStatus}; use project::{LanguageServerProgress, Project}; @@ -317,7 +317,9 @@ impl View for ActivityIndicator { if let Some(action) = action { element = element .with_cursor_style(CursorStyle::PointingHand) - .on_click(move |_, _, cx| cx.dispatch_any_action(action.boxed_clone())); + .on_click(MouseButton::Left, move |_, cx| { + cx.dispatch_any_action(action.boxed_clone()) + }); } element.boxed() diff --git a/crates/auto_update/src/update_notification.rs b/crates/auto_update/src/update_notification.rs index e9c73ef4bc..7863fe900d 100644 --- a/crates/auto_update/src/update_notification.rs +++ b/crates/auto_update/src/update_notification.rs @@ -2,7 +2,7 @@ use crate::ViewReleaseNotes; use gpui::{ elements::{Flex, MouseEventHandler, Padding, ParentElement, Svg, Text}, platform::{AppVersion, CursorStyle}, - Element, Entity, View, ViewContext, + Element, Entity, MouseButton, View, ViewContext, }; use menu::Cancel; use settings::Settings; @@ -62,7 +62,7 @@ impl View for UpdateNotification { .boxed() }) .with_padding(Padding::uniform(5.)) - .on_click(move |_, _, cx| cx.dispatch_action(Cancel)) + .on_click(MouseButton::Left, move |_, cx| cx.dispatch_action(Cancel)) .aligned() .constrained() .with_height(cx.font_cache().line_height(theme.message.text.font_size)) @@ -84,7 +84,9 @@ impl View for UpdateNotification { .boxed() }) .with_cursor_style(CursorStyle::PointingHand) - .on_click(|_, _, cx| cx.dispatch_action(ViewReleaseNotes)) + .on_click(MouseButton::Left, |_, cx| { + cx.dispatch_action(ViewReleaseNotes) + }) .boxed() } } diff --git a/crates/chat_panel/src/chat_panel.rs b/crates/chat_panel/src/chat_panel.rs index a8db280bf8..fa913971df 100644 --- a/crates/chat_panel/src/chat_panel.rs +++ b/crates/chat_panel/src/chat_panel.rs @@ -8,8 +8,8 @@ use gpui::{ elements::*, platform::CursorStyle, views::{ItemType, Select, SelectStyle}, - AppContext, Entity, ModelHandle, MutableAppContext, RenderContext, Subscription, Task, View, - ViewContext, ViewHandle, + AppContext, Entity, ModelHandle, MouseButton, MutableAppContext, RenderContext, Subscription, + Task, View, ViewContext, ViewHandle, }; use menu::Confirm; use postage::prelude::Stream; @@ -320,7 +320,7 @@ impl ChatPanel { .boxed() }) .with_cursor_style(CursorStyle::PointingHand) - .on_click(move |_, _, cx| { + .on_click(MouseButton::Left, move |_, cx| { let rpc = rpc.clone(); let this = this.clone(); cx.spawn(|mut cx| async move { diff --git a/crates/contacts_panel/src/contacts_panel.rs b/crates/contacts_panel/src/contacts_panel.rs index f4010a1278..9fc8f5f22d 100644 --- a/crates/contacts_panel/src/contacts_panel.rs +++ b/crates/contacts_panel/src/contacts_panel.rs @@ -13,8 +13,9 @@ use gpui::{ geometry::{rect::RectF, vector::vec2f}, impl_actions, impl_internal_actions, platform::CursorStyle, - AppContext, ClipboardItem, Element, ElementBox, Entity, ModelHandle, MutableAppContext, - RenderContext, Subscription, View, ViewContext, ViewHandle, WeakModelHandle, WeakViewHandle, + AppContext, ClipboardItem, Element, ElementBox, Entity, ModelHandle, MouseButton, + MutableAppContext, RenderContext, Subscription, View, ViewContext, ViewHandle, WeakModelHandle, + WeakViewHandle, }; use join_project_notification::JoinProjectNotification; use menu::{Confirm, SelectNext, SelectPrev}; @@ -310,7 +311,9 @@ impl ContactsPanel { .boxed() }) .with_cursor_style(CursorStyle::PointingHand) - .on_click(move |_, _, cx| cx.dispatch_action(ToggleExpanded(section))) + .on_click(MouseButton::Left, move |_, cx| { + cx.dispatch_action(ToggleExpanded(section)) + }) .boxed() } @@ -445,7 +448,7 @@ impl ContactsPanel { Some( button .with_cursor_style(CursorStyle::PointingHand) - .on_click(move |_, _, cx| { + .on_click(MouseButton::Left, move |_, cx| { cx.dispatch_action(ToggleProjectOnline { project: Some(open_project.clone()), }) @@ -499,7 +502,7 @@ impl ContactsPanel { } else { CursorStyle::Arrow }) - .on_click(move |_, _, cx| { + .on_click(MouseButton::Left, move |_, cx| { if !is_host { cx.dispatch_global_action(JoinProject { contact: contact.clone(), @@ -563,7 +566,7 @@ impl ContactsPanel { } else { button .with_cursor_style(CursorStyle::PointingHand) - .on_click(move |_, _, cx| { + .on_click(MouseButton::Left, move |_, cx| { let project = project_handle.upgrade(cx.deref_mut()); cx.dispatch_action(ToggleProjectOnline { project }) }) @@ -646,7 +649,7 @@ impl ContactsPanel { .boxed() }) .with_cursor_style(CursorStyle::PointingHand) - .on_click(move |_, _, cx| { + .on_click(MouseButton::Left, move |_, cx| { cx.dispatch_action(RespondToContactRequest { user_id, accept: false, @@ -668,7 +671,7 @@ impl ContactsPanel { .boxed() }) .with_cursor_style(CursorStyle::PointingHand) - .on_click(move |_, _, cx| { + .on_click(MouseButton::Left, move |_, cx| { cx.dispatch_action(RespondToContactRequest { user_id, accept: true, @@ -691,7 +694,9 @@ impl ContactsPanel { }) .with_padding(Padding::uniform(2.)) .with_cursor_style(CursorStyle::PointingHand) - .on_click(move |_, _, cx| cx.dispatch_action(RemoveContact(user_id))) + .on_click(MouseButton::Left, move |_, cx| { + cx.dispatch_action(RemoveContact(user_id)) + }) .flex_float() .boxed(), ); @@ -1078,7 +1083,9 @@ impl View for ContactsPanel { .boxed() }) .with_cursor_style(CursorStyle::PointingHand) - .on_click(|_, _, cx| cx.dispatch_action(contact_finder::Toggle)) + .on_click(MouseButton::Left, |_, cx| { + cx.dispatch_action(contact_finder::Toggle) + }) .boxed(), ) .constrained() @@ -1126,7 +1133,7 @@ impl View for ContactsPanel { }, ) .with_cursor_style(CursorStyle::PointingHand) - .on_click(move |_, _, cx| { + .on_click(MouseButton::Left, move |_, cx| { cx.write_to_clipboard(ClipboardItem::new( info.url.to_string(), )); diff --git a/crates/contacts_panel/src/notifications.rs b/crates/contacts_panel/src/notifications.rs index c02fd73b8f..a80dafdd22 100644 --- a/crates/contacts_panel/src/notifications.rs +++ b/crates/contacts_panel/src/notifications.rs @@ -3,7 +3,7 @@ use client::User; use gpui::{ elements::{Flex, Image, Label, MouseEventHandler, Padding, ParentElement, Text}, platform::CursorStyle, - Action, Element, ElementBox, RenderContext, View, + Action, Element, ElementBox, MouseButton, RenderContext, View, }; use settings::Settings; use std::sync::Arc; @@ -61,7 +61,9 @@ pub fn render_user_notification( }) .with_cursor_style(CursorStyle::PointingHand) .with_padding(Padding::uniform(5.)) - .on_click(move |_, _, cx| cx.dispatch_any_action(dismiss_action.boxed_clone())) + .on_click(MouseButton::Left, move |_, cx| { + cx.dispatch_any_action(dismiss_action.boxed_clone()) + }) .aligned() .constrained() .with_height( @@ -96,7 +98,9 @@ pub fn render_user_notification( .boxed() }) .with_cursor_style(CursorStyle::PointingHand) - .on_click(move |_, _, cx| cx.dispatch_any_action(action.boxed_clone())) + .on_click(MouseButton::Left, move |_, cx| { + cx.dispatch_any_action(action.boxed_clone()) + }) .boxed() }, )) diff --git a/crates/context_menu/src/context_menu.rs b/crates/context_menu/src/context_menu.rs index 39477bc927..7bfe3bb2e8 100644 --- a/crates/context_menu/src/context_menu.rs +++ b/crates/context_menu/src/context_menu.rs @@ -1,7 +1,7 @@ use gpui::{ elements::*, geometry::vector::Vector2F, impl_internal_actions, keymap, platform::CursorStyle, - Action, AppContext, Axis, Entity, MutableAppContext, RenderContext, SizeConstraint, - Subscription, View, ViewContext, + Action, AppContext, Axis, Entity, MouseButton, MutableAppContext, RenderContext, + SizeConstraint, Subscription, View, ViewContext, }; use menu::*; use settings::Settings; @@ -337,7 +337,7 @@ impl ContextMenu { .boxed() }) .with_cursor_style(CursorStyle::PointingHand) - .on_click(move |_, _, cx| { + .on_click(MouseButton::Left, move |_, cx| { cx.dispatch_action(Clicked); cx.dispatch_any_action(action.boxed_clone()); }) @@ -355,7 +355,7 @@ impl ContextMenu { .with_style(style.container) .boxed() }) - .on_mouse_down_out(|_, cx| cx.dispatch_action(Cancel)) - .on_right_mouse_down_out(|_, cx| cx.dispatch_action(Cancel)) + .on_mouse_down_out(MouseButton::Left, |_, cx| cx.dispatch_action(Cancel)) + .on_mouse_down_out(MouseButton::Right, |_, cx| cx.dispatch_action(Cancel)) } } diff --git a/crates/diagnostics/src/items.rs b/crates/diagnostics/src/items.rs index e2961ff3bd..b7c4b2a22d 100644 --- a/crates/diagnostics/src/items.rs +++ b/crates/diagnostics/src/items.rs @@ -1,8 +1,8 @@ use collections::HashSet; use editor::{Editor, GoToNextDiagnostic}; use gpui::{ - elements::*, platform::CursorStyle, serde_json, Entity, ModelHandle, MutableAppContext, - RenderContext, Subscription, View, ViewContext, ViewHandle, WeakViewHandle, + elements::*, platform::CursorStyle, serde_json, Entity, ModelHandle, MouseButton, + MutableAppContext, RenderContext, Subscription, View, ViewContext, ViewHandle, WeakViewHandle, }; use language::Diagnostic; use project::Project; @@ -161,7 +161,7 @@ impl View for DiagnosticIndicator { .boxed() }) .with_cursor_style(CursorStyle::PointingHand) - .on_click(|_, _, cx| cx.dispatch_action(crate::Deploy)) + .on_click(MouseButton::Left, |_, cx| cx.dispatch_action(crate::Deploy)) .with_tooltip::( 0, "Project Diagnostics".to_string(), @@ -201,7 +201,9 @@ impl View for DiagnosticIndicator { .boxed() }) .with_cursor_style(CursorStyle::PointingHand) - .on_click(|_, _, cx| cx.dispatch_action(GoToNextDiagnostic)) + .on_click(MouseButton::Left, |_, cx| { + cx.dispatch_action(GoToNextDiagnostic) + }) .boxed(), ); } diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 72ba6d60af..321c94e2bd 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -30,8 +30,8 @@ use gpui::{ impl_actions, impl_internal_actions, platform::CursorStyle, text_layout, AppContext, AsyncAppContext, ClipboardItem, Element, ElementBox, Entity, - ModelHandle, MutableAppContext, RenderContext, Subscription, Task, View, ViewContext, - ViewHandle, WeakViewHandle, + ModelHandle, MouseButton, MutableAppContext, RenderContext, Subscription, Task, View, + ViewContext, ViewHandle, WeakViewHandle, }; use highlight_matching_bracket::refresh_matching_bracket_highlights; use hover_popover::{hide_hover, HoverState}; @@ -707,7 +707,7 @@ impl CompletionsMenu { }, ) .with_cursor_style(CursorStyle::PointingHand) - .on_mouse_down(move |_, cx| { + .on_mouse_down(MouseButton::Left, move |_, cx| { cx.dispatch_action(ConfirmCompletion { item_ix: Some(item_ix), }); @@ -840,7 +840,7 @@ impl CodeActionsMenu { .boxed() }) .with_cursor_style(CursorStyle::PointingHand) - .on_mouse_down(move |_, cx| { + .on_mouse_down(MouseButton::Left, move |_, cx| { cx.dispatch_action(ConfirmCodeAction { item_ix: Some(item_ix), }); @@ -2674,7 +2674,7 @@ impl Editor { }) .with_cursor_style(CursorStyle::PointingHand) .with_padding(Padding::uniform(3.)) - .on_mouse_down(|_, cx| { + .on_mouse_down(MouseButton::Left, |_, cx| { cx.dispatch_action(ToggleCodeActions { deployed_from_indicator: true, }); diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 99d60ed9a2..013de1e7df 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -25,7 +25,7 @@ use gpui::{ platform::CursorStyle, text_layout::{self, Line, RunStyle, TextLayoutCache}, AppContext, Axis, Border, CursorRegion, Element, ElementBox, Event, EventContext, KeyDownEvent, - LayoutContext, ModifiersChangedEvent, MouseButton, MouseEvent, MouseMovedEvent, + LayoutContext, ModifiersChangedEvent, MouseButton, MouseButtonEvent, MouseMovedEvent, MutableAppContext, PaintContext, Quad, Scene, ScrollWheelEvent, SizeConstraint, ViewContext, WeakViewHandle, }; @@ -968,7 +968,9 @@ impl EditorElement { .boxed() }) .with_cursor_style(CursorStyle::PointingHand) - .on_click(move |_, _, cx| cx.dispatch_action(jump_action.clone())) + .on_click(MouseButton::Left, move |_, cx| { + cx.dispatch_action(jump_action.clone()) + }) .with_tooltip::( *key, "Jump to Buffer".to_string(), @@ -1483,7 +1485,7 @@ impl Element for EditorElement { } match event { - Event::MouseDown(MouseEvent { + Event::MouseDown(MouseButtonEvent { button: MouseButton::Left, position, cmd, @@ -1501,12 +1503,12 @@ impl Element for EditorElement { paint, cx, ), - Event::MouseDown(MouseEvent { + Event::MouseDown(MouseButtonEvent { button: MouseButton::Right, position, .. }) => self.mouse_right_down(*position, layout, paint, cx), - Event::MouseUp(MouseEvent { + Event::MouseUp(MouseButtonEvent { button: MouseButton::Left, position, .. diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs index 075339bba1..2cd6687bcb 100644 --- a/crates/gpui/src/app.rs +++ b/crates/gpui/src/app.rs @@ -5401,7 +5401,7 @@ impl RefCounts { #[cfg(test)] mod tests { use super::*; - use crate::{actions, elements::*, impl_actions, MouseButton, MouseEvent}; + use crate::{actions, elements::*, impl_actions, MouseButton, MouseButtonEvent}; use serde::Deserialize; use smol::future::poll_once; use std::{ @@ -5754,7 +5754,7 @@ mod tests { let presenter = cx.presenters_and_platform_windows[&window_id].0.clone(); // Ensure window's root element is in a valid lifecycle state. presenter.borrow_mut().dispatch_event( - Event::MouseDown(MouseEvent { + Event::MouseDown(MouseButtonEvent { position: Default::default(), button: MouseButton::Left, ctrl: false, diff --git a/crates/gpui/src/elements/event_handler.rs b/crates/gpui/src/elements/event_handler.rs index 1fec838788..55e4928ad8 100644 --- a/crates/gpui/src/elements/event_handler.rs +++ b/crates/gpui/src/elements/event_handler.rs @@ -1,11 +1,11 @@ use crate::{ geometry::vector::Vector2F, CursorRegion, DebugContext, Element, ElementBox, Event, - EventContext, LayoutContext, MouseButton, MouseEvent, MouseRegion, NavigationDirection, + EventContext, LayoutContext, MouseButton, MouseButtonEvent, MouseRegion, NavigationDirection, PaintContext, SizeConstraint, }; use pathfinder_geometry::rect::RectF; use serde_json::json; -use std::{any::TypeId, rc::Rc}; +use std::any::TypeId; pub struct EventHandler { child: ElementBox, @@ -82,19 +82,11 @@ impl Element for EventHandler { bounds: visible_bounds, style: Default::default(), }); - cx.scene.push_mouse_region(MouseRegion { - view_id: cx.current_view_id(), - discriminant: Some(discriminant), - bounds: visible_bounds, - hover: Some(Rc::new(|_, _, _| {})), - mouse_down: Some(Rc::new(|_, _| {})), - click: Some(Rc::new(|_, _, _| {})), - right_mouse_down: Some(Rc::new(|_, _| {})), - right_click: Some(Rc::new(|_, _, _| {})), - drag: Some(Rc::new(|_, _, _| {})), - mouse_down_out: Some(Rc::new(|_, _| {})), - right_mouse_down_out: Some(Rc::new(|_, _| {})), - }); + cx.scene.push_mouse_region(MouseRegion::handle_all( + cx.current_view_id(), + Some(discriminant), + visible_bounds, + )); cx.scene.pop_stacking_context(); } self.child.paint(bounds.origin(), visible_bounds, cx); @@ -117,7 +109,7 @@ impl Element for EventHandler { true } else { match event { - Event::MouseDown(MouseEvent { + Event::MouseDown(MouseButtonEvent { button: MouseButton::Left, position, .. @@ -129,7 +121,7 @@ impl Element for EventHandler { } false } - Event::MouseDown(MouseEvent { + Event::MouseDown(MouseButtonEvent { button: MouseButton::Right, position, .. @@ -141,7 +133,7 @@ impl Element for EventHandler { } false } - Event::MouseDown(MouseEvent { + Event::MouseDown(MouseButtonEvent { button: MouseButton::Navigate(direction), position, .. diff --git a/crates/gpui/src/elements/mouse_event_handler.rs b/crates/gpui/src/elements/mouse_event_handler.rs index 832aafaa9e..3a8a5f6d63 100644 --- a/crates/gpui/src/elements/mouse_event_handler.rs +++ b/crates/gpui/src/elements/mouse_event_handler.rs @@ -1,4 +1,4 @@ -use std::{any::TypeId, rc::Rc}; +use std::any::TypeId; use super::Padding; use crate::{ @@ -8,24 +8,16 @@ use crate::{ }, platform::CursorStyle, scene::CursorRegion, - DebugContext, Element, ElementBox, Event, EventContext, LayoutContext, MouseRegion, MouseState, - PaintContext, RenderContext, SizeConstraint, View, + DebugContext, Element, ElementBox, Event, EventContext, LayoutContext, MouseButton, + MouseButtonEvent, MouseMovedEvent, MouseRegion, MouseState, PaintContext, RenderContext, + SizeConstraint, View, }; use serde_json::json; pub struct MouseEventHandler { child: ElementBox, - tag: TypeId, - id: usize, cursor_style: Option, - mouse_down: Option>, - click: Option>, - right_mouse_down: Option>, - right_click: Option>, - mouse_down_out: Option>, - right_mouse_down_out: Option>, - drag: Option>, - hover: Option>, + region: MouseRegion, padding: Padding, } @@ -37,18 +29,9 @@ impl MouseEventHandler { F: FnOnce(MouseState, &mut RenderContext) -> ElementBox, { Self { - id, - tag: TypeId::of::(), child: render_child(cx.mouse_state::(id), cx), cursor_style: None, - mouse_down: None, - click: None, - right_mouse_down: None, - right_click: None, - mouse_down_out: None, - right_mouse_down_out: None, - drag: None, - hover: None, + region: MouseRegion::new(0, Some((TypeId::of::(), id)), Default::default()), padding: Default::default(), } } @@ -60,65 +43,45 @@ impl MouseEventHandler { pub fn on_mouse_down( mut self, - handler: impl Fn(Vector2F, &mut EventContext) + 'static, + button: MouseButton, + handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, ) -> Self { - self.mouse_down = Some(Rc::new(handler)); + self.region = self.region.on_down(button, handler); self } pub fn on_click( mut self, - handler: impl Fn(Vector2F, usize, &mut EventContext) + 'static, + button: MouseButton, + handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, ) -> Self { - self.click = Some(Rc::new(handler)); - self - } - - pub fn on_right_mouse_down( - mut self, - handler: impl Fn(Vector2F, &mut EventContext) + 'static, - ) -> Self { - self.right_mouse_down = Some(Rc::new(handler)); - self - } - - pub fn on_right_click( - mut self, - handler: impl Fn(Vector2F, usize, &mut EventContext) + 'static, - ) -> Self { - self.right_click = Some(Rc::new(handler)); + self.region = self.region.on_click(button, handler); self } pub fn on_mouse_down_out( mut self, - handler: impl Fn(Vector2F, &mut EventContext) + 'static, + button: MouseButton, + handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, ) -> Self { - self.mouse_down_out = Some(Rc::new(handler)); - self - } - - pub fn on_right_mouse_down_out( - mut self, - handler: impl Fn(Vector2F, &mut EventContext) + 'static, - ) -> Self { - self.right_mouse_down_out = Some(Rc::new(handler)); + self.region = self.region.on_down_out(button, handler); self } pub fn on_drag( mut self, - handler: impl Fn(Vector2F, Vector2F, &mut EventContext) + 'static, + button: MouseButton, + handler: impl Fn(Vector2F, MouseMovedEvent, &mut EventContext) + 'static, ) -> Self { - self.drag = Some(Rc::new(handler)); + self.region = self.region.on_drag(button, handler); self } pub fn on_hover( mut self, - handler: impl Fn(Vector2F, bool, &mut EventContext) + 'static, + handler: impl Fn(bool, MouseMovedEvent, &mut EventContext) + 'static, ) -> Self { - self.hover = Some(Rc::new(handler)); + self.region = self.region.on_hover(handler); self } @@ -163,19 +126,9 @@ impl Element for MouseEventHandler { }); } - cx.scene.push_mouse_region(MouseRegion { - view_id: cx.current_view_id(), - discriminant: Some((self.tag, self.id)), - bounds: hit_bounds, - hover: self.hover.clone(), - click: self.click.clone(), - mouse_down: self.mouse_down.clone(), - right_click: self.right_click.clone(), - right_mouse_down: self.right_mouse_down.clone(), - mouse_down_out: self.mouse_down_out.clone(), - right_mouse_down_out: self.right_mouse_down_out.clone(), - drag: self.drag.clone(), - }); + self.region.view_id = cx.current_view_id(); + self.region.bounds = hit_bounds; + cx.scene.push_mouse_region(self.region.clone()); self.child.paint(bounds.origin(), visible_bounds, cx); } diff --git a/crates/gpui/src/elements/tooltip.rs b/crates/gpui/src/elements/tooltip.rs index 9a65b2661d..572d142521 100644 --- a/crates/gpui/src/elements/tooltip.rs +++ b/crates/gpui/src/elements/tooltip.rs @@ -6,8 +6,8 @@ use crate::{ fonts::TextStyle, geometry::{rect::RectF, vector::Vector2F}, json::json, - Action, Axis, ElementStateHandle, LayoutContext, PaintContext, RenderContext, SizeConstraint, - Task, View, + Action, Axis, ElementStateHandle, LayoutContext, MouseMovedEvent, PaintContext, RenderContext, + SizeConstraint, Task, View, }; use serde::Deserialize; use std::{ @@ -91,7 +91,7 @@ impl Tooltip { }; let child = MouseEventHandler::new::, _, _>(id, cx, |_, _| child) - .on_hover(move |position, hover, cx| { + .on_hover(move |hover, MouseMovedEvent { position, .. }, cx| { let window_id = cx.window_id(); if let Some(view_id) = cx.view_id() { if hover { diff --git a/crates/gpui/src/platform/event.rs b/crates/gpui/src/platform/event.rs index 90b5d21fc2..57e945175b 100644 --- a/crates/gpui/src/platform/event.rs +++ b/crates/gpui/src/platform/event.rs @@ -21,20 +21,26 @@ pub struct ModifiersChangedEvent { pub cmd: bool, } -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct ScrollWheelEvent { pub position: Vector2F, pub delta: Vector2F, pub precise: bool, } -#[derive(Copy, Clone, Debug)] +#[derive(Hash, PartialEq, Eq, Copy, Clone, Debug)] pub enum NavigationDirection { Back, Forward, } -#[derive(Copy, Clone, Debug)] +impl Default for NavigationDirection { + fn default() -> Self { + Self::Back + } +} + +#[derive(Hash, PartialEq, Eq, Copy, Clone, Debug)] pub enum MouseButton { Left, Right, @@ -42,8 +48,26 @@ pub enum MouseButton { Navigate(NavigationDirection), } -#[derive(Clone, Debug)] -pub struct MouseEvent { +impl MouseButton { + pub fn all() -> Vec { + vec![ + MouseButton::Left, + MouseButton::Right, + MouseButton::Middle, + MouseButton::Navigate(NavigationDirection::Back), + MouseButton::Navigate(NavigationDirection::Forward), + ] + } +} + +impl Default for MouseButton { + fn default() -> Self { + Self::Left + } +} + +#[derive(Clone, Debug, Default)] +pub struct MouseButtonEvent { pub button: MouseButton, pub position: Vector2F, pub ctrl: bool, @@ -53,7 +77,7 @@ pub struct MouseEvent { pub click_count: usize, } -#[derive(Clone, Copy, Debug)] +#[derive(Clone, Copy, Debug, Default)] pub struct MouseMovedEvent { pub position: Vector2F, pub pressed_button: Option, @@ -68,8 +92,8 @@ pub enum Event { KeyDown(KeyDownEvent), KeyUp(KeyUpEvent), ModifiersChanged(ModifiersChangedEvent), - MouseDown(MouseEvent), - MouseUp(MouseEvent), + MouseDown(MouseButtonEvent), + MouseUp(MouseButtonEvent), MouseMoved(MouseMovedEvent), ScrollWheel(ScrollWheelEvent), } diff --git a/crates/gpui/src/platform/mac/event.rs b/crates/gpui/src/platform/mac/event.rs index 5e23859675..209d8de766 100644 --- a/crates/gpui/src/platform/mac/event.rs +++ b/crates/gpui/src/platform/mac/event.rs @@ -2,8 +2,8 @@ use crate::{ geometry::vector::vec2f, keymap::Keystroke, platform::{Event, NavigationDirection}, - KeyDownEvent, KeyUpEvent, ModifiersChangedEvent, MouseButton, MouseEvent, MouseMovedEvent, - ScrollWheelEvent, + KeyDownEvent, KeyUpEvent, ModifiersChangedEvent, MouseButton, MouseButtonEvent, + MouseMovedEvent, ScrollWheelEvent, }; use cocoa::{ appkit::{NSEvent, NSEventModifierFlags, NSEventType}, @@ -126,7 +126,7 @@ impl Event { let modifiers = native_event.modifierFlags(); window_height.map(|window_height| { - Self::MouseDown(MouseEvent { + Self::MouseDown(MouseButtonEvent { button, position: vec2f( native_event.locationInWindow().x as f32, @@ -155,7 +155,7 @@ impl Event { window_height.map(|window_height| { let modifiers = native_event.modifierFlags(); - Self::MouseUp(MouseEvent { + Self::MouseUp(MouseButtonEvent { button, position: vec2f( native_event.locationInWindow().x as f32, diff --git a/crates/gpui/src/platform/mac/window.rs b/crates/gpui/src/platform/mac/window.rs index 43ce09ffff..2680d9aa46 100644 --- a/crates/gpui/src/platform/mac/window.rs +++ b/crates/gpui/src/platform/mac/window.rs @@ -6,7 +6,7 @@ use crate::{ }, keymap::Keystroke, platform::{self, Event, WindowBounds, WindowContext}, - KeyDownEvent, ModifiersChangedEvent, MouseButton, MouseEvent, MouseMovedEvent, Scene, + KeyDownEvent, ModifiersChangedEvent, MouseButton, MouseButtonEvent, MouseMovedEvent, Scene, }; use block::ConcreteBlock; use cocoa::{ @@ -635,7 +635,7 @@ extern "C" fn handle_view_event(this: &Object, _: Sel, native_event: id) { )) .detach(); } - Event::MouseUp(MouseEvent { + Event::MouseUp(MouseButtonEvent { button: MouseButton::Left, .. }) => { diff --git a/crates/gpui/src/presenter.rs b/crates/gpui/src/presenter.rs index 86a8c4cf30..243863149d 100644 --- a/crates/gpui/src/presenter.rs +++ b/crates/gpui/src/presenter.rs @@ -6,10 +6,10 @@ use crate::{ json::{self, ToJson}, keymap::Keystroke, platform::{CursorStyle, Event}, - scene::CursorRegion, + scene::{CursorRegion, MouseRegionEvent}, text_layout::TextLayoutCache, Action, AnyModelHandle, AnyViewHandle, AnyWeakModelHandle, AssetCache, ElementBox, Entity, - FontSystem, ModelHandle, MouseButton, MouseEvent, MouseMovedEvent, MouseRegion, MouseRegionId, + FontSystem, ModelHandle, MouseButtonEvent, MouseMovedEvent, MouseRegion, MouseRegionId, ReadModel, ReadView, RenderContext, RenderParams, Scene, UpgradeModelHandle, UpgradeViewHandle, View, ViewHandle, WeakModelHandle, WeakViewHandle, }; @@ -230,105 +230,58 @@ impl Presenter { let mut mouse_down_out_handlers = Vec::new(); let mut mouse_down_region = None; let mut clicked_region = None; - let mut right_mouse_down_region = None; - let mut right_clicked_region = None; let mut dragged_region = None; - match event { - Event::MouseDown(MouseEvent { - position, - button: MouseButton::Left, - .. - }) => { + match &event { + Event::MouseDown( + e @ MouseButtonEvent { + position, button, .. + }, + ) => { let mut hit = false; for (region, _) in self.mouse_regions.iter().rev() { - if region.bounds.contains_point(position) { + if region.bounds.contains_point(*position) { if !hit { hit = true; invalidated_views.push(region.view_id); - mouse_down_region = Some((region.clone(), position)); + mouse_down_region = + Some((region.clone(), MouseRegionEvent::Down(e.clone()))); self.clicked_region = Some(region.clone()); - self.prev_drag_position = Some(position); + self.prev_drag_position = Some(*position); } - } else if let Some(handler) = region.mouse_down_out.clone() { - mouse_down_out_handlers.push((handler, region.view_id, position)); + } else if let Some(handler) = region + .handlers + .get(&(MouseRegionEvent::down_out_disc(), Some(*button))) + .cloned() + { + mouse_down_out_handlers.push(( + handler, + region.view_id, + MouseRegionEvent::DownOut(e.clone()), + )); } } } - Event::MouseUp(MouseEvent { - position, - click_count, - button: MouseButton::Left, - .. - }) => { + Event::MouseUp(e @ MouseButtonEvent { position, .. }) => { self.prev_drag_position.take(); if let Some(region) = self.clicked_region.take() { invalidated_views.push(region.view_id); - if region.bounds.contains_point(position) { - clicked_region = Some((region, position, click_count)); + if region.bounds.contains_point(*position) { + clicked_region = Some((region, MouseRegionEvent::Click(e.clone()))); } } } - Event::MouseDown(MouseEvent { - position, - button: MouseButton::Right, - .. - }) => { - let mut hit = false; - for (region, _) in self.mouse_regions.iter().rev() { - if region.bounds.contains_point(position) { - if !hit { - hit = true; - invalidated_views.push(region.view_id); - right_mouse_down_region = Some((region.clone(), position)); - self.right_clicked_region = Some(region.clone()); - } - } else if let Some(handler) = region.right_mouse_down_out.clone() { - mouse_down_out_handlers.push((handler, region.view_id, position)); - } - } - } - Event::MouseUp(MouseEvent { - position, - click_count, - button: MouseButton::Right, - .. - }) => { - if let Some(region) = self.right_clicked_region.take() { - invalidated_views.push(region.view_id); - if region.bounds.contains_point(position) { - right_clicked_region = Some((region, position, click_count)); - } - } - } - Event::MouseMoved(MouseMovedEvent { - pressed_button, - position, - shift, - ctrl, - alt, - cmd, - .. - }) => { - if let Some(MouseButton::Left) = pressed_button { - if let Some((clicked_region, prev_drag_position)) = self - .clicked_region - .as_ref() - .zip(self.prev_drag_position.as_mut()) - { - dragged_region = - Some((clicked_region.clone(), *prev_drag_position, position)); - *prev_drag_position = position; - } - - self.last_mouse_moved_event = Some(Event::MouseMoved(MouseMovedEvent { - position, - pressed_button: Some(MouseButton::Left), - shift, - ctrl, - alt, - cmd, - })); + Event::MouseMoved(e @ MouseMovedEvent { position, .. }) => { + if let Some((clicked_region, prev_drag_position)) = self + .clicked_region + .as_ref() + .zip(self.prev_drag_position.as_mut()) + { + dragged_region = Some(( + clicked_region.clone(), + MouseRegionEvent::Drag(*prev_drag_position, e.clone()), + )); + *prev_drag_position = *position; } self.last_mouse_moved_event = Some(event.clone()); @@ -339,51 +292,39 @@ impl Presenter { let (mut handled, mut event_cx) = self.handle_hover_events(&event, &mut invalidated_views, cx); - for (handler, view_id, position) in mouse_down_out_handlers { - event_cx.with_current_view(view_id, |event_cx| handler(position, event_cx)) + for (handler, view_id, region_event) in mouse_down_out_handlers { + event_cx.with_current_view(view_id, |event_cx| handler(region_event, event_cx)) } - if let Some((mouse_down_region, position)) = mouse_down_region { + if let Some((mouse_down_region, region_event)) = mouse_down_region { handled = true; - if let Some(mouse_down_callback) = mouse_down_region.mouse_down { + if let Some(mouse_down_callback) = + mouse_down_region.handlers.get(®ion_event.handler_key()) + { event_cx.with_current_view(mouse_down_region.view_id, |event_cx| { - mouse_down_callback(position, event_cx); + mouse_down_callback(region_event, event_cx); }) } } - if let Some((clicked_region, position, click_count)) = clicked_region { + if let Some((clicked_region, region_event)) = clicked_region { handled = true; - if let Some(click_callback) = clicked_region.click { + if let Some(click_callback) = + clicked_region.handlers.get(®ion_event.handler_key()) + { event_cx.with_current_view(clicked_region.view_id, |event_cx| { - click_callback(position, click_count, event_cx); + click_callback(region_event, event_cx); }) } } - if let Some((right_mouse_down_region, position)) = right_mouse_down_region { + if let Some((dragged_region, region_event)) = dragged_region { handled = true; - if let Some(right_mouse_down_callback) = right_mouse_down_region.right_mouse_down { - event_cx.with_current_view(right_mouse_down_region.view_id, |event_cx| { - right_mouse_down_callback(position, event_cx); - }) - } - } - - if let Some((right_clicked_region, position, click_count)) = right_clicked_region { - handled = true; - if let Some(right_click_callback) = right_clicked_region.right_click { - event_cx.with_current_view(right_clicked_region.view_id, |event_cx| { - right_click_callback(position, click_count, event_cx); - }) - } - } - - if let Some((dragged_region, prev_position, position)) = dragged_region { - handled = true; - if let Some(drag_callback) = dragged_region.drag { + if let Some(drag_callback) = + dragged_region.handlers.get(®ion_event.handler_key()) + { event_cx.with_current_view(dragged_region.view_id, |event_cx| { - drag_callback(prev_position, position, event_cx); + drag_callback(region_event, event_cx); }) } } @@ -420,14 +361,17 @@ impl Presenter { invalidated_views: &mut Vec, cx: &'a mut MutableAppContext, ) -> (bool, EventContext<'a>) { - let mut unhovered_regions = Vec::new(); - let mut hovered_regions = Vec::new(); + let mut hover_regions = Vec::new(); + // let mut unhovered_regions = Vec::new(); + // let mut hovered_regions = Vec::new(); - if let Event::MouseMoved(MouseMovedEvent { - position, - pressed_button, - .. - }) = event + if let Event::MouseMoved( + e @ MouseMovedEvent { + position, + pressed_button, + .. + }, + ) = event { if let None = pressed_button { let mut style_to_assign = CursorStyle::Arrow; @@ -448,7 +392,10 @@ impl Presenter { if let Some(region_id) = region.id() { if !self.hovered_region_ids.contains(®ion_id) { invalidated_views.push(region.view_id); - hovered_regions.push((region.clone(), position)); + hover_regions.push(( + region.clone(), + MouseRegionEvent::Hover(true, e.clone()), + )); self.hovered_region_ids.insert(region_id); } } @@ -456,7 +403,10 @@ impl Presenter { if let Some(region_id) = region.id() { if self.hovered_region_ids.contains(®ion_id) { invalidated_views.push(region.view_id); - unhovered_regions.push((region.clone(), position)); + hover_regions.push(( + region.clone(), + MouseRegionEvent::Hover(false, e.clone()), + )); self.hovered_region_ids.remove(®ion_id); } } @@ -468,20 +418,11 @@ impl Presenter { let mut event_cx = self.build_event_context(cx); let mut handled = false; - for (unhovered_region, position) in unhovered_regions { + for (hover_region, region_event) in hover_regions { handled = true; - if let Some(hover_callback) = unhovered_region.hover { - event_cx.with_current_view(unhovered_region.view_id, |event_cx| { - hover_callback(*position, false, event_cx); - }) - } - } - - for (hovered_region, position) in hovered_regions { - handled = true; - if let Some(hover_callback) = hovered_region.hover { - event_cx.with_current_view(hovered_region.view_id, |event_cx| { - hover_callback(*position, true, event_cx); + if let Some(hover_callback) = hover_region.handlers.get(®ion_event.handler_key()) { + event_cx.with_current_view(hover_region.view_id, |event_cx| { + hover_callback(region_event, event_cx); }) } } diff --git a/crates/gpui/src/scene.rs b/crates/gpui/src/scene.rs index 769eabe7e5..f5577c5e5d 100644 --- a/crates/gpui/src/scene.rs +++ b/crates/gpui/src/scene.rs @@ -1,6 +1,7 @@ +use collections::HashMap; use serde::Deserialize; use serde_json::json; -use std::{any::TypeId, borrow::Cow, rc::Rc, sync::Arc}; +use std::{any::TypeId, borrow::Cow, mem::Discriminant, rc::Rc, sync::Arc}; use crate::{ color::Color, @@ -8,7 +9,7 @@ use crate::{ geometry::{rect::RectF, vector::Vector2F}, json::ToJson, platform::CursorStyle, - EventContext, ImageData, MouseEvent, MouseMovedEvent, ScrollWheelEvent, + EventContext, ImageData, MouseButton, MouseButtonEvent, MouseMovedEvent, ScrollWheelEvent, }; pub struct Scene { @@ -44,30 +45,247 @@ pub struct CursorRegion { pub style: CursorStyle, } +#[derive(Debug)] pub enum MouseRegionEvent { - Moved(MouseMovedEvent), - Hover(MouseEvent), - Down(MouseEvent), - Up(MouseEvent), - Click(MouseEvent), - DownOut(MouseEvent), + Move(MouseMovedEvent), + Drag(Vector2F, MouseMovedEvent), + Hover(bool, MouseMovedEvent), + Down(MouseButtonEvent), + Up(MouseButtonEvent), + Click(MouseButtonEvent), + DownOut(MouseButtonEvent), ScrollWheel(ScrollWheelEvent), } +impl MouseRegionEvent { + pub fn move_disc() -> Discriminant { + std::mem::discriminant(&MouseRegionEvent::Move(Default::default())) + } + pub fn drag_disc() -> Discriminant { + std::mem::discriminant(&MouseRegionEvent::Drag( + Default::default(), + Default::default(), + )) + } + pub fn hover_disc() -> Discriminant { + std::mem::discriminant(&MouseRegionEvent::Hover( + Default::default(), + Default::default(), + )) + } + pub fn down_disc() -> Discriminant { + std::mem::discriminant(&MouseRegionEvent::Down(Default::default())) + } + pub fn up_disc() -> Discriminant { + std::mem::discriminant(&MouseRegionEvent::Up(Default::default())) + } + pub fn click_disc() -> Discriminant { + std::mem::discriminant(&MouseRegionEvent::Click(Default::default())) + } + pub fn down_out_disc() -> Discriminant { + std::mem::discriminant(&MouseRegionEvent::DownOut(Default::default())) + } + pub fn scroll_wheel_disc() -> Discriminant { + std::mem::discriminant(&MouseRegionEvent::ScrollWheel(Default::default())) + } + + pub fn handler_key(&self) -> (Discriminant, Option) { + match self { + MouseRegionEvent::Move(_) => (Self::move_disc(), None), + MouseRegionEvent::Drag(_, MouseMovedEvent { pressed_button, .. }) => { + (Self::drag_disc(), *pressed_button) + } + MouseRegionEvent::Hover(_, _) => (Self::hover_disc(), None), + MouseRegionEvent::Down(MouseButtonEvent { button, .. }) => { + (Self::down_disc(), Some(*button)) + } + MouseRegionEvent::Up(MouseButtonEvent { button, .. }) => { + (Self::up_disc(), Some(*button)) + } + MouseRegionEvent::Click(MouseButtonEvent { button, .. }) => { + (Self::click_disc(), Some(*button)) + } + MouseRegionEvent::DownOut(MouseButtonEvent { button, .. }) => { + (Self::down_out_disc(), Some(*button)) + } + MouseRegionEvent::ScrollWheel(_) => (Self::scroll_wheel_disc(), None), + } + } +} + #[derive(Clone, Default)] pub struct MouseRegion { pub view_id: usize, pub discriminant: Option<(TypeId, usize)>, pub bounds: RectF, + pub handlers: HashMap< + (Discriminant, Option), + Rc, + >, +} - pub hover: Option>, - pub mouse_down: Option>, - pub click: Option>, - pub right_mouse_down: Option>, - pub right_click: Option>, - pub drag: Option>, - pub mouse_down_out: Option>, - pub right_mouse_down_out: Option>, +impl MouseRegion { + pub fn new(view_id: usize, discriminant: Option<(TypeId, usize)>, bounds: RectF) -> Self { + Self { + view_id, + discriminant, + bounds, + handlers: Default::default(), + } + } + + pub fn handle_all( + view_id: usize, + discriminant: Option<(TypeId, usize)>, + bounds: RectF, + ) -> Self { + let mut handlers: HashMap< + (Discriminant, Option), + Rc, + > = Default::default(); + handlers.insert((MouseRegionEvent::move_disc(), None), Rc::new(|_, _| {})); + handlers.insert((MouseRegionEvent::hover_disc(), None), Rc::new(|_, _| {})); + for button in MouseButton::all() { + handlers.insert( + (MouseRegionEvent::drag_disc(), Some(button)), + Rc::new(|_, _| {}), + ); + handlers.insert( + (MouseRegionEvent::down_disc(), Some(button)), + Rc::new(|_, _| {}), + ); + handlers.insert( + (MouseRegionEvent::up_disc(), Some(button)), + Rc::new(|_, _| {}), + ); + handlers.insert( + (MouseRegionEvent::click_disc(), Some(button)), + Rc::new(|_, _| {}), + ); + handlers.insert( + (MouseRegionEvent::down_out_disc(), Some(button)), + Rc::new(|_, _| {}), + ); + } + handlers.insert( + (MouseRegionEvent::scroll_wheel_disc(), None), + Rc::new(|_, _| {}), + ); + + Self { + view_id, + discriminant, + bounds, + handlers, + } + } + + pub fn on_down( + mut self, + button: MouseButton, + handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, + ) -> Self { + self.handlers.insert((MouseRegionEvent::down_disc(), Some(button)), + Rc::new(move |region_event, cx| { + if let MouseRegionEvent::Down(mouse_button_event) = region_event { + handler(mouse_button_event, cx); + } else { + panic!( + "Mouse Region Event incorrectly called with mismatched event type. Expected MouseRegionEvent::Down, found {:?}", + region_event); + } + })); + self + } + + pub fn on_up( + mut self, + button: MouseButton, + handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, + ) -> Self { + self.handlers.insert((MouseRegionEvent::up_disc(), Some(button)), + Rc::new(move |region_event, cx| { + if let MouseRegionEvent::Up(mouse_button_event) = region_event { + handler(mouse_button_event, cx); + } else { + panic!( + "Mouse Region Event incorrectly called with mismatched event type. Expected MouseRegionEvent::Up, found {:?}", + region_event); + } + })); + self + } + + pub fn on_click( + mut self, + button: MouseButton, + handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, + ) -> Self { + self.handlers.insert((MouseRegionEvent::click_disc(), Some(button)), + Rc::new(move |region_event, cx| { + if let MouseRegionEvent::Click(mouse_button_event) = region_event { + handler(mouse_button_event, cx); + } else { + panic!( + "Mouse Region Event incorrectly called with mismatched event type. Expected MouseRegionEvent::Click, found {:?}", + region_event); + } + })); + self + } + + pub fn on_down_out( + mut self, + button: MouseButton, + handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, + ) -> Self { + self.handlers.insert((MouseRegionEvent::down_out_disc(), Some(button)), + Rc::new(move |region_event, cx| { + if let MouseRegionEvent::DownOut(mouse_button_event) = region_event { + handler(mouse_button_event, cx); + } else { + panic!( + "Mouse Region Event incorrectly called with mismatched event type. Expected MouseRegionEvent::DownOut, found {:?}", + region_event); + } + })); + self + } + + pub fn on_drag( + mut self, + button: MouseButton, + handler: impl Fn(Vector2F, MouseMovedEvent, &mut EventContext) + 'static, + ) -> Self { + self.handlers.insert((MouseRegionEvent::drag_disc(), Some(button)), + Rc::new(move |region_event, cx| { + if let MouseRegionEvent::Drag(prev_drag_position, mouse_moved_event) = region_event { + handler(prev_drag_position, mouse_moved_event, cx); + } else { + panic!( + "Mouse Region Event incorrectly called with mismatched event type. Expected MouseRegionEvent::Drag, found {:?}", + region_event); + } + })); + self + } + + pub fn on_hover( + mut self, + handler: impl Fn(bool, MouseMovedEvent, &mut EventContext) + 'static, + ) -> Self { + self.handlers.insert((MouseRegionEvent::hover_disc(), None), + Rc::new(move |region_event, cx| { + if let MouseRegionEvent::Hover(hover, mouse_moved_event) = region_event { + handler(hover, mouse_moved_event, cx); + } else { + panic!( + "Mouse Region Event incorrectly called with mismatched event type. Expected MouseRegionEvent::Hover, found {:?}", + region_event); + } + })); + self + } } #[derive(Copy, Clone, Eq, PartialEq, Hash)] diff --git a/crates/gpui/src/views/select.rs b/crates/gpui/src/views/select.rs index 21527a1f2c..1b57caf476 100644 --- a/crates/gpui/src/views/select.rs +++ b/crates/gpui/src/views/select.rs @@ -1,8 +1,8 @@ use serde::Deserialize; use crate::{ - actions, elements::*, impl_actions, AppContext, Entity, MutableAppContext, RenderContext, View, - ViewContext, WeakViewHandle, + actions, elements::*, impl_actions, AppContext, Entity, MouseButton, MutableAppContext, + RenderContext, View, ViewContext, WeakViewHandle, }; pub struct Select { @@ -119,7 +119,9 @@ impl View for Select { .with_style(style.header) .boxed() }) - .on_click(move |_, _, cx| cx.dispatch_action(ToggleSelect)) + .on_click(MouseButton::Left, move |_, cx| { + cx.dispatch_action(ToggleSelect) + }) .boxed(), ); if self.is_open { @@ -151,7 +153,7 @@ impl View for Select { ) }, ) - .on_click(move |_, _, cx| { + .on_click(MouseButton::Left, move |_, cx| { cx.dispatch_action(SelectItem(ix)) }) .boxed() diff --git a/crates/picker/src/picker.rs b/crates/picker/src/picker.rs index 8f8e5d26b9..0b30583053 100644 --- a/crates/picker/src/picker.rs +++ b/crates/picker/src/picker.rs @@ -7,8 +7,8 @@ use gpui::{ geometry::vector::{vec2f, Vector2F}, keymap, platform::CursorStyle, - AppContext, Axis, Element, ElementBox, Entity, MouseState, MutableAppContext, RenderContext, - Task, View, ViewContext, ViewHandle, WeakViewHandle, + AppContext, Axis, Element, ElementBox, Entity, MouseButton, MouseState, MutableAppContext, + RenderContext, Task, View, ViewContext, ViewHandle, WeakViewHandle, }; use menu::{Cancel, Confirm, SelectFirst, SelectIndex, SelectLast, SelectNext, SelectPrev}; use settings::Settings; @@ -90,7 +90,9 @@ impl View for Picker { .read(cx) .render_match(ix, state, ix == selected_ix, cx) }) - .on_mouse_down(move |_, cx| cx.dispatch_action(SelectIndex(ix))) + .on_mouse_down(MouseButton::Left, move |_, cx| { + cx.dispatch_action(SelectIndex(ix)) + }) .with_cursor_style(CursorStyle::PointingHand) .boxed() })); diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs index eaff23a476..8d9443de4f 100644 --- a/crates/project_panel/src/project_panel.rs +++ b/crates/project_panel/src/project_panel.rs @@ -11,8 +11,9 @@ use gpui::{ geometry::vector::Vector2F, impl_internal_actions, keymap, platform::CursorStyle, - AppContext, ClipboardItem, Element, ElementBox, Entity, ModelHandle, MutableAppContext, - PromptLevel, RenderContext, Task, View, ViewContext, ViewHandle, + AppContext, ClipboardItem, Element, ElementBox, Entity, ModelHandle, MouseButton, + MouseButtonEvent, MutableAppContext, PromptLevel, RenderContext, Task, View, ViewContext, + ViewHandle, }; use menu::{Confirm, SelectNext, SelectPrev}; use project::{Entry, EntryKind, Project, ProjectEntryId, ProjectPath, Worktree, WorktreeId}; @@ -1054,19 +1055,25 @@ impl ProjectPanel { .with_padding_left(padding) .boxed() }) - .on_click(move |_, click_count, cx| { - if kind == EntryKind::Dir { - cx.dispatch_action(ToggleExpanded(entry_id)) - } else { - cx.dispatch_action(Open { - entry_id, - change_focus: click_count > 1, - }) - } - }) - .on_right_mouse_down(move |position, cx| { - cx.dispatch_action(DeployContextMenu { entry_id, position }) - }) + .on_click( + MouseButton::Left, + move |MouseButtonEvent { click_count, .. }, cx| { + if kind == EntryKind::Dir { + cx.dispatch_action(ToggleExpanded(entry_id)) + } else { + cx.dispatch_action(Open { + entry_id, + change_focus: click_count > 1, + }) + } + }, + ) + .on_mouse_down( + MouseButton::Right, + move |MouseButtonEvent { position, .. }, cx| { + cx.dispatch_action(DeployContextMenu { entry_id, position }) + }, + ) .with_cursor_style(CursorStyle::PointingHand) .boxed() } @@ -1113,13 +1120,16 @@ impl View for ProjectPanel { .expanded() .boxed() }) - .on_right_mouse_down(move |position, cx| { - // When deploying the context menu anywhere below the last project entry, - // act as if the user clicked the root of the last worktree. - if let Some(entry_id) = last_worktree_root_id { - cx.dispatch_action(DeployContextMenu { entry_id, position }) - } - }) + .on_mouse_down( + MouseButton::Right, + move |MouseButtonEvent { position, .. }, cx| { + // When deploying the context menu anywhere below the last project entry, + // act as if the user clicked the root of the last worktree. + if let Some(entry_id) = last_worktree_root_id { + cx.dispatch_action(DeployContextMenu { entry_id, position }) + } + }, + ) .boxed(), ) .with_child(ChildView::new(&self.context_menu).boxed()) diff --git a/crates/search/src/buffer_search.rs b/crates/search/src/buffer_search.rs index 5303c20e89..529da6f7b6 100644 --- a/crates/search/src/buffer_search.rs +++ b/crates/search/src/buffer_search.rs @@ -7,8 +7,8 @@ use collections::HashMap; use editor::{Anchor, Autoscroll, Editor}; use gpui::{ actions, elements::*, impl_actions, platform::CursorStyle, Action, AppContext, Entity, - MutableAppContext, RenderContext, Subscription, Task, View, ViewContext, ViewHandle, - WeakViewHandle, + MouseButton, MutableAppContext, RenderContext, Subscription, Task, View, ViewContext, + ViewHandle, WeakViewHandle, }; use language::OffsetRangeExt; use project::search::SearchQuery; @@ -285,7 +285,9 @@ impl BufferSearchBar { .with_style(style.container) .boxed() }) - .on_click(move |_, _, cx| cx.dispatch_any_action(option.to_toggle_action())) + .on_click(MouseButton::Left, move |_, cx| { + cx.dispatch_any_action(option.to_toggle_action()) + }) .with_cursor_style(CursorStyle::PointingHand) .with_tooltip::( option as usize, @@ -330,9 +332,9 @@ impl BufferSearchBar { .with_style(style.container) .boxed() }) - .on_click({ + .on_click(MouseButton::Left, { let action = action.boxed_clone(); - move |_, _, cx| cx.dispatch_any_action(action.boxed_clone()) + move |_, cx| cx.dispatch_any_action(action.boxed_clone()) }) .with_cursor_style(CursorStyle::PointingHand) .with_tooltip::( diff --git a/crates/search/src/project_search.rs b/crates/search/src/project_search.rs index 622b84633c..405dd2d334 100644 --- a/crates/search/src/project_search.rs +++ b/crates/search/src/project_search.rs @@ -7,8 +7,8 @@ use collections::HashMap; use editor::{Anchor, Autoscroll, Editor, MultiBuffer, SelectAll, MAX_TAB_TITLE_LEN}; use gpui::{ actions, elements::*, platform::CursorStyle, Action, AppContext, ElementBox, Entity, - ModelContext, ModelHandle, MutableAppContext, RenderContext, Subscription, Task, View, - ViewContext, ViewHandle, WeakModelHandle, WeakViewHandle, + ModelContext, ModelHandle, MouseButton, MutableAppContext, RenderContext, Subscription, Task, + View, ViewContext, ViewHandle, WeakModelHandle, WeakViewHandle, }; use menu::Confirm; use project::{search::SearchQuery, Project}; @@ -735,9 +735,9 @@ impl ProjectSearchBar { .with_style(style.container) .boxed() }) - .on_click({ + .on_click(MouseButton::Left, { let action = action.boxed_clone(); - move |_, _, cx| cx.dispatch_any_action(action.boxed_clone()) + move |_, cx| cx.dispatch_any_action(action.boxed_clone()) }) .with_cursor_style(CursorStyle::PointingHand) .with_tooltip::( @@ -770,7 +770,9 @@ impl ProjectSearchBar { .with_style(style.container) .boxed() }) - .on_click(move |_, _, cx| cx.dispatch_any_action(option.to_toggle_action())) + .on_click(MouseButton::Left, move |_, cx| { + cx.dispatch_any_action(option.to_toggle_action()) + }) .with_cursor_style(CursorStyle::PointingHand) .with_tooltip::( option as usize, diff --git a/crates/terminal/src/terminal_element.rs b/crates/terminal/src/terminal_element.rs index 3406b4b9e1..f1ba70cab9 100644 --- a/crates/terminal/src/terminal_element.rs +++ b/crates/terminal/src/terminal_element.rs @@ -20,8 +20,8 @@ use gpui::{ }, json::json, text_layout::{Line, RunStyle}, - Event, FontCache, KeyDownEvent, MouseRegion, PaintContext, Quad, ScrollWheelEvent, - SizeConstraint, TextLayoutCache, WeakModelHandle, + Event, FontCache, KeyDownEvent, MouseButton, MouseButtonEvent, MouseMovedEvent, MouseRegion, + PaintContext, Quad, ScrollWheelEvent, SizeConstraint, TextLayoutCache, WeakModelHandle, }; use itertools::Itertools; use ordered_float::OrderedFloat; @@ -29,7 +29,7 @@ use settings::Settings; use theme::TerminalStyle; use util::ResultExt; -use std::{cmp::min, ops::Range, rc::Rc, sync::Arc}; +use std::{cmp::min, ops::Range, sync::Arc}; use std::{fmt::Debug, ops::Sub}; use crate::{color_translation::convert_color, connection::TerminalConnection, ZedListener}; @@ -594,63 +594,76 @@ fn attach_mouse_handlers( let drag_mutex = terminal_mutex.clone(); let mouse_down_mutex = terminal_mutex.clone(); - cx.scene.push_mouse_region(MouseRegion { - view_id, - mouse_down: Some(Rc::new(move |pos, _| { - let mut term = mouse_down_mutex.lock(); - let (point, side) = mouse_to_cell_data( - pos, - origin, - cur_size, - term.renderable_content().display_offset, - ); - term.selection = Some(Selection::new(SelectionType::Simple, point, side)) - })), - click: Some(Rc::new(move |pos, click_count, cx| { - let mut term = click_mutex.lock(); + cx.scene.push_mouse_region( + MouseRegion::new(view_id, None, visible_bounds) + .on_down( + MouseButton::Left, + move |MouseButtonEvent { position, .. }, _| { + let mut term = mouse_down_mutex.lock(); - let (point, side) = mouse_to_cell_data( - pos, - origin, - cur_size, - term.renderable_content().display_offset, - ); + let (point, side) = mouse_to_cell_data( + position, + origin, + cur_size, + term.renderable_content().display_offset, + ); + term.selection = Some(Selection::new(SelectionType::Simple, point, side)) + }, + ) + .on_click( + MouseButton::Left, + move |MouseButtonEvent { + position, + click_count, + .. + }, + cx| { + let mut term = click_mutex.lock(); - let selection_type = match click_count { - 0 => return, //This is a release - 1 => Some(SelectionType::Simple), - 2 => Some(SelectionType::Semantic), - 3 => Some(SelectionType::Lines), - _ => None, - }; + let (point, side) = mouse_to_cell_data( + position, + origin, + cur_size, + term.renderable_content().display_offset, + ); - let selection = - selection_type.map(|selection_type| Selection::new(selection_type, point, side)); + let selection_type = match click_count { + 0 => return, //This is a release + 1 => Some(SelectionType::Simple), + 2 => Some(SelectionType::Semantic), + 3 => Some(SelectionType::Lines), + _ => None, + }; - term.selection = selection; - cx.focus_parent_view(); - cx.notify(); - })), - bounds: visible_bounds, - drag: Some(Rc::new(move |_delta, pos, cx| { - let mut term = drag_mutex.lock(); + let selection = selection_type + .map(|selection_type| Selection::new(selection_type, point, side)); - let (point, side) = mouse_to_cell_data( - pos, - origin, - cur_size, - term.renderable_content().display_offset, - ); + term.selection = selection; + cx.focus_parent_view(); + cx.notify(); + }, + ) + .on_drag( + MouseButton::Left, + move |_, MouseMovedEvent { position, .. }, cx| { + let mut term = drag_mutex.lock(); - if let Some(mut selection) = term.selection.take() { - selection.update(point, side); - term.selection = Some(selection); - } + let (point, side) = mouse_to_cell_data( + position, + origin, + cur_size, + term.renderable_content().display_offset, + ); - cx.notify(); - })), - ..Default::default() - }); + if let Some(mut selection) = term.selection.take() { + selection.update(point, side); + term.selection = Some(selection); + } + + cx.notify(); + }, + ), + ); } ///Copied (with modifications) from alacritty/src/input.rs > Processor::cell_side() diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 4b231e03e7..657a9f0542 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -13,8 +13,9 @@ use gpui::{ }, impl_actions, impl_internal_actions, platform::{CursorStyle, NavigationDirection}, - AppContext, AsyncAppContext, Entity, ModelHandle, MutableAppContext, PromptLevel, Quad, - RenderContext, Task, View, ViewContext, ViewHandle, WeakViewHandle, + AppContext, AsyncAppContext, Entity, ModelHandle, MouseButton, MouseButtonEvent, + MutableAppContext, PromptLevel, Quad, RenderContext, Task, View, ViewContext, ViewHandle, + WeakViewHandle, }; use project::{Project, ProjectEntryId, ProjectPath}; use serde::Deserialize; @@ -955,9 +956,9 @@ impl Pane { ) .with_padding(Padding::uniform(4.)) .with_cursor_style(CursorStyle::PointingHand) - .on_click({ + .on_click(MouseButton::Left, { let pane = pane.clone(); - move |_, _, cx| { + move |_, cx| { cx.dispatch_action(CloseItem { item_id, pane: pane.clone(), @@ -978,7 +979,7 @@ impl Pane { .with_style(style.container) .boxed() }) - .on_mouse_down(move |_, cx| { + .on_mouse_down(MouseButton::Left, move |_, cx| { cx.dispatch_action(ActivateItem(ix)); }) .boxed() @@ -1079,9 +1080,12 @@ impl View for Pane { }, ) .with_cursor_style(CursorStyle::PointingHand) - .on_mouse_down(|position, cx| { - cx.dispatch_action(DeploySplitMenu { position }); - }) + .on_mouse_down( + MouseButton::Left, + |MouseButtonEvent { position, .. }, cx| { + cx.dispatch_action(DeploySplitMenu { position }); + }, + ) .boxed(), ) .constrained() diff --git a/crates/workspace/src/sidebar.rs b/crates/workspace/src/sidebar.rs index a500f99492..cd4a009f2c 100644 --- a/crates/workspace/src/sidebar.rs +++ b/crates/workspace/src/sidebar.rs @@ -1,7 +1,7 @@ use crate::StatusItemView; use gpui::{ elements::*, impl_actions, platform::CursorStyle, AnyViewHandle, AppContext, Entity, - RenderContext, Subscription, View, ViewContext, ViewHandle, + MouseButton, MouseMovedEvent, RenderContext, Subscription, View, ViewContext, ViewHandle, }; use serde::Deserialize; use settings::Settings; @@ -187,19 +187,27 @@ impl Sidebar { ..Default::default() }) .with_cursor_style(CursorStyle::ResizeLeftRight) - .on_mouse_down(|_, _| {}) // This prevents the mouse down event from being propagated elsewhere - .on_drag(move |old_position, new_position, cx| { - let delta = new_position.x() - old_position.x(); - let prev_width = *actual_width.borrow(); - *custom_width.borrow_mut() = 0f32 - .max(match side { - Side::Left => prev_width + delta, - Side::Right => prev_width - delta, - }) - .round(); + .on_mouse_down(MouseButton::Left, |_, _| {}) // This prevents the mouse down event from being propagated elsewhere + .on_drag( + MouseButton::Left, + move |old_position, + MouseMovedEvent { + position: new_position, + .. + }, + cx| { + let delta = new_position.x() - old_position.x(); + let prev_width = *actual_width.borrow(); + *custom_width.borrow_mut() = 0f32 + .max(match side { + Side::Left => prev_width + delta, + Side::Right => prev_width - delta, + }) + .round(); - cx.notify(); - }) + cx.notify(); + }, + ) .boxed() } } @@ -314,9 +322,9 @@ impl View for SidebarButtons { .boxed() }) .with_cursor_style(CursorStyle::PointingHand) - .on_click({ + .on_click(MouseButton::Left, { let action = action.clone(); - move |_, _, cx| cx.dispatch_action(action.clone()) + move |_, cx| cx.dispatch_action(action.clone()) }) .with_tooltip::( ix, diff --git a/crates/workspace/src/toolbar.rs b/crates/workspace/src/toolbar.rs index 636df9a039..6d8eefcc76 100644 --- a/crates/workspace/src/toolbar.rs +++ b/crates/workspace/src/toolbar.rs @@ -1,7 +1,7 @@ use crate::{ItemHandle, Pane}; use gpui::{ elements::*, platform::CursorStyle, Action, AnyViewHandle, AppContext, ElementBox, Entity, - MutableAppContext, RenderContext, View, ViewContext, ViewHandle, WeakViewHandle, + MouseButton, MutableAppContext, RenderContext, View, ViewContext, ViewHandle, WeakViewHandle, }; use settings::Settings; @@ -191,7 +191,9 @@ fn nav_button( } else { CursorStyle::default() }) - .on_click(move |_, _, cx| cx.dispatch_action(action.clone())) + .on_click(MouseButton::Left, move |_, cx| { + cx.dispatch_action(action.clone()) + }) .with_tooltip::( 0, action_name.to_string(), diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index f6c185a19f..3a30e0cee3 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -21,8 +21,8 @@ use gpui::{ json::{self, ToJson}, platform::{CursorStyle, WindowOptions}, AnyModelHandle, AnyViewHandle, AppContext, AsyncAppContext, Border, Entity, ImageData, - ModelContext, ModelHandle, MutableAppContext, PathPromptOptions, PromptLevel, RenderContext, - Task, View, ViewContext, ViewHandle, WeakViewHandle, + ModelContext, ModelHandle, MouseButton, MutableAppContext, PathPromptOptions, PromptLevel, + RenderContext, Task, View, ViewContext, ViewHandle, WeakViewHandle, }; use language::LanguageRegistry; use log::error; @@ -1980,7 +1980,7 @@ impl Workspace { .with_style(style.container) .boxed() }) - .on_click(|_, _, cx| cx.dispatch_action(Authenticate)) + .on_click(MouseButton::Left, |_, cx| cx.dispatch_action(Authenticate)) .with_cursor_style(CursorStyle::PointingHand) .aligned() .boxed(), @@ -2031,7 +2031,9 @@ impl Workspace { if let Some((peer_id, peer_github_login)) = peer { MouseEventHandler::new::(replica_id.into(), cx, move |_, _| content) .with_cursor_style(CursorStyle::PointingHand) - .on_click(move |_, _, cx| cx.dispatch_action(ToggleFollow(peer_id))) + .on_click(MouseButton::Left, move |_, cx| { + cx.dispatch_action(ToggleFollow(peer_id)) + }) .with_tooltip::( peer_id.0 as usize, if is_followed { diff --git a/crates/zed/src/feedback.rs b/crates/zed/src/feedback.rs index 9e7564f411..f4b67a12bd 100644 --- a/crates/zed/src/feedback.rs +++ b/crates/zed/src/feedback.rs @@ -2,7 +2,7 @@ use crate::OpenBrowser; use gpui::{ elements::{MouseEventHandler, Text}, platform::CursorStyle, - Element, Entity, RenderContext, View, + Element, Entity, MouseButton, RenderContext, View, }; use settings::Settings; use workspace::StatusItemView; @@ -32,7 +32,7 @@ impl View for FeedbackLink { .boxed() }) .with_cursor_style(CursorStyle::PointingHand) - .on_click(|_, _, cx| { + .on_click(MouseButton::Left, |_, cx| { cx.dispatch_action(OpenBrowser { url: NEW_ISSUE_URL.into(), }) diff --git a/styles/package-lock.json b/styles/package-lock.json index 2eb6d3a1bf..49304dc2fa 100644 --- a/styles/package-lock.json +++ b/styles/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "styles", "version": "1.0.0", "license": "ISC", "dependencies": { From aafaee7463d5802b6b7a71102183f00fcc9f8e25 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 18 Jul 2022 12:05:27 -0400 Subject: [PATCH 08/22] Fix missing red/incorrect hex colors in `one-light` --- styles/src/themes/one-light.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/styles/src/themes/one-light.ts b/styles/src/themes/one-light.ts index 7e468b9427..c70fa2d131 100644 --- a/styles/src/themes/one-light.ts +++ b/styles/src/themes/one-light.ts @@ -9,12 +9,12 @@ const url = const base00 = "#090a0b"; const base01 = "#202227"; const base02 = "#383a42"; -const base03 = "#a0a1a7"; -const base04 = "#696c77"; -const base05 = "#a0a1a7"; -const base06 = "#e5e5e6"; -const base07 = "#f0f0f1"; -const base08 = "#fafafa"; +const base03 = "#696c77"; +const base04 = "#a0a1a7"; +const base05 = "#e5e5e6"; +const base06 = "#f0f0f1"; +const base07 = "#fafafa"; +const base08 = "#ca1243"; const base09 = "#d75f00"; const base0A = "#c18401"; const base0B = "#50a14f"; From bb914920985bf5c69f70d00c06e5d1b7b481633e Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Mon, 18 Jul 2022 12:33:09 -0400 Subject: [PATCH 09/22] Fix missing red color in `sandcastle` theme --- styles/src/themes/sandcastle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/styles/src/themes/sandcastle.ts b/styles/src/themes/sandcastle.ts index 45e0be1623..7d08ec46db 100644 --- a/styles/src/themes/sandcastle.ts +++ b/styles/src/themes/sandcastle.ts @@ -14,7 +14,7 @@ const ramps = { "#d5c4a1", "#fdf4c1", ]), - red: colorRamp(chroma("#83a598")), + red: colorRamp(chroma("#B4637A")), orange: colorRamp(chroma("#a07e3b")), yellow: colorRamp(chroma("#a07e3b")), green: colorRamp(chroma("#528b8b")), From ec25fa9260076ea57bff60bbe661cd8dfc405152 Mon Sep 17 00:00:00 2001 From: K Simmons Date: Mon, 18 Jul 2022 09:54:48 -0700 Subject: [PATCH 10/22] Extract handler set from MouseRegion --- crates/gpui/src/presenter.rs | 1 - crates/gpui/src/scene.rs | 257 +------------------- crates/gpui/src/scene/mouse_region.rs | 327 ++++++++++++++++++++++++++ 3 files changed, 332 insertions(+), 253 deletions(-) create mode 100644 crates/gpui/src/scene/mouse_region.rs diff --git a/crates/gpui/src/presenter.rs b/crates/gpui/src/presenter.rs index 243863149d..a2b3230190 100644 --- a/crates/gpui/src/presenter.rs +++ b/crates/gpui/src/presenter.rs @@ -252,7 +252,6 @@ impl Presenter { } else if let Some(handler) = region .handlers .get(&(MouseRegionEvent::down_out_disc(), Some(*button))) - .cloned() { mouse_down_out_handlers.push(( handler, diff --git a/crates/gpui/src/scene.rs b/crates/gpui/src/scene.rs index f5577c5e5d..a1f12b76d3 100644 --- a/crates/gpui/src/scene.rs +++ b/crates/gpui/src/scene.rs @@ -1,7 +1,8 @@ -use collections::HashMap; +mod mouse_region; + use serde::Deserialize; use serde_json::json; -use std::{any::TypeId, borrow::Cow, mem::Discriminant, rc::Rc, sync::Arc}; +use std::{borrow::Cow, sync::Arc}; use crate::{ color::Color, @@ -9,8 +10,9 @@ use crate::{ geometry::{rect::RectF, vector::Vector2F}, json::ToJson, platform::CursorStyle, - EventContext, ImageData, MouseButton, MouseButtonEvent, MouseMovedEvent, ScrollWheelEvent, + ImageData, }; +pub use mouse_region::*; pub struct Scene { scale_factor: f32, @@ -45,255 +47,6 @@ pub struct CursorRegion { pub style: CursorStyle, } -#[derive(Debug)] -pub enum MouseRegionEvent { - Move(MouseMovedEvent), - Drag(Vector2F, MouseMovedEvent), - Hover(bool, MouseMovedEvent), - Down(MouseButtonEvent), - Up(MouseButtonEvent), - Click(MouseButtonEvent), - DownOut(MouseButtonEvent), - ScrollWheel(ScrollWheelEvent), -} - -impl MouseRegionEvent { - pub fn move_disc() -> Discriminant { - std::mem::discriminant(&MouseRegionEvent::Move(Default::default())) - } - pub fn drag_disc() -> Discriminant { - std::mem::discriminant(&MouseRegionEvent::Drag( - Default::default(), - Default::default(), - )) - } - pub fn hover_disc() -> Discriminant { - std::mem::discriminant(&MouseRegionEvent::Hover( - Default::default(), - Default::default(), - )) - } - pub fn down_disc() -> Discriminant { - std::mem::discriminant(&MouseRegionEvent::Down(Default::default())) - } - pub fn up_disc() -> Discriminant { - std::mem::discriminant(&MouseRegionEvent::Up(Default::default())) - } - pub fn click_disc() -> Discriminant { - std::mem::discriminant(&MouseRegionEvent::Click(Default::default())) - } - pub fn down_out_disc() -> Discriminant { - std::mem::discriminant(&MouseRegionEvent::DownOut(Default::default())) - } - pub fn scroll_wheel_disc() -> Discriminant { - std::mem::discriminant(&MouseRegionEvent::ScrollWheel(Default::default())) - } - - pub fn handler_key(&self) -> (Discriminant, Option) { - match self { - MouseRegionEvent::Move(_) => (Self::move_disc(), None), - MouseRegionEvent::Drag(_, MouseMovedEvent { pressed_button, .. }) => { - (Self::drag_disc(), *pressed_button) - } - MouseRegionEvent::Hover(_, _) => (Self::hover_disc(), None), - MouseRegionEvent::Down(MouseButtonEvent { button, .. }) => { - (Self::down_disc(), Some(*button)) - } - MouseRegionEvent::Up(MouseButtonEvent { button, .. }) => { - (Self::up_disc(), Some(*button)) - } - MouseRegionEvent::Click(MouseButtonEvent { button, .. }) => { - (Self::click_disc(), Some(*button)) - } - MouseRegionEvent::DownOut(MouseButtonEvent { button, .. }) => { - (Self::down_out_disc(), Some(*button)) - } - MouseRegionEvent::ScrollWheel(_) => (Self::scroll_wheel_disc(), None), - } - } -} - -#[derive(Clone, Default)] -pub struct MouseRegion { - pub view_id: usize, - pub discriminant: Option<(TypeId, usize)>, - pub bounds: RectF, - pub handlers: HashMap< - (Discriminant, Option), - Rc, - >, -} - -impl MouseRegion { - pub fn new(view_id: usize, discriminant: Option<(TypeId, usize)>, bounds: RectF) -> Self { - Self { - view_id, - discriminant, - bounds, - handlers: Default::default(), - } - } - - pub fn handle_all( - view_id: usize, - discriminant: Option<(TypeId, usize)>, - bounds: RectF, - ) -> Self { - let mut handlers: HashMap< - (Discriminant, Option), - Rc, - > = Default::default(); - handlers.insert((MouseRegionEvent::move_disc(), None), Rc::new(|_, _| {})); - handlers.insert((MouseRegionEvent::hover_disc(), None), Rc::new(|_, _| {})); - for button in MouseButton::all() { - handlers.insert( - (MouseRegionEvent::drag_disc(), Some(button)), - Rc::new(|_, _| {}), - ); - handlers.insert( - (MouseRegionEvent::down_disc(), Some(button)), - Rc::new(|_, _| {}), - ); - handlers.insert( - (MouseRegionEvent::up_disc(), Some(button)), - Rc::new(|_, _| {}), - ); - handlers.insert( - (MouseRegionEvent::click_disc(), Some(button)), - Rc::new(|_, _| {}), - ); - handlers.insert( - (MouseRegionEvent::down_out_disc(), Some(button)), - Rc::new(|_, _| {}), - ); - } - handlers.insert( - (MouseRegionEvent::scroll_wheel_disc(), None), - Rc::new(|_, _| {}), - ); - - Self { - view_id, - discriminant, - bounds, - handlers, - } - } - - pub fn on_down( - mut self, - button: MouseButton, - handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, - ) -> Self { - self.handlers.insert((MouseRegionEvent::down_disc(), Some(button)), - Rc::new(move |region_event, cx| { - if let MouseRegionEvent::Down(mouse_button_event) = region_event { - handler(mouse_button_event, cx); - } else { - panic!( - "Mouse Region Event incorrectly called with mismatched event type. Expected MouseRegionEvent::Down, found {:?}", - region_event); - } - })); - self - } - - pub fn on_up( - mut self, - button: MouseButton, - handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, - ) -> Self { - self.handlers.insert((MouseRegionEvent::up_disc(), Some(button)), - Rc::new(move |region_event, cx| { - if let MouseRegionEvent::Up(mouse_button_event) = region_event { - handler(mouse_button_event, cx); - } else { - panic!( - "Mouse Region Event incorrectly called with mismatched event type. Expected MouseRegionEvent::Up, found {:?}", - region_event); - } - })); - self - } - - pub fn on_click( - mut self, - button: MouseButton, - handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, - ) -> Self { - self.handlers.insert((MouseRegionEvent::click_disc(), Some(button)), - Rc::new(move |region_event, cx| { - if let MouseRegionEvent::Click(mouse_button_event) = region_event { - handler(mouse_button_event, cx); - } else { - panic!( - "Mouse Region Event incorrectly called with mismatched event type. Expected MouseRegionEvent::Click, found {:?}", - region_event); - } - })); - self - } - - pub fn on_down_out( - mut self, - button: MouseButton, - handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, - ) -> Self { - self.handlers.insert((MouseRegionEvent::down_out_disc(), Some(button)), - Rc::new(move |region_event, cx| { - if let MouseRegionEvent::DownOut(mouse_button_event) = region_event { - handler(mouse_button_event, cx); - } else { - panic!( - "Mouse Region Event incorrectly called with mismatched event type. Expected MouseRegionEvent::DownOut, found {:?}", - region_event); - } - })); - self - } - - pub fn on_drag( - mut self, - button: MouseButton, - handler: impl Fn(Vector2F, MouseMovedEvent, &mut EventContext) + 'static, - ) -> Self { - self.handlers.insert((MouseRegionEvent::drag_disc(), Some(button)), - Rc::new(move |region_event, cx| { - if let MouseRegionEvent::Drag(prev_drag_position, mouse_moved_event) = region_event { - handler(prev_drag_position, mouse_moved_event, cx); - } else { - panic!( - "Mouse Region Event incorrectly called with mismatched event type. Expected MouseRegionEvent::Drag, found {:?}", - region_event); - } - })); - self - } - - pub fn on_hover( - mut self, - handler: impl Fn(bool, MouseMovedEvent, &mut EventContext) + 'static, - ) -> Self { - self.handlers.insert((MouseRegionEvent::hover_disc(), None), - Rc::new(move |region_event, cx| { - if let MouseRegionEvent::Hover(hover, mouse_moved_event) = region_event { - handler(hover, mouse_moved_event, cx); - } else { - panic!( - "Mouse Region Event incorrectly called with mismatched event type. Expected MouseRegionEvent::Hover, found {:?}", - region_event); - } - })); - self - } -} - -#[derive(Copy, Clone, Eq, PartialEq, Hash)] -pub struct MouseRegionId { - pub view_id: usize, - pub discriminant: (TypeId, usize), -} - #[derive(Default, Debug)] pub struct Quad { pub bounds: RectF, diff --git a/crates/gpui/src/scene/mouse_region.rs b/crates/gpui/src/scene/mouse_region.rs new file mode 100644 index 0000000000..3d680876c7 --- /dev/null +++ b/crates/gpui/src/scene/mouse_region.rs @@ -0,0 +1,327 @@ +use std::{any::TypeId, mem::Discriminant, rc::Rc}; + +use collections::HashMap; +use pathfinder_geometry::{rect::RectF, vector::Vector2F}; + +use crate::{EventContext, MouseButton, MouseButtonEvent, MouseMovedEvent, ScrollWheelEvent}; + +#[derive(Clone, Default)] +pub struct MouseRegion { + pub view_id: usize, + pub discriminant: Option<(TypeId, usize)>, + pub bounds: RectF, + pub handlers: HandlerSet, +} + +impl MouseRegion { + pub fn new(view_id: usize, discriminant: Option<(TypeId, usize)>, bounds: RectF) -> Self { + Self { + view_id, + discriminant, + bounds, + handlers: Default::default(), + } + } + + pub fn handle_all( + view_id: usize, + discriminant: Option<(TypeId, usize)>, + bounds: RectF, + ) -> Self { + Self { + view_id, + discriminant, + bounds, + handlers: HandlerSet::handle_all(), + } + } + + pub fn on_down( + mut self, + button: MouseButton, + handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, + ) -> Self { + self.handlers = self.handlers.on_down(button, handler); + self + } + + pub fn on_up( + mut self, + button: MouseButton, + handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, + ) -> Self { + self.handlers = self.handlers.on_up(button, handler); + self + } + + pub fn on_click( + mut self, + button: MouseButton, + handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, + ) -> Self { + self.handlers = self.handlers.on_click(button, handler); + self + } + + pub fn on_down_out( + mut self, + button: MouseButton, + handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, + ) -> Self { + self.handlers = self.handlers.on_down_out(button, handler); + self + } + + pub fn on_drag( + mut self, + button: MouseButton, + handler: impl Fn(Vector2F, MouseMovedEvent, &mut EventContext) + 'static, + ) -> Self { + self.handlers = self.handlers.on_drag(button, handler); + self + } + + pub fn on_hover( + mut self, + handler: impl Fn(bool, MouseMovedEvent, &mut EventContext) + 'static, + ) -> Self { + self.handlers = self.handlers.on_hover(handler); + self + } +} + +#[derive(Copy, Clone, Eq, PartialEq, Hash)] +pub struct MouseRegionId { + pub view_id: usize, + pub discriminant: (TypeId, usize), +} + +#[derive(Clone, Default)] +pub struct HandlerSet { + pub set: HashMap< + (Discriminant, Option), + Rc, + >, +} + +impl HandlerSet { + pub fn handle_all() -> Self { + let mut set: HashMap< + (Discriminant, Option), + Rc, + > = Default::default(); + + set.insert((MouseRegionEvent::move_disc(), None), Rc::new(|_, _| {})); + set.insert((MouseRegionEvent::hover_disc(), None), Rc::new(|_, _| {})); + for button in MouseButton::all() { + set.insert( + (MouseRegionEvent::drag_disc(), Some(button)), + Rc::new(|_, _| {}), + ); + set.insert( + (MouseRegionEvent::down_disc(), Some(button)), + Rc::new(|_, _| {}), + ); + set.insert( + (MouseRegionEvent::up_disc(), Some(button)), + Rc::new(|_, _| {}), + ); + set.insert( + (MouseRegionEvent::click_disc(), Some(button)), + Rc::new(|_, _| {}), + ); + set.insert( + (MouseRegionEvent::down_out_disc(), Some(button)), + Rc::new(|_, _| {}), + ); + } + set.insert( + (MouseRegionEvent::scroll_wheel_disc(), None), + Rc::new(|_, _| {}), + ); + + HandlerSet { set } + } + + pub fn get( + &self, + key: &(Discriminant, Option), + ) -> Option> { + self.set.get(key).cloned() + } + + pub fn on_down( + mut self, + button: MouseButton, + handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, + ) -> Self { + self.set.insert((MouseRegionEvent::down_disc(), Some(button)), + Rc::new(move |region_event, cx| { + if let MouseRegionEvent::Down(mouse_button_event) = region_event { + handler(mouse_button_event, cx); + } else { + panic!( + "Mouse Region Event incorrectly called with mismatched event type. Expected MouseRegionEvent::Down, found {:?}", + region_event); + } + })); + self + } + + pub fn on_up( + mut self, + button: MouseButton, + handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, + ) -> Self { + self.set.insert((MouseRegionEvent::up_disc(), Some(button)), + Rc::new(move |region_event, cx| { + if let MouseRegionEvent::Up(mouse_button_event) = region_event { + handler(mouse_button_event, cx); + } else { + panic!( + "Mouse Region Event incorrectly called with mismatched event type. Expected MouseRegionEvent::Up, found {:?}", + region_event); + } + })); + self + } + + pub fn on_click( + mut self, + button: MouseButton, + handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, + ) -> Self { + self.set.insert((MouseRegionEvent::click_disc(), Some(button)), + Rc::new(move |region_event, cx| { + if let MouseRegionEvent::Click(mouse_button_event) = region_event { + handler(mouse_button_event, cx); + } else { + panic!( + "Mouse Region Event incorrectly called with mismatched event type. Expected MouseRegionEvent::Click, found {:?}", + region_event); + } + })); + self + } + + pub fn on_down_out( + mut self, + button: MouseButton, + handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, + ) -> Self { + self.set.insert((MouseRegionEvent::down_out_disc(), Some(button)), + Rc::new(move |region_event, cx| { + if let MouseRegionEvent::DownOut(mouse_button_event) = region_event { + handler(mouse_button_event, cx); + } else { + panic!( + "Mouse Region Event incorrectly called with mismatched event type. Expected MouseRegionEvent::DownOut, found {:?}", + region_event); + } + })); + self + } + + pub fn on_drag( + mut self, + button: MouseButton, + handler: impl Fn(Vector2F, MouseMovedEvent, &mut EventContext) + 'static, + ) -> Self { + self.set.insert((MouseRegionEvent::drag_disc(), Some(button)), + Rc::new(move |region_event, cx| { + if let MouseRegionEvent::Drag(prev_drag_position, mouse_moved_event) = region_event { + handler(prev_drag_position, mouse_moved_event, cx); + } else { + panic!( + "Mouse Region Event incorrectly called with mismatched event type. Expected MouseRegionEvent::Drag, found {:?}", + region_event); + } + })); + self + } + + pub fn on_hover( + mut self, + handler: impl Fn(bool, MouseMovedEvent, &mut EventContext) + 'static, + ) -> Self { + self.set.insert((MouseRegionEvent::hover_disc(), None), + Rc::new(move |region_event, cx| { + if let MouseRegionEvent::Hover(hover, mouse_moved_event) = region_event { + handler(hover, mouse_moved_event, cx); + } else { + panic!( + "Mouse Region Event incorrectly called with mismatched event type. Expected MouseRegionEvent::Hover, found {:?}", + region_event); + } + })); + self + } +} + +#[derive(Debug)] +pub enum MouseRegionEvent { + Move(MouseMovedEvent), + Drag(Vector2F, MouseMovedEvent), + Hover(bool, MouseMovedEvent), + Down(MouseButtonEvent), + Up(MouseButtonEvent), + Click(MouseButtonEvent), + DownOut(MouseButtonEvent), + ScrollWheel(ScrollWheelEvent), +} + +impl MouseRegionEvent { + pub fn move_disc() -> Discriminant { + std::mem::discriminant(&MouseRegionEvent::Move(Default::default())) + } + pub fn drag_disc() -> Discriminant { + std::mem::discriminant(&MouseRegionEvent::Drag( + Default::default(), + Default::default(), + )) + } + pub fn hover_disc() -> Discriminant { + std::mem::discriminant(&MouseRegionEvent::Hover( + Default::default(), + Default::default(), + )) + } + pub fn down_disc() -> Discriminant { + std::mem::discriminant(&MouseRegionEvent::Down(Default::default())) + } + pub fn up_disc() -> Discriminant { + std::mem::discriminant(&MouseRegionEvent::Up(Default::default())) + } + pub fn click_disc() -> Discriminant { + std::mem::discriminant(&MouseRegionEvent::Click(Default::default())) + } + pub fn down_out_disc() -> Discriminant { + std::mem::discriminant(&MouseRegionEvent::DownOut(Default::default())) + } + pub fn scroll_wheel_disc() -> Discriminant { + std::mem::discriminant(&MouseRegionEvent::ScrollWheel(Default::default())) + } + + pub fn handler_key(&self) -> (Discriminant, Option) { + match self { + MouseRegionEvent::Move(_) => (Self::move_disc(), None), + MouseRegionEvent::Drag(_, MouseMovedEvent { pressed_button, .. }) => { + (Self::drag_disc(), *pressed_button) + } + MouseRegionEvent::Hover(_, _) => (Self::hover_disc(), None), + MouseRegionEvent::Down(MouseButtonEvent { button, .. }) => { + (Self::down_disc(), Some(*button)) + } + MouseRegionEvent::Up(MouseButtonEvent { button, .. }) => { + (Self::up_disc(), Some(*button)) + } + MouseRegionEvent::Click(MouseButtonEvent { button, .. }) => { + (Self::click_disc(), Some(*button)) + } + MouseRegionEvent::DownOut(MouseButtonEvent { button, .. }) => { + (Self::down_out_disc(), Some(*button)) + } + MouseRegionEvent::ScrollWheel(_) => (Self::scroll_wheel_disc(), None), + } + } +} From deeefed7ebaf196e03cb2b7141a70acbdb1b1091 Mon Sep 17 00:00:00 2001 From: K Simmons Date: Mon, 18 Jul 2022 10:08:14 -0700 Subject: [PATCH 11/22] Change mouse_event_handler to use HandlerSet --- .../gpui/src/elements/mouse_event_handler.rs | 27 +++++++++++-------- crates/gpui/src/scene/mouse_region.rs | 11 +++++++- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/crates/gpui/src/elements/mouse_event_handler.rs b/crates/gpui/src/elements/mouse_event_handler.rs index 3a8a5f6d63..40c35b80bc 100644 --- a/crates/gpui/src/elements/mouse_event_handler.rs +++ b/crates/gpui/src/elements/mouse_event_handler.rs @@ -7,7 +7,7 @@ use crate::{ vector::{vec2f, Vector2F}, }, platform::CursorStyle, - scene::CursorRegion, + scene::{CursorRegion, HandlerSet}, DebugContext, Element, ElementBox, Event, EventContext, LayoutContext, MouseButton, MouseButtonEvent, MouseMovedEvent, MouseRegion, MouseState, PaintContext, RenderContext, SizeConstraint, View, @@ -16,8 +16,9 @@ use serde_json::json; pub struct MouseEventHandler { child: ElementBox, + discriminant: (TypeId, usize), cursor_style: Option, - region: MouseRegion, + handlers: HandlerSet, padding: Padding, } @@ -31,7 +32,8 @@ impl MouseEventHandler { Self { child: render_child(cx.mouse_state::(id), cx), cursor_style: None, - region: MouseRegion::new(0, Some((TypeId::of::(), id)), Default::default()), + discriminant: (TypeId::of::(), id), + handlers: Default::default(), padding: Default::default(), } } @@ -46,7 +48,7 @@ impl MouseEventHandler { button: MouseButton, handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, ) -> Self { - self.region = self.region.on_down(button, handler); + self.handlers = self.handlers.on_down(button, handler); self } @@ -55,7 +57,7 @@ impl MouseEventHandler { button: MouseButton, handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, ) -> Self { - self.region = self.region.on_click(button, handler); + self.handlers = self.handlers.on_click(button, handler); self } @@ -64,7 +66,7 @@ impl MouseEventHandler { button: MouseButton, handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, ) -> Self { - self.region = self.region.on_down_out(button, handler); + self.handlers = self.handlers.on_down_out(button, handler); self } @@ -73,7 +75,7 @@ impl MouseEventHandler { button: MouseButton, handler: impl Fn(Vector2F, MouseMovedEvent, &mut EventContext) + 'static, ) -> Self { - self.region = self.region.on_drag(button, handler); + self.handlers = self.handlers.on_drag(button, handler); self } @@ -81,7 +83,7 @@ impl MouseEventHandler { mut self, handler: impl Fn(bool, MouseMovedEvent, &mut EventContext) + 'static, ) -> Self { - self.region = self.region.on_hover(handler); + self.handlers = self.handlers.on_hover(handler); self } @@ -126,9 +128,12 @@ impl Element for MouseEventHandler { }); } - self.region.view_id = cx.current_view_id(); - self.region.bounds = hit_bounds; - cx.scene.push_mouse_region(self.region.clone()); + cx.scene.push_mouse_region(MouseRegion::from_handlers( + cx.current_view_id(), + Some(self.discriminant.clone()), + hit_bounds, + self.handlers.clone(), + )); self.child.paint(bounds.origin(), visible_bounds, cx); } diff --git a/crates/gpui/src/scene/mouse_region.rs b/crates/gpui/src/scene/mouse_region.rs index 3d680876c7..d3d788c466 100644 --- a/crates/gpui/src/scene/mouse_region.rs +++ b/crates/gpui/src/scene/mouse_region.rs @@ -15,11 +15,20 @@ pub struct MouseRegion { impl MouseRegion { pub fn new(view_id: usize, discriminant: Option<(TypeId, usize)>, bounds: RectF) -> Self { + Self::from_handlers(view_id, discriminant, bounds, Default::default()) + } + + pub fn from_handlers( + view_id: usize, + discriminant: Option<(TypeId, usize)>, + bounds: RectF, + handlers: HandlerSet, + ) -> Self { Self { view_id, discriminant, bounds, - handlers: Default::default(), + handlers, } } From 46384e71b73716fe3c4abc5244e09348f7c50d08 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Tue, 19 Jul 2022 17:11:15 -0400 Subject: [PATCH 12/22] Add icon sets for sizes 8, 12 and 16, remove old icons --- assets/icons/Icon12CircleXMark.svg | 3 --- assets/icons/Icon12FolderTree.svg | 3 --- assets/icons/Icon16ArrowLeft.svg | 3 --- assets/icons/Icon16ArrowRight.svg | 3 --- assets/icons/Icon16CircleCheck.svg | 3 --- assets/icons/Icon16CircleInfo.svg | 3 --- assets/icons/Icon16CircleXMark.svg | 3 --- assets/icons/Icon16MagnifyingGlass.svg | 3 --- assets/icons/Icon16TriangleExclamation.svg | 3 --- assets/icons/accept.svg | 3 --- assets/icons/add-contact.svg | 3 --- assets/icons/arrow-left.svg | 3 --- assets/icons/arrow-right.svg | 3 --- assets/icons/arrow_down_12.svg | 3 +++ assets/icons/arrow_down_16.svg | 3 +++ assets/icons/{decline.svg => arrow_down_8.svg} | 2 +- assets/icons/arrow_left_12.svg | 3 +++ assets/icons/arrow_left_16.svg | 3 +++ assets/icons/arrow_left_8.svg | 3 +++ assets/icons/arrow_right_12.svg | 3 +++ assets/icons/arrow_right_16.svg | 3 +++ assets/icons/arrow_right_8.svg | 3 +++ assets/icons/arrow_up_12.svg | 3 +++ assets/icons/arrow_up_16.svg | 3 +++ assets/icons/arrow_up_8.svg | 3 +++ assets/icons/arrow_up_right_8.svg | 3 +++ assets/icons/backspace _12.svg | 3 +++ assets/icons/backspace _16.svg | 3 +++ assets/icons/backspace _8.svg | 3 +++ assets/icons/bolt_12.svg | 3 +++ assets/icons/bolt_16.svg | 3 +++ assets/icons/bolt_8.svg | 3 +++ assets/icons/bolt_slash_12.svg | 3 +++ assets/icons/bolt_slash_16.svg | 3 +++ assets/icons/bolt_slash_8.svg | 10 ++++++++++ assets/icons/caret_down_12.svg | 3 +++ assets/icons/caret_down_16.svg | 3 +++ assets/icons/caret_down_8.svg | 3 +++ assets/icons/caret_left_12.svg | 3 +++ assets/icons/caret_left_16.svg | 3 +++ assets/icons/caret_left_8.svg | 3 +++ assets/icons/caret_right_12.svg | 3 +++ assets/icons/caret_right_16.svg | 3 +++ assets/icons/caret_right_8.svg | 3 +++ assets/icons/caret_up_12.svg | 3 +++ assets/icons/caret_up_16.svg | 3 +++ assets/icons/caret_up_8.svg | 3 +++ assets/icons/check_12.svg | 3 +++ assets/icons/check_16.svg | 3 +++ assets/icons/check_8.svg | 3 +++ assets/icons/chevron_down_12.svg | 3 +++ assets/icons/chevron_down_16.svg | 3 +++ assets/icons/chevron_down_8.svg | 3 +++ assets/icons/chevron_left_12.svg | 3 +++ assets/icons/chevron_left_16.svg | 3 +++ assets/icons/chevron_left_8.svg | 3 +++ assets/icons/chevron_right_12.svg | 3 +++ assets/icons/chevron_right_16.svg | 3 +++ assets/icons/chevron_right_8.svg | 3 +++ assets/icons/chevron_up_12.svg | 3 +++ assets/icons/chevron_up_16.svg | 3 +++ assets/icons/chevron_up_8.svg | 3 +++ assets/icons/circle_check_12.svg | 3 +++ assets/icons/circle_check_16.svg | 3 +++ assets/icons/circle_check_8.svg | 3 +++ assets/icons/circle_info_12.svg | 3 +++ assets/icons/circle_info_16.svg | 3 +++ assets/icons/circle_info_8.svg | 3 +++ assets/icons/circle_up_12.svg | 3 +++ assets/icons/circle_up_16.svg | 3 +++ assets/icons/circle_up_8.svg | 3 +++ assets/icons/circle_x_mark_12.svg | 3 +++ assets/icons/circle_x_mark_16.svg | 3 +++ assets/icons/circle_x_mark_8.svg | 3 +++ assets/icons/cloud_12.svg | 3 +++ assets/icons/cloud_8.svg | 3 +++ assets/icons/cloud_slash_12.svg | 3 +++ assets/icons/cloud_slash_8.svg | 3 +++ assets/icons/comment-16.svg | 3 --- assets/icons/contacts-solid-14.svg | 3 --- assets/icons/diagnostic-error-10.svg | 3 --- assets/icons/diagnostic-summary-error.svg | 3 --- assets/icons/diagnostic-summary-warning.svg | 3 --- assets/icons/diagnostic-warning-10.svg | 3 --- assets/icons/disclosure-closed.svg | 3 --- assets/icons/disclosure-open.svg | 3 --- assets/icons/download-solid-14.svg | 3 --- assets/icons/download_12.svg | 3 +++ assets/icons/download_8.svg | 3 +++ assets/icons/error-solid-14.svg | 3 --- assets/icons/file-16.svg | 1 - assets/icons/file_12.svg | 4 ++++ assets/icons/file_16.svg | 4 ++++ assets/icons/file_8.svg | 4 ++++ assets/icons/folder-tree-solid-14.svg | 3 --- assets/icons/folder_tree_12.svg | 3 +++ ...Icon16FolderTree.svg => folder_tree_16.svg} | 0 assets/icons/folder_tree_8.svg | 3 +++ assets/icons/jump.svg | 3 --- assets/icons/lock-8.svg | 3 --- assets/icons/lock_8.svg | 3 +++ assets/icons/magnifier.svg | 3 --- assets/icons/magnifying_glass_12.svg | 3 +++ assets/icons/magnifying_glass_16.svg | 3 +++ assets/icons/magnifying_glass_8.svg | 3 +++ assets/icons/no-error-solid-14.svg | 3 --- assets/icons/offline-14.svg | 3 --- assets/icons/share.svg | 3 --- assets/icons/signed-out-12.svg | 3 --- assets/icons/split.svg | 5 ----- assets/icons/split_12.svg | 5 +++++ assets/icons/terminal-solid-14.svg | 3 --- assets/icons/terminal_12.svg | 3 +++ assets/icons/terminal_16.svg | 3 +++ assets/icons/terminal_8.svg | 3 +++ assets/icons/triangle_exclamation_12.svg | 3 +++ assets/icons/triangle_exclamation_16.svg | 3 +++ assets/icons/triangle_exclamation_8.svg | 3 +++ assets/icons/unlock_8.svg | 3 +++ assets/icons/user_circle_12.svg | 3 +++ assets/icons/user_circle_8.svg | 3 +++ assets/icons/user_group_12.svg | 3 +++ .../{Icon16UserGroup.svg => user_group_16.svg} | 0 assets/icons/user_group_8.svg | 3 +++ assets/icons/user_plus_12.svg | 3 +++ assets/icons/user_plus_16.svg | 3 +++ assets/icons/user_plus_8.svg | 3 +++ assets/icons/warning-solid-14.svg | 3 --- assets/icons/x.svg | 3 --- assets/icons/x_mark_12.svg | 3 +++ assets/icons/x_mark_16.svg | 3 +++ assets/icons/x_mark_8.svg | 3 +++ assets/icons/x_mark_thin_8.svg | 3 +++ assets/icons/zap.svg | 3 --- .../src/activity_indicator.rs | 6 +++--- crates/auto_update/src/update_notification.rs | 2 +- crates/contacts_panel/src/contact_finder.rs | 4 ++-- crates/contacts_panel/src/contacts_panel.rs | 18 +++++++++--------- crates/contacts_panel/src/notifications.rs | 2 +- crates/diagnostics/src/diagnostics.rs | 8 ++++---- crates/diagnostics/src/items.rs | 6 +++--- crates/editor/src/editor.rs | 2 +- crates/editor/src/element.rs | 2 +- crates/project_panel/src/project_panel.rs | 4 ++-- crates/search/src/project_search.rs | 2 +- crates/terminal/src/terminal.rs | 2 +- crates/workspace/src/pane.rs | 4 ++-- crates/workspace/src/toolbar.rs | 4 ++-- crates/workspace/src/workspace.rs | 2 +- crates/zed/src/zed.rs | 4 ++-- 150 files changed, 331 insertions(+), 148 deletions(-) delete mode 100644 assets/icons/Icon12CircleXMark.svg delete mode 100644 assets/icons/Icon12FolderTree.svg delete mode 100644 assets/icons/Icon16ArrowLeft.svg delete mode 100644 assets/icons/Icon16ArrowRight.svg delete mode 100644 assets/icons/Icon16CircleCheck.svg delete mode 100644 assets/icons/Icon16CircleInfo.svg delete mode 100644 assets/icons/Icon16CircleXMark.svg delete mode 100644 assets/icons/Icon16MagnifyingGlass.svg delete mode 100644 assets/icons/Icon16TriangleExclamation.svg delete mode 100644 assets/icons/accept.svg delete mode 100644 assets/icons/add-contact.svg delete mode 100644 assets/icons/arrow-left.svg delete mode 100644 assets/icons/arrow-right.svg create mode 100644 assets/icons/arrow_down_12.svg create mode 100644 assets/icons/arrow_down_16.svg rename assets/icons/{decline.svg => arrow_down_8.svg} (53%) create mode 100644 assets/icons/arrow_left_12.svg create mode 100644 assets/icons/arrow_left_16.svg create mode 100644 assets/icons/arrow_left_8.svg create mode 100644 assets/icons/arrow_right_12.svg create mode 100644 assets/icons/arrow_right_16.svg create mode 100644 assets/icons/arrow_right_8.svg create mode 100644 assets/icons/arrow_up_12.svg create mode 100644 assets/icons/arrow_up_16.svg create mode 100644 assets/icons/arrow_up_8.svg create mode 100644 assets/icons/arrow_up_right_8.svg create mode 100644 assets/icons/backspace _12.svg create mode 100644 assets/icons/backspace _16.svg create mode 100644 assets/icons/backspace _8.svg create mode 100644 assets/icons/bolt_12.svg create mode 100644 assets/icons/bolt_16.svg create mode 100644 assets/icons/bolt_8.svg create mode 100644 assets/icons/bolt_slash_12.svg create mode 100644 assets/icons/bolt_slash_16.svg create mode 100644 assets/icons/bolt_slash_8.svg create mode 100644 assets/icons/caret_down_12.svg create mode 100644 assets/icons/caret_down_16.svg create mode 100644 assets/icons/caret_down_8.svg create mode 100644 assets/icons/caret_left_12.svg create mode 100644 assets/icons/caret_left_16.svg create mode 100644 assets/icons/caret_left_8.svg create mode 100644 assets/icons/caret_right_12.svg create mode 100644 assets/icons/caret_right_16.svg create mode 100644 assets/icons/caret_right_8.svg create mode 100644 assets/icons/caret_up_12.svg create mode 100644 assets/icons/caret_up_16.svg create mode 100644 assets/icons/caret_up_8.svg create mode 100644 assets/icons/check_12.svg create mode 100644 assets/icons/check_16.svg create mode 100644 assets/icons/check_8.svg create mode 100644 assets/icons/chevron_down_12.svg create mode 100644 assets/icons/chevron_down_16.svg create mode 100644 assets/icons/chevron_down_8.svg create mode 100644 assets/icons/chevron_left_12.svg create mode 100644 assets/icons/chevron_left_16.svg create mode 100644 assets/icons/chevron_left_8.svg create mode 100644 assets/icons/chevron_right_12.svg create mode 100644 assets/icons/chevron_right_16.svg create mode 100644 assets/icons/chevron_right_8.svg create mode 100644 assets/icons/chevron_up_12.svg create mode 100644 assets/icons/chevron_up_16.svg create mode 100644 assets/icons/chevron_up_8.svg create mode 100644 assets/icons/circle_check_12.svg create mode 100644 assets/icons/circle_check_16.svg create mode 100644 assets/icons/circle_check_8.svg create mode 100644 assets/icons/circle_info_12.svg create mode 100644 assets/icons/circle_info_16.svg create mode 100644 assets/icons/circle_info_8.svg create mode 100644 assets/icons/circle_up_12.svg create mode 100644 assets/icons/circle_up_16.svg create mode 100644 assets/icons/circle_up_8.svg create mode 100644 assets/icons/circle_x_mark_12.svg create mode 100644 assets/icons/circle_x_mark_16.svg create mode 100644 assets/icons/circle_x_mark_8.svg create mode 100644 assets/icons/cloud_12.svg create mode 100644 assets/icons/cloud_8.svg create mode 100644 assets/icons/cloud_slash_12.svg create mode 100644 assets/icons/cloud_slash_8.svg delete mode 100644 assets/icons/comment-16.svg delete mode 100644 assets/icons/contacts-solid-14.svg delete mode 100644 assets/icons/diagnostic-error-10.svg delete mode 100644 assets/icons/diagnostic-summary-error.svg delete mode 100644 assets/icons/diagnostic-summary-warning.svg delete mode 100644 assets/icons/diagnostic-warning-10.svg delete mode 100644 assets/icons/disclosure-closed.svg delete mode 100644 assets/icons/disclosure-open.svg delete mode 100644 assets/icons/download-solid-14.svg create mode 100644 assets/icons/download_12.svg create mode 100644 assets/icons/download_8.svg delete mode 100644 assets/icons/error-solid-14.svg delete mode 100644 assets/icons/file-16.svg create mode 100644 assets/icons/file_12.svg create mode 100644 assets/icons/file_16.svg create mode 100644 assets/icons/file_8.svg delete mode 100644 assets/icons/folder-tree-solid-14.svg create mode 100644 assets/icons/folder_tree_12.svg rename assets/icons/{Icon16FolderTree.svg => folder_tree_16.svg} (100%) create mode 100644 assets/icons/folder_tree_8.svg delete mode 100644 assets/icons/jump.svg delete mode 100644 assets/icons/lock-8.svg create mode 100644 assets/icons/lock_8.svg delete mode 100644 assets/icons/magnifier.svg create mode 100644 assets/icons/magnifying_glass_12.svg create mode 100644 assets/icons/magnifying_glass_16.svg create mode 100644 assets/icons/magnifying_glass_8.svg delete mode 100644 assets/icons/no-error-solid-14.svg delete mode 100644 assets/icons/offline-14.svg delete mode 100644 assets/icons/share.svg delete mode 100644 assets/icons/signed-out-12.svg delete mode 100644 assets/icons/split.svg create mode 100644 assets/icons/split_12.svg delete mode 100644 assets/icons/terminal-solid-14.svg create mode 100644 assets/icons/terminal_12.svg create mode 100644 assets/icons/terminal_16.svg create mode 100644 assets/icons/terminal_8.svg create mode 100644 assets/icons/triangle_exclamation_12.svg create mode 100644 assets/icons/triangle_exclamation_16.svg create mode 100644 assets/icons/triangle_exclamation_8.svg create mode 100644 assets/icons/unlock_8.svg create mode 100644 assets/icons/user_circle_12.svg create mode 100644 assets/icons/user_circle_8.svg create mode 100644 assets/icons/user_group_12.svg rename assets/icons/{Icon16UserGroup.svg => user_group_16.svg} (100%) create mode 100644 assets/icons/user_group_8.svg create mode 100644 assets/icons/user_plus_12.svg create mode 100644 assets/icons/user_plus_16.svg create mode 100644 assets/icons/user_plus_8.svg delete mode 100644 assets/icons/warning-solid-14.svg delete mode 100644 assets/icons/x.svg create mode 100644 assets/icons/x_mark_12.svg create mode 100644 assets/icons/x_mark_16.svg create mode 100644 assets/icons/x_mark_8.svg create mode 100644 assets/icons/x_mark_thin_8.svg delete mode 100644 assets/icons/zap.svg diff --git a/assets/icons/Icon12CircleXMark.svg b/assets/icons/Icon12CircleXMark.svg deleted file mode 100644 index cf4f783aa0..0000000000 --- a/assets/icons/Icon12CircleXMark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/Icon12FolderTree.svg b/assets/icons/Icon12FolderTree.svg deleted file mode 100644 index 411b98d5b8..0000000000 --- a/assets/icons/Icon12FolderTree.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/Icon16ArrowLeft.svg b/assets/icons/Icon16ArrowLeft.svg deleted file mode 100644 index 905d643f1b..0000000000 --- a/assets/icons/Icon16ArrowLeft.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/Icon16ArrowRight.svg b/assets/icons/Icon16ArrowRight.svg deleted file mode 100644 index 24cd660ab2..0000000000 --- a/assets/icons/Icon16ArrowRight.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/Icon16CircleCheck.svg b/assets/icons/Icon16CircleCheck.svg deleted file mode 100644 index 0b01e957c5..0000000000 --- a/assets/icons/Icon16CircleCheck.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/Icon16CircleInfo.svg b/assets/icons/Icon16CircleInfo.svg deleted file mode 100644 index e7058a0645..0000000000 --- a/assets/icons/Icon16CircleInfo.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/Icon16CircleXMark.svg b/assets/icons/Icon16CircleXMark.svg deleted file mode 100644 index f9e82dd4b0..0000000000 --- a/assets/icons/Icon16CircleXMark.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/Icon16MagnifyingGlass.svg b/assets/icons/Icon16MagnifyingGlass.svg deleted file mode 100644 index 0f82f266ff..0000000000 --- a/assets/icons/Icon16MagnifyingGlass.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/Icon16TriangleExclamation.svg b/assets/icons/Icon16TriangleExclamation.svg deleted file mode 100644 index 86a41d8160..0000000000 --- a/assets/icons/Icon16TriangleExclamation.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/accept.svg b/assets/icons/accept.svg deleted file mode 100644 index 6a8a7d67a0..0000000000 --- a/assets/icons/accept.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/add-contact.svg b/assets/icons/add-contact.svg deleted file mode 100644 index 4fc7790b9d..0000000000 --- a/assets/icons/add-contact.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/arrow-left.svg b/assets/icons/arrow-left.svg deleted file mode 100644 index 904fdaa1a7..0000000000 --- a/assets/icons/arrow-left.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/arrow-right.svg b/assets/icons/arrow-right.svg deleted file mode 100644 index b7e1bec6d8..0000000000 --- a/assets/icons/arrow-right.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/arrow_down_12.svg b/assets/icons/arrow_down_12.svg new file mode 100644 index 0000000000..63cbe50997 --- /dev/null +++ b/assets/icons/arrow_down_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/arrow_down_16.svg b/assets/icons/arrow_down_16.svg new file mode 100644 index 0000000000..2e8a42a9ea --- /dev/null +++ b/assets/icons/arrow_down_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/decline.svg b/assets/icons/arrow_down_8.svg similarity index 53% rename from assets/icons/decline.svg rename to assets/icons/arrow_down_8.svg index e78f49a228..18ac436d2a 100644 --- a/assets/icons/decline.svg +++ b/assets/icons/arrow_down_8.svg @@ -1,3 +1,3 @@ - + diff --git a/assets/icons/arrow_left_12.svg b/assets/icons/arrow_left_12.svg new file mode 100644 index 0000000000..d7245fc106 --- /dev/null +++ b/assets/icons/arrow_left_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/arrow_left_16.svg b/assets/icons/arrow_left_16.svg new file mode 100644 index 0000000000..a313cf002e --- /dev/null +++ b/assets/icons/arrow_left_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/arrow_left_8.svg b/assets/icons/arrow_left_8.svg new file mode 100644 index 0000000000..7851d9f219 --- /dev/null +++ b/assets/icons/arrow_left_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/arrow_right_12.svg b/assets/icons/arrow_right_12.svg new file mode 100644 index 0000000000..a38f55dcaf --- /dev/null +++ b/assets/icons/arrow_right_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/arrow_right_16.svg b/assets/icons/arrow_right_16.svg new file mode 100644 index 0000000000..790a142162 --- /dev/null +++ b/assets/icons/arrow_right_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/arrow_right_8.svg b/assets/icons/arrow_right_8.svg new file mode 100644 index 0000000000..3115e0e669 --- /dev/null +++ b/assets/icons/arrow_right_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/arrow_up_12.svg b/assets/icons/arrow_up_12.svg new file mode 100644 index 0000000000..84bcc4ebd8 --- /dev/null +++ b/assets/icons/arrow_up_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/arrow_up_16.svg b/assets/icons/arrow_up_16.svg new file mode 100644 index 0000000000..63ea16b1d8 --- /dev/null +++ b/assets/icons/arrow_up_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/arrow_up_8.svg b/assets/icons/arrow_up_8.svg new file mode 100644 index 0000000000..24a040abbb --- /dev/null +++ b/assets/icons/arrow_up_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/arrow_up_right_8.svg b/assets/icons/arrow_up_right_8.svg new file mode 100644 index 0000000000..c53175ea6b --- /dev/null +++ b/assets/icons/arrow_up_right_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/backspace _12.svg b/assets/icons/backspace _12.svg new file mode 100644 index 0000000000..68bad3da26 --- /dev/null +++ b/assets/icons/backspace _12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/backspace _16.svg b/assets/icons/backspace _16.svg new file mode 100644 index 0000000000..965470690e --- /dev/null +++ b/assets/icons/backspace _16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/backspace _8.svg b/assets/icons/backspace _8.svg new file mode 100644 index 0000000000..60972007b6 --- /dev/null +++ b/assets/icons/backspace _8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/bolt_12.svg b/assets/icons/bolt_12.svg new file mode 100644 index 0000000000..bf529dec33 --- /dev/null +++ b/assets/icons/bolt_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/bolt_16.svg b/assets/icons/bolt_16.svg new file mode 100644 index 0000000000..c3859443b2 --- /dev/null +++ b/assets/icons/bolt_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/bolt_8.svg b/assets/icons/bolt_8.svg new file mode 100644 index 0000000000..2e431a0df1 --- /dev/null +++ b/assets/icons/bolt_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/bolt_slash_12.svg b/assets/icons/bolt_slash_12.svg new file mode 100644 index 0000000000..c5d4a1c828 --- /dev/null +++ b/assets/icons/bolt_slash_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/bolt_slash_16.svg b/assets/icons/bolt_slash_16.svg new file mode 100644 index 0000000000..9520a626c1 --- /dev/null +++ b/assets/icons/bolt_slash_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/bolt_slash_8.svg b/assets/icons/bolt_slash_8.svg new file mode 100644 index 0000000000..14a22ab8cd --- /dev/null +++ b/assets/icons/bolt_slash_8.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/icons/caret_down_12.svg b/assets/icons/caret_down_12.svg new file mode 100644 index 0000000000..6208814bc2 --- /dev/null +++ b/assets/icons/caret_down_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/caret_down_16.svg b/assets/icons/caret_down_16.svg new file mode 100644 index 0000000000..cba930287e --- /dev/null +++ b/assets/icons/caret_down_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/caret_down_8.svg b/assets/icons/caret_down_8.svg new file mode 100644 index 0000000000..10bd20eb7f --- /dev/null +++ b/assets/icons/caret_down_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/caret_left_12.svg b/assets/icons/caret_left_12.svg new file mode 100644 index 0000000000..6b6c32513e --- /dev/null +++ b/assets/icons/caret_left_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/caret_left_16.svg b/assets/icons/caret_left_16.svg new file mode 100644 index 0000000000..5ffd176c59 --- /dev/null +++ b/assets/icons/caret_left_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/caret_left_8.svg b/assets/icons/caret_left_8.svg new file mode 100644 index 0000000000..c02a5f3468 --- /dev/null +++ b/assets/icons/caret_left_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/caret_right_12.svg b/assets/icons/caret_right_12.svg new file mode 100644 index 0000000000..6670b80cf8 --- /dev/null +++ b/assets/icons/caret_right_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/caret_right_16.svg b/assets/icons/caret_right_16.svg new file mode 100644 index 0000000000..da239b95d7 --- /dev/null +++ b/assets/icons/caret_right_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/caret_right_8.svg b/assets/icons/caret_right_8.svg new file mode 100644 index 0000000000..9a3f2166ef --- /dev/null +++ b/assets/icons/caret_right_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/caret_up_12.svg b/assets/icons/caret_up_12.svg new file mode 100644 index 0000000000..9fe93c47ae --- /dev/null +++ b/assets/icons/caret_up_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/caret_up_16.svg b/assets/icons/caret_up_16.svg new file mode 100644 index 0000000000..10f45523a4 --- /dev/null +++ b/assets/icons/caret_up_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/caret_up_8.svg b/assets/icons/caret_up_8.svg new file mode 100644 index 0000000000..24c2db5129 --- /dev/null +++ b/assets/icons/caret_up_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/check_12.svg b/assets/icons/check_12.svg new file mode 100644 index 0000000000..e4255646bb --- /dev/null +++ b/assets/icons/check_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/check_16.svg b/assets/icons/check_16.svg new file mode 100644 index 0000000000..0ebf3fe75e --- /dev/null +++ b/assets/icons/check_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/check_8.svg b/assets/icons/check_8.svg new file mode 100644 index 0000000000..7513909ce1 --- /dev/null +++ b/assets/icons/check_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/chevron_down_12.svg b/assets/icons/chevron_down_12.svg new file mode 100644 index 0000000000..7bba37857a --- /dev/null +++ b/assets/icons/chevron_down_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/chevron_down_16.svg b/assets/icons/chevron_down_16.svg new file mode 100644 index 0000000000..cc7228cdc9 --- /dev/null +++ b/assets/icons/chevron_down_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/chevron_down_8.svg b/assets/icons/chevron_down_8.svg new file mode 100644 index 0000000000..fe60b4968a --- /dev/null +++ b/assets/icons/chevron_down_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/chevron_left_12.svg b/assets/icons/chevron_left_12.svg new file mode 100644 index 0000000000..a230007c7b --- /dev/null +++ b/assets/icons/chevron_left_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/chevron_left_16.svg b/assets/icons/chevron_left_16.svg new file mode 100644 index 0000000000..2cd1bbd4d2 --- /dev/null +++ b/assets/icons/chevron_left_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/chevron_left_8.svg b/assets/icons/chevron_left_8.svg new file mode 100644 index 0000000000..88ca274f51 --- /dev/null +++ b/assets/icons/chevron_left_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/chevron_right_12.svg b/assets/icons/chevron_right_12.svg new file mode 100644 index 0000000000..b463182705 --- /dev/null +++ b/assets/icons/chevron_right_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/chevron_right_16.svg b/assets/icons/chevron_right_16.svg new file mode 100644 index 0000000000..3a2aafbcd6 --- /dev/null +++ b/assets/icons/chevron_right_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/chevron_right_8.svg b/assets/icons/chevron_right_8.svg new file mode 100644 index 0000000000..7349274681 --- /dev/null +++ b/assets/icons/chevron_right_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/chevron_up_12.svg b/assets/icons/chevron_up_12.svg new file mode 100644 index 0000000000..c6bbee4ff7 --- /dev/null +++ b/assets/icons/chevron_up_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/chevron_up_16.svg b/assets/icons/chevron_up_16.svg new file mode 100644 index 0000000000..ba2d4e6668 --- /dev/null +++ b/assets/icons/chevron_up_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/chevron_up_8.svg b/assets/icons/chevron_up_8.svg new file mode 100644 index 0000000000..41525aa3ea --- /dev/null +++ b/assets/icons/chevron_up_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/circle_check_12.svg b/assets/icons/circle_check_12.svg new file mode 100644 index 0000000000..0fbb051b84 --- /dev/null +++ b/assets/icons/circle_check_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/circle_check_16.svg b/assets/icons/circle_check_16.svg new file mode 100644 index 0000000000..adfc8cecca --- /dev/null +++ b/assets/icons/circle_check_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/circle_check_8.svg b/assets/icons/circle_check_8.svg new file mode 100644 index 0000000000..b4d4d9e624 --- /dev/null +++ b/assets/icons/circle_check_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/circle_info_12.svg b/assets/icons/circle_info_12.svg new file mode 100644 index 0000000000..eec07e0abf --- /dev/null +++ b/assets/icons/circle_info_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/circle_info_16.svg b/assets/icons/circle_info_16.svg new file mode 100644 index 0000000000..48bd4f79a8 --- /dev/null +++ b/assets/icons/circle_info_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/circle_info_8.svg b/assets/icons/circle_info_8.svg new file mode 100644 index 0000000000..1d7ac77dd2 --- /dev/null +++ b/assets/icons/circle_info_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/circle_up_12.svg b/assets/icons/circle_up_12.svg new file mode 100644 index 0000000000..c4b9677289 --- /dev/null +++ b/assets/icons/circle_up_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/circle_up_16.svg b/assets/icons/circle_up_16.svg new file mode 100644 index 0000000000..4eb3886fe4 --- /dev/null +++ b/assets/icons/circle_up_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/circle_up_8.svg b/assets/icons/circle_up_8.svg new file mode 100644 index 0000000000..17abd30214 --- /dev/null +++ b/assets/icons/circle_up_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/circle_x_mark_12.svg b/assets/icons/circle_x_mark_12.svg new file mode 100644 index 0000000000..c648431dd4 --- /dev/null +++ b/assets/icons/circle_x_mark_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/circle_x_mark_16.svg b/assets/icons/circle_x_mark_16.svg new file mode 100644 index 0000000000..db3f401615 --- /dev/null +++ b/assets/icons/circle_x_mark_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/circle_x_mark_8.svg b/assets/icons/circle_x_mark_8.svg new file mode 100644 index 0000000000..f1323b9589 --- /dev/null +++ b/assets/icons/circle_x_mark_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/cloud_12.svg b/assets/icons/cloud_12.svg new file mode 100644 index 0000000000..2ed58f4966 --- /dev/null +++ b/assets/icons/cloud_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/cloud_8.svg b/assets/icons/cloud_8.svg new file mode 100644 index 0000000000..0e0337e7ab --- /dev/null +++ b/assets/icons/cloud_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/cloud_slash_12.svg b/assets/icons/cloud_slash_12.svg new file mode 100644 index 0000000000..37d0ee904c --- /dev/null +++ b/assets/icons/cloud_slash_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/cloud_slash_8.svg b/assets/icons/cloud_slash_8.svg new file mode 100644 index 0000000000..524012d31a --- /dev/null +++ b/assets/icons/cloud_slash_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/comment-16.svg b/assets/icons/comment-16.svg deleted file mode 100644 index 6316d3a4a9..0000000000 --- a/assets/icons/comment-16.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/contacts-solid-14.svg b/assets/icons/contacts-solid-14.svg deleted file mode 100644 index 05ad6ada71..0000000000 --- a/assets/icons/contacts-solid-14.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/diagnostic-error-10.svg b/assets/icons/diagnostic-error-10.svg deleted file mode 100644 index d01bc3a23d..0000000000 --- a/assets/icons/diagnostic-error-10.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/diagnostic-summary-error.svg b/assets/icons/diagnostic-summary-error.svg deleted file mode 100644 index 0180762a9e..0000000000 --- a/assets/icons/diagnostic-summary-error.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/diagnostic-summary-warning.svg b/assets/icons/diagnostic-summary-warning.svg deleted file mode 100644 index fead4db839..0000000000 --- a/assets/icons/diagnostic-summary-warning.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/diagnostic-warning-10.svg b/assets/icons/diagnostic-warning-10.svg deleted file mode 100644 index bfd9ed7c6f..0000000000 --- a/assets/icons/diagnostic-warning-10.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/disclosure-closed.svg b/assets/icons/disclosure-closed.svg deleted file mode 100644 index 87a898787e..0000000000 --- a/assets/icons/disclosure-closed.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/disclosure-open.svg b/assets/icons/disclosure-open.svg deleted file mode 100644 index 3a76a74d31..0000000000 --- a/assets/icons/disclosure-open.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/download-solid-14.svg b/assets/icons/download-solid-14.svg deleted file mode 100644 index e2e1cf5d02..0000000000 --- a/assets/icons/download-solid-14.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/download_12.svg b/assets/icons/download_12.svg new file mode 100644 index 0000000000..8386cecbeb --- /dev/null +++ b/assets/icons/download_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/download_8.svg b/assets/icons/download_8.svg new file mode 100644 index 0000000000..629ba0c620 --- /dev/null +++ b/assets/icons/download_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/error-solid-14.svg b/assets/icons/error-solid-14.svg deleted file mode 100644 index a74b7e9419..0000000000 --- a/assets/icons/error-solid-14.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/file-16.svg b/assets/icons/file-16.svg deleted file mode 100644 index b487e21e37..0000000000 --- a/assets/icons/file-16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/icons/file_12.svg b/assets/icons/file_12.svg new file mode 100644 index 0000000000..191e3d7fae --- /dev/null +++ b/assets/icons/file_12.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/file_16.svg b/assets/icons/file_16.svg new file mode 100644 index 0000000000..79fd1f81cb --- /dev/null +++ b/assets/icons/file_16.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/file_8.svg b/assets/icons/file_8.svg new file mode 100644 index 0000000000..2e636bd3b3 --- /dev/null +++ b/assets/icons/file_8.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icons/folder-tree-solid-14.svg b/assets/icons/folder-tree-solid-14.svg deleted file mode 100644 index ecda94ca82..0000000000 --- a/assets/icons/folder-tree-solid-14.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/folder_tree_12.svg b/assets/icons/folder_tree_12.svg new file mode 100644 index 0000000000..f11253aa4a --- /dev/null +++ b/assets/icons/folder_tree_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/Icon16FolderTree.svg b/assets/icons/folder_tree_16.svg similarity index 100% rename from assets/icons/Icon16FolderTree.svg rename to assets/icons/folder_tree_16.svg diff --git a/assets/icons/folder_tree_8.svg b/assets/icons/folder_tree_8.svg new file mode 100644 index 0000000000..758080a611 --- /dev/null +++ b/assets/icons/folder_tree_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/jump.svg b/assets/icons/jump.svg deleted file mode 100644 index 4e89fc4339..0000000000 --- a/assets/icons/jump.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/lock-8.svg b/assets/icons/lock-8.svg deleted file mode 100644 index c98340b93a..0000000000 --- a/assets/icons/lock-8.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/lock_8.svg b/assets/icons/lock_8.svg new file mode 100644 index 0000000000..8df83dc0b5 --- /dev/null +++ b/assets/icons/lock_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/magnifier.svg b/assets/icons/magnifier.svg deleted file mode 100644 index dc27a594ee..0000000000 --- a/assets/icons/magnifier.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/magnifying_glass_12.svg b/assets/icons/magnifying_glass_12.svg new file mode 100644 index 0000000000..b45c30172e --- /dev/null +++ b/assets/icons/magnifying_glass_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/magnifying_glass_16.svg b/assets/icons/magnifying_glass_16.svg new file mode 100644 index 0000000000..f35343e8d3 --- /dev/null +++ b/assets/icons/magnifying_glass_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/magnifying_glass_8.svg b/assets/icons/magnifying_glass_8.svg new file mode 100644 index 0000000000..00eb332440 --- /dev/null +++ b/assets/icons/magnifying_glass_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/no-error-solid-14.svg b/assets/icons/no-error-solid-14.svg deleted file mode 100644 index 4d222aac73..0000000000 --- a/assets/icons/no-error-solid-14.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/offline-14.svg b/assets/icons/offline-14.svg deleted file mode 100644 index 5349f65ead..0000000000 --- a/assets/icons/offline-14.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/share.svg b/assets/icons/share.svg deleted file mode 100644 index ee8ddfffc9..0000000000 --- a/assets/icons/share.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/signed-out-12.svg b/assets/icons/signed-out-12.svg deleted file mode 100644 index 3cecfe9dd3..0000000000 --- a/assets/icons/signed-out-12.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/split.svg b/assets/icons/split.svg deleted file mode 100644 index 9e7d3607eb..0000000000 --- a/assets/icons/split.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/assets/icons/split_12.svg b/assets/icons/split_12.svg new file mode 100644 index 0000000000..8aeb3bcb4c --- /dev/null +++ b/assets/icons/split_12.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/icons/terminal-solid-14.svg b/assets/icons/terminal-solid-14.svg deleted file mode 100644 index b3bf68fb88..0000000000 --- a/assets/icons/terminal-solid-14.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/terminal_12.svg b/assets/icons/terminal_12.svg new file mode 100644 index 0000000000..4c44e657e8 --- /dev/null +++ b/assets/icons/terminal_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/terminal_16.svg b/assets/icons/terminal_16.svg new file mode 100644 index 0000000000..927982deee --- /dev/null +++ b/assets/icons/terminal_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/terminal_8.svg b/assets/icons/terminal_8.svg new file mode 100644 index 0000000000..f3e26f12f9 --- /dev/null +++ b/assets/icons/terminal_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/triangle_exclamation_12.svg b/assets/icons/triangle_exclamation_12.svg new file mode 100644 index 0000000000..b06707e924 --- /dev/null +++ b/assets/icons/triangle_exclamation_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/triangle_exclamation_16.svg b/assets/icons/triangle_exclamation_16.svg new file mode 100644 index 0000000000..2df386203a --- /dev/null +++ b/assets/icons/triangle_exclamation_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/triangle_exclamation_8.svg b/assets/icons/triangle_exclamation_8.svg new file mode 100644 index 0000000000..166a62e532 --- /dev/null +++ b/assets/icons/triangle_exclamation_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/unlock_8.svg b/assets/icons/unlock_8.svg new file mode 100644 index 0000000000..d358182795 --- /dev/null +++ b/assets/icons/unlock_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/user_circle_12.svg b/assets/icons/user_circle_12.svg new file mode 100644 index 0000000000..eec0954ba0 --- /dev/null +++ b/assets/icons/user_circle_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/user_circle_8.svg b/assets/icons/user_circle_8.svg new file mode 100644 index 0000000000..4bbf9c0301 --- /dev/null +++ b/assets/icons/user_circle_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/user_group_12.svg b/assets/icons/user_group_12.svg new file mode 100644 index 0000000000..5eae1d55b7 --- /dev/null +++ b/assets/icons/user_group_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/Icon16UserGroup.svg b/assets/icons/user_group_16.svg similarity index 100% rename from assets/icons/Icon16UserGroup.svg rename to assets/icons/user_group_16.svg diff --git a/assets/icons/user_group_8.svg b/assets/icons/user_group_8.svg new file mode 100644 index 0000000000..39058e51d4 --- /dev/null +++ b/assets/icons/user_group_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/user_plus_12.svg b/assets/icons/user_plus_12.svg new file mode 100644 index 0000000000..61f61e3929 --- /dev/null +++ b/assets/icons/user_plus_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/user_plus_16.svg b/assets/icons/user_plus_16.svg new file mode 100644 index 0000000000..213eb8f13b --- /dev/null +++ b/assets/icons/user_plus_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/user_plus_8.svg b/assets/icons/user_plus_8.svg new file mode 100644 index 0000000000..6b7179a139 --- /dev/null +++ b/assets/icons/user_plus_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/warning-solid-14.svg b/assets/icons/warning-solid-14.svg deleted file mode 100644 index 53dd5f7eae..0000000000 --- a/assets/icons/warning-solid-14.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/x.svg b/assets/icons/x.svg deleted file mode 100644 index 89fcd64b79..0000000000 --- a/assets/icons/x.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/x_mark_12.svg b/assets/icons/x_mark_12.svg new file mode 100644 index 0000000000..aaa97312ac --- /dev/null +++ b/assets/icons/x_mark_12.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/x_mark_16.svg b/assets/icons/x_mark_16.svg new file mode 100644 index 0000000000..a33adcc403 --- /dev/null +++ b/assets/icons/x_mark_16.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/x_mark_8.svg b/assets/icons/x_mark_8.svg new file mode 100644 index 0000000000..ef81658d61 --- /dev/null +++ b/assets/icons/x_mark_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/x_mark_thin_8.svg b/assets/icons/x_mark_thin_8.svg new file mode 100644 index 0000000000..e5aa1b36e3 --- /dev/null +++ b/assets/icons/x_mark_thin_8.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/zap.svg b/assets/icons/zap.svg deleted file mode 100644 index 8d517dcb53..0000000000 --- a/assets/icons/zap.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/crates/activity_indicator/src/activity_indicator.rs b/crates/activity_indicator/src/activity_indicator.rs index 8bc84f911c..48a4614a06 100644 --- a/crates/activity_indicator/src/activity_indicator.rs +++ b/crates/activity_indicator/src/activity_indicator.rs @@ -15,9 +15,9 @@ use workspace::{ItemHandle, StatusItemView, Workspace}; actions!(lsp_status, [ShowErrorMessage]); -const DOWNLOAD_ICON: &'static str = "icons/download-solid-14.svg"; -const WARNING_ICON: &'static str = "icons/warning-solid-14.svg"; -const DONE_ICON: &'static str = "icons/accept.svg"; +const DOWNLOAD_ICON: &'static str = "icons/download_12.svg"; +const WARNING_ICON: &'static str = "icons/triangle_exclamation_12.svg"; +const DONE_ICON: &'static str = "icons/circle_check_12.svg"; pub enum Event { ShowError { lsp_name: Arc, error: String }, diff --git a/crates/auto_update/src/update_notification.rs b/crates/auto_update/src/update_notification.rs index e9c73ef4bc..2db68815fe 100644 --- a/crates/auto_update/src/update_notification.rs +++ b/crates/auto_update/src/update_notification.rs @@ -49,7 +49,7 @@ impl View for UpdateNotification { .with_child( MouseEventHandler::new::(0, cx, |state, _| { let style = theme.dismiss_button.style_for(state, false); - Svg::new("icons/decline.svg") + Svg::new("icons/x_mark_thin_8.svg") .with_color(style.color) .constrained() .with_width(style.icon_width) diff --git a/crates/contacts_panel/src/contact_finder.rs b/crates/contacts_panel/src/contact_finder.rs index 244cfcad4a..4027160950 100644 --- a/crates/contacts_panel/src/contact_finder.rs +++ b/crates/contacts_panel/src/contact_finder.rs @@ -115,10 +115,10 @@ impl PickerDelegate for ContactFinder { let icon_path = match request_status { ContactRequestStatus::None | ContactRequestStatus::RequestReceived => { - "icons/accept.svg" + "icons/check_8.svg" } ContactRequestStatus::RequestSent | ContactRequestStatus::RequestAccepted => { - "icons/decline.svg" + "icons/x_mark_8.svg" } }; let button_style = if self.user_store.read(cx).is_contact_request_pending(&user) { diff --git a/crates/contacts_panel/src/contacts_panel.rs b/crates/contacts_panel/src/contacts_panel.rs index f4010a1278..0dc714a532 100644 --- a/crates/contacts_panel/src/contacts_panel.rs +++ b/crates/contacts_panel/src/contacts_panel.rs @@ -281,9 +281,9 @@ impl ContactsPanel { Flex::row() .with_child( Svg::new(if is_collapsed { - "icons/disclosure-closed.svg" + "icons/chevron_right_8.svg" } else { - "icons/disclosure-open.svg" + "icons/chevron_down_8.svg" }) .with_color(header_style.text.color) .constrained() @@ -433,7 +433,7 @@ impl ContactsPanel { if is_going_offline { icon_style.color = theme.disabled_button.color; } - render_icon_button(&icon_style, "icons/lock-8.svg") + render_icon_button(&icon_style, "icons/lock_8.svg") .aligned() .boxed() }, @@ -551,7 +551,7 @@ impl ContactsPanel { if is_going_online { style.color = theme.disabled_button.color; } - render_icon_button(&style, "icons/lock-8.svg") + render_icon_button(&style, "icons/lock_8.svg") .aligned() .constrained() .with_width(host_avatar_height) @@ -640,7 +640,7 @@ impl ContactsPanel { } else { &theme.contact_button.style_for(mouse_state, false) }; - render_icon_button(button_style, "icons/decline.svg") + render_icon_button(button_style, "icons/x_mark_8.svg") .aligned() // .flex_float() .boxed() @@ -662,7 +662,7 @@ impl ContactsPanel { } else { &theme.contact_button.style_for(mouse_state, false) }; - render_icon_button(button_style, "icons/accept.svg") + render_icon_button(button_style, "icons/check_8.svg") .aligned() .flex_float() .boxed() @@ -684,7 +684,7 @@ impl ContactsPanel { } else { &theme.contact_button.style_for(mouse_state, false) }; - render_icon_button(button_style, "icons/decline.svg") + render_icon_button(button_style, "icons/x_mark_8.svg") .aligned() .flex_float() .boxed() @@ -1068,10 +1068,10 @@ impl View for ContactsPanel { ) .with_child( MouseEventHandler::new::(0, cx, |_, _| { - Svg::new("icons/add-contact.svg") + Svg::new("icons/user_plus_16.svg") .with_color(theme.add_contact_button.color) .constrained() - .with_height(12.) + .with_height(16.) .contained() .with_style(theme.add_contact_button.container) .aligned() diff --git a/crates/contacts_panel/src/notifications.rs b/crates/contacts_panel/src/notifications.rs index c02fd73b8f..38262812fe 100644 --- a/crates/contacts_panel/src/notifications.rs +++ b/crates/contacts_panel/src/notifications.rs @@ -55,7 +55,7 @@ pub fn render_user_notification( MouseEventHandler::new::(user.id as usize, cx, |state, _| { render_icon_button( theme.dismiss_button.style_for(state, false), - "icons/decline.svg", + "icons/x_mark_thin_8.svg", ) .boxed() }) diff --git a/crates/diagnostics/src/diagnostics.rs b/crates/diagnostics/src/diagnostics.rs index ecc1b2df68..51b0c2d422 100644 --- a/crates/diagnostics/src/diagnostics.rs +++ b/crates/diagnostics/src/diagnostics.rs @@ -621,10 +621,10 @@ fn diagnostic_header_renderer(diagnostic: Diagnostic) -> RenderBlock { let font_size = (style.text_scale_factor * settings.buffer_font_size).round(); let icon_width = cx.em_width * style.icon_width_factor; let icon = if diagnostic.severity == DiagnosticSeverity::ERROR { - Svg::new("icons/diagnostic-error-10.svg") + Svg::new("icons/circle_x_mark_12.svg") .with_color(theme.error_diagnostic.message.text.color) } else { - Svg::new("icons/diagnostic-warning-10.svg") + Svg::new("icons/triangle_exclamation_12.svg") .with_color(theme.warning_diagnostic.message.text.color) }; @@ -677,7 +677,7 @@ pub(crate) fn render_summary( let summary_spacing = theme.tab_summary_spacing; Flex::row() .with_children([ - Svg::new("icons/diagnostic-summary-error.svg") + Svg::new("icons/circle_x_mark_12.svg") .with_color(text_style.color) .constrained() .with_width(icon_width) @@ -694,7 +694,7 @@ pub(crate) fn render_summary( ) .aligned() .boxed(), - Svg::new("icons/diagnostic-summary-warning.svg") + Svg::new("icons/triangle_exclamation_12.svg") .with_color(text_style.color) .constrained() .with_width(icon_width) diff --git a/crates/diagnostics/src/items.rs b/crates/diagnostics/src/items.rs index 498ea6616c..ddeabfda82 100644 --- a/crates/diagnostics/src/items.rs +++ b/crates/diagnostics/src/items.rs @@ -101,7 +101,7 @@ impl View for DiagnosticIndicator { let mut summary_row = Flex::row(); if self.summary.error_count > 0 { summary_row.add_children([ - Svg::new("icons/Icon16CircleXMark.svg") + Svg::new("icons/circle_x_mark_16.svg") .with_color(style.icon_color_error) .constrained() .with_width(style.icon_width) @@ -117,7 +117,7 @@ impl View for DiagnosticIndicator { if self.summary.warning_count > 0 { summary_row.add_children([ - Svg::new("icons/Icon16TriangleExclamation.svg") + Svg::new("icons/triangle_exclamation_16.svg") .with_color(style.icon_color_warning) .constrained() .with_width(style.icon_width) @@ -138,7 +138,7 @@ impl View for DiagnosticIndicator { if self.summary.error_count == 0 && self.summary.warning_count == 0 { summary_row.add_child( - Svg::new("icons/Icon16CircleCheck.svg") + Svg::new("icons/circle_check_16.svg") .with_color(style.icon_color_ok) .constrained() .with_width(style.icon_width) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index e58f1fc341..549288113d 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -2660,7 +2660,7 @@ impl Editor { enum Tag {} Some( MouseEventHandler::new::(0, cx, |_, _| { - Svg::new("icons/zap.svg") + Svg::new("icons/bolt_8.svg") .with_color(style.code_actions_indicator) .boxed() }) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 56f664566e..be5276539d 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -936,7 +936,7 @@ impl EditorElement { cx.render(&editor, |_, cx| { MouseEventHandler::new::(*key, cx, |state, _| { let style = style.jump_icon.style_for(state, false); - Svg::new("icons/jump.svg") + Svg::new("icons/arrow_up_right_8.svg") .with_color(style.color) .constrained() .with_width(style.icon_width) diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs index eaff23a476..eab58ca688 100644 --- a/crates/project_panel/src/project_panel.rs +++ b/crates/project_panel/src/project_panel.rs @@ -1013,11 +1013,11 @@ impl ProjectPanel { .with_child( ConstrainedBox::new(if kind == EntryKind::Dir { if details.is_expanded { - Svg::new("icons/disclosure-open.svg") + Svg::new("icons/chevron_right_8.svg") .with_color(style.icon_color) .boxed() } else { - Svg::new("icons/disclosure-closed.svg") + Svg::new("icons/chevron_down_8.svg") .with_color(style.icon_color) .boxed() } diff --git a/crates/search/src/project_search.rs b/crates/search/src/project_search.rs index e1acc6a771..fdef5133fa 100644 --- a/crates/search/src/project_search.rs +++ b/crates/search/src/project_search.rs @@ -225,7 +225,7 @@ impl Item for ProjectSearchView { let search_theme = &settings.theme.search; Flex::row() .with_child( - Svg::new("icons/magnifier.svg") + Svg::new("icons/magnifying_glass_12.svg") .with_color(tab_theme.label.text.color) .constrained() .with_width(search_theme.tab_icon_width) diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rs index 12c092d6e6..fac5d3a686 100644 --- a/crates/terminal/src/terminal.rs +++ b/crates/terminal/src/terminal.rs @@ -332,7 +332,7 @@ impl Item for Terminal { if self.has_bell { flex.add_child( - Svg::new("icons/zap.svg") //TODO: Swap out for a better icon, or at least resize this + Svg::new("icons/bolt_12.svg") //TODO: Swap out for a better icon, or at least resize this .with_color(tab_theme.label.text.color) .constrained() .with_width(search_theme.tab_icon_width) diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 87b6ea7547..384c3f7e58 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -915,7 +915,7 @@ impl Pane { ConstrainedBox::new(if mouse_state.hovered { let item_id = item.id(); enum TabCloseButton {} - let icon = Svg::new("icons/x.svg"); + let icon = Svg::new("icons/x_mark_thin_8.svg"); MouseEventHandler::new::( item_id, cx, @@ -1002,7 +1002,7 @@ impl View for Pane { let theme = &cx.global::().theme.workspace; let style = theme.pane_button.style_for(mouse_state, false); - Svg::new("icons/split.svg") + Svg::new("icons/split_12.svg") .with_color(style.color) .constrained() .with_width(style.icon_width) diff --git a/crates/workspace/src/toolbar.rs b/crates/workspace/src/toolbar.rs index de4a0083ac..1fc70c1819 100644 --- a/crates/workspace/src/toolbar.rs +++ b/crates/workspace/src/toolbar.rs @@ -118,7 +118,7 @@ impl View for Toolbar { .with_child( Flex::row() .with_child(nav_button( - "icons/Icon16ArrowLeft.svg", + "icons/arrow_left_16.svg", button_style, tooltip_style.clone(), enable_go_backward, @@ -131,7 +131,7 @@ impl View for Toolbar { cx, )) .with_child(nav_button( - "icons/Icon16ArrowRight.svg", + "icons/arrow_right_16.svg", button_style, tooltip_style.clone(), enable_go_forward, diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index da62fe7e54..81d48a5e55 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -1795,7 +1795,7 @@ impl Workspace { Container::new( Align::new( ConstrainedBox::new( - Svg::new("icons/offline-14.svg") + Svg::new("icons/cloud_slash_12.svg") .with_color(theme.workspace.titlebar.offline_icon.color) .boxed(), ) diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index e3304fe6e9..9d0d31f64b 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -244,7 +244,7 @@ pub fn initialize_workspace( workspace.left_sidebar().update(cx, |sidebar, cx| { sidebar.add_item( - "icons/Icon16FolderTree.svg", + "icons/folder_tree_16.svg", "Project Panel".to_string(), project_panel.into(), cx, @@ -252,7 +252,7 @@ pub fn initialize_workspace( }); workspace.right_sidebar().update(cx, |sidebar, cx| { sidebar.add_item( - "icons/Icon16UserGroup.svg", + "icons/user_group_16.svg", "Contacts Panel".to_string(), contact_panel.into(), cx, From 9beeef63856c317a6c7cf1e07f9d2112ee14c50c Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Tue, 19 Jul 2022 17:11:26 -0400 Subject: [PATCH 13/22] Update some contact panel styling --- styles/src/styleTree/contactsPanel.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/styles/src/styleTree/contactsPanel.ts b/styles/src/styleTree/contactsPanel.ts index 51e35c9003..20fce729e4 100644 --- a/styles/src/styleTree/contactsPanel.ts +++ b/styles/src/styleTree/contactsPanel.ts @@ -72,11 +72,11 @@ export default function contactsPanel(theme: Theme) { addContactButton: { margin: { left: 6, right: 12 }, color: iconColor(theme, "primary"), - buttonWidth: 8, - iconWidth: 8, + buttonWidth: 16, + iconWidth: 16, }, privateButton: { - iconWidth: 8, + iconWidth: 12, color: iconColor(theme, "primary"), cornerRadius: 5, buttonWidth: 12, @@ -128,7 +128,7 @@ export default function contactsPanel(theme: Theme) { contactButton: { ...contactButton, hover: { - background: backgroundColor(theme, 100, "hovered"), + background: backgroundColor(theme, "on300", "hovered"), }, }, disabledButton: { @@ -156,9 +156,9 @@ export default function contactsPanel(theme: Theme) { right: sidePadding, }, border: { top: true, width: 1, color: borderColor(theme, "primary") }, - text: text(theme, "sans", "primary", { size: "sm" }), + text: text(theme, "sans", "secondary", { size: "sm" }), hover: { - text: text(theme, "sans", "primary", { size: "sm", underline: true }), + text: text(theme, "sans", "active", { size: "sm" }), }, }, }; From 5bf9db2e2138ad2c7a7477136eb9ba3b33d5a903 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Tue, 19 Jul 2022 17:13:40 -0400 Subject: [PATCH 14/22] Fix incorrectly named icons --- assets/icons/{backspace _12.svg => delete_12.svg} | 0 assets/icons/{backspace _16.svg => delete_16.svg} | 0 assets/icons/{backspace _8.svg => delete_8.svg} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename assets/icons/{backspace _12.svg => delete_12.svg} (100%) rename assets/icons/{backspace _16.svg => delete_16.svg} (100%) rename assets/icons/{backspace _8.svg => delete_8.svg} (100%) diff --git a/assets/icons/backspace _12.svg b/assets/icons/delete_12.svg similarity index 100% rename from assets/icons/backspace _12.svg rename to assets/icons/delete_12.svg diff --git a/assets/icons/backspace _16.svg b/assets/icons/delete_16.svg similarity index 100% rename from assets/icons/backspace _16.svg rename to assets/icons/delete_16.svg diff --git a/assets/icons/backspace _8.svg b/assets/icons/delete_8.svg similarity index 100% rename from assets/icons/backspace _8.svg rename to assets/icons/delete_8.svg From df0023ad655fe5f4c50b3fb56245bdafd0e22cc0 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Tue, 19 Jul 2022 20:09:28 -0400 Subject: [PATCH 15/22] Update package-lock.json --- styles/package-lock.json | 1 + 1 file changed, 1 insertion(+) diff --git a/styles/package-lock.json b/styles/package-lock.json index 5499f1852c..582f1c8496 100644 --- a/styles/package-lock.json +++ b/styles/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "styles", "version": "1.0.0", "license": "ISC", "dependencies": { From 55dee53e805c68e022e2ce1abb9a36d767a2e2c4 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Tue, 19 Jul 2022 20:12:50 -0400 Subject: [PATCH 16/22] Regenerate package-lock.json --- styles/package-lock.json | 208 +++------------------------------------ 1 file changed, 16 insertions(+), 192 deletions(-) diff --git a/styles/package-lock.json b/styles/package-lock.json index 433457fb58..582f1c8496 100644 --- a/styles/package-lock.json +++ b/styles/package-lock.json @@ -1,196 +1,20 @@ { - "name": "styles", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "styles", - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "@types/chroma-js": "^2.1.3", - "@types/node": "^17.0.23", - "case-anything": "^2.1.10", - "chroma-js": "^2.4.2", - "ts-node": "^10.7.0" - } - }, - "node_modules/@cspotcode/source-map-consumer": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", - "engines": { - "node": ">= 12" - } - }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", - "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", - "dependencies": { - "@cspotcode/source-map-consumer": "0.8.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@tsconfig/node10": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", - "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==" - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", - "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==" - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", - "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==" - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", - "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==" - }, - "node_modules/@types/chroma-js": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@types/chroma-js/-/chroma-js-2.1.3.tgz", - "integrity": "sha512-1xGPhoSGY1CPmXLCBcjVZSQinFjL26vlR8ZqprsBWiFyED4JacJJ9zHhh5aaUXqbY9B37mKQ73nlydVAXmr1+g==" - }, - "node_modules/@types/node": { - "version": "17.0.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz", - "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==" - }, - "node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" - }, - "node_modules/case-anything": { - "version": "2.1.10", - "resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.10.tgz", - "integrity": "sha512-JczJwVrCP0jPKh05McyVsuOg6AYosrB9XWZKbQzXeDAm2ClE/PJE/BcrrQrVyGYH7Jg8V/LDupmyL4kFlVsVFQ==", - "engines": { - "node": ">=12.13" - }, - "funding": { - "url": "https://github.com/sponsors/mesqueeb" - } - }, - "node_modules/chroma-js": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chroma-js/-/chroma-js-2.4.2.tgz", - "integrity": "sha512-U9eDw6+wt7V8z5NncY2jJfZa+hUH8XEj8FQHgFJTrUFnJfXYf4Ml4adI2vXZOjqRDpFWtYVWypDfZwnJ+HIR4A==" - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" - }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" - }, - "node_modules/ts-node": { - "version": "10.7.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz", - "integrity": "sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==", - "dependencies": { - "@cspotcode/source-map-support": "0.7.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.0", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/typescript": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", - "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz", - "integrity": "sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==" - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "engines": { - "node": ">=6" - } - } + "name": "styles", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "styles", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@types/chroma-js": "^2.1.3", + "@types/node": "^17.0.23", + "case-anything": "^2.1.10", + "chroma-js": "^2.4.2", + "ts-node": "^10.7.0" + } }, "node_modules/@cspotcode/source-map-consumer": { "version": "0.8.0", From 1cfaac1bc57928c7c49369ae98fada907f638b40 Mon Sep 17 00:00:00 2001 From: K Simmons Date: Mon, 18 Jul 2022 13:33:55 -0700 Subject: [PATCH 17/22] Fix clipping when dragging the mouse with vim-mode enabled and adjust single line editor selections --- crates/editor/src/element.rs | 10 +++++----- crates/gpui/src/text_layout.rs | 2 ++ crates/vim/src/editor_events.rs | 15 ++++++++------- crates/vim/src/insert.rs | 2 +- crates/vim/src/normal.rs | 10 +++++----- crates/vim/src/normal/change.rs | 4 ++-- crates/vim/src/vim.rs | 26 ++++++++------------------ crates/vim/src/vim_test_context.rs | 2 +- crates/vim/src/visual.rs | 8 ++++---- 9 files changed, 36 insertions(+), 43 deletions(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 013de1e7df..63c7e0c69a 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -1643,12 +1643,12 @@ impl PaintState { } else { 0 }; - let column_overshoot = (0f32.max(x - line.width()) / layout.em_advance) as u32; - ( - DisplayPoint::new(row, column), - DisplayPoint::new(row_overshoot, column_overshoot), - ) + let point = snapshot.clip_point(DisplayPoint::new(row, column), Bias::Left); + let mut column_overshoot = (0f32.max(x - line.width()) / layout.em_advance) as u32; + column_overshoot = column_overshoot + column - point.column(); + + (point, DisplayPoint::new(row_overshoot, column_overshoot)) } } diff --git a/crates/gpui/src/text_layout.rs b/crates/gpui/src/text_layout.rs index 50f16cb995..5a256d271a 100644 --- a/crates/gpui/src/text_layout.rs +++ b/crates/gpui/src/text_layout.rs @@ -238,6 +238,8 @@ impl Line { None } + // If round_to_closest, find the closest index to the given x position + // If !round_to_closest, find the largest index before the given x position pub fn index_for_x(&self, x: f32) -> Option { if x >= self.layout.width { None diff --git a/crates/vim/src/editor_events.rs b/crates/vim/src/editor_events.rs index c68e5182b0..7b777a50ed 100644 --- a/crates/vim/src/editor_events.rs +++ b/crates/vim/src/editor_events.rs @@ -34,12 +34,13 @@ fn editor_focused(EditorFocused(editor): &EditorFocused, cx: &mut MutableAppCont } let editor = editor.read(cx); - if editor.selections.newest::(cx).is_empty() { - if editor.mode() != EditorMode::Full { - vim.switch_mode(Mode::Insert, cx); - } - } else { - vim.switch_mode(Mode::Visual { line: false }, cx); + let editor_mode = editor.mode(); + let newest_selection_empty = editor.selections.newest::(cx).is_empty(); + + if editor_mode != EditorMode::Full { + vim.switch_mode(Mode::Insert, true, cx); + } else if !newest_selection_empty { + vim.switch_mode(Mode::Visual { line: false }, true, cx); } }); } @@ -69,7 +70,7 @@ fn editor_released(EditorReleased(editor): &EditorReleased, cx: &mut MutableAppC fn editor_local_selections_changed(newest_empty: bool, cx: &mut MutableAppContext) { Vim::update(cx, |vim, cx| { if vim.enabled && vim.state.mode == Mode::Normal && !newest_empty { - vim.switch_mode(Mode::Visual { line: false }, cx) + vim.switch_mode(Mode::Visual { line: false }, false, cx) } }) } diff --git a/crates/vim/src/insert.rs b/crates/vim/src/insert.rs index 1e19b7d918..b8387e7165 100644 --- a/crates/vim/src/insert.rs +++ b/crates/vim/src/insert.rs @@ -20,7 +20,7 @@ fn normal_before(_: &mut Workspace, _: &NormalBefore, cx: &mut ViewContext) { Vim::update(cx, |vim, cx| { - vim.switch_mode(Mode::Insert, cx); + vim.switch_mode(Mode::Insert, false, cx); vim.update_active_editor(cx, |editor, cx| { editor.change_selections(Some(Autoscroll::Fit), cx, |s| { s.move_cursors_with(|map, cursor, goal| { @@ -108,7 +108,7 @@ fn insert_first_non_whitespace( cx: &mut ViewContext, ) { Vim::update(cx, |vim, cx| { - vim.switch_mode(Mode::Insert, cx); + vim.switch_mode(Mode::Insert, false, cx); vim.update_active_editor(cx, |editor, cx| { editor.change_selections(Some(Autoscroll::Fit), cx, |s| { s.move_cursors_with(|map, cursor, goal| { @@ -121,7 +121,7 @@ fn insert_first_non_whitespace( fn insert_end_of_line(_: &mut Workspace, _: &InsertEndOfLine, cx: &mut ViewContext) { Vim::update(cx, |vim, cx| { - vim.switch_mode(Mode::Insert, cx); + vim.switch_mode(Mode::Insert, false, cx); vim.update_active_editor(cx, |editor, cx| { editor.change_selections(Some(Autoscroll::Fit), cx, |s| { s.move_cursors_with(|map, cursor, goal| { @@ -134,7 +134,7 @@ fn insert_end_of_line(_: &mut Workspace, _: &InsertEndOfLine, cx: &mut ViewConte fn insert_line_above(_: &mut Workspace, _: &InsertLineAbove, cx: &mut ViewContext) { Vim::update(cx, |vim, cx| { - vim.switch_mode(Mode::Insert, cx); + vim.switch_mode(Mode::Insert, false, cx); vim.update_active_editor(cx, |editor, cx| { editor.transact(cx, |editor, cx| { let (map, old_selections) = editor.selections.all_display(cx); @@ -166,7 +166,7 @@ fn insert_line_above(_: &mut Workspace, _: &InsertLineAbove, cx: &mut ViewContex fn insert_line_below(_: &mut Workspace, _: &InsertLineBelow, cx: &mut ViewContext) { Vim::update(cx, |vim, cx| { - vim.switch_mode(Mode::Insert, cx); + vim.switch_mode(Mode::Insert, false, cx); vim.update_active_editor(cx, |editor, cx| { editor.transact(cx, |editor, cx| { let (map, old_selections) = editor.selections.all_display(cx); diff --git a/crates/vim/src/normal/change.rs b/crates/vim/src/normal/change.rs index 9f526744d0..55445c930e 100644 --- a/crates/vim/src/normal/change.rs +++ b/crates/vim/src/normal/change.rs @@ -31,7 +31,7 @@ pub fn change_over(vim: &mut Vim, motion: Motion, cx: &mut MutableAppContext) { editor.insert(&"", cx); }); }); - vim.switch_mode(Mode::Insert, cx) + vim.switch_mode(Mode::Insert, false, cx) } // From the docs https://vimhelp.org/change.txt.html#cw @@ -70,7 +70,7 @@ fn change_word( editor.insert(&"", cx); }); }); - vim.switch_mode(Mode::Insert, cx); + vim.switch_mode(Mode::Insert, false, cx); }); } diff --git a/crates/vim/src/vim.rs b/crates/vim/src/vim.rs index 5655e51e29..b90dd4fcec 100644 --- a/crates/vim/src/vim.rs +++ b/crates/vim/src/vim.rs @@ -36,7 +36,7 @@ pub fn init(cx: &mut MutableAppContext) { // Vim Actions cx.add_action(|_: &mut Workspace, &SwitchMode(mode): &SwitchMode, cx| { - Vim::update(cx, |vim, cx| vim.switch_mode(mode, cx)) + Vim::update(cx, |vim, cx| vim.switch_mode(mode, false, cx)) }); cx.add_action( |_: &mut Workspace, &PushOperator(operator): &PushOperator, cx| { @@ -62,7 +62,7 @@ pub fn init(cx: &mut MutableAppContext) { if vim.state.mode != Mode::Normal || vim.active_operator().is_some() { MutableAppContext::defer(cx, |cx| { Vim::update(cx, |state, cx| { - state.switch_mode(Mode::Normal, cx); + state.switch_mode(Mode::Normal, false, cx); }); }); } else { @@ -115,37 +115,27 @@ impl Vim { .map(|ae| ae.update(cx, update)) } - fn switch_mode(&mut self, mode: Mode, cx: &mut MutableAppContext) { - let previous_mode = self.state.mode; + fn switch_mode(&mut self, mode: Mode, leave_selections: bool, cx: &mut MutableAppContext) { self.state.mode = mode; self.state.operator_stack.clear(); // Sync editor settings like clip mode self.sync_vim_settings(cx); + if leave_selections { + return; + } + // Adjust selections for editor in self.editors.values() { if let Some(editor) = editor.upgrade(cx) { editor.update(cx, |editor, cx| { editor.change_selections(None, cx, |s| { s.move_with(|map, selection| { - // If empty selections if self.state.empty_selections_only() { let new_head = map.clip_point(selection.head(), Bias::Left); selection.collapse_to(new_head, selection.goal) } else { - if matches!(mode, Mode::Visual { line: false }) - && !matches!(previous_mode, Mode::Visual { .. }) - && !selection.reversed - && !selection.is_empty() - { - // Mode wasn't visual mode before, but is now. We need to move the end - // back by one character so that the region to be modifed stays the same - *selection.end.column_mut() = - selection.end.column().saturating_sub(1); - selection.end = map.clip_point(selection.end, Bias::Left); - } - selection.set_head( map.clip_point(selection.head(), Bias::Left), selection.goal, @@ -183,7 +173,7 @@ impl Vim { self.enabled = enabled; self.state = Default::default(); if enabled { - self.switch_mode(Mode::Normal, cx); + self.switch_mode(Mode::Normal, false, cx); } self.sync_vim_settings(cx); } diff --git a/crates/vim/src/vim_test_context.rs b/crates/vim/src/vim_test_context.rs index e13f9fda51..dff0aaf375 100644 --- a/crates/vim/src/vim_test_context.rs +++ b/crates/vim/src/vim_test_context.rs @@ -119,7 +119,7 @@ impl<'a> VimTestContext<'a> { pub fn set_state(&mut self, text: &str, mode: Mode) { self.cx.update(|cx| { Vim::update(cx, |vim, cx| { - vim.switch_mode(mode, cx); + vim.switch_mode(mode, false, cx); }) }); self.cx.set_state(text); diff --git a/crates/vim/src/visual.rs b/crates/vim/src/visual.rs index 7028f00e92..fedb999cad 100644 --- a/crates/vim/src/visual.rs +++ b/crates/vim/src/visual.rs @@ -89,7 +89,7 @@ pub fn change(_: &mut Workspace, _: &VisualChange, cx: &mut ViewContext) }); }); }); - vim.switch_mode(Mode::Normal, cx); + vim.switch_mode(Mode::Normal, false, cx); }); } @@ -266,7 +266,7 @@ pub fn paste(_: &mut Workspace, _: &VisualPaste, cx: &mut ViewContext } }); }); - vim.switch_mode(Mode::Normal, cx); + vim.switch_mode(Mode::Normal, false, cx); }); } From a77cf914ec4f763a5a9f2e17c46b0f1a1aa914b1 Mon Sep 17 00:00:00 2001 From: K Simmons Date: Tue, 19 Jul 2022 17:17:54 -0700 Subject: [PATCH 18/22] Fix failing test re mode switch in buffer search --- crates/vim/src/vim.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/vim/src/vim.rs b/crates/vim/src/vim.rs index b90dd4fcec..56e2e599d8 100644 --- a/crates/vim/src/vim.rs +++ b/crates/vim/src/vim.rs @@ -266,7 +266,7 @@ mod test { } #[gpui::test] - async fn test_buffer_search_switches_mode(cx: &mut gpui::TestAppContext) { + async fn test_buffer_search(cx: &mut gpui::TestAppContext) { let mut cx = VimTestContext::new(cx, true).await; cx.set_state( @@ -278,7 +278,8 @@ mod test { ); cx.simulate_keystroke("/"); - assert_eq!(cx.mode(), Mode::Visual { line: false }); + // We now use a weird insert mode with selection when jumping to a single line editor + assert_eq!(cx.mode(), Mode::Insert); let search_bar = cx.workspace(|workspace, cx| { workspace From 225055ed5d7b6aa6fc736f4d1a8779e7ecc83275 Mon Sep 17 00:00:00 2001 From: K Simmons Date: Wed, 20 Jul 2022 18:52:32 -0700 Subject: [PATCH 19/22] Address some issues where panes don't get focused properly, make the focused pane more obvious, and prevent splitting of the pane with no items --- crates/context_menu/src/context_menu.rs | 4 +- crates/editor/src/editor.rs | 6 +- crates/editor/src/link_go_to_definition.rs | 11 +- crates/editor/src/mouse_context_menu.rs | 7 +- .../gpui/src/elements/mouse_event_handler.rs | 4 +- crates/picker/src/picker.rs | 2 +- crates/project_panel/src/project_panel.rs | 4 +- crates/search/src/project_search.rs | 23 ++-- crates/theme/src/theme.rs | 6 +- crates/workspace/src/pane.rs | 102 ++++++++++++------ crates/workspace/src/sidebar.rs | 2 +- crates/workspace/src/workspace.rs | 24 +++-- styles/src/styleTree/workspace.ts | 29 +++-- 13 files changed, 154 insertions(+), 70 deletions(-) diff --git a/crates/context_menu/src/context_menu.rs b/crates/context_menu/src/context_menu.rs index 7bfe3bb2e8..53f6bfe587 100644 --- a/crates/context_menu/src/context_menu.rs +++ b/crates/context_menu/src/context_menu.rs @@ -355,7 +355,7 @@ impl ContextMenu { .with_style(style.container) .boxed() }) - .on_mouse_down_out(MouseButton::Left, |_, cx| cx.dispatch_action(Cancel)) - .on_mouse_down_out(MouseButton::Right, |_, cx| cx.dispatch_action(Cancel)) + .on_down_out(MouseButton::Left, |_, cx| cx.dispatch_action(Cancel)) + .on_down_out(MouseButton::Right, |_, cx| cx.dispatch_action(Cancel)) } } diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 47501192b0..c814a508a9 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -707,7 +707,7 @@ impl CompletionsMenu { }, ) .with_cursor_style(CursorStyle::PointingHand) - .on_mouse_down(MouseButton::Left, move |_, cx| { + .on_down(MouseButton::Left, move |_, cx| { cx.dispatch_action(ConfirmCompletion { item_ix: Some(item_ix), }); @@ -840,7 +840,7 @@ impl CodeActionsMenu { .boxed() }) .with_cursor_style(CursorStyle::PointingHand) - .on_mouse_down(MouseButton::Left, move |_, cx| { + .on_down(MouseButton::Left, move |_, cx| { cx.dispatch_action(ConfirmCodeAction { item_ix: Some(item_ix), }); @@ -2674,7 +2674,7 @@ impl Editor { }) .with_cursor_style(CursorStyle::PointingHand) .with_padding(Padding::uniform(3.)) - .on_mouse_down(MouseButton::Left, |_, cx| { + .on_down(MouseButton::Left, |_, cx| { cx.dispatch_action(ToggleCodeActions { deployed_from_indicator: true, }); diff --git a/crates/editor/src/link_go_to_definition.rs b/crates/editor/src/link_go_to_definition.rs index f034df64b6..32dae4ecee 100644 --- a/crates/editor/src/link_go_to_definition.rs +++ b/crates/editor/src/link_go_to_definition.rs @@ -7,7 +7,9 @@ use settings::Settings; use util::TryFutureExt; use workspace::Workspace; -use crate::{Anchor, DisplayPoint, Editor, EditorSnapshot, GoToDefinition, Select, SelectPhase}; +use crate::{ + Anchor, DisplayPoint, Editor, EditorSnapshot, Event, GoToDefinition, Select, SelectPhase, +}; #[derive(Clone, PartialEq)] pub struct UpdateGoToDefinitionLink { @@ -276,6 +278,13 @@ pub fn go_to_fetched_definition( }); if !definitions.is_empty() { + editor_handle.update(cx, |editor, cx| { + if !editor.focused { + cx.focus_self(); + cx.emit(Event::Activate); + } + }); + Editor::navigate_to_definitions(workspace, editor_handle, definitions, cx); } else { editor_handle.update(cx, |editor, cx| { diff --git a/crates/editor/src/mouse_context_menu.rs b/crates/editor/src/mouse_context_menu.rs index f30bc0a678..ce2faf8fa6 100644 --- a/crates/editor/src/mouse_context_menu.rs +++ b/crates/editor/src/mouse_context_menu.rs @@ -2,7 +2,7 @@ use context_menu::ContextMenuItem; use gpui::{geometry::vector::Vector2F, impl_internal_actions, MutableAppContext, ViewContext}; use crate::{ - DisplayPoint, Editor, EditorMode, FindAllReferences, GoToDefinition, Rename, SelectMode, + DisplayPoint, Editor, EditorMode, Event, FindAllReferences, GoToDefinition, Rename, SelectMode, ToggleCodeActions, }; @@ -23,6 +23,11 @@ pub fn deploy_context_menu( &DeployMouseContextMenu { position, point }: &DeployMouseContextMenu, cx: &mut ViewContext, ) { + if !editor.focused { + cx.focus_self(); + cx.emit(Event::Activate); + } + // Don't show context menu for inline editors if editor.mode() != EditorMode::Full { return; diff --git a/crates/gpui/src/elements/mouse_event_handler.rs b/crates/gpui/src/elements/mouse_event_handler.rs index 40c35b80bc..14ebb20de9 100644 --- a/crates/gpui/src/elements/mouse_event_handler.rs +++ b/crates/gpui/src/elements/mouse_event_handler.rs @@ -43,7 +43,7 @@ impl MouseEventHandler { self } - pub fn on_mouse_down( + pub fn on_down( mut self, button: MouseButton, handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, @@ -61,7 +61,7 @@ impl MouseEventHandler { self } - pub fn on_mouse_down_out( + pub fn on_down_out( mut self, button: MouseButton, handler: impl Fn(MouseButtonEvent, &mut EventContext) + 'static, diff --git a/crates/picker/src/picker.rs b/crates/picker/src/picker.rs index 0b30583053..6f247ebb6e 100644 --- a/crates/picker/src/picker.rs +++ b/crates/picker/src/picker.rs @@ -90,7 +90,7 @@ impl View for Picker { .read(cx) .render_match(ix, state, ix == selected_ix, cx) }) - .on_mouse_down(MouseButton::Left, move |_, cx| { + .on_down(MouseButton::Left, move |_, cx| { cx.dispatch_action(SelectIndex(ix)) }) .with_cursor_style(CursorStyle::PointingHand) diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs index fbd8c0631f..792d970fcd 100644 --- a/crates/project_panel/src/project_panel.rs +++ b/crates/project_panel/src/project_panel.rs @@ -1082,7 +1082,7 @@ impl ProjectPanel { } }, ) - .on_mouse_down( + .on_down( MouseButton::Right, move |MouseButtonEvent { position, .. }, cx| { cx.dispatch_action(DeployContextMenu { entry_id, position }) @@ -1134,7 +1134,7 @@ impl View for ProjectPanel { .expanded() .boxed() }) - .on_mouse_down( + .on_down( MouseButton::Right, move |MouseButtonEvent { position, .. }, cx| { // When deploying the context menu anywhere below the last project entry, diff --git a/crates/search/src/project_search.rs b/crates/search/src/project_search.rs index 6d23042280..0becd0d184 100644 --- a/crates/search/src/project_search.rs +++ b/crates/search/src/project_search.rs @@ -147,6 +147,7 @@ impl ProjectSearch { pub enum ViewEvent { UpdateTab, + Activate, EditorEvent(editor::Event), } @@ -162,7 +163,9 @@ impl View for ProjectSearchView { fn render(&mut self, cx: &mut RenderContext) -> ElementBox { let model = &self.model.read(cx); if model.match_ranges.is_empty() { - let theme = &cx.global::().theme; + enum Status {} + + let theme = cx.global::().theme.clone(); let text = if self.query_editor.read(cx).text(cx).is_empty() { "" } else if model.pending_search.is_some() { @@ -170,12 +173,18 @@ impl View for ProjectSearchView { } else { "No results" }; - Label::new(text.to_string(), theme.search.results_status.clone()) - .aligned() - .contained() - .with_background_color(theme.editor.background) - .flex(1., true) - .boxed() + MouseEventHandler::new::(0, cx, |_, _| { + Label::new(text.to_string(), theme.search.results_status.clone()) + .aligned() + .contained() + .with_background_color(theme.editor.background) + .flex(1., true) + .boxed() + }) + .on_down(MouseButton::Left, |_, cx| { + cx.focus_parent_view(); + }) + .boxed() } else { ChildView::new(&self.results_editor).flex(1., true).boxed() } diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rs index 2299bc3477..8c6a696d08 100644 --- a/crates/theme/src/theme.rs +++ b/crates/theme/src/theme.rs @@ -38,8 +38,10 @@ pub struct Theme { pub struct Workspace { pub background: Color, pub titlebar: Titlebar, - pub tab: Tab, - pub active_tab: Tab, + pub focused_active_tab: Tab, + pub focused_inactive_tab: Tab, + pub unfocused_active_tab: Tab, + pub unfocused_inactive_tab: Tab, pub pane_button: Interactive, pub pane_divider: Border, pub leader_border_opacity: f32, diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 4b1a57621c..f3aeb94f16 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -1,5 +1,5 @@ use super::{ItemHandle, SplitDirection}; -use crate::{toolbar::Toolbar, Item, WeakItemHandle, Workspace}; +use crate::{toolbar::Toolbar, Item, NewFile, WeakItemHandle, Workspace}; use anyhow::Result; use collections::{HashMap, HashSet, VecDeque}; use context_menu::{ContextMenu, ContextMenuItem}; @@ -136,6 +136,7 @@ pub enum Event { pub struct Pane { items: Vec>, + is_active: bool, active_item_index: usize, autoscroll: bool, nav_history: Rc>, @@ -184,6 +185,7 @@ impl Pane { let split_menu = cx.add_view(|cx| ContextMenu::new(cx)); Self { items: Vec::new(), + is_active: true, active_item_index: 0, autoscroll: false, nav_history: Rc::new(RefCell::new(NavHistory { @@ -199,6 +201,11 @@ impl Pane { } } + pub fn set_active(&mut self, is_active: bool, cx: &mut ViewContext) { + self.is_active = is_active; + cx.notify(); + } + pub fn nav_history_for_item(&self, item: &ViewHandle) -> ItemNavHistory { ItemNavHistory { history: self.nav_history.clone(), @@ -865,26 +872,23 @@ impl Pane { None }; + let is_pane_active = self.is_active; let mut row = Flex::row().scrollable::(1, autoscroll, cx); for (ix, (item, detail)) in self.items.iter().zip(self.tab_details(cx)).enumerate() { let detail = if detail == 0 { None } else { Some(detail) }; - let is_active = ix == self.active_item_index; + let is_tab_active = ix == self.active_item_index; row.add_child({ - let tab_style = if is_active { - theme.workspace.active_tab.clone() - } else { - theme.workspace.tab.clone() + let mut tab_style = match (is_pane_active, is_tab_active) { + (true, true) => theme.workspace.focused_active_tab.clone(), + (true, false) => theme.workspace.focused_inactive_tab.clone(), + (false, true) => theme.workspace.unfocused_active_tab.clone(), + (false, false) => theme.workspace.unfocused_inactive_tab.clone(), }; let title = item.tab_content(detail, &tab_style, cx); - let mut style = if is_active { - theme.workspace.active_tab.clone() - } else { - theme.workspace.tab.clone() - }; if ix == 0 { - style.container.border.left = false; + tab_style.container.border.left = false; } MouseEventHandler::new::(ix, cx, |_, cx| { @@ -894,9 +898,9 @@ impl Pane { Align::new({ let diameter = 7.0; let icon_color = if item.has_conflict(cx) { - Some(style.icon_conflict) + Some(tab_style.icon_conflict) } else if item.is_dirty(cx) { - Some(style.icon_dirty) + Some(tab_style.icon_dirty) } else { None }; @@ -928,8 +932,8 @@ impl Pane { Container::new(Align::new(title).boxed()) .with_style(ContainerStyle { margin: Margin { - left: style.spacing, - right: style.spacing, + left: tab_style.spacing, + right: tab_style.spacing, ..Default::default() }, ..Default::default() @@ -947,10 +951,11 @@ impl Pane { cx, |mouse_state, _| { if mouse_state.hovered { - icon.with_color(style.icon_close_active) + icon.with_color(tab_style.icon_close_active) .boxed() } else { - icon.with_color(style.icon_close).boxed() + icon.with_color(tab_style.icon_close) + .boxed() } }, ) @@ -969,27 +974,39 @@ impl Pane { } else { Empty::new().boxed() }) - .with_width(style.icon_width) + .with_width(tab_style.icon_width) .boxed(), ) .boxed(), ) .boxed(), ) - .with_style(style.container) + .with_style(tab_style.container) .boxed() }) - .on_mouse_down(MouseButton::Left, move |_, cx| { + .with_cursor_style(if is_tab_active && is_pane_active { + CursorStyle::Arrow + } else { + CursorStyle::PointingHand + }) + .on_down(MouseButton::Left, move |_, cx| { cx.dispatch_action(ActivateItem(ix)); }) .boxed() }) } + let filler_style = if is_pane_active { + &theme.workspace.focused_inactive_tab + } else { + &theme.workspace.unfocused_inactive_tab + }; + row.add_child( Empty::new() .contained() - .with_border(theme.workspace.tab.container.border) + .with_style(filler_style.container) + .with_border(theme.workspace.focused_active_tab.container.border) .flex(0., true) .named("filler"), ); @@ -1054,10 +1071,12 @@ impl View for Pane { .with_child( EventHandler::new(if let Some(active_item) = self.active_item() { Flex::column() - .with_child( - Flex::row() - .with_child(self.render_tabs(cx).flex(1., true).named("tabs")) - .with_child( + .with_child({ + let mut tab_row = Flex::row() + .with_child(self.render_tabs(cx).flex(1., true).named("tabs")); + + if self.is_active { + tab_row.add_child( MouseEventHandler::new::( 0, cx, @@ -1080,7 +1099,7 @@ impl View for Pane { }, ) .with_cursor_style(CursorStyle::PointingHand) - .on_mouse_down( + .on_down( MouseButton::Left, |MouseButtonEvent { position, .. }, cx| { cx.dispatch_action(DeploySplitMenu { position }); @@ -1088,15 +1107,36 @@ impl View for Pane { ) .boxed(), ) + } + + tab_row .constrained() - .with_height(cx.global::().theme.workspace.tab.height) - .boxed(), - ) + .with_height( + cx.global::() + .theme + .workspace + .focused_active_tab + .height, + ) + .boxed() + }) .with_child(ChildView::new(&self.toolbar).boxed()) .with_child(ChildView::new(active_item).flex(1., true).boxed()) .boxed() } else { - Empty::new().boxed() + enum EmptyPane {} + let theme = cx.global::().theme.clone(); + + MouseEventHandler::new::(0, cx, |_, _| { + Empty::new() + .contained() + .with_background_color(theme.editor.background) + .boxed() + }) + .on_down(MouseButton::Left, |_, cx| { + cx.focus_parent_view(); + }) + .boxed() }) .on_navigate_mouse_down(move |direction, cx| { let this = this.clone(); diff --git a/crates/workspace/src/sidebar.rs b/crates/workspace/src/sidebar.rs index cd4a009f2c..542cd51cb6 100644 --- a/crates/workspace/src/sidebar.rs +++ b/crates/workspace/src/sidebar.rs @@ -187,7 +187,7 @@ impl Sidebar { ..Default::default() }) .with_cursor_style(CursorStyle::ResizeLeftRight) - .on_mouse_down(MouseButton::Left, |_, _| {}) // This prevents the mouse down event from being propagated elsewhere + .on_down(MouseButton::Left, |_, _| {}) // This prevents the mouse down event from being propagated elsewhere .on_drag( MouseButton::Left, move |old_position, diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index 8462967da5..cf535a5a31 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -1566,7 +1566,11 @@ impl Workspace { fn activate_pane(&mut self, pane: ViewHandle, cx: &mut ViewContext) { if self.active_pane != pane { + self.active_pane + .update(cx, |pane, cx| pane.set_active(false, cx)); self.active_pane = pane.clone(); + self.active_pane + .update(cx, |pane, cx| pane.set_active(true, cx)); self.status_bar.update(cx, |status_bar, cx| { status_bar.set_active_pane(&self.active_pane, cx); }); @@ -1629,17 +1633,17 @@ impl Workspace { pane: ViewHandle, direction: SplitDirection, cx: &mut ViewContext, - ) -> ViewHandle { - let new_pane = self.add_pane(cx); - self.activate_pane(new_pane.clone(), cx); - if let Some(item) = pane.read(cx).active_item() { + ) -> Option> { + pane.read(cx).active_item().map(|item| { + let new_pane = self.add_pane(cx); + self.activate_pane(new_pane.clone(), cx); if let Some(clone) = item.clone_on_split(cx.as_mut()) { Pane::add_item(self, new_pane.clone(), clone, true, true, cx); } - } - self.center.split(&pane, &new_pane, direction).unwrap(); - cx.notify(); - new_pane + self.center.split(&pane, &new_pane, direction).unwrap(); + cx.notify(); + new_pane + }) } fn remove_pane(&mut self, pane: ViewHandle, cx: &mut ViewContext) { @@ -3045,7 +3049,9 @@ mod tests { // multi-entry items: (3, 4) let left_pane = workspace.update(cx, |workspace, cx| { let left_pane = workspace.active_pane().clone(); - let right_pane = workspace.split_pane(left_pane.clone(), SplitDirection::Right, cx); + let right_pane = workspace + .split_pane(left_pane.clone(), SplitDirection::Right, cx) + .unwrap(); workspace.activate_pane(left_pane.clone(), cx); workspace.add_item(Box::new(cx.add_view(|_| item_2_3.clone())), cx); diff --git a/styles/src/styleTree/workspace.ts b/styles/src/styleTree/workspace.ts index f41e2e8b0b..4e88aded04 100644 --- a/styles/src/styleTree/workspace.ts +++ b/styles/src/styleTree/workspace.ts @@ -14,7 +14,7 @@ export function workspaceBackground(theme: Theme) { } export default function workspace(theme: Theme) { - const tab = { + const focusedInactiveTab = { height: 32, background: workspaceBackground(theme), iconClose: iconColor(theme, "muted"), @@ -39,16 +39,27 @@ export default function workspace(theme: Theme) { } }; - const activeTab = { - ...tab, + const focusedActiveTab = { + ...focusedInactiveTab, background: backgroundColor(theme, 500), text: text(theme, "sans", "active", { size: "sm" }), border: { - ...tab.border, + ...focusedInactiveTab.border, bottom: false, }, }; + const unfocusedInactiveTab = { + ...focusedInactiveTab, + background: backgroundColor(theme, 100), + text: text(theme, "sans", "placeholder", { size: "sm" }), + }; + + const unfocusedActiveTab = { + ...focusedInactiveTab, + text: text(theme, "sans", "placeholder", { size: "sm" }), + } + const titlebarPadding = 6; return { @@ -63,15 +74,17 @@ export default function workspace(theme: Theme) { }, leaderBorderOpacity: 0.7, leaderBorderWidth: 2.0, - tab, - activeTab, + focusedActiveTab, + focusedInactiveTab, + unfocusedActiveTab, + unfocusedInactiveTab, paneButton: { color: iconColor(theme, "secondary"), border: { - ...tab.border, + ...focusedActiveTab.border, }, iconWidth: 12, - buttonWidth: tab.height, + buttonWidth: focusedActiveTab.height, hover: { color: iconColor(theme, "active"), background: backgroundColor(theme, 300), From daceb1eb5fd6980e1c49bd0a9a2f27a69ab5a105 Mon Sep 17 00:00:00 2001 From: K Simmons Date: Wed, 20 Jul 2022 19:02:12 -0700 Subject: [PATCH 20/22] Fix warning --- crates/workspace/src/pane.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index f3aeb94f16..41869c2c24 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -1,5 +1,5 @@ use super::{ItemHandle, SplitDirection}; -use crate::{toolbar::Toolbar, Item, NewFile, WeakItemHandle, Workspace}; +use crate::{toolbar::Toolbar, Item, WeakItemHandle, Workspace}; use anyhow::Result; use collections::{HashMap, HashSet, VecDeque}; use context_menu::{ContextMenu, ContextMenuItem}; From fb2fbf2ac78cfce5699084b96006f1fbb01fde99 Mon Sep 17 00:00:00 2001 From: K Simmons Date: Wed, 20 Jul 2022 19:13:16 -0700 Subject: [PATCH 21/22] fix test failure --- crates/workspace/src/workspace.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index cf535a5a31..587ad09cb5 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -3049,18 +3049,17 @@ mod tests { // multi-entry items: (3, 4) let left_pane = workspace.update(cx, |workspace, cx| { let left_pane = workspace.active_pane().clone(); - let right_pane = workspace - .split_pane(left_pane.clone(), SplitDirection::Right, cx) - .unwrap(); - - workspace.activate_pane(left_pane.clone(), cx); workspace.add_item(Box::new(cx.add_view(|_| item_2_3.clone())), cx); for item in &single_entry_items { workspace.add_item(Box::new(cx.add_view(|_| item.clone())), cx); } + left_pane.update(cx, |pane, cx| { + pane.activate_item(2, true, true, false, cx); + }); - workspace.activate_pane(right_pane.clone(), cx); - workspace.add_item(Box::new(cx.add_view(|_| single_entry_items[1].clone())), cx); + workspace + .split_pane(left_pane.clone(), SplitDirection::Right, cx) + .unwrap(); workspace.add_item(Box::new(cx.add_view(|_| item_3_4.clone())), cx); left_pane From d6519ad2809ea2c562c9b9b0aaa935d588c08183 Mon Sep 17 00:00:00 2001 From: K Simmons Date: Thu, 21 Jul 2022 14:56:17 -0700 Subject: [PATCH 22/22] Minor naming improvements and revert empty pane background color change --- crates/theme/src/theme.rs | 8 ++++---- crates/workspace/src/drag_and_drop.rs | 0 crates/workspace/src/pane.rs | 18 ++++++++--------- styles/src/styleTree/workspace.ts | 28 +++++++++++++-------------- 4 files changed, 27 insertions(+), 27 deletions(-) create mode 100644 crates/workspace/src/drag_and_drop.rs diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rs index 8c6a696d08..540c5bfd6c 100644 --- a/crates/theme/src/theme.rs +++ b/crates/theme/src/theme.rs @@ -38,10 +38,10 @@ pub struct Theme { pub struct Workspace { pub background: Color, pub titlebar: Titlebar, - pub focused_active_tab: Tab, - pub focused_inactive_tab: Tab, - pub unfocused_active_tab: Tab, - pub unfocused_inactive_tab: Tab, + pub active_pane_active_tab: Tab, + pub active_pane_inactive_tab: Tab, + pub inactive_pane_active_tab: Tab, + pub inactive_pane_inactive_tab: Tab, pub pane_button: Interactive, pub pane_divider: Border, pub leader_border_opacity: f32, diff --git a/crates/workspace/src/drag_and_drop.rs b/crates/workspace/src/drag_and_drop.rs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 41869c2c24..c384748c3c 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -880,10 +880,10 @@ impl Pane { row.add_child({ let mut tab_style = match (is_pane_active, is_tab_active) { - (true, true) => theme.workspace.focused_active_tab.clone(), - (true, false) => theme.workspace.focused_inactive_tab.clone(), - (false, true) => theme.workspace.unfocused_active_tab.clone(), - (false, false) => theme.workspace.unfocused_inactive_tab.clone(), + (true, true) => theme.workspace.active_pane_active_tab.clone(), + (true, false) => theme.workspace.active_pane_inactive_tab.clone(), + (false, true) => theme.workspace.inactive_pane_active_tab.clone(), + (false, false) => theme.workspace.inactive_pane_inactive_tab.clone(), }; let title = item.tab_content(detail, &tab_style, cx); @@ -997,16 +997,16 @@ impl Pane { } let filler_style = if is_pane_active { - &theme.workspace.focused_inactive_tab + &theme.workspace.active_pane_inactive_tab } else { - &theme.workspace.unfocused_inactive_tab + &theme.workspace.inactive_pane_inactive_tab }; row.add_child( Empty::new() .contained() .with_style(filler_style.container) - .with_border(theme.workspace.focused_active_tab.container.border) + .with_border(theme.workspace.active_pane_active_tab.container.border) .flex(0., true) .named("filler"), ); @@ -1115,7 +1115,7 @@ impl View for Pane { cx.global::() .theme .workspace - .focused_active_tab + .active_pane_active_tab .height, ) .boxed() @@ -1130,7 +1130,7 @@ impl View for Pane { MouseEventHandler::new::(0, cx, |_, _| { Empty::new() .contained() - .with_background_color(theme.editor.background) + .with_background_color(theme.workspace.background) .boxed() }) .on_down(MouseButton::Left, |_, cx| { diff --git a/styles/src/styleTree/workspace.ts b/styles/src/styleTree/workspace.ts index 4e88aded04..c86dce7226 100644 --- a/styles/src/styleTree/workspace.ts +++ b/styles/src/styleTree/workspace.ts @@ -14,7 +14,7 @@ export function workspaceBackground(theme: Theme) { } export default function workspace(theme: Theme) { - const focusedInactiveTab = { + const activePaneInactiveTab = { height: 32, background: workspaceBackground(theme), iconClose: iconColor(theme, "muted"), @@ -39,24 +39,24 @@ export default function workspace(theme: Theme) { } }; - const focusedActiveTab = { - ...focusedInactiveTab, + const activePaneActiveTab = { + ...activePaneInactiveTab, background: backgroundColor(theme, 500), text: text(theme, "sans", "active", { size: "sm" }), border: { - ...focusedInactiveTab.border, + ...activePaneInactiveTab.border, bottom: false, }, }; - const unfocusedInactiveTab = { - ...focusedInactiveTab, + const inactivePaneInactiveTab = { + ...activePaneInactiveTab, background: backgroundColor(theme, 100), text: text(theme, "sans", "placeholder", { size: "sm" }), }; - const unfocusedActiveTab = { - ...focusedInactiveTab, + const inactivePaneActiveTab = { + ...activePaneInactiveTab, text: text(theme, "sans", "placeholder", { size: "sm" }), } @@ -74,17 +74,17 @@ export default function workspace(theme: Theme) { }, leaderBorderOpacity: 0.7, leaderBorderWidth: 2.0, - focusedActiveTab, - focusedInactiveTab, - unfocusedActiveTab, - unfocusedInactiveTab, + activePaneActiveTab, + activePaneInactiveTab, + inactivePaneActiveTab, + inactivePaneInactiveTab, paneButton: { color: iconColor(theme, "secondary"), border: { - ...focusedActiveTab.border, + ...activePaneActiveTab.border, }, iconWidth: 12, - buttonWidth: focusedActiveTab.height, + buttonWidth: activePaneActiveTab.height, hover: { color: iconColor(theme, "active"), background: backgroundColor(theme, 300),