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
+10
View File
@@ -150,6 +150,16 @@ public enum Palette {
public static let inlineAddedHighlight = Color(hex: 0x8FBFB4, alpha: 0.36)
public static let inlineFiller = Color(hex: 0x232C39, alpha: 0.35)
/// The colour of an artisan console line in the Schema view.
public static func artisan(_ kind: ArtisanLineKind) -> Color {
switch kind {
case .command: text1
case .output: text3
case .error: amber
case .success: gitNew
}
}
/// The colour of a console line.
public static func console(_ kind: GitLineKind) -> Color {
switch kind {
+14
View File
@@ -110,6 +110,20 @@ public enum Typography {
public static let gitEmpty = TypeRole(.sansRegular, 13, lineHeight: 20.8)
public static let console = TypeRole(.monoRegular, 12, lineHeight: 19.2)
public static let branchCurrent = TypeRole(.monoSemiBold, 12)
// MARK: Schema view
/// The empty and command-missing copy: Sans 15/1.6, with paths in mono at the same size.
public static let schemaBody = TypeRole(.sansRegular, 15, lineHeight: 24)
public static let schemaBodyMono = TypeRole(.monoRegular, 15, lineHeight: 24)
/// A card's table name.
public static let schemaCardName = TypeRole(.monoBold, 12)
/// `PK`, `FK`, `UQ` on a card row.
public static let schemaKey = TypeRole(.monoBold, 9, trackingEm: 0.06)
public static let schemaZoom = TypeRole(.monoMedium, 11)
public static let schemaDetailName = TypeRole(.monoBold, 13)
public static let schemaDetailColumn = TypeRole(.monoMedium, 12, lineHeight: 16.8)
public static let schemaDetailMeta = TypeRole(.monoRegular, 11, lineHeight: 15.4)
}
extension View {