Skip to content

Commit c7a9a61

Browse files
StevenTCramerclaude
andcommitted
feat(release): prepare 1.0.0-beta.3 - MIT license, rewritten readme, version bump
Clear the three release blockers: - Add MIT LICENSE (with attribution note for Facebook's Yoga, whose behavior this from-scratch C# implementation models) and switch PackageLicenseExpression from Unlicense to MIT. The previous Unlicense expression referenced a LICENSE file that did not exist. - Rewrite readme against the current Node/Style/CalculateLayout API; the old readme documented the deleted FlexNode/FlexLayoutEngine API and ships inside the package. The new usage example is verified to compile and produce the documented output. - Bump version 1.0.0-beta.2 -> 1.0.0-beta.3 (beta.2 was published from the previous, now-replaced implementation). Verified with dotnet pack: nupkg carries the dll, new readme, and logo with license expression MIT and version 1.0.0-beta.3. Release steps tracked in kanban task 140. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 7c78abe commit c7a9a61

4 files changed

Lines changed: 119 additions & 17 deletions

File tree

LICENSE

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
MIT License
2+
3+
Copyright (c) 2025-2026 TimeWarp Enterprises, LLC
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+
23+
---
24+
25+
TimeWarp.Flexbox is a from-scratch C# implementation of the flexbox layout
26+
algorithm whose behavior is modeled on Facebook's Yoga layout engine
27+
(https://github.com/facebook/yoga), which is licensed under the MIT License,
28+
Copyright (c) Meta Platforms, Inc. and affiliates.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Task 140 - Release 1.0.0-beta.3
2+
3+
## Summary
4+
5+
Publish the first release of the rewritten (Yoga-port) engine. The three release
6+
blockers were cleared on 2026-07-03: MIT LICENSE added (with Yoga attribution note),
7+
readme rewritten against the current `Node`/`Style`/`CalculateLayout` API (example
8+
verified compiling and producing the documented output), and version bumped to
9+
1.0.0-beta.3 with `PackageLicenseExpression` set to MIT. Local `dotnet pack`
10+
verified: dll + readme + logo, MIT license, version 1.0.0-beta.3.
11+
12+
## Todo List
13+
14+
- [ ] Merge dev to master via PR (green CI)
15+
- [ ] Create GitHub release `v1.0.0-beta.3` — the release event triggers the
16+
workflow's publish step to GitHub Packages
17+
- [ ] Release notes must state clearly: the API is entirely new; beta.2 and earlier
18+
were a different implementation (`FlexNode`/`FlexLayoutEngine`) that no longer
19+
exists. Known gaps: intrinsic text measurement untested,
20+
FixFlexBasisFitContent experimental feature unimplemented.
21+
- [ ] Verify the package appears on the GitHub Packages feed and installs into a
22+
consumer project
23+
24+
## Toward stable 1.0 (follow-ups, not blockers for beta.3)
25+
26+
- [ ] Task 139: restore style/analyzer gates (naming decision + hand fixes)
27+
- [ ] Port remaining hand-written Yoga unit tests (Baseline, AspectRatio, Edge,
28+
HadOverflow, Dirtied, Persistence, FlexGap, ...)
29+
- [ ] Text-measurement test helper to unlock skipped IntrinsicSize tests
30+
- [ ] Enable GenerateDocumentationFile so the package ships XML docs
31+
32+
## Results
33+
34+
(Add after completion)

readme.md

Lines changed: 55 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
A pure C# implementation of the Flexbox layout algorithm for .NET applications.
44

5+
TimeWarp.Flexbox is a from-scratch C# port of the algorithm behind Facebook's
6+
[Yoga](https://github.com/facebook/yoga) layout engine. It computes CSS-flexbox
7+
layouts (positions and sizes) for a tree of nodes — no UI framework required —
8+
and its behavior is verified against Yoga's own generated conformance suite
9+
(530 tests, LTR and RTL).
10+
511
## Installation
612

713
This is a private package hosted on GitHub Packages. To consume it, you need to configure authentication.
@@ -58,7 +64,7 @@ Note: `GITHUB_TOKEN` works for repositories within the same organization. For ex
5864
### 4. Add Package Reference
5965

6066
```xml
61-
<PackageReference Include="TimeWarp.Flexbox" Version="1.0.0-beta.1" />
67+
<PackageReference Include="TimeWarp.Flexbox" Version="1.0.0-beta.3" />
6268
```
6369

6470
## Usage
@@ -67,25 +73,59 @@ Note: `GITHUB_TOKEN` works for repositories within the same organization. For ex
6773
using TimeWarp.Flexbox;
6874
6975
// Create a flex container
70-
var root = new FlexNode
71-
{
72-
Width = 300,
73-
Height = 200,
74-
FlexDirection = FlexDirection.Row
75-
};
76+
Node root = new();
77+
root.Style.FlexDirection = FlexDirection.Row;
78+
root.Style.SetDimension(Dimension.Width, StyleSizeLength.Points(300));
79+
root.Style.SetDimension(Dimension.Height, StyleSizeLength.Points(200));
80+
81+
// Add children that share the free space 1:2
82+
Node left = new();
83+
left.Style.FlexGrow = 1;
84+
root.InsertChild(left, 0);
7685
77-
// Add children
78-
root.AddChild(new FlexNode { FlexGrow = 1 });
79-
root.AddChild(new FlexNode { FlexGrow = 2 });
86+
Node right = new();
87+
right.Style.FlexGrow = 2;
88+
root.InsertChild(right, 1);
8089
8190
// Calculate layout
82-
FlexLayoutEngine.CalculateLayout(root);
91+
CalculateLayout.Calculate(root, float.NaN, float.NaN, Direction.LTR);
92+
93+
// Read computed positions and sizes
94+
Console.WriteLine($"left: x={left.Layout.GetPosition(PhysicalEdge.Left)} width={left.Layout.GetDimension(Dimension.Width)}");
95+
Console.WriteLine($"right: x={right.Layout.GetPosition(PhysicalEdge.Left)} width={right.Layout.GetDimension(Dimension.Width)}");
96+
// left: x=0 width=100
97+
// right: x=100 width=200
98+
```
99+
100+
Styles are set through `Node.Style`:
101+
102+
- Dimensions: `SetDimension`, `SetMinDimension`, `SetMaxDimension` with
103+
`StyleSizeLength.Points(..)`, `.Percent(..)`, `.Auto`
104+
- Flex: `FlexDirection`, `FlexGrow`, `FlexShrink`, `FlexBasis`, `FlexWrap`
105+
- Alignment: `JustifyContent`, `AlignItems`, `AlignSelf`, `AlignContent`
106+
- Box model: `SetMargin`, `SetPadding`, `SetBorder` per `Edge`, `SetGap` per `Gutter`
107+
- Positioning: `PositionType` (relative/absolute/static) with `SetPosition` insets
108+
109+
Results are read from `Node.Layout` after calling `CalculateLayout.Calculate`:
110+
`GetPosition(PhysicalEdge)` and `GetDimension(Dimension)`.
111+
112+
### Defaults
113+
114+
Defaults match Yoga (not web CSS): `flex-direction: column`, `flex-shrink: 0`,
115+
`align-content: flex-start`, and `box-sizing: border-box`. Construct nodes with
116+
`new Node(new Config { UseWebDefaults = true })` for web-style defaults.
117+
118+
### Demo
119+
120+
Run the visual demo to see computed layouts rendered as ASCII boxes, or as an
121+
HTML page comparing the engine's output against your browser's native flexbox:
83122

84-
// Access computed layout
85-
Console.WriteLine($"Child 0: {root[0].LayoutResult}");
86-
Console.WriteLine($"Child 1: {root[1].LayoutResult}");
123+
```bash
124+
./samples/layout-demo/layout-demo.cs # terminal
125+
./samples/layout-demo/layout-demo.cs --html out.html # browser comparison
87126
```
88127

89128
## License
90129

91-
Unlicense - See [LICENSE](LICENSE) for details.
130+
MIT — see [LICENSE](LICENSE) for details. Behavior modeled on Facebook's
131+
[Yoga](https://github.com/facebook/yoga) (MIT, Copyright (c) Meta Platforms, Inc.).

source/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
<!-- Default package metadata (can be overridden in individual projects) -->
66
<PropertyGroup Label="Package Metadata">
7-
<Version>1.0.0-beta.2</Version>
7+
<Version>1.0.0-beta.3</Version>
88
<Authors>Steven T. Cramer</Authors>
99
<RepositoryUrl>https://github.com/TimeWarpEngineering/timewarp-flexbox</RepositoryUrl>
10-
<PackageLicenseExpression>Unlicense</PackageLicenseExpression>
10+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1111
<PackageIcon>logo.png</PackageIcon>
1212
<PackageReadmeFile>readme.md</PackageReadmeFile>
1313
</PropertyGroup>

0 commit comments

Comments
 (0)