| 1 | [package] |
| 2 | description = "GPUI Component: the styled component library of GPUI Kit, with 60+ desktop UI components for GPUI." |
| 3 | keywords = ["desktop", "gpui", "shadcn", "ui", "uikit"] |
| 4 | license = "Apache-2.0" |
| 5 | name = "gpui-component" |
| 6 | documentation = "https://docs.rs/gpui-component" |
| 7 | homepage = "https://gpui-kit.com" |
| 8 | repository = "https://github.com/longbridge/gpui-kit" |
| 9 | readme = "../../README.md" |
| 10 | version = "0.7.1" |
| 11 | publish = true |
| 12 | edition.workspace = true |
| 13 | |
| 14 | [lib] |
| 15 | doctest = false |
| 16 | |
| 17 | [features] |
| 18 | test-support = ["gpui/test-support", "gpui-base/test-support"] |
| 19 | decimal = ["gpui-base/decimal"] |
| 20 | inspector = ["gpui_macros/inspector", "gpui/inspector", "gpui-base/inspector"] |
| 21 | tree-sitter = ["dep:tree-sitter", "dep:tree-sitter-json"] |
| 22 | # Speech input: microphone capture and the system speech recognizer. |
| 23 | speech = [ |
| 24 | "dep:cpal", |
| 25 | "dep:block2", |
| 26 | "dep:objc2-speech", |
| 27 | "dep:objc2-avf-audio", |
| 28 | "dep:objc2-av-foundation", |
| 29 | "objc2-foundation/NSBundle", |
| 30 | "objc2-foundation/NSDictionary", |
| 31 | "objc2-foundation/NSError", |
| 32 | "objc2-foundation/NSLocale", |
| 33 | "windows/Foundation_Collections", |
| 34 | "windows/Globalization", |
| 35 | "windows/Media_SpeechRecognition", |
| 36 | ] |
| 37 | |
| 38 | # For syntax highlighting in Markdown and CodeEditor. |
| 39 | tree-sitter-languages = [ |
| 40 | "tree-sitter-astro", |
| 41 | "tree-sitter-bash", |
| 42 | "tree-sitter-c", |
| 43 | "tree-sitter-cmake", |
| 44 | "tree-sitter-cpp", |
| 45 | "tree-sitter-csharp", |
| 46 | "tree-sitter-css", |
| 47 | "tree-sitter-diff", |
| 48 | "tree-sitter-ejs", |
| 49 | "tree-sitter-elixir", |
| 50 | "tree-sitter-erb", |
| 51 | "tree-sitter-go", |
| 52 | "tree-sitter-graphql", |
| 53 | "tree-sitter-html", |
| 54 | "tree-sitter-java", |
| 55 | "tree-sitter-javascript", |
| 56 | "tree-sitter-jsdoc", |
| 57 | "tree-sitter-kotlin", |
| 58 | "tree-sitter-lua", |
| 59 | "tree-sitter-make", |
| 60 | "tree-sitter-markdown", |
| 61 | "tree-sitter-php", |
| 62 | "tree-sitter-proto", |
| 63 | "tree-sitter-python", |
| 64 | "tree-sitter-ruby", |
| 65 | "tree-sitter-rust", |
| 66 | "tree-sitter-scala", |
| 67 | "tree-sitter-sql", |
| 68 | "tree-sitter-svelte", |
| 69 | "tree-sitter-swift", |
| 70 | "tree-sitter-toml", |
| 71 | "tree-sitter-tsx", |
| 72 | "tree-sitter-typescript", |
| 73 | "tree-sitter-yaml", |
| 74 | "tree-sitter-zig", |
| 75 | ] |
| 76 | tree-sitter-astro = ["tree-sitter", "dep:tree-sitter-astro-next"] |
| 77 | tree-sitter-bash = ["tree-sitter", "dep:tree-sitter-bash"] |
| 78 | tree-sitter-c = ["tree-sitter", "dep:tree-sitter-c"] |
| 79 | tree-sitter-cmake = ["tree-sitter", "dep:tree-sitter-cmake"] |
| 80 | tree-sitter-cpp = ["tree-sitter", "dep:tree-sitter-cpp"] |
| 81 | tree-sitter-csharp = ["tree-sitter", "dep:tree-sitter-c-sharp"] |
| 82 | tree-sitter-css = ["tree-sitter", "dep:tree-sitter-css"] |
| 83 | tree-sitter-diff = ["tree-sitter", "dep:tree-sitter-diff"] |
| 84 | tree-sitter-ejs = ["tree-sitter", "dep:tree-sitter-embedded-template"] |
| 85 | tree-sitter-elixir = ["tree-sitter", "dep:tree-sitter-elixir"] |
| 86 | tree-sitter-erb = ["tree-sitter", "dep:tree-sitter-embedded-template"] |
| 87 | tree-sitter-go = ["tree-sitter", "dep:tree-sitter-go"] |
| 88 | tree-sitter-graphql = ["tree-sitter", "dep:tree-sitter-graphql"] |
| 89 | tree-sitter-html = ["tree-sitter", "dep:tree-sitter-html"] |
| 90 | tree-sitter-java = ["tree-sitter", "dep:tree-sitter-java"] |
| 91 | tree-sitter-javascript = ["tree-sitter", "dep:tree-sitter-javascript"] |
| 92 | tree-sitter-jsdoc = ["tree-sitter", "dep:tree-sitter-jsdoc"] |
| 93 | tree-sitter-kotlin = ["tree-sitter", "dep:tree-sitter-kotlin-sg"] |
| 94 | tree-sitter-lua = ["tree-sitter", "dep:tree-sitter-lua"] |
| 95 | tree-sitter-make = ["tree-sitter", "dep:tree-sitter-make"] |
| 96 | tree-sitter-markdown = ["tree-sitter", "dep:tree-sitter-md"] |
| 97 | tree-sitter-markdown-inline = ["tree-sitter-markdown"] |
| 98 | tree-sitter-php = ["tree-sitter", "dep:tree-sitter-php"] |
| 99 | tree-sitter-proto = ["tree-sitter", "dep:tree-sitter-proto"] |
| 100 | tree-sitter-python = ["tree-sitter", "dep:tree-sitter-python"] |
| 101 | tree-sitter-ruby = ["tree-sitter", "dep:tree-sitter-ruby"] |
| 102 | tree-sitter-rust = ["tree-sitter", "dep:tree-sitter-rust"] |
| 103 | tree-sitter-scala = ["tree-sitter", "dep:tree-sitter-scala"] |
| 104 | tree-sitter-sql = ["tree-sitter", "dep:tree-sitter-sequel"] |
| 105 | tree-sitter-svelte = ["tree-sitter", "dep:tree-sitter-svelte-next"] |
| 106 | tree-sitter-swift = ["tree-sitter", "dep:tree-sitter-swift"] |
| 107 | tree-sitter-toml = ["tree-sitter", "dep:tree-sitter-toml-ng"] |
| 108 | tree-sitter-tsx = ["tree-sitter", "dep:tree-sitter-typescript"] |
| 109 | tree-sitter-typescript = ["tree-sitter", "dep:tree-sitter-typescript"] |
| 110 | tree-sitter-yaml = ["tree-sitter", "dep:tree-sitter-yaml"] |
| 111 | tree-sitter-zig = ["tree-sitter", "dep:tree-sitter-zig"] |
| 112 | |
| 113 | [dependencies] |
| 114 | regex = "1" |
| 115 | anyhow.workspace = true |
| 116 | gpui = { workspace = true } |
| 117 | gpui_macros.workspace = true |
| 118 | gpui-base.workspace = true |
| 119 | gpui-component-macros = { workspace = true } |
| 120 | gpui-kit-assets = { workspace = true } |
| 121 | notify.workspace = true |
| 122 | ropey.workspace = true |
| 123 | rust-i18n.workspace = true |
| 124 | schemars.workspace = true |
| 125 | serde.workspace = true |
| 126 | serde_json.workspace = true |
| 127 | serde_repr.workspace = true |
| 128 | smallvec.workspace = true |
| 129 | sum-tree.workspace = true |
| 130 | tracing.workspace = true |
| 131 | log.workspace = true |
| 132 | markdown = { version = "1.0.0", features = ["serde"] } |
| 133 | |
| 134 | enum-iterator = "2.1.0" |
| 135 | itertools = "0.13.0" |
| 136 | once_cell = "1.19.0" |
| 137 | paste = "1" |
| 138 | uuid = "1.10" |
| 139 | |
| 140 | # Chart |
| 141 | num-traits = "0.2" |
| 142 | |
| 143 | # Calendar |
| 144 | chrono = "0.4.38" |
| 145 | |
| 146 | # Code Editor |
| 147 | lsp-types.workspace = true |
| 148 | |
| 149 | # Cross-platform time APIs (zero-cost on native, uses web APIs on WASM) |
| 150 | instant.workspace = true |
| 151 | |
| 152 | # Native-only dependencies (not available on WASM) |
| 153 | [target.'cfg(not(target_family = "wasm"))'.dependencies] |
| 154 | smol.workspace = true |
| 155 | cpal = { version = "0.15.3", optional = true } |
| 156 | tree-sitter = { version = "0.26.13", optional = true } |
| 157 | tree-sitter-astro-next = { version="0.1.1", optional = true } |
| 158 | tree-sitter-bash = { version = "0.23.3", optional = true } |
| 159 | tree-sitter-c = { version = "0.24.1", optional = true } |
| 160 | tree-sitter-c-sharp = { version = "0.23.1", optional = true } |
| 161 | tree-sitter-cmake = { version = "0.7.1", optional = true } |
| 162 | tree-sitter-cpp = { version = "0.23.4", optional = true } |
| 163 | tree-sitter-css = { version = "0.23.2", optional = true } |
| 164 | tree-sitter-diff = { version = "0.1.0", optional = true } |
| 165 | tree-sitter-elixir = { version = "0.3", optional = true } |
| 166 | tree-sitter-embedded-template = { version = "0.23.0", optional = true } |
| 167 | tree-sitter-go = { version = "0.23.4", optional = true } |
| 168 | tree-sitter-graphql = { version = "0.1.0", optional = true } |
| 169 | tree-sitter-html = { version = "0.23.2", optional = true } |
| 170 | tree-sitter-java = { version = "0.23.5", optional = true } |
| 171 | tree-sitter-javascript = { version = "0.23.1", optional = true } |
| 172 | tree-sitter-jsdoc = { version = "0.23.2", optional = true } |
| 173 | tree-sitter-json = { version = "0.24.8", optional = true } |
| 174 | tree-sitter-kotlin-sg = { version = "0.4.0", optional = true } |
| 175 | tree-sitter-lua = { version = "0.4.1", optional = true } |
| 176 | tree-sitter-make = { version = "1.1.1", optional = true } |
| 177 | tree-sitter-md = { version = "0.5.1", optional = true } |
| 178 | tree-sitter-php = { version = "0.24.2", optional = true } |
| 179 | tree-sitter-proto = { version = "0.2.0", optional = true } |
| 180 | tree-sitter-python = { version = "0.23.6", optional = true } |
| 181 | tree-sitter-ruby = { version = "0.23.1", optional = true } |
| 182 | tree-sitter-rust = { version = "0.24.0", optional = true } |
| 183 | tree-sitter-scala = { version = "0.23.4", optional = true } |
| 184 | tree-sitter-sequel = { version = "0.3.8", optional = true } |
| 185 | tree-sitter-svelte-next = { version = "0.1.1", optional = true } |
| 186 | tree-sitter-swift = { version = "0.7.0", optional = true } |
| 187 | tree-sitter-toml-ng = { version = "0.7.0", optional = true } |
| 188 | tree-sitter-typescript = { version = "0.23.2", optional = true } |
| 189 | tree-sitter-yaml = { version = "0.7.1", optional = true } |
| 190 | tree-sitter-zig = { version = "1.1.2", optional = true } |
| 191 | |
| 192 | [target.'cfg(target_os = "macos")'.dependencies] |
| 193 | core-text = "=21.0.0" |
| 194 | # Native menu (NativeMenu) — drives AppKit NSMenu via objc2. |
| 195 | raw-window-handle = { workspace = true } |
| 196 | objc2 = "0.6" |
| 197 | objc2-app-kit = { version = "0.3", features = [ |
| 198 | "NSMenu", |
| 199 | "NSMenuItem", |
| 200 | "NSView", |
| 201 | "NSWindow", |
| 202 | "NSResponder", |
| 203 | "NSEvent", |
| 204 | "NSImage", |
| 205 | ] } |
| 206 | objc2-foundation = { version = "0.3", features = ["NSData", "NSString", "NSGeometry"] } |
| 207 | # Speech input (SystemRecognizer) — SFSpeechRecognizer via objc2. |
| 208 | block2 = { version = "0.6", optional = true } |
| 209 | objc2-av-foundation = { version = "0.3", default-features = false, features = [ |
| 210 | "std", |
| 211 | "AVCaptureDevice", |
| 212 | "AVMediaFormat", |
| 213 | ], optional = true } |
| 214 | objc2-avf-audio = { version = "0.3", default-features = false, features = [ |
| 215 | "std", |
| 216 | "AVAudioBuffer", |
| 217 | "AVAudioFormat", |
| 218 | "AVAudioTypes", |
| 219 | ], optional = true } |
| 220 | objc2-speech = { version = "0.3", default-features = false, features = [ |
| 221 | "std", |
| 222 | "block2", |
| 223 | "objc2-avf-audio", |
| 224 | "SFSpeechRecognitionMetadata", |
| 225 | "SFSpeechRecognitionRequest", |
| 226 | "SFSpeechRecognitionResult", |
| 227 | "SFSpeechRecognitionTask", |
| 228 | "SFSpeechRecognizer", |
| 229 | "SFTranscription", |
| 230 | ], optional = true } |
| 231 | |
| 232 | [target.'cfg(target_os = "windows")'.dependencies] |
| 233 | # Native menu (NativeMenu) — drives Win32 popup menus. |
| 234 | raw-window-handle = { workspace = true } |
| 235 | resvg = "0.45.1" |
| 236 | windows = { workspace = true, features = [ |
| 237 | "Win32_Foundation", |
| 238 | "Win32_Graphics_Gdi", |
| 239 | "Win32_Graphics_GdiPlus", |
| 240 | "Win32_System_Com", |
| 241 | "Win32_System_Com_StructuredStorage", |
| 242 | "Win32_System_LibraryLoader", |
| 243 | "Win32_System_Memory", |
| 244 | "Win32_UI_Input_KeyboardAndMouse", |
| 245 | "Win32_UI_WindowsAndMessaging", |
| 246 | ] } |
| 247 | |
| 248 | [dev-dependencies] |
| 249 | gpui = { workspace = true, features = ["test-support"] } |
| 250 | indoc = "2" |
| 251 | |
| 252 | [lints] |
| 253 | workspace = true |
| 254 | |
| 255 | [package.metadata.cargo-machete] |
| 256 | ignored = ["gpui_macros"] |