Skip to content

Commit cc30584

Browse files
committed
library: Bump version to 0.4.8
1 parent 61dde2d commit cc30584

File tree

6 files changed

+40
-32
lines changed

6 files changed

+40
-32
lines changed

convention-plugins/src/main/kotlin/root.publication.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33

44
allprojects {
55
group = "top.yukonga.miuix.kmp"
6-
version = "0.4.7"
6+
version = "0.4.8"
77
}

docs/components/pulltorefresh.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,20 @@ PullToRefresh has the following states:
7777
| topAppBarScrollBehavior | ScrollBehavior | Top app bar scroll behavior | null | No |
7878
| color | Color | Indicator color | PullToRefreshDefaults.color | No |
7979
| circleSize | Dp | Indicator circle size | PullToRefreshDefaults.circleSize | No |
80-
| refreshTexts | List<String> | Text list for different states | PullToRefreshDefaults.refreshTexts | No |
80+
| refreshTexts | List\<String> | Text list for different states | PullToRefreshDefaults.refreshTexts | No |
8181
| refreshTextStyle | TextStyle | Refresh text style | PullToRefreshDefaults.refreshTextStyle | No |
8282
| content | @Composable () -> Unit | Scrollable content composable | None | Yes |
8383

8484
### PullToRefreshState Class
8585

8686
PullToRefreshState manages the UI state of the refresh indicator and can be created using `rememberPullToRefreshState()`. It should only be used for UI state, while refresh logic should be controlled by `isRefreshing` and `onRefresh`.
8787

88-
| Property Name | Type | Description |
89-
| ---------------------------- | ------------ | ---------------------------- |
90-
| refreshState | RefreshState | Current refresh state |
91-
| isRefreshing | Boolean | Whether it is refreshing |
92-
| pullProgress | Float | Pull progress (0-1) |
93-
| refreshCompleteAnimProgress | Float | Refresh complete animation |
88+
| Property Name | Type | Description |
89+
| --------------------------- | ------------ | -------------------------- |
90+
| refreshState | RefreshState | Current refresh state |
91+
| isRefreshing | Boolean | Whether it is refreshing |
92+
| pullProgress | Float | Pull progress (0-1) |
93+
| refreshCompleteAnimProgress | Float | Refresh complete animation |
9494

9595
### PullToRefreshDefaults Object
9696

@@ -124,7 +124,7 @@ PullToRefresh(
124124
"Pull to refresh",
125125
"Release to refresh",
126126
"Refreshing",
127-
"Refresh successful"
127+
"Refresh successful",
128128
),
129129
// Other properties
130130
) {

docs/zh_CN/components/pulltorefresh.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
# PullToRefresh
22

3-
43
`PullToRefresh` 是 Miuix 中的下拉刷新组件,可为列表和其他可滚动内容提供刷新功能。它采用“状态提升”模式,提供了带动画的交互式刷新指示器,适用于需要刷新数据的各种场景。
54

65
::: warning 注意
76
该组件只适用于支持触控的场景,并且在网页构建目标中工作不佳!
87
:::
98

10-
11-
如需演示,请查看 <a href="https://miuix-kotlin-multiplatform.github.io/miuix-jsCanvas/" target="_blank" rel="noopener noreferrer">Miuix Example</a> 的 DropDown 页。
12-
9+
如需演示,请查看 <a href="https://miuix-kotlin-multiplatform.github.io/miuix-jsCanvas/" target="_blank">Miuix Example</a> 的 DropDown 页。
1310

1411
## 引入
1512

@@ -18,7 +15,6 @@ import top.yukonga.miuix.kmp.basic.PullToRefresh
1815
import top.yukonga.miuix.kmp.basic.rememberPullToRefreshState
1916
```
2017

21-
2218
## 基本用法
2319

2420
PullToRefresh 组件可以包裹任何可滚动的内容,采用“状态提升”模式:
@@ -71,19 +67,19 @@ PullToRefresh 组件有以下几种状态:
7167

7268
### PullToRefresh 属性
7369

74-
| 属性名 | 类型 | 说明 | 默认值 | 是否必须 |
75-
| ------------------------ | ---------------------- | ------------------------ | -------------------------------------- | -------- |
76-
| isRefreshing | Boolean | 是否正在刷新 |||
77-
| onRefresh | () -> Unit | 刷新触发时的回调函数 |||
78-
| modifier | Modifier | 应用于容器的修饰符 | Modifier ||
79-
| pullToRefreshState | PullToRefreshState | 下拉刷新状态控制器 | rememberPullToRefreshState() ||
80-
| contentPadding | PaddingValues | 内容区的内边距 | PaddingValues(0.dp) ||
81-
| topAppBarScrollBehavior | ScrollBehavior | 顶部应用栏滚动行为 | null ||
82-
| color | Color | 刷新指示器的颜色 | PullToRefreshDefaults.color ||
83-
| circleSize | Dp | 刷新指示器圆圈的大小 | PullToRefreshDefaults.circleSize ||
84-
| refreshTexts | List<String> | 不同状态下显示的文本列表 | PullToRefreshDefaults.refreshTexts ||
85-
| refreshTextStyle | TextStyle | 刷新文本的样式 | PullToRefreshDefaults.refreshTextStyle ||
86-
| content | @Composable () -> Unit | 可滚动内容的可组合函数 |||
70+
| 属性名 | 类型 | 说明 | 默认值 | 是否必须 |
71+
| ----------------------- | ---------------------- | ------------------------ | -------------------------------------- | -------- |
72+
| isRefreshing | Boolean | 是否正在刷新 |||
73+
| onRefresh | () -> Unit | 刷新触发时的回调函数 |||
74+
| modifier | Modifier | 应用于容器的修饰符 | Modifier ||
75+
| pullToRefreshState | PullToRefreshState | 下拉刷新状态控制器 | rememberPullToRefreshState() ||
76+
| contentPadding | PaddingValues | 内容区的内边距 | PaddingValues(0.dp) ||
77+
| topAppBarScrollBehavior | ScrollBehavior | 顶部应用栏滚动行为 | null ||
78+
| color | Color | 刷新指示器的颜色 | PullToRefreshDefaults.color ||
79+
| circleSize | Dp | 刷新指示器圆圈的大小 | PullToRefreshDefaults.circleSize ||
80+
| refreshTexts | List\<String> | 不同状态下显示的文本列表 | PullToRefreshDefaults.refreshTexts ||
81+
| refreshTextStyle | TextStyle | 刷新文本的样式 | PullToRefreshDefaults.refreshTextStyle ||
82+
| content | @Composable () -> Unit | 可滚动内容的可组合函数 |||
8783

8884

8985

@@ -109,7 +105,7 @@ PullToRefreshDefaults 提供下拉刷新组件的默认值。
109105
| ---------------- | ------------- | -------------------- | ----------------------------------------------------------------------------------------- |
110106
| color | Color | 刷新指示器的默认颜色 | Color.Gray |
111107
| circleSize | Dp | 指示器圆圈的默认大小 | 20.dp |
112-
| refreshTexts | List<String> | 默认的刷新文本列表 | ["Pull down to refresh", "Release to refresh", "Refreshing...", "Refreshed successfully"] |
108+
| refreshTexts | List\<String> | 默认的刷新文本列表 | ["Pull down to refresh", "Release to refresh", "Refreshing...", "Refreshed successfully"] |
113109
| refreshTextStyle | TextStyle | 默认的文本样式 | TextStyle(fontSize = 14.sp, fontWeight = Bold, color = color) |
114110

115111

example/build.gradle.kts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
@file:Suppress("UnstableApiUsage")
55

66
import com.android.build.gradle.internal.api.BaseVariantOutputImpl
7-
import org.gradle.kotlin.dsl.withType
87
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
98
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
109
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin
@@ -233,10 +232,23 @@ val generateVersionInfo by tasks.registering {
233232
const val VERSION_NAME = "$verName"
234233
const val VERSION_CODE = $verCode
235234
const val JDK_VERSION = "${System.getProperty("java.version")}"
236-
237235
}
238236
""".trimIndent(),
239237
)
238+
val iosPlist = project.rootDir.resolve("iosApp/iosApp/Info.plist")
239+
if (iosPlist.exists()) {
240+
val content = iosPlist.readText()
241+
val updatedContent = content
242+
.replace(
243+
Regex("<key>CFBundleShortVersionString</key>\\s*<string>[^<]*</string>"),
244+
"<key>CFBundleShortVersionString</key>\n\t<string>$verName</string>"
245+
)
246+
.replace(
247+
Regex("<key>CFBundleVersion</key>\\s*<string>[^<]*</string>"),
248+
"<key>CFBundleVersion</key>\n\t<string>$verCode</string>"
249+
)
250+
iosPlist.writeText(updatedContent)
251+
}
240252
}
241253
}
242254

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

iosApp/iosApp/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundleShortVersionString</key>
1818
<string>1.0.4</string>
1919
<key>CFBundleVersion</key>
20-
<string>104</string>
20+
<string>480</string>
2121
<key>LSRequiresIPhoneOS</key>
2222
<true/>
2323
<key>CADisableMinimumFrameDurationOnPhone</key>

0 commit comments

Comments
 (0)