* Migrate reconciler and AppKit renderer to View API
* Fix building tests, cleanup unused code
* Remove more unused code
* Remove TokamakAppKit, add ParentView/GroupView
* Remove unused code, make testMount pass
* Cleanup more unused code
* Add ValueStorage protocol
* Add getter/setter internal properties on State
* Fix more State test assertions
* Fix all the reconciler tests 🎉
* Make Node Equatable
* Extend Node methods
* Init HooksRule
* Update HooksRule tests
* Update Node compare function
* Add start position to Node in TokenVisitor.visitPre
* Update HooksRule test
* Refactor HooksRule
* Fix typo in comments
* Rename functions in the tests
* Fix typo in comment
* Move repeated code in function
* Move repeated code in function
* Remove repeated code
* Apply swiftformat
* Group repeated guards
* Fix TokenVisitor handling of Range
* Fix class name in TokamakLintTests
* Add testRange
* Fix algorithm to find the token range
* Add test to verify token range correctness
* Remove force unwrapping
This component is rendered to `UIActivityViewIndicator` in `TokamakUIKit`. This component would be a great helper for future examples that demonstrate asynchronous effects, e.g. networking.
* Add Throbber host component
* Make .gray Throbber variety the default
In most of the cases users wouldn't need to create cell providers with more than one identifier or more than one section. We would like the most common cases to be as easy to use as possible, this PR renames `SimpleCellProvider` to `CellProvider` and old `CellProvider` to `IdentifiedCellProvider`. Old `Model` associated type is now renamed to `Section` with a default array-based sections type, while the new `Model` associated type allows setting the element type directly. This helps users avoid thinking about nested arrays in the cases where multiple `ListView` sections are not needed.
* Simplify CellProvider protocol
* Fix AppKitRenderer compilation issue
* Fix formatting
We had an existing `SizeConstraint` struct, which was correctly rendered to auto layout constraints, but there was no way for users to create `SizeConstraint` with the new auto layout syntax. This is fixed by adding extension functions on `Size` with the usual format. This now allows setting constraints for size with a constant value:
```swift
Size.equal(to: .init(width: 100, height: 200))
```
Or with a multiplier relative to other nodes:
```swift
Size.equal(to: .parent, multiplier: 0.5)
```
* Add factory functions creating `SizeConstraint`
* Apply fixes from new SwiftFormat
This also adds separate `TokamakDemo` module in the main project, which will host all examples that can be cross-platform. A few `Style` properties were removed, which were duplicated in UIKit and duplicated versions couldn't be cleanly mapped in AppKit. `contentMode` was moved from `Style` to `Image` as `NSView` doesn't have `contentMode` at all, and for UIKit the only use that I know of is related to `UIImage` anyway.
Resolves#1
* Mostly empty TokamakAppKit module, fix copyright text
* Add TokamakDemo module, working counter on macOS
* Fix layer props and accessibility for AppKit
* Fix linter issues, completely remove `center` prop
* Fix line length in NSViewComponent
* Remove unused and broken ScrollView for AppKit
* Add macOS column to StandardComponents.md
* Make contentMode on Image non-optional
* Fix missing initializer call in ImageView.swift
* Change the domain name for the docs dir
* Fix TokamakAppKit after text Children -> Props fix
When in the future we add more components that would be useful as children of `Button` and `Label`, for example components that render to `CAShapeLayer`, we won't be able to add them as children. The reason is that this node "slot" is taken by text of `String` type. I think it's better to make this API-breaking change before the initial release, even though we don't have a component for `CAShapeLayer` yet.
* Move `text` from Children to Props in Button/Label
* Fix unit-tests after text props change
* Init snake game
* Replace [Any] state with [UnsafeMutableRawPointer]
* Broke ux
* Add Width init function
* Update Snake Game
* Remove ability to switch move direction to opposite
* Fix game board bound
* Add game over condition
* Add color to snake target
* Refactor code
* Add Gamepad to Snake Game
* Remove infinity loop
* Refactor code
* Refactor code
* Add Gameboard to Snake
* Reduce render function size
* Add Gamemenu
* Rename Gamemenu to GameMenu
* Format code
* Refactor code
This allows adding props for components that accept images, for example `Switch` is now able to implement `onImage` and `offImage` props.
* Add separate (empty for now) Image prop
* Implement Image, add Switch {on,off}Image props
Also add `UIView.animate` animation effect to example code. Also removes redundant `Updatable` protocol.
Resolves#49
* Define and set RefTarget in TokamakUIKit
* Add animation example
* Rename backgroundColor to currentColor
* Add comments to Animation example
* Rename StyleProps to ViewProps
* Init new argument order
* Init accessibility
* Add Accessibility.swift to project
* Sort Style init arguments
* Reorder arguments in Example
* Add Props init to StackView
* Fix arguments order in test
* Expose accessibility configuration on view props
* Rename ViewProps to StyleProps