初始提交:terminalX 可运行态(M0/M1/M1.5 已真机验证)
- M0: libghostty SSH 终端(渲染/输入/连接)+ 白屏修复(OutputGate) + 会话状态机/自动重连 - M1: tsnet 用户态组网 + SSH-over-tsnet(fd 桥),shell 级真机验证;R5(Go+gvisor+C+++Swift 同进程) retire - M1.5: tmux -CC 原生 tab(MVP) - 结构: packages/(TXCore·TXTransport), apps/TerminalX, vendor/(libghostty-spm/libssh2/mbedtls/tsnet-bridge), artifacts/ - 文档: CLAUDE.md + docs/HANDOFF.md(新会话入口) - 环境: 认证代理→依赖 vendor 本地化;Go 在 ~/.local/go;仅模拟器/未签名 - 待续: M2 mosh, tmux 多 pane, M4 安全(host key/SE) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
158
vendor/libghostty-spm/docs/api/configuration.html
vendored
Normal file
158
vendor/libghostty-spm/docs/api/configuration.html
vendored
Normal file
@@ -0,0 +1,158 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<title>GhosttyKit · API · Configuration</title>
|
||||
<link rel="stylesheet" href="../styles.css">
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/github.min.css"
|
||||
integrity="sha384-eFTL69TLRZTkNfYZOLM+G04821K1qZao/4QLJbet1pP4tcF+fdXq/9CdqAbWRl/L"
|
||||
crossorigin="anonymous"
|
||||
media="(prefers-color-scheme: light)">
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/github-dark.min.css"
|
||||
integrity="sha384-wH75j6z1lH97ZOpMOInqhgKzFkAInZPPSPlZpYKYTOqsaizPvhQZmAtLcPKXpLyH"
|
||||
crossorigin="anonymous"
|
||||
media="(prefers-color-scheme: dark)">
|
||||
</head>
|
||||
<body>
|
||||
<nav class="topbar" aria-label="Primary">
|
||||
<a class="home" href="../index.html">GhosttyKit</a>
|
||||
<a href="../index.html">Overview</a>
|
||||
<a href="../guide/index.html">Guide</a>
|
||||
<a href="index.html" aria-current="page">API</a>
|
||||
<a href="../architecture.html">Architecture</a>
|
||||
<a href="../build.html">Build</a>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
<h1>Configuration</h1>
|
||||
<nav class="on-this-page" aria-label="On this page">
|
||||
<strong>On this page:</strong>
|
||||
<a href="#TerminalSurfaceOptions">Surface options</a>
|
||||
<a href="#TerminalConfiguration">Terminal config</a>
|
||||
<a href="#TerminalTheme">Theme</a>
|
||||
<a href="#Metrics">Metrics</a>
|
||||
</nav>
|
||||
|
||||
<h2 id="TerminalSurfaceOptions">TerminalSurfaceOptions</h2>
|
||||
<pre><code class="language-swift">public struct TerminalSurfaceOptions: Sendable {
|
||||
public var backend: TerminalSessionBackend
|
||||
public var fontSize: Float?
|
||||
public var workingDirectory: String?
|
||||
public var context: TerminalSurfaceContext
|
||||
|
||||
public init(
|
||||
backend: TerminalSessionBackend = .exec,
|
||||
fontSize: Float? = nil,
|
||||
workingDirectory: String? = nil,
|
||||
context: TerminalSurfaceContext = .window
|
||||
)
|
||||
}
|
||||
|
||||
public enum TerminalSessionBackend: Sendable {
|
||||
case exec
|
||||
case inMemory(InMemoryTerminalSession)
|
||||
}
|
||||
|
||||
public enum TerminalSurfaceContext: Sendable, Equatable {
|
||||
case window
|
||||
case split
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<h2 id="TerminalConfiguration">TerminalConfiguration</h2>
|
||||
<pre><code class="language-swift">public struct TerminalConfiguration: Sendable, Hashable {
|
||||
public init()
|
||||
public init(configure: (inout Builder) -> Void)
|
||||
public init(
|
||||
startingFrom base: TerminalConfiguration,
|
||||
configure: (inout Builder) -> Void
|
||||
)
|
||||
|
||||
public func appending(_ command: TerminalConfigCommand) -> TerminalConfiguration
|
||||
public func fontFamily(_ value: String) -> TerminalConfiguration
|
||||
public func fontSize(_ value: Float) -> TerminalConfiguration
|
||||
public func cursorStyle(_ style: TerminalCursorStyle) -> TerminalConfiguration
|
||||
public func background(_ value: String) -> TerminalConfiguration
|
||||
public func foreground(_ value: String) -> TerminalConfiguration
|
||||
public func palette(_ index: Int, color: String) -> TerminalConfiguration
|
||||
public func backgroundOpacity(_ value: Double) -> TerminalConfiguration
|
||||
public func windowPaddingX(_ value: Int) -> TerminalConfiguration
|
||||
public func windowPaddingY(_ value: Int) -> TerminalConfiguration
|
||||
public func custom(_ key: String, _ value: String) -> TerminalConfiguration
|
||||
|
||||
public static let `default`: TerminalConfiguration
|
||||
public var rendered: String { get }
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p>The builder variant has matching <code>with*</code> mutating methods, which are useful when composing a default config with many overrides.</p>
|
||||
|
||||
<h2 id="TerminalTheme">TerminalTheme</h2>
|
||||
<pre><code class="language-swift">public enum TerminalColorScheme: Sendable {
|
||||
case light
|
||||
case dark
|
||||
}
|
||||
|
||||
public struct TerminalTheme: Sendable, Hashable {
|
||||
public var light: TerminalConfiguration
|
||||
public var dark: TerminalConfiguration
|
||||
|
||||
public init(
|
||||
light: TerminalConfiguration,
|
||||
dark: TerminalConfiguration
|
||||
)
|
||||
}
|
||||
</code></pre>
|
||||
<p><code>TerminalController</code> selects the light or dark configuration when the active color scheme changes.</p>
|
||||
|
||||
<h2 id="Metrics">Metrics</h2>
|
||||
<pre><code class="language-swift">public struct TerminalGridMetrics: Sendable, Equatable {
|
||||
public var columns: UInt16
|
||||
public var rows: UInt16
|
||||
public var widthPixels: UInt32
|
||||
public var heightPixels: UInt32
|
||||
public var cellWidthPixels: UInt32
|
||||
public var cellHeightPixels: UInt32
|
||||
}
|
||||
|
||||
public struct InMemoryTerminalViewport: Sendable, Equatable {
|
||||
public var columns: UInt16
|
||||
public var rows: UInt16
|
||||
public var widthPixels: UInt32
|
||||
public var heightPixels: UInt32
|
||||
public var cellWidthPixels: UInt32
|
||||
public var cellHeightPixels: UInt32
|
||||
}
|
||||
|
||||
public struct TerminalInputModifiers: OptionSet, Sendable {
|
||||
public static let shift: TerminalInputModifiers
|
||||
public static let ctrl: TerminalInputModifiers
|
||||
public static let alt: TerminalInputModifiers
|
||||
public static let super_: TerminalInputModifiers
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<nav class="pager" aria-label="Sibling pages">
|
||||
<a class="prev" href="terminal.html">Terminal surface</a>
|
||||
<a class="parent" href="index.html">↑ API</a>
|
||||
<a class="next" href="themes.html">Theme catalog</a>
|
||||
</nav>
|
||||
|
||||
<footer>
|
||||
GhosttyKit · <a href="https://github.com/Lakr233/libghostty-spm">github.com/Lakr233/libghostty-spm</a>
|
||||
</footer>
|
||||
</main>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/highlight.min.js"
|
||||
integrity="sha384-GdEWAbCjn+ghjX0gLx7/N1hyTVmPAjdC2OvoAA0RyNcAOhqwtT8qnbCxWle2+uJX"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/languages/swift.min.js"
|
||||
integrity="sha384-TfALNLT6HJzZieazgsVvFM0DzFWQsgl0d7mdwPLyg1yg7XE4QwLY4jqmJRNnI1S4"
|
||||
crossorigin="anonymous"></script>
|
||||
<script>hljs.highlightAll();</script>
|
||||
</body>
|
||||
</html>
|
||||
58
vendor/libghostty-spm/docs/api/index.html
vendored
Normal file
58
vendor/libghostty-spm/docs/api/index.html
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<title>GhosttyKit · API</title>
|
||||
<link rel="stylesheet" href="../styles.css">
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/github.min.css"
|
||||
integrity="sha384-eFTL69TLRZTkNfYZOLM+G04821K1qZao/4QLJbet1pP4tcF+fdXq/9CdqAbWRl/L"
|
||||
crossorigin="anonymous"
|
||||
media="(prefers-color-scheme: light)">
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/github-dark.min.css"
|
||||
integrity="sha384-wH75j6z1lH97ZOpMOInqhgKzFkAInZPPSPlZpYKYTOqsaizPvhQZmAtLcPKXpLyH"
|
||||
crossorigin="anonymous"
|
||||
media="(prefers-color-scheme: dark)">
|
||||
</head>
|
||||
<body>
|
||||
<nav class="topbar" aria-label="Primary">
|
||||
<a class="home" href="../index.html">GhosttyKit</a>
|
||||
<a href="../index.html">Overview</a>
|
||||
<a href="../guide/index.html">Guide</a>
|
||||
<a href="index.html" aria-current="page">API</a>
|
||||
<a href="../architecture.html">Architecture</a>
|
||||
<a href="../build.html">Build</a>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
<h1>API reference</h1>
|
||||
<p class="lede">Public Swift surface grouped by product. Signatures are trimmed to the integration points most hosts need first.</p>
|
||||
|
||||
<ul class="hub-list">
|
||||
<li>
|
||||
<a href="terminal.html">Terminal surface</a>
|
||||
<span class="summary"><code>TerminalViewState</code>, <code>TerminalSurfaceView</code>, <code>TerminalView</code>, <code>TerminalController</code>, <code>InMemoryTerminalSession</code>, delegates.</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="configuration.html">Configuration</a>
|
||||
<span class="summary"><code>TerminalConfiguration</code>, <code>TerminalConfigCommand</code>, <code>TerminalTheme</code>, <code>TerminalColorScheme</code>, metrics and modifiers.</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="themes.html">Theme catalog</a>
|
||||
<span class="summary"><code>GhosttyThemeCatalog</code>, <code>GhosttyThemeDefinition</code>, conversion helpers, generated theme constants.</span>
|
||||
</li>
|
||||
<li>
|
||||
<a href="shellcraft.html">ShellCraftKit</a>
|
||||
<span class="summary"><code>ShellDefinition</code>, <code>ShellCommand</code>, <code>ShellSession</code>, <code>CommandResult</code>.</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<footer>
|
||||
GhosttyKit · <a href="https://github.com/Lakr233/libghostty-spm">github.com/Lakr233/libghostty-spm</a>
|
||||
</footer>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
111
vendor/libghostty-spm/docs/api/shellcraft.html
vendored
Normal file
111
vendor/libghostty-spm/docs/api/shellcraft.html
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<title>GhosttyKit · API · ShellCraftKit</title>
|
||||
<link rel="stylesheet" href="../styles.css">
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/github.min.css"
|
||||
integrity="sha384-eFTL69TLRZTkNfYZOLM+G04821K1qZao/4QLJbet1pP4tcF+fdXq/9CdqAbWRl/L"
|
||||
crossorigin="anonymous"
|
||||
media="(prefers-color-scheme: light)">
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/github-dark.min.css"
|
||||
integrity="sha384-wH75j6z1lH97ZOpMOInqhgKzFkAInZPPSPlZpYKYTOqsaizPvhQZmAtLcPKXpLyH"
|
||||
crossorigin="anonymous"
|
||||
media="(prefers-color-scheme: dark)">
|
||||
</head>
|
||||
<body>
|
||||
<nav class="topbar" aria-label="Primary">
|
||||
<a class="home" href="../index.html">GhosttyKit</a>
|
||||
<a href="../index.html">Overview</a>
|
||||
<a href="../guide/index.html">Guide</a>
|
||||
<a href="index.html" aria-current="page">API</a>
|
||||
<a href="../architecture.html">Architecture</a>
|
||||
<a href="../build.html">Build</a>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
<h1>ShellCraftKit</h1>
|
||||
<nav class="on-this-page" aria-label="On this page">
|
||||
<strong>On this page:</strong>
|
||||
<a href="#ShellDefinition">ShellDefinition</a>
|
||||
<a href="#ShellCommand">ShellCommand</a>
|
||||
<a href="#ShellSession">ShellSession</a>
|
||||
</nav>
|
||||
|
||||
<h2 id="ShellDefinition">ShellDefinition</h2>
|
||||
<pre><code class="language-swift">public struct ShellDefinition: Sendable {
|
||||
public let prompt: String
|
||||
public let welcomeMessage: String
|
||||
public let fallbackMessage: @Sendable (String) -> String
|
||||
|
||||
public init(
|
||||
prompt: String = "$ ",
|
||||
welcomeMessage: String? = nil,
|
||||
fallback: (@Sendable (String) -> String)? = nil,
|
||||
@ShellCommandBuilder _ build: () -> [ShellCommand]
|
||||
)
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<h2 id="ShellCommand">ShellCommand</h2>
|
||||
<pre><code class="language-swift">public enum CommandResult: Sendable {
|
||||
case output(String)
|
||||
case clear
|
||||
case exit
|
||||
}
|
||||
|
||||
public struct CommandContext: Sendable {
|
||||
public let command: String
|
||||
public let arguments: String
|
||||
public let username: String
|
||||
public let terminalSize: InMemoryTerminalViewport
|
||||
}
|
||||
|
||||
public struct ShellCommand: Sendable {
|
||||
public let name: String
|
||||
public let summary: String
|
||||
|
||||
public init(
|
||||
_ name: String,
|
||||
summary: String = "",
|
||||
handler: @escaping @Sendable (CommandContext) -> CommandResult
|
||||
)
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<h2 id="ShellSession">ShellSession</h2>
|
||||
<pre><code class="language-swift">public final class ShellSession {
|
||||
public let terminalSession: InMemoryTerminalSession
|
||||
|
||||
public init(shell: ShellDefinition)
|
||||
public func start()
|
||||
}
|
||||
|
||||
public let defaultSandboxShell: ShellDefinition
|
||||
public let sandboxShell: ShellDefinition
|
||||
</code></pre>
|
||||
|
||||
<nav class="pager" aria-label="Sibling pages">
|
||||
<a class="prev" href="themes.html">Theme catalog</a>
|
||||
<a class="parent" href="index.html">↑ API</a>
|
||||
<a class="next" href="../architecture.html">Architecture</a>
|
||||
</nav>
|
||||
|
||||
<footer>
|
||||
GhosttyKit · <a href="https://github.com/Lakr233/libghostty-spm">github.com/Lakr233/libghostty-spm</a>
|
||||
</footer>
|
||||
</main>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/highlight.min.js"
|
||||
integrity="sha384-GdEWAbCjn+ghjX0gLx7/N1hyTVmPAjdC2OvoAA0RyNcAOhqwtT8qnbCxWle2+uJX"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/languages/swift.min.js"
|
||||
integrity="sha384-TfALNLT6HJzZieazgsVvFM0DzFWQsgl0d7mdwPLyg1yg7XE4QwLY4jqmJRNnI1S4"
|
||||
crossorigin="anonymous"></script>
|
||||
<script>hljs.highlightAll();</script>
|
||||
</body>
|
||||
</html>
|
||||
181
vendor/libghostty-spm/docs/api/terminal.html
vendored
Normal file
181
vendor/libghostty-spm/docs/api/terminal.html
vendored
Normal file
@@ -0,0 +1,181 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<title>GhosttyKit · API · Terminal surface</title>
|
||||
<link rel="stylesheet" href="../styles.css">
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/github.min.css"
|
||||
integrity="sha384-eFTL69TLRZTkNfYZOLM+G04821K1qZao/4QLJbet1pP4tcF+fdXq/9CdqAbWRl/L"
|
||||
crossorigin="anonymous"
|
||||
media="(prefers-color-scheme: light)">
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/github-dark.min.css"
|
||||
integrity="sha384-wH75j6z1lH97ZOpMOInqhgKzFkAInZPPSPlZpYKYTOqsaizPvhQZmAtLcPKXpLyH"
|
||||
crossorigin="anonymous"
|
||||
media="(prefers-color-scheme: dark)">
|
||||
</head>
|
||||
<body>
|
||||
<nav class="topbar" aria-label="Primary">
|
||||
<a class="home" href="../index.html">GhosttyKit</a>
|
||||
<a href="../index.html">Overview</a>
|
||||
<a href="../guide/index.html">Guide</a>
|
||||
<a href="index.html" aria-current="page">API</a>
|
||||
<a href="../architecture.html">Architecture</a>
|
||||
<a href="../build.html">Build</a>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
<h1>Terminal surface</h1>
|
||||
<nav class="on-this-page" aria-label="On this page">
|
||||
<strong>On this page:</strong>
|
||||
<a href="#TerminalViewState">TerminalViewState</a>
|
||||
<a href="#TerminalSurfaceView">TerminalSurfaceView</a>
|
||||
<a href="#TerminalView">TerminalView</a>
|
||||
<a href="#TerminalController">TerminalController</a>
|
||||
<a href="#InMemoryTerminalSession">InMemoryTerminalSession</a>
|
||||
<a href="#Delegates">Delegates</a>
|
||||
</nav>
|
||||
|
||||
<h2 id="TerminalViewState">TerminalViewState</h2>
|
||||
<p>Main SwiftUI state container. Available on iOS 15, macOS 13, and Mac Catalyst 15.</p>
|
||||
<pre><code class="language-swift">@MainActor
|
||||
public final class TerminalViewState: ObservableObject {
|
||||
@Published public internal(set) var title: String { get }
|
||||
@Published public internal(set) var surfaceSize: TerminalGridMetrics? { get }
|
||||
@Published public internal(set) var isFocused: Bool { get }
|
||||
@Published public internal(set) var bellCount: Int { get }
|
||||
@Published public internal(set) var lastBellAt: Date? { get }
|
||||
@Published public internal(set) var lastDesktopNotificationTitle: String? { get }
|
||||
@Published public internal(set) var lastDesktopNotificationBody: String? { get }
|
||||
@Published public internal(set) var lastDesktopNotificationAt: Date? { get }
|
||||
@Published public internal(set) var workingDirectory: String? { get }
|
||||
@Published public internal(set) var lastCommandExitCode: Int? { get }
|
||||
@Published public internal(set) var lastCommandDurationNanos: UInt64? { get }
|
||||
public internal(set) weak var surface: TerminalSurface? { get }
|
||||
|
||||
@Published public var configuration: TerminalSurfaceOptions
|
||||
public var onClose: ((Bool) -> Void)?
|
||||
@Published public internal(set) var controller: TerminalController { get }
|
||||
|
||||
public var renderedConfig: String { get }
|
||||
public var effectiveColorScheme: TerminalColorScheme { get }
|
||||
public var theme: TerminalTheme { get }
|
||||
public var terminalConfiguration: TerminalConfiguration { get }
|
||||
|
||||
public func send(_ text: String) -> Bool
|
||||
public func adopt(colorScheme: ColorScheme)
|
||||
public func adopt(terminalColorScheme colorScheme: TerminalColorScheme)
|
||||
public func setTheme(_ theme: TerminalTheme) -> Bool
|
||||
public func setTerminalConfiguration(_ configuration: TerminalConfiguration) -> Bool
|
||||
}
|
||||
</code></pre>
|
||||
<p class="muted"><code>controller</code> exposes a projected publisher for source compatibility, but controller-owned configuration changes are observable through <code>TerminalViewState</code> mutation methods. SwiftUI integrations should mutate through the view state rather than the controller directly.</p>
|
||||
|
||||
<h2 id="TerminalSurfaceView">TerminalSurfaceView</h2>
|
||||
<pre><code class="language-swift">public struct TerminalSurfaceView: View {
|
||||
public init(context: TerminalViewState)
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<h2 id="TerminalView">TerminalView</h2>
|
||||
<pre><code class="language-swift">#if canImport(UIKit)
|
||||
public typealias TerminalView = UITerminalView
|
||||
#elseif canImport(AppKit)
|
||||
public typealias TerminalView = AppTerminalView
|
||||
#endif
|
||||
</code></pre>
|
||||
|
||||
<h2 id="TerminalController">TerminalController</h2>
|
||||
<pre><code class="language-swift">@MainActor
|
||||
public final class TerminalController {
|
||||
public enum ConfigSource: Sendable, Hashable {
|
||||
case none
|
||||
case file(String)
|
||||
case generated(String)
|
||||
}
|
||||
|
||||
public var currentConfigSource: ConfigSource { get }
|
||||
public var renderedConfig: String { get }
|
||||
public private(set) var terminalConfiguration: TerminalConfiguration { get }
|
||||
public private(set) var theme: TerminalTheme { get }
|
||||
public private(set) var effectiveColorScheme: TerminalColorScheme { get }
|
||||
public internal(set) var lastConfigurationIssue: String? { get }
|
||||
|
||||
public init(
|
||||
configSource: ConfigSource = .none,
|
||||
theme: TerminalTheme = .default,
|
||||
terminalConfiguration: TerminalConfiguration = .init()
|
||||
)
|
||||
|
||||
public func setColorScheme(_ scheme: TerminalColorScheme)
|
||||
public func setTheme(_ theme: TerminalTheme) -> Bool
|
||||
public func setTerminalConfiguration(_ configuration: TerminalConfiguration) -> Bool
|
||||
public func tick()
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<h2 id="InMemoryTerminalSession">InMemoryTerminalSession</h2>
|
||||
<pre><code class="language-swift">public final class InMemoryTerminalSession: @unchecked Sendable {
|
||||
public init(
|
||||
write: @escaping @Sendable (Data) -> Void,
|
||||
resize: @escaping @Sendable (InMemoryTerminalViewport) -> Void
|
||||
)
|
||||
|
||||
public func readViewportText() -> String?
|
||||
public func receive(_ data: Data)
|
||||
public func receive(_ string: String)
|
||||
public func sendInput(_ data: Data)
|
||||
public func finish(exitCode: UInt32, runtimeMilliseconds: UInt64)
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<h2 id="Delegates">Delegates</h2>
|
||||
<pre><code class="language-swift">@MainActor public protocol TerminalSurfaceTitleDelegate {
|
||||
func terminalDidChangeTitle(_ title: String)
|
||||
}
|
||||
|
||||
@MainActor public protocol TerminalSurfaceGridResizeDelegate {
|
||||
func terminalDidResize(_ size: TerminalGridMetrics)
|
||||
}
|
||||
|
||||
@MainActor public protocol TerminalSurfaceBellDelegate {
|
||||
func terminalDidRingBell()
|
||||
}
|
||||
|
||||
@MainActor public protocol TerminalSurfaceCloseDelegate {
|
||||
func terminalDidClose(processAlive: Bool)
|
||||
}
|
||||
|
||||
@MainActor public protocol TerminalSurfaceTextSelectionRequestDelegate {
|
||||
func terminalDidRequestTextSelection(_ request: TerminalTextSelectionRequest)
|
||||
}
|
||||
|
||||
@MainActor public protocol TerminalSurfaceLifecycleDelegate {
|
||||
func terminalDidAttachSurface(_ surface: TerminalSurface)
|
||||
func terminalDidDetachSurface()
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<nav class="pager" aria-label="Sibling pages">
|
||||
<a class="prev" href="index.html">API hub</a>
|
||||
<a class="parent" href="index.html">↑ API</a>
|
||||
<a class="next" href="configuration.html">Configuration</a>
|
||||
</nav>
|
||||
|
||||
<footer>
|
||||
GhosttyKit · <a href="https://github.com/Lakr233/libghostty-spm">github.com/Lakr233/libghostty-spm</a>
|
||||
</footer>
|
||||
</main>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/highlight.min.js"
|
||||
integrity="sha384-GdEWAbCjn+ghjX0gLx7/N1hyTVmPAjdC2OvoAA0RyNcAOhqwtT8qnbCxWle2+uJX"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/languages/swift.min.js"
|
||||
integrity="sha384-TfALNLT6HJzZieazgsVvFM0DzFWQsgl0d7mdwPLyg1yg7XE4QwLY4jqmJRNnI1S4"
|
||||
crossorigin="anonymous"></script>
|
||||
<script>hljs.highlightAll();</script>
|
||||
</body>
|
||||
</html>
|
||||
88
vendor/libghostty-spm/docs/api/themes.html
vendored
Normal file
88
vendor/libghostty-spm/docs/api/themes.html
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<title>GhosttyKit · API · Theme catalog</title>
|
||||
<link rel="stylesheet" href="../styles.css">
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/github.min.css"
|
||||
integrity="sha384-eFTL69TLRZTkNfYZOLM+G04821K1qZao/4QLJbet1pP4tcF+fdXq/9CdqAbWRl/L"
|
||||
crossorigin="anonymous"
|
||||
media="(prefers-color-scheme: light)">
|
||||
<link rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/github-dark.min.css"
|
||||
integrity="sha384-wH75j6z1lH97ZOpMOInqhgKzFkAInZPPSPlZpYKYTOqsaizPvhQZmAtLcPKXpLyH"
|
||||
crossorigin="anonymous"
|
||||
media="(prefers-color-scheme: dark)">
|
||||
</head>
|
||||
<body>
|
||||
<nav class="topbar" aria-label="Primary">
|
||||
<a class="home" href="../index.html">GhosttyKit</a>
|
||||
<a href="../index.html">Overview</a>
|
||||
<a href="../guide/index.html">Guide</a>
|
||||
<a href="index.html" aria-current="page">API</a>
|
||||
<a href="../architecture.html">Architecture</a>
|
||||
<a href="../build.html">Build</a>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
<h1>Theme catalog</h1>
|
||||
<nav class="on-this-page" aria-label="On this page">
|
||||
<strong>On this page:</strong>
|
||||
<a href="#GhosttyThemeCatalog">Catalog</a>
|
||||
<a href="#GhosttyThemeDefinition">Definition</a>
|
||||
<a href="#Conversion">Conversion</a>
|
||||
</nav>
|
||||
|
||||
<h2 id="GhosttyThemeCatalog">GhosttyThemeCatalog</h2>
|
||||
<pre><code class="language-swift">public enum GhosttyThemeCatalog {
|
||||
public static let allThemes: [GhosttyThemeDefinition]
|
||||
public static func theme(named name: String) -> GhosttyThemeDefinition?
|
||||
public static func search(_ query: String) -> [GhosttyThemeDefinition]
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<h2 id="GhosttyThemeDefinition">GhosttyThemeDefinition</h2>
|
||||
<pre><code class="language-swift">public struct GhosttyThemeDefinition: Sendable, Hashable, Identifiable {
|
||||
public var id: String { get }
|
||||
public let name: String
|
||||
public let background: String
|
||||
public let foreground: String
|
||||
public let cursorColor: String?
|
||||
public let cursorText: String?
|
||||
public let selectionBackground: String?
|
||||
public let selectionForeground: String?
|
||||
public let palette: [Int: String]
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<h2 id="Conversion">Conversion helpers</h2>
|
||||
<pre><code class="language-swift">public extension GhosttyThemeDefinition {
|
||||
func toTerminalConfiguration() -> TerminalConfiguration
|
||||
func toTerminalTheme() -> TerminalTheme
|
||||
var isDark: Bool { get }
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<nav class="pager" aria-label="Sibling pages">
|
||||
<a class="prev" href="configuration.html">Configuration</a>
|
||||
<a class="parent" href="index.html">↑ API</a>
|
||||
<a class="next" href="shellcraft.html">ShellCraftKit</a>
|
||||
</nav>
|
||||
|
||||
<footer>
|
||||
GhosttyKit · <a href="https://github.com/Lakr233/libghostty-spm">github.com/Lakr233/libghostty-spm</a>
|
||||
</footer>
|
||||
</main>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/highlight.min.js"
|
||||
integrity="sha384-GdEWAbCjn+ghjX0gLx7/N1hyTVmPAjdC2OvoAA0RyNcAOhqwtT8qnbCxWle2+uJX"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/languages/swift.min.js"
|
||||
integrity="sha384-TfALNLT6HJzZieazgsVvFM0DzFWQsgl0d7mdwPLyg1yg7XE4QwLY4jqmJRNnI1S4"
|
||||
crossorigin="anonymous"></script>
|
||||
<script>hljs.highlightAll();</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user