From 30da985ac17754f9eb3024305e6eb0e68b750b05 Mon Sep 17 00:00:00 2001 From: Ren Amamiya Date: Fri, 23 Oct 2026 04:07:11 +0000 Subject: [PATCH] feat: adopt the native OS theme (#66) Reviewed-on: https://git.reya.info/reya/coop/pulls/66 --- Cargo.lock | 852 ++++++++++++++++-- Cargo.toml | 146 +-- assets/icons/a-large-small.svg | 3 + assets/icons/arrow-down.svg | 3 + assets/icons/arrow-up.svg | 3 + assets/icons/asterisk.svg | 1 + assets/icons/ban.svg | 15 +- assets/icons/battery-charging.svg | 1 + assets/icons/battery-full.svg | 1 + assets/icons/battery-low.svg | 1 + assets/icons/battery-medium.svg | 1 + assets/icons/battery-warning.svg | 1 + assets/icons/battery.svg | 1 + assets/icons/bell.svg | 1 + assets/icons/book-open.svg | 1 + assets/icons/boom.svg | 3 - assets/icons/bot.svg | 1 + assets/icons/building-2.svg | 1 + assets/icons/calendar.svg | 1 + assets/icons/caret-up.svg | 3 - assets/icons/case-sensitive.svg | 3 + assets/icons/chart-pie.svg | 3 + assets/icons/check.svg | 4 +- assets/icons/chevron-down.svg | 2 +- assets/icons/chevron-left.svg | 1 + assets/icons/chevron-right.svg | 1 + assets/icons/chevron-up.svg | 1 + assets/icons/chevrons-up-down.svg | 3 + assets/icons/circle-arrow-down.svg | 15 + assets/icons/circle-check.svg | 1 + .../{plus-circle.svg => circle-plus.svg} | 0 assets/icons/circle-user.svg | 1 + assets/icons/circle-x.svg | 1 + assets/icons/close-circle-fill.svg | 3 - assets/icons/close-circle.svg | 3 - assets/icons/copy.svg | 2 +- assets/icons/cpu.svg | 1 + assets/icons/dash.svg | 1 + assets/icons/delete.svg | 3 + assets/icons/device.svg | 3 - assets/icons/door-open.svg | 17 + assets/icons/edit.svg | 1 - assets/icons/ellipsis-vertical.svg | 1 + assets/icons/ellipsis.svg | 4 +- assets/icons/external-link.svg | 1 + assets/icons/eye-off.svg | 1 + assets/icons/eye.svg | 4 +- assets/icons/file.svg | 1 + assets/icons/filter.svg | 1 + assets/icons/fistbump-fill.svg | 3 - assets/icons/fistbump.svg | 3 - assets/icons/folder-closed.svg | 1 + assets/icons/folder-open.svg | 1 + assets/icons/folder.svg | 4 +- assets/icons/frame.svg | 1 + assets/icons/gallery-vertical-end.svg | 3 + assets/icons/git-branch.svg | 1 + assets/icons/git-clone.svg | 1 + assets/icons/git-commit.svg | 3 + assets/icons/git-file.svg | 3 + assets/icons/git-issue-close.svg | 1 + assets/icons/git-issue-done.svg | 3 + assets/icons/git-issue-ongoing.svg | 1 + assets/icons/git-issue-open.svg | 1 + assets/icons/git-pull-request-closed.svg | 1 + assets/icons/git-pull-request-draft.svg | 1 + assets/icons/git-pull-request-merged.svg | 1 + assets/icons/git-pull-request.svg | 1 + assets/icons/github.svg | 1 + assets/icons/global-on.svg | 1 + assets/icons/globe.svg | 1 + assets/icons/grid.svg | 3 + assets/icons/hard-drive.svg | 1 + assets/icons/hashtag.svg | 3 - assets/icons/heart-off.svg | 1 + assets/icons/heart.svg | 1 + assets/icons/inbox-fill.svg | 3 - assets/icons/inbox.svg | 4 +- assets/icons/info.svg | 4 +- assets/icons/init.svg | 3 + assets/icons/inspector.svg | 3 + assets/icons/layout-dashboard.svg | 1 + assets/icons/loader-circle.svg | 1 + assets/icons/loader.svg | 11 +- assets/icons/log-in.svg | 15 + assets/icons/log-out.svg | 15 + assets/icons/login.svg | 1 - assets/icons/logout.svg | 1 - assets/icons/map.svg | 1 + assets/icons/markdown.svg | 3 + assets/icons/maximize.svg | 1 + assets/icons/memory-stick.svg | 3 + assets/icons/menu.svg | 1 + assets/icons/message-square-plus.svg | 15 + assets/icons/message-square.svg | 13 + assets/icons/minimize.svg | 1 + assets/icons/minus.svg | 1 + assets/icons/moon.svg | 4 +- assets/icons/network.svg | 3 + assets/icons/palette.svg | 1 + assets/icons/panel-bottom-open.svg | 3 + assets/icons/panel-bottom.svg | 3 + assets/icons/panel-left-close.svg | 3 + assets/icons/panel-right-close.svg | 14 + assets/icons/panel-right-open.svg | 4 +- assets/icons/panel-right.svg | 4 +- assets/icons/pause.svg | 1 + assets/icons/play.svg | 1 + assets/icons/radio-tower.svg | 19 + assets/icons/{history.svg => recent.svg} | 0 assets/icons/redo-2.svg | 1 + assets/icons/redo.svg | 1 + assets/icons/replace.svg | 3 + assets/icons/reply.svg | 15 +- assets/icons/reset.svg | 3 - assets/icons/resize-corner.svg | 1 + assets/icons/scan.svg | 3 - assets/icons/send-horizontal.svg | 14 + assets/icons/settings-2.svg | 1 + assets/icons/share.svg | 3 + assets/icons/shield.svg | 3 - assets/icons/ship.svg | 3 - assets/icons/sort-ascending.svg | 1 + assets/icons/sort-descending.svg | 1 + assets/icons/square-pen.svg | 14 + assets/icons/square-terminal.svg | 1 + assets/icons/star-fill.svg | 3 + assets/icons/star-off.svg | 3 + assets/icons/star.svg | 1 + assets/icons/sticker.svg | 17 + assets/icons/sun.svg | 4 +- assets/icons/tag.svg | 1 + assets/icons/text-cursor-input.svg | 17 + assets/icons/thumbs-down.svg | 1 + assets/icons/thumbs-up.svg | 1 + assets/icons/trending.svg | 3 + assets/icons/triangle-alert.svg | 1 + assets/icons/undo-2.svg | 1 + assets/icons/undo.svg | 1 + assets/icons/unlock.svg | 1 + assets/icons/usb.svg | 3 - assets/icons/user-key.svg | 3 - assets/icons/user-round-plus.svg | 16 + assets/icons/user-round.svg | 14 + assets/icons/user.svg | 1 + assets/icons/users.svg | 16 + assets/icons/window-close.svg | 10 +- assets/icons/window-maximize.svg | 10 +- assets/icons/window-minimize.svg | 10 +- assets/icons/window-restore.svg | 11 +- assets/icons/x.svg | 14 + assets/icons/zoom.svg | 58 -- crates/assets/Cargo.toml | 1 + crates/assets/src/lib.rs | 26 +- crates/assets/tests/icons.rs | 39 + crates/chat/src/message.rs | 60 +- crates/chat_ui/Cargo.toml | 2 +- crates/chat_ui/src/lib.rs | 316 +++---- crates/chat_ui/src/text.rs | 63 -- crates/common/src/parser.rs | 56 ++ crates/nip29_ui/Cargo.toml | 2 +- crates/nip29_ui/src/details.rs | 36 +- crates/nip29_ui/src/invite.rs | 21 +- crates/nip29_ui/src/lib.rs | 201 ++--- crates/nip29_ui/src/message.rs | 147 ++- crates/nip29_ui/src/metadata.rs | 116 +-- crates/nip29_ui/src/util.rs | 13 +- crates/nip4e/Cargo.toml | 2 +- crates/nip4e/src/lib.rs | 50 +- crates/settings/Cargo.toml | 44 +- crates/settings/src/lib.rs | 52 +- crates/theme/Cargo.toml | 17 - crates/theme/src/appearance.rs | 151 ---- crates/theme/src/brand.rs | 298 ------ crates/theme/src/color.rs | 215 ----- crates/theme/src/colors.rs | 118 --- crates/theme/src/geometry.rs | 63 -- crates/theme/src/layout.rs | 87 -- crates/theme/src/lib.rs | 312 ------- crates/theme/src/notification.rs | 30 - crates/theme/src/paint.rs | 191 ---- crates/theme/src/palette.rs | 137 --- crates/theme/src/platform_kind.rs | 21 - crates/theme/src/scrollbar_mode.rs | 16 - crates/theme/src/syntax.rs | 176 ---- crates/theme/src/theme.rs | 42 - crates/theme/src/typography.rs | 131 --- crates/ui/Cargo.toml | 35 +- crates/ui/src/avatar.rs | 502 ++++------- crates/ui/src/button.rs | 581 ------------ crates/ui/src/dialog.rs | 394 -------- crates/ui/src/dock/mod.rs | 805 ----------------- crates/ui/src/dock/panel.rs | 205 ----- crates/ui/src/form.rs | 28 + crates/ui/src/group_box.rs | 126 --- crates/ui/src/icon.rs | 341 ++----- crates/ui/src/indicator.rs | 59 -- crates/ui/src/input/clear_button.rs | 15 - crates/ui/src/input/input.rs | 277 ------ crates/ui/src/input/mod.rs | 7 - crates/ui/src/kbd.rs | 270 ------ crates/ui/src/lib.rs | 57 +- crates/ui/src/menu/dropdown_menu.rs | 178 ---- crates/ui/src/menu/menu_item.rs | 121 --- crates/ui/src/menu/mod.rs | 12 - crates/ui/src/menu/popup_menu.rs | 839 ----------------- crates/ui/src/message.rs | 244 ++++- crates/ui/src/motion.rs | 668 -------------- crates/ui/src/nav_item.rs | 125 --- crates/ui/src/notification.rs | 594 ------------ crates/ui/src/popover.rs | 170 ---- crates/ui/src/resizable/mod.rs | 31 - crates/ui/src/root.rs | 430 --------- crates/ui/src/scroll/mod.rs | 4 - crates/ui/src/scroll/scrollable.rs | 93 -- crates/ui/src/styled.rs | 161 ---- crates/ui/src/switch.rs | 157 ---- crates/ui/src/tab/mod.rs | 224 ----- crates/ui/src/tab/tab_bar.rs | 161 ---- crates/ui/src/{markdown.rs => text.rs} | 99 +- crates/ui/src/tooltip.rs | 34 - crates/ui/src/window_drag.rs | 54 ++ crates/ui/src/window_ext.rs | 90 -- crates/workspace/Cargo.toml | 2 +- crates/workspace/src/dialogs/import.rs | 37 +- crates/workspace/src/dialogs/join_group.rs | 11 +- crates/workspace/src/dialogs/new_chat.rs | 50 +- crates/workspace/src/dialogs/new_group.rs | 226 ++--- crates/workspace/src/dialogs/profile.rs | 59 +- crates/workspace/src/dialogs/relays.rs | 57 +- crates/workspace/src/dialogs/restore.rs | 18 +- crates/workspace/src/dialogs/screening.rs | 100 +- crates/workspace/src/dialogs/settings.rs | 116 +-- crates/workspace/src/dock/invalid_panel.rs | 66 ++ crates/workspace/src/dock/mod.rs | 88 ++ crates/workspace/src/dock/skin.rs | 269 ++++++ crates/workspace/src/dock/tab_panel.rs | 779 ++++++++++++++++ .../src/dock/window_controls.rs} | 137 +-- crates/workspace/src/lib.rs | 84 +- crates/{ui => workspace}/src/nav.rs | 73 +- crates/workspace/src/panels/backup.rs | 47 +- crates/workspace/src/panels/browse.rs | 86 +- crates/workspace/src/panels/contact_list.rs | 60 +- crates/workspace/src/panels/greeter.rs | 157 ++-- crates/workspace/src/panels/inbox.rs | 26 +- crates/workspace/src/sidebar/group_view.rs | 98 +- crates/workspace/src/sidebar/header.rs | 183 ++-- crates/workspace/src/sidebar/inbox.rs | 25 +- crates/workspace/src/sidebar/list.rs | 95 +- crates/workspace/src/sidebar/mod.rs | 752 ++++++++-------- crates/workspace/src/sidebar/onboarding.rs | 17 +- crates/workspace/src/sidebar/rows.rs | 675 +++++++------- crates/workspace/src/sidebar/search.rs | 45 +- desktop/Cargo.toml | 105 +-- desktop/src/main.rs | 107 ++- web/Cargo.toml | 2 +- web/src/lib.rs | 12 +- 257 files changed, 5490 insertions(+), 12236 deletions(-) create mode 100644 assets/icons/a-large-small.svg create mode 100644 assets/icons/arrow-down.svg create mode 100644 assets/icons/arrow-up.svg create mode 100644 assets/icons/asterisk.svg create mode 100644 assets/icons/battery-charging.svg create mode 100644 assets/icons/battery-full.svg create mode 100644 assets/icons/battery-low.svg create mode 100644 assets/icons/battery-medium.svg create mode 100644 assets/icons/battery-warning.svg create mode 100644 assets/icons/battery.svg create mode 100644 assets/icons/bell.svg create mode 100644 assets/icons/book-open.svg delete mode 100644 assets/icons/boom.svg create mode 100644 assets/icons/bot.svg create mode 100644 assets/icons/building-2.svg create mode 100644 assets/icons/calendar.svg delete mode 100644 assets/icons/caret-up.svg create mode 100644 assets/icons/case-sensitive.svg create mode 100644 assets/icons/chart-pie.svg create mode 100644 assets/icons/chevron-left.svg create mode 100644 assets/icons/chevron-right.svg create mode 100644 assets/icons/chevron-up.svg create mode 100644 assets/icons/chevrons-up-down.svg create mode 100644 assets/icons/circle-arrow-down.svg create mode 100644 assets/icons/circle-check.svg rename assets/icons/{plus-circle.svg => circle-plus.svg} (100%) create mode 100644 assets/icons/circle-user.svg create mode 100644 assets/icons/circle-x.svg delete mode 100644 assets/icons/close-circle-fill.svg delete mode 100644 assets/icons/close-circle.svg create mode 100644 assets/icons/cpu.svg create mode 100644 assets/icons/dash.svg create mode 100644 assets/icons/delete.svg delete mode 100644 assets/icons/device.svg create mode 100644 assets/icons/door-open.svg delete mode 100644 assets/icons/edit.svg create mode 100644 assets/icons/ellipsis-vertical.svg create mode 100644 assets/icons/external-link.svg create mode 100644 assets/icons/eye-off.svg create mode 100644 assets/icons/file.svg create mode 100644 assets/icons/filter.svg delete mode 100644 assets/icons/fistbump-fill.svg delete mode 100644 assets/icons/fistbump.svg create mode 100644 assets/icons/folder-closed.svg create mode 100644 assets/icons/folder-open.svg create mode 100644 assets/icons/frame.svg create mode 100644 assets/icons/gallery-vertical-end.svg create mode 100644 assets/icons/git-branch.svg create mode 100644 assets/icons/git-clone.svg create mode 100644 assets/icons/git-commit.svg create mode 100644 assets/icons/git-file.svg create mode 100644 assets/icons/git-issue-close.svg create mode 100644 assets/icons/git-issue-done.svg create mode 100644 assets/icons/git-issue-ongoing.svg create mode 100644 assets/icons/git-issue-open.svg create mode 100644 assets/icons/git-pull-request-closed.svg create mode 100644 assets/icons/git-pull-request-draft.svg create mode 100644 assets/icons/git-pull-request-merged.svg create mode 100644 assets/icons/git-pull-request.svg create mode 100644 assets/icons/github.svg create mode 100644 assets/icons/global-on.svg create mode 100644 assets/icons/globe.svg create mode 100644 assets/icons/grid.svg create mode 100644 assets/icons/hard-drive.svg delete mode 100644 assets/icons/hashtag.svg create mode 100644 assets/icons/heart-off.svg create mode 100644 assets/icons/heart.svg delete mode 100644 assets/icons/inbox-fill.svg create mode 100644 assets/icons/init.svg create mode 100644 assets/icons/inspector.svg create mode 100644 assets/icons/layout-dashboard.svg create mode 100644 assets/icons/loader-circle.svg create mode 100644 assets/icons/log-in.svg create mode 100644 assets/icons/log-out.svg delete mode 100644 assets/icons/login.svg delete mode 100644 assets/icons/logout.svg create mode 100644 assets/icons/map.svg create mode 100644 assets/icons/markdown.svg create mode 100644 assets/icons/maximize.svg create mode 100644 assets/icons/memory-stick.svg create mode 100644 assets/icons/menu.svg create mode 100644 assets/icons/message-square-plus.svg create mode 100644 assets/icons/message-square.svg create mode 100644 assets/icons/minimize.svg create mode 100644 assets/icons/minus.svg create mode 100644 assets/icons/network.svg create mode 100644 assets/icons/palette.svg create mode 100644 assets/icons/panel-bottom-open.svg create mode 100644 assets/icons/panel-bottom.svg create mode 100644 assets/icons/panel-left-close.svg create mode 100644 assets/icons/panel-right-close.svg create mode 100644 assets/icons/pause.svg create mode 100644 assets/icons/play.svg create mode 100644 assets/icons/radio-tower.svg rename assets/icons/{history.svg => recent.svg} (100%) create mode 100644 assets/icons/redo-2.svg create mode 100644 assets/icons/redo.svg create mode 100644 assets/icons/replace.svg delete mode 100644 assets/icons/reset.svg create mode 100644 assets/icons/resize-corner.svg delete mode 100644 assets/icons/scan.svg create mode 100644 assets/icons/send-horizontal.svg create mode 100644 assets/icons/settings-2.svg create mode 100644 assets/icons/share.svg delete mode 100644 assets/icons/shield.svg delete mode 100644 assets/icons/ship.svg create mode 100644 assets/icons/sort-ascending.svg create mode 100644 assets/icons/sort-descending.svg create mode 100644 assets/icons/square-pen.svg create mode 100644 assets/icons/square-terminal.svg create mode 100644 assets/icons/star-fill.svg create mode 100644 assets/icons/star-off.svg create mode 100644 assets/icons/star.svg create mode 100644 assets/icons/sticker.svg create mode 100644 assets/icons/tag.svg create mode 100644 assets/icons/text-cursor-input.svg create mode 100644 assets/icons/thumbs-down.svg create mode 100644 assets/icons/thumbs-up.svg create mode 100644 assets/icons/trending.svg create mode 100644 assets/icons/triangle-alert.svg create mode 100644 assets/icons/undo-2.svg create mode 100644 assets/icons/undo.svg create mode 100644 assets/icons/unlock.svg delete mode 100644 assets/icons/usb.svg delete mode 100644 assets/icons/user-key.svg create mode 100644 assets/icons/user-round-plus.svg create mode 100644 assets/icons/user-round.svg create mode 100644 assets/icons/user.svg create mode 100644 assets/icons/users.svg create mode 100644 assets/icons/x.svg delete mode 100644 assets/icons/zoom.svg create mode 100644 crates/assets/tests/icons.rs delete mode 100644 crates/chat_ui/src/text.rs delete mode 100644 crates/theme/Cargo.toml delete mode 100644 crates/theme/src/appearance.rs delete mode 100644 crates/theme/src/brand.rs delete mode 100644 crates/theme/src/color.rs delete mode 100644 crates/theme/src/colors.rs delete mode 100644 crates/theme/src/geometry.rs delete mode 100644 crates/theme/src/layout.rs delete mode 100644 crates/theme/src/lib.rs delete mode 100644 crates/theme/src/notification.rs delete mode 100644 crates/theme/src/paint.rs delete mode 100644 crates/theme/src/palette.rs delete mode 100644 crates/theme/src/platform_kind.rs delete mode 100644 crates/theme/src/scrollbar_mode.rs delete mode 100644 crates/theme/src/syntax.rs delete mode 100644 crates/theme/src/theme.rs delete mode 100644 crates/theme/src/typography.rs delete mode 100644 crates/ui/src/button.rs delete mode 100644 crates/ui/src/dialog.rs delete mode 100644 crates/ui/src/dock/mod.rs delete mode 100644 crates/ui/src/dock/panel.rs create mode 100644 crates/ui/src/form.rs delete mode 100644 crates/ui/src/group_box.rs delete mode 100644 crates/ui/src/indicator.rs delete mode 100644 crates/ui/src/input/clear_button.rs delete mode 100644 crates/ui/src/input/input.rs delete mode 100644 crates/ui/src/input/mod.rs delete mode 100644 crates/ui/src/kbd.rs delete mode 100644 crates/ui/src/menu/dropdown_menu.rs delete mode 100644 crates/ui/src/menu/menu_item.rs delete mode 100644 crates/ui/src/menu/mod.rs delete mode 100644 crates/ui/src/menu/popup_menu.rs delete mode 100644 crates/ui/src/motion.rs delete mode 100644 crates/ui/src/nav_item.rs delete mode 100644 crates/ui/src/notification.rs delete mode 100644 crates/ui/src/popover.rs delete mode 100644 crates/ui/src/resizable/mod.rs delete mode 100644 crates/ui/src/root.rs delete mode 100644 crates/ui/src/scroll/mod.rs delete mode 100644 crates/ui/src/scroll/scrollable.rs delete mode 100644 crates/ui/src/styled.rs delete mode 100644 crates/ui/src/switch.rs delete mode 100644 crates/ui/src/tab/mod.rs delete mode 100644 crates/ui/src/tab/tab_bar.rs rename crates/ui/src/{markdown.rs => text.rs} (60%) delete mode 100644 crates/ui/src/tooltip.rs create mode 100644 crates/ui/src/window_drag.rs delete mode 100644 crates/ui/src/window_ext.rs create mode 100644 crates/workspace/src/dock/invalid_panel.rs create mode 100644 crates/workspace/src/dock/mod.rs create mode 100644 crates/workspace/src/dock/skin.rs create mode 100644 crates/workspace/src/dock/tab_panel.rs rename crates/{ui/src/title_bar.rs => workspace/src/dock/window_controls.rs} (50%) rename crates/{ui => workspace}/src/nav.rs (65%) diff --git a/Cargo.lock b/Cargo.lock index a1fcf204..3d116db2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -188,6 +188,23 @@ dependencies = [ "libc", ] +[[package]] +name = "annotate-snippets" +version = "0.12.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a5b0a5ab8561c603f16c3b78c24a386b1f70e7fc1b1b1e8c15738828e4a176" +dependencies = [ + "anstyle", + "memchr", + "unicode-width", +] + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + [[package]] name = "anyhow" version = "1.0.104" @@ -200,6 +217,15 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3bc62ac97cc33321f50863d514c3bc38a453947a8f9e781137e47c7401020aed" +[[package]] +name = "arc-swap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380962b3d93b99642e50b9febf72c071e97e8b32d86eae9cf4ef582bb960ae6e" +dependencies = [ + "rustversion", +] + [[package]] name = "arg_enum_proc_macro" version = "0.3.4" @@ -211,6 +237,12 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "arraydeque" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" + [[package]] name = "arrayref" version = "0.3.9" @@ -270,6 +302,7 @@ name = "assets" version = "2.0.0-alpha" dependencies = [ "anyhow", + "gpui-kit", "gpui-pre", "rust-embed", ] @@ -607,6 +640,12 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "base62" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3a647dce9631f152a99ec16cfc09267ae55fe280d5dc288964027d458076323" + [[package]] name = "base64" version = "0.22.1" @@ -814,6 +853,15 @@ dependencies = [ "uuid", ] +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + [[package]] name = "bstr" version = "1.13.1" @@ -821,6 +869,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bb31b46c14244e20ee9984b11bf5c992b91fb6939fea616e3512c8baecdbe5f" dependencies = [ "memchr", + "regex-automata", "serde_core", ] @@ -920,7 +969,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eadd868a2ce9ca38de7eeafdcec9c7065ef89b42b32f0839278d55f35c54d1ff" dependencies = [ "heck 0.4.1", - "indexmap", + "indexmap 2.14.2", "log", "proc-macro2", "quote", @@ -1020,6 +1069,7 @@ dependencies = [ "anyhow", "chat", "common", + "gpui-kit", "gpui-pre", "itertools 0.13.0", "nostr-sdk", @@ -1029,7 +1079,6 @@ dependencies = [ "settings", "smallvec", "state", - "theme", "ui", ] @@ -1194,6 +1243,12 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "configparser" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031ad3d167622974ed636505ae4556267ed4aa2aea0464122fa6bc9698a32825" + [[package]] name = "console_error_panic_hook" version = "0.1.7" @@ -1269,7 +1324,7 @@ dependencies = [ "cookie", "document-features", "idna", - "indexmap", + "indexmap 2.14.2", "log", "serde", "serde_derive", @@ -1285,6 +1340,8 @@ dependencies = [ "assets", "auto_update", "chat", + "flume 0.11.1", + "gpui-kit", "gpui-pre", "gpui-pre-linux", "gpui-pre-macos", @@ -1292,13 +1349,14 @@ dependencies = [ "gpui-pre-reqwest-client", "gpui-pre-windows", "log", + "native-theme", + "native-theme-gpui", "nip29", "nip4e", "nostr-sdk", "person", "settings", "state", - "theme", "tracing-subscriber", "ui", "workspace", @@ -1314,6 +1372,7 @@ dependencies = [ "getrandom 0.2.17", "getrandom 0.3.4", "getrandom 0.4.3", + "gpui-kit", "gpui-pre", "gpui-pre-platform", "gpui-pre-web", @@ -1324,7 +1383,6 @@ dependencies = [ "person", "settings", "state", - "theme", "tracing-wasm", "ui", "universal-time 0.3.1 (git+https://github.com/shadowylab/universal-time)", @@ -1585,6 +1643,40 @@ dependencies = [ "cmov", ] +[[package]] +name = "darling" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed17f5901b6630b993ca003def43f2f8ef4014fc13b047b57aad617ff32bc2ec" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6837e2cf7485aaae18f86181d2f0e9a7ed297a025e220aeabf63fdebd3a2ddff" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 3.0.9", +] + +[[package]] +name = "darling_macro" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ac7135c3ef02b2f7833bbeb1be5ba7f966dcde8a87c6b87f65a778d71a02785" +dependencies = [ + "darling_core", + "quote", + "syn 3.0.9", +] + [[package]] name = "data-encoding" version = "2.11.1" @@ -1642,6 +1734,9 @@ name = "deranged" version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e" +dependencies = [ + "serde_core", +] [[package]] name = "derive_more" @@ -1834,12 +1929,41 @@ dependencies = [ "simdutf8", ] +[[package]] +name = "encoding_rs_io" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fba3fe847045ecff794b9c138293a80db914678c453ad63fbf0c6a9eb6e00b22" +dependencies = [ + "encoding_rs", +] + [[package]] name = "endi" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" +[[package]] +name = "enum-iterator" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4549325971814bda7a44061bf3fe7e487d447cba01e4220a4b454d630d7a016" +dependencies = [ + "enum-iterator-derive", +] + +[[package]] +name = "enum-iterator-derive" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685adfa4d6f3d765a26bc5dbc936577de9abf756c1feeb3089b01dd395034842" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "enumflags2" version = "0.7.12" @@ -2200,6 +2324,15 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" +[[package]] +name = "fsevent-sys" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" +dependencies = [ + "libc", +] + [[package]] name = "futf" version = "0.1.5" @@ -2391,6 +2524,16 @@ dependencies = [ "polyval", ] +[[package]] +name = "gif" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae047235e33e2829703574b54fdec96bfbad892062d97fed2f76022287de61b" +dependencies = [ + "color_quant", + "weezl", +] + [[package]] name = "gif" version = "0.14.2" @@ -2418,6 +2561,12 @@ dependencies = [ "xml-rs", ] +[[package]] +name = "glob" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" + [[package]] name = "globset" version = "0.4.20" @@ -2431,6 +2580,17 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "globwalk" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" +dependencies = [ + "bitflags 1.3.2", + "ignore", + "walkdir", +] + [[package]] name = "gloo-timers" version = "0.3.0" @@ -2527,7 +2687,7 @@ dependencies = [ "raw-window-handle", "regex", "ropey", - "schemars", + "schemars 1.2.3", "serde", "serde_json", "smallvec", @@ -2539,6 +2699,95 @@ dependencies = [ "windows 0.58.0", ] +[[package]] +name = "gpui-component" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465a363235cd4062ef5f0953fc096fc764ed6f53dfbd9f409f669f93ea3b1ff9" +dependencies = [ + "anyhow", + "chrono", + "core-text", + "enum-iterator", + "gpui-base", + "gpui-component-macros", + "gpui-kit-assets", + "gpui-pre", + "gpui-pre-macros", + "gpui-pre-sum-tree", + "instant", + "itertools 0.13.0", + "log", + "lsp-types", + "markdown", + "notify", + "num-traits", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", + "once_cell", + "paste", + "raw-window-handle", + "regex", + "resvg 0.45.1", + "ropey", + "rust-i18n", + "schemars 1.2.3", + "serde", + "serde_json", + "serde_repr", + "similar", + "smallvec", + "smol", + "tracing", + "unicode-segmentation", + "unicode-width", + "uuid", + "windows 0.58.0", +] + +[[package]] +name = "gpui-component-macros" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c0c9398aaf99e595d450e38eb44ff0c500df8c332b4783d5b72022e69525359" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "gpui-kit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fac401f6b149bf33794da0942510240afd29b7b18556574e4cf17196b647066" +dependencies = [ + "gpui-base", + "gpui-component", + "gpui-kit-assets", + "gpui-pre", + "gpui-pre-macros", + "gpui-pre-platform", + "gpui-pre-web", +] + +[[package]] +name = "gpui-kit-assets" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7abc281dcbfe51c16a7e73189521a3a771168c31e3ab0db99e21e481d1b1b9a" +dependencies = [ + "anyhow", + "gpui-pre", + "gpui-pre-reqwest", + "log", + "rust-embed", + "wasm-bindgen", + "wasm-bindgen-futures", +] + [[package]] name = "gpui-pre" version = "0.3.9" @@ -2579,13 +2828,13 @@ dependencies = [ "parking", "parking_lot", "pin-project", - "pollster", + "pollster 0.4.0", "profiling", "rand 0.9.5", "raw-window-handle", "regex", - "resvg", - "schemars", + "resvg 0.46.0", + "schemars 1.2.3", "seahash", "serde", "serde_json", @@ -2597,7 +2846,7 @@ dependencies = [ "thiserror 2.0.21", "ttf-parser", "url", - "usvg", + "usvg 0.46.0", "uuid", "waker-fn", "windows 0.62.2", @@ -2653,7 +2902,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "920c2f5b2f1a7813114d89f4841f26f6060d9c35d7c8a852a4205d1a767a7ce0" dependencies = [ "gpui-pre-util", - "indexmap", + "indexmap 2.14.2", "rustc-hash 2.1.3", ] @@ -2829,6 +3078,7 @@ checksum = "05be23908e707966824f8c51a609904b7f30739e8d915e120a53c1b995ba964c" dependencies = [ "base64 0.22.1", "bytes", + "encoding_rs", "futures-core", "futures-util", "h2", @@ -2842,6 +3092,7 @@ dependencies = [ "js-sys", "log", "mime", + "mime_guess", "once_cell", "percent-encoding", "pin-project-lite", @@ -2910,7 +3161,7 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71f488bf4780735f6b2dad24f8db1e3d9e2593de0ec298e3574c788f571b81c4" dependencies = [ - "schemars", + "schemars 1.2.3", "serde", "smol_str", ] @@ -3081,6 +3332,16 @@ dependencies = [ "tokio", ] +[[package]] +name = "granit-parser" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e20f99e46474f56bd905c56e817ebddcf377a611f94c53ac4649e4d3fa3c0cd0" +dependencies = [ + "arraydeque", + "smallvec", +] + [[package]] name = "h2" version = "0.4.20" @@ -3093,7 +3354,7 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap", + "indexmap 2.14.2", "slab", "tokio", "tokio-util", @@ -3134,6 +3395,12 @@ dependencies = [ "byteorder", ] +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + [[package]] name = "hashbrown" version = "0.14.5" @@ -3526,6 +3793,12 @@ dependencies = [ "zerovec", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "1.1.0" @@ -3547,6 +3820,22 @@ dependencies = [ "icu_properties", ] +[[package]] +name = "ignore" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b69833ed729dc5aa7d19541d96d6cf8e9137194207a04916d658e43168402f" +dependencies = [ + "crossbeam-deque", + "globset", + "log", + "memchr", + "regex-automata", + "same-file", + "walkdir", + "winapi-util", +] + [[package]] name = "image" version = "0.25.10" @@ -3557,7 +3846,7 @@ dependencies = [ "byteorder-lite", "color_quant", "exr", - "gif", + "gif 0.14.2", "image-webp", "moxcms", "num-traits", @@ -3566,8 +3855,8 @@ dependencies = [ "ravif", "rayon", "tiff", - "zune-core", - "zune-jpeg", + "zune-core 0.5.3", + "zune-jpeg 0.5.15", ] [[package]] @@ -3580,6 +3869,12 @@ dependencies = [ "quick-error", ] +[[package]] +name = "imagesize" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285" + [[package]] name = "imagesize" version = "0.14.0" @@ -3592,6 +3887,17 @@ version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e44b0a4eaa4c82f441d50a963f2d5f05a787240aeee097597033e72accfd22f" +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + [[package]] name = "indexmap" version = "2.14.2" @@ -3604,6 +3910,26 @@ dependencies = [ "serde_core", ] +[[package]] +name = "inotify" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cc00ea907cab49550b7da656f80ebb97be1b997d931fbcd28d39734e17ce592" +dependencies = [ + "bitflags 2.13.2", + "inotify-sys", + "libc", +] + +[[package]] +name = "inotify-sys" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c033f80b2c113cdf91ab7a33faa9cbc014726dcad99880c8609af2a370edf37d" +dependencies = [ + "libc", +] + [[package]] name = "inout" version = "0.1.4" @@ -3680,6 +4006,15 @@ dependencies = [ "once_cell", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.13.0" @@ -3704,6 +4039,60 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +[[package]] +name = "jiff" +version = "0.2.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b005715dcbeb0089a3c0dab99f2ff1cc3b2525323552703d648585d342a383" +dependencies = [ + "defmt 1.2.0", + "jiff-core", + "jiff-static", + "jiff-tzdb-platform", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", + "windows-link 0.2.1", +] + +[[package]] +name = "jiff-core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e52fe76043ccecc9005d2305ebaadf7d7fc0cc89ca6baa10a94d6bc68c7128c" +dependencies = [ + "defmt 1.2.0", + "log", +] + +[[package]] +name = "jiff-static" +version = "0.2.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cc9817253cf7c7ee4684451bd327e88d6f3658014e54a29198625590650695c" +dependencies = [ + "jiff-core", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jiff-tzdb" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa8377070c6bae868759445e5a77f66d84f0b72f3a054bfb00e6d038b8282da7" + +[[package]] +name = "jiff-tzdb-platform" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" +dependencies = [ + "jiff-tzdb", +] + [[package]] name = "jni" version = "0.22.4" @@ -3800,6 +4189,37 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" +[[package]] +name = "kqueue" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d763e5b24120b4ddf50de6c92308156765aabfbbccebf401da7cff2d70a41ea" +dependencies = [ + "kqueue-sys", + "libc", +] + +[[package]] +name = "kqueue-sys" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07293a4e297ac234359b510362495713f75ea345d5307140414f20c69ffeb087" +dependencies = [ + "bitflags 2.13.2", + "libc", +] + +[[package]] +name = "kurbo" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62026ae44756f8a599ba21140f350303d4f08dcdcc71b5ad9c9bb8128c13c62" +dependencies = [ + "arrayvec", + "euclid", + "smallvec", +] + [[package]] name = "kurbo" version = "0.13.1" @@ -4195,6 +4615,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee" dependencies = [ "libc", + "log", "wasi", "windows-sys 0.61.2", ] @@ -4230,7 +4651,7 @@ dependencies = [ "half", "hashbrown 0.16.1", "hexf-parse", - "indexmap", + "indexmap 2.14.2", "libm", "log", "num-traits", @@ -4241,6 +4662,59 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "native-theme" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea89548b5c74493eeda312d5b1dad2c3c5f3bb35076dfef7c9a5b85c5cf140bf" +dependencies = [ + "arc-swap", + "ashpd", + "async-trait", + "block2 0.6.2", + "configparser", + "fontdb", + "inventory", + "native-theme-derive", + "notify", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-core-text", + "objc2-foundation 0.3.2", + "pollster 1.0.1", + "serde", + "serde_with", + "toml 1.1.8+spec-1.1.0", + "unicase", + "windows 0.62.2", + "zbus", +] + +[[package]] +name = "native-theme-derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cddcfe1cc7b75a3ef362b242343aabf8fd9053ed9b4c72bcf4af4a45989b4d1" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "native-theme-gpui" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5002c99b80209a2da63224a8ffa6a6b95feb836a1098c1189de47f69f3a40053" +dependencies = [ + "gpui-base", + "gpui-component", + "gpui-pre", + "image", + "native-theme", +] + [[package]] name = "ndk-context" version = "0.1.1" @@ -4294,6 +4768,7 @@ dependencies = [ "chat", "chat_ui", "common", + "gpui-kit", "gpui-pre", "log", "nip29", @@ -4303,7 +4778,6 @@ dependencies = [ "settings", "smallvec", "state", - "theme", "ui", ] @@ -4313,6 +4787,7 @@ version = "2.0.0-alpha" dependencies = [ "anyhow", "flume 0.11.1", + "gpui-kit", "gpui-pre", "log", "nostr-sdk", @@ -4321,7 +4796,6 @@ dependencies = [ "smallvec", "smol", "state", - "theme", "ui", ] @@ -4334,6 +4808,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + [[package]] name = "nom" version = "8.0.0" @@ -4349,6 +4829,15 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" +[[package]] +name = "normpath" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b11ce00d2594068e8a27c9146fdc5cf9f3ac38eb42c7cd34d05fea618873ac9f" +dependencies = [ + "windows-sys 0.61.2", +] + [[package]] name = "nostr" version = "0.45.5" @@ -4424,7 +4913,7 @@ name = "nostr-gossip-memory" version = "0.45.1" source = "git+https://github.com/rust-nostr/nostr#20096765b95f4840dd3df66cad49db35e9634462" dependencies = [ - "indexmap", + "indexmap 2.14.2", "lru", "nostr", "nostr-gossip", @@ -4479,6 +4968,24 @@ dependencies = [ "universal-time 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "notify" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3" +dependencies = [ + "bitflags 2.13.2", + "fsevent-sys", + "inotify", + "kqueue", + "libc", + "log", + "mio", + "notify-types", + "walkdir", + "windows-sys 0.60.2", +] + [[package]] name = "notify-rust" version = "4.18.2" @@ -4493,6 +5000,15 @@ dependencies = [ "zbus", ] +[[package]] +name = "notify-types" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42b8cfee0e339a0337359f3c88165702ac6e600dc01c0cc9579a92d62b08477a" +dependencies = [ + "bitflags 2.13.2", +] + [[package]] name = "ntapi" version = "0.4.3" @@ -4753,7 +5269,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ "bitflags 2.13.2", + "block2 0.6.2", "dispatch2", + "libc", "objc2 0.6.5", ] @@ -4799,6 +5317,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" dependencies = [ "bitflags 2.13.2", + "block2 0.6.2", + "libc", "objc2 0.6.5", "objc2-core-foundation", "objc2-core-graphics", @@ -5359,6 +5879,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" +[[package]] +name = "pollster" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6355899e1c9462875b6757c79f3caa011a1fdae12bbb1a2e72dd1f234f8336" + [[package]] name = "poly1305" version = "0.8.0" @@ -5947,19 +6473,36 @@ dependencies = [ [[package]] name = "resvg" -version = "0.46.0" +version = "0.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b563218631706d614e23059436526d005b50ab5f2d506b55a17eb65c5eb83419" +checksum = "a8928798c0a55e03c9ca6c4c6846f76377427d2c1e1f7e6de3c06ae57942df43" dependencies = [ - "gif", + "gif 0.13.3", "image-webp", "log", "pico-args", "rgb", - "svgtypes", + "svgtypes 0.15.3", "tiny-skia", - "usvg", - "zune-jpeg", + "usvg 0.45.1", + "zune-jpeg 0.4.21", +] + +[[package]] +name = "resvg" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b563218631706d614e23059436526d005b50ab5f2d506b55a17eb65c5eb83419" +dependencies = [ + "gif 0.14.2", + "image-webp", + "log", + "pico-args", + "rgb", + "svgtypes 0.16.1", + "tiny-skia", + "usvg 0.46.0", + "zune-jpeg 0.5.15", ] [[package]] @@ -6030,6 +6573,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", + "shellexpand", "syn 2.0.119", "walkdir", ] @@ -6045,6 +6589,54 @@ dependencies = [ "walkdir", ] +[[package]] +name = "rust-i18n" +version = "4.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8502e73e6461c738659455c5d2cf95bc132760a6f203c717e66ee72b78906d7f" +dependencies = [ + "globwalk", + "regex", + "rust-i18n-macro", + "rust-i18n-support", + "smallvec", +] + +[[package]] +name = "rust-i18n-macro" +version = "4.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d54a28dd9d46108d56b9f0c85b220908844233e561c03087890325104f90f2c6" +dependencies = [ + "glob", + "proc-macro2", + "quote", + "rust-i18n-support", + "serde", + "serde_json", + "syn 2.0.119", +] + +[[package]] +name = "rust-i18n-support" +version = "4.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e806c2a9701cbd6043992cd935c30cb1fdb128fa15e7b506f3b46f97045737c0" +dependencies = [ + "arc-swap", + "base62", + "foldhash 0.2.0", + "globwalk", + "itertools 0.11.0", + "normpath", + "serde", + "serde-saphyr", + "serde_json", + "siphasher", + "toml 0.8.23", + "triomphe", +] + [[package]] name = "rustc-demangle" version = "0.1.28" @@ -6229,6 +6821,18 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + [[package]] name = "schemars" version = "1.2.3" @@ -6236,7 +6840,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab508826f74a77ca9d5aba6ff19b522583ee3eaf28a19384ff3d0e5835fadf6e" dependencies = [ "dyn-clone", - "indexmap", + "indexmap 2.14.2", "ref-cast", "schemars_derive", "serde", @@ -6377,6 +6981,23 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-saphyr" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8050abb251097357e24aff63ba2c52a6309ecb7d23a5474023df960a02694d8" +dependencies = [ + "annotate-snippets", + "base64 0.23.1", + "encoding_rs_io", + "granit-parser", + "nohash-hasher", + "num-traits", + "serde_core", + "smallvec", + "zmij", +] + [[package]] name = "serde_bytes" version = "0.11.19" @@ -6425,7 +7046,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" dependencies = [ "foldhash 0.2.0", - "indexmap", + "indexmap 2.14.2", "itoa", "memchr", "serde", @@ -6474,12 +7095,46 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "3.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9adc193c780ef8f159aee8b61e2d5801aaa555e6eb0947fe45530ec506296f" +dependencies = [ + "base64 0.23.1", + "bs58", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.14.2", + "jiff", + "schemars 0.9.0", + "schemars 1.2.3", + "serde_core", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e17bbc68e28663bbbb90df47e058aa7eda4fb445b89fe70457bb94fbccf6e49" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 3.0.9", +] + [[package]] name = "settings" version = "2.0.0-alpha" dependencies = [ "anyhow", "common", + "gpui-kit", "gpui-pre", "log", "nostr-sdk", @@ -6488,7 +7143,6 @@ dependencies = [ "serde_json", "smallvec", "smol", - "theme", ] [[package]] @@ -6539,6 +7193,15 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shellexpand" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32824fab5e16e6c4d86dc1ba84489390419a39f97699852b66480bb87d297ed8" +dependencies = [ + "dirs", +] + [[package]] name = "shlex" version = "2.0.1" @@ -6586,6 +7249,16 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" +[[package]] +name = "similar" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa" +dependencies = [ + "bstr", + "unicode-segmentation", +] + [[package]] name = "simplecss" version = "0.2.2" @@ -6786,6 +7459,12 @@ dependencies = [ "quote", ] +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "strum" version = "0.28.0" @@ -6819,13 +7498,23 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0193cc4331cfd2f3d2011ef287590868599a2f33c3e69bc22c1a3d3acf9e02fb" +[[package]] +name = "svgtypes" +version = "0.15.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68c7541fff44b35860c1a7a47a7cadf3e4a304c457b58f9870d9706ece028afc" +dependencies = [ + "kurbo 0.11.3", + "siphasher", +] + [[package]] name = "svgtypes" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "695b5790b3131dafa99b3bbfd25a216edb3d216dad9ca208d4657bfb8f2abc3d" dependencies = [ - "kurbo", + "kurbo 0.13.1", "siphasher", ] @@ -7003,20 +7692,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "theme" -version = "2.0.0-alpha" -dependencies = [ - "anyhow", - "gpui-base", - "gpui-pre", - "log", - "schemars", - "serde", - "serde_json", - "tempfile", -] - [[package]] name = "thiserror" version = "1.0.69" @@ -7077,7 +7752,7 @@ dependencies = [ "half", "quick-error", "weezl", - "zune-jpeg", + "zune-jpeg 0.5.15", ] [[package]] @@ -7278,7 +7953,7 @@ version = "1.1.8+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20489e00e4d8741d6be680764cc12e270655e375a20d1011e844a9c3379e678d" dependencies = [ - "indexmap", + "indexmap 2.14.2", "serde_core", "serde_spanned 1.1.2", "toml_datetime 1.1.2+spec-1.1.0", @@ -7311,7 +7986,7 @@ version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "indexmap", + "indexmap 2.14.2", "serde", "serde_spanned 0.6.9", "toml_datetime 0.6.11", @@ -7325,7 +8000,7 @@ version = "0.25.17+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3641d5bbb5349a79e1020a242d251efbc546ad8048d133958323ce9c40a9c9c" dependencies = [ - "indexmap", + "indexmap 2.14.2", "toml_datetime 1.1.2+spec-1.1.0", "toml_parser", "winnow 1.0.4", @@ -7466,6 +8141,17 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "triomphe" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d15f4f5898bcfc5d8a8e45ed30b2f108d710c1a2e5489dbf80e078f707181bc" +dependencies = [ + "arc-swap", + "serde", + "stable_deref_trait", +] + [[package]] name = "try-lock" version = "0.2.5" @@ -7521,13 +8207,16 @@ dependencies = [ name = "ui" version = "2.0.0-alpha" dependencies = [ + "common", "gpui-base", + "gpui-kit", "gpui-pre", - "instant", "log", + "nostr-sdk", + "person", "smallvec", - "theme", "uuid", + "web-time", ] [[package]] @@ -7683,6 +8372,33 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "usvg" +version = "0.45.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80be9b06fbae3b8b303400ab20778c80bbaf338f563afe567cf3c9eea17b47ef" +dependencies = [ + "base64 0.22.1", + "data-url", + "flate2", + "fontdb", + "imagesize 0.13.0", + "kurbo 0.11.3", + "log", + "pico-args", + "roxmltree 0.20.0", + "rustybuzz", + "simplecss", + "siphasher", + "strict-num", + "svgtypes 0.15.3", + "tiny-skia-path", + "unicode-bidi", + "unicode-script", + "unicode-vo", + "xmlwriter", +] + [[package]] name = "usvg" version = "0.46.0" @@ -7693,8 +8409,8 @@ dependencies = [ "data-url", "flate2", "fontdb", - "imagesize", - "kurbo", + "imagesize 0.14.0", + "kurbo 0.13.1", "log", "pico-args", "roxmltree 0.21.1", @@ -7702,7 +8418,7 @@ dependencies = [ "simplecss", "siphasher", "strict-num", - "svgtypes", + "svgtypes 0.16.1", "tiny-skia-path", "unicode-bidi", "unicode-script", @@ -8117,7 +8833,7 @@ dependencies = [ "cfg_aliases", "document-features", "hashbrown 0.16.1", - "indexmap", + "indexmap 2.14.2", "log", "naga", "once_cell", @@ -8651,6 +9367,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + [[package]] name = "windows-sys" version = "0.61.2" @@ -8926,6 +9651,7 @@ dependencies = [ "chat_ui", "common", "gpui-base", + "gpui-kit", "gpui-pre", "instant", "log", @@ -8939,7 +9665,6 @@ dependencies = [ "settings", "smallvec", "state", - "theme", "ui", ] @@ -9381,6 +10106,12 @@ version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" +[[package]] +name = "zune-core" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" + [[package]] name = "zune-core" version = "0.5.3" @@ -9396,13 +10127,22 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "zune-jpeg" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29ce2c8a9384ad323cf564b67da86e21d3cfdff87908bc1223ed5c99bc792713" +dependencies = [ + "zune-core 0.4.12", +] + [[package]] name = "zune-jpeg" version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27bc9d5b815bc103f142aa054f561d9187d191692ec7c2d1e2b4737f8dbd7296" dependencies = [ - "zune-core", + "zune-core 0.5.3", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 06c6ca2a..e391257f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,70 +1,76 @@ -[workspace] -resolver = "2" -members = ["crates/*", "desktop", "web"] -default-members = ["desktop"] - -[workspace.package] -version = "2.0.0-alpha" -edition = "2024" -publish = false - -[workspace.dependencies] -gpui = { package = "gpui-pre", version = "0.3.8" } -gpui_platform = { package = "gpui-pre-platform", version = "0.3.8", features = ["font-kit", "x11", "wayland"] } -gpui_linux = { package = "gpui-pre-linux", version = "0.3.8" } -gpui_windows = { package = "gpui-pre-windows", version = "0.3.8" } -gpui_macos = { package = "gpui-pre-macos", version = "0.3.8" } -gpui_web = { package = "gpui-pre-web", version = "0.3.8" } -gpui_util = { package = "gpui-pre-util", version = "0.3.8" } -reqwest_client = { package = "gpui-pre-reqwest-client", version = "0.3.8" } -gpui_tokio = { path = "crates/gpui_tokio" } -gpui-base = "0.7.1" - -# Nostr -nostr-lmdb = { git = "https://github.com/rust-nostr/nostr" } -nostr-memory = { git = "https://github.com/rust-nostr/nostr" } -nostr-blossom = { git = "https://github.com/rust-nostr/nostr" } -nostr-gossip-memory = { git = "https://github.com/rust-nostr/nostr" } -nostr-connect = { git = "https://github.com/rust-nostr/nostr" } -nostr-sdk = { git = "https://github.com/rust-nostr/nostr" } -nostr = { git = "https://github.com/rust-nostr/nostr", features = [ "nip59", "nip49", "nip44", "nip98" ] } - -# Crypto (NIP-17 encrypted file messages) -aes-gcm = "0.10" -base64 = "0.22" -sha2 = "0.10" -data-encoding = "2" -hkdf = "0.12" -# Pinned to the instances `nostr` already builds: the NIP-44 message-key disclosure -chacha20 = "0.9" -hmac = "0.12" -# Pinned to the instance `nostr-sdk` already builds, so NIP-44 nonces share it -rand = { version = "0.10", default-features = false, features = [ "std", "sys_rng", "thread_rng" ] } - -# Others -anyhow = "1.0.44" -chrono = { version = "0.4.38", features = ["wasmbind"] } -futures = "0.3" -itertools = "0.13.0" -log = "0.4" -flume = { version = "0.11.1", default-features = false, features = ["async", "select"] } -rust-embed = { version = "8.5", features = ["include-exclude"] } -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -schemars = "1" -smallvec = "1.14.0" -smol = "2" -webbrowser = "1.0.4" -tracing-subscriber = { version = "0.3.18", features = ["fmt"] } -instant = "0.1" - -[profile.release] -strip = true -opt-level = "z" -lto = true -codegen-units = 1 -panic = "abort" - -[profile.profiling] -inherits = "release" -debug = true +[workspace] +resolver = "2" +members = ["crates/*", "desktop", "web"] +default-members = ["desktop"] + +[workspace.package] +version = "2.0.0-alpha" +edition = "2024" +publish = false + +[workspace.dependencies] +gpui = { package = "gpui-pre", version = "0.3.8" } +gpui_platform = { package = "gpui-pre-platform", version = "0.3.8", features = ["font-kit", "x11", "wayland"] } +gpui_linux = { package = "gpui-pre-linux", version = "0.3.8" } +gpui_windows = { package = "gpui-pre-windows", version = "0.3.8" } +gpui_macos = { package = "gpui-pre-macos", version = "0.3.8" } +gpui_web = { package = "gpui-pre-web", version = "0.3.8" } +gpui_util = { package = "gpui-pre-util", version = "0.3.8" } +reqwest_client = { package = "gpui-pre-reqwest-client", version = "0.3.8" } +gpui_tokio = { path = "crates/gpui_tokio" } +gpui-base = "0.7.1" +gpui-kit = "0.7.3" + +# Native OS theme reading; the connector is written against gpui-component 0.7.x +# and gpui-pre 0.3.8, both satisfied by the versions above (0.7.3 / 0.3.9). +native-theme = { version = "0.6.1", features = ["watch"] } +native-theme-gpui = { version = "0.6.1", default-features = false, features = ["system-fonts"] } + +# Nostr +nostr-lmdb = { git = "https://github.com/rust-nostr/nostr" } +nostr-memory = { git = "https://github.com/rust-nostr/nostr" } +nostr-blossom = { git = "https://github.com/rust-nostr/nostr" } +nostr-gossip-memory = { git = "https://github.com/rust-nostr/nostr" } +nostr-connect = { git = "https://github.com/rust-nostr/nostr" } +nostr-sdk = { git = "https://github.com/rust-nostr/nostr" } +nostr = { git = "https://github.com/rust-nostr/nostr", features = [ "nip59", "nip49", "nip44", "nip98" ] } + +# Crypto (NIP-17 encrypted file messages) +aes-gcm = "0.10" +base64 = "0.22" +sha2 = "0.10" +data-encoding = "2" +hkdf = "0.12" +# Pinned to the instances `nostr` already builds: the NIP-44 message-key disclosure +chacha20 = "0.9" +hmac = "0.12" +# Pinned to the instance `nostr-sdk` already builds, so NIP-44 nonces share it +rand = { version = "0.10", default-features = false, features = [ "std", "sys_rng", "thread_rng" ] } + +# Others +anyhow = "1.0.44" +chrono = { version = "0.4.38", features = ["wasmbind"] } +futures = "0.3" +itertools = "0.13.0" +log = "0.4" +flume = { version = "0.11.1", default-features = false, features = ["async", "select"] } +rust-embed = { version = "8.5", features = ["include-exclude"] } +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +schemars = "1" +smallvec = "1.14.0" +smol = "2" +webbrowser = "1.0.4" +tracing-subscriber = { version = "0.3.18", features = ["fmt"] } +instant = "0.1" + +[profile.release] +strip = true +opt-level = "z" +lto = true +codegen-units = 1 +panic = "abort" + +[profile.profiling] +inherits = "release" +debug = true diff --git a/assets/icons/a-large-small.svg b/assets/icons/a-large-small.svg new file mode 100644 index 00000000..8a2054b3 --- /dev/null +++ b/assets/icons/a-large-small.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/arrow-down.svg b/assets/icons/arrow-down.svg new file mode 100644 index 00000000..3458ca13 --- /dev/null +++ b/assets/icons/arrow-down.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/arrow-up.svg b/assets/icons/arrow-up.svg new file mode 100644 index 00000000..9f49eb5b --- /dev/null +++ b/assets/icons/arrow-up.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/asterisk.svg b/assets/icons/asterisk.svg new file mode 100644 index 00000000..db9b6d90 --- /dev/null +++ b/assets/icons/asterisk.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/ban.svg b/assets/icons/ban.svg index 0129765f..301db804 100644 --- a/assets/icons/ban.svg +++ b/assets/icons/ban.svg @@ -1 +1,14 @@ - + + + + diff --git a/assets/icons/battery-charging.svg b/assets/icons/battery-charging.svg new file mode 100644 index 00000000..6d1fb4e0 --- /dev/null +++ b/assets/icons/battery-charging.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/battery-full.svg b/assets/icons/battery-full.svg new file mode 100644 index 00000000..b21cf4e2 --- /dev/null +++ b/assets/icons/battery-full.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/battery-low.svg b/assets/icons/battery-low.svg new file mode 100644 index 00000000..6d41f283 --- /dev/null +++ b/assets/icons/battery-low.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/battery-medium.svg b/assets/icons/battery-medium.svg new file mode 100644 index 00000000..18daeebc --- /dev/null +++ b/assets/icons/battery-medium.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/battery-warning.svg b/assets/icons/battery-warning.svg new file mode 100644 index 00000000..4dc94a5c --- /dev/null +++ b/assets/icons/battery-warning.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/battery.svg b/assets/icons/battery.svg new file mode 100644 index 00000000..bb105c5f --- /dev/null +++ b/assets/icons/battery.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/bell.svg b/assets/icons/bell.svg new file mode 100644 index 00000000..455e1ff7 --- /dev/null +++ b/assets/icons/bell.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/book-open.svg b/assets/icons/book-open.svg new file mode 100644 index 00000000..f3fc42b0 --- /dev/null +++ b/assets/icons/book-open.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/boom.svg b/assets/icons/boom.svg deleted file mode 100644 index dcaf9402..00000000 --- a/assets/icons/boom.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/bot.svg b/assets/icons/bot.svg new file mode 100644 index 00000000..cabeb2a3 --- /dev/null +++ b/assets/icons/bot.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/building-2.svg b/assets/icons/building-2.svg new file mode 100644 index 00000000..496eff3c --- /dev/null +++ b/assets/icons/building-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/calendar.svg b/assets/icons/calendar.svg new file mode 100644 index 00000000..9d6afdd0 --- /dev/null +++ b/assets/icons/calendar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/caret-up.svg b/assets/icons/caret-up.svg deleted file mode 100644 index 6e3a8a1b..00000000 --- a/assets/icons/caret-up.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/case-sensitive.svg b/assets/icons/case-sensitive.svg new file mode 100644 index 00000000..8a2054b3 --- /dev/null +++ b/assets/icons/case-sensitive.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/chart-pie.svg b/assets/icons/chart-pie.svg new file mode 100644 index 00000000..38326485 --- /dev/null +++ b/assets/icons/chart-pie.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/check.svg b/assets/icons/check.svg index 299e0013..899c1cb5 100644 --- a/assets/icons/check.svg +++ b/assets/icons/check.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file diff --git a/assets/icons/chevron-down.svg b/assets/icons/chevron-down.svg index d8788af6..36be93ed 100644 --- a/assets/icons/chevron-down.svg +++ b/assets/icons/chevron-down.svg @@ -1,3 +1,3 @@ - + diff --git a/assets/icons/chevron-left.svg b/assets/icons/chevron-left.svg new file mode 100644 index 00000000..7e51ed19 --- /dev/null +++ b/assets/icons/chevron-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/chevron-right.svg b/assets/icons/chevron-right.svg new file mode 100644 index 00000000..0b8688f8 --- /dev/null +++ b/assets/icons/chevron-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/chevron-up.svg b/assets/icons/chevron-up.svg new file mode 100644 index 00000000..f9b878e2 --- /dev/null +++ b/assets/icons/chevron-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/chevrons-up-down.svg b/assets/icons/chevrons-up-down.svg new file mode 100644 index 00000000..1fe0fa96 --- /dev/null +++ b/assets/icons/chevrons-up-down.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/circle-arrow-down.svg b/assets/icons/circle-arrow-down.svg new file mode 100644 index 00000000..0e3e3257 --- /dev/null +++ b/assets/icons/circle-arrow-down.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/assets/icons/circle-check.svg b/assets/icons/circle-check.svg new file mode 100644 index 00000000..d1e1f8b7 --- /dev/null +++ b/assets/icons/circle-check.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/plus-circle.svg b/assets/icons/circle-plus.svg similarity index 100% rename from assets/icons/plus-circle.svg rename to assets/icons/circle-plus.svg diff --git a/assets/icons/circle-user.svg b/assets/icons/circle-user.svg new file mode 100644 index 00000000..9f41a7df --- /dev/null +++ b/assets/icons/circle-user.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/circle-x.svg b/assets/icons/circle-x.svg new file mode 100644 index 00000000..c9904ae2 --- /dev/null +++ b/assets/icons/circle-x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/close-circle-fill.svg b/assets/icons/close-circle-fill.svg deleted file mode 100644 index 079ddbbe..00000000 --- a/assets/icons/close-circle-fill.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/close-circle.svg b/assets/icons/close-circle.svg deleted file mode 100644 index 201fc939..00000000 --- a/assets/icons/close-circle.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/copy.svg b/assets/icons/copy.svg index 7286461e..d03829b8 100644 --- a/assets/icons/copy.svg +++ b/assets/icons/copy.svg @@ -1,3 +1,3 @@ - + diff --git a/assets/icons/cpu.svg b/assets/icons/cpu.svg new file mode 100644 index 00000000..90cff8b2 --- /dev/null +++ b/assets/icons/cpu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/dash.svg b/assets/icons/dash.svg new file mode 100644 index 00000000..1bd2a89a --- /dev/null +++ b/assets/icons/dash.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/delete.svg b/assets/icons/delete.svg new file mode 100644 index 00000000..deb1055c --- /dev/null +++ b/assets/icons/delete.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/device.svg b/assets/icons/device.svg deleted file mode 100644 index 8c54aef5..00000000 --- a/assets/icons/device.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/door-open.svg b/assets/icons/door-open.svg new file mode 100644 index 00000000..f12c8fb3 --- /dev/null +++ b/assets/icons/door-open.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/assets/icons/edit.svg b/assets/icons/edit.svg deleted file mode 100644 index 9387f08a..00000000 --- a/assets/icons/edit.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icons/ellipsis-vertical.svg b/assets/icons/ellipsis-vertical.svg new file mode 100644 index 00000000..47e84718 --- /dev/null +++ b/assets/icons/ellipsis-vertical.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/ellipsis.svg b/assets/icons/ellipsis.svg index 411f5457..851b590f 100644 --- a/assets/icons/ellipsis.svg +++ b/assets/icons/ellipsis.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file diff --git a/assets/icons/external-link.svg b/assets/icons/external-link.svg new file mode 100644 index 00000000..b6fbc8b0 --- /dev/null +++ b/assets/icons/external-link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/eye-off.svg b/assets/icons/eye-off.svg new file mode 100644 index 00000000..ab2c9f07 --- /dev/null +++ b/assets/icons/eye-off.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/eye.svg b/assets/icons/eye.svg index 44d426ab..cec895d7 100644 --- a/assets/icons/eye.svg +++ b/assets/icons/eye.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file diff --git a/assets/icons/file.svg b/assets/icons/file.svg new file mode 100644 index 00000000..9fd0ca62 --- /dev/null +++ b/assets/icons/file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/filter.svg b/assets/icons/filter.svg new file mode 100644 index 00000000..20829cb1 --- /dev/null +++ b/assets/icons/filter.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/fistbump-fill.svg b/assets/icons/fistbump-fill.svg deleted file mode 100644 index ad34489b..00000000 --- a/assets/icons/fistbump-fill.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/fistbump.svg b/assets/icons/fistbump.svg deleted file mode 100644 index 4a3d0dc9..00000000 --- a/assets/icons/fistbump.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/folder-closed.svg b/assets/icons/folder-closed.svg new file mode 100644 index 00000000..7f1eaebf --- /dev/null +++ b/assets/icons/folder-closed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/folder-open.svg b/assets/icons/folder-open.svg new file mode 100644 index 00000000..db7f94bc --- /dev/null +++ b/assets/icons/folder-open.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/folder.svg b/assets/icons/folder.svg index 65967a9b..e0edfdd5 100644 --- a/assets/icons/folder.svg +++ b/assets/icons/folder.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file diff --git a/assets/icons/frame.svg b/assets/icons/frame.svg new file mode 100644 index 00000000..c7996220 --- /dev/null +++ b/assets/icons/frame.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/gallery-vertical-end.svg b/assets/icons/gallery-vertical-end.svg new file mode 100644 index 00000000..0c3b5b73 --- /dev/null +++ b/assets/icons/gallery-vertical-end.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/git-branch.svg b/assets/icons/git-branch.svg new file mode 100644 index 00000000..69f6b1a5 --- /dev/null +++ b/assets/icons/git-branch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/git-clone.svg b/assets/icons/git-clone.svg new file mode 100644 index 00000000..0fa1753b --- /dev/null +++ b/assets/icons/git-clone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/git-commit.svg b/assets/icons/git-commit.svg new file mode 100644 index 00000000..931e995d --- /dev/null +++ b/assets/icons/git-commit.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/git-file.svg b/assets/icons/git-file.svg new file mode 100644 index 00000000..c98599de --- /dev/null +++ b/assets/icons/git-file.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/git-issue-close.svg b/assets/icons/git-issue-close.svg new file mode 100644 index 00000000..14680238 --- /dev/null +++ b/assets/icons/git-issue-close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/git-issue-done.svg b/assets/icons/git-issue-done.svg new file mode 100644 index 00000000..d7931475 --- /dev/null +++ b/assets/icons/git-issue-done.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/git-issue-ongoing.svg b/assets/icons/git-issue-ongoing.svg new file mode 100644 index 00000000..040d1a2d --- /dev/null +++ b/assets/icons/git-issue-ongoing.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/git-issue-open.svg b/assets/icons/git-issue-open.svg new file mode 100644 index 00000000..22b9465e --- /dev/null +++ b/assets/icons/git-issue-open.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/git-pull-request-closed.svg b/assets/icons/git-pull-request-closed.svg new file mode 100644 index 00000000..84eab1fb --- /dev/null +++ b/assets/icons/git-pull-request-closed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/git-pull-request-draft.svg b/assets/icons/git-pull-request-draft.svg new file mode 100644 index 00000000..df1fc0ed --- /dev/null +++ b/assets/icons/git-pull-request-draft.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/git-pull-request-merged.svg b/assets/icons/git-pull-request-merged.svg new file mode 100644 index 00000000..7ff4a1ff --- /dev/null +++ b/assets/icons/git-pull-request-merged.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/git-pull-request.svg b/assets/icons/git-pull-request.svg new file mode 100644 index 00000000..8d5cb609 --- /dev/null +++ b/assets/icons/git-pull-request.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/github.svg b/assets/icons/github.svg new file mode 100644 index 00000000..7b3bfb79 --- /dev/null +++ b/assets/icons/github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/global-on.svg b/assets/icons/global-on.svg new file mode 100644 index 00000000..40fc5eca --- /dev/null +++ b/assets/icons/global-on.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/globe.svg b/assets/icons/globe.svg new file mode 100644 index 00000000..40fc5eca --- /dev/null +++ b/assets/icons/globe.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/grid.svg b/assets/icons/grid.svg new file mode 100644 index 00000000..ecf1466a --- /dev/null +++ b/assets/icons/grid.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/hard-drive.svg b/assets/icons/hard-drive.svg new file mode 100644 index 00000000..542b77cd --- /dev/null +++ b/assets/icons/hard-drive.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/hashtag.svg b/assets/icons/hashtag.svg deleted file mode 100644 index 2459408b..00000000 --- a/assets/icons/hashtag.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/heart-off.svg b/assets/icons/heart-off.svg new file mode 100644 index 00000000..444628ff --- /dev/null +++ b/assets/icons/heart-off.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/heart.svg b/assets/icons/heart.svg new file mode 100644 index 00000000..83d1af56 --- /dev/null +++ b/assets/icons/heart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/inbox-fill.svg b/assets/icons/inbox-fill.svg deleted file mode 100644 index 719c0506..00000000 --- a/assets/icons/inbox-fill.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/inbox.svg b/assets/icons/inbox.svg index 5569c57c..6e9b6424 100644 --- a/assets/icons/inbox.svg +++ b/assets/icons/inbox.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file diff --git a/assets/icons/info.svg b/assets/icons/info.svg index 7c816dcd..73fa6945 100644 --- a/assets/icons/info.svg +++ b/assets/icons/info.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file diff --git a/assets/icons/init.svg b/assets/icons/init.svg new file mode 100644 index 00000000..060c0432 --- /dev/null +++ b/assets/icons/init.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/inspector.svg b/assets/icons/inspector.svg new file mode 100644 index 00000000..d61e9161 --- /dev/null +++ b/assets/icons/inspector.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/layout-dashboard.svg b/assets/icons/layout-dashboard.svg new file mode 100644 index 00000000..53afe502 --- /dev/null +++ b/assets/icons/layout-dashboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/loader-circle.svg b/assets/icons/loader-circle.svg new file mode 100644 index 00000000..55e4ea5f --- /dev/null +++ b/assets/icons/loader-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/loader.svg b/assets/icons/loader.svg index f6ff93fa..185f0aff 100644 --- a/assets/icons/loader.svg +++ b/assets/icons/loader.svg @@ -1,10 +1 @@ - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/assets/icons/log-in.svg b/assets/icons/log-in.svg new file mode 100644 index 00000000..6183bc23 --- /dev/null +++ b/assets/icons/log-in.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/assets/icons/log-out.svg b/assets/icons/log-out.svg new file mode 100644 index 00000000..fe772e66 --- /dev/null +++ b/assets/icons/log-out.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/assets/icons/login.svg b/assets/icons/login.svg deleted file mode 100644 index dc5ec458..00000000 --- a/assets/icons/login.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icons/logout.svg b/assets/icons/logout.svg deleted file mode 100644 index 05534526..00000000 --- a/assets/icons/logout.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icons/map.svg b/assets/icons/map.svg new file mode 100644 index 00000000..a5425db1 --- /dev/null +++ b/assets/icons/map.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/markdown.svg b/assets/icons/markdown.svg new file mode 100644 index 00000000..f11c48fb --- /dev/null +++ b/assets/icons/markdown.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/maximize.svg b/assets/icons/maximize.svg new file mode 100644 index 00000000..398a8c3b --- /dev/null +++ b/assets/icons/maximize.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/memory-stick.svg b/assets/icons/memory-stick.svg new file mode 100644 index 00000000..cddb2823 --- /dev/null +++ b/assets/icons/memory-stick.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/menu.svg b/assets/icons/menu.svg new file mode 100644 index 00000000..2f00246b --- /dev/null +++ b/assets/icons/menu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/message-square-plus.svg b/assets/icons/message-square-plus.svg new file mode 100644 index 00000000..0bb02898 --- /dev/null +++ b/assets/icons/message-square-plus.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/assets/icons/message-square.svg b/assets/icons/message-square.svg new file mode 100644 index 00000000..5044bc7e --- /dev/null +++ b/assets/icons/message-square.svg @@ -0,0 +1,13 @@ + + + diff --git a/assets/icons/minimize.svg b/assets/icons/minimize.svg new file mode 100644 index 00000000..51b44e42 --- /dev/null +++ b/assets/icons/minimize.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/minus.svg b/assets/icons/minus.svg new file mode 100644 index 00000000..1bd2a89a --- /dev/null +++ b/assets/icons/minus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/moon.svg b/assets/icons/moon.svg index 68dd15ae..c991f896 100644 --- a/assets/icons/moon.svg +++ b/assets/icons/moon.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file diff --git a/assets/icons/network.svg b/assets/icons/network.svg new file mode 100644 index 00000000..6587f869 --- /dev/null +++ b/assets/icons/network.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/palette.svg b/assets/icons/palette.svg new file mode 100644 index 00000000..d7a32e80 --- /dev/null +++ b/assets/icons/palette.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/panel-bottom-open.svg b/assets/icons/panel-bottom-open.svg new file mode 100644 index 00000000..58cb22aa --- /dev/null +++ b/assets/icons/panel-bottom-open.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/panel-bottom.svg b/assets/icons/panel-bottom.svg new file mode 100644 index 00000000..e017db33 --- /dev/null +++ b/assets/icons/panel-bottom.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/panel-left-close.svg b/assets/icons/panel-left-close.svg new file mode 100644 index 00000000..6cac95c5 --- /dev/null +++ b/assets/icons/panel-left-close.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/panel-right-close.svg b/assets/icons/panel-right-close.svg new file mode 100644 index 00000000..5fe9dcdb --- /dev/null +++ b/assets/icons/panel-right-close.svg @@ -0,0 +1,14 @@ + diff --git a/assets/icons/panel-right-open.svg b/assets/icons/panel-right-open.svg index 6387eaee..3b5ff0b4 100644 --- a/assets/icons/panel-right-open.svg +++ b/assets/icons/panel-right-open.svg @@ -1,3 +1 @@ - - - + diff --git a/assets/icons/panel-right.svg b/assets/icons/panel-right.svg index 636e01d2..d37f5e70 100644 --- a/assets/icons/panel-right.svg +++ b/assets/icons/panel-right.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file diff --git a/assets/icons/pause.svg b/assets/icons/pause.svg new file mode 100644 index 00000000..b9a49e5b --- /dev/null +++ b/assets/icons/pause.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/play.svg b/assets/icons/play.svg new file mode 100644 index 00000000..57b5217b --- /dev/null +++ b/assets/icons/play.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/radio-tower.svg b/assets/icons/radio-tower.svg new file mode 100644 index 00000000..ed2a2dfe --- /dev/null +++ b/assets/icons/radio-tower.svg @@ -0,0 +1,19 @@ + + + + + + + + + diff --git a/assets/icons/history.svg b/assets/icons/recent.svg similarity index 100% rename from assets/icons/history.svg rename to assets/icons/recent.svg diff --git a/assets/icons/redo-2.svg b/assets/icons/redo-2.svg new file mode 100644 index 00000000..51c616ba --- /dev/null +++ b/assets/icons/redo-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/redo.svg b/assets/icons/redo.svg new file mode 100644 index 00000000..7a89cf8e --- /dev/null +++ b/assets/icons/redo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/replace.svg b/assets/icons/replace.svg new file mode 100644 index 00000000..fecb76de --- /dev/null +++ b/assets/icons/replace.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/reply.svg b/assets/icons/reply.svg index 499a40a8..96edcfb5 100644 --- a/assets/icons/reply.svg +++ b/assets/icons/reply.svg @@ -1,3 +1,14 @@ - - + + + diff --git a/assets/icons/reset.svg b/assets/icons/reset.svg deleted file mode 100644 index 4bc319db..00000000 --- a/assets/icons/reset.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/resize-corner.svg b/assets/icons/resize-corner.svg new file mode 100644 index 00000000..9d3eef08 --- /dev/null +++ b/assets/icons/resize-corner.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/scan.svg b/assets/icons/scan.svg deleted file mode 100644 index 489cb126..00000000 --- a/assets/icons/scan.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/send-horizontal.svg b/assets/icons/send-horizontal.svg new file mode 100644 index 00000000..5e443146 --- /dev/null +++ b/assets/icons/send-horizontal.svg @@ -0,0 +1,14 @@ + + + + diff --git a/assets/icons/settings-2.svg b/assets/icons/settings-2.svg new file mode 100644 index 00000000..8c0b6d18 --- /dev/null +++ b/assets/icons/settings-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/share.svg b/assets/icons/share.svg new file mode 100644 index 00000000..c91f073c --- /dev/null +++ b/assets/icons/share.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/shield.svg b/assets/icons/shield.svg deleted file mode 100644 index dacf3b7d..00000000 --- a/assets/icons/shield.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/ship.svg b/assets/icons/ship.svg deleted file mode 100644 index 137c9778..00000000 --- a/assets/icons/ship.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/sort-ascending.svg b/assets/icons/sort-ascending.svg new file mode 100644 index 00000000..268a8b0e --- /dev/null +++ b/assets/icons/sort-ascending.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/sort-descending.svg b/assets/icons/sort-descending.svg new file mode 100644 index 00000000..11ab2d7a --- /dev/null +++ b/assets/icons/sort-descending.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/square-pen.svg b/assets/icons/square-pen.svg new file mode 100644 index 00000000..20855d75 --- /dev/null +++ b/assets/icons/square-pen.svg @@ -0,0 +1,14 @@ + + + + diff --git a/assets/icons/square-terminal.svg b/assets/icons/square-terminal.svg new file mode 100644 index 00000000..1bc4c894 --- /dev/null +++ b/assets/icons/square-terminal.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/star-fill.svg b/assets/icons/star-fill.svg new file mode 100644 index 00000000..4bd4c084 --- /dev/null +++ b/assets/icons/star-fill.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/star-off.svg b/assets/icons/star-off.svg new file mode 100644 index 00000000..6afff2fa --- /dev/null +++ b/assets/icons/star-off.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/star.svg b/assets/icons/star.svg new file mode 100644 index 00000000..0a13c9e1 --- /dev/null +++ b/assets/icons/star.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/sticker.svg b/assets/icons/sticker.svg new file mode 100644 index 00000000..66bd1aa3 --- /dev/null +++ b/assets/icons/sticker.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/assets/icons/sun.svg b/assets/icons/sun.svg index b9d5dbdf..8dfd5e3b 100644 --- a/assets/icons/sun.svg +++ b/assets/icons/sun.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file diff --git a/assets/icons/tag.svg b/assets/icons/tag.svg new file mode 100644 index 00000000..e84a0c5c --- /dev/null +++ b/assets/icons/tag.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/text-cursor-input.svg b/assets/icons/text-cursor-input.svg new file mode 100644 index 00000000..7dad7376 --- /dev/null +++ b/assets/icons/text-cursor-input.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/assets/icons/thumbs-down.svg b/assets/icons/thumbs-down.svg new file mode 100644 index 00000000..da523546 --- /dev/null +++ b/assets/icons/thumbs-down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/thumbs-up.svg b/assets/icons/thumbs-up.svg new file mode 100644 index 00000000..8715ad70 --- /dev/null +++ b/assets/icons/thumbs-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/trending.svg b/assets/icons/trending.svg new file mode 100644 index 00000000..314cd1f1 --- /dev/null +++ b/assets/icons/trending.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/triangle-alert.svg b/assets/icons/triangle-alert.svg new file mode 100644 index 00000000..b456b4d4 --- /dev/null +++ b/assets/icons/triangle-alert.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/undo-2.svg b/assets/icons/undo-2.svg new file mode 100644 index 00000000..e2ab153e --- /dev/null +++ b/assets/icons/undo-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/undo.svg b/assets/icons/undo.svg new file mode 100644 index 00000000..396852a4 --- /dev/null +++ b/assets/icons/undo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/unlock.svg b/assets/icons/unlock.svg new file mode 100644 index 00000000..c62caa16 --- /dev/null +++ b/assets/icons/unlock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/usb.svg b/assets/icons/usb.svg deleted file mode 100644 index 1d89050e..00000000 --- a/assets/icons/usb.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/user-key.svg b/assets/icons/user-key.svg deleted file mode 100644 index 72d57dcc..00000000 --- a/assets/icons/user-key.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/assets/icons/user-round-plus.svg b/assets/icons/user-round-plus.svg new file mode 100644 index 00000000..d161a5d0 --- /dev/null +++ b/assets/icons/user-round-plus.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/assets/icons/user-round.svg b/assets/icons/user-round.svg new file mode 100644 index 00000000..5f27e339 --- /dev/null +++ b/assets/icons/user-round.svg @@ -0,0 +1,14 @@ + + + + diff --git a/assets/icons/user.svg b/assets/icons/user.svg new file mode 100644 index 00000000..fd4dea4b --- /dev/null +++ b/assets/icons/user.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/users.svg b/assets/icons/users.svg new file mode 100644 index 00000000..e31958f8 --- /dev/null +++ b/assets/icons/users.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/assets/icons/window-close.svg b/assets/icons/window-close.svg index 9fc48625..4ee8e56f 100644 --- a/assets/icons/window-close.svg +++ b/assets/icons/window-close.svg @@ -1,9 +1 @@ - - - - - - - - - + \ No newline at end of file diff --git a/assets/icons/window-maximize.svg b/assets/icons/window-maximize.svg index 7fdbbd88..b5a32653 100644 --- a/assets/icons/window-maximize.svg +++ b/assets/icons/window-maximize.svg @@ -1,9 +1 @@ - - - - - - - - - + \ No newline at end of file diff --git a/assets/icons/window-minimize.svg b/assets/icons/window-minimize.svg index d6b135d0..fcc1e942 100644 --- a/assets/icons/window-minimize.svg +++ b/assets/icons/window-minimize.svg @@ -1,9 +1 @@ - - - - - - - - - + \ No newline at end of file diff --git a/assets/icons/window-restore.svg b/assets/icons/window-restore.svg index 14016590..f55fa10d 100644 --- a/assets/icons/window-restore.svg +++ b/assets/icons/window-restore.svg @@ -1,10 +1 @@ - - - - - - - - - - + \ No newline at end of file diff --git a/assets/icons/x.svg b/assets/icons/x.svg new file mode 100644 index 00000000..e3179434 --- /dev/null +++ b/assets/icons/x.svg @@ -0,0 +1,14 @@ + + + + diff --git a/assets/icons/zoom.svg b/assets/icons/zoom.svg deleted file mode 100644 index 663232e2..00000000 --- a/assets/icons/zoom.svg +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - diff --git a/crates/assets/Cargo.toml b/crates/assets/Cargo.toml index 2d89f8a8..21b3f8ad 100644 --- a/crates/assets/Cargo.toml +++ b/crates/assets/Cargo.toml @@ -8,3 +8,4 @@ publish.workspace = true gpui.workspace = true anyhow.workspace = true rust-embed.workspace = true +gpui-kit.workspace = true diff --git a/crates/assets/src/lib.rs b/crates/assets/src/lib.rs index a226cfa5..87548ef0 100644 --- a/crates/assets/src/lib.rs +++ b/crates/assets/src/lib.rs @@ -1,7 +1,8 @@ -use anyhow::Context; use gpui::{AssetSource, Result, SharedString}; use rust_embed::RustEmbed; +/// The Lucide icons the app and the kit components draw, vendored so they ship +/// with the binary and resolve like any other coop asset. #[derive(RustEmbed)] #[folder = "../../assets"] #[include = "fonts/**/*"] @@ -10,11 +11,28 @@ use rust_embed::RustEmbed; #[exclude = "*.DS_Store"] pub struct Assets; +/// Coop's bundled assets, with the GPUI Kit component icon bundle as the +/// fallback for any icon not vendored here. +pub struct CombinedAssets; + +impl AssetSource for CombinedAssets { + fn load(&self, path: &str) -> Result>> { + if let Ok(Some(data)) = Assets.load(path) { + return Ok(Some(data)); + } + gpui_kit::assets::Assets.load(path) + } + + fn list(&self, path: &str) -> Result> { + let mut paths = Assets.list(path).unwrap_or_default(); + paths.extend(gpui_kit::assets::Assets.list(path)?); + Ok(paths) + } +} + impl AssetSource for Assets { fn load(&self, path: &str) -> Result>> { - Self::get(path) - .map(|f| Some(f.data)) - .with_context(|| format!("loading asset at path {path:?}")) + Ok(Self::get(path).map(|f| f.data)) } fn list(&self, path: &str) -> Result> { diff --git a/crates/assets/tests/icons.rs b/crates/assets/tests/icons.rs new file mode 100644 index 00000000..f9be2375 --- /dev/null +++ b/crates/assets/tests/icons.rs @@ -0,0 +1,39 @@ +use gpui::AssetSource; + +#[test] +fn icons_resolve_from_the_vendored_folder() { + // Icons coop's code and the kit components draw, served by the vendored + // folder (signed's set, filled with the kit bundle where coop needs more). + let vendored = [ + "icons/search.svg", + "icons/close.svg", + "icons/panel-left.svg", + "icons/window-minimize.svg", + "icons/settings-2.svg", + "icons/x.svg", + "icons/compass.svg", + "icons/radio-tower.svg", + ]; + for path in vendored { + let own = assets::Assets + .load(path) + .unwrap_or_else(|e| panic!("{path} errored in own embed: {e}")); + assert!(own.is_some(), "own embed is missing {path}"); + + let combined = assets::CombinedAssets.load(path).unwrap(); + assert!(combined.is_some(), "CombinedAssets fails to serve {path}"); + } + + // Coop's own files still load through the combined source. + let own = [ + "brand/coop.svg", + "brand/bg1.jpg", + "fonts/Inter/Inter-Medium.ttf", + ]; + for path in own { + assert!( + matches!(assets::CombinedAssets.load(path), Ok(Some(_))), + "CombinedAssets fails to serve coop asset {path}" + ); + } +} diff --git a/crates/chat/src/message.rs b/crates/chat/src/message.rs index 8b30bcdf..ce1c1552 100644 --- a/crates/chat/src/message.rs +++ b/crates/chat/src/message.rs @@ -1,16 +1,13 @@ use std::hash::Hash; use std::ops::Range; -use common::{EventExt, NostrParser, emojis_from_tags, extract_and_remove_media_urls}; +use common::{EventExt, NostrParser, emojis_from_tags, extract_and_remove_media_urls, nevent_refs}; use gpui::{SharedString, SharedUri}; use nostr_sdk::prelude::*; use state::FileAttachment; pub(crate) const KIND_FILE_MESSAGE: Kind = Kind::Custom(15); -const SCHEME_WITH_COLON: &str = "nostr:"; -const NEVENT_PREFIX: &str = "nevent1"; - /// Rendered message. #[derive(Debug, Clone)] pub struct Message { @@ -248,61 +245,6 @@ fn extract_mentions(content: &str) -> Vec { .collect() } -/// A `nevent` reference found in a content string. -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct NeventRef { - /// Range of the reference, including the optional `nostr:` scheme - pub range: Range, - /// Compact display label, like `https://njump.me/nevent1...d9sp` - pub label: String, -} - -/// Extracts valid `nevent1...` and `nostr:nevent1...` references from content. -pub fn nevent_refs(content: &str) -> Vec { - let mut references = Vec::new(); - - for (match_start, _) in content.match_indices(NEVENT_PREFIX) { - // Only lowercase references are matched, matching NIP-19 encodings in practice - let start = if content[..match_start].ends_with(SCHEME_WITH_COLON) { - match_start - SCHEME_WITH_COLON.len() - } else { - match_start - }; - - // Skip matches glued to word characters, like the `nevent1` in `xnevent1...` - if content[..start].ends_with(char::is_alphanumeric) { - continue; - } - - let end = match_start - + content[match_start..] - .bytes() - .take_while(u8::is_ascii_alphanumeric) - .count(); - - // The bech32 token excludes the optional `nostr:` scheme - let bech32 = &content[match_start..end]; - if Nip19Event::from_bech32(bech32).is_err() { - continue; - } - - references.push(NeventRef { - range: start..end, - label: nevent_label(bech32), - }); - } - - references -} - -/// Compact display of a nevent link, like `https://njump.me/nevent1...d9sp`. -fn nevent_label(bech32: &str) -> String { - match bech32.len() { - 0..=4 => format!("https://njump.me/{bech32}"), - _ => format!("https://njump.me/nevent1...{}", &bech32[bech32.len() - 4..]), - } -} - /// Extracts all reply (ids) from the event tags. fn extract_reply_ids(inner: &Tags) -> Vec { let mut replies_to = vec![]; diff --git a/crates/chat_ui/Cargo.toml b/crates/chat_ui/Cargo.toml index 193b0aaa..810ba59e 100644 --- a/crates/chat_ui/Cargo.toml +++ b/crates/chat_ui/Cargo.toml @@ -7,7 +7,7 @@ publish.workspace = true [dependencies] state = { path = "../state" } ui = { path = "../ui" } -theme = { path = "../theme" } +gpui-kit.workspace = true common = { path = "../common" } person = { path = "../person" } chat = { path = "../chat" } diff --git a/crates/chat_ui/src/lib.rs b/crates/chat_ui/src/lib.rs index bf12d6e8..a3c853b5 100644 --- a/crates/chat_ui/src/lib.rs +++ b/crates/chat_ui/src/lib.rs @@ -9,12 +9,21 @@ use common::{TimestampExt, emojis_from_tags}; use gpui::prelude::FluentBuilder; use gpui::{ AnyElement, App, AppContext, ClipboardItem, Context, Entity, EventEmitter, FocusHandle, - Focusable, ImageSource, InteractiveElement, IntoElement, ListAlignment, ListOffset, ListState, - MouseButton, ObjectFit, ParentElement, PathPromptOptions, Render, SharedString, SharedUri, + Focusable, InteractiveElement, IntoElement, ListAlignment, ListOffset, ListState, MouseButton, + ObjectFit, ParentElement, PathPromptOptions, Render, SharedString, SharedUri, StatefulInteractiveElement, Styled, StyledImage, Subscription, SystemNotification, SystemNotificationAction, Task, WeakEntity, Window, div, img, list, px, red, relative, retain_all, svg, white, }; +use gpui_kit::base::StyledExt as _; +use gpui_kit::component::button::{Button, ButtonVariants}; +use gpui_kit::component::dock::{Panel, PanelEvent}; +use gpui_kit::component::input::{Input, InputEvent, InputState, Textarea, TextareaState}; +use gpui_kit::component::menu::DropdownMenu; +use gpui_kit::component::notification::Notification; +use gpui_kit::component::scroll::Scrollbar; +use gpui_kit::component::tooltip::Tooltip; +use gpui_kit::component::{ActiveTheme, Disableable, Icon, Sizable, WindowExt, h_flex, v_flex}; use itertools::Itertools; use nostr_sdk::prelude::*; use person::{Directory, Person}; @@ -24,25 +33,13 @@ use smallvec::{SmallVec, smallvec}; use state::{ FileAttachment, NostrRegistry, download_and_decrypt_to_file, upload, upload_encrypted, }; -use theme::{ActiveTheme, TextStyle, Typeset as _}; -use ui::avatar::Avatar; -use ui::button::{Button, ButtonVariants}; -use ui::dock::{Panel, PanelEvent}; -use ui::input::{Input, InputEvent, InputState, Textarea, TextareaState}; -use ui::menu::DropdownMenu; -use ui::message::{ - MessageMedia, MessageRow, ReactionBar, ReplyPreview, WelcomeMessage, group_reactions, opens_run, +use ui::{ + Avatar, COMPACT_REACTION_EMOJIS, IconName, MessageActions, MessageMedia, MessageRow, + REACTION_EMOJIS, ReactionBar, RenderedText, ReplyPreview, WelcomeMessage, group_reactions, + opens_run, rendered_text, }; -use ui::notification::Notification; -use ui::scroll::Scrollbar; -use ui::tooltip::Tooltip; -use ui::{Disableable, Icon, IconName, Sizable, StyledExt, WindowExtension, h_flex, v_flex}; use crate::file::*; -use crate::text::RenderedText; - -const REACTION_EMOJIS: &[&str] = &["👍", "👎", "😄", "🎉", "😕", "❤️", "🚀", "👀"]; -const COMPACT_REACTION_EMOJIS: &[&str] = &["👍", "❤️", "👀"]; /// Notice shown when a conversation has no messages, and above the message list. const PRIVATE_NOTICE: &str = @@ -59,7 +56,6 @@ static CUSTOM_EMOJI_RE: LazyLock = mod actions; mod file; -pub mod text; pub fn init(room: WeakEntity, window: &mut Window, cx: &mut App) -> Entity { cx.new(|cx| ChatPanel::new(room, window, cx)) @@ -126,6 +122,11 @@ pub struct ChatPanel { } impl ChatPanel { + /// The room this panel displays, used to dedupe open tabs. + pub fn room_id(&self) -> &SharedString { + &self.id + } + pub fn new(room: WeakEntity, window: &mut Window, cx: &mut Context) -> Self { // Define attachments and replies_to entities let attachments = cx.new(|_| vec![]); @@ -916,7 +917,7 @@ impl ChatPanel { let seen_on = chat.read(cx).rumor_seen_on(id); window.open_dialog(cx, move |this, _window, cx| { - this.title("Seen on").show_close(true).child( + this.title("Seen on").close_button(true).child( v_flex() .gap_1() .when_none(&seen_on, |this| { @@ -924,9 +925,9 @@ impl ChatPanel { h_flex() .h_10() .justify_center() - .text_style(TextStyle::Callout) - .bg(cx.theme().surface_raised) - .rounded(px(theme::panel_radius())) + .text_xs() + .bg(cx.theme().secondary) + .rounded(cx.theme().radius_lg) .child("Message isn't traced yet"), ) }) @@ -939,10 +940,10 @@ impl ChatPanel { h_flex() .h_7() .px_2() - .gap(px(theme::SPACE)) - .bg(cx.theme().surface_raised) - .rounded(px(theme::control_radius())) - .text_style(TextStyle::Callout) + .gap_2() + .bg(cx.theme().secondary) + .rounded(cx.theme().radius) + .text_xs() .child(div().size_1p5().rounded_full().bg(gpui::green())) .child(SharedString::from(url.to_string())), ); @@ -962,7 +963,7 @@ impl ChatPanel { let relays = profile.messaging_relays(); this.title("Messaging Relays") - .show_close(true) + .close_button(true) .child(v_flex().gap_1().children({ let mut items = vec![]; @@ -971,10 +972,10 @@ impl ChatPanel { h_flex() .h_7() .px_2() - .gap(px(theme::SPACE)) - .bg(cx.theme().surface_raised) - .rounded(px(theme::control_radius())) - .text_style(TextStyle::Callout) + .gap_2() + .bg(cx.theme().secondary) + .rounded(cx.theme().radius) + .text_xs() .child(div().size_1p5().rounded_full().bg(gpui::green())) .child(SharedString::from(url.to_string())), ); @@ -996,7 +997,7 @@ impl ChatPanel { svg() .path("brand/coop.svg") .size_12() - .text_color(cx.theme().surface_raised), + .text_color(cx.theme().secondary), ) .message(PRIVATE_NOTICE) .into_any_element() @@ -1011,14 +1012,14 @@ impl ChatPanel { .items_center() .justify_center() .text_center() - .text_style(TextStyle::Caption) - .text_color(cx.theme().text_faint) + .text_xs() + .text_color(cx.theme().muted_foreground) .line_height(relative(1.3)) .child( svg() .path("brand/coop.svg") .size_12() - .text_color(cx.theme().element_active), + .text_color(cx.theme().list_active), ) .child(PRIVATE_NOTICE) .into_any_element() @@ -1034,14 +1035,14 @@ impl ChatPanel { h_flex() .w_full() .gap_3() - .text_style(TextStyle::Callout) + .text_xs() .child( h_flex() .flex_shrink_0() .size_8() .justify_center() .rounded_full() - .bg(cx.theme().warning_muted) + .bg(cx.theme().warning.opacity(0.15)) .text_color(cx.theme().warning) .child(Icon::new(IconName::Warning).small()), ) @@ -1101,9 +1102,12 @@ impl ChatPanel { .rendered_texts_by_id .entry(message.id) .or_insert_with(|| { - text::rendered_text( + rendered_text( &message.content, - &message.mentions, + message + .mentions + .iter() + .map(|mention| (mention.range.clone(), mention.public_key)), &message.emojis, &directory, cx, @@ -1148,6 +1152,7 @@ impl ChatPanel { .avatar( Avatar::new(author.avatar()) .seed(author.avatar_seed()) + .small() .flex_shrink_0() .relative() .dropdown_menu(move |this, _window, _cx| { @@ -1173,7 +1178,7 @@ impl ChatPanel { .when(has_reactions, |this| this.child(reactions)) .overlay( div() - .group_hover("", |this| this.bg(cx.theme().element_active)) + .group_hover("", |this| this.bg(cx.theme().list_active)) .absolute() .left_0() .top_0() @@ -1247,7 +1252,7 @@ impl ChatPanel { div() .id(SharedString::from(id.to_hex())) .child(label) - .when(failed, |this| this.text_color(cx.theme().danger_muted)) + .when(failed, |this| this.text_color(cx.theme().danger)) .when_some(reports, |this, reports| { this.when(!pending, |this| { this.on_click(move |_e, window, cx| { @@ -1265,7 +1270,7 @@ impl ChatPanel { .unwrap_or_default(); this.title(SharedString::from("Sent Reports")) - .show_close(true) + .close_button(true) .child(v_flex().gap_4().children(items)) }); }) @@ -1279,12 +1284,12 @@ impl ChatPanel { let avatar = profile.avatar(); v_flex() - .gap(px(theme::SPACE)) + .gap_2() .w_full() .child( h_flex() - .gap(px(theme::SPACE)) - .text_style(TextStyle::Callout) + .gap_2() + .text_xs() .child(SharedString::from("Sent to:")) .child( h_flex() @@ -1302,9 +1307,9 @@ impl ChatPanel { .p_1() .h_16() .w_full() - .text_style(TextStyle::Callout) - .rounded(px(theme::surface_radius())) - .bg(cx.theme().warning_muted) + .text_xs() + .rounded(cx.theme().radius_lg) + .bg(cx.theme().warning.opacity(0.15)) .text_color(cx.theme().warning) .child(div().flex_1().w_full().text_center().child(error)), ) @@ -1312,7 +1317,7 @@ impl ChatPanel { .when_some(report.output().cloned(), |this, output| { this.child( v_flex() - .gap(px(theme::SPACE)) + .gap_2() .w_full() .children({ let mut items = Vec::with_capacity(output.failed.len()); @@ -1323,19 +1328,19 @@ impl ChatPanel { .gap_0p5() .p_1() .w_full() - .rounded(px(theme::surface_radius())) + .rounded(cx.theme().radius_lg) .bg(cx.theme().danger.opacity(0.06)) .child( div() - .text_style(TextStyle::Caption) + .text_xs() .font_semibold() .line_height(relative(1.25)) .child(SharedString::from(url.to_string())), ) .child( div() - .text_style(TextStyle::Caption) - .text_color(cx.theme().danger_muted.opacity(0.9)) + .text_xs() + .text_color(cx.theme().danger.opacity(0.9)) .line_height(relative(1.25)) .child(SharedString::from(msg.to_string())), ), @@ -1353,18 +1358,18 @@ impl ChatPanel { .gap_0p5() .p_1() .w_full() - .rounded(px(theme::surface_radius())) - .bg(cx.theme().surface_card) + .rounded(cx.theme().radius_lg) + .bg(cx.theme().muted) .child( div() - .text_style(TextStyle::Caption) + .text_xs() .font_semibold() .line_height(relative(1.25)) .child(SharedString::from(url.0.to_string())), ) .child( div() - .text_style(TextStyle::Caption) + .text_xs() .line_height(relative(1.25)) .child(SharedString::from("Successfully")), ), @@ -1384,83 +1389,34 @@ impl ChatPanel { public_key: &PublicKey, cx: &Context, ) -> impl IntoElement { - h_flex() - .p_0p5() - .gap_1() - .invisible() - .absolute() - .right_4() - .top_neg_2() - .when(cx.theme().shadow, |this| this.shadow_sm()) - .rounded(px(theme::surface_radius())) - .border_1() - .border_color(cx.theme().border) - .bg(cx.theme().bg) - .children({ - let mut items = vec![]; + let mut actions = MessageActions::new(); - for emoji in COMPACT_REACTION_EMOJIS { - items.push( - Button::new(*emoji) - .label(*emoji) - .tooltip(*emoji) - .small() - .ghost() - .on_click({ - let emoji = *emoji; - let id = *id; - cx.listener(move |this, _event, window, cx| { - this.send_reaction(emoji, &id, window, cx); - }) - }), - ); - } + for emoji in COMPACT_REACTION_EMOJIS { + let id = *id; + actions = actions.reaction( + emoji, + cx.listener(move |this, _event, window, cx| { + this.send_reaction(emoji, &id, window, cx); + }), + ); + } - items + let reply_id = *id; + let copy_id = *id; + let dropdown_id = *id; + let public_key = *public_key; + + actions + .reply(cx.listener(move |this, _event, _window, cx| { + this.reply_to(&reply_id, cx); + })) + .copy(cx.listener(move |this, _event, _window, cx| { + this.copy_message(©_id, cx); + })) + .dropdown(move |menu, _window, _cx| { + menu.menu("Copy author", Box::new(Command::Copy(public_key))) + .menu("Seen on", Box::new(Command::Trace(dropdown_id))) }) - .child(div().flex_shrink_0().h_4().w_px().bg(cx.theme().border)) - .child( - Button::new("reply") - .icon(IconName::Reply) - .tooltip("Reply") - .small() - .ghost() - .on_click({ - let id = id.to_owned(); - cx.listener(move |this, _event, _window, cx| { - this.reply_to(&id, cx); - }) - }), - ) - .child( - Button::new("copy") - .icon(IconName::Copy) - .tooltip("Copy") - .small() - .ghost() - .on_click({ - let id = id.to_owned(); - cx.listener(move |this, _event, _window, cx| { - this.copy_message(&id, cx); - }) - }), - ) - .child(div().flex_shrink_0().h_4().w_px().bg(cx.theme().border)) - .child( - Button::new("advance") - .icon(IconName::Ellipsis) - .small() - .ghost() - .dropdown_menu({ - let public_key = *public_key; - let id = *id; - move |this, _window, _cx| { - this.menu("Copy author", Box::new(Command::Copy(public_key))) - .menu("Seen on", Box::new(Command::Trace(id))) - } - }), - ) - .group_hover("", |this| this.visible()) } fn render_attachment(&self, url: &Url, cx: &Context) -> impl IntoElement { @@ -1472,7 +1428,7 @@ impl ChatPanel { img(url.as_str()) .size_16() .when(cx.theme().shadow, |this| this.shadow_lg()) - .rounded(px(theme::control_radius())) + .rounded(cx.theme().radius) .object_fit(ObjectFit::Cover), ) .child( @@ -1530,10 +1486,10 @@ impl ChatPanel { .child( img(path.clone()) .border_1() - .border_color(cx.theme().border_faint) + .border_color(cx.theme().border) .h(px(250.)) .object_fit(ObjectFit::Cover) - .rounded(px(theme::bubble_radius())), + .rounded(cx.theme().radius_lg), ) .into_any_element(); } @@ -1561,22 +1517,22 @@ impl ChatPanel { .self_start() .items_start() .min_w_0() - .gap(px(theme::SPACE)) + .gap_2() .p_2() .border_1() - .border_color(cx.theme().border_faint) - .rounded(px(theme::control_radius())) - .child(Icon::new(IconName::Lock).text_color(cx.theme().accent)) + .border_color(cx.theme().border) + .rounded(cx.theme().radius) + .child(Icon::new(IconName::Lock).text_color(cx.theme().primary)) .child( v_flex() .min_w_0() .overflow_hidden() - .text_style(TextStyle::Callout) + .text_xs() .child(div().line_height(relative(1.2)).child(file.display_name())) .child( div() - .text_style(TextStyle::Caption) - .text_color(cx.theme().text_faint) + .text_xs() + .text_color(cx.theme().muted_foreground) .child(label), ), ) @@ -1600,14 +1556,14 @@ impl ChatPanel { .id(SharedString::from(file.url.to_string())) .relative() .w_16() - .tooltip(move |window, cx| Tooltip::new(label.clone(), window, cx).into()) + .tooltip(move |window, cx| Tooltip::new(label.clone()).build(window, cx)) .map(|this| { if file.is_image() { this.child( img(pending.path.clone()) .size_16() .when(cx.theme().shadow, |this| this.shadow_sm()) - .rounded(px(theme::control_radius())) + .rounded(cx.theme().radius) .object_fit(ObjectFit::Cover), ) } else { @@ -1617,11 +1573,11 @@ impl ChatPanel { .flex() .items_center() .justify_center() - .rounded(px(theme::control_radius())) + .rounded(cx.theme().radius) .border_1() - .border_color(cx.theme().border_faint) - .bg(cx.theme().surface) - .text_style(TextStyle::Caption) + .border_color(cx.theme().border) + .bg(cx.theme().sidebar) + .text_xs() .text_center() .child("Preview not available"), ) @@ -1637,7 +1593,7 @@ impl ChatPanel { .justify_center() .rounded_full() .border_1() - .border_color(cx.theme().border_faint) + .border_color(cx.theme().border) .bg(gpui::green()) .child(Icon::new(IconName::Lock).size_2().text_color(gpui::white())), ) @@ -1671,7 +1627,7 @@ impl ChatPanel { .w_full() .pl_2() .border_l_2() - .border_color(cx.theme().element_active) + .border_color(cx.theme().list_active) .child( h_flex() .justify_between() @@ -1680,10 +1636,10 @@ impl ChatPanel { .flex() .items_baseline() .gap_1() - .text_style(TextStyle::Caption) - .text_color(cx.theme().text_muted) + .text_xs() + .text_color(cx.theme().muted_foreground) .child("Replying to:") - .child(div().text_color(cx.theme().accent).child(profile.name())), + .child(div().text_color(cx.theme().primary).child(profile.name())), ) .child( Button::new("remove-reply") @@ -1701,7 +1657,7 @@ impl ChatPanel { .child( div() .w_full() - .text_style(TextStyle::Callout) + .text_xs() .text_ellipsis() .line_clamp(1) .child(text.preview()), @@ -1738,7 +1694,6 @@ impl ChatPanel { .icon(IconName::Settings2) .tooltip("Configuration") .ghost() - .large() .dropdown_menu(move |this, _window, _cx| { let auto = matches!(signer_kind, SignerKind::Auto); let encryption = matches!(signer_kind, SignerKind::Encryption); @@ -1786,13 +1741,10 @@ impl ChatPanel { Button::new("emoji") .icon(IconName::Emoji) .ghost() - .large() .dropdown_menu_with_anchor(gpui::Anchor::BottomLeft, move |this, _window, _cx| { - let menu = REACTION_EMOJIS - .iter() - .fold(this.horizontal(), |this, emoji| { - this.menu(*emoji, Box::new(Command::Insert(emoji.to_string()))) - }); + let menu = REACTION_EMOJIS.iter().fold(this, |this, emoji| { + this.menu(*emoji, Box::new(Command::Insert(emoji.to_string()))) + }); emojis.iter().fold(menu, |this, (shortcode, _)| { let label = format!(":{shortcode}:"); @@ -1802,37 +1754,37 @@ impl ChatPanel { } } -impl Panel for ChatPanel { - fn panel_id(&self) -> SharedString { - self.id.clone() +impl gpui_kit::component::dock::BasePanel for ChatPanel { + fn panel_name(&self) -> &'static str { + "ChatPanel" } +} - fn title(&self, cx: &App) -> AnyElement { +impl Panel for ChatPanel { + fn title(&mut self, _window: &mut Window, cx: &mut Context) -> impl IntoElement { self.room .read_with(cx, |this, cx| { let label = this.display_name(cx); - let picture = this.display_image(cx); let seed = this.display_image_seed(cx); h_flex() .gap_1() - .text_style(TextStyle::Caption) - .child(Avatar::new(picture).seed(seed).xsmall()) + .text_xs() + .child(Avatar::new(this.display_image(cx)).seed(seed).xsmall()) .child(label) .into_any_element() }) - .unwrap_or( - div() - .text_style(TextStyle::Caption) - .child("Unknown") - .into_any_element(), - ) + .unwrap_or(div().text_xs().child("Unknown").into_any_element()) } - fn toolbar_buttons(&self, _window: &Window, _cx: &App) -> Vec
{ - let wallpaper = group - .active_panel() - .and_then(|panel| panel_background(panel, cx)); - - div() - .id("tab-panel") - .relative() - .when_some(wallpaper, |this, source| this.child(background(source, cx))) - .when(!group.is_collapsed(), |this| { - this.on_action({ - let group = TabGroupContext::clone(group); - move |_: &ToggleZoom, window, cx| group.toggle_zoom(window, cx) - }) - .on_action({ - let group = TabGroupContext::clone(group); - move |_: &ClosePanel, window, cx| { - let Some(panel) = group.active_panel() else { - return; - }; - let panel = panel.panel_id(cx); - group.close(panel, window, cx); - } - }) - }) - } - - fn render_tab_bar( - &self, - group: &TabGroupContext, - window: &mut Window, - cx: &mut App, - ) -> AnyElement { - // The plain left group draws bare so its content can own the window's top-left corner. - if self.is_plain_left_group(group, cx) { - return Empty.into_any_element(); - } - - let visible: Vec = group - .panels() - .iter() - .enumerate() - .filter(|(_, panel)| panel.visible(cx)) - .map(|(ix, _)| ix) - .collect(); - - let active_ix = group.active_ix(); - if self.last_active_ix.replace(Some(active_ix)) != Some(active_ix) - && let Some(visible_ix) = visible.iter().position(|ix| *ix == active_ix) - { - self.scroll_handle.scroll_to_item(visible_ix); - } - - if visible.is_empty() { - return Empty.into_any_element(); - } - - self.render_tabs(group, visible.as_slice(), window, cx) - } - - fn render_active_panel( - &self, - panel: AnyView, - group: &TabGroupContext, - _: &mut Window, - cx: &mut App, - ) -> AnyElement { - if group.is_collapsed() { - return Empty.into_any_element(); - } - - let wallpaper = group - .active_panel() - .and_then(|active| panel_background(active, cx)) - .is_some(); - - v_flex() - .id("tab-content") - .group("") - .overflow_hidden() - .flex_1() - .child( - div() - .size_full() - .when(!wallpaper, |this| this.bg(cx.theme().bg)) - .overflow_hidden() - .child(panel.cached(StyleRefinement::default().v_flex().size_full())), - ) - .into_any_element() - } - - fn render_drop_indicator( - &self, - indicator: DropIndicator, - _: &mut Window, - cx: &mut App, - ) -> Option { - let size = indicator.bounds().size; - let fraction = 0.35; - - let (left, top, width, height) = match indicator.placement() { - Some(Placement::Left) => (px(0.), px(0.), size.width * fraction, size.height), - Some(Placement::Right) => ( - size.width * (1. - fraction), - px(0.), - size.width * fraction, - size.height, - ), - Some(Placement::Top) => (px(0.), px(0.), size.width, size.height * fraction), - Some(Placement::Bottom) => ( - px(0.), - size.height * (1. - fraction), - size.width, - size.height * fraction, - ), - None => (px(0.), px(0.), size.width, size.height), - }; - - Some( - div() - .absolute() - .left(left) - .top(top) - .w(width) - .h(height) - .rounded(px(panel_radius())) - .border_1() - .border_color(cx.theme().drop_line) - .bg(cx.theme().drop_target) - .into_any_element(), - ) - } -} - -fn tab_drag(group: &TabGroupContext, ix: usize, cx: &App) -> Option { - group - .is_draggable() - .then(|| group.drag_panel(ix, cx)) - .flatten() -} - -fn panel_title(panel: &Arc, cx: &App) -> AnyElement { - match PanelHandle::of(panel) { - Some(handle) => handle.panel().title(cx), - None => SharedString::from(panel.panel_name(cx)).into_any_element(), - } -} - -fn panel_background(panel: &Arc, cx: &App) -> Option { - PanelHandle::of(panel).and_then(|handle| handle.panel().background(cx)) -} diff --git a/crates/ui/src/dock/panel.rs b/crates/ui/src/dock/panel.rs deleted file mode 100644 index 4900f8c2..00000000 --- a/crates/ui/src/dock/panel.rs +++ /dev/null @@ -1,205 +0,0 @@ -use std::any::Any; -use std::sync::Arc; - -use gpui::{ - AnyElement, AnyView, App, Context, Element, Entity, EventEmitter, FocusHandle, Focusable, - ImageSource, Render, SharedString, Window, -}; -use gpui_base::dock::{PanelId, PanelState}; - -use crate::button::Button; - -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum PanelEvent {} - -pub trait Panel: EventEmitter + Render + Focusable { - /// The name of the panel used to serialize, deserialize and identify the panel. - fn panel_id(&self) -> SharedString; - - /// The title of the panel - fn title(&self, _cx: &App) -> AnyElement { - SharedString::from("Unnamed").into_any() - } - - /// Whether the panel can be closed, default is `true`. - fn closable(&self, _cx: &App) -> bool { - true - } - - /// Whether the panel is zoomable, default is `true`. - fn zoomable(&self, _cx: &App) -> bool { - true - } - - /// Return false to hide panel, true to show panel, default is `true`. - fn visible(&self, _cx: &App) -> bool { - true - } - - /// Set active state of the panel. - fn set_active(&self, _active: bool, _window: &mut Window, _cx: &mut App) {} - - /// Called when the panel leaves the dock. - fn on_removed(&mut self, _window: &mut Window, _cx: &mut Context) {} - - /// Set zoomed state of the panel. - fn set_zoomed(&self, _zoomed: bool, _cx: &mut App) {} - - /// Toolbar buttons shown at the right of the title bar. - fn toolbar_buttons(&self, _window: &Window, _cx: &App) -> Vec