@internetarchive/elements 1.1.7-webdev-9054.1 → 1.1.7-webdev-9540.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 (310) hide show
  1. package/README.md +19 -0
  2. package/dist/src/elements/ia-combo-box/ia-combo-box.d.ts.map +1 -1
  3. package/dist/src/elements/ia-combo-box/ia-combo-box.js +24 -21
  4. package/dist/src/elements/ia-combo-box/ia-combo-box.js.map +1 -1
  5. package/dist/src/elements/ia-donation-form/braintree/payment-providers/paypal/paypal.d.ts.map +1 -1
  6. package/dist/src/elements/ia-donation-form/braintree/payment-providers/paypal/paypal.js +3 -4
  7. package/dist/src/elements/ia-donation-form/braintree/payment-providers/paypal/paypal.js.map +1 -1
  8. package/dist/src/elements/ia-dropdown-search-bar/ia-dropdown-search-bar.d.ts.map +1 -1
  9. package/dist/src/elements/ia-dropdown-search-bar/ia-dropdown-search-bar.js +4 -3
  10. package/dist/src/elements/ia-dropdown-search-bar/ia-dropdown-search-bar.js.map +1 -1
  11. package/dist/src/elements/ia-item-navigator/ia-item-navigator.d.ts.map +1 -1
  12. package/dist/src/elements/ia-item-navigator/ia-item-navigator.js +25 -7
  13. package/dist/src/elements/ia-item-navigator/ia-item-navigator.js.map +1 -1
  14. package/dist/src/elements/ia-item-navigator/ia-itemnav-menu-button.d.ts.map +1 -1
  15. package/dist/src/elements/ia-item-navigator/ia-itemnav-menu-button.js +7 -6
  16. package/dist/src/elements/ia-item-navigator/ia-itemnav-menu-button.js.map +1 -1
  17. package/dist/src/elements/ia-item-navigator/ia-itemnav-menu-slider.d.ts.map +1 -1
  18. package/dist/src/elements/ia-item-navigator/ia-itemnav-menu-slider.js +8 -7
  19. package/dist/src/elements/ia-item-navigator/ia-itemnav-menu-slider.js.map +1 -1
  20. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-share-panel.d.ts +2 -2
  21. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-share-panel.d.ts.map +1 -1
  22. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-share-panel.js +32 -13
  23. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-share-panel.js.map +1 -1
  24. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-sort-files-button.js +10 -10
  25. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-sort-files-button.js.map +1 -1
  26. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-viewable-files-panel.d.ts.map +1 -1
  27. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-viewable-files-panel.js +3 -3
  28. package/dist/src/elements/ia-item-navigator/menus/ia-itemnav-viewable-files-panel.js.map +1 -1
  29. package/dist/src/elements/ia-scrubber-bar/ia-section-marker.d.ts.map +1 -1
  30. package/dist/src/elements/ia-scrubber-bar/ia-section-marker.js +7 -2
  31. package/dist/src/elements/ia-scrubber-bar/ia-section-marker.js.map +1 -1
  32. package/dist/src/elements/ia-status-indicator/ia-status-indicator.d.ts +5 -5
  33. package/dist/src/elements/ia-status-indicator/ia-status-indicator.d.ts.map +1 -1
  34. package/dist/src/elements/ia-status-indicator/ia-status-indicator.js +25 -25
  35. package/dist/src/elements/ia-status-indicator/ia-status-indicator.js.map +1 -1
  36. package/dist/src/elements/ia-topnav/ia-topnav-primary-nav.d.ts.map +1 -1
  37. package/dist/src/elements/ia-topnav/ia-topnav-primary-nav.js +8 -2
  38. package/dist/src/elements/ia-topnav/ia-topnav-primary-nav.js.map +1 -1
  39. package/dist/src/elements/ia-topnav/ia-topnav.d.ts +1 -0
  40. package/dist/src/elements/ia-topnav/ia-topnav.d.ts.map +1 -1
  41. package/dist/src/elements/ia-topnav/ia-topnav.js +6 -2
  42. package/dist/src/elements/ia-topnav/ia-topnav.js.map +1 -1
  43. package/dist/src/{elements/ia-scrubber-bar/assets/next-section-marker.d.ts → icons/caret-closed.d.ts} +1 -1
  44. package/dist/src/icons/caret-closed.d.ts.map +1 -0
  45. package/dist/src/icons/caret-closed.js +6 -0
  46. package/dist/src/icons/caret-closed.js.map +1 -0
  47. package/dist/src/{elements/ia-scrubber-bar/assets/previous-section-marker.d.ts → icons/caret-open.d.ts} +1 -1
  48. package/dist/src/icons/caret-open.d.ts.map +1 -0
  49. package/dist/src/icons/caret-open.js +6 -0
  50. package/dist/src/icons/caret-open.js.map +1 -0
  51. package/dist/src/icons/clear.d.ts +3 -0
  52. package/dist/src/icons/clear.d.ts.map +1 -0
  53. package/dist/src/icons/clear.js +7 -0
  54. package/dist/src/icons/clear.js.map +1 -0
  55. package/dist/src/icons/collapse-sidebar.d.ts +3 -0
  56. package/dist/src/icons/collapse-sidebar.d.ts.map +1 -0
  57. package/dist/src/icons/collapse-sidebar.js +8 -0
  58. package/dist/src/icons/collapse-sidebar.js.map +1 -0
  59. package/dist/src/{elements/ia-item-navigator/icons → icons}/collapse-sidebar.svg +1 -1
  60. package/dist/src/icons/ellipses.d.ts +3 -0
  61. package/dist/src/icons/ellipses.d.ts.map +1 -0
  62. package/dist/src/icons/ellipses.js +8 -0
  63. package/dist/src/icons/ellipses.js.map +1 -0
  64. package/dist/src/{elements/ia-item-navigator/icons → icons}/ellipses.svg +1 -1
  65. package/dist/src/icons/email.d.ts +3 -0
  66. package/dist/src/icons/email.d.ts.map +1 -0
  67. package/dist/src/icons/email.js +7 -0
  68. package/dist/src/icons/email.js.map +1 -0
  69. package/dist/src/{elements/ia-item-navigator/menus/icons → icons}/email.svg +1 -1
  70. package/dist/src/icons/facebook.d.ts +3 -0
  71. package/dist/src/icons/facebook.d.ts.map +1 -0
  72. package/dist/src/icons/facebook.js +7 -0
  73. package/dist/src/icons/facebook.js.map +1 -0
  74. package/dist/src/{elements/ia-item-navigator/menus/icons → icons}/facebook.svg +1 -1
  75. package/dist/src/icons/link.d.ts +3 -0
  76. package/dist/src/icons/link.d.ts.map +1 -0
  77. package/dist/src/icons/link.js +7 -0
  78. package/dist/src/icons/link.js.map +1 -0
  79. package/dist/src/{elements/ia-item-navigator/menus/icons → icons}/link.svg +1 -1
  80. package/dist/src/icons/list.d.ts +3 -0
  81. package/dist/src/icons/list.d.ts.map +1 -0
  82. package/dist/src/icons/list.js +4 -0
  83. package/dist/src/icons/list.js.map +1 -0
  84. package/dist/src/icons/list.svg +3 -0
  85. package/dist/src/icons/mediatype-audio.d.ts +3 -0
  86. package/dist/src/icons/mediatype-audio.d.ts.map +1 -0
  87. package/dist/src/icons/mediatype-audio.js +4 -0
  88. package/dist/src/icons/mediatype-audio.js.map +1 -0
  89. package/dist/src/{elements/ia-status-indicator/icons/audio.svg → icons/mediatype-audio.svg} +1 -1
  90. package/dist/src/icons/mediatype-collection.d.ts +3 -0
  91. package/dist/src/icons/mediatype-collection.d.ts.map +1 -0
  92. package/dist/src/icons/mediatype-collection.js +4 -0
  93. package/dist/src/icons/mediatype-collection.js.map +1 -0
  94. package/dist/src/{elements/ia-status-indicator/icons/collection.svg → icons/mediatype-collection.svg} +1 -1
  95. package/dist/src/icons/mediatype-etree.d.ts +3 -0
  96. package/dist/src/icons/mediatype-etree.d.ts.map +1 -0
  97. package/dist/src/icons/mediatype-etree.js +4 -0
  98. package/dist/src/icons/mediatype-etree.js.map +1 -0
  99. package/dist/src/{elements/ia-status-indicator/icons/etree.svg → icons/mediatype-etree.svg} +1 -1
  100. package/dist/src/icons/mediatype-images.d.ts +3 -0
  101. package/dist/src/icons/mediatype-images.d.ts.map +1 -0
  102. package/dist/src/icons/mediatype-images.js +4 -0
  103. package/dist/src/icons/mediatype-images.js.map +1 -0
  104. package/dist/src/{elements/ia-status-indicator/icons/images.svg → icons/mediatype-images.svg} +1 -1
  105. package/dist/src/icons/mediatype-software.d.ts +3 -0
  106. package/dist/src/icons/mediatype-software.d.ts.map +1 -0
  107. package/dist/src/icons/mediatype-software.js +4 -0
  108. package/dist/src/icons/mediatype-software.js.map +1 -0
  109. package/dist/src/{elements/ia-status-indicator/icons/software.svg → icons/mediatype-software.svg} +1 -1
  110. package/dist/src/icons/mediatype-texts.d.ts +3 -0
  111. package/dist/src/icons/mediatype-texts.d.ts.map +1 -0
  112. package/dist/src/icons/mediatype-texts.js +4 -0
  113. package/dist/src/icons/mediatype-texts.js.map +1 -0
  114. package/dist/src/{elements/ia-status-indicator/icons/texts.svg → icons/mediatype-texts.svg} +1 -1
  115. package/dist/src/icons/mediatype-tv.d.ts +3 -0
  116. package/dist/src/icons/mediatype-tv.d.ts.map +1 -0
  117. package/dist/src/icons/mediatype-tv.js +4 -0
  118. package/dist/src/icons/mediatype-tv.js.map +1 -0
  119. package/dist/src/{elements/ia-status-indicator/icons/tv.svg → icons/mediatype-tv.svg} +1 -1
  120. package/dist/src/icons/mediatype-video.d.ts +3 -0
  121. package/dist/src/icons/mediatype-video.d.ts.map +1 -0
  122. package/dist/src/icons/mediatype-video.js +4 -0
  123. package/dist/src/icons/mediatype-video.js.map +1 -0
  124. package/dist/src/{elements/ia-status-indicator/icons/video.svg → icons/mediatype-video.svg} +1 -1
  125. package/dist/src/icons/mediatype-web.d.ts +3 -0
  126. package/dist/src/icons/mediatype-web.d.ts.map +1 -0
  127. package/dist/src/icons/mediatype-web.js +4 -0
  128. package/dist/src/icons/mediatype-web.js.map +1 -0
  129. package/dist/src/{elements/ia-status-indicator/icons/web.svg → icons/mediatype-web.svg} +1 -1
  130. package/dist/src/icons/pinterest.d.ts +3 -0
  131. package/dist/src/icons/pinterest.d.ts.map +1 -0
  132. package/dist/src/icons/pinterest.js +7 -0
  133. package/dist/src/icons/pinterest.js.map +1 -0
  134. package/dist/src/{elements/ia-item-navigator/menus/icons → icons}/pinterest.svg +1 -1
  135. package/dist/src/icons/scrubber-next-section.d.ts +3 -0
  136. package/dist/src/icons/scrubber-next-section.d.ts.map +1 -0
  137. package/dist/src/icons/scrubber-next-section.js +8 -0
  138. package/dist/src/icons/scrubber-next-section.js.map +1 -0
  139. package/dist/src/icons/scrubber-next-section.svg +7 -0
  140. package/dist/src/icons/scrubber-previous-section.d.ts +3 -0
  141. package/dist/src/icons/scrubber-previous-section.d.ts.map +1 -0
  142. package/dist/src/icons/scrubber-previous-section.js +8 -0
  143. package/dist/src/icons/scrubber-previous-section.js.map +1 -0
  144. package/dist/src/icons/scrubber-previous-section.svg +7 -0
  145. package/dist/src/icons/search.d.ts +3 -0
  146. package/dist/src/icons/search.d.ts.map +1 -0
  147. package/dist/src/{elements/ia-status-indicator/icons/search.svg → icons/search.js} +6 -7
  148. package/dist/src/icons/search.js.map +1 -0
  149. package/dist/src/{elements/ia-dropdown-search-bar → icons}/search.svg +1 -1
  150. package/dist/src/icons/share.d.ts +3 -0
  151. package/dist/src/icons/share.d.ts.map +1 -0
  152. package/dist/src/icons/share.js +7 -0
  153. package/dist/src/icons/share.js.map +1 -0
  154. package/dist/src/{elements/ia-item-navigator/menus/icons → icons}/share.svg +1 -1
  155. package/dist/src/icons/sort-asc.d.ts +3 -0
  156. package/dist/src/icons/sort-asc.d.ts.map +1 -0
  157. package/dist/src/icons/sort-asc.js +23 -0
  158. package/dist/src/icons/sort-asc.js.map +1 -0
  159. package/dist/src/{elements/ia-item-navigator/menus/icons → icons}/sort-asc.svg +3 -3
  160. package/dist/src/icons/sort-desc.d.ts +3 -0
  161. package/dist/src/icons/sort-desc.d.ts.map +1 -0
  162. package/dist/src/icons/sort-desc.js +22 -0
  163. package/dist/src/icons/sort-desc.js.map +1 -0
  164. package/dist/src/{elements/ia-item-navigator/menus/icons → icons}/sort-desc.svg +3 -3
  165. package/dist/src/icons/sort-neutral.d.ts +3 -0
  166. package/dist/src/icons/sort-neutral.d.ts.map +1 -0
  167. package/dist/src/icons/sort-neutral.js +14 -0
  168. package/dist/src/icons/sort-neutral.js.map +1 -0
  169. package/dist/src/{elements/ia-item-navigator/menus/icons → icons}/sort-neutral.svg +1 -1
  170. package/dist/src/icons/tumblr.d.ts +3 -0
  171. package/dist/src/icons/tumblr.d.ts.map +1 -0
  172. package/dist/src/icons/tumblr.js +7 -0
  173. package/dist/src/icons/tumblr.js.map +1 -0
  174. package/dist/src/{elements/ia-item-navigator/menus/icons → icons}/tumblr.svg +1 -1
  175. package/dist/src/icons/twitter.d.ts +3 -0
  176. package/dist/src/icons/twitter.d.ts.map +1 -0
  177. package/dist/src/icons/twitter.js +7 -0
  178. package/dist/src/icons/twitter.js.map +1 -0
  179. package/dist/src/{elements/ia-item-navigator/menus/icons → icons}/twitter.svg +1 -1
  180. package/dist/src/icons/viewable-files.d.ts +3 -0
  181. package/dist/src/icons/viewable-files.d.ts.map +1 -0
  182. package/dist/src/icons/viewable-files.js +7 -0
  183. package/dist/src/icons/viewable-files.js.map +1 -0
  184. package/dist/src/{elements/ia-item-navigator/menus/icons → icons}/viewable-files.svg +1 -1
  185. package/dist/src/util/icon-box.d.ts +17 -0
  186. package/dist/src/util/icon-box.d.ts.map +1 -0
  187. package/dist/src/util/icon-box.js +27 -0
  188. package/dist/src/util/icon-box.js.map +1 -0
  189. package/package.json +39 -8
  190. package/dist/src/elements/ia-donation-form/analytics.d.ts +0 -12
  191. package/dist/src/elements/ia-donation-form/analytics.d.ts.map +0 -1
  192. package/dist/src/elements/ia-donation-form/analytics.js +0 -2
  193. package/dist/src/elements/ia-donation-form/analytics.js.map +0 -1
  194. package/dist/src/elements/ia-donation-form/flow-handlers/donation-flow-modal-manager.d.ts +0 -118
  195. package/dist/src/elements/ia-donation-form/flow-handlers/donation-flow-modal-manager.d.ts.map +0 -1
  196. package/dist/src/elements/ia-donation-form/flow-handlers/donation-flow-modal-manager.js +0 -194
  197. package/dist/src/elements/ia-donation-form/flow-handlers/donation-flow-modal-manager.js.map +0 -1
  198. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/apple-pay-flow-handler.d.ts +0 -24
  199. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/apple-pay-flow-handler.d.ts.map +0 -1
  200. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/apple-pay-flow-handler.js +0 -70
  201. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/apple-pay-flow-handler.js.map +0 -1
  202. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/credit-card-flow-handler.d.ts +0 -44
  203. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/credit-card-flow-handler.d.ts.map +0 -1
  204. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/credit-card-flow-handler.js +0 -116
  205. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/credit-card-flow-handler.js.map +0 -1
  206. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/google-pay-flow-handler.d.ts +0 -24
  207. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/google-pay-flow-handler.d.ts.map +0 -1
  208. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/google-pay-flow-handler.js +0 -74
  209. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/google-pay-flow-handler.js.map +0 -1
  210. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/paypal-flow-handler.d.ts +0 -47
  211. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/paypal-flow-handler.d.ts.map +0 -1
  212. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/paypal-flow-handler.js +0 -204
  213. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/paypal-flow-handler.js.map +0 -1
  214. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/venmo-flow-handler.d.ts +0 -30
  215. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/venmo-flow-handler.d.ts.map +0 -1
  216. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/venmo-flow-handler.js +0 -77
  217. package/dist/src/elements/ia-donation-form/flow-handlers/handlers/venmo-flow-handler.js.map +0 -1
  218. package/dist/src/elements/ia-donation-form/flow-handlers/payment-flow-handlers.d.ts +0 -80
  219. package/dist/src/elements/ia-donation-form/flow-handlers/payment-flow-handlers.d.ts.map +0 -1
  220. package/dist/src/elements/ia-donation-form/flow-handlers/payment-flow-handlers.js +0 -72
  221. package/dist/src/elements/ia-donation-form/flow-handlers/payment-flow-handlers.js.map +0 -1
  222. package/dist/src/elements/ia-donation-form/form-elements/contact-form/autocomplete-field-options.d.ts +0 -2
  223. package/dist/src/elements/ia-donation-form/form-elements/contact-form/autocomplete-field-options.d.ts.map +0 -1
  224. package/dist/src/elements/ia-donation-form/form-elements/contact-form/autocomplete-field-options.js +0 -2
  225. package/dist/src/elements/ia-donation-form/form-elements/contact-form/autocomplete-field-options.js.map +0 -1
  226. package/dist/src/elements/ia-donation-form/form-elements/contact-form/countries.d.ts +0 -3
  227. package/dist/src/elements/ia-donation-form/form-elements/contact-form/countries.d.ts.map +0 -1
  228. package/dist/src/elements/ia-donation-form/form-elements/contact-form/countries.js +0 -254
  229. package/dist/src/elements/ia-donation-form/form-elements/contact-form/countries.js.map +0 -1
  230. package/dist/src/elements/ia-donation-form/form-elements/contact-form/ia-donation-contact-form.d.ts +0 -68
  231. package/dist/src/elements/ia-donation-form/form-elements/contact-form/ia-donation-contact-form.d.ts.map +0 -1
  232. package/dist/src/elements/ia-donation-form/form-elements/contact-form/ia-donation-contact-form.js +0 -483
  233. package/dist/src/elements/ia-donation-form/form-elements/contact-form/ia-donation-contact-form.js.map +0 -1
  234. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-badged-input.d.ts +0 -26
  235. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-badged-input.d.ts.map +0 -1
  236. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-badged-input.js +0 -163
  237. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-badged-input.js.map +0 -1
  238. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-credit-card-fields.d.ts +0 -39
  239. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-credit-card-fields.d.ts.map +0 -1
  240. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-credit-card-fields.js +0 -212
  241. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-credit-card-fields.js.map +0 -1
  242. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-header.d.ts +0 -31
  243. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-header.d.ts.map +0 -1
  244. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-header.js +0 -93
  245. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-header.js.map +0 -1
  246. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-payment-selector.d.ts +0 -33
  247. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-payment-selector.d.ts.map +0 -1
  248. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-payment-selector.js +0 -380
  249. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-payment-selector.js.map +0 -1
  250. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-summary.d.ts +0 -11
  251. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-summary.d.ts.map +0 -1
  252. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-summary.js +0 -59
  253. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-summary.js.map +0 -1
  254. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-total-amount.d.ts +0 -10
  255. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-total-amount.d.ts.map +0 -1
  256. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-total-amount.js +0 -75
  257. package/dist/src/elements/ia-donation-form/form-elements/ia-donation-total-amount.js.map +0 -1
  258. package/dist/src/elements/ia-donation-form/ia-donation-form-controller.d.ts +0 -111
  259. package/dist/src/elements/ia-donation-form/ia-donation-form-controller.d.ts.map +0 -1
  260. package/dist/src/elements/ia-donation-form/ia-donation-form-controller.js +0 -522
  261. package/dist/src/elements/ia-donation-form/ia-donation-form-controller.js.map +0 -1
  262. package/dist/src/elements/ia-donation-form/ia-donation-form.d.ts +0 -95
  263. package/dist/src/elements/ia-donation-form/ia-donation-form.d.ts.map +0 -1
  264. package/dist/src/elements/ia-donation-form/ia-donation-form.js +0 -522
  265. package/dist/src/elements/ia-donation-form/ia-donation-form.js.map +0 -1
  266. package/dist/src/elements/ia-donation-form/icons/apple-pay.svg +0 -22
  267. package/dist/src/elements/ia-donation-form/icons/calendar.svg +0 -12
  268. package/dist/src/elements/ia-donation-form/icons/credit-card.svg +0 -7
  269. package/dist/src/elements/ia-donation-form/icons/google-pay.svg +0 -38
  270. package/dist/src/elements/ia-donation-form/icons/lock.svg +0 -6
  271. package/dist/src/elements/ia-donation-form/icons/paypal.svg +0 -39
  272. package/dist/src/elements/ia-donation-form/icons/venmo.svg +0 -9
  273. package/dist/src/elements/ia-donation-form/icons.d.ts +0 -9
  274. package/dist/src/elements/ia-donation-form/icons.d.ts.map +0 -1
  275. package/dist/src/elements/ia-donation-form/icons.js +0 -27
  276. package/dist/src/elements/ia-donation-form/icons.js.map +0 -1
  277. package/dist/src/elements/ia-donation-form/modals/ia-donation-confirm-modal.d.ts +0 -27
  278. package/dist/src/elements/ia-donation-form/modals/ia-donation-confirm-modal.d.ts.map +0 -1
  279. package/dist/src/elements/ia-donation-form/modals/ia-donation-confirm-modal.js +0 -195
  280. package/dist/src/elements/ia-donation-form/modals/ia-donation-confirm-modal.js.map +0 -1
  281. package/dist/src/elements/ia-donation-form/modals/ia-donation-error-modal-content.d.ts +0 -7
  282. package/dist/src/elements/ia-donation-form/modals/ia-donation-error-modal-content.d.ts.map +0 -1
  283. package/dist/src/elements/ia-donation-form/modals/ia-donation-error-modal-content.js +0 -63
  284. package/dist/src/elements/ia-donation-form/modals/ia-donation-error-modal-content.js.map +0 -1
  285. package/dist/src/elements/ia-donation-form/modals/ia-donation-upsell-modal-content.d.ts +0 -28
  286. package/dist/src/elements/ia-donation-form/modals/ia-donation-upsell-modal-content.d.ts.map +0 -1
  287. package/dist/src/elements/ia-donation-form/modals/ia-donation-upsell-modal-content.js +0 -313
  288. package/dist/src/elements/ia-donation-form/modals/ia-donation-upsell-modal-content.js.map +0 -1
  289. package/dist/src/elements/ia-item-navigator/icons.d.ts +0 -13
  290. package/dist/src/elements/ia-item-navigator/icons.d.ts.map +0 -1
  291. package/dist/src/elements/ia-item-navigator/icons.js +0 -16
  292. package/dist/src/elements/ia-item-navigator/icons.js.map +0 -1
  293. package/dist/src/elements/ia-item-navigator/menus/icons/list.svg +0 -3
  294. package/dist/src/elements/ia-item-navigator/menus/share-icons.d.ts +0 -16
  295. package/dist/src/elements/ia-item-navigator/menus/share-icons.d.ts.map +0 -1
  296. package/dist/src/elements/ia-item-navigator/menus/share-icons.js +0 -23
  297. package/dist/src/elements/ia-item-navigator/menus/share-icons.js.map +0 -1
  298. package/dist/src/elements/ia-scrubber-bar/assets/next-section-marker.d.ts.map +0 -1
  299. package/dist/src/elements/ia-scrubber-bar/assets/next-section-marker.js +0 -18
  300. package/dist/src/elements/ia-scrubber-bar/assets/next-section-marker.js.map +0 -1
  301. package/dist/src/elements/ia-scrubber-bar/assets/previous-section-marker.d.ts.map +0 -1
  302. package/dist/src/elements/ia-scrubber-bar/assets/previous-section-marker.js +0 -18
  303. package/dist/src/elements/ia-scrubber-bar/assets/previous-section-marker.js.map +0 -1
  304. package/dist/src/util/masked-icon.d.ts +0 -24
  305. package/dist/src/util/masked-icon.d.ts.map +0 -1
  306. package/dist/src/util/masked-icon.js +0 -30
  307. package/dist/src/util/masked-icon.js.map +0 -1
  308. /package/dist/src/{elements/ia-combo-box → icons}/caret-closed.svg +0 -0
  309. /package/dist/src/{elements/ia-combo-box → icons}/caret-open.svg +0 -0
  310. /package/dist/src/{elements/ia-combo-box → icons}/clear.svg +0 -0
@@ -3,9 +3,16 @@ import { css, html, LitElement, nothing, } from 'lit';
3
3
  import { property } from 'lit/decorators.js';
4
4
  import { customElement } from '../../../util/custom-element.js';
5
5
  import themeStyles from '../../../themes/theme-styles.js';
6
- import { shareIcon, twitterIcon, facebookIcon, tumblrIcon, pinterestIcon, emailIcon, linkIcon, } from './share-icons.js';
6
+ import share from '../../../icons/share.js';
7
+ import twitter from '../../../icons/twitter.js';
8
+ import facebook from '../../../icons/facebook.js';
9
+ import tumblr from '../../../icons/tumblr.js';
10
+ import pinterest from '../../../icons/pinterest.js';
11
+ import email from '../../../icons/email.js';
12
+ import link from '../../../icons/link.js';
13
+ import { iconBox, iconBoxStyles } from '../../../util/icon-box.js';
7
14
  /** Icon for the share menu shortcut / menu entry. */
8
- export { shareIcon };
15
+ export const shareIcon = iconBox(share);
9
16
  /**
10
17
  * The "share this item" side panel: social sharing links (Twitter, Facebook,
11
18
  * Tumblr, Pinterest, email) plus copyable iframe / bbcode embed snippets.
@@ -47,7 +54,7 @@ let IAItemNavSharePanel = class IAItemNavSharePanel extends LitElement {
47
54
  this.sharingOptions = [
48
55
  {
49
56
  name: 'Twitter',
50
- icon: twitterIcon,
57
+ icon: iconBox(twitter),
51
58
  url: `https://twitter.com/intent/tweet?${new URLSearchParams({
52
59
  url: shareUrl,
53
60
  text: shareBlurb,
@@ -56,14 +63,14 @@ let IAItemNavSharePanel = class IAItemNavSharePanel extends LitElement {
56
63
  },
57
64
  {
58
65
  name: 'Facebook',
59
- icon: facebookIcon,
66
+ icon: iconBox(facebook),
60
67
  url: `https://www.facebook.com/sharer/sharer.php?${new URLSearchParams({
61
68
  u: shareUrl,
62
69
  })}`,
63
70
  },
64
71
  {
65
72
  name: 'Tumblr',
66
- icon: tumblrIcon,
73
+ icon: iconBox(tumblr),
67
74
  url: `https://www.tumblr.com/widgets/share/tool/preview?${new URLSearchParams({
68
75
  posttype: 'link',
69
76
  canonicalUrl: shareUrl,
@@ -72,7 +79,7 @@ let IAItemNavSharePanel = class IAItemNavSharePanel extends LitElement {
72
79
  },
73
80
  {
74
81
  name: 'Pinterest',
75
- icon: pinterestIcon,
82
+ icon: iconBox(pinterest),
76
83
  url: `http://www.pinterest.com/pin/create/button/?${new URLSearchParams({
77
84
  url: shareUrl,
78
85
  description: shareBlurb,
@@ -80,7 +87,7 @@ let IAItemNavSharePanel = class IAItemNavSharePanel extends LitElement {
80
87
  },
81
88
  {
82
89
  name: 'Email',
83
- icon: emailIcon,
90
+ icon: iconBox(email),
84
91
  url: `mailto:?${new URLSearchParams({
85
92
  subject: shareBlurb,
86
93
  body: shareUrl,
@@ -138,7 +145,7 @@ let IAItemNavSharePanel = class IAItemNavSharePanel extends LitElement {
138
145
  </a>`)}
139
146
  <details>
140
147
  <summary class="share-option">
141
- ${linkIcon} Get an embeddable link
148
+ ${iconBox(link)} Get an embeddable link
142
149
  </summary>
143
150
  <div class="embed">
144
151
  <h4>Embed</h4>
@@ -168,6 +175,7 @@ let IAItemNavSharePanel = class IAItemNavSharePanel extends LitElement {
168
175
  static get styles() {
169
176
  return [
170
177
  themeStyles,
178
+ iconBoxStyles,
171
179
  css `
172
180
  :host {
173
181
  --item-navigator-text-color--: var(
@@ -240,7 +248,8 @@ let IAItemNavSharePanel = class IAItemNavSharePanel extends LitElement {
240
248
  padding: 0.2em;
241
249
  margin-right: 1em;
242
250
  vertical-align: middle;
243
- border: 1px solid var(--item-navigator-border-color--);
251
+ /* The border only reserves geometry. It isn't drawn. */
252
+ border: 1px solid transparent;
244
253
  border-radius: 7px;
245
254
  }
246
255
 
@@ -250,12 +259,22 @@ let IAItemNavSharePanel = class IAItemNavSharePanel extends LitElement {
250
259
  font-size: var(--item-navigator-base-font-size--);
251
260
  width: 2em;
252
261
  height: 2em;
262
+ position: relative;
263
+ /* The glyph fills the border box (the padding box plus the 1px
264
+ border) and is clipped to its rounded corners. */
265
+ clip-path: inset(0 round 7px);
266
+ }
267
+
268
+ .share-option .ia-icon > svg {
269
+ position: absolute;
270
+ inset: -1px;
271
+ width: calc(100% + 2px);
272
+ height: calc(100% + 2px);
253
273
  }
254
274
 
255
- /* Our glyphs are masked spans: the mask supplies the shape, this
256
- supplies the paint. */
257
- span.ia-icon {
258
- background-color: var(--item-navigator-icon-color--);
275
+ /* Our glyphs paint with currentColor, so this supplies the paint. */
276
+ .ia-icon {
277
+ color: var(--item-navigator-icon-color--);
259
278
  }
260
279
 
261
280
  /* Host-supplied icons may still be inline svg, so keep theming those
@@ -1 +1 @@
1
- {"version":3,"file":"ia-itemnav-share-panel.js","sourceRoot":"","sources":["../../../../../src/elements/ia-item-navigator/menus/ia-itemnav-share-panel.ts"],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CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yDAAsB;AAEtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0DAAoB;AAjBpC,mBAAmB;IAD/B,aAAa,CAAC,wBAAwB,CAAC;GAC3B,mBAAmB,CA+U/B","sourcesContent":["import {\n css,\n html,\n LitElement,\n nothing,\n PropertyValues,\n TemplateResult,\n type CSSResultGroup,\n} from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '@src/util/custom-element';\nimport themeStyles from '@src/themes/theme-styles';\nimport {\n shareIcon,\n twitterIcon,\n facebookIcon,\n tumblrIcon,\n pinterestIcon,\n emailIcon,\n linkIcon,\n} from './share-icons';\n\ntype ShareOption = {\n name: string;\n icon: TemplateResult | string;\n url: string;\n};\n\n/** Icon for the share menu shortcut / menu entry. */\nexport { shareIcon };\n\n/**\n * The \"share this item\" side panel: social sharing links (Twitter, Facebook,\n * Tumblr, Pinterest, email) plus copyable iframe / bbcode embed snippets.\n * Sharing options are derived from the item identifier/metadata and rebuilt\n * whenever `sharingOptions` is reset to empty.\n */\n@customElement('ia-itemnav-share-panel')\nexport class IAItemNavSharePanel extends LitElement {\n @property({ type: String }) baseHost = 'archive.org';\n\n @property({ type: String }) creator = '';\n\n @property({ type: String }) description = '';\n\n @property({ type: Boolean }) embedOptionsVisible = false;\n\n @property({ type: String }) identifier = '';\n\n @property({ type: Array }) sharingOptions: ShareOption[] = [];\n\n @property({ type: String }) type = '';\n\n @property({ type: Boolean }) renderHeader = false;\n\n @property({ type: String }) fileSubPrefix = '';\n\n private copyNoteTimeouts = new WeakMap<\n Element,\n ReturnType<typeof setTimeout>\n >();\n\n updated(changed: PropertyValues): void {\n if (changed.has('sharingOptions') && !this.sharingOptions.length) {\n this.loadProviders();\n }\n }\n\n loadProviders(): void {\n let shareUrl = `https://${this.baseHost}/details/${this.identifier}`;\n if (this.fileSubPrefix) {\n shareUrl += `/${this.fileSubPrefix}`;\n }\n const shareBlurb = [\n this.description,\n this.creator,\n 'Free Download, Borrow, and Streaming',\n 'Internet Archive',\n ]\n .filter(Boolean)\n .join(' : ');\n\n this.sharingOptions = [\n {\n name: 'Twitter',\n icon: twitterIcon,\n url: `https://twitter.com/intent/tweet?${new URLSearchParams({\n url: shareUrl,\n text: shareBlurb,\n via: 'internetarchive',\n })}`,\n },\n {\n name: 'Facebook',\n icon: facebookIcon,\n url: `https://www.facebook.com/sharer/sharer.php?${new URLSearchParams({\n u: shareUrl,\n })}`,\n },\n {\n name: 'Tumblr',\n icon: tumblrIcon,\n url: `https://www.tumblr.com/widgets/share/tool/preview?${new URLSearchParams(\n {\n posttype: 'link',\n canonicalUrl: shareUrl,\n title: shareBlurb,\n },\n )}`,\n },\n {\n name: 'Pinterest',\n icon: pinterestIcon,\n url: `http://www.pinterest.com/pin/create/button/?${new URLSearchParams(\n {\n url: shareUrl,\n description: shareBlurb,\n },\n )}`,\n },\n {\n name: 'Email',\n icon: emailIcon,\n url: `mailto:?${new URLSearchParams({\n subject: shareBlurb,\n body: shareUrl,\n })}`,\n },\n ];\n }\n\n /**\n * Copies the embed snippet in the clicked `.code` block, preferring the async\n * Clipboard API and falling back to the legacy `execCommand` path for\n * browsers that lack it, then briefly flashes the \"Copied\" note.\n */\n private async copyToClipboard(event: MouseEvent): Promise<void> {\n const currentTarget = event.currentTarget as HTMLElement;\n const textarea = currentTarget.querySelector('textarea');\n const note = currentTarget.querySelector('small');\n if (!textarea || !note) return;\n\n try {\n await navigator.clipboard.writeText(textarea.value);\n } catch {\n // Fallback for browsers without the async Clipboard API.\n textarea.select();\n document.execCommand('copy');\n textarea.blur();\n }\n\n note.classList.add('visible');\n clearTimeout(this.copyNoteTimeouts.get(note));\n this.copyNoteTimeouts.set(\n note,\n setTimeout(() => note.classList.remove('visible'), 4000),\n );\n }\n\n get iframeEmbed(): string {\n return `<iframe\n src=\"https://${this.baseHost}/embed/${this.identifier}\"\n width=\"560\" height=\"384\" frameborder=\"0\"\n webkitallowfullscreen=\"true\" mozallowfullscreen=\"true\" allowfullscreen\n ></iframe>`;\n }\n\n get bbcodeEmbed(): string {\n return `[archiveorg ${this.identifier} width=560 height=384 frameborder=0 webkitallowfullscreen=true mozallowfullscreen=true]`;\n }\n\n get helpURL(): string {\n return `https://${this.baseHost}/help/audio.php?identifier=${this.identifier}`;\n }\n\n get header(): TemplateResult | typeof nothing {\n const header = html`<header><h3>Share this ${this.type}</h3></header>`;\n return this.renderHeader ? header : nothing;\n }\n\n render(): TemplateResult {\n return html`\n ${this.header}\n <div>\n ${this.sharingOptions.map(\n (option) =>\n html`<a class=\"share-option\" href=${option.url} target=\"_blank\">\n ${option.icon} ${option.name}\n </a>`,\n )}\n <details>\n <summary class=\"share-option\">\n ${linkIcon} Get an embeddable link\n </summary>\n <div class=\"embed\">\n <h4>Embed</h4>\n <div class=\"code\" @click=${this.copyToClipboard}>\n <textarea readonly>${this.iframeEmbed}</textarea>\n <small>Copied to clipboard</small>\n </div>\n <h4>\n Embed for wordpress.com hosted blogs and archive.org item\n &lt;description&gt; tags\n </h4>\n <div class=\"code\" @click=${this.copyToClipboard}>\n <textarea readonly>${this.bbcodeEmbed}</textarea>\n <small>Copied to clipboard</small>\n </div>\n <p>\n Want more?\n <a href=${this.helpURL}\n >Advanced embedding details, examples, and help</a\n >!\n </p>\n </div>\n </details>\n </div>\n `;\n }\n\n static get styles(): CSSResultGroup {\n return [\n themeStyles,\n css`\n :host {\n --item-navigator-text-color--: var(\n --item-navigator-text-color,\n var(--true-white)\n );\n --item-navigator-border-color--: var(\n --item-navigator-border-color,\n #4b4b4b\n );\n /* Icons follow the adjustable text color by default. */\n --item-navigator-icon-color--: var(\n --item-navigator-icon-color,\n var(--item-navigator-text-color--)\n );\n --item-navigator-share-embed-bg--: var(\n --item-navigator-share-embed-bg,\n #151515\n );\n\n display: block;\n height: 100%;\n overflow-y: auto;\n /* 10px base (petabox scale); internal sizing is em against it. */\n --item-navigator-base-font-size--: var(\n --item-navigator-base-font-size,\n 10px\n );\n font-size: var(--item-navigator-base-font-size--);\n color: var(--item-navigator-text-color--);\n box-sizing: border-box;\n }\n\n header {\n display: flex;\n align-items: baseline;\n }\n\n h3 {\n padding: 0;\n margin: 0 1em 0 0;\n font-size: 1.6em;\n }\n\n h4 {\n font-size: 1.4em;\n }\n\n :host > div {\n padding: 1em 0;\n }\n\n .share-option {\n display: block;\n padding: 0.5em 0;\n font-size: 1.6em;\n text-decoration: none;\n color: var(--item-navigator-text-color--);\n cursor: pointer;\n transition: background-color 0.2s;\n border-radius: 6px;\n }\n\n .share-option:hover {\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n .share-option > * {\n display: inline-block;\n padding: 0.2em;\n margin-right: 1em;\n vertical-align: middle;\n border: 1px solid var(--item-navigator-border-color--);\n border-radius: 7px;\n }\n\n .share-option .ia-icon {\n /* Reset to the base so the icon (em) doesn't compound against the\n share-option's enlarged font-size. */\n font-size: var(--item-navigator-base-font-size--);\n width: 2em;\n height: 2em;\n }\n\n /* Our glyphs are masked spans: the mask supplies the shape, this\n supplies the paint. */\n span.ia-icon {\n background-color: var(--item-navigator-icon-color--);\n }\n\n /* Host-supplied icons may still be inline svg, so keep theming those\n the original way. */\n .ia-icon .fill-color {\n fill: var(--item-navigator-icon-color--);\n }\n\n /* Hide the triangle that appears on details tags */\n summary::marker {\n content: '';\n }\n\n summary::-webkit-details-marker {\n display: none;\n }\n\n .embed {\n padding-right: 5px;\n }\n\n .embed a {\n color: var(--item-navigator-text-color--);\n }\n\n .code {\n position: relative;\n }\n\n textarea {\n display: block;\n width: 100%;\n height: 120px;\n padding: 0.8em 1em;\n box-sizing: border-box;\n resize: none;\n cursor: pointer;\n font: normal 1.4em var(--base-font-family);\n color: var(--item-navigator-text-color--);\n background: var(--item-navigator-share-embed-bg--);\n }\n\n small {\n position: absolute;\n bottom: 0;\n left: 0;\n height: 3em;\n padding: 0.5em 1em;\n box-sizing: border-box;\n font: normal 1.2em/2em var(--base-font-family);\n color: var(--item-navigator-share-embed-bg--);\n background: var(--item-navigator-text-color--);\n opacity: 0;\n transition: opacity 300ms linear;\n }\n\n small.visible {\n opacity: 1;\n }\n `,\n ];\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ia-itemnav-share-panel': IAItemNavSharePanel;\n }\n}\n"]}
1
+ {"version":3,"file":"ia-itemnav-share-panel.js","sourceRoot":"","sources":["../../../../../src/elements/ia-item-navigator/menus/ia-itemnav-share-panel.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,GAAG,EACH,IAAI,EACJ,UAAU,EACV,OAAO,GAIR,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,MAAM,kBAAkB,CAAC;AACrC,OAAO,OAAO,MAAM,oBAAoB,CAAC;AACzC,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAC7C,OAAO,KAAK,MAAM,kBAAkB,CAAC;AACrC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAQ5D,qDAAqD;AACrD,MAAM,CAAC,MAAM,SAAS,GAAmB,OAAO,CAAC,KAAK,CAAC,CAAC;AAExD;;;;;GAKG;AAEI,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,UAAU;IAA5C;;QACuB,aAAQ,GAAG,aAAa,CAAC;QAEzB,YAAO,GAAG,EAAE,CAAC;QAEb,gBAAW,GAAG,EAAE,CAAC;QAEhB,wBAAmB,GAAG,KAAK,CAAC;QAE7B,eAAU,GAAG,EAAE,CAAC;QAEjB,mBAAc,GAAkB,EAAE,CAAC;QAElC,SAAI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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8JF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AA1V6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAA0B;AAEzB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDAAc;AAEb;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wDAAkB;AAEhB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gEAA6B;AAE7B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDAAiB;AAEjB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;2DAAoC;AAElC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAAW;AAET;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yDAAsB;AAEtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0DAAoB;AAjBpC,mBAAmB;IAD/B,aAAa,CAAC,wBAAwB,CAAC;GAC3B,mBAAmB,CA2V/B","sourcesContent":["import {\n css,\n html,\n LitElement,\n nothing,\n PropertyValues,\n TemplateResult,\n type CSSResultGroup,\n} from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '@src/util/custom-element';\nimport themeStyles from '@src/themes/theme-styles';\nimport share from '@src/icons/share';\nimport twitter from '@src/icons/twitter';\nimport facebook from '@src/icons/facebook';\nimport tumblr from '@src/icons/tumblr';\nimport pinterest from '@src/icons/pinterest';\nimport email from '@src/icons/email';\nimport link from '@src/icons/link';\nimport { iconBox, iconBoxStyles } from '@src/util/icon-box';\n\ntype ShareOption = {\n name: string;\n icon: TemplateResult | string;\n url: string;\n};\n\n/** Icon for the share menu shortcut / menu entry. */\nexport const shareIcon: TemplateResult = iconBox(share);\n\n/**\n * The \"share this item\" side panel: social sharing links (Twitter, Facebook,\n * Tumblr, Pinterest, email) plus copyable iframe / bbcode embed snippets.\n * Sharing options are derived from the item identifier/metadata and rebuilt\n * whenever `sharingOptions` is reset to empty.\n */\n@customElement('ia-itemnav-share-panel')\nexport class IAItemNavSharePanel extends LitElement {\n @property({ type: String }) baseHost = 'archive.org';\n\n @property({ type: String }) creator = '';\n\n @property({ type: String }) description = '';\n\n @property({ type: Boolean }) embedOptionsVisible = false;\n\n @property({ type: String }) identifier = '';\n\n @property({ type: Array }) sharingOptions: ShareOption[] = [];\n\n @property({ type: String }) type = '';\n\n @property({ type: Boolean }) renderHeader = false;\n\n @property({ type: String }) fileSubPrefix = '';\n\n private copyNoteTimeouts = new WeakMap<\n Element,\n ReturnType<typeof setTimeout>\n >();\n\n updated(changed: PropertyValues): void {\n if (changed.has('sharingOptions') && !this.sharingOptions.length) {\n this.loadProviders();\n }\n }\n\n loadProviders(): void {\n let shareUrl = `https://${this.baseHost}/details/${this.identifier}`;\n if (this.fileSubPrefix) {\n shareUrl += `/${this.fileSubPrefix}`;\n }\n const shareBlurb = [\n this.description,\n this.creator,\n 'Free Download, Borrow, and Streaming',\n 'Internet Archive',\n ]\n .filter(Boolean)\n .join(' : ');\n\n this.sharingOptions = [\n {\n name: 'Twitter',\n icon: iconBox(twitter),\n url: `https://twitter.com/intent/tweet?${new URLSearchParams({\n url: shareUrl,\n text: shareBlurb,\n via: 'internetarchive',\n })}`,\n },\n {\n name: 'Facebook',\n icon: iconBox(facebook),\n url: `https://www.facebook.com/sharer/sharer.php?${new URLSearchParams({\n u: shareUrl,\n })}`,\n },\n {\n name: 'Tumblr',\n icon: iconBox(tumblr),\n url: `https://www.tumblr.com/widgets/share/tool/preview?${new URLSearchParams(\n {\n posttype: 'link',\n canonicalUrl: shareUrl,\n title: shareBlurb,\n },\n )}`,\n },\n {\n name: 'Pinterest',\n icon: iconBox(pinterest),\n url: `http://www.pinterest.com/pin/create/button/?${new URLSearchParams(\n {\n url: shareUrl,\n description: shareBlurb,\n },\n )}`,\n },\n {\n name: 'Email',\n icon: iconBox(email),\n url: `mailto:?${new URLSearchParams({\n subject: shareBlurb,\n body: shareUrl,\n })}`,\n },\n ];\n }\n\n /**\n * Copies the embed snippet in the clicked `.code` block, preferring the async\n * Clipboard API and falling back to the legacy `execCommand` path for\n * browsers that lack it, then briefly flashes the \"Copied\" note.\n */\n private async copyToClipboard(event: MouseEvent): Promise<void> {\n const currentTarget = event.currentTarget as HTMLElement;\n const textarea = currentTarget.querySelector('textarea');\n const note = currentTarget.querySelector('small');\n if (!textarea || !note) return;\n\n try {\n await navigator.clipboard.writeText(textarea.value);\n } catch {\n // Fallback for browsers without the async Clipboard API.\n textarea.select();\n document.execCommand('copy');\n textarea.blur();\n }\n\n note.classList.add('visible');\n clearTimeout(this.copyNoteTimeouts.get(note));\n this.copyNoteTimeouts.set(\n note,\n setTimeout(() => note.classList.remove('visible'), 4000),\n );\n }\n\n get iframeEmbed(): string {\n return `<iframe\n src=\"https://${this.baseHost}/embed/${this.identifier}\"\n width=\"560\" height=\"384\" frameborder=\"0\"\n webkitallowfullscreen=\"true\" mozallowfullscreen=\"true\" allowfullscreen\n ></iframe>`;\n }\n\n get bbcodeEmbed(): string {\n return `[archiveorg ${this.identifier} width=560 height=384 frameborder=0 webkitallowfullscreen=true mozallowfullscreen=true]`;\n }\n\n get helpURL(): string {\n return `https://${this.baseHost}/help/audio.php?identifier=${this.identifier}`;\n }\n\n get header(): TemplateResult | typeof nothing {\n const header = html`<header><h3>Share this ${this.type}</h3></header>`;\n return this.renderHeader ? header : nothing;\n }\n\n render(): TemplateResult {\n return html`\n ${this.header}\n <div>\n ${this.sharingOptions.map(\n (option) =>\n html`<a class=\"share-option\" href=${option.url} target=\"_blank\">\n ${option.icon} ${option.name}\n </a>`,\n )}\n <details>\n <summary class=\"share-option\">\n ${iconBox(link)} Get an embeddable link\n </summary>\n <div class=\"embed\">\n <h4>Embed</h4>\n <div class=\"code\" @click=${this.copyToClipboard}>\n <textarea readonly>${this.iframeEmbed}</textarea>\n <small>Copied to clipboard</small>\n </div>\n <h4>\n Embed for wordpress.com hosted blogs and archive.org item\n &lt;description&gt; tags\n </h4>\n <div class=\"code\" @click=${this.copyToClipboard}>\n <textarea readonly>${this.bbcodeEmbed}</textarea>\n <small>Copied to clipboard</small>\n </div>\n <p>\n Want more?\n <a href=${this.helpURL}\n >Advanced embedding details, examples, and help</a\n >!\n </p>\n </div>\n </details>\n </div>\n `;\n }\n\n static get styles(): CSSResultGroup {\n return [\n themeStyles,\n iconBoxStyles,\n css`\n :host {\n --item-navigator-text-color--: var(\n --item-navigator-text-color,\n var(--true-white)\n );\n --item-navigator-border-color--: var(\n --item-navigator-border-color,\n #4b4b4b\n );\n /* Icons follow the adjustable text color by default. */\n --item-navigator-icon-color--: var(\n --item-navigator-icon-color,\n var(--item-navigator-text-color--)\n );\n --item-navigator-share-embed-bg--: var(\n --item-navigator-share-embed-bg,\n #151515\n );\n\n display: block;\n height: 100%;\n overflow-y: auto;\n /* 10px base (petabox scale); internal sizing is em against it. */\n --item-navigator-base-font-size--: var(\n --item-navigator-base-font-size,\n 10px\n );\n font-size: var(--item-navigator-base-font-size--);\n color: var(--item-navigator-text-color--);\n box-sizing: border-box;\n }\n\n header {\n display: flex;\n align-items: baseline;\n }\n\n h3 {\n padding: 0;\n margin: 0 1em 0 0;\n font-size: 1.6em;\n }\n\n h4 {\n font-size: 1.4em;\n }\n\n :host > div {\n padding: 1em 0;\n }\n\n .share-option {\n display: block;\n padding: 0.5em 0;\n font-size: 1.6em;\n text-decoration: none;\n color: var(--item-navigator-text-color--);\n cursor: pointer;\n transition: background-color 0.2s;\n border-radius: 6px;\n }\n\n .share-option:hover {\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n .share-option > * {\n display: inline-block;\n padding: 0.2em;\n margin-right: 1em;\n vertical-align: middle;\n /* The border only reserves geometry. It isn't drawn. */\n border: 1px solid transparent;\n border-radius: 7px;\n }\n\n .share-option .ia-icon {\n /* Reset to the base so the icon (em) doesn't compound against the\n share-option's enlarged font-size. */\n font-size: var(--item-navigator-base-font-size--);\n width: 2em;\n height: 2em;\n position: relative;\n /* The glyph fills the border box (the padding box plus the 1px\n border) and is clipped to its rounded corners. */\n clip-path: inset(0 round 7px);\n }\n\n .share-option .ia-icon > svg {\n position: absolute;\n inset: -1px;\n width: calc(100% + 2px);\n height: calc(100% + 2px);\n }\n\n /* Our glyphs paint with currentColor, so this supplies the paint. */\n .ia-icon {\n color: var(--item-navigator-icon-color--);\n }\n\n /* Host-supplied icons may still be inline svg, so keep theming those\n the original way. */\n .ia-icon .fill-color {\n fill: var(--item-navigator-icon-color--);\n }\n\n /* Hide the triangle that appears on details tags */\n summary::marker {\n content: '';\n }\n\n summary::-webkit-details-marker {\n display: none;\n }\n\n .embed {\n padding-right: 5px;\n }\n\n .embed a {\n color: var(--item-navigator-text-color--);\n }\n\n .code {\n position: relative;\n }\n\n textarea {\n display: block;\n width: 100%;\n height: 120px;\n padding: 0.8em 1em;\n box-sizing: border-box;\n resize: none;\n cursor: pointer;\n font: normal 1.4em var(--base-font-family);\n color: var(--item-navigator-text-color--);\n background: var(--item-navigator-share-embed-bg--);\n }\n\n small {\n position: absolute;\n bottom: 0;\n left: 0;\n height: 3em;\n padding: 0.5em 1em;\n box-sizing: border-box;\n font: normal 1.2em/2em var(--base-font-family);\n color: var(--item-navigator-share-embed-bg--);\n background: var(--item-navigator-text-color--);\n opacity: 0;\n transition: opacity 300ms linear;\n }\n\n small.visible {\n opacity: 1;\n }\n `,\n ];\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ia-itemnav-share-panel': IAItemNavSharePanel;\n }\n}\n"]}
@@ -3,13 +3,13 @@ import { css, html, LitElement, } from 'lit';
3
3
  import { property } from 'lit/decorators.js';
4
4
  import { customElement } from '../../../util/custom-element.js';
5
5
  import themeStyles from '../../../themes/theme-styles.js';
6
- import { maskedIcon } from '../../../util/masked-icon.js';
7
- import sortAscUrl from './icons/sort-asc.svg';
8
- import sortDescUrl from './icons/sort-desc.svg';
9
- import sortNeutralUrl from './icons/sort-neutral.svg';
10
- const sortAscIcon = maskedIcon(sortAscUrl);
11
- const sortDescIcon = maskedIcon(sortDescUrl);
12
- const sortNeutralIcon = maskedIcon(sortNeutralUrl);
6
+ import { iconBox, iconBoxStyles } from '../../../util/icon-box.js';
7
+ import sortAsc from '../../../icons/sort-asc.js';
8
+ import sortDesc from '../../../icons/sort-desc.js';
9
+ import sortNeutral from '../../../icons/sort-neutral.js';
10
+ const sortAscIcon = iconBox(sortAsc);
11
+ const sortDescIcon = iconBox(sortDesc);
12
+ const sortNeutralIcon = iconBox(sortNeutral);
13
13
  /**
14
14
  * A tri-state sort toggle for the viewable-files panel header. Cycles
15
15
  * default → title ascending → title descending → default, sorting the supplied
@@ -79,6 +79,7 @@ let IAItemNavSortFilesButton = class IAItemNavSortFilesButton extends LitElement
79
79
  static get styles() {
80
80
  return [
81
81
  themeStyles,
82
+ iconBoxStyles,
82
83
  css `
83
84
  :host {
84
85
  /* Every glyph is square, so one knob sizes both axes. Matches the
@@ -111,12 +112,11 @@ let IAItemNavSortFilesButton = class IAItemNavSortFilesButton extends LitElement
111
112
  font: inherit;
112
113
  }
113
114
 
114
- /* The glyph is a masked span: the mask supplies the shape, this
115
- supplies the paint. */
115
+ /* The glyph paints with currentColor, so this supplies the paint. */
116
116
  button.sort-by .ia-icon {
117
117
  width: var(--item-navigator-header-icon-size--);
118
118
  height: var(--item-navigator-header-icon-size--);
119
- background-color: var(--item-navigator-icon-color--);
119
+ color: var(--item-navigator-icon-color--);
120
120
  }
121
121
  `,
122
122
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"ia-itemnav-sort-files-button.js","sourceRoot":"","sources":["../../../../../src/elements/ia-item-navig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AE,IAAI,EAAE,CAAC;6DAC9B;AAND,wBAAwB;IADpC,aAAa,CAAC,8BAA8B,CAAC;GACjC,wBAAwB,CAiHpC","sourcesContent":["import {\n css,\n html,\n LitElement,\n type CSSResultGroup,\n TemplateResult,\n} from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '@src/util/custom-element';\nimport themeStyles from '@src/themes/theme-styles';\nimport { maskedIcon } from '@src/util/masked-icon';\nimport sortAscUrl from './icons/sort-asc.svg';\nimport sortDescUrl from './icons/sort-desc.svg';\nimport sortNeutralUrl from './icons/sort-neutral.svg';\nimport type { FileSortOption, ViewableFileInfo } from './models';\n\nconst sortAscIcon = maskedIcon(sortAscUrl);\n\nconst sortDescIcon = maskedIcon(sortDescUrl);\n\nconst sortNeutralIcon = maskedIcon(sortNeutralUrl);\n\n/**\n * A tri-state sort toggle for the viewable-files panel header. Cycles\n * default → title ascending → title descending → default, sorting the supplied\n * file list and emitting `fileListSorted` on each change.\n */\n@customElement('ia-itemnav-sort-files-button')\nexport class IAItemNavSortFilesButton extends LitElement {\n @property({ type: Array }) fileListRaw: ViewableFileInfo[] = [];\n\n @property({ type: Array }) fileListSorted: ViewableFileInfo[] = [];\n\n @property({ type: String, reflect: true }) sortOrderBy: FileSortOption =\n 'default';\n\n render(): TemplateResult {\n return html`<div class=\"sort-multi-file-list\">${this.sortButton}</div>`;\n }\n\n get sortButton(): TemplateResult {\n const sortIcons: Record<FileSortOption, TemplateResult> = {\n default: html`\n <button\n class=\"sort-by neutral-icon\"\n aria-label=\"Sort volumes in initial order\"\n @click=${() => this.sortVolumes('title_asc')}\n >\n ${sortNeutralIcon}\n </button>\n `,\n title_asc: html`\n <button\n class=\"sort-by asc-icon\"\n aria-label=\"Sort volumes in ascending order\"\n @click=${() => this.sortVolumes('title_desc')}\n >\n ${sortAscIcon}\n </button>\n `,\n title_desc: html`\n <button\n class=\"sort-by desc-icon\"\n aria-label=\"Sort volumes in descending order\"\n @click=${() => this.sortVolumes('default')}\n >\n ${sortDescIcon}\n </button>\n `,\n };\n\n return sortIcons[this.sortOrderBy];\n }\n\n sortVolumes(sortType: FileSortOption): void {\n this.sortOrderBy = sortType;\n\n const sortedFiles = [...this.fileListRaw].sort((a, b) => {\n if (sortType === 'title_asc') return a.title.localeCompare(b.title);\n if (sortType === 'title_desc') return b.title.localeCompare(a.title);\n return (a.orig_sort ?? 0) - (b.orig_sort ?? 0);\n });\n\n this.dispatchEvent(\n new CustomEvent('fileListSorted', {\n detail: {\n sortType,\n sortedFiles,\n },\n bubbles: true,\n composed: true,\n }),\n );\n this.fileListSorted = sortedFiles;\n }\n\n static get styles(): CSSResultGroup {\n return [\n themeStyles,\n css`\n :host {\n /* Every glyph is square, so one knob sizes both axes. Matches the\n panel header's close button, which sits beside this one. */\n --item-navigator-header-icon-size--: var(\n --item-navigator-header-icon-size,\n 2em\n );\n --item-navigator-icon-color--: var(\n --item-navigator-icon-color,\n var(--item-navigator-text-color, var(--true-white))\n );\n\n /* 10px base (petabox scale); internal sizing is em against it. */\n --item-navigator-base-font-size--: var(\n --item-navigator-base-font-size,\n 10px\n );\n font-size: var(--item-navigator-base-font-size--);\n }\n\n button.sort-by {\n padding: 0;\n background-color: transparent;\n border: 0;\n cursor: pointer;\n display: inline-flex;\n /* Buttons don't inherit font-size, and the UA default would make the\n em-sized glyph larger than the close button beside it. */\n font: inherit;\n }\n\n /* The glyph is a masked span: the mask supplies the shape, this\n supplies the paint. */\n button.sort-by .ia-icon {\n width: var(--item-navigator-header-icon-size--);\n height: var(--item-navigator-header-icon-size--);\n background-color: var(--item-navigator-icon-color--);\n }\n `,\n ];\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ia-itemnav-sort-files-button': IAItemNavSortFilesButton;\n }\n}\n"]}
1
+ {"version":3,"file":"ia-itemnav-sort-files-button.js","sourceRoot":"","sources":["../../../../../src/elements/ia-item-navigator/menus/ia-itemnav-sort-files-button.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,GAA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AAwB;IADpC,aAAa,CAAC,8BAA8B,CAAC;GACjC,wBAAwB,CAiHpC","sourcesContent":["import {\n css,\n html,\n LitElement,\n type CSSResultGroup,\n TemplateResult,\n} from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '@src/util/custom-element';\nimport themeStyles from '@src/themes/theme-styles';\nimport { iconBox, iconBoxStyles } from '@src/util/icon-box';\nimport sortAsc from '@src/icons/sort-asc';\nimport sortDesc from '@src/icons/sort-desc';\nimport sortNeutral from '@src/icons/sort-neutral';\nimport type { FileSortOption, ViewableFileInfo } from './models';\n\nconst sortAscIcon = iconBox(sortAsc);\n\nconst sortDescIcon = iconBox(sortDesc);\n\nconst sortNeutralIcon = iconBox(sortNeutral);\n\n/**\n * A tri-state sort toggle for the viewable-files panel header. Cycles\n * default → title ascending → title descending → default, sorting the supplied\n * file list and emitting `fileListSorted` on each change.\n */\n@customElement('ia-itemnav-sort-files-button')\nexport class IAItemNavSortFilesButton extends LitElement {\n @property({ type: Array }) fileListRaw: ViewableFileInfo[] = [];\n\n @property({ type: Array }) fileListSorted: ViewableFileInfo[] = [];\n\n @property({ type: String, reflect: true }) sortOrderBy: FileSortOption =\n 'default';\n\n render(): TemplateResult {\n return html`<div class=\"sort-multi-file-list\">${this.sortButton}</div>`;\n }\n\n get sortButton(): TemplateResult {\n const sortIcons: Record<FileSortOption, TemplateResult> = {\n default: html`\n <button\n class=\"sort-by neutral-icon\"\n aria-label=\"Sort volumes in initial order\"\n @click=${() => this.sortVolumes('title_asc')}\n >\n ${sortNeutralIcon}\n </button>\n `,\n title_asc: html`\n <button\n class=\"sort-by asc-icon\"\n aria-label=\"Sort volumes in ascending order\"\n @click=${() => this.sortVolumes('title_desc')}\n >\n ${sortAscIcon}\n </button>\n `,\n title_desc: html`\n <button\n class=\"sort-by desc-icon\"\n aria-label=\"Sort volumes in descending order\"\n @click=${() => this.sortVolumes('default')}\n >\n ${sortDescIcon}\n </button>\n `,\n };\n\n return sortIcons[this.sortOrderBy];\n }\n\n sortVolumes(sortType: FileSortOption): void {\n this.sortOrderBy = sortType;\n\n const sortedFiles = [...this.fileListRaw].sort((a, b) => {\n if (sortType === 'title_asc') return a.title.localeCompare(b.title);\n if (sortType === 'title_desc') return b.title.localeCompare(a.title);\n return (a.orig_sort ?? 0) - (b.orig_sort ?? 0);\n });\n\n this.dispatchEvent(\n new CustomEvent('fileListSorted', {\n detail: {\n sortType,\n sortedFiles,\n },\n bubbles: true,\n composed: true,\n }),\n );\n this.fileListSorted = sortedFiles;\n }\n\n static get styles(): CSSResultGroup {\n return [\n themeStyles,\n iconBoxStyles,\n css`\n :host {\n /* Every glyph is square, so one knob sizes both axes. Matches the\n panel header's close button, which sits beside this one. */\n --item-navigator-header-icon-size--: var(\n --item-navigator-header-icon-size,\n 2em\n );\n --item-navigator-icon-color--: var(\n --item-navigator-icon-color,\n var(--item-navigator-text-color, var(--true-white))\n );\n\n /* 10px base (petabox scale); internal sizing is em against it. */\n --item-navigator-base-font-size--: var(\n --item-navigator-base-font-size,\n 10px\n );\n font-size: var(--item-navigator-base-font-size--);\n }\n\n button.sort-by {\n padding: 0;\n background-color: transparent;\n border: 0;\n cursor: pointer;\n display: inline-flex;\n /* Buttons don't inherit font-size, and the UA default would make the\n em-sized glyph larger than the close button beside it. */\n font: inherit;\n }\n\n /* The glyph paints with currentColor, so this supplies the paint. */\n button.sort-by .ia-icon {\n width: var(--item-navigator-header-icon-size--);\n height: var(--item-navigator-header-icon-size--);\n color: var(--item-navigator-icon-color--);\n }\n `,\n ];\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ia-itemnav-sort-files-button': IAItemNavSortFilesButton;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ia-itemnav-viewable-files-panel.d.ts","sourceRoot":"","sources":["../../../../../src/elements/ia-item-navigator/menus/ia-itemnav-viewable-files-panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACV,OAAO,EACP,KAAK,cAAc,EACnB,cAAc,EACd,KAAK,cAAc,EACpB,MAAM,KAAK,CAAC;AAOb,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjE,8DAA8D;AAC9D,eAAO,MAAM,iBAAiB,gBAA+B,CAAC;AAE9D;;;;;GAKG;AACH,qBACa,2BAA4B,SAAQ,UAAU;IAC7B,QAAQ,EAAE,MAAM,CAAiB;IAEjC,WAAW,EAAE,cAAc,CAAa;IAExC,SAAS,EAAE,MAAM,CAAM;IAExB,QAAQ,EAAE,gBAAgB,EAAE,CAAM;IAEjB,YAAY,UAAS;IAEjE;;;;;;;OAOG;IACH,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAMhD,iBAAiB,IAAI,IAAI;YAOX,gBAAgB;IAS9B,OAAO,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM;IAQvC,IAAI,QAAQ,IAAI,cAAc,CAI7B;IAED,MAAM,CAAC,IAAI,EAAE,gBAAgB,GAAG,cAAc;IAmB9C,IAAI,gBAAgB,IAAI,cAAc,CAYrC;IAED,MAAM,IAAI,cAAc,GAAG,OAAO,OAAO;IAIzC,MAAM,KAAK,MAAM,IAAI,cAAc,CAuGlC;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iCAAiC,EAAE,2BAA2B,CAAC;KAChE;CACF"}
1
+ {"version":3,"file":"ia-itemnav-viewable-files-panel.d.ts","sourceRoot":"","sources":["../../../../../src/elements/ia-item-navigator/menus/ia-itemnav-viewable-files-panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACV,OAAO,EACP,KAAK,cAAc,EACnB,cAAc,EACd,KAAK,cAAc,EACpB,MAAM,KAAK,CAAC;AAOb,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjE,8DAA8D;AAC9D,eAAO,MAAM,iBAAiB,gBAAyB,CAAC;AAExD;;;;;GAKG;AACH,qBACa,2BAA4B,SAAQ,UAAU;IAC7B,QAAQ,EAAE,MAAM,CAAiB;IAEjC,WAAW,EAAE,cAAc,CAAa;IAExC,SAAS,EAAE,MAAM,CAAM;IAExB,QAAQ,EAAE,gBAAgB,EAAE,CAAM;IAEjB,YAAY,UAAS;IAEjE;;;;;;;OAOG;IACH,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAMhD,iBAAiB,IAAI,IAAI;YAOX,gBAAgB;IAS9B,OAAO,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM;IAQvC,IAAI,QAAQ,IAAI,cAAc,CAI7B;IAED,MAAM,CAAC,IAAI,EAAE,gBAAgB,GAAG,cAAc;IAmB9C,IAAI,gBAAgB,IAAI,cAAc,CAYrC;IAED,MAAM,IAAI,cAAc,GAAG,OAAO,OAAO;IAIzC,MAAM,KAAK,MAAM,IAAI,cAAc,CAuGlC;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iCAAiC,EAAE,2BAA2B,CAAC;KAChE;CACF"}
@@ -4,10 +4,10 @@ import { property } from 'lit/decorators.js';
4
4
  import { customElement } from '../../../util/custom-element.js';
5
5
  import { repeat } from 'lit/directives/repeat.js';
6
6
  import themeStyles from '../../../themes/theme-styles.js';
7
- import { maskedIcon } from '../../../util/masked-icon.js';
8
- import viewableFilesUrl from './icons/viewable-files.svg';
7
+ import viewableFiles from '../../../icons/viewable-files.js';
8
+ import { iconBox } from '../../../util/icon-box.js';
9
9
  /** Icon for the viewable-files menu shortcut / menu entry. */
10
- export const viewableFilesIcon = maskedIcon(viewableFilesUrl);
10
+ export const viewableFilesIcon = iconBox(viewableFiles);
11
11
  /**
12
12
  * The "viewable files" side panel: a scrollable list of the item's viewable
13
13
  * files/volumes, linking each to its page on the host and highlighting the one
@@ -1 +1 @@
1
- {"version":3,"file":"ia-itemnav-viewable-files-panel.js","sourceRoot":"","sources":["../../../../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;KAGjB,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,OAAO,CAAC;IAChE,CAAC;IAED,MAAM,KAAK,MAAM;QACf,OAAO;YACL,WAAW;YACX,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkGF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAnM6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6DAAkC;AAEjC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gEAAyC;AAExC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8DAAwB;AAExB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;6DAAmC;AAEjB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iEAAsB;AATtD,2BAA2B;IADvC,aAAa,CAAC,iCAAiC,CAAC;GACpC,2BAA2B,CAoMvC","sourcesContent":["import {\n css,\n html,\n LitElement,\n nothing,\n type PropertyValues,\n TemplateResult,\n type CSSResultGroup,\n} from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '@src/util/custom-element';\nimport { repeat } from 'lit/directives/repeat.js';\nimport themeStyles from '@src/themes/theme-styles';\nimport { maskedIcon } from '@src/util/masked-icon';\nimport viewableFilesUrl from './icons/viewable-files.svg';\nimport type { FileSortOption, ViewableFileInfo } from './models';\n\n/** Icon for the viewable-files menu shortcut / menu entry. */\nexport const viewableFilesIcon = maskedIcon(viewableFilesUrl);\n\n/**\n * The \"viewable files\" side panel: a scrollable list of the item's viewable\n * files/volumes, linking each to its page on the host and highlighting the one\n * matching the current `subPrefix`. Populated by the host via `fileList`\n * (typically re-ordered by an `ia-itemnav-sort-files-button`).\n */\n@customElement('ia-itemnav-viewable-files-panel')\nexport class IAItemNavViewableFilesPanel extends LitElement {\n @property({ type: String }) baseHost: string = 'archive.org';\n\n @property({ type: String }) sortOrderBy: FileSortOption = 'default';\n\n @property({ type: String }) subPrefix: string = '';\n\n @property({ type: Array }) fileList: ViewableFileInfo[] = [];\n\n @property({ type: Boolean, reflect: true }) addSortToUrl = false;\n\n /**\n * Keeps the active file in view whenever the list or the selection changes.\n *\n * Both are needed: hosts commonly build this panel once and hand it a\n * `fileList` afterwards, and the selection can move while the panel stays\n * open. Reacting to the change means there is nothing to wait on — the row\n * exists by the time the update completes.\n */\n protected updated(changed: PropertyValues): void {\n if (changed.has('fileList') || changed.has('subPrefix')) {\n this.revealActiveFile();\n }\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n // Hosts reuse this element across opens, and the scroll container it sits\n // in may have been reset while it was away.\n this.revealActiveFile();\n }\n\n private async revealActiveFile(): Promise<void> {\n await this.updateComplete;\n // `nearest` leaves an already-visible row alone, which is what the\n // Chrome-only `scrollIntoViewIfNeeded` used to buy us.\n this.shadowRoot\n ?.querySelector<HTMLElement>('.content.active')\n ?.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n }\n\n fileUrl(item: ViewableFileInfo): string {\n const baseUrl = `//${this.baseHost}${item.url_path}`;\n if (this.addSortToUrl && this.sortOrderBy !== 'default') {\n return `${baseUrl}?sort=${this.sortOrderBy}`;\n }\n return baseUrl;\n }\n\n get pdfLabel(): TemplateResult {\n return html`<span class=\"pdf-label\"\n ><span class=\"sr-only\">view this</span> PDF</span\n >`;\n }\n\n fileLi(item: ViewableFileInfo): TemplateResult {\n const activeClass = this.subPrefix === item.file_subprefix ? ' active' : '';\n const hrefUrl = this.fileUrl(item);\n const isPdf = (item.file_source ?? '').match(/^[^+]+\\.pdf$/i);\n\n return html`\n <li>\n <div class=\"separator\"></div>\n <div class=\"content${activeClass}\">\n <a href=${hrefUrl}>\n <p class=\"item-title\">\n ${item.title}${isPdf ? this.pdfLabel : nothing}\n </p>\n </a>\n </div>\n </li>\n `;\n }\n\n get fileListTemplate(): TemplateResult {\n const filesDisplay = repeat(\n this.fileList,\n (file) => file?.file_prefix,\n this.fileLi.bind(this),\n );\n return html`\n <ul>\n ${filesDisplay}\n <div class=\"separator\"></div>\n </ul>\n `;\n }\n\n render(): TemplateResult | typeof nothing {\n return this.fileList.length ? this.fileListTemplate : nothing;\n }\n\n static get styles(): CSSResultGroup {\n return [\n themeStyles,\n css`\n :host {\n --item-navigator-text-color--: var(\n --item-navigator-text-color,\n var(--true-white)\n );\n --item-navigator-border-color--: var(\n --item-navigator-border-color,\n #4b4b4b\n );\n --item-navigator-active-file-border-color--: var(\n --item-navigator-active-file-border-color,\n #538bc5\n );\n\n display: block;\n overflow-y: auto;\n box-sizing: border-box;\n color: var(--item-navigator-text-color--);\n margin-top: 14px;\n margin-bottom: 2em;\n --active-border-width--: 2px;\n /* 10px base (petabox scale); internal sizing is em against it. */\n --item-navigator-base-font-size--: var(\n --item-navigator-base-font-size,\n 10px\n );\n font-size: var(--item-navigator-base-font-size--);\n }\n\n a {\n color: var(--item-navigator-text-color--);\n text-decoration: none;\n }\n\n ul {\n padding: 0;\n list-style: none;\n margin: var(--active-border-width--) 0.5em 1em 0;\n }\n\n ul > li:first-child .separator {\n display: none;\n }\n\n li {\n cursor: pointer;\n position: relative;\n }\n\n li .content {\n border: var(--active-border-width--) solid transparent;\n padding: 0.2em 0 0.4em 0.2em;\n }\n\n li .content.active {\n border: var(--active-border-width--) solid\n var(--item-navigator-active-file-border-color--);\n }\n\n li.content a {\n display: flex;\n }\n\n .item-title {\n margin-block-start: 0em;\n margin-block-end: 0em;\n font-size: 14px;\n font-weight: bold;\n word-wrap: break-word;\n padding-left: 5px;\n }\n\n .separator {\n background-color: var(--item-navigator-border-color--);\n width: 98%;\n margin: 1px auto;\n height: 1px;\n }\n\n .pdf-label {\n border: 1px solid;\n padding: 2px 5px;\n border-radius: 20px;\n display: inline-block;\n margin-left: 5px;\n font-size: 0.9em;\n }\n\n .pdf-label .sr-only {\n position: absolute;\n clip: rect(1px, 1px, 1px, 1px);\n padding: 0;\n border: 0;\n height: 1px;\n width: 1px;\n overflow: hidden;\n }\n `,\n ];\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ia-itemnav-viewable-files-panel': IAItemNavViewableFilesPanel;\n }\n}\n"]}
1
+ {"version":3,"file":"ia-itemnav-viewable-files-panel.js","sourceRoot":"","sources":["../../../../../src/elements/ia-item-navigator/menus/ia-itemnav-viewable-files-panel.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,GAAG,EACH,IAAI,EACJ,UAAU,EACV,OAAO,GAIR,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,aAAa,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAG7C,8DAA8D;AAC9D,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAExD;;;;;GAKG;AAEI,IAAM,2BAA2B,GAAjC,MAAM,2BAA4B,SAAQ,UAAU;IAApD;;QACuB,aAAQ,GAAW,aAAa,CAAC;QAEjC,gBAAW,GAAmB,SAAS,CAAC;QAExC,cAAS,GAAW,EAAE,CAAC;QAExB,aAAQ,GAAuB,EAAE,CAAC;QAEjB,iBAAY,GAAG,KAAK,CAAC;IA2LnE,CAAC;IAzLC;;;;;;;OAOG;IACO,OAAO,CAAC,OAAuB;QACvC,IAAI,OAAO,CAAC,GA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esContent":["import {\n css,\n html,\n LitElement,\n nothing,\n type PropertyValues,\n TemplateResult,\n type CSSResultGroup,\n} from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '@src/util/custom-element';\nimport { repeat } from 'lit/directives/repeat.js';\nimport themeStyles from '@src/themes/theme-styles';\nimport viewableFiles from '@src/icons/viewable-files';\nimport { iconBox } from '@src/util/icon-box';\nimport type { FileSortOption, ViewableFileInfo } from './models';\n\n/** Icon for the viewable-files menu shortcut / menu entry. */\nexport const viewableFilesIcon = iconBox(viewableFiles);\n\n/**\n * The \"viewable files\" side panel: a scrollable list of the item's viewable\n * files/volumes, linking each to its page on the host and highlighting the one\n * matching the current `subPrefix`. Populated by the host via `fileList`\n * (typically re-ordered by an `ia-itemnav-sort-files-button`).\n */\n@customElement('ia-itemnav-viewable-files-panel')\nexport class IAItemNavViewableFilesPanel extends LitElement {\n @property({ type: String }) baseHost: string = 'archive.org';\n\n @property({ type: String }) sortOrderBy: FileSortOption = 'default';\n\n @property({ type: String }) subPrefix: string = '';\n\n @property({ type: Array }) fileList: ViewableFileInfo[] = [];\n\n @property({ type: Boolean, reflect: true }) addSortToUrl = false;\n\n /**\n * Keeps the active file in view whenever the list or the selection changes.\n *\n * Both are needed: hosts commonly build this panel once and hand it a\n * `fileList` afterwards, and the selection can move while the panel stays\n * open. Reacting to the change means there is nothing to wait on — the row\n * exists by the time the update completes.\n */\n protected updated(changed: PropertyValues): void {\n if (changed.has('fileList') || changed.has('subPrefix')) {\n this.revealActiveFile();\n }\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n // Hosts reuse this element across opens, and the scroll container it sits\n // in may have been reset while it was away.\n this.revealActiveFile();\n }\n\n private async revealActiveFile(): Promise<void> {\n await this.updateComplete;\n // `nearest` leaves an already-visible row alone, which is what the\n // Chrome-only `scrollIntoViewIfNeeded` used to buy us.\n this.shadowRoot\n ?.querySelector<HTMLElement>('.content.active')\n ?.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n }\n\n fileUrl(item: ViewableFileInfo): string {\n const baseUrl = `//${this.baseHost}${item.url_path}`;\n if (this.addSortToUrl && this.sortOrderBy !== 'default') {\n return `${baseUrl}?sort=${this.sortOrderBy}`;\n }\n return baseUrl;\n }\n\n get pdfLabel(): TemplateResult {\n return html`<span class=\"pdf-label\"\n ><span class=\"sr-only\">view this</span> PDF</span\n >`;\n }\n\n fileLi(item: ViewableFileInfo): TemplateResult {\n const activeClass = this.subPrefix === item.file_subprefix ? ' active' : '';\n const hrefUrl = this.fileUrl(item);\n const isPdf = (item.file_source ?? '').match(/^[^+]+\\.pdf$/i);\n\n return html`\n <li>\n <div class=\"separator\"></div>\n <div class=\"content${activeClass}\">\n <a href=${hrefUrl}>\n <p class=\"item-title\">\n ${item.title}${isPdf ? this.pdfLabel : nothing}\n </p>\n </a>\n </div>\n </li>\n `;\n }\n\n get fileListTemplate(): TemplateResult {\n const filesDisplay = repeat(\n this.fileList,\n (file) => file?.file_prefix,\n this.fileLi.bind(this),\n );\n return html`\n <ul>\n ${filesDisplay}\n <div class=\"separator\"></div>\n </ul>\n `;\n }\n\n render(): TemplateResult | typeof nothing {\n return this.fileList.length ? this.fileListTemplate : nothing;\n }\n\n static get styles(): CSSResultGroup {\n return [\n themeStyles,\n css`\n :host {\n --item-navigator-text-color--: var(\n --item-navigator-text-color,\n var(--true-white)\n );\n --item-navigator-border-color--: var(\n --item-navigator-border-color,\n #4b4b4b\n );\n --item-navigator-active-file-border-color--: var(\n --item-navigator-active-file-border-color,\n #538bc5\n );\n\n display: block;\n overflow-y: auto;\n box-sizing: border-box;\n color: var(--item-navigator-text-color--);\n margin-top: 14px;\n margin-bottom: 2em;\n --active-border-width--: 2px;\n /* 10px base (petabox scale); internal sizing is em against it. */\n --item-navigator-base-font-size--: var(\n --item-navigator-base-font-size,\n 10px\n );\n font-size: var(--item-navigator-base-font-size--);\n }\n\n a {\n color: var(--item-navigator-text-color--);\n text-decoration: none;\n }\n\n ul {\n padding: 0;\n list-style: none;\n margin: var(--active-border-width--) 0.5em 1em 0;\n }\n\n ul > li:first-child .separator {\n display: none;\n }\n\n li {\n cursor: pointer;\n position: relative;\n }\n\n li .content {\n border: var(--active-border-width--) solid transparent;\n padding: 0.2em 0 0.4em 0.2em;\n }\n\n li .content.active {\n border: var(--active-border-width--) solid\n var(--item-navigator-active-file-border-color--);\n }\n\n li.content a {\n display: flex;\n }\n\n .item-title {\n margin-block-start: 0em;\n margin-block-end: 0em;\n font-size: 14px;\n font-weight: bold;\n word-wrap: break-word;\n padding-left: 5px;\n }\n\n .separator {\n background-color: var(--item-navigator-border-color--);\n width: 98%;\n margin: 1px auto;\n height: 1px;\n }\n\n .pdf-label {\n border: 1px solid;\n padding: 2px 5px;\n border-radius: 20px;\n display: inline-block;\n margin-left: 5px;\n font-size: 0.9em;\n }\n\n .pdf-label .sr-only {\n position: absolute;\n clip: rect(1px, 1px, 1px, 1px);\n padding: 0;\n border: 0;\n height: 1px;\n width: 1px;\n overflow: hidden;\n }\n `,\n ];\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ia-itemnav-viewable-files-panel': IAItemNavViewableFilesPanel;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ia-section-marker.d.ts","sourceRoot":"","sources":["../../../../src/elements/ia-scrubber-bar/ia-section-marker.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,KAAK,CAAC;AAIb,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAK7C;;;;;;GAMG;AACH,qBACa,eAAgB,SAAQ,UAAU;IAC7C,6BAA6B;IACD,UAAU,EAAE,iBAAiB,CAC7B;IAE5B,MAAM,IAAI,cAAc;IAUxB,MAAM,KAAK,MAAM,IAAI,cAAc,CAuElC;CACF"}
1
+ {"version":3,"file":"ia-section-marker.d.ts","sourceRoot":"","sources":["../../../../src/elements/ia-scrubber-bar/ia-section-marker.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,KAAK,CAAC;AAIb,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAK7C;;;;;;GAMG;AACH,qBACa,eAAgB,SAAQ,UAAU;IAC7C,6BAA6B;IACD,UAAU,EAAE,iBAAiB,CAC7B;IAE5B,MAAM,IAAI,cAAc;IAUxB,MAAM,KAAK,MAAM,IAAI,cAAc,CA4ElC;CACF"}
@@ -3,8 +3,8 @@ import { css, html, LitElement, } from 'lit';
3
3
  import { property } from 'lit/decorators.js';
4
4
  import { customElement } from '../../util/custom-element.js';
5
5
  import { SectionMarkerMode } from './models.js';
6
- import nextSectionIcon from './assets/next-section-marker.js';
7
- import previousSectionIcon from './assets/previous-section-marker.js';
6
+ import nextSectionIcon from '../../icons/scrubber-next-section.js';
7
+ import previousSectionIcon from '../../icons/scrubber-previous-section.js';
8
8
  /**
9
9
  * A single section boundary drawn on the scrubber bar.
10
10
  *
@@ -56,6 +56,11 @@ let IASectionMarker = class IASectionMarker extends LitElement {
56
56
  height: 100%;
57
57
  }
58
58
 
59
+ .arrow svg {
60
+ width: 8px;
61
+ height: 10px;
62
+ }
63
+
59
64
  .arrow {
60
65
  padding-top: 10px;
61
66
  opacity: 1;
@@ -1 +1 @@
1
- {"version":3,"file":"ia-section-marker.js","sourceRoot":"","sources":["../../../../src/elements/ia-scrubber-bar/ia-section-marker.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,GAAG,EACH,IAAI,EACJ,UAAU,GAGX,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,mBAAmB,MAAM,kCAAkC,CAAC;AAEnE;;;;;;GAMG;AAEI,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;IAAxC;;QACL,6BAA6B;QACD,eAAU,GACpC,iBAAiB,CAAC,OAAO,CAAC;IAoF9B,CAAC;IAlFC,MAAM;QACJ,OAAO,IAAI,CAAA;mCACoB,IAAI,CAAC,UAAU;wCACV,eAAe;;yCAEd,mBAAmB;;KAEvD,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,MAAM;QACf,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqET,CAAC;IACJ,CAAC;CACF,CAAA;AArF6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDACC;AAHjB,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CAuF3B","sourcesContent":["import {\n css,\n html,\n LitElement,\n type CSSResultGroup,\n type TemplateResult,\n} from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '@src/util/custom-element';\n\nimport { SectionMarkerMode } from './models';\n\nimport nextSectionIcon from './assets/next-section-marker';\nimport previousSectionIcon from './assets/previous-section-marker';\n\n/**\n * A single section boundary drawn on the scrubber bar.\n *\n * It's a vertical divider with an arrow either side. `markerMode` decides\n * which arrows show, so the two markers surrounding the playhead can point\n * towards the section the listener would land in.\n */\n@customElement('ia-section-marker')\nexport class IASectionMarker extends LitElement {\n /** Which arrows to reveal */\n @property({ type: String }) markerMode: SectionMarkerMode =\n SectionMarkerMode.neither;\n\n render(): TemplateResult {\n return html`\n <div class=\"container mode-${this.markerMode}\">\n <div class=\"left-arrow arrow\">${nextSectionIcon}</div>\n <div class=\"center-divider\"></div>\n <div class=\"right-arrow arrow\">${previousSectionIcon}</div>\n </div>\n `;\n }\n\n static get styles(): CSSResultGroup {\n return css`\n :host {\n --section-marker-color--: var(--ia-theme-scrubber-marker-color, #fff);\n /*\n Relative to the marker, which the scrubber sizes to the track, so a\n collapsed divider is exactly as tall as the track it sits on and an\n expanded one stands proportionally above it. A fixed pixel height\n here only lines up at one track height.\n */\n --section-marker-height-collapsed--: var(\n --ia-theme-scrubber-marker-height-collapsed,\n 100%\n );\n --section-marker-height-expanded--: var(\n --ia-theme-scrubber-marker-height-expanded,\n 250%\n );\n --section-marker-animation-speed--: 0.1s;\n\n color: var(--section-marker-color--);\n }\n\n .container {\n display: flex;\n justify-content: center;\n height: 100%;\n }\n\n .arrow {\n padding-top: 10px;\n opacity: 1;\n /*\n The arrows are hidden in every mode. The mode rules below vary only\n opacity, which cannot reveal a hidden element, so nothing here brings\n them back. Reveal them by dropping this line, not by touching the\n mode rules.\n */\n visibility: hidden;\n transition:\n opacity var(--section-marker-animation-speed--) ease-out,\n padding-top var(--section-marker-animation-speed--) ease-out;\n }\n\n .container.mode-left .right-arrow {\n opacity: 0;\n }\n\n .container.mode-right .left-arrow {\n opacity: 0;\n }\n\n .container.mode-neither .left-arrow,\n .container.mode-neither .right-arrow {\n opacity: 0;\n padding-top: 75%;\n }\n\n .container.mode-neither .center-divider {\n height: var(--section-marker-height-collapsed--);\n }\n\n .center-divider {\n border-left: 1px solid currentColor;\n width: 1px;\n left: 50%;\n height: var(--section-marker-height-expanded--);\n align-self: flex-end;\n transition: height var(--section-marker-animation-speed--) ease-out;\n }\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"ia-section-marker.js","sourceRoot":"","sources":["../../../../src/elements/ia-scrubber-bar/ia-section-marker.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,GAAG,EACH,IAAI,EACJ,UAAU,GAGX,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,eAAe,MAAM,kCAAkC,CAAC;AAC/D,OAAO,mBAAmB,MAAM,sCAAsC,CAAC;AAEvE;;;;;;GAMG;AAEI,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;IAAxC;;QACL,6BAA6B;QACD,eAAU,GACpC,iBAAiB,CAAC,OAAO,CAAC;IAyF9B,CAAC;IAvFC,MAAM;QACJ,OAAO,IAAI,CAAA;mCACoB,IAAI,CAAC,UAAU;wCACV,eAAe;;yCAEd,mBAAmB;;KAEvD,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,MAAM;QACf,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0ET,CAAC;IACJ,CAAC;CACF,CAAA;AA1F6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDACC;AAHjB,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CA4F3B","sourcesContent":["import {\n css,\n html,\n LitElement,\n type CSSResultGroup,\n type TemplateResult,\n} from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { customElement } from '@src/util/custom-element';\n\nimport { SectionMarkerMode } from './models';\n\nimport nextSectionIcon from '@src/icons/scrubber-next-section';\nimport previousSectionIcon from '@src/icons/scrubber-previous-section';\n\n/**\n * A single section boundary drawn on the scrubber bar.\n *\n * It's a vertical divider with an arrow either side. `markerMode` decides\n * which arrows show, so the two markers surrounding the playhead can point\n * towards the section the listener would land in.\n */\n@customElement('ia-section-marker')\nexport class IASectionMarker extends LitElement {\n /** Which arrows to reveal */\n @property({ type: String }) markerMode: SectionMarkerMode =\n SectionMarkerMode.neither;\n\n render(): TemplateResult {\n return html`\n <div class=\"container mode-${this.markerMode}\">\n <div class=\"left-arrow arrow\">${nextSectionIcon}</div>\n <div class=\"center-divider\"></div>\n <div class=\"right-arrow arrow\">${previousSectionIcon}</div>\n </div>\n `;\n }\n\n static get styles(): CSSResultGroup {\n return css`\n :host {\n --section-marker-color--: var(--ia-theme-scrubber-marker-color, #fff);\n /*\n Relative to the marker, which the scrubber sizes to the track, so a\n collapsed divider is exactly as tall as the track it sits on and an\n expanded one stands proportionally above it. A fixed pixel height\n here only lines up at one track height.\n */\n --section-marker-height-collapsed--: var(\n --ia-theme-scrubber-marker-height-collapsed,\n 100%\n );\n --section-marker-height-expanded--: var(\n --ia-theme-scrubber-marker-height-expanded,\n 250%\n );\n --section-marker-animation-speed--: 0.1s;\n\n color: var(--section-marker-color--);\n }\n\n .container {\n display: flex;\n justify-content: center;\n height: 100%;\n }\n\n .arrow svg {\n width: 8px;\n height: 10px;\n }\n\n .arrow {\n padding-top: 10px;\n opacity: 1;\n /*\n The arrows are hidden in every mode. The mode rules below vary only\n opacity, which cannot reveal a hidden element, so nothing here brings\n them back. Reveal them by dropping this line, not by touching the\n mode rules.\n */\n visibility: hidden;\n transition:\n opacity var(--section-marker-animation-speed--) ease-out,\n padding-top var(--section-marker-animation-speed--) ease-out;\n }\n\n .container.mode-left .right-arrow {\n opacity: 0;\n }\n\n .container.mode-right .left-arrow {\n opacity: 0;\n }\n\n .container.mode-neither .left-arrow,\n .container.mode-neither .right-arrow {\n opacity: 0;\n padding-top: 75%;\n }\n\n .container.mode-neither .center-divider {\n height: var(--section-marker-height-collapsed--);\n }\n\n .center-divider {\n border-left: 1px solid currentColor;\n width: 1px;\n left: 50%;\n height: var(--section-marker-height-expanded--);\n align-self: flex-end;\n transition: height var(--section-marker-animation-speed--) ease-out;\n }\n `;\n }\n}\n"]}
@@ -45,12 +45,12 @@ export declare class IAStatusIndicator extends LitElement {
45
45
  */
46
46
  private get placeholderTemplate();
47
47
  /**
48
- * The asset URL for the current mediatype, if it maps to a glyph we ship.
48
+ * The glyph for the current mediatype, if it maps to one we ship.
49
49
  *
50
50
  * Unmapped values (e.g. archive.org's `account` or `data`) resolve to
51
- * undefined and degrade to the default dots rather than a broken mask.
51
+ * undefined and degrade to the default dots.
52
52
  */
53
- private get mediatypeIconUrl();
53
+ private get mediatypeGlyph();
54
54
  /** Whether the middle of the ring is occupied by a glyph rather than dots */
55
55
  private get hasCenterIcon();
56
56
  /**
@@ -66,8 +66,8 @@ export declare class IAStatusIndicator extends LitElement {
66
66
  /** The roomier ring, used when a glyph occupies the middle */
67
67
  private get iconRingSvg();
68
68
  /**
69
- * The bundled mediatype glyph. `maskedIcon` supplies the mask geometry and
70
- * the decorative `aria-hidden`; this component supplies the size and paint.
69
+ * The bundled mediatype glyph. The generated svg is decorative
70
+ * (`aria-hidden`); this component supplies the size and paint.
71
71
  */
72
72
  private get mediatypeIconTemplate();
73
73
  private handleIconSlotChange;
@@ -1 +1 @@
1
- {"version":3,"file":"ia-status-indicator.d.ts","sourceRoot":"","sources":["../../../../src/elements/ia-status-indicator/ia-status-indicator.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EAEd,UAAU,EAEV,cAAc,EAGd,cAAc,EACf,MAAM,KAAK,CAAC;AAyBb,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACrB,OAAO,GACP,YAAY,GACZ,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,OAAO,GACP,IAAI,GACJ,OAAO,GACP,KAAK,CAAC;AAeV;;;;;;;;GAQG;AACH,qBAEa,iBAAkB,SAAQ,UAAU;IAEnB,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,IAAI,EAAE,aAAa,CAAa;IAGhC,SAAS,CAAC,EAAE,aAAa,CAAC;IAGzB,QAAQ,UAAS;IAGrC,OAAO,CAAC,cAAc,CAAS;IAG/B,OAAO,CAAC,cAAc,CAAyC;IAG/D,OAAO,CAAC,WAAW,CAAS;IAGrC,OAAO,CAAC,WAAW,CAA2D;IAE9E,MAAM,IAAI,cAAc;IAYxB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,YAAY;IAapB,UAAU,CAAC,YAAY,EAAE,cAAc,GAAG,IAAI;IAmB9C,OAAO,CAAC,aAAa;IAUrB,YAAY,IAAI,IAAI;IAYpB,oBAAoB,IAAI,IAAI;IAS5B;;;OAGG;IACH,OAAO,KAAK,mBAAmB,GAE9B;IAED;;;;;OAKG;IACH,OAAO,KAAK,gBAAgB,GAG3B;IAED,6EAA6E;IAC7E,OAAO,KAAK,aAAa,GAExB;IAED;;;;;;OAMG;IACH,OAAO,KAAK,wBAAwB,GAYnC;IAED,oEAAoE;IACpE,OAAO,KAAK,aAAa,GA4BxB;IAED,8DAA8D;IAC9D,OAAO,KAAK,WAAW,GAoBtB;IAED;;;OAGG;IACH,OAAO,KAAK,qBAAqB,GAKhC;IAED,OAAO,CAAC,oBAAoB;IAK5B,wCAAwC;IACxC,OAAO,KAAK,wBAAwB,GAyBnC;IAED,gCAAgC;IAChC,OAAO,KAAK,sBAAsB,GAkBjC;IAED,MAAM,KAAK,MAAM,IAAI,cAAc,CAgKlC;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,iBAAiB,CAAC;KAC1C;CACF"}
1
+ {"version":3,"file":"ia-status-indicator.d.ts","sourceRoot":"","sources":["../../../../src/elements/ia-status-indicator/ia-status-indicator.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EAEd,UAAU,EAEV,cAAc,EAGd,cAAc,EACf,MAAM,KAAK,CAAC;AAyBb,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACrB,OAAO,GACP,YAAY,GACZ,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,OAAO,GACP,IAAI,GACJ,OAAO,GACP,KA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} from 'lit/decorators.js';
4
4
  import { customElement } from '../../util/custom-element.js';
5
5
  import { localized, msg } from '@lit/localize';
6
6
  import themeStyles from '../../themes/theme-styles.js';
7
- import { maskedIcon } from '../../util/masked-icon.js';
8
- import audioIcon from './icons/audio.svg';
9
- import collectionIcon from './icons/collection.svg';
10
- import etreeIcon from './icons/etree.svg';
11
- import imagesIcon from './icons/images.svg';
12
- import searchIcon from './icons/search.svg';
13
- import softwareIcon from './icons/software.svg';
14
- import textsIcon from './icons/texts.svg';
15
- import tvIcon from './icons/tv.svg';
16
- import videoIcon from './icons/video.svg';
17
- import webIcon from './icons/web.svg';
7
+ import { iconBox, iconBoxStyles } from '../../util/icon-box.js';
8
+ import audioIcon from '../../icons/mediatype-audio.js';
9
+ import collectionIcon from '../../icons/mediatype-collection.js';
10
+ import etreeIcon from '../../icons/mediatype-etree.js';
11
+ import imagesIcon from '../../icons/mediatype-images.js';
12
+ import searchIcon from '../../icons/search.js';
13
+ import softwareIcon from '../../icons/mediatype-software.js';
14
+ import textsIcon from '../../icons/mediatype-texts.js';
15
+ import tvIcon from '../../icons/mediatype-tv.js';
16
+ import videoIcon from '../../icons/mediatype-video.js';
17
+ import webIcon from '../../icons/mediatype-web.js';
18
18
  /** How long a mode change takes to fade. Drives both the CSS and the timer. */
19
19
  const FADE_DURATION_MS = 250;
20
20
  /** One layer per mode, always rendered in this order. See render(). */
@@ -149,19 +149,19 @@ let IAStatusIndicator = class IAStatusIndicator extends LitElement {
149
149
  return html `<div class="placeholder"></div>`;
150
150
  }
151
151
  /**
152
- * The asset URL for the current mediatype, if it maps to a glyph we ship.
152
+ * The glyph for the current mediatype, if it maps to one we ship.
153
153
  *
154
154
  * Unmapped values (e.g. archive.org's `account` or `data`) resolve to
155
- * undefined and degrade to the default dots rather than a broken mask.
155
+ * undefined and degrade to the default dots.
156
156
  */
157
- get mediatypeIconUrl() {
157
+ get mediatypeGlyph() {
158
158
  if (!this.mediatype)
159
159
  return undefined;
160
160
  return MEDIATYPE_ICONS[this.mediatype];
161
161
  }
162
162
  /** Whether the middle of the ring is occupied by a glyph rather than dots */
163
163
  get hasCenterIcon() {
164
- return this.hasSlottedIcon || !!this.mediatypeIconUrl;
164
+ return this.hasSlottedIcon || !!this.mediatypeGlyph;
165
165
  }
166
166
  /**
167
167
  * A circular loading indicator to render when processing.
@@ -236,14 +236,14 @@ let IAStatusIndicator = class IAStatusIndicator extends LitElement {
236
236
  `;
237
237
  }
238
238
  /**
239
- * The bundled mediatype glyph. `maskedIcon` supplies the mask geometry and
240
- * the decorative `aria-hidden`; this component supplies the size and paint.
239
+ * The bundled mediatype glyph. The generated svg is decorative
240
+ * (`aria-hidden`); this component supplies the size and paint.
241
241
  */
242
242
  get mediatypeIconTemplate() {
243
- const url = this.mediatypeIconUrl;
244
- if (!url)
243
+ const glyph = this.mediatypeGlyph;
244
+ if (!glyph)
245
245
  return nothing;
246
- return maskedIcon(url);
246
+ return iconBox(glyph);
247
247
  }
248
248
  handleIconSlotChange(e) {
249
249
  const slot = e.target;
@@ -299,6 +299,7 @@ let IAStatusIndicator = class IAStatusIndicator extends LitElement {
299
299
  static get styles() {
300
300
  return [
301
301
  themeStyles,
302
+ iconBoxStyles,
302
303
  css `
303
304
  :host {
304
305
  --indicator-width--: var(--icon-width);
@@ -358,7 +359,7 @@ let IAStatusIndicator = class IAStatusIndicator extends LitElement {
358
359
  display: block;
359
360
  }
360
361
 
361
- .indicator svg {
362
+ .indicator > svg {
362
363
  display: block;
363
364
  width: 100%;
364
365
  height: auto;
@@ -376,14 +377,13 @@ let IAStatusIndicator = class IAStatusIndicator extends LitElement {
376
377
  }
377
378
 
378
379
  /*
379
- * Sized to fit within the icon ring's inner diameter. maskedIcon sets
380
- * the mask itself; background-color is what paints the glyph, so it
381
- * recolors with the ring.
380
+ * Sized to fit within the icon ring's inner diameter. The glyph paints
381
+ * with currentColor, so it recolors with the ring.
382
382
  */
383
383
  .ia-icon {
384
384
  width: 50%;
385
385
  height: 50%;
386
- background-color: var(--loading-icon-color--);
386
+ color: var(--loading-icon-color--);
387
387
  }
388
388
 
389
389
  /* Block, so the svg isn't padded out by the line box it would sit in */