@internetarchive/collection-browser 4.0.0 → 4.0.1

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 (48) 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/app-root.js +614 -614
  11. package/dist/src/app-root.js.map +1 -1
  12. package/dist/src/collection-browser.js +764 -764
  13. package/dist/src/collection-browser.js.map +1 -1
  14. package/dist/src/collection-facets/more-facets-content.js +121 -121
  15. package/dist/src/collection-facets/more-facets-content.js.map +1 -1
  16. package/dist/src/data-source/collection-browser-query-state.js.map +1 -1
  17. package/dist/src/models.js.map +1 -1
  18. package/dist/src/tiles/grid/collection-tile.js +89 -89
  19. package/dist/src/tiles/grid/collection-tile.js.map +1 -1
  20. package/dist/src/tiles/grid/item-tile.js +138 -138
  21. package/dist/src/tiles/grid/item-tile.js.map +1 -1
  22. package/dist/src/tiles/hover/hover-pane-controller.js +28 -28
  23. package/dist/src/tiles/hover/hover-pane-controller.js.map +1 -1
  24. package/dist/src/tiles/models.js.map +1 -1
  25. package/dist/src/tiles/tile-dispatcher.js +216 -216
  26. package/dist/src/tiles/tile-dispatcher.js.map +1 -1
  27. package/dist/test/collection-browser.test.js +1 -1
  28. package/dist/test/collection-browser.test.js.map +1 -1
  29. package/eslint.config.mjs +53 -53
  30. package/index.html +24 -24
  31. package/local.archive.org.cert +86 -86
  32. package/local.archive.org.key +27 -27
  33. package/package.json +121 -119
  34. package/renovate.json +6 -6
  35. package/src/app-root.ts +1166 -1166
  36. package/src/collection-browser.ts +3075 -3075
  37. package/src/collection-facets/more-facets-content.ts +644 -644
  38. package/src/data-source/collection-browser-query-state.ts +59 -59
  39. package/src/models.ts +873 -873
  40. package/src/tiles/grid/collection-tile.ts +184 -184
  41. package/src/tiles/grid/item-tile.ts +346 -346
  42. package/src/tiles/hover/hover-pane-controller.ts +627 -627
  43. package/src/tiles/models.ts +8 -8
  44. package/src/tiles/tile-dispatcher.ts +518 -518
  45. package/test/collection-browser.test.ts +1 -1
  46. package/tsconfig.json +25 -25
  47. package/web-dev-server.config.mjs +30 -30
  48. package/web-test-runner.config.mjs +52 -41
@@ -970,7 +970,7 @@ describe('Collection Browser', () => {
970
970
  </collection-browser>`,
971
971
  );
972
972
 
973
- expect(el.selectedSort).to.equal(SortField.default);
973
+ expect(el.selectedSort).to.equal(SortField.relevance);
974
974
 
975
975
  el.baseQuery = 'foo';
976
976
  await el.updateComplete;
package/tsconfig.json CHANGED
@@ -1,25 +1,25 @@
1
- {
2
- "compilerOptions": {
3
- "target": "esnext",
4
- "module": "esnext",
5
- "moduleResolution": "bundler",
6
- "noEmitOnError": true,
7
- "lib": [
8
- "ESNext",
9
- "dom",
10
- "dom.iterable"
11
- ],
12
- "strict": true,
13
- "esModuleInterop": false,
14
- "allowSyntheticDefaultImports": true,
15
- "experimentalDecorators": true,
16
- "importHelpers": true,
17
- "outDir": "dist",
18
- "sourceMap": true,
19
- "inlineSources": true,
20
- "rootDir": "./",
21
- "declaration": true,
22
- "useDefineForClassFields": false,
23
- },
24
- "include": ["src", "test", "index.ts", "types"],
25
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "esnext",
4
+ "module": "esnext",
5
+ "moduleResolution": "bundler",
6
+ "noEmitOnError": true,
7
+ "lib": [
8
+ "ESNext",
9
+ "dom",
10
+ "dom.iterable"
11
+ ],
12
+ "strict": true,
13
+ "esModuleInterop": false,
14
+ "allowSyntheticDefaultImports": true,
15
+ "experimentalDecorators": true,
16
+ "importHelpers": true,
17
+ "outDir": "dist",
18
+ "sourceMap": true,
19
+ "inlineSources": true,
20
+ "rootDir": "./",
21
+ "declaration": true,
22
+ "useDefineForClassFields": false,
23
+ },
24
+ "include": ["src", "test", "index.ts", "types"],
25
+ }
@@ -1,30 +1,30 @@
1
- // import { hmrPlugin, presets } from '@open-wc/dev-server-hmr';
2
-
3
- /** Use Hot Module replacement by adding --hmr to the start command */
4
- const hmr = process.argv.includes('--hmr');
5
-
6
- export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
7
- nodeResolve: true,
8
- open: '/',
9
- watch: !hmr,
10
-
11
- /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
12
- // esbuildTarget: 'auto'
13
-
14
- /** Set appIndex to enable SPA routing */
15
- // appIndex: 'demo/index.html',
16
-
17
- /** Confgure bare import resolve plugin */
18
- // nodeResolve: {
19
- // exportConditions: ['browser', 'development']
20
- // },
21
-
22
- plugins: [
23
- /** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */
24
- // hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }),
25
- ],
26
-
27
- http2: true,
28
- sslCert: './local.archive.org.cert',
29
- sslKey: './local.archive.org.key',
30
- });
1
+ // import { hmrPlugin, presets } from '@open-wc/dev-server-hmr';
2
+
3
+ /** Use Hot Module replacement by adding --hmr to the start command */
4
+ const hmr = process.argv.includes('--hmr');
5
+
6
+ export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
7
+ nodeResolve: true,
8
+ open: '/',
9
+ watch: !hmr,
10
+
11
+ /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
12
+ // esbuildTarget: 'auto'
13
+
14
+ /** Set appIndex to enable SPA routing */
15
+ // appIndex: 'demo/index.html',
16
+
17
+ /** Confgure bare import resolve plugin */
18
+ // nodeResolve: {
19
+ // exportConditions: ['browser', 'development']
20
+ // },
21
+
22
+ plugins: [
23
+ /** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */
24
+ // hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }),
25
+ ],
26
+
27
+ http2: true,
28
+ sslCert: './local.archive.org.cert',
29
+ sslKey: './local.archive.org.key',
30
+ });
@@ -1,41 +1,52 @@
1
- // import { playwrightLauncher } from '@web/test-runner-playwright';
2
-
3
- const filteredLogs = ['Running in dev mode', 'lit-html is in dev mode'];
4
-
5
- export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
6
- /** Test files to run */
7
- files: 'dist/test/**/*.test.js',
8
-
9
- /** Resolve bare module imports */
10
- nodeResolve: {
11
- exportConditions: ['browser', 'development'],
12
- },
13
-
14
- /** Filter out lit dev mode logs */
15
- filterBrowserLogs(log) {
16
- for (const arg of log.args) {
17
- if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) {
18
- return false;
19
- }
20
- }
21
- return true;
22
- },
23
-
24
- /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
25
- // esbuildTarget: 'auto',
26
-
27
- /** Amount of browsers to run concurrently */
28
- // concurrentBrowsers: 2,
29
-
30
- /** Amount of test files per browser to test concurrently */
31
- // concurrency: 1,
32
-
33
- /** Browsers to run tests on */
34
- // browsers: [
35
- // playwrightLauncher({ product: 'chromium' }),
36
- // playwrightLauncher({ product: 'firefox' }),
37
- // playwrightLauncher({ product: 'webkit' }),
38
- // ],
39
-
40
- // See documentation for all available options
41
- });
1
+ import rollupImage from '@rollup/plugin-image';
2
+ import { rollupAdapter } from '@web/dev-server-rollup';
3
+ // import { playwrightLauncher } from '@web/test-runner-playwright';
4
+
5
+ const filteredLogs = ['Running in dev mode', 'lit-html is in dev mode'];
6
+
7
+ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
8
+ /** Test files to run */
9
+ files: 'dist/test/**/*.test.js',
10
+
11
+ /** Resolve bare module imports */
12
+ nodeResolve: {
13
+ exportConditions: ['browser', 'development'],
14
+ },
15
+
16
+ mimeTypes: {
17
+ '**/*.scss': 'js',
18
+ '**/*.css': 'js',
19
+ '**/*.svg': 'js',
20
+ '**/*.json': 'js',
21
+ },
22
+
23
+ /** Filter out lit dev mode logs */
24
+ filterBrowserLogs(log) {
25
+ for (const arg of log.args) {
26
+ if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) {
27
+ return false;
28
+ }
29
+ }
30
+ return true;
31
+ },
32
+
33
+ plugins: [rollupAdapter(rollupImage())],
34
+
35
+ /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
36
+ // esbuildTarget: 'auto',
37
+
38
+ /** Amount of browsers to run concurrently */
39
+ // concurrentBrowsers: 2,
40
+
41
+ /** Amount of test files per browser to test concurrently */
42
+ // concurrency: 1,
43
+
44
+ /** Browsers to run tests on */
45
+ // browsers: [
46
+ // playwrightLauncher({ product: 'chromium' }),
47
+ // playwrightLauncher({ product: 'firefox' }),
48
+ // playwrightLauncher({ product: 'webkit' }),
49
+ // ],
50
+
51
+ // See documentation for all available options
52
+ });