The difference in UnderlineStyle as opposed to Color and TextStyle was that it had a private constructor. Changing that to internal like the others avoids the compiler bug.
`Static` function is now called `StaticEffect` to better indicate that it only renders its content once.
`LocalStaticLogger` composition local provides access to `StaticLogger` which allows logging plain strings at arbitrary points for inclusion in the next frame. This can be used from effects, callback, state classes, etc.
* Switch to our own terminal library
This handles raw mode, VT parsing, and other system integration.
* Docs needs native libraries now
* API dump
* More test hacks
* Formatting
This allows immediately disposing the subcomposition which results in removal of the entire subtree without triggering recomposition of the parent composition.
* Create `Mosaic.layoutId`, unit tests for `ParentDataModifier` and fix for `Modifier`s
- New `Mosaic.layoutId` has been created that can be used to define child elements, for example, during the measurement stage
- Add unit tests for `Mosaic.layoutId`
- Add unit tests for `ParentDataModifier`
- Fix the handling of `Modifier`s that were inherited from several key `Modifier` classes (`LayoutModifier`, `DrawModifier`, `KeyModifier`, `ParentDataModifier`) with different handling
- Remove unnecessary call site generic parameter in `RealTestMosaic` and replace `coroutineScope` with getting `CoroutineContext` by `currentCoroutineContext()` function in `runMosaicTest`.
* Update CHANGELOG.md
* Rename
---------
Co-authored-by: Jake Wharton <github@jakewharton.com>
Co-authored-by: Jake Wharton <jw@squareup.com>
- Add `IntrinsicSize`
- Add `Modifier.width`, `Modifier.height`, `Modifier.requiredWidth`, `Modifier.requiredHeight` with `IntrinsicSize` as a parameter
- Add unit tests for intrinsic Modifiers
- Update `SizeModifier` for upstream (df20b2d700)
- Move `Fill` and `Stroke` inside the `DrawStyle`
- Remove `toString` from `DrawStyle.Stroke` because `@Poko` is already doing it
- In the robot sample, the use of the `offset` modifier in the robot (`Text`)
- Remove `TODO https://github.com/JakeWharton/mosaic/issues/11` in the robot sample, it seems that it is no longer relevant
- In the robot sample, add `isActive` check in the loop for keyboard input
- Fix in the `README.md` `mutableStateOf` to `mutableIntStateOf`, as is correct in newer versions
- Change the `drawRect` method in `DrawScope` like the method from the Compose UI
- Add support for `DrawStyle`: `Fill` and `Stroke` in `DrawScope#drawRect`
- Add support for drawing a rectangle from text characters
- Add `Filler` with code point
- Change the robot sample to show `drawRect` with `Stroke`
- Add `Color.Unspecified` for replace nullable `Color`
- Add some extension functions for `Color` to check on `Color.Unspecified`
- Use `TextStyle.Unspecified` instead null for `TextStyle`
- Add some extension functions for `TextStyle` to check on `TextStyle.Unspecified` and `TextStyle.Empty`
- Make `TextStyle` an inline class
- Using `Int` as codepoint (`TextPixel#codePoint`) instead of `String` in `TextPixel` (`TextPixel#value`)
- Rename `style: TextStyle` to `textStyle: TextStyle` for clearer and less confusing naming, as there are several other styles
- Add emoji to demo sample and use of 2 styles for part of the text