@internetarchive/collection-browser 4.5.2 → 4.6.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 (520) hide show
  1. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/.editorconfig +29 -0
  2. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/.github/workflows/ci.yml +27 -0
  3. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/.github/workflows/gh-pages-main.yml +39 -0
  4. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/.github/workflows/npm-publish.yml +39 -0
  5. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/.github/workflows/pr-preview.yml +38 -0
  6. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/.husky/pre-commit +1 -0
  7. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/.prettierignore +1 -0
  8. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/LICENSE +661 -0
  9. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/README.md +84 -0
  10. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/eslint.config.mjs +53 -0
  11. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/index.html +24 -0
  12. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/index.ts +29 -0
  13. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/local.archive.org.cert +86 -0
  14. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/local.archive.org.key +27 -0
  15. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/package.json +120 -0
  16. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/renovate.json +6 -0
  17. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/app-root.ts +1284 -0
  18. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/arrow-left.ts +10 -0
  19. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/arrow-right.ts +10 -0
  20. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/chevron.ts +4 -0
  21. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/close-circle-dark.ts +5 -0
  22. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/contract.ts +9 -0
  23. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/empty-query.ts +5 -0
  24. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/expand.ts +9 -0
  25. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/eye-closed.ts +5 -0
  26. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/eye.ts +5 -0
  27. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/favorite-filled.ts +10 -0
  28. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/favorite-unfilled.ts +9 -0
  29. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/filter.ts +10 -0
  30. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/login-required.ts +18 -0
  31. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/account.ts +14 -0
  32. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/audio.ts +14 -0
  33. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/collection.ts +12 -0
  34. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/data.ts +15 -0
  35. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/etree.ts +14 -0
  36. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/film.ts +14 -0
  37. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/images.ts +13 -0
  38. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/radio.ts +15 -0
  39. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/search.ts +14 -0
  40. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/software.ts +13 -0
  41. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/texts.ts +13 -0
  42. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/tv-commercial.ts +12 -0
  43. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/tv-fact-check.ts +12 -0
  44. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/tv-quote.ts +12 -0
  45. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/tv.ts +14 -0
  46. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/video.ts +14 -0
  47. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/mediatype/web.ts +13 -0
  48. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/null-result.ts +5 -0
  49. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/quote.ts +7 -0
  50. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/restricted.ts +13 -0
  51. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/reviews.ts +11 -0
  52. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/upload.ts +12 -0
  53. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/assets/img/icons/views.ts +11 -0
  54. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/circular-activity-indicator.ts +64 -0
  55. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-browser.ts +3165 -0
  56. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/facet-row.ts +309 -0
  57. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/facet-tombstone-row.ts +40 -0
  58. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/facets-template.ts +85 -0
  59. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/models.ts +10 -0
  60. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/more-facets-content.ts +644 -0
  61. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/more-facets-pagination.ts +294 -0
  62. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/dedupe.ts +44 -0
  63. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/heuristics/browser-language/browser-language-heuristic.ts +27 -0
  64. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/heuristics/index.ts +3 -0
  65. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.ts +17 -0
  66. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.ts +70 -0
  67. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.ts +79 -0
  68. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.ts +93 -0
  69. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/models.ts +36 -0
  70. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/smart-facet-bar.ts +437 -0
  71. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/smart-facet-button.ts +145 -0
  72. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/smart-facet-dropdown.ts +185 -0
  73. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/smart-facet-equals.ts +16 -0
  74. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/smart-facets/smart-facet-heuristics.ts +26 -0
  75. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets/toggle-switch.ts +174 -0
  76. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/collection-facets.ts +1013 -0
  77. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/data-source/collection-browser-data-source-interface.ts +351 -0
  78. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/data-source/collection-browser-data-source.ts +1474 -0
  79. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/data-source/collection-browser-query-state.ts +60 -0
  80. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/data-source/models.ts +56 -0
  81. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/empty-placeholder.ts +192 -0
  82. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/expanded-date-picker.ts +191 -0
  83. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/language-code-handler/language-code-handler.ts +64 -0
  84. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/language-code-handler/language-code-mapping.ts +564 -0
  85. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/manage/manage-bar.ts +276 -0
  86. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/manage/remove-items-modal-content.ts +102 -0
  87. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/mediatype/mediatype-config.ts +146 -0
  88. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/models.ts +895 -0
  89. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/restoration-state-handler.ts +550 -0
  90. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/alpha-bar-tooltip.ts +53 -0
  91. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/alpha-bar.ts +252 -0
  92. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/img/compact.ts +5 -0
  93. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/img/list.ts +5 -0
  94. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/img/sort-toggle-disabled.ts +15 -0
  95. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/img/sort-toggle-down.ts +17 -0
  96. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/img/sort-toggle-up.ts +17 -0
  97. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/img/sort-triangle.ts +5 -0
  98. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/img/tile.ts +5 -0
  99. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/sort-filter-bar/sort-filter-bar.ts +733 -0
  100. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/styles/ia-button.ts +139 -0
  101. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/styles/item-image-styles.ts +124 -0
  102. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/styles/sr-only.ts +18 -0
  103. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/styles/tile-action-styles.ts +59 -0
  104. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/base-tile-component.ts +124 -0
  105. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/collection-browser-loading-tile.ts +26 -0
  106. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/grid/account-tile.ts +113 -0
  107. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/grid/collection-tile.ts +184 -0
  108. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/grid/item-tile.ts +347 -0
  109. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/grid/search-tile.ts +90 -0
  110. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/grid/styles/tile-grid-shared-styles.ts +130 -0
  111. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/grid/tile-stats.ts +211 -0
  112. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/hover/hover-pane-controller.ts +638 -0
  113. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/hover/tile-hover-pane.ts +184 -0
  114. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/image-block.ts +162 -0
  115. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/item-image.ts +214 -0
  116. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/list/tile-list-compact-header.ts +112 -0
  117. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/list/tile-list-compact.ts +278 -0
  118. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/list/tile-list.ts +718 -0
  119. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/models.ts +21 -0
  120. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/overlay/icon-overlay.ts +57 -0
  121. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/overlay/text-overlay.ts +79 -0
  122. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/review-block.ts +130 -0
  123. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/text-snippet-block.ts +132 -0
  124. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/tile-dispatcher.ts +637 -0
  125. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/tile-display-value-provider.ts +133 -0
  126. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/tiles/tile-mediatype-icon.ts +133 -0
  127. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/analytics-events.ts +29 -0
  128. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/array-equals.ts +8 -0
  129. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/collapse-repeated-quotes.ts +13 -0
  130. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/date-filter-field.ts +11 -0
  131. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/facet-utils.ts +183 -0
  132. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/format-count.ts +95 -0
  133. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/format-date.ts +62 -0
  134. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/format-unit-size.ts +43 -0
  135. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/local-date-from-utc.ts +15 -0
  136. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/log.ts +14 -0
  137. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/resolve-mediatype.ts +26 -0
  138. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/src/utils/sha1.ts +9 -0
  139. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/collection-browser.test.ts +2639 -0
  140. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/collection-facets/facet-row.test.ts +421 -0
  141. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/collection-facets/facets-template.test.ts +139 -0
  142. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/collection-facets/more-facets-content.test.ts +231 -0
  143. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/collection-facets/more-facets-pagination.test.ts +201 -0
  144. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/collection-facets/toggle-switch.test.ts +164 -0
  145. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/collection-facets.test.ts +928 -0
  146. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/data-source/collection-browser-data-source.test.ts +193 -0
  147. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/empty-placeholder.test.ts +88 -0
  148. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/expanded-date-picker.test.ts +201 -0
  149. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/icon-overlay.test.ts +38 -0
  150. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/image-block.test.ts +247 -0
  151. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/item-image.test.ts +220 -0
  152. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/manage/manage-bar.test.ts +347 -0
  153. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/manage/remove-items-modal-content.test.ts +81 -0
  154. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/mediatype-config.test.ts +11 -0
  155. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/mocks/mock-analytics-handler.ts +30 -0
  156. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/mocks/mock-search-responses.ts +1364 -0
  157. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/mocks/mock-search-service.ts +134 -0
  158. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/restoration-state-handler.test.ts +480 -0
  159. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/review-block.test.ts +62 -0
  160. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/sort-filter-bar/alpha-bar-tooltip.test.ts +17 -0
  161. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/sort-filter-bar/alpha-bar.test.ts +101 -0
  162. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/sort-filter-bar/sort-filter-bar.test.ts +443 -0
  163. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/text-overlay.test.ts +55 -0
  164. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/text-snippet-block.test.ts +85 -0
  165. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tile-stats.test.ts +191 -0
  166. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/grid/account-tile.test.ts +121 -0
  167. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/grid/collection-tile.test.ts +114 -0
  168. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/grid/item-tile.test.ts +520 -0
  169. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/grid/search-tile.test.ts +75 -0
  170. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/hover/hover-pane-controller.test.ts +482 -0
  171. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/hover/tile-hover-pane.test.ts +80 -0
  172. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/list/tile-list-compact-header.test.ts +43 -0
  173. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/list/tile-list-compact.test.ts +282 -0
  174. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/list/tile-list.test.ts +576 -0
  175. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/tile-dispatcher.test.ts +320 -0
  176. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/tile-display-value-provider.test.ts +172 -0
  177. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/tiles/tile-mediatype-icon.test.ts +160 -0
  178. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/utils/array-equals.test.ts +31 -0
  179. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/utils/format-count.test.ts +32 -0
  180. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/utils/format-date.test.ts +89 -0
  181. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/utils/format-unit-size.test.ts +21 -0
  182. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/test/utils/local-date-from-utc.test.ts +37 -0
  183. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/tsconfig.json +25 -0
  184. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/types/dompurify.d.ts +1 -0
  185. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/vite.config.ts +29 -0
  186. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/web-dev-server.config.mjs +30 -0
  187. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/web-test-runner.config.mjs +52 -0
  188. package/.claude/worktrees/WEBDEV-8677-bump-field-parsers/yarn.lock +5965 -0
  189. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/.editorconfig +29 -0
  190. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/.github/workflows/ci.yml +29 -0
  191. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/.github/workflows/gh-pages-main.yml +41 -0
  192. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/.github/workflows/npm-publish.yml +42 -0
  193. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/.github/workflows/pr-preview.yml +40 -0
  194. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/.husky/pre-commit +1 -0
  195. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/.prettierignore +1 -0
  196. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/LICENSE +661 -0
  197. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/README.md +68 -0
  198. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/eslint.config.mjs +53 -0
  199. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/index.html +24 -0
  200. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/index.ts +29 -0
  201. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/local.archive.org.cert +86 -0
  202. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/local.archive.org.key +27 -0
  203. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/package.json +129 -0
  204. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/pnpm-lock.yaml +7366 -0
  205. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/pnpm-workspace.yaml +46 -0
  206. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/renovate.json +6 -0
  207. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/app-root.ts +1284 -0
  208. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/arrow-left.ts +10 -0
  209. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/arrow-right.ts +10 -0
  210. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/chevron.ts +4 -0
  211. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/close-circle-dark.ts +5 -0
  212. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/contract.ts +9 -0
  213. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/empty-query.ts +5 -0
  214. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/expand.ts +9 -0
  215. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/eye-closed.ts +5 -0
  216. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/eye.ts +5 -0
  217. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/favorite-filled.ts +10 -0
  218. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/favorite-unfilled.ts +9 -0
  219. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/filter.ts +10 -0
  220. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/login-required.ts +18 -0
  221. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/mediatype/account.ts +14 -0
  222. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/mediatype/audio.ts +14 -0
  223. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/mediatype/collection.ts +12 -0
  224. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/mediatype/data.ts +15 -0
  225. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/mediatype/etree.ts +14 -0
  226. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/mediatype/film.ts +14 -0
  227. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/mediatype/images.ts +13 -0
  228. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/mediatype/radio.ts +15 -0
  229. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/mediatype/search.ts +14 -0
  230. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/mediatype/software.ts +13 -0
  231. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/mediatype/texts.ts +13 -0
  232. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/mediatype/tv-commercial.ts +12 -0
  233. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/mediatype/tv-fact-check.ts +12 -0
  234. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/mediatype/tv-quote.ts +12 -0
  235. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/mediatype/tv.ts +14 -0
  236. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/mediatype/video.ts +14 -0
  237. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/mediatype/web.ts +13 -0
  238. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/null-result.ts +5 -0
  239. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/quote.ts +7 -0
  240. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/restricted.ts +13 -0
  241. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/reviews.ts +11 -0
  242. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/upload.ts +12 -0
  243. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/assets/img/icons/views.ts +11 -0
  244. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/circular-activity-indicator.ts +64 -0
  245. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-browser.ts +3165 -0
  246. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/facet-row.ts +309 -0
  247. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/facet-tombstone-row.ts +40 -0
  248. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/facets-template.ts +85 -0
  249. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/models.ts +10 -0
  250. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/more-facets-content.ts +644 -0
  251. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/more-facets-pagination.ts +294 -0
  252. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/smart-facets/dedupe.ts +44 -0
  253. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/smart-facets/heuristics/browser-language/browser-language-heuristic.ts +27 -0
  254. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/smart-facets/heuristics/index.ts +3 -0
  255. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-heuristic.ts +17 -0
  256. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/smart-facets/heuristics/query-keywords/query-keywords-map.ts +70 -0
  257. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-entity-map.ts +79 -0
  258. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/smart-facets/heuristics/wikidata/wikidata-heuristic.ts +93 -0
  259. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/smart-facets/models.ts +36 -0
  260. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/smart-facets/smart-facet-bar.ts +437 -0
  261. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/smart-facets/smart-facet-button.ts +145 -0
  262. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/smart-facets/smart-facet-dropdown.ts +185 -0
  263. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/smart-facets/smart-facet-equals.ts +16 -0
  264. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/smart-facets/smart-facet-heuristics.ts +26 -0
  265. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets/toggle-switch.ts +174 -0
  266. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/collection-facets.ts +1013 -0
  267. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/data-source/collection-browser-data-source-interface.ts +351 -0
  268. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/data-source/collection-browser-data-source.ts +1474 -0
  269. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/data-source/collection-browser-query-state.ts +60 -0
  270. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/data-source/models.ts +56 -0
  271. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/empty-placeholder.ts +192 -0
  272. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/expanded-date-picker.ts +191 -0
  273. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/language-code-handler/language-code-handler.ts +64 -0
  274. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/language-code-handler/language-code-mapping.ts +564 -0
  275. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/manage/manage-bar.ts +276 -0
  276. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/manage/remove-items-modal-content.ts +102 -0
  277. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/mediatype/mediatype-config.ts +146 -0
  278. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/models.ts +895 -0
  279. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/restoration-state-handler.ts +550 -0
  280. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/sort-filter-bar/alpha-bar-tooltip.ts +53 -0
  281. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/sort-filter-bar/alpha-bar.ts +252 -0
  282. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/sort-filter-bar/img/compact.ts +5 -0
  283. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/sort-filter-bar/img/list.ts +5 -0
  284. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/sort-filter-bar/img/sort-toggle-disabled.ts +15 -0
  285. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/sort-filter-bar/img/sort-toggle-down.ts +17 -0
  286. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/sort-filter-bar/img/sort-toggle-up.ts +17 -0
  287. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/sort-filter-bar/img/sort-triangle.ts +5 -0
  288. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/sort-filter-bar/img/tile.ts +5 -0
  289. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/sort-filter-bar/sort-filter-bar.ts +733 -0
  290. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/styles/ia-button.ts +139 -0
  291. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/styles/item-image-styles.ts +124 -0
  292. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/styles/sr-only.ts +18 -0
  293. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/styles/tile-action-styles.ts +59 -0
  294. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/base-tile-component.ts +124 -0
  295. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/collection-browser-loading-tile.ts +26 -0
  296. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/grid/account-tile.ts +113 -0
  297. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/grid/collection-tile.ts +184 -0
  298. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/grid/item-tile.ts +347 -0
  299. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/grid/search-tile.ts +90 -0
  300. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/grid/styles/tile-grid-shared-styles.ts +130 -0
  301. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/grid/tile-stats.ts +211 -0
  302. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/hover/hover-pane-controller.ts +638 -0
  303. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/hover/tile-hover-pane.ts +184 -0
  304. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/image-block.ts +162 -0
  305. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/item-image.ts +214 -0
  306. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/list/tile-list-compact-header.ts +112 -0
  307. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/list/tile-list-compact.ts +278 -0
  308. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/list/tile-list.ts +718 -0
  309. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/models.ts +21 -0
  310. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/overlay/icon-overlay.ts +57 -0
  311. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/overlay/text-overlay.ts +79 -0
  312. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/review-block.ts +130 -0
  313. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/text-snippet-block.ts +132 -0
  314. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/tile-dispatcher.ts +637 -0
  315. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/tile-display-value-provider.ts +133 -0
  316. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/tiles/tile-mediatype-icon.ts +133 -0
  317. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/utils/analytics-events.ts +29 -0
  318. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/utils/array-equals.ts +8 -0
  319. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/utils/collapse-repeated-quotes.ts +13 -0
  320. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/utils/date-filter-field.ts +11 -0
  321. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/utils/facet-utils.ts +183 -0
  322. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/utils/format-count.ts +95 -0
  323. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/utils/format-date.ts +62 -0
  324. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/utils/format-unit-size.ts +43 -0
  325. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/utils/local-date-from-utc.ts +15 -0
  326. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/utils/log.ts +14 -0
  327. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/utils/resolve-mediatype.ts +26 -0
  328. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/src/utils/sha1.ts +9 -0
  329. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/collection-browser.test.ts +2639 -0
  330. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/collection-facets/facet-row.test.ts +421 -0
  331. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/collection-facets/facets-template.test.ts +139 -0
  332. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/collection-facets/more-facets-content.test.ts +231 -0
  333. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/collection-facets/more-facets-pagination.test.ts +201 -0
  334. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/collection-facets/toggle-switch.test.ts +164 -0
  335. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/collection-facets.test.ts +928 -0
  336. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/data-source/collection-browser-data-source.test.ts +193 -0
  337. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/empty-placeholder.test.ts +88 -0
  338. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/expanded-date-picker.test.ts +201 -0
  339. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/icon-overlay.test.ts +38 -0
  340. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/image-block.test.ts +247 -0
  341. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/item-image.test.ts +220 -0
  342. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/manage/manage-bar.test.ts +347 -0
  343. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/manage/remove-items-modal-content.test.ts +81 -0
  344. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/mediatype-config.test.ts +11 -0
  345. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/mocks/mock-analytics-handler.ts +30 -0
  346. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/mocks/mock-search-responses.ts +1364 -0
  347. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/mocks/mock-search-service.ts +134 -0
  348. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/restoration-state-handler.test.ts +480 -0
  349. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/review-block.test.ts +62 -0
  350. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/sort-filter-bar/alpha-bar-tooltip.test.ts +17 -0
  351. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/sort-filter-bar/alpha-bar.test.ts +101 -0
  352. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/sort-filter-bar/sort-filter-bar.test.ts +443 -0
  353. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/text-overlay.test.ts +55 -0
  354. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/text-snippet-block.test.ts +85 -0
  355. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/tile-stats.test.ts +191 -0
  356. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/tiles/grid/account-tile.test.ts +121 -0
  357. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/tiles/grid/collection-tile.test.ts +114 -0
  358. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/tiles/grid/item-tile.test.ts +520 -0
  359. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/tiles/grid/search-tile.test.ts +75 -0
  360. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/tiles/hover/hover-pane-controller.test.ts +482 -0
  361. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/tiles/hover/tile-hover-pane.test.ts +80 -0
  362. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/tiles/list/tile-list-compact-header.test.ts +43 -0
  363. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/tiles/list/tile-list-compact.test.ts +282 -0
  364. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/tiles/list/tile-list.test.ts +576 -0
  365. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/tiles/tile-dispatcher.test.ts +320 -0
  366. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/tiles/tile-display-value-provider.test.ts +172 -0
  367. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/tiles/tile-mediatype-icon.test.ts +160 -0
  368. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/utils/array-equals.test.ts +31 -0
  369. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/utils/format-count.test.ts +32 -0
  370. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/utils/format-date.test.ts +89 -0
  371. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/utils/format-unit-size.test.ts +21 -0
  372. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/test/utils/local-date-from-utc.test.ts +37 -0
  373. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/tsconfig.json +25 -0
  374. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/types/dompurify.d.ts +1 -0
  375. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/vite.config.ts +29 -0
  376. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/web-dev-server.config.mjs +30 -0
  377. package/.claude/worktrees/WEBDEV-9119-migrate-to-pnpm/web-test-runner.config.mjs +52 -0
  378. package/.editorconfig +29 -29
  379. package/.github/workflows/ci.yml +27 -27
  380. package/.github/workflows/gh-pages-main.yml +39 -39
  381. package/.github/workflows/npm-publish.yml +39 -39
  382. package/.github/workflows/pr-preview.yml +38 -38
  383. package/.husky/pre-commit +1 -1
  384. package/.prettierignore +1 -1
  385. package/LICENSE +661 -661
  386. package/README.md +83 -83
  387. package/dist/index.js.map +1 -1
  388. package/dist/src/app-root.d.ts +1 -1
  389. package/dist/src/app-root.js +683 -683
  390. package/dist/src/app-root.js.map +1 -1
  391. package/dist/src/assets/img/icons/arrow-left.d.ts +1 -1
  392. package/dist/src/assets/img/icons/arrow-right.d.ts +1 -1
  393. package/dist/src/assets/img/icons/chevron.d.ts +1 -1
  394. package/dist/src/assets/img/icons/close-circle-dark.d.ts +1 -1
  395. package/dist/src/assets/img/icons/contract.d.ts +1 -1
  396. package/dist/src/assets/img/icons/empty-query.d.ts +1 -1
  397. package/dist/src/assets/img/icons/expand.d.ts +1 -1
  398. package/dist/src/assets/img/icons/eye-closed.d.ts +1 -1
  399. package/dist/src/assets/img/icons/eye.d.ts +1 -1
  400. package/dist/src/assets/img/icons/favorite-filled.d.ts +1 -1
  401. package/dist/src/assets/img/icons/favorite-unfilled.d.ts +1 -1
  402. package/dist/src/assets/img/icons/filter.d.ts +1 -1
  403. package/dist/src/assets/img/icons/login-required.d.ts +1 -1
  404. package/dist/src/assets/img/icons/mediatype/account.d.ts +1 -1
  405. package/dist/src/assets/img/icons/mediatype/audio.d.ts +1 -1
  406. package/dist/src/assets/img/icons/mediatype/collection.d.ts +1 -1
  407. package/dist/src/assets/img/icons/mediatype/data.d.ts +1 -1
  408. package/dist/src/assets/img/icons/mediatype/etree.d.ts +1 -1
  409. package/dist/src/assets/img/icons/mediatype/film.d.ts +1 -1
  410. package/dist/src/assets/img/icons/mediatype/images.d.ts +1 -1
  411. package/dist/src/assets/img/icons/mediatype/radio.d.ts +1 -1
  412. package/dist/src/assets/img/icons/mediatype/search.d.ts +1 -1
  413. package/dist/src/assets/img/icons/mediatype/software.d.ts +1 -1
  414. package/dist/src/assets/img/icons/mediatype/texts.d.ts +1 -1
  415. package/dist/src/assets/img/icons/mediatype/tv-commercial.d.ts +1 -1
  416. package/dist/src/assets/img/icons/mediatype/tv-fact-check.d.ts +1 -1
  417. package/dist/src/assets/img/icons/mediatype/tv-quote.d.ts +1 -1
  418. package/dist/src/assets/img/icons/mediatype/tv.d.ts +1 -1
  419. package/dist/src/assets/img/icons/mediatype/video.d.ts +1 -1
  420. package/dist/src/assets/img/icons/mediatype/web.d.ts +1 -1
  421. package/dist/src/assets/img/icons/null-result.d.ts +1 -1
  422. package/dist/src/assets/img/icons/quote.d.ts +1 -1
  423. package/dist/src/assets/img/icons/restricted.d.ts +1 -1
  424. package/dist/src/assets/img/icons/reviews.d.ts +1 -1
  425. package/dist/src/assets/img/icons/upload.d.ts +1 -1
  426. package/dist/src/assets/img/icons/views.d.ts +1 -1
  427. package/dist/src/circular-activity-indicator.d.ts +1 -1
  428. package/dist/src/collection-browser.js +766 -766
  429. package/dist/src/collection-browser.js.map +1 -1
  430. package/dist/src/collection-facets/facet-row.js +143 -143
  431. package/dist/src/collection-facets/facet-row.js.map +1 -1
  432. package/dist/src/collection-facets/facet-tombstone-row.d.ts +1 -1
  433. package/dist/src/collection-facets/facets-template.js +24 -24
  434. package/dist/src/collection-facets/facets-template.js.map +1 -1
  435. package/dist/src/collection-facets/smart-facets/smart-facet-button.d.ts +1 -1
  436. package/dist/src/collection-facets/smart-facets/smart-facet-dropdown.d.ts +1 -1
  437. package/dist/src/collection-facets/toggle-switch.d.ts +1 -1
  438. package/dist/src/data-source/collection-browser-data-source-interface.js.map +1 -1
  439. package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
  440. package/dist/src/restoration-state-handler.js.map +1 -1
  441. package/dist/src/sort-filter-bar/alpha-bar-tooltip.d.ts +1 -1
  442. package/dist/src/sort-filter-bar/img/compact.d.ts +1 -1
  443. package/dist/src/sort-filter-bar/img/list.d.ts +1 -1
  444. package/dist/src/sort-filter-bar/img/sort-toggle-disabled.d.ts +1 -1
  445. package/dist/src/sort-filter-bar/img/sort-toggle-down.d.ts +1 -1
  446. package/dist/src/sort-filter-bar/img/sort-toggle-up.d.ts +1 -1
  447. package/dist/src/sort-filter-bar/img/sort-triangle.d.ts +1 -1
  448. package/dist/src/sort-filter-bar/img/tile.d.ts +1 -1
  449. package/dist/src/styles/tile-action-styles.js +43 -43
  450. package/dist/src/styles/tile-action-styles.js.map +1 -1
  451. package/dist/src/tiles/base-tile-component.js +11 -11
  452. package/dist/src/tiles/base-tile-component.js.map +1 -1
  453. package/dist/src/tiles/collection-browser-loading-tile.d.ts +1 -1
  454. package/dist/src/tiles/grid/item-tile.js +138 -138
  455. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  456. package/dist/src/tiles/hover/hover-pane-controller.js +40 -32
  457. package/dist/src/tiles/hover/hover-pane-controller.js.map +1 -1
  458. package/dist/src/tiles/image-block.d.ts +1 -1
  459. package/dist/src/tiles/item-image.d.ts +1 -1
  460. package/dist/src/tiles/list/tile-list-compact-header.d.ts +1 -1
  461. package/dist/src/tiles/list/tile-list-compact-header.js +62 -62
  462. package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
  463. package/dist/src/tiles/list/tile-list-compact.d.ts +1 -1
  464. package/dist/src/tiles/list/tile-list-compact.js +123 -123
  465. package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
  466. package/dist/src/tiles/list/tile-list.js +310 -310
  467. package/dist/src/tiles/list/tile-list.js.map +1 -1
  468. package/dist/src/tiles/models.js.map +1 -1
  469. package/dist/src/tiles/tile-dispatcher.d.ts +1 -1
  470. package/dist/src/tiles/tile-dispatcher.js +286 -286
  471. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  472. package/dist/src/tiles/tile-display-value-provider.js.map +1 -1
  473. package/dist/src/tiles/tile-mediatype-icon.d.ts +1 -1
  474. package/dist/src/utils/date-filter-field.js.map +1 -1
  475. package/dist/test/collection-browser.test.js +203 -203
  476. package/dist/test/collection-browser.test.js.map +1 -1
  477. package/dist/test/collection-facets/facet-row.test.js +31 -31
  478. package/dist/test/collection-facets/facet-row.test.js.map +1 -1
  479. package/dist/test/tiles/grid/item-tile.test.js +77 -77
  480. package/dist/test/tiles/grid/item-tile.test.js.map +1 -1
  481. package/dist/test/tiles/hover/hover-pane-controller.test.js +57 -50
  482. package/dist/test/tiles/hover/hover-pane-controller.test.js.map +1 -1
  483. package/dist/test/tiles/list/tile-list.test.js +134 -134
  484. package/dist/test/tiles/list/tile-list.test.js.map +1 -1
  485. package/dist/test/tiles/tile-dispatcher.test.js +92 -92
  486. package/dist/test/tiles/tile-dispatcher.test.js.map +1 -1
  487. package/eslint.config.mjs +53 -53
  488. package/index.html +24 -24
  489. package/index.ts +29 -29
  490. package/local.archive.org.cert +86 -86
  491. package/local.archive.org.key +27 -27
  492. package/package.json +120 -120
  493. package/renovate.json +6 -6
  494. package/src/app-root.ts +1284 -1284
  495. package/src/collection-browser.ts +3165 -3165
  496. package/src/collection-facets/facet-row.ts +309 -309
  497. package/src/collection-facets/facets-template.ts +85 -85
  498. package/src/data-source/collection-browser-data-source-interface.ts +351 -351
  499. package/src/data-source/collection-browser-data-source.ts +1474 -1474
  500. package/src/restoration-state-handler.ts +550 -550
  501. package/src/styles/tile-action-styles.ts +59 -59
  502. package/src/tiles/base-tile-component.ts +124 -124
  503. package/src/tiles/grid/item-tile.ts +347 -347
  504. package/src/tiles/hover/hover-pane-controller.ts +638 -630
  505. package/src/tiles/list/tile-list-compact-header.ts +112 -112
  506. package/src/tiles/list/tile-list-compact.ts +278 -278
  507. package/src/tiles/list/tile-list.ts +718 -718
  508. package/src/tiles/models.ts +21 -21
  509. package/src/tiles/tile-dispatcher.ts +637 -637
  510. package/src/tiles/tile-display-value-provider.ts +133 -133
  511. package/src/utils/date-filter-field.ts +11 -11
  512. package/test/collection-browser.test.ts +2639 -2639
  513. package/test/collection-facets/facet-row.test.ts +421 -421
  514. package/test/tiles/grid/item-tile.test.ts +520 -520
  515. package/test/tiles/hover/hover-pane-controller.test.ts +482 -454
  516. package/test/tiles/list/tile-list.test.ts +576 -576
  517. package/test/tiles/tile-dispatcher.test.ts +320 -320
  518. package/tsconfig.json +25 -25
  519. package/web-dev-server.config.mjs +30 -30
  520. package/web-test-runner.config.mjs +52 -52
@@ -1,637 +1,637 @@
1
- import { css, html, nothing, PropertyValues } from 'lit';
2
- import { customElement, property, query } from 'lit/decorators.js';
3
- import { classMap } from 'lit/directives/class-map.js';
4
- import { ifDefined } from 'lit/directives/if-defined.js';
5
- import { msg } from '@lit/localize';
6
- import type {
7
- SharedResizeObserverInterface,
8
- SharedResizeObserverResizeHandlerInterface,
9
- } from '@internetarchive/shared-resize-observer';
10
- import type { TileDisplayMode } from '../models';
11
- import type { CollectionTitles } from '../data-source/models';
12
- import './grid/collection-tile';
13
- import './grid/item-tile';
14
- import './grid/account-tile';
15
- import './grid/search-tile';
16
- import './hover/tile-hover-pane';
17
- import './list/tile-list';
18
- import './list/tile-list-compact';
19
- import './list/tile-list-compact-header';
20
- import type { TileHoverPane } from './hover/tile-hover-pane';
21
- import { BaseTileComponent } from './base-tile-component';
22
- import { LayoutType } from './models';
23
- import {
24
- HoverPaneController,
25
- HoverPaneControllerInterface,
26
- HoverPaneProperties,
27
- HoverPaneProviderInterface,
28
- } from './hover/hover-pane-controller';
29
- import { srOnlyStyle } from '../styles/sr-only';
30
- import { tileActionStyles } from '../styles/tile-action-styles';
31
-
32
- @customElement('tile-dispatcher')
33
- export class TileDispatcher
34
- extends BaseTileComponent
35
- implements
36
- SharedResizeObserverResizeHandlerInterface,
37
- HoverPaneProviderInterface
38
- {
39
- /*
40
- * Reactive properties inherited from BaseTileComponent:
41
- * - model?: TileModel;
42
- * - tileActions: TileAction[] = [];
43
- * - currentWidth?: number;
44
- * - currentHeight?: number;
45
- * - baseNavigationUrl?: string;
46
- * - baseImageUrl?: string;
47
- * - collectionPagePath?: string;
48
- * - sortParam: SortParam | null = null;
49
- * - defaultSortParam: SortParam | null = null;
50
- * - creatorFilter?: string;
51
- * - mobileBreakpoint?: number;
52
- * - loggedIn = false;
53
- * - suppressTileBlurring = false;
54
- * - useLocalTime = false;
55
- */
56
-
57
- @property({ type: String }) tileDisplayMode?: TileDisplayMode;
58
-
59
- @property({ type: Boolean }) isManageView = false;
60
-
61
- @property({ type: Object }) resizeObserver?: SharedResizeObserverInterface;
62
-
63
- @property({ type: Object })
64
- collectionTitles?: CollectionTitles;
65
-
66
- @property({ type: Boolean }) showTvClips = false;
67
-
68
- /** What type of simplified layout to use in grid mode, if any */
69
- @property({ type: String }) layoutType: LayoutType = 'default';
70
-
71
- /** Whether this tile should include a hover pane at all (for applicable tile modes) */
72
- @property({ type: Boolean }) enableHoverPane = false;
73
-
74
- @property({ type: String }) manageCheckTitle = msg(
75
- 'Remove this item from the list',
76
- );
77
-
78
- private hoverPaneController?: HoverPaneControllerInterface;
79
-
80
- @query('#container')
81
- private container!: HTMLDivElement;
82
-
83
- @query('tile-hover-pane')
84
- private hoverPane?: TileHoverPane;
85
-
86
- @query('.tile-link')
87
- private tileLinkElement?: HTMLAnchorElement;
88
-
89
- acquireFocus(): void {
90
- this.tileLinkElement?.focus();
91
- }
92
-
93
- releaseFocus(): void {
94
- this.tileLinkElement?.blur();
95
- }
96
-
97
- /** Maps each display mode to whether hover panes should appear in that mode */
98
- private static readonly HOVER_PANE_DISPLAY_MODES: Record<
99
- TileDisplayMode,
100
- boolean
101
- > = {
102
- grid: true,
103
- 'list-compact': true,
104
- 'list-detail': false,
105
- 'list-header': false,
106
- };
107
-
108
- render() {
109
- const isGridMode = this.tileDisplayMode === 'grid';
110
- const hasTileActions = isGridMode && this.showGridTileActions;
111
- const hoverPaneTemplate =
112
- this.hoverPaneController?.getTemplate() ?? nothing;
113
- const containerClasses = classMap({
114
- hoverable: isGridMode,
115
- 'has-tile-actions': hasTileActions,
116
- });
117
- return html`
118
- <div id="container" class=${containerClasses}>
119
- ${this.tileDisplayMode === 'list-header'
120
- ? this.headerTemplate
121
- : this.tileTemplate}
122
- ${this.gridTileActionsTemplate} ${this.manageCheckTemplate}
123
- ${hoverPaneTemplate}
124
- </div>
125
- `;
126
- }
127
-
128
- protected firstUpdated(): void {
129
- if (this.shouldPrepareHoverPane) {
130
- this.hoverPaneController = new HoverPaneController(this, {
131
- mobileBreakpoint: this.mobileBreakpoint,
132
- enableLongPress: false,
133
- });
134
- }
135
- }
136
-
137
- private get headerTemplate() {
138
- const { currentWidth, sortParam, defaultSortParam, mobileBreakpoint } =
139
- this;
140
- return html`
141
- <tile-list-compact-header
142
- class="header"
143
- .currentWidth=${currentWidth}
144
- .sortParam=${sortParam ?? defaultSortParam}
145
- .mobileBreakpoint=${mobileBreakpoint}
146
- .tileActions=${this.tileActions}
147
- >
148
- </tile-list-compact-header>
149
- `;
150
- }
151
-
152
- private get tileTemplate() {
153
- return html`
154
- ${this.tileDisplayMode === 'list-detail'
155
- ? this.tile
156
- : this.linkTileTemplate}
157
- `;
158
- }
159
-
160
- private get linkTileTemplate() {
161
- return html`
162
- <a
163
- href=${this.linkTileHref}
164
- aria-label=${this.model?.title ?? 'Untitled item'}
165
- aria-describedby="link-aria-description"
166
- aria-haspopup=${this.shouldPrepareHoverPane ? 'dialog' : 'false'}
167
- title=${this.shouldPrepareHoverPane
168
- ? nothing // Don't show title tooltips when we have the tile info popups
169
- : ifDefined(this.model?.title)}
170
- @click=${this.handleLinkClicked}
171
- @contextmenu=${this.handleLinkContextMenu}
172
- class="tile-link"
173
- >
174
- ${this.tile}
175
- </a>
176
- <div id="link-aria-description" class="sr-only">
177
- ${msg('Press Down Arrow to preview item details')}
178
- </div>
179
- `;
180
- }
181
-
182
- private get linkTileHref(): string | typeof nothing {
183
- if (!this.model?.identifier || this.baseNavigationUrl == null)
184
- return nothing;
185
-
186
- // Use the server-specified href if available.
187
- // Otherwise, construct a details page URL from the item identifier.
188
- if (this.model.href) {
189
- return `${this.baseNavigationUrl}${this.model.href}`;
190
- }
191
-
192
- return this.displayValueProvider.itemPageUrl(
193
- this.model.identifier,
194
- this.model.mediatype === 'collection',
195
- );
196
- }
197
-
198
- private get manageCheckTemplate() {
199
- if (!this.isManageView || this.tileDisplayMode !== 'grid') return nothing;
200
-
201
- return html`
202
- <div class="manage-check">
203
- <input
204
- type="checkbox"
205
- title=${this.manageCheckTitle}
206
- ?checked=${this.model?.checked}
207
- @change=${this.handleLinkClicked}
208
- />
209
- </div>
210
- `;
211
- }
212
-
213
- /**
214
- * Whether hover pane behavior should be prepared for this tile
215
- * (e.g., whether mouse listeners should be attached, etc.)
216
- */
217
- private get shouldPrepareHoverPane(): boolean {
218
- return (
219
- this.enableHoverPane &&
220
- !!this.tileDisplayMode &&
221
- TileDispatcher.HOVER_PANE_DISPLAY_MODES[this.tileDisplayMode] &&
222
- this.model?.mediatype !== 'search' && // don't show hover panes on search tiles
223
- !this.model?.captureDates // don't show hover panes on web archive tiles
224
- );
225
- }
226
-
227
- private get isHoverEnabled(): boolean {
228
- return window.matchMedia('(hover: hover)').matches;
229
- }
230
-
231
- /**
232
- * Whether the info button should be shown on this tile.
233
- * Only shown on touch/non-hover devices where a hover pane is available,
234
- * so the button always has something to toggle.
235
- */
236
- private get shouldShowInfoButton(): boolean {
237
- return !this.isHoverEnabled && this.shouldPrepareHoverPane;
238
- }
239
-
240
- /** @inheritdoc */
241
- getHoverPane(): TileHoverPane | undefined {
242
- return this.hoverPane;
243
- }
244
-
245
- /** @inheritdoc */
246
- getHoverPaneProps(): HoverPaneProperties {
247
- return this;
248
- }
249
-
250
- handleResize(entry: ResizeObserverEntry): void {
251
- this.currentWidth = entry.contentRect.width;
252
- this.currentHeight = entry.contentRect.height;
253
- }
254
-
255
- disconnectedCallback(): void {
256
- this.stopResizeObservation(this.resizeObserver);
257
- }
258
-
259
- private stopResizeObservation(observer?: SharedResizeObserverInterface) {
260
- observer?.removeObserver({
261
- handler: this,
262
- target: this.container,
263
- });
264
- }
265
-
266
- private startResizeObservation() {
267
- this.stopResizeObservation(this.resizeObserver);
268
- this.resizeObserver?.addObserver({
269
- handler: this,
270
- target: this.container,
271
- });
272
- }
273
-
274
- updated(props: PropertyValues) {
275
- if (props.has('resizeObserver')) {
276
- const previousObserver = props.get(
277
- 'resizeObserver',
278
- ) as SharedResizeObserverInterface;
279
- this.stopResizeObservation(previousObserver);
280
- this.startResizeObservation();
281
- }
282
- }
283
-
284
- /**
285
- * Handler for when the tile link is left-clicked. Emits the `resultSelected` event.
286
- * In manage view, it also checks/unchecks the tile.
287
- */
288
- private handleLinkClicked(e: Event): void {
289
- if (this.isManageView) {
290
- e.preventDefault();
291
- if (this.model) this.model.checked = !this.model.checked;
292
- }
293
-
294
- this.dispatchEvent(
295
- new CustomEvent('resultSelected', { detail: this.model }),
296
- );
297
- }
298
-
299
- /**
300
- * Handler for when the tile link is right-clicked.
301
- * In manage view, it opens the item in a new tab. Otherwise, does nothing.
302
- */
303
- private handleLinkContextMenu(e: Event): void {
304
- if (this.isManageView && this.linkTileHref !== nothing) {
305
- e.preventDefault();
306
- window.open(this.linkTileHref, '_blank');
307
- }
308
- }
309
-
310
- private tileInfoButtonPressed(
311
- e: CustomEvent<{ x: number; y: number }>,
312
- ): void {
313
- this.hoverPaneController?.toggleHoverPane({
314
- coords: e.detail,
315
- enableTouchBackdrop: true,
316
- });
317
- }
318
-
319
- /** Whether tile action buttons should be rendered in grid mode */
320
- private get showGridTileActions(): boolean {
321
- return (
322
- this.tileActions.length > 0 &&
323
- !this.isManageView &&
324
- this.tileDisplayMode === 'grid'
325
- );
326
- }
327
-
328
- /**
329
- * Template for the grid-mode action buttons. Rendered alongside the inner
330
- * tile link inside the dispatcher's shadow root so the action buttons can
331
- * suppress the hover pane on hover.
332
- */
333
- private get gridTileActionsTemplate() {
334
- if (!this.showGridTileActions) return nothing;
335
-
336
- return html`
337
- <div
338
- class="tile-actions grid-tile-actions"
339
- @mouseenter=${this.handleGridActionsMouseEnter}
340
- @mousemove=${(e: Event) => e.stopPropagation()}
341
- >
342
- ${this.tileActions.map(
343
- action => html`
344
- <button
345
- class="tile-action-btn"
346
- @click=${(e: Event) => this.handleTileActionClick(e, action)}
347
- >
348
- ${action.label}
349
- </button>
350
- `,
351
- )}
352
- </div>
353
- `;
354
- }
355
-
356
- /**
357
- * When the mouse enters the grid-mode tile actions area, dispatch a
358
- * synthetic mouseleave on the host to cancel the hover pane's show timer
359
- * and hide any visible pane.
360
- */
361
- private handleGridActionsMouseEnter = (): void => {
362
- this.dispatchEvent(new MouseEvent('mouseleave', { bubbles: false }));
363
- };
364
-
365
- private get tile() {
366
- const {
367
- model,
368
- collectionPagePath,
369
- baseNavigationUrl,
370
- currentWidth,
371
- currentHeight,
372
- sortParam,
373
- creatorFilter,
374
- mobileBreakpoint,
375
- defaultSortParam,
376
- } = this;
377
-
378
- if (!model) return nothing;
379
-
380
- switch (this.tileDisplayMode) {
381
- case 'grid':
382
- switch (model.mediatype) {
383
- case 'collection':
384
- return html`<collection-tile
385
- .model=${model}
386
- .collectionPagePath=${collectionPagePath}
387
- .baseImageUrl=${this.baseImageUrl}
388
- .currentWidth=${currentWidth}
389
- .currentHeight=${currentHeight}
390
- .creatorFilter=${creatorFilter}
391
- .suppressBlurring=${this.suppressBlurring}
392
- .isManageView=${this.isManageView}
393
- .layoutType=${this.layoutType}
394
- ?showInfoButton=${this.shouldShowInfoButton}
395
- @infoButtonPressed=${this.tileInfoButtonPressed}
396
- >
397
- </collection-tile>`;
398
- case 'account':
399
- return html`<account-tile
400
- .model=${model}
401
- .collectionPagePath=${collectionPagePath}
402
- .baseImageUrl=${this.baseImageUrl}
403
- .currentWidth=${currentWidth}
404
- .currentHeight=${currentHeight}
405
- .creatorFilter=${creatorFilter}
406
- .suppressBlurring=${this.suppressBlurring}
407
- .isManageView=${this.isManageView}
408
- ?showInfoButton=${this.shouldShowInfoButton}
409
- @infoButtonPressed=${this.tileInfoButtonPressed}
410
- >
411
- </account-tile>`;
412
- case 'search':
413
- return html`<search-tile
414
- .model=${model}
415
- .collectionPagePath=${collectionPagePath}
416
- .baseImageUrl=${this.baseImageUrl}
417
- .currentWidth=${currentWidth}
418
- .currentHeight=${currentHeight}
419
- .creatorFilter=${creatorFilter}
420
- .suppressBlurring=${this.suppressBlurring}
421
- .isManageView=${this.isManageView}
422
- ?showInfoButton=${false}
423
- @infoButtonPressed=${this.tileInfoButtonPressed}
424
- >
425
- </search-tile>`;
426
- default:
427
- return html`<item-tile
428
- .model=${model}
429
- .collectionPagePath=${collectionPagePath}
430
- .currentWidth=${this.currentWidth}
431
- .currentHeight=${this.currentHeight}
432
- .baseImageUrl=${this.baseImageUrl}
433
- .sortParam=${sortParam}
434
- .defaultSortParam=${defaultSortParam}
435
- .creatorFilter=${creatorFilter}
436
- .loggedIn=${this.loggedIn}
437
- .suppressBlurring=${this.suppressBlurring}
438
- .isManageView=${this.isManageView}
439
- .layoutType=${this.layoutType}
440
- ?showTvClips=${this.showTvClips}
441
- ?showInfoButton=${this.shouldShowInfoButton}
442
- ?useLocalTime=${this.useLocalTime}
443
- @infoButtonPressed=${this.tileInfoButtonPressed}
444
- >
445
- </item-tile>`;
446
- }
447
- case 'list-compact':
448
- return html`<tile-list-compact
449
- .model=${model}
450
- .collectionPagePath=${collectionPagePath}
451
- .currentWidth=${currentWidth}
452
- .currentHeight=${currentHeight}
453
- .baseNavigationUrl=${baseNavigationUrl}
454
- .sortParam=${sortParam}
455
- .defaultSortParam=${defaultSortParam}
456
- .creatorFilter=${creatorFilter}
457
- .mobileBreakpoint=${mobileBreakpoint}
458
- .baseImageUrl=${this.baseImageUrl}
459
- .loggedIn=${this.loggedIn}
460
- .suppressBlurring=${this.suppressBlurring}
461
- .tileActions=${this.isManageView ? [] : this.tileActions}
462
- ?useLocalTime=${this.useLocalTime}
463
- >
464
- </tile-list-compact>`;
465
- case 'list-detail':
466
- return html`<tile-list
467
- .model=${model}
468
- .collectionPagePath=${collectionPagePath}
469
- .collectionTitles=${this.collectionTitles}
470
- .currentWidth=${currentWidth}
471
- .currentHeight=${currentHeight}
472
- .baseNavigationUrl=${baseNavigationUrl}
473
- .sortParam=${sortParam}
474
- .defaultSortParam=${defaultSortParam}
475
- .creatorFilter=${creatorFilter}
476
- .mobileBreakpoint=${mobileBreakpoint}
477
- .baseImageUrl=${this.baseImageUrl}
478
- .loggedIn=${this.loggedIn}
479
- .suppressBlurring=${this.suppressBlurring}
480
- .tileActions=${this.isManageView ? [] : this.tileActions}
481
- ?useLocalTime=${this.useLocalTime}
482
- >
483
- </tile-list>`;
484
- default:
485
- return nothing;
486
- }
487
- }
488
-
489
- static get styles() {
490
- return [
491
- srOnlyStyle,
492
- tileActionStyles,
493
- css`
494
- :host {
495
- display: block;
496
- height: 100%;
497
- }
498
-
499
- collection-tile {
500
- --tileBorderColor: #555555;
501
- --tileBackgroundColor: #666666;
502
- --imageBlockBackgroundColor: #666666;
503
- }
504
-
505
- account-tile {
506
- --tileBorderColor: #dddddd;
507
- --imageBlockBackgroundColor: #fcf5e6;
508
- }
509
-
510
- item-tile {
511
- --tileBorderColor: #dddddd;
512
- --imageBlockBackgroundColor: #f1f1f4;
513
- }
514
-
515
- search-tile {
516
- --tileBorderColor: #555555;
517
- --tileBackgroundColor: #666666;
518
- --imageBlockBackgroundColor: #666666;
519
- --iconFillColor: #2c2c2c;
520
- }
521
-
522
- #container {
523
- position: relative;
524
- height: 100%;
525
- border-radius: 4px;
526
- }
527
-
528
- /*
529
- * When tile actions are present, the container takes on the role of
530
- * the tile's visual card so the tile content and action row appear
531
- * as a single unified element. The inner tile's own shadow/radius
532
- * are disabled via CSS variable overrides to avoid visual
533
- * duplication, and the action row sits as a footer inside the same
534
- * card.
535
- */
536
- #container.has-tile-actions {
537
- display: flex;
538
- flex-direction: column;
539
- overflow: hidden;
540
- box-shadow: var(--tileShadow, 1px 1px 2px 0);
541
- --tileBoxShadow: none;
542
- --tileCornerRadius: 0;
543
- }
544
-
545
- #container.has-tile-actions .tile-link {
546
- flex: 1;
547
- min-height: 0;
548
- overflow: hidden;
549
- border-radius: 0;
550
- }
551
-
552
- /* Normal hover shadow lives on the inner anchor for plain tiles */
553
- #container.hoverable:not(.has-tile-actions) a:focus,
554
- #container.hoverable:not(.has-tile-actions) a:hover {
555
- box-shadow: var(
556
- --tileHoverBoxShadow,
557
- 0 0 6px 2px rgba(8, 8, 32, 0.8)
558
- );
559
- transition: box-shadow 0.1s ease;
560
- }
561
-
562
- /*
563
- * When the container owns the card visuals, the hover shadow needs
564
- * to move up to the container so it wraps the action row too.
565
- */
566
- #container.hoverable.has-tile-actions:hover {
567
- box-shadow: var(
568
- --tileHoverBoxShadow,
569
- 0 0 6px 2px rgba(8, 8, 32, 0.8)
570
- );
571
- transition: box-shadow 0.1s ease;
572
- }
573
-
574
- a {
575
- display: block;
576
- height: 100%;
577
- color: unset;
578
- text-decoration: none;
579
- transition: transform 0.05s ease;
580
- border-radius: 4px;
581
- outline: none;
582
- }
583
-
584
- a :first-child {
585
- display: block;
586
- height: 100%;
587
- }
588
-
589
- .manage-check {
590
- position: absolute;
591
- right: 0;
592
- top: 0;
593
- border: 5px solid #2c2c2c;
594
- border-radius: 3px;
595
- background-color: #2c2c2c;
596
- z-index: 1;
597
- }
598
-
599
- .manage-check > input[type='checkbox'] {
600
- display: block;
601
- margin: 0;
602
- }
603
-
604
- #touch-backdrop {
605
- position: fixed;
606
- width: 100vw;
607
- height: 100vh;
608
- top: 0;
609
- left: 0;
610
- z-index: 2;
611
- background: transparent;
612
- }
613
-
614
- tile-hover-pane {
615
- position: absolute;
616
- top: 0;
617
- left: -9999px;
618
- z-index: 2;
619
- }
620
-
621
- /*
622
- * Grid-mode action row sits flush against the bottom of the card —
623
- * the buttons' own borders form the visible bottom edge. The outer
624
- * buttons get rounded bottom corners to match the container so the
625
- * red border traces cleanly around the card's bottom corners.
626
- */
627
- .grid-tile-actions .tile-action-btn:first-child {
628
- border-bottom-left-radius: 4px;
629
- }
630
-
631
- .grid-tile-actions .tile-action-btn:last-child {
632
- border-bottom-right-radius: 4px;
633
- }
634
- `,
635
- ];
636
- }
637
- }
1
+ import { css, html, nothing, PropertyValues } from 'lit';
2
+ import { customElement, property, query } from 'lit/decorators.js';
3
+ import { classMap } from 'lit/directives/class-map.js';
4
+ import { ifDefined } from 'lit/directives/if-defined.js';
5
+ import { msg } from '@lit/localize';
6
+ import type {
7
+ SharedResizeObserverInterface,
8
+ SharedResizeObserverResizeHandlerInterface,
9
+ } from '@internetarchive/shared-resize-observer';
10
+ import type { TileDisplayMode } from '../models';
11
+ import type { CollectionTitles } from '../data-source/models';
12
+ import './grid/collection-tile';
13
+ import './grid/item-tile';
14
+ import './grid/account-tile';
15
+ import './grid/search-tile';
16
+ import './hover/tile-hover-pane';
17
+ import './list/tile-list';
18
+ import './list/tile-list-compact';
19
+ import './list/tile-list-compact-header';
20
+ import type { TileHoverPane } from './hover/tile-hover-pane';
21
+ import { BaseTileComponent } from './base-tile-component';
22
+ import { LayoutType } from './models';
23
+ import {
24
+ HoverPaneController,
25
+ HoverPaneControllerInterface,
26
+ HoverPaneProperties,
27
+ HoverPaneProviderInterface,
28
+ } from './hover/hover-pane-controller';
29
+ import { srOnlyStyle } from '../styles/sr-only';
30
+ import { tileActionStyles } from '../styles/tile-action-styles';
31
+
32
+ @customElement('tile-dispatcher')
33
+ export class TileDispatcher
34
+ extends BaseTileComponent
35
+ implements
36
+ SharedResizeObserverResizeHandlerInterface,
37
+ HoverPaneProviderInterface
38
+ {
39
+ /*
40
+ * Reactive properties inherited from BaseTileComponent:
41
+ * - model?: TileModel;
42
+ * - tileActions: TileAction[] = [];
43
+ * - currentWidth?: number;
44
+ * - currentHeight?: number;
45
+ * - baseNavigationUrl?: string;
46
+ * - baseImageUrl?: string;
47
+ * - collectionPagePath?: string;
48
+ * - sortParam: SortParam | null = null;
49
+ * - defaultSortParam: SortParam | null = null;
50
+ * - creatorFilter?: string;
51
+ * - mobileBreakpoint?: number;
52
+ * - loggedIn = false;
53
+ * - suppressTileBlurring = false;
54
+ * - useLocalTime = false;
55
+ */
56
+
57
+ @property({ type: String }) tileDisplayMode?: TileDisplayMode;
58
+
59
+ @property({ type: Boolean }) isManageView = false;
60
+
61
+ @property({ type: Object }) resizeObserver?: SharedResizeObserverInterface;
62
+
63
+ @property({ type: Object })
64
+ collectionTitles?: CollectionTitles;
65
+
66
+ @property({ type: Boolean }) showTvClips = false;
67
+
68
+ /** What type of simplified layout to use in grid mode, if any */
69
+ @property({ type: String }) layoutType: LayoutType = 'default';
70
+
71
+ /** Whether this tile should include a hover pane at all (for applicable tile modes) */
72
+ @property({ type: Boolean }) enableHoverPane = false;
73
+
74
+ @property({ type: String }) manageCheckTitle = msg(
75
+ 'Remove this item from the list',
76
+ );
77
+
78
+ private hoverPaneController?: HoverPaneControllerInterface;
79
+
80
+ @query('#container')
81
+ private container!: HTMLDivElement;
82
+
83
+ @query('tile-hover-pane')
84
+ private hoverPane?: TileHoverPane;
85
+
86
+ @query('.tile-link')
87
+ private tileLinkElement?: HTMLAnchorElement;
88
+
89
+ acquireFocus(): void {
90
+ this.tileLinkElement?.focus();
91
+ }
92
+
93
+ releaseFocus(): void {
94
+ this.tileLinkElement?.blur();
95
+ }
96
+
97
+ /** Maps each display mode to whether hover panes should appear in that mode */
98
+ private static readonly HOVER_PANE_DISPLAY_MODES: Record<
99
+ TileDisplayMode,
100
+ boolean
101
+ > = {
102
+ grid: true,
103
+ 'list-compact': true,
104
+ 'list-detail': false,
105
+ 'list-header': false,
106
+ };
107
+
108
+ render() {
109
+ const isGridMode = this.tileDisplayMode === 'grid';
110
+ const hasTileActions = isGridMode && this.showGridTileActions;
111
+ const hoverPaneTemplate =
112
+ this.hoverPaneController?.getTemplate() ?? nothing;
113
+ const containerClasses = classMap({
114
+ hoverable: isGridMode,
115
+ 'has-tile-actions': hasTileActions,
116
+ });
117
+ return html`
118
+ <div id="container" class=${containerClasses}>
119
+ ${this.tileDisplayMode === 'list-header'
120
+ ? this.headerTemplate
121
+ : this.tileTemplate}
122
+ ${this.gridTileActionsTemplate} ${this.manageCheckTemplate}
123
+ ${hoverPaneTemplate}
124
+ </div>
125
+ `;
126
+ }
127
+
128
+ protected firstUpdated(): void {
129
+ if (this.shouldPrepareHoverPane) {
130
+ this.hoverPaneController = new HoverPaneController(this, {
131
+ mobileBreakpoint: this.mobileBreakpoint,
132
+ enableLongPress: false,
133
+ });
134
+ }
135
+ }
136
+
137
+ private get headerTemplate() {
138
+ const { currentWidth, sortParam, defaultSortParam, mobileBreakpoint } =
139
+ this;
140
+ return html`
141
+ <tile-list-compact-header
142
+ class="header"
143
+ .currentWidth=${currentWidth}
144
+ .sortParam=${sortParam ?? defaultSortParam}
145
+ .mobileBreakpoint=${mobileBreakpoint}
146
+ .tileActions=${this.tileActions}
147
+ >
148
+ </tile-list-compact-header>
149
+ `;
150
+ }
151
+
152
+ private get tileTemplate() {
153
+ return html`
154
+ ${this.tileDisplayMode === 'list-detail'
155
+ ? this.tile
156
+ : this.linkTileTemplate}
157
+ `;
158
+ }
159
+
160
+ private get linkTileTemplate() {
161
+ return html`
162
+ <a
163
+ href=${this.linkTileHref}
164
+ aria-label=${this.model?.title ?? 'Untitled item'}
165
+ aria-describedby="link-aria-description"
166
+ aria-haspopup=${this.shouldPrepareHoverPane ? 'dialog' : 'false'}
167
+ title=${this.shouldPrepareHoverPane
168
+ ? nothing // Don't show title tooltips when we have the tile info popups
169
+ : ifDefined(this.model?.title)}
170
+ @click=${this.handleLinkClicked}
171
+ @contextmenu=${this.handleLinkContextMenu}
172
+ class="tile-link"
173
+ >
174
+ ${this.tile}
175
+ </a>
176
+ <div id="link-aria-description" class="sr-only">
177
+ ${msg('Press Down Arrow to preview item details')}
178
+ </div>
179
+ `;
180
+ }
181
+
182
+ private get linkTileHref(): string | typeof nothing {
183
+ if (!this.model?.identifier || this.baseNavigationUrl == null)
184
+ return nothing;
185
+
186
+ // Use the server-specified href if available.
187
+ // Otherwise, construct a details page URL from the item identifier.
188
+ if (this.model.href) {
189
+ return `${this.baseNavigationUrl}${this.model.href}`;
190
+ }
191
+
192
+ return this.displayValueProvider.itemPageUrl(
193
+ this.model.identifier,
194
+ this.model.mediatype === 'collection',
195
+ );
196
+ }
197
+
198
+ private get manageCheckTemplate() {
199
+ if (!this.isManageView || this.tileDisplayMode !== 'grid') return nothing;
200
+
201
+ return html`
202
+ <div class="manage-check">
203
+ <input
204
+ type="checkbox"
205
+ title=${this.manageCheckTitle}
206
+ ?checked=${this.model?.checked}
207
+ @change=${this.handleLinkClicked}
208
+ />
209
+ </div>
210
+ `;
211
+ }
212
+
213
+ /**
214
+ * Whether hover pane behavior should be prepared for this tile
215
+ * (e.g., whether mouse listeners should be attached, etc.)
216
+ */
217
+ private get shouldPrepareHoverPane(): boolean {
218
+ return (
219
+ this.enableHoverPane &&
220
+ !!this.tileDisplayMode &&
221
+ TileDispatcher.HOVER_PANE_DISPLAY_MODES[this.tileDisplayMode] &&
222
+ this.model?.mediatype !== 'search' && // don't show hover panes on search tiles
223
+ !this.model?.captureDates // don't show hover panes on web archive tiles
224
+ );
225
+ }
226
+
227
+ private get isHoverEnabled(): boolean {
228
+ return window.matchMedia('(hover: hover)').matches;
229
+ }
230
+
231
+ /**
232
+ * Whether the info button should be shown on this tile.
233
+ * Only shown on touch/non-hover devices where a hover pane is available,
234
+ * so the button always has something to toggle.
235
+ */
236
+ private get shouldShowInfoButton(): boolean {
237
+ return !this.isHoverEnabled && this.shouldPrepareHoverPane;
238
+ }
239
+
240
+ /** @inheritdoc */
241
+ getHoverPane(): TileHoverPane | undefined {
242
+ return this.hoverPane;
243
+ }
244
+
245
+ /** @inheritdoc */
246
+ getHoverPaneProps(): HoverPaneProperties {
247
+ return this;
248
+ }
249
+
250
+ handleResize(entry: ResizeObserverEntry): void {
251
+ this.currentWidth = entry.contentRect.width;
252
+ this.currentHeight = entry.contentRect.height;
253
+ }
254
+
255
+ disconnectedCallback(): void {
256
+ this.stopResizeObservation(this.resizeObserver);
257
+ }
258
+
259
+ private stopResizeObservation(observer?: SharedResizeObserverInterface) {
260
+ observer?.removeObserver({
261
+ handler: this,
262
+ target: this.container,
263
+ });
264
+ }
265
+
266
+ private startResizeObservation() {
267
+ this.stopResizeObservation(this.resizeObserver);
268
+ this.resizeObserver?.addObserver({
269
+ handler: this,
270
+ target: this.container,
271
+ });
272
+ }
273
+
274
+ updated(props: PropertyValues) {
275
+ if (props.has('resizeObserver')) {
276
+ const previousObserver = props.get(
277
+ 'resizeObserver',
278
+ ) as SharedResizeObserverInterface;
279
+ this.stopResizeObservation(previousObserver);
280
+ this.startResizeObservation();
281
+ }
282
+ }
283
+
284
+ /**
285
+ * Handler for when the tile link is left-clicked. Emits the `resultSelected` event.
286
+ * In manage view, it also checks/unchecks the tile.
287
+ */
288
+ private handleLinkClicked(e: Event): void {
289
+ if (this.isManageView) {
290
+ e.preventDefault();
291
+ if (this.model) this.model.checked = !this.model.checked;
292
+ }
293
+
294
+ this.dispatchEvent(
295
+ new CustomEvent('resultSelected', { detail: this.model }),
296
+ );
297
+ }
298
+
299
+ /**
300
+ * Handler for when the tile link is right-clicked.
301
+ * In manage view, it opens the item in a new tab. Otherwise, does nothing.
302
+ */
303
+ private handleLinkContextMenu(e: Event): void {
304
+ if (this.isManageView && this.linkTileHref !== nothing) {
305
+ e.preventDefault();
306
+ window.open(this.linkTileHref, '_blank');
307
+ }
308
+ }
309
+
310
+ private tileInfoButtonPressed(
311
+ e: CustomEvent<{ x: number; y: number }>,
312
+ ): void {
313
+ this.hoverPaneController?.toggleHoverPane({
314
+ coords: e.detail,
315
+ enableTouchBackdrop: true,
316
+ });
317
+ }
318
+
319
+ /** Whether tile action buttons should be rendered in grid mode */
320
+ private get showGridTileActions(): boolean {
321
+ return (
322
+ this.tileActions.length > 0 &&
323
+ !this.isManageView &&
324
+ this.tileDisplayMode === 'grid'
325
+ );
326
+ }
327
+
328
+ /**
329
+ * Template for the grid-mode action buttons. Rendered alongside the inner
330
+ * tile link inside the dispatcher's shadow root so the action buttons can
331
+ * suppress the hover pane on hover.
332
+ */
333
+ private get gridTileActionsTemplate() {
334
+ if (!this.showGridTileActions) return nothing;
335
+
336
+ return html`
337
+ <div
338
+ class="tile-actions grid-tile-actions"
339
+ @mouseenter=${this.handleGridActionsMouseEnter}
340
+ @mousemove=${(e: Event) => e.stopPropagation()}
341
+ >
342
+ ${this.tileActions.map(
343
+ action => html`
344
+ <button
345
+ class="tile-action-btn"
346
+ @click=${(e: Event) => this.handleTileActionClick(e, action)}
347
+ >
348
+ ${action.label}
349
+ </button>
350
+ `,
351
+ )}
352
+ </div>
353
+ `;
354
+ }
355
+
356
+ /**
357
+ * When the mouse enters the grid-mode tile actions area, dispatch a
358
+ * synthetic mouseleave on the host to cancel the hover pane's show timer
359
+ * and hide any visible pane.
360
+ */
361
+ private handleGridActionsMouseEnter = (): void => {
362
+ this.dispatchEvent(new MouseEvent('mouseleave', { bubbles: false }));
363
+ };
364
+
365
+ private get tile() {
366
+ const {
367
+ model,
368
+ collectionPagePath,
369
+ baseNavigationUrl,
370
+ currentWidth,
371
+ currentHeight,
372
+ sortParam,
373
+ creatorFilter,
374
+ mobileBreakpoint,
375
+ defaultSortParam,
376
+ } = this;
377
+
378
+ if (!model) return nothing;
379
+
380
+ switch (this.tileDisplayMode) {
381
+ case 'grid':
382
+ switch (model.mediatype) {
383
+ case 'collection':
384
+ return html`<collection-tile
385
+ .model=${model}
386
+ .collectionPagePath=${collectionPagePath}
387
+ .baseImageUrl=${this.baseImageUrl}
388
+ .currentWidth=${currentWidth}
389
+ .currentHeight=${currentHeight}
390
+ .creatorFilter=${creatorFilter}
391
+ .suppressBlurring=${this.suppressBlurring}
392
+ .isManageView=${this.isManageView}
393
+ .layoutType=${this.layoutType}
394
+ ?showInfoButton=${this.shouldShowInfoButton}
395
+ @infoButtonPressed=${this.tileInfoButtonPressed}
396
+ >
397
+ </collection-tile>`;
398
+ case 'account':
399
+ return html`<account-tile
400
+ .model=${model}
401
+ .collectionPagePath=${collectionPagePath}
402
+ .baseImageUrl=${this.baseImageUrl}
403
+ .currentWidth=${currentWidth}
404
+ .currentHeight=${currentHeight}
405
+ .creatorFilter=${creatorFilter}
406
+ .suppressBlurring=${this.suppressBlurring}
407
+ .isManageView=${this.isManageView}
408
+ ?showInfoButton=${this.shouldShowInfoButton}
409
+ @infoButtonPressed=${this.tileInfoButtonPressed}
410
+ >
411
+ </account-tile>`;
412
+ case 'search':
413
+ return html`<search-tile
414
+ .model=${model}
415
+ .collectionPagePath=${collectionPagePath}
416
+ .baseImageUrl=${this.baseImageUrl}
417
+ .currentWidth=${currentWidth}
418
+ .currentHeight=${currentHeight}
419
+ .creatorFilter=${creatorFilter}
420
+ .suppressBlurring=${this.suppressBlurring}
421
+ .isManageView=${this.isManageView}
422
+ ?showInfoButton=${false}
423
+ @infoButtonPressed=${this.tileInfoButtonPressed}
424
+ >
425
+ </search-tile>`;
426
+ default:
427
+ return html`<item-tile
428
+ .model=${model}
429
+ .collectionPagePath=${collectionPagePath}
430
+ .currentWidth=${this.currentWidth}
431
+ .currentHeight=${this.currentHeight}
432
+ .baseImageUrl=${this.baseImageUrl}
433
+ .sortParam=${sortParam}
434
+ .defaultSortParam=${defaultSortParam}
435
+ .creatorFilter=${creatorFilter}
436
+ .loggedIn=${this.loggedIn}
437
+ .suppressBlurring=${this.suppressBlurring}
438
+ .isManageView=${this.isManageView}
439
+ .layoutType=${this.layoutType}
440
+ ?showTvClips=${this.showTvClips}
441
+ ?showInfoButton=${this.shouldShowInfoButton}
442
+ ?useLocalTime=${this.useLocalTime}
443
+ @infoButtonPressed=${this.tileInfoButtonPressed}
444
+ >
445
+ </item-tile>`;
446
+ }
447
+ case 'list-compact':
448
+ return html`<tile-list-compact
449
+ .model=${model}
450
+ .collectionPagePath=${collectionPagePath}
451
+ .currentWidth=${currentWidth}
452
+ .currentHeight=${currentHeight}
453
+ .baseNavigationUrl=${baseNavigationUrl}
454
+ .sortParam=${sortParam}
455
+ .defaultSortParam=${defaultSortParam}
456
+ .creatorFilter=${creatorFilter}
457
+ .mobileBreakpoint=${mobileBreakpoint}
458
+ .baseImageUrl=${this.baseImageUrl}
459
+ .loggedIn=${this.loggedIn}
460
+ .suppressBlurring=${this.suppressBlurring}
461
+ .tileActions=${this.isManageView ? [] : this.tileActions}
462
+ ?useLocalTime=${this.useLocalTime}
463
+ >
464
+ </tile-list-compact>`;
465
+ case 'list-detail':
466
+ return html`<tile-list
467
+ .model=${model}
468
+ .collectionPagePath=${collectionPagePath}
469
+ .collectionTitles=${this.collectionTitles}
470
+ .currentWidth=${currentWidth}
471
+ .currentHeight=${currentHeight}
472
+ .baseNavigationUrl=${baseNavigationUrl}
473
+ .sortParam=${sortParam}
474
+ .defaultSortParam=${defaultSortParam}
475
+ .creatorFilter=${creatorFilter}
476
+ .mobileBreakpoint=${mobileBreakpoint}
477
+ .baseImageUrl=${this.baseImageUrl}
478
+ .loggedIn=${this.loggedIn}
479
+ .suppressBlurring=${this.suppressBlurring}
480
+ .tileActions=${this.isManageView ? [] : this.tileActions}
481
+ ?useLocalTime=${this.useLocalTime}
482
+ >
483
+ </tile-list>`;
484
+ default:
485
+ return nothing;
486
+ }
487
+ }
488
+
489
+ static get styles() {
490
+ return [
491
+ srOnlyStyle,
492
+ tileActionStyles,
493
+ css`
494
+ :host {
495
+ display: block;
496
+ height: 100%;
497
+ }
498
+
499
+ collection-tile {
500
+ --tileBorderColor: #555555;
501
+ --tileBackgroundColor: #666666;
502
+ --imageBlockBackgroundColor: #666666;
503
+ }
504
+
505
+ account-tile {
506
+ --tileBorderColor: #dddddd;
507
+ --imageBlockBackgroundColor: #fcf5e6;
508
+ }
509
+
510
+ item-tile {
511
+ --tileBorderColor: #dddddd;
512
+ --imageBlockBackgroundColor: #f1f1f4;
513
+ }
514
+
515
+ search-tile {
516
+ --tileBorderColor: #555555;
517
+ --tileBackgroundColor: #666666;
518
+ --imageBlockBackgroundColor: #666666;
519
+ --iconFillColor: #2c2c2c;
520
+ }
521
+
522
+ #container {
523
+ position: relative;
524
+ height: 100%;
525
+ border-radius: 4px;
526
+ }
527
+
528
+ /*
529
+ * When tile actions are present, the container takes on the role of
530
+ * the tile's visual card so the tile content and action row appear
531
+ * as a single unified element. The inner tile's own shadow/radius
532
+ * are disabled via CSS variable overrides to avoid visual
533
+ * duplication, and the action row sits as a footer inside the same
534
+ * card.
535
+ */
536
+ #container.has-tile-actions {
537
+ display: flex;
538
+ flex-direction: column;
539
+ overflow: hidden;
540
+ box-shadow: var(--tileShadow, 1px 1px 2px 0);
541
+ --tileBoxShadow: none;
542
+ --tileCornerRadius: 0;
543
+ }
544
+
545
+ #container.has-tile-actions .tile-link {
546
+ flex: 1;
547
+ min-height: 0;
548
+ overflow: hidden;
549
+ border-radius: 0;
550
+ }
551
+
552
+ /* Normal hover shadow lives on the inner anchor for plain tiles */
553
+ #container.hoverable:not(.has-tile-actions) a:focus,
554
+ #container.hoverable:not(.has-tile-actions) a:hover {
555
+ box-shadow: var(
556
+ --tileHoverBoxShadow,
557
+ 0 0 6px 2px rgba(8, 8, 32, 0.8)
558
+ );
559
+ transition: box-shadow 0.1s ease;
560
+ }
561
+
562
+ /*
563
+ * When the container owns the card visuals, the hover shadow needs
564
+ * to move up to the container so it wraps the action row too.
565
+ */
566
+ #container.hoverable.has-tile-actions:hover {
567
+ box-shadow: var(
568
+ --tileHoverBoxShadow,
569
+ 0 0 6px 2px rgba(8, 8, 32, 0.8)
570
+ );
571
+ transition: box-shadow 0.1s ease;
572
+ }
573
+
574
+ a {
575
+ display: block;
576
+ height: 100%;
577
+ color: unset;
578
+ text-decoration: none;
579
+ transition: transform 0.05s ease;
580
+ border-radius: 4px;
581
+ outline: none;
582
+ }
583
+
584
+ a :first-child {
585
+ display: block;
586
+ height: 100%;
587
+ }
588
+
589
+ .manage-check {
590
+ position: absolute;
591
+ right: 0;
592
+ top: 0;
593
+ border: 5px solid #2c2c2c;
594
+ border-radius: 3px;
595
+ background-color: #2c2c2c;
596
+ z-index: 1;
597
+ }
598
+
599
+ .manage-check > input[type='checkbox'] {
600
+ display: block;
601
+ margin: 0;
602
+ }
603
+
604
+ #touch-backdrop {
605
+ position: fixed;
606
+ width: 100vw;
607
+ height: 100vh;
608
+ top: 0;
609
+ left: 0;
610
+ z-index: 2;
611
+ background: transparent;
612
+ }
613
+
614
+ tile-hover-pane {
615
+ position: absolute;
616
+ top: 0;
617
+ left: -9999px;
618
+ z-index: 2;
619
+ }
620
+
621
+ /*
622
+ * Grid-mode action row sits flush against the bottom of the card —
623
+ * the buttons' own borders form the visible bottom edge. The outer
624
+ * buttons get rounded bottom corners to match the container so the
625
+ * red border traces cleanly around the card's bottom corners.
626
+ */
627
+ .grid-tile-actions .tile-action-btn:first-child {
628
+ border-bottom-left-radius: 4px;
629
+ }
630
+
631
+ .grid-tile-actions .tile-action-btn:last-child {
632
+ border-bottom-right-radius: 4px;
633
+ }
634
+ `,
635
+ ];
636
+ }
637
+ }