@cntrl-site/components 0.1.9-0 → 0.1.9

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/dist/index.js CHANGED
@@ -1053,10 +1053,12 @@ const ControlSliderComponent = {
1053
1053
  const imageRevealSlider = "ImageRevealSlider-module__imageRevealSlider___UE5Ob";
1054
1054
  const image = "ImageRevealSlider-module__image___Qjt-e";
1055
1055
  const link = "ImageRevealSlider-module__link___N-iLG";
1056
+ const cursor = "ImageRevealSlider-module__cursor___2U03d";
1056
1057
  const styles = {
1057
1058
  imageRevealSlider,
1058
1059
  image,
1059
- link
1060
+ link,
1061
+ cursor
1060
1062
  };
1061
1063
  function isMouseOverImage(mouseX, mouseY, placedImages) {
1062
1064
  for (const img2 of placedImages) {
@@ -1161,8 +1163,7 @@ function ImageRevealSlider({ settings, content, isEditor }) {
1161
1163
  defaultCursor,
1162
1164
  hoverCursorScale,
1163
1165
  defaultCursorScale,
1164
- placedImages,
1165
- window.scrollY
1166
+ placedImages
1166
1167
  ]);
1167
1168
  React.useEffect(() => {
1168
1169
  if (!isInside) {
@@ -1204,13 +1205,11 @@ function ImageRevealSlider({ settings, content, isEditor }) {
1204
1205
  const containerHeight = rect.height;
1205
1206
  const defaultPlaced = [];
1206
1207
  const placeImages = async () => {
1207
- for (let i = 0; i < 1 && i < content.length; i++) {
1208
- const imgData = content[i];
1209
- const newImg = await createNewImage(imgData, containerWidth, containerHeight);
1210
- defaultPlaced.push(newImg);
1211
- }
1208
+ const imgData = content[0];
1209
+ const newImg = await createNewImage(imgData, containerWidth, containerHeight);
1210
+ defaultPlaced.push(newImg);
1212
1211
  setPlacedImages(defaultPlaced);
1213
- setCounter(1 % content.length);
1212
+ setCounter(1);
1214
1213
  };
1215
1214
  placeImages();
1216
1215
  }, [sizeType, customWidth, randomRange, revealPosition, divRef]);
@@ -1287,7 +1286,7 @@ function ImageRevealSlider({ settings, content, isEditor }) {
1287
1286
  isInside && /* @__PURE__ */ jsxRuntime.jsx(
1288
1287
  "div",
1289
1288
  {
1290
- className: "cursor",
1289
+ className: styles.cursor,
1291
1290
  style: {
1292
1291
  left: `${cursorCenter.x}px`,
1293
1292
  top: `${cursorCenter.y}px`,
package/dist/index.mjs CHANGED
@@ -1051,10 +1051,12 @@ const ControlSliderComponent = {
1051
1051
  const imageRevealSlider = "ImageRevealSlider-module__imageRevealSlider___UE5Ob";
1052
1052
  const image = "ImageRevealSlider-module__image___Qjt-e";
1053
1053
  const link = "ImageRevealSlider-module__link___N-iLG";
1054
+ const cursor = "ImageRevealSlider-module__cursor___2U03d";
1054
1055
  const styles = {
1055
1056
  imageRevealSlider,
1056
1057
  image,
1057
- link
1058
+ link,
1059
+ cursor
1058
1060
  };
1059
1061
  function isMouseOverImage(mouseX, mouseY, placedImages) {
1060
1062
  for (const img2 of placedImages) {
@@ -1159,8 +1161,7 @@ function ImageRevealSlider({ settings, content, isEditor }) {
1159
1161
  defaultCursor,
1160
1162
  hoverCursorScale,
1161
1163
  defaultCursorScale,
1162
- placedImages,
1163
- window.scrollY
1164
+ placedImages
1164
1165
  ]);
1165
1166
  useEffect(() => {
1166
1167
  if (!isInside) {
@@ -1202,13 +1203,11 @@ function ImageRevealSlider({ settings, content, isEditor }) {
1202
1203
  const containerHeight = rect.height;
1203
1204
  const defaultPlaced = [];
1204
1205
  const placeImages = async () => {
1205
- for (let i = 0; i < 1 && i < content.length; i++) {
1206
- const imgData = content[i];
1207
- const newImg = await createNewImage(imgData, containerWidth, containerHeight);
1208
- defaultPlaced.push(newImg);
1209
- }
1206
+ const imgData = content[0];
1207
+ const newImg = await createNewImage(imgData, containerWidth, containerHeight);
1208
+ defaultPlaced.push(newImg);
1210
1209
  setPlacedImages(defaultPlaced);
1211
- setCounter(1 % content.length);
1210
+ setCounter(1);
1212
1211
  };
1213
1212
  placeImages();
1214
1213
  }, [sizeType, customWidth, randomRange, revealPosition, divRef]);
@@ -1285,7 +1284,7 @@ function ImageRevealSlider({ settings, content, isEditor }) {
1285
1284
  isInside && /* @__PURE__ */ jsx(
1286
1285
  "div",
1287
1286
  {
1288
- className: "cursor",
1287
+ className: styles.cursor,
1289
1288
  style: {
1290
1289
  left: `${cursorCenter.x}px`,
1291
1290
  top: `${cursorCenter.y}px`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/components",
3
- "version": "0.1.9-0",
3
+ "version": "0.1.9",
4
4
  "description": "Custom components for control editor and public websites.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",