adds schema view and schema generating command

This commit is contained in:
2026-11-03 09:35:41 +01:00
parent cc41decccb
commit 600d4874d2
62 changed files with 4416 additions and 105 deletions
@@ -0,0 +1,27 @@
import HelderCore
import SwiftUI
/// `[ console ] artisan`: the last runs of `helder:schema`, following the newest line; the chevron hides it until the next run.
struct SchemaConsolePanel: View {
let store: SchemaStore
var body: some View {
VStack(spacing: 0) {
HStack(spacing: 12) {
Text("[ console ] artisan").typeRole(Typography.panelLabel).foregroundStyle(Palette.text4).fixedSize()
Spacer(minLength: 0)
SchemaIconButton(icon: .chevronDown, tip: "Hide console") { store.hideConsole() }
}
.padding(.leading, 16)
.padding(.trailing, 12)
.frame(height: SchemaViewMetrics.consoleHeader)
ConsoleLogView(entries: store.lines.map { ConsoleLogLine(id: $0.id, text: $0.line.text, color: Palette.artisan($0.line.kind)) })
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top)
.padding(.horizontal, 16)
.padding(.bottom, 12)
}
.frame(height: SchemaViewMetrics.console)
.background(Palette.panel)
.hairline(.top)
}
}