expo-clipboard 6.0.1 → 6.0.3
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/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 6.0.3 — 2024-05-01
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 6.0.2 — 2024-04-24
|
|
18
|
+
|
|
19
|
+
### 💡 Others
|
|
20
|
+
|
|
21
|
+
- Update mocks for SDK51. ([#28424](https://github.com/expo/expo/pull/28424) by [@aleqsio](https://github.com/aleqsio))
|
|
22
|
+
|
|
13
23
|
## 6.0.1 — 2024-04-23
|
|
14
24
|
|
|
15
25
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
2
|
|
|
3
3
|
group = 'host.exp.exponent'
|
|
4
|
-
version = '6.0.
|
|
4
|
+
version = '6.0.3'
|
|
5
5
|
|
|
6
6
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
7
7
|
apply from: expoModulesCorePlugin
|
|
@@ -14,7 +14,7 @@ android {
|
|
|
14
14
|
namespace "expo.modules.clipboard"
|
|
15
15
|
defaultConfig {
|
|
16
16
|
versionCode 3
|
|
17
|
-
versionName '6.0.
|
|
17
|
+
versionName '6.0.3'
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -81,13 +81,13 @@ class ClipboardFileProvider : ContentProvider() {
|
|
|
81
81
|
return "application/octet-stream"
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
override fun query(uri: Uri, projection: Array<out String>?, selection: String?, selectionArgs: Array<out String>?, sortOrder: String?): Cursor
|
|
85
|
-
val
|
|
84
|
+
override fun query(uri: Uri, projection: Array<out String>?, selection: String?, selectionArgs: Array<out String>?, sortOrder: String?): Cursor {
|
|
85
|
+
val finalProjection = projection ?: defaultProjectionColumns
|
|
86
86
|
val file: File = strategy.getFileForUri(uri)
|
|
87
|
-
var columns = arrayOfNulls<String>(
|
|
88
|
-
var values = arrayOfNulls<Any>(
|
|
87
|
+
var columns = arrayOfNulls<String>(finalProjection.size)
|
|
88
|
+
var values = arrayOfNulls<Any>(finalProjection.size)
|
|
89
89
|
var i = 0
|
|
90
|
-
for (column in
|
|
90
|
+
for (column in finalProjection) {
|
|
91
91
|
when (column) {
|
|
92
92
|
OpenableColumns.DISPLAY_NAME -> {
|
|
93
93
|
columns[i] = OpenableColumns.DISPLAY_NAME
|
|
@@ -19,7 +19,6 @@ import java.io.File
|
|
|
19
19
|
import java.io.FileOutputStream
|
|
20
20
|
import java.io.IOException
|
|
21
21
|
import java.lang.StringBuilder
|
|
22
|
-
import java.util.*
|
|
23
22
|
|
|
24
23
|
// region Structs and interfaces
|
|
25
24
|
data class ImageResult(
|
|
@@ -130,6 +129,7 @@ internal suspend fun clipDataFromBase64Image(
|
|
|
130
129
|
internal suspend fun bitmapFromContentUriAsync(context: Context, imageUri: Uri): Bitmap =
|
|
131
130
|
runInterruptible(Dispatchers.IO) {
|
|
132
131
|
val contentResolver = context.contentResolver
|
|
132
|
+
@Suppress("DEPRECATION")
|
|
133
133
|
when {
|
|
134
134
|
Build.VERSION.SDK_INT < 28 -> MediaStore.Images.Media.getBitmap(
|
|
135
135
|
contentResolver,
|
package/mocks/ExpoClipboard.ts
CHANGED
|
@@ -4,33 +4,54 @@
|
|
|
4
4
|
* This autogenerated file provides a mock for native Expo module,
|
|
5
5
|
* and works out of the box with the expo jest preset.
|
|
6
6
|
* */
|
|
7
|
+
|
|
7
8
|
export type GetStringOptions = any;
|
|
9
|
+
|
|
8
10
|
export type SetStringOptions = any;
|
|
11
|
+
|
|
9
12
|
export type URL = any;
|
|
13
|
+
|
|
10
14
|
export type GetImageOptions = any;
|
|
15
|
+
|
|
16
|
+
export type UIColor = any;
|
|
17
|
+
|
|
18
|
+
export type AcceptedTypes = any;
|
|
19
|
+
|
|
20
|
+
export type CornerStyle = any;
|
|
21
|
+
|
|
22
|
+
export type DisplayMode = any;
|
|
23
|
+
|
|
11
24
|
export async function getStringAsync(options: GetStringOptions): Promise<string> {
|
|
12
25
|
return '';
|
|
13
26
|
}
|
|
27
|
+
|
|
14
28
|
export async function setStringAsync(
|
|
15
29
|
content: string | undefined,
|
|
16
30
|
options: SetStringOptions
|
|
17
31
|
): Promise<boolean> {
|
|
18
32
|
return false;
|
|
19
33
|
}
|
|
34
|
+
|
|
20
35
|
export async function hasStringAsync(): Promise<boolean> {
|
|
21
36
|
return false;
|
|
22
37
|
}
|
|
38
|
+
|
|
23
39
|
export async function getUrlAsync(): Promise<string | undefined> {
|
|
24
40
|
return '';
|
|
25
41
|
}
|
|
42
|
+
|
|
26
43
|
export async function setUrlAsync(url: URL): Promise<any> {}
|
|
44
|
+
|
|
27
45
|
export async function hasUrlAsync(): Promise<boolean> {
|
|
28
46
|
return false;
|
|
29
47
|
}
|
|
48
|
+
|
|
30
49
|
export async function setImageAsync(content: string): Promise<any> {}
|
|
50
|
+
|
|
31
51
|
export async function hasImageAsync(): Promise<boolean> {
|
|
32
52
|
return false;
|
|
33
53
|
}
|
|
54
|
+
|
|
34
55
|
export async function getImageAsync(options: GetImageOptions): Promise<
|
|
35
56
|
| {
|
|
36
57
|
[key: string]: any;
|
|
@@ -39,3 +60,15 @@ export async function getImageAsync(options: GetImageOptions): Promise<
|
|
|
39
60
|
> {
|
|
40
61
|
return {};
|
|
41
62
|
}
|
|
63
|
+
|
|
64
|
+
export type ViewProps = {
|
|
65
|
+
backgroundColor: UIColor | undefined;
|
|
66
|
+
foregroundColor: UIColor | undefined;
|
|
67
|
+
acceptedContentTypes: AcceptedTypes[] | undefined;
|
|
68
|
+
cornerStyle: CornerStyle | undefined;
|
|
69
|
+
displayMode: DisplayMode | undefined;
|
|
70
|
+
imageOptions: GetImageOptions | undefined;
|
|
71
|
+
onPastePressed: (event: any) => void;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export function View(props: ViewProps) {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-clipboard",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.3",
|
|
4
4
|
"description": "ExpoClipboard standalone module",
|
|
5
5
|
"main": "build/Clipboard.js",
|
|
6
6
|
"types": "build/Clipboard.d.ts",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"jest": {
|
|
40
40
|
"preset": "expo-module-scripts/universal"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "87bd0dfa8b784a834191195ca174a00dd30ee5b7"
|
|
43
43
|
}
|