@os-design-mobile/image-upload 1.0.94 → 1.0.95
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/dist/index.d.ts +46 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/utils/defaultLocale.d.ts +8 -0
- package/dist/utils/defaultLocale.d.ts.map +1 -0
- package/package.json +12 -11
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type RectButtonProps } from 'react-native-gesture-handler';
|
|
2
|
+
import { type Asset, type CameraOptions, type ImageLibraryOptions } from 'react-native-image-picker';
|
|
3
|
+
import { type ImageUploadLocale } from './utils/defaultLocale';
|
|
4
|
+
export interface ImageUploadProps extends RectButtonProps {
|
|
5
|
+
/**
|
|
6
|
+
* The url of the image.
|
|
7
|
+
* @default undefined
|
|
8
|
+
*/
|
|
9
|
+
url?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The locale of the component.
|
|
12
|
+
* @default undefined
|
|
13
|
+
*/
|
|
14
|
+
locale?: ImageUploadLocale;
|
|
15
|
+
/**
|
|
16
|
+
* The image library options.
|
|
17
|
+
* @default undefined
|
|
18
|
+
*/
|
|
19
|
+
imageLibraryOptions?: Pick<ImageLibraryOptions, 'maxWidth' | 'maxHeight' | 'quality'>;
|
|
20
|
+
/**
|
|
21
|
+
* The camera options.
|
|
22
|
+
* @default undefined
|
|
23
|
+
*/
|
|
24
|
+
cameraOptions?: Pick<CameraOptions, 'maxWidth' | 'maxHeight' | 'quality' | 'saveToPhotos' | 'cameraType'>;
|
|
25
|
+
/**
|
|
26
|
+
* The selected local file, or null if the image is marked as deleted.
|
|
27
|
+
* @default undefined
|
|
28
|
+
*/
|
|
29
|
+
value?: Asset | null;
|
|
30
|
+
/**
|
|
31
|
+
* The default value.
|
|
32
|
+
* @default undefined
|
|
33
|
+
*/
|
|
34
|
+
defaultValue?: Asset | null;
|
|
35
|
+
/**
|
|
36
|
+
* The change event handler.
|
|
37
|
+
* @default undefined
|
|
38
|
+
*/
|
|
39
|
+
onChange?: (value: Asset | null) => void;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The component to upload an image.
|
|
43
|
+
*/
|
|
44
|
+
declare const ImageUpload: import("react").ForwardRefExoticComponent<ImageUploadProps & import("react").RefAttributes<import("react").ForwardRefExoticComponent<Omit<RectButtonProps, "innerRef"> & import("react").RefAttributes<any>>>>;
|
|
45
|
+
export default ImageUpload;
|
|
46
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAGhF,OAAO,EAGL,KAAK,KAAK,EAEV,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACzB,MAAM,2BAA2B,CAAC;AAQnC,OAAsB,EAAE,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE9E,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,IAAI,CACxB,mBAAmB,EACnB,UAAU,GAAG,WAAW,GAAG,SAAS,CACrC,CAAC;IACF;;;OAGG;IACH,aAAa,CAAC,EAAE,IAAI,CAClB,aAAa,EACb,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,cAAc,GAAG,YAAY,CACrE,CAAC;IACF;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACrB;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI,CAAC;CAC1C;AAgFD;;GAEG;AACH,QAAA,MAAM,WAAW,gNA4IhB,CAAC;AAIF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultLocale.d.ts","sourceRoot":"","sources":["../../src/utils/defaultLocale.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,QAAA,MAAM,aAAa,EAAE,iBAIpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@os-design-mobile/image-upload",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.95",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"repository": "git@gitlab.com:os-team/libs/os-design-mobile.git",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"main": "dist/index.js",
|
|
8
|
-
"types": "dist/index.d.ts",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"react-native": "./src/index.ts",
|
|
9
10
|
"files": [
|
|
10
11
|
"dist",
|
|
11
12
|
"src",
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
"scripts": {
|
|
21
22
|
"clean": "rimraf dist",
|
|
22
23
|
"build:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts,.tsx --out-dir dist --source-maps",
|
|
23
|
-
"build:types": "tsc --
|
|
24
|
+
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist",
|
|
24
25
|
"build": "yarn clean && npm-run-all 'build:*'",
|
|
25
26
|
"ncu": "ncu -u '/^(?!(react|react-native)$).*$/'"
|
|
26
27
|
},
|
|
@@ -28,12 +29,12 @@
|
|
|
28
29
|
"access": "public"
|
|
29
30
|
},
|
|
30
31
|
"dependencies": {
|
|
31
|
-
"@os-design-mobile/action-menu": "^1.0.
|
|
32
|
-
"@os-design-mobile/button": "^1.0.
|
|
33
|
-
"@os-design-mobile/icons": "^1.0.
|
|
34
|
-
"@os-design-mobile/image": "^1.0.
|
|
35
|
-
"@os-design-mobile/text": "^1.0.
|
|
36
|
-
"@os-design-mobile/theming": "^1.0.
|
|
32
|
+
"@os-design-mobile/action-menu": "^1.0.94",
|
|
33
|
+
"@os-design-mobile/button": "^1.0.70",
|
|
34
|
+
"@os-design-mobile/icons": "^1.0.66",
|
|
35
|
+
"@os-design-mobile/image": "^1.0.52",
|
|
36
|
+
"@os-design-mobile/text": "^1.0.64",
|
|
37
|
+
"@os-design-mobile/theming": "^1.0.48",
|
|
37
38
|
"@os-design/omit-emotion-props": "^1.0.24",
|
|
38
39
|
"@os-design/use-forwarded-state": "^1.0.27"
|
|
39
40
|
},
|
|
@@ -48,5 +49,5 @@
|
|
|
48
49
|
"react-native-safe-area-context": ">=3",
|
|
49
50
|
"react-native-svg": ">=12"
|
|
50
51
|
},
|
|
51
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "1de2f821ec10cf3084e3d92df85e74d5632ab005"
|
|
52
53
|
}
|