14 Commits

Author SHA1 Message Date
83a7d0c2f3 Create Terminal.Theme, and use Terminal.Size more (#815)
The ternary theme more accurately models our knowledge, and the size propagates both cell and pixel values.
2025-03-21 04:10:01 +00:00
52916d2f4a Rewrite POSIX Tty to actually use the TTY (#805)
And a PTY for testing. Windows still uses stdin/stdout for now.
2025-03-19 20:27:29 +00:00
4f5977231b Run samples in CI (#792) 2025-03-17 03:47:30 +00:00
f71c42d2d0 Make all samples multiplatform (#786) 2025-03-13 13:23:43 -04:00
8957294eff Add support for Kitty underlines (#765) 2025-03-02 06:47:20 -05:00
efcf480ebe Create mosaic-animation (#600)
Porting animation helpers from androidx:
- https://developer.android.com/reference/kotlin/androidx/compose/animation/core/package-summary
- androidx.compose.animation](https://developer.android.com/reference/kotlin/androidx/compose/animation/package-summary (a little bit from here)

Solution for https://github.com/JakeWharton/mosaic/issues/400

Use the new code to update and add animations to the demo sample.
2025-01-02 21:19:21 -05:00
4d053dbbd3 Change runMosaic to support effects (#284) 2024-08-16 16:58:08 -04:00
3dffc85de3 Some fun animation in demo sample (#399) 2024-06-09 23:19:57 -04:00
0a4b690c90 Update gifs and readme (#388)
New renders for the demo and rrtop. Also use self-documenting awaitCancelation function in their code.
2024-06-03 20:50:41 +00:00
a5ec60767d Update to Kotlin 2.0
* Update Kotlin and Compose to v2

* Kotlin 2.0 updates

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jake Wharton <jw@squareup.com>
2024-05-28 16:55:50 -04:00
15d9d2df30 Remove autoboxing and object creation from multiple locations (#372)
- 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
2024-05-27 21:15:36 -04:00
6efdb159b8 Support true color palette (#356)
Also update rrtop sample with several color palettes
2024-05-15 21:30:20 -04:00
e67cb363c7 Fix Gradle warnings (#248)
* Fix deprecation warning coming from buildconfig plugin.

> Configure project :build-logic:mosaic-gradle-plugin
The Project.getConvention() method has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.4/userguide/upgrading_version_8.html#deprecated_access_to_conventions
        at build_76rlsb2vs9qh6z5gt0vmnl0ip.run(P:\projects\contrib\github-mosaic\mosaic-gradle-plugin\build.gradle:3)

* Fix application plugin related deprecations. `mainClassName` is a convention property, even when it's inside the `application` block.
We cant to set https://docs.gradle.org/8.4/dsl/org.gradle.api.plugins.JavaApplication.html#org.gradle.api.plugins.JavaApplication:mainClass instead.

> Configure project :samples:counter
Build file 'P:\projects\contrib\github-mosaic\samples\counter\build.gradle': line 11
The org.gradle.api.plugins.ApplicationPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.4/userguide/upgrading_version_8.html#application_convention_deprecation
        at build_dw2puawl5bmiuhlfercnbnay0$_run_closure1.doCall$original(P:\projects\contrib\github-mosaic\samples\counter\build.gradle:11)
        at build_dw2puawl5bmiuhlfercnbnay0.run(P:\projects\contrib\github-mosaic\samples\counter\build.gradle:10)

		Build file 'P:\projects\contrib\github-mosaic\samples\counter\build.gradle': line 11
The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.4/userguide/upgrading_version_8.html#deprecated_access_to_conventions
        at build_dw2puawl5bmiuhlfercnbnay0$_run_closure1.doCall$original(P:\projects\contrib\github-mosaic\samples\counter\build.gradle:11)
        at build_dw2puawl5bmiuhlfercnbnay0.run(P:\projects\contrib\github-mosaic\samples\counter\build.gradle:10)

> Configure project :samples:jest | :samples:robot | :samples:demo
Build file 'P:\projects\contrib\github-mosaic\samples\jest\build.gradle': line 5
The org.gradle.api.plugins.ApplicationPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.4/userguide/upgrading_version_8.html#application_convention_deprecation
        at build_3tv3yi15cjhed4vkpewcfismx.run(P:\projects\contrib\github-mosaic\samples\jest\build.gradle:5)

Build file 'P:\projects\contrib\github-mosaic\samples\jest\build.gradle': line 5
The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.4/userguide/upgrading_version_8.html#deprecated_access_to_conventions
        at build_3tv3yi15cjhed4vkpewcfismx.run(P:\projects\contrib\github-mosaic\samples\jest\build.gradle:5)

* Ignore warning about Kotlin/Native, there's no way to build mac binaries on Linux and Windows, so no need to nag about it.

> Configure project :mosaic-runtime
w: The following Kotlin/Native targets cannot be built on this machine and are disabled:
macosArm64, macosX64
To hide this message, add 'kotlin.native.ignoreDisabledTargets=true' to the Gradle properties.

> Configure project :samples:counter
w: The following Kotlin/Native targets cannot be built on this machine and are disabled:
macosArm64, macosX64
To hide this message, add 'kotlin.native.ignoreDisabledTargets=true' to the Gradle properties.
2023-11-13 22:37:15 +00:00
9358bd8ad5 Add new demo app for messing around (#246) 2023-11-13 21:16:08 +00:00