@internetarchive/ia-topnav 1.3.6 → 1.3.7-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 (85) hide show
  1. package/.eslintrc +16 -16
  2. package/LICENSE +661 -661
  3. package/README.md +147 -147
  4. package/index.d.ts +109 -109
  5. package/index.js +3 -3
  6. package/package.json +61 -61
  7. package/src/assets/img/hamburger.js +38 -38
  8. package/src/assets/img/ia-icon.js +33 -33
  9. package/src/assets/img/icon-audio.js +23 -23
  10. package/src/assets/img/icon-close.js +16 -16
  11. package/src/assets/img/icon-donate-unpadded.js +16 -16
  12. package/src/assets/img/icon-donate.js +15 -15
  13. package/src/assets/img/icon-ellipses.js +15 -15
  14. package/src/assets/img/icon-ia-logo.js +22 -22
  15. package/src/assets/img/icon-images.js +15 -15
  16. package/src/assets/img/icon-search.js +15 -15
  17. package/src/assets/img/icon-software.js +15 -15
  18. package/src/assets/img/icon-texts.js +15 -15
  19. package/src/assets/img/icon-upload-unpadded.js +14 -14
  20. package/src/assets/img/icon-upload.js +15 -15
  21. package/src/assets/img/icon-user.js +15 -15
  22. package/src/assets/img/icon-video.js +15 -15
  23. package/src/assets/img/icon-web.js +15 -15
  24. package/src/assets/img/icon.js +18 -18
  25. package/src/assets/img/icons.js +33 -33
  26. package/src/assets/img/wordmark-stacked.js +13 -13
  27. package/src/data/menus.js +646 -646
  28. package/src/desktop-subnav.js +45 -45
  29. package/src/dropdown-menu.js +110 -109
  30. package/src/ia-topnav.js +324 -314
  31. package/src/lib/formatUrl.js +1 -1
  32. package/src/lib/keyboard-navigation.js +128 -0
  33. package/src/lib/location-handler.js +5 -5
  34. package/src/lib/query-handler.js +7 -7
  35. package/src/lib/toSentenceCase.js +8 -8
  36. package/src/login-button.js +79 -79
  37. package/src/media-button.js +113 -113
  38. package/src/media-menu.js +154 -133
  39. package/src/media-slider.js +118 -104
  40. package/src/media-subnav.js +112 -112
  41. package/src/more-slider.js +33 -33
  42. package/src/nav-search.js +111 -117
  43. package/src/primary-nav.js +258 -224
  44. package/src/save-page-form.js +59 -59
  45. package/src/search-menu.js +145 -115
  46. package/src/signed-out-dropdown.js +10 -10
  47. package/src/styles/base.js +48 -48
  48. package/src/styles/desktop-subnav.js +37 -37
  49. package/src/styles/dropdown-menu.js +168 -166
  50. package/src/styles/ia-topnav.js +87 -87
  51. package/src/styles/login-button.js +82 -79
  52. package/src/styles/media-button.js +156 -156
  53. package/src/styles/media-menu.js +66 -70
  54. package/src/styles/media-slider.js +81 -81
  55. package/src/styles/media-subnav.js +156 -156
  56. package/src/styles/more-slider.js +15 -15
  57. package/src/styles/nav-search.js +136 -136
  58. package/src/styles/primary-nav.js +311 -300
  59. package/src/styles/save-page-form.js +54 -54
  60. package/src/styles/search-menu.js +105 -99
  61. package/src/styles/signed-out-dropdown.js +31 -31
  62. package/src/styles/user-menu.js +31 -31
  63. package/src/styles/wayback-search.js +48 -48
  64. package/src/styles/wayback-slider.js +30 -30
  65. package/src/tracked-element.js +29 -27
  66. package/src/user-menu.js +56 -42
  67. package/src/wayback-search.js +18 -18
  68. package/src/wayback-slider.js +87 -87
  69. package/test/assets/img/hamburger.test.js +15 -15
  70. package/test/assets/img/user.test.js +15 -15
  71. package/test/data/menus.test.js +19 -19
  72. package/test/dropdown-menu.test.js +25 -25
  73. package/test/ia-icon.test.js +13 -13
  74. package/test/ia-topnav.test.js +273 -273
  75. package/test/login-button.test.js +15 -15
  76. package/test/media-button.test.js +19 -19
  77. package/test/media-menu.test.js +40 -40
  78. package/test/media-slider.test.js +57 -57
  79. package/test/more-slider.test.js +13 -13
  80. package/test/nav-search.test.js +61 -61
  81. package/test/primary-nav.test.js +82 -82
  82. package/test/save-page-form.test.js +35 -35
  83. package/test/search-menu.test.js +49 -49
  84. package/test/user-menu.test.js +33 -33
  85. package/test/wayback-slider.test.js +80 -80
package/README.md CHANGED
@@ -1,147 +1,147 @@
1
- # The top navigation menu component for archive.org
2
-
3
- ## Update guide
4
- https://git.archive.org/www/offshoot/-/blob/main/guides/update-top-nav.md
5
- ## Installation
6
-
7
- ```bash
8
- yarn add @internetarchive/ia-topnav
9
- ```
10
-
11
- ## Usage
12
-
13
- @see [www/index.html](www/index.html) for the simplest example with all the defaults
14
-
15
- * Demo app is in another directory: `/www/index.html`
16
- * `npm|yarn start` - runs local server in Demo directory which is in `/www` folder
17
- * you can also just use your preferred server
18
- * open demo: `http://localhost:8000/www/index.html`
19
-
20
- It shows a dynamic change of the logged in user name -- and how it will re-paint the menus.
21
-
22
-
23
- ```js
24
- // ia-top-nav.js
25
- import IATopNav from '@internetarchive/ia-topnav';
26
- export default IATopNav;
27
- ```
28
-
29
- ```html
30
- <!-- index.html -->
31
- <script type="module">
32
- import './ia-topnav.js';
33
- </script>
34
-
35
- <style>
36
- /* Defaults */
37
- ia-topnav {
38
- --white: #fff;
39
- --grey13: #222;
40
- --grey20: #333;
41
- --grey40: #666;
42
- --grey28: #474747;
43
- --grey60: #999;
44
- --grey66: #aaa;
45
- --grey80: #ccc;
46
- --errorYellow: #ffcd27;
47
-
48
- --linkColor: #428bca;
49
- --linkHoverColor: var(--white);
50
- --subnavLinkColor: var(--grey66);
51
- --primaryTextColor: var(--white);
52
- --inverseTextColor: var(--grey20);
53
- --lightTextColor: var(--grey60);
54
- --activeColor: var(--white);
55
- --activeButtonBg: var(--grey20);
56
- --iconFill: var(--grey60);
57
-
58
- --searchActiveBg: var(--grey20);
59
- --searchActiveInputBg: var(--white);
60
- --searchMenuBg: var(--grey20);
61
- --desktopSearchIconFill: var(--grey20);
62
-
63
- --mediaMenuBg: var(--grey13);
64
- --mediaLabelDesktopColor: var(--grey60);
65
- --activeDesktopMenuIcon: var(--grey28);
66
-
67
- --mediaSliderBg: var(--grey20);
68
- --mediaSliderDesktopBg: var(--grey28);
69
-
70
- --primaryNavBg: var(--grey13);
71
- --primaryNavBottomBorder: var(--grey20);
72
-
73
- --desktopSubnavBg: var(--grey20);
74
-
75
- --dropdownMenuBg: var(--grey20);
76
- --dropdownMenuInfoItem: var(--grey60);
77
- --dropdownMenuDivider: var(--grey40);
78
-
79
- --loginTextColor: var(--grey60);
80
-
81
- --themeFontFamily: 'Helvetica Neue', Helvetica, Arial, sans-serif;
82
- --logoWidthTablet: 263px;
83
-
84
- --savePageSubmitBg: var(--grey13);
85
- --savePageSubmitText: var(--white);
86
- --savePageInputBorder: var(--grey60);
87
- --savePageErrorText: var(--errorYellow);
88
-
89
- --topOffset: -1500px;
90
- }
91
- </style>
92
-
93
- <!--
94
- `baseHost` is the navigation base so leave emtpy for relative links
95
- `mediaBaseHost` is the base host for media like the profile picture if it's not relative
96
-
97
- NOTE:
98
- When passing in the `searchQuery` attribute from HTML, not LitElement bindings,
99
- you must base64 the value to account for any special characters.
100
- -->
101
- <ia-topnav
102
- baseHost="https://archive.org"
103
- mediaBaseHost="https://archive.org"
104
- hideSearch=${true}
105
- username="shaneriley"
106
- screenName="long_screen_name_that_gets_truncated"
107
- searchQuery="J2Zvbyc="
108
- ></ia-topnav>
109
- ```
110
-
111
-
112
- **Menus object:**
113
-
114
- Please see [src/data/menus.js](the menu objects) for our valid `menus` property.
115
-
116
- # Development
117
-
118
- ## Prerequisite
119
-
120
- ```bash
121
- yarn install
122
- ```
123
-
124
- ## Start Development Server
125
-
126
- ```bash
127
- yarn start // start development server and typescript compiler
128
- ```
129
- then open demo - http://localhost:8000/www/index.html
130
-
131
- ## Testing
132
-
133
- ```bash
134
- yarn test
135
- ```
136
-
137
- ## Testing via browserstack
138
-
139
- ```bash
140
- yarn test:bs
141
- ```
142
-
143
- ## Linting
144
-
145
- ```bash
146
- yarn lint
147
- ```
1
+ # The top navigation menu component for archive.org
2
+
3
+ ## Update guide
4
+ https://git.archive.org/www/offshoot/-/blob/main/guides/update-top-nav.md
5
+ ## Installation
6
+
7
+ ```bash
8
+ yarn add @internetarchive/ia-topnav
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ @see [www/index.html](www/index.html) for the simplest example with all the defaults
14
+
15
+ * Demo app is in another directory: `/www/index.html`
16
+ * `npm|yarn start` - runs local server in Demo directory which is in `/www` folder
17
+ * you can also just use your preferred server
18
+ * open demo: `http://localhost:8000/www/index.html`
19
+
20
+ It shows a dynamic change of the logged in user name -- and how it will re-paint the menus.
21
+
22
+
23
+ ```js
24
+ // ia-top-nav.js
25
+ import IATopNav from '@internetarchive/ia-topnav';
26
+ export default IATopNav;
27
+ ```
28
+
29
+ ```html
30
+ <!-- index.html -->
31
+ <script type="module">
32
+ import './ia-topnav.js';
33
+ </script>
34
+
35
+ <style>
36
+ /* Defaults */
37
+ ia-topnav {
38
+ --white: #fff;
39
+ --grey13: #222;
40
+ --grey20: #333;
41
+ --grey40: #666;
42
+ --grey28: #474747;
43
+ --grey60: #999;
44
+ --grey66: #aaa;
45
+ --grey80: #ccc;
46
+ --errorYellow: #ffcd27;
47
+
48
+ --linkColor: #428bca;
49
+ --linkHoverColor: var(--white);
50
+ --subnavLinkColor: var(--grey66);
51
+ --primaryTextColor: var(--white);
52
+ --inverseTextColor: var(--grey20);
53
+ --lightTextColor: var(--grey60);
54
+ --activeColor: var(--white);
55
+ --activeButtonBg: var(--grey20);
56
+ --iconFill: var(--grey60);
57
+
58
+ --searchActiveBg: var(--grey20);
59
+ --searchActiveInputBg: var(--white);
60
+ --searchMenuBg: var(--grey20);
61
+ --desktopSearchIconFill: var(--grey20);
62
+
63
+ --mediaMenuBg: var(--grey13);
64
+ --mediaLabelDesktopColor: var(--grey60);
65
+ --activeDesktopMenuIcon: var(--grey28);
66
+
67
+ --mediaSliderBg: var(--grey20);
68
+ --mediaSliderDesktopBg: var(--grey28);
69
+
70
+ --primaryNavBg: var(--grey13);
71
+ --primaryNavBottomBorder: var(--grey20);
72
+
73
+ --desktopSubnavBg: var(--grey20);
74
+
75
+ --dropdownMenuBg: var(--grey20);
76
+ --dropdownMenuInfoItem: var(--grey60);
77
+ --dropdownMenuDivider: var(--grey40);
78
+
79
+ --loginTextColor: var(--grey60);
80
+
81
+ --themeFontFamily: 'Helvetica Neue', Helvetica, Arial, sans-serif;
82
+ --logoWidthTablet: 263px;
83
+
84
+ --savePageSubmitBg: var(--grey13);
85
+ --savePageSubmitText: var(--white);
86
+ --savePageInputBorder: var(--grey60);
87
+ --savePageErrorText: var(--errorYellow);
88
+
89
+ --topOffset: -1500px;
90
+ }
91
+ </style>
92
+
93
+ <!--
94
+ `baseHost` is the navigation base so leave emtpy for relative links
95
+ `mediaBaseHost` is the base host for media like the profile picture if it's not relative
96
+
97
+ NOTE:
98
+ When passing in the `searchQuery` attribute from HTML, not LitElement bindings,
99
+ you must base64 the value to account for any special characters.
100
+ -->
101
+ <ia-topnav
102
+ baseHost="https://archive.org"
103
+ mediaBaseHost="https://archive.org"
104
+ hideSearch=${true}
105
+ username="shaneriley"
106
+ screenName="long_screen_name_that_gets_truncated"
107
+ searchQuery="J2Zvbyc="
108
+ ></ia-topnav>
109
+ ```
110
+
111
+
112
+ **Menus object:**
113
+
114
+ Please see [src/data/menus.js](the menu objects) for our valid `menus` property.
115
+
116
+ # Development
117
+
118
+ ## Prerequisite
119
+
120
+ ```bash
121
+ yarn install
122
+ ```
123
+
124
+ ## Start Development Server
125
+
126
+ ```bash
127
+ yarn start // start development server and typescript compiler
128
+ ```
129
+ then open demo - http://localhost:8000/www/index.html
130
+
131
+ ## Testing
132
+
133
+ ```bash
134
+ yarn test
135
+ ```
136
+
137
+ ## Testing via browserstack
138
+
139
+ ```bash
140
+ yarn test:bs
141
+ ```
142
+
143
+ ## Linting
144
+
145
+ ```bash
146
+ yarn lint
147
+ ```
package/index.d.ts CHANGED
@@ -1,109 +1,109 @@
1
- import { LitElement } from 'lit';
2
-
3
- export interface IATopNavConfig {
4
- /**
5
- * Google Analytics event category
6
- */
7
- eventCategory: string;
8
-
9
- /**
10
- * Copy to display for number of pages archived at the top of the Wayback search form
11
- *
12
- * ie. "425 billion"
13
- */
14
- waybackPagesArchived: string;
15
-
16
- /**
17
- * Array of strings representing the values of options that should be hidden from search options
18
- */
19
- hiddenSearchOptions: [];
20
-
21
- /**
22
- * Map from dropdown item ids to any callout text that should be applied beside them
23
- */
24
- callouts?: Record<string, string>;
25
- }
26
-
27
- export interface IATopNavLink {
28
- /**
29
- * Link title
30
- */
31
- title: string;
32
-
33
- /**
34
- * Link url
35
- */
36
- url?: string;
37
- }
38
-
39
- export interface IATopNavIconLink extends IATopNavLink {
40
- /**
41
- * Icon URL
42
- */
43
- icon: string;
44
- }
45
-
46
- export interface IATopNavAnalyticsLink extends IATopNavLink {
47
- /**
48
- * Google analytics event name
49
- */
50
- analyticsEvent: string;
51
- }
52
-
53
- export interface IATopNavExternalLink extends IATopNavLink {
54
- /**
55
- * Is the link external or not
56
- */
57
- external: boolean;
58
- }
59
-
60
- export interface IATopNavMediaMenu {
61
- heading: string;
62
- iconLinks: IATopNavIconLink[];
63
- featuredLinks: IATopNavLink[];
64
- links: IATopNavLink[];
65
- }
66
-
67
- export interface IATopNavWaybackMenuConfig {
68
- mobileAppsLinks: IATopNavExternalLink[];
69
- browserExtensionsLinks: IATopNavExternalLink[];
70
- archiveItLinks: IATopNavExternalLink[];
71
- }
72
-
73
- export interface IATopNavMenuConfig {
74
- audio: IATopNavMediaMenu;
75
- images: IATopNavMediaMenu;
76
- more: IATopNavLink[];
77
- signedOut: IATopNavAnalyticsLink[];
78
- software: IATopNavMediaMenu;
79
- texts: IATopNavMediaMenu;
80
- user: IATopNavAnalyticsLink[];
81
- video: IATopNavMediaMenu;
82
- web: IATopNavWaybackMenuConfig;
83
- }
84
-
85
- export type IATopNavSecondIdentitySlotMode = 'allow' | '';
86
-
87
- export declare class IATopNav extends LitElement {
88
- localLinks?: boolean;
89
- baseHost?: string;
90
- config?: IATopNavConfig;
91
- hideSearch?: boolean;
92
- mediaBaseHost?: string;
93
- menuSliderOpen?: boolean;
94
- openMenu?: string;
95
- screenName?: string;
96
- searchIn?: string;
97
- searchQuery?: string;
98
- secondIdentitySlotMode?: IATopNavSecondIdentitySlotMode;
99
- selectedMenuOption?: string;
100
- username?: string;
101
- userProfileImagePath?: string;
102
- menus: IATopNavMenuConfig;
103
- /**
104
- * Copy to display for number of pages archived at the top of the Wayback search form
105
- *
106
- * ie. "425 billion"
107
- */
108
- waybackPagesArchived?: string;
109
- }
1
+ import { LitElement } from 'lit';
2
+
3
+ export interface IATopNavConfig {
4
+ /**
5
+ * Google Analytics event category
6
+ */
7
+ eventCategory: string;
8
+
9
+ /**
10
+ * Copy to display for number of pages archived at the top of the Wayback search form
11
+ *
12
+ * ie. "425 billion"
13
+ */
14
+ waybackPagesArchived: string;
15
+
16
+ /**
17
+ * Array of strings representing the values of options that should be hidden from search options
18
+ */
19
+ hiddenSearchOptions: [];
20
+
21
+ /**
22
+ * Map from dropdown item ids to any callout text that should be applied beside them
23
+ */
24
+ callouts?: Record<string, string>;
25
+ }
26
+
27
+ export interface IATopNavLink {
28
+ /**
29
+ * Link title
30
+ */
31
+ title: string;
32
+
33
+ /**
34
+ * Link url
35
+ */
36
+ url?: string;
37
+ }
38
+
39
+ export interface IATopNavIconLink extends IATopNavLink {
40
+ /**
41
+ * Icon URL
42
+ */
43
+ icon: string;
44
+ }
45
+
46
+ export interface IATopNavAnalyticsLink extends IATopNavLink {
47
+ /**
48
+ * Google analytics event name
49
+ */
50
+ analyticsEvent: string;
51
+ }
52
+
53
+ export interface IATopNavExternalLink extends IATopNavLink {
54
+ /**
55
+ * Is the link external or not
56
+ */
57
+ external: boolean;
58
+ }
59
+
60
+ export interface IATopNavMediaMenu {
61
+ heading: string;
62
+ iconLinks: IATopNavIconLink[];
63
+ featuredLinks: IATopNavLink[];
64
+ links: IATopNavLink[];
65
+ }
66
+
67
+ export interface IATopNavWaybackMenuConfig {
68
+ mobileAppsLinks: IATopNavExternalLink[];
69
+ browserExtensionsLinks: IATopNavExternalLink[];
70
+ archiveItLinks: IATopNavExternalLink[];
71
+ }
72
+
73
+ export interface IATopNavMenuConfig {
74
+ audio: IATopNavMediaMenu;
75
+ images: IATopNavMediaMenu;
76
+ more: IATopNavLink[];
77
+ signedOut: IATopNavAnalyticsLink[];
78
+ software: IATopNavMediaMenu;
79
+ texts: IATopNavMediaMenu;
80
+ user: IATopNavAnalyticsLink[];
81
+ video: IATopNavMediaMenu;
82
+ web: IATopNavWaybackMenuConfig;
83
+ }
84
+
85
+ export type IATopNavSecondIdentitySlotMode = 'allow' | '';
86
+
87
+ export declare class IATopNav extends LitElement {
88
+ localLinks?: boolean;
89
+ baseHost?: string;
90
+ config?: IATopNavConfig;
91
+ hideSearch?: boolean;
92
+ mediaBaseHost?: string;
93
+ menuSliderOpen?: boolean;
94
+ openMenu?: string;
95
+ screenName?: string;
96
+ searchIn?: string;
97
+ searchQuery?: string;
98
+ secondIdentitySlotMode?: IATopNavSecondIdentitySlotMode;
99
+ selectedMenuOption?: string;
100
+ username?: string;
101
+ userProfileImagePath?: string;
102
+ menus: IATopNavMenuConfig;
103
+ /**
104
+ * Copy to display for number of pages archived at the top of the Wayback search form
105
+ *
106
+ * ie. "425 billion"
107
+ */
108
+ waybackPagesArchived?: string;
109
+ }
package/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import IATopNav from './src/ia-topnav';
2
-
3
- export default IATopNav;
1
+ import IATopNav from './src/ia-topnav';
2
+
3
+ export default IATopNav;
package/package.json CHANGED
@@ -1,61 +1,61 @@
1
- {
2
- "name": "@internetarchive/ia-topnav",
3
- "version": "1.3.6",
4
- "description": "Top nav for Internet Archive",
5
- "license": "AGPL-3.0-only",
6
- "main": "index.js",
7
- "module": "index.js",
8
- "types": "index.d.ts",
9
- "type": "module",
10
- "publishConfig": {
11
- "access": "public"
12
- },
13
- "scripts": {
14
- "start": "cd ../../www/ && web-dev-server --app-index ./index.html --node-resolve --watch --open",
15
- "lint:eslint": "eslint --ext .js . --ignore-path .gitignore",
16
- "format:eslint": "eslint --ext .js . --fix --ignore-path .gitignore",
17
- "lint:prettier": "prettier \"**/*.js\" --check --ignore-path .gitignore",
18
- "format:prettier": "prettier \"**/*.js\" --write --ignore-path .gitignore",
19
- "lint": "npm run lint:eslint",
20
- "format": "npm run format:eslint && npm run format:prettier",
21
- "test": "ulimit -v unlimited; web-test-runner 'test/**/*.test.js' --node-resolve --coverage --puppeteer"
22
- },
23
- "dependencies": {
24
- "@internetarchive/ia-wayback-search": "0.2.5"
25
- },
26
- "devDependencies": {
27
- "@open-wc/demoing-storybook": "^2.4.7",
28
- "@open-wc/eslint-config": "^8.0.2",
29
- "@open-wc/polyfills-loader": "^0.3.3",
30
- "@open-wc/prettier-config": "^1.1.0",
31
- "@open-wc/testing": "^3.1.6",
32
- "@storybook/react": "^6.5.12",
33
- "@web/dev-server": "^0.3.6",
34
- "@web/test-runner": "^0.14.0",
35
- "@web/test-runner-puppeteer": "^0.10.5",
36
- "eslint": "^8.24.0",
37
- "eslint-plugin-lit": "^1.6.1",
38
- "gulp": "^4.0.2",
39
- "husky": "^8.0.1",
40
- "lint-staged": "^13.0.3",
41
- "sinon": "^14.0.1"
42
- },
43
- "husky": {
44
- "hooks": {
45
- "pre-commit": "lint-staged"
46
- }
47
- },
48
- "lint-staged": {
49
- "*.js": [
50
- "eslint --fix",
51
- "git add"
52
- ]
53
- },
54
- "eslintConfig": {
55
- "extends": [
56
- "@open-wc/eslint-config",
57
- "eslint-config-prettier"
58
- ]
59
- },
60
- "prettier": "@open-wc/prettier-config"
61
- }
1
+ {
2
+ "name": "@internetarchive/ia-topnav",
3
+ "version": "1.3.7-0",
4
+ "description": "Top nav for Internet Archive",
5
+ "license": "AGPL-3.0-only",
6
+ "main": "index.js",
7
+ "module": "index.js",
8
+ "types": "index.d.ts",
9
+ "type": "module",
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "scripts": {
14
+ "start": "cd ../../www/ && web-dev-server --app-index ./index.html --node-resolve --watch --open",
15
+ "lint:eslint": "eslint --ext .js . --ignore-path .gitignore",
16
+ "format:eslint": "eslint --ext .js . --fix --ignore-path .gitignore",
17
+ "lint:prettier": "prettier \"**/*.js\" --check --ignore-path .gitignore",
18
+ "format:prettier": "prettier \"**/*.js\" --write --ignore-path .gitignore",
19
+ "lint": "npm run lint:eslint",
20
+ "format": "npm run format:eslint && npm run format:prettier",
21
+ "test": "ulimit -v unlimited; web-test-runner 'test/**/*.test.js' --node-resolve --coverage --puppeteer"
22
+ },
23
+ "dependencies": {
24
+ "@internetarchive/ia-wayback-search": "0.2.5"
25
+ },
26
+ "devDependencies": {
27
+ "@open-wc/demoing-storybook": "^2.4.7",
28
+ "@open-wc/eslint-config": "^8.0.2",
29
+ "@open-wc/polyfills-loader": "^0.3.3",
30
+ "@open-wc/prettier-config": "^1.1.0",
31
+ "@open-wc/testing": "^3.1.6",
32
+ "@storybook/react": "^6.5.12",
33
+ "@web/dev-server": "^0.3.6",
34
+ "@web/test-runner": "^0.14.0",
35
+ "@web/test-runner-puppeteer": "^0.10.5",
36
+ "eslint": "^8.24.0",
37
+ "eslint-plugin-lit": "^1.6.1",
38
+ "gulp": "^4.0.2",
39
+ "husky": "^8.0.1",
40
+ "lint-staged": "^13.0.3",
41
+ "sinon": "^14.0.1"
42
+ },
43
+ "husky": {
44
+ "hooks": {
45
+ "pre-commit": "lint-staged"
46
+ }
47
+ },
48
+ "lint-staged": {
49
+ "*.js": [
50
+ "eslint --fix",
51
+ "git add"
52
+ ]
53
+ },
54
+ "eslintConfig": {
55
+ "extends": [
56
+ "@open-wc/eslint-config",
57
+ "eslint-config-prettier"
58
+ ]
59
+ },
60
+ "prettier": "@open-wc/prettier-config"
61
+ }