Skip to content

Commit

Permalink
🚚 🔄 Rename filekit-dialog to filekit-dialogs and update package refer…
Browse files Browse the repository at this point in the history
…ences
  • Loading branch information
vinceglb committed Feb 1, 2025
1 parent 47d1643 commit f735f53
Show file tree
Hide file tree
Showing 85 changed files with 180 additions and 180 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ kotlin {
js(),
wasmJs(),
).forEach {
it.moduleName = "FileKitDialogCompose"
it.moduleName = "FileKitDialogsCompose"
it.browser()
}

Expand All @@ -43,7 +43,7 @@ kotlin {
iosSimulatorArm64(),
).forEach {
it.binaries.framework {
baseName = "FileKitDialogCompose"
baseName = "FileKitDialogsCompose"
isStatic = true
}
}
Expand All @@ -57,7 +57,7 @@ kotlin {
implementation(libs.kotlinx.coroutines.core)

// FileKit Dialog
api(projects.filekitDialog)
api(projects.filekitDialogs)
}

val nonWebMain by creating {
Expand Down Expand Up @@ -100,7 +100,7 @@ kotlin {
}

android {
namespace = "io.github.vinceglb.filekit.dialog.compose"
namespace = "io.github.vinceglb.filekit.dialogs.compose"
compileSdk = libs.versions.android.compileSdk.get().toInt()
defaultConfig {
minSdk = libs.versions.android.minSdk.get().toInt()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package io.github.vinceglb.filekit.dialog.compose
package io.github.vinceglb.filekit.dialogs.compose

import androidx.activity.compose.LocalActivityResultRegistryOwner
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.platform.LocalInspectionMode
import io.github.vinceglb.filekit.FileKit
import io.github.vinceglb.filekit.dialog.init
import io.github.vinceglb.filekit.dialogs.init

@Composable
internal actual fun InitFileKit() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog.compose
package io.github.vinceglb.filekit.dialogs.compose

import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
Expand All @@ -7,11 +7,11 @@ import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.rememberUpdatedState
import io.github.vinceglb.filekit.FileKit
import io.github.vinceglb.filekit.PlatformFile
import io.github.vinceglb.filekit.dialog.FileKitDialogSettings
import io.github.vinceglb.filekit.dialog.PickerMode
import io.github.vinceglb.filekit.dialog.PickerType
import io.github.vinceglb.filekit.dialog.pickFile
import io.github.vinceglb.filekit.dialog.saveFile
import io.github.vinceglb.filekit.dialogs.FileKitDialogSettings
import io.github.vinceglb.filekit.dialogs.PickerMode
import io.github.vinceglb.filekit.dialogs.PickerType
import io.github.vinceglb.filekit.dialogs.pickFile
import io.github.vinceglb.filekit.dialogs.saveFile
import kotlinx.coroutines.launch

@Composable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog.compose
package io.github.vinceglb.filekit.dialogs.compose

public class PickerResultLauncher(
private val onLaunch: () -> Unit,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package io.github.vinceglb.filekit.dialog.compose
package io.github.vinceglb.filekit.dialogs.compose

import androidx.compose.runtime.Composable
import androidx.compose.ui.window.WindowScope
import io.github.vinceglb.filekit.dialog.FileKitDialogSettings
import io.github.vinceglb.filekit.dialog.PickerMode
import io.github.vinceglb.filekit.dialog.PickerType
import io.github.vinceglb.filekit.dialogs.FileKitDialogSettings
import io.github.vinceglb.filekit.dialogs.PickerMode
import io.github.vinceglb.filekit.dialogs.PickerType
import io.github.vinceglb.filekit.PlatformFile
import java.awt.Window

Expand All @@ -17,7 +17,7 @@ public fun <Out> WindowScope.rememberFilePickerLauncher(
platformSettings: FileKitDialogSettings? = null,
onResult: (Out?) -> Unit,
): PickerResultLauncher {
return io.github.vinceglb.filekit.dialog.compose.rememberFilePickerLauncher(
return io.github.vinceglb.filekit.dialogs.compose.rememberFilePickerLauncher(
type = type,
mode = mode,
title = title,
Expand All @@ -35,7 +35,7 @@ public fun WindowScope.rememberFilePickerLauncher(
platformSettings: FileKitDialogSettings? = null,
onResult: (PlatformFile?) -> Unit,
): PickerResultLauncher {
return io.github.vinceglb.filekit.dialog.compose.rememberFilePickerLauncher(
return io.github.vinceglb.filekit.dialogs.compose.rememberFilePickerLauncher(
type = type,
title = title,
initialDirectory = initialDirectory,
Expand All @@ -51,7 +51,7 @@ public fun WindowScope.rememberDirectoryPickerLauncher(
platformSettings: FileKitDialogSettings? = null,
onResult: (PlatformFile?) -> Unit,
): PickerResultLauncher {
return io.github.vinceglb.filekit.dialog.compose.rememberDirectoryPickerLauncher(
return io.github.vinceglb.filekit.dialogs.compose.rememberDirectoryPickerLauncher(
title = title,
initialDirectory = initialDirectory,
platformSettings = injectPlatformSettings(platformSettings, this.window),
Expand All @@ -64,7 +64,7 @@ public fun WindowScope.rememberFileSaverLauncher(
platformSettings: FileKitDialogSettings? = null,
onResult: (PlatformFile?) -> Unit,
): SaverResultLauncher {
return io.github.vinceglb.filekit.dialog.compose.rememberFileSaverLauncher(
return io.github.vinceglb.filekit.dialogs.compose.rememberFileSaverLauncher(
platformSettings = injectPlatformSettings(platformSettings, this.window),
onResult = onResult,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog.compose
package io.github.vinceglb.filekit.dialogs.compose

import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
Expand All @@ -7,7 +7,7 @@ import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.rememberUpdatedState
import io.github.vinceglb.filekit.FileKit
import io.github.vinceglb.filekit.PlatformFile
import io.github.vinceglb.filekit.dialog.takePhoto
import io.github.vinceglb.filekit.dialogs.takePhoto
import kotlinx.coroutines.launch

@Composable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog.compose
package io.github.vinceglb.filekit.dialogs.compose

public class PhotoResultLauncher(
private val onLaunch: () -> Unit,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog.compose
package io.github.vinceglb.filekit.dialogs.compose

import androidx.compose.runtime.Composable

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog.compose
package io.github.vinceglb.filekit.dialogs.compose

import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
Expand All @@ -7,8 +7,8 @@ import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.rememberUpdatedState
import io.github.vinceglb.filekit.FileKit
import io.github.vinceglb.filekit.PlatformFile
import io.github.vinceglb.filekit.dialog.FileKitDialogSettings
import io.github.vinceglb.filekit.dialog.pickDirectory
import io.github.vinceglb.filekit.dialogs.FileKitDialogSettings
import io.github.vinceglb.filekit.dialogs.pickDirectory
import kotlinx.coroutines.launch

@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ kotlin {
js(IR),
wasmJs(),
).forEach {
it.moduleName = "FileKitDialog"
it.moduleName = "FileKitDialogs"
it.browser()
}

Expand All @@ -45,7 +45,7 @@ kotlin {
macosArm64(),
).forEach {
it.binaries.framework {
baseName = "FileKitDialog"
baseName = "FileKitDialogs"
isStatic = true
}
}
Expand Down Expand Up @@ -104,7 +104,7 @@ kotlin {
}

android {
namespace = "io.github.vinceglb.filekit.dialog"
namespace = "io.github.vinceglb.filekit.dialogs"
compileSdk = libs.versions.android.compileSdk.get().toInt()
defaultConfig {
minSdk = libs.versions.android.minSdk.get().toInt()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog
package io.github.vinceglb.filekit.dialogs

import android.net.Uri
import android.webkit.MimeTypeMap
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog
package io.github.vinceglb.filekit.dialogs

import androidx.core.content.FileProvider

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog
package io.github.vinceglb.filekit.dialogs

public actual class FileKitDialogSettings {
public actual companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog
package io.github.vinceglb.filekit.dialogs

import android.net.Uri
import androidx.core.content.FileProvider
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog
package io.github.vinceglb.filekit.dialogs

public actual class FileKitDialogSettings(
public val canCreateDirectories: Boolean = true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog
package io.github.vinceglb.filekit.dialogs

import kotlinx.cinterop.ExperimentalForeignApi
import kotlinx.cinterop.memScoped
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog
package io.github.vinceglb.filekit.dialogs

import io.github.vinceglb.filekit.FileKit
import io.github.vinceglb.filekit.PlatformFile
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog
package io.github.vinceglb.filekit.dialogs

public expect class FileKitDialogSettings {
public companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog
package io.github.vinceglb.filekit.dialogs

import io.github.vinceglb.filekit.PlatformFile

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog
package io.github.vinceglb.filekit.dialogs

public sealed class PickerType {
public data object Image : PickerType()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog
package io.github.vinceglb.filekit.dialogs

internal val imageExtensions = listOf("png", "jpg", "jpeg", "gif", "bmp")
internal val videoExtensions = listOf("mp4", "mov", "avi", "mkv", "webm")
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package io.github.vinceglb.filekit.dialog
package io.github.vinceglb.filekit.dialogs

import io.github.vinceglb.filekit.FileKit
import io.github.vinceglb.filekit.PlatformFile
import io.github.vinceglb.filekit.dialog.FileKitDialog.cameraControllerDelegate
import io.github.vinceglb.filekit.dialog.FileKitDialog.documentPickerDelegate
import io.github.vinceglb.filekit.dialog.FileKitDialog.phPickerDelegate
import io.github.vinceglb.filekit.dialog.FileKitDialog.phPickerDismissDelegate
import io.github.vinceglb.filekit.dialog.util.CameraControllerDelegate
import io.github.vinceglb.filekit.dialog.util.DocumentPickerDelegate
import io.github.vinceglb.filekit.dialog.util.PhPickerDelegate
import io.github.vinceglb.filekit.dialog.util.PhPickerDismissDelegate
import io.github.vinceglb.filekit.dialogs.FileKitDialog.cameraControllerDelegate
import io.github.vinceglb.filekit.dialogs.FileKitDialog.documentPickerDelegate
import io.github.vinceglb.filekit.dialogs.FileKitDialog.phPickerDelegate
import io.github.vinceglb.filekit.dialogs.FileKitDialog.phPickerDismissDelegate
import io.github.vinceglb.filekit.dialogs.util.CameraControllerDelegate
import io.github.vinceglb.filekit.dialogs.util.DocumentPickerDelegate
import io.github.vinceglb.filekit.dialogs.util.PhPickerDelegate
import io.github.vinceglb.filekit.dialogs.util.PhPickerDismissDelegate
import kotlinx.cinterop.ExperimentalForeignApi
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.IO
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog.util
package io.github.vinceglb.filekit.dialogs.util

import platform.UIKit.UIImage
import platform.UIKit.UIImagePickerController
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog.util
package io.github.vinceglb.filekit.dialogs.util

import platform.Foundation.NSURL
import platform.UIKit.UIDocumentPickerDelegateProtocol
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog.util
package io.github.vinceglb.filekit.dialogs.util

import platform.PhotosUI.PHPickerResult
import platform.PhotosUI.PHPickerViewController
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog.util
package io.github.vinceglb.filekit.dialogs.util

import platform.PhotosUI.PHPickerResult
import platform.UIKit.UIAdaptivePresentationControllerDelegateProtocol
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog
package io.github.vinceglb.filekit.dialogs

import io.github.vinceglb.filekit.FileKit
import io.github.vinceglb.filekit.PlatformFile
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog
package io.github.vinceglb.filekit.dialogs

public class FileKitFileSaverWithoutBytesException : IllegalArgumentException(
"Bytes must not be null on Web platform. Use isSaveFileWithoutBytesSupported() " +
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog
package io.github.vinceglb.filekit.dialogs

public actual class FileKitDialogSettings {
public actual companion object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.github.vinceglb.filekit.dialog
package io.github.vinceglb.filekit.dialogs

import io.github.vinceglb.filekit.FileKit
import io.github.vinceglb.filekit.PlatformFile
import io.github.vinceglb.filekit.dialog.platform.PlatformFilePicker
import io.github.vinceglb.filekit.dialogs.platform.PlatformFilePicker
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.vinceglb.filekit.dialog
package io.github.vinceglb.filekit.dialogs

import java.awt.Window

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.github.vinceglb.filekit.dialog.platform

import io.github.vinceglb.filekit.dialog.FileKitDialogSettings
import io.github.vinceglb.filekit.dialog.platform.awt.AwtFilePicker
import io.github.vinceglb.filekit.dialog.platform.awt.AwtFileSaver
import io.github.vinceglb.filekit.dialog.platform.linux.LinuxFilePicker
import io.github.vinceglb.filekit.dialog.platform.mac.MacOSFilePicker
import io.github.vinceglb.filekit.dialog.platform.swing.SwingFilePicker
import io.github.vinceglb.filekit.dialog.platform.windows.WindowsFilePicker
import io.github.vinceglb.filekit.dialog.platform.xdg.XdgFilePickerPortal
package io.github.vinceglb.filekit.dialogs.platform

import io.github.vinceglb.filekit.dialogs.FileKitDialogSettings
import io.github.vinceglb.filekit.dialogs.platform.awt.AwtFilePicker
import io.github.vinceglb.filekit.dialogs.platform.awt.AwtFileSaver
import io.github.vinceglb.filekit.dialogs.platform.linux.LinuxFilePicker
import io.github.vinceglb.filekit.dialogs.platform.mac.MacOSFilePicker
import io.github.vinceglb.filekit.dialogs.platform.swing.SwingFilePicker
import io.github.vinceglb.filekit.dialogs.platform.windows.WindowsFilePicker
import io.github.vinceglb.filekit.dialogs.platform.xdg.XdgFilePickerPortal
import io.github.vinceglb.filekit.utils.Platform
import io.github.vinceglb.filekit.utils.PlatformUtil
import java.io.File
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.vinceglb.filekit.dialog.platform.awt
package io.github.vinceglb.filekit.dialogs.platform.awt

import io.github.vinceglb.filekit.dialog.FileKitDialogSettings
import io.github.vinceglb.filekit.dialog.platform.PlatformFilePicker
import io.github.vinceglb.filekit.dialogs.FileKitDialogSettings
import io.github.vinceglb.filekit.dialogs.platform.PlatformFilePicker
import kotlinx.coroutines.suspendCancellableCoroutine
import java.awt.Dialog
import java.awt.FileDialog
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.vinceglb.filekit.dialog.platform.awt
package io.github.vinceglb.filekit.dialogs.platform.awt

import io.github.vinceglb.filekit.dialog.FileKitDialogSettings
import io.github.vinceglb.filekit.dialogs.FileKitDialogSettings
import kotlinx.coroutines.suspendCancellableCoroutine
import java.awt.Dialog
import java.awt.FileDialog
Expand Down
Loading

0 comments on commit f735f53

Please sign in to comment.