Skip to content

Commit

Permalink
Merge pull request unoplatform#16629 from unoplatform/dev/cdb/uno-dsp…
Browse files Browse the repository at this point in the history
…-update

chore: Update for new Material Theme Builder format and Uno.Dsp 1.3
  • Loading branch information
carldebilly authored May 8, 2024
2 parents 644e707 + 91412ea commit 6baa062
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions doc/articles/features/using-the-uno-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Here are the supported features:
| `Material` | Adds support for the [Material Design Theme](xref:Uno.Themes.Material.GetStarted) library. If the `Toolkit` feature is also used, it will add support for the [Material Design Toolkit](xref:Toolkit.GettingStarted.Material) library. |
| `Cupertino` | Adds support for the [Cupertino Design Theme](xref:Uno.Themes.Cupertino.GetStarted) library. If the `Toolkit` feature is also used, it will add support for the [Cupertino Design Toolkit](xref:Toolkit.GettingStarted.Cupertino) library. |
| `Mvvm` | Adds support for the [CommunityToolkit.Mvvm](https://www.nuget.org/packages/CommunityToolkit.Mvvm) package. |
| `Dsp` | Adds support for the [Uno.Dsp packages](https://www.nuget.org/packages?q=uno.dsp). |
| `Dsp` | Adds support for the [Uno.Dsp.Tasks packages](https://www.nuget.org/packages?q=uno.dsp.tasks). |
| `Prism` | Adds [Prism](https://github.com/PrismLibrary/Prism) support for Uno Platform applications WinUI. |
| `Skia` | Adds support for [SkiaSharp](https://github.com/mono/SkiaSharp). |
| `Svg` | [SVG](xref:Uno.Features.SVG) support for iOS, Android, and Mac Catalyst. This option is not needed when only targeting WebAssembly and WinAppSDK. |
Expand All @@ -94,7 +94,7 @@ Here are the supported properties:
|----------------------------------|------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
| `UnoCoreLoggingSingletonVersion` | [Uno.Core.Extensions.Logging.Singleton](https://www.nuget.org/packages/Uno.Core.Extensions.Logging.Singleton) | Provides a logging singleton pattern with helpers and extension methods for simplified logging. |
| `UnoCSharpMarkupVersion` | [Uno.WinUI.Markup](https://www.nuget.org/packages/Uno.WinUI.Markup) and similar packages | Enables [C# Markup](xref:Uno.Extensions.Markup.Overview), the use of C# for building UI markup, similar to XAML but with C# syntax. |
| `UnoDspTasksVersion` | [Uno.Dsp.Tasks](https://www.nuget.org/packages/Uno.Dsp.Tasks) and similar packages | Includes tasks for Design System Package (DSP) within Uno Platform projects. |
| `UnoDspTasksVersion` | [Uno.Dsp.Tasks](https://www.nuget.org/packages/Uno.Dsp.Tasks) and similar packages | Includes tasks for Uno DSP (Theme colors import) within Uno Platform projects. |
| `UnoExtensionsVersion` | [Uno.Extensions.Storage.WinUI](https://www.nuget.org/packages/Uno.Extensions.Storage.WinUI) and similar packages | Extends the Uno Platform with additional methods and classes for more versatile application development. |
| `UnoLoggingVersion` | [Uno.Extensions.Logging.OSLog](https://www.nuget.org/packages/Uno.Extensions.Logging.OSLog) and similar packages | Implements logging mechanisms to help with monitoring and debugging Uno Platform applications. |
| `UnoResizetizerVersion` | [Uno.Resizetizer](https://www.nuget.org/packages/Uno.Resizetizer) | Provides tools for automatically resizing and managing image assets in Uno Platform projects. |
Expand Down
4 changes: 2 additions & 2 deletions doc/articles/getting-started/wizard/includes/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ Includes references to the [Uno.Extensions.Core.WinUI](https://www.nuget.org/pac
dotnet new unoapp -theme-Service
```

#### Import DSP
#### Import Theme File (Uno.Dsp)

Allows colors in the application to be overridden using a DSP file (Material theme only). This is included by default in the recommended preset, but not in the blank preset.
Allows colors in the application to be overridden using a theme file (Material theme only). This is included by default in the recommended preset, but not in the blank preset.

```dotnetcli
dotnet new unoapp -dsp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<PackageVersion Include="Uno.Extensions.Serialization.Http" Version="4.0.0" />
<PackageVersion Include="Uno.Extensions.Serialization.Refit" Version="4.0.0" />
<PackageVersion Include="Uno.Material.WinUI" Version="4.1.1" />
<PackageVersion Include="Uno.Dsp.Tasks" Version="1.2.9" />
<PackageVersion Include="Uno.Dsp.Tasks" Version="1.3.0" />
<PackageVersion Include="Uno.Toolkit.WinUI" Version="5.1.5" />
<PackageVersion Include="Uno.Toolkit.WinUI.Material" Version="5.1.5" />
<PackageVersion Include="Uno.Resizetizer" Version="1.3.0" />
Expand Down
10 changes: 5 additions & 5 deletions src/Uno.Sdk/Sdk/Sdk.props.buildschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,12 @@
],
"items": {
"UnoDspImportColors": {
"description": "Imports a DSP file with color definitions.",
"description": "Imports a theme file with color definitions.",
"metadata": {
"Generator": {
"type": { "$ref": "#/types/unoDspGenerator" },
"isRequired": true,
"description": "The type of generator to use for the DSP file."
"description": "The type of generator to use for the theme file (a .json/.zip extracted from Material Theme Builder)."
}
}
},
Expand Down Expand Up @@ -370,10 +370,10 @@
"caseSensitive": true,
"values": {
"Xaml": {
"description": "Generates a XAML file from the DSP file."
"description": "Generates a XAML file from the theme file."
},
"CSharp": {
"description": "Generates a C# file from the DSP file."
"description": "Generates a C# file from the theme file."
}
}
},
Expand Down Expand Up @@ -474,7 +474,7 @@
"helpUrl": "https://aka.platform.uno/feature-cupertino"
},
"Dsp": {
"description": "Adds support for the Uno.Dsp package.",
"description": "Adds support for the Uno.Dsp.Tasks package.",
"helpUrl": "https://aka.platform.uno/feature-dsp"
},
"Mvvm": {
Expand Down
2 changes: 1 addition & 1 deletion src/Uno.Sdk/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
},
{
"group": "Dsp",
"version": "1.2.9",
"version": "1.3.0",
"packages": [
"Uno.Dsp.Tasks"
]
Expand Down
5 changes: 5 additions & 0 deletions src/Uno.Sdk/targets/Uno.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@
</ItemGroup>

<ItemGroup Condition="$(UnoFeatures.Contains(';Dsp;'))">
<!-- New Material Theme Builder export format (Uno.Dsp 1.3+) -->
<UnoDspImportColors Include="Styles\*.json" Generator="Xaml" Condition="!$(UnoFeatures.Contains(';CSharpMarkup;'))" />
<UnoDspImportColors Include="Styles\*.json" Generator="CSharp" Condition="$(UnoFeatures.Contains(';CSharpMarkup;'))" />

<!-- Legacy old DSP format for backward compatibility -->
<UnoDspImportColors Include="Styles\*.zip" Generator="Xaml" Condition="!$(UnoFeatures.Contains(';CSharpMarkup;'))" />
<UnoDspImportColors Include="Styles\*.zip" Generator="CSharp" Condition="$(UnoFeatures.Contains(';CSharpMarkup;'))" />
</ItemGroup>
Expand Down

0 comments on commit 6baa062

Please sign in to comment.