@internetarchive/ia-topnav 1.4.1 → 2.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 (68) hide show
  1. package/.prettierignore +1 -1
  2. package/LICENSE +661 -661
  3. package/README.md +147 -147
  4. package/demo/index.html +28 -28
  5. package/dist/src/data/menus.js +0 -2
  6. package/dist/src/data/menus.js.map +1 -1
  7. package/dist/src/ia-topnav.d.ts +7 -10
  8. package/dist/src/ia-topnav.js +95 -133
  9. package/dist/src/ia-topnav.js.map +1 -1
  10. package/dist/src/login-button.js +17 -17
  11. package/dist/src/login-button.js.map +1 -1
  12. package/dist/src/models.d.ts +0 -4
  13. package/dist/src/models.js.map +1 -1
  14. package/dist/src/primary-nav.d.ts +5 -4
  15. package/dist/src/primary-nav.js +98 -119
  16. package/dist/src/primary-nav.js.map +1 -1
  17. package/dist/src/styles/ia-topnav.js +82 -87
  18. package/dist/src/styles/ia-topnav.js.map +1 -1
  19. package/dist/src/styles/primary-nav.js +353 -308
  20. package/dist/src/styles/primary-nav.js.map +1 -1
  21. package/dist/test/ia-topnav.test.js +27 -69
  22. package/dist/test/ia-topnav.test.js.map +1 -1
  23. package/dist/test/primary-nav.test.js +38 -9
  24. package/dist/test/primary-nav.test.js.map +1 -1
  25. package/eslint.config.mjs +53 -53
  26. package/package.json +72 -72
  27. package/prettier.config.js +9 -9
  28. package/src/data/menus.ts +650 -652
  29. package/src/ia-topnav.ts +318 -366
  30. package/src/login-button.ts +78 -78
  31. package/src/models.ts +58 -63
  32. package/src/primary-nav.ts +277 -296
  33. package/src/styles/ia-topnav.ts +85 -90
  34. package/src/styles/primary-nav.ts +356 -311
  35. package/ssl/server.key +28 -28
  36. package/test/ia-topnav.test.ts +282 -343
  37. package/test/primary-nav.test.ts +135 -94
  38. package/tsconfig.json +31 -31
  39. package/web-dev-server.config.mjs +32 -32
  40. package/web-test-runner.config.mjs +41 -41
  41. package/dist/src/lib/location-handler.d.ts +0 -1
  42. package/dist/src/lib/location-handler.js +0 -5
  43. package/dist/src/lib/location-handler.js.map +0 -1
  44. package/dist/src/nav-search.d.ts +0 -19
  45. package/dist/src/nav-search.js +0 -127
  46. package/dist/src/nav-search.js.map +0 -1
  47. package/dist/src/search-menu.d.ts +0 -20
  48. package/dist/src/search-menu.js +0 -162
  49. package/dist/src/search-menu.js.map +0 -1
  50. package/dist/src/styles/nav-search.d.ts +0 -2
  51. package/dist/src/styles/nav-search.js +0 -136
  52. package/dist/src/styles/nav-search.js.map +0 -1
  53. package/dist/src/styles/search-menu.d.ts +0 -2
  54. package/dist/src/styles/search-menu.js +0 -118
  55. package/dist/src/styles/search-menu.js.map +0 -1
  56. package/dist/test/nav-search.test.d.ts +0 -1
  57. package/dist/test/nav-search.test.js +0 -47
  58. package/dist/test/nav-search.test.js.map +0 -1
  59. package/dist/test/search-menu.test.d.ts +0 -1
  60. package/dist/test/search-menu.test.js +0 -42
  61. package/dist/test/search-menu.test.js.map +0 -1
  62. package/src/lib/location-handler.ts +0 -5
  63. package/src/nav-search.ts +0 -117
  64. package/src/search-menu.ts +0 -156
  65. package/src/styles/nav-search.ts +0 -136
  66. package/src/styles/search-menu.ts +0 -118
  67. package/test/nav-search.test.ts +0 -70
  68. package/test/search-menu.test.ts +0 -58
package/package.json CHANGED
@@ -1,72 +1,72 @@
1
- {
2
- "name": "@internetarchive/ia-topnav",
3
- "version": "1.4.1",
4
- "description": "Top nav for Internet Archive",
5
- "license": "AGPL-3.0-only",
6
- "main": "dist/index.js",
7
- "module": "dist/index.js",
8
- "types": "dist/index.d.ts",
9
- "type": "module",
10
- "publishConfig": {
11
- "access": "public"
12
- },
13
- "scripts": {
14
- "start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
15
- "prepare": "rimraf dist && tsc && husky install",
16
- "build": "tsc",
17
- "lint": "eslint . && prettier \"**/*.ts\" --check",
18
- "format": "eslint . --fix && prettier \"**/*.ts\" --write",
19
- "circular": "madge --circular --extensions ts .",
20
- "test": "tsc && npm run lint && npm run circular && wtr --coverage",
21
- "test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\"",
22
- "ghpages:build": "rimraf ghpages && npm run prepare && vite build",
23
- "ghpages:publish": "npm run ghpages:prepare -e $(git branch --show-current)",
24
- "ghpages:prepare": "npm run ghpages:build && touch ghpages/.nojekyll && npm run ghpages:generate",
25
- "ghpages:generate": "gh-pages -t -d ghpages -m \"Build for $(git log --pretty=format:\"%h %an %ai %s\" -n1) [skip ci]\""
26
- },
27
- "dependencies": {
28
- "@internetarchive/ia-styles": "^1.0.0",
29
- "@internetarchive/ia-wayback-search": "^1.0.4",
30
- "lit": "^2.8.0"
31
- },
32
- "devDependencies": {
33
- "@open-wc/eslint-config": "^12.0.3",
34
- "@open-wc/testing": "^4.0.0",
35
- "@types/mocha": "^10.0.10",
36
- "@typescript-eslint/eslint-plugin": "^8.19.1",
37
- "@typescript-eslint/parser": "^8.19.1",
38
- "@web/dev-server": "^0.4.6",
39
- "@web/test-runner": "^0.20.0",
40
- "concurrently": "^9.1.2",
41
- "eslint": "^9.24.0",
42
- "eslint-config-prettier": "^10.1.1",
43
- "eslint-plugin-html": "^8.1.2",
44
- "eslint-plugin-import": "^2.31.0",
45
- "eslint-plugin-lit": "^2.0.0",
46
- "eslint-plugin-lit-a11y": "^4.1.4",
47
- "eslint-plugin-no-only-tests": "^3.3.0",
48
- "eslint-plugin-wc": "^3.0.0",
49
- "gh-pages": "^6.3.0",
50
- "husky": "^9.1.7",
51
- "madge": "^8.0.0",
52
- "prettier": "^3.4.2",
53
- "rimraf": "^6.0.1",
54
- "sinon": "^20.0.0",
55
- "ts-lit-plugin": "^2.0.2",
56
- "tslib": "^2.8.1",
57
- "typescript": "^5.7.2",
58
- "vite": "^6.0.7"
59
- },
60
- "husky": {
61
- "hooks": {
62
- "pre-commit": "lint-staged"
63
- }
64
- },
65
- "lint-staged": {
66
- "*.ts": [
67
- "eslint --fix",
68
- "prettier --write",
69
- "git add"
70
- ]
71
- }
72
- }
1
+ {
2
+ "name": "@internetarchive/ia-topnav",
3
+ "version": "2.0.0",
4
+ "description": "Top nav for Internet Archive",
5
+ "license": "AGPL-3.0-only",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "type": "module",
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "scripts": {
14
+ "start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
15
+ "prepare": "rimraf dist && tsc && husky install",
16
+ "build": "tsc",
17
+ "lint": "eslint . && prettier \"**/*.ts\" --check",
18
+ "format": "eslint . --fix && prettier \"**/*.ts\" --write",
19
+ "circular": "madge --circular --extensions ts .",
20
+ "test": "tsc && npm run lint && npm run circular && wtr --coverage",
21
+ "test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\"",
22
+ "ghpages:build": "rimraf ghpages && npm run prepare && vite build",
23
+ "ghpages:publish": "npm run ghpages:prepare -e $(git branch --show-current)",
24
+ "ghpages:prepare": "npm run ghpages:build && touch ghpages/.nojekyll && npm run ghpages:generate",
25
+ "ghpages:generate": "gh-pages -t -d ghpages -m \"Build for $(git log --pretty=format:\"%h %an %ai %s\" -n1) [skip ci]\""
26
+ },
27
+ "dependencies": {
28
+ "@internetarchive/ia-styles": "^1.0.0",
29
+ "@internetarchive/ia-wayback-search": "^1.0.4",
30
+ "lit": "^2.8.0"
31
+ },
32
+ "devDependencies": {
33
+ "@open-wc/eslint-config": "^12.0.3",
34
+ "@open-wc/testing": "^4.0.0",
35
+ "@types/mocha": "^10.0.10",
36
+ "@typescript-eslint/eslint-plugin": "^8.19.1",
37
+ "@typescript-eslint/parser": "^8.19.1",
38
+ "@web/dev-server": "^0.4.6",
39
+ "@web/test-runner": "^0.20.0",
40
+ "concurrently": "^9.1.2",
41
+ "eslint": "^9.24.0",
42
+ "eslint-config-prettier": "^10.1.1",
43
+ "eslint-plugin-html": "^8.1.2",
44
+ "eslint-plugin-import": "^2.31.0",
45
+ "eslint-plugin-lit": "^2.0.0",
46
+ "eslint-plugin-lit-a11y": "^4.1.4",
47
+ "eslint-plugin-no-only-tests": "^3.3.0",
48
+ "eslint-plugin-wc": "^3.0.0",
49
+ "gh-pages": "^6.3.0",
50
+ "husky": "^9.1.7",
51
+ "madge": "^8.0.0",
52
+ "prettier": "^3.4.2",
53
+ "rimraf": "^6.0.1",
54
+ "sinon": "^20.0.0",
55
+ "ts-lit-plugin": "^2.0.2",
56
+ "tslib": "^2.8.1",
57
+ "typescript": "^5.7.2",
58
+ "vite": "^6.0.7"
59
+ },
60
+ "husky": {
61
+ "hooks": {
62
+ "pre-commit": "lint-staged"
63
+ }
64
+ },
65
+ "lint-staged": {
66
+ "*.ts": [
67
+ "eslint --fix",
68
+ "prettier --write",
69
+ "git add"
70
+ ]
71
+ }
72
+ }
@@ -1,9 +1,9 @@
1
- /**
2
- * @see https://prettier.io/docs/configuration
3
- * @type {import("prettier").Config}
4
- */
5
- const config = {
6
- singleQuote: true,
7
- };
8
-
9
- export default config;
1
+ /**
2
+ * @see https://prettier.io/docs/configuration
3
+ * @type {import("prettier").Config}
4
+ */
5
+ const config = {
6
+ singleQuote: true,
7
+ };
8
+
9
+ export default config;