@internetarchive/elements 0.2.14-webdev-8969.0 → 0.2.14-webdev-9022.0

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 (284) hide show
  1. package/README.md +20 -0
  2. package/dist/src/elements/ia-image-viewer/ia-image-viewer.d.ts +147 -0
  3. package/dist/src/elements/ia-image-viewer/ia-image-viewer.d.ts.map +1 -0
  4. package/dist/src/elements/ia-image-viewer/ia-image-viewer.js +533 -0
  5. package/dist/src/elements/ia-image-viewer/ia-image-viewer.js.map +1 -0
  6. package/dist/src/elements/ia-image-viewer/ia-imgview-controls.d.ts +22 -0
  7. package/dist/src/elements/ia-image-viewer/ia-imgview-controls.d.ts.map +1 -0
  8. package/dist/src/elements/ia-image-viewer/ia-imgview-controls.js +145 -0
  9. package/dist/src/elements/ia-image-viewer/ia-imgview-controls.js.map +1 -0
  10. package/dist/src/elements/ia-image-viewer/ia-imgview-slide.d.ts +44 -0
  11. package/dist/src/elements/ia-image-viewer/ia-imgview-slide.d.ts.map +1 -0
  12. package/dist/src/elements/ia-image-viewer/ia-imgview-slide.js +213 -0
  13. package/dist/src/elements/ia-image-viewer/ia-imgview-slide.js.map +1 -0
  14. package/dist/src/elements/ia-image-viewer/image-viewer-gestures.d.ts +79 -0
  15. package/dist/src/elements/ia-image-viewer/image-viewer-gestures.d.ts.map +1 -0
  16. package/dist/src/elements/ia-image-viewer/image-viewer-gestures.js +254 -0
  17. package/dist/src/elements/ia-image-viewer/image-viewer-gestures.js.map +1 -0
  18. package/dist/src/elements/ia-image-viewer/models.d.ts +20 -0
  19. package/dist/src/elements/ia-image-viewer/models.d.ts.map +1 -0
  20. package/dist/src/elements/ia-image-viewer/models.js.map +1 -0
  21. package/dist/src/elements/ia-item-navigator/ia-item-navigator.d.ts +97 -0
  22. package/dist/src/elements/ia-item-navigator/ia-item-navigator.d.ts.map +1 -0
  23. package/dist/src/elements/ia-item-navigator/ia-item-navigator.js +588 -0
  24. package/dist/src/elements/ia-item-navigator/ia-item-navigator.js.map +1 -0
  25. package/dist/src/elements/ia-item-navigator/ia-itemnav-menu-button.d.ts +39 -0
  26. package/dist/src/elements/ia-item-navigator/ia-itemnav-menu-button.d.ts.map +1 -0
  27. package/dist/src/elements/ia-item-navigator/ia-itemnav-menu-button.js +249 -0
  28. package/dist/src/elements/ia-item-navigator/ia-itemnav-menu-button.js.map +1 -0
  29. package/dist/src/elements/ia-item-navigator/ia-itemnav-menu-slider.d.ts +55 -0
  30. package/dist/src/elements/ia-item-navigator/ia-itemnav-menu-slider.d.ts.map +1 -0
  31. package/dist/src/elements/ia-item-navigator/ia-itemnav-menu-slider.js +394 -0
  32. package/dist/src/elements/ia-item-navigator/ia-itemnav-menu-slider.js.map +1 -0
  33. package/dist/src/elements/ia-item-navigator/ia-itemnav-no-theater-available.d.ts +20 -0
  34. package/dist/src/elements/ia-item-navigator/ia-itemnav-no-theater-available.d.ts.map +1 -0
  35. package/dist/src/elements/ia-item-navigator/ia-itemnav-no-theater-available.js +102 -0
  36. package/dist/src/elements/ia-item-navigator/ia-itemnav-no-theater-available.js.map +1 -0
  37. package/dist/src/elements/ia-item-navigator/icons/collapse-sidebar.svg +7 -0
  38. package/dist/src/elements/ia-item-navigator/icons/ellipses.svg +7 -0
  39. package/dist/src/elements/ia-item-navigator/icons.d.ts +13 -0
  40. package/dist/src/elements/ia-item-navigator/icons.d.ts.map +1 -0
  41. package/dist/src/elements/ia-item-navigator/icons.js +16 -0
  42. package/dist/src/elements/ia-item-navigator/icons.js.map +1 -0
  43. package/dist/src/elements/ia-item-navigator/interfaces/event-interfaces.d.ts +41 -0
  44. package/dist/src/elements/ia-item-navigator/interfaces/event-interfaces.d.ts.map +1 -0
  45. package/dist/src/elements/ia-item-navigator/interfaces/event-interfaces.js +2 -0
  46. package/dist/src/elements/ia-item-navigator/interfaces/event-interfaces.js.map +1 -0
  47. package/dist/src/elements/ia-item-navigator/interfaces/menu-interfaces.d.ts +23 -0
  48. package/dist/src/elements/ia-item-navigator/interfaces/menu-interfaces.d.ts.map +1 -0
  49. package/dist/src/elements/ia-item-navigator/interfaces/menu-interfaces.js +2 -0
  50. package/dist/src/elements/ia-item-navigator/interfaces/menu-interfaces.js.map +1 -0
  51. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-share-panel.d.ts +47 -0
  52. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-share-panel.d.ts.map +1 -0
  53. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-share-panel.js +352 -0
  54. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-share-panel.js.map +1 -0
  55. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-sort-files-button.d.ts +22 -0
  56. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-sort-files-button.d.ts.map +1 -0
  57. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-sort-files-button.js +137 -0
  58. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-sort-files-button.js.map +1 -0
  59. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-viewable-files-panel.d.ts +40 -0
  60. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-viewable-files-panel.d.ts.map +1 -0
  61. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-viewable-files-panel.js +217 -0
  62. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-viewable-files-panel.js.map +1 -0
  63. package/dist/src/elements/ia-item-navigator/menus/icons/email.svg +6 -0
  64. package/dist/src/elements/ia-item-navigator/menus/icons/facebook.svg +6 -0
  65. package/dist/src/elements/ia-item-navigator/menus/icons/link.svg +6 -0
  66. package/dist/src/elements/ia-item-navigator/menus/icons/list.svg +3 -0
  67. package/dist/src/elements/ia-item-navigator/menus/icons/pinterest.svg +6 -0
  68. package/dist/src/elements/ia-item-navigator/menus/icons/share.svg +6 -0
  69. package/dist/src/elements/ia-item-navigator/menus/icons/sort-asc.svg +22 -0
  70. package/dist/src/elements/ia-item-navigator/menus/icons/sort-desc.svg +21 -0
  71. package/dist/src/elements/ia-item-navigator/menus/icons/sort-neutral.svg +13 -0
  72. package/dist/src/elements/ia-item-navigator/menus/icons/tumblr.svg +6 -0
  73. package/dist/src/elements/ia-item-navigator/menus/icons/twitter.svg +6 -0
  74. package/dist/src/elements/ia-item-navigator/menus/icons/viewable-files.svg +6 -0
  75. package/dist/src/elements/ia-item-navigator/menus/models.d.ts +17 -0
  76. package/dist/src/elements/ia-item-navigator/menus/models.d.ts.map +1 -0
  77. package/dist/src/elements/ia-item-navigator/menus/models.js.map +1 -0
  78. package/dist/src/elements/ia-item-navigator/menus/share-icons.d.ts +16 -0
  79. package/dist/src/elements/ia-item-navigator/menus/share-icons.d.ts.map +1 -0
  80. package/dist/src/elements/ia-item-navigator/menus/share-icons.js +23 -0
  81. package/dist/src/elements/ia-item-navigator/menus/share-icons.js.map +1 -0
  82. package/dist/src/elements/ia-status-indicator/ia-status-indicator.d.ts +51 -5
  83. package/dist/src/elements/ia-status-indicator/ia-status-indicator.d.ts.map +1 -1
  84. package/dist/src/elements/ia-status-indicator/ia-status-indicator.js +156 -16
  85. package/dist/src/elements/ia-status-indicator/ia-status-indicator.js.map +1 -1
  86. package/dist/src/elements/ia-status-indicator/icons/audio.svg +5 -0
  87. package/dist/src/elements/ia-status-indicator/icons/collection.svg +5 -0
  88. package/dist/src/elements/ia-status-indicator/icons/etree.svg +5 -0
  89. package/dist/src/elements/ia-status-indicator/icons/images.svg +6 -0
  90. package/dist/src/elements/ia-status-indicator/icons/search.svg +10 -0
  91. package/dist/src/elements/ia-status-indicator/icons/software.svg +6 -0
  92. package/dist/src/elements/ia-status-indicator/icons/texts.svg +6 -0
  93. package/dist/src/elements/ia-status-indicator/icons/tv.svg +5 -0
  94. package/dist/src/elements/ia-status-indicator/icons/video.svg +6 -0
  95. package/dist/src/elements/ia-status-indicator/icons/web.svg +6 -0
  96. package/dist/src/elements/index.d.ts +5 -27
  97. package/dist/src/elements/index.d.ts.map +1 -1
  98. package/dist/src/elements/index.js +5 -27
  99. package/dist/src/elements/index.js.map +1 -1
  100. package/dist/src/util/masked-icon.d.ts +24 -0
  101. package/dist/src/util/masked-icon.d.ts.map +1 -0
  102. package/dist/src/util/masked-icon.js +30 -0
  103. package/dist/src/util/masked-icon.js.map +1 -0
  104. package/dist/src/util/prefers-reduced-motion.d.ts +10 -0
  105. package/dist/src/util/prefers-reduced-motion.d.ts.map +1 -0
  106. package/dist/src/util/prefers-reduced-motion.js +12 -0
  107. package/dist/src/util/prefers-reduced-motion.js.map +1 -0
  108. package/package.json +1 -1
  109. package/dist/src/elements/ia-audio-element/ia-audio-element.d.ts +0 -72
  110. package/dist/src/elements/ia-audio-element/ia-audio-element.d.ts.map +0 -1
  111. package/dist/src/elements/ia-audio-element/ia-audio-element.js +0 -173
  112. package/dist/src/elements/ia-audio-element/ia-audio-element.js.map +0 -1
  113. package/dist/src/elements/ia-audio-element/models.d.ts +0 -13
  114. package/dist/src/elements/ia-audio-element/models.d.ts.map +0 -1
  115. package/dist/src/elements/ia-audio-element/models.js.map +0 -1
  116. package/dist/src/elements/ia-expandable-search-bar/assets/clear-results.d.ts +0 -3
  117. package/dist/src/elements/ia-expandable-search-bar/assets/clear-results.d.ts.map +0 -1
  118. package/dist/src/elements/ia-expandable-search-bar/assets/clear-results.js +0 -28
  119. package/dist/src/elements/ia-expandable-search-bar/assets/clear-results.js.map +0 -1
  120. package/dist/src/elements/ia-expandable-search-bar/assets/disclosure.d.ts +0 -3
  121. package/dist/src/elements/ia-expandable-search-bar/assets/disclosure.d.ts.map +0 -1
  122. package/dist/src/elements/ia-expandable-search-bar/assets/disclosure.js +0 -26
  123. package/dist/src/elements/ia-expandable-search-bar/assets/disclosure.js.map +0 -1
  124. package/dist/src/elements/ia-expandable-search-bar/assets/magnifying-glass.d.ts +0 -3
  125. package/dist/src/elements/ia-expandable-search-bar/assets/magnifying-glass.d.ts.map +0 -1
  126. package/dist/src/elements/ia-expandable-search-bar/assets/magnifying-glass.js +0 -22
  127. package/dist/src/elements/ia-expandable-search-bar/assets/magnifying-glass.js.map +0 -1
  128. package/dist/src/elements/ia-expandable-search-bar/ia-expandable-search-bar.d.ts +0 -53
  129. package/dist/src/elements/ia-expandable-search-bar/ia-expandable-search-bar.d.ts.map +0 -1
  130. package/dist/src/elements/ia-expandable-search-bar/ia-expandable-search-bar.js +0 -352
  131. package/dist/src/elements/ia-expandable-search-bar/ia-expandable-search-bar.js.map +0 -1
  132. package/dist/src/elements/ia-expandable-search-bar/ia-quick-search.d.ts +0 -19
  133. package/dist/src/elements/ia-expandable-search-bar/ia-quick-search.d.ts.map +0 -1
  134. package/dist/src/elements/ia-expandable-search-bar/ia-quick-search.js +0 -115
  135. package/dist/src/elements/ia-expandable-search-bar/ia-quick-search.js.map +0 -1
  136. package/dist/src/elements/ia-expandable-search-bar/models.d.ts +0 -13
  137. package/dist/src/elements/ia-expandable-search-bar/models.d.ts.map +0 -1
  138. package/dist/src/elements/ia-expandable-search-bar/models.js.map +0 -1
  139. package/dist/src/elements/ia-playback-controls/assets/next-section.d.ts +0 -3
  140. package/dist/src/elements/ia-playback-controls/assets/next-section.d.ts.map +0 -1
  141. package/dist/src/elements/ia-playback-controls/assets/next-section.js +0 -16
  142. package/dist/src/elements/ia-playback-controls/assets/next-section.js.map +0 -1
  143. package/dist/src/elements/ia-playback-controls/assets/pause.d.ts +0 -3
  144. package/dist/src/elements/ia-playback-controls/assets/pause.d.ts.map +0 -1
  145. package/dist/src/elements/ia-playback-controls/assets/pause.js +0 -17
  146. package/dist/src/elements/ia-playback-controls/assets/pause.js.map +0 -1
  147. package/dist/src/elements/ia-playback-controls/assets/play.d.ts +0 -3
  148. package/dist/src/elements/ia-playback-controls/assets/play.d.ts.map +0 -1
  149. package/dist/src/elements/ia-playback-controls/assets/play.js +0 -18
  150. package/dist/src/elements/ia-playback-controls/assets/play.js.map +0 -1
  151. package/dist/src/elements/ia-playback-controls/assets/playback-speed.d.ts +0 -3
  152. package/dist/src/elements/ia-playback-controls/assets/playback-speed.d.ts.map +0 -1
  153. package/dist/src/elements/ia-playback-controls/assets/playback-speed.js +0 -28
  154. package/dist/src/elements/ia-playback-controls/assets/playback-speed.js.map +0 -1
  155. package/dist/src/elements/ia-playback-controls/assets/previous-section.d.ts +0 -3
  156. package/dist/src/elements/ia-playback-controls/assets/previous-section.d.ts.map +0 -1
  157. package/dist/src/elements/ia-playback-controls/assets/previous-section.js +0 -16
  158. package/dist/src/elements/ia-playback-controls/assets/previous-section.js.map +0 -1
  159. package/dist/src/elements/ia-playback-controls/assets/replay.d.ts +0 -3
  160. package/dist/src/elements/ia-playback-controls/assets/replay.d.ts.map +0 -1
  161. package/dist/src/elements/ia-playback-controls/assets/replay.js +0 -28
  162. package/dist/src/elements/ia-playback-controls/assets/replay.js.map +0 -1
  163. package/dist/src/elements/ia-playback-controls/assets/skip-ahead.d.ts +0 -3
  164. package/dist/src/elements/ia-playback-controls/assets/skip-ahead.d.ts.map +0 -1
  165. package/dist/src/elements/ia-playback-controls/assets/skip-ahead.js +0 -29
  166. package/dist/src/elements/ia-playback-controls/assets/skip-ahead.js.map +0 -1
  167. package/dist/src/elements/ia-playback-controls/assets/volume-full.d.ts +0 -3
  168. package/dist/src/elements/ia-playback-controls/assets/volume-full.d.ts.map +0 -1
  169. package/dist/src/elements/ia-playback-controls/assets/volume-full.js +0 -19
  170. package/dist/src/elements/ia-playback-controls/assets/volume-full.js.map +0 -1
  171. package/dist/src/elements/ia-playback-controls/assets/volume-medium.d.ts +0 -3
  172. package/dist/src/elements/ia-playback-controls/assets/volume-medium.d.ts.map +0 -1
  173. package/dist/src/elements/ia-playback-controls/assets/volume-medium.js +0 -24
  174. package/dist/src/elements/ia-playback-controls/assets/volume-medium.js.map +0 -1
  175. package/dist/src/elements/ia-playback-controls/assets/volume-mute.d.ts +0 -3
  176. package/dist/src/elements/ia-playback-controls/assets/volume-mute.d.ts.map +0 -1
  177. package/dist/src/elements/ia-playback-controls/assets/volume-mute.js +0 -35
  178. package/dist/src/elements/ia-playback-controls/assets/volume-mute.js.map +0 -1
  179. package/dist/src/elements/ia-playback-controls/ia-playback-controls.d.ts +0 -57
  180. package/dist/src/elements/ia-playback-controls/ia-playback-controls.d.ts.map +0 -1
  181. package/dist/src/elements/ia-playback-controls/ia-playback-controls.js +0 -320
  182. package/dist/src/elements/ia-playback-controls/ia-playback-controls.js.map +0 -1
  183. package/dist/src/elements/ia-playback-controls/models.d.ts +0 -13
  184. package/dist/src/elements/ia-playback-controls/models.d.ts.map +0 -1
  185. package/dist/src/elements/ia-playback-controls/models.js +0 -12
  186. package/dist/src/elements/ia-playback-controls/models.js.map +0 -1
  187. package/dist/src/elements/ia-radio-player/assets/next-result.d.ts +0 -3
  188. package/dist/src/elements/ia-radio-player/assets/next-result.d.ts.map +0 -1
  189. package/dist/src/elements/ia-radio-player/assets/next-result.js +0 -27
  190. package/dist/src/elements/ia-radio-player/assets/next-result.js.map +0 -1
  191. package/dist/src/elements/ia-radio-player/assets/previous-result.d.ts +0 -3
  192. package/dist/src/elements/ia-radio-player/assets/previous-result.d.ts.map +0 -1
  193. package/dist/src/elements/ia-radio-player/assets/previous-result.js +0 -27
  194. package/dist/src/elements/ia-radio-player/assets/previous-result.js.map +0 -1
  195. package/dist/src/elements/ia-radio-player/ia-radio-player.d.ts +0 -130
  196. package/dist/src/elements/ia-radio-player/ia-radio-player.d.ts.map +0 -1
  197. package/dist/src/elements/ia-radio-player/ia-radio-player.js +0 -748
  198. package/dist/src/elements/ia-radio-player/ia-radio-player.js.map +0 -1
  199. package/dist/src/elements/ia-radio-player/ia-search-results-switcher.d.ts +0 -22
  200. package/dist/src/elements/ia-radio-player/ia-search-results-switcher.d.ts.map +0 -1
  201. package/dist/src/elements/ia-radio-player/ia-search-results-switcher.js +0 -137
  202. package/dist/src/elements/ia-radio-player/ia-search-results-switcher.js.map +0 -1
  203. package/dist/src/elements/ia-radio-player/models.d.ts +0 -29
  204. package/dist/src/elements/ia-radio-player/models.d.ts.map +0 -1
  205. package/dist/src/elements/ia-radio-player/models.js +0 -2
  206. package/dist/src/elements/ia-radio-player/models.js.map +0 -1
  207. package/dist/src/elements/ia-radio-player/search/backends/full-text-search-backend.d.ts +0 -38
  208. package/dist/src/elements/ia-radio-player/search/backends/full-text-search-backend.d.ts.map +0 -1
  209. package/dist/src/elements/ia-radio-player/search/backends/full-text-search-backend.js +0 -64
  210. package/dist/src/elements/ia-radio-player/search/backends/full-text-search-backend.js.map +0 -1
  211. package/dist/src/elements/ia-radio-player/search/backends/full-text-search-response.d.ts +0 -94
  212. package/dist/src/elements/ia-radio-player/search/backends/full-text-search-response.d.ts.map +0 -1
  213. package/dist/src/elements/ia-radio-player/search/backends/full-text-search-response.js +0 -56
  214. package/dist/src/elements/ia-radio-player/search/backends/full-text-search-response.js.map +0 -1
  215. package/dist/src/elements/ia-radio-player/search/backends/local-search-backend.d.ts +0 -15
  216. package/dist/src/elements/ia-radio-player/search/backends/local-search-backend.d.ts.map +0 -1
  217. package/dist/src/elements/ia-radio-player/search/backends/local-search-backend.js +0 -26
  218. package/dist/src/elements/ia-radio-player/search/backends/local-search-backend.js.map +0 -1
  219. package/dist/src/elements/ia-radio-player/search/backends/search-backend.d.ts +0 -12
  220. package/dist/src/elements/ia-radio-player/search/backends/search-backend.d.ts.map +0 -1
  221. package/dist/src/elements/ia-radio-player/search/backends/search-backend.js +0 -2
  222. package/dist/src/elements/ia-radio-player/search/backends/search-backend.js.map +0 -1
  223. package/dist/src/elements/ia-radio-player/search/models.d.ts +0 -38
  224. package/dist/src/elements/ia-radio-player/search/models.d.ts.map +0 -1
  225. package/dist/src/elements/ia-radio-player/search/models.js +0 -17
  226. package/dist/src/elements/ia-radio-player/search/models.js.map +0 -1
  227. package/dist/src/elements/ia-radio-player/search/search-handler.d.ts +0 -49
  228. package/dist/src/elements/ia-radio-player/search/search-handler.d.ts.map +0 -1
  229. package/dist/src/elements/ia-radio-player/search/search-handler.js +0 -128
  230. package/dist/src/elements/ia-radio-player/search/search-handler.js.map +0 -1
  231. package/dist/src/elements/ia-radio-player/search/search-helper.d.ts +0 -9
  232. package/dist/src/elements/ia-radio-player/search/search-helper.d.ts.map +0 -1
  233. package/dist/src/elements/ia-radio-player/search/search-helper.js +0 -15
  234. package/dist/src/elements/ia-radio-player/search/search-helper.js.map +0 -1
  235. package/dist/src/elements/ia-radio-player/search/transcript-index.d.ts +0 -45
  236. package/dist/src/elements/ia-radio-player/search/transcript-index.d.ts.map +0 -1
  237. package/dist/src/elements/ia-radio-player/search/transcript-index.js +0 -48
  238. package/dist/src/elements/ia-radio-player/search/transcript-index.js.map +0 -1
  239. package/dist/src/elements/ia-scrubber-bar/assets/next-section-marker.d.ts +0 -3
  240. package/dist/src/elements/ia-scrubber-bar/assets/next-section-marker.d.ts.map +0 -1
  241. package/dist/src/elements/ia-scrubber-bar/assets/next-section-marker.js +0 -18
  242. package/dist/src/elements/ia-scrubber-bar/assets/next-section-marker.js.map +0 -1
  243. package/dist/src/elements/ia-scrubber-bar/assets/previous-section-marker.d.ts +0 -3
  244. package/dist/src/elements/ia-scrubber-bar/assets/previous-section-marker.d.ts.map +0 -1
  245. package/dist/src/elements/ia-scrubber-bar/assets/previous-section-marker.js +0 -18
  246. package/dist/src/elements/ia-scrubber-bar/assets/previous-section-marker.js.map +0 -1
  247. package/dist/src/elements/ia-scrubber-bar/ia-scrubber-bar.d.ts +0 -82
  248. package/dist/src/elements/ia-scrubber-bar/ia-scrubber-bar.d.ts.map +0 -1
  249. package/dist/src/elements/ia-scrubber-bar/ia-scrubber-bar.js +0 -387
  250. package/dist/src/elements/ia-scrubber-bar/ia-scrubber-bar.js.map +0 -1
  251. package/dist/src/elements/ia-scrubber-bar/ia-section-marker.d.ts +0 -16
  252. package/dist/src/elements/ia-scrubber-bar/ia-section-marker.d.ts.map +0 -1
  253. package/dist/src/elements/ia-scrubber-bar/ia-section-marker.js +0 -109
  254. package/dist/src/elements/ia-scrubber-bar/ia-section-marker.js.map +0 -1
  255. package/dist/src/elements/ia-scrubber-bar/models.d.ts +0 -21
  256. package/dist/src/elements/ia-scrubber-bar/models.d.ts.map +0 -1
  257. package/dist/src/elements/ia-scrubber-bar/models.js +0 -20
  258. package/dist/src/elements/ia-scrubber-bar/models.js.map +0 -1
  259. package/dist/src/elements/ia-transcript-view/duration-formatter.d.ts +0 -13
  260. package/dist/src/elements/ia-transcript-view/duration-formatter.d.ts.map +0 -1
  261. package/dist/src/elements/ia-transcript-view/duration-formatter.js +0 -25
  262. package/dist/src/elements/ia-transcript-view/duration-formatter.js.map +0 -1
  263. package/dist/src/elements/ia-transcript-view/ia-transcript-entry.d.ts +0 -25
  264. package/dist/src/elements/ia-transcript-view/ia-transcript-entry.d.ts.map +0 -1
  265. package/dist/src/elements/ia-transcript-view/ia-transcript-entry.js +0 -51
  266. package/dist/src/elements/ia-transcript-view/ia-transcript-entry.js.map +0 -1
  267. package/dist/src/elements/ia-transcript-view/ia-transcript-view.d.ts +0 -81
  268. package/dist/src/elements/ia-transcript-view/ia-transcript-view.d.ts.map +0 -1
  269. package/dist/src/elements/ia-transcript-view/ia-transcript-view.js +0 -546
  270. package/dist/src/elements/ia-transcript-view/ia-transcript-view.js.map +0 -1
  271. package/dist/src/elements/ia-transcript-view/models.d.ts +0 -34
  272. package/dist/src/elements/ia-transcript-view/models.d.ts.map +0 -1
  273. package/dist/src/elements/ia-transcript-view/models.js +0 -38
  274. package/dist/src/elements/ia-transcript-view/models.js.map +0 -1
  275. package/dist/src/elements/ia-waveform-progress/ia-waveform-progress.d.ts +0 -62
  276. package/dist/src/elements/ia-waveform-progress/ia-waveform-progress.d.ts.map +0 -1
  277. package/dist/src/elements/ia-waveform-progress/ia-waveform-progress.js +0 -217
  278. package/dist/src/elements/ia-waveform-progress/ia-waveform-progress.js.map +0 -1
  279. package/dist/src/elements/ia-waveform-progress/models.d.ts +0 -13
  280. package/dist/src/elements/ia-waveform-progress/models.d.ts.map +0 -1
  281. package/dist/src/elements/ia-waveform-progress/models.js +0 -2
  282. package/dist/src/elements/ia-waveform-progress/models.js.map +0 -1
  283. /package/dist/src/elements/{ia-audio-element → ia-image-viewer}/models.js +0 -0
  284. /package/dist/src/elements/{ia-expandable-search-bar → ia-item-navigator/menus}/models.js +0 -0
@@ -0,0 +1,533 @@
1
+ import { __decorate } from "tslib";
2
+ import { css, html, LitElement, nothing, } from 'lit';
3
+ import { customElement, property, query, state } from 'lit/decorators.js';
4
+ import { classMap } from 'lit/directives/class-map.js';
5
+ import { keyed } from 'lit/directives/keyed.js';
6
+ import { msg, str } from '@lit/localize';
7
+ import themeStyles from '../../themes/theme-styles.js';
8
+ import { prefersReducedMotion } from '../../util/prefers-reduced-motion.js';
9
+ import { ImageViewerGestures } from './image-viewer-gestures.js';
10
+ import './ia-imgview-slide.js';
11
+ import './ia-imgview-controls.js';
12
+ /**
13
+ * A swipeable image carousel.
14
+ *
15
+ * Shows one image at a time from a list, with previous/next buttons, a
16
+ * counter, keyboard arrows, horizontal wheel scrolling and touch swipes.
17
+ * Clicking an image opens it in a new tab.
18
+ *
19
+ * The viewer holds no opinion about where the images came from: it takes a
20
+ * plain list of names and URLs, and reports the image it lands on through
21
+ * `imageChanged` so a host can mirror that into its own URL or analytics.
22
+ *
23
+ * @fires imageChanged - The viewer settled on a new image.
24
+ * @fires imageLoaded - An image the viewer showed finished loading.
25
+ * @fires imageLoadFailed - An image the viewer showed could not be loaded.
26
+ * Fires once per image until it loads successfully or the set changes.
27
+ * @fires imageActivated - An image was clicked. Cancelable: preventing it
28
+ * stops the default of opening the image in a new tab.
29
+ */
30
+ let IAImageViewer = class IAImageViewer extends LitElement {
31
+ constructor() {
32
+ super(...arguments);
33
+ this.images = [];
34
+ /** Read by the gesture controller to navigate relative to the current image. */
35
+ this.currentIndex = 0;
36
+ this.animating = false;
37
+ /**
38
+ * Incremented when an animation is interrupted to force the track element to
39
+ * be recreated via the `keyed()` directive, which guarantees the CSS
40
+ * animation restarts even if the direction is the same.
41
+ */
42
+ this.slideGeneration = 0;
43
+ /** Which edge just wrapped, if any. Drives the glow indicator. */
44
+ this.wrapEdge = null;
45
+ /**
46
+ * Images already reported as failed, so a broken image isn't counted again
47
+ * every time the viewer passes over it. Navigating back re-fires `error` on
48
+ * the recreated element, and the neighbouring slides staged during an
49
+ * animation or a drag load the same image too, so without this a single
50
+ * broken derivative reports several times a session.
51
+ *
52
+ * Cleared when the image set changes, which is the point a name stops
53
+ * standing for the same file.
54
+ */
55
+ this.reportedFailures = new Set();
56
+ this.slideTarget = null;
57
+ this.slideDirection = null;
58
+ this.gestures = new ImageViewerGestures(this);
59
+ }
60
+ get imageCount() {
61
+ return this.images.length;
62
+ }
63
+ /** The image currently on screen, if there is one. */
64
+ get currentImage() {
65
+ return this.images[this.currentIndex];
66
+ }
67
+ willUpdate(changed) {
68
+ if (changed.has('images') || changed.has('currentImageName')) {
69
+ const previous = changed.get('images');
70
+ this.currentIndex = this.indexToShow(changed, previous);
71
+ this.animating = false;
72
+ this.slideGeneration = 0;
73
+ this.slideTarget = null;
74
+ this.slideDirection = null;
75
+ this.wrapEdge = null;
76
+ this.reportedFailures.clear();
77
+ this.preloadAdjacentImages();
78
+ }
79
+ }
80
+ /**
81
+ * Where to land when the images or the requested name change.
82
+ *
83
+ * A new `currentImageName` is the host asking for a particular image, so it
84
+ * wins. A new `images` array on its own isn't: a host that builds its list
85
+ * in a getter hands over a fresh array on every render, which says nothing
86
+ * about the images having changed. So the viewer holds its place by name and
87
+ * only goes back to the start when the image it was showing is really gone.
88
+ */
89
+ indexToShow(changed, previousImages) {
90
+ if (changed.has('currentImageName') && this.currentImageName) {
91
+ const requested = this.images.findIndex((image) => image.name === this.currentImageName);
92
+ if (requested >= 0)
93
+ return requested;
94
+ }
95
+ const showing = previousImages?.[this.currentIndex]?.name;
96
+ if (showing) {
97
+ const stillThere = this.images.findIndex((image) => image.name === showing);
98
+ if (stillThere >= 0)
99
+ return stillThere;
100
+ }
101
+ const named = this.currentImageName
102
+ ? this.images.findIndex((image) => image.name === this.currentImageName)
103
+ : -1;
104
+ return named >= 0 ? named : 0;
105
+ }
106
+ render() {
107
+ if (this.images.length === 0)
108
+ return nothing;
109
+ const { dragging } = this.gestures;
110
+ const current = this.images[this.currentIndex];
111
+ const showControls = this.images.length > 1;
112
+ const trackClasses = {
113
+ 'slide-track': true,
114
+ 'sliding-next': this.animating && !dragging && this.slideDirection === 'next',
115
+ 'sliding-prev': this.animating && !dragging && this.slideDirection === 'prev',
116
+ dragging,
117
+ };
118
+ const prevIndex = (this.currentIndex - 1 + this.images.length) % this.images.length;
119
+ const nextIndex = (this.currentIndex + 1) % this.images.length;
120
+ const slideTarget = this.animating && !dragging && this.slideTarget !== null
121
+ ? this.images[this.slideTarget]
122
+ : null;
123
+ const prevImage = dragging ? this.images[prevIndex] : slideTarget;
124
+ const nextImage = dragging ? this.images[nextIndex] : slideTarget;
125
+ const showPrev = dragging || (slideTarget !== null && this.slideDirection === 'prev');
126
+ const showNext = dragging || (slideTarget !== null && this.slideDirection === 'next');
127
+ const displayIndex = this.animating && this.slideTarget !== null
128
+ ? this.slideTarget
129
+ : this.currentIndex;
130
+ return html `
131
+ <div class="viewer">
132
+ <div class="image-area">
133
+ ${this.wrapEdge
134
+ ? html `<div
135
+ class="wrap-glow ${this.wrapEdge === 'start'
136
+ ? 'glow-start'
137
+ : 'glow-end'}"
138
+ @animationend=${this.onWrapGlowEnd}
139
+ ></div>`
140
+ : nothing}
141
+ ${keyed(this.slideGeneration, html `<div
142
+ class=${classMap(trackClasses)}
143
+ @animationend=${this.onSlideEnd}
144
+ @imageLoaded=${this.onImageLoaded}
145
+ @imageFailed=${this.onImageFailed}
146
+ @imageActivated=${this.onImageActivated}
147
+ >
148
+ ${showPrev && prevImage ? this.slideTemplate(prevImage) : nothing}
149
+ ${this.slideTemplate(current)}
150
+ ${showNext && nextImage ? this.slideTemplate(nextImage) : nothing}
151
+ </div>`)}
152
+ </div>
153
+ ${showControls
154
+ ? html `
155
+ <ia-imgview-controls
156
+ .currentIndex=${displayIndex}
157
+ .totalImages=${this.images.length}
158
+ @showPrevious=${this.showPrevious}
159
+ @showNext=${this.showNext}
160
+ ></ia-imgview-controls>
161
+ `
162
+ : nothing}
163
+ ${this.announcementTemplate}
164
+ </div>
165
+ `;
166
+ }
167
+ slideTemplate(image) {
168
+ return html `<ia-imgview-slide .image=${image}></ia-imgview-slide>`;
169
+ }
170
+ /**
171
+ * Announces the image to a screen reader, which otherwise gets nothing when
172
+ * the counter and the picture change under it.
173
+ */
174
+ get announcementTemplate() {
175
+ const current = this.images[this.currentIndex];
176
+ const position = msg(str `Image ${this.currentIndex + 1} of ${this.images.length}`);
177
+ const label = current?.title ?? current?.name;
178
+ return html `
179
+ <div class="sr-only" role="status" aria-live="polite" aria-atomic="true">
180
+ ${label ? `${position}: ${label}` : position}
181
+ </div>
182
+ `;
183
+ }
184
+ /**
185
+ * Passes a slide's load result on to the host, which is where reporting
186
+ * belongs. The slide's own events stop at this shadow root, so they're
187
+ * re-dispatched rather than allowed to escape.
188
+ */
189
+ onImageLoaded(e) {
190
+ // A load that succeeds clears the failure, so an image that breaks again
191
+ // later is reported again rather than swallowed as a repeat.
192
+ this.reportedFailures.delete(e.detail.image.name);
193
+ this.dispatchEvent(new CustomEvent('imageLoaded', { detail: { image: e.detail.image } }));
194
+ }
195
+ onImageFailed(e) {
196
+ const { image } = e.detail;
197
+ if (this.reportedFailures.has(image.name))
198
+ return;
199
+ this.reportedFailures.add(image.name);
200
+ this.dispatchEvent(new CustomEvent('imageLoadFailed', { detail: { image } }));
201
+ }
202
+ /**
203
+ * Decides whether a click on a slide opens the image.
204
+ *
205
+ * Two things can stop it: the click is the tail end of a swipe, or the host
206
+ * cancels the event to show the image its own way. The slide's event doesn't
207
+ * cross this shadow root, so it's re-raised here for the host to see, and a
208
+ * veto is passed back down to cancel the click.
209
+ */
210
+ onImageActivated(e) {
211
+ if (this.gestures.consumeSwipeTap()) {
212
+ e.preventDefault();
213
+ return;
214
+ }
215
+ const allowed = this.dispatchEvent(new CustomEvent('imageActivated', {
216
+ detail: { image: e.detail.image },
217
+ cancelable: true,
218
+ }));
219
+ if (!allowed)
220
+ e.preventDefault();
221
+ }
222
+ /**
223
+ * Inserts the neighbouring slides around the current one so the touch target
224
+ * element stays in the DOM (avoiding touchcancel). These aren't rendered
225
+ * from the template, so they're marked for the gesture controller to clean
226
+ * up. The dragging class shifts the track to centre on the middle slide.
227
+ */
228
+ insertDragSlides() {
229
+ const track = this.slideTrack;
230
+ if (!track)
231
+ return;
232
+ const prevIdx = (this.currentIndex - 1 + this.images.length) % this.images.length;
233
+ const nextIdx = (this.currentIndex + 1) % this.images.length;
234
+ track.insertBefore(this.createDragSlide(this.images[prevIdx]), track.firstChild);
235
+ track.appendChild(this.createDragSlide(this.images[nextIdx]));
236
+ track.classList.add('dragging');
237
+ }
238
+ removeDragSlides() {
239
+ const track = this.slideTrack;
240
+ if (!track)
241
+ return;
242
+ track.querySelectorAll('[data-drag-slide]').forEach((el) => el.remove());
243
+ track.classList.remove('dragging');
244
+ }
245
+ createDragSlide(image) {
246
+ const slide = document.createElement('ia-imgview-slide');
247
+ slide.image = image;
248
+ slide.dataset.dragSlide = '';
249
+ return slide;
250
+ }
251
+ showNext() {
252
+ this.settleIfAnimating();
253
+ this.moveTo((this.currentIndex + 1) % this.images.length, 'next');
254
+ }
255
+ showPrevious() {
256
+ this.settleIfAnimating();
257
+ this.moveTo((this.currentIndex - 1 + this.images.length) % this.images.length, 'prev');
258
+ }
259
+ /**
260
+ * Starts the move to another image. With reduced motion there's no animation
261
+ * to wait on, so the move lands immediately: nothing would fire the
262
+ * `animationend` that otherwise commits it.
263
+ */
264
+ moveTo(target, direction) {
265
+ const wraps = direction === 'next'
266
+ ? this.currentIndex === this.images.length - 1
267
+ : this.currentIndex === 0;
268
+ this.preloadAroundIndex(target);
269
+ if (prefersReducedMotion()) {
270
+ this.currentIndex = target;
271
+ this.settleAtCurrentIndex();
272
+ return;
273
+ }
274
+ this.slideTarget = target;
275
+ this.slideDirection = direction;
276
+ this.animating = true;
277
+ this.wrapEdge = wraps ? (direction === 'next' ? 'end' : 'start') : null;
278
+ }
279
+ /**
280
+ * Moves to the image a completed drag landed on. The drag has already
281
+ * animated the track there, so this only updates state.
282
+ */
283
+ commitDrag(direction) {
284
+ const wraps = direction === 'next'
285
+ ? this.currentIndex === this.images.length - 1
286
+ : this.currentIndex === 0;
287
+ const step = direction === 'next' ? 1 : -1;
288
+ this.currentIndex =
289
+ (this.currentIndex + step + this.images.length) % this.images.length;
290
+ if (wraps && !prefersReducedMotion()) {
291
+ this.wrapEdge = direction === 'next' ? 'end' : 'start';
292
+ }
293
+ this.emitImageChanged();
294
+ }
295
+ /**
296
+ * If an animation is in progress, immediately commit its target so the next
297
+ * animation starts from the right position. Bumps the generation key to
298
+ * force the track element to be recreated, which restarts the CSS animation.
299
+ */
300
+ settleIfAnimating() {
301
+ if (!this.animating || this.slideTarget === null)
302
+ return;
303
+ this.currentIndex = this.slideTarget;
304
+ this.slideGeneration++;
305
+ }
306
+ onWrapGlowEnd() {
307
+ this.wrapEdge = null;
308
+ }
309
+ onSlideEnd() {
310
+ if (this.slideTarget === null)
311
+ return;
312
+ this.currentIndex = this.slideTarget;
313
+ this.settleAtCurrentIndex();
314
+ }
315
+ /** Finishes a move, however it was driven. */
316
+ settleAtCurrentIndex() {
317
+ this.slideTarget = null;
318
+ this.slideDirection = null;
319
+ this.animating = false;
320
+ this.gestures.animationSettled();
321
+ this.emitImageChanged();
322
+ this.preloadAdjacentImages();
323
+ }
324
+ emitImageChanged() {
325
+ const image = this.images[this.currentIndex];
326
+ if (!image)
327
+ return;
328
+ this.dispatchEvent(new CustomEvent('imageChanged', {
329
+ detail: { image, index: this.currentIndex },
330
+ }));
331
+ }
332
+ /**
333
+ * Preloads the next and previous images around `currentIndex` so the first
334
+ * navigation feels instant.
335
+ */
336
+ preloadAdjacentImages() {
337
+ this.preloadAroundIndex(this.currentIndex);
338
+ }
339
+ /**
340
+ * Preloads images adjacent to the given index. Called both at rest (around
341
+ * `currentIndex`) and at the start of a move (around the target) so rapid
342
+ * navigation stays ahead of the browser cache.
343
+ *
344
+ * A preload that fails is deliberately not reported. These requests are
345
+ * speculative and the viewer may never show them, so counting them would
346
+ * inflate the failure rate with images nobody looked at. Navigating to a
347
+ * broken image renders a real slide, whose `error` reports it then.
348
+ */
349
+ preloadAroundIndex(index) {
350
+ if (this.images.length <= 1)
351
+ return;
352
+ const next = (index + 1) % this.images.length;
353
+ const prev = (index - 1 + this.images.length) % this.images.length;
354
+ for (const idx of [next, prev]) {
355
+ const img = new Image();
356
+ img.src = this.images[idx].url;
357
+ }
358
+ }
359
+ static get styles() {
360
+ return [
361
+ themeStyles,
362
+ css `
363
+ :host {
364
+ --image-viewer-slide-duration--: var(
365
+ --image-viewer-slide-duration,
366
+ 500ms
367
+ );
368
+ --image-viewer-glow-color--: var(
369
+ --image-viewer-glow-color,
370
+ rgba(255, 255, 255, 0.25)
371
+ );
372
+ /*
373
+ * The breakpoint the controls query against. Named so the query in
374
+ * ia-imgview-controls resolves to this host rather than to whatever
375
+ * container the consumer happens to have further up.
376
+ */
377
+ container: image-viewer / inline-size;
378
+
379
+ /*
380
+ * Size and placement are the host's business, set with ordinary CSS
381
+ * on the element. These are only defaults for a host that sets
382
+ * neither; a rule in the outer tree beats them.
383
+ */
384
+ display: block;
385
+ height: 100%;
386
+ margin: 0 auto;
387
+ }
388
+
389
+ .viewer {
390
+ position: relative;
391
+ width: 100%;
392
+ height: 100%;
393
+ display: flex;
394
+ flex-direction: column;
395
+ align-items: center;
396
+ justify-content: center;
397
+ }
398
+
399
+ .image-area {
400
+ position: relative;
401
+ flex: 1;
402
+ min-height: 0;
403
+ width: 100%;
404
+ display: flex;
405
+ align-items: center;
406
+ justify-content: center;
407
+ overflow: hidden;
408
+ touch-action: pan-y pinch-zoom;
409
+ }
410
+
411
+ .wrap-glow {
412
+ position: absolute;
413
+ top: 0;
414
+ bottom: 0;
415
+ width: 100px;
416
+ pointer-events: none;
417
+ z-index: 2;
418
+ animation: glow-fade 700ms ease-out both;
419
+ }
420
+
421
+ .glow-start {
422
+ left: 0;
423
+ background: linear-gradient(
424
+ to right,
425
+ var(--image-viewer-glow-color--),
426
+ transparent
427
+ );
428
+ }
429
+
430
+ .glow-end {
431
+ right: 0;
432
+ background: linear-gradient(
433
+ to left,
434
+ var(--image-viewer-glow-color--),
435
+ transparent
436
+ );
437
+ }
438
+
439
+ @keyframes glow-fade {
440
+ 0% {
441
+ opacity: 0;
442
+ }
443
+ 20% {
444
+ opacity: 1;
445
+ }
446
+ 100% {
447
+ opacity: 0;
448
+ }
449
+ }
450
+
451
+ .slide-track {
452
+ display: flex;
453
+ width: 100%;
454
+ height: 100%;
455
+ flex-shrink: 0;
456
+ }
457
+
458
+ @keyframes slide-next {
459
+ from {
460
+ transform: translateX(0);
461
+ }
462
+ to {
463
+ transform: translateX(-100%);
464
+ }
465
+ }
466
+
467
+ @keyframes slide-prev {
468
+ from {
469
+ transform: translateX(-100%);
470
+ }
471
+ to {
472
+ transform: translateX(0);
473
+ }
474
+ }
475
+
476
+ .slide-track.dragging {
477
+ transform: translateX(-100%);
478
+ }
479
+
480
+ .slide-track.sliding-next {
481
+ animation: slide-next var(--image-viewer-slide-duration--) ease-in-out
482
+ both;
483
+ }
484
+
485
+ .slide-track.sliding-prev {
486
+ animation: slide-prev var(--image-viewer-slide-duration--) ease-in-out
487
+ both;
488
+ }
489
+
490
+ .sr-only {
491
+ position: absolute;
492
+ width: 1px;
493
+ height: 1px;
494
+ margin: -1px;
495
+ padding: 0;
496
+ border: 0;
497
+ overflow: hidden;
498
+ white-space: nowrap;
499
+ clip-path: inset(50%);
500
+ }
501
+ `,
502
+ ];
503
+ }
504
+ };
505
+ __decorate([
506
+ property({ type: Array })
507
+ ], IAImageViewer.prototype, "images", void 0);
508
+ __decorate([
509
+ property({ type: String })
510
+ ], IAImageViewer.prototype, "currentImageName", void 0);
511
+ __decorate([
512
+ query('.image-area')
513
+ ], IAImageViewer.prototype, "imageArea", void 0);
514
+ __decorate([
515
+ query('.slide-track')
516
+ ], IAImageViewer.prototype, "slideTrack", void 0);
517
+ __decorate([
518
+ state()
519
+ ], IAImageViewer.prototype, "currentIndex", void 0);
520
+ __decorate([
521
+ state()
522
+ ], IAImageViewer.prototype, "animating", void 0);
523
+ __decorate([
524
+ state()
525
+ ], IAImageViewer.prototype, "slideGeneration", void 0);
526
+ __decorate([
527
+ state()
528
+ ], IAImageViewer.prototype, "wrapEdge", void 0);
529
+ IAImageViewer = __decorate([
530
+ customElement('ia-image-viewer')
531
+ ], IAImageViewer);
532
+ export { IAImageViewer };
533
+ //# sourceMappingURL=ia-image-viewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ia-image-viewer.js","sourceRoot":"","sources":["../../../../src/elements/ia-image-viewer/ia-image-viewer.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,GAAG,EAEH,IAAI,EACJ,UAAU,EACV,OAAO,GAGR,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uBAAuB,CAAC;AAK/B;;;;;;;;;;;;;;;;;GAiBG;AAEI,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU;IAAtC;;QACsB,WAAM,GAAuB,EAAE,CAAC;QAc3D,gFAAgF;QACvE,iBAAY,GAAG,CAAC,CAAC;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C,GAAG,CAAC;QACjC,CAAC;IACH,CAAC;IAED,MAAM,KAAK,MAAM;QACf,OAAO;YACL,WAAW;YACX,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2IF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AA3iB4B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;6CAAiC;AAM/B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDAA2B;AAGhC;IAArB,KAAK,CAAC,aAAa,CAAC;gDAAyB;AAGvB;IAAtB,KAAK,CAAC,cAAc,CAAC;iDAA0B;AAGvC;IAAR,KAAK,EAAE;mDAAkB;AAET;IAAhB,KAAK,EAAE;gDAA2B;AAOlB;IAAhB,KAAK,EAAE;sDAA6B;AAGpB;IAAhB,KAAK,EAAE;+CAA0C;AA5BvC,aAAa;IADzB,aAAa,CAAC,iBAAiB,CAAC;GACpB,aAAa,CA4iBzB","sourcesContent":["import {\n css,\n type CSSResultGroup,\n html,\n LitElement,\n nothing,\n type PropertyValues,\n type TemplateResult,\n} from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { keyed } from 'lit/directives/keyed.js';\nimport { msg, str } from '@lit/localize';\n\nimport themeStyles from '@src/themes/theme-styles';\nimport { prefersReducedMotion } from '@src/util/prefers-reduced-motion';\nimport { ImageViewerGestures } from './image-viewer-gestures';\nimport type { ImageViewerImage, SlideDirection, WrapEdge } from './models';\nimport type { IAImageViewerSlide } from './ia-imgview-slide';\nimport './ia-imgview-slide';\nimport './ia-imgview-controls';\n\n/** Detail carried by the load and failure events a slide reports. */\ntype SlideImageEvent = CustomEvent<{ image: ImageViewerImage }>;\n\n/**\n * A swipeable image carousel.\n *\n * Shows one image at a time from a list, with previous/next buttons, a\n * counter, keyboard arrows, horizontal wheel scrolling and touch swipes.\n * Clicking an image opens it in a new tab.\n *\n * The viewer holds no opinion about where the images came from: it takes a\n * plain list of names and URLs, and reports the image it lands on through\n * `imageChanged` so a host can mirror that into its own URL or analytics.\n *\n * @fires imageChanged - The viewer settled on a new image.\n * @fires imageLoaded - An image the viewer showed finished loading.\n * @fires imageLoadFailed - An image the viewer showed could not be loaded.\n * Fires once per image until it loads successfully or the set changes.\n * @fires imageActivated - An image was clicked. Cancelable: preventing it\n * stops the default of opening the image in a new tab.\n */\n@customElement('ia-image-viewer')\nexport class IAImageViewer extends LitElement {\n @property({ type: Array }) images: ImageViewerImage[] = [];\n\n /**\n * Name of the image to show. Changing it jumps straight to that image\n * without animating. An unknown name shows the first image.\n */\n @property({ type: String }) currentImageName?: string;\n\n /** Read by the gesture controller, which tracks touches against it. */\n @query('.image-area') imageArea?: HTMLElement;\n\n /** Read by the gesture controller, which translates it during a drag. */\n @query('.slide-track') slideTrack?: HTMLElement;\n\n /** Read by the gesture controller to navigate relative to the current image. */\n @state() currentIndex = 0;\n\n @state() private animating = false;\n\n /**\n * Incremented when an animation is interrupted to force the track element to\n * be recreated via the `keyed()` directive, which guarantees the CSS\n * animation restarts even if the direction is the same.\n */\n @state() private slideGeneration = 0;\n\n /** Which edge just wrapped, if any. Drives the glow indicator. */\n @state() private wrapEdge: WrapEdge | null = null;\n\n /**\n * Images already reported as failed, so a broken image isn't counted again\n * every time the viewer passes over it. Navigating back re-fires `error` on\n * the recreated element, and the neighbouring slides staged during an\n * animation or a drag load the same image too, so without this a single\n * broken derivative reports several times a session.\n *\n * Cleared when the image set changes, which is the point a name stops\n * standing for the same file.\n */\n private reportedFailures = new Set<string>();\n\n private slideTarget: number | null = null;\n\n private slideDirection: SlideDirection | null = null;\n\n private gestures = new ImageViewerGestures(this);\n\n get imageCount(): number {\n return this.images.length;\n }\n\n /** The image currently on screen, if there is one. */\n get currentImage(): ImageViewerImage | undefined {\n return this.images[this.currentIndex];\n }\n\n protected willUpdate(changed: PropertyValues): void {\n if (changed.has('images') || changed.has('currentImageName')) {\n const previous = changed.get('images') as ImageViewerImage[] | undefined;\n this.currentIndex = this.indexToShow(changed, previous);\n\n this.animating = false;\n this.slideGeneration = 0;\n this.slideTarget = null;\n this.slideDirection = null;\n this.wrapEdge = null;\n this.reportedFailures.clear();\n this.preloadAdjacentImages();\n }\n }\n\n /**\n * Where to land when the images or the requested name change.\n *\n * A new `currentImageName` is the host asking for a particular image, so it\n * wins. A new `images` array on its own isn't: a host that builds its list\n * in a getter hands over a fresh array on every render, which says nothing\n * about the images having changed. So the viewer holds its place by name and\n * only goes back to the start when the image it was showing is really gone.\n */\n private indexToShow(\n changed: PropertyValues,\n previousImages: ImageViewerImage[] | undefined,\n ): number {\n if (changed.has('currentImageName') && this.currentImageName) {\n const requested = this.images.findIndex(\n (image) => image.name === this.currentImageName,\n );\n if (requested >= 0) return requested;\n }\n\n const showing = previousImages?.[this.currentIndex]?.name;\n if (showing) {\n const stillThere = this.images.findIndex(\n (image) => image.name === showing,\n );\n if (stillThere >= 0) return stillThere;\n }\n\n const named = this.currentImageName\n ? this.images.findIndex((image) => image.name === this.currentImageName)\n : -1;\n return named >= 0 ? named : 0;\n }\n\n render(): TemplateResult | typeof nothing {\n if (this.images.length === 0) return nothing;\n\n const { dragging } = this.gestures;\n const current = this.images[this.currentIndex];\n const showControls = this.images.length > 1;\n\n const trackClasses = {\n 'slide-track': true,\n 'sliding-next':\n this.animating && !dragging && this.slideDirection === 'next',\n 'sliding-prev':\n this.animating && !dragging && this.slideDirection === 'prev',\n dragging,\n };\n\n const prevIndex =\n (this.currentIndex - 1 + this.images.length) % this.images.length;\n const nextIndex = (this.currentIndex + 1) % this.images.length;\n\n const slideTarget =\n this.animating && !dragging && this.slideTarget !== null\n ? this.images[this.slideTarget]\n : null;\n const prevImage = dragging ? this.images[prevIndex] : slideTarget;\n const nextImage = dragging ? this.images[nextIndex] : slideTarget;\n const showPrev =\n dragging || (slideTarget !== null && this.slideDirection === 'prev');\n const showNext =\n dragging || (slideTarget !== null && this.slideDirection === 'next');\n\n const displayIndex =\n this.animating && this.slideTarget !== null\n ? this.slideTarget\n : this.currentIndex;\n\n return html`\n <div class=\"viewer\">\n <div class=\"image-area\">\n ${this.wrapEdge\n ? html`<div\n class=\"wrap-glow ${this.wrapEdge === 'start'\n ? 'glow-start'\n : 'glow-end'}\"\n @animationend=${this.onWrapGlowEnd}\n ></div>`\n : nothing}\n ${keyed(\n this.slideGeneration,\n html`<div\n class=${classMap(trackClasses)}\n @animationend=${this.onSlideEnd}\n @imageLoaded=${this.onImageLoaded}\n @imageFailed=${this.onImageFailed}\n @imageActivated=${this.onImageActivated}\n >\n ${showPrev && prevImage ? this.slideTemplate(prevImage) : nothing}\n ${this.slideTemplate(current)}\n ${showNext && nextImage ? this.slideTemplate(nextImage) : nothing}\n </div>`,\n )}\n </div>\n ${showControls\n ? html`\n <ia-imgview-controls\n .currentIndex=${displayIndex}\n .totalImages=${this.images.length}\n @showPrevious=${this.showPrevious}\n @showNext=${this.showNext}\n ></ia-imgview-controls>\n `\n : nothing}\n ${this.announcementTemplate}\n </div>\n `;\n }\n\n private slideTemplate(image: ImageViewerImage): TemplateResult {\n return html`<ia-imgview-slide .image=${image}></ia-imgview-slide>`;\n }\n\n /**\n * Announces the image to a screen reader, which otherwise gets nothing when\n * the counter and the picture change under it.\n */\n private get announcementTemplate(): TemplateResult {\n const current = this.images[this.currentIndex];\n const position = msg(\n str`Image ${this.currentIndex + 1} of ${this.images.length}`,\n );\n const label = current?.title ?? current?.name;\n return html`\n <div class=\"sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n ${label ? `${position}: ${label}` : position}\n </div>\n `;\n }\n\n /**\n * Passes a slide's load result on to the host, which is where reporting\n * belongs. The slide's own events stop at this shadow root, so they're\n * re-dispatched rather than allowed to escape.\n */\n private onImageLoaded(e: SlideImageEvent): void {\n // A load that succeeds clears the failure, so an image that breaks again\n // later is reported again rather than swallowed as a repeat.\n this.reportedFailures.delete(e.detail.image.name);\n this.dispatchEvent(\n new CustomEvent('imageLoaded', { detail: { image: e.detail.image } }),\n );\n }\n\n private onImageFailed(e: SlideImageEvent): void {\n const { image } = e.detail;\n if (this.reportedFailures.has(image.name)) return;\n this.reportedFailures.add(image.name);\n this.dispatchEvent(\n new CustomEvent('imageLoadFailed', { detail: { image } }),\n );\n }\n\n /**\n * Decides whether a click on a slide opens the image.\n *\n * Two things can stop it: the click is the tail end of a swipe, or the host\n * cancels the event to show the image its own way. The slide's event doesn't\n * cross this shadow root, so it's re-raised here for the host to see, and a\n * veto is passed back down to cancel the click.\n */\n private onImageActivated(e: SlideImageEvent): void {\n if (this.gestures.consumeSwipeTap()) {\n e.preventDefault();\n return;\n }\n const allowed = this.dispatchEvent(\n new CustomEvent('imageActivated', {\n detail: { image: e.detail.image },\n cancelable: true,\n }),\n );\n if (!allowed) e.preventDefault();\n }\n\n /**\n * Inserts the neighbouring slides around the current one so the touch target\n * element stays in the DOM (avoiding touchcancel). These aren't rendered\n * from the template, so they're marked for the gesture controller to clean\n * up. The dragging class shifts the track to centre on the middle slide.\n */\n insertDragSlides(): void {\n const track = this.slideTrack;\n if (!track) return;\n const prevIdx =\n (this.currentIndex - 1 + this.images.length) % this.images.length;\n const nextIdx = (this.currentIndex + 1) % this.images.length;\n\n track.insertBefore(\n this.createDragSlide(this.images[prevIdx]),\n track.firstChild,\n );\n track.appendChild(this.createDragSlide(this.images[nextIdx]));\n\n track.classList.add('dragging');\n }\n\n removeDragSlides(): void {\n const track = this.slideTrack;\n if (!track) return;\n track.querySelectorAll('[data-drag-slide]').forEach((el) => el.remove());\n track.classList.remove('dragging');\n }\n\n private createDragSlide(image: ImageViewerImage): IAImageViewerSlide {\n const slide = document.createElement(\n 'ia-imgview-slide',\n ) as IAImageViewerSlide;\n slide.image = image;\n slide.dataset.dragSlide = '';\n return slide;\n }\n\n showNext(): void {\n this.settleIfAnimating();\n this.moveTo((this.currentIndex + 1) % this.images.length, 'next');\n }\n\n showPrevious(): void {\n this.settleIfAnimating();\n this.moveTo(\n (this.currentIndex - 1 + this.images.length) % this.images.length,\n 'prev',\n );\n }\n\n /**\n * Starts the move to another image. With reduced motion there's no animation\n * to wait on, so the move lands immediately: nothing would fire the\n * `animationend` that otherwise commits it.\n */\n private moveTo(target: number, direction: SlideDirection): void {\n const wraps =\n direction === 'next'\n ? this.currentIndex === this.images.length - 1\n : this.currentIndex === 0;\n this.preloadAroundIndex(target);\n\n if (prefersReducedMotion()) {\n this.currentIndex = target;\n this.settleAtCurrentIndex();\n return;\n }\n\n this.slideTarget = target;\n this.slideDirection = direction;\n this.animating = true;\n this.wrapEdge = wraps ? (direction === 'next' ? 'end' : 'start') : null;\n }\n\n /**\n * Moves to the image a completed drag landed on. The drag has already\n * animated the track there, so this only updates state.\n */\n commitDrag(direction: SlideDirection): void {\n const wraps =\n direction === 'next'\n ? this.currentIndex === this.images.length - 1\n : this.currentIndex === 0;\n const step = direction === 'next' ? 1 : -1;\n this.currentIndex =\n (this.currentIndex + step + this.images.length) % this.images.length;\n if (wraps && !prefersReducedMotion()) {\n this.wrapEdge = direction === 'next' ? 'end' : 'start';\n }\n this.emitImageChanged();\n }\n\n /**\n * If an animation is in progress, immediately commit its target so the next\n * animation starts from the right position. Bumps the generation key to\n * force the track element to be recreated, which restarts the CSS animation.\n */\n settleIfAnimating(): void {\n if (!this.animating || this.slideTarget === null) return;\n this.currentIndex = this.slideTarget;\n this.slideGeneration++;\n }\n\n private onWrapGlowEnd(): void {\n this.wrapEdge = null;\n }\n\n private onSlideEnd(): void {\n if (this.slideTarget === null) return;\n this.currentIndex = this.slideTarget;\n this.settleAtCurrentIndex();\n }\n\n /** Finishes a move, however it was driven. */\n private settleAtCurrentIndex(): void {\n this.slideTarget = null;\n this.slideDirection = null;\n this.animating = false;\n this.gestures.animationSettled();\n this.emitImageChanged();\n this.preloadAdjacentImages();\n }\n\n private emitImageChanged(): void {\n const image = this.images[this.currentIndex];\n if (!image) return;\n this.dispatchEvent(\n new CustomEvent('imageChanged', {\n detail: { image, index: this.currentIndex },\n }),\n );\n }\n\n /**\n * Preloads the next and previous images around `currentIndex` so the first\n * navigation feels instant.\n */\n private preloadAdjacentImages(): void {\n this.preloadAroundIndex(this.currentIndex);\n }\n\n /**\n * Preloads images adjacent to the given index. Called both at rest (around\n * `currentIndex`) and at the start of a move (around the target) so rapid\n * navigation stays ahead of the browser cache.\n *\n * A preload that fails is deliberately not reported. These requests are\n * speculative and the viewer may never show them, so counting them would\n * inflate the failure rate with images nobody looked at. Navigating to a\n * broken image renders a real slide, whose `error` reports it then.\n */\n preloadAroundIndex(index: number): void {\n if (this.images.length <= 1) return;\n const next = (index + 1) % this.images.length;\n const prev = (index - 1 + this.images.length) % this.images.length;\n for (const idx of [next, prev]) {\n const img = new Image();\n img.src = this.images[idx].url;\n }\n }\n\n static get styles(): CSSResultGroup {\n return [\n themeStyles,\n css`\n :host {\n --image-viewer-slide-duration--: var(\n --image-viewer-slide-duration,\n 500ms\n );\n --image-viewer-glow-color--: var(\n --image-viewer-glow-color,\n rgba(255, 255, 255, 0.25)\n );\n /*\n * The breakpoint the controls query against. Named so the query in\n * ia-imgview-controls resolves to this host rather than to whatever\n * container the consumer happens to have further up.\n */\n container: image-viewer / inline-size;\n\n /*\n * Size and placement are the host's business, set with ordinary CSS\n * on the element. These are only defaults for a host that sets\n * neither; a rule in the outer tree beats them.\n */\n display: block;\n height: 100%;\n margin: 0 auto;\n }\n\n .viewer {\n position: relative;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n\n .image-area {\n position: relative;\n flex: 1;\n min-height: 0;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n touch-action: pan-y pinch-zoom;\n }\n\n .wrap-glow {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 100px;\n pointer-events: none;\n z-index: 2;\n animation: glow-fade 700ms ease-out both;\n }\n\n .glow-start {\n left: 0;\n background: linear-gradient(\n to right,\n var(--image-viewer-glow-color--),\n transparent\n );\n }\n\n .glow-end {\n right: 0;\n background: linear-gradient(\n to left,\n var(--image-viewer-glow-color--),\n transparent\n );\n }\n\n @keyframes glow-fade {\n 0% {\n opacity: 0;\n }\n 20% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n }\n\n .slide-track {\n display: flex;\n width: 100%;\n height: 100%;\n flex-shrink: 0;\n }\n\n @keyframes slide-next {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(-100%);\n }\n }\n\n @keyframes slide-prev {\n from {\n transform: translateX(-100%);\n }\n to {\n transform: translateX(0);\n }\n }\n\n .slide-track.dragging {\n transform: translateX(-100%);\n }\n\n .slide-track.sliding-next {\n animation: slide-next var(--image-viewer-slide-duration--) ease-in-out\n both;\n }\n\n .slide-track.sliding-prev {\n animation: slide-prev var(--image-viewer-slide-duration--) ease-in-out\n both;\n }\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n border: 0;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n `,\n ];\n }\n}\n"]}
@@ -0,0 +1,22 @@
1
+ import { type CSSResultGroup, LitElement, type TemplateResult } from 'lit';
2
+ /**
3
+ * The image viewer's previous / next buttons and the "n / total" counter.
4
+ *
5
+ * Past the wide breakpoint the buttons position themselves over the image
6
+ * area, which lives in the viewer's shadow root. That works because an
7
+ * absolutely positioned element finds its containing block through the flat
8
+ * tree, so the viewer's frame is still the reference as long as this element's
9
+ * own host box stays unpositioned. The breakpoint queries the `image-viewer`
10
+ * container by name, so it tracks the viewer's width rather than whichever
11
+ * container a consumer happens to have further up the tree.
12
+ */
13
+ export declare class IAImageViewerControls extends LitElement {
14
+ /** Zero-based index of the image being shown, for the counter. */
15
+ currentIndex: number;
16
+ totalImages: number;
17
+ render(): TemplateResult;
18
+ private onPrevious;
19
+ private onNext;
20
+ static get styles(): CSSResultGroup;
21
+ }
22
+ //# sourceMappingURL=ia-imgview-controls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ia-imgview-controls.d.ts","sourceRoot":"","sources":["../../../../src/elements/ia-image-viewer/ia-imgview-controls.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EAEnB,UAAU,EACV,KAAK,cAAc,EACpB,MAAM,KAAK,CAAC;AAMb;;;;;;;;;;GAUG;AACH,qBACa,qBAAsB,SAAQ,UAAU;IACnD,kEAAkE;IACtC,YAAY,SAAK;IAEjB,WAAW,SAAK;IAE5C,MAAM,IAAI,cAAc;IAoBxB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,MAAM;IAId,MAAM,KAAK,MAAM,IAAI,cAAc,CAoFlC;CACF"}