expo-clipboard 4.6.0 → 4.8.0
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 +17 -0
- package/android/build.gradle +48 -29
- package/android/src/main/java/expo/modules/clipboard/ClipboardFileProvider.kt +0 -3
- package/build/ClipboardPasteButton.js +1 -1
- package/build/ClipboardPasteButton.js.map +1 -1
- package/ios/ExpoClipboard.podspec +1 -1
- package/mocks/ExpoClipboard.ts +41 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,23 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 4.8.0 — 2023-11-14
|
|
14
|
+
|
|
15
|
+
### 🛠 Breaking changes
|
|
16
|
+
|
|
17
|
+
- Bumped iOS deployment target to 13.4. ([#25063](https://github.com/expo/expo/pull/25063) by [@gabrieldonadel](https://github.com/gabrieldonadel))
|
|
18
|
+
- On `Android` bump `compileSdkVersion` and `targetSdkVersion` to `34`. ([#24708](https://github.com/expo/expo/pull/24708) by [@alanjhughes](https://github.com/alanjhughes))
|
|
19
|
+
|
|
20
|
+
## 4.7.0 — 2023-10-17
|
|
21
|
+
|
|
22
|
+
### 🛠 Breaking changes
|
|
23
|
+
|
|
24
|
+
- Dropped support for Android SDK 21 and 22. ([#24201](https://github.com/expo/expo/pull/24201) by [@behenate](https://github.com/behenate))
|
|
25
|
+
|
|
26
|
+
### 💡 Others
|
|
27
|
+
|
|
28
|
+
- Ship untranspiled JSX to support custom handling of `jsx` and `createElement`. ([#24889](https://github.com/expo/expo/pull/24889) by [@EvanBacon](https://github.com/EvanBacon))
|
|
29
|
+
|
|
13
30
|
## 4.6.0 — 2023-09-15
|
|
14
31
|
|
|
15
32
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -3,15 +3,20 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '4.
|
|
6
|
+
version = '4.8.0'
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
9
|
+
if (expoModulesCorePlugin.exists()) {
|
|
10
|
+
apply from: expoModulesCorePlugin
|
|
11
|
+
applyKotlinExpoModulesCorePlugin()
|
|
12
|
+
// Remove this check, but keep the contents after SDK49 support is dropped
|
|
13
|
+
if (safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
14
|
+
useExpoPublishing()
|
|
15
|
+
useCoreDependencies()
|
|
13
16
|
}
|
|
17
|
+
}
|
|
14
18
|
|
|
19
|
+
buildscript {
|
|
15
20
|
// Simple helper that allows the root project to override versions declared by this library.
|
|
16
21
|
ext.safeExtGet = { prop, fallback ->
|
|
17
22
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
@@ -35,23 +40,44 @@ buildscript {
|
|
|
35
40
|
}
|
|
36
41
|
}
|
|
37
42
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
44
|
+
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
45
|
+
afterEvaluate {
|
|
46
|
+
publishing {
|
|
47
|
+
publications {
|
|
48
|
+
release(MavenPublication) {
|
|
49
|
+
from components.release
|
|
50
|
+
}
|
|
43
51
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
repositories {
|
|
53
|
+
maven {
|
|
54
|
+
url = mavenLocal().url
|
|
55
|
+
}
|
|
48
56
|
}
|
|
49
57
|
}
|
|
50
58
|
}
|
|
51
59
|
}
|
|
52
60
|
|
|
53
61
|
android {
|
|
54
|
-
|
|
62
|
+
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
63
|
+
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
64
|
+
compileSdkVersion safeExtGet("compileSdkVersion", 34)
|
|
65
|
+
|
|
66
|
+
defaultConfig {
|
|
67
|
+
minSdkVersion safeExtGet("minSdkVersion", 23)
|
|
68
|
+
targetSdkVersion safeExtGet("targetSdkVersion", 34)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
publishing {
|
|
72
|
+
singleVariant("release") {
|
|
73
|
+
withSourcesJar()
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
lintOptions {
|
|
78
|
+
abortOnError false
|
|
79
|
+
}
|
|
80
|
+
}
|
|
55
81
|
|
|
56
82
|
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
|
|
57
83
|
if (agpVersion.tokenize('.')[0].toInteger() < 8) {
|
|
@@ -67,18 +93,8 @@ android {
|
|
|
67
93
|
|
|
68
94
|
namespace "expo.modules.clipboard"
|
|
69
95
|
defaultConfig {
|
|
70
|
-
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
71
|
-
targetSdkVersion safeExtGet("targetSdkVersion", 33)
|
|
72
96
|
versionCode 3
|
|
73
|
-
versionName '4.
|
|
74
|
-
}
|
|
75
|
-
lintOptions {
|
|
76
|
-
abortOnError false
|
|
77
|
-
}
|
|
78
|
-
publishing {
|
|
79
|
-
singleVariant("release") {
|
|
80
|
-
withSourcesJar()
|
|
81
|
-
}
|
|
97
|
+
versionName '4.8.0'
|
|
82
98
|
}
|
|
83
99
|
}
|
|
84
100
|
|
|
@@ -87,8 +103,11 @@ repositories {
|
|
|
87
103
|
}
|
|
88
104
|
|
|
89
105
|
dependencies {
|
|
90
|
-
|
|
91
|
-
|
|
106
|
+
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
107
|
+
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
108
|
+
implementation project(':expo-modules-core')
|
|
109
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
|
|
110
|
+
}
|
|
92
111
|
implementation "androidx.core:core-ktx:1.6.0"
|
|
93
112
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
|
|
94
113
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2")
|
|
@@ -8,13 +8,11 @@ import android.content.pm.ProviderInfo
|
|
|
8
8
|
import android.database.Cursor
|
|
9
9
|
import android.database.MatrixCursor
|
|
10
10
|
import android.net.Uri
|
|
11
|
-
import android.os.Build
|
|
12
11
|
import android.os.Environment
|
|
13
12
|
import android.os.ParcelFileDescriptor
|
|
14
13
|
import android.provider.OpenableColumns
|
|
15
14
|
import android.text.TextUtils
|
|
16
15
|
import android.webkit.MimeTypeMap
|
|
17
|
-
import androidx.annotation.RequiresApi
|
|
18
16
|
import androidx.core.content.FileProvider
|
|
19
17
|
import org.xmlpull.v1.XmlPullParser.END_DOCUMENT
|
|
20
18
|
import org.xmlpull.v1.XmlPullParser.START_TAG
|
|
@@ -38,7 +36,6 @@ import java.io.IOException
|
|
|
38
36
|
*
|
|
39
37
|
* For usage details, see [FileProvider] documentation
|
|
40
38
|
*/
|
|
41
|
-
@RequiresApi(Build.VERSION_CODES.KITKAT)
|
|
42
39
|
class ClipboardFileProvider : ContentProvider() {
|
|
43
40
|
private val defaultProjectionColumns = arrayOf(OpenableColumns.DISPLAY_NAME, OpenableColumns.SIZE)
|
|
44
41
|
|
|
@@ -28,6 +28,6 @@ export function ClipboardPasteButton({ onPress, ...restProps }) {
|
|
|
28
28
|
const onPastePressed = ({ nativeEvent }) => {
|
|
29
29
|
onPress(nativeEvent);
|
|
30
30
|
};
|
|
31
|
-
return
|
|
31
|
+
return <ExpoClipboardPasteButton onPastePressed={onPastePressed} {...restProps}/>;
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=ClipboardPasteButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClipboardPasteButton.js","sourceRoot":"","sources":["../src/ClipboardPasteButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAElE,cAAc;AACd;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,oBAAoB,CAAC,EAAE,OAAO,EAAE,GAAG,SAAS,EAA6B;IACvF,IAAI,CAAC,wBAAwB,EAAE;QAC7B,IAAI,OAAO,EAAE;YACX,OAAO,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;SACtD;QACD,OAAO,IAAI,CAAC;KACb;IAED,MAAM,cAAc,GAAG,CAAC,EAAE,WAAW,EAA2C,EAAE,EAAE;QAClF,OAAO,CAAC,WAAW,CAAC,CAAC;IACvB,CAAC,CAAC;IAEF,OAAO,
|
|
1
|
+
{"version":3,"file":"ClipboardPasteButton.js","sourceRoot":"","sources":["../src/ClipboardPasteButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAElE,cAAc;AACd;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,oBAAoB,CAAC,EAAE,OAAO,EAAE,GAAG,SAAS,EAA6B;IACvF,IAAI,CAAC,wBAAwB,EAAE;QAC7B,IAAI,OAAO,EAAE;YACX,OAAO,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;SACtD;QACD,OAAO,IAAI,CAAC;KACb;IAED,MAAM,cAAc,GAAG,CAAC,EAAE,WAAW,EAA2C,EAAE,EAAE;QAClF,OAAO,CAAC,WAAW,CAAC,CAAC;IACvB,CAAC,CAAC;IAEF,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC,cAAc,CAAC,CAAC,IAAI,SAAS,CAAC,EAAG,CAAC;AACrF,CAAC","sourcesContent":["import React from 'react';\nimport { NativeSyntheticEvent } from 'react-native';\n\nimport { ClipboardPasteButtonProps, PasteEventPayload } from './Clipboard.types';\nimport ExpoClipboardPasteButton from './ExpoClipboardPasteButton';\n\n// @needsAudit\n/**\n * This component displays the `UIPasteControl` button on your screen. This allows pasting from the clipboard without requesting permission from the user.\n *\n * You should only attempt to render this if [`Clipboard.isPasteButtonAvailable`](#ispastebuttonavailable)\n * is `true`. This component will render nothing if it is not available, and you will get\n * a warning in development mode (`__DEV__ === true`).\n *\n * The properties of this component extend from `View`; however, you should not attempt to set\n * `backgroundColor`, `color` or `borderRadius` with the `style` property. Apple restricts customisation of this view.\n * Instead, you should use the backgroundColor and foregroundColor properties to set the colors of the button, the cornerStyle property to change the border radius,\n * and the displayMode property to change the appearance of the icon and label. The word \"Paste\" is not editable and neither is the icon.\n *\n * Make sure to attach height and width via the style props as without these styles, the button will\n * not appear on the screen.\n *\n * @see [Apple Documentation](https://developer.apple.com/documentation/uikit/uipastecontrol) for more details.\n */\nexport function ClipboardPasteButton({ onPress, ...restProps }: ClipboardPasteButtonProps) {\n if (!ExpoClipboardPasteButton) {\n if (__DEV__) {\n console.warn(\"'ApplePasteButton' is not available.\");\n }\n return null;\n }\n\n const onPastePressed = ({ nativeEvent }: NativeSyntheticEvent<PasteEventPayload>) => {\n onPress(nativeEvent);\n };\n\n return <ExpoClipboardPasteButton onPastePressed={onPastePressed} {...restProps} />;\n}\n"]}
|
|
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
|
|
|
10
10
|
s.license = package['license']
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.homepage = package['homepage']
|
|
13
|
-
s.platform = :ios, '13.
|
|
13
|
+
s.platform = :ios, '13.4'
|
|
14
14
|
s.swift_version = '5.4'
|
|
15
15
|
s.source = { git: 'https://github.com/expo/expo.git' }
|
|
16
16
|
s.static_framework = true
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Automatically generated by expo-modules-test-core.
|
|
3
|
+
*
|
|
4
|
+
* This autogenerated file provides a mock for native Expo module,
|
|
5
|
+
* and works out of the box with the expo jest preset.
|
|
6
|
+
* */
|
|
7
|
+
export type GetStringOptions = any;
|
|
8
|
+
export type SetStringOptions = any;
|
|
9
|
+
export type URL = any;
|
|
10
|
+
export type GetImageOptions = any;
|
|
11
|
+
export async function getStringAsync(options: GetStringOptions): Promise<string> {
|
|
12
|
+
return '';
|
|
13
|
+
}
|
|
14
|
+
export async function setStringAsync(
|
|
15
|
+
content: string | undefined,
|
|
16
|
+
options: SetStringOptions
|
|
17
|
+
): Promise<boolean> {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
export async function hasStringAsync(): Promise<boolean> {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
export async function getUrlAsync(): Promise<string | undefined> {
|
|
24
|
+
return '';
|
|
25
|
+
}
|
|
26
|
+
export async function setUrlAsync(url: URL): Promise<any> {}
|
|
27
|
+
export async function hasUrlAsync(): Promise<boolean> {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
export async function setImageAsync(content: string): Promise<any> {}
|
|
31
|
+
export async function hasImageAsync(): Promise<boolean> {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
export async function getImageAsync(options: GetImageOptions): Promise<
|
|
35
|
+
| {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
}
|
|
38
|
+
| undefined
|
|
39
|
+
> {
|
|
40
|
+
return {};
|
|
41
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-clipboard",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.0",
|
|
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": "3142a086578deffd8704a8f1b6f0f661527d836c"
|
|
43
43
|
}
|