@rpg-engine/long-bow 0.5.68 → 0.5.71

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.
@@ -16022,39 +16022,36 @@ var SimpleImageCarousel = function SimpleImageCarousel(_ref) {
16022
16022
  var _useState = useState(0),
16023
16023
  currentImage = _useState[0],
16024
16024
  setCurrentImage = _useState[1];
16025
- var _useState2 = useState(null),
16026
- autoCycleId = _useState2[0],
16027
- setAutoCycleId = _useState2[1];
16025
+ var autoCycleId = useRef(null);
16028
16026
  var handleLeftClick = function handleLeftClick() {
16029
16027
  setCurrentImage(function (prevImage) {
16030
16028
  return (prevImage - 1 + (images == null ? void 0 : images.length)) % (images == null ? void 0 : images.length);
16031
16029
  });
16032
- if (stopAutoCyclingOnInteraction && autoCycleId) {
16033
- clearInterval(autoCycleId);
16034
- setAutoCycleId(null);
16030
+ if (stopAutoCyclingOnInteraction && autoCycleId.current) {
16031
+ clearInterval(autoCycleId.current);
16032
+ autoCycleId.current = null;
16035
16033
  }
16036
16034
  };
16037
16035
  var handleRightClick = function handleRightClick() {
16038
16036
  setCurrentImage(function (prevImage) {
16039
16037
  return (prevImage + 1) % (images == null ? void 0 : images.length);
16040
16038
  });
16041
- if (stopAutoCyclingOnInteraction && autoCycleId) {
16042
- clearInterval(autoCycleId);
16043
- setAutoCycleId(null);
16039
+ if (stopAutoCyclingOnInteraction && autoCycleId.current) {
16040
+ clearInterval(autoCycleId.current);
16041
+ autoCycleId.current = null;
16044
16042
  }
16045
16043
  };
16046
16044
  useEffect(function () {
16047
16045
  if (autoCycle) {
16048
- var id = setInterval(function () {
16046
+ autoCycleId.current = setInterval(function () {
16049
16047
  setCurrentImage(function (prevImage) {
16050
16048
  return (prevImage + 1) % (images == null ? void 0 : images.length);
16051
16049
  });
16052
16050
  }, autoCycleDelay);
16053
- setAutoCycleId(id);
16054
16051
  }
16055
16052
  return function () {
16056
- if (autoCycleId) {
16057
- clearInterval(autoCycleId);
16053
+ if (autoCycleId.current) {
16054
+ clearInterval(autoCycleId.current);
16058
16055
  }
16059
16056
  };
16060
16057
  }, [autoCycle, autoCycleDelay, images == null ? void 0 : images.length]);
@@ -16076,7 +16073,7 @@ var SimpleImageCarousel = function SimpleImageCarousel(_ref) {
16076
16073
  var ImageContainer = /*#__PURE__*/styled.div.withConfig({
16077
16074
  displayName: "SimpleImageCarousel__ImageContainer",
16078
16075
  componentId: "sc-gdvbly-0"
16079
- })(["flex:1;display:flex;justify-content:center;align-items:center;height:100%;margin-right:0.5rem;max-width:400px;position:relative;"]);
16076
+ })(["flex:1;display:flex;justify-content:center;align-items:center;height:100%;margin-right:0.5rem;max-width:400px;position:relative;width:400px;"]);
16080
16077
  var CustomLeftArrow = /*#__PURE__*/styled(SelectArrow).withConfig({
16081
16078
  displayName: "SimpleImageCarousel__CustomLeftArrow",
16082
16079
  componentId: "sc-gdvbly-1"