222 Commits

Author SHA1 Message Date
ae51963ceb Shuffle things around for cleaner layering (#164)
The 'layout' package is now a standalone widget tree. The 'ui' package is now only composables. The root package contains all the code for integration and Compose.
2023-03-28 03:14:28 +00:00
40be11f82c Create text layout abstraction (#163)
Caches operations like string splitting and measuring.
2023-03-28 02:00:17 +00:00
0503166d05 Do not clip the canvas for each child (#162)
Compose UI does not clip. It's easier to make clip opt-in than to make it opt-out.
2023-03-27 01:21:19 +00:00
abecd06b26 Add tests for Static behavior (#161) 2023-03-27 00:51:37 +00:00
c432f21197 Simplify static paint (#160)
Extract the mutable list to the caller.
2023-03-25 02:17:59 +00:00
ed147a190f Update dependency com.vanniktech:gradle-maven-publish-plugin to v0.25.1 (#159)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-24 16:44:23 -04:00
057761b321 Update dependency com.vanniktech:gradle-maven-publish-plugin to v0.25.0 (#158)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-23 21:40:05 +00:00
6708134b54 Render nodes in debug output even if drawing fails (#156) 2023-03-16 04:12:28 +00:00
a82597b931 Avoid initial empty rendering of Jest sample (#155)
Ensure our worker coroutines are started eagerly and move the initial rendering to occur after their tests have been put into the working set.
2023-03-14 03:36:25 +00:00
dc0759d558 Optimize TextSurface rendering (#154)
Do not assemble each surface into a string only to again split it into lines. Instead, inject the appendable and render one row at a time.
2023-03-14 01:06:36 +00:00
9a2e7ba967 Add a second layer if draw policy is non-null 2023-03-12 00:10:22 -05:00
080877df99 Prepare for multiple layers with base type 2023-03-12 00:10:22 -05:00
e40752e991 Break layout and components into packages, individual files 2023-03-12 00:10:22 -05:00
af0139a679 Switch Static to render using a list (#150) 2023-03-12 04:19:02 +00:00
099a482196 Run Jest sample on CI (#149)
The output is trash, but we aren't interested in the ANSI correctness so much as that its logic runs correctly.
2023-03-12 03:42:30 +00:00
b074e470da Gradle things mostly for CI (#148) 2023-03-12 03:24:39 +00:00
3a0e3cccb3 Revert "Update dependency org.jetbrains.compose.compiler:compiler to v1.4.2 (#142)" (#147)
This reverts commit cf61f9be3ca111fcef5f61edaf400cc4d8b6d51b.
2023-03-12 03:20:09 +00:00
058b7ede76 Update dependency de.cketti.unicode:kotlin-codepoints to v0.6.1 (#146)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-11 15:37:58 -05:00
7dd9060025 Prepare next development version 2023-03-09 21:27:13 -05:00
a6942102aa Prepare version 0.5.0 0.5.0 2023-03-09 21:17:58 -05:00
8cc4bf38c0 Update dependency org.jetbrains.dokka:dokka-gradle-plugin to v1.8.10 (#136)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-09 21:05:41 -05:00
cf61f9be3c Update dependency org.jetbrains.compose.compiler:compiler to v1.4.2 (#142)
* Update dependency org.jetbrains.compose.compiler:compiler to v1.4.2

* Kotlin 1.8.10

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jake Wharton <jw@squareup.com>
2023-03-09 19:27:48 +00:00
fa0451f2ac Update dependency org.jetbrains.compose.runtime:runtime to v1.3.1 (#143)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-09 14:10:43 -05:00
2bb7ef0f1c Update dependency org.jline:jline to v3.23.0 (#141)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-08 18:11:07 -05:00
94acb0e12b Introduce a node layer type (#140)
This owns measurement, placement, and drawing, and will be stackable in the future.
2023-03-07 23:34:05 -05:00
b616a8d79a Revert "Update dependency de.cketti.unicode:kotlin-codepoints to v0.6.0 (#137)" (#139)
This reverts commit 6b4c8a508ac23e98c669904f85e62a4eac872143.
2023-03-08 03:19:42 +00:00
3e89e34872 Give node ownership over drawing children (#138)
For now, we still selectively draw children based on whether there's a draw policy.

Migrate Text to talk through a no-content Layout rather than be a Node.
2023-03-07 04:59:26 +00:00
6b4c8a508a Update dependency de.cketti.unicode:kotlin-codepoints to v0.6.0 (#137)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-05 21:20:04 -05:00
e5818a1f5d Update dependency gradle to v8.0.2 (#135)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-03 23:27:38 -05:00
6d76c57d38 Place children only after node is itself placed (#134) 2023-03-02 03:37:13 +00:00
b7197b9e76 Remove AGP dependency (#132) 2023-02-28 01:55:11 +00:00
63c1211c25 Expose custom Layout composable
Update Row and Column to use it.
2023-02-26 00:40:21 -05:00
8a687caa1e Make test node more resilient to future refactorings 2023-02-25 23:53:23 -05:00
efa11263da Merge MeasurePolicy and LayoutPolicy into a single thing
This set of interfaces and scopes more closely mirrors how Compose UI works, and should be suitable to expose publicly through a Layout composable.
2023-02-25 23:53:23 -05:00
453377ab02 Use a single node type in the tree
This moves behavior into policy lambdas. It should allow refactoring to Compose UI-style Layout lambdas which are exposed publicly. It also should allow the creation of a global modifier system like Compose UI.
2023-02-25 14:26:49 -05:00
6de6f035b7 Include node tree in debug output 2023-02-25 14:26:49 -05:00
ac258f9d6f Explicitly make the root node its own type
Will help with a future change on debug rendering.
2023-02-25 14:26:49 -05:00
ac8cdde1b5 Do not implement clear callback
This allows us to dispose of the composition before rendering which will be useful in a future change.
2023-02-25 14:26:49 -05:00
d94f7f5c2e Do not wrap static items in a Row
Each caller should specify necessary containers (or perhaps they don't need any).
2023-02-24 22:20:38 -05:00
0ccb0358fc Move static composable and node to appropriate files 2023-02-24 22:20:38 -05:00
2443dd55e8 Only clear lines which have been previously used for output 2023-02-22 00:30:35 -05:00
ee6b6e9c42 Test rendering longer and shorter subsequent outputs 2023-02-22 00:30:35 -05:00
66eca84c5d Share constants for ANSI control codes 2023-02-22 00:30:35 -05:00
3c18954fb0 Start testing renderings 2023-02-21 23:56:31 -05:00
d6f06cb881 Use a Box node for the root 2023-02-21 23:56:31 -05:00
940aac3834 Add render function to do a single frame rendering 2023-02-21 23:56:31 -05:00
471124da6c Make DebugRendering testable 2023-02-21 23:56:31 -05:00
58cec976d9 Rename Output to Rendering
Callers have to send the chars somewhere now.
2023-02-21 23:56:31 -05:00
5383798ea6 Rename render to draw
I want rendering to be a different step which aggregates canvases together into the final output.
2023-02-21 23:56:31 -05:00
1cf9e2e2a0 Prepare next development snapshot 2023-02-20 07:40:10 -05:00