@xsolla/xui-image 0.74.0 → 0.76.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/native/index.js.flow +68 -0
- package/package.json +3 -3
- package/web/index.js.flow +68 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for index
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from "react";
|
|
9
|
+
declare type ImageRatio =
|
|
10
|
+
| "1:1"
|
|
11
|
+
| "2:3"
|
|
12
|
+
| "3:2"
|
|
13
|
+
| "16:9"
|
|
14
|
+
| "4:3"
|
|
15
|
+
| "9:16"
|
|
16
|
+
| "Custom";
|
|
17
|
+
declare interface ImageProps {
|
|
18
|
+
/**
|
|
19
|
+
* Image source URL
|
|
20
|
+
*/
|
|
21
|
+
src?: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Image alt text
|
|
25
|
+
*/
|
|
26
|
+
alt?: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Aspect ratio of the image. Defaults to '1:1'
|
|
30
|
+
*/
|
|
31
|
+
ratio?: ImageRatio;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Custom aspect ratio as a string (e.g. '21 / 9') or number (e.g. 2.33) if ratio is set to 'Custom'
|
|
35
|
+
*/
|
|
36
|
+
customRatio?: string | number;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Optional slot for overlay or placeholder content
|
|
40
|
+
*/
|
|
41
|
+
slot?: React.ReactNode;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Width of the image container. Defaults to '100%'
|
|
45
|
+
*/
|
|
46
|
+
width?: number | string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Border radius of the image container. Defaults to 0
|
|
50
|
+
*/
|
|
51
|
+
borderRadius?: number | string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Style for the container Box
|
|
55
|
+
*/
|
|
56
|
+
style?: React.CSSProperties;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Style for the img element
|
|
60
|
+
*/
|
|
61
|
+
imageStyle?: React.CSSProperties;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Image component with support for various aspect ratios and overlays.
|
|
65
|
+
*/
|
|
66
|
+
declare var Image: React.FC<ImageProps>;
|
|
67
|
+
export type { ImageProps, ImageRatio };
|
|
68
|
+
declare export { Image };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-image",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.76.0",
|
|
4
4
|
"main": "./web/index.js",
|
|
5
5
|
"module": "./web/index.mjs",
|
|
6
6
|
"types": "./web/index.d.ts",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"build:native": "PLATFORM=native tsup"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xsolla/xui-core": "0.
|
|
14
|
-
"@xsolla/xui-primitives-core": "0.
|
|
13
|
+
"@xsolla/xui-core": "0.76.0",
|
|
14
|
+
"@xsolla/xui-primitives-core": "0.76.0"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"react": ">=16.8.0",
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for index
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from "react";
|
|
9
|
+
declare type ImageRatio =
|
|
10
|
+
| "1:1"
|
|
11
|
+
| "2:3"
|
|
12
|
+
| "3:2"
|
|
13
|
+
| "16:9"
|
|
14
|
+
| "4:3"
|
|
15
|
+
| "9:16"
|
|
16
|
+
| "Custom";
|
|
17
|
+
declare interface ImageProps {
|
|
18
|
+
/**
|
|
19
|
+
* Image source URL
|
|
20
|
+
*/
|
|
21
|
+
src?: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Image alt text
|
|
25
|
+
*/
|
|
26
|
+
alt?: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Aspect ratio of the image. Defaults to '1:1'
|
|
30
|
+
*/
|
|
31
|
+
ratio?: ImageRatio;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Custom aspect ratio as a string (e.g. '21 / 9') or number (e.g. 2.33) if ratio is set to 'Custom'
|
|
35
|
+
*/
|
|
36
|
+
customRatio?: string | number;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Optional slot for overlay or placeholder content
|
|
40
|
+
*/
|
|
41
|
+
slot?: React.ReactNode;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Width of the image container. Defaults to '100%'
|
|
45
|
+
*/
|
|
46
|
+
width?: number | string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Border radius of the image container. Defaults to 0
|
|
50
|
+
*/
|
|
51
|
+
borderRadius?: number | string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Style for the container Box
|
|
55
|
+
*/
|
|
56
|
+
style?: React.CSSProperties;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Style for the img element
|
|
60
|
+
*/
|
|
61
|
+
imageStyle?: React.CSSProperties;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Image component with support for various aspect ratios and overlays.
|
|
65
|
+
*/
|
|
66
|
+
declare var Image: React.FC<ImageProps>;
|
|
67
|
+
export type { ImageProps, ImageRatio };
|
|
68
|
+
declare export { Image };
|