Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstonis committed Oct 9, 2024
2 parents 2782ed1 + c1c98c3 commit 4f5bd1b
Show file tree
Hide file tree
Showing 81 changed files with 1,390 additions and 132 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false

# attributes
place_attribute_on_same_line = always

# analyzers
# CA1851: Possible multiple enumerations of 'IEnumerable' collection - https://github.com/dotnet/roslyn-analyzers/issues/6379
dotnet_diagnostic.CA1851.severity = suggestion
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'
source-url: https://nuget.pkg.github.com/theeightbot/index.json
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NUGET_AUTH_TOKEN: ${{secrets.NUGET_TOKEN}}

- uses: maxim-lobanov/setup-xcode@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Version="8.0.0"
PrivateAssets="all" />
<PackageReference Include="Roslynator.Analyzers"
Version="4.9.0"
Version="4.12.7"
PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
Expand Down
20 changes: 14 additions & 6 deletions Stellar.Avalonia/Stellar.Avalonia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,24 @@
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>warnings</Nullable>
<PackageId>StellarUI.Avalonia</PackageId>
<AssemblyName>StellarUI.Avalonia</AssemblyName>
<RootNamespace>StellarUI.Avalonia</RootNamespace>
<Title>Stellar UI - Avalonia</Title>
<Copyright>Eight-Bot 2024</Copyright>
<PackageLicenseUrl>https://github.com/TheEightBot/StellarUI/blob/main/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/TheEightBot/StellarUI</RepositoryUrl>
<PackageTags>Avalonia;MVVM;Reactive UI;Reactive Extensions;Eight-Bot</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.7" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.7" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.7" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.7" />
<PackageReference Include="Avalonia" Version="11.1.4" />
<PackageReference Include="Avalonia.Desktop" Version="11.1.4" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.1.4" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.1.4" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.7" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.7" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.1.4" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Stellar\Stellar.csproj" />
Expand Down
3 changes: 0 additions & 3 deletions Stellar.AvaloniaSample/FodyWeavers.xml

This file was deleted.

5 changes: 5 additions & 0 deletions Stellar.AvaloniaSample/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
global using System.Reactive;
global using System.Reactive.Disposables;
global using System.Reactive.Linq;
global using ReactiveUI;
global using ReactiveUI.SourceGenerators;
13 changes: 6 additions & 7 deletions Stellar.AvaloniaSample/Stellar.AvaloniaSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@


<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.7" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.7" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.7" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.7" />
<PackageReference Include="Avalonia" Version="11.1.4" />
<PackageReference Include="Avalonia.Desktop" Version="11.1.4" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.1.4" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.1.4" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.7" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.7" />
<PackageReference Include="ReactiveUI.Fody" Version="19.5.39" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.1.4" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Stellar.Avalonia\Stellar.Avalonia.csproj" />
Expand Down
13 changes: 4 additions & 9 deletions Stellar.AvaloniaSample/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
using System;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using ReactiveUI;
using ReactiveUI.Fody.Helpers;
using Stellar.ViewModel;
using Stellar.ViewModel;

namespace Stellar.AvaloniaSample.ViewModels;

public class MainWindowViewModel : ViewModelBase
public partial class MainWindowViewModel : ViewModelBase
{
[Reactive]
public string? Greeting { get; set; } = "Welcome to Avalonia!";
private string _greeting = "Welcome to Avalonia!";

protected override void Bind(CompositeDisposable disposables)
{
}
}
}
16 changes: 16 additions & 0 deletions Stellar.Blazor/ComponentBase.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Routing;
using ReactiveUI.Blazor;

namespace Stellar.Blazor;
Expand All @@ -9,6 +11,9 @@ public abstract class ComponentBase<TViewModel> : ReactiveComponentBase<TViewMod
{
private bool _isDisposed;

[Inject]
private NavigationManager Navigation { get; set; }

[EditorBrowsable(EditorBrowsableState.Never)]
public ViewManager ViewManager { get; } = new BlazorViewManager();

Expand Down Expand Up @@ -36,6 +41,9 @@ protected override void OnInitialized()
{
ViewManager.HandleActivated(this);

Navigation.LocationChanged -= LocationChanged;
Navigation.LocationChanged += LocationChanged;

base.OnInitialized();
}

Expand All @@ -46,10 +54,18 @@ protected override void OnPropertyChanged([CallerMemberName] string? propertyNam
base.OnPropertyChanged(propertyName);
}

private void LocationChanged(object? sender, LocationChangedEventArgs e)
{
string navigationMethod = e.IsNavigationIntercepted ? "HTML" : "code";
System.Diagnostics.Debug.WriteLine($"Notified of navigation via {navigationMethod} to {e.Location}");
}

protected override void Dispose(bool disposing)
{
this.ManageDispose(disposing, ref _isDisposed);

Navigation.LocationChanged -= LocationChanged;

base.Dispose(disposing);
}
}
13 changes: 11 additions & 2 deletions Stellar.Blazor/Stellar.Blazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,20 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageId>StellarUI.Blazor</PackageId>
<AssemblyName>StellarUI.Blazor</AssemblyName>
<RootNamespace>StellarUI.Blazor</RootNamespace>
<RepositoryUrl>https://github.com/TheEightBot/StellarUI/blob/main/LICENSE</RepositoryUrl>
<Title>Stellar UI - Blazor</Title>
<Authors>Eight-Bot</Authors>
<Copyright>Eight-Bot 2024</Copyright>
<PackageLicenseUrl>https://github.com/TheEightBot/StellarUI/blob/main/LICENSE</PackageLicenseUrl>
<PackageTags>.NET Blazor;MVVM;Reactive UI;Reactive Extensions;Eight-Bot</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ReactiveUI.Blazor" Version="19.5.39" />
<PackageReference Include="Splat.Microsoft.Extensions.DependencyInjection" Version="14.8.12" />
<PackageReference Include="ReactiveUI.Blazor" Version="20.1.63" />
<PackageReference Include="Splat.Microsoft.Extensions.DependencyInjection" Version="15.2.22" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 0 additions & 3 deletions Stellar.BlazorSample/FodyWeavers.xml

This file was deleted.

6 changes: 5 additions & 1 deletion Stellar.BlazorSample/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
global using System.Reactive.Disposables;
global using System.Reactive;
global using System.Reactive.Disposables;
global using System.Reactive.Linq;
global using ReactiveUI;
global using ReactiveUI.SourceGenerators;
5 changes: 2 additions & 3 deletions Stellar.BlazorSample/Stellar.BlazorSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
<ExternalConsole>true</ExternalConsole>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.1" PrivateAssets="all" />
<PackageReference Include="ReactiveUI.Fody" Version="19.5.39" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.10" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 3 additions & 5 deletions Stellar.BlazorSample/ViewModels/CounterViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
using System;
using ReactiveUI.Fody.Helpers;
using Stellar.ViewModel;

namespace Stellar.BlazorSample.ViewModels;

[ServiceRegistration]
public class CounterViewModel : ViewModelBase
public partial class CounterViewModel : ViewModelBase
{
[Reactive]
public int Count { get; set; }
private int _count;

protected override void Bind(CompositeDisposable disposables)
{
}
}
}
17 changes: 6 additions & 11 deletions Stellar.BlazorSample/ViewModels/IndexViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
using System;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using ReactiveUI;
using ReactiveUI.Fody.Helpers;
using Stellar.ViewModel;
using Stellar.ViewModel;

namespace Stellar.BlazorSample.ViewModels;

[ServiceRegistration(Lifetime.Singleton)]
public class IndexViewModel : ViewModelBase
public partial class IndexViewModel : ViewModelBase
{
[Reactive]
public string? Interval { get; set; }
private string? _interval;

[QueryParameter]
[Reactive]
public int ParameterInput { get; set; }
[property: QueryParameter]
private int _parameterInput;

protected override void Bind(CompositeDisposable disposables)
{
Expand All @@ -25,4 +20,4 @@ protected override void Bind(CompositeDisposable disposables)
.BindTo(this, x => x.Interval)
.DisposeWith(disposables);
}
}
}
9 changes: 8 additions & 1 deletion Stellar.FluentValidation/Stellar.FluentValidation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageId>StellarUI.FluentValidation</PackageId>
<Title>Stellar UI - FluentValidation</Title>
<Authors>Eight-Bot</Authors>
<Copyright>Eight-Bot 2024</Copyright>
<PackageLicenseUrl>https://github.com/TheEightBot/StellarUI/blob/main/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/TheEightBot/StellarUI</RepositoryUrl>
<PackageTags>.NET;FluentValidation;MVVM;Reactive UI;Reactive Extensions;Eight-Bot</PackageTags>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Stellar\Stellar.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FluentValidation" Version="11.9.0" />
<PackageReference Include="FluentValidation" Version="11.10.0" />
</ItemGroup>
</Project>
16 changes: 10 additions & 6 deletions Stellar.Maui.PopUp/Stellar.Maui.PopUp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,21 @@
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.19041.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<PackageId>StellarUI.Maui.PopUp</PackageId>
<Title>Stellar UI - MAUI Pop-up</Title>
<Authors>Eight-Bot</Authors>
<Copyright>Eight-Bot 2024</Copyright>
<PackageLicenseUrl>https://github.com/TheEightBot/StellarUI/blob/main/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/TheEightBot/StellarUI</RepositoryUrl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-ios|AnyCPU'">
<CreatePackage>false</CreatePackage>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls"
Version="8.0.6" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility"
Version="8.0.6" />
<PackageReference Include="ReactiveUI" Version="19.5.39" />
<PackageReference Include="Mopups" Version="1.3.0" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.91" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.91" />
<PackageReference Include="ReactiveUI" Version="20.1.63" />
<PackageReference Include="Mopups" Version="1.3.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Stellar.Maui\Stellar.Maui.csproj" />
Expand Down
6 changes: 4 additions & 2 deletions Stellar.Maui/Extensions/PageExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Stellar.Maui;
using System.Runtime.CompilerServices;

namespace Stellar.Maui;

public static class PageExtensions
{
Expand Down Expand Up @@ -96,4 +98,4 @@ void Page_Disappearing(object? sender, EventArgs e)
tcs.TrySetResult(true);
}
}
}
}
17 changes: 10 additions & 7 deletions Stellar.Maui/Stellar.Maui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,21 @@
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net7.0-android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.19041.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion>
<PackageId>StellarUI.Maui</PackageId>
<Title>Stellar UI - MAUI</Title>
<Authors>eight-Bot</Authors>
<Copyright>Eight-Bot 2024</Copyright>
<PackageLicenseUrl>https://github.com/TheEightBot/StellarUI/blob/main/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/TheEightBot/StellarUI</RepositoryUrl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-ios|AnyCPU'">
<CreatePackage>false</CreatePackage>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls"
Version="8.0.6" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility"
Version="8.0.6" />
<PackageReference Include="ReactiveUI.Maui" Version="19.5.39" />
<PackageReference Include="Splat.Microsoft.Extensions.DependencyInjection"
Version="14.8.12" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.91" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.91" />
<PackageReference Include="ReactiveUI.Maui" Version="20.1.63" />
<PackageReference Include="Splat.Microsoft.Extensions.DependencyInjection" Version="15.2.22" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Stellar\Stellar.csproj" />
Expand Down
26 changes: 26 additions & 0 deletions Stellar.MauiBlazorHybridSample/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Stellar.MauiBlazorHybridSample"
x:Class="Stellar.MauiBlazorHybridSample.App">
<Application.Resources>
<ResourceDictionary>

<Color x:Key="PageBackgroundColor">#512bdf</Color>
<Color x:Key="PrimaryTextColor">White</Color>

<Style TargetType="Label">
<Setter Property="TextColor" Value="{DynamicResource PrimaryTextColor}" />
<Setter Property="FontFamily" Value="OpenSansRegular" />
</Style>

<Style TargetType="Button">
<Setter Property="TextColor" Value="{DynamicResource PrimaryTextColor}" />
<Setter Property="FontFamily" Value="OpenSansRegular" />
<Setter Property="BackgroundColor" Value="#2b0b98" />
<Setter Property="Padding" Value="14,10" />
</Style>

</ResourceDictionary>
</Application.Resources>
</Application>
Loading

0 comments on commit 4f5bd1b

Please sign in to comment.