@chayns-components/gallery 5.0.55 → 5.0.56

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 (184) hide show
  1. package/AGENTS.md +135 -72
  2. package/lib/cjs/components/Gallery.js +16 -329
  3. package/lib/cjs/components/Gallery.js.map +1 -1
  4. package/lib/cjs/components/Gallery.types.js +6 -0
  5. package/lib/cjs/components/Gallery.types.js.map +1 -0
  6. package/lib/cjs/components/gallery-editor/GalleryEditor.js +198 -0
  7. package/lib/cjs/components/gallery-editor/GalleryEditor.js.map +1 -0
  8. package/lib/cjs/components/gallery-editor/GalleryEditor.styles.js +20 -0
  9. package/lib/cjs/components/gallery-editor/GalleryEditor.styles.js.map +1 -0
  10. package/lib/cjs/components/gallery-editor/GalleryEditor.types.js +6 -0
  11. package/lib/cjs/components/gallery-editor/GalleryEditor.types.js.map +1 -0
  12. package/lib/cjs/components/gallery-editor/add-file/AddFile.js.map +1 -0
  13. package/lib/cjs/components/gallery-editor/add-file/AddFile.styles.js.map +1 -0
  14. package/lib/cjs/components/gallery-editor/add-file/AddFile.types.js +6 -0
  15. package/lib/cjs/components/gallery-editor/add-file/AddFile.types.js.map +1 -0
  16. package/lib/cjs/components/gallery-editor/gallery-editor-item/GalleryEditorItem.js +41 -0
  17. package/lib/cjs/components/gallery-editor/gallery-editor-item/GalleryEditorItem.js.map +1 -0
  18. package/lib/cjs/components/gallery-editor/gallery-editor-item/GalleryEditorItem.styles.js +37 -0
  19. package/lib/cjs/components/gallery-editor/gallery-editor-item/GalleryEditorItem.styles.js.map +1 -0
  20. package/lib/cjs/components/gallery-editor/gallery-editor-item/GalleryEditorItem.types.js +6 -0
  21. package/lib/cjs/components/gallery-editor/gallery-editor-item/GalleryEditorItem.types.js.map +1 -0
  22. package/lib/cjs/components/gallery-editor/gallery-editor-item/gallery-editor-media-item/GalleryEditorMediaItem.js +36 -0
  23. package/lib/cjs/components/gallery-editor/gallery-editor-item/gallery-editor-media-item/GalleryEditorMediaItem.js.map +1 -0
  24. package/lib/cjs/components/gallery-editor/gallery-editor-item/gallery-editor-media-item/GalleryEditorMediaItem.styles.js +15 -0
  25. package/lib/cjs/components/gallery-editor/gallery-editor-item/gallery-editor-media-item/GalleryEditorMediaItem.styles.js.map +1 -0
  26. package/lib/cjs/components/gallery-editor/gallery-editor-item/gallery-editor-media-item/GalleryEditorMediaItem.types.js +6 -0
  27. package/lib/cjs/components/gallery-editor/gallery-editor-item/gallery-editor-media-item/GalleryEditorMediaItem.types.js.map +1 -0
  28. package/lib/cjs/components/gallery-editor/gallery-editor-item/gallery-editor-preview-item/GalleryEditorPreviewItem.js +45 -0
  29. package/lib/cjs/components/gallery-editor/gallery-editor-item/gallery-editor-preview-item/GalleryEditorPreviewItem.js.map +1 -0
  30. package/lib/cjs/components/gallery-editor/gallery-editor-item/gallery-editor-preview-item/GalleryEditorPreviewItem.styles.js +44 -0
  31. package/lib/cjs/components/gallery-editor/gallery-editor-item/gallery-editor-preview-item/GalleryEditorPreviewItem.styles.js.map +1 -0
  32. package/lib/cjs/components/gallery-editor/gallery-editor-item/gallery-editor-preview-item/GalleryEditorPreviewItem.types.js +6 -0
  33. package/lib/cjs/components/gallery-editor/gallery-editor-item/gallery-editor-preview-item/GalleryEditorPreviewItem.types.js.map +1 -0
  34. package/lib/cjs/components/gallery-viewer/GalleryViewer.js +42 -0
  35. package/lib/cjs/components/gallery-viewer/GalleryViewer.js.map +1 -0
  36. package/lib/cjs/components/{Gallery.styles.js → gallery-viewer/GalleryViewer.styles.js} +13 -18
  37. package/lib/cjs/components/gallery-viewer/GalleryViewer.styles.js.map +1 -0
  38. package/lib/cjs/components/gallery-viewer/GalleryViewer.types.js +6 -0
  39. package/lib/cjs/components/gallery-viewer/GalleryViewer.types.js.map +1 -0
  40. package/lib/cjs/components/gallery-viewer/gallery-viewer-item/GalleryViewerItem.js +25 -0
  41. package/lib/cjs/components/gallery-viewer/gallery-viewer-item/GalleryViewerItem.js.map +1 -0
  42. package/lib/cjs/components/gallery-viewer/gallery-viewer-item/GalleryViewerItem.styles.js +30 -0
  43. package/lib/cjs/components/gallery-viewer/gallery-viewer-item/GalleryViewerItem.styles.js.map +1 -0
  44. package/lib/cjs/components/gallery-viewer/gallery-viewer-item/GalleryViewerItem.types.js +6 -0
  45. package/lib/cjs/components/gallery-viewer/gallery-viewer-item/GalleryViewerItem.types.js.map +1 -0
  46. package/lib/cjs/components/media-content/MediaContent.js +36 -0
  47. package/lib/cjs/components/media-content/MediaContent.js.map +1 -0
  48. package/lib/cjs/components/media-content/MediaContent.styles.js +56 -0
  49. package/lib/cjs/components/media-content/MediaContent.styles.js.map +1 -0
  50. package/lib/cjs/components/media-content/MediaContent.types.js +6 -0
  51. package/lib/cjs/components/media-content/MediaContent.types.js.map +1 -0
  52. package/lib/cjs/index.js +14 -0
  53. package/lib/cjs/index.js.map +1 -1
  54. package/lib/cjs/types/gallery.js +9 -0
  55. package/lib/cjs/types/gallery.js.map +1 -1
  56. package/lib/cjs/utils/gallery.js +152 -0
  57. package/lib/cjs/utils/gallery.js.map +1 -0
  58. package/lib/esm/components/Gallery.js +16 -319
  59. package/lib/esm/components/Gallery.js.map +1 -1
  60. package/lib/esm/components/Gallery.types.js +2 -0
  61. package/lib/esm/components/Gallery.types.js.map +1 -0
  62. package/lib/esm/components/gallery-editor/GalleryEditor.js +189 -0
  63. package/lib/esm/components/gallery-editor/GalleryEditor.js.map +1 -0
  64. package/lib/esm/components/gallery-editor/GalleryEditor.styles.js +13 -0
  65. package/lib/esm/components/gallery-editor/GalleryEditor.styles.js.map +1 -0
  66. package/lib/esm/components/gallery-editor/GalleryEditor.types.js +2 -0
  67. package/lib/esm/components/gallery-editor/GalleryEditor.types.js.map +1 -0
  68. package/lib/esm/components/gallery-editor/add-file/AddFile.js.map +1 -0
  69. package/lib/esm/components/gallery-editor/add-file/AddFile.styles.js.map +1 -0
  70. package/lib/esm/components/gallery-editor/add-file/AddFile.types.js +2 -0
  71. package/lib/esm/components/gallery-editor/add-file/AddFile.types.js.map +1 -0
  72. package/lib/esm/components/gallery-editor/gallery-editor-item/GalleryEditorItem.js +34 -0
  73. package/lib/esm/components/gallery-editor/gallery-editor-item/GalleryEditorItem.js.map +1 -0
  74. package/lib/esm/components/gallery-editor/gallery-editor-item/GalleryEditorItem.styles.js +30 -0
  75. package/lib/esm/components/gallery-editor/gallery-editor-item/GalleryEditorItem.styles.js.map +1 -0
  76. package/lib/esm/components/gallery-editor/gallery-editor-item/GalleryEditorItem.types.js +2 -0
  77. package/lib/esm/components/gallery-editor/gallery-editor-item/GalleryEditorItem.types.js.map +1 -0
  78. package/lib/esm/components/gallery-editor/gallery-editor-item/gallery-editor-media-item/GalleryEditorMediaItem.js +29 -0
  79. package/lib/esm/components/gallery-editor/gallery-editor-item/gallery-editor-media-item/GalleryEditorMediaItem.js.map +1 -0
  80. package/lib/esm/components/gallery-editor/gallery-editor-item/gallery-editor-media-item/GalleryEditorMediaItem.styles.js +8 -0
  81. package/lib/esm/components/gallery-editor/gallery-editor-item/gallery-editor-media-item/GalleryEditorMediaItem.styles.js.map +1 -0
  82. package/lib/esm/components/gallery-editor/gallery-editor-item/gallery-editor-media-item/GalleryEditorMediaItem.types.js +2 -0
  83. package/lib/esm/components/gallery-editor/gallery-editor-item/gallery-editor-media-item/GalleryEditorMediaItem.types.js.map +1 -0
  84. package/lib/esm/components/gallery-editor/gallery-editor-item/gallery-editor-preview-item/GalleryEditorPreviewItem.js +38 -0
  85. package/lib/esm/components/gallery-editor/gallery-editor-item/gallery-editor-preview-item/GalleryEditorPreviewItem.js.map +1 -0
  86. package/lib/esm/components/{gallery-item/preview-item/PreviewItem.styles.js → gallery-editor/gallery-editor-item/gallery-editor-preview-item/GalleryEditorPreviewItem.styles.js} +7 -6
  87. package/lib/esm/components/gallery-editor/gallery-editor-item/gallery-editor-preview-item/GalleryEditorPreviewItem.styles.js.map +1 -0
  88. package/lib/esm/components/gallery-editor/gallery-editor-item/gallery-editor-preview-item/GalleryEditorPreviewItem.types.js +2 -0
  89. package/lib/esm/components/gallery-editor/gallery-editor-item/gallery-editor-preview-item/GalleryEditorPreviewItem.types.js.map +1 -0
  90. package/lib/esm/components/gallery-viewer/GalleryViewer.js +34 -0
  91. package/lib/esm/components/gallery-viewer/GalleryViewer.js.map +1 -0
  92. package/lib/esm/components/{Gallery.styles.js → gallery-viewer/GalleryViewer.styles.js} +12 -17
  93. package/lib/esm/components/gallery-viewer/GalleryViewer.styles.js.map +1 -0
  94. package/lib/esm/components/gallery-viewer/GalleryViewer.types.js +2 -0
  95. package/lib/esm/components/gallery-viewer/GalleryViewer.types.js.map +1 -0
  96. package/lib/esm/components/gallery-viewer/gallery-viewer-item/GalleryViewerItem.js +18 -0
  97. package/lib/esm/components/gallery-viewer/gallery-viewer-item/GalleryViewerItem.js.map +1 -0
  98. package/lib/esm/components/gallery-viewer/gallery-viewer-item/GalleryViewerItem.styles.js +23 -0
  99. package/lib/esm/components/gallery-viewer/gallery-viewer-item/GalleryViewerItem.styles.js.map +1 -0
  100. package/lib/esm/components/gallery-viewer/gallery-viewer-item/GalleryViewerItem.types.js +2 -0
  101. package/lib/esm/components/gallery-viewer/gallery-viewer-item/GalleryViewerItem.types.js.map +1 -0
  102. package/lib/esm/components/media-content/MediaContent.js +29 -0
  103. package/lib/esm/components/media-content/MediaContent.js.map +1 -0
  104. package/lib/esm/components/media-content/MediaContent.styles.js +49 -0
  105. package/lib/esm/components/media-content/MediaContent.styles.js.map +1 -0
  106. package/lib/esm/components/media-content/MediaContent.types.js +2 -0
  107. package/lib/esm/components/media-content/MediaContent.types.js.map +1 -0
  108. package/lib/esm/index.js +2 -0
  109. package/lib/esm/index.js.map +1 -1
  110. package/lib/esm/types/gallery.js +9 -0
  111. package/lib/esm/types/gallery.js.map +1 -1
  112. package/lib/esm/utils/gallery.js +132 -0
  113. package/lib/esm/utils/gallery.js.map +1 -0
  114. package/lib/types/components/Gallery.d.ts +1 -44
  115. package/lib/types/components/Gallery.types.d.ts +107 -0
  116. package/lib/types/components/gallery-editor/GalleryEditor.d.ts +4 -0
  117. package/lib/types/components/gallery-editor/GalleryEditor.styles.d.ts +4 -0
  118. package/lib/types/components/gallery-editor/GalleryEditor.types.d.ts +81 -0
  119. package/lib/types/components/gallery-editor/add-file/AddFile.d.ts +4 -0
  120. package/lib/types/components/gallery-editor/add-file/AddFile.types.d.ts +13 -0
  121. package/lib/types/components/gallery-editor/gallery-editor-item/GalleryEditorItem.d.ts +4 -0
  122. package/lib/types/components/gallery-editor/gallery-editor-item/GalleryEditorItem.styles.d.ts +4 -0
  123. package/lib/types/components/gallery-editor/gallery-editor-item/GalleryEditorItem.types.d.ts +40 -0
  124. package/lib/types/components/gallery-editor/gallery-editor-item/gallery-editor-media-item/GalleryEditorMediaItem.d.ts +4 -0
  125. package/lib/types/components/gallery-editor/gallery-editor-item/gallery-editor-media-item/GalleryEditorMediaItem.styles.d.ts +3 -0
  126. package/lib/types/components/gallery-editor/gallery-editor-item/gallery-editor-media-item/GalleryEditorMediaItem.types.d.ts +30 -0
  127. package/lib/types/components/gallery-editor/gallery-editor-item/gallery-editor-preview-item/GalleryEditorPreviewItem.d.ts +4 -0
  128. package/lib/types/components/gallery-editor/gallery-editor-item/gallery-editor-preview-item/GalleryEditorPreviewItem.styles.d.ts +10 -0
  129. package/lib/types/components/gallery-editor/gallery-editor-item/gallery-editor-preview-item/GalleryEditorPreviewItem.types.d.ts +22 -0
  130. package/lib/types/components/gallery-viewer/GalleryViewer.d.ts +4 -0
  131. package/lib/types/components/gallery-viewer/GalleryViewer.styles.d.ts +7 -0
  132. package/lib/types/components/gallery-viewer/GalleryViewer.types.d.ts +26 -0
  133. package/lib/types/components/gallery-viewer/gallery-viewer-item/GalleryViewerItem.d.ts +4 -0
  134. package/lib/types/components/gallery-viewer/gallery-viewer-item/GalleryViewerItem.styles.d.ts +2 -0
  135. package/lib/types/components/gallery-viewer/gallery-viewer-item/GalleryViewerItem.types.d.ts +41 -0
  136. package/lib/types/components/media-content/MediaContent.d.ts +4 -0
  137. package/lib/types/components/media-content/MediaContent.styles.d.ts +13 -0
  138. package/lib/types/components/media-content/MediaContent.types.d.ts +40 -0
  139. package/lib/types/index.d.ts +5 -0
  140. package/lib/types/types/gallery.d.ts +9 -0
  141. package/lib/types/utils/gallery.d.ts +12 -0
  142. package/package.json +2 -2
  143. package/lib/cjs/components/Gallery.styles.js.map +0 -1
  144. package/lib/cjs/components/add-file/AddFile.js.map +0 -1
  145. package/lib/cjs/components/add-file/AddFile.styles.js.map +0 -1
  146. package/lib/cjs/components/gallery-item/GalleryItem.js +0 -44
  147. package/lib/cjs/components/gallery-item/GalleryItem.js.map +0 -1
  148. package/lib/cjs/components/gallery-item/GalleryItem.styles.js +0 -51
  149. package/lib/cjs/components/gallery-item/GalleryItem.styles.js.map +0 -1
  150. package/lib/cjs/components/gallery-item/media-item/MediaItem.js +0 -52
  151. package/lib/cjs/components/gallery-item/media-item/MediaItem.js.map +0 -1
  152. package/lib/cjs/components/gallery-item/media-item/MediaItem.styles.js +0 -62
  153. package/lib/cjs/components/gallery-item/media-item/MediaItem.styles.js.map +0 -1
  154. package/lib/cjs/components/gallery-item/preview-item/PreviewItem.js +0 -45
  155. package/lib/cjs/components/gallery-item/preview-item/PreviewItem.js.map +0 -1
  156. package/lib/cjs/components/gallery-item/preview-item/PreviewItem.styles.js +0 -43
  157. package/lib/cjs/components/gallery-item/preview-item/PreviewItem.styles.js.map +0 -1
  158. package/lib/esm/components/Gallery.styles.js.map +0 -1
  159. package/lib/esm/components/add-file/AddFile.js.map +0 -1
  160. package/lib/esm/components/add-file/AddFile.styles.js.map +0 -1
  161. package/lib/esm/components/gallery-item/GalleryItem.js +0 -36
  162. package/lib/esm/components/gallery-item/GalleryItem.js.map +0 -1
  163. package/lib/esm/components/gallery-item/GalleryItem.styles.js +0 -44
  164. package/lib/esm/components/gallery-item/GalleryItem.styles.js.map +0 -1
  165. package/lib/esm/components/gallery-item/media-item/MediaItem.js +0 -42
  166. package/lib/esm/components/gallery-item/media-item/MediaItem.js.map +0 -1
  167. package/lib/esm/components/gallery-item/media-item/MediaItem.styles.js +0 -55
  168. package/lib/esm/components/gallery-item/media-item/MediaItem.styles.js.map +0 -1
  169. package/lib/esm/components/gallery-item/preview-item/PreviewItem.js +0 -38
  170. package/lib/esm/components/gallery-item/preview-item/PreviewItem.js.map +0 -1
  171. package/lib/esm/components/gallery-item/preview-item/PreviewItem.styles.js.map +0 -1
  172. package/lib/types/components/Gallery.styles.d.ts +0 -10
  173. package/lib/types/components/add-file/AddFile.d.ts +0 -9
  174. package/lib/types/components/gallery-item/GalleryItem.d.ts +0 -30
  175. package/lib/types/components/gallery-item/GalleryItem.styles.d.ts +0 -5
  176. package/lib/types/components/gallery-item/media-item/MediaItem.d.ts +0 -22
  177. package/lib/types/components/gallery-item/media-item/MediaItem.styles.d.ts +0 -16
  178. package/lib/types/components/gallery-item/preview-item/PreviewItem.d.ts +0 -14
  179. package/lib/types/components/gallery-item/preview-item/PreviewItem.styles.d.ts +0 -10
  180. /package/lib/cjs/components/{add-file → gallery-editor/add-file}/AddFile.js +0 -0
  181. /package/lib/cjs/components/{add-file → gallery-editor/add-file}/AddFile.styles.js +0 -0
  182. /package/lib/esm/components/{add-file → gallery-editor/add-file}/AddFile.js +0 -0
  183. /package/lib/esm/components/{add-file → gallery-editor/add-file}/AddFile.styles.js +0 -0
  184. /package/lib/types/components/{add-file → gallery-editor/add-file}/AddFile.styles.d.ts +0 -0
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyledMotionGalleryEditorPreviewItem = exports.StyledGalleryEditorPreviewItemLoadingIcon = exports.StyledGalleryEditorPreviewItemImageWrapper = exports.StyledGalleryEditorPreviewItemImage = void 0;
7
+ var _react = require("motion/react");
8
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ const StyledMotionGalleryEditorPreviewItem = exports.StyledMotionGalleryEditorPreviewItem = (0, _styledComponents.default)(_react.motion.div)`
11
+ display: flex;
12
+ width: 100%;
13
+ height: 100%;
14
+ `;
15
+ const StyledGalleryEditorPreviewItemImageWrapper = exports.StyledGalleryEditorPreviewItemImageWrapper = _styledComponents.default.div`
16
+ display: flex;
17
+ width: 100%;
18
+ height: 100%;
19
+ aspect-ratio: ${({
20
+ $ratio
21
+ }) => $ratio};
22
+ `;
23
+ const StyledGalleryEditorPreviewItemImage = exports.StyledGalleryEditorPreviewItemImage = _styledComponents.default.img`
24
+ background-color: ${({
25
+ theme
26
+ }) => theme['101']};
27
+ box-shadow: 0 0 0 1px
28
+ rgba(${({
29
+ theme
30
+ }) => theme['009-rgb']}, 0.08)
31
+ inset;
32
+ z-index: 1;
33
+ width: 100%;
34
+ height: 100%;
35
+ object-fit: cover;
36
+ `;
37
+ const StyledGalleryEditorPreviewItemLoadingIcon = exports.StyledGalleryEditorPreviewItemLoadingIcon = _styledComponents.default.div`
38
+ position: absolute;
39
+ z-index: 2;
40
+ top: 50%;
41
+ left: 50%;
42
+ transform: translate(-50%, -50%);
43
+ `;
44
+ //# sourceMappingURL=GalleryEditorPreviewItem.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GalleryEditorPreviewItem.styles.js","names":["_react","require","_styledComponents","_interopRequireDefault","e","__esModule","default","StyledMotionGalleryEditorPreviewItem","exports","styled","motion","div","StyledGalleryEditorPreviewItemImageWrapper","$ratio","StyledGalleryEditorPreviewItemImage","img","theme","StyledGalleryEditorPreviewItemLoadingIcon"],"sources":["../../../../../../src/components/gallery-editor/gallery-editor-item/gallery-editor-preview-item/GalleryEditorPreviewItem.styles.ts"],"sourcesContent":["import type { WithTheme } from '@chayns-components/core';\nimport { motion } from 'motion/react';\nimport styled from 'styled-components';\n\nexport const StyledMotionGalleryEditorPreviewItem = styled(motion.div)`\n display: flex;\n width: 100%;\n height: 100%;\n`;\n\nexport const StyledGalleryEditorPreviewItemImageWrapper = styled.div<{ $ratio: number }>`\n display: flex;\n width: 100%;\n height: 100%;\n aspect-ratio: ${({ $ratio }) => $ratio};\n`;\n\ntype StyledGalleryEditorPreviewItemImageProps = WithTheme<unknown>;\n\nexport const StyledGalleryEditorPreviewItemImage = styled.img<StyledGalleryEditorPreviewItemImageProps>`\n background-color: ${({ theme }: StyledGalleryEditorPreviewItemImageProps) => theme['101']};\n box-shadow: 0 0 0 1px\n rgba(${({ theme }: StyledGalleryEditorPreviewItemImageProps) => theme['009-rgb']}, 0.08)\n inset;\n z-index: 1;\n width: 100%;\n height: 100%;\n object-fit: cover;\n`;\n\nexport const StyledGalleryEditorPreviewItemLoadingIcon = styled.div`\n position: absolute;\n z-index: 2;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n`;\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAuC,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhC,MAAMG,oCAAoC,GAAAC,OAAA,CAAAD,oCAAA,GAAG,IAAAE,yBAAM,EAACC,aAAM,CAACC,GAAG,CAAC;AACtE;AACA;AACA;AACA,CAAC;AAEM,MAAMC,0CAA0C,GAAAJ,OAAA,CAAAI,0CAAA,GAAGH,yBAAM,CAACE,GAAuB;AACxF;AACA;AACA;AACA,oBAAoB,CAAC;EAAEE;AAAO,CAAC,KAAKA,MAAM;AAC1C,CAAC;AAIM,MAAMC,mCAAmC,GAAAN,OAAA,CAAAM,mCAAA,GAAGL,yBAAM,CAACM,GAA6C;AACvG,wBAAwB,CAAC;EAAEC;AAAgD,CAAC,KAAKA,KAAK,CAAC,KAAK,CAAC;AAC7F;AACA,eAAe,CAAC;EAAEA;AAAgD,CAAC,KAAKA,KAAK,CAAC,SAAS,CAAC;AACxF;AACA;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAMC,yCAAyC,GAAAT,OAAA,CAAAS,yCAAA,GAAGR,yBAAM,CAACE,GAAG;AACnE;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=GalleryEditorPreviewItem.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GalleryEditorPreviewItem.types.js","names":[],"sources":["../../../../../../src/components/gallery-editor/gallery-editor-item/gallery-editor-preview-item/GalleryEditorPreviewItem.types.ts"],"sourcesContent":["import type { InternalFileItem } from '@chayns-components/core';\n\n/**\n * Props for a preview tile while a file is uploading.\n */\nexport interface GalleryEditorPreviewItemProps {\n /**\n * Provides the internal file item that contains the preview URL.\n * @description\n * This item is expected to describe a local upload that already has a generated preview image.\n * @example\n * <GalleryEditorPreviewItem fileItem={fileItem} ratio={1} />\n */\n fileItem: InternalFileItem;\n /**\n * Defines the aspect ratio that should be reserved for the preview.\n * @description\n * The preview keeps this ratio reserved while the upload is still in progress.\n * @example\n * <GalleryEditorPreviewItem fileItem={fileItem} ratio={1.5} />\n */\n ratio: number;\n}\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _GalleryViewerItem = _interopRequireDefault(require("./gallery-viewer-item/GalleryViewerItem"));
9
+ var _GalleryViewer = require("./GalleryViewer.styles");
10
+ var _gallery = require("../../utils/gallery");
11
+ var _gallery2 = require("../../types/gallery");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
+ const GalleryViewer = ({
15
+ files,
16
+ viewMode = _gallery2.GalleryViewMode.GRID
17
+ }) => {
18
+ const fileItems = files ?? [];
19
+ const ratio = (0, _react.useMemo)(() => (0, _gallery.getGalleryRatio)(fileItems), [fileItems]);
20
+ const handleOpenFiles = (0, _react.useCallback)(file => {
21
+ (0, _gallery.openKnownFiles)(fileItems, file);
22
+ }, [fileItems]);
23
+ const visibleItems = fileItems.slice(0, 4);
24
+ return /*#__PURE__*/_react.default.createElement(_GalleryViewer.StyledGalleryViewer, null, /*#__PURE__*/_react.default.createElement(_GalleryViewer.StyledGalleryViewerItemWrapper, {
25
+ $ratio: ratio,
26
+ $itemCount: fileItems.length,
27
+ $viewMode: viewMode
28
+ }, visibleItems.map((file, index) => /*#__PURE__*/_react.default.createElement(_GalleryViewerItem.default, {
29
+ key: (0, _gallery.getGalleryViewerKey)(file, index),
30
+ fileItem: file,
31
+ onClick: handleOpenFiles,
32
+ ratio: (0, _gallery.getReadOnlyItemRatio)({
33
+ fileItems,
34
+ index,
35
+ viewMode
36
+ }),
37
+ remainingItemsLength: fileItems.length > 4 && index === 3 ? fileItems.length : undefined
38
+ }))));
39
+ };
40
+ GalleryViewer.displayName = 'GalleryViewer';
41
+ var _default = exports.default = GalleryViewer;
42
+ //# sourceMappingURL=GalleryViewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GalleryViewer.js","names":["_react","_interopRequireWildcard","require","_GalleryViewerItem","_interopRequireDefault","_GalleryViewer","_gallery","_gallery2","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","GalleryViewer","files","viewMode","GalleryViewMode","GRID","fileItems","ratio","useMemo","getGalleryRatio","handleOpenFiles","useCallback","file","openKnownFiles","visibleItems","slice","createElement","StyledGalleryViewer","StyledGalleryViewerItemWrapper","$ratio","$itemCount","length","$viewMode","map","index","key","getGalleryViewerKey","fileItem","onClick","getReadOnlyItemRatio","remainingItemsLength","undefined","displayName","_default","exports"],"sources":["../../../../src/components/gallery-viewer/GalleryViewer.tsx"],"sourcesContent":["import type { FileItem } from '@chayns-components/core';\nimport React, { FC, useCallback, useMemo } from 'react';\nimport GalleryViewerItem from './gallery-viewer-item/GalleryViewerItem';\nimport { StyledGalleryViewer, StyledGalleryViewerItemWrapper } from './GalleryViewer.styles';\nimport type { GalleryViewerProps } from './GalleryViewer.types';\nimport {\n getGalleryRatio,\n getGalleryViewerKey,\n getReadOnlyItemRatio,\n openKnownFiles,\n} from '../../utils/gallery';\nimport { GalleryViewMode } from '../../types/gallery';\n\nconst GalleryViewer: FC<GalleryViewerProps> = ({ files, viewMode = GalleryViewMode.GRID }) => {\n const fileItems = files ?? [];\n\n const ratio = useMemo(() => getGalleryRatio(fileItems), [fileItems]);\n\n const handleOpenFiles = useCallback(\n (file: FileItem) => {\n openKnownFiles(fileItems, file);\n },\n [fileItems],\n );\n\n const visibleItems = fileItems.slice(0, 4);\n\n return (\n <StyledGalleryViewer>\n <StyledGalleryViewerItemWrapper\n $ratio={ratio}\n $itemCount={fileItems.length}\n $viewMode={viewMode}\n >\n {visibleItems.map((file, index) => (\n <GalleryViewerItem\n key={getGalleryViewerKey(file, index)}\n fileItem={file}\n onClick={handleOpenFiles}\n ratio={getReadOnlyItemRatio({ fileItems, index, viewMode })}\n remainingItemsLength={\n fileItems.length > 4 && index === 3 ? fileItems.length : undefined\n }\n />\n ))}\n </StyledGalleryViewerItemWrapper>\n </StyledGalleryViewer>\n );\n};\n\nGalleryViewer.displayName = 'GalleryViewer';\n\nexport default GalleryViewer;\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AAMA,IAAAK,SAAA,GAAAL,OAAA;AAAsD,SAAAE,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,CAAAO,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ,CAAA,GAAAO,CAAA,CAAAM,GAAA,CAAAb,CAAA,EAAAS,CAAA,gBAAAN,CAAA,IAAAH,CAAA,gBAAAG,CAAA,OAAAW,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAG,CAAA,OAAAK,CAAA,IAAAD,CAAA,GAAAS,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAG,CAAA,OAAAK,CAAA,CAAAI,GAAA,IAAAJ,CAAA,CAAAK,GAAA,IAAAN,CAAA,CAAAE,CAAA,EAAAN,CAAA,EAAAK,CAAA,IAAAC,CAAA,CAAAN,CAAA,IAAAH,CAAA,CAAAG,CAAA,WAAAM,CAAA,KAAAT,CAAA,EAAAG,CAAA;AAEtD,MAAMgB,aAAqC,GAAGA,CAAC;EAAEC,KAAK;EAAEC,QAAQ,GAAGC,yBAAe,CAACC;AAAK,CAAC,KAAK;EAC1F,MAAMC,SAAS,GAAGJ,KAAK,IAAI,EAAE;EAE7B,MAAMK,KAAK,GAAG,IAAAC,cAAO,EAAC,MAAM,IAAAC,wBAAe,EAACH,SAAS,CAAC,EAAE,CAACA,SAAS,CAAC,CAAC;EAEpE,MAAMI,eAAe,GAAG,IAAAC,kBAAW,EAC9BC,IAAc,IAAK;IAChB,IAAAC,uBAAc,EAACP,SAAS,EAAEM,IAAI,CAAC;EACnC,CAAC,EACD,CAACN,SAAS,CACd,CAAC;EAED,MAAMQ,YAAY,GAAGR,SAAS,CAACS,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;EAE1C,oBACIzC,MAAA,CAAAU,OAAA,CAAAgC,aAAA,CAACrC,cAAA,CAAAsC,mBAAmB,qBAChB3C,MAAA,CAAAU,OAAA,CAAAgC,aAAA,CAACrC,cAAA,CAAAuC,8BAA8B;IAC3BC,MAAM,EAAEZ,KAAM;IACda,UAAU,EAAEd,SAAS,CAACe,MAAO;IAC7BC,SAAS,EAAEnB;EAAS,GAEnBW,YAAY,CAACS,GAAG,CAAC,CAACX,IAAI,EAAEY,KAAK,kBAC1BlD,MAAA,CAAAU,OAAA,CAAAgC,aAAA,CAACvC,kBAAA,CAAAO,OAAiB;IACdyC,GAAG,EAAE,IAAAC,4BAAmB,EAACd,IAAI,EAAEY,KAAK,CAAE;IACtCG,QAAQ,EAAEf,IAAK;IACfgB,OAAO,EAAElB,eAAgB;IACzBH,KAAK,EAAE,IAAAsB,6BAAoB,EAAC;MAAEvB,SAAS;MAAEkB,KAAK;MAAErB;IAAS,CAAC,CAAE;IAC5D2B,oBAAoB,EAChBxB,SAAS,CAACe,MAAM,GAAG,CAAC,IAAIG,KAAK,KAAK,CAAC,GAAGlB,SAAS,CAACe,MAAM,GAAGU;EAC5D,CACJ,CACJ,CAC2B,CACf,CAAC;AAE9B,CAAC;AAED9B,aAAa,CAAC+B,WAAW,GAAG,eAAe;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAlD,OAAA,GAE7BiB,aAAa","ignoreList":[]}
@@ -3,20 +3,20 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.StyledGalleryItemWrapper = exports.StyledGalleryEditModeWrapper = exports.StyledGallery = void 0;
6
+ exports.StyledGalleryViewerItemWrapper = exports.StyledGalleryViewer = void 0;
7
7
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
8
- var _gallery = require("../types/gallery");
8
+ var _gallery = require("../../types/gallery");
9
9
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
10
- const StyledGallery = exports.StyledGallery = _styledComponents.default.div`
10
+ const StyledGalleryViewer = exports.StyledGalleryViewer = _styledComponents.default.div`
11
11
  width: 100%;
12
12
  `;
13
- const StyledGalleryItemWrapper = exports.StyledGalleryItemWrapper = _styledComponents.default.div`
13
+ const StyledGalleryViewerItemWrapper = exports.StyledGalleryViewerItemWrapper = _styledComponents.default.div`
14
14
  display: grid;
15
15
  gap: 5px;
16
16
 
17
17
  ${({
18
18
  $viewMode,
19
- $uploadedFileLength
19
+ $itemCount
20
20
  }) => {
21
21
  if ($viewMode === _gallery.GalleryViewMode.GRID) {
22
22
  return (0, _styledComponents.css)`
@@ -25,7 +25,7 @@ const StyledGalleryItemWrapper = exports.StyledGalleryItemWrapper = _styledCompo
25
25
  }
26
26
 
27
27
  ${() => {
28
- switch ($uploadedFileLength) {
28
+ switch ($itemCount) {
29
29
  case 1:
30
30
  return (0, _styledComponents.css)`
31
31
  grid-template-columns: 1fr;
@@ -55,7 +55,7 @@ const StyledGalleryItemWrapper = exports.StyledGalleryItemWrapper = _styledCompo
55
55
  }}
56
56
  `;
57
57
  }
58
- switch ($uploadedFileLength) {
58
+ switch ($itemCount) {
59
59
  case 1:
60
60
  return (0, _styledComponents.css)`
61
61
  grid-template-columns: 1fr;
@@ -78,16 +78,11 @@ const StyledGalleryItemWrapper = exports.StyledGalleryItemWrapper = _styledCompo
78
78
  }
79
79
  }}
80
80
 
81
- aspect-ratio: ${({
81
+ ${({
82
+ $itemCount,
82
83
  $ratio
83
- }) => $ratio};
84
- `;
85
- const StyledGalleryEditModeWrapper = exports.StyledGalleryEditModeWrapper = _styledComponents.default.div`
86
- display: grid;
87
- grid-template-columns: ${({
88
- $fileMinWidth
89
- }) => `repeat(auto-fill, minmax(${$fileMinWidth}px, 1fr))`};
90
- grid-auto-rows: 1fr;
91
- gap: 6px;
84
+ }) => $itemCount > 0 ? (0, _styledComponents.css)`
85
+ aspect-ratio: ${$ratio};
86
+ ` : ''}
92
87
  `;
93
- //# sourceMappingURL=Gallery.styles.js.map
88
+ //# sourceMappingURL=GalleryViewer.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GalleryViewer.styles.js","names":["_styledComponents","_interopRequireWildcard","require","_gallery","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","StyledGalleryViewer","exports","styled","div","StyledGalleryViewerItemWrapper","$viewMode","$itemCount","GalleryViewMode","GRID","css","$ratio"],"sources":["../../../../src/components/gallery-viewer/GalleryViewer.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { GalleryViewMode } from '../../types/gallery';\n\nexport const StyledGalleryViewer = styled.div`\n width: 100%;\n`;\n\nexport const StyledGalleryViewerItemWrapper = styled.div<{\n $itemCount: number;\n $ratio: number;\n $viewMode: GalleryViewMode;\n}>`\n display: grid;\n gap: 5px;\n\n ${({ $viewMode, $itemCount }) => {\n if ($viewMode === GalleryViewMode.GRID) {\n return css`\n > div:first-child {\n grid-column: 1 / -1;\n }\n\n ${() => {\n switch ($itemCount) {\n case 1:\n return css`\n grid-template-columns: 1fr;\n `;\n case 2:\n return css`\n grid-template-columns: repeat(2, 1fr);\n > div:first-child {\n grid-column: span 1;\n }\n `;\n case 3:\n return css`\n grid-template-columns: repeat(2, 1fr);\n > div:first-child {\n grid-column: span 2;\n }\n `;\n default:\n return css`\n grid-template-columns: repeat(3, minmax(0, 1fr));\n > div:not(:first-child) {\n grid-column: span 1;\n }\n `;\n }\n }}\n `;\n }\n\n switch ($itemCount) {\n case 1:\n return css`\n grid-template-columns: 1fr;\n `;\n case 2:\n return css`\n grid-template-columns: repeat(2, 1fr);\n `;\n case 3:\n return css`\n grid-template-columns: repeat(3, 1fr);\n `;\n default:\n return css`\n grid-template-columns: repeat(2, 1fr);\n > div:nth-child(-n + 2) {\n grid-row: 1;\n }\n `;\n }\n }}\n\n ${({ $itemCount, $ratio }) =>\n $itemCount > 0\n ? css`\n aspect-ratio: ${$ratio};\n `\n : ''}\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAAsD,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAE/C,MAAMkB,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAGE,yBAAM,CAACC,GAAG;AAC7C;AACA,CAAC;AAEM,MAAMC,8BAA8B,GAAAH,OAAA,CAAAG,8BAAA,GAAGF,yBAAM,CAACC,GAInD;AACF;AACA;AACA;AACA,MAAM,CAAC;EAAEE,SAAS;EAAEC;AAAW,CAAC,KAAK;EAC7B,IAAID,SAAS,KAAKE,wBAAe,CAACC,IAAI,EAAE;IACpC,OAAO,IAAAC,qBAAG;AACtB;AACA;AACA;AACA;AACA,kBAAkB,MAAM;MACJ,QAAQH,UAAU;QACd,KAAK,CAAC;UACF,OAAO,IAAAG,qBAAG;AACtC;AACA,6BAA6B;QACL,KAAK,CAAC;UACF,OAAO,IAAAA,qBAAG;AACtC;AACA;AACA;AACA;AACA,6BAA6B;QACL,KAAK,CAAC;UACF,OAAO,IAAAA,qBAAG;AACtC;AACA;AACA;AACA;AACA,6BAA6B;QACL;UACI,OAAO,IAAAA,qBAAG;AACtC;AACA;AACA;AACA;AACA,6BAA6B;MACT;IACJ,CAAC;AACjB,aAAa;EACL;EAEA,QAAQH,UAAU;IACd,KAAK,CAAC;MACF,OAAO,IAAAG,qBAAG;AAC1B;AACA,iBAAiB;IACL,KAAK,CAAC;MACF,OAAO,IAAAA,qBAAG;AAC1B;AACA,iBAAiB;IACL,KAAK,CAAC;MACF,OAAO,IAAAA,qBAAG;AAC1B;AACA,iBAAiB;IACL;MACI,OAAO,IAAAA,qBAAG;AAC1B;AACA;AACA;AACA;AACA,iBAAiB;EACT;AACJ,CAAC;AACL;AACA,MAAM,CAAC;EAAEH,UAAU;EAAEI;AAAO,CAAC,KACrBJ,UAAU,GAAG,CAAC,GACR,IAAAG,qBAAG;AACjB,kCAAkCC,MAAM;AACxC,eAAe,GACD,EAAE;AAChB,CAAC","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=GalleryViewer.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GalleryViewer.types.js","names":[],"sources":["../../../../src/components/gallery-viewer/GalleryViewer.types.ts"],"sourcesContent":["import type { FileItem } from '@chayns-components/core';\nimport type { GalleryViewMode } from '../../types/gallery';\n\n/**\n * Props for the prop-driven read-only gallery viewer.\n */\nexport interface GalleryViewerProps {\n /**\n * Provides the already known media items that should be rendered without local upload state.\n * @description\n * The viewer renders these files directly from props and does not mirror them into local component state.\n * @example\n * <GalleryViewer files={files} />\n * @optional\n */\n files?: FileItem[];\n /**\n * Defines how the media tiles are arranged in read-only mode.\n * @description\n * Use this prop to switch between the supported viewer layouts for known media.\n * @default GalleryViewMode.GRID\n * @example\n * <GalleryViewer files={files} viewMode={GalleryViewMode.SQUARE} />\n * @optional\n */\n viewMode?: GalleryViewMode;\n}\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _MediaContent = _interopRequireDefault(require("../../media-content/MediaContent"));
9
+ var _GalleryViewerItem = require("./GalleryViewerItem.styles");
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ const GalleryViewerItem = ({
12
+ fileItem,
13
+ ratio = 1,
14
+ remainingItemsLength,
15
+ onClick
16
+ }) => /*#__PURE__*/_react.default.createElement(_GalleryViewerItem.StyledGalleryViewerItem, null, /*#__PURE__*/_react.default.createElement(_MediaContent.default, {
17
+ file: fileItem.file,
18
+ onClick: () => onClick(fileItem),
19
+ ratio: ratio
20
+ }), remainingItemsLength && /*#__PURE__*/_react.default.createElement(_GalleryViewerItem.StyledGalleryViewerMoreItemsIndicator, {
21
+ onClick: () => onClick(fileItem)
22
+ }, /*#__PURE__*/_react.default.createElement("p", null, `+ ${remainingItemsLength - 3}`)));
23
+ GalleryViewerItem.displayName = 'GalleryViewerItem';
24
+ var _default = exports.default = GalleryViewerItem;
25
+ //# sourceMappingURL=GalleryViewerItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GalleryViewerItem.js","names":["_react","_interopRequireDefault","require","_MediaContent","_GalleryViewerItem","e","__esModule","default","GalleryViewerItem","fileItem","ratio","remainingItemsLength","onClick","createElement","StyledGalleryViewerItem","file","StyledGalleryViewerMoreItemsIndicator","displayName","_default","exports"],"sources":["../../../../../src/components/gallery-viewer/gallery-viewer-item/GalleryViewerItem.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport MediaContent from '../../media-content/MediaContent';\nimport {\n StyledGalleryViewerItem,\n StyledGalleryViewerMoreItemsIndicator,\n} from './GalleryViewerItem.styles';\nimport type { GalleryViewerItemProps } from './GalleryViewerItem.types';\n\nconst GalleryViewerItem: FC<GalleryViewerItemProps> = ({\n fileItem,\n ratio = 1,\n remainingItemsLength,\n onClick,\n}) => (\n <StyledGalleryViewerItem>\n <MediaContent file={fileItem.file} onClick={() => onClick(fileItem)} ratio={ratio} />\n {remainingItemsLength && (\n <StyledGalleryViewerMoreItemsIndicator onClick={() => onClick(fileItem)}>\n <p>{`+ ${remainingItemsLength - 3}`}</p>\n </StyledGalleryViewerMoreItemsIndicator>\n )}\n </StyledGalleryViewerItem>\n);\n\nGalleryViewerItem.displayName = 'GalleryViewerItem';\n\nexport default GalleryViewerItem;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AAGoC,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGpC,MAAMG,iBAA6C,GAAGA,CAAC;EACnDC,QAAQ;EACRC,KAAK,GAAG,CAAC;EACTC,oBAAoB;EACpBC;AACJ,CAAC,kBACGZ,MAAA,CAAAO,OAAA,CAAAM,aAAA,CAACT,kBAAA,CAAAU,uBAAuB,qBACpBd,MAAA,CAAAO,OAAA,CAAAM,aAAA,CAACV,aAAA,CAAAI,OAAY;EAACQ,IAAI,EAAEN,QAAQ,CAACM,IAAK;EAACH,OAAO,EAAEA,CAAA,KAAMA,OAAO,CAACH,QAAQ,CAAE;EAACC,KAAK,EAAEA;AAAM,CAAE,CAAC,EACpFC,oBAAoB,iBACjBX,MAAA,CAAAO,OAAA,CAAAM,aAAA,CAACT,kBAAA,CAAAY,qCAAqC;EAACJ,OAAO,EAAEA,CAAA,KAAMA,OAAO,CAACH,QAAQ;AAAE,gBACpET,MAAA,CAAAO,OAAA,CAAAM,aAAA,YAAI,KAAKF,oBAAoB,GAAG,CAAC,EAAM,CACJ,CAEtB,CAC5B;AAEDH,iBAAiB,CAACS,WAAW,GAAG,mBAAmB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAZ,OAAA,GAErCC,iBAAiB","ignoreList":[]}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyledGalleryViewerMoreItemsIndicator = exports.StyledGalleryViewerItem = void 0;
7
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ const StyledGalleryViewerItem = exports.StyledGalleryViewerItem = _styledComponents.default.div`
10
+ display: flex;
11
+ position: relative;
12
+ height: 100%;
13
+ width: 100%;
14
+ `;
15
+ const StyledGalleryViewerMoreItemsIndicator = exports.StyledGalleryViewerMoreItemsIndicator = _styledComponents.default.div`
16
+ position: absolute;
17
+ z-index: 2;
18
+ height: 100%;
19
+ width: 100%;
20
+ display: flex;
21
+ justify-content: center;
22
+ align-items: center;
23
+ backdrop-filter: brightness(40%);
24
+
25
+ p {
26
+ font-size: 40px;
27
+ color: white;
28
+ }
29
+ `;
30
+ //# sourceMappingURL=GalleryViewerItem.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GalleryViewerItem.styles.js","names":["_styledComponents","_interopRequireDefault","require","e","__esModule","default","StyledGalleryViewerItem","exports","styled","div","StyledGalleryViewerMoreItemsIndicator"],"sources":["../../../../../src/components/gallery-viewer/gallery-viewer-item/GalleryViewerItem.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledGalleryViewerItem = styled.div`\n display: flex;\n position: relative;\n height: 100%;\n width: 100%;\n`;\n\nexport const StyledGalleryViewerMoreItemsIndicator = styled.div`\n position: absolute;\n z-index: 2;\n height: 100%;\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n backdrop-filter: brightness(40%);\n\n p {\n font-size: 40px;\n color: white;\n }\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhC,MAAMG,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAGE,yBAAM,CAACC,GAAG;AACjD;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAMC,qCAAqC,GAAAH,OAAA,CAAAG,qCAAA,GAAGF,yBAAM,CAACC,GAAG;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=GalleryViewerItem.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GalleryViewerItem.types.js","names":[],"sources":["../../../../../src/components/gallery-viewer/gallery-viewer-item/GalleryViewerItem.types.ts"],"sourcesContent":["import type { FileItem } from '@chayns-components/core';\n\n/**\n * Props for a dedicated read-only gallery tile.\n */\nexport interface GalleryViewerItemProps {\n /**\n * Provides the uploaded media that should be rendered.\n * @description\n * The viewer item renders only already known media and never deals with upload-specific transient state.\n * @example\n * <GalleryViewerItem fileItem={file} onClick={handleOpen} />\n */\n fileItem: FileItem;\n /**\n * Defines the aspect ratio that should be reserved for the tile.\n * @description\n * Use this prop to reserve a deterministic tile height for stable read-only rendering.\n * @default 1\n * @example\n * <GalleryViewerItem fileItem={file} onClick={handleOpen} ratio={1.5} />\n * @optional\n */\n ratio?: number;\n /**\n * Provides the total item count when the last visible tile should show a remaining-items overlay.\n * @description\n * When this prop is set on the last visible viewer tile, the tile displays the `+n` overlay for hidden items.\n * @example\n * <GalleryViewerItem fileItem={file} onClick={handleOpen} remainingItemsLength={5} />\n * @optional\n */\n remainingItemsLength?: number;\n /**\n * Is called when the tile is selected.\n * @description\n * The viewer uses this callback to open the selected file inside the slideshow flow.\n * @example\n * <GalleryViewerItem fileItem={file} onClick={handleOpen} />\n */\n onClick: (file: FileItem) => void;\n}\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _core = require("@chayns-components/core");
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _MediaContent = require("./MediaContent.styles");
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ const MediaContent = ({
12
+ file,
13
+ ratio,
14
+ onClick,
15
+ playIconSize = 50
16
+ }) => 'thumbnailUrl' in file ? /*#__PURE__*/_react.default.createElement(_MediaContent.StyledMediaContentVideoWrapper, {
17
+ onClick: onClick,
18
+ $ratio: ratio
19
+ }, /*#__PURE__*/_react.default.createElement(_MediaContent.StyledMediaContentPlayIcon, null, /*#__PURE__*/_react.default.createElement(_core.Icon, {
20
+ size: playIconSize,
21
+ icons: ['fa fa-play']
22
+ })), /*#__PURE__*/_react.default.createElement(_MediaContent.StyledMediaContentVideo, {
23
+ poster: file.thumbnailUrl
24
+ }, /*#__PURE__*/_react.default.createElement("source", {
25
+ src: file.url,
26
+ type: "video/mp4"
27
+ }))) : /*#__PURE__*/_react.default.createElement(_MediaContent.StyledMediaContentImageWrapper, {
28
+ onClick: onClick,
29
+ $ratio: ratio
30
+ }, /*#__PURE__*/_react.default.createElement(_MediaContent.StyledMediaContentImage, {
31
+ draggable: false,
32
+ src: file.url
33
+ }));
34
+ MediaContent.displayName = 'MediaContent';
35
+ var _default = exports.default = MediaContent;
36
+ //# sourceMappingURL=MediaContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaContent.js","names":["_core","require","_react","_interopRequireDefault","_MediaContent","e","__esModule","default","MediaContent","file","ratio","onClick","playIconSize","createElement","StyledMediaContentVideoWrapper","$ratio","StyledMediaContentPlayIcon","Icon","size","icons","StyledMediaContentVideo","poster","thumbnailUrl","src","url","type","StyledMediaContentImageWrapper","StyledMediaContentImage","draggable","displayName","_default","exports"],"sources":["../../../../src/components/media-content/MediaContent.tsx"],"sourcesContent":["import { Icon } from '@chayns-components/core';\nimport React, { FC } from 'react';\nimport {\n StyledMediaContentImage,\n StyledMediaContentImageWrapper,\n StyledMediaContentPlayIcon,\n StyledMediaContentVideo,\n StyledMediaContentVideoWrapper,\n} from './MediaContent.styles';\nimport type { MediaContentProps } from './MediaContent.types';\n\nconst MediaContent: FC<MediaContentProps> = ({ file, ratio, onClick, playIconSize = 50 }) =>\n 'thumbnailUrl' in file ? (\n <StyledMediaContentVideoWrapper onClick={onClick} $ratio={ratio}>\n <StyledMediaContentPlayIcon>\n <Icon size={playIconSize} icons={['fa fa-play']} />\n </StyledMediaContentPlayIcon>\n <StyledMediaContentVideo poster={file.thumbnailUrl}>\n <source src={file.url} type=\"video/mp4\" />\n </StyledMediaContentVideo>\n </StyledMediaContentVideoWrapper>\n ) : (\n <StyledMediaContentImageWrapper onClick={onClick} $ratio={ratio}>\n <StyledMediaContentImage draggable={false} src={file.url} />\n </StyledMediaContentImageWrapper>\n );\n\nMediaContent.displayName = 'MediaContent';\n\nexport default MediaContent;\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAM+B,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAG/B,MAAMG,YAAmC,GAAGA,CAAC;EAAEC,IAAI;EAAEC,KAAK;EAAEC,OAAO;EAAEC,YAAY,GAAG;AAAG,CAAC,KACpF,cAAc,IAAIH,IAAI,gBAClBP,MAAA,CAAAK,OAAA,CAAAM,aAAA,CAACT,aAAA,CAAAU,8BAA8B;EAACH,OAAO,EAAEA,OAAQ;EAACI,MAAM,EAAEL;AAAM,gBAC5DR,MAAA,CAAAK,OAAA,CAAAM,aAAA,CAACT,aAAA,CAAAY,0BAA0B,qBACvBd,MAAA,CAAAK,OAAA,CAAAM,aAAA,CAACb,KAAA,CAAAiB,IAAI;EAACC,IAAI,EAAEN,YAAa;EAACO,KAAK,EAAE,CAAC,YAAY;AAAE,CAAE,CAC1B,CAAC,eAC7BjB,MAAA,CAAAK,OAAA,CAAAM,aAAA,CAACT,aAAA,CAAAgB,uBAAuB;EAACC,MAAM,EAAEZ,IAAI,CAACa;AAAa,gBAC/CpB,MAAA,CAAAK,OAAA,CAAAM,aAAA;EAAQU,GAAG,EAAEd,IAAI,CAACe,GAAI;EAACC,IAAI,EAAC;AAAW,CAAE,CACpB,CACG,CAAC,gBAEjCvB,MAAA,CAAAK,OAAA,CAAAM,aAAA,CAACT,aAAA,CAAAsB,8BAA8B;EAACf,OAAO,EAAEA,OAAQ;EAACI,MAAM,EAAEL;AAAM,gBAC5DR,MAAA,CAAAK,OAAA,CAAAM,aAAA,CAACT,aAAA,CAAAuB,uBAAuB;EAACC,SAAS,EAAE,KAAM;EAACL,GAAG,EAAEd,IAAI,CAACe;AAAI,CAAE,CAC/B,CACnC;AAELhB,YAAY,CAACqB,WAAW,GAAG,cAAc;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAxB,OAAA,GAE3BC,YAAY","ignoreList":[]}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyledMediaContentVideoWrapper = exports.StyledMediaContentVideo = exports.StyledMediaContentPlayIcon = exports.StyledMediaContentImageWrapper = exports.StyledMediaContentImage = void 0;
7
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ const StyledMediaContentVideoWrapper = exports.StyledMediaContentVideoWrapper = _styledComponents.default.div`
10
+ display: flex;
11
+ width: 100%;
12
+ height: 100%;
13
+ aspect-ratio: ${({
14
+ $ratio
15
+ }) => $ratio};
16
+ `;
17
+ const StyledMediaContentImageWrapper = exports.StyledMediaContentImageWrapper = _styledComponents.default.div`
18
+ display: flex;
19
+ width: 100%;
20
+ height: 100%;
21
+ aspect-ratio: ${({
22
+ $ratio
23
+ }) => $ratio};
24
+ `;
25
+ const StyledMediaContentImage = exports.StyledMediaContentImage = _styledComponents.default.img`
26
+ background-color: ${({
27
+ theme
28
+ }) => theme['101']};
29
+ box-shadow: 0 0 0 1px
30
+ rgba(${({
31
+ theme
32
+ }) => theme['009-rgb']}, 0.08) inset;
33
+ z-index: 1;
34
+ width: 100%;
35
+ height: 100%;
36
+ object-fit: cover;
37
+ `;
38
+ const StyledMediaContentVideo = exports.StyledMediaContentVideo = _styledComponents.default.video`
39
+ background-color: ${({
40
+ theme
41
+ }) => theme['101']};
42
+ box-shadow: 0 0 0 1px
43
+ rgba(${({
44
+ theme
45
+ }) => theme['009-rgb']}, 0.08) inset;
46
+ width: 100%;
47
+ object-fit: cover;
48
+ `;
49
+ const StyledMediaContentPlayIcon = exports.StyledMediaContentPlayIcon = _styledComponents.default.div`
50
+ position: absolute;
51
+ z-index: 2;
52
+ top: 50%;
53
+ left: 50%;
54
+ transform: translate(-50%, -50%);
55
+ `;
56
+ //# sourceMappingURL=MediaContent.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaContent.styles.js","names":["_styledComponents","_interopRequireDefault","require","e","__esModule","default","StyledMediaContentVideoWrapper","exports","styled","div","$ratio","StyledMediaContentImageWrapper","StyledMediaContentImage","img","theme","StyledMediaContentVideo","video","StyledMediaContentPlayIcon"],"sources":["../../../../src/components/media-content/MediaContent.styles.ts"],"sourcesContent":["import type { WithTheme } from '@chayns-components/core';\nimport styled from 'styled-components';\n\nexport const StyledMediaContentVideoWrapper = styled.div<{ $ratio: number }>`\n display: flex;\n width: 100%;\n height: 100%;\n aspect-ratio: ${({ $ratio }) => $ratio};\n`;\n\nexport const StyledMediaContentImageWrapper = styled.div<{ $ratio: number }>`\n display: flex;\n width: 100%;\n height: 100%;\n aspect-ratio: ${({ $ratio }) => $ratio};\n`;\n\ntype StyledMediaContentVideoProps = WithTheme<unknown>;\n\ntype StyledMediaContentImageProps = WithTheme<unknown>;\n\nexport const StyledMediaContentImage = styled.img<StyledMediaContentImageProps>`\n background-color: ${({ theme }: StyledMediaContentImageProps) => theme['101']};\n box-shadow: 0 0 0 1px\n rgba(${({ theme }: StyledMediaContentImageProps) => theme['009-rgb']}, 0.08) inset;\n z-index: 1;\n width: 100%;\n height: 100%;\n object-fit: cover;\n`;\n\nexport const StyledMediaContentVideo = styled.video<StyledMediaContentVideoProps>`\n background-color: ${({ theme }: StyledMediaContentVideoProps) => theme['101']};\n box-shadow: 0 0 0 1px\n rgba(${({ theme }: StyledMediaContentVideoProps) => theme['009-rgb']}, 0.08) inset;\n width: 100%;\n object-fit: cover;\n`;\n\nexport const StyledMediaContentPlayIcon = styled.div`\n position: absolute;\n z-index: 2;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n`;\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhC,MAAMG,8BAA8B,GAAAC,OAAA,CAAAD,8BAAA,GAAGE,yBAAM,CAACC,GAAuB;AAC5E;AACA;AACA;AACA,oBAAoB,CAAC;EAAEC;AAAO,CAAC,KAAKA,MAAM;AAC1C,CAAC;AAEM,MAAMC,8BAA8B,GAAAJ,OAAA,CAAAI,8BAAA,GAAGH,yBAAM,CAACC,GAAuB;AAC5E;AACA;AACA;AACA,oBAAoB,CAAC;EAAEC;AAAO,CAAC,KAAKA,MAAM;AAC1C,CAAC;AAMM,MAAME,uBAAuB,GAAAL,OAAA,CAAAK,uBAAA,GAAGJ,yBAAM,CAACK,GAAiC;AAC/E,wBAAwB,CAAC;EAAEC;AAAoC,CAAC,KAAKA,KAAK,CAAC,KAAK,CAAC;AACjF;AACA,eAAe,CAAC;EAAEA;AAAoC,CAAC,KAAKA,KAAK,CAAC,SAAS,CAAC;AAC5E;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAMC,uBAAuB,GAAAR,OAAA,CAAAQ,uBAAA,GAAGP,yBAAM,CAACQ,KAAmC;AACjF,wBAAwB,CAAC;EAAEF;AAAoC,CAAC,KAAKA,KAAK,CAAC,KAAK,CAAC;AACjF;AACA,eAAe,CAAC;EAAEA;AAAoC,CAAC,KAAKA,KAAK,CAAC,SAAS,CAAC;AAC5E;AACA;AACA,CAAC;AAEM,MAAMG,0BAA0B,GAAAV,OAAA,CAAAU,0BAAA,GAAGT,yBAAM,CAACC,GAAG;AACpD;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=MediaContent.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaContent.types.js","names":[],"sources":["../../../../src/components/media-content/MediaContent.types.ts"],"sourcesContent":["import type { FileItem } from '@chayns-components/core';\n\n/**\n * Props for the low-level uploaded media renderer shared by viewer and editor.\n */\nexport interface MediaContentProps {\n /**\n * Provides the uploaded media item that should be rendered.\n * @description\n * This low-level renderer accepts already known image or video data and does not handle upload-specific state.\n * @example\n * <MediaContent file={file.file} onClick={handleOpen} ratio={1} />\n */\n file: FileItem['file'];\n /**\n * Defines the aspect ratio that should be reserved for the media.\n * @description\n * The surrounding tile uses this value to reserve a deterministic media height before the asset finishes loading.\n * @example\n * <MediaContent file={file.file} onClick={handleOpen} ratio={1.5} />\n */\n ratio: number;\n /**\n * Is called when the media tile is selected.\n * @description\n * Use this callback to react to clicks on the rendered image or video tile.\n * @example\n * <MediaContent file={file.file} onClick={() => console.log('open')} ratio={1} />\n */\n onClick: () => void;\n /**\n * Defines the size of the video play icon.\n * @description\n * This prop only affects rendered videos. Image tiles ignore it.\n * @default 50\n * @example\n * <MediaContent file={file.file} onClick={handleOpen} playIconSize={30} ratio={1} />\n * @optional\n */\n playIconSize?: number;\n}\n"],"mappings":"","ignoreList":[]}
package/lib/cjs/index.js CHANGED
@@ -9,13 +9,27 @@ Object.defineProperty(exports, "Gallery", {
9
9
  return _Gallery.default;
10
10
  }
11
11
  });
12
+ Object.defineProperty(exports, "GalleryEditor", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _GalleryEditor.default;
16
+ }
17
+ });
12
18
  Object.defineProperty(exports, "GalleryViewMode", {
13
19
  enumerable: true,
14
20
  get: function () {
15
21
  return _gallery.GalleryViewMode;
16
22
  }
17
23
  });
24
+ Object.defineProperty(exports, "GalleryViewer", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _GalleryViewer.default;
28
+ }
29
+ });
18
30
  var _Gallery = _interopRequireDefault(require("./components/Gallery"));
31
+ var _GalleryEditor = _interopRequireDefault(require("./components/gallery-editor/GalleryEditor"));
32
+ var _GalleryViewer = _interopRequireDefault(require("./components/gallery-viewer/GalleryViewer"));
19
33
  var _gallery = require("./types/gallery");
20
34
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
21
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_Gallery","_interopRequireDefault","require","_gallery","e","__esModule","default"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Gallery } from './components/Gallery';\nexport { GalleryViewMode } from './types/gallery';\n"],"mappings":";;;;;;;;;;;;;;;;;AAEA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAAkD,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_Gallery","_interopRequireDefault","require","_GalleryEditor","_GalleryViewer","_gallery","e","__esModule","default"],"sources":["../../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\n\nexport { default as Gallery } from './components/Gallery';\nexport { default as GalleryEditor } from './components/gallery-editor/GalleryEditor';\nexport { default as GalleryViewer } from './components/gallery-viewer/GalleryViewer';\nexport type { GalleryProps } from './components/Gallery.types';\nexport type { GalleryEditorProps } from './components/gallery-editor/GalleryEditor.types';\nexport type { GalleryViewerProps } from './components/gallery-viewer/GalleryViewer.types';\nexport { GalleryViewMode } from './types/gallery';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,cAAA,GAAAH,sBAAA,CAAAC,OAAA;AAIA,IAAAG,QAAA,GAAAH,OAAA;AAAkD,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
@@ -4,8 +4,17 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.GalleryViewMode = void 0;
7
+ /**
8
+ * Defines the available gallery layouts for read-only rendering.
9
+ */
7
10
  let GalleryViewMode = exports.GalleryViewMode = /*#__PURE__*/function (GalleryViewMode) {
11
+ /**
12
+ * Arranges visible items in a square-first layout.
13
+ */
8
14
  GalleryViewMode[GalleryViewMode["SQUARE"] = 0] = "SQUARE";
15
+ /**
16
+ * Arranges visible items in the gallery grid layout.
17
+ */
9
18
  GalleryViewMode[GalleryViewMode["GRID"] = 1] = "GRID";
10
19
  return GalleryViewMode;
11
20
  }({});
@@ -1 +1 @@
1
- {"version":3,"file":"gallery.js","names":["GalleryViewMode","exports"],"sources":["../../../src/types/gallery.ts"],"sourcesContent":["export enum GalleryViewMode {\n SQUARE,\n GRID,\n}\n"],"mappings":";;;;;;IAAYA,eAAe,GAAAC,OAAA,CAAAD,eAAA,0BAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAfA,eAAe,CAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"gallery.js","names":["GalleryViewMode","exports"],"sources":["../../../src/types/gallery.ts"],"sourcesContent":["/**\n * Defines the available gallery layouts for read-only rendering.\n */\nexport enum GalleryViewMode {\n /**\n * Arranges visible items in a square-first layout.\n */\n SQUARE,\n /**\n * Arranges visible items in the gallery grid layout.\n */\n GRID,\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAFA,IAGYA,eAAe,GAAAC,OAAA,CAAAD,eAAA,0BAAfA,eAAe;EACvB;AACJ;AACA;EAHYA,eAAe,CAAfA,eAAe;EAKvB;AACJ;AACA;EAPYA,eAAe,CAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA","ignoreList":[]}