@internetarchive/collection-browser 4.1.1 → 4.1.2-alpha1
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.
- package/.editorconfig +29 -29
- package/.github/workflows/ci.yml +27 -27
- package/.github/workflows/gh-pages-main.yml +39 -39
- package/.github/workflows/npm-publish.yml +39 -39
- package/.github/workflows/pr-preview.yml +38 -38
- package/.husky/pre-commit +1 -1
- package/.prettierignore +1 -1
- package/LICENSE +661 -661
- package/README.md +83 -83
- package/dist/src/collection-browser.js +4 -2
- package/dist/src/collection-browser.js.map +1 -1
- package/dist/src/restoration-state-handler.js.map +1 -1
- package/eslint.config.mjs +53 -53
- package/index.html +24 -24
- package/local.archive.org.cert +86 -86
- package/local.archive.org.key +27 -27
- package/package.json +120 -120
- package/renovate.json +6 -6
- package/src/collection-browser.ts +6 -2
- package/src/restoration-state-handler.ts +550 -550
- package/tsconfig.json +25 -25
- package/web-dev-server.config.mjs +30 -30
- package/web-test-runner.config.mjs +52 -52
package/package.json
CHANGED
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@internetarchive/collection-browser",
|
|
3
|
-
"description": "The Internet Archive Collection Browser.",
|
|
4
|
-
"license": "AGPL-3.0-only",
|
|
5
|
-
"author": "Internet Archive",
|
|
6
|
-
"version": "4.1.
|
|
7
|
-
"main": "dist/index.js",
|
|
8
|
-
"module": "dist/index.js",
|
|
9
|
-
"scripts": {
|
|
10
|
-
"start": "vite",
|
|
11
|
-
"prepare:ghpages": "rimraf ghpages && yarn run prepare && vite build",
|
|
12
|
-
"prepare": "rimraf dist && tsc && husky install",
|
|
13
|
-
"lint": "eslint . && prettier \"**/*.ts\" --check",
|
|
14
|
-
"format": "eslint . --fix && prettier \"**/*.ts\" --write",
|
|
15
|
-
"circular": "madge --circular --extensions ts .",
|
|
16
|
-
"test": "tsc && yarn run lint && yarn run circular && wtr --coverage",
|
|
17
|
-
"test:fast": "tsc && wtr --coverage",
|
|
18
|
-
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\"",
|
|
19
|
-
"deploy": "yarn run deploy:run -e $(git branch --show-current)",
|
|
20
|
-
"deploy:run": "yarn run prepare:ghpages && touch ghpages/.nojekyll && yarn run deploy:gh",
|
|
21
|
-
"deploy:gh": "gh-pages -t -d ghpages -m \"Build for $(git log --pretty=format:\"%h %an %ai %s\" -n1) [skip ci]\"",
|
|
22
|
-
"typecheck": "yarn tsc --noEmit"
|
|
23
|
-
},
|
|
24
|
-
"types": "dist/index.d.ts",
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"@a11y/focus-trap": "^1.0.5",
|
|
27
|
-
"@internetarchive/analytics-manager": "^0.1.4",
|
|
28
|
-
"@internetarchive/elements": "^0.2.2",
|
|
29
|
-
"@internetarchive/feature-feedback": "^1.0.0",
|
|
30
|
-
"@internetarchive/field-parsers": "^1.0.0",
|
|
31
|
-
"@internetarchive/histogram-date-range": "^1.4.1",
|
|
32
|
-
"@internetarchive/ia-dropdown": "^2.0.0",
|
|
33
|
-
"@internetarchive/iaux-item-metadata": "^1.0.5",
|
|
34
|
-
"@internetarchive/infinite-scroller": "^1.0.1",
|
|
35
|
-
"@internetarchive/modal-manager": "^2.0.5",
|
|
36
|
-
"@internetarchive/search-service": "^2.7.0",
|
|
37
|
-
"@internetarchive/shared-resize-observer": "^0.2.0",
|
|
38
|
-
"@lit/localize": "^0.12.2",
|
|
39
|
-
"dompurify": "^3.2.4",
|
|
40
|
-
"lit": "^2.8.0 || ^3.3.2",
|
|
41
|
-
"typescript-cookie": "^1.0.6"
|
|
42
|
-
},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"@internetarchive/result-type": "^0.0.1",
|
|
45
|
-
"@open-wc/eslint-config": "^12.0.3",
|
|
46
|
-
"@open-wc/testing": "^4.0.0",
|
|
47
|
-
"@rollup/plugin-image": "^3.0.3",
|
|
48
|
-
"@types/dompurify": "^3.2.0",
|
|
49
|
-
"@types/mocha": "^10.0.10",
|
|
50
|
-
"@typescript-eslint/eslint-plugin": "^8.27.0",
|
|
51
|
-
"@typescript-eslint/parser": "^8.27.0",
|
|
52
|
-
"@vitejs/plugin-basic-ssl": "^2.1.4",
|
|
53
|
-
"@web/dev-server": "^0.4.6",
|
|
54
|
-
"@web/dev-server-rollup": "^0.6.4",
|
|
55
|
-
"@web/test-runner": "^0.20.0",
|
|
56
|
-
"concurrently": "^9.1.2",
|
|
57
|
-
"eslint": "^9.22.0",
|
|
58
|
-
"eslint-config-prettier": "^10.1.1",
|
|
59
|
-
"eslint-plugin-html": "^8.1.2",
|
|
60
|
-
"eslint-plugin-import": "^2.31.0",
|
|
61
|
-
"eslint-plugin-lit": "^2.0.0",
|
|
62
|
-
"eslint-plugin-lit-a11y": "^4.1.4",
|
|
63
|
-
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
64
|
-
"eslint-plugin-wc": "^3.0.0",
|
|
65
|
-
"gh-pages": "^6.3.0",
|
|
66
|
-
"husky": "^9.1.7",
|
|
67
|
-
"madge": "^8.0.0",
|
|
68
|
-
"prettier": "^3.5.3",
|
|
69
|
-
"rimraf": "^6.0.1",
|
|
70
|
-
"sinon": "^19.0.4",
|
|
71
|
-
"tslib": "^2.8.1",
|
|
72
|
-
"typescript": "^5.8.2",
|
|
73
|
-
"vite": "^6.2.2"
|
|
74
|
-
},
|
|
75
|
-
"publishConfig": {
|
|
76
|
-
"access": "public"
|
|
77
|
-
},
|
|
78
|
-
"eslintConfig": {
|
|
79
|
-
"parser": "@typescript-eslint/parser",
|
|
80
|
-
"extends": [
|
|
81
|
-
"@open-wc",
|
|
82
|
-
"prettier"
|
|
83
|
-
],
|
|
84
|
-
"plugins": [
|
|
85
|
-
"@typescript-eslint"
|
|
86
|
-
],
|
|
87
|
-
"rules": {
|
|
88
|
-
"no-unused-vars": "off",
|
|
89
|
-
"@typescript-eslint/no-unused-vars": [
|
|
90
|
-
"error"
|
|
91
|
-
],
|
|
92
|
-
"no-shadow": "off",
|
|
93
|
-
"@typescript-eslint/no-shadow": [
|
|
94
|
-
"error"
|
|
95
|
-
],
|
|
96
|
-
"class-methods-use-this": "off",
|
|
97
|
-
"import/no-unresolved": "off",
|
|
98
|
-
"import/extensions": [
|
|
99
|
-
"off",
|
|
100
|
-
"ignorePackages",
|
|
101
|
-
{
|
|
102
|
-
"js": "never",
|
|
103
|
-
"ts": "never"
|
|
104
|
-
}
|
|
105
|
-
],
|
|
106
|
-
"no-unsafe-optional-chaining": "warn",
|
|
107
|
-
"default-param-last": "warn"
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
"prettier": {
|
|
111
|
-
"singleQuote": true,
|
|
112
|
-
"arrowParens": "avoid"
|
|
113
|
-
},
|
|
114
|
-
"lint-staged": {
|
|
115
|
-
"*.ts": [
|
|
116
|
-
"eslint --fix",
|
|
117
|
-
"prettier --write"
|
|
118
|
-
]
|
|
119
|
-
}
|
|
120
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@internetarchive/collection-browser",
|
|
3
|
+
"description": "The Internet Archive Collection Browser.",
|
|
4
|
+
"license": "AGPL-3.0-only",
|
|
5
|
+
"author": "Internet Archive",
|
|
6
|
+
"version": "4.1.2-alpha1",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"module": "dist/index.js",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"start": "vite",
|
|
11
|
+
"prepare:ghpages": "rimraf ghpages && yarn run prepare && vite build",
|
|
12
|
+
"prepare": "rimraf dist && tsc && husky install",
|
|
13
|
+
"lint": "eslint . && prettier \"**/*.ts\" --check",
|
|
14
|
+
"format": "eslint . --fix && prettier \"**/*.ts\" --write",
|
|
15
|
+
"circular": "madge --circular --extensions ts .",
|
|
16
|
+
"test": "tsc && yarn run lint && yarn run circular && wtr --coverage",
|
|
17
|
+
"test:fast": "tsc && wtr --coverage",
|
|
18
|
+
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\"",
|
|
19
|
+
"deploy": "yarn run deploy:run -e $(git branch --show-current)",
|
|
20
|
+
"deploy:run": "yarn run prepare:ghpages && touch ghpages/.nojekyll && yarn run deploy:gh",
|
|
21
|
+
"deploy:gh": "gh-pages -t -d ghpages -m \"Build for $(git log --pretty=format:\"%h %an %ai %s\" -n1) [skip ci]\"",
|
|
22
|
+
"typecheck": "yarn tsc --noEmit"
|
|
23
|
+
},
|
|
24
|
+
"types": "dist/index.d.ts",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@a11y/focus-trap": "^1.0.5",
|
|
27
|
+
"@internetarchive/analytics-manager": "^0.1.4",
|
|
28
|
+
"@internetarchive/elements": "^0.2.2",
|
|
29
|
+
"@internetarchive/feature-feedback": "^1.0.0",
|
|
30
|
+
"@internetarchive/field-parsers": "^1.0.0",
|
|
31
|
+
"@internetarchive/histogram-date-range": "^1.4.1",
|
|
32
|
+
"@internetarchive/ia-dropdown": "^2.0.0",
|
|
33
|
+
"@internetarchive/iaux-item-metadata": "^1.0.5",
|
|
34
|
+
"@internetarchive/infinite-scroller": "^1.0.1",
|
|
35
|
+
"@internetarchive/modal-manager": "^2.0.5",
|
|
36
|
+
"@internetarchive/search-service": "^2.7.0",
|
|
37
|
+
"@internetarchive/shared-resize-observer": "^0.2.0",
|
|
38
|
+
"@lit/localize": "^0.12.2",
|
|
39
|
+
"dompurify": "^3.2.4",
|
|
40
|
+
"lit": "^2.8.0 || ^3.3.2",
|
|
41
|
+
"typescript-cookie": "^1.0.6"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@internetarchive/result-type": "^0.0.1",
|
|
45
|
+
"@open-wc/eslint-config": "^12.0.3",
|
|
46
|
+
"@open-wc/testing": "^4.0.0",
|
|
47
|
+
"@rollup/plugin-image": "^3.0.3",
|
|
48
|
+
"@types/dompurify": "^3.2.0",
|
|
49
|
+
"@types/mocha": "^10.0.10",
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "^8.27.0",
|
|
51
|
+
"@typescript-eslint/parser": "^8.27.0",
|
|
52
|
+
"@vitejs/plugin-basic-ssl": "^2.1.4",
|
|
53
|
+
"@web/dev-server": "^0.4.6",
|
|
54
|
+
"@web/dev-server-rollup": "^0.6.4",
|
|
55
|
+
"@web/test-runner": "^0.20.0",
|
|
56
|
+
"concurrently": "^9.1.2",
|
|
57
|
+
"eslint": "^9.22.0",
|
|
58
|
+
"eslint-config-prettier": "^10.1.1",
|
|
59
|
+
"eslint-plugin-html": "^8.1.2",
|
|
60
|
+
"eslint-plugin-import": "^2.31.0",
|
|
61
|
+
"eslint-plugin-lit": "^2.0.0",
|
|
62
|
+
"eslint-plugin-lit-a11y": "^4.1.4",
|
|
63
|
+
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
64
|
+
"eslint-plugin-wc": "^3.0.0",
|
|
65
|
+
"gh-pages": "^6.3.0",
|
|
66
|
+
"husky": "^9.1.7",
|
|
67
|
+
"madge": "^8.0.0",
|
|
68
|
+
"prettier": "^3.5.3",
|
|
69
|
+
"rimraf": "^6.0.1",
|
|
70
|
+
"sinon": "^19.0.4",
|
|
71
|
+
"tslib": "^2.8.1",
|
|
72
|
+
"typescript": "^5.8.2",
|
|
73
|
+
"vite": "^6.2.2"
|
|
74
|
+
},
|
|
75
|
+
"publishConfig": {
|
|
76
|
+
"access": "public"
|
|
77
|
+
},
|
|
78
|
+
"eslintConfig": {
|
|
79
|
+
"parser": "@typescript-eslint/parser",
|
|
80
|
+
"extends": [
|
|
81
|
+
"@open-wc",
|
|
82
|
+
"prettier"
|
|
83
|
+
],
|
|
84
|
+
"plugins": [
|
|
85
|
+
"@typescript-eslint"
|
|
86
|
+
],
|
|
87
|
+
"rules": {
|
|
88
|
+
"no-unused-vars": "off",
|
|
89
|
+
"@typescript-eslint/no-unused-vars": [
|
|
90
|
+
"error"
|
|
91
|
+
],
|
|
92
|
+
"no-shadow": "off",
|
|
93
|
+
"@typescript-eslint/no-shadow": [
|
|
94
|
+
"error"
|
|
95
|
+
],
|
|
96
|
+
"class-methods-use-this": "off",
|
|
97
|
+
"import/no-unresolved": "off",
|
|
98
|
+
"import/extensions": [
|
|
99
|
+
"off",
|
|
100
|
+
"ignorePackages",
|
|
101
|
+
{
|
|
102
|
+
"js": "never",
|
|
103
|
+
"ts": "never"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"no-unsafe-optional-chaining": "warn",
|
|
107
|
+
"default-param-last": "warn"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"prettier": {
|
|
111
|
+
"singleQuote": true,
|
|
112
|
+
"arrowParens": "avoid"
|
|
113
|
+
},
|
|
114
|
+
"lint-staged": {
|
|
115
|
+
"*.ts": [
|
|
116
|
+
"eslint --fix",
|
|
117
|
+
"prettier --write"
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
}
|
package/renovate.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": [
|
|
3
|
-
"config:base",
|
|
4
|
-
":preserveSemverRanges"
|
|
5
|
-
]
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": [
|
|
3
|
+
"config:base",
|
|
4
|
+
":preserveSemverRanges"
|
|
5
|
+
]
|
|
6
|
+
}
|
|
@@ -860,8 +860,12 @@ export class CollectionBrowser
|
|
|
860
860
|
let sortFieldAvailability = defaultSortAvailability;
|
|
861
861
|
|
|
862
862
|
// We adjust the available sort options for a couple of special cases...
|
|
863
|
-
if (
|
|
864
|
-
|
|
863
|
+
if (
|
|
864
|
+
this.withinCollection?.startsWith('fav-') ||
|
|
865
|
+
(this.profileElement as string) === 'favorites'
|
|
866
|
+
) {
|
|
867
|
+
// When viewing a fav- collection or the favorites profile tab,
|
|
868
|
+
// we include the Date Favorited option as the default
|
|
865
869
|
sortFieldAvailability = favoritesSortAvailability;
|
|
866
870
|
} else if (!this.withinCollection && this.searchType === SearchType.TV) {
|
|
867
871
|
// When viewing TV search results, we exclude several of the usual date sort options.
|