-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed commit of the following: commit 6d3bc4d Author: Calvin Liang <[email protected]> Date: Wed Apr 3 13:00:18 2024 +0800 bump version in README commit d730c72 Author: Calvin Liang <[email protected]> Date: Wed Apr 3 12:48:23 2024 +0800 add TODO to fix #4 in the future commit 145be6b Author: Calvin Liang <[email protected]> Date: Wed Apr 3 12:44:14 2024 +0800 update packages commit 4cc4756 Author: Calvin Liang <[email protected]> Date: Thu Feb 29 20:02:43 2024 -0800 update org.jetbrains.compose commit c0f36d4 Author: Calvin Liang <[email protected]> Date: Thu Feb 29 19:52:59 2024 -0800 bump version commit 788b3d1 Author: Calvin Liang <[email protected]> Date: Thu Feb 29 19:52:52 2024 -0800 fix import in wasm demo commit 06fcf1a Author: Calvin Liang <[email protected]> Date: Thu Feb 29 19:50:18 2024 -0800 update README commit 0eb0897 Author: Calvin Liang <[email protected]> Date: Thu Feb 29 19:45:39 2024 -0800 add new line in end of files commit 6c3438c Author: Calvin Liang <[email protected]> Date: Sat Feb 17 22:56:47 2024 -0800 improve haptics in wasmJs demo app commit bbe6d14 Author: Calvin Liang <[email protected]> Date: Wed Feb 21 14:25:04 2024 -0800 bump version to 1.4.0-beta02 commit 2ee33c5 Author: Calvin Liang <[email protected]> Date: Sat Feb 10 21:04:26 2024 -0800 Update README.md commit ba6ff88 Author: Calvin Liang <[email protected]> Date: Sat Feb 10 21:00:54 2024 -0800 add documentation commit f8ff2d4 Author: Calvin Liang <[email protected]> Date: Sat Feb 10 20:39:31 2024 -0800 add wasm support
- Loading branch information
Showing
11 changed files
with
2,985 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
plugins { | ||
id("com.android.application") version "8.2.2" apply false | ||
id("org.jetbrains.kotlin.multiplatform") version "1.9.21" apply false | ||
id("com.android.library") version "8.2.2" apply false | ||
id("org.jetbrains.compose") version "1.5.11" apply false | ||
id("com.android.application") version "8.3.1" apply false | ||
id("org.jetbrains.kotlin.multiplatform") version "1.9.23" apply false | ||
id("com.android.library") version "8.3.1" apply false | ||
id("org.jetbrains.compose") version "1.6.1" apply false | ||
id("com.vanniktech.maven.publish") version "0.27.0" apply false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import androidx.compose.ui.ExperimentalComposeUiApi | ||
import androidx.compose.ui.window.CanvasBasedWindow | ||
import sh.calvin.reorderable.demo.App | ||
|
||
@OptIn(ExperimentalComposeUiApi::class) | ||
fun main() { | ||
CanvasBasedWindow(canvasElementId = "ComposeTarget") { | ||
App() | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
demoApp/composeApp/src/wasmJsMain/kotlin/sh/calvin/reorderable/demo/haptics.wasmJs.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package sh.calvin.reorderable.demo | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.remember | ||
import kotlinx.browser.window | ||
|
||
@Composable | ||
actual fun rememberReorderHapticFeedback(): ReorderHapticFeedback { | ||
val reorderHapticFeedback = remember { | ||
object : ReorderHapticFeedback() { | ||
override fun performHapticFeedback(type: ReorderHapticFeedbackType) { | ||
when (type) { | ||
ReorderHapticFeedbackType.START -> | ||
window.navigator.vibrate(5) | ||
|
||
ReorderHapticFeedbackType.MOVE -> | ||
window.navigator.vibrate(1) | ||
|
||
ReorderHapticFeedbackType.END -> | ||
window.navigator.vibrate(3) | ||
} | ||
} | ||
} | ||
} | ||
|
||
return reorderHapticFeedback | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Compose App</title> | ||
<script type="application/javascript" src="skiko.js"></script> | ||
<script type="application/javascript" src="composeApp.js"></script> | ||
</head> | ||
<body> | ||
<canvas id="ComposeTarget"></canvas> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Fri Nov 17 13:21:17 PST 2023 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.