@internetarchive/ia-topnav 2.0.2-alpha2 → 2.1.0-alpha-webdev8660.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.
- package/.prettierignore +1 -1
- package/LICENSE +661 -661
- package/README.md +147 -147
- package/demo/index.html +28 -28
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/src/data/menus.js +1 -1
- package/dist/src/data/menus.js.map +1 -1
- package/dist/src/models.d.ts +9 -0
- package/dist/src/models.js +9 -1
- package/dist/src/models.js.map +1 -1
- package/dist/src/styles/base.js +2 -1
- package/dist/src/styles/base.js.map +1 -1
- package/dist/src/styles/dropdown-menu.js +2 -1
- package/dist/src/styles/dropdown-menu.js.map +1 -1
- package/dist/src/styles/ia-topnav.js +2 -1
- package/dist/src/styles/ia-topnav.js.map +1 -1
- package/dist/src/styles/login-button.js +2 -1
- package/dist/src/styles/login-button.js.map +1 -1
- package/dist/src/styles/media-button.js +2 -1
- package/dist/src/styles/media-button.js.map +1 -1
- package/dist/src/styles/media-menu.js +3 -2
- package/dist/src/styles/media-menu.js.map +1 -1
- package/dist/src/styles/media-slider.js +3 -2
- package/dist/src/styles/media-slider.js.map +1 -1
- package/dist/src/styles/media-subnav.js +2 -1
- package/dist/src/styles/media-subnav.js.map +1 -1
- package/dist/src/styles/primary-nav.js +4 -3
- package/dist/src/styles/primary-nav.js.map +1 -1
- package/dist/src/styles/save-page-form.js +2 -1
- package/dist/src/styles/save-page-form.js.map +1 -1
- package/dist/src/styles/wayback-search.js +2 -1
- package/dist/src/styles/wayback-search.js.map +1 -1
- package/dist/src/styles/wayback-slider.js +2 -1
- package/dist/src/styles/wayback-slider.js.map +1 -1
- package/eslint.config.mjs +53 -53
- package/index.ts +2 -2
- package/package.json +72 -72
- package/prettier.config.js +9 -9
- package/src/data/menus.ts +1 -1
- package/src/models.ts +10 -0
- package/src/styles/base.ts +2 -1
- package/src/styles/dropdown-menu.ts +2 -1
- package/src/styles/ia-topnav.ts +2 -1
- package/src/styles/login-button.ts +2 -1
- package/src/styles/media-button.ts +2 -1
- package/src/styles/media-menu.ts +3 -2
- package/src/styles/media-slider.ts +3 -2
- package/src/styles/media-subnav.ts +2 -1
- package/src/styles/primary-nav.ts +4 -3
- package/src/styles/save-page-form.ts +2 -1
- package/src/styles/wayback-search.ts +2 -1
- package/src/styles/wayback-slider.ts +2 -1
- package/ssl/server.key +28 -28
- package/tsconfig.json +31 -31
- package/web-dev-server.config.mjs +32 -32
- package/web-test-runner.config.mjs +41 -41
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
export default css `
|
|
3
4
|
:host {
|
|
4
5
|
--white: #fff;
|
|
@@ -76,7 +77,7 @@ export default css `
|
|
|
76
77
|
z-index: 4;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
@media (max-width:
|
|
80
|
+
@media (max-width: ${TOPNAV_MOBILE_BREAKPOINT - 1}px) {
|
|
80
81
|
desktop-subnav {
|
|
81
82
|
display: none;
|
|
82
83
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ia-topnav.js","sourceRoot":"","sources":["../../../src/styles/ia-topnav.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"ia-topnav.js","sourceRoot":"","sources":["../../../src/styles/ia-topnav.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA6EK,wBAAwB,GAAG,CAAC;;;;;CAKlD,CAAC","sourcesContent":["import { css } from 'lit';\nimport { TOPNAV_MOBILE_BREAKPOINT } from '../models';\n\nexport default css`\n :host {\n --white: #fff;\n --grey13: #222;\n --grey20: #333;\n --grey40: #666;\n --grey28: #474747;\n --grey60: #999;\n --grey66: #aaa;\n --grey80: #ccc;\n --greya0: #a0a0a0;\n --grey6f: #6f6f6f;\n --errorYellow: #ffcd27;\n\n --linkColor: #4b64ff;\n --linkHoverColor: var(--white);\n --subnavLinkColor: var(--grey66);\n --primaryTextColor: var(--white);\n --inverseTextColor: var(--grey20);\n --lightTextColor: var(--grey60);\n --activeColor: var(--white);\n --activeButtonBg: var(--grey20);\n --iconFill: var(--grey60);\n\n --mediaMenuBg: var(--grey13);\n --mediaLabelDesktopColor: var(--grey60);\n --activeDesktopMenuIcon: var(--grey28);\n\n --mediaSliderBg: var(--grey20);\n --mediaSliderDesktopBg: var(--grey28);\n\n --primaryNavBg: var(--grey13);\n --primaryNavBottomBorder: var(--grey20);\n\n --desktopSubnavBg: var(--grey20);\n\n --dropdownMenuBg: var(--grey20);\n --dropdownMenuInfoItem: var(--greya0);\n --dropdownMenuDivider: var(--grey40);\n --inverseDropdownMenuInfoItem: var(--grey6f);\n\n --loginTextColor: var(--grey60);\n\n --themeFontFamily: 'Helvetica Neue', Helvetica, Arial, sans-serif;\n --logoWidthTablet: 263px;\n\n --savePageSubmitBg: var(--grey13);\n --savePageSubmitText: var(--white);\n --savePageInputBorder: var(--grey60);\n --savePageErrorText: var(--errorYellow);\n\n color: var(--primaryTextColor);\n font-family: var(--themeFontFamily);\n }\n\n primary-nav:focus {\n outline: none !important;\n }\n\n #close-layer {\n display: none;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 3;\n }\n #close-layer.visible {\n display: block;\n }\n\n .topnav {\n position: relative;\n z-index: 4;\n }\n\n @media (max-width: ${TOPNAV_MOBILE_BREAKPOINT - 1}px) {\n desktop-subnav {\n display: none;\n }\n }\n`;\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
export default css `
|
|
3
4
|
.logged-out-menu {
|
|
4
5
|
background: inherit;
|
|
@@ -60,7 +61,7 @@ export default css `
|
|
|
60
61
|
outline-offset: inherit !important;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
|
-
@media (min-width:
|
|
64
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
64
65
|
.logged-out-toolbar {
|
|
65
66
|
padding: 1rem 0.5rem;
|
|
66
67
|
vertical-align: middle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login-button.js","sourceRoot":"","sources":["../../../src/styles/login-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"login-button.js","sourceRoot":"","sources":["../../../src/styles/login-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA6DK,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B9C,CAAC","sourcesContent":["import { css } from 'lit';\nimport { TOPNAV_MOBILE_BREAKPOINT } from '../models';\n\nexport default css`\n .logged-out-menu {\n background: inherit;\n border: none;\n }\n .logged-out-menu:focus-visible {\n outline: none;\n border: none;\n }\n .dropdown-toggle {\n display: block;\n text-transform: uppercase;\n color: var(--grey80);\n cursor: pointer;\n }\n\n .dropdown-toggle svg {\n height: 100%;\n width: 4rem;\n }\n\n .dropdown-toggle .fill-color {\n fill: var(--iconFill);\n }\n\n .dropdown-toggle:active .fill-color,\n .dropdown-toggle:focus .fill-color,\n .dropdown-toggle:hover .fill-color {\n fill: var(--linkHoverColor);\n }\n\n .active {\n border-radius: 1rem 1rem 0 0;\n background: var(--activeButtonBg);\n }\n\n .active .fill-color {\n fill: var(--activeColor);\n }\n\n span {\n display: none;\n font-size: 1.4rem;\n text-transform: uppercase;\n color: var(--loginTextColor);\n }\n\n span a {\n color: inherit;\n text-decoration: none;\n outline: 0;\n }\n\n a:hover,\n a:active,\n a:focus {\n color: var(--linkHoverColor) !important;\n outline: none !important;\n outline-offset: inherit !important;\n }\n\n @media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {\n .logged-out-toolbar {\n padding: 1rem 0.5rem;\n vertical-align: middle;\n }\n\n .active {\n background: transparent;\n }\n\n .dropdown-toggle {\n display: inline-block;\n vertical-align: middle;\n }\n\n .dropdown-toggle svg {\n height: 3rem;\n width: 3rem;\n display: block;\n }\n\n span {\n display: inline;\n vertical-align: middle;\n }\n }\n`;\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
export default css `
|
|
3
4
|
a {
|
|
4
5
|
display: inline-block;
|
|
@@ -63,7 +64,7 @@ export default css `
|
|
|
63
64
|
fill: #f00;
|
|
64
65
|
}
|
|
65
66
|
|
|
66
|
-
@media (min-width:
|
|
67
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
67
68
|
.menu-item {
|
|
68
69
|
width: auto;
|
|
69
70
|
height: 5rem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-button.js","sourceRoot":"","sources":["../../../src/styles/media-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"media-button.js","sourceRoot":"","sources":["../../../src/styles/media-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAgEK,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyF9C,CAAC","sourcesContent":["import { css } from 'lit';\nimport { TOPNAV_MOBILE_BREAKPOINT } from '../models';\n\nexport default css`\n a {\n display: inline-block;\n text-decoration: none;\n }\n\n .menu-item {\n display: inline-block;\n width: 100%;\n padding: 0;\n font-size: 1.6rem;\n text-align: left;\n background: transparent;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .menu-item:focus {\n outline: none;\n }\n\n .label {\n display: inline-block;\n padding: 0;\n font-weight: 400;\n color: var(--primaryTextColor);\n text-align: left;\n vertical-align: middle;\n }\n\n .menu-item > .icon {\n display: inline-flex;\n vertical-align: middle;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n }\n\n .menu-item > .icon > svg {\n height: 4rem;\n width: 4rem;\n }\n\n .menu-item.selected .icon {\n background-color: var(--activeButtonBg);\n border-radius: 1rem 0 0 1rem;\n }\n\n .icon .fill-color {\n fill: #999;\n }\n\n .icon.active .fill-color {\n fill: #fff;\n }\n\n .donate .fill-color {\n fill: #f00;\n }\n\n @media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {\n .menu-item {\n width: auto;\n height: 5rem;\n color: var(--mediaLabelDesktopColor);\n display: inline-flex;\n }\n .menu-item:hover,\n .menu-item:active,\n .menu-item:focus {\n color: var(--linkHoverColor);\n }\n\n .menu-item:hover .fill-color,\n .menu-item:active .fill-color,\n .menu-item:focus .fill-color {\n fill: var(--linkHoverColor);\n }\n\n .label {\n display: none;\n }\n\n .label,\n .web:after {\n padding-right: 1rem;\n font-size: 1.3rem;\n text-transform: uppercase;\n color: inherit;\n }\n\n .web:after {\n display: none;\n content: 'web';\n }\n .donate,\n .more {\n display: none;\n }\n\n .menu-item.selected {\n background: var(--activeDesktopMenuIcon);\n }\n\n .menu-item.selected .label,\n .menu-item.selected.web:after {\n color: var(--linkHoverColor);\n }\n\n .menu-item.selected .icon {\n background: transparent;\n }\n\n /* selected state icon colors */\n .web.selected .fill-color {\n fill: #ffcd27;\n }\n\n .texts.selected .fill-color {\n fill: #faab3c;\n }\n\n .video.selected .fill-color {\n fill: #f1644b;\n }\n\n .audio.selected .fill-color {\n fill: #00adef;\n }\n\n .software.selected .fill-color {\n fill: #9ecc4f;\n }\n\n .images.selected .fill-color {\n fill: #aa99c9;\n }\n }\n\n @media (min-width: 1200px) {\n .label,\n .web:after {\n display: inline;\n }\n\n .web .label {\n display: none;\n }\n }\n`;\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
export default css `
|
|
3
4
|
:host {
|
|
4
5
|
outline: none;
|
|
@@ -21,7 +22,7 @@ export default css `
|
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
/* Mobile view styles */
|
|
24
|
-
@media (max-width:
|
|
25
|
+
@media (max-width: ${TOPNAV_MOBILE_BREAKPOINT - 1}px) {
|
|
25
26
|
.media-menu-inner {
|
|
26
27
|
position: absolute;
|
|
27
28
|
width: 100%;
|
|
@@ -49,7 +50,7 @@ export default css `
|
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
/* Desktop view styles */
|
|
52
|
-
@media (min-width:
|
|
53
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
53
54
|
.media-menu-inner {
|
|
54
55
|
display: block;
|
|
55
56
|
position: static;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-menu.js","sourceRoot":"","sources":["../../../src/styles/media-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"media-menu.js","sourceRoot":"","sources":["../../../src/styles/media-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;uBAsBK,wBAAwB,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA4B5B,wBAAwB;;;;;;;;;;;;;CAa9C,CAAC","sourcesContent":["import { css } from 'lit';\nimport { TOPNAV_MOBILE_BREAKPOINT } from '../models';\n\nexport default css`\n :host {\n outline: none;\n }\n\n .media-menu-inner {\n z-index: -1;\n top: -40rem;\n background-color: var(--mediaMenuBg);\n margin: 0;\n overflow: hidden;\n transition-duration: 0.2s;\n transition-property: top;\n transition-timing-function: ease;\n }\n\n .menu-group {\n position: relative;\n line-height: normal;\n }\n\n /* Mobile view styles */\n @media (max-width: ${TOPNAV_MOBILE_BREAKPOINT - 1}px) {\n .media-menu-inner {\n position: absolute;\n width: 100%;\n }\n\n .open .media-menu-inner {\n top: 0;\n }\n\n .overflow-clip {\n position: absolute;\n z-index: -1; /** needs to be under the navigation, otherwise it intercepts clicks */\n top: 4rem;\n left: 0;\n height: 0;\n width: 100%;\n overflow: hidden;\n transition-duration: 0.2s;\n transition-property: height;\n }\n\n .open .overflow-clip {\n height: 40rem;\n }\n }\n\n /* Desktop view styles */\n @media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {\n .media-menu-inner {\n display: block;\n position: static;\n width: auto;\n height: 5rem;\n transition-property: none;\n }\n\n .menu-group {\n font-size: 0;\n }\n }\n`;\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
export default css `
|
|
3
4
|
.media-slider-container {
|
|
4
5
|
position: relative;
|
|
@@ -39,7 +40,7 @@ export default css `
|
|
|
39
40
|
padding: 1rem;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
@media (max-width:
|
|
43
|
+
@media (max-width: ${TOPNAV_MOBILE_BREAKPOINT - 1}px) {
|
|
43
44
|
.overflow-clip.open {
|
|
44
45
|
display: block;
|
|
45
46
|
height: 35.8rem;
|
|
@@ -48,7 +49,7 @@ export default css `
|
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
@media (min-width:
|
|
52
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
52
53
|
.overflow-clip {
|
|
53
54
|
display: block;
|
|
54
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-slider.js","sourceRoot":"","sources":["../../../src/styles/media-slider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"media-slider.js","sourceRoot":"","sources":["../../../src/styles/media-slider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAwCK,wBAAwB,GAAG,CAAC;;;;;;;;;uBAS5B,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6B9C,CAAC","sourcesContent":["import { css } from 'lit';\nimport { TOPNAV_MOBILE_BREAKPOINT } from '../models';\n\nexport default css`\n .media-slider-container {\n position: relative;\n }\n\n .overflow-clip {\n display: none;\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n height: 0;\n overflow: hidden;\n transition: height 0.2s ease;\n }\n\n .information-menu {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n padding: 0;\n height: 31.9rem;\n overflow-x: hidden;\n font-size: 1.4rem;\n background: var(--mediaSliderBg);\n }\n\n .open {\n display: block;\n }\n\n .hidden {\n display: none;\n }\n\n .info-box {\n padding: 1rem;\n }\n\n @media (max-width: ${TOPNAV_MOBILE_BREAKPOINT - 1}px) {\n .overflow-clip.open {\n display: block;\n height: 35.8rem;\n left: 4rem;\n top: 0;\n }\n }\n\n @media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {\n .overflow-clip {\n display: block;\n }\n\n .information-menu {\n left: 0;\n z-index: 3;\n height: auto;\n min-height: 21rem;\n background: var(--mediaSliderDesktopBg);\n transform: translate(0, -100%);\n transition: transform 0.2s ease;\n }\n\n .overflow-clip.open {\n height: 22rem;\n }\n\n .information-menu.open {\n transform: translate(0, 0);\n }\n\n .info-box {\n max-width: 100rem;\n padding: 1.5rem 0;\n margin: 0 auto;\n }\n }\n`;\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
import { subnavListCSS } from './base';
|
|
3
4
|
export default [
|
|
4
5
|
subnavListCSS,
|
|
@@ -44,7 +45,7 @@ export default [
|
|
|
44
45
|
display: none;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
@media (min-width:
|
|
48
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
48
49
|
:host {
|
|
49
50
|
display: -ms-grid;
|
|
50
51
|
display: grid;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-subnav.js","sourceRoot":"","sources":["../../../src/styles/media-subnav.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,eAAe;IACb,aAAa;IACb,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"media-subnav.js","sourceRoot":"","sources":["../../../src/styles/media-subnav.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,eAAe;IACb,aAAa;IACb,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA0CoB,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8G9C;CACF,CAAC","sourcesContent":["import { css } from 'lit';\nimport { TOPNAV_MOBILE_BREAKPOINT } from '../models';\nimport { subnavListCSS } from './base';\n\nexport default [\n subnavListCSS,\n css`\n img {\n display: block;\n width: 90px;\n height: 90px;\n margin: 0 auto 1rem auto;\n border-radius: 45px;\n }\n\n h3 {\n margin-top: 0;\n font-size: 1.8rem;\n }\n\n .icon-links {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: space-evenly;\n -ms-flex-pack: space-evenly;\n justify-content: space-evenly;\n text-align: center;\n }\n\n .icon-links a {\n display: inline-block;\n width: 12rem;\n margin-bottom: 1.5rem;\n overflow: hidden;\n white-space: nowrap;\n text-align: center;\n text-overflow: ellipsis;\n }\n\n .icon-links a + a {\n margin-left: 2rem;\n }\n\n .featured h4 {\n display: none;\n }\n\n @media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {\n :host {\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: 40% 20% 40%;\n grid-template-columns: 40% 20% 40%;\n }\n\n .wayback-search {\n -ms-grid-column: 1;\n -ms-grid-column-span: 3;\n grid-column: 1 / 4;\n }\n\n h3 {\n display: none;\n }\n\n .icon-links {\n -ms-grid-column: 1;\n }\n\n .icon-links a {\n padding-top: 3.5rem;\n max-width: 16rem;\n }\n\n .links {\n padding: 0 1.5rem;\n }\n\n .featured {\n -ms-grid-column: 2;\n }\n\n .featured h4 {\n display: block;\n }\n\n .top {\n -ms-grid-column: 3;\n }\n\n .top ul {\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: 50% 3rem 50%;\n grid-template-columns: 50% 50%;\n -ms-grid-rows: (auto) [7];\n grid-template-rows: repeat(7, auto);\n grid-column-gap: 3rem;\n grid-auto-flow: column;\n }\n .top ul > *:nth-child(1) {\n -ms-grid-row: 1;\n -ms-grid-column: 1;\n }\n .top ul > *:nth-child(2) {\n -ms-grid-row: 2;\n -ms-grid-column: 1;\n }\n .top ul > *:nth-child(3) {\n -ms-grid-row: 3;\n -ms-grid-column: 1;\n }\n .top ul > *:nth-child(4) {\n -ms-grid-row: 4;\n -ms-grid-column: 1;\n }\n .top ul > *:nth-child(5) {\n -ms-grid-row: 5;\n -ms-grid-column: 1;\n }\n .top ul > *:nth-child(6) {\n -ms-grid-row: 6;\n -ms-grid-column: 1;\n }\n .top ul > *:nth-child(7) {\n -ms-grid-row: 7;\n -ms-grid-column: 1;\n }\n .top ul > *:nth-child(8) {\n -ms-grid-row: 1;\n -ms-grid-column: 3;\n }\n .top ul > *:nth-child(9) {\n -ms-grid-row: 2;\n -ms-grid-column: 3;\n }\n .top ul > *:nth-child(10) {\n -ms-grid-row: 3;\n -ms-grid-column: 3;\n }\n .top ul > *:nth-child(11) {\n -ms-grid-row: 4;\n -ms-grid-column: 3;\n }\n .top ul > *:nth-child(12) {\n -ms-grid-row: 5;\n -ms-grid-column: 3;\n }\n .top ul > *:nth-child(13) {\n -ms-grid-row: 6;\n -ms-grid-column: 3;\n }\n .top ul > *:nth-child(14) {\n -ms-grid-row: 7;\n -ms-grid-column: 3;\n }\n }\n `,\n];\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
export default css `
|
|
3
4
|
button:focus,
|
|
4
5
|
input:focus {
|
|
@@ -210,7 +211,7 @@ export default css `
|
|
|
210
211
|
outline-offset: 1px;
|
|
211
212
|
}
|
|
212
213
|
|
|
213
|
-
@media only screen and (min-width:
|
|
214
|
+
@media only screen and (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) and (max-device-width: 905px) {
|
|
214
215
|
.branding.second-logo {
|
|
215
216
|
padding-right: 0;
|
|
216
217
|
}
|
|
@@ -222,7 +223,7 @@ export default css `
|
|
|
222
223
|
}
|
|
223
224
|
}
|
|
224
225
|
|
|
225
|
-
@media (max-width:
|
|
226
|
+
@media (max-width: ${TOPNAV_MOBILE_BREAKPOINT - 1}px) {
|
|
226
227
|
slot[name='opt-sec-logo'] {
|
|
227
228
|
display: none;
|
|
228
229
|
}
|
|
@@ -235,7 +236,7 @@ export default css `
|
|
|
235
236
|
}
|
|
236
237
|
}
|
|
237
238
|
|
|
238
|
-
@media (min-width:
|
|
239
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
239
240
|
:host {
|
|
240
241
|
--userIconWidth: 3.2rem;
|
|
241
242
|
--userIconHeight: 3.2rem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primary-nav.js","sourceRoot":"","sources":["../../../src/styles/primary-nav.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"primary-nav.js","sourceRoot":"","sources":["../../../src/styles/primary-nav.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAmNqB,wBAAwB;;;;;;;;;;;;uBAYxC,wBAAwB,GAAG,CAAC;;;;;;;;;;;;;uBAa5B,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqH9C,CAAC","sourcesContent":["import { css } from 'lit';\nimport { TOPNAV_MOBILE_BREAKPOINT } from '../models';\n\nexport default css`\n button:focus,\n input:focus {\n outline: none;\n }\n\n nav {\n position: relative;\n display: flex;\n height: 4rem;\n grid-template-areas: 'hamburger empty heart search user';\n -ms-grid-columns: 4rem minmax(1rem, 100%) 4rem 4rem 4rem;\n grid-template-columns: 4rem auto 4rem 4rem 4rem;\n -ms-grid-rows: 100%;\n grid-template-rows: 100%;\n background: var(--primaryNavBg);\n border-bottom: 1px solid var(--primaryNavBottomBorder);\n }\n\n nav.hide-search {\n grid-template-areas: 'hamburger empty heart user';\n -ms-grid-columns: 4rem minmax(1rem, 100%) 4rem 4rem;\n grid-template-columns: 4rem auto 4rem 4rem;\n }\n\n .right-side-section {\n display: flex;\n margin-left: auto;\n user-select: none;\n }\n button {\n background: none;\n color: inherit;\n border: none;\n font: inherit;\n cursor: pointer;\n }\n\n .branding {\n position: static;\n float: left;\n margin: 0 !important;\n padding: 0 5px 0 10px;\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n transform: translate(0, 0);\n }\n\n slot,\n .branding {\n display: flex;\n justify-content: left;\n align-items: center;\n }\n\n media-menu {\n flex: 1;\n justify-self: stretch;\n }\n\n .ia-logo {\n height: 3rem;\n width: 2.7rem;\n display: inline-block;\n }\n .ia-wordmark {\n height: 3rem;\n width: 9.5rem;\n }\n .ia-logo,\n .ia-wordmark {\n margin-right: 5px;\n }\n\n .hamburger {\n -ms-grid-row: 1;\n -ms-grid-column: 1;\n grid-area: hamburger;\n padding: 0;\n }\n .hamburger svg {\n height: 4rem;\n width: 4rem;\n fill: var(--activeColor);\n }\n\n .mobile-donate-link {\n display: inline-block;\n }\n .mobile-donate-link svg {\n height: 4rem;\n width: 4rem;\n }\n .mobile-donate-link .fill-color {\n fill: rgb(255, 0, 0);\n }\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n border: 0;\n overflow: hidden;\n white-space: nowrap;\n clip: rect(1px, 1px, 1px, 1px);\n -webkit-clip-path: inset(50%);\n clip-path: inset(50%);\n user-select: none;\n }\n\n .search-trigger {\n padding: 0;\n }\n .search-trigger svg {\n height: 4rem;\n width: 4rem;\n }\n .search-trigger .fill-color {\n fill: var(--iconFill);\n }\n\n .search-container {\n display: none;\n }\n\n .search-container.open {\n display: flex;\n position: absolute;\n top: 0;\n right: 4rem;\n bottom: 0;\n left: 4rem;\n z-index: 3;\n padding: 0.5rem;\n border-radius: 1rem 1rem 0 0;\n background: var(--primaryNavBg);\n align-items: center;\n animation: fade-in 0.2s forwards;\n }\n\n .search-container ::slotted(*) {\n display: block;\n }\n\n .search-container slot {\n width: 100%;\n }\n\n @keyframes fade-in {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n\n .upload {\n display: none;\n }\n\n .upload span {\n display: none;\n }\n\n .upload svg {\n height: 3rem;\n width: 3rem;\n }\n\n .screen-name {\n display: none;\n font-size: 1.3rem;\n vertical-align: middle;\n text-transform: uppercase;\n }\n\n .user-menu {\n color: var(--lightTextColor);\n padding: 0.5rem;\n height: 100%;\n }\n\n button.user-menu:hover,\n button.user-menu:focus {\n color: var(--linkHoverColor);\n outline: none;\n }\n\n .user-menu.active {\n border-radius: 1rem 1rem 0 0;\n background: var(--activeButtonBg);\n }\n\n .user-menu img {\n display: block;\n width: 3rem;\n height: 3rem;\n }\n\n .link-home {\n text-decoration: none;\n display: inline-flex;\n }\n a.link-home:focus,\n a.link-home:focus-visible {\n outline-offset: 1px;\n }\n\n @media only screen and (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) and (max-device-width: 905px) {\n .branding.second-logo {\n padding-right: 0;\n }\n }\n\n @media (min-width: 906px) {\n .branding.second-logo {\n padding-right: 20px;\n }\n }\n\n @media (max-width: ${TOPNAV_MOBILE_BREAKPOINT - 1}px) {\n slot[name='opt-sec-logo'] {\n display: none;\n }\n\n .right-side-section {\n display: initial;\n }\n .right-side-section .user-info {\n float: right;\n }\n }\n\n @media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {\n :host {\n --userIconWidth: 3.2rem;\n --userIconHeight: 3.2rem;\n }\n\n nav {\n display: flex;\n z-index: 4;\n height: 5rem;\n padding-right: 1.5rem;\n }\n\n slot[name='opt-sec-logo-mobile'] {\n display: none;\n }\n\n .ia-logo,\n .ia-wordmark {\n margin-right: 10px;\n }\n\n .hamburger,\n .search-trigger,\n .mobile-donate-link {\n display: none;\n }\n\n .user-info {\n display: block;\n float: right;\n vertical-align: middle;\n height: 100%;\n }\n\n .user-info .user-menu img {\n height: 3rem;\n width: 3rem;\n margin-right: 0.5rem;\n }\n\n .user-menu {\n padding: 1rem 0.5rem;\n }\n .user-menu.active {\n background: transparent;\n }\n\n .user-menu img {\n display: inline-block;\n vertical-align: middle;\n margin-right: 0.5rem;\n }\n\n .upload {\n display: block;\n padding: 1rem 0.5rem;\n float: right;\n font-size: 1.4rem;\n text-transform: uppercase;\n text-decoration: none;\n color: var(--lightTextColor);\n }\n .upload:active,\n .upload:focus,\n .upload:hover {\n color: var(--linkHoverColor);\n }\n .upload:focus-visible {\n outline: none;\n }\n\n .upload svg {\n vertical-align: middle;\n fill: var(--iconFill);\n }\n\n .upload:hover svg,\n .upload:focus svg,\n .upload:active svg {\n fill: var(--linkHoverColor);\n }\n\n .search-container,\n .search-container.open {\n display: flex;\n position: static;\n top: auto;\n right: auto;\n bottom: auto;\n left: auto;\n align-items: center;\n padding: 0 0 0 1rem;\n background: transparent;\n border-radius: 0;\n z-index: auto;\n }\n\n .search-container slot {\n width: auto;\n }\n }\n\n @media (min-width: 990px) {\n .screen-name {\n display: inline-block;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n max-width: 165px;\n }\n\n .upload span {\n display: inline-block;\n vertical-align: middle;\n }\n }\n`;\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
export default css `
|
|
3
4
|
div {
|
|
4
5
|
display: grid;
|
|
@@ -44,7 +45,7 @@ export default css `
|
|
|
44
45
|
display: block;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
@media (min-width:
|
|
48
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
48
49
|
h3 {
|
|
49
50
|
margin-top: 0;
|
|
50
51
|
font: normal 100 1.6rem var(--themeFontFamily);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save-page-form.js","sourceRoot":"","sources":["../../../src/styles/save-page-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"save-page-form.js","sourceRoot":"","sources":["../../../src/styles/save-page-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA6CK,wBAAwB;;;;;;CAM9C,CAAC","sourcesContent":["import { css } from 'lit';\nimport { TOPNAV_MOBILE_BREAKPOINT } from '../models';\n\nexport default css`\n div {\n display: grid;\n grid-template-columns: 1fr auto;\n grid-column-gap: 0.8rem;\n margin: 0;\n padding: 0;\n border: none;\n }\n\n input[type='text'] {\n width: 100%;\n height: 3rem;\n box-sizing: border-box;\n border: 1px solid var(--savePageInputBorder);\n border-radius: 0.5rem;\n color: var(--grey13);\n font-size: inherit;\n }\n\n input[type='submit'] {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n padding: 0.4rem 0.8rem;\n font: normal 1.3rem var(--themeFontFamily);\n text-transform: uppercase;\n color: var(--savePageSubmitText);\n border: none;\n border-radius: 16px;\n background: var(--savePageSubmitBg);\n cursor: pointer;\n }\n\n .error {\n display: none;\n margin-top: 0.5rem;\n font-weight: bold;\n color: var(--savePageErrorText);\n }\n\n .visible {\n display: block;\n }\n\n @media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {\n h3 {\n margin-top: 0;\n font: normal 100 1.6rem var(--themeFontFamily);\n }\n }\n`;\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
export default css `
|
|
3
4
|
form {
|
|
4
5
|
}
|
|
@@ -33,7 +34,7 @@ export default css `
|
|
|
33
34
|
transform: translateY(-50%);
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
@media (min-width:
|
|
37
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
37
38
|
fieldset a,
|
|
38
39
|
.search-field {
|
|
39
40
|
display: block;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wayback-search.js","sourceRoot":"","sources":["../../../src/styles/wayback-search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"wayback-search.js","sourceRoot":"","sources":["../../../src/styles/wayback-search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAkCK,wBAAwB;;;;;;;;;;;CAW9C,CAAC","sourcesContent":["import { css } from 'lit';\nimport { TOPNAV_MOBILE_BREAKPOINT } from '../models';\n\nexport default css`\n form {\n }\n\n p {\n margin-bottom: 1rem;\n font-size: 1.6rem;\n text-align: center;\n }\n\n fieldset {\n padding: 0.5rem;\n border-radius: 5px;\n box-shadow: none;\n }\n\n input {\n padding-left: 3rem;\n margin-top: 0.3rem;\n font-size: 1.4rem;\n border-color: #bca38e;\n background: #fff;\n }\n\n input::placeholder,\n input::-webkit-input-placeholder {\n color: #8e8e8e;\n }\n\n .search-field svg {\n top: 50%;\n transform: translateY(-50%);\n }\n\n @media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {\n fieldset a,\n .search-field {\n display: block;\n width: auto;\n }\n\n fieldset a {\n margin: 0 1.5rem;\n }\n }\n`;\n"]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
+
import { TOPNAV_MOBILE_BREAKPOINT } from '../models';
|
|
2
3
|
import { subnavListCSS } from './base';
|
|
3
4
|
export default [
|
|
4
5
|
subnavListCSS,
|
|
5
6
|
css `
|
|
6
|
-
@media (min-width:
|
|
7
|
+
@media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {
|
|
7
8
|
:host {
|
|
8
9
|
display: block;
|
|
9
10
|
grid-column: 1 / 4;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wayback-slider.js","sourceRoot":"","sources":["../../../src/styles/wayback-slider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,eAAe;IACb,aAAa;IACb,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"wayback-slider.js","sourceRoot":"","sources":["../../../src/styles/wayback-slider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,eAAe;IACb,aAAa;IACb,GAAG,CAAA;yBACoB,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;GAyB9C;CACF,CAAC","sourcesContent":["import { css } from 'lit';\nimport { TOPNAV_MOBILE_BREAKPOINT } from '../models';\nimport { subnavListCSS } from './base';\n\nexport default [\n subnavListCSS,\n css`\n @media (min-width: ${TOPNAV_MOBILE_BREAKPOINT}px) {\n :host {\n display: block;\n grid-column: 1 / 4;\n padding: 0 1.5rem;\n }\n\n h4 {\n margin-top: 0;\n font: normal 100 1.6rem var(--themeFontFamily);\n }\n\n .grid {\n display: grid;\n grid-template-columns: minmax(auto, 260px) 1fr minmax(auto, 260px);\n /* Possible for 890 - 935: minmax(auto, 260px) 1fr minmax(auto, 260px) */\n grid-column-gap: 2.5rem;\n }\n\n .link-lists {\n display: grid;\n grid-template-columns: calc(50% - 1.25rem) calc(50% - 1.25rem);\n grid-column-gap: 2.5rem;\n }\n }\n `,\n];\n"]}
|
package/eslint.config.mjs
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
|
2
|
-
import html from 'eslint-plugin-html';
|
|
3
|
-
import tsParser from '@typescript-eslint/parser';
|
|
4
|
-
import path from 'node:path';
|
|
5
|
-
import { fileURLToPath } from 'node:url';
|
|
6
|
-
import js from '@eslint/js';
|
|
7
|
-
import { FlatCompat } from '@eslint/eslintrc';
|
|
8
|
-
|
|
9
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
-
const __dirname = path.dirname(__filename);
|
|
11
|
-
const compat = new FlatCompat({
|
|
12
|
-
baseDirectory: __dirname,
|
|
13
|
-
recommendedConfig: js.configs.recommended,
|
|
14
|
-
allConfig: js.configs.all,
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export default [
|
|
18
|
-
...compat.extends('plugin:@typescript-eslint/recommended'),
|
|
19
|
-
{
|
|
20
|
-
plugins: {
|
|
21
|
-
'@typescript-eslint': typescriptEslint,
|
|
22
|
-
html,
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
languageOptions: {
|
|
26
|
-
parser: tsParser,
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
settings: {
|
|
30
|
-
'import/resolver': {
|
|
31
|
-
node: {
|
|
32
|
-
extensions: ['.ts', '.tsx'],
|
|
33
|
-
moduleDirectory: ['node_modules', 'src', 'demo'],
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
rules: {
|
|
39
|
-
'@typescript-eslint/no-unsafe-function-type': 'warn',
|
|
40
|
-
'@typescript-eslint/no-unused-vars': 'warn',
|
|
41
|
-
'@typescript-eslint/no-explicit-any': 'warn',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
ignores: ['**/*.js', '**/*.mjs'],
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
files: ['**/*.test.ts'],
|
|
49
|
-
rules: {
|
|
50
|
-
'@typescript-eslint/no-unused-expressions': 'off',
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
];
|
|
1
|
+
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
|
2
|
+
import html from 'eslint-plugin-html';
|
|
3
|
+
import tsParser from '@typescript-eslint/parser';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import js from '@eslint/js';
|
|
7
|
+
import { FlatCompat } from '@eslint/eslintrc';
|
|
8
|
+
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = path.dirname(__filename);
|
|
11
|
+
const compat = new FlatCompat({
|
|
12
|
+
baseDirectory: __dirname,
|
|
13
|
+
recommendedConfig: js.configs.recommended,
|
|
14
|
+
allConfig: js.configs.all,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export default [
|
|
18
|
+
...compat.extends('plugin:@typescript-eslint/recommended'),
|
|
19
|
+
{
|
|
20
|
+
plugins: {
|
|
21
|
+
'@typescript-eslint': typescriptEslint,
|
|
22
|
+
html,
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
languageOptions: {
|
|
26
|
+
parser: tsParser,
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
settings: {
|
|
30
|
+
'import/resolver': {
|
|
31
|
+
node: {
|
|
32
|
+
extensions: ['.ts', '.tsx'],
|
|
33
|
+
moduleDirectory: ['node_modules', 'src', 'demo'],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
rules: {
|
|
39
|
+
'@typescript-eslint/no-unsafe-function-type': 'warn',
|
|
40
|
+
'@typescript-eslint/no-unused-vars': 'warn',
|
|
41
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
ignores: ['**/*.js', '**/*.mjs'],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
files: ['**/*.test.ts'],
|
|
49
|
+
rules: {
|
|
50
|
+
'@typescript-eslint/no-unused-expressions': 'off',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
];
|
package/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
export { IATopNav } from './src/ia-topnav';
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { TOPNAV_MOBILE_BREAKPOINT } from './src/models';
|
package/package.json
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@internetarchive/ia-topnav",
|
|
3
|
-
"version": "2.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
|
+
{
|
|
2
|
+
"name": "@internetarchive/ia-topnav",
|
|
3
|
+
"version": "2.1.0-alpha-webdev8660.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
|
+
}
|
package/prettier.config.js
CHANGED
|
@@ -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;
|