Error reported:
Microsoft.Toolkit.Uwp.UI.Lottie v7 uses System.Text.Encodings.Web v4.7.1 which has a high severity security vulnerability and as such doesn't pass component governance
This upgrades all of the runtime NuGet packages to the latest version.
* Create a project just for the animatables.
The animatables are types that are used by both LottieData and the upcoming
intermediate representation, so we need them to be in a separate project so
the code can be shared.
This also adds some small features to some animatables for use by IR, and
changes some IAnimatableVector3 types to IAnimatableVector2 (e.g. gradient
stops should never by vector3.
I've also removed the "property index" from animatables. That is a Lottie concept
that is only needed if you are supporting javascript expressions. We will never
support javascript expressions, so they're not needed. Removing them makes the
code a bit cleaner.
* Add support for LayerVisual and DropShadow Composition types. Much cleanup.
Getting ready to actually support DropShadow - we need some Composition types added.
As a result of adding the Composition types, I noticed many small cleanup tasks and included them.
Fix issues caused by update to VS 16.8 release.
Remove NullablesAttributes workaround for .NET Core 3.1 projects.
Now that we are building the .dll projects with .NET Core 3.1, the NullablesAttributes project is redundant and conflicts with the built-in nullables support in .NET Core.
* Allow external images to be loaded by LottieVisualSource, and add .lottie file support.
External images (i.e. images that are not embedded in the .JSON file) are a problem for LottieVisualSource because it doesn't know how to get them. For securit reasons, we don't want LottieVisualSource to have the ability to read files that are referenced from a Lottie .json file, and in many cases LottieVisualSource wouldn't be able to resolve the file because it doesn't have permissions.
This change adds an ImageAssetDelegate that the user can set on the AnimatedVisualSource in order to handle reading of external images.
This change also adds support for the .lottie format (see https://dotlottie.io). There is a parser for .lottie files, and support in LottieViewer for displaying Lotties from a .lottie file. Because .lottie files package images together with the .json Lottie file, it enables LottieViewer to display Lotties that have external images.
* Fix some bugs that were obvious when I started to CR.
* CR feedback.
* CR feedback.
* CR feedback.
* Fix typo in header.
* LottieViewer: allow palette colors to be changed, and markers in the info panel.
This change required more space for the color picker, and that it didn't cover up the playing Lottie, so the info and play speed and color picker are all now implemented as panels that slide out from the right.
Refactoring and clean up that does not change the output.
Getting ready for new features.
Switch UIDataCodeGen.dll to .NET Core 3.0 because it now uses C# 8. Enable .NET Core 3.x on build machines.
Add comments to the ADO yaml file so it's easier to figure out next time.
Update to the latest build.ps1 file from Cake.
Address warnings from build.cake about the addins not being pinned to a particular version.
* Move codegen code into its own module so that projects that don't use codegen don't include it, and so we can start using C# 8.0 in the codegen code.
* Pass Lottie metadata (frame rate, etc) through translator to the code generators.
Add ability to convert GenericData object to code-genned Windows.Data.Json objects.
This change passes the data through but doesn't yet change the output of the code generators. That will come soon when we figure out what clients would like to have.
* Remove some dead code.
* Removing C#-8.0-ism from code used by UWP.
Switch expressions are new in C# 8.0. UWP requires C# 7.0 so the LottieVisualSource won't build with them.
Now that LottieVisualSource doesn't support codegen, we should refactor this so that codegen can use C# 8.0 (which is ok for LottieGen because it's .NET Core so can use C# 8.0).
* Remove another piece of C# 8.0 that snuck in. It breaks LottieVisualSource builds.
* Make parsing resilient to issues seen in our corpus.
Handle unexpected matte types by parsing as "Unknown" and treating them as Add.
Allow parsing errors in layers to result in the layer being ignored rather than giving up. Note that this can result in an issue later on if the layer is searched for but not found.
Handle case of a layer with inPoint == outPoint by ignoring that layer.
Fix comparsion of CubicBezierEasings - equivalent CubicBezierEasings were being reported as being non-equal due to missing == operator overloads.
Handle the case of multiple color gradient stops at the same offset - always use the last one. Designers might do this because in one keyframe the stops are all bunched up against offset 0 or 1, then later they get spread out.
In general, throw exceptions from the parser less often.
Parse and save any extra top-level data in the json file. I plan to expose this in generated code and LottieVisualSource in a later check-in.
* Update nuget dependencies to latest non-prerelease versions.
* Updating the version of .NET Core UWP support.
I had previously updated the Nugets for the solution, but apparently that's not sufficent.
* Add data representation of IRandomAccessStream for use by LoadedImageSurface.
LoadedImageSurface doesn't actually do anything with IRandomAccessStream yet.
Also tweaked the samples csproj to get rid of a warning.
* CR feedback, and fixing race in the build.
* Fix cake file.
* Work around race condition in the build.
* Fix typo on commen
* Move the YAML object model and writer into its own project so it can be shared by UIData.
The YAML stuff was exclusive to LottieData before. But now I want to use Yaml for dumping WinCompData trees, thus this refactoring.
* Fix the licensing header.
* Adding some of the pieces needed for supporting image assets
Support for embedded images in Lottie files.
Introducing the WinUIXamlMediaData project so we can bring in LoadedImageSource for loading images.
* Small refactor for readability.
* Replace the CompositionSurfaceBase with ICompositionSurface.
The CompositionSurfaceBase made sense when the only implementations of ICompositionSurface
were also CompositionObjects. But with support for LoadedImageSurface that all changes.
This change is only part of the solution - in order to support LoadedImageSurface without
introducing a circular dependency between WinCompData and WinUIXamlData we will need to
add a new project for anything that needs to refer to both of them, i.e. the ObjectGraph,
Instantiator, Optimizer, codegen, and the dumpers.
* Fixing build break.
Adding CleanObjs.cmd script to easily delete all obj directories. This can be useful when diagnosing build issues because the regular clean doesn't delete objs.
* Respond to CR feedback.
Unless strict mode is enabled, we'll report parsing and translation issues as warnings rather than errors so as not to scare users
Add a script to easily install LottieGen from code you build locally.
Remove the GlobalSuppressions.cs files that were not supposed to be there.
Fix some code analysis warnings that were being disabled in the GlobalSuppressions.cs files.
We were using configurations to define each build product. That allowed the CI build to build only the projects we want, but it confuses people. So we'll always build everything in CI and go back to Debug and Release configurations only.
Also added a bunch of README content to help people navigate the code.
Switch to newest JSON parser.
Optimize allocations by using ReadOnlySpan<T> in places where we previously use IEnumerable<T> as a way of protecting arrays for modification.