Skip to content

Commit

Permalink
Bugfixes & support for shiny mediator, cardsview.maui, & plugin.maui.ocr
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Jun 5, 2024
1 parent a2dda25 commit 0c9c1ed
Show file tree
Hide file tree
Showing 10 changed files with 127 additions and 17 deletions.
38 changes: 32 additions & 6 deletions ProjectTemplates/ShinyApp/.template.config/ide.host.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,19 @@
}],
"symbolInfo": [
{
"id": "markuptype",
"name": {
"text": "UI Markup Type"
"id": "useblazor",
"name":{
"text": "Add Blazor Hybrid Support"
},
"isVisible": true
},
{
"id": "usecsharpmarkup",
"name":{
"text": "Add C# Markup - MAUI Community Toolkit"
},
"isVisible": true
},
},
{
"id": "applicationId",
"name": {
Expand All @@ -32,6 +39,13 @@
},
"isVisible": true
},
{
"id": "shinymediator",
"name": {
"text": "Add Shiny Mediator"
},
"isVisible": true
},
{
"id": "configuration",
"name": {
Expand Down Expand Up @@ -258,6 +272,13 @@
},
"isVisible": true
},
{
"id": "cards",
"name":{
"text": "Add CardsView.Maui"
},
"isVisible": true
},
{
"id": "sqlite",
"name": {
Expand Down Expand Up @@ -292,8 +313,7 @@
"text": "Add Calendar Store (Plugin.Maui.CalendarStore)"
},
"isVisible": true
},
{
},{
"id": "audio",
"name":{
"text": "Add Audio (Plugin.Maui.Audio)"
Expand All @@ -305,6 +325,12 @@
"text": "Add Screen Recording (Plugin.Maui.ScreenRecording)"
},
"isVisible": true
},{
"id": "ocr",
"name":{
"text": "Add OCR (Plugin.Maui.OCR)"
},
"isVisible": true
},{
"id": "userdialogs",
"name":{
Expand Down
22 changes: 21 additions & 1 deletion ProjectTemplates/ShinyApp/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@
"description": "Add Shiny Framework by Allan Ritchie - Documentation https://github.com/shinyorg/framework - Lots of helpful services like navigation, zero boilerplate MVVM properties, viewmodel validation, localization, viewmodel lifecycles, dialog services, and more",
"displayName": "Add Shiny Framework (Shiny + ReactiveUI + Prism)"
},
"shinymediator":{
"type": "parameter",
"datatype": "bool",
"defaultValue": "true",
"description": "Add Shiny Mediator - Documentation https://github.com/shinyorg/mediator",
"displayName": "Add Shiny Mediator"
},
"localization":{
"type": "parameter",
"datatype": "bool",
Expand Down Expand Up @@ -387,6 +394,13 @@
"description": "Sharpnado Tabs by Jean-Marie Alfonsi - Documentation https://github.com/roubachof/Sharpnado.Tabs",
"displayName": "Add Sharpnado Tabs"
},
"cards":{
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "CardsView.Maui by Andrei Misiukevich - Documentation https://www.nuget.org/packages/CardsView.Maui",
"displayName": "Add CardsView.Maui"
},
"sqlite": {
"type": "parameter",
"datatype": "bool",
Expand Down Expand Up @@ -429,6 +443,13 @@
"description": "Audio Plugin by Gerald Versluis - Documentation https://github.com/jfversluis/Plugin.Maui.Audio",
"displayName": "Add Audio (Plugin.Maui.Audio)"
},
"ocr":{
"type": "parameter",
"datatype": "bool",
"defaultValue": "false",
"description": "OCR Plugin by Kori Francis - Documentation https://github.com/kfrancis/ocr",
"displayName": "Add OCR (Plugin.Maui.OCR)"
},
"screenrecord":{
"type": "parameter",
"datatype": "bool",
Expand Down Expand Up @@ -732,7 +753,6 @@
"condition": "(useblazor == false)",
"exclude":[
"BlazorPage.*",
"*.razor",
"Components/**",
"wwwroot/**"
]
Expand Down
2 changes: 1 addition & 1 deletion ProjectTemplates/ShinyApp/BlazorPage.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:ShinyApp"
xmlns:local="clr-namespace:ShinyApp.Components"
x:Class="ShinyApp.BlazorPage"
BackgroundColor="{DynamicResource PageBackgroundColor}">

Expand Down
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions ProjectTemplates/ShinyApp/Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ _A cross platform framework designed to make working with device services and ba
* [Documentation](https://shinylib.net/)
* [GitHub](https://github.com/shinyorg/shiny)

<!--#if (shinymediator)-->
## Shiny Mediator

_A simple mediator pattern for .NET applications - Written by Allan Ritchie_

* [GitHub](https://github.com/shinyorg/mediator)

<!--#endif-->
<!--#if (sentry)-->
## Sentry for MAUI
* Easy MAUI integration by calling UseSentry on your MauiAppBuilder
Expand Down Expand Up @@ -110,6 +118,14 @@ _A performant and feature rich collection view by Jean-Marie Alfonsi_

* [GitHub](https://github.com/roubachof/Sharpnado.CollectionView)

<!--#endif-->
<!--#if (cards)-->
## CardsView MAUI

_CardsView is a view for presenting a stack of cards in a carousel-like view. It supports swiping to dismiss, dragging and dropping, and more. - Written by Andrei Misiukevich_

* [GitHub](https://github.com/AndreiMisiukevich/CardView.MAUI)

<!--#endif-->
<!--#if (usemauimaps)-->
## .NET MAUI Maps
Expand Down Expand Up @@ -204,6 +220,14 @@ _Provides the ability to record the screen from within your .NET MAUI app - Writ

* [GitHub](https://github.com/jfversluis/Plugin.Maui.ScreenRecording)

<!--#endif-->
<!--#if (ocr)-->
## MAUI OCR Plugin

_Provides the ability to perform OCR (Optical Character Recognition) on images in your .NET MAUI app - Written by Kori Francis_

* [GitHub](https://github.com/kfrancis/ocr)

<!--#endif-->
<!--#if (fingerprint)-->
## MAUI Biometric Plugin
Expand Down
26 changes: 25 additions & 1 deletion ProjectTemplates/ShinyApp/MauiProgram.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#if debugrainbows
#if shinymediator
using Shiny.Mediator;
#endif
#if debugrainbows
using Plugin.Maui.DebugRainbows;
#endif
#if screenrecord
using Plugin.Maui.ScreenRecording;
#endif
#if ocr
using Plugin.Maui.OCR;
#endif
#if fingerprint
using Maui.Biometric;
#endif
Expand All @@ -22,6 +28,9 @@
#if sharpnadotabs
using Sharpnado.Tabs;
#endif
#if cards
using PanCardView;
#endif
#if skia || skiaextended
using SkiaSharp.Views.Maui.Controls.Hosting;
#endif
Expand Down Expand Up @@ -103,6 +112,9 @@ public static MauiApp CreateMauiApp() => MauiApp
#if usemauimaps
.UseMauiMaps()
#endif
#if cards
.UseCardsView()
#endif
#if sentry
.UseSentry(options =>
{
Expand Down Expand Up @@ -155,6 +167,9 @@ public static MauiApp CreateMauiApp() => MauiApp
)
#endif
//+:cnd:noEmit
#endif
#if ocr
.UseOcr()
#endif
.ConfigureFonts(fonts =>
{
Expand Down Expand Up @@ -199,6 +214,15 @@ static MauiAppBuilder RegisterInfrastructure(this MauiAppBuilder builder)
#endif
//+:cnd:noEmit
var s = builder.Services;
#if shinymediator
s.AddShinyMediator(cfg =>
{
cfg.UseMaui();
#if useblazor
cfg.UseBlazor();
#endif
});
#endif
#if appaction
s.AddSingleton<ShinyApp.Delegates.AppActionDelegate>();
#endif
Expand Down
23 changes: 18 additions & 5 deletions ProjectTemplates/ShinyApp/ShinyApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<!--#endif-->
<IosSimulatorBuild Condition="'$(Configuration)' == 'Debug'">False</IosSimulatorBuild>

<MauiVersion>8.0.21</MauiVersion>
<MauiVersion>8.0.40</MauiVersion>
<OutputType>Exe</OutputType>
<RootNamespace>ShinyApp</RootNamespace>
<SingleProject>true</SingleProject>
Expand Down Expand Up @@ -145,6 +145,9 @@

<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<!--#if (usemauimaps)-->
<PackageReference Include="Microsoft.Maui.Controls.Maps" Version="$(MauiVersion)" />
<!--#endif-->
<!--#if (useblazor)-->
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" />
<!--#endif-->
Expand All @@ -159,9 +162,6 @@
<!--#if (mediaelement)-->
<PackageReference Include="CommunityToolkit.Maui.MediaElement" Version="3.1.1" />
<!--#endif-->
<!--#if (usemauimaps)-->
<PackageReference Include="Microsoft.Maui.Controls.Maps" Version="$(MauiVersion)" />
<!--#endif-->
<!--#if (usegooglemaps)-->
<PackageReference Include="Onion.Maui.GoogleMaps" Version="5.0.3" />
<!--#endif-->
Expand All @@ -173,6 +173,13 @@
<PackageReference Include="Shiny.Core" Version="$(ShinyVersion)" />
<PackageReference Include="Shiny.Hosting.Maui" Version="$(ShinyVersion)" />
<!--#endif-->
<!--#if (shinymediator)-->
<PackageReference Include="Shiny.Mediator" Version="1.0.0-alpha-0034" />
<PackageReference Include="Shiny.Mediator.Maui" Version="1.0.0-alpha-0034" />
<!--#if (useblazor)-->
<PackageReference Include="Shiny.Mediator.Blazor" Version="1.0.0-alpha-0034" />
<!--#endif-->
<!--#endif-->
<!--#if (localization)-->
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.3" />
<!--#endif-->
Expand Down Expand Up @@ -239,6 +246,9 @@
<!--#if (audio)-->
<PackageReference Include="Plugin.Maui.Audio" Version="2.1.0" />
<!--#endif-->
<!--#if (ocr)-->
<PackageReference Include="Plugin.Maui.OCR" Version="1.0.11" />
<!--#endif-->
<!--#if (fingerprint)-->
<PackageReference Include="Oscore.Maui.Biometric" Version="1.0.1" />
<!--#endif-->
Expand All @@ -254,6 +264,9 @@
<!--#if (sharpnadocv)-->
<PackageReference Include="Sharpnado.CollectionView.Maui" Version="3.1.2" />
<!--#endif-->
<!--#if (cards)-->
<PackageReference Include="CardsView.Maui" Version="0.0.6" />
<!--#endif-->
<!--#if (uraniumui)-->
<PackageReference Include="UraniumUI.Material" Version="2.8.1" />
<PackageReference Include="UraniumUI.Icons.MaterialIcons" Version="2.8.1" />
Expand All @@ -278,7 +291,7 @@
<PackageReference Include="Plugin.Maui.DebugRainbows" Version="1.2.0" Condition="'$(Configuration)' == 'Debug'" />
<!--#endif-->
<!--#if (ffimageloading)-->
<PackageReference Include="FFImageLoading.Maui" Version="1.2.3" />
<PackageReference Include="FFImageLoading.Maui" Version="1.2.5" />
<!--#endif-->
<!--#if (embedio)-->
<PackageReference Include="EmbedIO" Version="3.5.2" />
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#### MAUI Shiny.NET App Project Template

* Supports Visual Studio for Windows 2022 and Visual Studio for Mac 2022
* Supports Visual Studio for Windows 2022, Visual Studio for Mac 2022, & JetBrains Rider 2024+
* Creates all the necessary permissions, boilerplate, & setup you'll need to get your .NET MAUI app up and running with Shiny & many other great community libraries
* Easy setup and choice for push notifications
* Full Native
Expand All @@ -25,6 +25,7 @@
* [Prism](https://prismlibrary.com/)
* [ReactiveUI](https://reactiveui.net/)
* [Shiny.NET](https://shinylib.net)
* [Shiny Mediator](https://github.com/shinyorg/mediator)
* Select mutliple platform UI Markup types
* XAML
* Blazor
Expand Down Expand Up @@ -70,8 +71,10 @@
* [In-App Billing Plugin](https://github.com/jamesmontemagno/InAppBillingPlugin) by James Montemagno
* [MAUI Screen Recording Plugin](https://github.com/jfversluis/Plugin.Maui.ScreenRecording) by Gerald Versluis
* [MAUI Audio Plugin](https://github.com/jfversluis/Plugin.Maui.Audio) by Gerald Versluis
* [MAUI Calendar Store Plugin](https://github.com/jfversluis/Plugin.Maui.CalendarStore) by Gerald Versluis
* [MAUI Calendar Store Plugin](https://github.com/jfversluis/Plugin.Maui.CalendarStore) by Gerald Versluis
* [MAUI OCR Plugin](https://github.com/kfrancis/ocr) by Kori Francis
* [MAUI Biometric Plugin](https://github.com/oscoreio/Maui.Biometric) by Konstantin S & Sven-Michael Stübe
* [CardsView MAUI](https://github.com/AndreiMisiukevich/CardView.MAUI) by Andrei Misiukevich
* [Drastic Flipper](https://github.com/drasticactions/Drastic.Flipper) by Tim Miller
* [Embed.IO](https://unosquare.github.io/embedio/) by Unosquare
* [SkiaSharp](https://github.com/mono/SkiaSharp) by Matthew Leibowitz
Expand Down
2 changes: 1 addition & 1 deletion Template.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Description>Shiny.NET Templates - One stop shop to setup almost everything you can imagine within your .NET MAUI application</Description>
<PackageType>Template</PackageType>
<PackageVersion>2.8.0</PackageVersion>
<PackageVersion>2.9.0</PackageVersion>
<PackageId>Shiny.Templates</PackageId>
<Title>Shiny Templates</Title>
<Authors>Allan Ritchie</Authors>
Expand Down

0 comments on commit 0c9c1ed

Please sign in to comment.