@internetarchive/collection-browser 4.4.0 → 4.5.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 (68) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js.map +1 -1
  3. package/dist/src/app-root.d.ts +8 -0
  4. package/dist/src/app-root.js +26 -0
  5. package/dist/src/app-root.js.map +1 -1
  6. package/dist/src/collection-browser.d.ts +8 -0
  7. package/dist/src/collection-browser.js +19 -1
  8. package/dist/src/collection-browser.js.map +1 -1
  9. package/dist/src/collection-facets/facet-row.d.ts +6 -0
  10. package/dist/src/collection-facets/facet-row.js +158 -140
  11. package/dist/src/collection-facets/facet-row.js.map +1 -1
  12. package/dist/src/collection-facets/facets-template.js +25 -23
  13. package/dist/src/collection-facets/facets-template.js.map +1 -1
  14. package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
  15. package/dist/src/styles/tile-action-styles.d.ts +14 -0
  16. package/dist/src/styles/tile-action-styles.js +59 -0
  17. package/dist/src/styles/tile-action-styles.js.map +1 -0
  18. package/dist/src/tiles/base-tile-component.d.ts +17 -1
  19. package/dist/src/tiles/base-tile-component.js +50 -1
  20. package/dist/src/tiles/base-tile-component.js.map +1 -1
  21. package/dist/src/tiles/grid/item-tile.js +139 -138
  22. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  23. package/dist/src/tiles/item-image.js +28 -28
  24. package/dist/src/tiles/item-image.js.map +1 -1
  25. package/dist/src/tiles/list/tile-list-compact-header.js +71 -46
  26. package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
  27. package/dist/src/tiles/list/tile-list-compact.d.ts +1 -1
  28. package/dist/src/tiles/list/tile-list-compact.js +138 -100
  29. package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
  30. package/dist/src/tiles/list/tile-list.d.ts +1 -1
  31. package/dist/src/tiles/list/tile-list.js +316 -298
  32. package/dist/src/tiles/list/tile-list.js.map +1 -1
  33. package/dist/src/tiles/models.d.ts +11 -0
  34. package/dist/src/tiles/models.js.map +1 -1
  35. package/dist/src/tiles/tile-dispatcher.d.ts +14 -0
  36. package/dist/src/tiles/tile-dispatcher.js +319 -216
  37. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  38. package/dist/src/tiles/tile-display-value-provider.js +2 -1
  39. package/dist/src/tiles/tile-display-value-provider.js.map +1 -1
  40. package/dist/test/collection-facets/facet-row.test.js +55 -23
  41. package/dist/test/collection-facets/facet-row.test.js.map +1 -1
  42. package/dist/test/tiles/grid/item-tile.test.js +79 -79
  43. package/dist/test/tiles/grid/item-tile.test.js.map +1 -1
  44. package/dist/test/tiles/list/tile-list.test.js +136 -136
  45. package/dist/test/tiles/list/tile-list.test.js.map +1 -1
  46. package/dist/test/tiles/tile-dispatcher.test.js +101 -87
  47. package/dist/test/tiles/tile-dispatcher.test.js.map +1 -1
  48. package/index.ts +29 -28
  49. package/package.json +2 -2
  50. package/src/app-root.ts +30 -0
  51. package/src/collection-browser.ts +16 -1
  52. package/src/collection-facets/facet-row.ts +309 -299
  53. package/src/collection-facets/facets-template.ts +85 -83
  54. package/src/data-source/collection-browser-data-source.ts +1465 -1465
  55. package/src/styles/tile-action-styles.ts +59 -0
  56. package/src/tiles/base-tile-component.ts +124 -65
  57. package/src/tiles/grid/item-tile.ts +347 -346
  58. package/src/tiles/item-image.ts +214 -214
  59. package/src/tiles/list/tile-list-compact-header.ts +112 -86
  60. package/src/tiles/list/tile-list-compact.ts +278 -239
  61. package/src/tiles/list/tile-list.ts +718 -700
  62. package/src/tiles/models.ts +21 -8
  63. package/src/tiles/tile-dispatcher.ts +637 -527
  64. package/src/tiles/tile-display-value-provider.ts +133 -134
  65. package/test/collection-facets/facet-row.test.ts +421 -375
  66. package/test/tiles/grid/item-tile.test.ts +520 -520
  67. package/test/tiles/list/tile-list.test.ts +576 -576
  68. package/test/tiles/tile-dispatcher.test.ts +320 -300
@@ -1,8 +1,21 @@
1
- /**
2
- * What type of simplified tile layout to use.
3
- * - `default`: Do not apply any layout simplifications.
4
- * - `stats-only`: Only show the tile stats row, but not text snippets.
5
- * - `snippets-only`: Only show the text snippets row (if snippets exist), but not tile stats.
6
- * - `minimal`: Show neither tile stats nor the text snippets.
7
- */
8
- export type LayoutType = 'default' | 'stats-only' | 'snippets-only' | 'minimal';
1
+ /**
2
+ * What type of simplified tile layout to use.
3
+ * - `default`: Do not apply any layout simplifications.
4
+ * - `stats-only`: Only show the tile stats row, but not text snippets.
5
+ * - `snippets-only`: Only show the text snippets row (if snippets exist), but not tile stats.
6
+ * - `minimal`: Show neither tile stats nor the text snippets.
7
+ */
8
+ export type LayoutType = 'default' | 'stats-only' | 'snippets-only' | 'minimal';
9
+
10
+ /**
11
+ * Describes an action button to render on a tile.
12
+ * Styling is controlled via the CSS custom properties documented in
13
+ * `src/styles/tile-action-styles.ts`.
14
+ */
15
+ export interface TileAction {
16
+ /** Unique identifier for this action, included in the `tileActionClicked` event */
17
+ id: string;
18
+
19
+ /** Visible label text displayed on the button */
20
+ label: string;
21
+ }