@react-native-documents/picker 12.0.0 → 12.0.1
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/README.md +20 -0
- package/jest/build/jest/setup.js +1 -4
- package/lib/module/types.js +2 -2
- package/lib/typescript/src/isKnownType.d.ts +1 -1
- package/lib/typescript/src/types.d.ts +2 -2
- package/package.json +2 -1
- package/src/isKnownType.ts +1 -1
- package/src/types.ts +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# @react-native-documents/picker
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/js/@react-native-documents%2Fpicker)
|
|
4
|
+
[](https://www.npmjs.com/package/@react-native-documents/picker)
|
|
5
|
+
|
|
6
|
+
A React Native interface to access documents from the device or cloud storage such as iCloud, Google Drive, and other document providers.
|
|
7
|
+
|
|
8
|
+
## Documentation
|
|
9
|
+
|
|
10
|
+
For installation instructions, API reference, and usage examples, visit the official documentation:
|
|
11
|
+
|
|
12
|
+
**[https://react-native-documents.github.io/](https://react-native-documents.github.io/)**
|
|
13
|
+
|
|
14
|
+
## Support the Project
|
|
15
|
+
|
|
16
|
+
Find this package useful? Say thanks by [sponsoring the author on GitHub](https://github.com/sponsors/vonovak)!
|
|
17
|
+
|
|
18
|
+
## License
|
|
19
|
+
|
|
20
|
+
MIT
|
package/jest/build/jest/setup.js
CHANGED
|
@@ -48,10 +48,7 @@ function mockFactory() {
|
|
|
48
48
|
jest.mock('../src/spec/NativeDocumentPicker', () => mockFactory());
|
|
49
49
|
// the following are for jest testing outside of the library, where the paths are different
|
|
50
50
|
// alternative is to use moduleNameMapper in user space
|
|
51
|
-
const mockModulePaths = [
|
|
52
|
-
'../../../lib/commonjs/spec/NativeDocumentPicker',
|
|
53
|
-
'../../../lib/module/spec/NativeDocumentPicker',
|
|
54
|
-
];
|
|
51
|
+
const mockModulePaths = ['../../../lib/module/spec/NativeDocumentPicker'];
|
|
55
52
|
mockModulePaths.forEach((path) => {
|
|
56
53
|
try {
|
|
57
54
|
require.resolve(path);
|
package/lib/module/types.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* If you've requested long-term access to a directory or file, this object
|
|
4
|
+
* If you've requested long-term access to a directory or file, this object is returned in the response.
|
|
5
5
|
* In order to access the same directory or file in the future, you must store the `bookmark` opaque string,
|
|
6
6
|
* and then pass it to the document viewer if you want to preview the file.
|
|
7
7
|
*
|
|
8
|
-
* See the Document viewer
|
|
8
|
+
* See the Document viewer sources on how to retrieve the file from the bookmark, if you need to do that (advanced use case).
|
|
9
9
|
* */
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -26,7 +26,7 @@ export type IsKnownTypeOptions = {
|
|
|
26
26
|
* */
|
|
27
27
|
kind: 'UTType' | 'mimeType' | 'extension';
|
|
28
28
|
/**
|
|
29
|
-
* the value you're checking, for example: application/pdf
|
|
29
|
+
* the value you're checking, for example: `application/pdf`, `com.adobe.pdf`, `pdf`
|
|
30
30
|
* */
|
|
31
31
|
value: string;
|
|
32
32
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export type NonEmptyArray<T> = [T, ...Array<T>];
|
|
2
2
|
import type { ModalPropsIOS } from 'react-native';
|
|
3
3
|
/**
|
|
4
|
-
* If you've requested long-term access to a directory or file, this object
|
|
4
|
+
* If you've requested long-term access to a directory or file, this object is returned in the response.
|
|
5
5
|
* In order to access the same directory or file in the future, you must store the `bookmark` opaque string,
|
|
6
6
|
* and then pass it to the document viewer if you want to preview the file.
|
|
7
7
|
*
|
|
8
|
-
* See the Document viewer
|
|
8
|
+
* See the Document viewer sources on how to retrieve the file from the bookmark, if you need to do that (advanced use case).
|
|
9
9
|
* */
|
|
10
10
|
export type BookmarkingResponse = {
|
|
11
11
|
bookmarkStatus: 'success';
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-documents/picker",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.1",
|
|
4
4
|
"description": "A react native interface to access documents from dropbox, google drive, iCloud...",
|
|
5
|
+
"funding": "https://github.com/react-native-documents/document-picker?sponsor=1",
|
|
5
6
|
"main": "./lib/module/index.js",
|
|
6
7
|
"types": "./lib/typescript/src/index.d.ts",
|
|
7
8
|
"exports": {
|
package/src/isKnownType.ts
CHANGED
|
@@ -29,7 +29,7 @@ export type IsKnownTypeOptions = {
|
|
|
29
29
|
* */
|
|
30
30
|
kind: 'UTType' | 'mimeType' | 'extension'
|
|
31
31
|
/**
|
|
32
|
-
* the value you're checking, for example: application/pdf
|
|
32
|
+
* the value you're checking, for example: `application/pdf`, `com.adobe.pdf`, `pdf`
|
|
33
33
|
* */
|
|
34
34
|
value: string
|
|
35
35
|
}
|
package/src/types.ts
CHANGED
|
@@ -2,11 +2,11 @@ export type NonEmptyArray<T> = [T, ...Array<T>]
|
|
|
2
2
|
import type { ModalPropsIOS } from 'react-native'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* If you've requested long-term access to a directory or file, this object
|
|
5
|
+
* If you've requested long-term access to a directory or file, this object is returned in the response.
|
|
6
6
|
* In order to access the same directory or file in the future, you must store the `bookmark` opaque string,
|
|
7
7
|
* and then pass it to the document viewer if you want to preview the file.
|
|
8
8
|
*
|
|
9
|
-
* See the Document viewer
|
|
9
|
+
* See the Document viewer sources on how to retrieve the file from the bookmark, if you need to do that (advanced use case).
|
|
10
10
|
* */
|
|
11
11
|
export type BookmarkingResponse =
|
|
12
12
|
| {
|