Implements support for custom scenes by adding the new `MountedScene` type and fixes environment propagation from mounted parent to mounted child elements.
This will unblock https://github.com/swiftwasm/Tokamak/pull/136 and potentially https://github.com/swiftwasm/Tokamak/pull/214. In the former scenes are always completely unmounted and remounted from scratch when root environment changes, which causes descendants to lose all `@State` values. I saw some environment propagation issues in the latter, but not sure if those were caused by the lack of correct scene updates, just wanted to tackle the usual suspects first.
I've also improved reconciler-related doc comments to clarify some of the design desicions and naming.
Resolves#222.
* Match the Color API to the native one
* Extract the demo view to its own file
* Add Xcode project and native targets
* Fix Color
* Delete UISceneDelegate.swift
* Fix line length
* Tokamak Native → TokamakDemo Native
* Add exports for styles, fix typo
* Add TextFieldStyle
* oops
* Comment out the Semantic UI CSS
* Move the DOM-specific stuff to TokamakDOM
* SecureFIeld is implemented!
* Remove commented-out code
Co-authored-by: Max Desiatov <max@desiatov.com>
* Remove unncessary underscore and proxy method
* Enable building on Xcode for access to IDE tools
* Add an environment variable for TextField style
* Remove mandatory init()
* Update Sources/TokamakCore/CGStubs.swift
Co-authored-by: Max Desiatov <max@desiatov.com>
* Update Sources/TokamakCore/CGStubs.swift
Co-authored-by: Max Desiatov <max@desiatov.com>
* Remove the lock
* Move file to sources folder
Co-authored-by: Max Desiatov <max@desiatov.com>
* Initial Shape support
* Border modifier
* Better demo
* Make Path conform to Shape
* Implement clipShape
* Add shapes/path/shapestyles to progress.md
1. If a Stack has a Spacer as a child, we need to fill the width or height of the parent so the Spacer's flex-grow: 1; works.
2. If a Stack has a child Stack along the cross axis (HStack with a nested VStack and vice vera) we need to fill the cross axis
3. If a Stack has a child Stack along the same axis (HStack with a nested HStack) we need to fill the axis.
I’ve added two TextFields to the demo, which are supposed to have their values synced. Pressing enter in the second one will increment the commit counter.
* Text styles and Environment setup for View font
* Text modifiers and demo
* Format Source files
* Fix font-size and add font-family when no Font is specified
* Add TextStyle
* PR fixes
* Format files
* Add note about Text modifiers