1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! # iced_palette
//!
//! A command palette library for Iced applications.
//!
//! ## Quick Start (Widget API)
//!
//! ```rust,ignore
//! use iced_palette::{Palette, PaletteState, Command, command};
//!
//! // In your application state:
//! struct App {
//! palette: PaletteState,
//! }
//!
//! // Define commands:
//! let commands = vec![
//! command("save", "Save File")
//! .description("Save the current file")
//! .action(Message::Save),
//! ];
//!
//! // In your view:
//! if self.palette.is_open() {
//! stack![
//! main_content,
//! Palette::new(&self.palette, &commands)
//! .on_query_change(Message::QueryChanged)
//! .on_select(|id| Message::CommandSelected(id))
//! .on_close(|| Message::PaletteClosed)
//! ]
//! }
//! ```
//!
//! ## Helper Functions API (simpler, for external state management)
//!
//! ```rust,ignore
//! use iced_palette::{command_palette, Command, command};
//!
//! // In your view, use the command_palette helper
//! if palette_is_open {
//! stack!(main_view, command_palette(...))
//! }
//! ```
// Widget API (recommended)
pub use ;
// Command types
pub use ;
// Helper functions API (for simpler use cases)
pub use ;
// Search utilities
pub use ;
// Subscription helpers
pub use ;