diff --git a/src/App.test.tsx b/src/App.test.tsx deleted file mode 100644 index 2a68616..0000000 --- a/src/App.test.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import { render, screen } from '@testing-library/react'; -import App from './App'; - -test('renders learn react link', () => { - render(); - const linkElement = screen.getByText(/learn react/i); - expect(linkElement).toBeInTheDocument(); -}); diff --git a/src/App.tsx b/src/App.tsx deleted file mode 100644 index 7be0166..0000000 --- a/src/App.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { Route, Routes } from 'react-router-dom'; -import Styled from 'styled-components'; -import * as Sentry from '@sentry/react'; - -import Home from 'pages/Home'; -import Results from 'pages/Results'; -import About from 'pages/About'; -import NotFound from 'pages/NotFound'; -import colors from 'styles/colors'; - -const Container = Styled.main` - background: ${colors.background}; - color: ${colors.textColor}; - width: 100vw; - margin: 0; -`; - -Sentry.init({ - dsn: 'https://30eb6135d37643fb95c7da4e77a46142@glitch.as93.net/1', - beforeSend(event) { // Check if error logging is disabled - const ignoredHosts = ['localhost', '127.0.0.1']; - const disableErrors = process.env.REACT_APP_DISABLE_ERROR_LOGGING; - if (disableErrors || ignoredHosts.includes(window.location.hostname)) { - return null; - } - return event; - } -}); - -function App() { - return ( - - - } /> - } /> - } /> - } /> - - - ); -} - -export default App; diff --git a/src/assets/fonts/PTMono-Regular.ttf b/src/assets/fonts/PTMono-Regular.ttf deleted file mode 100644 index b198383..0000000 Binary files a/src/assets/fonts/PTMono-Regular.ttf and /dev/null differ diff --git a/src/components/Demo.tsx b/src/components/Demo.tsx deleted file mode 100644 index 9ffa9f6..0000000 --- a/src/components/Demo.tsx +++ /dev/null @@ -1,7 +0,0 @@ -interface Props { - message: string, -}; - -const Demo = ({ message }: Props): JSX.Element =>
{message}
; - -export default Demo; diff --git a/src/env.d.ts b/src/env.d.ts new file mode 100644 index 0000000..acef35f --- /dev/null +++ b/src/env.d.ts @@ -0,0 +1,2 @@ +/// +/// diff --git a/src/index.tsx b/src/index.tsx deleted file mode 100644 index db18799..0000000 --- a/src/index.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom/client'; -import { BrowserRouter } from 'react-router-dom'; -import './index.css'; -import App from './App'; -import reportWebVitals from './reportWebVitals'; - -const root = ReactDOM.createRoot( - document.getElementById('root') as HTMLElement -); -root.render( - - - - - -); - -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); diff --git a/src/logo.svg b/src/logo.svg deleted file mode 100644 index 9dfc1c0..0000000 --- a/src/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/pages/check/[...target].astro b/src/pages/check/[...target].astro new file mode 100644 index 0000000..e0fd325 --- /dev/null +++ b/src/pages/check/[...target].astro @@ -0,0 +1,19 @@ +--- +import Main from "../../v1-check/views/main.tsx" +import '../../v1-check/styles/index.css'; + +export const prerender = false; + +const { pathname } = new URL(Astro.request.url) + +--- + + + + Results + + + +
+ + diff --git a/src/pages/index.astro b/src/pages/index.astro new file mode 100644 index 0000000..0728975 --- /dev/null +++ b/src/pages/index.astro @@ -0,0 +1,16 @@ +--- + +--- + + + + + + + + Astro + + +

TODO: Web Check

+ + diff --git a/src/pages/test.astro b/src/pages/test.astro new file mode 100644 index 0000000..92045bb --- /dev/null +++ b/src/pages/test.astro @@ -0,0 +1,16 @@ +--- + +--- + + + + + + + + Astro + + +

TEST

+ + diff --git a/src/react-app-env.d.ts b/src/react-app-env.d.ts deleted file mode 100644 index 6431bc5..0000000 --- a/src/react-app-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/src/reportWebVitals.ts b/src/reportWebVitals.ts deleted file mode 100644 index 49a2a16..0000000 --- a/src/reportWebVitals.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ReportHandler } from 'web-vitals'; - -const reportWebVitals = (onPerfEntry?: ReportHandler) => { - if (onPerfEntry && onPerfEntry instanceof Function) { - import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); - getFID(onPerfEntry); - getFCP(onPerfEntry); - getLCP(onPerfEntry); - getTTFB(onPerfEntry); - }); - } -}; - -export default reportWebVitals; diff --git a/src/setupTests.ts b/src/setupTests.ts deleted file mode 100644 index 8f2609b..0000000 --- a/src/setupTests.ts +++ /dev/null @@ -1,5 +0,0 @@ -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom'; diff --git a/src/styles/globals.ts b/src/styles/globals.ts deleted file mode 100644 index 6f03279..0000000 --- a/src/styles/globals.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { createGlobalStyle } from 'styled-components'; -import PTMono from 'assets/fonts/PTMono.ttf'; - -export const GlobalStyles = createGlobalStyle` - @font-face { - font-family: PTMono; - font-style: normal; - font-weight: 400; - src: url(${PTMono}); - } - body { font-family: PTMono; } -`; - -export default GlobalStyles; diff --git a/src/utils/get-keys.ts b/src/utils/get-keys.ts deleted file mode 100644 index 3fc60ae..0000000 --- a/src/utils/get-keys.ts +++ /dev/null @@ -1,7 +0,0 @@ - -const keys = { - shodan: process.env.REACT_APP_SHODAN_API_KEY, - whoApi: process.env.REACT_APP_WHO_API_KEY, -}; - -export default keys; diff --git a/src/assets/data/map-features.json b/src/v1-check/assets/data/map-features.json similarity index 100% rename from src/assets/data/map-features.json rename to src/v1-check/assets/data/map-features.json diff --git a/src/components/Form/Button.tsx b/src/v1-check/components/Form/Button.tsx similarity index 85% rename from src/components/Form/Button.tsx rename to src/v1-check/components/Form/Button.tsx index 96e2acc..bafe002 100644 --- a/src/components/Form/Button.tsx +++ b/src/v1-check/components/Form/Button.tsx @@ -1,12 +1,15 @@ -import styled, { keyframes } from 'styled-components'; -import colors from 'styles/colors'; -import { InputSize, applySize } from 'styles/dimensions'; +import { type ReactNode, type MouseEventHandler } from 'react'; + +import styled from '@emotion/styled'; +import { keyframes } from '@emotion/react'; +import colors from 'v1-check/styles/colors'; +import { type InputSize, applySize } from 'v1-check/styles/dimensions'; type LoadState = 'loading' | 'success' | 'error'; interface ButtonProps { - children: React.ReactNode; - onClick?: React.MouseEventHandler; + children: ReactNode; + onClick?: MouseEventHandler; size?: InputSize, bgColor?: string, fgColor?: string, diff --git a/src/components/Form/Card.tsx b/src/v1-check/components/Form/Card.tsx similarity index 74% rename from src/components/Form/Card.tsx rename to src/v1-check/components/Form/Card.tsx index 1721e97..4f41973 100644 --- a/src/components/Form/Card.tsx +++ b/src/v1-check/components/Form/Card.tsx @@ -1,12 +1,13 @@ -import styled from 'styled-components'; +import styled from '@emotion/styled'; -import ErrorBoundary from 'components/misc/ErrorBoundary'; -import Heading from 'components/Form/Heading'; -import colors from 'styles/colors'; -import { ReactNode } from 'react'; +import { type ReactNode } from 'react'; +import ErrorBoundary from 'v1-check/components/misc/ErrorBoundary'; +import Heading from 'v1-check/components/Form/Heading'; +import colors from 'v1-check/styles/colors'; export const StyledCard = styled.section<{ styles?: string}>` background: ${colors.backgroundLighter}; + color: ${colors.textColor}; box-shadow: 4px 4px 0px ${colors.bgShadowColor}; border-radius: 8px; padding: 1rem; @@ -18,7 +19,7 @@ export const StyledCard = styled.section<{ styles?: string}>` `; interface CardProps { - children: React.ReactNode; + children: ReactNode; heading?: string, styles?: string; actionButtons?: ReactNode | undefined; diff --git a/src/components/Form/Heading.tsx b/src/v1-check/components/Form/Heading.tsx similarity index 90% rename from src/components/Form/Heading.tsx rename to src/v1-check/components/Form/Heading.tsx index cdd40e8..ff15617 100644 --- a/src/components/Form/Heading.tsx +++ b/src/v1-check/components/Form/Heading.tsx @@ -1,6 +1,7 @@ -import styled from 'styled-components'; -import colors from 'styles/colors'; -import { TextSizes } from 'styles/typography'; +import styled from '@emotion/styled'; +import colors from 'v1-check/styles/colors'; +import { TextSizes } from 'v1-check/styles/typography'; +import type { ReactNode } from 'react'; interface HeadingProps { as?: 'h1' | 'h2' | 'h3' | 'h4' | 'p'; @@ -8,7 +9,7 @@ interface HeadingProps { color?: string; size?: 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge'; inline?: boolean; - children: React.ReactNode; + children: ReactNode; id?: string; className?: string; }; diff --git a/src/components/Form/Input.tsx b/src/v1-check/components/Form/Input.tsx similarity index 89% rename from src/components/Form/Input.tsx rename to src/v1-check/components/Form/Input.tsx index d65a7ec..91baca4 100644 --- a/src/components/Form/Input.tsx +++ b/src/v1-check/components/Form/Input.tsx @@ -1,7 +1,7 @@ -import { InputHTMLAttributes } from 'react'; -import styled from 'styled-components'; -import colors from 'styles/colors'; -import { InputSize, applySize } from 'styles/dimensions'; +import { type InputHTMLAttributes } from 'react'; +import styled from '@emotion/styled'; +import colors from 'v1-check/styles/colors'; +import { type InputSize, applySize } from 'v1-check/styles/dimensions'; type Orientation = 'horizontal' | 'vertical'; diff --git a/src/components/Form/Modal.tsx b/src/v1-check/components/Form/Modal.tsx similarity index 90% rename from src/components/Form/Modal.tsx rename to src/v1-check/components/Form/Modal.tsx index 16a0b99..2e967ef 100644 --- a/src/components/Form/Modal.tsx +++ b/src/v1-check/components/Form/Modal.tsx @@ -1,11 +1,12 @@ import React from 'react'; +import type { ReactNode } from 'react'; import ReactDOM from 'react-dom'; -import styled from 'styled-components'; -import colors from 'styles/colors'; -import Button from 'components/Form/Button'; +import styled from '@emotion/styled'; +import colors from 'v1-check/styles/colors'; +import Button from 'v1-check/components/Form/Button'; interface ModalProps { - children: React.ReactNode; + children: ReactNode; isOpen: boolean; closeModal: () => void; } diff --git a/src/components/Form/Nav.tsx b/src/v1-check/components/Form/Nav.tsx similarity index 69% rename from src/components/Form/Nav.tsx rename to src/v1-check/components/Form/Nav.tsx index 2c7825d..76edc7b 100644 --- a/src/components/Form/Nav.tsx +++ b/src/v1-check/components/Form/Nav.tsx @@ -1,9 +1,9 @@ -import styled from 'styled-components'; +import styled from '@emotion/styled'; +import type { ReactNode } from 'react'; -import { StyledCard } from 'components/Form/Card'; -import Heading from 'components/Form/Heading'; -import colors from 'styles/colors'; -import { ReactNode } from 'react'; +import { StyledCard } from 'v1-check/components/Form/Card'; +import Heading from 'v1-check/components/Form/Heading'; +import colors from 'v1-check/styles/colors'; const Header = styled(StyledCard)` margin: 1rem auto; diff --git a/src/components/Form/Row.tsx b/src/v1-check/components/Form/Row.tsx similarity index 90% rename from src/components/Form/Row.tsx rename to src/v1-check/components/Form/Row.tsx index 15724fe..79ad91a 100644 --- a/src/components/Form/Row.tsx +++ b/src/v1-check/components/Form/Row.tsx @@ -1,7 +1,7 @@ -import { ReactNode } from 'react'; -import styled from 'styled-components'; -import colors from 'styles/colors'; -import Heading from 'components/Form/Heading'; +import type { ReactNode } from 'react'; +import styled from '@emotion/styled'; +import colors from 'v1-check/styles/colors'; +import Heading from 'v1-check/components/Form/Heading'; export interface RowProps { lbl: string, @@ -20,6 +20,7 @@ export const StyledRow = styled.div` justify-content: space-between; flex-wrap: wrap; padding: 0.25rem; + &li { border-bottom: 1px dashed ${colors.primaryTransparent} !important; } &:not(:last-child) { border-bottom: 1px solid ${colors.primary}; } span.lbl { font-weight: bold; } span.val { @@ -33,10 +34,6 @@ export const StyledRow = styled.div` } `; -const StyledExpandableRow = styled(StyledRow).attrs({ - as: "summary" -})``; - export const Details = styled.details` transition: all 0.2s ease-in-out; summary { @@ -61,12 +58,6 @@ const SubRowList = styled.ul` background: ${colors.primaryTransparent}; `; -const SubRow = styled(StyledRow).attrs({ - as: "li" -})` - border-bottom: 1px dashed ${colors.primaryTransparent} !important; -`; - const PlainText = styled.pre` background: ${colors.background}; width: 95%; @@ -150,15 +141,15 @@ export const ExpandableRow = (props: RowProps) => { const { lbl, val, title, rowList, open } = props; return (
- + {lbl} {val.toString()} - + { rowList && { rowList?.map((row: RowProps, index: number) => { return ( - + {row.lbl} copyToClipboard(row.val)}> {formatValue(row.val)} @@ -169,7 +160,7 @@ export const ExpandableRow = (props: RowProps) => {
  • {snip(listItem)}
  • ))} )} -
    + ) })}
    diff --git a/src/components/Results/Archives.tsx b/src/v1-check/components/Results/Archives.tsx similarity index 85% rename from src/components/Results/Archives.tsx rename to src/v1-check/components/Results/Archives.tsx index efa1ea5..df6e305 100644 --- a/src/components/Results/Archives.tsx +++ b/src/v1-check/components/Results/Archives.tsx @@ -1,7 +1,7 @@ -import styled from 'styled-components'; -import colors from 'styles/colors'; -import { Card } from 'components/Form/Card'; -import Row from 'components/Form/Row'; +import styled from '@emotion/styled'; +import colors from 'v1-check/styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; +import Row from 'v1-check/components/Form/Row'; const Note = styled.small` opacity: 0.5; diff --git a/src/components/Results/BlockLists.tsx b/src/v1-check/components/Results/BlockLists.tsx similarity index 85% rename from src/components/Results/BlockLists.tsx rename to src/v1-check/components/Results/BlockLists.tsx index b6cf572..8a36408 100644 --- a/src/components/Results/BlockLists.tsx +++ b/src/v1-check/components/Results/BlockLists.tsx @@ -1,6 +1,6 @@ -import { Card } from 'components/Form/Card'; -import Row from 'components/Form/Row'; +import { Card } from 'v1-check/components/Form/Card'; +import Row from 'v1-check/components/Form/Row'; const BlockListsCard = (props: {data: any, title: string, actionButtons: any }): JSX.Element => { const blockLists = props.data.blocklists; diff --git a/src/components/Results/BuiltWith.tsx b/src/v1-check/components/Results/BuiltWith.tsx similarity index 84% rename from src/components/Results/BuiltWith.tsx rename to src/v1-check/components/Results/BuiltWith.tsx index 59a06d9..2c0afb8 100644 --- a/src/components/Results/BuiltWith.tsx +++ b/src/v1-check/components/Results/BuiltWith.tsx @@ -1,9 +1,9 @@ -import styled from 'styled-components'; -import { TechnologyGroup, Technology } from 'utils/result-processor'; -import colors from 'styles/colors'; -import Card from 'components/Form/Card'; -import Heading from 'components/Form/Heading'; +import styled from '@emotion/styled'; +import type { TechnologyGroup, Technology } from 'v1-check/utils/result-processor'; +import colors from 'v1-check/styles/colors'; +import Card from 'v1-check/components/Form/Card'; +import Heading from 'v1-check/components/Form/Heading'; const Outer = styled(Card)` grid-row: span 2 diff --git a/src/components/Results/CarbonFootprint.tsx b/src/v1-check/components/Results/CarbonFootprint.tsx similarity index 90% rename from src/components/Results/CarbonFootprint.tsx rename to src/v1-check/components/Results/CarbonFootprint.tsx index ead7b9c..a4c1347 100644 --- a/src/components/Results/CarbonFootprint.tsx +++ b/src/v1-check/components/Results/CarbonFootprint.tsx @@ -1,8 +1,8 @@ import { useEffect, useState } from 'react'; -import styled from 'styled-components'; -import { Card } from 'components/Form/Card'; -import Row from 'components/Form/Row'; -import colors from 'styles/colors'; +import styled from '@emotion/styled'; +import { Card } from 'v1-check/components/Form/Card'; +import Row from 'v1-check/components/Form/Row'; +import colors from 'v1-check/styles/colors'; const LearnMoreInfo = styled.p` font-size: 0.8rem; diff --git a/src/components/Results/ContentLinks.tsx b/src/v1-check/components/Results/ContentLinks.tsx similarity index 90% rename from src/components/Results/ContentLinks.tsx rename to src/v1-check/components/Results/ContentLinks.tsx index 87df6c1..d5c3dc7 100644 --- a/src/components/Results/ContentLinks.tsx +++ b/src/v1-check/components/Results/ContentLinks.tsx @@ -1,7 +1,7 @@ -import { Card } from 'components/Form/Card'; -import Row from 'components/Form/Row'; -import Heading from 'components/Form/Heading'; -import colors from 'styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; +import Row from 'v1-check/components/Form/Row'; +import Heading from 'v1-check/components/Form/Heading'; +import colors from 'v1-check/styles/colors'; const cardStyles = ` small { margin-top: 1rem; opacity: 0.5; } diff --git a/src/components/Results/Cookies.tsx b/src/v1-check/components/Results/Cookies.tsx similarity index 90% rename from src/components/Results/Cookies.tsx rename to src/v1-check/components/Results/Cookies.tsx index a4f59e8..ce879a1 100644 --- a/src/components/Results/Cookies.tsx +++ b/src/v1-check/components/Results/Cookies.tsx @@ -1,6 +1,6 @@ -import { Card } from 'components/Form/Card'; -import { ExpandableRow } from 'components/Form/Row'; -import { Cookie } from 'utils/result-processor'; +import { Card } from 'v1-check/components/Form/Card'; +import { ExpandableRow } from 'v1-check/components/Form/Row'; +import type { Cookie } from 'v1-check/utils/result-processor'; export const parseHeaderCookies = (cookiesHeader: string[]): Cookie[] => { if (!cookiesHeader || !cookiesHeader.length) return []; diff --git a/src/components/Results/DnsRecords.tsx b/src/v1-check/components/Results/DnsRecords.tsx similarity index 89% rename from src/components/Results/DnsRecords.tsx rename to src/v1-check/components/Results/DnsRecords.tsx index b752a5c..8280f4b 100644 --- a/src/components/Results/DnsRecords.tsx +++ b/src/v1-check/components/Results/DnsRecords.tsx @@ -1,5 +1,5 @@ -import { Card } from 'components/Form/Card'; -import Row, { ListRow } from 'components/Form/Row'; +import { Card } from 'v1-check/components/Form/Card'; +import Row, { ListRow } from 'v1-check/components/Form/Row'; const styles = ` grid-row: span 2; diff --git a/src/components/Results/DnsSec.tsx b/src/v1-check/components/Results/DnsSec.tsx similarity index 96% rename from src/components/Results/DnsSec.tsx rename to src/v1-check/components/Results/DnsSec.tsx index 5a49cf8..337b326 100644 --- a/src/components/Results/DnsSec.tsx +++ b/src/v1-check/components/Results/DnsSec.tsx @@ -1,7 +1,7 @@ -import { Card } from 'components/Form/Card'; -import Row, { ExpandableRow, RowProps } from 'components/Form/Row'; -import Heading from 'components/Form/Heading'; -import colors from 'styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; +import Row, { ExpandableRow, type RowProps } from 'v1-check/components/Form/Row'; +import Heading from 'v1-check/components/Form/Heading'; +import colors from 'v1-check/styles/colors'; diff --git a/src/components/Results/DnsServer.tsx b/src/v1-check/components/Results/DnsServer.tsx similarity index 86% rename from src/components/Results/DnsServer.tsx rename to src/v1-check/components/Results/DnsServer.tsx index 2a3395e..c69c844 100644 --- a/src/components/Results/DnsServer.tsx +++ b/src/v1-check/components/Results/DnsServer.tsx @@ -1,8 +1,8 @@ -import { Card } from 'components/Form/Card'; -import Heading from 'components/Form/Heading'; -import Row from 'components/Form/Row'; -import colors from 'styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; +import Heading from 'v1-check/components/Form/Heading'; +import Row from 'v1-check/components/Form/Row'; +import colors from 'v1-check/styles/colors'; const cardStyles = ` small { diff --git a/src/components/Results/DomainLookup.tsx b/src/v1-check/components/Results/DomainLookup.tsx similarity index 89% rename from src/components/Results/DomainLookup.tsx rename to src/v1-check/components/Results/DomainLookup.tsx index 9300b4b..511ad90 100644 --- a/src/components/Results/DomainLookup.tsx +++ b/src/v1-check/components/Results/DomainLookup.tsx @@ -1,7 +1,7 @@ -import colors from 'styles/colors'; -import { Card } from 'components/Form/Card'; -import Row from 'components/Form/Row'; +import colors from 'v1-check/styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; +import Row from 'v1-check/components/Form/Row'; const cardStyles = ` span.val { diff --git a/src/components/Results/Firewall.tsx b/src/v1-check/components/Results/Firewall.tsx similarity index 81% rename from src/components/Results/Firewall.tsx rename to src/v1-check/components/Results/Firewall.tsx index 080b87d..94b085a 100644 --- a/src/components/Results/Firewall.tsx +++ b/src/v1-check/components/Results/Firewall.tsx @@ -1,6 +1,6 @@ -import styled from 'styled-components'; -import { Card } from 'components/Form/Card'; -import Row from 'components/Form/Row'; +import styled from '@emotion/styled'; +import { Card } from 'v1-check/components/Form/Card'; +import Row from 'v1-check/components/Form/Row'; const Note = styled.small` opacity: 0.5; diff --git a/src/components/Results/Headers.tsx b/src/v1-check/components/Results/Headers.tsx similarity index 77% rename from src/components/Results/Headers.tsx rename to src/v1-check/components/Results/Headers.tsx index 56f5a9f..0b2d289 100644 --- a/src/components/Results/Headers.tsx +++ b/src/v1-check/components/Results/Headers.tsx @@ -1,6 +1,6 @@ -import { Card } from 'components/Form/Card'; -import Row from 'components/Form/Row'; -import { ReactNode } from 'react'; +import { Card } from 'v1-check/components/Form/Card'; +import Row from 'v1-check/components/Form/Row'; +import type { ReactNode } from 'react'; const HeadersCard = (props: { data: any, title: string, actionButtons: ReactNode }): JSX.Element => { const headers = props.data; diff --git a/src/components/Results/HostNames.tsx b/src/v1-check/components/Results/HostNames.tsx similarity index 81% rename from src/components/Results/HostNames.tsx rename to src/v1-check/components/Results/HostNames.tsx index 45e20b6..f24435e 100644 --- a/src/components/Results/HostNames.tsx +++ b/src/v1-check/components/Results/HostNames.tsx @@ -1,9 +1,9 @@ -import styled from 'styled-components'; -import { HostNames } from 'utils/result-processor'; -import colors from 'styles/colors'; -import { Card } from 'components/Form/Card'; -import Heading from 'components/Form/Heading'; +import styled from '@emotion/styled'; +import type { HostNames } from 'v1-check/utils/result-processor'; +import colors from 'v1-check/styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; +import Heading from 'v1-check/components/Form/Heading'; const Row = styled.div` display: flex; diff --git a/src/components/Results/Hsts.tsx b/src/v1-check/components/Results/Hsts.tsx similarity index 91% rename from src/components/Results/Hsts.tsx rename to src/v1-check/components/Results/Hsts.tsx index 5ff0fe5..7060dfa 100644 --- a/src/components/Results/Hsts.tsx +++ b/src/v1-check/components/Results/Hsts.tsx @@ -1,6 +1,6 @@ -import { Card } from 'components/Form/Card'; -import Row, { RowProps } from 'components/Form/Row'; +import { Card } from 'v1-check/components/Form/Card'; +import Row, { type RowProps } from 'v1-check/components/Form/Row'; const cardStyles = ''; diff --git a/src/components/Results/HttpSecurity.tsx b/src/v1-check/components/Results/HttpSecurity.tsx similarity index 87% rename from src/components/Results/HttpSecurity.tsx rename to src/v1-check/components/Results/HttpSecurity.tsx index 20c0f49..6c4021d 100644 --- a/src/components/Results/HttpSecurity.tsx +++ b/src/v1-check/components/Results/HttpSecurity.tsx @@ -1,5 +1,5 @@ -import { Card } from 'components/Form/Card'; -import Row from 'components/Form/Row'; +import { Card } from 'v1-check/components/Form/Card'; +import Row from 'v1-check/components/Form/Row'; const HttpSecurityCard = (props: { data: any, title: string, actionButtons: any }): JSX.Element => { const data = props.data; diff --git a/src/components/Results/Lighthouse.tsx b/src/v1-check/components/Results/Lighthouse.tsx similarity index 92% rename from src/components/Results/Lighthouse.tsx rename to src/v1-check/components/Results/Lighthouse.tsx index bc45cc5..d44500c 100644 --- a/src/components/Results/Lighthouse.tsx +++ b/src/v1-check/components/Results/Lighthouse.tsx @@ -1,5 +1,5 @@ -import { Card } from 'components/Form/Card'; -import { ExpandableRow } from 'components/Form/Row'; +import { Card } from 'v1-check/components/Form/Card'; +import { ExpandableRow } from 'v1-check/components/Form/Row'; const processScore = (percentile: number) => { return `${Math.round(percentile * 100)}%`; diff --git a/src/components/Results/MailConfig.tsx b/src/v1-check/components/Results/MailConfig.tsx similarity index 89% rename from src/components/Results/MailConfig.tsx rename to src/v1-check/components/Results/MailConfig.tsx index fddfe6a..fccf370 100644 --- a/src/components/Results/MailConfig.tsx +++ b/src/v1-check/components/Results/MailConfig.tsx @@ -1,8 +1,8 @@ -import { Card } from 'components/Form/Card'; -import Row from 'components/Form/Row'; -import Heading from 'components/Form/Heading'; -import colors from 'styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; +import Row from 'v1-check/components/Form/Row'; +import Heading from 'v1-check/components/Form/Heading'; +import colors from 'v1-check/styles/colors'; const cardStyles = ``; diff --git a/src/components/Results/OpenPorts.tsx b/src/v1-check/components/Results/OpenPorts.tsx similarity index 86% rename from src/components/Results/OpenPorts.tsx rename to src/v1-check/components/Results/OpenPorts.tsx index 7362c70..f404f42 100644 --- a/src/components/Results/OpenPorts.tsx +++ b/src/v1-check/components/Results/OpenPorts.tsx @@ -1,5 +1,5 @@ -import { Card } from 'components/Form/Card'; -import Row from 'components/Form/Row'; +import { Card } from 'v1-check/components/Form/Card'; +import Row from 'v1-check/components/Form/Row'; const cardStyles = ` small { margin-top: 1rem; opacity: 0.5; } diff --git a/src/components/Results/Rank.tsx b/src/v1-check/components/Results/Rank.tsx similarity index 94% rename from src/components/Results/Rank.tsx rename to src/v1-check/components/Results/Rank.tsx index bf70534..d38377f 100644 --- a/src/components/Results/Rank.tsx +++ b/src/v1-check/components/Results/Rank.tsx @@ -1,8 +1,8 @@ import { AreaChart, Area, Tooltip, CartesianGrid, ResponsiveContainer } from 'recharts'; -import colors from 'styles/colors'; -import { Card } from 'components/Form/Card'; -import Row from 'components/Form/Row'; +import colors from 'v1-check/styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; +import Row from 'v1-check/components/Form/Row'; const cardStyles = ` span.val { diff --git a/src/components/Results/Redirects.tsx b/src/v1-check/components/Results/Redirects.tsx similarity index 87% rename from src/components/Results/Redirects.tsx rename to src/v1-check/components/Results/Redirects.tsx index e3c67cd..7af5585 100644 --- a/src/components/Results/Redirects.tsx +++ b/src/v1-check/components/Results/Redirects.tsx @@ -1,6 +1,6 @@ -import colors from 'styles/colors'; -import { Card } from 'components/Form/Card'; -import Row from 'components/Form/Row'; +import colors from 'v1-check/styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; +import Row from 'v1-check/components/Form/Row'; const cardStyles = ` div { diff --git a/src/components/Results/RobotsTxt.tsx b/src/v1-check/components/Results/RobotsTxt.tsx similarity index 85% rename from src/components/Results/RobotsTxt.tsx rename to src/v1-check/components/Results/RobotsTxt.tsx index 4568e87..c0542ff 100644 --- a/src/components/Results/RobotsTxt.tsx +++ b/src/v1-check/components/Results/RobotsTxt.tsx @@ -1,6 +1,6 @@ -import { Card } from 'components/Form/Card'; -import Row, { RowProps } from 'components/Form/Row'; +import { Card } from 'v1-check/components/Form/Card'; +import Row, { type RowProps } from 'v1-check/components/Form/Row'; const cardStyles = ` grid-row: span 2; diff --git a/src/components/Results/Screenshot.tsx b/src/v1-check/components/Results/Screenshot.tsx similarity index 92% rename from src/components/Results/Screenshot.tsx rename to src/v1-check/components/Results/Screenshot.tsx index 6b1bfa7..26f0e34 100644 --- a/src/components/Results/Screenshot.tsx +++ b/src/v1-check/components/Results/Screenshot.tsx @@ -1,4 +1,4 @@ -import { Card } from 'components/Form/Card'; +import { Card } from 'v1-check/components/Form/Card'; const cardStyles = ` overflow: auto; diff --git a/src/components/Results/SecurityTxt.tsx b/src/v1-check/components/Results/SecurityTxt.tsx similarity index 92% rename from src/components/Results/SecurityTxt.tsx rename to src/v1-check/components/Results/SecurityTxt.tsx index 07dd871..67ea14a 100644 --- a/src/components/Results/SecurityTxt.tsx +++ b/src/v1-check/components/Results/SecurityTxt.tsx @@ -1,7 +1,7 @@ -import { Card } from 'components/Form/Card'; -import Row, { Details } from 'components/Form/Row'; -import colors from 'styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; +import Row, { Details } from 'v1-check/components/Form/Row'; +import colors from 'v1-check/styles/colors'; const cardStyles = ` small { diff --git a/src/components/Results/ServerInfo.tsx b/src/v1-check/components/Results/ServerInfo.tsx similarity index 81% rename from src/components/Results/ServerInfo.tsx rename to src/v1-check/components/Results/ServerInfo.tsx index 757b313..647bbb0 100644 --- a/src/components/Results/ServerInfo.tsx +++ b/src/v1-check/components/Results/ServerInfo.tsx @@ -1,6 +1,6 @@ -import { ServerInfo } from 'utils/result-processor'; -import { Card } from 'components/Form/Card'; -import Row from 'components/Form/Row'; +import type { ServerInfo } from 'v1-check/utils/result-processor'; +import { Card } from 'v1-check/components/Form/Card'; +import Row from 'v1-check/components/Form/Row'; const ServerInfoCard = (props: { data: ServerInfo, title: string, actionButtons: any }): JSX.Element => { const info = props.data; diff --git a/src/components/Results/ServerLocation.tsx b/src/v1-check/components/Results/ServerLocation.tsx similarity index 77% rename from src/components/Results/ServerLocation.tsx rename to src/v1-check/components/Results/ServerLocation.tsx index a3e0e58..9e04493 100644 --- a/src/components/Results/ServerLocation.tsx +++ b/src/v1-check/components/Results/ServerLocation.tsx @@ -1,11 +1,11 @@ -import styled from 'styled-components'; -import { ServerLocation } from 'utils/result-processor'; -import { Card } from 'components/Form/Card'; -import LocationMap from 'components/misc/LocationMap'; -import Flag from 'components/misc/Flag'; -import { TextSizes } from 'styles/typography'; -import Row, { StyledRow } from 'components/Form/Row'; +import styled from '@emotion/styled'; +import type { ServerLocation } from 'v1-check/utils/result-processor'; +import { Card } from 'v1-check/components/Form/Card'; +import LocationMap from 'v1-check/components/misc/LocationMap'; +import Flag from 'v1-check/components/misc/Flag'; +import { TextSizes } from 'v1-check/styles/typography'; +import Row, { StyledRow } from 'v1-check/components/Form/Row'; const cardStyles = ''; diff --git a/src/components/Results/ServerStatus.tsx b/src/v1-check/components/Results/ServerStatus.tsx similarity index 84% rename from src/components/Results/ServerStatus.tsx rename to src/v1-check/components/Results/ServerStatus.tsx index dc7ba01..50775dc 100644 --- a/src/components/Results/ServerStatus.tsx +++ b/src/v1-check/components/Results/ServerStatus.tsx @@ -1,7 +1,7 @@ -import colors from 'styles/colors'; -import { Card } from 'components/Form/Card'; -import Row from 'components/Form/Row'; +import colors from 'v1-check/styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; +import Row from 'v1-check/components/Form/Row'; const cardStyles = ` span.val { diff --git a/src/components/Results/SiteFeatures.tsx b/src/v1-check/components/Results/SiteFeatures.tsx similarity index 89% rename from src/components/Results/SiteFeatures.tsx rename to src/v1-check/components/Results/SiteFeatures.tsx index 53b34c7..d40af07 100644 --- a/src/components/Results/SiteFeatures.tsx +++ b/src/v1-check/components/Results/SiteFeatures.tsx @@ -1,7 +1,7 @@ -import { Card } from 'components/Form/Card'; -import colors from 'styles/colors'; -import Row from 'components/Form/Row'; -import Heading from 'components/Form/Heading'; +import { Card } from 'v1-check/components/Form/Card'; +import colors from 'v1-check/styles/colors'; +import Row from 'v1-check/components/Form/Row'; +import Heading from 'v1-check/components/Form/Heading'; const styles = ` .content { diff --git a/src/components/Results/Sitemap.tsx b/src/v1-check/components/Results/Sitemap.tsx similarity index 91% rename from src/components/Results/Sitemap.tsx rename to src/v1-check/components/Results/Sitemap.tsx index 6720d83..fd35451 100644 --- a/src/components/Results/Sitemap.tsx +++ b/src/v1-check/components/Results/Sitemap.tsx @@ -1,7 +1,7 @@ -import { Card } from 'components/Form/Card'; -import Row, { ExpandableRow } from 'components/Form/Row'; -import colors from 'styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; +import Row, { ExpandableRow } from 'v1-check/components/Form/Row'; +import colors from 'v1-check/styles/colors'; const cardStyles = ` max-height: 50rem; diff --git a/src/components/Results/SocialTags.tsx b/src/v1-check/components/Results/SocialTags.tsx similarity index 91% rename from src/components/Results/SocialTags.tsx rename to src/v1-check/components/Results/SocialTags.tsx index d22dc0c..2a5c4f8 100644 --- a/src/components/Results/SocialTags.tsx +++ b/src/v1-check/components/Results/SocialTags.tsx @@ -1,7 +1,7 @@ -import { Card } from 'components/Form/Card'; -import Row from 'components/Form/Row'; -import colors from 'styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; +import Row from 'v1-check/components/Form/Row'; +import colors from 'v1-check/styles/colors'; const cardStyles = ` .banner-image img { diff --git a/src/components/Results/SslCert.tsx b/src/v1-check/components/Results/SslCert.tsx similarity index 94% rename from src/components/Results/SslCert.tsx rename to src/v1-check/components/Results/SslCert.tsx index cd2992d..34d45e0 100644 --- a/src/components/Results/SslCert.tsx +++ b/src/v1-check/components/Results/SslCert.tsx @@ -1,8 +1,8 @@ -import styled from 'styled-components'; -import colors from 'styles/colors'; -import { Card } from 'components/Form/Card'; -import Heading from 'components/Form/Heading'; +import styled from '@emotion/styled'; +import colors from 'v1-check/styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; +import Heading from 'v1-check/components/Form/Heading'; const Row = styled.div` display: flex; diff --git a/src/components/Results/TechStack.tsx b/src/v1-check/components/Results/TechStack.tsx similarity index 93% rename from src/components/Results/TechStack.tsx rename to src/v1-check/components/Results/TechStack.tsx index 2771c84..a734e3f 100644 --- a/src/components/Results/TechStack.tsx +++ b/src/v1-check/components/Results/TechStack.tsx @@ -1,8 +1,8 @@ -import styled from 'styled-components'; -import { Card } from 'components/Form/Card'; -import Heading from 'components/Form/Heading'; -import colors from 'styles/colors'; +import styled from '@emotion/styled'; +import { Card } from 'v1-check/components/Form/Card'; +import Heading from 'v1-check/components/Form/Heading'; +import colors from 'v1-check/styles/colors'; const cardStyles = ` grid-row: span 2; diff --git a/src/components/Results/Threats.tsx b/src/v1-check/components/Results/Threats.tsx similarity index 94% rename from src/components/Results/Threats.tsx rename to src/v1-check/components/Results/Threats.tsx index 1b8d0ce..d1b7850 100644 --- a/src/components/Results/Threats.tsx +++ b/src/v1-check/components/Results/Threats.tsx @@ -1,8 +1,8 @@ -import styled from 'styled-components'; -import colors from 'styles/colors'; -import { Card } from 'components/Form/Card'; -import Row, { ExpandableRow } from 'components/Form/Row'; +import styled from '@emotion/styled'; +import colors from 'v1-check/styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; +import Row, { ExpandableRow } from 'v1-check/components/Form/Row'; const Expandable = styled.details` margin-top: 0.5rem; diff --git a/src/components/Results/TlsCipherSuites.tsx b/src/v1-check/components/Results/TlsCipherSuites.tsx similarity index 93% rename from src/components/Results/TlsCipherSuites.tsx rename to src/v1-check/components/Results/TlsCipherSuites.tsx index fcf4266..f1dad13 100644 --- a/src/components/Results/TlsCipherSuites.tsx +++ b/src/v1-check/components/Results/TlsCipherSuites.tsx @@ -1,8 +1,8 @@ import { useState, useEffect } from 'react'; -import { Card } from 'components/Form/Card'; -import Button from 'components/Form/Button'; -import { ExpandableRow } from 'components/Form/Row'; +import { Card } from 'v1-check/components/Form/Card'; +import Button from 'v1-check/components/Form/Button'; +import { ExpandableRow } from 'v1-check/components/Form/Row'; const makeCipherSuites = (results: any) => { if (!results || !results.connection_info || (results.connection_info.ciphersuite || [])?.length === 0) { diff --git a/src/components/Results/TlsClientSupport.tsx b/src/v1-check/components/Results/TlsClientSupport.tsx similarity index 94% rename from src/components/Results/TlsClientSupport.tsx rename to src/v1-check/components/Results/TlsClientSupport.tsx index 7682fa9..fcfa0a9 100644 --- a/src/components/Results/TlsClientSupport.tsx +++ b/src/v1-check/components/Results/TlsClientSupport.tsx @@ -1,8 +1,8 @@ import { useState, useEffect } from 'react'; -import { Card } from 'components/Form/Card'; -import Button from 'components/Form/Button'; -import { ExpandableRow } from 'components/Form/Row'; +import { Card } from 'v1-check/components/Form/Card'; +import Button from 'v1-check/components/Form/Button'; +import { ExpandableRow } from 'v1-check/components/Form/Row'; const makeClientSupport = (results: any) => { if (!results?.analysis) return []; diff --git a/src/components/Results/TlsIssueAnalysis.tsx b/src/v1-check/components/Results/TlsIssueAnalysis.tsx similarity index 95% rename from src/components/Results/TlsIssueAnalysis.tsx rename to src/v1-check/components/Results/TlsIssueAnalysis.tsx index ddee3e4..2030b24 100644 --- a/src/components/Results/TlsIssueAnalysis.tsx +++ b/src/v1-check/components/Results/TlsIssueAnalysis.tsx @@ -1,10 +1,10 @@ import { useState, useEffect } from 'react'; -import styled from 'styled-components'; -import colors from 'styles/colors'; -import { Card } from 'components/Form/Card'; -import Button from 'components/Form/Button'; -import Row, { ExpandableRow } from 'components/Form/Row'; +import styled from '@emotion/styled'; +import colors from 'v1-check/styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; +import Button from 'v1-check/components/Form/Button'; +import Row, { ExpandableRow } from 'v1-check/components/Form/Row'; const Expandable = styled.details` margin-top: 0.5rem; diff --git a/src/components/Results/TraceRoute.tsx b/src/v1-check/components/Results/TraceRoute.tsx similarity index 91% rename from src/components/Results/TraceRoute.tsx rename to src/v1-check/components/Results/TraceRoute.tsx index de89c5d..be7bb33 100644 --- a/src/components/Results/TraceRoute.tsx +++ b/src/v1-check/components/Results/TraceRoute.tsx @@ -1,6 +1,6 @@ -import styled from 'styled-components'; -import colors from 'styles/colors'; -import { Card } from 'components/Form/Card'; +import styled from '@emotion/styled'; +import colors from 'v1-check/styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; const RouteRow = styled.div` text-align: center; diff --git a/src/components/Results/TxtRecords.tsx b/src/v1-check/components/Results/TxtRecords.tsx similarity index 86% rename from src/components/Results/TxtRecords.tsx rename to src/v1-check/components/Results/TxtRecords.tsx index a3eaf2c..c509e31 100644 --- a/src/components/Results/TxtRecords.tsx +++ b/src/v1-check/components/Results/TxtRecords.tsx @@ -1,6 +1,6 @@ -import { Card } from 'components/Form/Card'; -import Row from 'components/Form/Row'; +import { Card } from 'v1-check/components/Form/Card'; +import Row from 'v1-check/components/Form/Row'; const cardStyles = ` grid-column: span 2; diff --git a/src/components/Results/WhoIs.tsx b/src/v1-check/components/Results/WhoIs.tsx similarity index 87% rename from src/components/Results/WhoIs.tsx rename to src/v1-check/components/Results/WhoIs.tsx index 4766d14..c8e1b77 100644 --- a/src/components/Results/WhoIs.tsx +++ b/src/v1-check/components/Results/WhoIs.tsx @@ -1,9 +1,9 @@ -import styled from 'styled-components'; -import { Whois } from 'utils/result-processor'; -import colors from 'styles/colors'; -import { Card } from 'components/Form/Card'; -import Heading from 'components/Form/Heading'; +import styled from '@emotion/styled'; +import type { Whois } from 'v1-check/utils/result-processor'; +import colors from 'v1-check/styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; +import Heading from 'v1-check/components/Form/Heading'; const Row = styled.div` display: flex; diff --git a/src/components/misc/ActionButtons.tsx b/src/v1-check/components/misc/ActionButtons.tsx similarity index 89% rename from src/components/misc/ActionButtons.tsx rename to src/v1-check/components/misc/ActionButtons.tsx index 4895c5c..82c313b 100644 --- a/src/components/misc/ActionButtons.tsx +++ b/src/v1-check/components/misc/ActionButtons.tsx @@ -1,6 +1,6 @@ -import styled from 'styled-components'; -import Button from 'components/Form/Button'; -import colors from 'styles/colors'; +import styled from '@emotion/styled'; +import Button from 'v1-check/components/Form/Button'; +import colors from 'v1-check/styles/colors'; const ActionButtonContainer = styled.div` position: absolute; diff --git a/src/components/misc/AdditionalResources.tsx b/src/v1-check/components/misc/AdditionalResources.tsx similarity index 98% rename from src/components/misc/AdditionalResources.tsx rename to src/v1-check/components/misc/AdditionalResources.tsx index 8487a2f..ce7e52b 100644 --- a/src/components/misc/AdditionalResources.tsx +++ b/src/v1-check/components/misc/AdditionalResources.tsx @@ -1,6 +1,6 @@ -import styled from 'styled-components'; -import colors from 'styles/colors'; -import { Card } from 'components/Form/Card'; +import styled from '@emotion/styled'; +import colors from 'v1-check/styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; const ResourceListOuter = styled.ul` list-style: none; diff --git a/src/components/misc/DocContent.tsx b/src/v1-check/components/misc/DocContent.tsx similarity index 89% rename from src/components/misc/DocContent.tsx rename to src/v1-check/components/misc/DocContent.tsx index 8cdbc3b..a7f630e 100644 --- a/src/components/misc/DocContent.tsx +++ b/src/v1-check/components/misc/DocContent.tsx @@ -1,7 +1,7 @@ -import styled from 'styled-components'; -import docs, { type Doc } from 'utils/docs'; -import colors from 'styles/colors'; -import Heading from 'components/Form/Heading'; +import styled from '@emotion/styled'; +import docs, { type Doc } from 'v1-check/utils/docs'; +import colors from 'v1-check/styles/colors'; +import Heading from 'v1-check/components/Form/Heading'; const JobDocsContainer = styled.div` p.doc-desc, p.doc-uses, ul { diff --git a/src/components/misc/ErrorBoundary.tsx b/src/v1-check/components/misc/ErrorBoundary.tsx similarity index 84% rename from src/components/misc/ErrorBoundary.tsx rename to src/v1-check/components/misc/ErrorBoundary.tsx index f032159..9895103 100644 --- a/src/components/misc/ErrorBoundary.tsx +++ b/src/v1-check/components/misc/ErrorBoundary.tsx @@ -1,8 +1,8 @@ -import React, { Component, ErrorInfo, ReactNode } from "react"; -import styled from 'styled-components'; -import Card from 'components/Form/Card'; -import Heading from 'components/Form/Heading'; -import colors from 'styles/colors'; +import React, { Component, type ErrorInfo, type ReactNode } from "react"; +import styled from '@emotion/styled'; +import Card from 'v1-check/components/Form/Card'; +import Heading from 'v1-check/components/Form/Heading'; +import colors from 'v1-check/styles/colors'; interface Props { children: ReactNode; diff --git a/src/components/misc/FancyBackground.tsx b/src/v1-check/components/misc/FancyBackground.tsx similarity index 99% rename from src/components/misc/FancyBackground.tsx rename to src/v1-check/components/misc/FancyBackground.tsx index cc963a8..ce68465 100644 --- a/src/components/misc/FancyBackground.tsx +++ b/src/v1-check/components/misc/FancyBackground.tsx @@ -340,7 +340,7 @@ const FancyBackground = (): JSX.Element => { return ( -
    +

    0

    0

    0

    diff --git a/src/components/misc/Flag.tsx b/src/v1-check/components/misc/Flag.tsx similarity index 100% rename from src/components/misc/Flag.tsx rename to src/v1-check/components/misc/Flag.tsx diff --git a/src/components/misc/Footer.tsx b/src/v1-check/components/misc/Footer.tsx similarity index 94% rename from src/components/misc/Footer.tsx rename to src/v1-check/components/misc/Footer.tsx index dcf61f4..18599b5 100644 --- a/src/components/misc/Footer.tsx +++ b/src/v1-check/components/misc/Footer.tsx @@ -1,5 +1,5 @@ -import styled from 'styled-components'; -import colors from 'styles/colors'; +import styled from '@emotion/styled'; +import colors from 'v1-check/styles/colors'; const StyledFooter = styled.footer` bottom: 0; diff --git a/src/components/misc/Loader.tsx b/src/v1-check/components/misc/Loader.tsx similarity index 93% rename from src/components/misc/Loader.tsx rename to src/v1-check/components/misc/Loader.tsx index 0661368..de08867 100644 --- a/src/components/misc/Loader.tsx +++ b/src/v1-check/components/misc/Loader.tsx @@ -1,8 +1,8 @@ -import styled from 'styled-components'; +import styled from '@emotion/styled'; -import { StyledCard } from 'components/Form/Card'; -import Heading from 'components/Form/Heading'; -import colors from 'styles/colors'; +import { StyledCard } from 'v1-check/components/Form/Card'; +import Heading from 'v1-check/components/Form/Heading'; +import colors from 'v1-check/styles/colors'; const LoaderContainer = styled(StyledCard)` margin: 0 auto 1rem auto; diff --git a/src/components/misc/LocationMap.tsx b/src/v1-check/components/misc/LocationMap.tsx similarity index 91% rename from src/components/misc/LocationMap.tsx rename to src/v1-check/components/misc/LocationMap.tsx index 668c183..aad32ed 100644 --- a/src/components/misc/LocationMap.tsx +++ b/src/v1-check/components/misc/LocationMap.tsx @@ -5,8 +5,8 @@ import { Annotation, } from 'react-simple-maps'; -import colors from 'styles/colors'; -import MapFeatures from 'assets/data/map-features.json'; +import colors from 'v1-check/styles/colors'; +import MapFeatures from 'v1-check/assets/data/map-features.json'; interface Props { lat: number, diff --git a/src/components/misc/ProgressBar.tsx b/src/v1-check/components/misc/ProgressBar.tsx similarity index 98% rename from src/components/misc/ProgressBar.tsx rename to src/v1-check/components/misc/ProgressBar.tsx index 51578bd..64dac3c 100644 --- a/src/components/misc/ProgressBar.tsx +++ b/src/v1-check/components/misc/ProgressBar.tsx @@ -1,8 +1,8 @@ -import styled from 'styled-components'; -import colors from 'styles/colors'; -import Card from 'components/Form/Card'; -import Heading from 'components/Form/Heading'; -import { useState, useEffect, ReactNode } from 'react'; +import styled from '@emotion/styled'; +import colors from 'v1-check/styles/colors'; +import Card from 'v1-check/components/Form/Card'; +import Heading from 'v1-check/components/Form/Heading'; +import { useState, useEffect, type ReactNode } from 'react'; const LoadCard = styled(Card)` diff --git a/src/components/misc/SelfScanMsg.tsx b/src/v1-check/components/misc/SelfScanMsg.tsx similarity index 92% rename from src/components/misc/SelfScanMsg.tsx rename to src/v1-check/components/misc/SelfScanMsg.tsx index 2c4e3a1..6650798 100644 --- a/src/components/misc/SelfScanMsg.tsx +++ b/src/v1-check/components/misc/SelfScanMsg.tsx @@ -1,7 +1,7 @@ -import styled from 'styled-components'; -import colors from 'styles/colors'; -import { StyledCard } from 'components/Form/Card'; +import styled from '@emotion/styled'; +import colors from 'v1-check/styles/colors'; +import { StyledCard } from 'v1-check/components/Form/Card'; const StyledSelfScanMsg = styled(StyledCard)` margin: 0px auto 1rem; diff --git a/src/components/misc/ViewRaw.tsx b/src/v1-check/components/misc/ViewRaw.tsx similarity index 93% rename from src/components/misc/ViewRaw.tsx rename to src/v1-check/components/misc/ViewRaw.tsx index 206c73a..1888fef 100644 --- a/src/components/misc/ViewRaw.tsx +++ b/src/v1-check/components/misc/ViewRaw.tsx @@ -1,8 +1,8 @@ import React, { useState } from 'react'; -import styled from 'styled-components'; -import colors from 'styles/colors'; -import { Card } from 'components/Form/Card'; -import Button from 'components/Form/Button'; +import styled from '@emotion/styled'; +import colors from 'v1-check/styles/colors'; +import { Card } from 'v1-check/components/Form/Card'; +import Button from 'v1-check/components/Form/Button'; const CardStyles = ` margin: 0 auto 1rem auto; diff --git a/src/hooks/motherOfAllHooks.ts b/src/v1-check/hooks/motherOfAllHooks.ts similarity index 96% rename from src/hooks/motherOfAllHooks.ts rename to src/v1-check/hooks/motherOfAllHooks.ts index 76603e5..6359231 100644 --- a/src/hooks/motherOfAllHooks.ts +++ b/src/v1-check/hooks/motherOfAllHooks.ts @@ -2,8 +2,8 @@ import { useState, useEffect } from 'react'; import { toast } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; -import { LoadingState } from 'components/misc/ProgressBar'; -import { AddressType } from 'utils/address-type-checker'; +import type { LoadingState } from 'v1-check/components/misc/ProgressBar'; +import type { AddressType } from 'v1-check/utils/address-type-checker'; interface UseIpAddressProps { // Unique identifier for this job type diff --git a/src/styles/colors.ts b/src/v1-check/styles/colors.ts similarity index 100% rename from src/styles/colors.ts rename to src/v1-check/styles/colors.ts diff --git a/src/styles/dimensions.ts b/src/v1-check/styles/dimensions.ts similarity index 100% rename from src/styles/dimensions.ts rename to src/v1-check/styles/dimensions.ts diff --git a/src/v1-check/styles/globals.tsx b/src/v1-check/styles/globals.tsx new file mode 100644 index 0000000..579022c --- /dev/null +++ b/src/v1-check/styles/globals.tsx @@ -0,0 +1,17 @@ +import { Global, css } from '@emotion/react'; + +const GlobalStyles = () => ( + +); + +export default GlobalStyles; diff --git a/src/index.css b/src/v1-check/styles/index.css similarity index 89% rename from src/index.css rename to src/v1-check/styles/index.css index e0502ea..9b0b3a6 100644 --- a/src/index.css +++ b/src/v1-check/styles/index.css @@ -1,6 +1,6 @@ @font-face { font-family: 'PTMono'; - src: url('assets/fonts/PTMono-Regular.ttf') format('truetype'); + src: url('/fonts/PTMono-Regular.ttf') format('truetype'); font-weight: normal; font-style: normal; } @@ -17,6 +17,7 @@ body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background: #141d2b; + color: #fff; } code { @@ -44,3 +45,7 @@ svg.rsm-svg { --toastify-color-warning: #f6f000 !important; --toastify-color-error: #f80363 !important; } + +#fancy-background { + position: absolute; +} diff --git a/src/styles/typography.ts b/src/v1-check/styles/typography.ts similarity index 100% rename from src/styles/typography.ts rename to src/v1-check/styles/typography.ts diff --git a/src/typings/file-types.d.ts b/src/v1-check/typings/file-types.d.ts similarity index 100% rename from src/typings/file-types.d.ts rename to src/v1-check/typings/file-types.d.ts diff --git a/src/typings/react-simple-maps.d.ts b/src/v1-check/typings/react-simple-maps.d.ts similarity index 100% rename from src/typings/react-simple-maps.d.ts rename to src/v1-check/typings/react-simple-maps.d.ts diff --git a/src/utils/address-type-checker.ts b/src/v1-check/utils/address-type-checker.ts similarity index 100% rename from src/utils/address-type-checker.ts rename to src/v1-check/utils/address-type-checker.ts diff --git a/src/utils/docs.ts b/src/v1-check/utils/docs.ts similarity index 100% rename from src/utils/docs.ts rename to src/v1-check/utils/docs.ts diff --git a/src/v1-check/utils/get-keys.ts b/src/v1-check/utils/get-keys.ts new file mode 100644 index 0000000..71c7aaa --- /dev/null +++ b/src/v1-check/utils/get-keys.ts @@ -0,0 +1,14 @@ + +const keys = { + shodan: import.meta.env.REACT_APP_SHODAN_API_KEY || "default_value_if_not_set", + whoApi: import.meta.env.REACT_APP_WHO_API_KEY || "default_value_if_not_set", +}; +// const keys = process && process.env ? { +// shodan: process.env.REACT_APP_SHODAN_API_KEY, +// whoApi: process.env.REACT_APP_WHO_API_KEY, +// } : { +// shodan: import.meta.env.REACT_APP_SHODAN_API_KEY || "default_value_if_not_set", +// whoApi: import.meta.env.REACT_APP_WHO_API_KEY || "default_value_if_not_set", +// }; + +export default keys; diff --git a/src/utils/result-processor.ts b/src/v1-check/utils/result-processor.ts similarity index 98% rename from src/utils/result-processor.ts rename to src/v1-check/utils/result-processor.ts index 11994e1..bb63a37 100644 --- a/src/utils/result-processor.ts +++ b/src/v1-check/utils/result-processor.ts @@ -1,4 +1,4 @@ -import { RowProps } from 'components/Form/Row'; +import type { RowProps } from 'v1-check/components/Form/Row'; export interface ServerLocation { city: string, diff --git a/src/pages/About.tsx b/src/v1-check/views/About.tsx similarity index 96% rename from src/pages/About.tsx rename to src/v1-check/views/About.tsx index babdbf2..89ff43e 100644 --- a/src/pages/About.tsx +++ b/src/v1-check/views/About.tsx @@ -1,13 +1,13 @@ -import styled from 'styled-components'; +import styled from '@emotion/styled'; -import colors from 'styles/colors'; -import Heading from 'components/Form/Heading'; -import Footer from 'components/misc/Footer'; -import Nav from 'components/Form/Nav'; -import Button from 'components/Form/Button'; -import AdditionalResources from 'components/misc/AdditionalResources'; -import { StyledCard } from 'components/Form/Card'; -import docs, { about, featureIntro, license, fairUse, supportUs } from 'utils/docs'; +import colors from 'v1-check/styles/colors'; +import Heading from 'v1-check/components/Form/Heading'; +import Footer from 'v1-check/components/misc/Footer'; +import Nav from 'v1-check/components/Form/Nav'; +import Button from 'v1-check/components/Form/Button'; +import AdditionalResources from 'v1-check/components/misc/AdditionalResources'; +import { StyledCard } from 'v1-check/components/Form/Card'; +import docs, { about, featureIntro, license, fairUse, supportUs } from 'v1-check/utils/docs'; const AboutContainer = styled.div` width: 95vw; diff --git a/src/v1-check/views/App.tsx b/src/v1-check/views/App.tsx new file mode 100644 index 0000000..380da01 --- /dev/null +++ b/src/v1-check/views/App.tsx @@ -0,0 +1,24 @@ +import { Routes, Route, Outlet } from "react-router-dom"; + +import Home from 'v1-check/views/Home.tsx'; +import Results from 'v1-check/views/Results.tsx'; +import About from 'v1-check/views/About.tsx'; +import NotFound from 'v1-check/views/NotFound.tsx'; + +export default function App() { + return ( + + }> + } /> + } /> + } /> + } /> + } /> + + + ); +} + +function Layout() { + return (); +} diff --git a/src/pages/Home.tsx b/src/v1-check/views/Home.tsx similarity index 89% rename from src/pages/Home.tsx rename to src/v1-check/views/Home.tsx index bf2092f..d2dfd45 100644 --- a/src/pages/Home.tsx +++ b/src/v1-check/views/Home.tsx @@ -1,17 +1,17 @@ -import styled from 'styled-components'; -import { ChangeEvent, FormEvent, useState } from 'react'; -import { useNavigate, NavigateOptions } from 'react-router-dom'; +import styled from '@emotion/styled'; +import { type ChangeEvent, type FormEvent, useState } from 'react'; +import { useNavigate, type NavigateOptions } from 'react-router-dom'; -import Heading from 'components/Form/Heading'; -import Input from 'components/Form/Input' -import Button from 'components/Form/Button'; -import { StyledCard } from 'components/Form/Card'; -import Footer from 'components/misc/Footer'; -import FancyBackground from 'components/misc/FancyBackground'; +import Heading from 'v1-check/components/Form/Heading'; +import Input from 'v1-check/components/Form/Input' +import Button from 'v1-check/components/Form/Button'; +import { StyledCard } from 'v1-check/components/Form/Card'; +import Footer from 'v1-check/components/misc/Footer'; +import FancyBackground from 'v1-check/components/misc/FancyBackground'; -import docs from 'utils/docs'; -import colors from 'styles/colors'; -import { determineAddressType } from 'utils/address-type-checker'; +import docs from 'v1-check/utils/docs'; +import colors from 'v1-check/styles/colors'; +import { determineAddressType } from 'v1-check/utils/address-type-checker'; const HomeContainer = styled.section` display: flex; @@ -120,6 +120,7 @@ const SiteFeaturesWrapper = styled(StyledCard)` list-style: none; padding: 0 1rem; font-size: 0.9rem; + color: ${colors.textColor}; li { margin: 0.1rem 0; text-indent: -1.2rem; @@ -159,7 +160,7 @@ const Home = (): JSX.Element => { address = 'https://' + address; } const resultRouteParams: NavigateOptions = { state: { address, addressType } }; - navigate(`/results/${encodeURIComponent(address)}`, resultRouteParams); + navigate(`/check/${encodeURIComponent(address)}`, resultRouteParams); } }; @@ -252,7 +253,7 @@ const Home = (): JSX.Element => { - +
    diff --git a/src/pages/NotFound.tsx b/src/v1-check/views/NotFound.tsx similarity index 77% rename from src/pages/NotFound.tsx rename to src/v1-check/views/NotFound.tsx index 4c54645..2384942 100644 --- a/src/pages/NotFound.tsx +++ b/src/v1-check/views/NotFound.tsx @@ -1,12 +1,12 @@ -import styled from 'styled-components'; +import styled from '@emotion/styled'; -import colors from 'styles/colors'; -import Heading from 'components/Form/Heading'; -import Footer from 'components/misc/Footer'; -import Nav from 'components/Form/Nav'; -import Button from 'components/Form/Button'; -import { StyledCard } from 'components/Form/Card'; +import colors from 'v1-check/styles/colors'; +import Heading from 'v1-check/components/Form/Heading'; +import Footer from 'v1-check/components/misc/Footer'; +import Nav from 'v1-check/components/Form/Nav'; +import Button from 'v1-check/components/Form/Button'; +import { StyledCard } from 'v1-check/components/Form/Card'; const AboutContainer = styled.div` width: 95vw; diff --git a/src/pages/Results.tsx b/src/v1-check/views/Results.tsx similarity index 87% rename from src/pages/Results.tsx rename to src/v1-check/views/Results.tsx index f50a79b..5a64b44 100644 --- a/src/pages/Results.tsx +++ b/src/v1-check/views/Results.tsx @@ -1,72 +1,72 @@ -import { useState, useEffect, useCallback, ReactNode } from 'react'; +import { useState, useEffect, useCallback, type ReactNode } from 'react'; import { useParams } from 'react-router-dom'; -import styled from 'styled-components'; +import styled from '@emotion/styled'; import { ToastContainer } from 'react-toastify'; import Masonry from 'react-masonry-css' -import colors from 'styles/colors'; -import Heading from 'components/Form/Heading'; -import Modal from 'components/Form/Modal'; -import Footer from 'components/misc/Footer'; -import Nav from 'components/Form/Nav'; -import { RowProps } from 'components/Form/Row'; +import colors from 'v1-check/styles/colors'; +import Heading from 'v1-check/components/Form/Heading'; +import Modal from 'v1-check/components/Form/Modal'; +import Footer from 'v1-check/components/misc/Footer'; +import Nav from 'v1-check/components/Form/Nav'; +import type { RowProps } from 'v1-check/components/Form/Row'; -import Loader from 'components/misc/Loader'; -import ErrorBoundary from 'components/misc/ErrorBoundary'; -import SelfScanMsg from 'components/misc/SelfScanMsg'; -import DocContent from 'components/misc/DocContent'; -import ProgressBar, { LoadingJob, LoadingState, initialJobs } from 'components/misc/ProgressBar'; -import ActionButtons from 'components/misc/ActionButtons'; -import AdditionalResources from 'components/misc/AdditionalResources'; -import ViewRaw from 'components/misc/ViewRaw'; +import Loader from 'v1-check/components/misc/Loader'; +import ErrorBoundary from 'v1-check/components/misc/ErrorBoundary'; +import SelfScanMsg from 'v1-check/components/misc/SelfScanMsg'; +import DocContent from 'v1-check/components/misc/DocContent'; +import ProgressBar, { type LoadingJob, type LoadingState, initialJobs } from 'v1-check/components/misc/ProgressBar'; +import ActionButtons from 'v1-check/components/misc/ActionButtons'; +import AdditionalResources from 'v1-check/components/misc/AdditionalResources'; +import ViewRaw from 'v1-check/components/misc/ViewRaw'; -import ServerLocationCard from 'components/Results/ServerLocation'; -import ServerInfoCard from 'components/Results/ServerInfo'; -import HostNamesCard from 'components/Results/HostNames'; -import WhoIsCard from 'components/Results/WhoIs'; -import LighthouseCard from 'components/Results/Lighthouse'; -import ScreenshotCard from 'components/Results/Screenshot'; -import SslCertCard from 'components/Results/SslCert'; -import HeadersCard from 'components/Results/Headers'; -import CookiesCard from 'components/Results/Cookies'; -import RobotsTxtCard from 'components/Results/RobotsTxt'; -import DnsRecordsCard from 'components/Results/DnsRecords'; -import RedirectsCard from 'components/Results/Redirects'; -import TxtRecordCard from 'components/Results/TxtRecords'; -import ServerStatusCard from 'components/Results/ServerStatus'; -import OpenPortsCard from 'components/Results/OpenPorts'; -import TraceRouteCard from 'components/Results/TraceRoute'; -import CarbonFootprintCard from 'components/Results/CarbonFootprint'; -import SiteFeaturesCard from 'components/Results/SiteFeatures'; -import DnsSecCard from 'components/Results/DnsSec'; -import HstsCard from 'components/Results/Hsts'; -import SitemapCard from 'components/Results/Sitemap'; -import DomainLookup from 'components/Results/DomainLookup'; -import DnsServerCard from 'components/Results/DnsServer'; -import TechStackCard from 'components/Results/TechStack'; -import SecurityTxtCard from 'components/Results/SecurityTxt'; -import ContentLinksCard from 'components/Results/ContentLinks'; -import SocialTagsCard from 'components/Results/SocialTags'; -import MailConfigCard from 'components/Results/MailConfig'; -import HttpSecurityCard from 'components/Results/HttpSecurity'; -import FirewallCard from 'components/Results/Firewall'; -import ArchivesCard from 'components/Results/Archives'; -import RankCard from 'components/Results/Rank'; -import BlockListsCard from 'components/Results/BlockLists'; -import ThreatsCard from 'components/Results/Threats'; -import TlsCipherSuitesCard from 'components/Results/TlsCipherSuites'; -import TlsIssueAnalysisCard from 'components/Results/TlsIssueAnalysis'; -import TlsClientSupportCard from 'components/Results/TlsClientSupport'; +import ServerLocationCard from 'v1-check/components/Results/ServerLocation'; +import ServerInfoCard from 'v1-check/components/Results/ServerInfo'; +import HostNamesCard from 'v1-check/components/Results/HostNames'; +import WhoIsCard from 'v1-check/components/Results/WhoIs'; +import LighthouseCard from 'v1-check/components/Results/Lighthouse'; +import ScreenshotCard from 'v1-check/components/Results/Screenshot'; +import SslCertCard from 'v1-check/components/Results/SslCert'; +import HeadersCard from 'v1-check/components/Results/Headers'; +import CookiesCard from 'v1-check/components/Results/Cookies'; +import RobotsTxtCard from 'v1-check/components/Results/RobotsTxt'; +import DnsRecordsCard from 'v1-check/components/Results/DnsRecords'; +import RedirectsCard from 'v1-check/components/Results/Redirects'; +import TxtRecordCard from 'v1-check/components/Results/TxtRecords'; +import ServerStatusCard from 'v1-check/components/Results/ServerStatus'; +import OpenPortsCard from 'v1-check/components/Results/OpenPorts'; +import TraceRouteCard from 'v1-check/components/Results/TraceRoute'; +import CarbonFootprintCard from 'v1-check/components/Results/CarbonFootprint'; +import SiteFeaturesCard from 'v1-check/components/Results/SiteFeatures'; +import DnsSecCard from 'v1-check/components/Results/DnsSec'; +import HstsCard from 'v1-check/components/Results/Hsts'; +import SitemapCard from 'v1-check/components/Results/Sitemap'; +import DomainLookup from 'v1-check/components/Results/DomainLookup'; +import DnsServerCard from 'v1-check/components/Results/DnsServer'; +import TechStackCard from 'v1-check/components/Results/TechStack'; +import SecurityTxtCard from 'v1-check/components/Results/SecurityTxt'; +import ContentLinksCard from 'v1-check/components/Results/ContentLinks'; +import SocialTagsCard from 'v1-check/components/Results/SocialTags'; +import MailConfigCard from 'v1-check/components/Results/MailConfig'; +import HttpSecurityCard from 'v1-check/components/Results/HttpSecurity'; +import FirewallCard from 'v1-check/components/Results/Firewall'; +import ArchivesCard from 'v1-check/components/Results/Archives'; +import RankCard from 'v1-check/components/Results/Rank'; +import BlockListsCard from 'v1-check/components/Results/BlockLists'; +import ThreatsCard from 'v1-check/components/Results/Threats'; +import TlsCipherSuitesCard from 'v1-check/components/Results/TlsCipherSuites'; +import TlsIssueAnalysisCard from 'v1-check/components/Results/TlsIssueAnalysis'; +import TlsClientSupportCard from 'v1-check/components/Results/TlsClientSupport'; -import keys from 'utils/get-keys'; -import { determineAddressType, AddressType } from 'utils/address-type-checker'; -import useMotherHook from 'hooks/motherOfAllHooks'; +import keys from 'v1-check/utils/get-keys'; +import { determineAddressType, type AddressType } from 'v1-check/utils/address-type-checker'; +import useMotherHook from 'v1-check/hooks/motherOfAllHooks'; import { - getLocation, ServerLocation, - Cookie, - applyWhoIsResults, Whois, - parseShodanResults, ShodanResults -} from 'utils/result-processor'; + getLocation, type ServerLocation, + type Cookie, + applyWhoIsResults, type Whois, + parseShodanResults, type ShodanResults +} from 'v1-check/utils/result-processor'; const ResultsOuter = styled.div` display: flex; @@ -151,11 +151,14 @@ const FilterButtons = styled.div` } `; -const Results = (): JSX.Element => { +const Results = (props: { address?: string } ): JSX.Element => { const startTime = new Date().getTime(); + const { urlToScan } = useParams(); + const address = props.address || urlToScan || ''; + const [ addressType, setAddressType ] = useState('empt'); - const { address } = useParams(); + const [loadingJobs, setLoadingJobs] = useState(initialJobs); const [modalOpen, setModalOpen] = useState(false); @@ -247,7 +250,8 @@ const Results = (): JSX.Element => { const urlTypeOnly = ['url'] as AddressType[]; // Many jobs only run with these address types - const api = process.env.REACT_APP_API_ENDPOINT || '/api'; // Where is the API hosted? + // const api = process.env.REACT_APP_API_ENDPOINT || '/api'; // Where is the API hosted? + const api = '/api'; // Where is the API hosted? // Fetch and parse IP address for given URL const [ipAddress, setIpAddress] = useMotherHook({ @@ -876,7 +880,7 @@ const Results = (): JSX.Element => { } - { address?.includes(window?.location?.hostname || 'web-check.xyz') && } + {/* { address?.includes(window?.location?.hostname || 'web-check.xyz') && } */} job.state !== 'loading').length < 5} /> { showFilters ? <>
    diff --git a/src/v1-check/views/main.tsx b/src/v1-check/views/main.tsx new file mode 100644 index 0000000..520a1d3 --- /dev/null +++ b/src/v1-check/views/main.tsx @@ -0,0 +1,10 @@ +import { BrowserRouter } from "react-router-dom"; +import { StaticRouter } from "react-router-dom/server"; +import App from "./App.tsx"; +// import "./App.css"; + +export default ({ pathname }: { pathname: string }) => ( + import.meta.env.SSR + ? + : +)