@internetarchive/collection-browser 2.22.1 → 3.0.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 (71) hide show
  1. package/.editorconfig +29 -29
  2. package/.github/workflows/ci.yml +27 -27
  3. package/.github/workflows/gh-pages-main.yml +39 -39
  4. package/.github/workflows/npm-publish.yml +39 -39
  5. package/.github/workflows/pr-preview.yml +38 -38
  6. package/.husky/pre-commit +4 -4
  7. package/.prettierignore +1 -1
  8. package/LICENSE +661 -661
  9. package/README.md +83 -83
  10. package/dist/src/collection-browser.d.ts +1 -2
  11. package/dist/src/collection-browser.js +681 -687
  12. package/dist/src/collection-browser.js.map +1 -1
  13. package/dist/src/collection-facets/facet-row.js +130 -130
  14. package/dist/src/collection-facets/facet-row.js.map +1 -1
  15. package/dist/src/collection-facets/smart-facets/smart-facet-bar.js +75 -75
  16. package/dist/src/collection-facets/smart-facets/smart-facet-bar.js.map +1 -1
  17. package/dist/src/collection-facets.js +263 -263
  18. package/dist/src/collection-facets.js.map +1 -1
  19. package/dist/src/data-source/collection-browser-data-source.js.map +1 -1
  20. package/dist/src/data-source/collection-browser-query-state.js.map +1 -1
  21. package/dist/src/data-source/models.js.map +1 -1
  22. package/dist/src/models.js.map +1 -1
  23. package/dist/src/restoration-state-handler.js.map +1 -1
  24. package/dist/src/tiles/base-tile-component.js.map +1 -1
  25. package/dist/src/tiles/grid/item-tile.js +139 -139
  26. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  27. package/dist/src/tiles/hover/hover-pane-controller.js +21 -21
  28. package/dist/src/tiles/hover/hover-pane-controller.js.map +1 -1
  29. package/dist/src/tiles/hover/tile-hover-pane.js +108 -108
  30. package/dist/src/tiles/hover/tile-hover-pane.js.map +1 -1
  31. package/dist/src/tiles/list/tile-list-compact-header.js +45 -45
  32. package/dist/src/tiles/list/tile-list-compact-header.js.map +1 -1
  33. package/dist/src/tiles/list/tile-list-compact.js +97 -97
  34. package/dist/src/tiles/list/tile-list-compact.js.map +1 -1
  35. package/dist/src/tiles/list/tile-list.js +289 -289
  36. package/dist/src/tiles/list/tile-list.js.map +1 -1
  37. package/dist/src/tiles/tile-dispatcher.js +200 -200
  38. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  39. package/dist/src/tiles/tile-display-value-provider.js.map +1 -1
  40. package/dist/test/collection-browser.test.js +183 -197
  41. package/dist/test/collection-browser.test.js.map +1 -1
  42. package/dist/test/restoration-state-handler.test.js.map +1 -1
  43. package/eslint.config.mjs +53 -53
  44. package/index.html +24 -24
  45. package/local.archive.org.cert +86 -86
  46. package/local.archive.org.key +27 -27
  47. package/package.json +117 -117
  48. package/renovate.json +6 -6
  49. package/src/collection-browser.ts +2775 -2779
  50. package/src/collection-facets/facet-row.ts +282 -282
  51. package/src/collection-facets/smart-facets/smart-facet-bar.ts +437 -437
  52. package/src/collection-facets.ts +990 -990
  53. package/src/data-source/collection-browser-data-source.ts +1390 -1390
  54. package/src/data-source/collection-browser-query-state.ts +63 -63
  55. package/src/data-source/models.ts +43 -43
  56. package/src/models.ts +870 -870
  57. package/src/restoration-state-handler.ts +544 -544
  58. package/src/tiles/base-tile-component.ts +53 -53
  59. package/src/tiles/grid/item-tile.ts +339 -339
  60. package/src/tiles/hover/hover-pane-controller.ts +517 -517
  61. package/src/tiles/hover/tile-hover-pane.ts +180 -180
  62. package/src/tiles/list/tile-list-compact-header.ts +86 -86
  63. package/src/tiles/list/tile-list-compact.ts +236 -236
  64. package/src/tiles/list/tile-list.ts +688 -688
  65. package/src/tiles/tile-dispatcher.ts +486 -486
  66. package/src/tiles/tile-display-value-provider.ts +124 -124
  67. package/test/collection-browser.test.ts +2340 -2359
  68. package/test/restoration-state-handler.test.ts +510 -510
  69. package/tsconfig.json +20 -20
  70. package/web-dev-server.config.mjs +30 -30
  71. package/web-test-runner.config.mjs +41 -41
package/.editorconfig CHANGED
@@ -1,29 +1,29 @@
1
- # EditorConfig helps developers define and maintain consistent
2
- # coding styles between different editors and IDEs
3
- # editorconfig.org
4
-
5
- root = true
6
-
7
-
8
- [*]
9
-
10
- # Change these settings to your own preference
11
- indent_style = space
12
- indent_size = 2
13
-
14
- # We recommend you to keep these unchanged
15
- end_of_line = lf
16
- charset = utf-8
17
- trim_trailing_whitespace = true
18
- insert_final_newline = true
19
-
20
- [*.md]
21
- trim_trailing_whitespace = false
22
-
23
- [*.json]
24
- indent_size = 2
25
-
26
- [*.{html,js,md}]
27
- block_comment_start = /**
28
- block_comment = *
29
- block_comment_end = */
1
+ # EditorConfig helps developers define and maintain consistent
2
+ # coding styles between different editors and IDEs
3
+ # editorconfig.org
4
+
5
+ root = true
6
+
7
+
8
+ [*]
9
+
10
+ # Change these settings to your own preference
11
+ indent_style = space
12
+ indent_size = 2
13
+
14
+ # We recommend you to keep these unchanged
15
+ end_of_line = lf
16
+ charset = utf-8
17
+ trim_trailing_whitespace = true
18
+ insert_final_newline = true
19
+
20
+ [*.md]
21
+ trim_trailing_whitespace = false
22
+
23
+ [*.json]
24
+ indent_size = 2
25
+
26
+ [*.{html,js,md}]
27
+ block_comment_start = /**
28
+ block_comment = *
29
+ block_comment_end = */
@@ -1,27 +1,27 @@
1
- name: App CI
2
-
3
- on:
4
- push:
5
- branches: [ main ]
6
- pull_request:
7
- branches: [ main ]
8
-
9
- jobs:
10
- build:
11
- runs-on: ubuntu-latest
12
-
13
- steps:
14
- - uses: actions/checkout@v4
15
- - uses: actions/setup-node@v4
16
- with:
17
- node-version: latest
18
-
19
- - name: Install dependencies
20
- run: yarn install
21
-
22
- - name: Run tests
23
- run: yarn run test
24
-
25
- - uses: codecov/codecov-action@v4
26
- with:
27
- token: ${{ secrets.CODECOV_TOKEN }}
1
+ name: App CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: actions/setup-node@v4
16
+ with:
17
+ node-version: latest
18
+
19
+ - name: Install dependencies
20
+ run: yarn install
21
+
22
+ - name: Run tests
23
+ run: yarn run test
24
+
25
+ - uses: codecov/codecov-action@v4
26
+ with:
27
+ token: ${{ secrets.CODECOV_TOKEN }}
@@ -1,39 +1,39 @@
1
- # This workflow will generate the static page under `main` subdirectory inside the `gh-pages` branch
2
-
3
- # This workflow will run every time new changes were pushed to the `main` branch
4
-
5
- name: App build CI/CD to main branch
6
-
7
- on:
8
- push:
9
- branches: [ main ]
10
-
11
- jobs:
12
- build:
13
- runs-on: ubuntu-latest
14
-
15
- steps:
16
- - uses: actions/checkout@v4
17
- with:
18
- persist-credentials: false
19
-
20
- - uses: actions/setup-node@v4
21
- with:
22
- node-version: latest
23
-
24
- - name: Install dependencies
25
- run: yarn install
26
-
27
- - name: Create build files for gh-pages deploy
28
- run: yarn prepare:ghpages
29
-
30
- # Reference: https://github.com/JamesIves/github-pages-deploy-action
31
- - name: Deploy 🚀
32
- uses: JamesIves/github-pages-deploy-action@v4.4.3
33
- with:
34
- branch: gh-pages
35
- folder: ghpages
36
- clean-exclude: pr/
37
- force: false
38
- target-folder: main
39
- token: ${{ secrets.GH_TOKEN }}
1
+ # This workflow will generate the static page under `main` subdirectory inside the `gh-pages` branch
2
+
3
+ # This workflow will run every time new changes were pushed to the `main` branch
4
+
5
+ name: App build CI/CD to main branch
6
+
7
+ on:
8
+ push:
9
+ branches: [ main ]
10
+
11
+ jobs:
12
+ build:
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ with:
18
+ persist-credentials: false
19
+
20
+ - uses: actions/setup-node@v4
21
+ with:
22
+ node-version: latest
23
+
24
+ - name: Install dependencies
25
+ run: yarn install
26
+
27
+ - name: Create build files for gh-pages deploy
28
+ run: yarn prepare:ghpages
29
+
30
+ # Reference: https://github.com/JamesIves/github-pages-deploy-action
31
+ - name: Deploy 🚀
32
+ uses: JamesIves/github-pages-deploy-action@v4.4.3
33
+ with:
34
+ branch: gh-pages
35
+ folder: ghpages
36
+ clean-exclude: pr/
37
+ force: false
38
+ target-folder: main
39
+ token: ${{ secrets.GH_TOKEN }}
@@ -1,39 +1,39 @@
1
- # This workflow will be triggered if there's a new release tag created/pushed in Github repo
2
-
3
- # This workflow will do the following:
4
- # - run tests using node
5
- # - publish a package to GitHub Packages when a release is created
6
-
7
- # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
8
-
9
- name: Node.js Package
10
-
11
- on:
12
- release:
13
- types: [created]
14
-
15
- jobs:
16
- build:
17
- runs-on: ubuntu-latest
18
- steps:
19
- - uses: actions/checkout@v4
20
- - uses: actions/setup-node@v3
21
- with:
22
- node-version: 16
23
- - run: npm ci
24
- - run: npm prepare
25
- - run: npm test
26
-
27
- publish-npm:
28
- needs: build
29
- runs-on: ubuntu-latest
30
- steps:
31
- - uses: actions/checkout@v4
32
- - uses: actions/setup-node@v3
33
- with:
34
- node-version: 16
35
- registry-url: https://registry.npmjs.org/
36
- - run: npm ci
37
- - run: npm publish --tag next
38
- env:
39
- NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
1
+ # This workflow will be triggered if there's a new release tag created/pushed in Github repo
2
+
3
+ # This workflow will do the following:
4
+ # - run tests using node
5
+ # - publish a package to GitHub Packages when a release is created
6
+
7
+ # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
8
+
9
+ name: Node.js Package
10
+
11
+ on:
12
+ release:
13
+ types: [created]
14
+
15
+ jobs:
16
+ build:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - uses: actions/setup-node@v3
21
+ with:
22
+ node-version: 16
23
+ - run: npm ci
24
+ - run: npm prepare
25
+ - run: npm test
26
+
27
+ publish-npm:
28
+ needs: build
29
+ runs-on: ubuntu-latest
30
+ steps:
31
+ - uses: actions/checkout@v4
32
+ - uses: actions/setup-node@v3
33
+ with:
34
+ node-version: 16
35
+ registry-url: https://registry.npmjs.org/
36
+ - run: npm ci
37
+ - run: npm publish --tag next
38
+ env:
39
+ NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
@@ -1,38 +1,38 @@
1
- # This workflow will generate the static page under `pr` subdirectory inside the `gh-pages` branch
2
-
3
- # This workflow will run every time there's a PR opened, reopened, synchronize, or closed
4
-
5
- name: Deploy PR previews
6
-
7
- on:
8
- pull_request:
9
- types:
10
- - opened
11
- - reopened
12
- - synchronize
13
- - closed
14
-
15
- concurrency: preview-${{ github.ref }}
16
-
17
- jobs:
18
- deploy-preview:
19
- runs-on: ubuntu-latest
20
- steps:
21
- - name: Checkout
22
- uses: actions/checkout@v4
23
-
24
- - uses: actions/setup-node@v4
25
- with:
26
- node-version: latest
27
-
28
- - name: Install and Build
29
- run: |
30
- yarn install
31
- yarn prepare:ghpages
32
-
33
- # Reference: https://github.com/rossjrw/pr-preview-action
34
- - name: Deploy preview
35
- uses: rossjrw/pr-preview-action@v1
36
- with:
37
- source-dir: ./ghpages/
38
- umbrella-dir: pr
1
+ # This workflow will generate the static page under `pr` subdirectory inside the `gh-pages` branch
2
+
3
+ # This workflow will run every time there's a PR opened, reopened, synchronize, or closed
4
+
5
+ name: Deploy PR previews
6
+
7
+ on:
8
+ pull_request:
9
+ types:
10
+ - opened
11
+ - reopened
12
+ - synchronize
13
+ - closed
14
+
15
+ concurrency: preview-${{ github.ref }}
16
+
17
+ jobs:
18
+ deploy-preview:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@v4
23
+
24
+ - uses: actions/setup-node@v4
25
+ with:
26
+ node-version: latest
27
+
28
+ - name: Install and Build
29
+ run: |
30
+ yarn install
31
+ yarn prepare:ghpages
32
+
33
+ # Reference: https://github.com/rossjrw/pr-preview-action
34
+ - name: Deploy preview
35
+ uses: rossjrw/pr-preview-action@v1
36
+ with:
37
+ source-dir: ./ghpages/
38
+ umbrella-dir: pr
package/.husky/pre-commit CHANGED
@@ -1,4 +1,4 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- npx lint-staged
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ npx lint-staged
package/.prettierignore CHANGED
@@ -1 +1 @@
1
- coverage
1
+ coverage