@get-set/gs-zoom 0.0.4 → 0.0.6

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.
Files changed (171) hide show
  1. package/README.md +129 -1
  2. package/actions/general.ts +29 -0
  3. package/actions/getAdjustTransform.ts +46 -0
  4. package/actions/getCurrentParams.ts +42 -0
  5. package/actions/getTranslateCoordToPoint.ts +37 -0
  6. package/actions/init.ts +25 -0
  7. package/actions/initActionEvents.ts +102 -0
  8. package/actions/initAdditionals.ts +91 -0
  9. package/actions/initAdjust.ts +120 -0
  10. package/actions/initAdjustAdditionalActive.ts +31 -0
  11. package/actions/initArrows.ts +36 -0
  12. package/actions/initAutoplay.ts +91 -0
  13. package/actions/initChange.ts +139 -0
  14. package/actions/initClose.ts +29 -0
  15. package/actions/initDraggle.ts +258 -0
  16. package/actions/initDraw.ts +83 -0
  17. package/actions/initDrawItem.ts +77 -0
  18. package/actions/initFullScreen.ts +30 -0
  19. package/actions/initLightBox.ts +13 -0
  20. package/actions/initMagnifier.ts +53 -0
  21. package/actions/initNavigateWithKeys.ts +22 -0
  22. package/actions/initOpen.ts +29 -0
  23. package/actions/initWheel.ts +44 -0
  24. package/actions/setStyles.ts +28 -0
  25. package/components/GSZoom.tsx +178 -0
  26. package/{dist/components → components}/styles/GSZoom.scss +252 -254
  27. package/components/styles/GSZoomCSS.ts +237 -0
  28. package/constants/defaultParams.ts +20 -0
  29. package/constants/icons.ts +25 -0
  30. package/constants/magnifierDefaultProps.ts +9 -0
  31. package/constants/types.ts +6 -0
  32. package/dist/GSZoom.d.ts +2 -0
  33. package/dist/actions/general.d.ts +7 -0
  34. package/dist/actions/general.d.ts.map +1 -0
  35. package/dist/actions/general.js +26 -30
  36. package/dist/actions/general.js.map +1 -0
  37. package/dist/actions/getAdjustTransform.d.ts +3 -0
  38. package/dist/actions/getAdjustTransform.d.ts.map +1 -0
  39. package/dist/actions/getAdjustTransform.js +41 -43
  40. package/dist/actions/getAdjustTransform.js.map +1 -0
  41. package/dist/actions/getCurrentParams.d.ts +4 -0
  42. package/dist/actions/getCurrentParams.d.ts.map +1 -0
  43. package/dist/actions/getCurrentParams.js +35 -42
  44. package/dist/actions/getCurrentParams.js.map +1 -0
  45. package/dist/actions/getTranslateCoordToPoint.d.ts +3 -0
  46. package/dist/actions/getTranslateCoordToPoint.d.ts.map +1 -0
  47. package/dist/actions/getTranslateCoordToPoint.js +21 -41
  48. package/dist/actions/getTranslateCoordToPoint.js.map +1 -0
  49. package/dist/actions/init.d.ts +4 -0
  50. package/dist/actions/init.d.ts.map +1 -0
  51. package/dist/actions/init.js +21 -21
  52. package/dist/actions/init.js.map +1 -0
  53. package/dist/actions/initActionEvents.d.ts +4 -0
  54. package/dist/actions/initActionEvents.d.ts.map +1 -0
  55. package/dist/actions/initActionEvents.js +80 -127
  56. package/dist/actions/initActionEvents.js.map +1 -0
  57. package/dist/actions/initAdditionals.d.ts +4 -0
  58. package/dist/actions/initAdditionals.d.ts.map +1 -0
  59. package/dist/actions/initAdditionals.js +78 -117
  60. package/dist/actions/initAdditionals.js.map +1 -0
  61. package/dist/actions/initAdjust.d.ts +4 -0
  62. package/dist/actions/initAdjust.d.ts.map +1 -0
  63. package/dist/actions/initAdjust.js +96 -107
  64. package/dist/actions/initAdjust.js.map +1 -0
  65. package/dist/actions/initAdjustAdditionalActive.d.ts +4 -0
  66. package/dist/actions/initAdjustAdditionalActive.d.ts.map +1 -0
  67. package/dist/actions/initAdjustAdditionalActive.js +25 -33
  68. package/dist/actions/initAdjustAdditionalActive.js.map +1 -0
  69. package/dist/actions/initArrows.d.ts +4 -0
  70. package/dist/actions/initArrows.d.ts.map +1 -0
  71. package/dist/actions/initArrows.js +28 -44
  72. package/dist/actions/initArrows.js.map +1 -0
  73. package/dist/actions/initAutoplay.d.ts +6 -0
  74. package/dist/actions/initAutoplay.d.ts.map +1 -0
  75. package/dist/actions/initAutoplay.js +85 -81
  76. package/dist/actions/initAutoplay.js.map +1 -0
  77. package/dist/actions/initChange.d.ts +4 -0
  78. package/dist/actions/initChange.d.ts.map +1 -0
  79. package/dist/actions/initChange.js +116 -137
  80. package/dist/actions/initChange.js.map +1 -0
  81. package/dist/actions/initClose.d.ts +3 -0
  82. package/dist/actions/initClose.d.ts.map +1 -0
  83. package/dist/actions/initClose.js +24 -28
  84. package/dist/actions/initClose.js.map +1 -0
  85. package/dist/actions/initDraggle.d.ts +4 -0
  86. package/dist/actions/initDraggle.d.ts.map +1 -0
  87. package/dist/actions/initDraggle.js +227 -303
  88. package/dist/actions/initDraggle.js.map +1 -0
  89. package/dist/actions/initDraw.d.ts +4 -0
  90. package/dist/actions/initDraw.d.ts.map +1 -0
  91. package/dist/actions/initDraw.js +74 -90
  92. package/dist/actions/initDraw.js.map +1 -0
  93. package/dist/actions/initDrawItem.d.ts +4 -0
  94. package/dist/actions/initDrawItem.d.ts.map +1 -0
  95. package/dist/actions/initDrawItem.js +63 -79
  96. package/dist/actions/initDrawItem.js.map +1 -0
  97. package/dist/actions/initFullScreen.d.ts +4 -0
  98. package/dist/actions/initFullScreen.d.ts.map +1 -0
  99. package/dist/actions/initFullScreen.js +32 -32
  100. package/dist/actions/initFullScreen.js.map +1 -0
  101. package/dist/actions/initLightBox.d.ts +4 -0
  102. package/dist/actions/initLightBox.d.ts.map +1 -0
  103. package/dist/actions/initLightBox.js +11 -12
  104. package/dist/actions/initLightBox.js.map +1 -0
  105. package/dist/actions/initMagnifier.d.ts +4 -0
  106. package/dist/actions/initMagnifier.d.ts.map +1 -0
  107. package/dist/actions/initMagnifier.js +42 -54
  108. package/dist/actions/initMagnifier.js.map +1 -0
  109. package/dist/actions/initNavigateWithKeys.d.ts +4 -0
  110. package/dist/actions/initNavigateWithKeys.d.ts.map +1 -0
  111. package/dist/actions/initNavigateWithKeys.js +18 -27
  112. package/dist/actions/initNavigateWithKeys.js.map +1 -0
  113. package/dist/actions/initOpen.d.ts +4 -0
  114. package/dist/actions/initOpen.d.ts.map +1 -0
  115. package/dist/actions/initOpen.js +27 -28
  116. package/dist/actions/initOpen.js.map +1 -0
  117. package/dist/actions/initWheel.d.ts +4 -0
  118. package/dist/actions/initWheel.d.ts.map +1 -0
  119. package/dist/actions/initWheel.js +27 -49
  120. package/dist/actions/initWheel.js.map +1 -0
  121. package/dist/actions/setStyles.d.ts +4 -0
  122. package/dist/actions/setStyles.d.ts.map +1 -0
  123. package/dist/actions/setStyles.js +23 -24
  124. package/dist/actions/setStyles.js.map +1 -0
  125. package/dist/components/GSZoom.d.ts +23 -0
  126. package/dist/components/GSZoom.d.ts.map +1 -0
  127. package/dist/components/GSZoom.js +122 -177
  128. package/dist/components/GSZoom.js.map +1 -0
  129. package/dist/components/styles/GSZoomCSS.d.ts +3 -0
  130. package/dist/components/styles/GSZoomCSS.d.ts.map +1 -0
  131. package/dist/components/styles/GSZoomCSS.js +238 -0
  132. package/dist/components/styles/GSZoomCSS.js.map +1 -0
  133. package/dist/constants/defaultParams.d.ts +4 -0
  134. package/dist/constants/defaultParams.d.ts.map +1 -0
  135. package/dist/constants/defaultParams.js +18 -19
  136. package/dist/constants/defaultParams.js.map +1 -0
  137. package/dist/constants/icons.d.ts +13 -0
  138. package/dist/constants/icons.d.ts.map +1 -0
  139. package/dist/constants/icons.js +16 -25
  140. package/dist/constants/icons.js.map +1 -0
  141. package/dist/constants/magnifierDefaultProps.d.ts +4 -0
  142. package/dist/constants/magnifierDefaultProps.d.ts.map +1 -0
  143. package/dist/constants/magnifierDefaultProps.js +7 -7
  144. package/dist/constants/magnifierDefaultProps.js.map +1 -0
  145. package/dist/constants/types.d.ts +6 -0
  146. package/dist/constants/types.d.ts.map +1 -0
  147. package/dist/constants/types.js +6 -6
  148. package/dist/constants/types.js.map +1 -0
  149. package/dist/helpers/uihelpers.d.ts +2 -0
  150. package/dist/helpers/uihelpers.d.ts.map +1 -0
  151. package/dist/helpers/uihelpers.js +8 -9
  152. package/dist/helpers/uihelpers.js.map +1 -0
  153. package/dist/types/params.d.ts +35 -0
  154. package/dist/types/params.d.ts.map +1 -0
  155. package/dist/types/params.js +2 -0
  156. package/dist/types/params.js.map +1 -0
  157. package/dist/types/ref.d.ts +23 -0
  158. package/dist/types/ref.d.ts.map +1 -0
  159. package/dist/types/ref.js +2 -0
  160. package/dist/types/ref.js.map +1 -0
  161. package/dist-js/bundle.js +1689 -0
  162. package/helpers/uihelpers.ts +7 -0
  163. package/package.json +74 -43
  164. package/styles/GSZoom.scss +252 -0
  165. package/types/global.d.ts +33 -0
  166. package/types/params.ts +36 -0
  167. package/types/ref.ts +23 -0
  168. package/dist/components/styles/GSZoom.css.map +0 -1
  169. package/index.js +0 -3
  170. /package/{dist → components/styles}/GSZoom.css +0 -0
  171. /package/{dist/components/styles → styles}/GSZoom.css +0 -0
@@ -1,27 +1,18 @@
1
- import initChange from "./initChange";
2
-
3
- const initNavigateWithKeys = (ref) => {
4
- const params = ref.currentParams;
5
-
6
- if (params.navigateWithKeys && ref.list.length > 1) {
7
- document.onkeyup = (e) => {
8
- let newIndex = 0;
9
- if (e.key === "ArrowRight") {
10
- if (ref.currentIndex < ref.list.length - 1) {
11
- newIndex = ref.currentIndex + 1;
12
- } else {
13
- newIndex = 0;
14
- }
15
- } else if (e.key === "ArrowLeft") {
16
- if (ref.currentIndex == 0) {
17
- newIndex = ref.list.length - 1;
18
- } else {
19
- newIndex = ref.currentIndex - 1;
20
- }
21
- }
22
- initChange(ref, newIndex);
23
- };
24
- }
25
- };
26
-
27
- export default initNavigateWithKeys;
1
+ import initChange from './initChange';
2
+ const initNavigateWithKeys = (ref) => {
3
+ const params = ref.currentParams;
4
+ if (params.navigateWithKeys && ref.list.length > 1) {
5
+ document.onkeyup = (e) => {
6
+ if (e.key === 'ArrowRight') {
7
+ const newIndex = ref.currentIndex < ref.list.length - 1 ? ref.currentIndex + 1 : 0;
8
+ initChange(ref, newIndex);
9
+ }
10
+ else if (e.key === 'ArrowLeft') {
11
+ const newIndex = ref.currentIndex === 0 ? ref.list.length - 1 : ref.currentIndex - 1;
12
+ initChange(ref, newIndex);
13
+ }
14
+ };
15
+ }
16
+ };
17
+ export default initNavigateWithKeys;
18
+ //# sourceMappingURL=initNavigateWithKeys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initNavigateWithKeys.js","sourceRoot":"","sources":["../../actions/initNavigateWithKeys.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,cAAc,CAAC;AAGtC,MAAM,oBAAoB,GAAG,CAAC,GAAQ,EAAQ,EAAE;IAC9C,MAAM,MAAM,GAAG,GAAG,CAAC,aAAa,CAAC;IAEjC,IAAI,MAAM,CAAC,gBAAgB,IAAI,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACnD,QAAQ,CAAC,OAAO,GAAG,CAAC,CAAgB,EAAE,EAAE;YACtC,IAAI,CAAC,CAAC,GAAG,KAAK,YAAY,EAAE,CAAC;gBAC3B,MAAM,QAAQ,GACZ,GAAG,CAAC,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACpE,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;YAC5B,CAAC;iBAAM,IAAI,CAAC,CAAC,GAAG,KAAK,WAAW,EAAE,CAAC;gBACjC,MAAM,QAAQ,GACZ,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,GAAG,CAAC,CAAC;gBACtE,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Ref } from '../types/ref';
2
+ declare const initOpen: (ref: Ref, index: number) => void;
3
+ export default initOpen;
4
+ //# sourceMappingURL=initOpen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initOpen.d.ts","sourceRoot":"","sources":["../../actions/initOpen.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,QAAA,MAAM,QAAQ,GAAI,KAAK,GAAG,EAAE,OAAO,MAAM,KAAG,IAiB3C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1,28 +1,27 @@
1
- import initActionEvents from "./initActionEvents";
2
- import initAdditionals from "./initAdditionals";
3
- import initArrows from "./initArrows";
4
- import initDraggle from "./initDraggle";
5
- import initDraw from "./initDraw";
6
- import { initFullScreen } from "./initFullScreen";
7
- import initNavigateWithKeys from "./initNavigateWithKeys";
8
-
9
- const initOpen = (ref, index) => {
10
- window.GSZoomConfigue.openedZoom = ref.currentParams.reference;
11
- if (typeof ref.currentParams.beforeLightBoxOpen === "function") {
12
- ref.currentParams.beforeLightBoxOpen();
13
- }
14
- ref.currentIndex = index;
15
- document.querySelector("html").classList.add("gs-zoom-opened");
16
- initDraw(ref);
17
- initAdditionals(ref);
18
- initFullScreen(ref);
19
- initNavigateWithKeys(ref);
20
- initArrows(ref);
21
- initActionEvents(ref);
22
- if (typeof ref.currentParams.afterLightBoxOpen === "function") {
23
- ref.currentParams.afterLightBoxOpen();
24
- }
25
- initDraggle(ref, index);
26
- };
27
-
28
- export default initOpen;
1
+ import initActionEvents from './initActionEvents';
2
+ import initAdditionals from './initAdditionals';
3
+ import initArrows from './initArrows';
4
+ import initDraggle from './initDraggle';
5
+ import initDraw from './initDraw';
6
+ import { initFullScreen } from './initFullScreen';
7
+ import initNavigateWithKeys from './initNavigateWithKeys';
8
+ const initOpen = (ref, index) => {
9
+ window.GSZoomConfigue.openedZoom = ref.currentParams.reference;
10
+ if (typeof ref.currentParams.beforeLightBoxOpen === 'function') {
11
+ ref.currentParams.beforeLightBoxOpen();
12
+ }
13
+ ref.currentIndex = index;
14
+ document.querySelector('html').classList.add('gs-zoom-opened');
15
+ initDraw(ref);
16
+ initAdditionals(ref);
17
+ initFullScreen(ref);
18
+ initNavigateWithKeys(ref);
19
+ initArrows(ref);
20
+ initActionEvents(ref);
21
+ if (typeof ref.currentParams.afterLightBoxOpen === 'function') {
22
+ ref.currentParams.afterLightBoxOpen();
23
+ }
24
+ initDraggle(ref, index);
25
+ };
26
+ export default initOpen;
27
+ //# sourceMappingURL=initOpen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initOpen.js","sourceRoot":"","sources":["../../actions/initOpen.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAG1D,MAAM,QAAQ,GAAG,CAAC,GAAQ,EAAE,KAAa,EAAQ,EAAE;IACjD,MAAM,CAAC,cAAe,CAAC,UAAU,GAAG,GAAG,CAAC,aAAa,CAAC,SAAS,CAAC;IAChE,IAAI,OAAO,GAAG,CAAC,aAAa,CAAC,kBAAkB,KAAK,UAAU,EAAE,CAAC;QAC/D,GAAG,CAAC,aAAa,CAAC,kBAAkB,EAAE,CAAC;IACzC,CAAC;IACD,GAAG,CAAC,YAAY,GAAG,KAAK,CAAC;IACzB,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAE,CAAC,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAChE,QAAQ,CAAC,GAAG,CAAC,CAAC;IACd,eAAe,CAAC,GAAG,CAAC,CAAC;IACrB,cAAc,CAAC,GAAG,CAAC,CAAC;IACpB,oBAAoB,CAAC,GAAG,CAAC,CAAC;IAC1B,UAAU,CAAC,GAAG,CAAC,CAAC;IAChB,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACtB,IAAI,OAAO,GAAG,CAAC,aAAa,CAAC,iBAAiB,KAAK,UAAU,EAAE,CAAC;QAC9D,GAAG,CAAC,aAAa,CAAC,iBAAiB,EAAE,CAAC;IACxC,CAAC;IACD,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AAC1B,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Ref } from '../types/ref';
2
+ declare const initWheel: (ref: Ref, index: number) => void;
3
+ export default initWheel;
4
+ //# sourceMappingURL=initWheel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initWheel.d.ts","sourceRoot":"","sources":["../../actions/initWheel.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,QAAA,MAAM,SAAS,GAAI,KAAK,GAAG,EAAE,OAAO,MAAM,KAAG,IAoC5C,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,49 +1,27 @@
1
- import getTranslateCoordToPoint from './getTranslateCoordToPoint';
2
- import initAdjust from './initAdjust';
3
- import setStyles from './setStyles';
4
-
5
- const initWheel = (ref, index) => {
6
- const params = ref.currentParams;
7
- const $container = ref.$container;
8
- const item = ref.$imgList.querySelector(
9
- `.gs-zoom-main-img[data-index='${index}']`,
10
- );
11
- if (item != null) {
12
- const $mainImg = item;
13
-
14
- if (params.zoomOnWheel) {
15
- $mainImg.addEventListener('wheel', function (e) {
16
- const $img = this.querySelector('.gs-zoom-img');
17
- const scale =
18
- $img.dataset.scale != undefined ? parseFloat($img.dataset.scale) : 1;
19
-
20
- const newScale =
21
- e.deltaY < 0 && scale < params.maxZoom
22
- ? Math.min(scale + 0.1, params.maxZoom)
23
- : e.deltaY > 0 && scale > 1
24
- ? Math.max(1, scale - 0.1)
25
- : scale;
26
-
27
- const [newTranslatex, newTranslatey] = getTranslateCoordToPoint(
28
- $img,
29
- $container,
30
- scale,
31
- newScale,
32
- e.pageX,
33
- e.pageY,
34
- );
35
-
36
- $img.dataset.scale = newScale;
37
- const transform = `scale(${newScale}) translate(${
38
- newTranslatex / newScale
39
- }px, ${newTranslatey / newScale}px)`;
40
- setStyles(ref, $img, {
41
- transform: transform,
42
- });
43
- initAdjust(ref, $container, $img, false);
44
- });
45
- }
46
- }
47
- };
48
-
49
- export default initWheel;
1
+ import getTranslateCoordToPoint from './getTranslateCoordToPoint';
2
+ import initAdjust from './initAdjust';
3
+ import setStyles from './setStyles';
4
+ const initWheel = (ref, index) => {
5
+ const params = ref.currentParams;
6
+ const $container = ref.$container;
7
+ const item = ref.$imgList.querySelector(`.gs-zoom-main-img[data-index='${index}']`);
8
+ if (item != null && params.zoomOnWheel) {
9
+ item.addEventListener('wheel', function (e) {
10
+ const $img = this.querySelector('.gs-zoom-img');
11
+ const scale = $img.dataset.scale !== undefined ? parseFloat($img.dataset.scale) : 1;
12
+ const newScale = e.deltaY < 0 && scale < params.maxZoom
13
+ ? Math.min(scale + 0.1, params.maxZoom)
14
+ : e.deltaY > 0 && scale > 1
15
+ ? Math.max(1, scale - 0.1)
16
+ : scale;
17
+ const [newTranslatex, newTranslatey] = getTranslateCoordToPoint($img, $container, scale, newScale, e.clientX, e.clientY);
18
+ $img.dataset.scale = String(newScale);
19
+ setStyles(ref, $img, {
20
+ transform: `scale(${newScale}) translate(${newTranslatex / newScale}px, ${newTranslatey / newScale}px)`,
21
+ });
22
+ initAdjust(ref, $container, $img, false);
23
+ });
24
+ }
25
+ };
26
+ export default initWheel;
27
+ //# sourceMappingURL=initWheel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initWheel.js","sourceRoot":"","sources":["../../actions/initWheel.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,SAAS,MAAM,aA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AAS,CAAC,GAAG,EAAE,IAAI,EAAE;gBACnB,SAAS,EAAE,SAAS,QAAQ,eAAe,aAAa,GAAG,QAAQ,OAAO,aAAa,GAAG,QAAQ,KAAK;aACxG,CAAC,CAAC;YACH,UAAU,CAAC,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Ref } from '../types/ref';
2
+ declare const setStyles: (ref: Ref, $img: HTMLElement, styles: Record<string, string>) => void;
3
+ export default setStyles;
4
+ //# sourceMappingURL=setStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setStyles.d.ts","sourceRoot":"","sources":["../../actions/setStyles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,QAAA,MAAM,SAAS,GAAI,KAAK,GAAG,EAAE,MAAM,WAAW,EAAE,QAAQ,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAG,IAsBhF,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,24 +1,23 @@
1
- import { stopAutoplay } from "./initAutoplay";
2
-
3
- const setStyles = (ref, $img, styles) => {
4
- const $container = ref.$container;
5
- for (var style in styles) {
6
- $img.style[style] = styles[style];
7
- }
8
- const scale =
9
- $img.dataset.tempscale != undefined
10
- ? $img.dataset.tempscale
11
- : $img.dataset.scale;
12
- if (scale == 1) {
13
- $container.classList.remove("gs-zoom-is-zoomed");
14
- ref.isZoomed = false;
15
- } else {
16
- $container.classList.add("gs-zoom-is-zoomed");
17
- ref.isZoomed = true;
18
- if (ref.autoplay != undefined) {
19
- stopAutoplay(ref);
20
- }
21
- }
22
- };
23
-
24
- export default setStyles;
1
+ import { stopAutoplay } from './initAutoplay';
2
+ const setStyles = (ref, $img, styles) => {
3
+ const $container = ref.$container;
4
+ for (const style in styles) {
5
+ $img.style[style] = styles[style];
6
+ }
7
+ const scale = $img.dataset.tempscale !== undefined
8
+ ? $img.dataset.tempscale
9
+ : $img.dataset.scale;
10
+ if (scale === undefined || parseFloat(scale) === 1) {
11
+ $container.classList.remove('gs-zoom-is-zoomed');
12
+ ref.isZoomed = false;
13
+ }
14
+ else {
15
+ $container.classList.add('gs-zoom-is-zoomed');
16
+ ref.isZoomed = true;
17
+ if (ref.autoplay !== undefined) {
18
+ stopAutoplay(ref);
19
+ }
20
+ }
21
+ };
22
+ export default setStyles;
23
+ //# sourceMappingURL=setStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setStyles.js","sourceRoot":"","sources":["../../actions/setStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,MAAM,SAAS,GAAG,CAAC,GAAQ,EAAE,IAAiB,EAAE,MAA8B,EAAQ,EAAE;IACtF,MAAM,UAAU,GAAG,GAAG,CAAC,UAAW,CAAC;IAEnC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC1B,IAAI,CAAC,KAAa,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,KAAK,GACT,IAAI,CAAC,OAAO,CAAC,SAAS,KAAK,SAAS;QAClC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS;QACxB,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;IAEzB,IAAI,KAAK,KAAK,SAAS,IAAI,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QACnD,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;QACjD,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC;IACvB,CAAC;SAAM,CAAC;QACN,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;QAC9C,GAAG,CAAC,QAAQ,GAAG,IAAI,CAAC;QACpB,IAAI,GAAG,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC/B,YAAY,CAAC,GAAG,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { Params } from '../types/params';
3
+ import { Ref } from '../types/ref';
4
+ declare global {
5
+ interface Window {
6
+ GSZoom: any;
7
+ GSZoomConfigue?: {
8
+ references: Array<{
9
+ key: string;
10
+ ref: Ref;
11
+ }>;
12
+ openedZoom: string | undefined;
13
+ instance: (ref: string) => Ref | undefined;
14
+ };
15
+ }
16
+ }
17
+ export interface GSZoomProps extends Params {
18
+ src?: string;
19
+ children?: React.ReactNode;
20
+ }
21
+ declare const GSZoom: React.FC<GSZoomProps>;
22
+ export default GSZoom;
23
+ //# sourceMappingURL=GSZoom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GSZoom.d.ts","sourceRoot":"","sources":["../../components/GSZoom.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAO3D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,GAAG,CAAC;QACZ,cAAc,CAAC,EAAE;YACf,UAAU,EAAE,KAAK,CAAC;gBAAE,GAAG,EAAE,MAAM,CAAC;gBAAC,GAAG,EAAE,GAAG,CAAA;aAAE,CAAC,CAAC;YAC7C,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;YAC/B,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,GAAG,GAAG,SAAS,CAAC;SAC5C,CAAC;KACH;CACF;AAED,MAAM,WAAW,WAAY,SAAQ,MAAM;IACzC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAmJjC,CAAC;AAIF,eAAe,MAAM,CAAC"}
@@ -1,177 +1,122 @@
1
- import { useEffect, useRef, useState } from 'react';
2
- import NewGuid from '../helpers/uihelpers';
3
- import getCurrentParams from '../actions/getCurrentParams';
4
- import initOpen from '../actions/initOpen';
5
- import initMagnifier from '../actions/initMagnifier';
6
- import types from '../constants/types';
7
- import PropTypes from 'prop-types';
8
- import '../GSZoom.css';
9
-
10
- const zoomParams = {
11
- reference: PropTypes.string,
12
- arrows: PropTypes.bool,
13
- navigateWithKeys: PropTypes.bool,
14
- showAdditionals: PropTypes.bool,
15
- zoomOnWheel: PropTypes.bool,
16
- maxZoom: PropTypes.number,
17
- disableFullScreen: PropTypes.bool,
18
- imgLoading: PropTypes.string,
19
- autoplaySpeed: PropTypes.number,
20
- mainImageQueryParameters: PropTypes.string,
21
- additionalImageQueryParameters: PropTypes.string,
22
- type: PropTypes.oneOf(['lightbox', 'magnifier']),
23
- };
24
-
25
- /**
26
- * GSZoom component to display a customizable zoom.
27
- *
28
- * @component
29
- * @param {Object} props - The props object.
30
- * @param {'lightbox' | 'magnifier'} props.type - Type of zoom effect.
31
- * @param {string} props.reference - Unique key for each slideshow.
32
- * @param {string} props.src - This is the src of image if src has value thet means component return just image.
33
- * @param {boolean} props.arrows - Allows to control arrows visiblity.
34
- * @param {boolean} props.navigateWithKeys - Enable or disable control via keys.
35
- * @param {number} props.magnifier.zoom - magnifier zoom size.
36
- * @param {'circle' | 'magnifier'} props.magnifier.form - showes magnifier form.
37
- * @param {number} props.magnifier.size - magnifier size.
38
- * @param {boolean} props.showAdditionals - Control additionla images visibility.
39
- * @param {boolean} props.zoomOnWheel - Control zoom via mousewheel.
40
- * @param {number} props.maxZoom - Shows zoom max percent.
41
- * @param {boolean} props.disableFullScreen - Control fullscreen accessibility.
42
- * @param {string} props.imgLoading - Allows to set custom loading.
43
- * @param {number} props.autoplaySpeed - Shows autoplay speed.
44
- * @param {string} props.mainImageQueryParameters - Additional query params for main image.
45
- * @param {string} props.additionalImageQueryParameters - Additional query params for additional images.
46
- * @param {Array<Object>} [props.responsive] - Array of responsive configurations based on window size.
47
- * @param {number} props.responsive[].windowSize - Minimum window size for this configuration.
48
- * @param {Object} props.responsive[].params - The responsive configuration for the zoom.
49
- * @returns {JSX.Element} The rendered zoom component.
50
- */
51
-
52
- const GSZoom = ({ children, ...rest }) => {
53
- const params = { ...rest };
54
- const [componentKey, setComponentKey] = useState(null);
55
- const [indexes, setIndexes] = useState([]);
56
- const zoomRef = useRef(null);
57
- const singleImageRef = useRef(null);
58
-
59
- useEffect(() => {
60
- if (componentKey != null) {
61
- if (typeof window.GSZoomConfigue === 'undefined') {
62
- window.GSZoomConfigue = {
63
- references: [],
64
- instance: ref => {
65
- if (ref != undefined && ref != '') {
66
- const instance = window.GSZoomConfigue.references.find(
67
- x => x.key === ref,
68
- );
69
- if (instance != undefined) {
70
- return instance.ref;
71
- }
72
- }
73
- },
74
- };
75
- }
76
- if (window.GSZoomConfigue.instance(componentKey) === undefined) {
77
- const currentParams = getCurrentParams(params);
78
- console.log('window.GSZoomConfigue', window.GSZoomConfigue);
79
- window.GSZoomConfigue.references.push({
80
- key: componentKey,
81
- ref: {
82
- list: [],
83
- currentParams,
84
- },
85
- });
86
- }
87
- const instance = window.GSZoomConfigue.instance(componentKey);
88
- if (params.src != undefined && params.src != null && params.src != '') {
89
- setIndexes([instance.list.length]);
90
- instance.list.push({
91
- src: params.src,
92
- index: instance.list.length,
93
- });
94
- if (singleImageRef != null) {
95
- if (instance.currentParams.type === types.lightbox) {
96
- singleImageRef.current.addEventListener('click', () => {
97
- initOpen(instance, +singleImageRef.current.dataset.index);
98
- });
99
- } else if (instance.currentParams.type === types.magnifier) {
100
- initMagnifier(instance, [singleImageRef.current]);
101
- }
102
- }
103
- } else {
104
- const images = zoomRef.current.querySelectorAll('img');
105
- const newList = [];
106
- [...images].map(img => {
107
- const index = instance.list.length;
108
- instance.list.push({
109
- src: img.src,
110
- index: index,
111
- });
112
- newList.push(index);
113
- img.dataset.index = index;
114
- if (instance.currentParams.type == types.lightbox) {
115
- img.addEventListener('click', () => {
116
- initOpen(instance, index);
117
- });
118
- }
119
- });
120
-
121
- if (instance.currentParams.type == types.magnifier) {
122
- initMagnifier(instance, [...images]);
123
- }
124
- setIndexes(newList);
125
- console.log(images);
126
- }
127
- }
128
- }, [componentKey]);
129
-
130
- useEffect(() => {
131
- console.log('start');
132
- setComponentKey(
133
- params.reference != undefined ? params.reference : NewGuid(),
134
- );
135
- }, []);
136
-
137
- useEffect(() => {
138
- if (indexes.length > 0) {
139
- return () => {
140
- if (window.GSZoomConfigue != undefined) {
141
- const instance = window.GSZoomConfigue.instance(componentKey);
142
- if (instance != undefined) {
143
- instance.list = instance.list.filter(
144
- x => !indexes.includes(x.index),
145
- );
146
- }
147
- }
148
- };
149
- }
150
- }, [indexes]);
151
-
152
- return (
153
- <>
154
- {params.src != undefined && params.src != null && params.src != '' ? (
155
- <img ref={singleImageRef} data-index={indexes[0]} {...rest} />
156
- ) : (
157
- <div className='gs-zoom-collection' ref={zoomRef}>
158
- {children}
159
- </div>
160
- )}
161
- </>
162
- );
163
- };
164
-
165
- GSZoom.propTypes = {
166
- ...zoomParams,
167
- responsive: PropTypes.arrayOf(
168
- PropTypes.shape({
169
- windowSize: PropTypes.number,
170
- params: PropTypes.shape({
171
- ...zoomParams,
172
- }),
173
- }),
174
- ),
175
- };
176
-
177
- export default GSZoom;
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useEffect, useRef, useState } from 'react';
3
+ import { NewGuid } from '../helpers/uihelpers';
4
+ import cssContent from './styles/GSZoomCSS';
5
+ import getCurrentParams from '../actions/getCurrentParams';
6
+ import initOpen from '../actions/initOpen';
7
+ import initMagnifier from '../actions/initMagnifier';
8
+ import types from '../constants/types';
9
+ const GSZoom = ({ children, ...rest }) => {
10
+ const params = { ...rest };
11
+ const [componentKey, setComponentKey] = useState(null);
12
+ const [indexes, setIndexes] = useState([]);
13
+ const zoomRef = useRef(null);
14
+ const singleImageRef = useRef(null);
15
+ useEffect(() => {
16
+ if (componentKey != null) {
17
+ // Initialise the global registry once
18
+ if (typeof window.GSZoomConfigue === 'undefined') {
19
+ window.GSZoomConfigue = {
20
+ references: [],
21
+ openedZoom: undefined,
22
+ instance: (ref) => {
23
+ if (ref != undefined && ref !== '') {
24
+ const instance = window.GSZoomConfigue.references.find((x) => x.key === ref);
25
+ if (instance != undefined) {
26
+ return instance.ref;
27
+ }
28
+ }
29
+ },
30
+ };
31
+ }
32
+ // Register this instance if it doesn't exist yet
33
+ if (window.GSZoomConfigue.instance(componentKey) === undefined) {
34
+ const currentParams = getCurrentParams(params);
35
+ window.GSZoomConfigue.references.push({
36
+ key: componentKey,
37
+ ref: {
38
+ list: [],
39
+ currentParams,
40
+ currentIndex: 0,
41
+ },
42
+ });
43
+ }
44
+ const instance = window.GSZoomConfigue.instance(componentKey);
45
+ // Inject styles once no external CSS import needed by the consumer
46
+ const styleId = 'gs-zoom-styles';
47
+ if (!document.getElementById(styleId)) {
48
+ const style = document.createElement('style');
49
+ style.id = styleId;
50
+ style.textContent = cssContent;
51
+ document.head.appendChild(style);
52
+ }
53
+ if (params.src != undefined && params.src !== '') {
54
+ // Single-image mode: render an <img> and register it
55
+ const idx = instance.list.length;
56
+ setIndexes([idx]);
57
+ // We push a placeholder first; once the ref is available (next effect tick)
58
+ // the actual element is in singleImageRef.current
59
+ if (singleImageRef.current != null) {
60
+ instance.list.push(singleImageRef.current);
61
+ if (instance.currentParams.type === types.lightbox) {
62
+ singleImageRef.current.addEventListener('click', () => {
63
+ initOpen(instance, +singleImageRef.current.dataset.index);
64
+ });
65
+ }
66
+ else if (instance.currentParams.type === types.magnifier) {
67
+ initMagnifier(instance, [singleImageRef.current]);
68
+ }
69
+ }
70
+ }
71
+ else {
72
+ // Collection mode: grab all <img> elements inside the wrapper
73
+ const images = [...zoomRef.current.querySelectorAll('img')];
74
+ const newIndexes = [];
75
+ images.forEach((img) => {
76
+ const idx = instance.list.length;
77
+ instance.list.push(img);
78
+ newIndexes.push(idx);
79
+ img.dataset.index = String(idx);
80
+ if (instance.currentParams.type === types.lightbox) {
81
+ img.addEventListener('click', () => {
82
+ initOpen(instance, idx);
83
+ });
84
+ }
85
+ });
86
+ if (instance.currentParams.type === types.magnifier) {
87
+ initMagnifier(instance, images);
88
+ }
89
+ setIndexes(newIndexes);
90
+ }
91
+ }
92
+ }, [componentKey]);
93
+ useEffect(() => {
94
+ setComponentKey(params.reference ?? NewGuid());
95
+ }, []);
96
+ // Cleanup: remove this component's images from the shared list on unmount
97
+ useEffect(() => {
98
+ if (indexes.length > 0) {
99
+ return () => {
100
+ if (window.GSZoomConfigue != undefined) {
101
+ const instance = window.GSZoomConfigue.instance(componentKey);
102
+ if (instance != undefined) {
103
+ instance.list = instance.list.filter((_, i) => !indexes.includes(i));
104
+ }
105
+ }
106
+ };
107
+ }
108
+ }, [indexes]);
109
+ // Strip GSZoom-specific props so they don't land on the DOM element
110
+ const domProps = Object.fromEntries(Object.entries(rest).filter(([key]) => ![
111
+ 'reference', 'arrows', 'navigateWithKeys', 'showAdditionals',
112
+ 'zoomOnWheel', 'maxZoom', 'type', 'mainImageQueryParameters',
113
+ 'additionalImageQueryParameters', 'disableFullScreen', 'imgLoading',
114
+ 'autoplaySpeed', 'magnifier', 'responsive', 'beforeInit', 'afterInit',
115
+ 'beforeLightBoxOpen', 'afterLightBoxOpen', 'beforeLightBoxClose',
116
+ 'afterLightBoxClose', 'afterChange',
117
+ ].includes(key)));
118
+ return (_jsx(_Fragment, { children: params.src != undefined && params.src !== '' ? (_jsx("img", { ref: singleImageRef, ...(indexes[0] !== undefined ? { 'data-index': indexes[0] } : {}), ...domProps, src: params.src })) : (_jsx("div", { className: "gs-zoom-collection", ref: zoomRef, children: children })) }));
119
+ };
120
+ GSZoom.displayName = 'GSZoom';
121
+ export default GSZoom;
122
+ //# sourceMappingURL=GSZoom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GSZoom.js","sourceRoot":"","sources":["../../components/GSZoom.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,UAAU,MAAM,oBAAoB,CAAC;AAC5C,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,aAAa,MAAM,0BAA0B,CAAC;AACrD,OAAO,KAAK,MAAM,oBAAoB,CAAC;AAoBvC,MAAM,MAAM,GAA0B,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IAC9D,MAAM,MAAM,GAAgB,EAAE,GAAG,IAAI,EAAE,CAAC;IACxC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IACtE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAW,EAAE,CAAC,CAAC;IACrD,MAAM,OAAO,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IACpD,MAAM,cAAc,GAAG,MAAM,CAA0B,IAAI,CAAC,CAAC;IAE7D,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,YAAY,IAAI,IAAI,EAAE,CAAC;YACzB,sCAAsC;YACtC,IAAI,OAAO,MAAM,CAAC,cAAc,KAAK,WAAW,EAAE,CAAC;gBACjD,MAAM,CAAC,cAAc,GAAG;oBACtB,UAAU,EAAE,EAAE;oBACd,UAAU,EAAE,SAAS;oBACrB,QAAQ,EAAE,CAAC,GAAW,EAAE,EAAE;wBACxB,IAAI,GAAG,IAAI,SAAS,IAAI,GA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