eli-video-interview 1.2.39 → 1.2.40-alpha.2

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 (223) hide show
  1. package/esm/components/react-photo-view/Photo.css +14 -0
  2. package/esm/components/react-photo-view/Photo.d.ts +18 -0
  3. package/esm/components/react-photo-view/Photo.js +54 -0
  4. package/esm/components/react-photo-view/PhotoBox.css +18 -0
  5. package/esm/components/react-photo-view/PhotoBox.d.ts +22 -0
  6. package/esm/components/react-photo-view/PhotoBox.js +302 -0
  7. package/esm/components/react-photo-view/PhotoPage.d.ts +9 -0
  8. package/esm/components/react-photo-view/PhotoPage.js +77 -0
  9. package/esm/components/react-photo-view/PhotoProvider.d.ts +14 -0
  10. package/esm/components/react-photo-view/PhotoProvider.js +98 -0
  11. package/esm/components/react-photo-view/PhotoSlider.css +125 -0
  12. package/esm/components/react-photo-view/PhotoSlider.d.ts +12 -0
  13. package/esm/components/react-photo-view/PhotoSlider.js +262 -0
  14. package/esm/components/react-photo-view/PhotoView.d.ts +30 -0
  15. package/esm/components/react-photo-view/PhotoView.js +48 -0
  16. package/esm/components/react-photo-view/components/ArrowLeft.d.ts +3 -0
  17. package/esm/components/react-photo-view/components/ArrowLeft.js +18 -0
  18. package/esm/components/react-photo-view/components/ArrowRight.d.ts +3 -0
  19. package/esm/components/react-photo-view/components/ArrowRight.js +18 -0
  20. package/esm/components/react-photo-view/components/CloseIcon.d.ts +3 -0
  21. package/esm/components/react-photo-view/components/CloseIcon.js +16 -0
  22. package/esm/components/react-photo-view/components/PreventScroll.d.ts +1 -0
  23. package/esm/components/react-photo-view/components/PreventScroll.js +12 -0
  24. package/esm/components/react-photo-view/components/SlidePortal.css +10 -0
  25. package/esm/components/react-photo-view/components/SlidePortal.d.ts +7 -0
  26. package/esm/components/react-photo-view/components/SlidePortal.js +30 -0
  27. package/esm/components/react-photo-view/components/Spinner.css +23 -0
  28. package/esm/components/react-photo-view/components/Spinner.d.ts +4 -0
  29. package/esm/components/react-photo-view/components/Spinner.js +29 -0
  30. package/esm/components/react-photo-view/hooks/useAdjacentImages.d.ts +5 -0
  31. package/esm/components/react-photo-view/hooks/useAdjacentImages.js +14 -0
  32. package/esm/components/react-photo-view/hooks/useAnimationOrigin.d.ts +6 -0
  33. package/esm/components/react-photo-view/hooks/useAnimationOrigin.js +72 -0
  34. package/esm/components/react-photo-view/hooks/useAnimationPosition.d.ts +2 -0
  35. package/esm/components/react-photo-view/hooks/useAnimationPosition.js +28 -0
  36. package/esm/components/react-photo-view/hooks/useAnimationVisible.d.ts +6 -0
  37. package/esm/components/react-photo-view/hooks/useAnimationVisible.js +49 -0
  38. package/esm/components/react-photo-view/hooks/useContinuousTap.d.ts +8 -0
  39. package/esm/components/react-photo-view/hooks/useContinuousTap.js +36 -0
  40. package/esm/components/react-photo-view/hooks/useDebounceCallback.d.ts +10 -0
  41. package/esm/components/react-photo-view/hooks/useDebounceCallback.js +48 -0
  42. package/esm/components/react-photo-view/hooks/useEventListener.d.ts +1 -0
  43. package/esm/components/react-photo-view/hooks/useEventListener.js +18 -0
  44. package/esm/components/react-photo-view/hooks/useForkedVariable.d.ts +5 -0
  45. package/esm/components/react-photo-view/hooks/useForkedVariable.js +17 -0
  46. package/esm/components/react-photo-view/hooks/useInitial.d.ts +1 -0
  47. package/esm/components/react-photo-view/hooks/useInitial.js +9 -0
  48. package/esm/components/react-photo-view/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
  49. package/esm/components/react-photo-view/hooks/useIsomorphicLayoutEffect.js +3 -0
  50. package/esm/components/react-photo-view/hooks/useMethods.d.ts +4 -0
  51. package/esm/components/react-photo-view/hooks/useMethods.js +35 -0
  52. package/esm/components/react-photo-view/hooks/useMountedRef.d.ts +3 -0
  53. package/esm/components/react-photo-view/hooks/useMountedRef.js +12 -0
  54. package/esm/components/react-photo-view/hooks/useScrollPosition.d.ts +4 -0
  55. package/esm/components/react-photo-view/hooks/useScrollPosition.js +157 -0
  56. package/esm/components/react-photo-view/hooks/useSetState.d.ts +2 -0
  57. package/esm/components/react-photo-view/hooks/useSetState.js +15 -0
  58. package/esm/components/react-photo-view/hooks/useTargetScale.d.ts +4 -0
  59. package/esm/components/react-photo-view/hooks/useTargetScale.js +70 -0
  60. package/esm/components/react-photo-view/index.d.ts +4 -0
  61. package/esm/components/react-photo-view/index.js +4 -0
  62. package/esm/components/react-photo-view/photo-context.d.ts +11 -0
  63. package/esm/components/react-photo-view/photo-context.js +2 -0
  64. package/esm/components/react-photo-view/types.d.ts +196 -0
  65. package/esm/components/react-photo-view/types.js +1 -0
  66. package/esm/components/react-photo-view/utils/edgeHandle.d.ts +15 -0
  67. package/esm/components/react-photo-view/utils/edgeHandle.js +40 -0
  68. package/esm/components/react-photo-view/utils/getMultipleTouchPosition.d.ts +5 -0
  69. package/esm/components/react-photo-view/utils/getMultipleTouchPosition.js +11 -0
  70. package/esm/components/react-photo-view/utils/getPositionOnMoveOrScale.d.ts +9 -0
  71. package/esm/components/react-photo-view/utils/getPositionOnMoveOrScale.js +31 -0
  72. package/esm/components/react-photo-view/utils/getRotateSize.d.ts +4 -0
  73. package/esm/components/react-photo-view/utils/getRotateSize.js +11 -0
  74. package/esm/components/react-photo-view/utils/getSuitableImageSize.d.ts +10 -0
  75. package/esm/components/react-photo-view/utils/getSuitableImageSize.js +42 -0
  76. package/esm/components/react-photo-view/utils/isTouchDevice.d.ts +5 -0
  77. package/esm/components/react-photo-view/utils/isTouchDevice.js +5 -0
  78. package/esm/components/react-photo-view/utils/limitTarget.d.ts +5 -0
  79. package/esm/components/react-photo-view/utils/limitTarget.js +12 -0
  80. package/esm/components/react-photo-view/variables.d.ts +48 -0
  81. package/esm/components/react-photo-view/variables.js +48 -0
  82. package/esm/constants/ai-question.d.ts +9 -0
  83. package/esm/constants/ai-question.js +33 -4
  84. package/esm/enum/ai-question.d.ts +5 -2
  85. package/esm/enum/ai-question.js +3 -0
  86. package/esm/modules/ai-ability/Root.js +15 -4
  87. package/esm/modules/ai-ability-select/Root.js +2 -2
  88. package/esm/modules/ai-ability-select/interface.d.ts +1 -0
  89. package/esm/modules/ai-question/components/BootVideo/index.js +1 -1
  90. package/esm/modules/ai-question/components/QuestionModel/Item.js +14 -9
  91. package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +10 -5
  92. package/esm/modules/ai-question/components/QuestionUpdate/Chioce.d.ts +17 -0
  93. package/esm/modules/ai-question/components/QuestionUpdate/Chioce.js +96 -0
  94. package/esm/modules/ai-question/components/QuestionUpdate/Form.js +42 -12
  95. package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +14 -4
  96. package/esm/modules/ai-question/components/QuestionUpdate/const.js +4 -0
  97. package/esm/modules/ai-question/components/QuestionUpdate/index.js +12 -14
  98. package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +8 -0
  99. package/esm/modules/ai-question/components/QuestionUpdate/styled.d.ts +15 -0
  100. package/esm/modules/ai-question/components/QuestionUpdate/styled.js +53 -1
  101. package/esm/modules/ai-report/components/ScoreReport/Score.js +4 -1
  102. package/esm/modules/ai-report/components/VideoQuestion/BodyImages.d.ts +7 -0
  103. package/esm/modules/ai-report/components/VideoQuestion/BodyImages.js +40 -0
  104. package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +5 -3
  105. package/esm/modules/ai-report/components/VideoQuestion/SingleChoice.d.ts +8 -0
  106. package/esm/modules/ai-report/components/VideoQuestion/SingleChoice.js +25 -0
  107. package/esm/modules/ai-report/components/VideoQuestion/styled.d.ts +1 -0
  108. package/esm/modules/ai-report/components/VideoQuestion/styled.js +7 -1
  109. package/esm/modules/ai-report/interface.d.ts +19 -0
  110. package/esm/services/ai-ability.d.ts +1 -1
  111. package/esm/services/ai-ability.js +1 -1
  112. package/lib/components/react-photo-view/Photo.css +14 -0
  113. package/lib/components/react-photo-view/Photo.d.ts +18 -0
  114. package/lib/components/react-photo-view/Photo.js +60 -0
  115. package/lib/components/react-photo-view/PhotoBox.css +18 -0
  116. package/lib/components/react-photo-view/PhotoBox.d.ts +22 -0
  117. package/lib/components/react-photo-view/PhotoBox.js +308 -0
  118. package/lib/components/react-photo-view/PhotoPage.d.ts +9 -0
  119. package/lib/components/react-photo-view/PhotoPage.js +79 -0
  120. package/lib/components/react-photo-view/PhotoProvider.d.ts +14 -0
  121. package/lib/components/react-photo-view/PhotoProvider.js +104 -0
  122. package/lib/components/react-photo-view/PhotoSlider.css +125 -0
  123. package/lib/components/react-photo-view/PhotoSlider.d.ts +12 -0
  124. package/lib/components/react-photo-view/PhotoSlider.js +268 -0
  125. package/lib/components/react-photo-view/PhotoView.d.ts +30 -0
  126. package/lib/components/react-photo-view/PhotoView.js +53 -0
  127. package/lib/components/react-photo-view/components/ArrowLeft.d.ts +3 -0
  128. package/lib/components/react-photo-view/components/ArrowLeft.js +20 -0
  129. package/lib/components/react-photo-view/components/ArrowRight.d.ts +3 -0
  130. package/lib/components/react-photo-view/components/ArrowRight.js +20 -0
  131. package/lib/components/react-photo-view/components/CloseIcon.d.ts +3 -0
  132. package/lib/components/react-photo-view/components/CloseIcon.js +18 -0
  133. package/lib/components/react-photo-view/components/PreventScroll.d.ts +1 -0
  134. package/lib/components/react-photo-view/components/PreventScroll.js +15 -0
  135. package/lib/components/react-photo-view/components/SlidePortal.css +10 -0
  136. package/lib/components/react-photo-view/components/SlidePortal.d.ts +7 -0
  137. package/lib/components/react-photo-view/components/SlidePortal.js +32 -0
  138. package/lib/components/react-photo-view/components/Spinner.css +23 -0
  139. package/lib/components/react-photo-view/components/Spinner.d.ts +4 -0
  140. package/lib/components/react-photo-view/components/Spinner.js +31 -0
  141. package/lib/components/react-photo-view/hooks/useAdjacentImages.d.ts +5 -0
  142. package/lib/components/react-photo-view/hooks/useAdjacentImages.js +17 -0
  143. package/lib/components/react-photo-view/hooks/useAnimationOrigin.d.ts +6 -0
  144. package/lib/components/react-photo-view/hooks/useAnimationOrigin.js +78 -0
  145. package/lib/components/react-photo-view/hooks/useAnimationPosition.d.ts +2 -0
  146. package/lib/components/react-photo-view/hooks/useAnimationPosition.js +34 -0
  147. package/lib/components/react-photo-view/hooks/useAnimationVisible.d.ts +6 -0
  148. package/lib/components/react-photo-view/hooks/useAnimationVisible.js +55 -0
  149. package/lib/components/react-photo-view/hooks/useContinuousTap.d.ts +8 -0
  150. package/lib/components/react-photo-view/hooks/useContinuousTap.js +42 -0
  151. package/lib/components/react-photo-view/hooks/useDebounceCallback.d.ts +10 -0
  152. package/lib/components/react-photo-view/hooks/useDebounceCallback.js +51 -0
  153. package/lib/components/react-photo-view/hooks/useEventListener.d.ts +1 -0
  154. package/lib/components/react-photo-view/hooks/useEventListener.js +21 -0
  155. package/lib/components/react-photo-view/hooks/useForkedVariable.d.ts +5 -0
  156. package/lib/components/react-photo-view/hooks/useForkedVariable.js +20 -0
  157. package/lib/components/react-photo-view/hooks/useInitial.d.ts +1 -0
  158. package/lib/components/react-photo-view/hooks/useInitial.js +12 -0
  159. package/lib/components/react-photo-view/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
  160. package/lib/components/react-photo-view/hooks/useIsomorphicLayoutEffect.js +5 -0
  161. package/lib/components/react-photo-view/hooks/useMethods.d.ts +4 -0
  162. package/lib/components/react-photo-view/hooks/useMethods.js +38 -0
  163. package/lib/components/react-photo-view/hooks/useMountedRef.d.ts +3 -0
  164. package/lib/components/react-photo-view/hooks/useMountedRef.js +14 -0
  165. package/lib/components/react-photo-view/hooks/useScrollPosition.d.ts +4 -0
  166. package/lib/components/react-photo-view/hooks/useScrollPosition.js +163 -0
  167. package/lib/components/react-photo-view/hooks/useSetState.d.ts +2 -0
  168. package/lib/components/react-photo-view/hooks/useSetState.js +18 -0
  169. package/lib/components/react-photo-view/hooks/useTargetScale.d.ts +4 -0
  170. package/lib/components/react-photo-view/hooks/useTargetScale.js +76 -0
  171. package/lib/components/react-photo-view/index.d.ts +4 -0
  172. package/lib/components/react-photo-view/index.js +12 -0
  173. package/lib/components/react-photo-view/photo-context.d.ts +11 -0
  174. package/lib/components/react-photo-view/photo-context.js +4 -0
  175. package/lib/components/react-photo-view/types.d.ts +196 -0
  176. package/lib/components/react-photo-view/types.js +2 -0
  177. package/lib/components/react-photo-view/utils/edgeHandle.d.ts +15 -0
  178. package/lib/components/react-photo-view/utils/edgeHandle.js +45 -0
  179. package/lib/components/react-photo-view/utils/getMultipleTouchPosition.d.ts +5 -0
  180. package/lib/components/react-photo-view/utils/getMultipleTouchPosition.js +14 -0
  181. package/lib/components/react-photo-view/utils/getPositionOnMoveOrScale.d.ts +9 -0
  182. package/lib/components/react-photo-view/utils/getPositionOnMoveOrScale.js +34 -0
  183. package/lib/components/react-photo-view/utils/getRotateSize.d.ts +4 -0
  184. package/lib/components/react-photo-view/utils/getRotateSize.js +14 -0
  185. package/lib/components/react-photo-view/utils/getSuitableImageSize.d.ts +10 -0
  186. package/lib/components/react-photo-view/utils/getSuitableImageSize.js +48 -0
  187. package/lib/components/react-photo-view/utils/isTouchDevice.d.ts +5 -0
  188. package/lib/components/react-photo-view/utils/isTouchDevice.js +7 -0
  189. package/lib/components/react-photo-view/utils/limitTarget.d.ts +5 -0
  190. package/lib/components/react-photo-view/utils/limitTarget.js +17 -0
  191. package/lib/components/react-photo-view/variables.d.ts +48 -0
  192. package/lib/components/react-photo-view/variables.js +51 -0
  193. package/lib/constants/ai-question.d.ts +9 -0
  194. package/lib/constants/ai-question.js +34 -5
  195. package/lib/enum/ai-question.d.ts +5 -2
  196. package/lib/enum/ai-question.js +3 -0
  197. package/lib/modules/ai-ability/Root.js +15 -4
  198. package/lib/modules/ai-ability-select/Root.js +2 -2
  199. package/lib/modules/ai-ability-select/interface.d.ts +1 -0
  200. package/lib/modules/ai-question/components/BootVideo/index.js +1 -1
  201. package/lib/modules/ai-question/components/QuestionModel/Item.js +11 -6
  202. package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +8 -3
  203. package/lib/modules/ai-question/components/QuestionUpdate/Chioce.d.ts +17 -0
  204. package/lib/modules/ai-question/components/QuestionUpdate/Chioce.js +103 -0
  205. package/lib/modules/ai-question/components/QuestionUpdate/Form.js +40 -10
  206. package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +12 -2
  207. package/lib/modules/ai-question/components/QuestionUpdate/const.js +4 -0
  208. package/lib/modules/ai-question/components/QuestionUpdate/index.js +11 -13
  209. package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +8 -0
  210. package/lib/modules/ai-question/components/QuestionUpdate/styled.d.ts +15 -0
  211. package/lib/modules/ai-question/components/QuestionUpdate/styled.js +53 -1
  212. package/lib/modules/ai-report/components/ScoreReport/Score.js +4 -1
  213. package/lib/modules/ai-report/components/VideoQuestion/BodyImages.d.ts +7 -0
  214. package/lib/modules/ai-report/components/VideoQuestion/BodyImages.js +45 -0
  215. package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +4 -2
  216. package/lib/modules/ai-report/components/VideoQuestion/SingleChoice.d.ts +8 -0
  217. package/lib/modules/ai-report/components/VideoQuestion/SingleChoice.js +27 -0
  218. package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +1 -0
  219. package/lib/modules/ai-report/components/VideoQuestion/styled.js +8 -2
  220. package/lib/modules/ai-report/interface.d.ts +19 -0
  221. package/lib/services/ai-ability.d.ts +1 -1
  222. package/lib/services/ai-ability.js +1 -1
  223. package/package.json +2 -2
@@ -0,0 +1,125 @@
1
+ @keyframes PhotoView__fade {
2
+ from {
3
+ opacity: 0;
4
+ }
5
+ to {
6
+ opacity: 1;
7
+ }
8
+ }
9
+ .PhotoView-Slider__clean .PhotoView-Slider__BannerWrap,
10
+ .PhotoView-Slider__clean .PhotoView-Slider__ArrowLeft,
11
+ .PhotoView-Slider__clean .PhotoView-Slider__ArrowRight,
12
+ .PhotoView-Slider__clean .PhotoView-Slider__Overlay {
13
+ opacity: 0;
14
+ }
15
+ .PhotoView-Slider__willClose .PhotoView-Slider__BannerWrap:hover {
16
+ opacity: 0;
17
+ }
18
+ .PhotoView-Slider__Backdrop {
19
+ position: absolute;
20
+ top: 0;
21
+ left: 0;
22
+ width: 100%;
23
+ height: 100%;
24
+ background: #000000;
25
+ transition-property: background-color;
26
+ z-index: -1;
27
+ }
28
+ .PhotoView-Slider__fadeIn {
29
+ opacity: 0;
30
+ animation: PhotoView__fade linear both;
31
+ }
32
+ .PhotoView-Slider__fadeOut {
33
+ opacity: 0;
34
+ animation: PhotoView__fade linear both reverse;
35
+ }
36
+ .PhotoView-Slider__BannerWrap {
37
+ position: absolute;
38
+ left: 0;
39
+ top: 0;
40
+ display: flex;
41
+ justify-content: space-between;
42
+ align-items: center;
43
+ width: 100%;
44
+ height: 44px;
45
+ color: white;
46
+ transition: opacity 0.2s ease-out;
47
+ z-index: 20;
48
+ }
49
+ .PhotoView-Slider__BannerWrap:hover {
50
+ opacity: 1;
51
+ }
52
+ .PhotoView-Slider__Counter {
53
+ padding: 0 10px;
54
+ font-size: 14px;
55
+ opacity: 0.75;
56
+ }
57
+ .PhotoView-Slider__BannerRight {
58
+ display: flex;
59
+ align-items: center;
60
+ justify-content: center;
61
+ width: 48px;
62
+ height: 48px;
63
+ z-index: 20;
64
+ cursor: pointer;
65
+ user-select: none;
66
+ border-radius: 24px;
67
+ margin-top: 16px;
68
+ margin-right: 16px;
69
+ background: rgba(0, 0, 0, 0.56);
70
+ }
71
+ .PhotoView-Slider__BannerRight svg {
72
+ box-sizing: content-box;
73
+ padding: 10px;
74
+ width: 24px;
75
+ height: 24px;
76
+ fill: white;
77
+ }
78
+ .PhotoView-Slider__toolbarIcon {
79
+ box-sizing: border-box;
80
+ padding: 10px;
81
+ fill: white;
82
+ opacity: 0.75;
83
+ cursor: pointer;
84
+ transition: opacity 0.2s linear;
85
+ }
86
+ .PhotoView-Slider__toolbarIcon:hover {
87
+ opacity: 1;
88
+ }
89
+ .PhotoView-Slider__ArrowLeft,
90
+ .PhotoView-Slider__ArrowRight {
91
+ position: absolute;
92
+ top: 0;
93
+ bottom: 0;
94
+ display: flex;
95
+ justify-content: center;
96
+ align-items: center;
97
+ width: 56px;
98
+ height: 56px;
99
+ margin: auto;
100
+ opacity: 0.75;
101
+ z-index: 20;
102
+ cursor: pointer;
103
+ user-select: none;
104
+ transition: opacity 0.2s linear;
105
+ border-radius: 28px;
106
+ background: rgba(0, 0, 0, 0.56);
107
+ }
108
+ .PhotoView-Slider__ArrowLeft:hover,
109
+ .PhotoView-Slider__ArrowRight:hover {
110
+ opacity: 1;
111
+ }
112
+ .PhotoView-Slider__ArrowLeft svg,
113
+ .PhotoView-Slider__ArrowRight svg {
114
+ box-sizing: content-box;
115
+ padding: 10px;
116
+ width: 24px;
117
+ height: 24px;
118
+ fill: white;
119
+ }
120
+ .PhotoView-Slider__ArrowLeft {
121
+ left: 24px;
122
+ }
123
+ .PhotoView-Slider__ArrowRight {
124
+ right: 24px;
125
+ }
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import './PhotoSlider.css';
3
+ import type { DataType, PhotoProviderBase } from './types';
4
+ export interface IPhotoSliderProps extends PhotoProviderBase {
5
+ images: DataType[];
6
+ index?: number;
7
+ onIndexChange?: (index: number) => void;
8
+ visible: boolean;
9
+ onClose: (evt?: React.MouseEvent | React.TouchEvent) => void;
10
+ afterClose?: () => void;
11
+ }
12
+ export default function PhotoSlider(props: IPhotoSliderProps): JSX.Element | null;
@@ -0,0 +1,262 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
13
+ import { useRef, useState } from 'react';
14
+ import ArrowLeft from './components/ArrowLeft';
15
+ import ArrowRight from './components/ArrowRight';
16
+ import CloseIcon from './components/CloseIcon';
17
+ import PreventScroll from './components/PreventScroll';
18
+ import SlidePortal from './components/SlidePortal';
19
+ import useAdjacentImages from './hooks/useAdjacentImages';
20
+ import useAnimationVisible from './hooks/useAnimationVisible';
21
+ import useEventListener from './hooks/useEventListener';
22
+ import useIsomorphicLayoutEffect from './hooks/useIsomorphicLayoutEffect';
23
+ import useMethods from './hooks/useMethods';
24
+ import useSetState from './hooks/useSetState';
25
+ import PhotoBox from './PhotoBox';
26
+ import './PhotoSlider.css';
27
+ import isTouchDevice from './utils/isTouchDevice';
28
+ import { limitNumber } from './utils/limitTarget';
29
+ import { defaultEasing, defaultOpacity, defaultSpeed, horizontalOffset, maxMoveOffset } from './variables';
30
+ var initialState = {
31
+ x: 0,
32
+ touched: false,
33
+ pause: false,
34
+ lastCX: undefined,
35
+ lastCY: undefined,
36
+ bg: undefined,
37
+ lastBg: undefined,
38
+ overlay: true,
39
+ minimal: true,
40
+ scale: 1,
41
+ rotate: 0,
42
+ };
43
+ export default function PhotoSlider(props) {
44
+ var _a = props.loop, loop = _a === void 0 ? 3 : _a, speedFn = props.speed, easingFn = props.easing, photoClosable = props.photoClosable, _b = props.maskClosable, maskClosable = _b === void 0 ? true : _b, _c = props.maskOpacity, maskOpacity = _c === void 0 ? defaultOpacity : _c, _d = props.pullClosable, pullClosable = _d === void 0 ? true : _d, _e = props.bannerVisible, bannerVisible = _e === void 0 ? true : _e, overlayRender = props.overlayRender, toolbarRender = props.toolbarRender, className = props.className, maskClassName = props.maskClassName, photoClassName = props.photoClassName, photoWrapClassName = props.photoWrapClassName, loadingElement = props.loadingElement, brokenElement = props.brokenElement, images = props.images, _f = props.index, controlledIndex = _f === void 0 ? 0 : _f, controlledIndexChange = props.onIndexChange, visible = props.visible, onClose = props.onClose, afterClose = props.afterClose, portalContainer = props.portalContainer;
45
+ var _g = useSetState(initialState), state = _g[0], updateState = _g[1];
46
+ var _h = useState(0), innerIndex = _h[0], updateInnerIndex = _h[1];
47
+ var x = state.x, touched = state.touched, pause = state.pause, lastCX = state.lastCX, lastCY = state.lastCY, _j = state.bg, bg = _j === void 0 ? maskOpacity : _j, lastBg = state.lastBg, overlay = state.overlay, minimal = state.minimal, scale = state.scale, rotate = state.rotate, onScale = state.onScale, onRotate = state.onRotate;
48
+ // 受控 index
49
+ // eslint-disable-next-line no-prototype-builtins
50
+ var isControlled = props.hasOwnProperty('index');
51
+ var index = isControlled ? controlledIndex : innerIndex;
52
+ var onIndexChange = isControlled ? controlledIndexChange : updateInnerIndex;
53
+ // 内部虚拟 index
54
+ var virtualIndexRef = useRef(index);
55
+ // 当前图片
56
+ var imageLength = images.length;
57
+ var currentImage = images[index];
58
+ // 是否开启
59
+ // noinspection SuspiciousTypeOfGuard
60
+ var enableLoop = typeof loop === 'boolean' ? loop : imageLength > loop;
61
+ // 显示动画处理
62
+ var _k = useAnimationVisible(visible, afterClose), realVisible = _k[0], activeAnimation = _k[1], onAnimationEnd = _k[2];
63
+ useIsomorphicLayoutEffect(function () {
64
+ // 显示弹出层,修正正确的指向
65
+ if (realVisible) {
66
+ updateState({
67
+ pause: true,
68
+ x: index * -(window.innerWidth + horizontalOffset),
69
+ });
70
+ virtualIndexRef.current = index;
71
+ return;
72
+ }
73
+ // 关闭后清空状态
74
+ updateState(initialState);
75
+ }, [realVisible]);
76
+ var _l = useMethods({
77
+ close: function (evt) {
78
+ if (onRotate) {
79
+ onRotate(0);
80
+ }
81
+ updateState({
82
+ overlay: true,
83
+ // 记录当前关闭时的透明度
84
+ lastBg: bg,
85
+ });
86
+ onClose(evt);
87
+ },
88
+ changeIndex: function (nextIndex, isPause) {
89
+ if (isPause === void 0) { isPause = false; }
90
+ // 当前索引
91
+ var currentIndex = enableLoop ? virtualIndexRef.current + (nextIndex - index) : nextIndex;
92
+ var max = imageLength - 1;
93
+ // 虚拟 index
94
+ // 非循环模式,限制区间
95
+ var limitIndex = limitNumber(currentIndex, 0, max);
96
+ var nextVirtualIndex = enableLoop ? currentIndex : limitIndex;
97
+ // 单个屏幕宽度
98
+ var singlePageWidth = window.innerWidth + horizontalOffset;
99
+ updateState({
100
+ touched: false,
101
+ lastCX: undefined,
102
+ lastCY: undefined,
103
+ x: -singlePageWidth * nextVirtualIndex,
104
+ pause: isPause,
105
+ });
106
+ virtualIndexRef.current = nextVirtualIndex;
107
+ // 更新真实的 index
108
+ var realLoopIndex = nextIndex < 0 ? max : nextIndex > max ? 0 : nextIndex;
109
+ if (onIndexChange) {
110
+ onIndexChange(enableLoop ? realLoopIndex : limitIndex);
111
+ }
112
+ },
113
+ }), close = _l.close, changeIndex = _l.changeIndex;
114
+ useEventListener('keydown', function (evt) {
115
+ if (visible) {
116
+ switch (evt.key) {
117
+ case 'ArrowLeft':
118
+ changeIndex(index - 1, true);
119
+ break;
120
+ case 'ArrowRight':
121
+ changeIndex(index + 1, true);
122
+ break;
123
+ case 'Escape':
124
+ close();
125
+ break;
126
+ }
127
+ }
128
+ });
129
+ function handlePhotoTap(closeable) {
130
+ return closeable ? close() : updateState({ overlay: !overlay });
131
+ }
132
+ function handleResize() {
133
+ updateState({
134
+ x: -(window.innerWidth + horizontalOffset) * index,
135
+ lastCX: undefined,
136
+ lastCY: undefined,
137
+ pause: true,
138
+ });
139
+ virtualIndexRef.current = index;
140
+ }
141
+ function handleReachVerticalMove(clientY, nextScale) {
142
+ if (lastCY === undefined) {
143
+ updateState({
144
+ touched: true,
145
+ lastCY: clientY,
146
+ bg: bg,
147
+ minimal: true,
148
+ });
149
+ return;
150
+ }
151
+ var opacity = maskOpacity === null ? null : limitNumber(maskOpacity, 0.01, maskOpacity - Math.abs(clientY - lastCY) / 100 / 4);
152
+ updateState({
153
+ touched: true,
154
+ lastCY: lastCY,
155
+ bg: nextScale === 1 ? opacity : maskOpacity,
156
+ minimal: nextScale === 1,
157
+ });
158
+ }
159
+ function handleReachHorizontalMove(clientX) {
160
+ if (lastCX === undefined) {
161
+ updateState({
162
+ touched: true,
163
+ lastCX: clientX,
164
+ x: x,
165
+ pause: false,
166
+ });
167
+ return;
168
+ }
169
+ var originOffsetClientX = clientX - lastCX;
170
+ var offsetClientX = originOffsetClientX;
171
+ // 第一张和最后一张超出距离减半
172
+ if (!enableLoop && ((index === 0 && originOffsetClientX > 0) || (index === imageLength - 1 && originOffsetClientX < 0))) {
173
+ offsetClientX = originOffsetClientX / 2;
174
+ }
175
+ updateState({
176
+ touched: true,
177
+ lastCX: lastCX,
178
+ x: -(window.innerWidth + horizontalOffset) * virtualIndexRef.current + offsetClientX,
179
+ pause: false,
180
+ });
181
+ }
182
+ function handleReachMove(reachPosition, clientX, clientY, nextScale) {
183
+ if (reachPosition === 'x') {
184
+ handleReachHorizontalMove(clientX);
185
+ }
186
+ else if (reachPosition === 'y') {
187
+ handleReachVerticalMove(clientY, nextScale);
188
+ }
189
+ }
190
+ function handleReachUp(clientX, clientY) {
191
+ var offsetClientX = clientX - (lastCX !== null && lastCX !== void 0 ? lastCX : clientX);
192
+ var offsetClientY = clientY - (lastCY !== null && lastCY !== void 0 ? lastCY : clientY);
193
+ var willClose = false;
194
+ // 下一张
195
+ if (offsetClientX < -maxMoveOffset) {
196
+ changeIndex(index + 1);
197
+ return;
198
+ }
199
+ // 上一张
200
+ if (offsetClientX > maxMoveOffset) {
201
+ changeIndex(index - 1);
202
+ return;
203
+ }
204
+ var singlePageWidth = window.innerWidth + horizontalOffset;
205
+ // 当前偏移
206
+ var currentTranslateX = -singlePageWidth * virtualIndexRef.current;
207
+ if (Math.abs(offsetClientY) > 100 && minimal && pullClosable) {
208
+ willClose = true;
209
+ close();
210
+ }
211
+ updateState({
212
+ touched: false,
213
+ x: currentTranslateX,
214
+ lastCX: undefined,
215
+ lastCY: undefined,
216
+ bg: maskOpacity,
217
+ overlay: willClose ? true : overlay,
218
+ });
219
+ }
220
+ // 截取相邻的图片
221
+ var adjacentImages = useAdjacentImages(images, index, enableLoop);
222
+ if (!realVisible) {
223
+ return null;
224
+ }
225
+ var currentOverlayVisible = overlay && !activeAnimation;
226
+ // 关闭过程中使用下拉保存的透明度
227
+ var currentOpacity = visible ? bg : lastBg;
228
+ // 覆盖物参数
229
+ var overlayParams = onScale &&
230
+ onRotate && {
231
+ images: images,
232
+ index: index,
233
+ visible: visible,
234
+ onClose: close,
235
+ onIndexChange: changeIndex,
236
+ overlayVisible: currentOverlayVisible,
237
+ overlay: currentImage && currentImage.overlay,
238
+ scale: scale,
239
+ rotate: rotate,
240
+ onScale: onScale,
241
+ onRotate: onRotate,
242
+ };
243
+ // 动画时间
244
+ var currentSpeed = speedFn ? speedFn(activeAnimation) : defaultSpeed;
245
+ var currentEasing = easingFn ? easingFn(activeAnimation) : defaultEasing;
246
+ var slideSpeed = speedFn ? speedFn(3) : defaultSpeed + 200;
247
+ var slideEasing = easingFn ? easingFn(3) : defaultEasing;
248
+ return (_jsxs(SlidePortal, __assign({ className: "PhotoView-Portal".concat(!currentOverlayVisible ? ' PhotoView-Slider__clean' : '').concat(!visible ? ' PhotoView-Slider__willClose' : '').concat(className ? " ".concat(className) : ''), role: "dialog", onClick: function (e) { return e.stopPropagation(); }, container: portalContainer }, { children: [visible && _jsx(PreventScroll, {}), _jsx("div", { className: "PhotoView-Slider__Backdrop".concat(maskClassName ? " ".concat(maskClassName) : '').concat(activeAnimation === 1 ? ' PhotoView-Slider__fadeIn' : activeAnimation === 2 ? ' PhotoView-Slider__fadeOut' : ''), style: {
249
+ background: currentOpacity ? "rgba(0, 0, 0, ".concat(currentOpacity, ")") : undefined,
250
+ transitionTimingFunction: currentEasing,
251
+ transitionDuration: "".concat(touched ? 0 : currentSpeed, "ms"),
252
+ animationDuration: "".concat(currentSpeed, "ms"),
253
+ }, onAnimationEnd: onAnimationEnd }), bannerVisible && (_jsxs("div", __assign({ className: "PhotoView-Slider__BannerWrap" }, { children: [_jsx("div", { className: "PhotoView-Slider__Counter" }), _jsxs("div", __assign({ className: "PhotoView-Slider__BannerRight" }, { children: [toolbarRender && overlayParams && toolbarRender(overlayParams), _jsx(CloseIcon, { className: "PhotoView-Slider__toolbarIcon", onClick: close })] }))] }))), adjacentImages.map(function (item, currentIndex) {
254
+ // 截取之前的索引位置
255
+ var nextIndex = !enableLoop && index === 0 ? index + currentIndex : virtualIndexRef.current - 1 + currentIndex;
256
+ return (_jsx(PhotoBox, { item: item, speed: currentSpeed, easing: currentEasing, visible: visible, onReachMove: handleReachMove, onReachUp: handleReachUp, onPhotoTap: function () { return handlePhotoTap(photoClosable); }, onMaskTap: function () { return handlePhotoTap(maskClosable); }, wrapClassName: photoWrapClassName, className: photoClassName, style: {
257
+ left: "".concat((window.innerWidth + horizontalOffset) * nextIndex, "px"),
258
+ transform: "translate3d(".concat(x, "px, 0px, 0)"),
259
+ transition: touched || pause ? undefined : "transform ".concat(slideSpeed, "ms ").concat(slideEasing),
260
+ }, loadingElement: loadingElement, brokenElement: brokenElement, onPhotoResize: handleResize, isActive: (currentImage && currentImage.key) === item.key, expose: updateState }, enableLoop ? "".concat(item.key, "/").concat(item.src, "/").concat(nextIndex) : item.key));
261
+ }), !isTouchDevice && bannerVisible && (_jsxs(_Fragment, { children: [(enableLoop || index !== 0) && (_jsx("div", __assign({ className: "PhotoView-Slider__ArrowLeft", onClick: function () { return changeIndex(index - 1, true); } }, { children: _jsx(ArrowLeft, {}) }))), (enableLoop || index + 1 < imageLength) && (_jsx("div", __assign({ className: "PhotoView-Slider__ArrowRight", onClick: function () { return changeIndex(index + 1, true); } }, { children: _jsx(ArrowRight, {}) })))] })), overlayRender && overlayParams && _jsx("div", __assign({ className: "PhotoView-Slider__Overlay" }, { children: overlayRender(overlayParams) }))] })));
262
+ }
@@ -0,0 +1,30 @@
1
+ import type React from 'react';
2
+ import type { PhotoRenderParams } from './types';
3
+ export interface PhotoViewProps {
4
+ /**
5
+ * 图片地址
6
+ */
7
+ src?: string;
8
+ /**
9
+ * 自定义渲染,优先级比 src 低
10
+ */
11
+ render?: (props: PhotoRenderParams) => React.ReactNode;
12
+ /**
13
+ * 自定义覆盖节点
14
+ */
15
+ overlay?: React.ReactNode;
16
+ /**
17
+ * 自定义渲染节点宽度
18
+ */
19
+ width?: number;
20
+ /**
21
+ * 自定义渲染节点高度
22
+ */
23
+ height?: number;
24
+ /**
25
+ * 子节点,一般为缩略图
26
+ */
27
+ children?: React.ReactElement;
28
+ }
29
+ declare const PhotoView: React.FC<PhotoViewProps>;
30
+ export default PhotoView;
@@ -0,0 +1,48 @@
1
+ import { Children, cloneElement, useContext, useEffect, useRef } from 'react';
2
+ import useInitial from './hooks/useInitial';
3
+ import useMethods from './hooks/useMethods';
4
+ import PhotoContext from './photo-context';
5
+ var PhotoView = function (_a) {
6
+ var src = _a.src, render = _a.render, overlay = _a.overlay, width = _a.width, height = _a.height, children = _a.children;
7
+ var photoContext = useContext(PhotoContext);
8
+ var key = useInitial(function () { return photoContext.nextId(); });
9
+ var originRef = useRef(null);
10
+ useEffect(function () {
11
+ return function () {
12
+ photoContext.remove(key);
13
+ };
14
+ }, []);
15
+ function invokeChildrenFn(eventName, e) {
16
+ if (children) {
17
+ var eventFn = children.props[eventName];
18
+ if (eventFn) {
19
+ eventFn(e);
20
+ }
21
+ }
22
+ }
23
+ var fn = useMethods({
24
+ render: function (props) {
25
+ return render && render(props);
26
+ },
27
+ click: function (e) {
28
+ photoContext.show(key);
29
+ invokeChildrenFn('onClick', e);
30
+ },
31
+ });
32
+ useEffect(function () {
33
+ photoContext.update({
34
+ key: key,
35
+ src: src,
36
+ originRef: originRef,
37
+ render: fn.render,
38
+ overlay: overlay,
39
+ width: width,
40
+ height: height,
41
+ });
42
+ }, [src]);
43
+ if (children) {
44
+ return Children.only(cloneElement(children, { onClick: fn.click, ref: originRef }));
45
+ }
46
+ return null;
47
+ };
48
+ export default PhotoView;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare function ArrowLeft(props: React.HTMLAttributes<SVGElement>): JSX.Element;
3
+ export default ArrowLeft;
@@ -0,0 +1,18 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ function ArrowLeft(props) {
14
+ return (_jsx("svg", __assign({ focusable: "false", viewBox: "0 0 24 24", "aria-hidden": "true" }, props, { children: _jsx("path", { fillRule: "evenodd",
15
+ // eslint-disable-next-line max-len
16
+ d: "M8.81116012,11.2726407 L13.7609076,6.32289322 C14.1514319,5.93236893 14.7845969,5.93236893 15.1751212,6.32289322 C15.5656454,6.71341751 15.5656454,7.34658249 15.1751212,7.73710678 L10.907,12.004 L15.1751212,16.2726407 C15.5656454,16.663165 15.5656454,17.29633 15.1751212,17.6868542 C14.7845969,18.0773785 14.1514319,18.0773785 13.7609076,17.6868542 L8.81116012,12.7371068 C8.63091814,12.5568648 8.53386477,12.324936 8.52,12.0890314 L8.52,11.9207161 C8.53386477,11.6848114 8.63091814,11.4528827 8.81116012,11.2726407 Z" }) })));
17
+ }
18
+ export default ArrowLeft;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare function ArrowRight(props: React.HTMLAttributes<SVGElement>): JSX.Element;
3
+ export default ArrowRight;
@@ -0,0 +1,18 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ function ArrowRight(props) {
14
+ return (_jsx("svg", __assign({ focusable: "false", viewBox: "0 0 24 24", "aria-hidden": "true" }, props, { children: _jsx("path", { fillRule: "evenodd",
15
+ // eslint-disable-next-line max-len
16
+ d: "M15.1768542,12.7371068 L10.2271068,17.6868542 C9.83658249,18.0773785 9.20341751,18.0773785 8.81289322,17.6868542 C8.42236893,17.29633 8.42236893,16.663165 8.81289322,16.2726407 L13.08,12.004 L8.81289322,7.73710678 C8.42236893,7.34658249 8.42236893,6.71341751 8.81289322,6.32289322 C9.20341751,5.93236893 9.83658249,5.93236893 10.2271068,6.32289322 L15.1768542,11.2726407 C15.3570962,11.4528827 15.4541496,11.6848114 15.4680144,11.9207161 L15.4680144,12.0890314 C15.4541496,12.324936 15.3570962,12.5568648 15.1768542,12.7371068 Z" }) })));
17
+ }
18
+ export default ArrowRight;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare function CloseIcon(props: React.HTMLAttributes<SVGElement>): JSX.Element;
3
+ export default CloseIcon;
@@ -0,0 +1,16 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ function CloseIcon(props) {
14
+ return (_jsx("svg", __assign({ width: "44", height: "44", viewBox: "0 0 768 768" }, props, { children: _jsx("path", { d: "M607.5 205.5l-178.5 178.5 178.5 178.5-45 45-178.5-178.5-178.5 178.5-45-45 178.5-178.5-178.5-178.5 45-45 178.5 178.5 178.5-178.5z" }) })));
15
+ }
16
+ export default CloseIcon;
@@ -0,0 +1 @@
1
+ export default function PreventScroll(): null;
@@ -0,0 +1,12 @@
1
+ import { useEffect } from 'react';
2
+ export default function PreventScroll() {
3
+ useEffect(function () {
4
+ var style = document.body.style;
5
+ var lastOverflow = style.overflow;
6
+ style.overflow = 'hidden';
7
+ return function () {
8
+ style.overflow = lastOverflow;
9
+ };
10
+ }, []);
11
+ return null;
12
+ }
@@ -0,0 +1,10 @@
1
+ .PhotoView-Portal {
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ width: 100%;
6
+ height: 100%;
7
+ z-index: 2000;
8
+ overflow: hidden;
9
+ touch-action: none;
10
+ }
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import './SlidePortal.css';
3
+ export interface ISliderPortalProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ container?: HTMLElement;
5
+ }
6
+ declare function SlidePortal({ container, ...rest }: ISliderPortalProps): React.ReactPortal;
7
+ export default SlidePortal;
@@ -0,0 +1,30 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ import { createPortal } from 'react-dom';
25
+ import './SlidePortal.css';
26
+ function SlidePortal(_a) {
27
+ var _b = _a.container, container = _b === void 0 ? document.body : _b, rest = __rest(_a, ["container"]);
28
+ return createPortal(_jsx("div", __assign({}, rest)), container);
29
+ }
30
+ export default SlidePortal;
@@ -0,0 +1,23 @@
1
+ @keyframes PhotoView__rotate {
2
+ from {
3
+ transform: rotate(0deg);
4
+ }
5
+ to {
6
+ transform: rotate(360deg);
7
+ }
8
+ }
9
+ @keyframes PhotoView__delayIn {
10
+ 0%,
11
+ 50% {
12
+ opacity: 0;
13
+ }
14
+ 100% {
15
+ opacity: 1;
16
+ }
17
+ }
18
+ .PhotoView__Spinner {
19
+ animation: PhotoView__delayIn 0.4s linear both;
20
+ }
21
+ .PhotoView__Spinner svg {
22
+ animation: PhotoView__rotate 0.6s linear infinite;
23
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './Spinner.css';
3
+ declare function Spinner({ className, ...props }: React.HTMLAttributes<HTMLElement>): JSX.Element;
4
+ export default Spinner;