@get-set/gs-zoom 0.0.3 → 0.0.5

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 (166) hide show
  1. package/README.md +128 -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 +103 -0
  8. package/actions/initAdditionals.ts +94 -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 +260 -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 +169 -0
  26. package/{dist/components → components}/styles/GSZoom.scss +252 -254
  27. package/constants/defaultParams.ts +20 -0
  28. package/constants/icons.ts +25 -0
  29. package/constants/magnifierDefaultProps.ts +9 -0
  30. package/constants/types.ts +6 -0
  31. package/dist/GSZoom.d.ts +2 -0
  32. package/dist/actions/general.d.ts +7 -0
  33. package/dist/actions/general.d.ts.map +1 -0
  34. package/dist/actions/general.js +26 -30
  35. package/dist/actions/general.js.map +1 -0
  36. package/dist/actions/getAdjustTransform.d.ts +3 -0
  37. package/dist/actions/getAdjustTransform.d.ts.map +1 -0
  38. package/dist/actions/getAdjustTransform.js +41 -43
  39. package/dist/actions/getAdjustTransform.js.map +1 -0
  40. package/dist/actions/getCurrentParams.d.ts +4 -0
  41. package/dist/actions/getCurrentParams.d.ts.map +1 -0
  42. package/dist/actions/getCurrentParams.js +35 -42
  43. package/dist/actions/getCurrentParams.js.map +1 -0
  44. package/dist/actions/getTranslateCoordToPoint.d.ts +3 -0
  45. package/dist/actions/getTranslateCoordToPoint.d.ts.map +1 -0
  46. package/dist/actions/getTranslateCoordToPoint.js +21 -41
  47. package/dist/actions/getTranslateCoordToPoint.js.map +1 -0
  48. package/dist/actions/init.d.ts +4 -0
  49. package/dist/actions/init.d.ts.map +1 -0
  50. package/dist/actions/init.js +21 -21
  51. package/dist/actions/init.js.map +1 -0
  52. package/dist/actions/initActionEvents.d.ts +4 -0
  53. package/dist/actions/initActionEvents.d.ts.map +1 -0
  54. package/dist/actions/initActionEvents.js +80 -127
  55. package/dist/actions/initActionEvents.js.map +1 -0
  56. package/dist/actions/initAdditionals.d.ts +4 -0
  57. package/dist/actions/initAdditionals.d.ts.map +1 -0
  58. package/dist/actions/initAdditionals.js +81 -117
  59. package/dist/actions/initAdditionals.js.map +1 -0
  60. package/dist/actions/initAdjust.d.ts +4 -0
  61. package/dist/actions/initAdjust.d.ts.map +1 -0
  62. package/dist/actions/initAdjust.js +96 -107
  63. package/dist/actions/initAdjust.js.map +1 -0
  64. package/dist/actions/initAdjustAdditionalActive.d.ts +4 -0
  65. package/dist/actions/initAdjustAdditionalActive.d.ts.map +1 -0
  66. package/dist/actions/initAdjustAdditionalActive.js +25 -33
  67. package/dist/actions/initAdjustAdditionalActive.js.map +1 -0
  68. package/dist/actions/initArrows.d.ts +4 -0
  69. package/dist/actions/initArrows.d.ts.map +1 -0
  70. package/dist/actions/initArrows.js +28 -44
  71. package/dist/actions/initArrows.js.map +1 -0
  72. package/dist/actions/initAutoplay.d.ts +6 -0
  73. package/dist/actions/initAutoplay.d.ts.map +1 -0
  74. package/dist/actions/initAutoplay.js +85 -81
  75. package/dist/actions/initAutoplay.js.map +1 -0
  76. package/dist/actions/initChange.d.ts +4 -0
  77. package/dist/actions/initChange.d.ts.map +1 -0
  78. package/dist/actions/initChange.js +116 -137
  79. package/dist/actions/initChange.js.map +1 -0
  80. package/dist/actions/initClose.d.ts +3 -0
  81. package/dist/actions/initClose.d.ts.map +1 -0
  82. package/dist/actions/initClose.js +24 -28
  83. package/dist/actions/initClose.js.map +1 -0
  84. package/dist/actions/initDraggle.d.ts +4 -0
  85. package/dist/actions/initDraggle.d.ts.map +1 -0
  86. package/dist/actions/initDraggle.js +229 -303
  87. package/dist/actions/initDraggle.js.map +1 -0
  88. package/dist/actions/initDraw.d.ts +4 -0
  89. package/dist/actions/initDraw.d.ts.map +1 -0
  90. package/dist/actions/initDraw.js +74 -90
  91. package/dist/actions/initDraw.js.map +1 -0
  92. package/dist/actions/initDrawItem.d.ts +4 -0
  93. package/dist/actions/initDrawItem.d.ts.map +1 -0
  94. package/dist/actions/initDrawItem.js +63 -79
  95. package/dist/actions/initDrawItem.js.map +1 -0
  96. package/dist/actions/initFullScreen.d.ts +4 -0
  97. package/dist/actions/initFullScreen.d.ts.map +1 -0
  98. package/dist/actions/initFullScreen.js +32 -32
  99. package/dist/actions/initFullScreen.js.map +1 -0
  100. package/dist/actions/initLightBox.d.ts +4 -0
  101. package/dist/actions/initLightBox.d.ts.map +1 -0
  102. package/dist/actions/initLightBox.js +11 -12
  103. package/dist/actions/initLightBox.js.map +1 -0
  104. package/dist/actions/initMagnifier.d.ts +4 -0
  105. package/dist/actions/initMagnifier.d.ts.map +1 -0
  106. package/dist/actions/initMagnifier.js +42 -54
  107. package/dist/actions/initMagnifier.js.map +1 -0
  108. package/dist/actions/initNavigateWithKeys.d.ts +4 -0
  109. package/dist/actions/initNavigateWithKeys.d.ts.map +1 -0
  110. package/dist/actions/initNavigateWithKeys.js +18 -27
  111. package/dist/actions/initNavigateWithKeys.js.map +1 -0
  112. package/dist/actions/initOpen.d.ts +4 -0
  113. package/dist/actions/initOpen.d.ts.map +1 -0
  114. package/dist/actions/initOpen.js +27 -28
  115. package/dist/actions/initOpen.js.map +1 -0
  116. package/dist/actions/initWheel.d.ts +4 -0
  117. package/dist/actions/initWheel.d.ts.map +1 -0
  118. package/dist/actions/initWheel.js +27 -49
  119. package/dist/actions/initWheel.js.map +1 -0
  120. package/dist/actions/setStyles.d.ts +4 -0
  121. package/dist/actions/setStyles.d.ts.map +1 -0
  122. package/dist/actions/setStyles.js +23 -24
  123. package/dist/actions/setStyles.js.map +1 -0
  124. package/dist/components/GSZoom.d.ts +23 -0
  125. package/dist/components/GSZoom.d.ts.map +1 -0
  126. package/dist/components/GSZoom.js +114 -177
  127. package/dist/components/GSZoom.js.map +1 -0
  128. package/dist/constants/defaultParams.d.ts +4 -0
  129. package/dist/constants/defaultParams.d.ts.map +1 -0
  130. package/dist/constants/defaultParams.js +18 -19
  131. package/dist/constants/defaultParams.js.map +1 -0
  132. package/dist/constants/icons.d.ts +13 -0
  133. package/dist/constants/icons.d.ts.map +1 -0
  134. package/dist/constants/icons.js +16 -23
  135. package/dist/constants/icons.js.map +1 -0
  136. package/dist/constants/magnifierDefaultProps.d.ts +4 -0
  137. package/dist/constants/magnifierDefaultProps.d.ts.map +1 -0
  138. package/dist/constants/magnifierDefaultProps.js +7 -7
  139. package/dist/constants/magnifierDefaultProps.js.map +1 -0
  140. package/dist/constants/types.d.ts +6 -0
  141. package/dist/constants/types.d.ts.map +1 -0
  142. package/dist/constants/types.js +6 -6
  143. package/dist/constants/types.js.map +1 -0
  144. package/dist/helpers/uihelpers.d.ts +2 -0
  145. package/dist/helpers/uihelpers.d.ts.map +1 -0
  146. package/dist/helpers/uihelpers.js +8 -9
  147. package/dist/helpers/uihelpers.js.map +1 -0
  148. package/dist/types/params.d.ts +35 -0
  149. package/dist/types/params.d.ts.map +1 -0
  150. package/dist/types/params.js +2 -0
  151. package/dist/types/params.js.map +1 -0
  152. package/dist/types/ref.d.ts +24 -0
  153. package/dist/types/ref.d.ts.map +1 -0
  154. package/dist/types/ref.js +2 -0
  155. package/dist/types/ref.js.map +1 -0
  156. package/dist-js/bundle.js +1695 -0
  157. package/helpers/uihelpers.ts +7 -0
  158. package/package.json +74 -43
  159. package/styles/GSZoom.scss +252 -0
  160. package/types/global.d.ts +34 -0
  161. package/types/params.ts +36 -0
  162. package/types/ref.ts +24 -0
  163. package/dist/components/styles/GSZoom.css.map +0 -1
  164. package/index.js +0 -3
  165. /package/{dist → components/styles}/GSZoom.css +0 -0
  166. /package/{dist/components/styles → styles}/GSZoom.css +0 -0
@@ -1,254 +1,252 @@
1
- html.gs-zoom-opened {
2
- overflow: hidden !important;
3
- touch-action: pan-x pan-y;
4
- body {
5
- touch-action: pan-x pan-y;
6
- }
7
- }
8
- .gs-zoom-magnifier-instance {
9
- &:hover {
10
- cursor: none;
11
- }
12
- }
13
- .gs-zoom-magnifier {
14
- pointer-events: none;
15
- position: fixed;
16
- z-index: 9999;
17
- border: 4px solid #fff;
18
- aspect-ratio: 1;
19
- overflow: hidden;
20
- &[data-type="circle"] {
21
- border-radius: 50%;
22
- }
23
- img {
24
- position: absolute;
25
- transform-origin: top left;
26
- max-width: unset !important;
27
- }
28
- }
29
- .gs-zoom-container {
30
- position: fixed;
31
- z-index: 9999999999;
32
- width: 100vw;
33
- height: 100dvh;
34
- top: 0;
35
- left: 0;
36
- overflow: hidden;
37
- backdrop-filter: blur(50px);
38
-
39
- .gs-zoom-autoplayline {
40
- position: fixed;
41
- height: 4px;
42
- top: 0;
43
- left: 0;
44
- z-index: 999;
45
- background-color: red;
46
- }
47
- button {
48
- cursor: pointer;
49
- outline: none !important;
50
- }
51
- * {
52
- -webkit-user-drag: none;
53
- -moz-user-select: none;
54
- -webkit-user-select: none;
55
- -ms-user-select: none;
56
- user-select: none;
57
- }
58
- .gs-zoom-header {
59
- position: fixed;
60
- right: 10px;
61
- top: 10px;
62
- //width: 100%;
63
- display: flex;
64
- justify-content: flex-end;
65
- align-items: center;
66
- z-index: 99;
67
-
68
- .gs-zoom-actions {
69
- display: flex;
70
- align-items: center;
71
- .gs-zoom-action {
72
- width: 40px;
73
- height: 40px;
74
- background-color: rgba(35, 35, 35, 0.65);
75
- display: flex;
76
- align-items: center;
77
- justify-content: center;
78
- border: none;
79
-
80
- svg {
81
- fill: #fff;
82
- width: 18px;
83
- }
84
- }
85
- }
86
- }
87
- .gs-zoom-img-list {
88
- position: relative;
89
- z-index: 2;
90
- display: flex;
91
- width: max-content;
92
- .gs-zoom-main-img {
93
- width: 100vw;
94
- height: 100dvh;
95
- display: flex;
96
- align-items: center;
97
- justify-content: center;
98
- position: relative;
99
- overflow: hidden;
100
-
101
- .gs-zoom-img-touch {
102
- position: absolute;
103
- top: 0;
104
- left: 0;
105
- right: 0;
106
- bottom: 0;
107
- z-index: 2;
108
- }
109
-
110
- .gz-zoom-loading-container {
111
- display: none;
112
- position: absolute;
113
- top: 50%;
114
- left: 50%;
115
- transform: translate(-50%, -50%);
116
- }
117
- .gs-zoom-img {
118
- max-width: 100%;
119
- max-height: 100%;
120
- //transition: 0.15s;
121
- &.gs-zoom-is-adjusting {
122
- transition: 0.4s ease-in-out !important;
123
- }
124
- }
125
- &.gz-zoom-is-loading {
126
- .gz-zoom-loading-container {
127
- display: block;
128
- }
129
- .gs-zoom-img {
130
- visibility: hidden;
131
- }
132
- }
133
- .gs-zoom-info-data {
134
- position: absolute;
135
- left: 0;
136
- bottom: 0;
137
- right: 0;
138
- padding: 20px 20px 90px;
139
- display: flex;
140
- flex-direction: column;
141
- align-items: center;
142
- color: #fff;
143
- background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
144
- }
145
- }
146
- }
147
- .gs-zoom-additionals {
148
- position: fixed;
149
- bottom: 0;
150
- left: 0;
151
- width: 100%;
152
- overflow-x: hidden;
153
- padding: 5px 0;
154
- display: flex;
155
- justify-content: center;
156
- background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
157
- transform-origin: bottom;
158
- .gs-add-list-container {
159
- overflow-x: hidden;
160
- max-width: 100%;
161
- .gs-add-list {
162
- display: flex;
163
- gap: 5px;
164
- width: max-content;
165
- justify-content: center;
166
- flex-wrap: nowrap;
167
-
168
- .gs-add-item {
169
- width: 80px;
170
- aspect-ratio: 1;
171
- display: flex;
172
- align-items: center;
173
- justify-content: center;
174
- border: 1px solid #000;
175
- opacity: 0.5;
176
- transition: 0.2s ease-out;
177
- transform: scale(0.8);
178
- cursor: pointer;
179
- &:hover,
180
- &.active {
181
- transform: scale(1);
182
- opacity: 1;
183
- }
184
- img {
185
- max-width: 100%;
186
- max-height: 100%;
187
- }
188
- }
189
- }
190
- }
191
- &.gs-zoom-hidden {
192
- z-index: 1;
193
- opacity: 0;
194
- .gs-add-list {
195
- transform: scale(0.9);
196
- }
197
- }
198
- }
199
- &:not(.gs-additional-isdragging) {
200
- .gs-zoom-additionals {
201
- .gs-add-list-container {
202
- .gs-add-list {
203
- transition: 0.3s transform ease-in-out;
204
- }
205
- }
206
- }
207
- }
208
- .gs-zoom-navigations {
209
- button {
210
- border: none;
211
- position: fixed;
212
- top: 50%;
213
- width: 50px;
214
- background-color: rgba(35, 35, 35, 0.65);
215
- aspect-ratio: 1;
216
- display: inline-flex;
217
- align-items: center;
218
- justify-content: center;
219
- font-size: 28px;
220
- color: #fff;
221
- transform: translateY(-50%);
222
-
223
- svg {
224
- fill: #fff;
225
- width: 18px;
226
- }
227
- }
228
- .gs-zoom-next {
229
- right: 10px;
230
- }
231
- .gs-zoom-prev {
232
- left: 10px;
233
- }
234
- }
235
- .gs-zoom-hide-inzoomed {
236
- z-index: 3;
237
- opacity: 1;
238
- transform: scale(1);
239
- transition: 0.3s ease-in-out;
240
- }
241
- &.gs-zoom-is-zoomed {
242
- .gs-zoom-hide-inzoomed {
243
- z-index: 1;
244
- opacity: 0;
245
- transform: scale(0.9);
246
- &.gs-zoom-additionals {
247
- transform: scale(1);
248
- .gs-add-list {
249
- transform: scale(0.9);
250
- }
251
- }
252
- }
253
- }
254
- }
1
+ html.gs-zoom-opened {
2
+ overflow: hidden !important;
3
+ touch-action: pan-x pan-y;
4
+ body {
5
+ touch-action: pan-x pan-y;
6
+ }
7
+ }
8
+ .gs-zoom-magnifier-instance {
9
+ &:hover {
10
+ cursor: none;
11
+ }
12
+ }
13
+ .gs-zoom-magnifier {
14
+ pointer-events: none;
15
+ position: fixed;
16
+ z-index: 9999;
17
+ border: 4px solid #fff;
18
+ aspect-ratio: 1;
19
+ overflow: hidden;
20
+ &[data-type="circle"] {
21
+ border-radius: 50%;
22
+ }
23
+ img {
24
+ position: absolute;
25
+ transform-origin: top left;
26
+ max-width: unset !important;
27
+ }
28
+ }
29
+ .gs-zoom-container {
30
+ position: fixed;
31
+ z-index: 9999999999;
32
+ width: 100vw;
33
+ height: 100dvh;
34
+ top: 0;
35
+ left: 0;
36
+ overflow: hidden;
37
+ backdrop-filter: blur(50px);
38
+
39
+ .gs-zoom-autoplayline {
40
+ position: fixed;
41
+ height: 4px;
42
+ top: 0;
43
+ left: 0;
44
+ z-index: 999;
45
+ background-color: red;
46
+ }
47
+ button {
48
+ cursor: pointer;
49
+ outline: none !important;
50
+ }
51
+ * {
52
+ -webkit-user-drag: none;
53
+ -moz-user-select: none;
54
+ -webkit-user-select: none;
55
+ -ms-user-select: none;
56
+ user-select: none;
57
+ }
58
+ .gs-zoom-header {
59
+ position: fixed;
60
+ right: 10px;
61
+ top: 10px;
62
+ display: flex;
63
+ justify-content: flex-end;
64
+ align-items: center;
65
+ z-index: 99;
66
+
67
+ .gs-zoom-actions {
68
+ display: flex;
69
+ align-items: center;
70
+ .gs-zoom-action {
71
+ width: 40px;
72
+ height: 40px;
73
+ background-color: rgba(35, 35, 35, 0.65);
74
+ display: flex;
75
+ align-items: center;
76
+ justify-content: center;
77
+ border: none;
78
+
79
+ svg {
80
+ fill: #fff;
81
+ width: 18px;
82
+ }
83
+ }
84
+ }
85
+ }
86
+ .gs-zoom-img-list {
87
+ position: relative;
88
+ z-index: 2;
89
+ display: flex;
90
+ width: max-content;
91
+ .gs-zoom-main-img {
92
+ width: 100vw;
93
+ height: 100dvh;
94
+ display: flex;
95
+ align-items: center;
96
+ justify-content: center;
97
+ position: relative;
98
+ overflow: hidden;
99
+
100
+ .gs-zoom-img-touch {
101
+ position: absolute;
102
+ top: 0;
103
+ left: 0;
104
+ right: 0;
105
+ bottom: 0;
106
+ z-index: 2;
107
+ }
108
+
109
+ .gz-zoom-loading-container {
110
+ display: none;
111
+ position: absolute;
112
+ top: 50%;
113
+ left: 50%;
114
+ transform: translate(-50%, -50%);
115
+ }
116
+ .gs-zoom-img {
117
+ max-width: 100%;
118
+ max-height: 100%;
119
+ &.gs-zoom-is-adjusting {
120
+ transition: 0.4s ease-in-out !important;
121
+ }
122
+ }
123
+ &.gz-zoom-is-loading {
124
+ .gz-zoom-loading-container {
125
+ display: block;
126
+ }
127
+ .gs-zoom-img {
128
+ visibility: hidden;
129
+ }
130
+ }
131
+ .gs-zoom-info-data {
132
+ position: absolute;
133
+ left: 0;
134
+ bottom: 0;
135
+ right: 0;
136
+ padding: 20px 20px 90px;
137
+ display: flex;
138
+ flex-direction: column;
139
+ align-items: center;
140
+ color: #fff;
141
+ background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
142
+ }
143
+ }
144
+ }
145
+ .gs-zoom-additionals {
146
+ position: fixed;
147
+ bottom: 0;
148
+ left: 0;
149
+ width: 100%;
150
+ overflow-x: hidden;
151
+ padding: 5px 0;
152
+ display: flex;
153
+ justify-content: center;
154
+ background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
155
+ transform-origin: bottom;
156
+ .gs-add-list-container {
157
+ overflow-x: hidden;
158
+ max-width: 100%;
159
+ .gs-add-list {
160
+ display: flex;
161
+ gap: 5px;
162
+ width: max-content;
163
+ justify-content: center;
164
+ flex-wrap: nowrap;
165
+
166
+ .gs-add-item {
167
+ width: 80px;
168
+ aspect-ratio: 1;
169
+ display: flex;
170
+ align-items: center;
171
+ justify-content: center;
172
+ border: 1px solid #000;
173
+ opacity: 0.5;
174
+ transition: 0.2s ease-out;
175
+ transform: scale(0.8);
176
+ cursor: pointer;
177
+ &:hover,
178
+ &.active {
179
+ transform: scale(1);
180
+ opacity: 1;
181
+ }
182
+ img {
183
+ max-width: 100%;
184
+ max-height: 100%;
185
+ }
186
+ }
187
+ }
188
+ }
189
+ &.gs-zoom-hidden {
190
+ z-index: 1;
191
+ opacity: 0;
192
+ .gs-add-list {
193
+ transform: scale(0.9);
194
+ }
195
+ }
196
+ }
197
+ &:not(.gs-additional-isdragging) {
198
+ .gs-zoom-additionals {
199
+ .gs-add-list-container {
200
+ .gs-add-list {
201
+ transition: 0.3s transform ease-in-out;
202
+ }
203
+ }
204
+ }
205
+ }
206
+ .gs-zoom-navigations {
207
+ button {
208
+ border: none;
209
+ position: fixed;
210
+ top: 50%;
211
+ width: 50px;
212
+ background-color: rgba(35, 35, 35, 0.65);
213
+ aspect-ratio: 1;
214
+ display: inline-flex;
215
+ align-items: center;
216
+ justify-content: center;
217
+ font-size: 28px;
218
+ color: #fff;
219
+ transform: translateY(-50%);
220
+
221
+ svg {
222
+ fill: #fff;
223
+ width: 18px;
224
+ }
225
+ }
226
+ .gs-zoom-next {
227
+ right: 10px;
228
+ }
229
+ .gs-zoom-prev {
230
+ left: 10px;
231
+ }
232
+ }
233
+ .gs-zoom-hide-inzoomed {
234
+ z-index: 3;
235
+ opacity: 1;
236
+ transform: scale(1);
237
+ transition: 0.3s ease-in-out;
238
+ }
239
+ &.gs-zoom-is-zoomed {
240
+ .gs-zoom-hide-inzoomed {
241
+ z-index: 1;
242
+ opacity: 0;
243
+ transform: scale(0.9);
244
+ &.gs-zoom-additionals {
245
+ transform: scale(1);
246
+ .gs-add-list {
247
+ transform: scale(0.9);
248
+ }
249
+ }
250
+ }
251
+ }
252
+ }
@@ -0,0 +1,20 @@
1
+ import types from './types';
2
+ import { Params } from '../types/params';
3
+
4
+ const defaultParams: Params = {
5
+ reference: '',
6
+ arrows: true,
7
+ navigateWithKeys: true,
8
+ showAdditionals: true,
9
+ zoomOnWheel: true,
10
+ maxZoom: 5,
11
+ type: types.lightbox,
12
+ mainImageQueryParameters: '',
13
+ additionalImageQueryParameters: '',
14
+ disableFullScreen: false,
15
+ imgLoading: '',
16
+ autoplaySpeed: 5000,
17
+ responsive: [],
18
+ };
19
+
20
+ export default Object.freeze(defaultParams);
@@ -0,0 +1,25 @@
1
+ const icons = {
2
+ // zoomIn: '<svg width="20px" height="20px" viewBox="0 -0.5 21 21" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Dribbble-Light-Preview" class="btn-icon btn-icon-plus" transform="translate(-379.000000, -240.000000)" fill="none"><g id="icons" transform="translate(56.000000, 160.000000)"><polygon id="plus-[#1512]" points="344 89 344 91 334.55 91 334.55 100 332.45 100 332.45 91 323 91 323 89 332.45 89 332.45 80 334.55 80 334.55 89"></polygon></g></g></g></svg>',
3
+ loading:
4
+ '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 150"><path fill="none" stroke="#000000" stroke-width="15" stroke-linecap="round" stroke-dasharray="300 385" stroke-dashoffset="0" d="M275 75c0 31-27 50-50 50-58 0-92-100-150-100-28 0-50 22-50 50s23 50 50 50c58 0 92-100 150-100 24 0 50 19 50 50Z"><animate attributeName="stroke-dashoffset" calcMode="spline" dur="2" values="685;-685" keySplines="0 0 1 1" repeatCount="indefinite"></animate></path></svg>',
5
+ zoomIn:
6
+ '<svg width="20px" height="20px" viewBox="0 0 30 30"><path class="fslightbox-svg-path" d="M 13 3 C 7.4889971 3 3 7.4889971 3 13 C 3 18.511003 7.4889971 23 13 23 C 15.396508 23 17.597385 22.148986 19.322266 20.736328 L 25.292969 26.707031 A 1.0001 1.0001 0 1 0 26.707031 25.292969 L 20.736328 19.322266 C 22.148986 17.597385 23 15.396508 23 13 C 23 7.4889971 18.511003 3 13 3 z M 13 5 C 17.430123 5 21 8.5698774 21 13 C 21 17.430123 17.430123 21 13 21 C 8.5698774 21 5 17.430123 5 13 C 5 8.5698774 8.5698774 5 13 5 z M 12.984375 7.9863281 A 1.0001 1.0001 0 0 0 12 9 L 12 12 L 9 12 A 1.0001 1.0001 0 1 0 9 14 L 12 14 L 12 17 A 1.0001 1.0001 0 1 0 14 17 L 14 14 L 17 14 A 1.0001 1.0001 0 1 0 17 12 L 14 12 L 14 9 A 1.0001 1.0001 0 0 0 12.984375 7.9863281 z"></path></svg>',
7
+ //zoomOut: '<svg width="20px" height="20px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path class="btn-icon btn-icon-minus" d="M2 12C2 11.4477 2.44772 11 3 11H21C21.5523 11 22 11.4477 22 12C22 12.5523 21.5523 13 21 13H3C2.44772 13 2 12.5523 2 12Z" fill="none"></path></svg>',
8
+ zoomOut:
9
+ '<svg width="20px" height="20px" viewBox="0 0 30 30"><path class="fslightbox-svg-path" d="M 13 3 C 7.4889971 3 3 7.4889971 3 13 C 3 18.511003 7.4889971 23 13 23 C 15.396508 23 17.597385 22.148986 19.322266 20.736328 L 25.292969 26.707031 A 1.0001 1.0001 0 1 0 26.707031 25.292969 L 20.736328 19.322266 C 22.148986 17.597385 23 15.396508 23 13 C 23 7.4889971 18.511003 3 13 3 z M 13 5 C 17.430123 5 21 8.5698774 21 13 C 21 17.430123 17.430123 21 13 21 C 8.5698774 21 5 17.430123 5 13 C 5 8.5698774 8.5698774 5 13 5 z M 9 12 A 1.0001 1.0001 0 1 0 9 14 L 17 14 A 1.0001 1.0001 0 1 0 17 12 L 9 12 z"></path></svg>',
10
+ //close: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20px" height="20px" viewBox="0 -0.5 21 21" version="1.1"><g fill="none" fill-rule="evenodd"><g transform="translate(-419.000000, -240.000000)" class="btn-icon btn-icon-close"><g transform="translate(56.000000, 160.000000)"><polygon points="375.0183 90 384 98.554 382.48065 100 373.5 91.446 364.5183 100 363 98.554 371.98065 90 363 81.446 364.5183 80 373.5 88.554 382.48065 80 384 81.446"></polygon></g></g></g></svg>',
11
+ close:
12
+ '<svg width="20px" height="20px" viewBox="0 0 24 24"><path class="fslightbox-svg-path" d="M 4.7070312 3.2929688 L 3.2929688 4.7070312 L 10.585938 12 L 3.2929688 19.292969 L 4.7070312 20.707031 L 12 13.414062 L 19.292969 20.707031 L 20.707031 19.292969 L 13.414062 12 L 20.707031 4.7070312 L 19.292969 3.2929688 L 12 10.585938 L 4.7070312 3.2929688 z"></path></svg>',
13
+ autoplay:
14
+ '<svg width="16px" height="16px" viewBox="0 0 30 30"><path class="fslightbox-svg-path" d="M 6 3 A 1 1 0 0 0 5 4 A 1 1 0 0 0 5 4.0039062 L 5 15 L 5 25.996094 A 1 1 0 0 0 5 26 A 1 1 0 0 0 6 27 A 1 1 0 0 0 6.5800781 26.8125 L 6.5820312 26.814453 L 26.416016 15.908203 A 1 1 0 0 0 27 15 A 1 1 0 0 0 26.388672 14.078125 L 6.5820312 3.1855469 L 6.5800781 3.1855469 A 1 1 0 0 0 6 3 z"></path></svg>',
15
+ autoplayPause:
16
+ '<svg width="14px" height="14px" viewBox="0 0 356.19 356.19"><path class="fslightbox-svg-path" d="M121,0c18,0,33,15,33,33v372c0,18-15,33-33,33s-32-15-32-33V33C89,15,103,0,121,0zM317,0c18,0,32,15,32,33v372c0,18-14,33-32,33s-33-15-33-33V33C284,15,299,0,317,0z"></path></svg>',
17
+ arrPrev:
18
+ '<svg width="20px" height="20px" viewBox="0 0 20 20"><path class="fslightbox-svg-path" d="M18.271,9.212H3.615l4.184-4.184c0.306-0.306,0.306-0.801,0-1.107c-0.306-0.306-0.801-0.306-1.107,0L1.21,9.403C1.194,9.417,1.174,9.421,1.158,9.437c-0.181,0.181-0.242,0.425-0.209,0.66c0.005,0.038,0.012,0.071,0.022,0.109c0.028,0.098,0.075,0.188,0.142,0.271c0.021,0.026,0.021,0.061,0.045,0.085c0.015,0.016,0.034,0.02,0.05,0.033l5.484,5.483c0.306,0.307,0.801,0.307,1.107,0c0.306-0.305,0.306-0.801,0-1.105l-4.184-4.185h14.656c0.436,0,0.788-0.353,0.788-0.788S18.707,9.212,18.271,9.212z"></path></svg>',
19
+ arrNext:
20
+ '<svg width="20px" height="20px" viewBox="0 0 20 20"><path class="fslightbox-svg-path" d="M1.729,9.212h14.656l-4.184-4.184c-0.307-0.306-0.307-0.801,0-1.107c0.305-0.306,0.801-0.306,1.106,0l5.481,5.482c0.018,0.014,0.037,0.019,0.053,0.034c0.181,0.181,0.242,0.425,0.209,0.66c-0.004,0.038-0.012,0.071-0.021,0.109c-0.028,0.098-0.075,0.188-0.143,0.271c-0.021,0.026-0.021,0.061-0.045,0.085c-0.015,0.016-0.034,0.02-0.051,0.033l-5.483,5.483c-0.306,0.307-0.802,0.307-1.106,0c-0.307-0.305-0.307-0.801,0-1.105l4.184-4.185H1.729c-0.436,0-0.788-0.353-0.788-0.788S1.293,9.212,1.729,9.212z"></path></svg>',
21
+ toggleadditionals:
22
+ '<svg width="17px" height="17px" viewBox="0 0 22 22"><path class="fslightbox-svg-path" d="M 3 2 C 2.448 2 2 2.448 2 3 L 2 6 C 2 6.552 2.448 7 3 7 L 6 7 C 6.552 7 7 6.552 7 6 L 7 3 C 7 2.448 6.552 2 6 2 L 3 2 z M 10 2 C 9.448 2 9 2.448 9 3 L 9 6 C 9 6.552 9.448 7 10 7 L 13 7 C 13.552 7 14 6.552 14 6 L 14 3 C 14 2.448 13.552 2 13 2 L 10 2 z M 17 2 C 16.448 2 16 2.448 16 3 L 16 6 C 16 6.552 16.448 7 17 7 L 20 7 C 20.552 7 21 6.552 21 6 L 21 3 C 21 2.448 20.552 2 20 2 L 17 2 z M 3 9 C 2.448 9 2 9.448 2 10 L 2 13 C 2 13.552 2.448 14 3 14 L 6 14 C 6.552 14 7 13.552 7 13 L 7 10 C 7 9.448 6.552 9 6 9 L 3 9 z M 10 9 C 9.448 9 9 9.448 9 10 L 9 13 C 9 13.552 9.448 14 10 14 L 13 14 C 13.552 14 14 13.552 14 13 L 14 10 C 14 9.448 13.552 9 13 9 L 10 9 z M 17 9 C 16.448 9 16 9.448 16 10 L 16 13 C 16 13.552 16.448 14 17 14 L 20 14 C 20.552 14 21 13.552 21 13 L 21 10 C 21 9.448 20.552 9 20 9 L 17 9 z M 3 16 C 2.448 16 2 16.448 2 17 L 2 20 C 2 20.552 2.448 21 3 21 L 6 21 C 6.552 21 7 20.552 7 20 L 7 17 C 7 16.448 6.552 16 6 16 L 3 16 z M 10 16 C 9.448 16 9 16.448 9 17 L 9 20 C 9 20.552 9.448 21 10 21 L 13 21 C 13.552 21 14 20.552 14 20 L 14 17 C 14 16.448 13.552 16 13 16 L 10 16 z M 17 16 C 16.448 16 16 16.448 16 17 L 16 20 C 16 20.552 16.448 21 17 21 L 20 21 C 20.552 21 21 20.552 21 20 L 21 17 C 21 16.448 20.552 16 20 16 L 17 16 z"></path></svg>',
23
+ };
24
+
25
+ export default Object.freeze(icons);
@@ -0,0 +1,9 @@
1
+ import { MagnifierParams } from '../types/params';
2
+
3
+ const magnifierDefaultProps: MagnifierParams = {
4
+ zoom: 3,
5
+ form: 'circle',
6
+ size: 150,
7
+ };
8
+
9
+ export default Object.freeze(magnifierDefaultProps);
@@ -0,0 +1,6 @@
1
+ const types = {
2
+ lightbox: 'lightbox' as const,
3
+ magnifier: 'magnifier' as const,
4
+ };
5
+
6
+ export default Object.freeze(types);
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,7 @@
1
+ export declare const getScale: (element: HTMLElement) => number;
2
+ export declare const getTranslateCoord: (element: HTMLElement) => {
3
+ x: number;
4
+ y: number;
5
+ };
6
+ export declare const fullscreenchange: () => void;
7
+ //# sourceMappingURL=general.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../actions/general.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,GAAI,SAAS,WAAW,KAAG,MAW/C,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,SAAS,WAAW,KAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAO9E,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAO,IAInC,CAAC"}
@@ -1,30 +1,26 @@
1
- import initClose from "./initClose";
2
-
3
- export const getScale = (element) => {
4
- // Get the computed style of the element
5
- const style = window.getComputedStyle(element);
6
- const transform = style.transform;
7
-
8
- if (transform !== "none") {
9
- const values = transform.match(/matrix.*\((.+)\)/)[1].split(", ");
10
- return parseFloat(values[0]);
11
- } else {
12
- return 1;
13
- }
14
- };
15
-
16
- export const getTranslateCoord = (element) => {
17
- const style = window.getComputedStyle(element);
18
- // eslint-disable-next-line no-undef
19
- const matrix = new WebKitCSSMatrix(style.transform);
20
- return {
21
- x: matrix.e,
22
- y: matrix.f,
23
- };
24
- };
25
-
26
- export const fullscreenchange = () => {
27
- if (!document.fullscreenElement) {
28
- initClose();
29
- }
30
- };
1
+ import initClose from './initClose';
2
+ export const getScale = (element) => {
3
+ const style = window.getComputedStyle(element);
4
+ const transform = style.transform;
5
+ if (transform !== 'none') {
6
+ const values = transform.match(/matrix.*\((.+)\)/)?.[1].split(', ');
7
+ if (values) {
8
+ return parseFloat(values[0]);
9
+ }
10
+ }
11
+ return 1;
12
+ };
13
+ export const getTranslateCoord = (element) => {
14
+ const style = window.getComputedStyle(element);
15
+ const matrix = new DOMMatrix(style.transform);
16
+ return {
17
+ x: matrix.e,
18
+ y: matrix.f,
19
+ };
20
+ };
21
+ export const fullscreenchange = () => {
22
+ if (!document.fullscreenElement) {
23
+ initClose();
24
+ }
25
+ };
26
+ //# sourceMappingURL=general.js.map