chore: update deps

This commit is contained in:
2025-10-07 14:45:44 +07:00
parent 6e7f63d79a
commit b7693444e6
11 changed files with 599 additions and 474 deletions

1032
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -23,14 +23,9 @@ reqwest_client = { git = "https://github.com/zed-industries/zed" }
# Nostr # Nostr
nostr = { git = "https://github.com/rust-nostr/nostr" } nostr = { git = "https://github.com/rust-nostr/nostr" }
nostr-lmdb = { git = "https://github.com/rust-nostr/nostr" }
nostr-connect = { 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", features = [ nostr-sdk = { git = "https://github.com/rust-nostr/nostr", features = [ "nip96", "nip59", "nip49", "nip44" ] }
"lmdb",
"nip96",
"nip59",
"nip49",
"nip44",
] }
# Others # Others
anyhow = "1.0.44" anyhow = "1.0.44"

View File

@@ -6,6 +6,7 @@ publish.workspace = true
[dependencies] [dependencies]
nostr-sdk.workspace = true nostr-sdk.workspace = true
nostr-lmdb.workspace = true
dirs.workspace = true dirs.workspace = true
smol.workspace = true smol.workspace = true
flume.workspace = true flume.workspace = true

View File

@@ -4,6 +4,7 @@ use std::sync::OnceLock;
use std::time::Duration; use std::time::Duration;
use flume::{Receiver, Sender}; use flume::{Receiver, Sender};
use nostr_lmdb::NostrLMDB;
use nostr_sdk::prelude::*; use nostr_sdk::prelude::*;
use paths::nostr_file; use paths::nostr_file;
use smol::lock::RwLock; use smol::lock::RwLock;

View File

@@ -29,5 +29,5 @@ once_cell = "1.19.0"
image = "0.25.1" image = "0.25.1"
linkify = "0.10.0" linkify = "0.10.0"
lsp-types = "0.97.0" lsp-types = "0.97.0"
rope = { git = "https://github.com/zed-industries/zed.git" } rope = { git = "https://github.com/zed-industries/zed" }
sum_tree = { git = "https://github.com/zed-industries/zed.git" } zed-sum-tree = { git = "https://github.com/zed-industries/zed" }

View File

@@ -299,8 +299,8 @@ impl Dock {
.read(cx); .read(cx);
let area_bounds = dock_area.bounds; let area_bounds = dock_area.bounds;
let mut left_dock_size = Pixels(0.0); let mut left_dock_size = px(0.0);
let mut right_dock_size = Pixels(0.0); let mut right_dock_size = px(0.0);
// Get the size of the left dock if it's open and not the current dock // Get the size of the left dock if it's open and not the current dock
if let Some(left_dock) = &dock_area.left_dock { if let Some(left_dock) = &dock_area.left_dock {

View File

@@ -128,7 +128,7 @@ impl RopeExt for Rope {
fn offset_to_position(&self, offset: usize) -> Position { fn offset_to_position(&self, offset: usize) -> Position {
let point = self.offset_to_point(offset); let point = self.offset_to_point(offset);
let line = self.line(point.row as usize); let line = self.line(point.row as usize);
let column = line.clip_offset(point.column as usize, sum_tree::Bias::Left); let column = line.clip_offset(point.column as usize, zed_sum_tree::Bias::Left);
let character = line.slice(0..column).chars().count(); let character = line.slice(0..column).chars().count();
Position::new(point.row, character as u32) Position::new(point.row, character as u32)
} }
@@ -162,7 +162,7 @@ impl RopeExt for Rope {
return None; return None;
} }
let offset = self.clip_offset(offset, sum_tree::Bias::Left); let offset = self.clip_offset(offset, zed_sum_tree::Bias::Left);
self.slice(offset..self.len()).chars().next() self.slice(offset..self.len()).chars().next()
} }
@@ -171,7 +171,7 @@ impl RopeExt for Rope {
return None; return None;
} }
let offset = self.clip_offset(offset, sum_tree::Bias::Left); let offset = self.clip_offset(offset, zed_sum_tree::Bias::Left);
let mut left = String::new(); let mut left = String::new();
for c in self.reversed_chars_at(offset) { for c in self.reversed_chars_at(offset) {

View File

@@ -14,8 +14,8 @@ use lsp_types::Position;
use rope::{OffsetUtf16, Rope}; use rope::{OffsetUtf16, Rope};
use serde::Deserialize; use serde::Deserialize;
use smallvec::SmallVec; use smallvec::SmallVec;
use sum_tree::Bias;
use unicode_segmentation::*; use unicode_segmentation::*;
use zed_sum_tree::Bias;
use super::blink_cursor::BlinkCursor; use super::blink_cursor::BlinkCursor;
use super::change::Change; use super::change::Change;
@@ -481,7 +481,7 @@ impl InputState {
for (line_index, line) in last_layout.lines.iter().enumerate() { for (line_index, line) in last_layout.lines.iter().enumerate() {
let local_offset = offset.saturating_sub(prev_lines_offset); let local_offset = offset.saturating_sub(prev_lines_offset);
if let Some(pos) = line.position_for_index(local_offset, line_height) { if let Some(pos) = line.position_for_index(local_offset, line_height) {
let sub_line_index = (pos.y.0 / line_height.0) as usize; let sub_line_index = (pos.y.signum() / line_height.signum()) as usize;
let adjusted_pos = point(pos.x + last_layout.line_number_width, pos.y + y_offset); let adjusted_pos = point(pos.x + last_layout.line_number_width, pos.y + y_offset);
return (line_index, sub_line_index, Some(adjusted_pos)); return (line_index, sub_line_index, Some(adjusted_pos));
} }

View File

@@ -247,7 +247,7 @@ impl ResizablePanelGroup {
} }
// If total size exceeds container size, adjust the main panel // If total size exceeds container size, adjust the main panel
let total_size: Pixels = new_sizes.iter().map(|s| s.0).sum::<f32>().into(); let total_size: Pixels = new_sizes.iter().map(|s| s.signum()).sum::<f32>().into();
if total_size > container_size { if total_size > container_size {
let overflow = total_size - container_size; let overflow = total_size - container_size;
new_sizes[main_ix] = (new_sizes[main_ix] - overflow).max(PANEL_MIN_SIZE); new_sizes[main_ix] = (new_sizes[main_ix] - overflow).max(PANEL_MIN_SIZE);

View File

@@ -18,12 +18,12 @@ const WIDTH: Pixels = px(2. * 2. + 8.);
const MIN_THUMB_SIZE: f32 = 48.; const MIN_THUMB_SIZE: f32 = 48.;
const THUMB_WIDTH: Pixels = px(6.); const THUMB_WIDTH: Pixels = px(6.);
const THUMB_RADIUS: Pixels = Pixels(6. / 2.); const THUMB_RADIUS: Pixels = px(6. / 2.);
const THUMB_INSET: Pixels = Pixels(2.); const THUMB_INSET: Pixels = px(2.);
const THUMB_ACTIVE_WIDTH: Pixels = px(8.); const THUMB_ACTIVE_WIDTH: Pixels = px(8.);
const THUMB_ACTIVE_RADIUS: Pixels = Pixels(8. / 2.); const THUMB_ACTIVE_RADIUS: Pixels = px(8. / 2.);
const THUMB_ACTIVE_INSET: Pixels = Pixels(2.); const THUMB_ACTIVE_INSET: Pixels = px(2.);
const FADE_OUT_DURATION: f32 = 3.0; const FADE_OUT_DURATION: f32 = 3.0;
const FADE_OUT_DELAY: f32 = 2.0; const FADE_OUT_DELAY: f32 = 2.0;

View File

@@ -6,7 +6,7 @@ use gpui::{
}; };
use theme::{CLIENT_SIDE_DECORATION_ROUNDING, CLIENT_SIDE_DECORATION_SHADOW}; use theme::{CLIENT_SIDE_DECORATION_ROUNDING, CLIENT_SIDE_DECORATION_SHADOW};
const WINDOW_BORDER_WIDTH: Pixels = Pixels(1.0); const WINDOW_BORDER_WIDTH: Pixels = px(1.0);
/// Create a new window border. /// Create a new window border.
pub fn window_border() -> WindowBorder { pub fn window_border() -> WindowBorder {