@@ -9,7 +9,7 @@ extension Color {
99 if appearance. isDarkMode {
1010 return #colorLiteral( red: 0.1580096483 , green: 0.1730263829 , blue: 0.2026666105 , alpha: 1 )
1111 }
12- return . white
12+ return #colorLiteral ( red : 0.9896564803 , green : 0.9896564803 , blue : 0.9896564803 , alpha : 1 )
1313 } ) )
1414 }
1515
@@ -18,7 +18,7 @@ extension Color {
1818 if appearance. isDarkMode {
1919 return #colorLiteral( red: 0.2284317913 , green: 0.2145925438 , blue: 0.3214019983 , alpha: 1 )
2020 }
21- return #colorLiteral( red: 0.896820749 , green: 0.8709097223 , blue: 0.9766687925 , alpha: 1 )
21+ return #colorLiteral( red: 0.957824412 , green: 0.947133649 , blue: 0.9906365955 , alpha: 1 )
2222 } ) )
2323 }
2424}
@@ -92,6 +92,60 @@ extension MarkdownUI.Theme {
9292 }
9393 }
9494
95+ static func instruction( fontSize: Double ) -> MarkdownUI . Theme {
96+ . gitHub. text {
97+ ForegroundColor ( . primary)
98+ BackgroundColor ( Color . clear)
99+ FontSize ( fontSize)
100+ }
101+ . code {
102+ FontFamilyVariant ( . monospaced)
103+ FontSize ( . em( 0.85 ) )
104+ BackgroundColor ( Color . secondary. opacity ( 0.2 ) )
105+ }
106+ . codeBlock { configuration in
107+ let wrapCode = UserDefaults . shared. value ( for: \. wrapCodeInChatCodeBlock)
108+
109+ if wrapCode {
110+ configuration. label
111+ . codeBlockLabelStyle ( )
112+ . codeBlockStyle ( configuration)
113+ } else {
114+ ScrollView ( . horizontal) {
115+ configuration. label
116+ . codeBlockLabelStyle ( )
117+ }
118+ . workaroundForVerticalScrollingBugInMacOS ( )
119+ . codeBlockStyle ( configuration)
120+ }
121+ }
122+ . table { configuration in
123+ configuration. label
124+ . fixedSize ( horizontal: false , vertical: true )
125+ . markdownTableBorderStyle ( . init(
126+ color: . init( nsColor: . separatorColor) ,
127+ strokeStyle: . init( lineWidth: 1 )
128+ ) )
129+ . markdownTableBackgroundStyle (
130+ . alternatingRows( Color . secondary. opacity ( 0.1 ) , Color . secondary. opacity ( 0.2 ) )
131+ )
132+ . markdownMargin ( top: 0 , bottom: 16 )
133+ }
134+ . tableCell { configuration in
135+ configuration. label
136+ . markdownTextStyle {
137+ if configuration. row == 0 {
138+ FontWeight ( . semibold)
139+ }
140+ BackgroundColor ( nil )
141+ }
142+ . fixedSize ( horizontal: false , vertical: true )
143+ . padding ( . vertical, 6 )
144+ . padding ( . horizontal, 13 )
145+ . relativeLineSpacing ( . em( 0.25 ) )
146+ }
147+ }
148+
95149 static func functionCall( fontSize: Double ) -> MarkdownUI . Theme {
96150 . gitHub. text {
97151 ForegroundColor ( . secondary)
0 commit comments