mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-18 05:18:00 +00:00
Temporarily added MudBlazor.Markdown to the solution
This is necessary due to issue https://github.com/MyNihongo/MudBlazor.Markdown/issues/247 I created a PR as well: https://github.com/MyNihongo/MudBlazor.Markdown/pull/246
This commit is contained in:
57 files changed
+11216
-1
No files matched your search
@@ -0,0 +1,6 @@
|
||||
namespace MudBlazor;
|
||||
|
||||
public interface IMudMarkdownClipboardService
|
||||
{
|
||||
ValueTask CopyToClipboardAsync(string text);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace MudBlazor;
|
||||
|
||||
public interface IMudMarkdownThemeService
|
||||
{
|
||||
event EventHandler<CodeBlockTheme> CodeBlockThemeChanged;
|
||||
|
||||
void SetCodeBlockTheme(CodeBlockTheme theme);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace MudBlazor;
|
||||
|
||||
internal sealed class MudMarkdownThemeService : IMudMarkdownThemeService
|
||||
{
|
||||
public event EventHandler<CodeBlockTheme>? CodeBlockThemeChanged;
|
||||
|
||||
public void SetCodeBlockTheme(CodeBlockTheme theme) =>
|
||||
CodeBlockThemeChanged?.Invoke(this, theme);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace MudBlazor;
|
||||
|
||||
public static class ServiceCollectionEx
|
||||
{
|
||||
public static IServiceCollection AddMudMarkdownServices(this IServiceCollection @this)
|
||||
{
|
||||
return @this.AddScoped<IMudMarkdownThemeService, MudMarkdownThemeService>();
|
||||
}
|
||||
|
||||
public static IServiceCollection AddMudMarkdownClipboardService<T>(this IServiceCollection @this)
|
||||
where T : class, IMudMarkdownClipboardService
|
||||
{
|
||||
return @this.AddScoped<IMudMarkdownClipboardService, T>();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user