@uncinc/uncinc-react-kitchen-sink 2.11.10 → 2.11.12
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.
|
@@ -48,7 +48,7 @@ var AdaptivePicture = function AdaptivePicture(_ref) {
|
|
|
48
48
|
var container = image.parentElement;
|
|
49
49
|
if (!container) return;
|
|
50
50
|
var resizeObserver = new ResizeObserver(function (entries) {
|
|
51
|
-
// In order to prevent the 'ResizeObserver loop completed with undelivered notifications.'
|
|
51
|
+
// In order to prevent the 'ResizeObserver loop completed with undelivered notifications.'
|
|
52
52
|
// message, debounce handling the ResizeObserver action by adding a timeout.
|
|
53
53
|
clearTimeout(resizingDelayTimer.current);
|
|
54
54
|
resizingDelayTimer.current = setTimeout(function () {
|
|
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import path from 'path';
|
|
8
8
|
import { useEffect, useState } from 'react';
|
|
9
|
-
var breakpoints = [256, 512, 1024, 2048];
|
|
9
|
+
var breakpoints = [128, 256, 512, 1024, 2048];
|
|
10
10
|
var mimeTypes = {
|
|
11
11
|
'.gif': 'image/gif',
|
|
12
12
|
'.png': 'image/png',
|
|
@@ -6,7 +6,7 @@ declare namespace Image {
|
|
|
6
6
|
alt: PropTypes.Requireable<string>;
|
|
7
7
|
src: PropTypes.Validator<{}>;
|
|
8
8
|
lazyload: PropTypes.Requireable<boolean>;
|
|
9
|
-
aspectRatio: PropTypes.Requireable<number
|
|
9
|
+
aspectRatio: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
10
10
|
objectFit: PropTypes.Requireable<string>;
|
|
11
11
|
resizeDelay: PropTypes.Requireable<number>;
|
|
12
12
|
};
|
|
@@ -23,7 +23,7 @@ var Image = function Image(props) {
|
|
|
23
23
|
Image.propTypes = _objectSpread({
|
|
24
24
|
src: PropTypes.oneOfType([PropTypes.string, ImmutablePropTypes.map, PropTypes.arrayOf(PropTypes.string)]).isRequired,
|
|
25
25
|
lazyload: PropTypes.bool,
|
|
26
|
-
aspectRatio: PropTypes.number,
|
|
26
|
+
aspectRatio: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
27
27
|
objectFit: PropTypes.oneOf(['fill', 'contain', 'cover', 'none', 'scale-down']),
|
|
28
28
|
resizeDelay: PropTypes.number
|
|
29
29
|
}, Picture.propTypes);
|