Skip to content

Commit 01a84ab

Browse files
committed
Split CompositionExpressions into a separate published NuGet package
The typed expression DSL (Microsoft.Toolkit.Uwp.UI.Animations.ExpressionsFork nodes + ExpressionFunctions, the AnimatableNode wrappers, BindableCompositionPropertySet, and AnimationConstants) was already compiled directly into CompositionCollectionView.dll. To let other consumers (e.g. Combobulate) take a NuGet dependency on just the expression DSL without pulling in the collection-view types, ship it as its own assembly + package. Changes: - src/CompositionExpressions/ : new UWP class library mirroring src/CompositionExpressions.WinAppSdk/. Compiles the same source files (still physically located under src/CompositionCollectionView/ to keep one canonical copy) but against the UAP target. Excludes TrackedInteractionNodes.cs which uses Microsoft.UI.Composition.Interactions APIs without a UWP counterpart we want to ship. - src/CompositionCollectionView/CompositionCollectionView.csproj : remove the ExpressionsFork/AnimatableNodes/BindableCompositionPropertySet/ AnimationConstants Compile entries and ProjectReference the new CompositionExpressions project instead. Mirrors what CCV.WinAppSdk has been doing already. - CompositionExpressions.nuspec : new package id 'arcadiog.CompositionExpressions', ships UWP + WinAppSdk lib folders. - CompositionCollectionView.nuspec : declares a NuGet dependency on arcadiog.CompositionExpressions \\$ in both targetFramework groups. - .github/workflows/release.yml : pack and push both nuspecs (the WinAppSdk CompositionExpressions assembly is already produced transitively via CCV.WinAppSdk's ProjectReference; the new UWP one is produced transitively via CCV.csproj's ProjectReference).
1 parent 8987999 commit 01a84ab

6 files changed

Lines changed: 278 additions & 45 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
- name: Restore & Build UWP library
4646
shell: pwsh
4747
run: |
48+
# CCV ProjectReferences CompositionExpressions; building CCV builds both.
4849
nuget restore src/CompositionCollectionView/CompositionCollectionView.csproj
4950
& "${{ steps.vs.outputs.MSBUILD }}" src/CompositionCollectionView/CompositionCollectionView.csproj `
5051
/t:Build /p:Configuration=Release /p:Platform=AnyCPU
@@ -87,6 +88,9 @@ jobs:
8788
- name: Pack NuGet
8889
shell: pwsh
8990
run: |
91+
nuget pack CompositionExpressions.nuspec `
92+
-Version ${{ steps.version.outputs.VERSION }} `
93+
-OutputDirectory artifacts
9094
nuget pack CompositionCollectionView.nuspec `
9195
-Version ${{ steps.version.outputs.VERSION }} `
9296
-OutputDirectory artifacts

CompositionCollectionView.nuspec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
<tags>uwp winui3 winappsdk composition collection layout animation xaml</tags>
1212
<readme>docs\README.md</readme>
1313
<dependencies>
14-
<group targetFramework="UAP10.0.19041" />
14+
<group targetFramework="UAP10.0.19041">
15+
<dependency id="arcadiog.CompositionExpressions" version="$version$" />
16+
</group>
1517
<group targetFramework="net10.0-windows10.0.19041.0">
1618
<dependency id="Microsoft.WindowsAppSDK" version="1.7.250401001" exclude="Build,Analyzers" />
19+
<dependency id="arcadiog.CompositionExpressions" version="$version$" />
1720
</group>
1821
</dependencies>
1922
</metadata>

CompositionExpressions.nuspec

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
3+
<metadata>
4+
<id>arcadiog.CompositionExpressions</id>
5+
<version>$version$</version>
6+
<authors>Arcadio Garcia</authors>
7+
<license type="expression">MIT</license>
8+
<projectUrl>https://github.com/arcadiogarcia/CompositionCollectionView</projectUrl>
9+
<repository type="git" url="https://github.com/arcadiogarcia/CompositionCollectionView" />
10+
<description>A typed C# DSL for composing Windows.UI.Composition / Microsoft.UI.Composition expression animations, plus animatable-node wrappers and a property-set helper. Fork of the original CommunityToolkit ExpressionsFork; ships standalone for UWP and WinUI 3 / Windows App SDK so consumers can take the expression DSL without depending on the broader CompositionCollectionView control.</description>
11+
<tags>uwp winui3 winappsdk composition expressions animation</tags>
12+
<readme>docs\README.md</readme>
13+
<dependencies>
14+
<group targetFramework="UAP10.0.19041" />
15+
<group targetFramework="net10.0-windows10.0.19041.0">
16+
<dependency id="Microsoft.WindowsAppSDK" version="1.8.260317003" exclude="Build,Analyzers" />
17+
</group>
18+
</dependencies>
19+
</metadata>
20+
<files>
21+
<!-- README -->
22+
<file src="README.md" target="docs\README.md" />
23+
24+
<!-- UWP (uap10.0.19041) -->
25+
<file src="src\CompositionExpressions\bin\Release\CompositionExpressions.dll" target="lib\uap10.0.19041" />
26+
<file src="src\CompositionExpressions\bin\Release\CompositionExpressions.xml" target="lib\uap10.0.19041" />
27+
28+
<!-- WinUI 3 / Windows App SDK – compile reference (net10.0-windows10.0.19041.0) -->
29+
<file src="src\CompositionExpressions.WinAppSdk\bin\x64\Release\net10.0-windows10.0.19041.0\CompositionExpressions.dll" target="lib\net10.0-windows10.0.19041.0" />
30+
<file src="src\CompositionExpressions.WinAppSdk\bin\x64\Release\net10.0-windows10.0.19041.0\CompositionExpressions.xml" target="lib\net10.0-windows10.0.19041.0" />
31+
32+
<!-- WinUI 3 / Windows App SDK – x64 runtime -->
33+
<file src="src\CompositionExpressions.WinAppSdk\bin\x64\Release\net10.0-windows10.0.19041.0\CompositionExpressions.dll" target="runtimes\win-x64\lib\net10.0-windows10.0.19041.0" />
34+
35+
<!-- WinUI 3 / Windows App SDK – ARM64 runtime -->
36+
<file src="src\CompositionExpressions.WinAppSdk\bin\ARM64\Release\net10.0-windows10.0.19041.0\CompositionExpressions.dll" target="runtimes\win-arm64\lib\net10.0-windows10.0.19041.0" />
37+
</files>
38+
</package>

src/CompositionCollectionView/CompositionCollectionView.csproj

Lines changed: 13 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,21 @@
125125
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
126126
</PropertyGroup>
127127
<ItemGroup>
128-
<Compile Include="AnimatableNodes\AnimatableCompositionNodeSet.cs" />
129-
<Compile Include="AnimatableNodes\AnimatableMatrix4x4CompositionNode.cs" />
130-
<Compile Include="AnimatableNodes\AnimatableQuaternionCompositionNode.cs" />
131-
<Compile Include="AnimatableNodes\AnimatableScalarCompositionNode.cs" />
132-
<Compile Include="AnimatableNodes\AnimatableVector3CompositionNode.cs" />
133-
<Compile Include="AnimationConstants.cs" />
128+
<!--
129+
Source files for the typed Composition expression DSL + the
130+
animatable-node wrappers + BindableCompositionPropertySet +
131+
AnimationConstants live in this same folder, but are now compiled
132+
into a sibling project (..\CompositionExpressions) and referenced
133+
via ProjectReference below. That keeps a single canonical copy of
134+
those files (this folder) while letting them ship as a separate
135+
assembly so non-CCV consumers (e.g. Combobulate) can take a
136+
dependency on them without pulling in the collection-view types.
137+
-->
134138
<Compile Include="Behaviors\InteractionTrackerGesture\GesturePreviewControl.cs" />
135139
<Compile Include="Behaviors\InteractionTrackerGesture\InteractionTrackerGesture.cs" />
136140
<Compile Include="Behaviors\ElementInteractionTrackerBehavior.cs" />
137141
<Compile Include="Behaviors\InteractionTrackerBehavior.cs" />
138142
<Compile Include="Behaviors\LayoutBehavior.cs" />
139-
<Compile Include="BindableCompositionPropertySet.cs" />
140143
<Compile Include="CompositionCollectionLayout.Behaviors.cs" />
141144
<Compile Include="CompositionCollectionLayout.cs" />
142145
<Compile Include="CompositionCollectionLayout.Overridable.cs" />
@@ -146,45 +149,11 @@
146149
<Compile Include="DeconstructPolyfillExtensions.cs" />
147150
<Compile Include="ElementReference.cs" />
148151
<Compile Include="GlobalUsings.cs" />
149-
<Compile Include="ExpressionsFork\Expressions\ExpressionNodes\BooleanNode.cs" />
150-
<Compile Include="ExpressionsFork\Expressions\ExpressionNodes\ColorNode.cs" />
151-
<Compile Include="ExpressionsFork\Expressions\ExpressionNodes\ExpressionNode.cs" />
152-
<Compile Include="ExpressionsFork\Expressions\ExpressionNodes\ExpressionNodeType.cs" />
153-
<Compile Include="ExpressionsFork\Expressions\ExpressionNodes\Matrix3x2Node.cs" />
154-
<Compile Include="ExpressionsFork\Expressions\ExpressionNodes\Matrix4x4Node.cs" />
155-
<Compile Include="ExpressionsFork\Expressions\ExpressionNodes\Matrix4x4Node.Subchannel.cs" />
156-
<Compile Include="ExpressionsFork\Expressions\ExpressionNodes\QuaternionNode.cs" />
157-
<Compile Include="ExpressionsFork\Expressions\ExpressionNodes\ScalarNode.cs" />
158-
<Compile Include="ExpressionsFork\Expressions\ExpressionNodes\ValueKeywordKind.cs" />
159-
<Compile Include="ExpressionsFork\Expressions\ExpressionNodes\Vector2Node.cs" />
160-
<Compile Include="ExpressionsFork\Expressions\ExpressionNodes\Vector3Node.cs" />
161-
<Compile Include="ExpressionsFork\Expressions\ExpressionNodes\Vector4Node.cs" />
162-
<Compile Include="ExpressionsFork\Expressions\ExpressionValues\ExpressionValues.Constant.cs" />
163-
<Compile Include="ExpressionsFork\Expressions\ExpressionValues\ExpressionValues.CurrentValue.cs" />
164-
<Compile Include="ExpressionsFork\Expressions\ExpressionValues\ExpressionValues.Reference.cs" />
165-
<Compile Include="ExpressionsFork\Expressions\ExpressionValues\ExpressionValues.StartingValue.cs" />
166-
<Compile Include="ExpressionsFork\Expressions\ExpressionValues\ExpressionValues.Target.cs" />
167-
<Compile Include="ExpressionsFork\Expressions\ReferenceNodes\AmbientLightReferenceNode.cs" />
168-
<Compile Include="ExpressionsFork\Expressions\ReferenceNodes\ColorBrushReferenceNode.cs" />
169-
<Compile Include="ExpressionsFork\Expressions\ReferenceNodes\DistantLightReferenceNode.cs" />
170-
<Compile Include="ExpressionsFork\Expressions\ReferenceNodes\DropShadowReferenceNode.cs" />
171-
<Compile Include="ExpressionsFork\Expressions\ReferenceNodes\InsetClipReferenceNode.cs" />
172-
<Compile Include="ExpressionsFork\Expressions\ReferenceNodes\InteractionTrackerReferenceNode.cs" />
173-
<Compile Include="ExpressionsFork\Expressions\ReferenceNodes\ManipulationPropertySetReferenceNode.cs" />
174-
<Compile Include="ExpressionsFork\Expressions\ReferenceNodes\NineGridBrushReferenceNode.cs" />
175-
<Compile Include="ExpressionsFork\Expressions\ReferenceNodes\PointerPositionPropertySetReferenceNode.cs" />
176-
<Compile Include="ExpressionsFork\Expressions\ReferenceNodes\PointLightReferenceNode.cs" />
177-
<Compile Include="ExpressionsFork\Expressions\ReferenceNodes\PropertySetReferenceNode.cs" />
178-
<Compile Include="ExpressionsFork\Expressions\ReferenceNodes\ReferenceNode.cs" />
179-
<Compile Include="ExpressionsFork\Expressions\ReferenceNodes\SpotLightReferenceNode.cs" />
180-
<Compile Include="ExpressionsFork\Expressions\ReferenceNodes\SurfaceBrushReferenceNode.cs" />
181-
<Compile Include="ExpressionsFork\Expressions\ReferenceNodes\VisualReferenceNode.cs" />
182-
<Compile Include="ExpressionsFork\Expressions\CompositionExtensions.cs" />
183-
<Compile Include="ExpressionsFork\Expressions\ExpressionFunctions.cs" />
184-
<Compile Include="ExpressionsFork\Expressions\FloatExtensions.cs" />
185-
<Compile Include="ExpressionsFork\Expressions\OperationType.cs" />
186152
<Compile Include="Properties\AssemblyInfo.cs" />
187153
</ItemGroup>
154+
<ItemGroup>
155+
<ProjectReference Include="..\CompositionExpressions\CompositionExpressions.csproj" />
156+
</ItemGroup>
188157
<ItemGroup>
189158
<Page Include="Themes\Generic.xaml">
190159
<Generator>MSBuild:Compile</Generator>

0 commit comments

Comments
 (0)