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
This also cleans up and refines some of the `Example` code and removes unused `key` property from `AnyNode`, which greatly improves error-reporting of Swift type-checker when wrong props are passed to `node` function.
Resolves#10Resolves#9Resolves#16
* Add Ref class and RefComponent protocol
* Add AnyRef protocol, add ref to AnyNode.init
* Cleanup hooks, add Target class to Gluon module
* Fix tests, avoid optionality in Target class
* Improve doc comments on Hooks.effect overload
* Implement effects scheduling with finalizers
* Add HookedComponents protocol, Hooks as class
* Cleanup after rebased on `master`
* Fix tests failing after Hooks refactoring
* Remove `key` argument from AnyNode.init, cleanups
* Efficient Reduceable state fully working w/ tests
* Fix use of comments for Equatable AnyNode operator
* Cleanup comments in Hooks and MHC
* Add TimerCounter, fix host not unmounting children
* Rename Reduceable to Updatable, fix effects bugs
* Fix TestRenderer compilation issues
* Remove `print` remnants in Timer Example code
Turns out `.safeArea` auto layout constraints didn't work. This is now fixed, which allows cleaning up Example layout code.
Also, there's no easy way to implement `topLayoutGuide` and `bottomLayoutGuide` support for old versions of iOS that don't have `safeAreaLayoutGuide`. It's much easier to just drop iOS 10 or older ¯\_(ツ)_/¯
* Add {top,bottom}LayoutGuide constraints
* Fix .safeArea constraints, bump iOS requirements
This allows `ListView` components to handle selection of items. Example `TableModal` component was refined to demo the new property.
* Add onSelect parameter to ListView.Props
* Implemented `onSelected` prop, test in demo app