@react-types/image 3.5.4 → 3.6.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/package.json +6 -4
- package/src/index.d.ts +1 -38
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/image",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -9,13 +9,15 @@
|
|
|
9
9
|
"url": "https://github.com/adobe/react-spectrum"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@react-
|
|
12
|
+
"@react-spectrum/image": "^3.7.0"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"react": "^
|
|
15
|
+
"@react-spectrum/provider": "^3.0.0",
|
|
16
|
+
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
17
|
+
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
16
18
|
},
|
|
17
19
|
"publishConfig": {
|
|
18
20
|
"access": "public"
|
|
19
21
|
},
|
|
20
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
|
|
21
23
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -10,41 +10,4 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
import {ReactEventHandler} from 'react';
|
|
15
|
-
|
|
16
|
-
export interface ImageProps {
|
|
17
|
-
/**
|
|
18
|
-
* The URL of the image.
|
|
19
|
-
*/
|
|
20
|
-
src: string,
|
|
21
|
-
/**
|
|
22
|
-
* Text description of the image.
|
|
23
|
-
*/
|
|
24
|
-
alt?: string,
|
|
25
|
-
/**
|
|
26
|
-
* Sets the Image [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) style.
|
|
27
|
-
*/
|
|
28
|
-
objectFit?: any, // move to styleProps for images and type better
|
|
29
|
-
/**
|
|
30
|
-
* Called if an error occurs while loading or rendering an image, see [Image loading errors](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#image_loading_errors).
|
|
31
|
-
*/
|
|
32
|
-
onError?: ReactEventHandler<HTMLImageElement>,
|
|
33
|
-
/**
|
|
34
|
-
* Called when the image has successfully loaded, see [load event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/load_event).
|
|
35
|
-
*/
|
|
36
|
-
onLoad?: ReactEventHandler<HTMLImageElement>,
|
|
37
|
-
/**
|
|
38
|
-
* Indicates if the fetching of the image must be done using a CORS request.
|
|
39
|
-
* [See MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin).
|
|
40
|
-
*/
|
|
41
|
-
crossOrigin?: 'anonymous' | 'use-credentials'
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface SpectrumImageProps extends ImageProps, DOMProps, StyleProps {
|
|
45
|
-
/**
|
|
46
|
-
* A slot to place the image in.
|
|
47
|
-
* @default 'image'
|
|
48
|
-
*/
|
|
49
|
-
slot?: string
|
|
50
|
-
}
|
|
13
|
+
export {ImageProps, SpectrumImageProps} from '@react-spectrum/image';
|