(props: {
title: string
countVisible?: boolean
query: string
count: number
total: number
placeholder: string
theme: Accessor<RunFooterTheme>
inputRef: (input: InputRenderable) => void
onQuery: (query: string) => void
children: JSX.Element
dark?: boolean
chrome?: "default" | "minimal"
})
| 202 | } |
| 203 | |
| 204 | function PanelShell(props: { |
| 205 | title: string |
| 206 | countVisible?: boolean |
| 207 | query: string |
| 208 | count: number |
| 209 | total: number |
| 210 | placeholder: string |
| 211 | theme: Accessor<RunFooterTheme> |
| 212 | inputRef: (input: InputRenderable) => void |
| 213 | onQuery: (query: string) => void |
| 214 | children: JSX.Element |
| 215 | dark?: boolean |
| 216 | chrome?: "default" | "minimal" |
| 217 | }) { |
| 218 | const background = () => (props.dark ? props.theme().shade : props.theme().surface) |
| 219 | const minimal = () => props.chrome === "minimal" |
| 220 | const content = ( |
| 221 | <> |
| 222 | <box height={1} flexShrink={0} backgroundColor={background()} /> |
| 223 | <box |
| 224 | width="100%" |
| 225 | height={1} |
| 226 | paddingLeft={PANEL_PAD} |
| 227 | paddingRight={PANEL_PAD} |
| 228 | flexDirection="row" |
| 229 | gap={1} |
| 230 | flexShrink={0} |
| 231 | backgroundColor={background()} |
| 232 | > |
| 233 | <text fg={props.theme().text} attributes={TextAttributes.BOLD} wrapMode="none" flexShrink={0}> |
| 234 | {props.title} |
| 235 | </text> |
| 236 | {props.countVisible !== false ? ( |
| 237 | <text fg={props.theme().muted} wrapMode="none" flexShrink={0}> |
| 238 | {countLabel(props.count, props.total, props.query)} |
| 239 | </text> |
| 240 | ) : null} |
| 241 | <box flexGrow={1} flexShrink={1} backgroundColor="transparent" /> |
| 242 | <text fg={props.theme().muted} wrapMode="none" truncate flexShrink={0}> |
| 243 | esc |
| 244 | </text> |
| 245 | </box> |
| 246 | <box height={1} flexShrink={0} backgroundColor={background()} /> |
| 247 | <box |
| 248 | width="100%" |
| 249 | height={1} |
| 250 | paddingLeft={PANEL_PAD} |
| 251 | paddingRight={PANEL_PAD} |
| 252 | flexShrink={0} |
| 253 | backgroundColor={background()} |
| 254 | > |
| 255 | <input |
| 256 | width="100%" |
| 257 | focusedBackgroundColor={background()} |
| 258 | focusedTextColor={props.theme().text} |
| 259 | placeholder={props.placeholder} |
| 260 | placeholderColor={props.theme().muted} |
| 261 | cursorColor={props.theme().highlight} |
nothing calls this directly
no test coverage detected