@craft-native/android 0.0.161 → 0.0.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -135,7 +135,8 @@ When `flexShrink` is omitted, horizontal text labels and scroll hosts use the
135
135
  same shrink defaults as the iOS renderer; buttons and editable fields retain
136
136
  their intrinsic width unless explicitly configured.
137
137
  Wrapped containers also honor `alignContent` (`center`, `flex-end`,
138
- `space-between`, `space-around`, and `stretch`) consistently across hosts.
138
+ `space-between`, `space-around`, `space-evenly`, and `stretch`) consistently
139
+ across hosts.
139
140
  Shared wrapped-line IDs are accepted only when they are complete and monotonic;
140
141
  invalid bridge data falls back to the host layout implementation.
141
142
  Push, replace, and back preserve the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@craft-native/android",
3
- "version": "0.0.161",
3
+ "version": "0.0.162",
4
4
  "homepage": "https://github.com/craft-native/craft/tree/main/packages/android#readme",
5
5
  "repository": {
6
6
  "type": "git",
@@ -653,6 +653,7 @@ private class CraftNativeFlexLayout(context: Context) : LinearLayout(context) {
653
653
  "space-between" -> 3
654
654
  "space-around" -> 4
655
655
  "stretch" -> 5
656
+ "space-evenly" -> 6
656
657
  else -> 0
657
658
  }
658
659
 
@@ -803,6 +804,10 @@ private class CraftNativeFlexLayout(context: Context) : LinearLayout(context) {
803
804
  rowLeading = freeRows / (rowCount * 2)
804
805
  rowBetween += freeRows / rowCount
805
806
  }
807
+ 6 -> {
808
+ rowLeading = freeRows / (rowCount + 1)
809
+ rowBetween += freeRows / (rowCount + 1)
810
+ }
806
811
  5 -> rowExtra = freeRows / rowCount
807
812
  }
808
813
  var rowTop = paddingTop + rowLeading
@@ -871,6 +876,10 @@ private class CraftNativeFlexLayout(context: Context) : LinearLayout(context) {
871
876
  crossBetween = crossFree / lines.size + crossGap
872
877
  crossLeading = crossFree / (lines.size * 2)
873
878
  }
879
+ "space-evenly" -> {
880
+ crossBetween = crossFree / (lines.size + 1) + crossGap
881
+ crossLeading = crossFree / (lines.size + 1)
882
+ }
874
883
  "stretch" -> {
875
884
  val extra = crossFree / lines.size
876
885
  lines.forEach { it.cross += extra }