pixuireactcomponents 1.5.31 → 1.5.33

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixuireactcomponents",
3
- "version": "1.5.31",
3
+ "version": "1.5.33",
4
4
  "description": "pixui react components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -110,7 +110,7 @@ export function Carousel(props) {
110
110
  var nextInterval = useRef();
111
111
  var _r = useState(true), showTransition = _r[0], setShowTransition = _r[1];
112
112
  var _s = useState([0, 0]), gestureoffset = _s[0], setGestureoffset = _s[1];
113
- var offset = useMemo(function () { return -(isVertical ? compHeight : compWidth) * showIndex; }, [showIndex]);
113
+ var offset = useMemo(function () { return -(isVertical ? compHeight : compWidth) * showIndex; }, [showIndex, compHeight, compWidth]);
114
114
  var itemBoxStyle = {
115
115
  minWidth: compWidth + 'px',
116
116
  minHeight: compHeight + 'px',
@@ -25,5 +25,6 @@ export interface VideoPlayerProps {
25
25
  hideSliderDuration?: number;
26
26
  videoDuration?: number;
27
27
  compRef?: any;
28
+ maskComponent?: preact.ComponentChild | (() => preact.ComponentChild);
28
29
  }
29
30
  export declare const VideoPlayer: (props: VideoPlayerProps) => h.JSX.Element;
@@ -356,6 +356,7 @@ export var VideoPlayer = function (props) {
356
356
  }, onCanPlay: onplaying,
357
357
  //@ts-ignore
358
358
  onfirstframe: onFirstFrame, controls: true }),
359
+ props.maskComponent && (typeof props.maskComponent === 'function' ? props.maskComponent() : props.maskComponent),
359
360
  h("div", { style: screenClickerStyle, onClick: function (e) {
360
361
  videoLog('screenClickerStyle click');
361
362
  e.stopPropagation();