From 20825f30008b3c0c4953e56e05011b4e244b5e2f Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 5 Nov 2023 11:33:26 +1100 Subject: [PATCH 01/39] Use remix vite plugin --- app/components/CodeBlock.tsx | 4 +- app/components/RootDocument.tsx | 2 +- app/root.tsx | 25 +------------ app/utils/documents.server.ts | 5 ++- remix.env.d.ts => env.d.ts | 2 +- package.json | 10 +++-- pnpm-lock.yaml | 45 ++++++++++++++++++++++- postcss.config.js => postcss.config.cjs | 0 remix.config.js | 9 ----- tailwind.config.js => tailwind.config.cjs | 0 tsconfig.json | 5 ++- vite.config.ts | 7 ++++ 12 files changed, 67 insertions(+), 47 deletions(-) rename remix.env.d.ts => env.d.ts (50%) rename postcss.config.js => postcss.config.cjs (100%) delete mode 100644 remix.config.js rename tailwind.config.js => tailwind.config.cjs (100%) create mode 100644 vite.config.ts diff --git a/app/components/CodeBlock.tsx b/app/components/CodeBlock.tsx index bb3b4a00..7b71fd4c 100644 --- a/app/components/CodeBlock.tsx +++ b/app/components/CodeBlock.tsx @@ -5,8 +5,8 @@ import { Highlight, Prism } from 'prism-react-renderer' import { svelteHighlighter } from '~/utils/svelteHighlighter' // Add back additional language support after `prism-react` upgrade ;(typeof global !== 'undefined' ? global : window).Prism = Prism -require('prismjs/components/prism-diff') -require('prismjs/components/prism-bash') +// require('prismjs/components/prism-diff') +// require('prismjs/components/prism-bash') // @ts-ignore Alias markup as vue highlight Prism.languages.vue = Prism.languages.markup diff --git a/app/components/RootDocument.tsx b/app/components/RootDocument.tsx index 9f7c89d9..3a49ae11 100644 --- a/app/components/RootDocument.tsx +++ b/app/components/RootDocument.tsx @@ -66,8 +66,8 @@ export function RootDocument({ {children} - +
{ export const links: LinksFunction = () => { return [ - { rel: 'stylesheet', href: styles }, - { - rel: 'stylesheet', - href: prismThemeLight, - media: '(prefers-color-scheme: light)', - }, - { - rel: 'stylesheet', - href: prismThemeDark, - media: '(prefers-color-scheme: dark)', - }, - { - rel: 'stylesheet', - href: docSearchStyles, - }, - { - rel: 'stylesheet', - href: carbonStyles, - }, { rel: 'apple-touch-icon', sizes: '180x180', diff --git a/app/utils/documents.server.ts b/app/utils/documents.server.ts index 2bc7b1c7..138ee890 100644 --- a/app/utils/documents.server.ts +++ b/app/utils/documents.server.ts @@ -1,5 +1,6 @@ import fsp from 'node:fs/promises' import path from 'node:path' +import { fileURLToPath } from 'node:url' import { bundleMDX } from 'mdx-bundler' import * as graymatter from 'gray-matter' import { fetchCached } from '~/utils/cache.server' @@ -48,8 +49,8 @@ async function fetchRemote( * Return text content of file from local file system */ async function fetchFs(repo: string, filepath: string) { - // const __dirname = fileURLToPath(new URL('.', import.meta.url)) - const localFilePath = path.resolve(__dirname, `../../${repo}`, filepath) + const __dirname = fileURLToPath(new URL('.', import.meta.url)) + const localFilePath = path.resolve(__dirname, `../../../${repo}`, filepath) const file = await fsp.readFile(localFilePath) return file.toString() } diff --git a/remix.env.d.ts b/env.d.ts similarity index 50% rename from remix.env.d.ts rename to env.d.ts index dcf8c45e..78ed2345 100644 --- a/remix.env.d.ts +++ b/env.d.ts @@ -1,2 +1,2 @@ -/// /// +/// diff --git a/package.json b/package.json index 4827ff53..758149c3 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,10 @@ "sideEffects": false, "repository": "https://github.com/TanStack/tanstack.com.git", "packageManager": "pnpm@8.10.2", - "type": "commonjs", + "type": "module", "scripts": { - "dev": "remix dev --manual", - "build": "remix build", + "dev": "vite dev", + "build": "vite build && vite build --ssr", "start": "remix-serve ./build/index.js", "format": "prettier --plugin-search-dir . \"**/*.{md,js,jsx,cjs,ts,tsx,json}\" --write", "lint": "eslint --ext .ts,.tsx ./app" @@ -57,7 +57,9 @@ "npm-run-all": "^4.1.5", "postcss": "^8.4.31", "tailwindcss": "^3.3.5", - "typescript": "^5.2.2" + "typescript": "^5.2.2", + "vite": "^4.5.0", + "vite-tsconfig-paths": "^4.2.1" }, "engines": { "node": ">=18.0.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ae84b0f0..3ddd829f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -99,7 +99,7 @@ dependencies: devDependencies: '@remix-run/dev': specifier: ^2.2.0 - version: 2.2.0(@remix-run/serve@2.2.0)(typescript@5.2.2) + version: 2.2.0(@remix-run/serve@2.2.0)(typescript@5.2.2)(vite@4.5.0) '@remix-run/eslint-config': specifier: ^2.2.0 version: 2.2.0(eslint@8.53.0)(react@18.2.0)(typescript@5.2.2) @@ -136,6 +136,12 @@ devDependencies: typescript: specifier: ^5.2.2 version: 5.2.2 + vite: + specifier: ^4.5.0 + version: 4.5.0 + vite-tsconfig-paths: + specifier: ^4.2.1 + version: 4.2.1(typescript@5.2.2)(vite@4.5.0) packages: @@ -1656,7 +1662,7 @@ packages: dev: true optional: true - /@remix-run/dev@2.2.0(@remix-run/serve@2.2.0)(typescript@5.2.2): + /@remix-run/dev@2.2.0(@remix-run/serve@2.2.0)(typescript@5.2.2)(vite@4.5.0): resolution: {integrity: sha512-JtteMtYirQlj1Xf9FSLLjqO+owxlqJVsTESgVWdF+CR5kon2i12YjPnRx1xGtB4UGgU/yTZseMTPNhTKc5mwpQ==} engines: {node: '>=18.0.0'} hasBin: true @@ -1729,6 +1735,7 @@ packages: tsconfig-paths: 4.2.0 typescript: 5.2.2 undici: 5.27.2 + vite: 4.5.0 ws: 7.5.9 transitivePeerDependencies: - '@types/node' @@ -4297,6 +4304,10 @@ packages: slash: 3.0.0 dev: true + /globrex@0.1.2: + resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} + dev: true + /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: @@ -7324,6 +7335,19 @@ packages: /ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + /tsconfck@2.1.2(typescript@5.2.2): + resolution: {integrity: sha512-ghqN1b0puy3MhhviwO2kGF8SeMDNhEbnKxjK7h6+fvY9JAxqvXi8y5NAHSQv687OVboS2uZIByzGd45/YxrRHg==} + engines: {node: ^14.13.1 || ^16 || >=18} + hasBin: true + peerDependencies: + typescript: ^4.3.5 || ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true + dependencies: + typescript: 5.2.2 + dev: true + /tsconfig-paths@3.14.2: resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==} dependencies: @@ -7636,6 +7660,23 @@ packages: - terser dev: true + /vite-tsconfig-paths@4.2.1(typescript@5.2.2)(vite@4.5.0): + resolution: {integrity: sha512-GNUI6ZgPqT3oervkvzU+qtys83+75N/OuDaQl7HmOqFTb0pjZsuARrRipsyJhJ3enqV8beI1xhGbToR4o78nSQ==} + peerDependencies: + vite: '*' + peerDependenciesMeta: + vite: + optional: true + dependencies: + debug: 4.3.4 + globrex: 0.1.2 + tsconfck: 2.1.2(typescript@5.2.2) + vite: 4.5.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /vite@4.5.0: resolution: {integrity: sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==} engines: {node: ^14.18.0 || >=16.0.0} diff --git a/postcss.config.js b/postcss.config.cjs similarity index 100% rename from postcss.config.js rename to postcss.config.cjs diff --git a/remix.config.js b/remix.config.js deleted file mode 100644 index 1bf0d286..00000000 --- a/remix.config.js +++ /dev/null @@ -1,9 +0,0 @@ -/** @type {import('@remix-run/dev').AppConfig} */ -module.exports = { - ignoredRouteFiles: ['**/.*'], - // appDirectory: "app", - // assetsBuildDirectory: "public/build", - // publicPath: "/build/", - // serverBuildPath: "build/index.js", - serverModuleFormat: 'cjs', -} diff --git a/tailwind.config.js b/tailwind.config.cjs similarity index 100% rename from tailwind.config.js rename to tailwind.config.cjs diff --git a/tsconfig.json b/tsconfig.json index 09f05602..ad5ae055 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,12 @@ { - "include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"], + "include": ["env.d.ts", "**/*.ts", "**/*.tsx"], "compilerOptions": { "lib": ["DOM", "DOM.Iterable", "ES2022"], "isolatedModules": true, "esModuleInterop": true, "jsx": "react-jsx", - "moduleResolution": "node", + "module": "ESNext", + "moduleResolution": "Bundler", "resolveJsonModule": true, "target": "ES2022", "strict": true, diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 00000000..177dd59b --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,7 @@ +import { unstable_vitePlugin as remix } from "@remix-run/dev"; +import { defineConfig } from "vite"; +import tsconfigPaths from "vite-tsconfig-paths"; + +export default defineConfig({ + plugins: [remix(), tsconfigPaths()], +}); From 003cdac6d25a0cfe404d75e126a905b89f33818b Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 5 Nov 2023 11:34:30 +1100 Subject: [PATCH 02/39] Run prettier --- vite.config.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 177dd59b..8d62f693 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,7 @@ -import { unstable_vitePlugin as remix } from "@remix-run/dev"; -import { defineConfig } from "vite"; -import tsconfigPaths from "vite-tsconfig-paths"; +import { unstable_vitePlugin as remix } from '@remix-run/dev' +import { defineConfig } from 'vite' +import tsconfigPaths from 'vite-tsconfig-paths' export default defineConfig({ plugins: [remix(), tsconfigPaths()], -}); +}) From 758593cd8e7bbd3f41082abaa81937b678eacb57 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 5 Nov 2023 11:35:49 +1100 Subject: [PATCH 03/39] Fix missing stylesheets --- app/root.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/root.tsx b/app/root.tsx index 29fcf558..d5ee32b9 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -1,5 +1,8 @@ import { Outlet, isRouteErrorResponse, useRouteError } from '@remix-run/react' +import '~/styles/app.css' +import '~/styles/carbon.css' import '~/styles/prismThemeDark.css' +import '@docsearch/css/dist/style.css' import { seo } from '~/utils/seo' import { RootDocument } from '~/components/RootDocument' import { DefaultCatchBoundary } from '~/components/DefaultCatchBoundary' From 2065b980233e3ea0bab716b27b61ec4b24153a51 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 5 Nov 2023 11:50:11 +1100 Subject: [PATCH 04/39] Add remark-shiki-twoslash --- app/components/CodeBlock.tsx | 69 ----- app/components/Mdx.tsx | 12 - app/root.tsx | 1 - app/styles/app.css | 297 +++++++++++++++++++- app/styles/prismThemeDark.css | 446 ------------------------------ app/styles/prismThemeLight.css | 434 ----------------------------- app/utils/documents.server.ts | 8 +- app/utils/svelteHighlighter.js | 150 ---------- package.json | 9 +- pnpm-lock.yaml | 482 ++++++++++++++++++++++----------- 10 files changed, 622 insertions(+), 1286 deletions(-) delete mode 100644 app/components/CodeBlock.tsx delete mode 100644 app/styles/prismThemeDark.css delete mode 100644 app/styles/prismThemeLight.css delete mode 100644 app/utils/svelteHighlighter.js diff --git a/app/components/CodeBlock.tsx b/app/components/CodeBlock.tsx deleted file mode 100644 index 7b71fd4c..00000000 --- a/app/components/CodeBlock.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import type { FC, HTMLAttributes, ReactElement } from 'react' -import invariant from 'tiny-invariant' -import type { Language } from 'prism-react-renderer' -import { Highlight, Prism } from 'prism-react-renderer' -import { svelteHighlighter } from '~/utils/svelteHighlighter' -// Add back additional language support after `prism-react` upgrade -;(typeof global !== 'undefined' ? global : window).Prism = Prism -// require('prismjs/components/prism-diff') -// require('prismjs/components/prism-bash') - -// @ts-ignore Alias markup as vue highlight -Prism.languages.vue = Prism.languages.markup - -// Enable svelte syntax highlighter -svelteHighlighter() - -function getLanguageFromClassName(className: string) { - const match = className.match(/language-(\w+)/) - return match ? match[1] : '' -} - -function isLanguageSupported(lang: string): lang is Language { - return lang in Prism.languages -} - -export const CodeBlock: FC> = ({ children }) => { - invariant(!!children, 'children is required') - const child = children as ReactElement - const className = child.props?.className || '' - const userLang = getLanguageFromClassName(className) - const lang = isLanguageSupported(userLang) ? userLang : 'bash' - const code = child.props.children || '' - return ( -
- - {({ className, tokens, getLineProps, getTokenProps }) => ( -
-
- {lang} -
-
-
-                
-                  {tokens.map((line, i) => (
-                    
- {line.map((token, key) => ( - - ))} -
- ))} -
-
-
-
- )} -
-
- ) -} diff --git a/app/components/Mdx.tsx b/app/components/Mdx.tsx index 1320b2e1..9da62504 100644 --- a/app/components/Mdx.tsx +++ b/app/components/Mdx.tsx @@ -1,6 +1,5 @@ import * as React from 'react' import { getMDXComponent } from 'mdx-bundler/client' -import { CodeBlock } from '~/components/CodeBlock' import { MarkdownLink } from '~/components/MarkdownLink' import type { MDXComponents } from 'mdx/types' @@ -34,23 +33,12 @@ const makeHeading = const markdownComponents = { a: MarkdownLink, - pre: CodeBlock, h1: makeHeading('h1'), h2: makeHeading('h2'), h3: makeHeading('h3'), h4: makeHeading('h4'), h5: makeHeading('h5'), h6: makeHeading('h6'), - code: ({ className = '', ...props }: React.HTMLProps) => { - return ( - - ) - }, } export function Mdx({ diff --git a/app/root.tsx b/app/root.tsx index d5ee32b9..c3bd02c0 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -1,7 +1,6 @@ import { Outlet, isRouteErrorResponse, useRouteError } from '@remix-run/react' import '~/styles/app.css' import '~/styles/carbon.css' -import '~/styles/prismThemeDark.css' import '@docsearch/css/dist/style.css' import { seo } from '~/utils/seo' import { RootDocument } from '~/components/RootDocument' diff --git a/app/styles/app.css b/app/styles/app.css index 37fdd138..1c73b0af 100644 --- a/app/styles/app.css +++ b/app/styles/app.css @@ -141,7 +141,298 @@ @apply absolute bottom-0 right-0; } -code[class*="language-"] { - white-space: pre-wrap; - word-break: break-all; +pre { + /* In theory shiki will overwrite these, but this is to make sure there are defaults regardless */ + background-color: white; + color: black; + + /* Give it some space to breathe */ + padding: 12px; + + /* All code samples get a grey border, twoslash ones get a different color */ + border-left: 1px solid #999; + border-bottom: 1px solid #999; + + margin-bottom: 3rem; + + /* Important to allow the code to move horizontally; */ + overflow-x: auto; + position: relative; +} + pre.shiki { + overflow-x: auto; +} + pre.shiki:hover .dim { + opacity: 1; +} + pre.shiki div.dim { + opacity: 0.5; +} + pre.shiki div.dim, pre.shiki div.highlight { + margin: 0; + padding: 0; +} + pre.shiki div.highlight { + opacity: 1; + background-color: #f1f8ff; +} + pre.shiki div.line { + min-height: 1rem; +} + +/** Don't show the language identifiers */ +pre.shiki .language-id{ + display: none; +} + +/* Visually differentiates twoslash code samples */ + pre.twoslash { + border-color: #719af4; +} + +/** When you mouse over the pre, show the underlines */ +pre.twoslash:hover data-lsp { + border-color: #747474; +} + +/** The tooltip-like which provides the LSP response */ +pre.twoslash data-lsp:hover::before { + content: attr(lsp); + position: absolute; + transform: translate(0, 1rem); + + background-color: #3f3f3f; + color: #fff; + text-align: left; + padding: 5px 8px; + border-radius: 2px; + font-family: "JetBrains Mono", Menlo, Monaco, Consolas, Courier New, monospace; + font-size: 14px; + white-space: pre-wrap; + z-index: 100; +} + +pre .code-container { + overflow: auto; +} +/* The try button */ + pre .code-container > a { + position: absolute; + right: 8px; + bottom: 8px; + border-radius: 4px; + border: 1px solid #719af4; + padding: 0 8px; + color: #719af4; + text-decoration: none; + opacity: 0; + transition-timing-function: ease; + transition: opacity 0.3s; +} +/* Respect no animations */ +@media (prefers-reduced-motion: reduce) { + pre .code-container > a { + transition: none; + } +} + pre .code-container > a:hover { + color: white; + background-color: #719af4; +} + pre .code-container:hover a { + opacity: 1; +} + + pre code { + font-size: 15px; + font-family: "JetBrains Mono", Menlo, Monaco, Consolas, Courier New, monospace;; + white-space: pre; + -webkit-overflow-scrolling: touch; +} + pre code a { + text-decoration: none; +} + pre data-err { + /* Extracted from VS Code */ + background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%206%203'%20enable-background%3D'new%200%200%206%203'%20height%3D'3'%20width%3D'6'%3E%3Cg%20fill%3D'%23c94824'%3E%3Cpolygon%20points%3D'5.5%2C0%202.5%2C3%201.1%2C3%204.1%2C0'%2F%3E%3Cpolygon%20points%3D'4%2C0%206%2C2%206%2C0.6%205.4%2C0'%2F%3E%3Cpolygon%20points%3D'0%2C2%201%2C3%202.4%2C3%200%2C0.6'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") repeat-x bottom left; + padding-bottom: 3px; +} + pre .query { + margin-bottom: 10px; + color: #137998; + display: inline-block; +} + + /* In order to have the 'popped out' style design and to not break the layout + /* we need to place a fake and un-selectable copy of the error which _isn't_ broken out + /* behind the actual error message. + + /* This sections keeps both of those two in in sync */ + + pre .error, pre .error-behind { + margin-left: -14px; + margin-top: 8px; + margin-bottom: 4px; + padding: 6px; + padding-left: 14px; + width: calc(100% - 20px); + white-space: pre-wrap; + display: block; +} + pre .error { + position: absolute; + background-color: #fee; + border-left: 2px solid #bf1818; + /* Give the space to the error code */ + display: flex; + align-items: center; + color: black; +} + pre .error .code { + display: none; +} + pre .error-behind { + user-select: none; + visibility: transparent; + color: #fee; +} +/* Queries */ + pre .arrow { + /* Transparent background */ + background-color: #eee; + position: relative; + top: -7px; + margin-left: 0.1rem; + /* Edges */ + border-left: 1px solid #eee; + border-top: 1px solid #eee; + transform: translateY(25%) rotate(45deg); + /* Size */ + height: 8px; + width: 8px; +} + pre .popover { + margin-bottom: 10px; + background-color: #eee; + display: inline-block; + padding: 0 0.5rem 0.3rem; + margin-top: 10px; + border-radius: 3px; +} +/* Completion */ + pre .inline-completions ul.dropdown { + display: inline-block; + position: absolute; + width: 240px; + background-color: gainsboro; + color: grey; + padding-top: 4px; + font-family: var(--code-font); + font-size: 0.8rem; + margin: 0; + padding: 0; + border-left: 4px solid #4b9edd; +} + pre .inline-completions ul.dropdown::before { + background-color: #4b9edd; + width: 2px; + position: absolute; + top: -1.2rem; + left: -3px; + content: " "; +} + pre .inline-completions ul.dropdown li { + overflow-x: hidden; + padding-left: 4px; + margin-bottom: 4px; +} + pre .inline-completions ul.dropdown li.deprecated { + text-decoration: line-through; +} + pre .inline-completions ul.dropdown li span.result-found { + color: #4b9edd; +} + pre .inline-completions ul.dropdown li span.result { + width: 100px; + color: black; + display: inline-block; +} + .dark-theme .markdown pre { + background-color: #d8d8d8; + border-color: #ddd; + filter: invert(98%) hue-rotate(180deg); +} + data-lsp { + /* Ensures there's no 1px jump when the hover happens */ + border-bottom: 1px dotted transparent; + /* Fades in unobtrusively */ + transition-timing-function: ease; + transition: border-color 0.3s; +} +/* Respect people's wishes to not have animations */ + @media (prefers-reduced-motion: reduce) { + data-lsp { + transition: none; + } +} + +/** Annotations support, providing a tool for meta commentary */ +.tag-container { + position: relative; +} +.tag-container .twoslash-annotation { + position: absolute; + font-family: "JetBrains Mono", Menlo, Monaco, Consolas, Courier New, monospace; + right: -10px; + /** Default annotation text to 200px */ + width: 200px; + color: #187abf; + background-color: #fcf3d9 bb; +} +.tag-container .twoslash-annotation p { + text-align: left; + font-size: 0.8rem; + line-height: 0.9rem; +} +.tag-container .twoslash-annotation svg { + float: left; + margin-left: -44px; +} +.tag-container .twoslash-annotation.left { + right: auto; + left: -200px; +} +.tag-container .twoslash-annotation.left svg { + float: right; + margin-right: -5px; +} + +/** Support for showing console log/warn/errors inline */ +pre .logger { + display: flex; + align-items: center; + color: black; + padding: 6px; + padding-left: 8px; + width: calc(100% - 19px); + white-space: pre-wrap; +} +pre .logger svg { + margin-right: 9px; +} +pre .logger.error-log { + background-color: #fee; + border-left: 2px solid #bf1818; +} +pre .logger.warn-log { + background-color: #ffe; + border-left: 2px solid #eae662; +} +pre .logger.log-log { + background-color: #e9e9e9; + border-left: 2px solid #ababab; +} +pre .logger.log-log svg { + margin-left: 6px; + margin-right: 9px; } diff --git a/app/styles/prismThemeDark.css b/app/styles/prismThemeDark.css deleted file mode 100644 index bbd1ccef..00000000 --- a/app/styles/prismThemeDark.css +++ /dev/null @@ -1,446 +0,0 @@ -/** - * One Dark theme for prism.js - * Based on Atom's One Dark theme: https://github.com/atom/atom/tree/master/packages/one-dark-syntax - */ - -/** - * One Dark colours (accurate as of commit 8ae45ca on 6 Sep 2018) - * From colors.less - * --mono-1: hsl(220, 14%, 71%); - * --mono-2: hsl(220, 9%, 55%); - * --mono-3: hsl(220, 10%, 40%); - * --hue-1: hsl(187, 47%, 55%); - * --hue-2: hsl(207, 82%, 66%); - * --hue-3: hsl(286, 60%, 67%); - * --hue-4: hsl(95, 38%, 62%); - * --hue-5: hsl(355, 65%, 65%); - * --hue-5-2: hsl(5, 48%, 51%); - * --hue-6: hsl(29, 54%, 61%); - * --hue-6-2: hsl(39, 67%, 69%); - * --syntax-fg: hsl(220, 14%, 71%); - * --syntax-bg: hsl(220, 13%, 18%); - * --syntax-gutter: hsl(220, 14%, 45%); - * --syntax-guide: hsla(220, 14%, 71%, 0.15); - * --syntax-accent: hsl(220, 100%, 66%); - * From syntax-variables.less - * --syntax-selection-color: hsl(220, 13%, 28%); - * --syntax-gutter-background-color-selected: hsl(220, 13%, 26%); - * --syntax-cursor-line: hsla(220, 100%, 80%, 0.04); - */ - -code[class*='language-'], -pre[class*='language-'] { - background: hsl(220, 29%, 14%); - color: hsl(220, 14%, 71%); - text-shadow: 0 1px rgba(0, 0, 0, 0.3); - font-family: 'Fira Code', 'Fira Mono', Menlo, Consolas, 'DejaVu Sans Mono', - monospace; - direction: ltr; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - line-height: 1.5; - -moz-tab-size: 2; - -o-tab-size: 2; - tab-size: 2; - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; -} - -/* Selection */ -code[class*='language-']::-moz-selection, -code[class*='language-'] *::-moz-selection, -pre[class*='language-'] *::-moz-selection { - background: hsl(220, 13%, 28%); - color: inherit; - text-shadow: none; -} - -code[class*='language-']::selection, -code[class*='language-'] *::selection, -pre[class*='language-'] *::selection { - background: hsl(220, 13%, 28%); - color: inherit; - text-shadow: none; -} - -/* Code blocks */ -pre[class*='language-'] { - padding: 1em; - /* margin: 0.5em 0; */ - overflow: auto; - border-radius: 0.3em; -} - -/* Inline code */ -:not(pre) > code[class*='language-'] { - padding: 0.2em 0.3em; - border-radius: 0.3em; - white-space: normal; -} - -/* Print */ -@media print { - code[class*='language-'], - pre[class*='language-'] { - text-shadow: none; - } -} - -.token.comment, -.token.prolog, -.token.cdata { - color: hsl(220, 10%, 40%); -} - -.token.doctype, -.token.punctuation, -.token.entity { - color: hsl(220, 14%, 71%); -} - -.token.attr-name, -.token.class-name, -.token.boolean, -.token.constant, -.token.number, -.token.atrule { - color: hsl(29, 54%, 61%); -} - -.token.keyword { - color: hsl(286, 60%, 67%); -} - -.token.property, -.token.tag, -.token.symbol, -.token.deleted, -.token.important { - color: hsl(355, 65%, 65%); -} - -.token.selector, -.token.string, -.token.char, -.token.builtin, -.token.inserted, -.token.regex, -.token.attr-value, -.token.attr-value > .token.punctuation { - color: hsl(95, 38%, 62%); -} - -.token.variable, -.token.operator, -.token.function { - color: hsl(207, 82%, 66%); -} - -.token.url { - color: hsl(187, 47%, 55%); -} - -/* HTML overrides */ -.token.attr-value > .token.punctuation.attr-equals, -.token.special-attr > .token.attr-value > .token.value.css { - color: hsl(220, 14%, 71%); -} - -/* CSS overrides */ -.language-css .token.selector { - color: hsl(355, 65%, 65%); -} - -.language-css .token.property { - color: hsl(220, 14%, 71%); -} - -.language-css .token.function, -.language-css .token.url > .token.function { - color: hsl(187, 47%, 55%); -} - -.language-css .token.url > .token.string.url { - color: hsl(95, 38%, 62%); -} - -.language-css .token.important, -.language-css .token.atrule .token.rule { - color: hsl(286, 60%, 67%); -} - -/* JS overrides */ -.language-javascript .token.operator { - color: hsl(286, 60%, 67%); -} - -.language-javascript - .token.template-string - > .token.interpolation - > .token.interpolation-punctuation.punctuation { - color: hsl(5, 48%, 51%); -} - -/* JSON overrides */ -.language-json .token.operator { - color: hsl(220, 14%, 71%); -} - -.language-json .token.null.keyword { - color: hsl(29, 54%, 61%); -} - -/* MD overrides */ -.language-markdown .token.url, -.language-markdown .token.url > .token.operator, -.language-markdown .token.url-reference.url > .token.string { - color: hsl(220, 14%, 71%); -} - -.language-markdown .token.url > .token.content { - color: hsl(207, 82%, 66%); -} - -.language-markdown .token.url > .token.url, -.language-markdown .token.url-reference.url { - color: hsl(187, 47%, 55%); -} - -.language-markdown .token.blockquote.punctuation, -.language-markdown .token.hr.punctuation { - color: hsl(220, 10%, 40%); - font-style: italic; -} - -.language-markdown .token.code-snippet { - color: hsl(95, 38%, 62%); -} - -.language-markdown .token.bold .token.content { - color: hsl(29, 54%, 61%); -} - -.language-markdown .token.italic .token.content { - color: hsl(286, 60%, 67%); -} - -.language-markdown .token.strike .token.content, -.language-markdown .token.strike .token.punctuation, -.language-markdown .token.list.punctuation, -.language-markdown .token.title.important > .token.punctuation { - color: hsl(355, 65%, 65%); -} - -/* General */ -.token.bold { - font-weight: bold; -} - -.token.comment, -.token.italic { - font-style: italic; -} - -.token.entity { - cursor: help; -} - -.token.namespace { - opacity: 0.8; -} - -/* Plugin overrides */ -/* Selectors should have higher specificity than those in the plugins' default stylesheets */ - -/* Show Invisibles plugin overrides */ -.token.token.tab:not(:empty):before, -.token.token.cr:before, -.token.token.lf:before, -.token.token.space:before { - color: hsla(220, 14%, 71%, 0.15); - text-shadow: none; -} - -/* Toolbar plugin overrides */ -/* Space out all buttons and move them away from the right edge of the code block */ -div.code-toolbar > .toolbar.toolbar > .toolbar-item { - margin-right: 0.4em; -} - -/* Styling the buttons */ -div.code-toolbar > .toolbar.toolbar > .toolbar-item > button, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > a, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > span { - background: hsl(220, 13%, 26%); - color: hsl(220, 9%, 55%); - padding: 0.1em 0.4em; - border-radius: 0.3em; -} - -div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus { - background: hsl(220, 13%, 28%); - color: hsl(220, 14%, 71%); -} - -/* Line Highlight plugin overrides */ -/* The highlighted line itself */ -.line-highlight.line-highlight { - background: hsla(220, 100%, 80%, 0.04); -} - -/* Default line numbers in Line Highlight plugin */ -.line-highlight.line-highlight:before, -.line-highlight.line-highlight[data-end]:after { - background: hsl(220, 13%, 26%); - color: hsl(220, 14%, 71%); - padding: 0.1em 0.6em; - border-radius: 0.3em; - box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2); /* same as Toolbar plugin default */ -} - -/* Hovering over a linkable line number (in the gutter area) */ -/* Requires Line Numbers plugin as well */ -pre[id].linkable-line-numbers.linkable-line-numbers - span.line-numbers-rows - > span:hover:before { - background-color: hsla(220, 100%, 80%, 0.04); -} - -/* Line Numbers and Command Line plugins overrides */ -/* Line separating gutter from coding area */ -.line-numbers.line-numbers .line-numbers-rows, -.command-line .command-line-prompt { - border-right-color: hsla(220, 14%, 71%, 0.15); -} - -/* Stuff in the gutter */ -.line-numbers .line-numbers-rows > span:before, -.command-line .command-line-prompt > span:before { - color: hsl(220, 14%, 45%); -} - -/* Match Braces plugin overrides */ -/* Note: Outline colour is inherited from the braces */ -.rainbow-braces .token.token.punctuation.brace-level-1, -.rainbow-braces .token.token.punctuation.brace-level-5, -.rainbow-braces .token.token.punctuation.brace-level-9 { - color: hsl(355, 65%, 65%); -} - -.rainbow-braces .token.token.punctuation.brace-level-2, -.rainbow-braces .token.token.punctuation.brace-level-6, -.rainbow-braces .token.token.punctuation.brace-level-10 { - color: hsl(95, 38%, 62%); -} - -.rainbow-braces .token.token.punctuation.brace-level-3, -.rainbow-braces .token.token.punctuation.brace-level-7, -.rainbow-braces .token.token.punctuation.brace-level-11 { - color: hsl(207, 82%, 66%); -} - -.rainbow-braces .token.token.punctuation.brace-level-4, -.rainbow-braces .token.token.punctuation.brace-level-8, -.rainbow-braces .token.token.punctuation.brace-level-12 { - color: hsl(286, 60%, 67%); -} - -/* Diff Highlight plugin overrides */ -/* Taken from https://github.com/atom/github/blob/master/styles/variables.less */ -pre.diff-highlight > code .token.token.deleted:not(.prefix), -pre > code.diff-highlight .token.token.deleted:not(.prefix) { - background-color: hsla(353, 100%, 66%, 0.15); -} - -pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection, -pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection, -pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection, -pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection { - background-color: hsla(353, 95%, 66%, 0.25); -} - -pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection, -pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection, -pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection, -pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection { - background-color: hsla(353, 95%, 66%, 0.25); -} - -pre.diff-highlight > code .token.token.inserted:not(.prefix), -pre > code.diff-highlight .token.token.inserted:not(.prefix) { - background-color: hsla(137, 100%, 55%, 0.15); -} - -pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection, -pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection, -pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection, -pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection { - background-color: hsla(135, 73%, 55%, 0.25); -} - -pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection, -pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection, -pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection, -pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection { - background-color: hsla(135, 73%, 55%, 0.25); -} - -/* Previewers plugin overrides */ -/* Based on https://github.com/atom-community/atom-ide-datatip/blob/master/styles/atom-ide-datatips.less and https://github.com/atom/atom/blob/master/packages/one-dark-ui */ -/* Border around popup */ -.prism-previewer.prism-previewer:before, -.prism-previewer-gradient.prism-previewer-gradient div { - border-color: hsl(224, 13%, 17%); -} - -/* Angle and time should remain as circles and are hence not included */ -.prism-previewer-color.prism-previewer-color:before, -.prism-previewer-gradient.prism-previewer-gradient div, -.prism-previewer-easing.prism-previewer-easing:before { - border-radius: 0.3em; -} - -/* Triangles pointing to the code */ -.prism-previewer.prism-previewer:after { - border-top-color: hsl(224, 13%, 17%); -} - -.prism-previewer-flipped.prism-previewer-flipped.after { - border-bottom-color: hsl(224, 13%, 17%); -} - -/* Background colour within the popup */ -.prism-previewer-angle.prism-previewer-angle:before, -.prism-previewer-time.prism-previewer-time:before, -.prism-previewer-easing.prism-previewer-easing { - background: hsl(219, 13%, 22%); -} - -/* For angle, this is the positive area (eg. 90deg will display one quadrant in this colour) */ -/* For time, this is the alternate colour */ -.prism-previewer-angle.prism-previewer-angle circle, -.prism-previewer-time.prism-previewer-time circle { - stroke: hsl(220, 14%, 71%); - stroke-opacity: 1; -} - -/* Stroke colours of the handle, direction point, and vector itself */ -.prism-previewer-easing.prism-previewer-easing circle, -.prism-previewer-easing.prism-previewer-easing path, -.prism-previewer-easing.prism-previewer-easing line { - stroke: hsl(220, 14%, 71%); -} - -/* Fill colour of the handle */ -.prism-previewer-easing.prism-previewer-easing circle { - fill: transparent; -} diff --git a/app/styles/prismThemeLight.css b/app/styles/prismThemeLight.css deleted file mode 100644 index 80f49d21..00000000 --- a/app/styles/prismThemeLight.css +++ /dev/null @@ -1,434 +0,0 @@ -/** - * One Light theme for prism.js - * Based on Atom's One Light theme: https://github.com/atom/atom/tree/master/packages/one-light-syntax - */ - -/** - * One Light colours (accurate as of commit eb064bf on 19 Feb 2021) - * From colors.less - * --mono-1: hsl(230, 8%, 24%); - * --mono-2: hsl(230, 6%, 44%); - * --mono-3: hsl(230, 4%, 64%) - * --hue-1: hsl(198, 99%, 37%); - * --hue-2: hsl(221, 87%, 60%); - * --hue-3: hsl(301, 63%, 40%); - * --hue-4: hsl(119, 34%, 47%); - * --hue-5: hsl(5, 74%, 59%); - * --hue-5-2: hsl(344, 84%, 43%); - * --hue-6: hsl(35, 99%, 36%); - * --hue-6-2: hsl(35, 99%, 40%); - * --syntax-fg: hsl(230, 8%, 24%); - * --syntax-bg: hsl(230, 1%, 98%); - * --syntax-gutter: hsl(230, 1%, 62%); - * --syntax-guide: hsla(230, 8%, 24%, 0.2); - * --syntax-accent: hsl(230, 100%, 66%); - * From syntax-variables.less - * --syntax-selection-color: hsl(230, 1%, 90%); - * --syntax-gutter-background-color-selected: hsl(230, 1%, 90%); - * --syntax-cursor-line: hsla(230, 8%, 24%, 0.05); - */ - -code[class*='language-'], -pre[class*='language-'] { - background: #f4f7f9; - color: hsl(230, 8%, 24%); - font-family: 'Fira Code', 'Fira Mono', Menlo, Consolas, 'DejaVu Sans Mono', - monospace; - direction: ltr; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - line-height: 1.5; - -moz-tab-size: 2; - -o-tab-size: 2; - tab-size: 2; - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; -} - -/* Selection */ -code[class*='language-']::-moz-selection, -code[class*='language-'] *::-moz-selection, -pre[class*='language-'] *::-moz-selection { - background: hsl(230, 1%, 90%); - color: inherit; -} - -code[class*='language-']::selection, -code[class*='language-'] *::selection, -pre[class*='language-'] *::selection { - background: hsl(230, 1%, 90%); - color: inherit; -} - -/* Code blocks */ -pre[class*='language-'] { - padding: 1em; - /* margin: 0.5em 0; */ - overflow: auto; - border-radius: 0.3em; -} - -/* Inline code */ -:not(pre) > code[class*='language-'] { - padding: 0.2em 0.3em; - border-radius: 0.3em; - white-space: normal; -} - -.token.comment, -.token.prolog, -.token.cdata { - color: hsl(230, 4%, 64%); -} - -.token.doctype, -.token.punctuation, -.token.entity { - color: hsl(230, 8%, 24%); -} - -.token.attr-name, -.token.class-name, -.token.boolean, -.token.constant, -.token.number, -.token.atrule { - color: hsl(35, 99%, 36%); -} - -.token.keyword { - color: hsl(301, 63%, 40%); -} - -.token.property, -.token.tag, -.token.symbol, -.token.deleted, -.token.important { - color: hsl(5, 74%, 59%); -} - -.token.selector, -.token.string, -.token.char, -.token.builtin, -.token.inserted, -.token.regex, -.token.attr-value, -.token.attr-value > .token.punctuation { - color: hsl(119, 34%, 47%); -} - -.token.variable, -.token.operator, -.token.function { - color: hsl(221, 87%, 60%); -} - -.token.url { - color: hsl(198, 99%, 37%); -} - -/* HTML overrides */ -.token.attr-value > .token.punctuation.attr-equals, -.token.special-attr > .token.attr-value > .token.value.css { - color: hsl(230, 8%, 24%); -} - -/* CSS overrides */ -.language-css .token.selector { - color: hsl(5, 74%, 59%); -} - -.language-css .token.property { - color: hsl(230, 8%, 24%); -} - -.language-css .token.function, -.language-css .token.url > .token.function { - color: hsl(198, 99%, 37%); -} - -.language-css .token.url > .token.string.url { - color: hsl(119, 34%, 47%); -} - -.language-css .token.important, -.language-css .token.atrule .token.rule { - color: hsl(301, 63%, 40%); -} - -/* JS overrides */ -.language-javascript .token.operator { - color: hsl(301, 63%, 40%); -} - -.language-javascript - .token.template-string - > .token.interpolation - > .token.interpolation-punctuation.punctuation { - color: hsl(344, 84%, 43%); -} - -/* JSON overrides */ -.language-json .token.operator { - color: hsl(230, 8%, 24%); -} - -.language-json .token.null.keyword { - color: hsl(35, 99%, 36%); -} - -/* MD overrides */ -.language-markdown .token.url, -.language-markdown .token.url > .token.operator, -.language-markdown .token.url-reference.url > .token.string { - color: hsl(230, 8%, 24%); -} - -.language-markdown .token.url > .token.content { - color: hsl(221, 87%, 60%); -} - -.language-markdown .token.url > .token.url, -.language-markdown .token.url-reference.url { - color: hsl(198, 99%, 37%); -} - -.language-markdown .token.blockquote.punctuation, -.language-markdown .token.hr.punctuation { - color: hsl(230, 4%, 64%); - font-style: italic; -} - -.language-markdown .token.code-snippet { - color: hsl(119, 34%, 47%); -} - -.language-markdown .token.bold .token.content { - color: hsl(35, 99%, 36%); -} - -.language-markdown .token.italic .token.content { - color: hsl(301, 63%, 40%); -} - -.language-markdown .token.strike .token.content, -.language-markdown .token.strike .token.punctuation, -.language-markdown .token.list.punctuation, -.language-markdown .token.title.important > .token.punctuation { - color: hsl(5, 74%, 59%); -} - -/* General */ -.token.bold { - font-weight: bold; -} - -.token.comment, -.token.italic { - font-style: italic; -} - -.token.entity { - cursor: help; -} - -.token.namespace { - opacity: 0.8; -} - -/* Plugin overrides */ -/* Selectors should have higher specificity than those in the plugins' default stylesheets */ - -/* Show Invisibles plugin overrides */ -.token.token.tab:not(:empty):before, -.token.token.cr:before, -.token.token.lf:before, -.token.token.space:before { - color: hsla(230, 8%, 24%, 0.2); -} - -/* Toolbar plugin overrides */ -/* Space out all buttons and move them away from the right edge of the code block */ -div.code-toolbar > .toolbar.toolbar > .toolbar-item { - margin-right: 0.4em; -} - -/* Styling the buttons */ -div.code-toolbar > .toolbar.toolbar > .toolbar-item > button, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > a, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > span { - background: hsl(230, 1%, 90%); - color: hsl(230, 6%, 44%); - padding: 0.1em 0.4em; - border-radius: 0.3em; -} - -div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus { - background: hsl(230, 1%, 78%); /* custom: darken(--syntax-bg, 20%) */ - color: hsl(230, 8%, 24%); -} - -/* Line Highlight plugin overrides */ -/* The highlighted line itself */ -.line-highlight.line-highlight { - background: hsla(230, 8%, 24%, 0.05); -} - -/* Default line numbers in Line Highlight plugin */ -.line-highlight.line-highlight:before, -.line-highlight.line-highlight[data-end]:after { - background: hsl(230, 1%, 90%); - color: hsl(230, 8%, 24%); - padding: 0.1em 0.6em; - border-radius: 0.3em; - box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2); /* same as Toolbar plugin default */ -} - -/* Hovering over a linkable line number (in the gutter area) */ -/* Requires Line Numbers plugin as well */ -pre[id].linkable-line-numbers.linkable-line-numbers - span.line-numbers-rows - > span:hover:before { - background-color: hsla(230, 8%, 24%, 0.05); -} - -/* Line Numbers and Command Line plugins overrides */ -/* Line separating gutter from coding area */ -.line-numbers.line-numbers .line-numbers-rows, -.command-line .command-line-prompt { - border-right-color: hsla(230, 8%, 24%, 0.2); -} - -/* Stuff in the gutter */ -.line-numbers .line-numbers-rows > span:before, -.command-line .command-line-prompt > span:before { - color: hsl(230, 1%, 62%); -} - -/* Match Braces plugin overrides */ -/* Note: Outline colour is inherited from the braces */ -.rainbow-braces .token.token.punctuation.brace-level-1, -.rainbow-braces .token.token.punctuation.brace-level-5, -.rainbow-braces .token.token.punctuation.brace-level-9 { - color: hsl(5, 74%, 59%); -} - -.rainbow-braces .token.token.punctuation.brace-level-2, -.rainbow-braces .token.token.punctuation.brace-level-6, -.rainbow-braces .token.token.punctuation.brace-level-10 { - color: hsl(119, 34%, 47%); -} - -.rainbow-braces .token.token.punctuation.brace-level-3, -.rainbow-braces .token.token.punctuation.brace-level-7, -.rainbow-braces .token.token.punctuation.brace-level-11 { - color: hsl(221, 87%, 60%); -} - -.rainbow-braces .token.token.punctuation.brace-level-4, -.rainbow-braces .token.token.punctuation.brace-level-8, -.rainbow-braces .token.token.punctuation.brace-level-12 { - color: hsl(301, 63%, 40%); -} - -/* Diff Highlight plugin overrides */ -/* Taken from https://github.com/atom/github/blob/master/styles/variables.less */ -pre.diff-highlight > code .token.token.deleted:not(.prefix), -pre > code.diff-highlight .token.token.deleted:not(.prefix) { - background-color: hsla(353, 100%, 66%, 0.15); -} - -pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection, -pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection, -pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection, -pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection { - background-color: hsla(353, 95%, 66%, 0.25); -} - -pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection, -pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection, -pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection, -pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection { - background-color: hsla(353, 95%, 66%, 0.25); -} - -pre.diff-highlight > code .token.token.inserted:not(.prefix), -pre > code.diff-highlight .token.token.inserted:not(.prefix) { - background-color: hsla(137, 100%, 55%, 0.15); -} - -pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection, -pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection, -pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection, -pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection { - background-color: hsla(135, 73%, 55%, 0.25); -} - -pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection, -pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection, -pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection, -pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection { - background-color: hsla(135, 73%, 55%, 0.25); -} - -/* Previewers plugin overrides */ -/* Based on https://github.com/atom-community/atom-ide-datatip/blob/master/styles/atom-ide-datatips.less and https://github.com/atom/atom/blob/master/packages/one-light-ui */ -/* Border around popup */ -.prism-previewer.prism-previewer:before, -.prism-previewer-gradient.prism-previewer-gradient div { - border-color: hsl(0, 0, 95%); -} - -/* Angle and time should remain as circles and are hence not included */ -.prism-previewer-color.prism-previewer-color:before, -.prism-previewer-gradient.prism-previewer-gradient div, -.prism-previewer-easing.prism-previewer-easing:before { - border-radius: 0.3em; -} - -/* Triangles pointing to the code */ -.prism-previewer.prism-previewer:after { - border-top-color: hsl(0, 0, 95%); -} - -.prism-previewer-flipped.prism-previewer-flipped.after { - border-bottom-color: hsl(0, 0, 95%); -} - -/* Background colour within the popup */ -.prism-previewer-angle.prism-previewer-angle:before, -.prism-previewer-time.prism-previewer-time:before, -.prism-previewer-easing.prism-previewer-easing { - background: hsl(0, 0%, 100%); -} - -/* For angle, this is the positive area (eg. 90deg will display one quadrant in this colour) */ -/* For time, this is the alternate colour */ -.prism-previewer-angle.prism-previewer-angle circle, -.prism-previewer-time.prism-previewer-time circle { - stroke: hsl(230, 8%, 24%); - stroke-opacity: 1; -} - -/* Stroke colours of the handle, direction point, and vector itself */ -.prism-previewer-easing.prism-previewer-easing circle, -.prism-previewer-easing.prism-previewer-easing path, -.prism-previewer-easing.prism-previewer-easing line { - stroke: hsl(230, 8%, 24%); -} - -/* Fill colour of the handle */ -.prism-previewer-easing.prism-previewer-easing circle { - fill: transparent; -} diff --git a/app/utils/documents.server.ts b/app/utils/documents.server.ts index 138ee890..5e54cef6 100644 --- a/app/utils/documents.server.ts +++ b/app/utils/documents.server.ts @@ -4,6 +4,9 @@ import { fileURLToPath } from 'node:url' import { bundleMDX } from 'mdx-bundler' import * as graymatter from 'gray-matter' import { fetchCached } from '~/utils/cache.server' +import remarkShikiTwoslash from "remark-shiki-twoslash" +import rehypeRaw from 'rehype-raw' +import { nodeTypes } from '@mdx-js/mdx' type BundledMDX = Awaited> @@ -202,8 +205,9 @@ export async function markdownToMdx(content: string) { const mdx = await bundleMDX<{ title: string }>({ source: content, mdxOptions: (options) => { - options.remarkPlugins = [...(options.remarkPlugins ?? []), remarkGfm] - options.rehypePlugins = [...(options.rehypePlugins ?? []), rehypeSlug] + options.remarkPlugins = [...(options.remarkPlugins ?? []), remarkGfm, [remarkShikiTwoslash, { theme: "dark-plus" }]] + // @ts-ignore + options.rehypePlugins = [...(options.rehypePlugins ?? []), rehypeSlug, [rehypeRaw, {passThrough: nodeTypes}]] return options }, }) diff --git a/app/utils/svelteHighlighter.js b/app/utils/svelteHighlighter.js deleted file mode 100644 index 0a4c5cb9..00000000 --- a/app/utils/svelteHighlighter.js +++ /dev/null @@ -1,150 +0,0 @@ -// Original source: https://github.com/pngwn/prism-svelte - -import { Prism } from 'prism-react-renderer' - -export const svelteHighlighter = () => { - const blocks = '(if|else if|await|then|catch|each|html|debug)' - - Prism.languages.svelte = Prism.languages.extend('markup', { - each: { - pattern: new RegExp( - '{[#/]each' + - '(?:(?:\\{(?:(?:\\{(?:[^{}])*\\})|(?:[^{}]))*\\})|(?:[^{}]))*}' - ), - inside: { - 'language-javascript': [ - { - pattern: /(as[\s\S]*)\([\s\S]*\)(?=\s*\})/, - lookbehind: true, - inside: Prism.languages['javascript'], - }, - { - pattern: /(as[\s]*)[\s\S]*(?=\s*)/, - lookbehind: true, - inside: Prism.languages['javascript'], - }, - { - pattern: /(#each[\s]*)[\s\S]*(?=as)/, - lookbehind: true, - inside: Prism.languages['javascript'], - }, - ], - keyword: /[#/]each|as/, - punctuation: /{|}/, - }, - }, - block: { - pattern: new RegExp( - '{[#:/@]/s' + - blocks + - '(?:(?:\\{(?:(?:\\{(?:[^{}])*\\})|(?:[^{}]))*\\})|(?:[^{}]))*}' - ), - inside: { - punctuation: /^{|}$/, - keyword: [new RegExp('[#:/@]' + blocks + '( )*'), /as/, /then/], - 'language-javascript': { - pattern: /[\s\S]*/, - inside: Prism.languages['javascript'], - }, - }, - }, - tag: { - pattern: - /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?:"[^"]*"|'[^']*'|{[\s\S]+?}(?=[\s/>])))|(?=[\s/>])))+)?\s*\/?>/i, - greedy: true, - inside: { - tag: { - pattern: /^<\/?[^\s>\/]+/i, - inside: { - punctuation: /^<\/?/, - namespace: /^[^\s>\/:]+:/, - }, - }, - 'language-javascript': { - pattern: - /\{(?:(?:\{(?:(?:\{(?:[^{}])*\})|(?:[^{}]))*\})|(?:[^{}]))*\}/, - inside: Prism.languages['javascript'], - }, - 'attr-value': { - pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i, - inside: { - punctuation: [ - /^=/, - { - pattern: /^(\s*)["']|["']$/, - lookbehind: true, - }, - ], - 'language-javascript': { - pattern: /{[\s\S]+}/, - inside: Prism.languages['javascript'], - }, - }, - }, - punctuation: /\/?>/, - 'attr-name': { - pattern: /[^\s>\/]+/, - inside: { - namespace: /^[^\s>\/:]+:/, - }, - }, - }, - }, - 'language-javascript': { - pattern: /\{(?:(?:\{(?:(?:\{(?:[^{}])*\})|(?:[^{}]))*\})|(?:[^{}]))*\}/, - lookbehind: true, - inside: Prism.languages['javascript'], - }, - }) - - Prism.languages.svelte['tag'].inside['attr-value'].inside['entity'] = - Prism.languages.svelte['entity'] - - Prism.hooks.add('wrap', (env) => { - if (env.type === 'entity') { - env.attributes['title'] = env.content.replace(/&/, '&') - } - }) - - Object.defineProperty(Prism.languages.svelte.tag, 'addInlined', { - value: function addInlined(tagName, lang) { - const includedCdataInside = {} - includedCdataInside['language-' + lang] = { - pattern: /(^$)/i, - lookbehind: true, - inside: Prism.languages[lang], - } - includedCdataInside['cdata'] = /^$/i - - const inside = { - 'included-cdata': { - pattern: //i, - inside: includedCdataInside, - }, - } - inside['language-' + lang] = { - pattern: /[\s\S]+/, - inside: Prism.languages[lang], - } - - const def = {} - def[tagName] = { - pattern: RegExp( - /(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace( - /__/g, - tagName - ), - 'i' - ), - lookbehind: true, - greedy: true, - inside, - } - - Prism.languages.insertBefore('svelte', 'cdata', def) - }, - }) - - Prism.languages.svelte.tag.addInlined('style', 'css') - Prism.languages.svelte.tag.addInlined('script', 'javascript') -} diff --git a/package.json b/package.json index 758149c3..9d811925 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "@docsearch/css": "^3.5.2", "@docsearch/react": "^3.5.2", "@headlessui/react": "1.7.17", + "@mdx-js/mdx": "^2.3.0", "@octokit/graphql": "^7.0.2", "@octokit/rest": "^20.0.2", "@remix-run/node": "^2.2.0", @@ -32,17 +33,16 @@ "isbot": "^3.7.0", "lru-cache": "^7.13.1", "mdx-bundler": "^9.2.1", - "prism-react-renderer": "^2.1.0", - "prismjs": "^1.29.0", "qss": "^3.0.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-icons": "^4.11.0", + "rehype-raw": "^7.0.0", "rehype-slug": "^5.1.0", "remark-gfm": "^3.0.1", + "remark-shiki-twoslash": "^3.1.3", "remove-markdown": "^0.5.0", - "tailwind-merge": "^1.14.0", - "tiny-invariant": "^1.3.1" + "tailwind-merge": "^1.14.0" }, "devDependencies": { "@remix-run/dev": "^2.2.0", @@ -54,7 +54,6 @@ "esbuild": "^0.19.5", "eslint": "^8.53.0", "eslint-plugin-unicorn": "^49.0.0", - "npm-run-all": "^4.1.5", "postcss": "^8.4.31", "tailwindcss": "^3.3.5", "typescript": "^5.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3ddd829f..169b2fe4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,9 @@ dependencies: '@headlessui/react': specifier: 1.7.17 version: 1.7.17(react-dom@18.2.0)(react@18.2.0) + '@mdx-js/mdx': + specifier: ^2.3.0 + version: 2.3.0 '@octokit/graphql': specifier: ^7.0.2 version: 7.0.2 @@ -62,12 +65,6 @@ dependencies: mdx-bundler: specifier: ^9.2.1 version: 9.2.1(esbuild@0.19.5) - prism-react-renderer: - specifier: ^2.1.0 - version: 2.1.0(react@18.2.0) - prismjs: - specifier: ^1.29.0 - version: 1.29.0 qss: specifier: ^3.0.0 version: 3.0.0 @@ -80,21 +77,24 @@ dependencies: react-icons: specifier: ^4.11.0 version: 4.11.0(react@18.2.0) + rehype-raw: + specifier: ^7.0.0 + version: 7.0.0 rehype-slug: specifier: ^5.1.0 version: 5.1.0 remark-gfm: specifier: ^3.0.1 version: 3.0.1 + remark-shiki-twoslash: + specifier: ^3.1.3 + version: 3.1.3(typescript@5.2.2) remove-markdown: specifier: ^0.5.0 version: 0.5.0 tailwind-merge: specifier: ^1.14.0 version: 1.14.0 - tiny-invariant: - specifier: ^1.3.1 - version: 1.3.1 devDependencies: '@remix-run/dev': @@ -124,9 +124,6 @@ devDependencies: eslint-plugin-unicorn: specifier: ^49.0.0 version: 49.0.0(eslint@8.53.0) - npm-run-all: - specifier: ^4.1.5 - version: 4.1.5 postcss: specifier: ^8.4.31 version: 8.4.31 @@ -1977,6 +1974,12 @@ packages: dependencies: '@types/unist': 2.0.9 + /@types/hast@3.0.2: + resolution: {integrity: sha512-B5hZHgHsXvfCoO3xgNJvBnX7N8p86TqQeGKXcokW4XXi+qY4vxxPSFYofytvVmpFxzPv7oxDQzjg5Un5m2/xiw==} + dependencies: + '@types/unist': 3.0.1 + dev: false + /@types/json-schema@7.0.14: resolution: {integrity: sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==} dev: true @@ -1994,6 +1997,12 @@ packages: dependencies: '@types/unist': 2.0.9 + /@types/mdast@4.0.2: + resolution: {integrity: sha512-tYR83EignvhYO9iU3kDg8V28M0jqyh9zzp5GV+EO+AYnyUl3P5ltkTeJuTiFZQFz670FSb3EwT/6LQdX+UdKfw==} + dependencies: + '@types/unist': 3.0.1 + dev: false + /@types/mdx@2.0.9: resolution: {integrity: sha512-OKMdj17y8Cs+k1r0XFyp59ChSOwf8ODGtMQ4mnpfz5eFDk1aO41yN3pSKGuvVzmWAkFp37seubY1tzOVpwfWwg==} @@ -2014,10 +2023,6 @@ packages: resolution: {integrity: sha512-ehPtgRgaULsFG8x0NeYJvmyH1hmlfsNLujHe9dQEia/7MAJYdzMSi19JtchUHjmBA6XC/75dK55mzZH+RyieSg==} dev: true - /@types/prismjs@1.26.2: - resolution: {integrity: sha512-/r7Cp7iUIk7gts26mHXD66geUC+2Fo26TZYjQK6Nr4LDfi6lmdRmMqM0oPwfiMhUwoBAOFe8GstKi2pf6hZvwA==} - dev: false - /@types/prop-types@15.7.9: resolution: {integrity: sha512-n1yyPsugYNSmHgxDFjicaI2+gCNjsBck8UX9kuofAKlc0h1bL+20oSF72KeNaW2DUlesbEVCFgyV2dPGTiY42g==} @@ -2052,6 +2057,10 @@ packages: /@types/unist@2.0.9: resolution: {integrity: sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==} + /@types/unist@3.0.1: + resolution: {integrity: sha512-ue/hDUpPjC85m+PM9OQDMZr3LywT+CT6mPsQq8OJtCLiERkGRcQUFvu9XASF5XWqyZFXbf15lvb3JFJ4dRLWPg==} + dev: false + /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.53.0)(typescript@5.2.2): resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2182,9 +2191,34 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@typescript/twoslash@3.1.0: + resolution: {integrity: sha512-kTwMUQ8xtAZaC4wb2XuLkPqFVBj2dNBueMQ89NWEuw87k2nLBbuafeG5cob/QEr6YduxIdTVUjix0MtC7mPlmg==} + dependencies: + '@typescript/vfs': 1.3.5 + debug: 4.3.4 + lz-string: 1.5.0 + transitivePeerDependencies: + - supports-color + dev: false + + /@typescript/vfs@1.3.4: + resolution: {integrity: sha512-RbyJiaAGQPIcAGWFa3jAXSuAexU4BFiDRF1g3hy7LmRqfNpYlTQWGXjcrOaVZjJ8YkkpuwG0FcsYvtWQpd9igQ==} + dependencies: + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: false + + /@typescript/vfs@1.3.5: + resolution: {integrity: sha512-pI8Saqjupf9MfLw7w2+og+fmb0fZS0J6vsKXXrp4/PDXEFvntgzXmChCXC/KefZZS0YGS6AT8e0hGAJcTsdJlg==} + dependencies: + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: false + /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - dev: true /@vanilla-extract/babel-plugin-debug-ids@1.0.3: resolution: {integrity: sha512-vm4jYu1xhSa6ofQ9AhIpR3DkAp4c+eoR1Rpm8/TQI4DmWbmGbOjYRcqV0aWsfaIlNhN4kFuxFMKBNN9oG6iRzA==} @@ -2831,11 +2865,6 @@ packages: engines: {node: '>=0.8'} dev: true - /clsx@1.2.1: - resolution: {integrity: sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==} - engines: {node: '>=6'} - dev: false - /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -2931,17 +2960,6 @@ packages: resolution: {integrity: sha512-pSB8OOROfimFc2bcN+H41DuzXYIod/JQ6SgF4pYXkRCm9f8uF1JAJ0vXPhenug6xkpt3Gv33mdypMXB49CJWRA==} dev: false - /cross-spawn@6.0.5: - resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} - engines: {node: '>=4.8'} - dependencies: - nice-try: 1.0.5 - path-key: 2.0.1 - semver: 5.7.2 - shebang-command: 1.2.0 - which: 1.3.1 - dev: true - /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -3105,6 +3123,12 @@ packages: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + /devlop@1.1.0: + resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + dependencies: + dequal: 2.0.3 + dev: false + /didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} @@ -3191,6 +3215,11 @@ packages: tapable: 2.2.1 dev: true + /entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + dev: false + /err-code@2.0.3: resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==} dev: true @@ -4009,6 +4038,11 @@ packages: dependencies: format: 0.2.2 + /fenceparser@1.1.1: + resolution: {integrity: sha512-VdkTsK7GWLT0VWMK5S5WTAPn61wJ98WPFwJiRHumhg4ESNUO/tnkU8bzzzc62o6Uk1SVhuZFLnakmDA4SGV7wA==} + engines: {node: '>=12'} + dev: false + /fetch-blob@3.2.0: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} @@ -4382,6 +4416,19 @@ packages: dependencies: function-bind: 1.1.2 + /hast-util-from-parse5@8.0.1: + resolution: {integrity: sha512-Er/Iixbc7IEa7r/XLtuG52zoqn/b3Xng/w6aZQ0xGVxzhw5xUFxcRqdPzP6yFi/4HBYRaifaI5fQ1RH8n0ZeOQ==} + dependencies: + '@types/hast': 3.0.2 + '@types/unist': 3.0.1 + devlop: 1.1.0 + hastscript: 8.0.0 + property-information: 6.4.0 + vfile: 6.0.1 + vfile-location: 5.0.2 + web-namespaces: 2.0.1 + dev: false + /hast-util-has-property@2.0.1: resolution: {integrity: sha512-X2+RwZIMTMKpXUzlotatPzWj8bspCymtXH3cfG3iQKV+wPF53Vgaqxi/eLqGck0wKq1kS9nvoB1wchbCPEL8sg==} dev: false @@ -4392,6 +4439,30 @@ packages: '@types/hast': 2.3.7 dev: false + /hast-util-parse-selector@4.0.0: + resolution: {integrity: sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==} + dependencies: + '@types/hast': 3.0.2 + dev: false + + /hast-util-raw@9.0.1: + resolution: {integrity: sha512-5m1gmba658Q+lO5uqL5YNGQWeh1MYWZbZmWrM5lncdcuiXuo5E2HT/CIOp0rLF8ksfSwiCVJ3twlgVRyTGThGA==} + dependencies: + '@types/hast': 3.0.2 + '@types/unist': 3.0.1 + '@ungap/structured-clone': 1.2.0 + hast-util-from-parse5: 8.0.1 + hast-util-to-parse5: 8.0.0 + html-void-elements: 3.0.0 + mdast-util-to-hast: 13.0.2 + parse5: 7.1.2 + unist-util-position: 5.0.0 + unist-util-visit: 5.0.0 + vfile: 6.0.1 + web-namespaces: 2.0.1 + zwitch: 2.0.4 + dev: false + /hast-util-to-estree@2.3.3: resolution: {integrity: sha512-ihhPIUPxN0v0w6M5+IiAZZrn0LH2uZomeWwhn7uP7avZC6TE7lIiEh2yBMPr5+zi1aUCXq6VoYRgs2Bw9xmycQ==} dependencies: @@ -4413,6 +4484,18 @@ packages: transitivePeerDependencies: - supports-color + /hast-util-to-parse5@8.0.0: + resolution: {integrity: sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==} + dependencies: + '@types/hast': 3.0.2 + comma-separated-tokens: 2.0.3 + devlop: 1.1.0 + property-information: 6.4.0 + space-separated-tokens: 2.0.2 + web-namespaces: 2.0.1 + zwitch: 2.0.4 + dev: false + /hast-util-to-string@2.0.0: resolution: {integrity: sha512-02AQ3vLhuH3FisaMM+i/9sm4OXGSq1UhOOCpTLLQtHdL3tZt7qil69r8M8iDkZYyC0HCFylcYoP+8IO7ddta1A==} dependencies: @@ -4422,6 +4505,16 @@ packages: /hast-util-whitespace@2.0.1: resolution: {integrity: sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng==} + /hastscript@8.0.0: + resolution: {integrity: sha512-dMOtzCEd3ABUeSIISmrETiKuyydk1w0pa+gE/uormcTpSYuaNJPbX1NU3JLyscSLjwAQM8bWMhhIlnCqnRvDTw==} + dependencies: + '@types/hast': 3.0.2 + comma-separated-tokens: 2.0.3 + hast-util-parse-selector: 4.0.0 + property-information: 6.4.0 + space-separated-tokens: 2.0.2 + dev: false + /hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true @@ -4433,6 +4526,10 @@ packages: lru-cache: 7.18.3 dev: true + /html-void-elements@3.0.0: + resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} + dev: false + /http-errors@2.0.0: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} @@ -4839,10 +4936,6 @@ packages: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} dev: true - /json-parse-better-errors@1.0.2: - resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} - dev: true - /json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: true @@ -4875,7 +4968,6 @@ packages: /jsonc-parser@3.2.0: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} - dev: true /jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -4936,16 +5028,6 @@ packages: /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - /load-json-file@4.0.0: - resolution: {integrity: sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==} - engines: {node: '>=4'} - dependencies: - graceful-fs: 4.2.11 - parse-json: 4.0.0 - pify: 3.0.0 - strip-bom: 3.0.0 - dev: true - /loader-utils@3.2.1: resolution: {integrity: sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==} engines: {node: '>= 12.13.0'} @@ -5034,7 +5116,6 @@ packages: /lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true - dev: true /markdown-extensions@1.1.1: resolution: {integrity: sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q==} @@ -5210,6 +5291,19 @@ packages: unist-util-position: 4.0.4 unist-util-visit: 4.1.2 + /mdast-util-to-hast@13.0.2: + resolution: {integrity: sha512-U5I+500EOOw9e3ZrclN3Is3fRpw8c19SMyNZlZ2IS+7vLsNzb2Om11VpIVOR+/0137GhZsFEF6YiKD5+0Hr2Og==} + dependencies: + '@types/hast': 3.0.2 + '@types/mdast': 4.0.2 + '@ungap/structured-clone': 1.2.0 + devlop: 1.1.0 + micromark-util-sanitize-uri: 2.0.0 + trim-lines: 3.0.1 + unist-util-position: 5.0.0 + unist-util-visit: 5.0.0 + dev: false + /mdast-util-to-markdown@1.5.0: resolution: {integrity: sha512-bbv7TPv/WC49thZPg3jXuqzuvI45IL2EVAr/KxF0BSdHsU0ceFHOmwQn6evxAh1GaoK/6GQ1wp4R4oW2+LFL/A==} dependencies: @@ -5257,11 +5351,6 @@ packages: resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} - /memorystream@0.3.1: - resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} - engines: {node: '>= 0.10.0'} - dev: true - /merge-descriptors@1.0.1: resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} @@ -5488,6 +5577,13 @@ packages: micromark-util-symbol: 1.1.0 micromark-util-types: 1.1.0 + /micromark-util-character@2.0.1: + resolution: {integrity: sha512-3wgnrmEAJ4T+mGXAUfMvMAbxU9RDG43XmGce4j6CwPtVxB3vfwXSZ6KhFwDzZ3mZHhmPimMAXg71veiBGzeAZw==} + dependencies: + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + dev: false + /micromark-util-chunked@1.1.0: resolution: {integrity: sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ==} dependencies: @@ -5522,6 +5618,10 @@ packages: /micromark-util-encode@1.1.0: resolution: {integrity: sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw==} + /micromark-util-encode@2.0.0: + resolution: {integrity: sha512-pS+ROfCXAGLWCOc8egcBvT0kf27GoWMqtdarNfDcjb6YLuV5cM3ioG45Ys2qOVqeqSbjaKg72vU+Wby3eddPsA==} + dev: false + /micromark-util-events-to-acorn@1.2.3: resolution: {integrity: sha512-ij4X7Wuc4fED6UoLWkmo0xJQhsktfNh1J0m8g4PbIMPlx+ek/4YdW5mvbye8z/aZvAPUoxgXHrwVlXAPKMRp1w==} dependencies: @@ -5554,6 +5654,14 @@ packages: micromark-util-encode: 1.1.0 micromark-util-symbol: 1.1.0 + /micromark-util-sanitize-uri@2.0.0: + resolution: {integrity: sha512-WhYv5UEcZrbAtlsnPuChHUAsu/iBPOVaEVsntLBIdpibO0ddy8OzavZz3iL2xVvBZOpolujSliP65Kq0/7KIYw==} + dependencies: + micromark-util-character: 2.0.1 + micromark-util-encode: 2.0.0 + micromark-util-symbol: 2.0.0 + dev: false + /micromark-util-subtokenize@1.1.0: resolution: {integrity: sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A==} dependencies: @@ -5565,9 +5673,17 @@ packages: /micromark-util-symbol@1.1.0: resolution: {integrity: sha512-uEjpEYY6KMs1g7QfJ2eX1SQEV+ZT4rUD3UcF6l57acZvLNK7PBZL+ty82Z1qhK1/yXIY4bdx04FKMgR0g4IAag==} + /micromark-util-symbol@2.0.0: + resolution: {integrity: sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==} + dev: false + /micromark-util-types@1.1.0: resolution: {integrity: sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==} + /micromark-util-types@2.0.0: + resolution: {integrity: sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==} + dev: false + /micromark@3.2.0: resolution: {integrity: sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==} dependencies: @@ -5757,10 +5873,6 @@ packages: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} - /nice-try@1.0.5: - resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} - dev: true - /node-domexception@1.0.0: resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} engines: {node: '>=10.5.0'} @@ -5850,22 +5962,6 @@ packages: semver: 7.5.4 dev: true - /npm-run-all@4.1.5: - resolution: {integrity: sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==} - engines: {node: '>= 4'} - hasBin: true - dependencies: - ansi-styles: 3.2.1 - chalk: 2.4.2 - cross-spawn: 6.0.5 - memorystream: 0.3.1 - minimatch: 3.1.2 - pidtree: 0.3.1 - read-pkg: 3.0.0 - shell-quote: 1.8.1 - string.prototype.padend: 3.1.5 - dev: true - /npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -6072,14 +6168,6 @@ packages: is-decimal: 2.0.1 is-hexadecimal: 2.0.1 - /parse-json@4.0.0: - resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} - engines: {node: '>=4'} - dependencies: - error-ex: 1.3.2 - json-parse-better-errors: 1.0.2 - dev: true - /parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} @@ -6099,6 +6187,12 @@ packages: resolution: {integrity: sha512-ck5zaMF0ydjGfejNMnlo5YU2oJ+pT+80Jb1y4ybanT27j+zbVP/jkYmCrUGsEln0Ox/hZmuvgy8Ra7AxbXP2Mw==} dev: true + /parse5@7.1.2: + resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} + dependencies: + entities: 4.5.0 + dev: false + /parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} @@ -6112,11 +6206,6 @@ packages: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} - /path-key@2.0.1: - resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} - engines: {node: '>=4'} - dev: true - /path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -6136,13 +6225,6 @@ packages: /path-to-regexp@0.1.7: resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} - /path-type@3.0.0: - resolution: {integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==} - engines: {node: '>=4'} - dependencies: - pify: 3.0.0 - dev: true - /path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -6174,12 +6256,6 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} - /pidtree@0.3.1: - resolution: {integrity: sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==} - engines: {node: '>=0.10'} - hasBin: true - dev: true - /pidtree@0.6.0: resolution: {integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==} engines: {node: '>=0.10'} @@ -6190,11 +6266,6 @@ packages: resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} engines: {node: '>=0.10.0'} - /pify@3.0.0: - resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} - engines: {node: '>=4'} - dev: true - /pirates@4.0.6: resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} @@ -6376,21 +6447,6 @@ packages: parse-ms: 2.1.0 dev: true - /prism-react-renderer@2.1.0(react@18.2.0): - resolution: {integrity: sha512-I5cvXHjA1PVGbGm1MsWCpvBCRrYyxEri0MC7/JbfIfYfcXAxHyO5PaUjs3A8H5GW6kJcLhTHxxMaOZZpRZD2iQ==} - peerDependencies: - react: '>=16.0.0' - dependencies: - '@types/prismjs': 1.26.2 - clsx: 1.2.1 - react: 18.2.0 - dev: false - - /prismjs@1.29.0: - resolution: {integrity: sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==} - engines: {node: '>=6'} - dev: false - /proc-log@3.0.0: resolution: {integrity: sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -6565,15 +6621,6 @@ packages: type-fest: 0.8.1 dev: true - /read-pkg@3.0.0: - resolution: {integrity: sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==} - engines: {node: '>=4'} - dependencies: - load-json-file: 4.0.0 - normalize-package-data: 2.5.0 - path-type: 3.0.0 - dev: true - /read-pkg@5.2.0: resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} engines: {node: '>=8'} @@ -6623,6 +6670,10 @@ packages: which-builtin-type: 1.1.3 dev: true + /regenerator-runtime@0.13.11: + resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} + dev: false + /regenerator-runtime@0.14.0: resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} @@ -6652,6 +6703,14 @@ packages: jsesc: 0.5.0 dev: true + /rehype-raw@7.0.0: + resolution: {integrity: sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==} + dependencies: + '@types/hast': 3.0.2 + hast-util-raw: 9.0.1 + vfile: 6.0.1 + dev: false + /rehype-slug@5.1.0: resolution: {integrity: sha512-Gf91dJoXneiorNEnn+Phx97CO7oRMrpi+6r155tTxzGuLtm+QrI4cTwCa9e1rtePdL4i9tSO58PeSS6HWfgsiw==} dependencies: @@ -6717,6 +6776,25 @@ packages: mdast-util-to-hast: 12.3.0 unified: 10.1.2 + /remark-shiki-twoslash@3.1.3(typescript@5.2.2): + resolution: {integrity: sha512-4e8OH3ySOCw5wUbDcPszokOKjKuebOqlP2WlySvC7ITBOq27BiGsFlq+FNWhxppZ+JzhTWah4gQrnMjX3KDbAQ==} + peerDependencies: + typescript: '>3' + dependencies: + '@types/unist': 2.0.9 + '@typescript/twoslash': 3.1.0 + '@typescript/vfs': 1.3.4 + fenceparser: 1.1.1 + regenerator-runtime: 0.13.11 + shiki: 0.10.1 + shiki-twoslash: 3.1.2(typescript@5.2.2) + tslib: 2.1.0 + typescript: 5.2.2 + unist-util-visit: 2.0.3 + transitivePeerDependencies: + - supports-color + dev: false + /remove-markdown@0.5.0: resolution: {integrity: sha512-x917M80K97K5IN1L8lUvFehsfhR8cYjGQ/yAMRI9E7JIKivtl5Emo5iD13DhMr+VojzMCiYk8V2byNPwT/oapg==} dev: false @@ -6922,13 +7000,6 @@ packages: /setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} - /shebang-command@1.2.0: - resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} - engines: {node: '>=0.10.0'} - dependencies: - shebang-regex: 1.0.0 - dev: true - /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -6936,19 +7007,32 @@ packages: shebang-regex: 3.0.0 dev: true - /shebang-regex@1.0.0: - resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} - engines: {node: '>=0.10.0'} - dev: true - /shebang-regex@3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} dev: true - /shell-quote@1.8.1: - resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} - dev: true + /shiki-twoslash@3.1.2(typescript@5.2.2): + resolution: {integrity: sha512-JBcRIIizi+exIA/OUhYkV6jtyeZco0ykCkIRd5sgwIt1Pm4pz+maoaRZpm6SkhPwvif4fCA7xOtJOykhpIV64Q==} + peerDependencies: + typescript: '>3' + dependencies: + '@typescript/twoslash': 3.1.0 + '@typescript/vfs': 1.3.4 + fenceparser: 1.1.1 + shiki: 0.10.1 + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: false + + /shiki@0.10.1: + resolution: {integrity: sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==} + dependencies: + jsonc-parser: 3.2.0 + vscode-oniguruma: 1.7.0 + vscode-textmate: 5.2.0 + dev: false /side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} @@ -7079,15 +7163,6 @@ packages: side-channel: 1.0.4 dev: true - /string.prototype.padend@3.1.5: - resolution: {integrity: sha512-DOB27b/2UTTD+4myKUFh+/fXWcu/UDyASIXfg+7VzoCNNGOfWvoyU/x5pvVHr++ztyt/oSYI1BcWBBG/hmlNjA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.5 - define-properties: 1.2.1 - es-abstract: 1.22.3 - dev: true - /string.prototype.trim@1.2.8: resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} engines: {node: '>= 0.4'} @@ -7301,10 +7376,6 @@ packages: xtend: 4.0.2 dev: true - /tiny-invariant@1.3.1: - resolution: {integrity: sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==} - dev: false - /to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} @@ -7370,6 +7441,10 @@ packages: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true + /tslib@2.1.0: + resolution: {integrity: sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==} + dev: false + /tsutils@3.21.0(typescript@5.2.2): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -7504,11 +7579,21 @@ packages: /unist-util-generated@2.0.1: resolution: {integrity: sha512-qF72kLmPxAw0oN2fwpWIqbXAVyEqUzDHMsbtPvOudIlUzXYFIeQIuxXQCRCFh22B7cixvU0MG7m3MW8FTq/S+A==} + /unist-util-is@4.1.0: + resolution: {integrity: sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==} + dev: false + /unist-util-is@5.2.1: resolution: {integrity: sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==} dependencies: '@types/unist': 2.0.9 + /unist-util-is@6.0.0: + resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==} + dependencies: + '@types/unist': 3.0.1 + dev: false + /unist-util-position-from-estree@1.1.2: resolution: {integrity: sha512-poZa0eXpS+/XpoQwGwl79UUdea4ol2ZuCYguVaJS4qzIOMDzbqz8a3erUCOmubSZkaOuGamb3tX790iwOIROww==} dependencies: @@ -7519,6 +7604,12 @@ packages: dependencies: '@types/unist': 2.0.9 + /unist-util-position@5.0.0: + resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==} + dependencies: + '@types/unist': 3.0.1 + dev: false + /unist-util-remove-position@4.0.2: resolution: {integrity: sha512-TkBb0HABNmxzAcfLf4qsIbFbaPDvMO6wa3b3j4VcEzFVaw1LBKwnW4/sRJ/atSLSzoIg41JWEdnE7N6DIhGDGQ==} dependencies: @@ -7530,12 +7621,40 @@ packages: dependencies: '@types/unist': 2.0.9 + /unist-util-stringify-position@4.0.0: + resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} + dependencies: + '@types/unist': 3.0.1 + dev: false + + /unist-util-visit-parents@3.1.1: + resolution: {integrity: sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==} + dependencies: + '@types/unist': 2.0.9 + unist-util-is: 4.1.0 + dev: false + /unist-util-visit-parents@5.1.3: resolution: {integrity: sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==} dependencies: '@types/unist': 2.0.9 unist-util-is: 5.2.1 + /unist-util-visit-parents@6.0.1: + resolution: {integrity: sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==} + dependencies: + '@types/unist': 3.0.1 + unist-util-is: 6.0.0 + dev: false + + /unist-util-visit@2.0.3: + resolution: {integrity: sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==} + dependencies: + '@types/unist': 2.0.9 + unist-util-is: 4.1.0 + unist-util-visit-parents: 3.1.1 + dev: false + /unist-util-visit@4.1.2: resolution: {integrity: sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==} dependencies: @@ -7543,6 +7662,14 @@ packages: unist-util-is: 5.2.1 unist-util-visit-parents: 5.1.3 + /unist-util-visit@5.0.0: + resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==} + dependencies: + '@types/unist': 3.0.1 + unist-util-is: 6.0.0 + unist-util-visit-parents: 6.0.1 + dev: false + /universal-user-agent@6.0.0: resolution: {integrity: sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==} dev: false @@ -7622,12 +7749,26 @@ packages: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} + /vfile-location@5.0.2: + resolution: {integrity: sha512-NXPYyxyBSH7zB5U6+3uDdd6Nybz6o6/od9rk8bp9H8GR3L+cm/fC0uUTbqBmUTnMCUDslAGBOIKNfvvb+gGlDg==} + dependencies: + '@types/unist': 3.0.1 + vfile: 6.0.1 + dev: false + /vfile-message@3.1.4: resolution: {integrity: sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==} dependencies: '@types/unist': 2.0.9 unist-util-stringify-position: 3.0.3 + /vfile-message@4.0.2: + resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==} + dependencies: + '@types/unist': 3.0.1 + unist-util-stringify-position: 4.0.0 + dev: false + /vfile@5.3.7: resolution: {integrity: sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==} dependencies: @@ -7636,6 +7777,14 @@ packages: unist-util-stringify-position: 3.0.3 vfile-message: 3.1.4 + /vfile@6.0.1: + resolution: {integrity: sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==} + dependencies: + '@types/unist': 3.0.1 + unist-util-stringify-position: 4.0.0 + vfile-message: 4.0.2 + dev: false + /vite-node@0.28.5: resolution: {integrity: sha512-LmXb9saMGlrMZbXTvOveJKwMTBTNUH66c8rJnQ0ZPNX+myPEol64+szRzXtV5ORb0Hb/91yq+/D3oERoyAt6LA==} engines: {node: '>=v14.16.0'} @@ -7712,6 +7861,14 @@ packages: fsevents: 2.3.3 dev: true + /vscode-oniguruma@1.7.0: + resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} + dev: false + + /vscode-textmate@5.2.0: + resolution: {integrity: sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==} + dev: false + /wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -7725,6 +7882,10 @@ packages: optionalDependencies: '@zxing/text-encoding': 0.9.0 + /web-namespaces@2.0.1: + resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} + dev: false + /web-streams-polyfill@3.2.1: resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==} engines: {node: '>= 8'} @@ -7785,13 +7946,6 @@ packages: gopd: 1.0.1 has-tostringtag: 1.0.0 - /which@1.3.1: - resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} - hasBin: true - dependencies: - isexe: 2.0.0 - dev: true - /which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} From f9b584c77c18ff7ac016d4264c8202edfcb79224 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 5 Nov 2023 12:12:45 +1100 Subject: [PATCH 05/39] Add language indicator to code blocks --- app/components/CodeBlock.tsx | 33 +++++++++++++++++++++++++++++++++ app/components/Mdx.tsx | 2 ++ app/utils/documents.server.ts | 2 +- package.json | 3 ++- pnpm-lock.yaml | 7 +++++++ 5 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 app/components/CodeBlock.tsx diff --git a/app/components/CodeBlock.tsx b/app/components/CodeBlock.tsx new file mode 100644 index 00000000..ba3c3d7c --- /dev/null +++ b/app/components/CodeBlock.tsx @@ -0,0 +1,33 @@ +import type { FC, HTMLAttributes, ReactElement } from 'react' +import invariant from 'tiny-invariant' + +function getLanguageFromChildren(children: any): string { + const language = children[0].props.children + return language ? language : '' +} + +export const CodeBlock: FC> = (props) => { + const {children, ...rest} = props + invariant(!!children, 'children is required') + const userLang = getLanguageFromChildren(children) + return ( +
+
+
+ {userLang} +
+
+
+                {children}
+              
+
+
+
+ ) +} diff --git a/app/components/Mdx.tsx b/app/components/Mdx.tsx index 9da62504..6454ae0a 100644 --- a/app/components/Mdx.tsx +++ b/app/components/Mdx.tsx @@ -1,5 +1,6 @@ import * as React from 'react' import { getMDXComponent } from 'mdx-bundler/client' +import { CodeBlock } from '~/components/CodeBlock' import { MarkdownLink } from '~/components/MarkdownLink' import type { MDXComponents } from 'mdx/types' @@ -39,6 +40,7 @@ const markdownComponents = { h4: makeHeading('h4'), h5: makeHeading('h5'), h6: makeHeading('h6'), + pre: CodeBlock, } export function Mdx({ diff --git a/app/utils/documents.server.ts b/app/utils/documents.server.ts index 5e54cef6..ba00e09e 100644 --- a/app/utils/documents.server.ts +++ b/app/utils/documents.server.ts @@ -205,7 +205,7 @@ export async function markdownToMdx(content: string) { const mdx = await bundleMDX<{ title: string }>({ source: content, mdxOptions: (options) => { - options.remarkPlugins = [...(options.remarkPlugins ?? []), remarkGfm, [remarkShikiTwoslash, { theme: "dark-plus" }]] + options.remarkPlugins = [...(options.remarkPlugins ?? []), remarkGfm, [remarkShikiTwoslash, { theme: "github-dark" }]] // @ts-ignore options.rehypePlugins = [...(options.rehypePlugins ?? []), rehypeSlug, [rehypeRaw, {passThrough: nodeTypes}]] return options diff --git a/package.json b/package.json index 9d811925..8b9c05cd 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,8 @@ "remark-gfm": "^3.0.1", "remark-shiki-twoslash": "^3.1.3", "remove-markdown": "^0.5.0", - "tailwind-merge": "^1.14.0" + "tailwind-merge": "^1.14.0", + "tiny-invariant": "^1.3.1" }, "devDependencies": { "@remix-run/dev": "^2.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 169b2fe4..2c473256 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -95,6 +95,9 @@ dependencies: tailwind-merge: specifier: ^1.14.0 version: 1.14.0 + tiny-invariant: + specifier: ^1.3.1 + version: 1.3.1 devDependencies: '@remix-run/dev': @@ -7376,6 +7379,10 @@ packages: xtend: 4.0.2 dev: true + /tiny-invariant@1.3.1: + resolution: {integrity: sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==} + dev: false + /to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} From d01225914838d4709e118d8b63c8029c70ea731a Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 5 Nov 2023 12:35:42 +1100 Subject: [PATCH 06/39] More CodeBlock style fixes --- app/components/CodeBlock.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/components/CodeBlock.tsx b/app/components/CodeBlock.tsx index ba3c3d7c..0a777762 100644 --- a/app/components/CodeBlock.tsx +++ b/app/components/CodeBlock.tsx @@ -1,13 +1,13 @@ -import type { FC, HTMLAttributes, ReactElement } from 'react' +import type { FC, HTMLAttributes } from 'react' import invariant from 'tiny-invariant' function getLanguageFromChildren(children: any): string { - const language = children[0].props.children + const language = children[0]?.props?.children return language ? language : '' } export const CodeBlock: FC> = (props) => { - const {children, ...rest} = props + const {children, className, style} = props invariant(!!children, 'children is required') const userLang = getLanguageFromChildren(children) return ( @@ -23,7 +23,7 @@ export const CodeBlock: FC> = (props) => { className="rounded-md font-normal w-full border border-gray-200 dark:border-0" > -
+              
                 {children}
               
From 93f309cb50891fe82ec4c2349fa81fb264181bf7 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 5 Nov 2023 14:57:49 +1100 Subject: [PATCH 07/39] Light/dark themes for shiki --- .prettierignore | 1 + app/components/CodeBlock.tsx | 30 +-- app/styles/app.css | 439 ++++++++++++++++++---------------- app/utils/documents.server.ts | 15 +- package.json | 2 +- 5 files changed, 255 insertions(+), 232 deletions(-) diff --git a/.prettierignore b/.prettierignore index a28d29e3..135325e9 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,3 @@ **/api +**/build **/public diff --git a/app/components/CodeBlock.tsx b/app/components/CodeBlock.tsx index 0a777762..ddc68798 100644 --- a/app/components/CodeBlock.tsx +++ b/app/components/CodeBlock.tsx @@ -7,27 +7,27 @@ function getLanguageFromChildren(children: any): string { } export const CodeBlock: FC> = (props) => { - const {children, className, style} = props + const { children, className, style } = props invariant(!!children, 'children is required') const userLang = getLanguageFromChildren(children) return (
-
-
+
- {userLang} -
-
-
-                {children}
-              
-
-
+ > +
+            {children}
+          
+
+
) } diff --git a/app/styles/app.css b/app/styles/app.css index 1c73b0af..020327f4 100644 --- a/app/styles/app.css +++ b/app/styles/app.css @@ -142,297 +142,312 @@ } pre { - /* In theory shiki will overwrite these, but this is to make sure there are defaults regardless */ - background-color: white; - color: black; + /* In theory shiki will overwrite these, but this is to make sure there are defaults regardless */ + background-color: white; + color: black; - /* Give it some space to breathe */ - padding: 12px; + /* Give it some space to breathe */ + padding: 12px; - /* All code samples get a grey border, twoslash ones get a different color */ - border-left: 1px solid #999; - border-bottom: 1px solid #999; + /* All code samples get a grey border, twoslash ones get a different color */ + border-left: 1px solid #999; + border-bottom: 1px solid #999; - margin-bottom: 3rem; + margin-bottom: 3rem; - /* Important to allow the code to move horizontally; */ - overflow-x: auto; - position: relative; + /* Important to allow the code to move horizontally; */ + overflow-x: auto; + position: relative; } - pre.shiki { - overflow-x: auto; +pre.shiki { + overflow-x: auto; } - pre.shiki:hover .dim { - opacity: 1; +pre.shiki:hover .dim { + opacity: 1; } - pre.shiki div.dim { - opacity: 0.5; +pre.shiki div.dim { + opacity: 0.5; } - pre.shiki div.dim, pre.shiki div.highlight { - margin: 0; - padding: 0; +pre.shiki div.dim, +pre.shiki div.highlight { + margin: 0; + padding: 0; } - pre.shiki div.highlight { - opacity: 1; - background-color: #f1f8ff; +pre.shiki div.highlight { + opacity: 1; + background-color: #f1f8ff; } - pre.shiki div.line { - min-height: 1rem; +pre.shiki div.line { + min-height: 1rem; } /** Don't show the language identifiers */ -pre.shiki .language-id{ - display: none; +pre.shiki .language-id { + display: none; } /* Visually differentiates twoslash code samples */ - pre.twoslash { - border-color: #719af4; +pre.twoslash { + border-color: #719af4; } /** When you mouse over the pre, show the underlines */ pre.twoslash:hover data-lsp { - border-color: #747474; + border-color: #747474; } /** The tooltip-like which provides the LSP response */ pre.twoslash data-lsp:hover::before { - content: attr(lsp); - position: absolute; - transform: translate(0, 1rem); + content: attr(lsp); + position: absolute; + transform: translate(0, 1rem); - background-color: #3f3f3f; - color: #fff; - text-align: left; - padding: 5px 8px; - border-radius: 2px; - font-family: "JetBrains Mono", Menlo, Monaco, Consolas, Courier New, monospace; - font-size: 14px; - white-space: pre-wrap; - z-index: 100; + background-color: #3f3f3f; + color: #fff; + text-align: left; + padding: 5px 8px; + border-radius: 2px; + font-family: 'JetBrains Mono', Menlo, Monaco, Consolas, Courier New, monospace; + font-size: 14px; + white-space: pre-wrap; + z-index: 100; } pre .code-container { - overflow: auto; + overflow: auto; } /* The try button */ - pre .code-container > a { - position: absolute; - right: 8px; - bottom: 8px; - border-radius: 4px; - border: 1px solid #719af4; - padding: 0 8px; - color: #719af4; - text-decoration: none; - opacity: 0; - transition-timing-function: ease; - transition: opacity 0.3s; +pre .code-container > a { + position: absolute; + right: 8px; + bottom: 8px; + border-radius: 4px; + border: 1px solid #719af4; + padding: 0 8px; + color: #719af4; + text-decoration: none; + opacity: 0; + transition-timing-function: ease; + transition: opacity 0.3s; } /* Respect no animations */ @media (prefers-reduced-motion: reduce) { - pre .code-container > a { - transition: none; - } + pre .code-container > a { + transition: none; + } } - pre .code-container > a:hover { - color: white; - background-color: #719af4; +pre .code-container > a:hover { + color: white; + background-color: #719af4; } - pre .code-container:hover a { - opacity: 1; +pre .code-container:hover a { + opacity: 1; } - pre code { - font-size: 15px; - font-family: "JetBrains Mono", Menlo, Monaco, Consolas, Courier New, monospace;; - white-space: pre; - -webkit-overflow-scrolling: touch; +pre code { + font-size: 15px; + font-family: 'JetBrains Mono', Menlo, Monaco, Consolas, Courier New, monospace; + white-space: pre; + -webkit-overflow-scrolling: touch; } - pre code a { - text-decoration: none; +pre code a { + text-decoration: none; } - pre data-err { - /* Extracted from VS Code */ - background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%206%203'%20enable-background%3D'new%200%200%206%203'%20height%3D'3'%20width%3D'6'%3E%3Cg%20fill%3D'%23c94824'%3E%3Cpolygon%20points%3D'5.5%2C0%202.5%2C3%201.1%2C3%204.1%2C0'%2F%3E%3Cpolygon%20points%3D'4%2C0%206%2C2%206%2C0.6%205.4%2C0'%2F%3E%3Cpolygon%20points%3D'0%2C2%201%2C3%202.4%2C3%200%2C0.6'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") repeat-x bottom left; - padding-bottom: 3px; +pre data-err { + /* Extracted from VS Code */ + background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%206%203'%20enable-background%3D'new%200%200%206%203'%20height%3D'3'%20width%3D'6'%3E%3Cg%20fill%3D'%23c94824'%3E%3Cpolygon%20points%3D'5.5%2C0%202.5%2C3%201.1%2C3%204.1%2C0'%2F%3E%3Cpolygon%20points%3D'4%2C0%206%2C2%206%2C0.6%205.4%2C0'%2F%3E%3Cpolygon%20points%3D'0%2C2%201%2C3%202.4%2C3%200%2C0.6'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") + repeat-x bottom left; + padding-bottom: 3px; } - pre .query { - margin-bottom: 10px; - color: #137998; - display: inline-block; +pre .query { + margin-bottom: 10px; + color: #137998; + display: inline-block; } - /* In order to have the 'popped out' style design and to not break the layout +/* In order to have the 'popped out' style design and to not break the layout /* we need to place a fake and un-selectable copy of the error which _isn't_ broken out /* behind the actual error message. /* This sections keeps both of those two in in sync */ - pre .error, pre .error-behind { - margin-left: -14px; - margin-top: 8px; - margin-bottom: 4px; - padding: 6px; - padding-left: 14px; - width: calc(100% - 20px); - white-space: pre-wrap; - display: block; -} - pre .error { - position: absolute; - background-color: #fee; - border-left: 2px solid #bf1818; - /* Give the space to the error code */ - display: flex; - align-items: center; - color: black; -} - pre .error .code { - display: none; -} - pre .error-behind { - user-select: none; - visibility: transparent; - color: #fee; +pre .error, +pre .error-behind { + margin-left: -14px; + margin-top: 8px; + margin-bottom: 4px; + padding: 6px; + padding-left: 14px; + width: calc(100% - 20px); + white-space: pre-wrap; + display: block; +} +pre .error { + position: absolute; + background-color: #fee; + border-left: 2px solid #bf1818; + /* Give the space to the error code */ + display: flex; + align-items: center; + color: black; +} +pre .error .code { + display: none; +} +pre .error-behind { + user-select: none; + visibility: transparent; + color: #fee; } /* Queries */ - pre .arrow { - /* Transparent background */ - background-color: #eee; - position: relative; - top: -7px; - margin-left: 0.1rem; - /* Edges */ - border-left: 1px solid #eee; - border-top: 1px solid #eee; - transform: translateY(25%) rotate(45deg); - /* Size */ - height: 8px; - width: 8px; -} - pre .popover { - margin-bottom: 10px; - background-color: #eee; - display: inline-block; - padding: 0 0.5rem 0.3rem; - margin-top: 10px; - border-radius: 3px; +pre .arrow { + /* Transparent background */ + background-color: #eee; + position: relative; + top: -7px; + margin-left: 0.1rem; + /* Edges */ + border-left: 1px solid #eee; + border-top: 1px solid #eee; + transform: translateY(25%) rotate(45deg); + /* Size */ + height: 8px; + width: 8px; +} +pre .popover { + margin-bottom: 10px; + background-color: #eee; + display: inline-block; + padding: 0 0.5rem 0.3rem; + margin-top: 10px; + border-radius: 3px; } /* Completion */ - pre .inline-completions ul.dropdown { - display: inline-block; - position: absolute; - width: 240px; - background-color: gainsboro; - color: grey; - padding-top: 4px; - font-family: var(--code-font); - font-size: 0.8rem; - margin: 0; - padding: 0; - border-left: 4px solid #4b9edd; -} - pre .inline-completions ul.dropdown::before { - background-color: #4b9edd; - width: 2px; - position: absolute; - top: -1.2rem; - left: -3px; - content: " "; -} - pre .inline-completions ul.dropdown li { - overflow-x: hidden; - padding-left: 4px; - margin-bottom: 4px; -} - pre .inline-completions ul.dropdown li.deprecated { - text-decoration: line-through; -} - pre .inline-completions ul.dropdown li span.result-found { - color: #4b9edd; -} - pre .inline-completions ul.dropdown li span.result { - width: 100px; - color: black; - display: inline-block; -} - .dark-theme .markdown pre { - background-color: #d8d8d8; - border-color: #ddd; - filter: invert(98%) hue-rotate(180deg); -} - data-lsp { - /* Ensures there's no 1px jump when the hover happens */ - border-bottom: 1px dotted transparent; - /* Fades in unobtrusively */ - transition-timing-function: ease; - transition: border-color 0.3s; +pre .inline-completions ul.dropdown { + display: inline-block; + position: absolute; + width: 240px; + background-color: gainsboro; + color: grey; + padding-top: 4px; + font-family: var(--code-font); + font-size: 0.8rem; + margin: 0; + padding: 0; + border-left: 4px solid #4b9edd; +} +pre .inline-completions ul.dropdown::before { + background-color: #4b9edd; + width: 2px; + position: absolute; + top: -1.2rem; + left: -3px; + content: ' '; +} +pre .inline-completions ul.dropdown li { + overflow-x: hidden; + padding-left: 4px; + margin-bottom: 4px; +} +pre .inline-completions ul.dropdown li.deprecated { + text-decoration: line-through; +} +pre .inline-completions ul.dropdown li span.result-found { + color: #4b9edd; +} +pre .inline-completions ul.dropdown li span.result { + width: 100px; + color: black; + display: inline-block; +} +.dark-theme .markdown pre { + background-color: #d8d8d8; + border-color: #ddd; + filter: invert(98%) hue-rotate(180deg); +} +data-lsp { + /* Ensures there's no 1px jump when the hover happens */ + border-bottom: 1px dotted transparent; + /* Fades in unobtrusively */ + transition-timing-function: ease; + transition: border-color 0.3s; } /* Respect people's wishes to not have animations */ - @media (prefers-reduced-motion: reduce) { - data-lsp { - transition: none; - } +@media (prefers-reduced-motion: reduce) { + data-lsp { + transition: none; + } } /** Annotations support, providing a tool for meta commentary */ .tag-container { - position: relative; + position: relative; } .tag-container .twoslash-annotation { - position: absolute; - font-family: "JetBrains Mono", Menlo, Monaco, Consolas, Courier New, monospace; - right: -10px; - /** Default annotation text to 200px */ - width: 200px; - color: #187abf; - background-color: #fcf3d9 bb; + position: absolute; + font-family: 'JetBrains Mono', Menlo, Monaco, Consolas, Courier New, monospace; + right: -10px; + /** Default annotation text to 200px */ + width: 200px; + color: #187abf; + background-color: #fcf3d9 bb; } .tag-container .twoslash-annotation p { - text-align: left; - font-size: 0.8rem; - line-height: 0.9rem; + text-align: left; + font-size: 0.8rem; + line-height: 0.9rem; } .tag-container .twoslash-annotation svg { - float: left; - margin-left: -44px; + float: left; + margin-left: -44px; } .tag-container .twoslash-annotation.left { - right: auto; - left: -200px; + right: auto; + left: -200px; } .tag-container .twoslash-annotation.left svg { - float: right; - margin-right: -5px; + float: right; + margin-right: -5px; } /** Support for showing console log/warn/errors inline */ pre .logger { - display: flex; - align-items: center; - color: black; - padding: 6px; - padding-left: 8px; - width: calc(100% - 19px); - white-space: pre-wrap; + display: flex; + align-items: center; + color: black; + padding: 6px; + padding-left: 8px; + width: calc(100% - 19px); + white-space: pre-wrap; } pre .logger svg { - margin-right: 9px; + margin-right: 9px; } pre .logger.error-log { - background-color: #fee; - border-left: 2px solid #bf1818; + background-color: #fee; + border-left: 2px solid #bf1818; } pre .logger.warn-log { - background-color: #ffe; - border-left: 2px solid #eae662; + background-color: #ffe; + border-left: 2px solid #eae662; } pre .logger.log-log { - background-color: #e9e9e9; - border-left: 2px solid #ababab; + background-color: #e9e9e9; + border-left: 2px solid #ababab; } pre .logger.log-log svg { - margin-left: 6px; - margin-right: 9px; + margin-left: 6px; + margin-right: 9px; +} + +@media (prefers-color-scheme: light) { + .shiki.github-dark { + display: none; + } +} + +@media (prefers-color-scheme: dark) { + .shiki.github-light { + display: none; + } } diff --git a/app/utils/documents.server.ts b/app/utils/documents.server.ts index ba00e09e..2cab55d1 100644 --- a/app/utils/documents.server.ts +++ b/app/utils/documents.server.ts @@ -4,7 +4,7 @@ import { fileURLToPath } from 'node:url' import { bundleMDX } from 'mdx-bundler' import * as graymatter from 'gray-matter' import { fetchCached } from '~/utils/cache.server' -import remarkShikiTwoslash from "remark-shiki-twoslash" +import remarkShikiTwoslash from 'remark-shiki-twoslash' import rehypeRaw from 'rehype-raw' import { nodeTypes } from '@mdx-js/mdx' @@ -205,9 +205,16 @@ export async function markdownToMdx(content: string) { const mdx = await bundleMDX<{ title: string }>({ source: content, mdxOptions: (options) => { - options.remarkPlugins = [...(options.remarkPlugins ?? []), remarkGfm, [remarkShikiTwoslash, { theme: "github-dark" }]] - // @ts-ignore - options.rehypePlugins = [...(options.rehypePlugins ?? []), rehypeSlug, [rehypeRaw, {passThrough: nodeTypes}]] + options.remarkPlugins = [ + ...(options.remarkPlugins ?? []), + remarkGfm, + [remarkShikiTwoslash, { themes: ['github-light', 'github-dark'] }], + ] + options.rehypePlugins = [ + ...(options.rehypePlugins ?? []), + rehypeSlug, + [rehypeRaw, { passThrough: nodeTypes }] as any, // TODO: remove when types are fixed + ] return options }, }) diff --git a/package.json b/package.json index 8b9c05cd..d1859156 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dev": "vite dev", "build": "vite build && vite build --ssr", "start": "remix-serve ./build/index.js", - "format": "prettier --plugin-search-dir . \"**/*.{md,js,jsx,cjs,ts,tsx,json}\" --write", + "format": "prettier --plugin-search-dir . \"**/*.{js,jsx,cjs,ts,tsx,css,md,json}\" --write", "lint": "eslint --ext .ts,.tsx ./app" }, "dependencies": { From 07795f05d7d39f3bd31af98ce0c7a646e20b0942 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 5 Nov 2023 15:04:41 +1100 Subject: [PATCH 08/39] Fix CodeBlock borders --- app/components/CodeBlock.tsx | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/app/components/CodeBlock.tsx b/app/components/CodeBlock.tsx index ddc68798..9d25cfa6 100644 --- a/app/components/CodeBlock.tsx +++ b/app/components/CodeBlock.tsx @@ -9,25 +9,21 @@ function getLanguageFromChildren(children: any): string { export const CodeBlock: FC> = (props) => { const { children, className, style } = props invariant(!!children, 'children is required') - const userLang = getLanguageFromChildren(children) + const lang = getLanguageFromChildren(children) return ( -
-
-
+
- {userLang} -
-
-
-            {children}
-          
-
+ > + {lang}
+
+        {children}
+      
) } From 6f90e4cfd3d4047e17d233484ee3023de25d7cc8 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 5 Nov 2023 18:07:10 +1100 Subject: [PATCH 09/39] Start replacing react-icons --- app/components/icons.tsx | 15 +++++++++++++++ app/routes/form.$version._index.tsx | 8 ++++---- app/routes/query.$version._index.tsx | 9 ++++----- app/routes/router.v1._index.tsx | 8 ++++---- app/routes/store.$version._index.tsx | 8 +++----- app/routes/table.v8._index.tsx | 7 +++---- app/routes/virtual.v3._index.tsx | 8 +++----- 7 files changed, 36 insertions(+), 27 deletions(-) create mode 100644 app/components/icons.tsx diff --git a/app/components/icons.tsx b/app/components/icons.tsx new file mode 100644 index 00000000..7c7d22d5 --- /dev/null +++ b/app/components/icons.tsx @@ -0,0 +1,15 @@ +import type { SVGProps } from "react"; + +// https://api.iconify.design/gg:corner-up-left.svg +export function GgCornerUpLeft(props: SVGProps) { + return ( + + ) +} + +// https://api.iconify.design/codicon:preview.svg +export function CodiconPreview(props: SVGProps) { + return ( + + ) +} \ No newline at end of file diff --git a/app/routes/form.$version._index.tsx b/app/routes/form.$version._index.tsx index 52506cd4..ea67fea6 100644 --- a/app/routes/form.$version._index.tsx +++ b/app/routes/form.$version._index.tsx @@ -1,6 +1,6 @@ import * as React from 'react' -import { CgCornerUpLeft } from 'react-icons/cg' +import { GgCornerUpLeft, CodiconPreview } from "~/components/icons" import { FaBolt, FaBook, @@ -14,7 +14,7 @@ import { json } from '@remix-run/node' import { Link, useLoaderData, useParams } from '@remix-run/react' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' -import { VscPreview, VscWand } from 'react-icons/vsc' +import { VscWand } from 'react-icons/vsc' import { TbHeartHandshake } from 'react-icons/tb' import SponsorPack from '~/components/SponsorPack' import { PPPBanner } from '~/components/PPPBanner' @@ -27,7 +27,7 @@ const menu = [ { label: (
- TanStack + TanStack
), to: '/', @@ -35,7 +35,7 @@ const menu = [ { label: (
- Examples + Examples
), to: './docs/framework/react/examples/simple', diff --git a/app/routes/query.$version._index.tsx b/app/routes/query.$version._index.tsx index 93751027..e4d317c9 100644 --- a/app/routes/query.$version._index.tsx +++ b/app/routes/query.$version._index.tsx @@ -1,6 +1,5 @@ import * as React from 'react' - -import { CgCornerUpLeft } from 'react-icons/cg' +import { CodiconPreview, GgCornerUpLeft } from '~/components/icons' import { FaBolt, FaBook, @@ -14,7 +13,7 @@ import { json } from '@remix-run/node' import { Link, useLoaderData, useParams } from '@remix-run/react' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' -import { VscPreview, VscWand } from 'react-icons/vsc' +import { VscWand } from 'react-icons/vsc' import { TbHeartHandshake } from 'react-icons/tb' import SponsorPack from '~/components/SponsorPack' import { PPPBanner } from '~/components/PPPBanner' @@ -32,7 +31,7 @@ const menu = [ { label: (
- TanStack + TanStack
), to: '/', @@ -40,7 +39,7 @@ const menu = [ { label: (
- Examples + Examples
), to: './docs/react/examples/react/basic', diff --git a/app/routes/router.v1._index.tsx b/app/routes/router.v1._index.tsx index bc778b75..63eb636d 100644 --- a/app/routes/router.v1._index.tsx +++ b/app/routes/router.v1._index.tsx @@ -1,5 +1,6 @@ import * as React from 'react' -import { CgCornerUpLeft, CgTimelapse } from 'react-icons/cg' +import { GgCornerUpLeft, CodiconPreview } from "~/components/icons" +import { CgTimelapse } from 'react-icons/cg' import { FaBook, FaCheckCircle, @@ -10,7 +11,6 @@ import { import { Link, useLoaderData } from '@remix-run/react' import { json } from '@remix-run/node' import { TbHeartHandshake, TbZoomQuestion } from 'react-icons/tb' -import { VscPreview } from 'react-icons/vsc' import { RiLightbulbFlashLine } from 'react-icons/ri' import { v1branch } from '~/routes/router.v1' import { Carbon } from '~/components/Carbon' @@ -27,7 +27,7 @@ const menu = [ { label: (
- TanStack + TanStack
), to: '/', @@ -35,7 +35,7 @@ const menu = [ { label: (
- Examples + Examples
), to: './docs/examples', diff --git a/app/routes/store.$version._index.tsx b/app/routes/store.$version._index.tsx index dec92db2..d7d93747 100644 --- a/app/routes/store.$version._index.tsx +++ b/app/routes/store.$version._index.tsx @@ -1,12 +1,10 @@ import * as React from 'react' - -import { CgCornerUpLeft } from 'react-icons/cg' +import { GgCornerUpLeft, CodiconPreview } from "~/components/icons" import { FaBook, FaDiscord, FaGithub, FaTshirt } from 'react-icons/fa' import { json } from '@remix-run/node' import { Link, useLoaderData, useParams } from '@remix-run/react' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' -import { VscPreview } from 'react-icons/vsc' import { TbHeartHandshake } from 'react-icons/tb' import SponsorPack from '~/components/SponsorPack' import { PPPBanner } from '~/components/PPPBanner' @@ -19,7 +17,7 @@ const menu = [ { label: (
- TanStack + TanStack
), to: '/', @@ -27,7 +25,7 @@ const menu = [ { label: (
- Examples + Examples
), to: './docs/framework/react/examples/simple', diff --git a/app/routes/table.v8._index.tsx b/app/routes/table.v8._index.tsx index 2d0ba299..f97977a6 100644 --- a/app/routes/table.v8._index.tsx +++ b/app/routes/table.v8._index.tsx @@ -1,5 +1,5 @@ import * as React from 'react' -import { CgCornerUpLeft } from 'react-icons/cg' +import { GgCornerUpLeft, CodiconPreview } from "~/components/icons" import { FaBolt, FaBook, @@ -16,7 +16,6 @@ import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' import { IoIosBody } from 'react-icons/io' import SponsorPack from '~/components/SponsorPack' -import { VscPreview } from 'react-icons/vsc' import { Logo } from '~/components/Logo' import { getSponsorsForSponsorPack } from '~/server/sponsors' import agGridImage from '~/images/ag-grid.png' @@ -28,7 +27,7 @@ const menu = [ { label: (
- TanStack + TanStack
), to: '/', @@ -36,7 +35,7 @@ const menu = [ { label: (
- Examples + Examples
), to: './docs/examples', diff --git a/app/routes/virtual.v3._index.tsx b/app/routes/virtual.v3._index.tsx index 4bfdd1a6..0049873c 100644 --- a/app/routes/virtual.v3._index.tsx +++ b/app/routes/virtual.v3._index.tsx @@ -1,6 +1,5 @@ import * as React from 'react' - -import { CgCornerUpLeft } from 'react-icons/cg' +import { GgCornerUpLeft, CodiconPreview } from "~/components/icons" import { FaBolt, FaBook, @@ -18,7 +17,6 @@ import { Footer } from '~/components/Footer' import { IoIosBody } from 'react-icons/io' import SponsorPack from '~/components/SponsorPack' import { TbHeartHandshake } from 'react-icons/tb' -import { VscPreview } from 'react-icons/vsc' import { Logo } from '~/components/Logo' import { getSponsorsForSponsorPack } from '~/server/sponsors' @@ -29,7 +27,7 @@ const menu = [ { label: (
- TanStack + TanStack
), to: '/', @@ -37,7 +35,7 @@ const menu = [ { label: (
- Examples + Examples
), to: './docs/examples', From 368c6045c1c9102bc456c483bc1117c79b1d1d86 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 5 Nov 2023 18:19:46 +1100 Subject: [PATCH 10/39] Use named exports from react --- app/components/Carbon.tsx | 6 ++-- app/components/DocTitle.tsx | 4 ++- app/components/Docs.tsx | 13 ++++---- app/components/DocsCalloutBytes.tsx | 3 +- app/components/DocsCalloutQueryGG.tsx | 3 +- app/components/Logo.tsx | 4 ++- app/components/LogoColor.tsx | 4 ++- app/components/LogoQueryGG.tsx | 4 ++- app/components/LogoQueryGGSmall.tsx | 4 ++- app/components/Mdx.tsx | 9 +++--- app/components/PPPBanner.tsx | 4 +-- app/components/RootDocument.tsx | 4 +-- app/components/SponsorPack.tsx | 6 ++-- app/components/icons.tsx | 32 ++++++++++++++++--- app/hooks/useSessionStorage.ts | 6 ++-- app/routes/blog._index.tsx | 1 - app/routes/blog.tsx | 4 +-- app/routes/form.$version._index.tsx | 11 +++---- ...n.docs.framework.$framework.examples.$.tsx | 6 ++-- app/routes/form.tsx | 11 ++++--- app/routes/query.$version._index.tsx | 8 ++--- ...ry.$version.docs.$framework.examples.$.tsx | 6 ++-- app/routes/query.$version.docs.$framework.tsx | 8 ++--- app/routes/query.tsx | 5 +-- app/routes/router.v1._index.tsx | 10 +++--- app/routes/router.v1.docs.examples.$.tsx | 6 ++-- app/routes/router.v1.docs.tsx | 4 +-- app/routes/sponsor-login.tsx | 10 +++--- app/routes/store.$version._index.tsx | 10 +++--- ....docs.framework.$framework.$examples.$.tsx | 6 ++-- app/routes/store.tsx | 11 ++++--- app/routes/table.v8._index.tsx | 10 +++--- app/routes/table.v8.docs.examples.$.tsx | 6 ++-- app/routes/table.v8.docs.tsx | 4 +-- app/routes/table.v8.tsx | 1 - app/routes/virtual.v3._index.tsx | 10 +++--- app/routes/virtual.v3.docs.examples.$.tsx | 6 ++-- app/routes/virtual.v3.docs.tsx | 4 +-- 38 files changed, 151 insertions(+), 113 deletions(-) diff --git a/app/components/Carbon.tsx b/app/components/Carbon.tsx index 236b97a3..37b3932c 100644 --- a/app/components/Carbon.tsx +++ b/app/components/Carbon.tsx @@ -1,9 +1,9 @@ -import * as React from 'react' +import { useEffect, useRef } from 'react' export function Carbon() { - const ref = React.useRef(null!) + const ref = useRef(null!) - React.useEffect(() => { + useEffect(() => { ref.current.innerHTML = '' const s = document.createElement('script') s.id = '_carbonads_js' diff --git a/app/components/DocTitle.tsx b/app/components/DocTitle.tsx index a7140260..fb81b07a 100644 --- a/app/components/DocTitle.tsx +++ b/app/components/DocTitle.tsx @@ -1,4 +1,6 @@ -export function DocTitle(props: { children: React.ReactNode }) { +import type { ReactNode } from 'react' + +export function DocTitle(props: { children: ReactNode }) { return ( <>

diff --git a/app/components/Docs.tsx b/app/components/Docs.tsx index b89bf693..71b7b775 100644 --- a/app/components/Docs.tsx +++ b/app/components/Docs.tsx @@ -1,5 +1,5 @@ +import { useMemo, useRef } from 'react' import { DocSearch } from '@docsearch/react' -import * as React from 'react' import { CgClose, CgMenuLeft } from 'react-icons/cg' import { FaArrowLeft, FaArrowRight, FaTimes } from 'react-icons/fa' import { NavLink, Outlet, useMatches } from '@remix-run/react' @@ -12,6 +12,7 @@ import { Select } from '~/components/Select' import { useLocalStorage } from '~/utils/useLocalStorage' import { DocsCalloutQueryGG } from '~/components/DocsCalloutQueryGG' import { DocsCalloutBytes } from '~/components/DocsCalloutBytes' +import type { ReactNode } from 'react' export type DocsConfig = { docSearch: { @@ -20,9 +21,9 @@ export type DocsConfig = { apiKey: string } menu: { - label: string | React.ReactNode + label: string | ReactNode children: { - label: string | React.ReactNode + label: string | ReactNode to: string badge?: string }[] @@ -43,7 +44,7 @@ export function Docs({ colorFrom: string colorTo: string textColor: string - logo: React.ReactNode + logo: ReactNode config: DocsConfig framework?: SelectProps version?: SelectProps @@ -53,9 +54,9 @@ export function Docs({ const matches = useMatches() const lastMatch = last(matches) - const detailsRef = React.useRef(null!) + const detailsRef = useRef(null!) - const flatMenu = React.useMemo( + const flatMenu = useMemo( () => config.menu.flatMap((d) => d.children), [config.menu] ) diff --git a/app/components/DocsCalloutBytes.tsx b/app/components/DocsCalloutBytes.tsx index 32548dd9..668fa47c 100644 --- a/app/components/DocsCalloutBytes.tsx +++ b/app/components/DocsCalloutBytes.tsx @@ -1,6 +1,7 @@ import BytesForm from '~/components/BytesForm' +import type { HTMLProps } from 'react' -export function DocsCalloutBytes(props: React.HTMLProps) { +export function DocsCalloutBytes(props: HTMLProps) { return (
diff --git a/app/components/DocsCalloutQueryGG.tsx b/app/components/DocsCalloutQueryGG.tsx index 19493ab0..d29d36d1 100644 --- a/app/components/DocsCalloutQueryGG.tsx +++ b/app/components/DocsCalloutQueryGG.tsx @@ -1,6 +1,7 @@ import { LogoQueryGGSmall } from '~/components/LogoQueryGGSmall' +import type { HTMLProps } from 'react' -export function DocsCalloutQueryGG(props: React.HTMLProps) { +export function DocsCalloutQueryGG(props: HTMLProps) { return (
diff --git a/app/components/Logo.tsx b/app/components/Logo.tsx index ee17d86f..bd24a5ee 100644 --- a/app/components/Logo.tsx +++ b/app/components/Logo.tsx @@ -1,4 +1,6 @@ -export function Logo(props: React.HTMLProps) { +import type { HTMLProps } from 'react' + +export function Logo(props: HTMLProps) { return (
) { +import type { HTMLProps } from 'react' + +export function LogoColor(props: HTMLProps) { return (
) { +import type { HTMLProps } from 'react' + +export function LogoQueryGG(props: HTMLProps) { return (
diff --git a/app/components/LogoQueryGGSmall.tsx b/app/components/LogoQueryGGSmall.tsx index 0ff66c19..d7e70267 100644 --- a/app/components/LogoQueryGGSmall.tsx +++ b/app/components/LogoQueryGGSmall.tsx @@ -1,4 +1,6 @@ -export function LogoQueryGGSmall(props: React.HTMLProps) { +import type { HTMLProps } from 'react' + +export function LogoQueryGGSmall(props: HTMLProps) { return (
diff --git a/app/components/Mdx.tsx b/app/components/Mdx.tsx index 6454ae0a..7d5de6f6 100644 --- a/app/components/Mdx.tsx +++ b/app/components/Mdx.tsx @@ -1,14 +1,15 @@ -import * as React from 'react' +import { useMemo } from 'react' import { getMDXComponent } from 'mdx-bundler/client' import { CodeBlock } from '~/components/CodeBlock' import { MarkdownLink } from '~/components/MarkdownLink' import type { MDXComponents } from 'mdx/types' +import type { HTMLProps } from 'react' const CustomHeading = ({ Comp, id, ...props -}: React.HTMLProps & { +}: HTMLProps & { Comp: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' }) => { if (id) { @@ -23,7 +24,7 @@ const CustomHeading = ({ const makeHeading = (type: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6') => - (props: React.HTMLProps) => + (props: HTMLProps) => ( getMDXComponent(code), [code]) + const Doc = useMemo(() => getMDXComponent(code), [code]) return } diff --git a/app/components/PPPBanner.tsx b/app/components/PPPBanner.tsx index d4512446..3de24e0f 100644 --- a/app/components/PPPBanner.tsx +++ b/app/components/PPPBanner.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect } from 'react' import { flag } from 'country-emoji' import { IoIosClose } from 'react-icons/io' import { useLocalStorage } from '~/utils/useLocalStorage' @@ -8,7 +8,7 @@ export function PPPBanner() { const [hidden, setHidden] = useLocalStorage('pppbanner-hidden', false) const [data, setData] = useLocalStorage('pppbanner-data', null) - React.useEffect(() => { + useEffect(() => { // This function has CORS configured to allow // react-query.tanstack.com and tanstack.com if (!data) { diff --git a/app/components/RootDocument.tsx b/app/components/RootDocument.tsx index 3a49ae11..6b8c1364 100644 --- a/app/components/RootDocument.tsx +++ b/app/components/RootDocument.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Links, LiveReload, @@ -9,12 +8,13 @@ import { useNavigation, } from '@remix-run/react' import { CgSpinner } from 'react-icons/cg' +import type { ReactNode } from 'react' export function RootDocument({ children, title, }: { - children: React.ReactNode + children: ReactNode title?: string }) { const navigation = useNavigation() diff --git a/app/components/SponsorPack.tsx b/app/components/SponsorPack.tsx index 89a1800e..ca91a6ee 100644 --- a/app/components/SponsorPack.tsx +++ b/app/components/SponsorPack.tsx @@ -1,10 +1,10 @@ -import React from 'react' +import { useMemo } from 'react' import { Pack, hierarchy } from '@visx/hierarchy' import { ParentSize } from '@visx/responsive' import { twMerge } from 'tailwind-merge' export default function SponsorPack({ sponsors }: { sponsors: any }) { - const pack = React.useMemo( + const pack = useMemo( () => ({ children: sponsors, name: 'root', @@ -14,7 +14,7 @@ export default function SponsorPack({ sponsors }: { sponsors: any }) { [sponsors] ) - const root = React.useMemo( + const root = useMemo( () => hierarchy(pack) .sum((d) => 1 + d?.tier?.monthlyPriceInDollars) diff --git a/app/components/icons.tsx b/app/components/icons.tsx index 7c7d22d5..be652b2f 100644 --- a/app/components/icons.tsx +++ b/app/components/icons.tsx @@ -1,15 +1,39 @@ -import type { SVGProps } from "react"; +import type { SVGProps } from 'react' // https://api.iconify.design/gg:corner-up-left.svg export function GgCornerUpLeft(props: SVGProps) { return ( - + + + ) } // https://api.iconify.design/codicon:preview.svg export function CodiconPreview(props: SVGProps) { return ( - + + + ) -} \ No newline at end of file +} diff --git a/app/hooks/useSessionStorage.ts b/app/hooks/useSessionStorage.ts index 0ba407cb..813af64e 100644 --- a/app/hooks/useSessionStorage.ts +++ b/app/hooks/useSessionStorage.ts @@ -1,7 +1,7 @@ -import React from 'react' +import { useEffect, useState } from 'react' export default function useSessionStorage(key, defaultValue = '') { - const [state, setState] = React.useState(() => { + const [state, setState] = useState(() => { if (typeof document !== 'undefined') { const data = sessionStorage.getItem(key) if (data) { @@ -16,7 +16,7 @@ export default function useSessionStorage(key, defaultValue = '') { return defaultValue }) - React.useEffect(() => { + useEffect(() => { sessionStorage.setItem(key, JSON.stringify(state)) }, [state]) diff --git a/app/routes/blog._index.tsx b/app/routes/blog._index.tsx index 244377e4..6454fa13 100644 --- a/app/routes/blog._index.tsx +++ b/app/routes/blog._index.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { useLoaderData, Link } from '@remix-run/react' import { json } from '@remix-run/node' import { diff --git a/app/routes/blog.tsx b/app/routes/blog.tsx index b209abe5..7710934d 100644 --- a/app/routes/blog.tsx +++ b/app/routes/blog.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useRef } from 'react' import { CgClose, CgMenuLeft } from 'react-icons/cg' import { Link, NavLink, Outlet } from '@remix-run/react' import { DefaultErrorBoundary } from '~/components/DefaultErrorBoundary' @@ -44,7 +44,7 @@ export const meta: MetaFunction = () => { } export default function RouteBlog() { - const detailsRef = React.useRef(null!) + const detailsRef = useRef(null!) const menuItems = localMenu.map((group) => { return ( diff --git a/app/routes/form.$version._index.tsx b/app/routes/form.$version._index.tsx index ea67fea6..645803be 100644 --- a/app/routes/form.$version._index.tsx +++ b/app/routes/form.$version._index.tsx @@ -1,6 +1,5 @@ -import * as React from 'react' - -import { GgCornerUpLeft, CodiconPreview } from "~/components/icons" +import { useEffect, useState } from 'react' +import { GgCornerUpLeft, CodiconPreview } from '~/components/icons' import { FaBolt, FaBook, @@ -86,10 +85,10 @@ export default function RouteVersion() { const { sponsors } = useLoaderData() const { version } = useParams() const branch = getBranch(version) - const [framework, setFramework] = React.useState('react') - const [isDark, setIsDark] = React.useState(true) + const [framework, setFramework] = useState('react') + const [isDark, setIsDark] = useState(true) - React.useEffect(() => { + useEffect(() => { setIsDark(window.matchMedia?.(`(prefers-color-scheme: dark)`).matches) }, []) diff --git a/app/routes/form.$version.docs.framework.$framework.examples.$.tsx b/app/routes/form.$version.docs.framework.$framework.examples.$.tsx index 07c43f6b..ecbbd493 100644 --- a/app/routes/form.$version.docs.framework.$framework.examples.$.tsx +++ b/app/routes/form.$version.docs.framework.$framework.examples.$.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import { useEffect, useState } from 'react' import type { LoaderFunctionArgs, MetaFunction } from '@remix-run/node' import { json } from '@remix-run/node' import { useLoaderData, useParams } from '@remix-run/react' @@ -30,9 +30,9 @@ export default function RouteExamples() { const branch = getBranch(version) const examplePath = branch === 'v3' ? name : [kind, name].join('/') - const [isDark, setIsDark] = React.useState(true) + const [isDark, setIsDark] = useState(true) - React.useEffect(() => { + useEffect(() => { setIsDark(window.matchMedia?.(`(prefers-color-scheme: dark)`).matches) }, []) diff --git a/app/routes/form.tsx b/app/routes/form.tsx index 9a733ced..51d045d7 100644 --- a/app/routes/form.tsx +++ b/app/routes/form.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useMemo } from 'react' import { Link, Outlet, @@ -17,6 +17,7 @@ import svelteLogo from '~/images/svelte-logo.svg' import angularLogo from '~/images/angular-logo.svg' import { FaDiscord, FaGithub } from 'react-icons/fa' import type { AvailableOptions } from '~/components/Select' +import type { ReactNode } from 'react' // @@ -26,9 +27,9 @@ export type FrameworkMenu = { } export type MenuItem = { - label: string | React.ReactNode + label: string | ReactNode children: { - label: string | React.ReactNode + label: string | ReactNode to: string }[] } @@ -127,7 +128,7 @@ export const useReactFormDocsConfig = () => { config.frameworkMenus.find((d) => d.framework === framework)?.menuItems ?? [] - const frameworkConfig = React.useMemo(() => { + const frameworkConfig = useMemo(() => { const availableFrameworks = config.frameworkMenus.reduce( (acc: AvailableOptions, menuEntry) => { acc[menuEntry.framework as string] = @@ -151,7 +152,7 @@ export const useReactFormDocsConfig = () => { } }, [config.frameworkMenus, framework, match, navigate]) - const versionConfig = React.useMemo(() => { + const versionConfig = useMemo(() => { const available = availableVersions.reduce( (acc: AvailableOptions, version) => { acc[version] = { diff --git a/app/routes/query.$version._index.tsx b/app/routes/query.$version._index.tsx index e4d317c9..2bd1d3a4 100644 --- a/app/routes/query.$version._index.tsx +++ b/app/routes/query.$version._index.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect, useState } from 'react' import { CodiconPreview, GgCornerUpLeft } from '~/components/icons' import { FaBolt, @@ -90,10 +90,10 @@ export default function RouteVersion() { const { sponsors } = useLoaderData() const { version } = useParams() const branch = getBranch(version) - const [framework, setFramework] = React.useState('react') - const [isDark, setIsDark] = React.useState(true) + const [framework, setFramework] = useState('react') + const [isDark, setIsDark] = useState(true) - React.useEffect(() => { + useEffect(() => { setIsDark(window.matchMedia?.(`(prefers-color-scheme: dark)`).matches) }, []) diff --git a/app/routes/query.$version.docs.$framework.examples.$.tsx b/app/routes/query.$version.docs.$framework.examples.$.tsx index 1bdf2bf8..1d90a163 100644 --- a/app/routes/query.$version.docs.$framework.examples.$.tsx +++ b/app/routes/query.$version.docs.$framework.examples.$.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import { useEffect, useState } from 'react' import type { LoaderFunctionArgs, MetaFunction } from '@remix-run/node' import { json } from '@remix-run/node' import { useLoaderData, useParams } from '@remix-run/react' @@ -31,9 +31,9 @@ export default function RouteExamples() { const branch = getBranch(version) const examplePath = branch === 'v3' ? name : [kind, name].join('/') - const [isDark, setIsDark] = React.useState(true) + const [isDark, setIsDark] = useState(true) - React.useEffect(() => { + useEffect(() => { setIsDark(window.matchMedia?.(`(prefers-color-scheme: dark)`).matches) }, []) diff --git a/app/routes/query.$version.docs.$framework.tsx b/app/routes/query.$version.docs.$framework.tsx index b2a0e8e4..a80a9b6b 100644 --- a/app/routes/query.$version.docs.$framework.tsx +++ b/app/routes/query.$version.docs.$framework.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useMemo } from 'react' import { FaDiscord, FaGithub } from 'react-icons/fa' import type { MetaFunction } from '@remix-run/node' import { Link, useMatches, useNavigate, useParams } from '@remix-run/react' @@ -86,7 +86,7 @@ export default function RouteFrameworkParam() { const version = params.version let config = useReactQueryDocsConfig(version) - const docsConfig = React.useMemo(() => { + const docsConfig = useMemo(() => { const frameworkMenu = config.menu.find((d) => d.framework === framework) if (!frameworkMenu) return null return { @@ -95,7 +95,7 @@ export default function RouteFrameworkParam() { } as DocsConfig }, [framework, config]) - const frameworkConfig = React.useMemo(() => { + const frameworkConfig = useMemo(() => { const availableFrameworks = config.menu.reduce( (acc: AvailableOptions, menuEntry) => { acc[menuEntry.framework as string] = @@ -119,7 +119,7 @@ export default function RouteFrameworkParam() { } }, [config.menu, framework, match, navigate]) - const versionConfig = React.useMemo(() => { + const versionConfig = useMemo(() => { const available = availableVersions.reduce( (acc: AvailableOptions, version) => { acc[version.name] = { diff --git a/app/routes/query.tsx b/app/routes/query.tsx index e3f2f606..48eb893d 100644 --- a/app/routes/query.tsx +++ b/app/routes/query.tsx @@ -3,6 +3,7 @@ import type { LoaderFunctionArgs, MetaFunction } from '@remix-run/node' import { redirect } from '@remix-run/node' import { seo } from '~/utils/seo' import { useMatchesData } from '~/utils/utils' +import type { ReactNode } from 'react' export const repo = 'tanstack/query' @@ -41,9 +42,9 @@ export type Menu = { } export type MenuItem = { - label: string | React.ReactNode + label: string | ReactNode children: { - label: string | React.ReactNode + label: string | ReactNode to: string }[] } diff --git a/app/routes/router.v1._index.tsx b/app/routes/router.v1._index.tsx index 63eb636d..6d7eae92 100644 --- a/app/routes/router.v1._index.tsx +++ b/app/routes/router.v1._index.tsx @@ -1,5 +1,5 @@ -import * as React from 'react' -import { GgCornerUpLeft, CodiconPreview } from "~/components/icons" +import { useEffect, useState } from 'react' +import { GgCornerUpLeft, CodiconPreview } from '~/components/icons' import { CgTimelapse } from 'react-icons/cg' import { FaBook, @@ -84,13 +84,13 @@ export const loader: LoaderFunction = async () => { export default function TanStackRouterRoute() { const { sponsors } = useLoaderData() - const [framework, setFramework] = React.useState< + const [framework, setFramework] = useState< 'react' | 'preact' | 'svelte' | 'vue' | 'solid' >('react') - const [isDark, setIsDark] = React.useState(true) + const [isDark, setIsDark] = useState(true) - React.useEffect(() => { + useEffect(() => { setIsDark(window.matchMedia?.(`(prefers-color-scheme: dark)`).matches) }, []) diff --git a/app/routes/router.v1.docs.examples.$.tsx b/app/routes/router.v1.docs.examples.$.tsx index b25d5aad..8caf1417 100644 --- a/app/routes/router.v1.docs.examples.$.tsx +++ b/app/routes/router.v1.docs.examples.$.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect, useState } from 'react' import type { LoaderFunction, MetaFunction } from '@remix-run/node' import { json } from '@remix-run/node' import { useLoaderData } from '@remix-run/react' @@ -31,9 +31,9 @@ export default function RouteReactTableDocs() { const examplePath = [kind, name].join('/') - const [isDark, setIsDark] = React.useState(true) + const [isDark, setIsDark] = useState(true) - React.useEffect(() => { + useEffect(() => { setIsDark(window.matchMedia?.(`(prefers-color-scheme: dark)`).matches) }, []) diff --git a/app/routes/router.v1.docs.tsx b/app/routes/router.v1.docs.tsx index e749ff14..4ded30fe 100644 --- a/app/routes/router.v1.docs.tsx +++ b/app/routes/router.v1.docs.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useMemo } from 'react' import { FaDiscord, FaGithub } from 'react-icons/fa' import { Link } from '@remix-run/react' import type { MetaFunction } from '@remix-run/node' @@ -56,7 +56,7 @@ export const meta: MetaFunction = () => { export default function DocsRoute() { let config = useRouterV1Config() - config = React.useMemo( + config = useMemo( () => ({ ...config, diff --git a/app/routes/sponsor-login.tsx b/app/routes/sponsor-login.tsx index e2cb1f81..2f8636dd 100644 --- a/app/routes/sponsor-login.tsx +++ b/app/routes/sponsor-login.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import { useEffect, useState } from 'react' import * as qss from 'qss' import { FaGithub, FaDiscord, FaPlug, FaCheck } from 'react-icons/fa' @@ -26,11 +26,11 @@ const getbuttonStyles = () => ` ` export default function SponsorsLogin() { - const [loadingMessage, setIsLoading] = React.useState( + const [loadingMessage, setIsLoading] = useState( 'Loading...' ) - const [error, setError] = React.useState(null) - const [message, setMessage] = React.useState(null) + const [error, setError] = useState(null) + const [message, setMessage] = useState(null) const [discordState, setDiscordState] = useSessionStorage(discordOauthStateKey) const [githubState, setGithubState] = useSessionStorage(githubOauthStateKey) @@ -79,7 +79,7 @@ export default function SponsorsLogin() { } } - React.useEffect(() => { + useEffect(() => { setIsLoading(false) const search = window.location.search.substring(1) diff --git a/app/routes/store.$version._index.tsx b/app/routes/store.$version._index.tsx index d7d93747..8a3b717f 100644 --- a/app/routes/store.$version._index.tsx +++ b/app/routes/store.$version._index.tsx @@ -1,5 +1,5 @@ -import * as React from 'react' -import { GgCornerUpLeft, CodiconPreview } from "~/components/icons" +import { useEffect, useState } from 'react' +import { GgCornerUpLeft, CodiconPreview } from '~/components/icons' import { FaBook, FaDiscord, FaGithub, FaTshirt } from 'react-icons/fa' import { json } from '@remix-run/node' import { Link, useLoaderData, useParams } from '@remix-run/react' @@ -76,10 +76,10 @@ export default function RouteVersion() { const { sponsors } = useLoaderData() const { version } = useParams() const branch = getBranch(version) - const [framework, setFramework] = React.useState('react') - const [isDark, setIsDark] = React.useState(true) + const [framework, setFramework] = useState('react') + const [isDark, setIsDark] = useState(true) - React.useEffect(() => { + useEffect(() => { setIsDark(window.matchMedia?.(`(prefers-color-scheme: dark)`).matches) }, []) diff --git a/app/routes/store.$version.docs.framework.$framework.$examples.$.tsx b/app/routes/store.$version.docs.framework.$framework.$examples.$.tsx index 66f93417..2acca9d5 100644 --- a/app/routes/store.$version.docs.framework.$framework.$examples.$.tsx +++ b/app/routes/store.$version.docs.framework.$framework.$examples.$.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import { useEffect, useState } from 'react' import type { LoaderFunctionArgs, MetaFunction } from '@remix-run/node' import { json } from '@remix-run/node' import { useLoaderData, useParams } from '@remix-run/react' @@ -30,9 +30,9 @@ export default function RouteExamples() { const branch = getBranch(version) const examplePath = branch === 'v3' ? name : [kind, name].join('/') - const [isDark, setIsDark] = React.useState(true) + const [isDark, setIsDark] = useState(true) - React.useEffect(() => { + useEffect(() => { setIsDark(window.matchMedia?.(`(prefers-color-scheme: dark)`).matches) }, []) diff --git a/app/routes/store.tsx b/app/routes/store.tsx index 1bd339fc..e24ddf5a 100644 --- a/app/routes/store.tsx +++ b/app/routes/store.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useMemo } from 'react' import { Link, Outlet, @@ -17,6 +17,7 @@ import svelteLogo from '~/images/svelte-logo.svg' import angularLogo from '~/images/angular-logo.svg' import { FaDiscord, FaGithub } from 'react-icons/fa' import type { AvailableOptions } from '~/components/Select' +import type { ReactNode } from 'react' // @@ -26,9 +27,9 @@ export type FrameworkMenu = { } export type MenuItem = { - label: string | React.ReactNode + label: string | ReactNode children: { - label: string | React.ReactNode + label: string | ReactNode to: string }[] } @@ -127,7 +128,7 @@ export const useReactStoreDocsConfig = () => { config.frameworkMenus.find((d) => d.framework === framework)?.menuItems ?? [] - const frameworkConfig = React.useMemo(() => { + const frameworkConfig = useMemo(() => { const availableFrameworks = config.frameworkMenus.reduce( (acc: AvailableOptions, menuEntry) => { acc[menuEntry.framework as string] = @@ -151,7 +152,7 @@ export const useReactStoreDocsConfig = () => { } }, [config.frameworkMenus, framework, match, navigate]) - const versionConfig = React.useMemo(() => { + const versionConfig = useMemo(() => { const available = availableVersions.reduce( (acc: AvailableOptions, version) => { acc[version] = { diff --git a/app/routes/table.v8._index.tsx b/app/routes/table.v8._index.tsx index f97977a6..57f096d4 100644 --- a/app/routes/table.v8._index.tsx +++ b/app/routes/table.v8._index.tsx @@ -1,5 +1,5 @@ -import * as React from 'react' -import { GgCornerUpLeft, CodiconPreview } from "~/components/icons" +import { useEffect, useState } from 'react' +import { GgCornerUpLeft, CodiconPreview } from '~/components/icons' import { FaBolt, FaBook, @@ -87,13 +87,13 @@ export default function ReactTableRoute() { // const config = useReactTableV8Config() // const [params, setParams] = useSearchParams() // const framework = params.get('framework') ?? 'react' - const [framework, setFramework] = React.useState< + const [framework, setFramework] = useState< 'react' | 'svelte' | 'vue' | 'solid' >('react') - const [isDark, setIsDark] = React.useState(true) + const [isDark, setIsDark] = useState(true) - React.useEffect(() => { + useEffect(() => { setIsDark(window.matchMedia?.(`(prefers-color-scheme: dark)`).matches) }, []) diff --git a/app/routes/table.v8.docs.examples.$.tsx b/app/routes/table.v8.docs.examples.$.tsx index ff08a6dd..dc1fae10 100644 --- a/app/routes/table.v8.docs.examples.$.tsx +++ b/app/routes/table.v8.docs.examples.$.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import { useEffect, useState } from 'react' import { json } from '@remix-run/node' import { useLoaderData } from '@remix-run/react' import { DocTitle } from '~/components/DocTitle' @@ -33,9 +33,9 @@ export default function RouteReactTableDocs() { const examplePath = [kind, name].join('/') - const [isDark, setIsDark] = React.useState(true) + const [isDark, setIsDark] = useState(true) - React.useEffect(() => { + useEffect(() => { setIsDark(window.matchMedia?.(`(prefers-color-scheme: dark)`).matches) }, []) diff --git a/app/routes/table.v8.docs.tsx b/app/routes/table.v8.docs.tsx index 6fc12351..38789666 100644 --- a/app/routes/table.v8.docs.tsx +++ b/app/routes/table.v8.docs.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useMemo } from 'react' import { FaDiscord, FaGithub } from 'react-icons/fa' import { Link } from '@remix-run/react' import { useReactTableV8Config } from '~/routes/table.v8' @@ -61,7 +61,7 @@ export const ErrorBoundary = DefaultErrorBoundary export default function RouteReactTable() { let config = useReactTableV8Config() - config = React.useMemo( + config = useMemo( () => ({ ...config, diff --git a/app/routes/table.v8.tsx b/app/routes/table.v8.tsx index c36da0dc..5543c734 100644 --- a/app/routes/table.v8.tsx +++ b/app/routes/table.v8.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import { Link, Outlet, useLocation, useSearchParams } from '@remix-run/react' import { json } from '@remix-run/node' import { DefaultErrorBoundary } from '~/components/DefaultErrorBoundary' diff --git a/app/routes/virtual.v3._index.tsx b/app/routes/virtual.v3._index.tsx index 0049873c..75edcf92 100644 --- a/app/routes/virtual.v3._index.tsx +++ b/app/routes/virtual.v3._index.tsx @@ -1,5 +1,5 @@ -import * as React from 'react' -import { GgCornerUpLeft, CodiconPreview } from "~/components/icons" +import { useEffect, useState } from 'react' +import { GgCornerUpLeft, CodiconPreview } from '~/components/icons' import { FaBolt, FaBook, @@ -87,13 +87,13 @@ export default function ReactTableRoute() { // const config = useReactTableV8Config() // const [params, setParams] = useSearchParams() // const framework = params.get('framework') ?? 'react' - const [framework, setFramework] = React.useState< + const [framework, setFramework] = useState< 'react' | 'svelte' | 'vue' | 'solid' >('react') - const [isDark, setIsDark] = React.useState(true) + const [isDark, setIsDark] = useState(true) - React.useEffect(() => { + useEffect(() => { setIsDark(window.matchMedia?.(`(prefers-color-scheme: dark)`).matches) }, []) diff --git a/app/routes/virtual.v3.docs.examples.$.tsx b/app/routes/virtual.v3.docs.examples.$.tsx index 94d686ab..751bad5d 100644 --- a/app/routes/virtual.v3.docs.examples.$.tsx +++ b/app/routes/virtual.v3.docs.examples.$.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useEffect, useState } from 'react' import type { LoaderFunctionArgs, MetaFunction } from '@remix-run/node' import { json } from '@remix-run/node' import { useLoaderData } from '@remix-run/react' @@ -30,9 +30,9 @@ export default function RouteReactTableDocs() { const examplePath = [kind, name].join('/') - const [isDark, setIsDark] = React.useState(true) + const [isDark, setIsDark] = useState(true) - React.useEffect(() => { + useEffect(() => { setIsDark(window.matchMedia?.(`(prefers-color-scheme: dark)`).matches) }, []) diff --git a/app/routes/virtual.v3.docs.tsx b/app/routes/virtual.v3.docs.tsx index 87f2af10..21001fc2 100644 --- a/app/routes/virtual.v3.docs.tsx +++ b/app/routes/virtual.v3.docs.tsx @@ -1,4 +1,4 @@ -import * as React from 'react' +import { useMemo } from 'react' import { FaDiscord, FaGithub } from 'react-icons/fa' import { Link } from '@remix-run/react' import { useVirtualV3Config } from '~/routes/virtual.v3' @@ -58,7 +58,7 @@ export const meta: MetaFunction = () => { export default function RouteReactTable() { let config = useVirtualV3Config() - config = React.useMemo( + config = useMemo( () => ({ ...config, From a244f4cf420a49126b95860781f7e276a1d009b6 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 5 Nov 2023 18:28:30 +1100 Subject: [PATCH 11/39] Don't render lang if absent --- app/components/CodeBlock.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/components/CodeBlock.tsx b/app/components/CodeBlock.tsx index 9d25cfa6..64eab781 100644 --- a/app/components/CodeBlock.tsx +++ b/app/components/CodeBlock.tsx @@ -1,9 +1,9 @@ import type { FC, HTMLAttributes } from 'react' import invariant from 'tiny-invariant' -function getLanguageFromChildren(children: any): string { +function getLanguageFromChildren(children: any): string | undefined { const language = children[0]?.props?.children - return language ? language : '' + return language ? language : undefined } export const CodeBlock: FC> = (props) => { @@ -12,12 +12,14 @@ export const CodeBlock: FC> = (props) => { const lang = getLanguageFromChildren(children) return (
-
- {lang} -
+ > + {lang} +
+ )}
Date: Sun, 5 Nov 2023 18:43:55 +1100
Subject: [PATCH 12/39] Add more local Icones icons

---
 app/components/Doc.tsx                        |  4 +-
 app/components/PPPBanner.tsx                  |  4 +-
 app/components/icons.tsx                      | 91 +++++++++++++++++++
 app/routes/_index.tsx                         |  7 +-
 app/routes/form.$version._index.tsx           | 19 ++--
 app/routes/form.tsx                           |  6 +-
 app/routes/query.$version._index.tsx          | 19 ++--
 app/routes/query.$version.docs.$framework.tsx |  6 +-
 app/routes/router.v1._index.tsx               | 19 ++--
 app/routes/router.v1.docs.tsx                 |  6 +-
 app/routes/sponsor-login.tsx                  |  8 +-
 app/routes/store.$version._index.tsx          | 13 ++-
 app/routes/store.tsx                          |  6 +-
 app/routes/table.v8._index.tsx                | 23 ++---
 app/routes/table.v8.docs.tsx                  |  6 +-
 app/routes/virtual.v3._index.tsx              | 23 ++---
 app/routes/virtual.v3.docs.tsx                |  6 +-
 17 files changed, 175 insertions(+), 91 deletions(-)

diff --git a/app/components/Doc.tsx b/app/components/Doc.tsx
index 6d6e5e26..3e3d3e65 100644
--- a/app/components/Doc.tsx
+++ b/app/components/Doc.tsx
@@ -1,4 +1,4 @@
-import { FaEdit } from 'react-icons/fa'
+import { FaSolidEdit } from '~/components/icons'
 import { DocTitle } from '~/components/DocTitle'
 import { Mdx } from '~/components/Mdx'
 
@@ -31,7 +31,7 @@ export function Doc({
           href={`https://github.com/${repo}/tree/${branch}/${filePath}`}
           className="flex items-center gap-2"
         >
-           Edit on GitHub
+           Edit on GitHub
         
       
diff --git a/app/components/PPPBanner.tsx b/app/components/PPPBanner.tsx index 3de24e0f..229bef79 100644 --- a/app/components/PPPBanner.tsx +++ b/app/components/PPPBanner.tsx @@ -1,6 +1,6 @@ import { useEffect } from 'react' import { flag } from 'country-emoji' -import { IoIosClose } from 'react-icons/io' +import { IonClose } from '~/components/icons' import { useLocalStorage } from '~/utils/useLocalStorage' import { useClientOnlyRender } from '~/utils/useClientOnlyRender' @@ -61,7 +61,7 @@ export function PPPBanner() { className="absolute right-0" aria-label="Hide Banner" > - +
)} diff --git a/app/components/icons.tsx b/app/components/icons.tsx index be652b2f..6a8aeefe 100644 --- a/app/components/icons.tsx +++ b/app/components/icons.tsx @@ -37,3 +37,94 @@ export function CodiconPreview(props: SVGProps) { ) } + +// https://api.iconify.design/ion:body.svg +export function IonBody(props: SVGProps) { + return ( + + + + + ) +} + +// https://api.iconify.design/ion:close.svg +export function IonClose(props: SVGProps) { + return ( + + + + ) +} + +// https://api.iconify.design/fa-solid:edit.svg +export function FaSolidEdit(props: SVGProps) { + return ( + + + + ) +} + +// https://api.iconify.design/fa-brands:github.svg +export function FaBrandsGithub(props: SVGProps) { + return ( + + + + ) +} + +// https://api.iconify.design/fa-brands:discord.svg +export function FaBrandsDiscord(props: SVGProps) { + return ( + + + + ) +} diff --git a/app/routes/_index.tsx b/app/routes/_index.tsx index 3eecbe45..f1e42a02 100644 --- a/app/routes/_index.tsx +++ b/app/routes/_index.tsx @@ -9,7 +9,8 @@ import type { ActionFunction } from '@remix-run/node' import { json } from '@remix-run/node' import { Carbon } from '~/components/Carbon' import { twMerge } from 'tailwind-merge' -import { FaDiscord, FaGithub, FaTshirt } from 'react-icons/fa' +import { FaBrandsDiscord, FaBrandsGithub } from '~/components/icons' +import { FaTshirt } from 'react-icons/fa' import { CgMusicSpeaker } from 'react-icons/cg' import { Footer } from '~/components/Footer' import SponsorPack from '~/components/SponsorPack' @@ -247,7 +248,7 @@ export default function Index() { { label: (
- GitHub + GitHub
), to: 'https://github.com/tanstack', @@ -255,7 +256,7 @@ export default function Index() { { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', diff --git a/app/routes/form.$version._index.tsx b/app/routes/form.$version._index.tsx index 645803be..46f24028 100644 --- a/app/routes/form.$version._index.tsx +++ b/app/routes/form.$version._index.tsx @@ -1,14 +1,11 @@ import { useEffect, useState } from 'react' -import { GgCornerUpLeft, CodiconPreview } from '~/components/icons' import { - FaBolt, - FaBook, - FaCheckCircle, - FaCogs, - FaDiscord, - FaGithub, - FaTshirt, -} from 'react-icons/fa' + GgCornerUpLeft, + CodiconPreview, + FaBrandsGithub, + FaBrandsDiscord, +} from '~/components/icons' +import { FaBolt, FaBook, FaCheckCircle, FaCogs, FaTshirt } from 'react-icons/fa' import { json } from '@remix-run/node' import { Link, useLoaderData, useParams } from '@remix-run/react' import { Carbon } from '~/components/Carbon' @@ -50,7 +47,7 @@ const menu = [ { label: (
- GitHub + GitHub
), to: `https://github.com/${repo}`, @@ -58,7 +55,7 @@ const menu = [ { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', diff --git a/app/routes/form.tsx b/app/routes/form.tsx index 51d045d7..69c85cba 100644 --- a/app/routes/form.tsx +++ b/app/routes/form.tsx @@ -15,7 +15,7 @@ import solidLogo from '~/images/solid-logo.svg' import vueLogo from '~/images/vue-logo.svg' import svelteLogo from '~/images/svelte-logo.svg' import angularLogo from '~/images/angular-logo.svg' -import { FaDiscord, FaGithub } from 'react-icons/fa' +import { FaBrandsDiscord, FaBrandsGithub } from '~/components/icons' import type { AvailableOptions } from '~/components/Select' import type { ReactNode } from 'react' @@ -89,7 +89,7 @@ export const localMenu: MenuItem = { { label: (
- GitHub + GitHub
), to: `https://github.com/${repo}`, @@ -97,7 +97,7 @@ export const localMenu: MenuItem = { { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', diff --git a/app/routes/query.$version._index.tsx b/app/routes/query.$version._index.tsx index 2bd1d3a4..c5d7ef08 100644 --- a/app/routes/query.$version._index.tsx +++ b/app/routes/query.$version._index.tsx @@ -1,14 +1,11 @@ import { useEffect, useState } from 'react' -import { CodiconPreview, GgCornerUpLeft } from '~/components/icons' import { - FaBolt, - FaBook, - FaCheckCircle, - FaCogs, - FaDiscord, - FaGithub, - FaTshirt, -} from 'react-icons/fa' + CodiconPreview, + FaBrandsDiscord, + FaBrandsGithub, + GgCornerUpLeft, +} from '~/components/icons' +import { FaBolt, FaBook, FaCheckCircle, FaCogs, FaTshirt } from 'react-icons/fa' import { json } from '@remix-run/node' import { Link, useLoaderData, useParams } from '@remix-run/react' import { Carbon } from '~/components/Carbon' @@ -55,7 +52,7 @@ const menu = [ { label: (
- GitHub + GitHub
), to: `https://github.com/${repo}`, @@ -63,7 +60,7 @@ const menu = [ { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', diff --git a/app/routes/query.$version.docs.$framework.tsx b/app/routes/query.$version.docs.$framework.tsx index a80a9b6b..6acea7ba 100644 --- a/app/routes/query.$version.docs.$framework.tsx +++ b/app/routes/query.$version.docs.$framework.tsx @@ -1,5 +1,5 @@ import { useMemo } from 'react' -import { FaDiscord, FaGithub } from 'react-icons/fa' +import { FaBrandsDiscord, FaBrandsGithub } from '~/components/icons' import type { MetaFunction } from '@remix-run/node' import { Link, useMatches, useNavigate, useParams } from '@remix-run/react' import { gradientText } from '~/routes/query.$version._index' @@ -54,7 +54,7 @@ const localMenu: MenuItem = { { label: (
- GitHub + GitHub
), to: `https://github.com/${repo}`, @@ -62,7 +62,7 @@ const localMenu: MenuItem = { { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', diff --git a/app/routes/router.v1._index.tsx b/app/routes/router.v1._index.tsx index 6d7eae92..2de950cc 100644 --- a/app/routes/router.v1._index.tsx +++ b/app/routes/router.v1._index.tsx @@ -1,13 +1,12 @@ import { useEffect, useState } from 'react' -import { GgCornerUpLeft, CodiconPreview } from '~/components/icons' -import { CgTimelapse } from 'react-icons/cg' import { - FaBook, - FaCheckCircle, - FaDiscord, - FaGithub, - FaTshirt, -} from 'react-icons/fa' + GgCornerUpLeft, + CodiconPreview, + FaBrandsDiscord, + FaBrandsGithub, +} from '~/components/icons' +import { CgTimelapse } from 'react-icons/cg' +import { FaBook, FaCheckCircle, FaTshirt } from 'react-icons/fa' import { Link, useLoaderData } from '@remix-run/react' import { json } from '@remix-run/node' import { TbHeartHandshake, TbZoomQuestion } from 'react-icons/tb' @@ -51,7 +50,7 @@ const menu = [ { label: (
- GitHub + GitHub
), to: 'https://github.com/tanstack/router', @@ -59,7 +58,7 @@ const menu = [ { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', diff --git a/app/routes/router.v1.docs.tsx b/app/routes/router.v1.docs.tsx index 4ded30fe..29700e82 100644 --- a/app/routes/router.v1.docs.tsx +++ b/app/routes/router.v1.docs.tsx @@ -1,5 +1,5 @@ import { useMemo } from 'react' -import { FaDiscord, FaGithub } from 'react-icons/fa' +import { FaBrandsDiscord, FaBrandsGithub } from '~/components/icons' import { Link } from '@remix-run/react' import type { MetaFunction } from '@remix-run/node' import { useRouterV1Config } from '~/routes/router.v1' @@ -30,7 +30,7 @@ const localMenu = { { label: (
- GitHub + GitHub
), to: 'https://github.com/tanstack/router', @@ -38,7 +38,7 @@ const localMenu = { { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', diff --git a/app/routes/sponsor-login.tsx b/app/routes/sponsor-login.tsx index 2f8636dd..881ce9d2 100644 --- a/app/routes/sponsor-login.tsx +++ b/app/routes/sponsor-login.tsx @@ -1,7 +1,7 @@ import { useEffect, useState } from 'react' import * as qss from 'qss' -import { FaGithub, FaDiscord, FaPlug, FaCheck } from 'react-icons/fa' - +import { FaBrandsDiscord, FaBrandsGithub } from '~/components/icons' +import { FaPlug, FaCheck } from 'react-icons/fa' import useSessionStorage from '~/hooks/useSessionStorage' import axios from 'axios' @@ -134,7 +134,7 @@ export default function SponsorsLogin() { ) : ( <> - + Log In to GitHub )} @@ -153,7 +153,7 @@ export default function SponsorsLogin() { ) : ( <> - Log In to Discord + Log In to Discord )} diff --git a/app/routes/store.$version._index.tsx b/app/routes/store.$version._index.tsx index 8a3b717f..2be480b8 100644 --- a/app/routes/store.$version._index.tsx +++ b/app/routes/store.$version._index.tsx @@ -1,6 +1,11 @@ import { useEffect, useState } from 'react' -import { GgCornerUpLeft, CodiconPreview } from '~/components/icons' -import { FaBook, FaDiscord, FaGithub, FaTshirt } from 'react-icons/fa' +import { + GgCornerUpLeft, + CodiconPreview, + FaBrandsGithub, + FaBrandsDiscord, +} from '~/components/icons' +import { FaBook, FaTshirt } from 'react-icons/fa' import { json } from '@remix-run/node' import { Link, useLoaderData, useParams } from '@remix-run/react' import { Carbon } from '~/components/Carbon' @@ -41,7 +46,7 @@ const menu = [ { label: (
- GitHub + GitHub
), to: `https://github.com/${repo}`, @@ -49,7 +54,7 @@ const menu = [ { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', diff --git a/app/routes/store.tsx b/app/routes/store.tsx index e24ddf5a..c33ef089 100644 --- a/app/routes/store.tsx +++ b/app/routes/store.tsx @@ -15,7 +15,7 @@ import solidLogo from '~/images/solid-logo.svg' import vueLogo from '~/images/vue-logo.svg' import svelteLogo from '~/images/svelte-logo.svg' import angularLogo from '~/images/angular-logo.svg' -import { FaDiscord, FaGithub } from 'react-icons/fa' +import { FaBrandsDiscord, FaBrandsGithub } from '~/components/icons' import type { AvailableOptions } from '~/components/Select' import type { ReactNode } from 'react' @@ -89,7 +89,7 @@ export const localMenu: MenuItem = { { label: (
- GitHub + GitHub
), to: `https://github.com/${repo}`, @@ -97,7 +97,7 @@ export const localMenu: MenuItem = { { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', diff --git a/app/routes/table.v8._index.tsx b/app/routes/table.v8._index.tsx index 57f096d4..22c73285 100644 --- a/app/routes/table.v8._index.tsx +++ b/app/routes/table.v8._index.tsx @@ -1,20 +1,17 @@ import { useEffect, useState } from 'react' -import { GgCornerUpLeft, CodiconPreview } from '~/components/icons' import { - FaBolt, - FaBook, - FaCheckCircle, - FaCogs, - FaDiscord, - FaGithub, - FaTshirt, -} from 'react-icons/fa' + GgCornerUpLeft, + CodiconPreview, + IonBody, + FaBrandsGithub, + FaBrandsDiscord, +} from '~/components/icons' +import { FaBolt, FaBook, FaCheckCircle, FaCogs, FaTshirt } from 'react-icons/fa' import { Link, useLoaderData } from '@remix-run/react' import { json } from '@remix-run/node' import { v8branch } from '~/routes/table.v8' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' -import { IoIosBody } from 'react-icons/io' import SponsorPack from '~/components/SponsorPack' import { Logo } from '~/components/Logo' import { getSponsorsForSponsorPack } from '~/server/sponsors' @@ -51,7 +48,7 @@ const menu = [ { label: (
- GitHub + GitHub
), to: 'https://github.com/tanstack/table', @@ -59,7 +56,7 @@ const menu = [ { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', @@ -171,7 +168,7 @@ export default function ReactTableRoute() { >
- +

diff --git a/app/routes/table.v8.docs.tsx b/app/routes/table.v8.docs.tsx index 38789666..9c5c145a 100644 --- a/app/routes/table.v8.docs.tsx +++ b/app/routes/table.v8.docs.tsx @@ -1,5 +1,5 @@ import { useMemo } from 'react' -import { FaDiscord, FaGithub } from 'react-icons/fa' +import { FaBrandsDiscord, FaBrandsGithub } from '~/components/icons' import { Link } from '@remix-run/react' import { useReactTableV8Config } from '~/routes/table.v8' import { gradientText } from '~/routes/table.v8._index' @@ -31,7 +31,7 @@ const localMenu = { { label: (
- GitHub + GitHub
), to: 'https://github.com/tanstack/table', @@ -39,7 +39,7 @@ const localMenu = { { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', diff --git a/app/routes/virtual.v3._index.tsx b/app/routes/virtual.v3._index.tsx index 75edcf92..b5ce23b9 100644 --- a/app/routes/virtual.v3._index.tsx +++ b/app/routes/virtual.v3._index.tsx @@ -1,20 +1,17 @@ import { useEffect, useState } from 'react' -import { GgCornerUpLeft, CodiconPreview } from '~/components/icons' import { - FaBolt, - FaBook, - FaCheckCircle, - FaCogs, - FaDiscord, - FaGithub, - FaTshirt, -} from 'react-icons/fa' + GgCornerUpLeft, + CodiconPreview, + IonBody, + FaBrandsDiscord, + FaBrandsGithub, +} from '~/components/icons' +import { FaBolt, FaBook, FaCheckCircle, FaCogs, FaTshirt } from 'react-icons/fa' import { Link, useLoaderData } from '@remix-run/react' import { json } from '@remix-run/node' import { v3branch } from '~/routes/virtual.v3' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' -import { IoIosBody } from 'react-icons/io' import SponsorPack from '~/components/SponsorPack' import { TbHeartHandshake } from 'react-icons/tb' import { Logo } from '~/components/Logo' @@ -51,7 +48,7 @@ const menu = [ { label: (
- GitHub + GitHub
), to: 'https://github.com/tanstack/virtual', @@ -59,7 +56,7 @@ const menu = [ { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', @@ -171,7 +168,7 @@ export default function ReactTableRoute() { >
- +

diff --git a/app/routes/virtual.v3.docs.tsx b/app/routes/virtual.v3.docs.tsx index 21001fc2..04f07ceb 100644 --- a/app/routes/virtual.v3.docs.tsx +++ b/app/routes/virtual.v3.docs.tsx @@ -1,5 +1,5 @@ import { useMemo } from 'react' -import { FaDiscord, FaGithub } from 'react-icons/fa' +import { FaBrandsDiscord, FaBrandsGithub } from '~/components/icons' import { Link } from '@remix-run/react' import { useVirtualV3Config } from '~/routes/virtual.v3' import { gradientText } from '~/routes/virtual.v3._index' @@ -30,7 +30,7 @@ const localMenu = { { label: (
- GitHub + GitHub
), to: 'https://github.com/tanstack/virtual', @@ -38,7 +38,7 @@ const localMenu = { { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', From 9b971a712fe3adf0f4d2768cac2fb1c53fce4c2d Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 5 Nov 2023 19:08:24 +1100 Subject: [PATCH 13/39] Replace all remaining icons --- app/components/Docs.tsx | 19 +- app/components/RootDocument.tsx | 4 +- app/components/Select.tsx | 10 +- app/components/icons.tsx | 416 +++++++++++++++++++++++++++ app/routes/_index.tsx | 13 +- app/routes/blog.tsx | 6 +- app/routes/form.$version._index.tsx | 24 +- app/routes/query.$version._index.tsx | 30 +- app/routes/router.v1._index.tsx | 23 +- app/routes/sponsor-login.tsx | 14 +- app/routes/store.$version._index.tsx | 13 +- app/routes/table.v8._index.tsx | 16 +- app/routes/virtual.v3._index.tsx | 20 +- package.json | 1 - pnpm-lock.yaml | 11 - 15 files changed, 529 insertions(+), 91 deletions(-) diff --git a/app/components/Docs.tsx b/app/components/Docs.tsx index 71b7b775..88fd2cc0 100644 --- a/app/components/Docs.tsx +++ b/app/components/Docs.tsx @@ -1,7 +1,12 @@ import { useMemo, useRef } from 'react' import { DocSearch } from '@docsearch/react' -import { CgClose, CgMenuLeft } from 'react-icons/cg' -import { FaArrowLeft, FaArrowRight, FaTimes } from 'react-icons/fa' +import { + FaSolidArrowLeft, + FaSolidArrowRight, + FaSolidTimes, + GgClose, + GgMenuLeft, +} from '~/components/icons' import { NavLink, Outlet, useMatches } from '@remix-run/react' import { last } from '~/utils/utils' import { Carbon } from '~/components/Carbon' @@ -153,8 +158,8 @@ export function Docs({ >
- - + + {logo}
@@ -253,7 +258,7 @@ export function Docs({ shadow-lg dark:border dark:border-gray-800 lg:text-lg" > - {prevItem.label} + {prevItem.label} ) : null} {nextItem ? ( @@ -277,7 +282,7 @@ export function Docs({ > {nextItem.label} {' '} - +

) : null} @@ -305,7 +310,7 @@ export function Docs({ setShowBytes(false) }} > - +

diff --git a/app/components/RootDocument.tsx b/app/components/RootDocument.tsx index 6b8c1364..872d4454 100644 --- a/app/components/RootDocument.tsx +++ b/app/components/RootDocument.tsx @@ -7,7 +7,7 @@ import { useMatches, useNavigation, } from '@remix-run/react' -import { CgSpinner } from 'react-icons/cg' +import { GgSpinner } from '~/components/icons' import type { ReactNode } from 'react' export function RootDocument({ @@ -75,7 +75,7 @@ export function RootDocument({ navigation.state !== 'idle' ? 'opacity-1' : 'opacity-0' }`} > - +
diff --git a/app/components/Select.tsx b/app/components/Select.tsx index 57db6fa1..9ed2252a 100644 --- a/app/components/Select.tsx +++ b/app/components/Select.tsx @@ -1,7 +1,6 @@ import { Fragment } from 'react' import { Listbox, Transition } from '@headlessui/react' - -import { HiCheck, HiChevronDown } from 'react-icons/hi' +import { HeroiconsCheck, HeroiconsChevronDown } from '~/components/icons' import { Form } from '@remix-run/react' export type AvailableOptions = Record< @@ -45,7 +44,7 @@ export function Select({ ) : null} {selectedOption.label} - {selected ? ( - ) : null} diff --git a/app/components/icons.tsx b/app/components/icons.tsx index 6a8aeefe..0ceab83c 100644 --- a/app/components/icons.tsx +++ b/app/components/icons.tsx @@ -128,3 +128,419 @@ export function FaBrandsDiscord(props: SVGProps) { ) } + +// https://api.iconify.design/tabler:zoom-question.svg +export function TablerZoomQuestion(props: SVGProps) { + return ( + + + + + + + ) +} + +// https://api.iconify.design/tabler:heart-handshake.svg +export function TablerHeartHandshake(props: SVGProps) { + return ( + + + + + + + ) +} + +// https://api.iconify.design/gg:spinner.svg +export function GgSpinner(props: SVGProps) { + return ( + + + + + + + ) +} + +// https://api.iconify.design/gg:timelapse.svg +export function GgTimelapse(props: SVGProps) { + return ( + + + + + + + ) +} + +// https://api.iconify.design/gg:menu-left.svg +export function GgMenuLeft(props: SVGProps) { + return ( + + + + ) +} + +// https://api.iconify.design/gg:close.svg +export function GgClose(props: SVGProps) { + return ( + + + + ) +} + +// https://api.iconify.design/gg:music-speaker.svg +export function GgMusicSpeaker(props: SVGProps) { + return ( + + + + + + + + ) +} + +// https://api.iconify.design/ri:lightbulb-flash-line.svg +export function RiLightbulbFlashLine(props: SVGProps) { + return ( + + + + ) +} + +// https://api.iconify.design/codicon:wand.svg +export function CodiconWand(props: SVGProps) { + return ( + + + + ) +} + +// https://api.iconify.design/heroicons:chevron-down.svg +export function HeroiconsChevronDown(props: SVGProps) { + return ( + + + + ) +} + +// https://api.iconify.design/heroicons:check.svg +export function HeroiconsCheck(props: SVGProps) { + return ( + + + + ) +} + +// https://api.iconify.design/fa-solid:check.svg +export function FaSolidCheck(props: SVGProps) { + return ( + + + + ) +} + +// https://api.iconify.design/fa-solid:check-circle.svg +export function FaSolidCheckCircle(props: SVGProps) { + return ( + + + + ) +} + +// https://api.iconify.design/fa-solid:book.svg +export function FaSolidBook(props: SVGProps) { + return ( + + + + ) +} + +// https://api.iconify.design/fa-solid:bolt.svg +export function FaSolidBolt(props: SVGProps) { + return ( + + + + ) +} + +// https://api.iconify.design/fa-solid:cogs.svg +export function FaSolidCogs(props: SVGProps) { + return ( + + + + ) +} + +// https://api.iconify.design/fa-solid:tshirt.svg +export function FaSolidTshirt(props: SVGProps) { + return ( + + + + ) +} + +// https://api.iconify.design/fa-solid:plug.svg +export function FaSolidPlug(props: SVGProps) { + return ( + + + + ) +} + +// https://api.iconify.design/fa-solid:times.svg +export function FaSolidTimes(props: SVGProps) { + return ( + + + + ) +} + +// https://api.iconify.design/fa-solid:arrow-left.svg +export function FaSolidArrowLeft(props: SVGProps) { + return ( + + + + ) +} + +// https://api.iconify.design/fa-solid:arrow-right.svg +export function FaSolidArrowRight(props: SVGProps) { + return ( + + + + ) +} diff --git a/app/routes/_index.tsx b/app/routes/_index.tsx index f1e42a02..bde82b86 100644 --- a/app/routes/_index.tsx +++ b/app/routes/_index.tsx @@ -9,9 +9,12 @@ import type { ActionFunction } from '@remix-run/node' import { json } from '@remix-run/node' import { Carbon } from '~/components/Carbon' import { twMerge } from 'tailwind-merge' -import { FaBrandsDiscord, FaBrandsGithub } from '~/components/icons' -import { FaTshirt } from 'react-icons/fa' -import { CgMusicSpeaker } from 'react-icons/cg' +import { + FaBrandsDiscord, + FaBrandsGithub, + FaSolidTshirt, + GgMusicSpeaker, +} from '~/components/icons' import { Footer } from '~/components/Footer' import SponsorPack from '~/components/SponsorPack' import { LinkOrA } from '~/components/LinkOrA' @@ -229,7 +232,7 @@ export default function Index() { { label: (
- Merch @@ -240,7 +243,7 @@ export default function Index() { { label: (
- Blog + Blog
), to: '/blog', diff --git a/app/routes/blog.tsx b/app/routes/blog.tsx index 7710934d..dd6e952d 100644 --- a/app/routes/blog.tsx +++ b/app/routes/blog.tsx @@ -1,5 +1,5 @@ import { useRef } from 'react' -import { CgClose, CgMenuLeft } from 'react-icons/cg' +import { GgClose, GgMenuLeft } from '~/components/icons' import { Link, NavLink, Outlet } from '@remix-run/react' import { DefaultErrorBoundary } from '~/components/DefaultErrorBoundary' import { Carbon } from '~/components/Carbon' @@ -93,8 +93,8 @@ export default function RouteBlog() { >
- - + + {logo}
diff --git a/app/routes/form.$version._index.tsx b/app/routes/form.$version._index.tsx index 46f24028..8454291c 100644 --- a/app/routes/form.$version._index.tsx +++ b/app/routes/form.$version._index.tsx @@ -4,14 +4,18 @@ import { CodiconPreview, FaBrandsGithub, FaBrandsDiscord, + TablerHeartHandshake, + CodiconWand, + FaSolidCheckCircle, + FaSolidBook, + FaSolidTshirt, + FaSolidBolt, + FaSolidCogs, } from '~/components/icons' -import { FaBolt, FaBook, FaCheckCircle, FaCogs, FaTshirt } from 'react-icons/fa' import { json } from '@remix-run/node' import { Link, useLoaderData, useParams } from '@remix-run/react' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' -import { VscWand } from 'react-icons/vsc' -import { TbHeartHandshake } from 'react-icons/tb' import SponsorPack from '~/components/SponsorPack' import { PPPBanner } from '~/components/PPPBanner' import { getBranch, gradientText, latestVersion, repo } from '~/routes/form' @@ -39,7 +43,7 @@ const menu = [ { label: (
- Docs + Docs
), to: './docs/', @@ -63,7 +67,7 @@ const menu = [ { label: (
- Merch + Merch
), to: `https://cottonbureau.com/people/tanstack`, @@ -171,7 +175,7 @@ export default function RouteVersion() { md:flex-row" >
- +

First-Class TypeScript Support @@ -191,7 +195,7 @@ export default function RouteVersion() {

- +

@@ -212,7 +216,7 @@ export default function RouteVersion() {

- +

@@ -263,7 +267,7 @@ export default function RouteVersion() { ].map((d, i) => { return ( - {d} + {d} ) })} @@ -282,7 +286,7 @@ export default function RouteVersion() { dark:bg-gray-800 dark:shadow-none" > - Form You? + Form You?
diff --git a/app/routes/query.$version._index.tsx b/app/routes/query.$version._index.tsx index c5d7ef08..09aa1a49 100644 --- a/app/routes/query.$version._index.tsx +++ b/app/routes/query.$version._index.tsx @@ -1,17 +1,21 @@ import { useEffect, useState } from 'react' import { CodiconPreview, + CodiconWand, FaBrandsDiscord, FaBrandsGithub, + FaSolidBolt, + FaSolidBook, + FaSolidCheckCircle, + FaSolidCogs, + FaSolidTshirt, GgCornerUpLeft, + TablerHeartHandshake, } from '~/components/icons' -import { FaBolt, FaBook, FaCheckCircle, FaCogs, FaTshirt } from 'react-icons/fa' import { json } from '@remix-run/node' import { Link, useLoaderData, useParams } from '@remix-run/react' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' -import { VscWand } from 'react-icons/vsc' -import { TbHeartHandshake } from 'react-icons/tb' import SponsorPack from '~/components/SponsorPack' import { PPPBanner } from '~/components/PPPBanner' import { getBranch, latestVersion, repo } from '~/routes/query' @@ -44,7 +48,7 @@ const menu = [ { label: (
- Docs + Docs
), to: './docs/', @@ -68,7 +72,7 @@ const menu = [ { label: (
- Merch + Merch
), to: `https://cottonbureau.com/people/tanstack`, @@ -186,7 +190,7 @@ export default function RouteVersion() { md:flex-row" >
- +

Declarative & Automatic @@ -205,7 +209,7 @@ export default function RouteVersion() {

- +

@@ -225,7 +229,7 @@ export default function RouteVersion() {

- +

@@ -267,19 +271,19 @@ export default function RouteVersion() {
- + Save time by learning with a guided approach
- + Get hands-on experience building a real-world application
- + Never worry about data fetching again
@@ -335,7 +339,7 @@ export default function RouteVersion() { ].map((d, i) => { return ( - {d} + {d} ) })} @@ -399,7 +403,7 @@ export default function RouteVersion() { dark:bg-gray-800 dark:shadow-none" > - Query You? + Query You?
diff --git a/app/routes/router.v1._index.tsx b/app/routes/router.v1._index.tsx index 2de950cc..6884763a 100644 --- a/app/routes/router.v1._index.tsx +++ b/app/routes/router.v1._index.tsx @@ -4,13 +4,16 @@ import { CodiconPreview, FaBrandsDiscord, FaBrandsGithub, + TablerZoomQuestion, + TablerHeartHandshake, + GgTimelapse, + RiLightbulbFlashLine, + FaSolidCheckCircle, + FaSolidBook, + FaSolidTshirt, } from '~/components/icons' -import { CgTimelapse } from 'react-icons/cg' -import { FaBook, FaCheckCircle, FaTshirt } from 'react-icons/fa' import { Link, useLoaderData } from '@remix-run/react' import { json } from '@remix-run/node' -import { TbHeartHandshake, TbZoomQuestion } from 'react-icons/tb' -import { RiLightbulbFlashLine } from 'react-icons/ri' import { v1branch } from '~/routes/router.v1' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' @@ -42,7 +45,7 @@ const menu = [ { label: (
- Docs + Docs
), to: './docs/overview', @@ -66,7 +69,7 @@ const menu = [ { label: (
- Merch + Merch
), to: `https://cottonbureau.com/people/tanstack`, @@ -186,7 +189,7 @@ export default function TanStackRouterRoute() {
-
- +

@@ -271,7 +274,7 @@ export default function TanStackRouterRoute() { ].map((d, i) => { return ( - {d} + {d} ) })} @@ -402,7 +405,7 @@ export default function TanStackRouterRoute() { dark:bg-gray-800 dark:shadow-none" > - Router You? + Router You?
diff --git a/app/routes/sponsor-login.tsx b/app/routes/sponsor-login.tsx index 881ce9d2..61b9f12d 100644 --- a/app/routes/sponsor-login.tsx +++ b/app/routes/sponsor-login.tsx @@ -1,7 +1,11 @@ import { useEffect, useState } from 'react' import * as qss from 'qss' -import { FaBrandsDiscord, FaBrandsGithub } from '~/components/icons' -import { FaPlug, FaCheck } from 'react-icons/fa' +import { + FaBrandsDiscord, + FaBrandsGithub, + FaSolidCheck, + FaSolidPlug, +} from '~/components/icons' import useSessionStorage from '~/hooks/useSessionStorage' import axios from 'axios' @@ -130,7 +134,7 @@ export default function SponsorsLogin() { > {githubCode ? ( <> - GitHub + GitHub ) : ( <> @@ -149,7 +153,7 @@ export default function SponsorsLogin() { > {discordCode ? ( <> - Discord + Discord ) : ( <> @@ -168,7 +172,7 @@ export default function SponsorsLogin() { onClick={() => linkAccounts()} disabled={loadingMessage} > - Link Accounts + Link Accounts
) : null} diff --git a/app/routes/store.$version._index.tsx b/app/routes/store.$version._index.tsx index 2be480b8..839d080c 100644 --- a/app/routes/store.$version._index.tsx +++ b/app/routes/store.$version._index.tsx @@ -4,13 +4,14 @@ import { CodiconPreview, FaBrandsGithub, FaBrandsDiscord, + TablerHeartHandshake, + FaSolidBook, + FaSolidTshirt, } from '~/components/icons' -import { FaBook, FaTshirt } from 'react-icons/fa' import { json } from '@remix-run/node' import { Link, useLoaderData, useParams } from '@remix-run/react' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' -import { TbHeartHandshake } from 'react-icons/tb' import SponsorPack from '~/components/SponsorPack' import { PPPBanner } from '~/components/PPPBanner' import { getBranch, gradientText, latestVersion, repo } from '~/routes/store' @@ -38,7 +39,7 @@ const menu = [ { label: (
- Docs + Docs
), to: './docs/', @@ -62,7 +63,7 @@ const menu = [ { label: (
- Merch + Merch
), to: `https://cottonbureau.com/people/tanstack`, @@ -253,7 +254,7 @@ export default function RouteVersion() { ].map((d, i) => { return ( - {d} + {d} ) })} @@ -272,7 +273,7 @@ export default function RouteVersion() { dark:bg-gray-800 dark:shadow-none" > - Form You? + Form You?
diff --git a/app/routes/table.v8._index.tsx b/app/routes/table.v8._index.tsx index 22c73285..bb71452a 100644 --- a/app/routes/table.v8._index.tsx +++ b/app/routes/table.v8._index.tsx @@ -5,8 +5,12 @@ import { IonBody, FaBrandsGithub, FaBrandsDiscord, + FaSolidCheckCircle, + FaSolidBook, + FaSolidTshirt, + FaSolidBolt, + FaSolidCogs, } from '~/components/icons' -import { FaBolt, FaBook, FaCheckCircle, FaCogs, FaTshirt } from 'react-icons/fa' import { Link, useLoaderData } from '@remix-run/react' import { json } from '@remix-run/node' import { v8branch } from '~/routes/table.v8' @@ -40,7 +44,7 @@ const menu = [ { label: (
- Docs + Docs
), to: './docs/guide/introduction', @@ -64,7 +68,7 @@ const menu = [ { label: (
- Merch + Merch
), to: `https://cottonbureau.com/people/tanstack`, @@ -187,7 +191,7 @@ export default function ReactTableRoute() {
- +

@@ -207,7 +211,7 @@ export default function ReactTableRoute() {

- +

@@ -264,7 +268,7 @@ export default function ReactTableRoute() { ].map((d, i) => { return ( - {d} + {d} ) })} diff --git a/app/routes/virtual.v3._index.tsx b/app/routes/virtual.v3._index.tsx index b5ce23b9..4e78f152 100644 --- a/app/routes/virtual.v3._index.tsx +++ b/app/routes/virtual.v3._index.tsx @@ -5,15 +5,19 @@ import { IonBody, FaBrandsDiscord, FaBrandsGithub, + TablerHeartHandshake, + FaSolidCheckCircle, + FaSolidBook, + FaSolidTshirt, + FaSolidBolt, + FaSolidCogs, } from '~/components/icons' -import { FaBolt, FaBook, FaCheckCircle, FaCogs, FaTshirt } from 'react-icons/fa' import { Link, useLoaderData } from '@remix-run/react' import { json } from '@remix-run/node' import { v3branch } from '~/routes/virtual.v3' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' import SponsorPack from '~/components/SponsorPack' -import { TbHeartHandshake } from 'react-icons/tb' import { Logo } from '~/components/Logo' import { getSponsorsForSponsorPack } from '~/server/sponsors' @@ -40,7 +44,7 @@ const menu = [ { label: (
- Docs + Docs
), to: './docs/guide/introduction', @@ -64,7 +68,7 @@ const menu = [ { label: (
- Merch + Merch
), to: `https://cottonbureau.com/people/tanstack`, @@ -186,7 +190,7 @@ export default function ReactTableRoute() {

- +

@@ -206,7 +210,7 @@ export default function ReactTableRoute() {

- +

@@ -253,7 +257,7 @@ export default function ReactTableRoute() { ].map((d, i) => { return ( - {d} + {d} ) })} @@ -314,7 +318,7 @@ export default function ReactTableRoute() { dark:bg-gray-800 dark:shadow-none" > - Virtual You? + Virtual You?
diff --git a/package.json b/package.json index d1859156..6144f4a0 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ "qss": "^3.0.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-icons": "^4.11.0", "rehype-raw": "^7.0.0", "rehype-slug": "^5.1.0", "remark-gfm": "^3.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2c473256..e6eee07b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -74,9 +74,6 @@ dependencies: react-dom: specifier: ^18.2.0 version: 18.2.0(react@18.2.0) - react-icons: - specifier: ^4.11.0 - version: 4.11.0(react@18.2.0) rehype-raw: specifier: ^7.0.0 version: 7.0.0 @@ -6561,14 +6558,6 @@ packages: scheduler: 0.23.0 dev: false - /react-icons@4.11.0(react@18.2.0): - resolution: {integrity: sha512-V+4khzYcE5EBk/BvcuYRq6V/osf11ODUM2J8hg2FDSswRrGvqiYUYPRy4OdrWaQOBj4NcpJfmHZLNaD+VH0TyA==} - peerDependencies: - react: '*' - dependencies: - react: 18.2.0 - dev: false - /react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} From ade5fd97e245e5feaaccefcb0a733cc8df6333ae Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 5 Nov 2023 19:36:08 +1100 Subject: [PATCH 14/39] Fix remark-shiki-twoslash broken CJS/ESM compatibility --- app/utils/documents.server.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/utils/documents.server.ts b/app/utils/documents.server.ts index 2cab55d1..7ef788de 100644 --- a/app/utils/documents.server.ts +++ b/app/utils/documents.server.ts @@ -4,10 +4,13 @@ import { fileURLToPath } from 'node:url' import { bundleMDX } from 'mdx-bundler' import * as graymatter from 'gray-matter' import { fetchCached } from '~/utils/cache.server' -import remarkShikiTwoslash from 'remark-shiki-twoslash' +import remarkTwoslash from 'remark-shiki-twoslash' import rehypeRaw from 'rehype-raw' import { nodeTypes } from '@mdx-js/mdx' +// @ts-ignore Hack for broken CJS/ESM export compatibility +const remarkShikiTwoslash = process.env.NODE_ENV === 'development' ? remarkTwoslash : remarkTwoslash.default + type BundledMDX = Awaited> export type Doc = { From 62f0971baf4e7815985acd67b1a2a11ed581f839 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 5 Nov 2023 21:39:06 +1100 Subject: [PATCH 15/39] Fix @docsearch/react ESM issue --- app/components/Docs.tsx | 4 ++-- app/components/Search.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/components/Docs.tsx b/app/components/Docs.tsx index 88fd2cc0..917a4380 100644 --- a/app/components/Docs.tsx +++ b/app/components/Docs.tsx @@ -1,5 +1,5 @@ import { useMemo, useRef } from 'react' -import { DocSearch } from '@docsearch/react' +import * as DocSearch from '@docsearch/react'; import { FaSolidArrowLeft, FaSolidArrowRight, @@ -197,7 +197,7 @@ export function Docs({
{logo}
- + return } From 4292515a4b964b6d9a37bf8e97b0c9dadbe9b0c2 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 5 Nov 2023 21:52:31 +1100 Subject: [PATCH 16/39] Fix inline code highlights --- app/components/CodeBlock.tsx | 4 ++-- app/components/Mdx.tsx | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/app/components/CodeBlock.tsx b/app/components/CodeBlock.tsx index 64eab781..85f006ac 100644 --- a/app/components/CodeBlock.tsx +++ b/app/components/CodeBlock.tsx @@ -1,4 +1,4 @@ -import type { FC, HTMLAttributes } from 'react' +import type { HTMLProps } from 'react' import invariant from 'tiny-invariant' function getLanguageFromChildren(children: any): string | undefined { @@ -6,7 +6,7 @@ function getLanguageFromChildren(children: any): string | undefined { return language ? language : undefined } -export const CodeBlock: FC> = (props) => { +export const CodeBlock = (props: HTMLProps) => { const { children, className, style } = props invariant(!!children, 'children is required') const lang = getLanguageFromChildren(children) diff --git a/app/components/Mdx.tsx b/app/components/Mdx.tsx index 7d5de6f6..26e4ba71 100644 --- a/app/components/Mdx.tsx +++ b/app/components/Mdx.tsx @@ -35,13 +35,30 @@ const makeHeading = const markdownComponents = { a: MarkdownLink, + pre: CodeBlock, h1: makeHeading('h1'), h2: makeHeading('h2'), h3: makeHeading('h3'), h4: makeHeading('h4'), h5: makeHeading('h5'), h6: makeHeading('h6'), - pre: CodeBlock, + code: (props: HTMLProps) => { + const { className, children } = props + if (typeof children === 'string') { + // For inline code, this adds a background and outline + return ( + + ) + } else { + // For Shiki code blocks, this does nothing + return + } + }, } export function Mdx({ From afab83f7f443f1ba5afa9a2384aab811f1cacaaf Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Tue, 7 Nov 2023 08:57:43 +1100 Subject: [PATCH 17/39] Fixed incorrect icons --- app/components/Docs.tsx | 2 +- app/components/Search.tsx | 2 +- app/components/Select.tsx | 11 ++++------- app/components/icons.tsx | 24 ++++++++---------------- app/utils/documents.server.ts | 5 ++++- 5 files changed, 18 insertions(+), 26 deletions(-) diff --git a/app/components/Docs.tsx b/app/components/Docs.tsx index 917a4380..4ad3ed85 100644 --- a/app/components/Docs.tsx +++ b/app/components/Docs.tsx @@ -1,5 +1,5 @@ import { useMemo, useRef } from 'react' -import * as DocSearch from '@docsearch/react'; +import * as DocSearch from '@docsearch/react' import { FaSolidArrowLeft, FaSolidArrowRight, diff --git a/app/components/Search.tsx b/app/components/Search.tsx index f2e73200..d882a068 100644 --- a/app/components/Search.tsx +++ b/app/components/Search.tsx @@ -1,4 +1,4 @@ -import * as DocSearch from '@docsearch/react'; +import * as DocSearch from '@docsearch/react' import type { DocSearchProps } from '@docsearch/react' export function Search(props: DocSearchProps) { diff --git a/app/components/Select.tsx b/app/components/Select.tsx index 9ed2252a..deded309 100644 --- a/app/components/Select.tsx +++ b/app/components/Select.tsx @@ -1,6 +1,6 @@ import { Fragment } from 'react' import { Listbox, Transition } from '@headlessui/react' -import { HeroiconsCheck, HeroiconsChevronDown } from '~/components/icons' +import { GgCheck, GgChevronDown } from '~/components/icons' import { Form } from '@remix-run/react' export type AvailableOptions = Record< @@ -44,7 +44,7 @@ export function Select({ ) : null} {selectedOption.label} - {selected ? ( - -
diff --git a/app/components/RootDocument.tsx b/app/components/RootDocument.tsx index 54a02390..a4c6d118 100644 --- a/app/components/RootDocument.tsx +++ b/app/components/RootDocument.tsx @@ -7,7 +7,7 @@ import { useMatches, useNavigation, } from '@remix-run/react' -import { GgSpinner } from '~/components/icons' +import { CgSpinner } from 'react-icons/cg/index' import type { ReactNode } from 'react' export function RootDocument({ @@ -75,7 +75,7 @@ export function RootDocument({ navigation.state !== 'idle' ? 'opacity-1' : 'opacity-0' }`} > - +
diff --git a/app/components/Select.tsx b/app/components/Select.tsx index 0cfe66b2..2c3480e6 100644 --- a/app/components/Select.tsx +++ b/app/components/Select.tsx @@ -1,9 +1,6 @@ import { Fragment } from 'react' import { Listbox, Transition } from '@headlessui/react' -import { - HeroiconsSolidCheck, - HeroiconsSolidChevronDown, -} from '~/components/icons' +import { HiCheck, HiChevronDown } from 'react-icons/hi/index' import { Form } from '@remix-run/react' export type AvailableOptions = Record< @@ -47,7 +44,7 @@ export function Select({ ) : null} {selectedOption.label} - {selected ? ( - ) : null} diff --git a/app/components/icons.tsx b/app/components/icons.tsx deleted file mode 100644 index da8726b2..00000000 --- a/app/components/icons.tsx +++ /dev/null @@ -1,542 +0,0 @@ -import type { SVGProps } from 'react' - -// https://api.iconify.design/gg:corner-up-left.svg -export function GgCornerUpLeft(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/codicon:preview.svg -export function CodiconPreview(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/ion:body.svg -export function IonBody(props: SVGProps) { - return ( - - - - - ) -} - -// https://api.iconify.design/ion:close.svg -export function IonClose(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/fa-solid:edit.svg -export function FaSolidEdit(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/fa-brands:github.svg -export function FaBrandsGithub(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/fa-brands:discord.svg -export function FaBrandsDiscord(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/tabler:zoom-question.svg -export function TablerZoomQuestion(props: SVGProps) { - return ( - - - - - - - ) -} - -// https://api.iconify.design/tabler:heart-handshake.svg -export function TablerHeartHandshake(props: SVGProps) { - return ( - - - - - - - ) -} - -// https://api.iconify.design/gg:spinner.svg -export function GgSpinner(props: SVGProps) { - return ( - - - - - - - ) -} - -// https://api.iconify.design/gg:timelapse.svg -export function GgTimelapse(props: SVGProps) { - return ( - - - - - - - ) -} - -// https://api.iconify.design/gg:menu-left.svg -export function GgMenuLeft(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/gg:close.svg -export function GgClose(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/gg:music-speaker.svg -export function GgMusicSpeaker(props: SVGProps) { - return ( - - - - - - - - ) -} - -// https://api.iconify.design/ri:lightbulb-flash-line.svg -export function RiLightbulbFlashLine(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/codicon:wand.svg -export function CodiconWand(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/heroicons-solid:chevron-down.svg -export function HeroiconsSolidChevronDown(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/heroicons-solid:check.svg -export function HeroiconsSolidCheck(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/fa-solid:check.svg -export function FaSolidCheck(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/fa-solid:check-circle.svg -export function FaSolidCheckCircle(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/fa-solid:book.svg -export function FaSolidBook(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/fa-solid:bolt.svg -export function FaSolidBolt(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/fa-solid:cogs.svg -export function FaSolidCogs(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/fa-solid:tshirt.svg -export function FaSolidTshirt(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/fa-solid:plug.svg -export function FaSolidPlug(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/fa-solid:times.svg -export function FaSolidTimes(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/fa-solid:arrow-left.svg -export function FaSolidArrowLeft(props: SVGProps) { - return ( - - - - ) -} - -// https://api.iconify.design/fa-solid:arrow-right.svg -export function FaSolidArrowRight(props: SVGProps) { - return ( - - - - ) -} diff --git a/app/projects/form.tsx b/app/projects/form.tsx index ab78e0d8..193e9d13 100644 --- a/app/projects/form.tsx +++ b/app/projects/form.tsx @@ -6,7 +6,7 @@ import solidLogo from '~/images/solid-logo.svg' import vueLogo from '~/images/vue-logo.svg' import svelteLogo from '~/images/svelte-logo.svg' import angularLogo from '~/images/angular-logo.svg' -import { FaBrandsDiscord, FaBrandsGithub } from '~/components/icons' +import { FaDiscord, FaGithub } from 'react-icons/fa/index' import type { AvailableOptions } from '~/components/Select' import type { ReactNode } from 'react' @@ -78,7 +78,7 @@ export const localMenu: MenuItem = { { label: (
- GitHub + GitHub
), to: `https://github.com/${repo}`, @@ -86,7 +86,7 @@ export const localMenu: MenuItem = { { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', diff --git a/app/projects/store.tsx b/app/projects/store.tsx index a1dfc90f..c5126765 100644 --- a/app/projects/store.tsx +++ b/app/projects/store.tsx @@ -6,7 +6,7 @@ import solidLogo from '~/images/solid-logo.svg' import vueLogo from '~/images/vue-logo.svg' import svelteLogo from '~/images/svelte-logo.svg' import angularLogo from '~/images/angular-logo.svg' -import { FaBrandsDiscord, FaBrandsGithub } from '~/components/icons' +import { FaDiscord, FaGithub } from 'react-icons/fa/index' import type { AvailableOptions } from '~/components/Select' import type { ReactNode } from 'react' @@ -78,7 +78,7 @@ export const localMenu: MenuItem = { { label: (
- GitHub + GitHub
), to: `https://github.com/${repo}`, @@ -86,7 +86,7 @@ export const localMenu: MenuItem = { { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', diff --git a/app/routes/_index.tsx b/app/routes/_index.tsx index d2f7405f..ca9b1d20 100644 --- a/app/routes/_index.tsx +++ b/app/routes/_index.tsx @@ -9,12 +9,8 @@ import type { ActionFunction } from '@remix-run/node' import { json } from '@remix-run/node' import { Carbon } from '~/components/Carbon' import { twMerge } from 'tailwind-merge' -import { - FaBrandsDiscord, - FaBrandsGithub, - FaSolidTshirt, - GgMusicSpeaker, -} from '~/components/icons' +import { FaDiscord, FaGithub, FaTshirt } from 'react-icons/fa/index' +import { CgMusicSpeaker } from 'react-icons/cg/index' import { Footer } from '~/components/Footer' import SponsorPack from '~/components/SponsorPack' import { LinkOrA } from '~/components/LinkOrA' @@ -185,7 +181,7 @@ export default function Index() { { label: (
- Merch @@ -196,7 +192,7 @@ export default function Index() { { label: (
- Blog + Blog
), to: '/blog', @@ -204,7 +200,7 @@ export default function Index() { { label: (
- GitHub + GitHub
), to: 'https://github.com/tanstack', @@ -212,7 +208,7 @@ export default function Index() { { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', diff --git a/app/routes/blog.tsx b/app/routes/blog.tsx index dd6e952d..bfb8a428 100644 --- a/app/routes/blog.tsx +++ b/app/routes/blog.tsx @@ -1,5 +1,5 @@ import { useRef } from 'react' -import { GgClose, GgMenuLeft } from '~/components/icons' +import { CgClose, CgMenuLeft } from 'react-icons/cg/index' import { Link, NavLink, Outlet } from '@remix-run/react' import { DefaultErrorBoundary } from '~/components/DefaultErrorBoundary' import { Carbon } from '~/components/Carbon' @@ -93,8 +93,8 @@ export default function RouteBlog() { >
- - + + {logo}
diff --git a/app/routes/form.$version._index.tsx b/app/routes/form.$version._index.tsx index 9c3214a9..300d79c7 100644 --- a/app/routes/form.$version._index.tsx +++ b/app/routes/form.$version._index.tsx @@ -1,26 +1,25 @@ import { useEffect, useState } from 'react' +import { CgCornerUpLeft } from 'react-icons/cg/index' import { - CodiconPreview, - FaBrandsGithub, - FaBrandsDiscord, - TablerHeartHandshake, - CodiconWand, - FaSolidCheckCircle, - FaSolidBook, - FaSolidTshirt, - FaSolidBolt, - FaSolidCogs, -} from '~/components/icons' + FaBolt, + FaBook, + FaCheckCircle, + FaCogs, + FaDiscord, + FaGithub, + FaTshirt, +} from 'react-icons/fa/index' import { json } from '@remix-run/node' import { Link, useLoaderData, useParams } from '@remix-run/react' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' +import { VscPreview, VscWand } from 'react-icons/vsc/index' +import { TbHeartHandshake } from 'react-icons/tb/index' import SponsorPack from '~/components/SponsorPack' import { getBranch, gradientText, latestVersion, repo } from '~/projects/form' import { Logo } from '~/components/Logo' import { getSponsorsForSponsorPack } from '~/server/sponsors' import type { Framework } from '~/projects/form' -import { CgCornerUpLeft } from 'react-icons/cg/index' const menu = [ { @@ -34,7 +33,7 @@ const menu = [ { label: (
- Examples + Examples
), to: './docs/framework/react/examples/simple', @@ -42,7 +41,7 @@ const menu = [ { label: (
- Docs + Docs
), to: './docs/', @@ -50,7 +49,7 @@ const menu = [ { label: (
- GitHub + GitHub
), to: `https://github.com/${repo}`, @@ -58,7 +57,7 @@ const menu = [ { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', @@ -66,7 +65,7 @@ const menu = [ { label: (
- Merch + Merch
), to: `https://cottonbureau.com/people/tanstack`, @@ -173,7 +172,7 @@ export default function RouteVersion() { md:flex-row" >
- +

First-Class TypeScript Support @@ -193,7 +192,7 @@ export default function RouteVersion() {

- +

@@ -214,7 +213,7 @@ export default function RouteVersion() {

- +

@@ -265,7 +264,7 @@ export default function RouteVersion() { ].map((d, i) => { return ( - {d} + {d} ) })} @@ -284,7 +283,7 @@ export default function RouteVersion() { dark:bg-gray-800 dark:shadow-none" > - Form You? + Form You?
diff --git a/app/routes/query.$version._index.tsx b/app/routes/query.$version._index.tsx index ddac0f64..d7bd3f1a 100644 --- a/app/routes/query.$version._index.tsx +++ b/app/routes/query.$version._index.tsx @@ -1,21 +1,20 @@ import { useEffect, useState } from 'react' +import { CgCornerUpLeft } from 'react-icons/cg/index' import { - CodiconPreview, - CodiconWand, - FaBrandsDiscord, - FaBrandsGithub, - FaSolidBolt, - FaSolidBook, - FaSolidCheckCircle, - FaSolidCogs, - FaSolidTshirt, - GgCornerUpLeft, - TablerHeartHandshake, -} from '~/components/icons' + FaBolt, + FaBook, + FaCheckCircle, + FaCogs, + FaDiscord, + FaGithub, + FaTshirt, +} from 'react-icons/fa/index' import { json } from '@remix-run/node' import { Link, useLoaderData, useParams } from '@remix-run/react' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' +import { VscPreview, VscWand } from 'react-icons/vsc/index' +import { TbHeartHandshake } from 'react-icons/tb/index' import SponsorPack from '~/components/SponsorPack' import { QueryGGBanner } from '~/components/QueryGGBanner' import { getBranch, latestVersion, repo, gradientText } from '~/projects/query' @@ -29,7 +28,7 @@ const menu = [ { label: (
- TanStack + TanStack
), to: '/', @@ -37,7 +36,7 @@ const menu = [ { label: (
- Examples + Examples
), to: './docs/react/examples/react/basic', @@ -45,7 +44,7 @@ const menu = [ { label: (
- Docs + Docs
), to: './docs/', @@ -53,7 +52,7 @@ const menu = [ { label: (
- GitHub + GitHub
), to: `https://github.com/${repo}`, @@ -61,7 +60,7 @@ const menu = [ { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', @@ -69,7 +68,7 @@ const menu = [ { label: (
- Merch + Merch
), to: `https://cottonbureau.com/people/tanstack`, @@ -188,7 +187,7 @@ export default function RouteVersion() { md:flex-row" >
- +

Declarative & Automatic @@ -207,7 +206,7 @@ export default function RouteVersion() {

- +

@@ -227,7 +226,7 @@ export default function RouteVersion() {

- +

@@ -276,19 +275,19 @@ export default function RouteVersion() {
- + Save time by learning with a guided approach
- + Get hands-on experience building a real-world application
- + Never worry about data fetching again
@@ -344,7 +343,7 @@ export default function RouteVersion() { ].map((d, i) => { return ( - {d} + {d} ) })} @@ -408,7 +407,7 @@ export default function RouteVersion() { dark:bg-gray-800 dark:shadow-none" > - Query You? + Query You?
diff --git a/app/routes/query.$version.docs.$framework.tsx b/app/routes/query.$version.docs.$framework.tsx index 63a41142..f06d7d8f 100644 --- a/app/routes/query.$version.docs.$framework.tsx +++ b/app/routes/query.$version.docs.$framework.tsx @@ -1,5 +1,5 @@ import { useMemo } from 'react' -import { FaBrandsDiscord, FaBrandsGithub } from '~/components/icons' +import { FaDiscord, FaGithub } from 'react-icons/fa/index' import type { MetaFunction } from '@remix-run/node' import { Link, useMatches, useNavigate, useParams } from '@remix-run/react' import { seo } from '~/utils/seo' @@ -54,7 +54,7 @@ const localMenu: MenuItem = { { label: (
- GitHub + GitHub
), to: `https://github.com/${repo}`, @@ -62,7 +62,7 @@ const localMenu: MenuItem = { { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', diff --git a/app/routes/router.v1._index.tsx b/app/routes/router.v1._index.tsx index 388cd4b6..2f49f03c 100644 --- a/app/routes/router.v1._index.tsx +++ b/app/routes/router.v1._index.tsx @@ -1,32 +1,30 @@ import { useEffect, useState } from 'react' +import { CgCornerUpLeft, CgTimelapse } from 'react-icons/cg/index' import { - GgCornerUpLeft, - CodiconPreview, - FaBrandsDiscord, - FaBrandsGithub, - TablerZoomQuestion, - TablerHeartHandshake, - RiLightbulbFlashLine, - FaSolidCheckCircle, - FaSolidBook, - FaSolidTshirt, -} from '~/components/icons' + FaBook, + FaCheckCircle, + FaDiscord, + FaGithub, + FaTshirt, +} from 'react-icons/fa/index' +import { RiLightbulbFlashLine } from 'react-icons/ri/index' +import { TbHeartHandshake, TbZoomQuestion } from 'react-icons/tb/index' +import { VscPreview } from 'react-icons/vsc/index' import { Link, useLoaderData } from '@remix-run/react' import { json } from '@remix-run/node' -import { v1branch } from '~/projects/router' +import { gradientText, v1branch } from '~/projects/router' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' import SponsorPack from '~/components/SponsorPack' import { Logo } from '~/components/Logo' import { getSponsorsForSponsorPack } from '~/server/sponsors' import type { LoaderFunction } from '@remix-run/node' -import { CgTimelapse } from 'react-icons/cg/index' const menu = [ { label: (
- TanStack + TanStack
), to: '/', @@ -34,7 +32,7 @@ const menu = [ { label: (
- Examples + Examples
), to: './docs/examples', @@ -42,7 +40,7 @@ const menu = [ { label: (
- Docs + Docs
), to: './docs/overview', @@ -50,7 +48,7 @@ const menu = [ { label: (
- GitHub + GitHub
), to: 'https://github.com/tanstack/router', @@ -58,7 +56,7 @@ const menu = [ { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', @@ -66,7 +64,7 @@ const menu = [ { label: (
- Merch + Merch
), to: `https://cottonbureau.com/people/tanstack`, @@ -208,7 +206,7 @@ export default function TanStackRouterRoute() {
- +

@@ -259,7 +257,7 @@ export default function TanStackRouterRoute() { ].map((d, i) => { return ( - {d} + {d} ) })} @@ -390,7 +388,7 @@ export default function TanStackRouterRoute() { dark:bg-gray-800 dark:shadow-none" > - Router You? + Router You?
diff --git a/app/routes/router.v1.docs.tsx b/app/routes/router.v1.docs.tsx index d64cd1d8..96930e37 100644 --- a/app/routes/router.v1.docs.tsx +++ b/app/routes/router.v1.docs.tsx @@ -1,5 +1,5 @@ import { useMemo } from 'react' -import { FaBrandsDiscord, FaBrandsGithub } from '~/components/icons' +import { FaDiscord, FaGithub } from 'react-icons/fa/index' import { Link } from '@remix-run/react' import type { MetaFunction } from '@remix-run/node' import { useRouterV1Config, gradientText } from '~/projects/router' @@ -28,7 +28,7 @@ const localMenu = { { label: (
- GitHub + GitHub
), to: 'https://github.com/tanstack/router', @@ -36,7 +36,7 @@ const localMenu = { { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', diff --git a/app/routes/sponsor-login.tsx b/app/routes/sponsor-login.tsx index 61b9f12d..f01754ba 100644 --- a/app/routes/sponsor-login.tsx +++ b/app/routes/sponsor-login.tsx @@ -1,11 +1,6 @@ import { useEffect, useState } from 'react' import * as qss from 'qss' -import { - FaBrandsDiscord, - FaBrandsGithub, - FaSolidCheck, - FaSolidPlug, -} from '~/components/icons' +import { FaDiscord, FaGithub, FaCheck, FaPlug } from 'react-icons/fa/index' import useSessionStorage from '~/hooks/useSessionStorage' import axios from 'axios' @@ -134,11 +129,11 @@ export default function SponsorsLogin() { > {githubCode ? ( <> - GitHub + GitHub ) : ( <> - + Log In to GitHub )} @@ -153,11 +148,11 @@ export default function SponsorsLogin() { > {discordCode ? ( <> - Discord + Discord ) : ( <> - Log In to Discord + Log In to Discord )} @@ -172,7 +167,7 @@ export default function SponsorsLogin() { onClick={() => linkAccounts()} disabled={loadingMessage} > - Link Accounts + Link Accounts
) : null} diff --git a/app/routes/store.$version._index.tsx b/app/routes/store.$version._index.tsx index 0757a047..b99b5d84 100644 --- a/app/routes/store.$version._index.tsx +++ b/app/routes/store.$version._index.tsx @@ -1,13 +1,4 @@ -import { useEffect, useState } from 'react' -import { - GgCornerUpLeft, - CodiconPreview, - FaBrandsGithub, - FaBrandsDiscord, - TablerHeartHandshake, - FaSolidBook, - FaSolidTshirt, -} from '~/components/icons' +import { FaBook, FaDiscord, FaGithub, FaTshirt } from 'react-icons/fa/index' import { json } from '@remix-run/node' import { Link, useLoaderData, useParams } from '@remix-run/react' import { Carbon } from '~/components/Carbon' @@ -16,12 +7,15 @@ import SponsorPack from '~/components/SponsorPack' import { gradientText, latestVersion, repo } from '~/projects/store' import { Logo } from '~/components/Logo' import { getSponsorsForSponsorPack } from '~/server/sponsors' +import { TbHeartHandshake } from 'react-icons/tb' +import { VscPreview } from 'react-icons/vsc/index' +import { CgCornerUpLeft } from 'react-icons/cg/index' const menu = [ { label: (
- TanStack + TanStack
), to: '/', @@ -29,7 +23,7 @@ const menu = [ { label: (
- Examples + Examples
), to: './docs/framework/react/examples/simple', @@ -37,7 +31,7 @@ const menu = [ { label: (
- Docs + Docs
), to: './docs/', @@ -45,7 +39,7 @@ const menu = [ { label: (
- GitHub + GitHub
), to: `https://github.com/${repo}`, @@ -53,7 +47,7 @@ const menu = [ { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', @@ -61,7 +55,7 @@ const menu = [ { label: (
- Merch + Merch
), to: `https://cottonbureau.com/people/tanstack`, @@ -269,7 +263,7 @@ export default function RouteVersion() { dark:bg-gray-800 dark:shadow-none" > - Store You? + Store You?
diff --git a/app/routes/table.v8._index.tsx b/app/routes/table.v8._index.tsx index 80c9049a..e0c3b565 100644 --- a/app/routes/table.v8._index.tsx +++ b/app/routes/table.v8._index.tsx @@ -1,32 +1,31 @@ import { useEffect, useState } from 'react' +import { CgCornerUpLeft } from 'react-icons/cg/index' import { - GgCornerUpLeft, - CodiconPreview, - IonBody, - FaBrandsGithub, - FaBrandsDiscord, - FaSolidCheckCircle, - FaSolidBook, - FaSolidTshirt, - FaSolidBolt, - FaSolidCogs, -} from '~/components/icons' + FaBook, + FaBolt, + FaCogs, + FaCheckCircle, + FaDiscord, + FaGithub, + FaTshirt, +} from 'react-icons/fa/index' import { Link, useLoaderData } from '@remix-run/react' import { json } from '@remix-run/node' -import { v8branch } from '~/projects/table' +import { v8branch, gradientText } from '~/projects/table' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' import SponsorPack from '~/components/SponsorPack' import { Logo } from '~/components/Logo' import { getSponsorsForSponsorPack } from '~/server/sponsors' import agGridImage from '~/images/ag-grid.png' -import { gradientText } from '~/projects/table' +import { VscPreview } from 'react-icons/vsc/index' +import { IoIosBody } from 'react-icons/io/index' const menu = [ { label: (
- TanStack + TanStack
), to: '/', @@ -34,7 +33,7 @@ const menu = [ { label: (
- Examples + Examples
), to: './docs/examples', @@ -42,7 +41,7 @@ const menu = [ { label: (
- Docs + Docs
), to: './docs/guide/introduction', @@ -50,7 +49,7 @@ const menu = [ { label: (
- GitHub + GitHub
), to: 'https://github.com/tanstack/table', @@ -58,7 +57,7 @@ const menu = [ { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', @@ -66,7 +65,7 @@ const menu = [ { label: (
- Merch + Merch
), to: `https://cottonbureau.com/people/tanstack`, @@ -170,7 +169,7 @@ export default function ReactTableRoute() { >
- +

@@ -189,7 +188,7 @@ export default function ReactTableRoute() {

- +

@@ -209,7 +208,7 @@ export default function ReactTableRoute() {

- +

@@ -266,7 +265,7 @@ export default function ReactTableRoute() { ].map((d, i) => { return ( - {d} + {d} ) })} diff --git a/app/routes/table.v8.docs.tsx b/app/routes/table.v8.docs.tsx index 80c0f9b2..c9d11e87 100644 --- a/app/routes/table.v8.docs.tsx +++ b/app/routes/table.v8.docs.tsx @@ -1,5 +1,5 @@ import { useMemo } from 'react' -import { FaBrandsDiscord, FaBrandsGithub } from '~/components/icons' +import { FaDiscord, FaGithub } from 'react-icons/fa/index' import { Link } from '@remix-run/react' import { useReactTableV8Config, gradientText } from '~/projects/table' import { seo } from '~/utils/seo' @@ -30,7 +30,7 @@ const localMenu = { { label: (
- GitHub + GitHub
), to: 'https://github.com/tanstack/table', @@ -38,7 +38,7 @@ const localMenu = { { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', diff --git a/app/routes/virtual.v3._index.tsx b/app/routes/virtual.v3._index.tsx index d8ccf9b0..2824101e 100644 --- a/app/routes/virtual.v3._index.tsx +++ b/app/routes/virtual.v3._index.tsx @@ -1,17 +1,14 @@ import { useEffect, useState } from 'react' +import { CgCornerUpLeft } from 'react-icons/cg/index' import { - GgCornerUpLeft, - CodiconPreview, - IonBody, - FaBrandsDiscord, - FaBrandsGithub, - TablerHeartHandshake, - FaSolidCheckCircle, - FaSolidBook, - FaSolidTshirt, - FaSolidBolt, - FaSolidCogs, -} from '~/components/icons' + FaBook, + FaBolt, + FaCogs, + FaCheckCircle, + FaDiscord, + FaGithub, + FaTshirt, +} from 'react-icons/fa/index' import { Link, useLoaderData } from '@remix-run/react' import { json } from '@remix-run/node' import { gradientText, v3branch } from '~/projects/virtual' @@ -20,12 +17,15 @@ import { Footer } from '~/components/Footer' import SponsorPack from '~/components/SponsorPack' import { Logo } from '~/components/Logo' import { getSponsorsForSponsorPack } from '~/server/sponsors' +import { VscPreview } from 'react-icons/vsc/index' +import { IoIosBody } from 'react-icons/io/index' +import { TbHeartHandshake } from 'react-icons/tb/index' const menu = [ { label: (
- TanStack + TanStack
), to: '/', @@ -33,7 +33,7 @@ const menu = [ { label: (
- Examples + Examples
), to: './docs/examples', @@ -41,7 +41,7 @@ const menu = [ { label: (
- Docs + Docs
), to: './docs/guide/introduction', @@ -49,7 +49,7 @@ const menu = [ { label: (
- GitHub + GitHub
), to: 'https://github.com/tanstack/virtual', @@ -57,7 +57,7 @@ const menu = [ { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', @@ -65,7 +65,7 @@ const menu = [ { label: (
- Merch + Merch
), to: `https://cottonbureau.com/people/tanstack`, @@ -169,7 +169,7 @@ export default function ReactTableRoute() { >
- +

@@ -187,7 +187,7 @@ export default function ReactTableRoute() {

- +

@@ -207,7 +207,7 @@ export default function ReactTableRoute() {

- +

@@ -254,7 +254,7 @@ export default function ReactTableRoute() { ].map((d, i) => { return ( - {d} + {d} ) })} @@ -315,7 +315,7 @@ export default function ReactTableRoute() { dark:bg-gray-800 dark:shadow-none" > - Virtual You? + Virtual You?
diff --git a/app/routes/virtual.v3.docs.tsx b/app/routes/virtual.v3.docs.tsx index 17931089..79dd1533 100644 --- a/app/routes/virtual.v3.docs.tsx +++ b/app/routes/virtual.v3.docs.tsx @@ -1,5 +1,5 @@ import { useMemo } from 'react' -import { FaBrandsDiscord, FaBrandsGithub } from '~/components/icons' +import { FaDiscord, FaGithub } from 'react-icons/fa/index' import { Link } from '@remix-run/react' import { useVirtualV3Config, gradientText } from '~/projects/virtual' import { seo } from '~/utils/seo' @@ -29,7 +29,7 @@ const localMenu = { { label: (
- GitHub + GitHub
), to: 'https://github.com/tanstack/virtual', @@ -37,7 +37,7 @@ const localMenu = { { label: (
- Discord + Discord
), to: 'https://tlinz.com/discord', From b484014762921c72c4ddedb4f0145d9ceddcdf34 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Tue, 9 Jan 2024 21:50:16 +1100 Subject: [PATCH 29/39] Start removing shiki --- app/styles/app.css | 8 +- app/styles/app.generated.css | 4165 -------------------------------- app/styles/prismThemeDark.css | 446 ++++ app/styles/prismThemeLight.css | 434 ++++ app/utils/documents.server.ts | 21 +- package.json | 6 +- pnpm-lock.yaml | 367 +-- postcss.config.cjs | 6 +- 8 files changed, 940 insertions(+), 4513 deletions(-) delete mode 100644 app/styles/app.generated.css create mode 100644 app/styles/prismThemeDark.css create mode 100644 app/styles/prismThemeLight.css diff --git a/app/styles/app.css b/app/styles/app.css index 2d631fdf..8185c6d2 100644 --- a/app/styles/app.css +++ b/app/styles/app.css @@ -442,13 +442,9 @@ pre .logger.log-log svg { } @media (prefers-color-scheme: light) { - .shiki.github-dark { - display: none; - } + @import './prismThemeLight.css'; } @media (prefers-color-scheme: dark) { - .shiki.github-light { - display: none; - } + @import './prismThemeDark.css'; } diff --git a/app/styles/app.generated.css b/app/styles/app.generated.css deleted file mode 100644 index 061768c1..00000000 --- a/app/styles/app.generated.css +++ /dev/null @@ -1,4165 +0,0 @@ -/* -! tailwindcss v3.1.6 | MIT License | https://tailwindcss.com -*/ - -/* -1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) -2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) -*/ - -*, -::before, -::after { - box-sizing: border-box; - /* 1 */ - border-width: 0; - /* 2 */ - border-style: solid; - /* 2 */ - border-color: #e5e7eb; - /* 2 */ -} - -::before, -::after { - --tw-content: ''; -} - -/* -1. Use a consistent sensible line-height in all browsers. -2. Prevent adjustments of font size after orientation changes in iOS. -3. Use a more readable tab size. -4. Use the user's configured `sans` font-family by default. -*/ - -html { - line-height: 1.5; - /* 1 */ - -webkit-text-size-adjust: 100%; - /* 2 */ - -moz-tab-size: 4; - /* 3 */ - -o-tab-size: 4; - tab-size: 4; - /* 3 */ - font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, - 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, - 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; - /* 4 */ -} - -/* -1. Remove the margin in all browsers. -2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. -*/ - -body { - margin: 0; - /* 1 */ - line-height: inherit; - /* 2 */ -} - -/* -1. Add the correct height in Firefox. -2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) -3. Ensure horizontal rules are visible by default. -*/ - -hr { - height: 0; - /* 1 */ - color: inherit; - /* 2 */ - border-top-width: 1px; - /* 3 */ -} - -/* -Add the correct text decoration in Chrome, Edge, and Safari. -*/ - -abbr:where([title]) { - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; -} - -/* -Remove the default font size and weight for headings. -*/ - -h1, -h2, -h3, -h4, -h5, -h6 { - font-size: inherit; - font-weight: inherit; -} - -/* -Reset links to optimize for opt-in styling instead of opt-out. -*/ - -a { - color: inherit; - text-decoration: inherit; -} - -/* -Add the correct font weight in Edge and Safari. -*/ - -b, -strong { - font-weight: bolder; -} - -/* -1. Use the user's configured `mono` font family by default. -2. Correct the odd `em` font sizing in all browsers. -*/ - -code, -kbd, -samp, -pre { - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, - 'Liberation Mono', 'Courier New', monospace; - /* 1 */ - font-size: 1em; - /* 2 */ -} - -/* -Add the correct font size in all browsers. -*/ - -small { - font-size: 80%; -} - -/* -Prevent `sub` and `sup` elements from affecting the line height in all browsers. -*/ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.5em; -} - -/* -1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) -2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) -3. Remove gaps between table borders by default. -*/ - -table { - text-indent: 0; - /* 1 */ - border-color: inherit; - /* 2 */ - border-collapse: collapse; - /* 3 */ -} - -/* -1. Change the font styles in all browsers. -2. Remove the margin in Firefox and Safari. -3. Remove default padding in all browsers. -*/ - -button, -input, -optgroup, -select, -textarea { - font-family: inherit; - /* 1 */ - font-size: 100%; - /* 1 */ - font-weight: inherit; - /* 1 */ - line-height: inherit; - /* 1 */ - color: inherit; - /* 1 */ - margin: 0; - /* 2 */ - padding: 0; - /* 3 */ -} - -/* -Remove the inheritance of text transform in Edge and Firefox. -*/ - -button, -select { - text-transform: none; -} - -/* -1. Correct the inability to style clickable types in iOS and Safari. -2. Remove default button styles. -*/ - -button, -[type='button'], -[type='reset'], -[type='submit'] { - -webkit-appearance: button; - /* 1 */ - background-color: transparent; - /* 2 */ - background-image: none; - /* 2 */ -} - -/* -Use the modern Firefox focus style for all focusable elements. -*/ - -:-moz-focusring { - outline: auto; -} - -/* -Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) -*/ - -:-moz-ui-invalid { - box-shadow: none; -} - -/* -Add the correct vertical alignment in Chrome and Firefox. -*/ - -progress { - vertical-align: baseline; -} - -/* -Correct the cursor style of increment and decrement buttons in Safari. -*/ - -::-webkit-inner-spin-button, -::-webkit-outer-spin-button { - height: auto; -} - -/* -1. Correct the odd appearance in Chrome and Safari. -2. Correct the outline style in Safari. -*/ - -[type='search'] { - -webkit-appearance: textfield; - /* 1 */ - outline-offset: -2px; - /* 2 */ -} - -/* -Remove the inner padding in Chrome and Safari on macOS. -*/ - -::-webkit-search-decoration { - -webkit-appearance: none; -} - -/* -1. Correct the inability to style clickable types in iOS and Safari. -2. Change font properties to `inherit` in Safari. -*/ - -::-webkit-file-upload-button { - -webkit-appearance: button; - /* 1 */ - font: inherit; - /* 2 */ -} - -/* -Add the correct display in Chrome and Safari. -*/ - -summary { - display: list-item; -} - -/* -Removes the default spacing and border for appropriate elements. -*/ - -blockquote, -dl, -dd, -h1, -h2, -h3, -h4, -h5, -h6, -hr, -figure, -p, -pre { - margin: 0; -} - -fieldset { - margin: 0; - padding: 0; -} - -legend { - padding: 0; -} - -ol, -ul, -menu { - list-style: none; - margin: 0; - padding: 0; -} - -/* -Prevent resizing textareas horizontally by default. -*/ - -textarea { - resize: vertical; -} - -/* -1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) -2. Set the default placeholder color to the user's configured gray 400 color. -*/ - -input::-moz-placeholder, -textarea::-moz-placeholder { - opacity: 1; - /* 1 */ - color: #9ca3af; - /* 2 */ -} - -input:-ms-input-placeholder, -textarea:-ms-input-placeholder { - opacity: 1; - /* 1 */ - color: #9ca3af; - /* 2 */ -} - -input::placeholder, -textarea::placeholder { - opacity: 1; - /* 1 */ - color: #9ca3af; - /* 2 */ -} - -/* -Set the default cursor for buttons. -*/ - -button, -[role='button'] { - cursor: pointer; -} - -/* -Make sure disabled buttons don't get the pointer cursor. -*/ - -:disabled { - cursor: default; -} - -/* -1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) -2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) - This can trigger a poorly considered lint error in some tools but is included by design. -*/ - -img, -svg, -video, -canvas, -audio, -iframe, -embed, -object { - display: block; - /* 1 */ - vertical-align: middle; - /* 2 */ -} - -/* -Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) -*/ - -img, -video { - max-width: 100%; - height: auto; -} - -html, -body { - --tw-bg-opacity: 1; - background-color: rgb(249 250 251 / var(--tw-bg-opacity)); - --tw-text-opacity: 1; - color: rgb(17 24 39 / var(--tw-text-opacity)); -} - -@media (prefers-color-scheme: dark) { - html, - body { - --tw-bg-opacity: 1; - background-color: rgb(17 24 39 / var(--tw-bg-opacity)); - --tw-text-opacity: 1; - color: rgb(229 231 235 / var(--tw-text-opacity)); - } - - * { - color-scheme: dark; - } -} - -/* * { - scrollbar-color: theme(colors.gray.500) theme(colors.gray.100); - } - - *::-webkit-scrollbar, - * scrollbar { - width: 1rem; - height: 1rem; - } - - *::-webkit-scrollbar-track, - * scrollbar-track { - background: theme(colors.gray.100); - } - - *::-webkit-scrollbar-thumb, - * scrollbar-thumb { - background: theme(colors.gray.300); - border-radius: 0.5rem; - border: 3px solid theme(colors.gray.100); - } - - @media (prefers-color-scheme: dark) { - * { - scrollbar-color: theme(colors.gray.500) theme(colors.gray.800); - } - - *::-webkit-scrollbar, - * scrollbar { - width: 1rem; - height: 1rem; - } - - *::-webkit-scrollbar-track, - * scrollbar-track { - background: theme(colors.gray.800); - } - - *::-webkit-scrollbar-thumb, - * scrollbar-thumb { - background: theme(colors.gray.600); - border-radius: 0.5rem; - border: 3px solid theme(colors.gray.800); - } - } */ - -[disabled] { - pointer-events: none; - opacity: 0.5; -} - -#docs-details summary::-webkit-details-marker { - display: none; -} - -#docs-details .icon-close { - display: none; -} - -#docs-details[open] .icon-close { - display: block; -} - -#docs-details[open] .icon-open { - display: none; -} - -#docs-details[open] > summary + * { - height: 80vh; -} - -.anchor-heading { - text-decoration: none !important; -} - -.anchor-heading > *:after { - content: '#'; - position: relative; - margin-left: 0.5rem; - opacity: 0; - transition-property: color, background-color, border-color, fill, stroke, - opacity, box-shadow, transform, filter, -webkit-text-decoration-color, - -webkit-backdrop-filter; - transition-property: color, background-color, border-color, - text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, - backdrop-filter; - transition-property: color, background-color, border-color, - text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, - backdrop-filter, -webkit-text-decoration-color, -webkit-backdrop-filter; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 100ms; -} - -.anchor-heading:hover > *:after { - opacity: 0.5; -} - -*, -::before, -::after { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; -} - -::-webkit-backdrop { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; -} - -::backdrop { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; -} - -.container { - width: 100%; -} - -@media (min-width: 640px) { - .container { - max-width: 640px; - } -} - -@media (min-width: 768px) { - .container { - max-width: 768px; - } -} - -@media (min-width: 1024px) { - .container { - max-width: 1024px; - } -} - -@media (min-width: 1280px) { - .container { - max-width: 1280px; - } -} - -@media (min-width: 1536px) { - .container { - max-width: 1536px; - } -} - -.prose { - color: var(--tw-prose-body); - max-width: 65ch; -} - -.prose :where([class~='lead']):not(:where([class~='not-prose'] *)) { - color: var(--tw-prose-lead); - font-size: 1.25em; - line-height: 1.6; - margin-top: 1.2em; - margin-bottom: 1.2em; -} - -.prose :where(a):not(:where([class~='not-prose'] *)) { - color: var(--tw-prose-links); - text-decoration: underline; - font-weight: 500; -} - -.prose :where(strong):not(:where([class~='not-prose'] *)) { - color: var(--tw-prose-bold); - font-weight: 600; -} - -.prose :where(a strong):not(:where([class~='not-prose'] *)) { - color: inherit; -} - -.prose :where(blockquote strong):not(:where([class~='not-prose'] *)) { - color: inherit; -} - -.prose :where(thead th strong):not(:where([class~='not-prose'] *)) { - color: inherit; -} - -.prose :where(ol):not(:where([class~='not-prose'] *)) { - list-style-type: decimal; - margin-top: 1.25em; - margin-bottom: 1.25em; - padding-left: 1.625em; -} - -.prose :where(ol[type='A']):not(:where([class~='not-prose'] *)) { - list-style-type: upper-alpha; -} - -.prose :where(ol[type='a']):not(:where([class~='not-prose'] *)) { - list-style-type: lower-alpha; -} - -.prose :where(ol[type='A' s]):not(:where([class~='not-prose'] *)) { - list-style-type: upper-alpha; -} - -.prose :where(ol[type='a' s]):not(:where([class~='not-prose'] *)) { - list-style-type: lower-alpha; -} - -.prose :where(ol[type='I']):not(:where([class~='not-prose'] *)) { - list-style-type: upper-roman; -} - -.prose :where(ol[type='i']):not(:where([class~='not-prose'] *)) { - list-style-type: lower-roman; -} - -.prose :where(ol[type='I' s]):not(:where([class~='not-prose'] *)) { - list-style-type: upper-roman; -} - -.prose :where(ol[type='i' s]):not(:where([class~='not-prose'] *)) { - list-style-type: lower-roman; -} - -.prose :where(ol[type='1']):not(:where([class~='not-prose'] *)) { - list-style-type: decimal; -} - -.prose :where(ul):not(:where([class~='not-prose'] *)) { - list-style-type: disc; - margin-top: 1.25em; - margin-bottom: 1.25em; - padding-left: 1.625em; -} - -.prose :where(ol > li):not(:where([class~='not-prose'] *))::marker { - font-weight: 400; - color: var(--tw-prose-counters); -} - -.prose :where(ul > li):not(:where([class~='not-prose'] *))::marker { - color: var(--tw-prose-bullets); -} - -.prose :where(hr):not(:where([class~='not-prose'] *)) { - border-color: var(--tw-prose-hr); - border-top-width: 1px; - margin-top: 3em; - margin-bottom: 3em; -} - -.prose :where(blockquote):not(:where([class~='not-prose'] *)) { - font-weight: 500; - font-style: italic; - color: var(--tw-prose-quotes); - border-left-width: 0.25rem; - border-left-color: var(--tw-prose-quote-borders); - quotes: '\201C''\201D''\2018''\2019'; - margin-top: 1.6em; - margin-bottom: 1.6em; - padding-left: 1em; -} - -.prose - :where(blockquote p:first-of-type):not( - :where([class~='not-prose'] *) - )::before { - content: open-quote; -} - -.prose - :where(blockquote p:last-of-type):not(:where([class~='not-prose'] *))::after { - content: close-quote; -} - -.prose :where(h1):not(:where([class~='not-prose'] *)) { - color: var(--tw-prose-headings); - font-weight: 800; - font-size: 2.25em; - margin-top: 0; - margin-bottom: 0.8888889em; - line-height: 1.1111111; -} - -.prose :where(h1 strong):not(:where([class~='not-prose'] *)) { - font-weight: 900; - color: inherit; -} - -.prose :where(h2):not(:where([class~='not-prose'] *)) { - color: var(--tw-prose-headings); - font-weight: 700; - font-size: 1.5em; - margin-top: 2em; - margin-bottom: 1em; - line-height: 1.3333333; -} - -.prose :where(h2 strong):not(:where([class~='not-prose'] *)) { - font-weight: 800; - color: inherit; -} - -.prose :where(h3):not(:where([class~='not-prose'] *)) { - color: var(--tw-prose-headings); - font-weight: 600; - font-size: 1.25em; - margin-top: 1.6em; - margin-bottom: 0.6em; - line-height: 1.6; -} - -.prose :where(h3 strong):not(:where([class~='not-prose'] *)) { - font-weight: 700; - color: inherit; -} - -.prose :where(h4):not(:where([class~='not-prose'] *)) { - color: var(--tw-prose-headings); - font-weight: 600; - margin-top: 1.5em; - margin-bottom: 0.5em; - line-height: 1.5; -} - -.prose :where(h4 strong):not(:where([class~='not-prose'] *)) { - font-weight: 700; - color: inherit; -} - -.prose :where(img):not(:where([class~='not-prose'] *)) { - margin-top: 2em; - margin-bottom: 2em; -} - -.prose :where(figure > *):not(:where([class~='not-prose'] *)) { - margin-top: 0; - margin-bottom: 0; -} - -.prose :where(figcaption):not(:where([class~='not-prose'] *)) { - color: var(--tw-prose-captions); - font-size: 0.875em; - line-height: 1.4285714; - margin-top: 0.8571429em; -} - -.prose :where(code):not(:where([class~='not-prose'] *)) { - color: var(--tw-prose-code); - font-weight: 600; - font-size: 0.875em; -} - -.prose :where(code):not(:where([class~='not-prose'] *))::before { - content: '`'; -} - -.prose :where(code):not(:where([class~='not-prose'] *))::after { - content: '`'; -} - -.prose :where(a code):not(:where([class~='not-prose'] *)) { - color: inherit; -} - -.prose :where(h1 code):not(:where([class~='not-prose'] *)) { - color: inherit; -} - -.prose :where(h2 code):not(:where([class~='not-prose'] *)) { - color: inherit; - font-size: 0.875em; -} - -.prose :where(h3 code):not(:where([class~='not-prose'] *)) { - color: inherit; - font-size: 0.9em; -} - -.prose :where(h4 code):not(:where([class~='not-prose'] *)) { - color: inherit; -} - -.prose :where(blockquote code):not(:where([class~='not-prose'] *)) { - color: inherit; -} - -.prose :where(thead th code):not(:where([class~='not-prose'] *)) { - color: inherit; -} - -.prose :where(pre):not(:where([class~='not-prose'] *)) { - color: var(--tw-prose-pre-code); - background-color: var(--tw-prose-pre-bg); - overflow-x: auto; - font-weight: 400; - font-size: 0.875em; - line-height: 1.7142857; - margin-top: 1.7142857em; - margin-bottom: 1.7142857em; - border-radius: 0.375rem; - padding-top: 0.8571429em; - padding-right: 1.1428571em; - padding-bottom: 0.8571429em; - padding-left: 1.1428571em; -} - -.prose :where(pre code):not(:where([class~='not-prose'] *)) { - background-color: transparent; - border-width: 0; - border-radius: 0; - padding: 0; - font-weight: inherit; - color: inherit; - font-size: inherit; - font-family: inherit; - line-height: inherit; -} - -.prose :where(pre code):not(:where([class~='not-prose'] *))::before { - content: none; -} - -.prose :where(pre code):not(:where([class~='not-prose'] *))::after { - content: none; -} - -.prose :where(table):not(:where([class~='not-prose'] *)) { - width: 100%; - table-layout: auto; - text-align: left; - margin-top: 2em; - margin-bottom: 2em; - font-size: 0.875em; - line-height: 1.7142857; -} - -.prose :where(thead):not(:where([class~='not-prose'] *)) { - border-bottom-width: 1px; - border-bottom-color: var(--tw-prose-th-borders); -} - -.prose :where(thead th):not(:where([class~='not-prose'] *)) { - color: var(--tw-prose-headings); - font-weight: 600; - vertical-align: bottom; - padding-right: 0.5714286em; - padding-bottom: 0.5714286em; - padding-left: 0.5714286em; -} - -.prose :where(tbody tr):not(:where([class~='not-prose'] *)) { - border-bottom-width: 1px; - border-bottom-color: var(--tw-prose-td-borders); -} - -.prose :where(tbody tr:last-child):not(:where([class~='not-prose'] *)) { - border-bottom-width: 0; -} - -.prose :where(tbody td):not(:where([class~='not-prose'] *)) { - vertical-align: baseline; -} - -.prose :where(tfoot):not(:where([class~='not-prose'] *)) { - border-top-width: 1px; - border-top-color: var(--tw-prose-th-borders); -} - -.prose :where(tfoot td):not(:where([class~='not-prose'] *)) { - vertical-align: top; -} - -.prose { - --tw-prose-body: #374151; - --tw-prose-headings: #111827; - --tw-prose-lead: #4b5563; - --tw-prose-links: #111827; - --tw-prose-bold: #111827; - --tw-prose-counters: #6b7280; - --tw-prose-bullets: #d1d5db; - --tw-prose-hr: #e5e7eb; - --tw-prose-quotes: #111827; - --tw-prose-quote-borders: #e5e7eb; - --tw-prose-captions: #6b7280; - --tw-prose-code: #111827; - --tw-prose-pre-code: #e5e7eb; - --tw-prose-pre-bg: #1f2937; - --tw-prose-th-borders: #d1d5db; - --tw-prose-td-borders: #e5e7eb; - --tw-prose-invert-body: #d1d5db; - --tw-prose-invert-headings: #fff; - --tw-prose-invert-lead: #9ca3af; - --tw-prose-invert-links: #fff; - --tw-prose-invert-bold: #fff; - --tw-prose-invert-counters: #9ca3af; - --tw-prose-invert-bullets: #4b5563; - --tw-prose-invert-hr: #374151; - --tw-prose-invert-quotes: #f3f4f6; - --tw-prose-invert-quote-borders: #374151; - --tw-prose-invert-captions: #9ca3af; - --tw-prose-invert-code: #fff; - --tw-prose-invert-pre-code: #d1d5db; - --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%); - --tw-prose-invert-th-borders: #4b5563; - --tw-prose-invert-td-borders: #374151; - font-size: 1rem; - line-height: 1.75; -} - -.prose :where(p):not(:where([class~='not-prose'] *)) { - margin-top: 1.25em; - margin-bottom: 1.25em; -} - -.prose :where(video):not(:where([class~='not-prose'] *)) { - margin-top: 2em; - margin-bottom: 2em; -} - -.prose :where(figure):not(:where([class~='not-prose'] *)) { - margin-top: 2em; - margin-bottom: 2em; -} - -.prose :where(li):not(:where([class~='not-prose'] *)) { - margin-top: 0.5em; - margin-bottom: 0.5em; -} - -.prose :where(ol > li):not(:where([class~='not-prose'] *)) { - padding-left: 0.375em; -} - -.prose :where(ul > li):not(:where([class~='not-prose'] *)) { - padding-left: 0.375em; -} - -.prose :where(.prose > ul > li p):not(:where([class~='not-prose'] *)) { - margin-top: 0.75em; - margin-bottom: 0.75em; -} - -.prose - :where(.prose > ul > li > *:first-child):not(:where([class~='not-prose'] *)) { - margin-top: 1.25em; -} - -.prose - :where(.prose > ul > li > *:last-child):not(:where([class~='not-prose'] *)) { - margin-bottom: 1.25em; -} - -.prose - :where(.prose > ol > li > *:first-child):not(:where([class~='not-prose'] *)) { - margin-top: 1.25em; -} - -.prose - :where(.prose > ol > li > *:last-child):not(:where([class~='not-prose'] *)) { - margin-bottom: 1.25em; -} - -.prose :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~='not-prose'] *)) { - margin-top: 0.75em; - margin-bottom: 0.75em; -} - -.prose :where(hr + *):not(:where([class~='not-prose'] *)) { - margin-top: 0; -} - -.prose :where(h2 + *):not(:where([class~='not-prose'] *)) { - margin-top: 0; -} - -.prose :where(h3 + *):not(:where([class~='not-prose'] *)) { - margin-top: 0; -} - -.prose :where(h4 + *):not(:where([class~='not-prose'] *)) { - margin-top: 0; -} - -.prose :where(thead th:first-child):not(:where([class~='not-prose'] *)) { - padding-left: 0; -} - -.prose :where(thead th:last-child):not(:where([class~='not-prose'] *)) { - padding-right: 0; -} - -.prose :where(tbody td, tfoot td):not(:where([class~='not-prose'] *)) { - padding-top: 0.5714286em; - padding-right: 0.5714286em; - padding-bottom: 0.5714286em; - padding-left: 0.5714286em; -} - -.prose - :where(tbody td:first-child, tfoot td:first-child):not( - :where([class~='not-prose'] *) - ) { - padding-left: 0; -} - -.prose - :where(tbody td:last-child, tfoot td:last-child):not( - :where([class~='not-prose'] *) - ) { - padding-right: 0; -} - -.prose :where(.prose > :first-child):not(:where([class~='not-prose'] *)) { - margin-top: 0; -} - -.prose :where(.prose > :last-child):not(:where([class~='not-prose'] *)) { - margin-bottom: 0; -} - -.prose-sm { - font-size: 0.875rem; - line-height: 1.7142857; -} - -.prose-sm :where(p):not(:where([class~='not-prose'] *)) { - margin-top: 1.1428571em; - margin-bottom: 1.1428571em; -} - -.prose-sm :where([class~='lead']):not(:where([class~='not-prose'] *)) { - font-size: 1.2857143em; - line-height: 1.5555556; - margin-top: 0.8888889em; - margin-bottom: 0.8888889em; -} - -.prose-sm :where(blockquote):not(:where([class~='not-prose'] *)) { - margin-top: 1.3333333em; - margin-bottom: 1.3333333em; - padding-left: 1.1111111em; -} - -.prose-sm :where(h1):not(:where([class~='not-prose'] *)) { - font-size: 2.1428571em; - margin-top: 0; - margin-bottom: 0.8em; - line-height: 1.2; -} - -.prose-sm :where(h2):not(:where([class~='not-prose'] *)) { - font-size: 1.4285714em; - margin-top: 1.6em; - margin-bottom: 0.8em; - line-height: 1.4; -} - -.prose-sm :where(h3):not(:where([class~='not-prose'] *)) { - font-size: 1.2857143em; - margin-top: 1.5555556em; - margin-bottom: 0.4444444em; - line-height: 1.5555556; -} - -.prose-sm :where(h4):not(:where([class~='not-prose'] *)) { - margin-top: 1.4285714em; - margin-bottom: 0.5714286em; - line-height: 1.4285714; -} - -.prose-sm :where(img):not(:where([class~='not-prose'] *)) { - margin-top: 1.7142857em; - margin-bottom: 1.7142857em; -} - -.prose-sm :where(video):not(:where([class~='not-prose'] *)) { - margin-top: 1.7142857em; - margin-bottom: 1.7142857em; -} - -.prose-sm :where(figure):not(:where([class~='not-prose'] *)) { - margin-top: 1.7142857em; - margin-bottom: 1.7142857em; -} - -.prose-sm :where(figure > *):not(:where([class~='not-prose'] *)) { - margin-top: 0; - margin-bottom: 0; -} - -.prose-sm :where(figcaption):not(:where([class~='not-prose'] *)) { - font-size: 0.8571429em; - line-height: 1.3333333; - margin-top: 0.6666667em; -} - -.prose-sm :where(code):not(:where([class~='not-prose'] *)) { - font-size: 0.8571429em; -} - -.prose-sm :where(h2 code):not(:where([class~='not-prose'] *)) { - font-size: 0.9em; -} - -.prose-sm :where(h3 code):not(:where([class~='not-prose'] *)) { - font-size: 0.8888889em; -} - -.prose-sm :where(pre):not(:where([class~='not-prose'] *)) { - font-size: 0.8571429em; - line-height: 1.6666667; - margin-top: 1.6666667em; - margin-bottom: 1.6666667em; - border-radius: 0.25rem; - padding-top: 0.6666667em; - padding-right: 1em; - padding-bottom: 0.6666667em; - padding-left: 1em; -} - -.prose-sm :where(ol):not(:where([class~='not-prose'] *)) { - margin-top: 1.1428571em; - margin-bottom: 1.1428571em; - padding-left: 1.5714286em; -} - -.prose-sm :where(ul):not(:where([class~='not-prose'] *)) { - margin-top: 1.1428571em; - margin-bottom: 1.1428571em; - padding-left: 1.5714286em; -} - -.prose-sm :where(li):not(:where([class~='not-prose'] *)) { - margin-top: 0.2857143em; - margin-bottom: 0.2857143em; -} - -.prose-sm :where(ol > li):not(:where([class~='not-prose'] *)) { - padding-left: 0.4285714em; -} - -.prose-sm :where(ul > li):not(:where([class~='not-prose'] *)) { - padding-left: 0.4285714em; -} - -.prose-sm :where(.prose > ul > li p):not(:where([class~='not-prose'] *)) { - margin-top: 0.5714286em; - margin-bottom: 0.5714286em; -} - -.prose-sm - :where(.prose > ul > li > *:first-child):not(:where([class~='not-prose'] *)) { - margin-top: 1.1428571em; -} - -.prose-sm - :where(.prose > ul > li > *:last-child):not(:where([class~='not-prose'] *)) { - margin-bottom: 1.1428571em; -} - -.prose-sm - :where(.prose > ol > li > *:first-child):not(:where([class~='not-prose'] *)) { - margin-top: 1.1428571em; -} - -.prose-sm - :where(.prose > ol > li > *:last-child):not(:where([class~='not-prose'] *)) { - margin-bottom: 1.1428571em; -} - -.prose-sm - :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~='not-prose'] *)) { - margin-top: 0.5714286em; - margin-bottom: 0.5714286em; -} - -.prose-sm :where(hr):not(:where([class~='not-prose'] *)) { - margin-top: 2.8571429em; - margin-bottom: 2.8571429em; -} - -.prose-sm :where(hr + *):not(:where([class~='not-prose'] *)) { - margin-top: 0; -} - -.prose-sm :where(h2 + *):not(:where([class~='not-prose'] *)) { - margin-top: 0; -} - -.prose-sm :where(h3 + *):not(:where([class~='not-prose'] *)) { - margin-top: 0; -} - -.prose-sm :where(h4 + *):not(:where([class~='not-prose'] *)) { - margin-top: 0; -} - -.prose-sm :where(table):not(:where([class~='not-prose'] *)) { - font-size: 0.8571429em; - line-height: 1.5; -} - -.prose-sm :where(thead th):not(:where([class~='not-prose'] *)) { - padding-right: 1em; - padding-bottom: 0.6666667em; - padding-left: 1em; -} - -.prose-sm :where(thead th:first-child):not(:where([class~='not-prose'] *)) { - padding-left: 0; -} - -.prose-sm :where(thead th:last-child):not(:where([class~='not-prose'] *)) { - padding-right: 0; -} - -.prose-sm :where(tbody td, tfoot td):not(:where([class~='not-prose'] *)) { - padding-top: 0.6666667em; - padding-right: 1em; - padding-bottom: 0.6666667em; - padding-left: 1em; -} - -.prose-sm - :where(tbody td:first-child, tfoot td:first-child):not( - :where([class~='not-prose'] *) - ) { - padding-left: 0; -} - -.prose-sm - :where(tbody td:last-child, tfoot td:last-child):not( - :where([class~='not-prose'] *) - ) { - padding-right: 0; -} - -.prose-sm :where(.prose > :first-child):not(:where([class~='not-prose'] *)) { - margin-top: 0; -} - -.prose-sm :where(.prose > :last-child):not(:where([class~='not-prose'] *)) { - margin-bottom: 0; -} - -.prose-base :where(.prose > ul > li p):not(:where([class~='not-prose'] *)) { - margin-top: 0.75em; - margin-bottom: 0.75em; -} - -.prose-base - :where(.prose > ul > li > *:first-child):not(:where([class~='not-prose'] *)) { - margin-top: 1.25em; -} - -.prose-base - :where(.prose > ul > li > *:last-child):not(:where([class~='not-prose'] *)) { - margin-bottom: 1.25em; -} - -.prose-base - :where(.prose > ol > li > *:first-child):not(:where([class~='not-prose'] *)) { - margin-top: 1.25em; -} - -.prose-base - :where(.prose > ol > li > *:last-child):not(:where([class~='not-prose'] *)) { - margin-bottom: 1.25em; -} - -.prose-base :where(.prose > :first-child):not(:where([class~='not-prose'] *)) { - margin-top: 0; -} - -.prose-base :where(.prose > :last-child):not(:where([class~='not-prose'] *)) { - margin-bottom: 0; -} - -.prose-lg :where(.prose > ul > li p):not(:where([class~='not-prose'] *)) { - margin-top: 0.8888889em; - margin-bottom: 0.8888889em; -} - -.prose-lg - :where(.prose > ul > li > *:first-child):not(:where([class~='not-prose'] *)) { - margin-top: 1.3333333em; -} - -.prose-lg - :where(.prose > ul > li > *:last-child):not(:where([class~='not-prose'] *)) { - margin-bottom: 1.3333333em; -} - -.prose-lg - :where(.prose > ol > li > *:first-child):not(:where([class~='not-prose'] *)) { - margin-top: 1.3333333em; -} - -.prose-lg - :where(.prose > ol > li > *:last-child):not(:where([class~='not-prose'] *)) { - margin-bottom: 1.3333333em; -} - -.prose-lg :where(.prose > :first-child):not(:where([class~='not-prose'] *)) { - margin-top: 0; -} - -.prose-lg :where(.prose > :last-child):not(:where([class~='not-prose'] *)) { - margin-bottom: 0; -} - -.prose-xl :where(.prose > ul > li p):not(:where([class~='not-prose'] *)) { - margin-top: 0.8em; - margin-bottom: 0.8em; -} - -.prose-xl - :where(.prose > ul > li > *:first-child):not(:where([class~='not-prose'] *)) { - margin-top: 1.2em; -} - -.prose-xl - :where(.prose > ul > li > *:last-child):not(:where([class~='not-prose'] *)) { - margin-bottom: 1.2em; -} - -.prose-xl - :where(.prose > ol > li > *:first-child):not(:where([class~='not-prose'] *)) { - margin-top: 1.2em; -} - -.prose-xl - :where(.prose > ol > li > *:last-child):not(:where([class~='not-prose'] *)) { - margin-bottom: 1.2em; -} - -.prose-xl :where(.prose > :first-child):not(:where([class~='not-prose'] *)) { - margin-top: 0; -} - -.prose-xl :where(.prose > :last-child):not(:where([class~='not-prose'] *)) { - margin-bottom: 0; -} - -.prose-2xl :where(.prose > ul > li p):not(:where([class~='not-prose'] *)) { - margin-top: 0.8333333em; - margin-bottom: 0.8333333em; -} - -.prose-2xl - :where(.prose > ul > li > *:first-child):not(:where([class~='not-prose'] *)) { - margin-top: 1.3333333em; -} - -.prose-2xl - :where(.prose > ul > li > *:last-child):not(:where([class~='not-prose'] *)) { - margin-bottom: 1.3333333em; -} - -.prose-2xl - :where(.prose > ol > li > *:first-child):not(:where([class~='not-prose'] *)) { - margin-top: 1.3333333em; -} - -.prose-2xl - :where(.prose > ol > li > *:last-child):not(:where([class~='not-prose'] *)) { - margin-bottom: 1.3333333em; -} - -.prose-2xl :where(.prose > :first-child):not(:where([class~='not-prose'] *)) { - margin-top: 0; -} - -.prose-2xl :where(.prose > :last-child):not(:where([class~='not-prose'] *)) { - margin-bottom: 0; -} - -.prose-gray { - --tw-prose-body: #374151; - --tw-prose-headings: #111827; - --tw-prose-lead: #4b5563; - --tw-prose-links: #111827; - --tw-prose-bold: #111827; - --tw-prose-counters: #6b7280; - --tw-prose-bullets: #d1d5db; - --tw-prose-hr: #e5e7eb; - --tw-prose-quotes: #111827; - --tw-prose-quote-borders: #e5e7eb; - --tw-prose-captions: #6b7280; - --tw-prose-code: #111827; - --tw-prose-pre-code: #e5e7eb; - --tw-prose-pre-bg: #1f2937; - --tw-prose-th-borders: #d1d5db; - --tw-prose-td-borders: #e5e7eb; - --tw-prose-invert-body: #d1d5db; - --tw-prose-invert-headings: #fff; - --tw-prose-invert-lead: #9ca3af; - --tw-prose-invert-links: #fff; - --tw-prose-invert-bold: #fff; - --tw-prose-invert-counters: #9ca3af; - --tw-prose-invert-bullets: #4b5563; - --tw-prose-invert-hr: #374151; - --tw-prose-invert-quotes: #f3f4f6; - --tw-prose-invert-quote-borders: #374151; - --tw-prose-invert-captions: #9ca3af; - --tw-prose-invert-code: #fff; - --tw-prose-invert-pre-code: #d1d5db; - --tw-prose-invert-pre-bg: rgb(0 0 0 / 50%); - --tw-prose-invert-th-borders: #4b5563; - --tw-prose-invert-td-borders: #374151; -} - -.pointer-events-none { - pointer-events: none; -} - -.visible { - visibility: visible; -} - -.fixed { - position: fixed; -} - -.absolute { - position: absolute; -} - -.relative { - position: relative; -} - -.sticky { - position: -webkit-sticky; - position: sticky; -} - -.inset-y-0 { - top: 0px; - bottom: 0px; -} - -.top-2 { - top: 0.5rem; -} - -.left-1\/2 { - left: 50%; -} - -.right-0 { - right: 0px; -} - -.-top-3 { - top: -0.75rem; -} - -.right-2 { - right: 0.5rem; -} - -.top-0 { - top: 0px; -} - -.bottom-0 { - bottom: 0px; -} - -.left-0 { - left: 0px; -} - -.top-1\/2 { - top: 50%; -} - -.top-\[1px\] { - top: 1px; -} - -.top-16 { - top: 4rem; -} - -.left-1\/4 { - left: 25%; -} - -.right-1\/4 { - right: 25%; -} - -.top-1\/4 { - top: 25%; -} - -.bottom-1\/4 { - bottom: 25%; -} - -.right-\[-48px\] { - right: -48px; -} - -.z-30 { - z-index: 30; -} - -.z-10 { - z-index: 10; -} - -.z-20 { - z-index: 20; -} - -.z-0 { - z-index: 0; -} - -.col-span-2 { - grid-column: span 2 / span 2; -} - -.mx-auto { - margin-left: auto; - margin-right: auto; -} - -.my-2 { - margin-top: 0.5rem; - margin-bottom: 0.5rem; -} - -.my-4 { - margin-top: 1rem; - margin-bottom: 1rem; -} - -.mb-1 { - margin-bottom: 0.25rem; -} - -.mb-4 { - margin-bottom: 1rem; -} - -.ml-2 { - margin-left: 0.5rem; -} - -.mr-2 { - margin-right: 0.5rem; -} - -.mt-1 { - margin-top: 0.25rem; -} - -.mb-2 { - margin-bottom: 0.5rem; -} - -.mt-4 { - margin-top: 1rem; -} - -.mt-2 { - margin-top: 0.5rem; -} - -.mt-8 { - margin-top: 2rem; -} - -.mb-3 { - margin-bottom: 0.75rem; -} - -.ml-\[-100\%\] { - margin-left: -100%; -} - -.-mt-5 { - margin-top: -1.25rem; -} - -.mb-5 { - margin-bottom: 1.25rem; -} - -.block { - display: block; -} - -.inline-block { - display: inline-block; -} - -.inline { - display: inline; -} - -.flex { - display: flex; -} - -.table { - display: table; -} - -.grid { - display: grid; -} - -.contents { - display: contents; -} - -.hidden { - display: none; -} - -.\!hidden { - display: none !important; -} - -.h-\[50vh\] { - height: 50vh; -} - -.h-full { - height: 100%; -} - -.h-4 { - height: 1rem; -} - -.h-px { - height: 1px; -} - -.h-12 { - height: 3rem; -} - -.h-24 { - height: 6rem; -} - -.h-2 { - height: 0.5rem; -} - -.h-\[0vh\] { - height: 0vh; -} - -.h-screen { - height: 100vh; -} - -.h-5 { - height: 1.25rem; -} - -.h-\[95\%\] { - height: 95%; -} - -.h-8 { - height: 2rem; -} - -.h-6 { - height: 1.5rem; -} - -.h-20 { - height: 5rem; -} - -.max-h-60 { - max-height: 15rem; -} - -.max-h-\[800px\] { - max-height: 800px; -} - -.min-h-screen { - min-height: 100vh; -} - -.min-h-0 { - min-height: 0px; -} - -.w-full { - width: 100%; -} - -.w-\[300px\] { - width: 300px; -} - -.w-5 { - width: 1.25rem; -} - -.w-fit { - width: -webkit-fit-content; - width: -moz-fit-content; - width: fit-content; -} - -.w-\[95\%\] { - width: 95%; -} - -.w-\[250px\] { - width: 250px; -} - -.w-\[40px\] { - width: 40px; -} - -.w-\[230px\] { - width: 230px; -} - -.w-screen { - width: 100vw; -} - -.w-\[max-content\] { - width: -webkit-max-content; - width: -moz-max-content; - width: max-content; -} - -.w-\[500px\] { - width: 500px; -} - -.w-\[600px\] { - width: 600px; -} - -.w-\[450px\] { - width: 450px; -} - -.min-w-\[250px\] { - min-width: 250px; -} - -.min-w-0 { - min-width: 0px; -} - -.max-w-full { - max-width: 100%; -} - -.max-w-none { - max-width: none; -} - -.max-w-\[350px\] { - max-width: 350px; -} - -.max-w-screen-lg { - max-width: 1024px; -} - -.max-w-md { - max-width: 28rem; -} - -.max-w-sm { - max-width: 24rem; -} - -.max-w-screen-sm { - max-width: 640px; -} - -.max-w-screen-xl { - max-width: 1280px; -} - -.max-w-\[600px\] { - max-width: 600px; -} - -.max-w-\[500px\] { - max-width: 500px; -} - -.max-w-\[1200px\] { - max-width: 1200px; -} - -.max-w-3xl { - max-width: 48rem; -} - -.max-w-\[400px\] { - max-width: 400px; -} - -.max-w-\[300px\] { - max-width: 300px; -} - -.flex-1 { - flex: 1 1 0%; -} - -.flex-\[3_1_0\%\] { - flex: 3 1 0%; -} - -.flex-\[2_1_0\%\] { - flex: 2 1 0%; -} - -.origin-bottom-right { - transform-origin: bottom right; -} - -.origin-top { - transform-origin: top; -} - -.-translate-y-1\/2 { - --tw-translate-y: -50%; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.-translate-y-\[50px\] { - --tw-translate-y: -50px; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.-translate-x-1\/2 { - --tw-translate-x: -50%; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.-translate-x-full { - --tw-translate-x: -100%; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.translate-x-full { - --tw-translate-x: 100%; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.-translate-y-full { - --tw-translate-y: -100%; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.translate-y-full { - --tw-translate-y: 100%; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.-translate-y-1\/3 { - --tw-translate-y: -33.333333%; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.translate-x-1\/3 { - --tw-translate-x: 33.333333%; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.-rotate-90 { - --tw-rotate: -90deg; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.scale-\[2\] { - --tw-scale-x: 2; - --tw-scale-y: 2; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.scale-125 { - --tw-scale-x: 1.25; - --tw-scale-y: 1.25; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.transform { - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) - rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) - scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -@-webkit-keyframes spin { - to { - transform: rotate(360deg); - } -} - -@keyframes spin { - to { - transform: rotate(360deg); - } -} - -.animate-spin { - -webkit-animation: spin 1s linear infinite; - animation: spin 1s linear infinite; -} - -@-webkit-keyframes pulse { - 50% { - opacity: 0.5; - } -} - -@keyframes pulse { - 50% { - opacity: 0.5; - } -} - -.animate-pulse { - -webkit-animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; - animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; -} - -@-webkit-keyframes bounce { - 0%, - 100% { - transform: translateY(-25%); - -webkit-animation-timing-function: cubic-bezier(0.8, 0, 1, 1); - animation-timing-function: cubic-bezier(0.8, 0, 1, 1); - } - - 50% { - transform: none; - -webkit-animation-timing-function: cubic-bezier(0, 0, 0.2, 1); - animation-timing-function: cubic-bezier(0, 0, 0.2, 1); - } -} - -@keyframes bounce { - 0%, - 100% { - transform: translateY(-25%); - -webkit-animation-timing-function: cubic-bezier(0.8, 0, 1, 1); - animation-timing-function: cubic-bezier(0.8, 0, 1, 1); - } - - 50% { - transform: none; - -webkit-animation-timing-function: cubic-bezier(0, 0, 0.2, 1); - animation-timing-function: cubic-bezier(0, 0, 0.2, 1); - } -} - -.animate-bounce { - -webkit-animation: bounce 1s infinite; - animation: bounce 1s infinite; -} - -.cursor-pointer { - cursor: pointer; -} - -.cursor-default { - cursor: default; -} - -.select-none { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.resize { - resize: both; -} - -.grid-flow-row { - grid-auto-flow: row; -} - -.grid-cols-1 { - grid-template-columns: repeat(1, minmax(0, 1fr)); -} - -.grid-cols-3 { - grid-template-columns: repeat(3, minmax(0, 1fr)); -} - -.flex-col { - flex-direction: column; -} - -.flex-wrap { - flex-wrap: wrap; -} - -.items-start { - align-items: flex-start; -} - -.items-center { - align-items: center; -} - -.justify-center { - justify-content: center; -} - -.justify-between { - justify-content: space-between; -} - -.gap-6 { - gap: 1.5rem; -} - -.gap-2 { - gap: 0.5rem; -} - -.gap-4 { - gap: 1rem; -} - -.gap-1 { - gap: 0.25rem; -} - -.gap-8 { - gap: 2rem; -} - -.gap-12 { - gap: 3rem; -} - -.gap-20 { - gap: 5rem; -} - -.gap-x-10 { - -moz-column-gap: 2.5rem; - column-gap: 2.5rem; -} - -.gap-y-4 { - row-gap: 1rem; -} - -.space-y-px > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(1px * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(1px * var(--tw-space-y-reverse)); -} - -.space-y-4 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(1rem * var(--tw-space-y-reverse)); -} - -.space-y-1 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); -} - -.space-y-2 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)); -} - -.divide-y-2 > :not([hidden]) ~ :not([hidden]) { - --tw-divide-y-reverse: 0; - border-top-width: calc(2px * calc(1 - var(--tw-divide-y-reverse))); - border-bottom-width: calc(2px * var(--tw-divide-y-reverse)); -} - -.divide-gray-500 > :not([hidden]) ~ :not([hidden]) { - --tw-divide-opacity: 1; - border-color: rgb(107 114 128 / var(--tw-divide-opacity)); -} - -.divide-opacity-10 > :not([hidden]) ~ :not([hidden]) { - --tw-divide-opacity: 0.1; -} - -.self-start { - align-self: flex-start; -} - -.self-end { - align-self: flex-end; -} - -.self-center { - align-self: center; -} - -.overflow-auto { - overflow: auto; -} - -.overflow-hidden { - overflow: hidden; -} - -.overflow-scroll { - overflow: scroll; -} - -.overflow-y-auto { - overflow-y: auto; -} - -.truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.whitespace-nowrap { - white-space: nowrap; -} - -.rounded-lg { - border-radius: 0.5rem; -} - -.rounded { - border-radius: 0.25rem; -} - -.rounded-md { - border-radius: 0.375rem; -} - -.rounded-full { - border-radius: 9999px; -} - -.rounded-xl { - border-radius: 0.75rem; -} - -.rounded-t-md { - border-top-left-radius: 0.375rem; - border-top-right-radius: 0.375rem; -} - -.rounded-t-lg { - border-top-left-radius: 0.5rem; - border-top-right-radius: 0.5rem; -} - -.border { - border-width: 1px; -} - -.border-2 { - border-width: 2px; -} - -.border-4 { - border-width: 4px; -} - -.border-b { - border-bottom-width: 1px; -} - -.border-t { - border-top-width: 1px; -} - -.border-t-4 { - border-top-width: 4px; -} - -.border-none { - border-style: none; -} - -.border-black\/50 { - border-color: rgb(0 0 0 / 0.5); -} - -.border-gray-300 { - --tw-border-opacity: 1; - border-color: rgb(209 213 219 / var(--tw-border-opacity)); -} - -.border-gray-200 { - --tw-border-opacity: 1; - border-color: rgb(229 231 235 / var(--tw-border-opacity)); -} - -.border-gray-500 { - --tw-border-opacity: 1; - border-color: rgb(107 114 128 / var(--tw-border-opacity)); -} - -.border-black\/10 { - border-color: rgb(0 0 0 / 0.1); -} - -.border-gray-100 { - --tw-border-opacity: 1; - border-color: rgb(243 244 246 / var(--tw-border-opacity)); -} - -.border-gray-600\/70 { - border-color: rgb(75 85 99 / 0.7); -} - -.border-transparent { - border-color: transparent; -} - -.border-red-500 { - --tw-border-opacity: 1; - border-color: rgb(239 68 68 / var(--tw-border-opacity)); -} - -.border-green-500 { - --tw-border-opacity: 1; - border-color: rgb(34 197 94 / var(--tw-border-opacity)); -} - -.border-opacity-20 { - --tw-border-opacity: 0.2; -} - -.bg-white { - --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); -} - -.bg-transparent { - background-color: transparent; -} - -.bg-rose-600 { - --tw-bg-opacity: 1; - background-color: rgb(225 29 72 / var(--tw-bg-opacity)); -} - -.bg-gray-600 { - --tw-bg-opacity: 1; - background-color: rgb(75 85 99 / var(--tw-bg-opacity)); -} - -.bg-gray-500 { - --tw-bg-opacity: 1; - background-color: rgb(107 114 128 / var(--tw-bg-opacity)); -} - -.bg-blue-500 { - --tw-bg-opacity: 1; - background-color: rgb(59 130 246 / var(--tw-bg-opacity)); -} - -.bg-orange-500 { - --tw-bg-opacity: 1; - background-color: rgb(249 115 22 / var(--tw-bg-opacity)); -} - -.bg-green-500 { - --tw-bg-opacity: 1; - background-color: rgb(34 197 94 / var(--tw-bg-opacity)); -} - -.bg-gray-100 { - --tw-bg-opacity: 1; - background-color: rgb(243 244 246 / var(--tw-bg-opacity)); -} - -.bg-gray-800 { - --tw-bg-opacity: 1; - background-color: rgb(31 41 55 / var(--tw-bg-opacity)); -} - -.bg-emerald-500 { - --tw-bg-opacity: 1; - background-color: rgb(16 185 129 / var(--tw-bg-opacity)); -} - -.bg-purple-500 { - --tw-bg-opacity: 1; - background-color: rgb(168 85 247 / var(--tw-bg-opacity)); -} - -.bg-yellow-500 { - --tw-bg-opacity: 1; - background-color: rgb(234 179 8 / var(--tw-bg-opacity)); -} - -.bg-pink-500 { - --tw-bg-opacity: 1; - background-color: rgb(236 72 153 / var(--tw-bg-opacity)); -} - -.bg-amber-500 { - --tw-bg-opacity: 1; - background-color: rgb(245 158 11 / var(--tw-bg-opacity)); -} - -.bg-lime-500 { - --tw-bg-opacity: 1; - background-color: rgb(132 204 22 / var(--tw-bg-opacity)); -} - -.bg-slate-700 { - --tw-bg-opacity: 1; - background-color: rgb(51 65 85 / var(--tw-bg-opacity)); -} - -.bg-discord { - --tw-bg-opacity: 1; - background-color: rgb(83 107 189 / var(--tw-bg-opacity)); -} - -.bg-gray-200 { - --tw-bg-opacity: 1; - background-color: rgb(229 231 235 / var(--tw-bg-opacity)); -} - -.bg-gray-700 { - --tw-bg-opacity: 1; - background-color: rgb(55 65 81 / var(--tw-bg-opacity)); -} - -.bg-\[\#ED203D\] { - --tw-bg-opacity: 1; - background-color: rgb(237 32 61 / var(--tw-bg-opacity)); -} - -.bg-red-500 { - --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); -} - -.bg-yellow-400 { - --tw-bg-opacity: 1; - background-color: rgb(250 204 21 / var(--tw-bg-opacity)); -} - -.bg-gray-300 { - --tw-bg-opacity: 1; - background-color: rgb(209 213 219 / var(--tw-bg-opacity)); -} - -.bg-black { - --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); -} - -.bg-teal-500 { - --tw-bg-opacity: 1; - background-color: rgb(20 184 166 / var(--tw-bg-opacity)); -} - -.bg-red-400 { - --tw-bg-opacity: 1; - background-color: rgb(248 113 113 / var(--tw-bg-opacity)); -} - -.bg-rose-500 { - --tw-bg-opacity: 1; - background-color: rgb(244 63 94 / var(--tw-bg-opacity)); -} - -.bg-opacity-10 { - --tw-bg-opacity: 0.1; -} - -.bg-gradient-to-r { - background-image: linear-gradient(to right, var(--tw-gradient-stops)); -} - -.bg-\[linear-gradient\(to_right\2c \#59b8ff\2c \#e331d8\2c \#ff9600\2c red\)\] { - background-image: linear-gradient(to right, #59b8ff, #e331d8, #ff9600, red); -} - -.bg-\[linear-gradient\(to_right\2c \#59b8ff\2c \#e331d8\2c \#ff9600\)\] { - background-image: linear-gradient(to right, #59b8ff, #e331d8, #ff9600); -} - -.from-red-500 { - --tw-gradient-from: #ef4444; - --tw-gradient-to: rgb(239 68 68 / 0); - --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); -} - -.from-rose-500 { - --tw-gradient-from: #f43f5e; - --tw-gradient-to: rgb(244 63 94 / 0); - --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); -} - -.from-yellow-500 { - --tw-gradient-from: #eab308; - --tw-gradient-to: rgb(234 179 8 / 0); - --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); -} - -.from-teal-500 { - --tw-gradient-from: #14b8a6; - --tw-gradient-to: rgb(20 184 166 / 0); - --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); -} - -.from-blue-500 { - --tw-gradient-from: #3b82f6; - --tw-gradient-to: rgb(59 130 246 / 0); - --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); -} - -.from-lime-500 { - --tw-gradient-from: #84cc16; - --tw-gradient-to: rgb(132 204 22 / 0); - --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); -} - -.via-purple-500 { - --tw-gradient-to: rgb(168 85 247 / 0); - --tw-gradient-stops: var(--tw-gradient-from), #a855f7, var(--tw-gradient-to); -} - -.to-amber-500 { - --tw-gradient-to: #f59e0b; -} - -.to-yellow-500 { - --tw-gradient-to: #eab308; -} - -.to-violet-600 { - --tw-gradient-to: #7c3aed; -} - -.to-yellow-600 { - --tw-gradient-to: #ca8a04; -} - -.to-teal-500 { - --tw-gradient-to: #14b8a6; -} - -.to-violet-500 { - --tw-gradient-to: #8b5cf6; -} - -.to-pink-500 { - --tw-gradient-to: #ec4899; -} - -.to-red-700 { - --tw-gradient-to: #b91c1c; -} - -.to-emerald-500 { - --tw-gradient-to: #10b981; -} - -.to-blue-500 { - --tw-gradient-to: #3b82f6; -} - -.to-blue-600 { - --tw-gradient-to: #2563eb; -} - -.bg-contain { - background-size: contain; -} - -.bg-clip-text { - -webkit-background-clip: text; - background-clip: text; -} - -.bg-center { - background-position: center; -} - -.bg-no-repeat { - background-repeat: no-repeat; -} - -.p-2 { - padding: 0.5rem; -} - -.p-4 { - padding: 1rem; -} - -.p-1 { - padding: 0.25rem; -} - -.p-8 { - padding: 2rem; -} - -.p-3 { - padding: 0.75rem; -} - -.p-12 { - padding: 3rem; -} - -.px-2 { - padding-left: 0.5rem; - padding-right: 0.5rem; -} - -.py-2 { - padding-top: 0.5rem; - padding-bottom: 0.5rem; -} - -.px-4 { - padding-left: 1rem; - padding-right: 1rem; -} - -.py-4 { - padding-top: 1rem; - padding-bottom: 1rem; -} - -.py-1 { - padding-top: 0.25rem; - padding-bottom: 0.25rem; -} - -.py-12 { - padding-top: 3rem; - padding-bottom: 3rem; -} - -.pt-4 { - padding-top: 1rem; -} - -.pb-\[300px\] { - padding-bottom: 300px; -} - -.pl-2 { - padding-left: 0.5rem; -} - -.pr-10 { - padding-right: 2.5rem; -} - -.pr-2 { - padding-right: 0.5rem; -} - -.pl-10 { - padding-left: 2.5rem; -} - -.pr-3 { - padding-right: 0.75rem; -} - -.pb-16 { - padding-bottom: 4rem; -} - -.text-left { - text-align: left; -} - -.text-center { - text-align: center; -} - -.align-super { - vertical-align: super; -} - -.text-2xl { - font-size: 1.5rem; - line-height: 2rem; -} - -.text-xs { - font-size: 0.75rem; - line-height: 1rem; -} - -.text-sm { - font-size: 0.875rem; - line-height: 1.25rem; -} - -.text-7xl { - font-size: 4.5rem; - line-height: 1; -} - -.text-3xl { - font-size: 1.875rem; - line-height: 2.25rem; -} - -.text-lg { - font-size: 1.125rem; - line-height: 1.75rem; -} - -.text-xl { - font-size: 1.25rem; - line-height: 1.75rem; -} - -.text-\[\.9em\] { - font-size: 0.9em; -} - -.text-base { - font-size: 1rem; - line-height: 1.5rem; -} - -.text-\[\.7rem\] { - font-size: 0.7rem; -} - -.text-5xl { - font-size: 3rem; - line-height: 1; -} - -.text-4xl { - font-size: 2.25rem; - line-height: 2.5rem; -} - -.text-\[\.5em\] { - font-size: 0.5em; -} - -.text-6xl { - font-size: 3.75rem; - line-height: 1; -} - -.font-normal { - font-weight: 400; -} - -.font-black { - font-weight: 900; -} - -.font-extrabold { - font-weight: 800; -} - -.font-bold { - font-weight: 700; -} - -.font-medium { - font-weight: 500; -} - -.font-light { - font-weight: 300; -} - -.font-semibold { - font-weight: 600; -} - -.uppercase { - text-transform: uppercase; -} - -.capitalize { - text-transform: capitalize; -} - -.italic { - font-style: italic; -} - -.leading-none { - line-height: 1; -} - -.leading-6 { - line-height: 1.5rem; -} - -.leading-tight { - line-height: 1.25; -} - -.leading-7 { - line-height: 1.75rem; -} - -.leading-8 { - line-height: 2rem; -} - -.leading-loose { - line-height: 2; -} - -.tracking-tight { - letter-spacing: -0.025em; -} - -.tracking-wider { - letter-spacing: 0.05em; -} - -.text-white { - --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); -} - -.text-gray-400 { - --tw-text-opacity: 1; - color: rgb(156 163 175 / var(--tw-text-opacity)); -} - -.text-red-600 { - --tw-text-opacity: 1; - color: rgb(220 38 38 / var(--tw-text-opacity)); -} - -.text-transparent { - color: transparent; -} - -.text-sky-500 { - --tw-text-opacity: 1; - color: rgb(14 165 233 / var(--tw-text-opacity)); -} - -.text-gray-500 { - --tw-text-opacity: 1; - color: rgb(107 114 128 / var(--tw-text-opacity)); -} - -.text-gray-600 { - --tw-text-opacity: 1; - color: rgb(75 85 99 / var(--tw-text-opacity)); -} - -.text-black { - --tw-text-opacity: 1; - color: rgb(0 0 0 / var(--tw-text-opacity)); -} - -.text-gray-900 { - --tw-text-opacity: 1; - color: rgb(17 24 39 / var(--tw-text-opacity)); -} - -.text-gray-800 { - --tw-text-opacity: 1; - color: rgb(31 41 55 / var(--tw-text-opacity)); -} - -.text-rose-500 { - --tw-text-opacity: 1; - color: rgb(244 63 94 / var(--tw-text-opacity)); -} - -.text-yellow-500 { - --tw-text-opacity: 1; - color: rgb(234 179 8 / var(--tw-text-opacity)); -} - -.text-teal-500 { - --tw-text-opacity: 1; - color: rgb(20 184 166 / var(--tw-text-opacity)); -} - -.text-blue-500 { - --tw-text-opacity: 1; - color: rgb(59 130 246 / var(--tw-text-opacity)); -} - -.text-red-500 { - --tw-text-opacity: 1; - color: rgb(239 68 68 / var(--tw-text-opacity)); -} - -.text-emerald-500 { - --tw-text-opacity: 1; - color: rgb(16 185 129 / var(--tw-text-opacity)); -} - -.text-purple-500 { - --tw-text-opacity: 1; - color: rgb(168 85 247 / var(--tw-text-opacity)); -} - -.text-orange-500 { - --tw-text-opacity: 1; - color: rgb(249 115 22 / var(--tw-text-opacity)); -} - -.text-pink-500 { - --tw-text-opacity: 1; - color: rgb(236 72 153 / var(--tw-text-opacity)); -} - -.text-amber-500 { - --tw-text-opacity: 1; - color: rgb(245 158 11 / var(--tw-text-opacity)); -} - -.text-lime-500 { - --tw-text-opacity: 1; - color: rgb(132 204 22 / var(--tw-text-opacity)); -} - -.text-slate-600 { - --tw-text-opacity: 1; - color: rgb(71 85 105 / var(--tw-text-opacity)); -} - -.text-green-500 { - --tw-text-opacity: 1; - color: rgb(34 197 94 / var(--tw-text-opacity)); -} - -.text-discord { - --tw-text-opacity: 1; - color: rgb(83 107 189 / var(--tw-text-opacity)); -} - -.text-green-600 { - --tw-text-opacity: 1; - color: rgb(22 163 74 / var(--tw-text-opacity)); -} - -.text-violet-500 { - --tw-text-opacity: 1; - color: rgb(139 92 246 / var(--tw-text-opacity)); -} - -.text-yellow-400 { - --tw-text-opacity: 1; - color: rgb(250 204 21 / var(--tw-text-opacity)); -} - -.text-yellow-600 { - --tw-text-opacity: 1; - color: rgb(202 138 4 / var(--tw-text-opacity)); -} - -.text-amber-600 { - --tw-text-opacity: 1; - color: rgb(217 119 6 / var(--tw-text-opacity)); -} - -.text-amber-700 { - --tw-text-opacity: 1; - color: rgb(180 83 9 / var(--tw-text-opacity)); -} - -.text-red-700 { - --tw-text-opacity: 1; - color: rgb(185 28 28 / var(--tw-text-opacity)); -} - -.text-orange-600 { - --tw-text-opacity: 1; - color: rgb(234 88 12 / var(--tw-text-opacity)); -} - -.text-orange-700 { - --tw-text-opacity: 1; - color: rgb(194 65 12 / var(--tw-text-opacity)); -} - -.text-lime-600 { - --tw-text-opacity: 1; - color: rgb(101 163 13 / var(--tw-text-opacity)); -} - -.text-red-400 { - --tw-text-opacity: 1; - color: rgb(248 113 113 / var(--tw-text-opacity)); -} - -.text-teal-700 { - --tw-text-opacity: 1; - color: rgb(15 118 110 / var(--tw-text-opacity)); -} - -.text-blue-600 { - --tw-text-opacity: 1; - color: rgb(37 99 235 / var(--tw-text-opacity)); -} - -.text-blue-700 { - --tw-text-opacity: 1; - color: rgb(29 78 216 / var(--tw-text-opacity)); -} - -.text-indigo-500 { - --tw-text-opacity: 1; - color: rgb(99 102 241 / var(--tw-text-opacity)); -} - -.text-indigo-700 { - --tw-text-opacity: 1; - color: rgb(67 56 202 / var(--tw-text-opacity)); -} - -.text-rose-600 { - --tw-text-opacity: 1; - color: rgb(225 29 72 / var(--tw-text-opacity)); -} - -.text-pink-700 { - --tw-text-opacity: 1; - color: rgb(190 24 93 / var(--tw-text-opacity)); -} - -.text-violet-700 { - --tw-text-opacity: 1; - color: rgb(109 40 217 / var(--tw-text-opacity)); -} - -.underline { - -webkit-text-decoration-line: underline; - text-decoration-line: underline; -} - -.decoration-gray-200 { - -webkit-text-decoration-color: #e5e7eb; - text-decoration-color: #e5e7eb; -} - -.decoration-yellow-500 { - -webkit-text-decoration-color: #eab308; - text-decoration-color: #eab308; -} - -.decoration-red-500 { - -webkit-text-decoration-color: #ef4444; - text-decoration-color: #ef4444; -} - -.decoration-dashed { - -webkit-text-decoration-style: dashed; - text-decoration-style: dashed; -} - -.decoration-4 { - text-decoration-thickness: 4px; -} - -.underline-offset-\[\.5rem\] { - text-underline-offset: 0.5rem; -} - -.underline-offset-2 { - text-underline-offset: 2px; -} - -.placeholder-gray-400::-moz-placeholder { - --tw-placeholder-opacity: 1; - color: rgb(156 163 175 / var(--tw-placeholder-opacity)); -} - -.placeholder-gray-400:-ms-input-placeholder { - --tw-placeholder-opacity: 1; - color: rgb(156 163 175 / var(--tw-placeholder-opacity)); -} - -.placeholder-gray-400::placeholder { - --tw-placeholder-opacity: 1; - color: rgb(156 163 175 / var(--tw-placeholder-opacity)); -} - -.opacity-0 { - opacity: 0; -} - -.opacity-10 { - opacity: 0.1; -} - -.opacity-20 { - opacity: 0.2; -} - -.opacity-30 { - opacity: 0.3; -} - -.opacity-70 { - opacity: 0.7; -} - -.opacity-100 { - opacity: 1; -} - -.opacity-40 { - opacity: 0.4; -} - -.opacity-90 { - opacity: 0.9; -} - -.opacity-50 { - opacity: 0.5; -} - -.opacity-60 { - opacity: 0.6; -} - -.shadow-lg { - --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), - 0 4px 6px -2px rgba(0, 0, 0, 0.03); - --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), - 0 4px 6px -2px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), - var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); -} - -.shadow-md { - --tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), - 0 2px 4px -1px rgba(0, 0, 0, 0.03); - --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), - 0 2px 4px -1px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), - var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); -} - -.shadow-xl { - --tw-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), - 0 10px 10px -5px rgba(0, 0, 0, 0.02); - --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), - 0 10px 10px -5px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), - var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); -} - -.shadow { - --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03); - --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), - 0 1px 2px 0 var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), - var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); -} - -.shadow-2xl { - --tw-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2); - --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), - var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); -} - -.shadow-black\/10 { - --tw-shadow-color: rgb(0 0 0 / 0.1); - --tw-shadow: var(--tw-shadow-colored); -} - -.shadow-red-700\/20 { - --tw-shadow-color: rgb(185 28 28 / 0.2); - --tw-shadow: var(--tw-shadow-colored); -} - -.shadow-blue-700\/20 { - --tw-shadow-color: rgb(29 78 216 / 0.2); - --tw-shadow: var(--tw-shadow-colored); -} - -.shadow-emerald-700\/20 { - --tw-shadow-color: rgb(4 120 87 / 0.2); - --tw-shadow: var(--tw-shadow-colored); -} - -.shadow-amber-700\/20 { - --tw-shadow-color: rgb(180 83 9 / 0.2); - --tw-shadow: var(--tw-shadow-colored); -} - -.shadow-purple-700\/20 { - --tw-shadow-color: rgb(126 34 206 / 0.2); - --tw-shadow: var(--tw-shadow-colored); -} - -.shadow-yellow-700\/20 { - --tw-shadow-color: rgb(161 98 7 / 0.2); - --tw-shadow: var(--tw-shadow-colored); -} - -.shadow-orange-700\/20 { - --tw-shadow-color: rgb(194 65 12 / 0.2); - --tw-shadow: var(--tw-shadow-colored); -} - -.shadow-pink-700\/20 { - --tw-shadow-color: rgb(190 24 93 / 0.2); - --tw-shadow: var(--tw-shadow-colored); -} - -.shadow-lime-700\/20 { - --tw-shadow-color: rgb(77 124 15 / 0.2); - --tw-shadow: var(--tw-shadow-colored); -} - -.shadow-slate-700\/20 { - --tw-shadow-color: rgb(51 65 85 / 0.2); - --tw-shadow: var(--tw-shadow-colored); -} - -.shadow-gray-500\/20 { - --tw-shadow-color: rgb(107 114 128 / 0.2); - --tw-shadow: var(--tw-shadow-colored); -} - -.shadow-green-700\/10 { - --tw-shadow-color: rgb(21 128 61 / 0.1); - --tw-shadow: var(--tw-shadow-colored); -} - -.shadow-indigo-700\/30 { - --tw-shadow-color: rgb(67 56 202 / 0.3); - --tw-shadow: var(--tw-shadow-colored); -} - -.shadow-gray-900\/10 { - --tw-shadow-color: rgb(17 24 39 / 0.1); - --tw-shadow: var(--tw-shadow-colored); -} - -.shadow-gray-700\/20 { - --tw-shadow-color: rgb(55 65 81 / 0.2); - --tw-shadow: var(--tw-shadow-colored); -} - -.outline-none { - outline: 2px solid transparent; - outline-offset: 2px; -} - -.ring-1 { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 - var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 - calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), - var(--tw-shadow, 0 0 #0000); -} - -.ring-black { - --tw-ring-opacity: 1; - --tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity)); -} - -.ring-opacity-5 { - --tw-ring-opacity: 0.05; -} - -.filter { - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) - var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) - var(--tw-sepia) var(--tw-drop-shadow); -} - -.transition { - transition-property: color, background-color, border-color, fill, stroke, - opacity, box-shadow, transform, filter, -webkit-text-decoration-color, - -webkit-backdrop-filter; - transition-property: color, background-color, border-color, - text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, - backdrop-filter; - transition-property: color, background-color, border-color, - text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, - backdrop-filter, -webkit-text-decoration-color, -webkit-backdrop-filter; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} - -.transition-opacity { - transition-property: opacity; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} - -.transition-all { - transition-property: all; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} - -.delay-300 { - transition-delay: 300ms; -} - -.duration-300 { - transition-duration: 300ms; -} - -.duration-100 { - transition-duration: 100ms; -} - -.ease-in { - transition-timing-function: cubic-bezier(0.4, 0, 1, 1); -} - -.ease-in-out { - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); -} - -.carbon-small { - pointer-events: none; -} - -.carbon-small #carbonads { - pointer-events: none; -} - -.carbon-small .carbon-outer { - pointer-events: none; -} - -.carbon-small .carbon-wrap { - display: flex; - flex-direction: column; -} - -.carbon-small .carbon-wrap .carbon-img { - pointer-events: auto !important; - width: 50%; - overflow: hidden; - border-top-right-radius: 0.5rem; - border-top-width: 1px; - border-right-width: 1px; - border-color: rgb(107 114 128 / var(--tw-border-opacity)); - --tw-border-opacity: 0.1; - padding-top: 0.5rem; -} - -.carbon-small .carbon-wrap .carbon-img img { - width: 100%; - max-width: 100% !important; -} - -.carbon-small .carbon-wrap .carbon-text { - pointer-events: auto !important; - margin: 0px !important; - border-top-right-radius: 0.5rem; - border-top-width: 1px; - border-right-width: 1px; - border-color: rgb(107 114 128 / var(--tw-border-opacity)); - --tw-border-opacity: 0.1; - --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); - padding-bottom: 1.5rem !important; -} - -@media (prefers-color-scheme: dark) { - .carbon-small .carbon-wrap .carbon-text { - --tw-bg-opacity: 1; - background-color: rgb(31 41 55 / var(--tw-bg-opacity)); - } -} - -.carbon-small .carbon-wrap .carbon-poweredby { - position: absolute; - bottom: 0px; - right: 0px; -} - -code[class*='language-'] { - white-space: pre-wrap; - word-break: break-all; -} - -.even\:opacity-40:nth-child(even) { - opacity: 0.4; -} - -.hover\:border-current:hover { - border-color: currentColor; -} - -.hover\:border-green-500:hover { - --tw-border-opacity: 1; - border-color: rgb(34 197 94 / var(--tw-border-opacity)); -} - -.hover\:border-blue-500:hover { - --tw-border-opacity: 1; - border-color: rgb(59 130 246 / var(--tw-border-opacity)); -} - -.hover\:bg-gray-500:hover { - --tw-bg-opacity: 1; - background-color: rgb(107 114 128 / var(--tw-bg-opacity)); -} - -.hover\:bg-rose-600:hover { - --tw-bg-opacity: 1; - background-color: rgb(225 29 72 / var(--tw-bg-opacity)); -} - -.hover\:bg-gray-100\/70:hover { - background-color: rgb(243 244 246 / 0.7); -} - -.hover\:bg-yellow-400:hover { - --tw-bg-opacity: 1; - background-color: rgb(250 204 21 / var(--tw-bg-opacity)); -} - -.hover\:bg-red-300:hover { - --tw-bg-opacity: 1; - background-color: rgb(252 165 165 / var(--tw-bg-opacity)); -} - -.hover\:bg-teal-300:hover { - --tw-bg-opacity: 1; - background-color: rgb(94 234 212 / var(--tw-bg-opacity)); -} - -.hover\:bg-red-400:hover { - --tw-bg-opacity: 1; - background-color: rgb(248 113 113 / var(--tw-bg-opacity)); -} - -.hover\:bg-rose-300:hover { - --tw-bg-opacity: 1; - background-color: rgb(253 164 175 / var(--tw-bg-opacity)); -} - -.hover\:bg-opacity-10:hover { - --tw-bg-opacity: 0.1; -} - -.hover\:text-red-500:hover { - --tw-text-opacity: 1; - color: rgb(239 68 68 / var(--tw-text-opacity)); -} - -.hover\:text-white:hover { - --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); -} - -.hover\:underline:hover { - -webkit-text-decoration-line: underline; - text-decoration-line: underline; -} - -.hover\:opacity-0:hover { - opacity: 0; -} - -.hover\:opacity-100:hover { - opacity: 1; -} - -.focus\:outline-none:focus { - outline: 2px solid transparent; - outline-offset: 2px; -} - -.focus-visible\:border-indigo-500:focus-visible { - --tw-border-opacity: 1; - border-color: rgb(99 102 241 / var(--tw-border-opacity)); -} - -.group:hover .group-hover\:opacity-100 { - opacity: 1; -} - -@media (prefers-color-scheme: dark) { - .dark\:prose-invert { - --tw-prose-body: var(--tw-prose-invert-body); - --tw-prose-headings: var(--tw-prose-invert-headings); - --tw-prose-lead: var(--tw-prose-invert-lead); - --tw-prose-links: var(--tw-prose-invert-links); - --tw-prose-bold: var(--tw-prose-invert-bold); - --tw-prose-counters: var(--tw-prose-invert-counters); - --tw-prose-bullets: var(--tw-prose-invert-bullets); - --tw-prose-hr: var(--tw-prose-invert-hr); - --tw-prose-quotes: var(--tw-prose-invert-quotes); - --tw-prose-quote-borders: var(--tw-prose-invert-quote-borders); - --tw-prose-captions: var(--tw-prose-invert-captions); - --tw-prose-code: var(--tw-prose-invert-code); - --tw-prose-pre-code: var(--tw-prose-invert-pre-code); - --tw-prose-pre-bg: var(--tw-prose-invert-pre-bg); - --tw-prose-th-borders: var(--tw-prose-invert-th-borders); - --tw-prose-td-borders: var(--tw-prose-invert-td-borders); - } - - .dark\:h-\[100\.5\%\] { - height: 100.5%; - } - - .dark\:w-\[100\.5\%\] { - width: 100.5%; - } - - .dark\:border-0 { - border-width: 0px; - } - - .dark\:border { - border-width: 1px; - } - - .dark\:border-2 { - border-width: 2px; - } - - .dark\:border-white\/50 { - border-color: rgb(255 255 255 / 0.5); - } - - .dark\:border-gray-800 { - --tw-border-opacity: 1; - border-color: rgb(31 41 55 / var(--tw-border-opacity)); - } - - .dark\:border-white\/10 { - border-color: rgb(255 255 255 / 0.1); - } - - .dark\:border-gray-700\/80 { - border-color: rgb(55 65 81 / 0.8); - } - - .dark\:bg-gray-800 { - --tw-bg-opacity: 1; - background-color: rgb(31 41 55 / var(--tw-bg-opacity)); - } - - .dark\:bg-gray-600 { - --tw-bg-opacity: 1; - background-color: rgb(75 85 99 / var(--tw-bg-opacity)); - } - - .dark\:bg-gray-700 { - --tw-bg-opacity: 1; - background-color: rgb(55 65 81 / var(--tw-bg-opacity)); - } - - .dark\:bg-black { - --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); - } - - .dark\:bg-gray-900 { - --tw-bg-opacity: 1; - background-color: rgb(17 24 39 / var(--tw-bg-opacity)); - } - - .dark\:bg-opacity-20 { - --tw-bg-opacity: 0.2; - } - - .dark\:text-gray-400 { - --tw-text-opacity: 1; - color: rgb(156 163 175 / var(--tw-text-opacity)); - } - - .dark\:text-gray-300 { - --tw-text-opacity: 1; - color: rgb(209 213 219 / var(--tw-text-opacity)); - } - - .dark\:text-emerald-400 { - --tw-text-opacity: 1; - color: rgb(52 211 153 / var(--tw-text-opacity)); - } - - .dark\:text-white { - --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); - } - - .dark\:text-gray-200 { - --tw-text-opacity: 1; - color: rgb(229 231 235 / var(--tw-text-opacity)); - } - - .dark\:text-yellow-300 { - --tw-text-opacity: 1; - color: rgb(253 224 71 / var(--tw-text-opacity)); - } - - .dark\:text-yellow-500 { - --tw-text-opacity: 1; - color: rgb(234 179 8 / var(--tw-text-opacity)); - } - - .dark\:text-amber-500 { - --tw-text-opacity: 1; - color: rgb(245 158 11 / var(--tw-text-opacity)); - } - - .dark\:text-red-400 { - --tw-text-opacity: 1; - color: rgb(248 113 113 / var(--tw-text-opacity)); - } - - .dark\:text-orange-400 { - --tw-text-opacity: 1; - color: rgb(251 146 60 / var(--tw-text-opacity)); - } - - .dark\:text-amber-400 { - --tw-text-opacity: 1; - color: rgb(251 191 36 / var(--tw-text-opacity)); - } - - .dark\:text-lime-400 { - --tw-text-opacity: 1; - color: rgb(163 230 53 / var(--tw-text-opacity)); - } - - .dark\:text-teal-400 { - --tw-text-opacity: 1; - color: rgb(45 212 191 / var(--tw-text-opacity)); - } - - .dark\:text-red-300 { - --tw-text-opacity: 1; - color: rgb(252 165 165 / var(--tw-text-opacity)); - } - - .dark\:text-red-500 { - --tw-text-opacity: 1; - color: rgb(239 68 68 / var(--tw-text-opacity)); - } - - .dark\:text-blue-400 { - --tw-text-opacity: 1; - color: rgb(96 165 250 / var(--tw-text-opacity)); - } - - .dark\:text-indigo-400 { - --tw-text-opacity: 1; - color: rgb(129 140 248 / var(--tw-text-opacity)); - } - - .dark\:text-rose-400 { - --tw-text-opacity: 1; - color: rgb(251 113 133 / var(--tw-text-opacity)); - } - - .dark\:text-pink-400 { - --tw-text-opacity: 1; - color: rgb(244 114 182 / var(--tw-text-opacity)); - } - - .dark\:text-violet-400 { - --tw-text-opacity: 1; - color: rgb(167 139 250 / var(--tw-text-opacity)); - } - - .dark\:decoration-gray-800 { - -webkit-text-decoration-color: #1f2937; - text-decoration-color: #1f2937; - } - - .dark\:shadow-lg { - --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), - 0 4px 6px -2px rgba(0, 0, 0, 0.03); - --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), - 0 4px 6px -2px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), - var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); - } - - .dark\:shadow-none { - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), - var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); - } - - .dark\:shadow-red-500\/30 { - --tw-shadow-color: rgb(239 68 68 / 0.3); - --tw-shadow: var(--tw-shadow-colored); - } - - .dark\:shadow-blue-500\/30 { - --tw-shadow-color: rgb(59 130 246 / 0.3); - --tw-shadow: var(--tw-shadow-colored); - } - - .dark\:shadow-emerald-500\/30 { - --tw-shadow-color: rgb(16 185 129 / 0.3); - --tw-shadow: var(--tw-shadow-colored); - } - - .dark\:shadow-amber-500\/30 { - --tw-shadow-color: rgb(245 158 11 / 0.3); - --tw-shadow: var(--tw-shadow-colored); - } - - .dark\:shadow-purple-500\/30 { - --tw-shadow-color: rgb(168 85 247 / 0.3); - --tw-shadow: var(--tw-shadow-colored); - } - - .dark\:shadow-yellow-500\/30 { - --tw-shadow-color: rgb(234 179 8 / 0.3); - --tw-shadow: var(--tw-shadow-colored); - } - - .dark\:shadow-orange-500\/30 { - --tw-shadow-color: rgb(249 115 22 / 0.3); - --tw-shadow: var(--tw-shadow-colored); - } - - .dark\:shadow-pink-500\/30 { - --tw-shadow-color: rgb(236 72 153 / 0.3); - --tw-shadow: var(--tw-shadow-colored); - } - - .dark\:shadow-lime-500\/30 { - --tw-shadow-color: rgb(132 204 22 / 0.3); - --tw-shadow: var(--tw-shadow-colored); - } - - .dark\:shadow-slate-500\/30 { - --tw-shadow-color: rgb(100 116 139 / 0.3); - --tw-shadow: var(--tw-shadow-colored); - } - - .dark\:shadow-green-500\/30 { - --tw-shadow-color: rgb(34 197 94 / 0.3); - --tw-shadow: var(--tw-shadow-colored); - } - - .dark\:hover\:bg-gray-800:hover { - --tw-bg-opacity: 1; - background-color: rgb(31 41 55 / var(--tw-bg-opacity)); - } -} - -@media (min-width: 640px) { - .sm\:col-span-2 { - grid-column: span 2 / span 2; - } - - .sm\:grid-cols-2 { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - - .sm\:grid-cols-3 { - grid-template-columns: repeat(3, minmax(0, 1fr)); - } - - .sm\:gap-4 { - gap: 1rem; - } - - .sm\:p-8 { - padding: 2rem; - } - - .sm\:px-6 { - padding-left: 1.5rem; - padding-right: 1.5rem; - } - - .sm\:text-center { - text-align: center; - } - - .sm\:text-sm { - font-size: 0.875rem; - line-height: 1.25rem; - } - - .sm\:text-4xl { - font-size: 2.25rem; - line-height: 2.5rem; - } - - .sm\:leading-10 { - line-height: 2.5rem; - } - - .sm\:opacity-20 { - opacity: 0.2; - } -} - -@media (min-width: 768px) { - .md\:col-span-5 { - grid-column: span 5 / span 5; - } - - .md\:mx-auto { - margin-left: auto; - margin-right: auto; - } - - .md\:mb-2 { - margin-bottom: 0.5rem; - } - - .md\:w-\[60px\] { - width: 60px; - } - - .md\:grid-cols-3 { - grid-template-columns: repeat(3, minmax(0, 1fr)); - } - - .md\:grid-cols-2 { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - - .md\:flex-row { - flex-direction: row; - } - - .md\:justify-end { - justify-content: flex-end; - } - - .md\:gap-32 { - gap: 8rem; - } - - .md\:space-y-2 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)); - } - - .md\:self-end { - align-self: flex-end; - } - - .md\:p-6 { - padding: 1.5rem; - } - - .md\:p-8 { - padding: 2rem; - } - - .md\:p-14 { - padding: 3.5rem; - } - - .md\:text-right { - text-align: right; - } - - .md\:text-base { - font-size: 1rem; - line-height: 1.5rem; - } - - .md\:text-sm { - font-size: 0.875rem; - line-height: 1.25rem; - } - - .md\:text-2xl { - font-size: 1.5rem; - line-height: 2rem; - } - - .md\:text-\[\.9em\] { - font-size: 0.9em; - } - - .md\:text-6xl { - font-size: 3.75rem; - line-height: 1; - } - - .md\:text-3xl { - font-size: 1.875rem; - line-height: 2.25rem; - } - - .md\:text-4xl { - font-size: 2.25rem; - line-height: 2.5rem; - } - - .md\:decoration-8 { - text-decoration-thickness: 8px; - } - - .md\:underline-offset-\[1rem\] { - text-underline-offset: 1rem; - } -} - -@media (min-width: 1024px) { - .lg\:mt-2 { - margin-top: 0.5rem; - } - - .lg\:flex { - display: flex; - } - - .lg\:hidden { - display: none; - } - - .lg\:h-16 { - height: 4rem; - } - - .lg\:w-\[100px\] { - width: 100px; - } - - .lg\:max-w-2xl { - max-width: 42rem; - } - - .lg\:max-w-screen-lg { - max-width: 1024px; - } - - .lg\:max-w-\[800px\] { - max-width: 800px; - } - - .lg\:max-w-\[600px\] { - max-width: 600px; - } - - .lg\:grid-cols-3 { - grid-template-columns: repeat(3, minmax(0, 1fr)); - } - - .lg\:grid-cols-4 { - grid-template-columns: repeat(4, minmax(0, 1fr)); - } - - .lg\:flex-row { - flex-direction: row; - } - - .lg\:gap-4 { - gap: 1rem; - } - - .lg\:rounded-lg { - border-radius: 0.5rem; - } - - .lg\:p-6 { - padding: 1.5rem; - } - - .lg\:py-24 { - padding-top: 6rem; - padding-bottom: 6rem; - } - - .lg\:px-8 { - padding-left: 2rem; - padding-right: 2rem; - } - - .lg\:px-6 { - padding-left: 1.5rem; - padding-right: 1.5rem; - } - - .lg\:pl-\[250px\] { - padding-left: 250px; - } - - .lg\:text-3xl { - font-size: 1.875rem; - line-height: 2.25rem; - } - - .lg\:text-lg { - font-size: 1.125rem; - line-height: 1.75rem; - } - - .lg\:text-8xl { - font-size: 6rem; - line-height: 1; - } - - .lg\:text-5xl { - font-size: 3rem; - line-height: 1; - } - - .lg\:text-xl { - font-size: 1.25rem; - line-height: 1.75rem; - } - - .lg\:text-7xl { - font-size: 4.5rem; - line-height: 1; - } - - .lg\:text-2xl { - font-size: 1.5rem; - line-height: 2rem; - } - - .lg\:leading-none { - line-height: 1; - } -} - -@media (min-width: 1280px) { - .xl\:grid-cols-3 { - grid-template-columns: repeat(3, minmax(0, 1fr)); - } - - .xl\:text-4xl { - font-size: 2.25rem; - line-height: 2.5rem; - } -} diff --git a/app/styles/prismThemeDark.css b/app/styles/prismThemeDark.css new file mode 100644 index 00000000..bbd1ccef --- /dev/null +++ b/app/styles/prismThemeDark.css @@ -0,0 +1,446 @@ +/** + * One Dark theme for prism.js + * Based on Atom's One Dark theme: https://github.com/atom/atom/tree/master/packages/one-dark-syntax + */ + +/** + * One Dark colours (accurate as of commit 8ae45ca on 6 Sep 2018) + * From colors.less + * --mono-1: hsl(220, 14%, 71%); + * --mono-2: hsl(220, 9%, 55%); + * --mono-3: hsl(220, 10%, 40%); + * --hue-1: hsl(187, 47%, 55%); + * --hue-2: hsl(207, 82%, 66%); + * --hue-3: hsl(286, 60%, 67%); + * --hue-4: hsl(95, 38%, 62%); + * --hue-5: hsl(355, 65%, 65%); + * --hue-5-2: hsl(5, 48%, 51%); + * --hue-6: hsl(29, 54%, 61%); + * --hue-6-2: hsl(39, 67%, 69%); + * --syntax-fg: hsl(220, 14%, 71%); + * --syntax-bg: hsl(220, 13%, 18%); + * --syntax-gutter: hsl(220, 14%, 45%); + * --syntax-guide: hsla(220, 14%, 71%, 0.15); + * --syntax-accent: hsl(220, 100%, 66%); + * From syntax-variables.less + * --syntax-selection-color: hsl(220, 13%, 28%); + * --syntax-gutter-background-color-selected: hsl(220, 13%, 26%); + * --syntax-cursor-line: hsla(220, 100%, 80%, 0.04); + */ + +code[class*='language-'], +pre[class*='language-'] { + background: hsl(220, 29%, 14%); + color: hsl(220, 14%, 71%); + text-shadow: 0 1px rgba(0, 0, 0, 0.3); + font-family: 'Fira Code', 'Fira Mono', Menlo, Consolas, 'DejaVu Sans Mono', + monospace; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + line-height: 1.5; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +/* Selection */ +code[class*='language-']::-moz-selection, +code[class*='language-'] *::-moz-selection, +pre[class*='language-'] *::-moz-selection { + background: hsl(220, 13%, 28%); + color: inherit; + text-shadow: none; +} + +code[class*='language-']::selection, +code[class*='language-'] *::selection, +pre[class*='language-'] *::selection { + background: hsl(220, 13%, 28%); + color: inherit; + text-shadow: none; +} + +/* Code blocks */ +pre[class*='language-'] { + padding: 1em; + /* margin: 0.5em 0; */ + overflow: auto; + border-radius: 0.3em; +} + +/* Inline code */ +:not(pre) > code[class*='language-'] { + padding: 0.2em 0.3em; + border-radius: 0.3em; + white-space: normal; +} + +/* Print */ +@media print { + code[class*='language-'], + pre[class*='language-'] { + text-shadow: none; + } +} + +.token.comment, +.token.prolog, +.token.cdata { + color: hsl(220, 10%, 40%); +} + +.token.doctype, +.token.punctuation, +.token.entity { + color: hsl(220, 14%, 71%); +} + +.token.attr-name, +.token.class-name, +.token.boolean, +.token.constant, +.token.number, +.token.atrule { + color: hsl(29, 54%, 61%); +} + +.token.keyword { + color: hsl(286, 60%, 67%); +} + +.token.property, +.token.tag, +.token.symbol, +.token.deleted, +.token.important { + color: hsl(355, 65%, 65%); +} + +.token.selector, +.token.string, +.token.char, +.token.builtin, +.token.inserted, +.token.regex, +.token.attr-value, +.token.attr-value > .token.punctuation { + color: hsl(95, 38%, 62%); +} + +.token.variable, +.token.operator, +.token.function { + color: hsl(207, 82%, 66%); +} + +.token.url { + color: hsl(187, 47%, 55%); +} + +/* HTML overrides */ +.token.attr-value > .token.punctuation.attr-equals, +.token.special-attr > .token.attr-value > .token.value.css { + color: hsl(220, 14%, 71%); +} + +/* CSS overrides */ +.language-css .token.selector { + color: hsl(355, 65%, 65%); +} + +.language-css .token.property { + color: hsl(220, 14%, 71%); +} + +.language-css .token.function, +.language-css .token.url > .token.function { + color: hsl(187, 47%, 55%); +} + +.language-css .token.url > .token.string.url { + color: hsl(95, 38%, 62%); +} + +.language-css .token.important, +.language-css .token.atrule .token.rule { + color: hsl(286, 60%, 67%); +} + +/* JS overrides */ +.language-javascript .token.operator { + color: hsl(286, 60%, 67%); +} + +.language-javascript + .token.template-string + > .token.interpolation + > .token.interpolation-punctuation.punctuation { + color: hsl(5, 48%, 51%); +} + +/* JSON overrides */ +.language-json .token.operator { + color: hsl(220, 14%, 71%); +} + +.language-json .token.null.keyword { + color: hsl(29, 54%, 61%); +} + +/* MD overrides */ +.language-markdown .token.url, +.language-markdown .token.url > .token.operator, +.language-markdown .token.url-reference.url > .token.string { + color: hsl(220, 14%, 71%); +} + +.language-markdown .token.url > .token.content { + color: hsl(207, 82%, 66%); +} + +.language-markdown .token.url > .token.url, +.language-markdown .token.url-reference.url { + color: hsl(187, 47%, 55%); +} + +.language-markdown .token.blockquote.punctuation, +.language-markdown .token.hr.punctuation { + color: hsl(220, 10%, 40%); + font-style: italic; +} + +.language-markdown .token.code-snippet { + color: hsl(95, 38%, 62%); +} + +.language-markdown .token.bold .token.content { + color: hsl(29, 54%, 61%); +} + +.language-markdown .token.italic .token.content { + color: hsl(286, 60%, 67%); +} + +.language-markdown .token.strike .token.content, +.language-markdown .token.strike .token.punctuation, +.language-markdown .token.list.punctuation, +.language-markdown .token.title.important > .token.punctuation { + color: hsl(355, 65%, 65%); +} + +/* General */ +.token.bold { + font-weight: bold; +} + +.token.comment, +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} + +.token.namespace { + opacity: 0.8; +} + +/* Plugin overrides */ +/* Selectors should have higher specificity than those in the plugins' default stylesheets */ + +/* Show Invisibles plugin overrides */ +.token.token.tab:not(:empty):before, +.token.token.cr:before, +.token.token.lf:before, +.token.token.space:before { + color: hsla(220, 14%, 71%, 0.15); + text-shadow: none; +} + +/* Toolbar plugin overrides */ +/* Space out all buttons and move them away from the right edge of the code block */ +div.code-toolbar > .toolbar.toolbar > .toolbar-item { + margin-right: 0.4em; +} + +/* Styling the buttons */ +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span { + background: hsl(220, 13%, 26%); + color: hsl(220, 9%, 55%); + padding: 0.1em 0.4em; + border-radius: 0.3em; +} + +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus { + background: hsl(220, 13%, 28%); + color: hsl(220, 14%, 71%); +} + +/* Line Highlight plugin overrides */ +/* The highlighted line itself */ +.line-highlight.line-highlight { + background: hsla(220, 100%, 80%, 0.04); +} + +/* Default line numbers in Line Highlight plugin */ +.line-highlight.line-highlight:before, +.line-highlight.line-highlight[data-end]:after { + background: hsl(220, 13%, 26%); + color: hsl(220, 14%, 71%); + padding: 0.1em 0.6em; + border-radius: 0.3em; + box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2); /* same as Toolbar plugin default */ +} + +/* Hovering over a linkable line number (in the gutter area) */ +/* Requires Line Numbers plugin as well */ +pre[id].linkable-line-numbers.linkable-line-numbers + span.line-numbers-rows + > span:hover:before { + background-color: hsla(220, 100%, 80%, 0.04); +} + +/* Line Numbers and Command Line plugins overrides */ +/* Line separating gutter from coding area */ +.line-numbers.line-numbers .line-numbers-rows, +.command-line .command-line-prompt { + border-right-color: hsla(220, 14%, 71%, 0.15); +} + +/* Stuff in the gutter */ +.line-numbers .line-numbers-rows > span:before, +.command-line .command-line-prompt > span:before { + color: hsl(220, 14%, 45%); +} + +/* Match Braces plugin overrides */ +/* Note: Outline colour is inherited from the braces */ +.rainbow-braces .token.token.punctuation.brace-level-1, +.rainbow-braces .token.token.punctuation.brace-level-5, +.rainbow-braces .token.token.punctuation.brace-level-9 { + color: hsl(355, 65%, 65%); +} + +.rainbow-braces .token.token.punctuation.brace-level-2, +.rainbow-braces .token.token.punctuation.brace-level-6, +.rainbow-braces .token.token.punctuation.brace-level-10 { + color: hsl(95, 38%, 62%); +} + +.rainbow-braces .token.token.punctuation.brace-level-3, +.rainbow-braces .token.token.punctuation.brace-level-7, +.rainbow-braces .token.token.punctuation.brace-level-11 { + color: hsl(207, 82%, 66%); +} + +.rainbow-braces .token.token.punctuation.brace-level-4, +.rainbow-braces .token.token.punctuation.brace-level-8, +.rainbow-braces .token.token.punctuation.brace-level-12 { + color: hsl(286, 60%, 67%); +} + +/* Diff Highlight plugin overrides */ +/* Taken from https://github.com/atom/github/blob/master/styles/variables.less */ +pre.diff-highlight > code .token.token.deleted:not(.prefix), +pre > code.diff-highlight .token.token.deleted:not(.prefix) { + background-color: hsla(353, 100%, 66%, 0.15); +} + +pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection, +pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection { + background-color: hsla(353, 95%, 66%, 0.25); +} + +pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection, +pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection { + background-color: hsla(353, 95%, 66%, 0.25); +} + +pre.diff-highlight > code .token.token.inserted:not(.prefix), +pre > code.diff-highlight .token.token.inserted:not(.prefix) { + background-color: hsla(137, 100%, 55%, 0.15); +} + +pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection, +pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection { + background-color: hsla(135, 73%, 55%, 0.25); +} + +pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection, +pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection { + background-color: hsla(135, 73%, 55%, 0.25); +} + +/* Previewers plugin overrides */ +/* Based on https://github.com/atom-community/atom-ide-datatip/blob/master/styles/atom-ide-datatips.less and https://github.com/atom/atom/blob/master/packages/one-dark-ui */ +/* Border around popup */ +.prism-previewer.prism-previewer:before, +.prism-previewer-gradient.prism-previewer-gradient div { + border-color: hsl(224, 13%, 17%); +} + +/* Angle and time should remain as circles and are hence not included */ +.prism-previewer-color.prism-previewer-color:before, +.prism-previewer-gradient.prism-previewer-gradient div, +.prism-previewer-easing.prism-previewer-easing:before { + border-radius: 0.3em; +} + +/* Triangles pointing to the code */ +.prism-previewer.prism-previewer:after { + border-top-color: hsl(224, 13%, 17%); +} + +.prism-previewer-flipped.prism-previewer-flipped.after { + border-bottom-color: hsl(224, 13%, 17%); +} + +/* Background colour within the popup */ +.prism-previewer-angle.prism-previewer-angle:before, +.prism-previewer-time.prism-previewer-time:before, +.prism-previewer-easing.prism-previewer-easing { + background: hsl(219, 13%, 22%); +} + +/* For angle, this is the positive area (eg. 90deg will display one quadrant in this colour) */ +/* For time, this is the alternate colour */ +.prism-previewer-angle.prism-previewer-angle circle, +.prism-previewer-time.prism-previewer-time circle { + stroke: hsl(220, 14%, 71%); + stroke-opacity: 1; +} + +/* Stroke colours of the handle, direction point, and vector itself */ +.prism-previewer-easing.prism-previewer-easing circle, +.prism-previewer-easing.prism-previewer-easing path, +.prism-previewer-easing.prism-previewer-easing line { + stroke: hsl(220, 14%, 71%); +} + +/* Fill colour of the handle */ +.prism-previewer-easing.prism-previewer-easing circle { + fill: transparent; +} diff --git a/app/styles/prismThemeLight.css b/app/styles/prismThemeLight.css new file mode 100644 index 00000000..80f49d21 --- /dev/null +++ b/app/styles/prismThemeLight.css @@ -0,0 +1,434 @@ +/** + * One Light theme for prism.js + * Based on Atom's One Light theme: https://github.com/atom/atom/tree/master/packages/one-light-syntax + */ + +/** + * One Light colours (accurate as of commit eb064bf on 19 Feb 2021) + * From colors.less + * --mono-1: hsl(230, 8%, 24%); + * --mono-2: hsl(230, 6%, 44%); + * --mono-3: hsl(230, 4%, 64%) + * --hue-1: hsl(198, 99%, 37%); + * --hue-2: hsl(221, 87%, 60%); + * --hue-3: hsl(301, 63%, 40%); + * --hue-4: hsl(119, 34%, 47%); + * --hue-5: hsl(5, 74%, 59%); + * --hue-5-2: hsl(344, 84%, 43%); + * --hue-6: hsl(35, 99%, 36%); + * --hue-6-2: hsl(35, 99%, 40%); + * --syntax-fg: hsl(230, 8%, 24%); + * --syntax-bg: hsl(230, 1%, 98%); + * --syntax-gutter: hsl(230, 1%, 62%); + * --syntax-guide: hsla(230, 8%, 24%, 0.2); + * --syntax-accent: hsl(230, 100%, 66%); + * From syntax-variables.less + * --syntax-selection-color: hsl(230, 1%, 90%); + * --syntax-gutter-background-color-selected: hsl(230, 1%, 90%); + * --syntax-cursor-line: hsla(230, 8%, 24%, 0.05); + */ + +code[class*='language-'], +pre[class*='language-'] { + background: #f4f7f9; + color: hsl(230, 8%, 24%); + font-family: 'Fira Code', 'Fira Mono', Menlo, Consolas, 'DejaVu Sans Mono', + monospace; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + line-height: 1.5; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +/* Selection */ +code[class*='language-']::-moz-selection, +code[class*='language-'] *::-moz-selection, +pre[class*='language-'] *::-moz-selection { + background: hsl(230, 1%, 90%); + color: inherit; +} + +code[class*='language-']::selection, +code[class*='language-'] *::selection, +pre[class*='language-'] *::selection { + background: hsl(230, 1%, 90%); + color: inherit; +} + +/* Code blocks */ +pre[class*='language-'] { + padding: 1em; + /* margin: 0.5em 0; */ + overflow: auto; + border-radius: 0.3em; +} + +/* Inline code */ +:not(pre) > code[class*='language-'] { + padding: 0.2em 0.3em; + border-radius: 0.3em; + white-space: normal; +} + +.token.comment, +.token.prolog, +.token.cdata { + color: hsl(230, 4%, 64%); +} + +.token.doctype, +.token.punctuation, +.token.entity { + color: hsl(230, 8%, 24%); +} + +.token.attr-name, +.token.class-name, +.token.boolean, +.token.constant, +.token.number, +.token.atrule { + color: hsl(35, 99%, 36%); +} + +.token.keyword { + color: hsl(301, 63%, 40%); +} + +.token.property, +.token.tag, +.token.symbol, +.token.deleted, +.token.important { + color: hsl(5, 74%, 59%); +} + +.token.selector, +.token.string, +.token.char, +.token.builtin, +.token.inserted, +.token.regex, +.token.attr-value, +.token.attr-value > .token.punctuation { + color: hsl(119, 34%, 47%); +} + +.token.variable, +.token.operator, +.token.function { + color: hsl(221, 87%, 60%); +} + +.token.url { + color: hsl(198, 99%, 37%); +} + +/* HTML overrides */ +.token.attr-value > .token.punctuation.attr-equals, +.token.special-attr > .token.attr-value > .token.value.css { + color: hsl(230, 8%, 24%); +} + +/* CSS overrides */ +.language-css .token.selector { + color: hsl(5, 74%, 59%); +} + +.language-css .token.property { + color: hsl(230, 8%, 24%); +} + +.language-css .token.function, +.language-css .token.url > .token.function { + color: hsl(198, 99%, 37%); +} + +.language-css .token.url > .token.string.url { + color: hsl(119, 34%, 47%); +} + +.language-css .token.important, +.language-css .token.atrule .token.rule { + color: hsl(301, 63%, 40%); +} + +/* JS overrides */ +.language-javascript .token.operator { + color: hsl(301, 63%, 40%); +} + +.language-javascript + .token.template-string + > .token.interpolation + > .token.interpolation-punctuation.punctuation { + color: hsl(344, 84%, 43%); +} + +/* JSON overrides */ +.language-json .token.operator { + color: hsl(230, 8%, 24%); +} + +.language-json .token.null.keyword { + color: hsl(35, 99%, 36%); +} + +/* MD overrides */ +.language-markdown .token.url, +.language-markdown .token.url > .token.operator, +.language-markdown .token.url-reference.url > .token.string { + color: hsl(230, 8%, 24%); +} + +.language-markdown .token.url > .token.content { + color: hsl(221, 87%, 60%); +} + +.language-markdown .token.url > .token.url, +.language-markdown .token.url-reference.url { + color: hsl(198, 99%, 37%); +} + +.language-markdown .token.blockquote.punctuation, +.language-markdown .token.hr.punctuation { + color: hsl(230, 4%, 64%); + font-style: italic; +} + +.language-markdown .token.code-snippet { + color: hsl(119, 34%, 47%); +} + +.language-markdown .token.bold .token.content { + color: hsl(35, 99%, 36%); +} + +.language-markdown .token.italic .token.content { + color: hsl(301, 63%, 40%); +} + +.language-markdown .token.strike .token.content, +.language-markdown .token.strike .token.punctuation, +.language-markdown .token.list.punctuation, +.language-markdown .token.title.important > .token.punctuation { + color: hsl(5, 74%, 59%); +} + +/* General */ +.token.bold { + font-weight: bold; +} + +.token.comment, +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} + +.token.namespace { + opacity: 0.8; +} + +/* Plugin overrides */ +/* Selectors should have higher specificity than those in the plugins' default stylesheets */ + +/* Show Invisibles plugin overrides */ +.token.token.tab:not(:empty):before, +.token.token.cr:before, +.token.token.lf:before, +.token.token.space:before { + color: hsla(230, 8%, 24%, 0.2); +} + +/* Toolbar plugin overrides */ +/* Space out all buttons and move them away from the right edge of the code block */ +div.code-toolbar > .toolbar.toolbar > .toolbar-item { + margin-right: 0.4em; +} + +/* Styling the buttons */ +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span { + background: hsl(230, 1%, 90%); + color: hsl(230, 6%, 44%); + padding: 0.1em 0.4em; + border-radius: 0.3em; +} + +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus { + background: hsl(230, 1%, 78%); /* custom: darken(--syntax-bg, 20%) */ + color: hsl(230, 8%, 24%); +} + +/* Line Highlight plugin overrides */ +/* The highlighted line itself */ +.line-highlight.line-highlight { + background: hsla(230, 8%, 24%, 0.05); +} + +/* Default line numbers in Line Highlight plugin */ +.line-highlight.line-highlight:before, +.line-highlight.line-highlight[data-end]:after { + background: hsl(230, 1%, 90%); + color: hsl(230, 8%, 24%); + padding: 0.1em 0.6em; + border-radius: 0.3em; + box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2); /* same as Toolbar plugin default */ +} + +/* Hovering over a linkable line number (in the gutter area) */ +/* Requires Line Numbers plugin as well */ +pre[id].linkable-line-numbers.linkable-line-numbers + span.line-numbers-rows + > span:hover:before { + background-color: hsla(230, 8%, 24%, 0.05); +} + +/* Line Numbers and Command Line plugins overrides */ +/* Line separating gutter from coding area */ +.line-numbers.line-numbers .line-numbers-rows, +.command-line .command-line-prompt { + border-right-color: hsla(230, 8%, 24%, 0.2); +} + +/* Stuff in the gutter */ +.line-numbers .line-numbers-rows > span:before, +.command-line .command-line-prompt > span:before { + color: hsl(230, 1%, 62%); +} + +/* Match Braces plugin overrides */ +/* Note: Outline colour is inherited from the braces */ +.rainbow-braces .token.token.punctuation.brace-level-1, +.rainbow-braces .token.token.punctuation.brace-level-5, +.rainbow-braces .token.token.punctuation.brace-level-9 { + color: hsl(5, 74%, 59%); +} + +.rainbow-braces .token.token.punctuation.brace-level-2, +.rainbow-braces .token.token.punctuation.brace-level-6, +.rainbow-braces .token.token.punctuation.brace-level-10 { + color: hsl(119, 34%, 47%); +} + +.rainbow-braces .token.token.punctuation.brace-level-3, +.rainbow-braces .token.token.punctuation.brace-level-7, +.rainbow-braces .token.token.punctuation.brace-level-11 { + color: hsl(221, 87%, 60%); +} + +.rainbow-braces .token.token.punctuation.brace-level-4, +.rainbow-braces .token.token.punctuation.brace-level-8, +.rainbow-braces .token.token.punctuation.brace-level-12 { + color: hsl(301, 63%, 40%); +} + +/* Diff Highlight plugin overrides */ +/* Taken from https://github.com/atom/github/blob/master/styles/variables.less */ +pre.diff-highlight > code .token.token.deleted:not(.prefix), +pre > code.diff-highlight .token.token.deleted:not(.prefix) { + background-color: hsla(353, 100%, 66%, 0.15); +} + +pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection, +pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection { + background-color: hsla(353, 95%, 66%, 0.25); +} + +pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection, +pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection { + background-color: hsla(353, 95%, 66%, 0.25); +} + +pre.diff-highlight > code .token.token.inserted:not(.prefix), +pre > code.diff-highlight .token.token.inserted:not(.prefix) { + background-color: hsla(137, 100%, 55%, 0.15); +} + +pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection, +pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection { + background-color: hsla(135, 73%, 55%, 0.25); +} + +pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection, +pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection { + background-color: hsla(135, 73%, 55%, 0.25); +} + +/* Previewers plugin overrides */ +/* Based on https://github.com/atom-community/atom-ide-datatip/blob/master/styles/atom-ide-datatips.less and https://github.com/atom/atom/blob/master/packages/one-light-ui */ +/* Border around popup */ +.prism-previewer.prism-previewer:before, +.prism-previewer-gradient.prism-previewer-gradient div { + border-color: hsl(0, 0, 95%); +} + +/* Angle and time should remain as circles and are hence not included */ +.prism-previewer-color.prism-previewer-color:before, +.prism-previewer-gradient.prism-previewer-gradient div, +.prism-previewer-easing.prism-previewer-easing:before { + border-radius: 0.3em; +} + +/* Triangles pointing to the code */ +.prism-previewer.prism-previewer:after { + border-top-color: hsl(0, 0, 95%); +} + +.prism-previewer-flipped.prism-previewer-flipped.after { + border-bottom-color: hsl(0, 0, 95%); +} + +/* Background colour within the popup */ +.prism-previewer-angle.prism-previewer-angle:before, +.prism-previewer-time.prism-previewer-time:before, +.prism-previewer-easing.prism-previewer-easing { + background: hsl(0, 0%, 100%); +} + +/* For angle, this is the positive area (eg. 90deg will display one quadrant in this colour) */ +/* For time, this is the alternate colour */ +.prism-previewer-angle.prism-previewer-angle circle, +.prism-previewer-time.prism-previewer-time circle { + stroke: hsl(230, 8%, 24%); + stroke-opacity: 1; +} + +/* Stroke colours of the handle, direction point, and vector itself */ +.prism-previewer-easing.prism-previewer-easing circle, +.prism-previewer-easing.prism-previewer-easing path, +.prism-previewer-easing.prism-previewer-easing line { + stroke: hsl(230, 8%, 24%); +} + +/* Fill colour of the handle */ +.prism-previewer-easing.prism-previewer-easing circle { + fill: transparent; +} diff --git a/app/utils/documents.server.ts b/app/utils/documents.server.ts index 469f3dce..57e0467f 100644 --- a/app/utils/documents.server.ts +++ b/app/utils/documents.server.ts @@ -5,16 +5,7 @@ import { bundleMDX } from 'mdx-bundler' import * as graymatter from 'gray-matter' import { fetchCached } from '~/utils/cache.server' import remarkGfm from 'remark-gfm' -import remarkTwoslash from 'remark-shiki-twoslash' import rehypeSlug from 'rehype-slug' -import rehypeRaw from 'rehype-raw' -import { nodeTypes } from '@mdx-js/mdx' - -// Hack for broken CJS/ESM export compatibility -const remarkShikiTwoslash = - process.env.NODE_ENV === 'development' - ? remarkTwoslash - : remarkTwoslash.default type BundledMDX = Awaited> @@ -209,16 +200,8 @@ export async function markdownToMdx(content: string) { const mdx = await bundleMDX<{ title: string }>({ source: content, mdxOptions: (options) => { - options.remarkPlugins = [ - ...(options.remarkPlugins ?? []), - remarkGfm, - [remarkShikiTwoslash, { themes: ['github-light', 'github-dark'] }], - ] - options.rehypePlugins = [ - ...(options.rehypePlugins ?? []), - rehypeSlug, - [rehypeRaw, { passThrough: nodeTypes }] as any, // TODO: remove when types are fixed - ] + options.remarkPlugins = [...(options.remarkPlugins ?? []), remarkGfm] + options.rehypePlugins = [...(options.rehypePlugins ?? []), rehypeSlug] return options }, }) diff --git a/package.json b/package.json index 8a8a9efd..19ef33f8 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,6 @@ "@docsearch/css": "^3.5.2", "@docsearch/react": "^3.5.2", "@headlessui/react": "1.7.17", - "@mdx-js/mdx": "^2.3.0", "@octokit/graphql": "^7.0.2", "@octokit/rest": "^20.0.2", "@remix-run/node": "^2.4.1", @@ -32,14 +31,14 @@ "isbot": "^3.7.0", "lru-cache": "^7.13.1", "mdx-bundler": "^9.2.1", + "prism-react-renderer": "^2.3.1", + "prismjs": "^1.29.0", "qss": "^3.0.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-icons": "^4.12.0", - "rehype-raw": "^7.0.0", "rehype-slug": "^5.1.0", "remark-gfm": "^3.0.1", - "remark-shiki-twoslash": "^3.1.3", "remove-markdown": "^0.5.0", "tailwind-merge": "^1.14.0", "tiny-invariant": "^1.3.1" @@ -54,6 +53,7 @@ "eslint": "^8.53.0", "eslint-plugin-unicorn": "^49.0.0", "postcss": "^8.4.31", + "postcss-import": "^16.0.0", "prettier": "^2.8.8", "tailwindcss": "^3.3.5", "typescript": "^5.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 69d2b95a..e2b2325f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,9 +14,6 @@ dependencies: '@headlessui/react': specifier: 1.7.17 version: 1.7.17(react-dom@18.2.0)(react@18.2.0) - '@mdx-js/mdx': - specifier: ^2.3.0 - version: 2.3.0 '@octokit/graphql': specifier: ^7.0.2 version: 7.0.2 @@ -62,6 +59,12 @@ dependencies: mdx-bundler: specifier: ^9.2.1 version: 9.2.1(esbuild@0.19.5) + prism-react-renderer: + specifier: ^2.3.1 + version: 2.3.1(react@18.2.0) + prismjs: + specifier: ^1.29.0 + version: 1.29.0 qss: specifier: ^3.0.0 version: 3.0.0 @@ -74,18 +77,12 @@ dependencies: react-icons: specifier: ^4.12.0 version: 4.12.0(react@18.2.0) - rehype-raw: - specifier: ^7.0.0 - version: 7.0.0 rehype-slug: specifier: ^5.1.0 version: 5.1.0 remark-gfm: specifier: ^3.0.1 version: 3.0.1 - remark-shiki-twoslash: - specifier: ^3.1.3 - version: 3.1.3(typescript@5.2.2) remove-markdown: specifier: ^0.5.0 version: 0.5.0 @@ -124,6 +121,9 @@ devDependencies: postcss: specifier: ^8.4.31 version: 8.4.31 + postcss-import: + specifier: ^16.0.0 + version: 16.0.0(postcss@8.4.31) prettier: specifier: ^2.8.8 version: 2.8.8 @@ -2070,12 +2070,6 @@ packages: dependencies: '@types/unist': 2.0.9 - /@types/hast@3.0.2: - resolution: {integrity: sha512-B5hZHgHsXvfCoO3xgNJvBnX7N8p86TqQeGKXcokW4XXi+qY4vxxPSFYofytvVmpFxzPv7oxDQzjg5Un5m2/xiw==} - dependencies: - '@types/unist': 3.0.1 - dev: false - /@types/json-schema@7.0.14: resolution: {integrity: sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==} dev: true @@ -2093,12 +2087,6 @@ packages: dependencies: '@types/unist': 2.0.9 - /@types/mdast@4.0.2: - resolution: {integrity: sha512-tYR83EignvhYO9iU3kDg8V28M0jqyh9zzp5GV+EO+AYnyUl3P5ltkTeJuTiFZQFz670FSb3EwT/6LQdX+UdKfw==} - dependencies: - '@types/unist': 3.0.1 - dev: false - /@types/mdx@2.0.9: resolution: {integrity: sha512-OKMdj17y8Cs+k1r0XFyp59ChSOwf8ODGtMQ4mnpfz5eFDk1aO41yN3pSKGuvVzmWAkFp37seubY1tzOVpwfWwg==} @@ -2119,6 +2107,10 @@ packages: resolution: {integrity: sha512-ehPtgRgaULsFG8x0NeYJvmyH1hmlfsNLujHe9dQEia/7MAJYdzMSi19JtchUHjmBA6XC/75dK55mzZH+RyieSg==} dev: true + /@types/prismjs@1.26.3: + resolution: {integrity: sha512-A0D0aTXvjlqJ5ZILMz3rNfDBOx9hHxLZYv2by47Sm/pqW35zzjusrZTryatjN/Rf8Us2gZrJD+KeHbUSTux1Cw==} + dev: false + /@types/prop-types@15.7.9: resolution: {integrity: sha512-n1yyPsugYNSmHgxDFjicaI2+gCNjsBck8UX9kuofAKlc0h1bL+20oSF72KeNaW2DUlesbEVCFgyV2dPGTiY42g==} @@ -2153,10 +2145,6 @@ packages: /@types/unist@2.0.9: resolution: {integrity: sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==} - /@types/unist@3.0.1: - resolution: {integrity: sha512-ue/hDUpPjC85m+PM9OQDMZr3LywT+CT6mPsQq8OJtCLiERkGRcQUFvu9XASF5XWqyZFXbf15lvb3JFJ4dRLWPg==} - dev: false - /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.53.0)(typescript@5.2.2): resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2287,34 +2275,9 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@typescript/twoslash@3.1.0: - resolution: {integrity: sha512-kTwMUQ8xtAZaC4wb2XuLkPqFVBj2dNBueMQ89NWEuw87k2nLBbuafeG5cob/QEr6YduxIdTVUjix0MtC7mPlmg==} - dependencies: - '@typescript/vfs': 1.3.5 - debug: 4.3.4 - lz-string: 1.5.0 - transitivePeerDependencies: - - supports-color - dev: false - - /@typescript/vfs@1.3.4: - resolution: {integrity: sha512-RbyJiaAGQPIcAGWFa3jAXSuAexU4BFiDRF1g3hy7LmRqfNpYlTQWGXjcrOaVZjJ8YkkpuwG0FcsYvtWQpd9igQ==} - dependencies: - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - dev: false - - /@typescript/vfs@1.3.5: - resolution: {integrity: sha512-pI8Saqjupf9MfLw7w2+og+fmb0fZS0J6vsKXXrp4/PDXEFvntgzXmChCXC/KefZZS0YGS6AT8e0hGAJcTsdJlg==} - dependencies: - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - dev: false - /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + dev: true /@vanilla-extract/babel-plugin-debug-ids@1.0.3: resolution: {integrity: sha512-vm4jYu1xhSa6ofQ9AhIpR3DkAp4c+eoR1Rpm8/TQI4DmWbmGbOjYRcqV0aWsfaIlNhN4kFuxFMKBNN9oG6iRzA==} @@ -2961,6 +2924,11 @@ packages: engines: {node: '>=0.8'} dev: true + /clsx@2.1.0: + resolution: {integrity: sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==} + engines: {node: '>=6'} + dev: false + /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -3211,12 +3179,6 @@ packages: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - /devlop@1.1.0: - resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} - dependencies: - dequal: 2.0.3 - dev: false - /didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} @@ -3303,11 +3265,6 @@ packages: tapable: 2.2.1 dev: true - /entities@4.5.0: - resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} - engines: {node: '>=0.12'} - dev: false - /err-code@2.0.3: resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==} dev: true @@ -4126,11 +4083,6 @@ packages: dependencies: format: 0.2.2 - /fenceparser@1.1.1: - resolution: {integrity: sha512-VdkTsK7GWLT0VWMK5S5WTAPn61wJ98WPFwJiRHumhg4ESNUO/tnkU8bzzzc62o6Uk1SVhuZFLnakmDA4SGV7wA==} - engines: {node: '>=12'} - dev: false - /fetch-blob@3.2.0: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} @@ -4504,19 +4456,6 @@ packages: dependencies: function-bind: 1.1.2 - /hast-util-from-parse5@8.0.1: - resolution: {integrity: sha512-Er/Iixbc7IEa7r/XLtuG52zoqn/b3Xng/w6aZQ0xGVxzhw5xUFxcRqdPzP6yFi/4HBYRaifaI5fQ1RH8n0ZeOQ==} - dependencies: - '@types/hast': 3.0.2 - '@types/unist': 3.0.1 - devlop: 1.1.0 - hastscript: 8.0.0 - property-information: 6.4.0 - vfile: 6.0.1 - vfile-location: 5.0.2 - web-namespaces: 2.0.1 - dev: false - /hast-util-has-property@2.0.1: resolution: {integrity: sha512-X2+RwZIMTMKpXUzlotatPzWj8bspCymtXH3cfG3iQKV+wPF53Vgaqxi/eLqGck0wKq1kS9nvoB1wchbCPEL8sg==} dev: false @@ -4527,30 +4466,6 @@ packages: '@types/hast': 2.3.7 dev: false - /hast-util-parse-selector@4.0.0: - resolution: {integrity: sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==} - dependencies: - '@types/hast': 3.0.2 - dev: false - - /hast-util-raw@9.0.1: - resolution: {integrity: sha512-5m1gmba658Q+lO5uqL5YNGQWeh1MYWZbZmWrM5lncdcuiXuo5E2HT/CIOp0rLF8ksfSwiCVJ3twlgVRyTGThGA==} - dependencies: - '@types/hast': 3.0.2 - '@types/unist': 3.0.1 - '@ungap/structured-clone': 1.2.0 - hast-util-from-parse5: 8.0.1 - hast-util-to-parse5: 8.0.0 - html-void-elements: 3.0.0 - mdast-util-to-hast: 13.0.2 - parse5: 7.1.2 - unist-util-position: 5.0.0 - unist-util-visit: 5.0.0 - vfile: 6.0.1 - web-namespaces: 2.0.1 - zwitch: 2.0.4 - dev: false - /hast-util-to-estree@2.3.3: resolution: {integrity: sha512-ihhPIUPxN0v0w6M5+IiAZZrn0LH2uZomeWwhn7uP7avZC6TE7lIiEh2yBMPr5+zi1aUCXq6VoYRgs2Bw9xmycQ==} dependencies: @@ -4572,18 +4487,6 @@ packages: transitivePeerDependencies: - supports-color - /hast-util-to-parse5@8.0.0: - resolution: {integrity: sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==} - dependencies: - '@types/hast': 3.0.2 - comma-separated-tokens: 2.0.3 - devlop: 1.1.0 - property-information: 6.4.0 - space-separated-tokens: 2.0.2 - web-namespaces: 2.0.1 - zwitch: 2.0.4 - dev: false - /hast-util-to-string@2.0.0: resolution: {integrity: sha512-02AQ3vLhuH3FisaMM+i/9sm4OXGSq1UhOOCpTLLQtHdL3tZt7qil69r8M8iDkZYyC0HCFylcYoP+8IO7ddta1A==} dependencies: @@ -4593,16 +4496,6 @@ packages: /hast-util-whitespace@2.0.1: resolution: {integrity: sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng==} - /hastscript@8.0.0: - resolution: {integrity: sha512-dMOtzCEd3ABUeSIISmrETiKuyydk1w0pa+gE/uormcTpSYuaNJPbX1NU3JLyscSLjwAQM8bWMhhIlnCqnRvDTw==} - dependencies: - '@types/hast': 3.0.2 - comma-separated-tokens: 2.0.3 - hast-util-parse-selector: 4.0.0 - property-information: 6.4.0 - space-separated-tokens: 2.0.2 - dev: false - /hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true @@ -4614,10 +4507,6 @@ packages: lru-cache: 7.18.3 dev: true - /html-void-elements@3.0.0: - resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} - dev: false - /http-errors@2.0.0: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} @@ -5056,6 +4945,7 @@ packages: /jsonc-parser@3.2.0: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} + dev: true /jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -5204,6 +5094,7 @@ packages: /lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true + dev: true /markdown-extensions@1.1.1: resolution: {integrity: sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q==} @@ -5379,19 +5270,6 @@ packages: unist-util-position: 4.0.4 unist-util-visit: 4.1.2 - /mdast-util-to-hast@13.0.2: - resolution: {integrity: sha512-U5I+500EOOw9e3ZrclN3Is3fRpw8c19SMyNZlZ2IS+7vLsNzb2Om11VpIVOR+/0137GhZsFEF6YiKD5+0Hr2Og==} - dependencies: - '@types/hast': 3.0.2 - '@types/mdast': 4.0.2 - '@ungap/structured-clone': 1.2.0 - devlop: 1.1.0 - micromark-util-sanitize-uri: 2.0.0 - trim-lines: 3.0.1 - unist-util-position: 5.0.0 - unist-util-visit: 5.0.0 - dev: false - /mdast-util-to-markdown@1.5.0: resolution: {integrity: sha512-bbv7TPv/WC49thZPg3jXuqzuvI45IL2EVAr/KxF0BSdHsU0ceFHOmwQn6evxAh1GaoK/6GQ1wp4R4oW2+LFL/A==} dependencies: @@ -5665,13 +5543,6 @@ packages: micromark-util-symbol: 1.1.0 micromark-util-types: 1.1.0 - /micromark-util-character@2.0.1: - resolution: {integrity: sha512-3wgnrmEAJ4T+mGXAUfMvMAbxU9RDG43XmGce4j6CwPtVxB3vfwXSZ6KhFwDzZ3mZHhmPimMAXg71veiBGzeAZw==} - dependencies: - micromark-util-symbol: 2.0.0 - micromark-util-types: 2.0.0 - dev: false - /micromark-util-chunked@1.1.0: resolution: {integrity: sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ==} dependencies: @@ -5706,10 +5577,6 @@ packages: /micromark-util-encode@1.1.0: resolution: {integrity: sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw==} - /micromark-util-encode@2.0.0: - resolution: {integrity: sha512-pS+ROfCXAGLWCOc8egcBvT0kf27GoWMqtdarNfDcjb6YLuV5cM3ioG45Ys2qOVqeqSbjaKg72vU+Wby3eddPsA==} - dev: false - /micromark-util-events-to-acorn@1.2.3: resolution: {integrity: sha512-ij4X7Wuc4fED6UoLWkmo0xJQhsktfNh1J0m8g4PbIMPlx+ek/4YdW5mvbye8z/aZvAPUoxgXHrwVlXAPKMRp1w==} dependencies: @@ -5742,14 +5609,6 @@ packages: micromark-util-encode: 1.1.0 micromark-util-symbol: 1.1.0 - /micromark-util-sanitize-uri@2.0.0: - resolution: {integrity: sha512-WhYv5UEcZrbAtlsnPuChHUAsu/iBPOVaEVsntLBIdpibO0ddy8OzavZz3iL2xVvBZOpolujSliP65Kq0/7KIYw==} - dependencies: - micromark-util-character: 2.0.1 - micromark-util-encode: 2.0.0 - micromark-util-symbol: 2.0.0 - dev: false - /micromark-util-subtokenize@1.1.0: resolution: {integrity: sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A==} dependencies: @@ -5761,17 +5620,9 @@ packages: /micromark-util-symbol@1.1.0: resolution: {integrity: sha512-uEjpEYY6KMs1g7QfJ2eX1SQEV+ZT4rUD3UcF6l57acZvLNK7PBZL+ty82Z1qhK1/yXIY4bdx04FKMgR0g4IAag==} - /micromark-util-symbol@2.0.0: - resolution: {integrity: sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==} - dev: false - /micromark-util-types@1.1.0: resolution: {integrity: sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==} - /micromark-util-types@2.0.0: - resolution: {integrity: sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==} - dev: false - /micromark@3.2.0: resolution: {integrity: sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==} dependencies: @@ -6272,12 +6123,6 @@ packages: engines: {node: '>=6'} dev: true - /parse5@7.1.2: - resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} - dependencies: - entities: 4.5.0 - dev: false - /parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} @@ -6388,6 +6233,18 @@ packages: read-cache: 1.0.0 resolve: 1.22.8 + /postcss-import@16.0.0(postcss@8.4.31): + resolution: {integrity: sha512-e77lhVvrD1I2y7dYmBv0k9ULTdArgEYZt97T4w6sFIU5uxIHvDFQlKgUUyY7v7Barj0Yf/zm5A4OquZN7jKm5Q==} + engines: {node: '>=18.0.0'} + peerDependencies: + postcss: ^8.0.0 + dependencies: + postcss: 8.4.31 + postcss-value-parser: 4.2.0 + read-cache: 1.0.0 + resolve: 1.22.8 + dev: true + /postcss-js@4.0.1(postcss@8.4.31): resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} engines: {node: ^12 || ^14 || >= 16} @@ -6541,6 +6398,21 @@ packages: parse-ms: 2.1.0 dev: true + /prism-react-renderer@2.3.1(react@18.2.0): + resolution: {integrity: sha512-Rdf+HzBLR7KYjzpJ1rSoxT9ioO85nZngQEoFIhL07XhtJHlCU3SOz0GJ6+qvMyQe0Se+BV3qpe6Yd/NmQF5Juw==} + peerDependencies: + react: '>=16.0.0' + dependencies: + '@types/prismjs': 1.26.3 + clsx: 2.1.0 + react: 18.2.0 + dev: false + + /prismjs@1.29.0: + resolution: {integrity: sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==} + engines: {node: '>=6'} + dev: false + /proc-log@3.0.0: resolution: {integrity: sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -6764,10 +6636,6 @@ packages: which-builtin-type: 1.1.3 dev: true - /regenerator-runtime@0.13.11: - resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} - dev: false - /regenerator-runtime@0.14.0: resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} @@ -6797,14 +6665,6 @@ packages: jsesc: 0.5.0 dev: true - /rehype-raw@7.0.0: - resolution: {integrity: sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==} - dependencies: - '@types/hast': 3.0.2 - hast-util-raw: 9.0.1 - vfile: 6.0.1 - dev: false - /rehype-slug@5.1.0: resolution: {integrity: sha512-Gf91dJoXneiorNEnn+Phx97CO7oRMrpi+6r155tTxzGuLtm+QrI4cTwCa9e1rtePdL4i9tSO58PeSS6HWfgsiw==} dependencies: @@ -6870,25 +6730,6 @@ packages: mdast-util-to-hast: 12.3.0 unified: 10.1.2 - /remark-shiki-twoslash@3.1.3(typescript@5.2.2): - resolution: {integrity: sha512-4e8OH3ySOCw5wUbDcPszokOKjKuebOqlP2WlySvC7ITBOq27BiGsFlq+FNWhxppZ+JzhTWah4gQrnMjX3KDbAQ==} - peerDependencies: - typescript: '>3' - dependencies: - '@types/unist': 2.0.9 - '@typescript/twoslash': 3.1.0 - '@typescript/vfs': 1.3.4 - fenceparser: 1.1.1 - regenerator-runtime: 0.13.11 - shiki: 0.10.1 - shiki-twoslash: 3.1.2(typescript@5.2.2) - tslib: 2.1.0 - typescript: 5.2.2 - unist-util-visit: 2.0.3 - transitivePeerDependencies: - - supports-color - dev: false - /remove-markdown@0.5.0: resolution: {integrity: sha512-x917M80K97K5IN1L8lUvFehsfhR8cYjGQ/yAMRI9E7JIKivtl5Emo5iD13DhMr+VojzMCiYk8V2byNPwT/oapg==} dev: false @@ -7127,28 +6968,6 @@ packages: engines: {node: '>=8'} dev: true - /shiki-twoslash@3.1.2(typescript@5.2.2): - resolution: {integrity: sha512-JBcRIIizi+exIA/OUhYkV6jtyeZco0ykCkIRd5sgwIt1Pm4pz+maoaRZpm6SkhPwvif4fCA7xOtJOykhpIV64Q==} - peerDependencies: - typescript: '>3' - dependencies: - '@typescript/twoslash': 3.1.0 - '@typescript/vfs': 1.3.4 - fenceparser: 1.1.1 - shiki: 0.10.1 - typescript: 5.2.2 - transitivePeerDependencies: - - supports-color - dev: false - - /shiki@0.10.1: - resolution: {integrity: sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==} - dependencies: - jsonc-parser: 3.2.0 - vscode-oniguruma: 1.7.0 - vscode-textmate: 5.2.0 - dev: false - /side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: @@ -7561,10 +7380,6 @@ packages: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true - /tslib@2.1.0: - resolution: {integrity: sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==} - dev: false - /tsutils@3.21.0(typescript@5.2.2): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -7692,21 +7507,11 @@ packages: /unist-util-generated@2.0.1: resolution: {integrity: sha512-qF72kLmPxAw0oN2fwpWIqbXAVyEqUzDHMsbtPvOudIlUzXYFIeQIuxXQCRCFh22B7cixvU0MG7m3MW8FTq/S+A==} - /unist-util-is@4.1.0: - resolution: {integrity: sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==} - dev: false - /unist-util-is@5.2.1: resolution: {integrity: sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==} dependencies: '@types/unist': 2.0.9 - /unist-util-is@6.0.0: - resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==} - dependencies: - '@types/unist': 3.0.1 - dev: false - /unist-util-position-from-estree@1.1.2: resolution: {integrity: sha512-poZa0eXpS+/XpoQwGwl79UUdea4ol2ZuCYguVaJS4qzIOMDzbqz8a3erUCOmubSZkaOuGamb3tX790iwOIROww==} dependencies: @@ -7717,12 +7522,6 @@ packages: dependencies: '@types/unist': 2.0.9 - /unist-util-position@5.0.0: - resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==} - dependencies: - '@types/unist': 3.0.1 - dev: false - /unist-util-remove-position@4.0.2: resolution: {integrity: sha512-TkBb0HABNmxzAcfLf4qsIbFbaPDvMO6wa3b3j4VcEzFVaw1LBKwnW4/sRJ/atSLSzoIg41JWEdnE7N6DIhGDGQ==} dependencies: @@ -7734,40 +7533,12 @@ packages: dependencies: '@types/unist': 2.0.9 - /unist-util-stringify-position@4.0.0: - resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} - dependencies: - '@types/unist': 3.0.1 - dev: false - - /unist-util-visit-parents@3.1.1: - resolution: {integrity: sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==} - dependencies: - '@types/unist': 2.0.9 - unist-util-is: 4.1.0 - dev: false - /unist-util-visit-parents@5.1.3: resolution: {integrity: sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==} dependencies: '@types/unist': 2.0.9 unist-util-is: 5.2.1 - /unist-util-visit-parents@6.0.1: - resolution: {integrity: sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==} - dependencies: - '@types/unist': 3.0.1 - unist-util-is: 6.0.0 - dev: false - - /unist-util-visit@2.0.3: - resolution: {integrity: sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==} - dependencies: - '@types/unist': 2.0.9 - unist-util-is: 4.1.0 - unist-util-visit-parents: 3.1.1 - dev: false - /unist-util-visit@4.1.2: resolution: {integrity: sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==} dependencies: @@ -7775,14 +7546,6 @@ packages: unist-util-is: 5.2.1 unist-util-visit-parents: 5.1.3 - /unist-util-visit@5.0.0: - resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==} - dependencies: - '@types/unist': 3.0.1 - unist-util-is: 6.0.0 - unist-util-visit-parents: 6.0.1 - dev: false - /universal-user-agent@6.0.1: resolution: {integrity: sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==} dev: false @@ -7862,26 +7625,12 @@ packages: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} - /vfile-location@5.0.2: - resolution: {integrity: sha512-NXPYyxyBSH7zB5U6+3uDdd6Nybz6o6/od9rk8bp9H8GR3L+cm/fC0uUTbqBmUTnMCUDslAGBOIKNfvvb+gGlDg==} - dependencies: - '@types/unist': 3.0.1 - vfile: 6.0.1 - dev: false - /vfile-message@3.1.4: resolution: {integrity: sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==} dependencies: '@types/unist': 2.0.9 unist-util-stringify-position: 3.0.3 - /vfile-message@4.0.2: - resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==} - dependencies: - '@types/unist': 3.0.1 - unist-util-stringify-position: 4.0.0 - dev: false - /vfile@5.3.7: resolution: {integrity: sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==} dependencies: @@ -7890,14 +7639,6 @@ packages: unist-util-stringify-position: 3.0.3 vfile-message: 3.1.4 - /vfile@6.0.1: - resolution: {integrity: sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==} - dependencies: - '@types/unist': 3.0.1 - unist-util-stringify-position: 4.0.0 - vfile-message: 4.0.2 - dev: false - /vite-node@0.28.5: resolution: {integrity: sha512-LmXb9saMGlrMZbXTvOveJKwMTBTNUH66c8rJnQ0ZPNX+myPEol64+szRzXtV5ORb0Hb/91yq+/D3oERoyAt6LA==} engines: {node: '>=v14.16.0'} @@ -8009,14 +7750,6 @@ packages: fsevents: 2.3.3 dev: true - /vscode-oniguruma@1.7.0: - resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} - dev: false - - /vscode-textmate@5.2.0: - resolution: {integrity: sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==} - dev: false - /wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: @@ -8030,10 +7763,6 @@ packages: optionalDependencies: '@zxing/text-encoding': 0.9.0 - /web-namespaces@2.0.1: - resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} - dev: false - /web-streams-polyfill@3.2.1: resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==} engines: {node: '>= 8'} diff --git a/postcss.config.cjs b/postcss.config.cjs index 4193e8ab..787f504d 100644 --- a/postcss.config.cjs +++ b/postcss.config.cjs @@ -1,3 +1,7 @@ module.exports = { - plugins: [require('tailwindcss'), require('autoprefixer')], + plugins: [ + require('tailwindcss'), + require('autoprefixer'), + require('postcss-import'), + ], } From 3ac8d0f28aa0d254864d5b52494c730a8c632404 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Tue, 9 Jan 2024 21:56:09 +1100 Subject: [PATCH 30/39] Working prism css --- app/components/CodeBlock.tsx | 78 +++- app/components/Mdx.tsx | 25 +- app/root.tsx | 2 + app/styles/app.css | 8 - app/styles/prismThemeDark.css | 717 ++++++++++++++-------------- app/styles/prismThemeLight.css | 821 +++++++++++++++++---------------- app/utils/svelteHighlighter.js | 150 ++++++ package.json | 1 - pnpm-lock.yaml | 15 - postcss.config.cjs | 6 +- 10 files changed, 999 insertions(+), 824 deletions(-) create mode 100644 app/utils/svelteHighlighter.js diff --git a/app/components/CodeBlock.tsx b/app/components/CodeBlock.tsx index 85f006ac..f3d13055 100644 --- a/app/components/CodeBlock.tsx +++ b/app/components/CodeBlock.tsx @@ -1,31 +1,67 @@ -import type { HTMLProps } from 'react' +import type { FC, HTMLAttributes, ReactElement } from 'react' import invariant from 'tiny-invariant' +import type { Language } from 'prism-react-renderer' +import { Highlight, Prism } from 'prism-react-renderer' +import { svelteHighlighter } from '~/utils/svelteHighlighter' +// Add back additional language support after `prism-react` upgrade +;(typeof global !== 'undefined' ? global : window).Prism = Prism -function getLanguageFromChildren(children: any): string | undefined { - const language = children[0]?.props?.children - return language ? language : undefined +// @ts-ignore Alias markup as vue highlight +Prism.languages.vue = Prism.languages.markup + +// Enable svelte syntax highlighter +svelteHighlighter() + +function getLanguageFromClassName(className: string) { + const match = className.match(/language-(\w+)/) + return match ? match[1] : '' +} + +function isLanguageSupported(lang: string): lang is Language { + return lang in Prism.languages } -export const CodeBlock = (props: HTMLProps) => { - const { children, className, style } = props +export const CodeBlock: FC> = ({ children }) => { invariant(!!children, 'children is required') - const lang = getLanguageFromChildren(children) + const child = children as ReactElement + const className = child.props?.className || '' + const userLang = getLanguageFromClassName(className) + const lang = isLanguageSupported(userLang) ? userLang : 'bash' + const code = child.props.children || '' return ( -
- {lang && ( -
+ + {({ className, tokens, getLineProps, getTokenProps }) => ( +
+
- {lang} -
- )} -
-        {children}
-      
+ > + {lang} +
+
+
+                
+                  {tokens.map((line, i) => (
+                    
+ {line.map((token, key) => ( + + ))} +
+ ))} +
+
+
+
+ )} +
) } diff --git a/app/components/Mdx.tsx b/app/components/Mdx.tsx index 26e4ba71..d42c8d82 100644 --- a/app/components/Mdx.tsx +++ b/app/components/Mdx.tsx @@ -42,22 +42,15 @@ const markdownComponents = { h4: makeHeading('h4'), h5: makeHeading('h5'), h6: makeHeading('h6'), - code: (props: HTMLProps) => { - const { className, children } = props - if (typeof children === 'string') { - // For inline code, this adds a background and outline - return ( - - ) - } else { - // For Shiki code blocks, this does nothing - return - } + code: ({ className = '', ...props }: React.HTMLProps) => { + return ( + + ) }, } diff --git a/app/root.tsx b/app/root.tsx index c3bd02c0..207a0778 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -1,6 +1,8 @@ import { Outlet, isRouteErrorResponse, useRouteError } from '@remix-run/react' import '~/styles/app.css' import '~/styles/carbon.css' +import '~/styles/prismThemeLight.css' +import '~/styles/prismThemeDark.css' import '@docsearch/css/dist/style.css' import { seo } from '~/utils/seo' import { RootDocument } from '~/components/RootDocument' diff --git a/app/styles/app.css b/app/styles/app.css index 8185c6d2..556ab49b 100644 --- a/app/styles/app.css +++ b/app/styles/app.css @@ -440,11 +440,3 @@ pre .logger.log-log svg { margin-left: 6px; margin-right: 9px; } - -@media (prefers-color-scheme: light) { - @import './prismThemeLight.css'; -} - -@media (prefers-color-scheme: dark) { - @import './prismThemeDark.css'; -} diff --git a/app/styles/prismThemeDark.css b/app/styles/prismThemeDark.css index bbd1ccef..64a18391 100644 --- a/app/styles/prismThemeDark.css +++ b/app/styles/prismThemeDark.css @@ -1,9 +1,10 @@ -/** +@media (prefers-color-scheme: dark) { + /** * One Dark theme for prism.js * Based on Atom's One Dark theme: https://github.com/atom/atom/tree/master/packages/one-dark-syntax */ -/** + /** * One Dark colours (accurate as of commit 8ae45ca on 6 Sep 2018) * From colors.less * --mono-1: hsl(220, 14%, 71%); @@ -28,419 +29,429 @@ * --syntax-cursor-line: hsla(220, 100%, 80%, 0.04); */ -code[class*='language-'], -pre[class*='language-'] { - background: hsl(220, 29%, 14%); - color: hsl(220, 14%, 71%); - text-shadow: 0 1px rgba(0, 0, 0, 0.3); - font-family: 'Fira Code', 'Fira Mono', Menlo, Consolas, 'DejaVu Sans Mono', - monospace; - direction: ltr; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - line-height: 1.5; - -moz-tab-size: 2; - -o-tab-size: 2; - tab-size: 2; - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; -} + code[class*='language-'], + pre[class*='language-'] { + background: hsl(220, 29%, 14%); + color: hsl(220, 14%, 71%); + text-shadow: 0 1px rgba(0, 0, 0, 0.3); + font-family: 'Fira Code', 'Fira Mono', Menlo, Consolas, 'DejaVu Sans Mono', + monospace; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + line-height: 1.5; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; + } -/* Selection */ -code[class*='language-']::-moz-selection, -code[class*='language-'] *::-moz-selection, -pre[class*='language-'] *::-moz-selection { - background: hsl(220, 13%, 28%); - color: inherit; - text-shadow: none; -} + /* Selection */ + code[class*='language-']::-moz-selection, + code[class*='language-'] *::-moz-selection, + pre[class*='language-'] *::-moz-selection { + background: hsl(220, 13%, 28%); + color: inherit; + text-shadow: none; + } -code[class*='language-']::selection, -code[class*='language-'] *::selection, -pre[class*='language-'] *::selection { - background: hsl(220, 13%, 28%); - color: inherit; - text-shadow: none; -} + code[class*='language-']::selection, + code[class*='language-'] *::selection, + pre[class*='language-'] *::selection { + background: hsl(220, 13%, 28%); + color: inherit; + text-shadow: none; + } -/* Code blocks */ -pre[class*='language-'] { - padding: 1em; - /* margin: 0.5em 0; */ - overflow: auto; - border-radius: 0.3em; -} + /* Code blocks */ + pre[class*='language-'] { + padding: 1em; + /* margin: 0.5em 0; */ + overflow: auto; + border-radius: 0.3em; + } -/* Inline code */ -:not(pre) > code[class*='language-'] { - padding: 0.2em 0.3em; - border-radius: 0.3em; - white-space: normal; -} + /* Inline code */ + :not(pre) > code[class*='language-'] { + padding: 0.2em 0.3em; + border-radius: 0.3em; + white-space: normal; + } -/* Print */ -@media print { - code[class*='language-'], - pre[class*='language-'] { - text-shadow: none; + /* Print */ + @media print { + code[class*='language-'], + pre[class*='language-'] { + text-shadow: none; + } } -} -.token.comment, -.token.prolog, -.token.cdata { - color: hsl(220, 10%, 40%); -} + .token.comment, + .token.prolog, + .token.cdata { + color: hsl(220, 10%, 40%); + } -.token.doctype, -.token.punctuation, -.token.entity { - color: hsl(220, 14%, 71%); -} + .token.doctype, + .token.punctuation, + .token.entity { + color: hsl(220, 14%, 71%); + } -.token.attr-name, -.token.class-name, -.token.boolean, -.token.constant, -.token.number, -.token.atrule { - color: hsl(29, 54%, 61%); -} + .token.attr-name, + .token.class-name, + .token.boolean, + .token.constant, + .token.number, + .token.atrule { + color: hsl(29, 54%, 61%); + } -.token.keyword { - color: hsl(286, 60%, 67%); -} + .token.keyword { + color: hsl(286, 60%, 67%); + } -.token.property, -.token.tag, -.token.symbol, -.token.deleted, -.token.important { - color: hsl(355, 65%, 65%); -} + .token.property, + .token.tag, + .token.symbol, + .token.deleted, + .token.important { + color: hsl(355, 65%, 65%); + } -.token.selector, -.token.string, -.token.char, -.token.builtin, -.token.inserted, -.token.regex, -.token.attr-value, -.token.attr-value > .token.punctuation { - color: hsl(95, 38%, 62%); -} + .token.selector, + .token.string, + .token.char, + .token.builtin, + .token.inserted, + .token.regex, + .token.attr-value, + .token.attr-value > .token.punctuation { + color: hsl(95, 38%, 62%); + } -.token.variable, -.token.operator, -.token.function { - color: hsl(207, 82%, 66%); -} + .token.variable, + .token.operator, + .token.function { + color: hsl(207, 82%, 66%); + } -.token.url { - color: hsl(187, 47%, 55%); -} + .token.url { + color: hsl(187, 47%, 55%); + } -/* HTML overrides */ -.token.attr-value > .token.punctuation.attr-equals, -.token.special-attr > .token.attr-value > .token.value.css { - color: hsl(220, 14%, 71%); -} + /* HTML overrides */ + .token.attr-value > .token.punctuation.attr-equals, + .token.special-attr > .token.attr-value > .token.value.css { + color: hsl(220, 14%, 71%); + } -/* CSS overrides */ -.language-css .token.selector { - color: hsl(355, 65%, 65%); -} + /* CSS overrides */ + .language-css .token.selector { + color: hsl(355, 65%, 65%); + } -.language-css .token.property { - color: hsl(220, 14%, 71%); -} + .language-css .token.property { + color: hsl(220, 14%, 71%); + } -.language-css .token.function, -.language-css .token.url > .token.function { - color: hsl(187, 47%, 55%); -} + .language-css .token.function, + .language-css .token.url > .token.function { + color: hsl(187, 47%, 55%); + } -.language-css .token.url > .token.string.url { - color: hsl(95, 38%, 62%); -} + .language-css .token.url > .token.string.url { + color: hsl(95, 38%, 62%); + } -.language-css .token.important, -.language-css .token.atrule .token.rule { - color: hsl(286, 60%, 67%); -} + .language-css .token.important, + .language-css .token.atrule .token.rule { + color: hsl(286, 60%, 67%); + } -/* JS overrides */ -.language-javascript .token.operator { - color: hsl(286, 60%, 67%); -} + /* JS overrides */ + .language-javascript .token.operator { + color: hsl(286, 60%, 67%); + } -.language-javascript - .token.template-string - > .token.interpolation - > .token.interpolation-punctuation.punctuation { - color: hsl(5, 48%, 51%); -} + .language-javascript + .token.template-string + > .token.interpolation + > .token.interpolation-punctuation.punctuation { + color: hsl(5, 48%, 51%); + } -/* JSON overrides */ -.language-json .token.operator { - color: hsl(220, 14%, 71%); -} + /* JSON overrides */ + .language-json .token.operator { + color: hsl(220, 14%, 71%); + } -.language-json .token.null.keyword { - color: hsl(29, 54%, 61%); -} + .language-json .token.null.keyword { + color: hsl(29, 54%, 61%); + } -/* MD overrides */ -.language-markdown .token.url, -.language-markdown .token.url > .token.operator, -.language-markdown .token.url-reference.url > .token.string { - color: hsl(220, 14%, 71%); -} + /* MD overrides */ + .language-markdown .token.url, + .language-markdown .token.url > .token.operator, + .language-markdown .token.url-reference.url > .token.string { + color: hsl(220, 14%, 71%); + } -.language-markdown .token.url > .token.content { - color: hsl(207, 82%, 66%); -} + .language-markdown .token.url > .token.content { + color: hsl(207, 82%, 66%); + } -.language-markdown .token.url > .token.url, -.language-markdown .token.url-reference.url { - color: hsl(187, 47%, 55%); -} + .language-markdown .token.url > .token.url, + .language-markdown .token.url-reference.url { + color: hsl(187, 47%, 55%); + } -.language-markdown .token.blockquote.punctuation, -.language-markdown .token.hr.punctuation { - color: hsl(220, 10%, 40%); - font-style: italic; -} + .language-markdown .token.blockquote.punctuation, + .language-markdown .token.hr.punctuation { + color: hsl(220, 10%, 40%); + font-style: italic; + } -.language-markdown .token.code-snippet { - color: hsl(95, 38%, 62%); -} + .language-markdown .token.code-snippet { + color: hsl(95, 38%, 62%); + } -.language-markdown .token.bold .token.content { - color: hsl(29, 54%, 61%); -} + .language-markdown .token.bold .token.content { + color: hsl(29, 54%, 61%); + } -.language-markdown .token.italic .token.content { - color: hsl(286, 60%, 67%); -} + .language-markdown .token.italic .token.content { + color: hsl(286, 60%, 67%); + } -.language-markdown .token.strike .token.content, -.language-markdown .token.strike .token.punctuation, -.language-markdown .token.list.punctuation, -.language-markdown .token.title.important > .token.punctuation { - color: hsl(355, 65%, 65%); -} + .language-markdown .token.strike .token.content, + .language-markdown .token.strike .token.punctuation, + .language-markdown .token.list.punctuation, + .language-markdown .token.title.important > .token.punctuation { + color: hsl(355, 65%, 65%); + } -/* General */ -.token.bold { - font-weight: bold; -} + /* General */ + .token.bold { + font-weight: bold; + } -.token.comment, -.token.italic { - font-style: italic; -} + .token.comment, + .token.italic { + font-style: italic; + } -.token.entity { - cursor: help; -} + .token.entity { + cursor: help; + } -.token.namespace { - opacity: 0.8; -} + .token.namespace { + opacity: 0.8; + } -/* Plugin overrides */ -/* Selectors should have higher specificity than those in the plugins' default stylesheets */ + /* Plugin overrides */ + /* Selectors should have higher specificity than those in the plugins' default stylesheets */ -/* Show Invisibles plugin overrides */ -.token.token.tab:not(:empty):before, -.token.token.cr:before, -.token.token.lf:before, -.token.token.space:before { - color: hsla(220, 14%, 71%, 0.15); - text-shadow: none; -} + /* Show Invisibles plugin overrides */ + .token.token.tab:not(:empty):before, + .token.token.cr:before, + .token.token.lf:before, + .token.token.space:before { + color: hsla(220, 14%, 71%, 0.15); + text-shadow: none; + } -/* Toolbar plugin overrides */ -/* Space out all buttons and move them away from the right edge of the code block */ -div.code-toolbar > .toolbar.toolbar > .toolbar-item { - margin-right: 0.4em; -} + /* Toolbar plugin overrides */ + /* Space out all buttons and move them away from the right edge of the code block */ + div.code-toolbar > .toolbar.toolbar > .toolbar-item { + margin-right: 0.4em; + } -/* Styling the buttons */ -div.code-toolbar > .toolbar.toolbar > .toolbar-item > button, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > a, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > span { - background: hsl(220, 13%, 26%); - color: hsl(220, 9%, 55%); - padding: 0.1em 0.4em; - border-radius: 0.3em; -} + /* Styling the buttons */ + div.code-toolbar > .toolbar.toolbar > .toolbar-item > button, + div.code-toolbar > .toolbar.toolbar > .toolbar-item > a, + div.code-toolbar > .toolbar.toolbar > .toolbar-item > span { + background: hsl(220, 13%, 26%); + color: hsl(220, 9%, 55%); + padding: 0.1em 0.4em; + border-radius: 0.3em; + } -div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus { - background: hsl(220, 13%, 28%); - color: hsl(220, 14%, 71%); -} + div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover, + div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus, + div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover, + div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus, + div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover, + div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus { + background: hsl(220, 13%, 28%); + color: hsl(220, 14%, 71%); + } -/* Line Highlight plugin overrides */ -/* The highlighted line itself */ -.line-highlight.line-highlight { - background: hsla(220, 100%, 80%, 0.04); -} + /* Line Highlight plugin overrides */ + /* The highlighted line itself */ + .line-highlight.line-highlight { + background: hsla(220, 100%, 80%, 0.04); + } -/* Default line numbers in Line Highlight plugin */ -.line-highlight.line-highlight:before, -.line-highlight.line-highlight[data-end]:after { - background: hsl(220, 13%, 26%); - color: hsl(220, 14%, 71%); - padding: 0.1em 0.6em; - border-radius: 0.3em; - box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2); /* same as Toolbar plugin default */ -} + /* Default line numbers in Line Highlight plugin */ + .line-highlight.line-highlight:before, + .line-highlight.line-highlight[data-end]:after { + background: hsl(220, 13%, 26%); + color: hsl(220, 14%, 71%); + padding: 0.1em 0.6em; + border-radius: 0.3em; + box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2); /* same as Toolbar plugin default */ + } -/* Hovering over a linkable line number (in the gutter area) */ -/* Requires Line Numbers plugin as well */ -pre[id].linkable-line-numbers.linkable-line-numbers - span.line-numbers-rows - > span:hover:before { - background-color: hsla(220, 100%, 80%, 0.04); -} + /* Hovering over a linkable line number (in the gutter area) */ + /* Requires Line Numbers plugin as well */ + pre[id].linkable-line-numbers.linkable-line-numbers + span.line-numbers-rows + > span:hover:before { + background-color: hsla(220, 100%, 80%, 0.04); + } -/* Line Numbers and Command Line plugins overrides */ -/* Line separating gutter from coding area */ -.line-numbers.line-numbers .line-numbers-rows, -.command-line .command-line-prompt { - border-right-color: hsla(220, 14%, 71%, 0.15); -} + /* Line Numbers and Command Line plugins overrides */ + /* Line separating gutter from coding area */ + .line-numbers.line-numbers .line-numbers-rows, + .command-line .command-line-prompt { + border-right-color: hsla(220, 14%, 71%, 0.15); + } -/* Stuff in the gutter */ -.line-numbers .line-numbers-rows > span:before, -.command-line .command-line-prompt > span:before { - color: hsl(220, 14%, 45%); -} + /* Stuff in the gutter */ + .line-numbers .line-numbers-rows > span:before, + .command-line .command-line-prompt > span:before { + color: hsl(220, 14%, 45%); + } -/* Match Braces plugin overrides */ -/* Note: Outline colour is inherited from the braces */ -.rainbow-braces .token.token.punctuation.brace-level-1, -.rainbow-braces .token.token.punctuation.brace-level-5, -.rainbow-braces .token.token.punctuation.brace-level-9 { - color: hsl(355, 65%, 65%); -} + /* Match Braces plugin overrides */ + /* Note: Outline colour is inherited from the braces */ + .rainbow-braces .token.token.punctuation.brace-level-1, + .rainbow-braces .token.token.punctuation.brace-level-5, + .rainbow-braces .token.token.punctuation.brace-level-9 { + color: hsl(355, 65%, 65%); + } -.rainbow-braces .token.token.punctuation.brace-level-2, -.rainbow-braces .token.token.punctuation.brace-level-6, -.rainbow-braces .token.token.punctuation.brace-level-10 { - color: hsl(95, 38%, 62%); -} + .rainbow-braces .token.token.punctuation.brace-level-2, + .rainbow-braces .token.token.punctuation.brace-level-6, + .rainbow-braces .token.token.punctuation.brace-level-10 { + color: hsl(95, 38%, 62%); + } -.rainbow-braces .token.token.punctuation.brace-level-3, -.rainbow-braces .token.token.punctuation.brace-level-7, -.rainbow-braces .token.token.punctuation.brace-level-11 { - color: hsl(207, 82%, 66%); -} + .rainbow-braces .token.token.punctuation.brace-level-3, + .rainbow-braces .token.token.punctuation.brace-level-7, + .rainbow-braces .token.token.punctuation.brace-level-11 { + color: hsl(207, 82%, 66%); + } -.rainbow-braces .token.token.punctuation.brace-level-4, -.rainbow-braces .token.token.punctuation.brace-level-8, -.rainbow-braces .token.token.punctuation.brace-level-12 { - color: hsl(286, 60%, 67%); -} + .rainbow-braces .token.token.punctuation.brace-level-4, + .rainbow-braces .token.token.punctuation.brace-level-8, + .rainbow-braces .token.token.punctuation.brace-level-12 { + color: hsl(286, 60%, 67%); + } -/* Diff Highlight plugin overrides */ -/* Taken from https://github.com/atom/github/blob/master/styles/variables.less */ -pre.diff-highlight > code .token.token.deleted:not(.prefix), -pre > code.diff-highlight .token.token.deleted:not(.prefix) { - background-color: hsla(353, 100%, 66%, 0.15); -} + /* Diff Highlight plugin overrides */ + /* Taken from https://github.com/atom/github/blob/master/styles/variables.less */ + pre.diff-highlight > code .token.token.deleted:not(.prefix), + pre > code.diff-highlight .token.token.deleted:not(.prefix) { + background-color: hsla(353, 100%, 66%, 0.15); + } -pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection, -pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection, -pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection, -pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection { - background-color: hsla(353, 95%, 66%, 0.25); -} + pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection, + pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection, + pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection, + pre + > code.diff-highlight + .token.token.deleted:not(.prefix) + *::-moz-selection { + background-color: hsla(353, 95%, 66%, 0.25); + } -pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection, -pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection, -pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection, -pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection { - background-color: hsla(353, 95%, 66%, 0.25); -} + pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection, + pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection, + pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection, + pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection { + background-color: hsla(353, 95%, 66%, 0.25); + } -pre.diff-highlight > code .token.token.inserted:not(.prefix), -pre > code.diff-highlight .token.token.inserted:not(.prefix) { - background-color: hsla(137, 100%, 55%, 0.15); -} + pre.diff-highlight > code .token.token.inserted:not(.prefix), + pre > code.diff-highlight .token.token.inserted:not(.prefix) { + background-color: hsla(137, 100%, 55%, 0.15); + } -pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection, -pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection, -pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection, -pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection { - background-color: hsla(135, 73%, 55%, 0.25); -} + pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection, + pre.diff-highlight + > code + .token.token.inserted:not(.prefix) + *::-moz-selection, + pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection, + pre + > code.diff-highlight + .token.token.inserted:not(.prefix) + *::-moz-selection { + background-color: hsla(135, 73%, 55%, 0.25); + } -pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection, -pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection, -pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection, -pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection { - background-color: hsla(135, 73%, 55%, 0.25); -} + pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection, + pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection, + pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection, + pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection { + background-color: hsla(135, 73%, 55%, 0.25); + } -/* Previewers plugin overrides */ -/* Based on https://github.com/atom-community/atom-ide-datatip/blob/master/styles/atom-ide-datatips.less and https://github.com/atom/atom/blob/master/packages/one-dark-ui */ -/* Border around popup */ -.prism-previewer.prism-previewer:before, -.prism-previewer-gradient.prism-previewer-gradient div { - border-color: hsl(224, 13%, 17%); -} + /* Previewers plugin overrides */ + /* Based on https://github.com/atom-community/atom-ide-datatip/blob/master/styles/atom-ide-datatips.less and https://github.com/atom/atom/blob/master/packages/one-dark-ui */ + /* Border around popup */ + .prism-previewer.prism-previewer:before, + .prism-previewer-gradient.prism-previewer-gradient div { + border-color: hsl(224, 13%, 17%); + } -/* Angle and time should remain as circles and are hence not included */ -.prism-previewer-color.prism-previewer-color:before, -.prism-previewer-gradient.prism-previewer-gradient div, -.prism-previewer-easing.prism-previewer-easing:before { - border-radius: 0.3em; -} + /* Angle and time should remain as circles and are hence not included */ + .prism-previewer-color.prism-previewer-color:before, + .prism-previewer-gradient.prism-previewer-gradient div, + .prism-previewer-easing.prism-previewer-easing:before { + border-radius: 0.3em; + } -/* Triangles pointing to the code */ -.prism-previewer.prism-previewer:after { - border-top-color: hsl(224, 13%, 17%); -} + /* Triangles pointing to the code */ + .prism-previewer.prism-previewer:after { + border-top-color: hsl(224, 13%, 17%); + } -.prism-previewer-flipped.prism-previewer-flipped.after { - border-bottom-color: hsl(224, 13%, 17%); -} + .prism-previewer-flipped.prism-previewer-flipped.after { + border-bottom-color: hsl(224, 13%, 17%); + } -/* Background colour within the popup */ -.prism-previewer-angle.prism-previewer-angle:before, -.prism-previewer-time.prism-previewer-time:before, -.prism-previewer-easing.prism-previewer-easing { - background: hsl(219, 13%, 22%); -} + /* Background colour within the popup */ + .prism-previewer-angle.prism-previewer-angle:before, + .prism-previewer-time.prism-previewer-time:before, + .prism-previewer-easing.prism-previewer-easing { + background: hsl(219, 13%, 22%); + } -/* For angle, this is the positive area (eg. 90deg will display one quadrant in this colour) */ -/* For time, this is the alternate colour */ -.prism-previewer-angle.prism-previewer-angle circle, -.prism-previewer-time.prism-previewer-time circle { - stroke: hsl(220, 14%, 71%); - stroke-opacity: 1; -} + /* For angle, this is the positive area (eg. 90deg will display one quadrant in this colour) */ + /* For time, this is the alternate colour */ + .prism-previewer-angle.prism-previewer-angle circle, + .prism-previewer-time.prism-previewer-time circle { + stroke: hsl(220, 14%, 71%); + stroke-opacity: 1; + } -/* Stroke colours of the handle, direction point, and vector itself */ -.prism-previewer-easing.prism-previewer-easing circle, -.prism-previewer-easing.prism-previewer-easing path, -.prism-previewer-easing.prism-previewer-easing line { - stroke: hsl(220, 14%, 71%); -} + /* Stroke colours of the handle, direction point, and vector itself */ + .prism-previewer-easing.prism-previewer-easing circle, + .prism-previewer-easing.prism-previewer-easing path, + .prism-previewer-easing.prism-previewer-easing line { + stroke: hsl(220, 14%, 71%); + } -/* Fill colour of the handle */ -.prism-previewer-easing.prism-previewer-easing circle { - fill: transparent; + /* Fill colour of the handle */ + .prism-previewer-easing.prism-previewer-easing circle { + fill: transparent; + } } diff --git a/app/styles/prismThemeLight.css b/app/styles/prismThemeLight.css index 80f49d21..bed9cb2e 100644 --- a/app/styles/prismThemeLight.css +++ b/app/styles/prismThemeLight.css @@ -1,9 +1,10 @@ -/** +@media (prefers-color-scheme: light) { + /** * One Light theme for prism.js * Based on Atom's One Light theme: https://github.com/atom/atom/tree/master/packages/one-light-syntax */ -/** + /** * One Light colours (accurate as of commit eb064bf on 19 Feb 2021) * From colors.less * --mono-1: hsl(230, 8%, 24%); @@ -28,407 +29,417 @@ * --syntax-cursor-line: hsla(230, 8%, 24%, 0.05); */ -code[class*='language-'], -pre[class*='language-'] { - background: #f4f7f9; - color: hsl(230, 8%, 24%); - font-family: 'Fira Code', 'Fira Mono', Menlo, Consolas, 'DejaVu Sans Mono', - monospace; - direction: ltr; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - line-height: 1.5; - -moz-tab-size: 2; - -o-tab-size: 2; - tab-size: 2; - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; -} - -/* Selection */ -code[class*='language-']::-moz-selection, -code[class*='language-'] *::-moz-selection, -pre[class*='language-'] *::-moz-selection { - background: hsl(230, 1%, 90%); - color: inherit; -} - -code[class*='language-']::selection, -code[class*='language-'] *::selection, -pre[class*='language-'] *::selection { - background: hsl(230, 1%, 90%); - color: inherit; -} - -/* Code blocks */ -pre[class*='language-'] { - padding: 1em; - /* margin: 0.5em 0; */ - overflow: auto; - border-radius: 0.3em; -} - -/* Inline code */ -:not(pre) > code[class*='language-'] { - padding: 0.2em 0.3em; - border-radius: 0.3em; - white-space: normal; -} - -.token.comment, -.token.prolog, -.token.cdata { - color: hsl(230, 4%, 64%); -} - -.token.doctype, -.token.punctuation, -.token.entity { - color: hsl(230, 8%, 24%); -} - -.token.attr-name, -.token.class-name, -.token.boolean, -.token.constant, -.token.number, -.token.atrule { - color: hsl(35, 99%, 36%); -} - -.token.keyword { - color: hsl(301, 63%, 40%); -} - -.token.property, -.token.tag, -.token.symbol, -.token.deleted, -.token.important { - color: hsl(5, 74%, 59%); -} - -.token.selector, -.token.string, -.token.char, -.token.builtin, -.token.inserted, -.token.regex, -.token.attr-value, -.token.attr-value > .token.punctuation { - color: hsl(119, 34%, 47%); -} - -.token.variable, -.token.operator, -.token.function { - color: hsl(221, 87%, 60%); -} - -.token.url { - color: hsl(198, 99%, 37%); -} - -/* HTML overrides */ -.token.attr-value > .token.punctuation.attr-equals, -.token.special-attr > .token.attr-value > .token.value.css { - color: hsl(230, 8%, 24%); -} - -/* CSS overrides */ -.language-css .token.selector { - color: hsl(5, 74%, 59%); -} - -.language-css .token.property { - color: hsl(230, 8%, 24%); -} - -.language-css .token.function, -.language-css .token.url > .token.function { - color: hsl(198, 99%, 37%); -} - -.language-css .token.url > .token.string.url { - color: hsl(119, 34%, 47%); -} - -.language-css .token.important, -.language-css .token.atrule .token.rule { - color: hsl(301, 63%, 40%); -} - -/* JS overrides */ -.language-javascript .token.operator { - color: hsl(301, 63%, 40%); -} - -.language-javascript - .token.template-string - > .token.interpolation - > .token.interpolation-punctuation.punctuation { - color: hsl(344, 84%, 43%); -} - -/* JSON overrides */ -.language-json .token.operator { - color: hsl(230, 8%, 24%); -} - -.language-json .token.null.keyword { - color: hsl(35, 99%, 36%); -} - -/* MD overrides */ -.language-markdown .token.url, -.language-markdown .token.url > .token.operator, -.language-markdown .token.url-reference.url > .token.string { - color: hsl(230, 8%, 24%); -} - -.language-markdown .token.url > .token.content { - color: hsl(221, 87%, 60%); -} - -.language-markdown .token.url > .token.url, -.language-markdown .token.url-reference.url { - color: hsl(198, 99%, 37%); -} - -.language-markdown .token.blockquote.punctuation, -.language-markdown .token.hr.punctuation { - color: hsl(230, 4%, 64%); - font-style: italic; -} - -.language-markdown .token.code-snippet { - color: hsl(119, 34%, 47%); -} - -.language-markdown .token.bold .token.content { - color: hsl(35, 99%, 36%); -} - -.language-markdown .token.italic .token.content { - color: hsl(301, 63%, 40%); -} - -.language-markdown .token.strike .token.content, -.language-markdown .token.strike .token.punctuation, -.language-markdown .token.list.punctuation, -.language-markdown .token.title.important > .token.punctuation { - color: hsl(5, 74%, 59%); -} - -/* General */ -.token.bold { - font-weight: bold; -} - -.token.comment, -.token.italic { - font-style: italic; -} - -.token.entity { - cursor: help; -} - -.token.namespace { - opacity: 0.8; -} - -/* Plugin overrides */ -/* Selectors should have higher specificity than those in the plugins' default stylesheets */ - -/* Show Invisibles plugin overrides */ -.token.token.tab:not(:empty):before, -.token.token.cr:before, -.token.token.lf:before, -.token.token.space:before { - color: hsla(230, 8%, 24%, 0.2); -} - -/* Toolbar plugin overrides */ -/* Space out all buttons and move them away from the right edge of the code block */ -div.code-toolbar > .toolbar.toolbar > .toolbar-item { - margin-right: 0.4em; -} - -/* Styling the buttons */ -div.code-toolbar > .toolbar.toolbar > .toolbar-item > button, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > a, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > span { - background: hsl(230, 1%, 90%); - color: hsl(230, 6%, 44%); - padding: 0.1em 0.4em; - border-radius: 0.3em; -} - -div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover, -div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus { - background: hsl(230, 1%, 78%); /* custom: darken(--syntax-bg, 20%) */ - color: hsl(230, 8%, 24%); -} - -/* Line Highlight plugin overrides */ -/* The highlighted line itself */ -.line-highlight.line-highlight { - background: hsla(230, 8%, 24%, 0.05); -} - -/* Default line numbers in Line Highlight plugin */ -.line-highlight.line-highlight:before, -.line-highlight.line-highlight[data-end]:after { - background: hsl(230, 1%, 90%); - color: hsl(230, 8%, 24%); - padding: 0.1em 0.6em; - border-radius: 0.3em; - box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2); /* same as Toolbar plugin default */ -} - -/* Hovering over a linkable line number (in the gutter area) */ -/* Requires Line Numbers plugin as well */ -pre[id].linkable-line-numbers.linkable-line-numbers - span.line-numbers-rows - > span:hover:before { - background-color: hsla(230, 8%, 24%, 0.05); -} - -/* Line Numbers and Command Line plugins overrides */ -/* Line separating gutter from coding area */ -.line-numbers.line-numbers .line-numbers-rows, -.command-line .command-line-prompt { - border-right-color: hsla(230, 8%, 24%, 0.2); -} - -/* Stuff in the gutter */ -.line-numbers .line-numbers-rows > span:before, -.command-line .command-line-prompt > span:before { - color: hsl(230, 1%, 62%); -} - -/* Match Braces plugin overrides */ -/* Note: Outline colour is inherited from the braces */ -.rainbow-braces .token.token.punctuation.brace-level-1, -.rainbow-braces .token.token.punctuation.brace-level-5, -.rainbow-braces .token.token.punctuation.brace-level-9 { - color: hsl(5, 74%, 59%); -} - -.rainbow-braces .token.token.punctuation.brace-level-2, -.rainbow-braces .token.token.punctuation.brace-level-6, -.rainbow-braces .token.token.punctuation.brace-level-10 { - color: hsl(119, 34%, 47%); -} - -.rainbow-braces .token.token.punctuation.brace-level-3, -.rainbow-braces .token.token.punctuation.brace-level-7, -.rainbow-braces .token.token.punctuation.brace-level-11 { - color: hsl(221, 87%, 60%); -} - -.rainbow-braces .token.token.punctuation.brace-level-4, -.rainbow-braces .token.token.punctuation.brace-level-8, -.rainbow-braces .token.token.punctuation.brace-level-12 { - color: hsl(301, 63%, 40%); -} - -/* Diff Highlight plugin overrides */ -/* Taken from https://github.com/atom/github/blob/master/styles/variables.less */ -pre.diff-highlight > code .token.token.deleted:not(.prefix), -pre > code.diff-highlight .token.token.deleted:not(.prefix) { - background-color: hsla(353, 100%, 66%, 0.15); -} - -pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection, -pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection, -pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection, -pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection { - background-color: hsla(353, 95%, 66%, 0.25); -} - -pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection, -pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection, -pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection, -pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection { - background-color: hsla(353, 95%, 66%, 0.25); -} - -pre.diff-highlight > code .token.token.inserted:not(.prefix), -pre > code.diff-highlight .token.token.inserted:not(.prefix) { - background-color: hsla(137, 100%, 55%, 0.15); -} - -pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection, -pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection, -pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection, -pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection { - background-color: hsla(135, 73%, 55%, 0.25); -} - -pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection, -pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection, -pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection, -pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection { - background-color: hsla(135, 73%, 55%, 0.25); -} - -/* Previewers plugin overrides */ -/* Based on https://github.com/atom-community/atom-ide-datatip/blob/master/styles/atom-ide-datatips.less and https://github.com/atom/atom/blob/master/packages/one-light-ui */ -/* Border around popup */ -.prism-previewer.prism-previewer:before, -.prism-previewer-gradient.prism-previewer-gradient div { - border-color: hsl(0, 0, 95%); -} - -/* Angle and time should remain as circles and are hence not included */ -.prism-previewer-color.prism-previewer-color:before, -.prism-previewer-gradient.prism-previewer-gradient div, -.prism-previewer-easing.prism-previewer-easing:before { - border-radius: 0.3em; -} - -/* Triangles pointing to the code */ -.prism-previewer.prism-previewer:after { - border-top-color: hsl(0, 0, 95%); -} - -.prism-previewer-flipped.prism-previewer-flipped.after { - border-bottom-color: hsl(0, 0, 95%); -} - -/* Background colour within the popup */ -.prism-previewer-angle.prism-previewer-angle:before, -.prism-previewer-time.prism-previewer-time:before, -.prism-previewer-easing.prism-previewer-easing { - background: hsl(0, 0%, 100%); -} - -/* For angle, this is the positive area (eg. 90deg will display one quadrant in this colour) */ -/* For time, this is the alternate colour */ -.prism-previewer-angle.prism-previewer-angle circle, -.prism-previewer-time.prism-previewer-time circle { - stroke: hsl(230, 8%, 24%); - stroke-opacity: 1; -} - -/* Stroke colours of the handle, direction point, and vector itself */ -.prism-previewer-easing.prism-previewer-easing circle, -.prism-previewer-easing.prism-previewer-easing path, -.prism-previewer-easing.prism-previewer-easing line { - stroke: hsl(230, 8%, 24%); -} - -/* Fill colour of the handle */ -.prism-previewer-easing.prism-previewer-easing circle { - fill: transparent; + code[class*='language-'], + pre[class*='language-'] { + background: #f4f7f9; + color: hsl(230, 8%, 24%); + font-family: 'Fira Code', 'Fira Mono', Menlo, Consolas, 'DejaVu Sans Mono', + monospace; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + line-height: 1.5; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; + } + + /* Selection */ + code[class*='language-']::-moz-selection, + code[class*='language-'] *::-moz-selection, + pre[class*='language-'] *::-moz-selection { + background: hsl(230, 1%, 90%); + color: inherit; + } + + code[class*='language-']::selection, + code[class*='language-'] *::selection, + pre[class*='language-'] *::selection { + background: hsl(230, 1%, 90%); + color: inherit; + } + + /* Code blocks */ + pre[class*='language-'] { + padding: 1em; + /* margin: 0.5em 0; */ + overflow: auto; + border-radius: 0.3em; + } + + /* Inline code */ + :not(pre) > code[class*='language-'] { + padding: 0.2em 0.3em; + border-radius: 0.3em; + white-space: normal; + } + + .token.comment, + .token.prolog, + .token.cdata { + color: hsl(230, 4%, 64%); + } + + .token.doctype, + .token.punctuation, + .token.entity { + color: hsl(230, 8%, 24%); + } + + .token.attr-name, + .token.class-name, + .token.boolean, + .token.constant, + .token.number, + .token.atrule { + color: hsl(35, 99%, 36%); + } + + .token.keyword { + color: hsl(301, 63%, 40%); + } + + .token.property, + .token.tag, + .token.symbol, + .token.deleted, + .token.important { + color: hsl(5, 74%, 59%); + } + + .token.selector, + .token.string, + .token.char, + .token.builtin, + .token.inserted, + .token.regex, + .token.attr-value, + .token.attr-value > .token.punctuation { + color: hsl(119, 34%, 47%); + } + + .token.variable, + .token.operator, + .token.function { + color: hsl(221, 87%, 60%); + } + + .token.url { + color: hsl(198, 99%, 37%); + } + + /* HTML overrides */ + .token.attr-value > .token.punctuation.attr-equals, + .token.special-attr > .token.attr-value > .token.value.css { + color: hsl(230, 8%, 24%); + } + + /* CSS overrides */ + .language-css .token.selector { + color: hsl(5, 74%, 59%); + } + + .language-css .token.property { + color: hsl(230, 8%, 24%); + } + + .language-css .token.function, + .language-css .token.url > .token.function { + color: hsl(198, 99%, 37%); + } + + .language-css .token.url > .token.string.url { + color: hsl(119, 34%, 47%); + } + + .language-css .token.important, + .language-css .token.atrule .token.rule { + color: hsl(301, 63%, 40%); + } + + /* JS overrides */ + .language-javascript .token.operator { + color: hsl(301, 63%, 40%); + } + + .language-javascript + .token.template-string + > .token.interpolation + > .token.interpolation-punctuation.punctuation { + color: hsl(344, 84%, 43%); + } + + /* JSON overrides */ + .language-json .token.operator { + color: hsl(230, 8%, 24%); + } + + .language-json .token.null.keyword { + color: hsl(35, 99%, 36%); + } + + /* MD overrides */ + .language-markdown .token.url, + .language-markdown .token.url > .token.operator, + .language-markdown .token.url-reference.url > .token.string { + color: hsl(230, 8%, 24%); + } + + .language-markdown .token.url > .token.content { + color: hsl(221, 87%, 60%); + } + + .language-markdown .token.url > .token.url, + .language-markdown .token.url-reference.url { + color: hsl(198, 99%, 37%); + } + + .language-markdown .token.blockquote.punctuation, + .language-markdown .token.hr.punctuation { + color: hsl(230, 4%, 64%); + font-style: italic; + } + + .language-markdown .token.code-snippet { + color: hsl(119, 34%, 47%); + } + + .language-markdown .token.bold .token.content { + color: hsl(35, 99%, 36%); + } + + .language-markdown .token.italic .token.content { + color: hsl(301, 63%, 40%); + } + + .language-markdown .token.strike .token.content, + .language-markdown .token.strike .token.punctuation, + .language-markdown .token.list.punctuation, + .language-markdown .token.title.important > .token.punctuation { + color: hsl(5, 74%, 59%); + } + + /* General */ + .token.bold { + font-weight: bold; + } + + .token.comment, + .token.italic { + font-style: italic; + } + + .token.entity { + cursor: help; + } + + .token.namespace { + opacity: 0.8; + } + + /* Plugin overrides */ + /* Selectors should have higher specificity than those in the plugins' default stylesheets */ + + /* Show Invisibles plugin overrides */ + .token.token.tab:not(:empty):before, + .token.token.cr:before, + .token.token.lf:before, + .token.token.space:before { + color: hsla(230, 8%, 24%, 0.2); + } + + /* Toolbar plugin overrides */ + /* Space out all buttons and move them away from the right edge of the code block */ + div.code-toolbar > .toolbar.toolbar > .toolbar-item { + margin-right: 0.4em; + } + + /* Styling the buttons */ + div.code-toolbar > .toolbar.toolbar > .toolbar-item > button, + div.code-toolbar > .toolbar.toolbar > .toolbar-item > a, + div.code-toolbar > .toolbar.toolbar > .toolbar-item > span { + background: hsl(230, 1%, 90%); + color: hsl(230, 6%, 44%); + padding: 0.1em 0.4em; + border-radius: 0.3em; + } + + div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover, + div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus, + div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover, + div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus, + div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover, + div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus { + background: hsl(230, 1%, 78%); /* custom: darken(--syntax-bg, 20%) */ + color: hsl(230, 8%, 24%); + } + + /* Line Highlight plugin overrides */ + /* The highlighted line itself */ + .line-highlight.line-highlight { + background: hsla(230, 8%, 24%, 0.05); + } + + /* Default line numbers in Line Highlight plugin */ + .line-highlight.line-highlight:before, + .line-highlight.line-highlight[data-end]:after { + background: hsl(230, 1%, 90%); + color: hsl(230, 8%, 24%); + padding: 0.1em 0.6em; + border-radius: 0.3em; + box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2); /* same as Toolbar plugin default */ + } + + /* Hovering over a linkable line number (in the gutter area) */ + /* Requires Line Numbers plugin as well */ + pre[id].linkable-line-numbers.linkable-line-numbers + span.line-numbers-rows + > span:hover:before { + background-color: hsla(230, 8%, 24%, 0.05); + } + + /* Line Numbers and Command Line plugins overrides */ + /* Line separating gutter from coding area */ + .line-numbers.line-numbers .line-numbers-rows, + .command-line .command-line-prompt { + border-right-color: hsla(230, 8%, 24%, 0.2); + } + + /* Stuff in the gutter */ + .line-numbers .line-numbers-rows > span:before, + .command-line .command-line-prompt > span:before { + color: hsl(230, 1%, 62%); + } + + /* Match Braces plugin overrides */ + /* Note: Outline colour is inherited from the braces */ + .rainbow-braces .token.token.punctuation.brace-level-1, + .rainbow-braces .token.token.punctuation.brace-level-5, + .rainbow-braces .token.token.punctuation.brace-level-9 { + color: hsl(5, 74%, 59%); + } + + .rainbow-braces .token.token.punctuation.brace-level-2, + .rainbow-braces .token.token.punctuation.brace-level-6, + .rainbow-braces .token.token.punctuation.brace-level-10 { + color: hsl(119, 34%, 47%); + } + + .rainbow-braces .token.token.punctuation.brace-level-3, + .rainbow-braces .token.token.punctuation.brace-level-7, + .rainbow-braces .token.token.punctuation.brace-level-11 { + color: hsl(221, 87%, 60%); + } + + .rainbow-braces .token.token.punctuation.brace-level-4, + .rainbow-braces .token.token.punctuation.brace-level-8, + .rainbow-braces .token.token.punctuation.brace-level-12 { + color: hsl(301, 63%, 40%); + } + + /* Diff Highlight plugin overrides */ + /* Taken from https://github.com/atom/github/blob/master/styles/variables.less */ + pre.diff-highlight > code .token.token.deleted:not(.prefix), + pre > code.diff-highlight .token.token.deleted:not(.prefix) { + background-color: hsla(353, 100%, 66%, 0.15); + } + + pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection, + pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection, + pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection, + pre + > code.diff-highlight + .token.token.deleted:not(.prefix) + *::-moz-selection { + background-color: hsla(353, 95%, 66%, 0.25); + } + + pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection, + pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection, + pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection, + pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection { + background-color: hsla(353, 95%, 66%, 0.25); + } + + pre.diff-highlight > code .token.token.inserted:not(.prefix), + pre > code.diff-highlight .token.token.inserted:not(.prefix) { + background-color: hsla(137, 100%, 55%, 0.15); + } + + pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection, + pre.diff-highlight + > code + .token.token.inserted:not(.prefix) + *::-moz-selection, + pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection, + pre + > code.diff-highlight + .token.token.inserted:not(.prefix) + *::-moz-selection { + background-color: hsla(135, 73%, 55%, 0.25); + } + + pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection, + pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection, + pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection, + pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection { + background-color: hsla(135, 73%, 55%, 0.25); + } + + /* Previewers plugin overrides */ + /* Based on https://github.com/atom-community/atom-ide-datatip/blob/master/styles/atom-ide-datatips.less and https://github.com/atom/atom/blob/master/packages/one-light-ui */ + /* Border around popup */ + .prism-previewer.prism-previewer:before, + .prism-previewer-gradient.prism-previewer-gradient div { + border-color: hsl(0, 0, 95%); + } + + /* Angle and time should remain as circles and are hence not included */ + .prism-previewer-color.prism-previewer-color:before, + .prism-previewer-gradient.prism-previewer-gradient div, + .prism-previewer-easing.prism-previewer-easing:before { + border-radius: 0.3em; + } + + /* Triangles pointing to the code */ + .prism-previewer.prism-previewer:after { + border-top-color: hsl(0, 0, 95%); + } + + .prism-previewer-flipped.prism-previewer-flipped.after { + border-bottom-color: hsl(0, 0, 95%); + } + + /* Background colour within the popup */ + .prism-previewer-angle.prism-previewer-angle:before, + .prism-previewer-time.prism-previewer-time:before, + .prism-previewer-easing.prism-previewer-easing { + background: hsl(0, 0%, 100%); + } + + /* For angle, this is the positive area (eg. 90deg will display one quadrant in this colour) */ + /* For time, this is the alternate colour */ + .prism-previewer-angle.prism-previewer-angle circle, + .prism-previewer-time.prism-previewer-time circle { + stroke: hsl(230, 8%, 24%); + stroke-opacity: 1; + } + + /* Stroke colours of the handle, direction point, and vector itself */ + .prism-previewer-easing.prism-previewer-easing circle, + .prism-previewer-easing.prism-previewer-easing path, + .prism-previewer-easing.prism-previewer-easing line { + stroke: hsl(230, 8%, 24%); + } + + /* Fill colour of the handle */ + .prism-previewer-easing.prism-previewer-easing circle { + fill: transparent; + } } diff --git a/app/utils/svelteHighlighter.js b/app/utils/svelteHighlighter.js new file mode 100644 index 00000000..0a4c5cb9 --- /dev/null +++ b/app/utils/svelteHighlighter.js @@ -0,0 +1,150 @@ +// Original source: https://github.com/pngwn/prism-svelte + +import { Prism } from 'prism-react-renderer' + +export const svelteHighlighter = () => { + const blocks = '(if|else if|await|then|catch|each|html|debug)' + + Prism.languages.svelte = Prism.languages.extend('markup', { + each: { + pattern: new RegExp( + '{[#/]each' + + '(?:(?:\\{(?:(?:\\{(?:[^{}])*\\})|(?:[^{}]))*\\})|(?:[^{}]))*}' + ), + inside: { + 'language-javascript': [ + { + pattern: /(as[\s\S]*)\([\s\S]*\)(?=\s*\})/, + lookbehind: true, + inside: Prism.languages['javascript'], + }, + { + pattern: /(as[\s]*)[\s\S]*(?=\s*)/, + lookbehind: true, + inside: Prism.languages['javascript'], + }, + { + pattern: /(#each[\s]*)[\s\S]*(?=as)/, + lookbehind: true, + inside: Prism.languages['javascript'], + }, + ], + keyword: /[#/]each|as/, + punctuation: /{|}/, + }, + }, + block: { + pattern: new RegExp( + '{[#:/@]/s' + + blocks + + '(?:(?:\\{(?:(?:\\{(?:[^{}])*\\})|(?:[^{}]))*\\})|(?:[^{}]))*}' + ), + inside: { + punctuation: /^{|}$/, + keyword: [new RegExp('[#:/@]' + blocks + '( )*'), /as/, /then/], + 'language-javascript': { + pattern: /[\s\S]*/, + inside: Prism.languages['javascript'], + }, + }, + }, + tag: { + pattern: + /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?:"[^"]*"|'[^']*'|{[\s\S]+?}(?=[\s/>])))|(?=[\s/>])))+)?\s*\/?>/i, + greedy: true, + inside: { + tag: { + pattern: /^<\/?[^\s>\/]+/i, + inside: { + punctuation: /^<\/?/, + namespace: /^[^\s>\/:]+:/, + }, + }, + 'language-javascript': { + pattern: + /\{(?:(?:\{(?:(?:\{(?:[^{}])*\})|(?:[^{}]))*\})|(?:[^{}]))*\}/, + inside: Prism.languages['javascript'], + }, + 'attr-value': { + pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i, + inside: { + punctuation: [ + /^=/, + { + pattern: /^(\s*)["']|["']$/, + lookbehind: true, + }, + ], + 'language-javascript': { + pattern: /{[\s\S]+}/, + inside: Prism.languages['javascript'], + }, + }, + }, + punctuation: /\/?>/, + 'attr-name': { + pattern: /[^\s>\/]+/, + inside: { + namespace: /^[^\s>\/:]+:/, + }, + }, + }, + }, + 'language-javascript': { + pattern: /\{(?:(?:\{(?:(?:\{(?:[^{}])*\})|(?:[^{}]))*\})|(?:[^{}]))*\}/, + lookbehind: true, + inside: Prism.languages['javascript'], + }, + }) + + Prism.languages.svelte['tag'].inside['attr-value'].inside['entity'] = + Prism.languages.svelte['entity'] + + Prism.hooks.add('wrap', (env) => { + if (env.type === 'entity') { + env.attributes['title'] = env.content.replace(/&/, '&') + } + }) + + Object.defineProperty(Prism.languages.svelte.tag, 'addInlined', { + value: function addInlined(tagName, lang) { + const includedCdataInside = {} + includedCdataInside['language-' + lang] = { + pattern: /(^$)/i, + lookbehind: true, + inside: Prism.languages[lang], + } + includedCdataInside['cdata'] = /^$/i + + const inside = { + 'included-cdata': { + pattern: //i, + inside: includedCdataInside, + }, + } + inside['language-' + lang] = { + pattern: /[\s\S]+/, + inside: Prism.languages[lang], + } + + const def = {} + def[tagName] = { + pattern: RegExp( + /(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace( + /__/g, + tagName + ), + 'i' + ), + lookbehind: true, + greedy: true, + inside, + } + + Prism.languages.insertBefore('svelte', 'cdata', def) + }, + }) + + Prism.languages.svelte.tag.addInlined('style', 'css') + Prism.languages.svelte.tag.addInlined('script', 'javascript') +} diff --git a/package.json b/package.json index 19ef33f8..646ec5b8 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,6 @@ "eslint": "^8.53.0", "eslint-plugin-unicorn": "^49.0.0", "postcss": "^8.4.31", - "postcss-import": "^16.0.0", "prettier": "^2.8.8", "tailwindcss": "^3.3.5", "typescript": "^5.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e2b2325f..7b9f4514 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -121,9 +121,6 @@ devDependencies: postcss: specifier: ^8.4.31 version: 8.4.31 - postcss-import: - specifier: ^16.0.0 - version: 16.0.0(postcss@8.4.31) prettier: specifier: ^2.8.8 version: 2.8.8 @@ -6233,18 +6230,6 @@ packages: read-cache: 1.0.0 resolve: 1.22.8 - /postcss-import@16.0.0(postcss@8.4.31): - resolution: {integrity: sha512-e77lhVvrD1I2y7dYmBv0k9ULTdArgEYZt97T4w6sFIU5uxIHvDFQlKgUUyY7v7Barj0Yf/zm5A4OquZN7jKm5Q==} - engines: {node: '>=18.0.0'} - peerDependencies: - postcss: ^8.0.0 - dependencies: - postcss: 8.4.31 - postcss-value-parser: 4.2.0 - read-cache: 1.0.0 - resolve: 1.22.8 - dev: true - /postcss-js@4.0.1(postcss@8.4.31): resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} engines: {node: ^12 || ^14 || >= 16} diff --git a/postcss.config.cjs b/postcss.config.cjs index 787f504d..4193e8ab 100644 --- a/postcss.config.cjs +++ b/postcss.config.cjs @@ -1,7 +1,3 @@ module.exports = { - plugins: [ - require('tailwindcss'), - require('autoprefixer'), - require('postcss-import'), - ], + plugins: [require('tailwindcss'), require('autoprefixer')], } From 6d5debf55ebb66d2ff00caf97166197fd6304c9c Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Tue, 9 Jan 2024 22:03:51 +1100 Subject: [PATCH 31/39] Reduce diff --- app/routes/router.v1._index.tsx | 6 +- app/routes/store.$version._index.tsx | 6 +- app/routes/table.v8._index.tsx | 8 +- app/routes/virtual.v3._index.tsx | 10 +- app/styles/app.css | 297 +-------------------------- 5 files changed, 16 insertions(+), 311 deletions(-) diff --git a/app/routes/router.v1._index.tsx b/app/routes/router.v1._index.tsx index 2f49f03c..d03ffd61 100644 --- a/app/routes/router.v1._index.tsx +++ b/app/routes/router.v1._index.tsx @@ -7,11 +7,11 @@ import { FaGithub, FaTshirt, } from 'react-icons/fa/index' -import { RiLightbulbFlashLine } from 'react-icons/ri/index' -import { TbHeartHandshake, TbZoomQuestion } from 'react-icons/tb/index' -import { VscPreview } from 'react-icons/vsc/index' import { Link, useLoaderData } from '@remix-run/react' import { json } from '@remix-run/node' +import { TbHeartHandshake, TbZoomQuestion } from 'react-icons/tb/index' +import { VscPreview } from 'react-icons/vsc/index' +import { RiLightbulbFlashLine } from 'react-icons/ri/index' import { gradientText, v1branch } from '~/projects/router' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' diff --git a/app/routes/store.$version._index.tsx b/app/routes/store.$version._index.tsx index b99b5d84..8d70ce73 100644 --- a/app/routes/store.$version._index.tsx +++ b/app/routes/store.$version._index.tsx @@ -1,15 +1,15 @@ +import { CgCornerUpLeft } from 'react-icons/cg/index' import { FaBook, FaDiscord, FaGithub, FaTshirt } from 'react-icons/fa/index' import { json } from '@remix-run/node' import { Link, useLoaderData, useParams } from '@remix-run/react' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' +import { VscPreview } from 'react-icons/vsc/index' +import { TbHeartHandshake } from 'react-icons/tb' import SponsorPack from '~/components/SponsorPack' import { gradientText, latestVersion, repo } from '~/projects/store' import { Logo } from '~/components/Logo' import { getSponsorsForSponsorPack } from '~/server/sponsors' -import { TbHeartHandshake } from 'react-icons/tb' -import { VscPreview } from 'react-icons/vsc/index' -import { CgCornerUpLeft } from 'react-icons/cg/index' const menu = [ { diff --git a/app/routes/table.v8._index.tsx b/app/routes/table.v8._index.tsx index e0c3b565..903a1bdc 100644 --- a/app/routes/table.v8._index.tsx +++ b/app/routes/table.v8._index.tsx @@ -1,10 +1,10 @@ import { useEffect, useState } from 'react' import { CgCornerUpLeft } from 'react-icons/cg/index' import { - FaBook, FaBolt, - FaCogs, + FaBook, FaCheckCircle, + FaCogs, FaDiscord, FaGithub, FaTshirt, @@ -14,12 +14,12 @@ import { json } from '@remix-run/node' import { v8branch, gradientText } from '~/projects/table' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' +import { IoIosBody } from 'react-icons/io/index' import SponsorPack from '~/components/SponsorPack' +import { VscPreview } from 'react-icons/vsc/index' import { Logo } from '~/components/Logo' import { getSponsorsForSponsorPack } from '~/server/sponsors' import agGridImage from '~/images/ag-grid.png' -import { VscPreview } from 'react-icons/vsc/index' -import { IoIosBody } from 'react-icons/io/index' const menu = [ { diff --git a/app/routes/virtual.v3._index.tsx b/app/routes/virtual.v3._index.tsx index 2824101e..5b9863bf 100644 --- a/app/routes/virtual.v3._index.tsx +++ b/app/routes/virtual.v3._index.tsx @@ -1,10 +1,10 @@ import { useEffect, useState } from 'react' import { CgCornerUpLeft } from 'react-icons/cg/index' import { - FaBook, FaBolt, - FaCogs, + FaBook, FaCheckCircle, + FaCogs, FaDiscord, FaGithub, FaTshirt, @@ -14,12 +14,12 @@ import { json } from '@remix-run/node' import { gradientText, v3branch } from '~/projects/virtual' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' +import { IoIosBody } from 'react-icons/io/index' import SponsorPack from '~/components/SponsorPack' +import { TbHeartHandshake } from 'react-icons/tb/index' +import { VscPreview } from 'react-icons/vsc/index' import { Logo } from '~/components/Logo' import { getSponsorsForSponsorPack } from '~/server/sponsors' -import { VscPreview } from 'react-icons/vsc/index' -import { IoIosBody } from 'react-icons/io/index' -import { TbHeartHandshake } from 'react-icons/tb/index' const menu = [ { diff --git a/app/styles/app.css b/app/styles/app.css index 556ab49b..a75890b6 100644 --- a/app/styles/app.css +++ b/app/styles/app.css @@ -141,302 +141,7 @@ @apply absolute bottom-0 right-0; } -/* https://github.com/shikijs/twoslash/tree/main/packages/remark-shiki-twoslash#plugin-setup */ -pre { - /* In theory shiki will overwrite these, but this is to make sure there are defaults regardless */ - background-color: white; - color: black; - - /* Give it some space to breathe */ - padding: 12px; - - /* All code samples get a grey border, twoslash ones get a different color */ - border-left: 1px solid #999; - border-bottom: 1px solid #999; - - margin-bottom: 3rem; - - /* Important to allow the code to move horizontally; */ - overflow-x: auto; - position: relative; -} -pre.shiki { - overflow-x: auto; -} -pre.shiki:hover .dim { - opacity: 1; -} -pre.shiki div.dim { - opacity: 0.5; -} -pre.shiki div.dim, -pre.shiki div.highlight { - margin: 0; - padding: 0; -} -pre.shiki div.highlight { - opacity: 1; - background-color: #f1f8ff; -} -pre.shiki div.line { - min-height: 1rem; -} - -/** Don't show the language identifiers */ -pre.shiki .language-id { - display: none; -} - -/* Visually differentiates twoslash code samples */ -pre.twoslash { - border-color: #719af4; -} - -/** When you mouse over the pre, show the underlines */ -pre.twoslash:hover data-lsp { - border-color: #747474; -} - -/** The tooltip-like which provides the LSP response */ -pre.twoslash data-lsp:hover::before { - content: attr(lsp); - position: absolute; - transform: translate(0, 1rem); - - background-color: #3f3f3f; - color: #fff; - text-align: left; - padding: 5px 8px; - border-radius: 2px; - font-family: 'JetBrains Mono', Menlo, Monaco, Consolas, Courier New, monospace; - font-size: 14px; - white-space: pre-wrap; - z-index: 100; -} - -pre .code-container { - overflow: auto; -} -/* The try button */ -pre .code-container > a { - position: absolute; - right: 8px; - bottom: 8px; - border-radius: 4px; - border: 1px solid #719af4; - padding: 0 8px; - color: #719af4; - text-decoration: none; - opacity: 0; - transition-timing-function: ease; - transition: opacity 0.3s; -} -/* Respect no animations */ -@media (prefers-reduced-motion: reduce) { - pre .code-container > a { - transition: none; - } -} -pre .code-container > a:hover { - color: white; - background-color: #719af4; -} -pre .code-container:hover a { - opacity: 1; -} - -pre code { - font-size: 15px; - font-family: 'JetBrains Mono', Menlo, Monaco, Consolas, Courier New, monospace; - white-space: pre; - -webkit-overflow-scrolling: touch; -} -pre code a { - text-decoration: none; -} -pre data-err { - /* Extracted from VS Code */ - background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%206%203'%20enable-background%3D'new%200%200%206%203'%20height%3D'3'%20width%3D'6'%3E%3Cg%20fill%3D'%23c94824'%3E%3Cpolygon%20points%3D'5.5%2C0%202.5%2C3%201.1%2C3%204.1%2C0'%2F%3E%3Cpolygon%20points%3D'4%2C0%206%2C2%206%2C0.6%205.4%2C0'%2F%3E%3Cpolygon%20points%3D'0%2C2%201%2C3%202.4%2C3%200%2C0.6'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") - repeat-x bottom left; - padding-bottom: 3px; -} -pre .query { - margin-bottom: 10px; - color: #137998; - display: inline-block; -} - -/* In order to have the 'popped out' style design and to not break the layout - /* we need to place a fake and un-selectable copy of the error which _isn't_ broken out - /* behind the actual error message. - - /* This sections keeps both of those two in in sync */ - -pre .error, -pre .error-behind { - margin-left: -14px; - margin-top: 8px; - margin-bottom: 4px; - padding: 6px; - padding-left: 14px; - width: calc(100% - 20px); +code[class*='language-'] { white-space: pre-wrap; display: block; } -pre .error { - position: absolute; - background-color: #fee; - border-left: 2px solid #bf1818; - /* Give the space to the error code */ - display: flex; - align-items: center; - color: black; -} -pre .error .code { - display: none; -} -pre .error-behind { - user-select: none; - visibility: transparent; - color: #fee; -} -/* Queries */ -pre .arrow { - /* Transparent background */ - background-color: #eee; - position: relative; - top: -7px; - margin-left: 0.1rem; - /* Edges */ - border-left: 1px solid #eee; - border-top: 1px solid #eee; - transform: translateY(25%) rotate(45deg); - /* Size */ - height: 8px; - width: 8px; -} -pre .popover { - margin-bottom: 10px; - background-color: #eee; - display: inline-block; - padding: 0 0.5rem 0.3rem; - margin-top: 10px; - border-radius: 3px; -} -/* Completion */ -pre .inline-completions ul.dropdown { - display: inline-block; - position: absolute; - width: 240px; - background-color: gainsboro; - color: grey; - padding-top: 4px; - font-family: var(--code-font); - font-size: 0.8rem; - margin: 0; - padding: 0; - border-left: 4px solid #4b9edd; -} -pre .inline-completions ul.dropdown::before { - background-color: #4b9edd; - width: 2px; - position: absolute; - top: -1.2rem; - left: -3px; - content: ' '; -} -pre .inline-completions ul.dropdown li { - overflow-x: hidden; - padding-left: 4px; - margin-bottom: 4px; -} -pre .inline-completions ul.dropdown li.deprecated { - text-decoration: line-through; -} -pre .inline-completions ul.dropdown li span.result-found { - color: #4b9edd; -} -pre .inline-completions ul.dropdown li span.result { - width: 100px; - color: black; - display: inline-block; -} -.dark-theme .markdown pre { - background-color: #d8d8d8; - border-color: #ddd; - filter: invert(98%) hue-rotate(180deg); -} -data-lsp { - /* Ensures there's no 1px jump when the hover happens */ - border-bottom: 1px dotted transparent; - /* Fades in unobtrusively */ - transition-timing-function: ease; - transition: border-color 0.3s; -} -/* Respect people's wishes to not have animations */ -@media (prefers-reduced-motion: reduce) { - data-lsp { - transition: none; - } -} - -/** Annotations support, providing a tool for meta commentary */ -.tag-container { - position: relative; -} -.tag-container .twoslash-annotation { - position: absolute; - font-family: 'JetBrains Mono', Menlo, Monaco, Consolas, Courier New, monospace; - right: -10px; - /** Default annotation text to 200px */ - width: 200px; - color: #187abf; - background-color: #fcf3d9 bb; -} -.tag-container .twoslash-annotation p { - text-align: left; - font-size: 0.8rem; - line-height: 0.9rem; -} -.tag-container .twoslash-annotation svg { - float: left; - margin-left: -44px; -} -.tag-container .twoslash-annotation.left { - right: auto; - left: -200px; -} -.tag-container .twoslash-annotation.left svg { - float: right; - margin-right: -5px; -} - -/** Support for showing console log/warn/errors inline */ -pre .logger { - display: flex; - align-items: center; - color: black; - padding: 6px; - padding-left: 8px; - width: calc(100% - 19px); - white-space: pre-wrap; -} -pre .logger svg { - margin-right: 9px; -} -pre .logger.error-log { - background-color: #fee; - border-left: 2px solid #bf1818; -} -pre .logger.warn-log { - background-color: #ffe; - border-left: 2px solid #eae662; -} -pre .logger.log-log { - background-color: #e9e9e9; - border-left: 2px solid #ababab; -} -pre .logger.log-log svg { - margin-left: 6px; - margin-right: 9px; -} From 0cf640c1d143874f9a734952d8ae37dcec411988 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Tue, 9 Jan 2024 22:04:38 +1100 Subject: [PATCH 32/39] Fix css --- app/styles/app.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/styles/app.css b/app/styles/app.css index a75890b6..8077ee34 100644 --- a/app/styles/app.css +++ b/app/styles/app.css @@ -143,5 +143,5 @@ code[class*='language-'] { white-space: pre-wrap; - display: block; + word-break: break-all; } From 4f632bdb40533429a689166d83ea5d3a4488d466 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Tue, 9 Jan 2024 22:11:50 +1100 Subject: [PATCH 33/39] Fix react-icons import --- app/routes/store.$version._index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes/store.$version._index.tsx b/app/routes/store.$version._index.tsx index 8d70ce73..169ec92f 100644 --- a/app/routes/store.$version._index.tsx +++ b/app/routes/store.$version._index.tsx @@ -5,7 +5,7 @@ import { Link, useLoaderData, useParams } from '@remix-run/react' import { Carbon } from '~/components/Carbon' import { Footer } from '~/components/Footer' import { VscPreview } from 'react-icons/vsc/index' -import { TbHeartHandshake } from 'react-icons/tb' +import { TbHeartHandshake } from 'react-icons/tb/index' import SponsorPack from '~/components/SponsorPack' import { gradientText, latestVersion, repo } from '~/projects/store' import { Logo } from '~/components/Logo' From e4736e52199d16a6e74a05af2afb2e3a4fa8b74b Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Tue, 9 Jan 2024 22:17:03 +1100 Subject: [PATCH 34/39] Add vite-plugin-cjs-interop --- app/components/Docs.tsx | 2 +- app/components/Search.tsx | 2 +- package.json | 1 + pnpm-lock.yaml | 25 +++++++++++++++++++++++++ vite.config.ts | 7 ++++++- 5 files changed, 34 insertions(+), 3 deletions(-) diff --git a/app/components/Docs.tsx b/app/components/Docs.tsx index 8d742dda..ebc657fe 100644 --- a/app/components/Docs.tsx +++ b/app/components/Docs.tsx @@ -1,5 +1,5 @@ import { useMemo, useRef } from 'react' -import * as DocSearch from '@docsearch/react' +import DocSearch from '@docsearch/react' import { CgClose, CgMenuLeft } from 'react-icons/cg/index' import { FaArrowLeft, FaArrowRight, FaTimes } from 'react-icons/fa/index' import { NavLink, Outlet, useMatches } from '@remix-run/react' diff --git a/app/components/Search.tsx b/app/components/Search.tsx index d882a068..eb298ac5 100644 --- a/app/components/Search.tsx +++ b/app/components/Search.tsx @@ -1,4 +1,4 @@ -import * as DocSearch from '@docsearch/react' +import DocSearch from '@docsearch/react' import type { DocSearchProps } from '@docsearch/react' export function Search(props: DocSearchProps) { diff --git a/package.json b/package.json index 646ec5b8..a4dec89d 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "tailwindcss": "^3.3.5", "typescript": "^5.2.2", "vite": "^5.0.10", + "vite-plugin-cjs-interop": "^2.0.1", "vite-tsconfig-paths": "^4.2.3" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7b9f4514..19de549a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -133,6 +133,9 @@ devDependencies: vite: specifier: ^5.0.10 version: 5.0.10 + vite-plugin-cjs-interop: + specifier: ^2.0.1 + version: 2.0.1 vite-tsconfig-paths: specifier: ^4.2.3 version: 4.2.3(typescript@5.2.2)(vite@5.0.10) @@ -2406,6 +2409,12 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + /acorn@8.11.3: + resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + /aggregate-error@3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} engines: {node: '>=8'} @@ -5093,6 +5102,13 @@ packages: hasBin: true dev: true + /magic-string@0.30.5: + resolution: {integrity: sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + /markdown-extensions@1.1.1: resolution: {integrity: sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q==} engines: {node: '>=0.10.0'} @@ -7648,6 +7664,15 @@ packages: - terser dev: true + /vite-plugin-cjs-interop@2.0.1: + resolution: {integrity: sha512-49A2oEgkM47V3TZvh9P3L295PMD7YMz/eJP17w4TNsG6XMwlqh/eRWYkoMgYRXF/DtaDNEqMEZTHda+lPRQv8w==} + dependencies: + acorn: 8.11.3 + estree-walker: 3.0.3 + magic-string: 0.30.5 + minimatch: 9.0.3 + dev: true + /vite-tsconfig-paths@4.2.3(typescript@5.2.2)(vite@5.0.10): resolution: {integrity: sha512-xVsA2xe6QSlzBujtWF8q2NYexh7PAUYfzJ4C8Axpe/7d2pcERYxuxGgph9F4f0iQO36g5tyGq6eBUYIssdUrVw==} peerDependencies: diff --git a/vite.config.ts b/vite.config.ts index 8d62f693..11563fcc 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,12 @@ import { unstable_vitePlugin as remix } from '@remix-run/dev' import { defineConfig } from 'vite' import tsconfigPaths from 'vite-tsconfig-paths' +import { cjsInterop } from 'vite-plugin-cjs-interop' export default defineConfig({ - plugins: [remix(), tsconfigPaths()], + plugins: [ + remix(), + tsconfigPaths(), + cjsInterop({ dependencies: ['@docsearch/react'] }) as any, + ], }) From cf4e0e2755129d5759786ebe8222fdf7fd11096b Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Tue, 9 Jan 2024 22:18:39 +1100 Subject: [PATCH 35/39] Fix DocSearch import --- app/components/Docs.tsx | 4 ++-- app/components/Search.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/components/Docs.tsx b/app/components/Docs.tsx index ebc657fe..c8c08361 100644 --- a/app/components/Docs.tsx +++ b/app/components/Docs.tsx @@ -1,5 +1,5 @@ import { useMemo, useRef } from 'react' -import DocSearch from '@docsearch/react' +import { DocSearch } from '@docsearch/react' import { CgClose, CgMenuLeft } from 'react-icons/cg/index' import { FaArrowLeft, FaArrowRight, FaTimes } from 'react-icons/fa/index' import { NavLink, Outlet, useMatches } from '@remix-run/react' @@ -194,7 +194,7 @@ export function Docs({
{logo}
- + return } From 8c893ea9754dd22481d12ad23ff1ff9d7c61ed15 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Fri, 19 Jan 2024 17:01:32 +1100 Subject: [PATCH 36/39] Fix lockfile --- pnpm-lock.yaml | 270 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 252 insertions(+), 18 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fa27e409..0b77fdce 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -57,7 +57,7 @@ dependencies: specifier: ^7.13.1 version: 7.18.3 prism-react-renderer: - specifier: ^2.3.1 + specifier: ^2.1.0 version: 2.3.1(react@18.2.0) prismjs: specifier: ^1.29.0 @@ -73,10 +73,10 @@ dependencies: version: 18.2.0(react@18.2.0) react-icons: specifier: ^4.11.0 - version: 4.11.0(react@18.2.0) + version: 4.12.0(react@18.2.0) react-markdown: specifier: ^6.0.3 - version: 6.0.3(@types/react@18.2.34)(react@18.2.0) + version: 6.0.3(@types/react@18.2.36)(react@18.2.0) rehype-raw: specifier: ^5.1.0 version: 5.1.0 @@ -736,6 +736,15 @@ packages: resolution: {integrity: sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==} dev: true + /@esbuild/aix-ppc64@0.19.11: + resolution: {integrity: sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm64@0.17.6: resolution: {integrity: sha512-YnYSCceN/dUzUr5kdtUzB+wZprCafuD89Hs0Aqv9QSdwhYQybhXTaSTcrl6X/aWThn1a/j0eEpUBGOE7269REg==} engines: {node: '>=12'} @@ -754,6 +763,15 @@ packages: dev: true optional: true + /@esbuild/android-arm64@0.19.11: + resolution: {integrity: sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm@0.17.6: resolution: {integrity: sha512-bSC9YVUjADDy1gae8RrioINU6e1lCkg3VGVwm0QQ2E1CWcC4gnMce9+B6RpxuSsrsXsk1yojn7sp1fnG8erE2g==} engines: {node: '>=12'} @@ -772,6 +790,15 @@ packages: dev: true optional: true + /@esbuild/android-arm@0.19.11: + resolution: {integrity: sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-x64@0.17.6: resolution: {integrity: sha512-MVcYcgSO7pfu/x34uX9u2QIZHmXAB7dEiLQC5bBl5Ryqtpj9lT2sg3gNDEsrPEmimSJW2FXIaxqSQ501YLDsZQ==} engines: {node: '>=12'} @@ -790,6 +817,15 @@ packages: dev: true optional: true + /@esbuild/android-x64@0.19.11: + resolution: {integrity: sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-arm64@0.17.6: resolution: {integrity: sha512-bsDRvlbKMQMt6Wl08nHtFz++yoZHsyTOxnjfB2Q95gato+Yi4WnRl13oC2/PJJA9yLCoRv9gqT/EYX0/zDsyMA==} engines: {node: '>=12'} @@ -808,6 +844,15 @@ packages: dev: true optional: true + /@esbuild/darwin-arm64@0.19.11: + resolution: {integrity: sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-x64@0.17.6: resolution: {integrity: sha512-xh2A5oPrYRfMFz74QXIQTQo8uA+hYzGWJFoeTE8EvoZGHb+idyV4ATaukaUvnnxJiauhs/fPx3vYhU4wiGfosg==} engines: {node: '>=12'} @@ -826,6 +871,15 @@ packages: dev: true optional: true + /@esbuild/darwin-x64@0.19.11: + resolution: {integrity: sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-arm64@0.17.6: resolution: {integrity: sha512-EnUwjRc1inT4ccZh4pB3v1cIhohE2S4YXlt1OvI7sw/+pD+dIE4smwekZlEPIwY6PhU6oDWwITrQQm5S2/iZgg==} engines: {node: '>=12'} @@ -844,6 +898,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-arm64@0.19.11: + resolution: {integrity: sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-x64@0.17.6: resolution: {integrity: sha512-Uh3HLWGzH6FwpviUcLMKPCbZUAFzv67Wj5MTwK6jn89b576SR2IbEp+tqUHTr8DIl0iDmBAf51MVaP7pw6PY5Q==} engines: {node: '>=12'} @@ -862,6 +925,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-x64@0.19.11: + resolution: {integrity: sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm64@0.17.6: resolution: {integrity: sha512-bUR58IFOMJX523aDVozswnlp5yry7+0cRLCXDsxnUeQYJik1DukMY+apBsLOZJblpH+K7ox7YrKrHmJoWqVR9w==} engines: {node: '>=12'} @@ -880,6 +952,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm64@0.19.11: + resolution: {integrity: sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm@0.17.6: resolution: {integrity: sha512-7YdGiurNt7lqO0Bf/U9/arrPWPqdPqcV6JCZda4LZgEn+PTQ5SMEI4MGR52Bfn3+d6bNEGcWFzlIxiQdS48YUw==} engines: {node: '>=12'} @@ -898,6 +979,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm@0.19.11: + resolution: {integrity: sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ia32@0.17.6: resolution: {integrity: sha512-ujp8uoQCM9FRcbDfkqECoARsLnLfCUhKARTP56TFPog8ie9JG83D5GVKjQ6yVrEVdMie1djH86fm98eY3quQkQ==} engines: {node: '>=12'} @@ -916,6 +1006,15 @@ packages: dev: true optional: true + /@esbuild/linux-ia32@0.19.11: + resolution: {integrity: sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-loong64@0.17.6: resolution: {integrity: sha512-y2NX1+X/Nt+izj9bLoiaYB9YXT/LoaQFYvCkVD77G/4F+/yuVXYCWz4SE9yr5CBMbOxOfBcy/xFL4LlOeNlzYQ==} engines: {node: '>=12'} @@ -934,6 +1033,15 @@ packages: dev: true optional: true + /@esbuild/linux-loong64@0.19.11: + resolution: {integrity: sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-mips64el@0.17.6: resolution: {integrity: sha512-09AXKB1HDOzXD+j3FdXCiL/MWmZP0Ex9eR8DLMBVcHorrWJxWmY8Nms2Nm41iRM64WVx7bA/JVHMv081iP2kUA==} engines: {node: '>=12'} @@ -952,6 +1060,15 @@ packages: dev: true optional: true + /@esbuild/linux-mips64el@0.19.11: + resolution: {integrity: sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ppc64@0.17.6: resolution: {integrity: sha512-AmLhMzkM8JuqTIOhxnX4ubh0XWJIznEynRnZAVdA2mMKE6FAfwT2TWKTwdqMG+qEaeyDPtfNoZRpJbD4ZBv0Tg==} engines: {node: '>=12'} @@ -970,6 +1087,15 @@ packages: dev: true optional: true + /@esbuild/linux-ppc64@0.19.11: + resolution: {integrity: sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-riscv64@0.17.6: resolution: {integrity: sha512-Y4Ri62PfavhLQhFbqucysHOmRamlTVK10zPWlqjNbj2XMea+BOs4w6ASKwQwAiqf9ZqcY9Ab7NOU4wIgpxwoSQ==} engines: {node: '>=12'} @@ -988,6 +1114,15 @@ packages: dev: true optional: true + /@esbuild/linux-riscv64@0.19.11: + resolution: {integrity: sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-s390x@0.17.6: resolution: {integrity: sha512-SPUiz4fDbnNEm3JSdUW8pBJ/vkop3M1YwZAVwvdwlFLoJwKEZ9L98l3tzeyMzq27CyepDQ3Qgoba44StgbiN5Q==} engines: {node: '>=12'} @@ -1006,6 +1141,15 @@ packages: dev: true optional: true + /@esbuild/linux-s390x@0.19.11: + resolution: {integrity: sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-x64@0.17.6: resolution: {integrity: sha512-a3yHLmOodHrzuNgdpB7peFGPx1iJ2x6m+uDvhP2CKdr2CwOaqEFMeSqYAHU7hG+RjCq8r2NFujcd/YsEsFgTGw==} engines: {node: '>=12'} @@ -1024,6 +1168,15 @@ packages: dev: true optional: true + /@esbuild/linux-x64@0.19.11: + resolution: {integrity: sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/netbsd-x64@0.17.6: resolution: {integrity: sha512-EanJqcU/4uZIBreTrnbnre2DXgXSa+Gjap7ifRfllpmyAU7YMvaXmljdArptTHmjrkkKm9BK6GH5D5Yo+p6y5A==} engines: {node: '>=12'} @@ -1042,6 +1195,15 @@ packages: dev: true optional: true + /@esbuild/netbsd-x64@0.19.11: + resolution: {integrity: sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/openbsd-x64@0.17.6: resolution: {integrity: sha512-xaxeSunhQRsTNGFanoOkkLtnmMn5QbA0qBhNet/XLVsc+OVkpIWPHcr3zTW2gxVU5YOHFbIHR9ODuaUdNza2Vw==} engines: {node: '>=12'} @@ -1060,6 +1222,15 @@ packages: dev: true optional: true + /@esbuild/openbsd-x64@0.19.11: + resolution: {integrity: sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/sunos-x64@0.17.6: resolution: {integrity: sha512-gnMnMPg5pfMkZvhHee21KbKdc6W3GR8/JuE0Da1kjwpK6oiFU3nqfHuVPgUX2rsOx9N2SadSQTIYV1CIjYG+xw==} engines: {node: '>=12'} @@ -1078,6 +1249,15 @@ packages: dev: true optional: true + /@esbuild/sunos-x64@0.19.11: + resolution: {integrity: sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-arm64@0.17.6: resolution: {integrity: sha512-G95n7vP1UnGJPsVdKXllAJPtqjMvFYbN20e8RK8LVLhlTiSOH1sd7+Gt7rm70xiG+I5tM58nYgwWrLs6I1jHqg==} engines: {node: '>=12'} @@ -1096,6 +1276,15 @@ packages: dev: true optional: true + /@esbuild/win32-arm64@0.19.11: + resolution: {integrity: sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-ia32@0.17.6: resolution: {integrity: sha512-96yEFzLhq5bv9jJo5JhTs1gI+1cKQ83cUpyxHuGqXVwQtY5Eq54ZEsKs8veKtiKwlrNimtckHEkj4mRh4pPjsg==} engines: {node: '>=12'} @@ -1114,6 +1303,15 @@ packages: dev: true optional: true + /@esbuild/win32-ia32@0.19.11: + resolution: {integrity: sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-x64@0.17.6: resolution: {integrity: sha512-n6d8MOyUrNp6G4VSpRcgjs5xj4A91svJSaiwLIDWVWEsZtpN5FA9NlBbZHDmAJc2e8e6SF4tkBD3HAvPF+7igA==} engines: {node: '>=12'} @@ -1132,6 +1330,15 @@ packages: dev: true optional: true + /@esbuild/win32-x64@0.19.11: + resolution: {integrity: sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@eslint-community/eslint-utils@4.4.0(eslint@8.53.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -3295,6 +3502,37 @@ packages: '@esbuild/win32-x64': 0.18.20 dev: true + /esbuild@0.19.11: + resolution: {integrity: sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/aix-ppc64': 0.19.11 + '@esbuild/android-arm': 0.19.11 + '@esbuild/android-arm64': 0.19.11 + '@esbuild/android-x64': 0.19.11 + '@esbuild/darwin-arm64': 0.19.11 + '@esbuild/darwin-x64': 0.19.11 + '@esbuild/freebsd-arm64': 0.19.11 + '@esbuild/freebsd-x64': 0.19.11 + '@esbuild/linux-arm': 0.19.11 + '@esbuild/linux-arm64': 0.19.11 + '@esbuild/linux-ia32': 0.19.11 + '@esbuild/linux-loong64': 0.19.11 + '@esbuild/linux-mips64el': 0.19.11 + '@esbuild/linux-ppc64': 0.19.11 + '@esbuild/linux-riscv64': 0.19.11 + '@esbuild/linux-s390x': 0.19.11 + '@esbuild/linux-x64': 0.19.11 + '@esbuild/netbsd-x64': 0.19.11 + '@esbuild/openbsd-x64': 0.19.11 + '@esbuild/sunos-x64': 0.19.11 + '@esbuild/win32-arm64': 0.19.11 + '@esbuild/win32-ia32': 0.19.11 + '@esbuild/win32-x64': 0.19.11 + dev: true + /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} @@ -4313,7 +4551,7 @@ packages: /hast-util-to-estree@2.3.3: resolution: {integrity: sha512-ihhPIUPxN0v0w6M5+IiAZZrn0LH2uZomeWwhn7uP7avZC6TE7lIiEh2yBMPr5+zi1aUCXq6VoYRgs2Bw9xmycQ==} dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.4 '@types/estree-jsx': 1.0.3 '@types/hast': 2.3.7 '@types/unist': 2.0.9 @@ -5355,7 +5593,7 @@ packages: /micromark-extension-mdx-expression@1.0.8: resolution: {integrity: sha512-zZpeQtc5wfWKdzDsHRBY003H2Smg+PUi2REhqgIhdzAa5xonhP03FcXxqFSerFiNUr5AWmHpaNPQTBVOS4lrXw==} dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.4 micromark-factory-mdx-expression: 1.0.9 micromark-factory-space: 1.1.0 micromark-util-character: 1.2.0 @@ -5369,7 +5607,7 @@ packages: resolution: {integrity: sha512-gPH+9ZdmDflbu19Xkb8+gheqEDqkSpdCEubQyxuz/Hn8DOXiXvrXeikOoBA71+e8Pfi0/UYmU3wW3H58kr7akA==} dependencies: '@types/acorn': 4.0.6 - '@types/estree': 1.0.5 + '@types/estree': 1.0.4 estree-util-is-identifier-name: 2.1.0 micromark-factory-mdx-expression: 1.0.9 micromark-factory-space: 1.1.0 @@ -5389,7 +5627,7 @@ packages: /micromark-extension-mdxjs-esm@1.0.5: resolution: {integrity: sha512-xNRBw4aoURcyz/S69B19WnZAkWJMxHMT5hE36GtDAyhoyn/8TuAeqjFJQlwk+MKQsUD7b3l7kFX+vlfVWgcX1w==} dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.4 micromark-core-commonmark: 1.1.0 micromark-util-character: 1.2.0 micromark-util-events-to-acorn: 1.2.3 @@ -5433,7 +5671,7 @@ packages: /micromark-factory-mdx-expression@1.0.9: resolution: {integrity: sha512-jGIWzSmNfdnkJq05c7b0+Wv0Kfz3NJ3N4cBjnbO4zjXIlxJr+f8lk+5ZmwFvqdAbUy2q6B5rCY//g0QAAaXDWA==} dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.4 micromark-util-character: 1.2.0 micromark-util-events-to-acorn: 1.2.3 micromark-util-symbol: 1.1.0 @@ -5519,7 +5757,7 @@ packages: resolution: {integrity: sha512-ij4X7Wuc4fED6UoLWkmo0xJQhsktfNh1J0m8g4PbIMPlx+ek/4YdW5mvbye8z/aZvAPUoxgXHrwVlXAPKMRp1w==} dependencies: '@types/acorn': 4.0.6 - '@types/estree': 1.0.5 + '@types/estree': 1.0.4 '@types/unist': 2.0.9 estree-util-visit: 1.2.1 micromark-util-symbol: 1.1.0 @@ -5769,10 +6007,6 @@ packages: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} - /nice-try@1.0.5: - resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} - dev: true - /node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -6138,7 +6372,7 @@ packages: /periscopic@3.1.0: resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==} dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.4 estree-walker: 3.0.3 is-reference: 3.0.2 dev: true @@ -6355,7 +6589,7 @@ packages: peerDependencies: react: '>=16.0.0' dependencies: - '@types/prismjs': 1.26.3 + '@types/prismjs': 1.26.2 clsx: 2.1.0 react: 18.2.0 dev: false @@ -6497,14 +6731,14 @@ packages: /react-is@17.0.2: resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} - /react-markdown@6.0.3(@types/react@18.2.34)(react@18.2.0): + /react-markdown@6.0.3(@types/react@18.2.36)(react@18.2.0): resolution: {integrity: sha512-kQbpWiMoBHnj9myLlmZG9T1JdoT/OEyHK7hqM6CqFT14MAkgWiWBUYijLyBmxbntaN6dCDicPcUhWhci1QYodg==} peerDependencies: '@types/react': '>=16' react: '>=16' dependencies: '@types/hast': 2.3.7 - '@types/react': 18.2.34 + '@types/react': 18.2.36 '@types/unist': 2.0.9 comma-separated-tokens: 1.0.8 prop-types: 15.8.1 @@ -7858,7 +8092,7 @@ packages: terser: optional: true dependencies: - esbuild: 0.19.5 + esbuild: 0.19.11 postcss: 8.4.32 rollup: 4.9.2 optionalDependencies: From 68dcc16d8bef34b6d95c2726f2befd464de83788 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Fri, 19 Jan 2024 17:04:21 +1100 Subject: [PATCH 37/39] Fix merge --- app/components/RenderMarkdown.tsx | 2 -- app/routes/form.tsx | 17 ++++++++++++++++- app/routes/store.tsx | 17 ++++++++++++++++- app/utils/documents.server.ts | 2 -- 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/app/components/RenderMarkdown.tsx b/app/components/RenderMarkdown.tsx index ae0a2a98..11cbf355 100644 --- a/app/components/RenderMarkdown.tsx +++ b/app/components/RenderMarkdown.tsx @@ -1,5 +1,3 @@ -import { useMemo } from 'react' -import { getMDXComponent } from 'mdx-bundler/client' import { CodeBlock } from '~/components/CodeBlock' import { MarkdownLink } from '~/components/MarkdownLink' import type { FC, HTMLProps } from 'react' diff --git a/app/routes/form.tsx b/app/routes/form.tsx index e6bfa55d..bca2201f 100644 --- a/app/routes/form.tsx +++ b/app/routes/form.tsx @@ -1,7 +1,22 @@ -import { Outlet } from '@remix-run/react' +import * as React from 'react' +import { + Link, + Outlet, + useMatches, + useNavigate, + useParams, +} from '@remix-run/react' import type { LoaderFunctionArgs, MetaFunction } from '@remix-run/node' import { redirect } from '@remix-run/node' import { seo } from '~/utils/seo' +import { generatePath, useMatchesData } from '~/utils/utils' +import reactLogo from '~/images/react-logo.svg' +import solidLogo from '~/images/solid-logo.svg' +import vueLogo from '~/images/vue-logo.svg' +import svelteLogo from '~/images/svelte-logo.svg' +import angularLogo from '~/images/angular-logo.svg' +import { FaDiscord, FaGithub } from 'react-icons/fa' +import type { AvailableOptions } from '~/components/Select' import { Scarf } from '~/components/Scarf' export type FrameworkMenu = { diff --git a/app/routes/store.tsx b/app/routes/store.tsx index ab7297fe..6c364c52 100644 --- a/app/routes/store.tsx +++ b/app/routes/store.tsx @@ -1,7 +1,22 @@ -import { Outlet } from '@remix-run/react' +import * as React from 'react' +import { + Link, + Outlet, + useMatches, + useNavigate, + useParams, +} from '@remix-run/react' import type { LoaderFunctionArgs, MetaFunction } from '@remix-run/node' import { redirect } from '@remix-run/node' import { seo } from '~/utils/seo' +import { generatePath, useMatchesData } from '~/utils/utils' +import reactLogo from '~/images/react-logo.svg' +import solidLogo from '~/images/solid-logo.svg' +import vueLogo from '~/images/vue-logo.svg' +import svelteLogo from '~/images/svelte-logo.svg' +import angularLogo from '~/images/angular-logo.svg' +import { FaDiscord, FaGithub } from 'react-icons/fa' +import type { AvailableOptions } from '~/components/Select' export type FrameworkMenu = { framework: string diff --git a/app/utils/documents.server.ts b/app/utils/documents.server.ts index 94f74e7e..a54ef7cd 100644 --- a/app/utils/documents.server.ts +++ b/app/utils/documents.server.ts @@ -2,8 +2,6 @@ import fsp from 'node:fs/promises' import path from 'node:path' import * as graymatter from 'gray-matter' import { fetchCached } from '~/utils/cache.server' -import remarkGfm from 'remark-gfm' -import rehypeSlug from 'rehype-slug' export type DocFrontMatter = { title: string From 0113165d4787725b43651f7f61bbd3ad28f81352 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Fri, 19 Jan 2024 17:09:25 +1100 Subject: [PATCH 38/39] More fixes --- app/routes/query.$version.docs.$framework.$.tsx | 2 +- app/routes/ranger.v1.docs.$.tsx | 2 +- app/routes/router.v1.docs.$.tsx | 2 +- app/routes/table.v8.docs.$.tsx | 2 +- app/routes/virtual.v3.docs.$.tsx | 2 +- app/utils/documents.server.ts | 1 + 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/routes/query.$version.docs.$framework.$.tsx b/app/routes/query.$version.docs.$framework.$.tsx index 0fc2913b..85963cc0 100644 --- a/app/routes/query.$version.docs.$framework.$.tsx +++ b/app/routes/query.$version.docs.$framework.$.tsx @@ -1,7 +1,7 @@ import type { LoaderFunctionArgs, MetaFunction } from '@remix-run/node' import { json, redirect } from '@remix-run/node' import { extractFrontMatter, fetchRepoFile } from '~/utils/documents.server' -import { repo, getBranch } from '~/routes/query' +import { repo, getBranch } from '~/projects/query' import { DefaultErrorBoundary } from '~/components/DefaultErrorBoundary' import { seo } from '~/utils/seo' import removeMarkdown from 'remove-markdown' diff --git a/app/routes/ranger.v1.docs.$.tsx b/app/routes/ranger.v1.docs.$.tsx index 6d604e0e..c948340c 100644 --- a/app/routes/ranger.v1.docs.$.tsx +++ b/app/routes/ranger.v1.docs.$.tsx @@ -2,7 +2,7 @@ import { useLoaderData } from '@remix-run/react' import type { LoaderFunctionArgs, MetaFunction } from '@remix-run/node' import { json } from '@remix-run/node' import { extractFrontMatter, fetchRepoFile } from '~/utils/documents.server' -import { v1branch } from '~/routes/ranger.v1' +import { v1branch } from '~/projects/ranger' import { DefaultErrorBoundary } from '~/components/DefaultErrorBoundary' import { seo } from '~/utils/seo' import removeMarkdown from 'remove-markdown' diff --git a/app/routes/router.v1.docs.$.tsx b/app/routes/router.v1.docs.$.tsx index db04fc7e..bba46e32 100644 --- a/app/routes/router.v1.docs.$.tsx +++ b/app/routes/router.v1.docs.$.tsx @@ -2,7 +2,7 @@ import { useLoaderData } from '@remix-run/react' import type { LoaderFunctionArgs, MetaFunction } from '@remix-run/node' import { json } from '@remix-run/node' import { extractFrontMatter, fetchRepoFile } from '~/utils/documents.server' -import { v1branch } from '~/routes/router.v1' +import { v1branch } from '~/projects/router' import { DefaultErrorBoundary } from '~/components/DefaultErrorBoundary' import { seo } from '~/utils/seo' import removeMarkdown from 'remove-markdown' diff --git a/app/routes/table.v8.docs.$.tsx b/app/routes/table.v8.docs.$.tsx index b624393b..120098f1 100644 --- a/app/routes/table.v8.docs.$.tsx +++ b/app/routes/table.v8.docs.$.tsx @@ -2,7 +2,7 @@ import { useLoaderData } from '@remix-run/react' import type { LoaderFunctionArgs, MetaFunction } from '@remix-run/node' import { json } from '@remix-run/node' import { extractFrontMatter, fetchRepoFile } from '~/utils/documents.server' -import { v8branch } from '~/routes/table.v8' +import { v8branch } from '~/projects/table' import { DefaultErrorBoundary } from '~/components/DefaultErrorBoundary' import { seo } from '~/utils/seo' import removeMarkdown from 'remove-markdown' diff --git a/app/routes/virtual.v3.docs.$.tsx b/app/routes/virtual.v3.docs.$.tsx index 48660dcb..6209633b 100644 --- a/app/routes/virtual.v3.docs.$.tsx +++ b/app/routes/virtual.v3.docs.$.tsx @@ -2,7 +2,7 @@ import { useLoaderData } from '@remix-run/react' import type { LoaderFunctionArgs, MetaFunction } from '@remix-run/node' import { json } from '@remix-run/node' import { extractFrontMatter, fetchRepoFile } from '~/utils/documents.server' -import { v3branch } from '~/routes/virtual.v3' +import { v3branch } from '~/projects/virtual' import { DefaultErrorBoundary } from '~/components/DefaultErrorBoundary' import { seo } from '~/utils/seo' import removeMarkdown from 'remove-markdown' diff --git a/app/utils/documents.server.ts b/app/utils/documents.server.ts index a54ef7cd..02621a8b 100644 --- a/app/utils/documents.server.ts +++ b/app/utils/documents.server.ts @@ -2,6 +2,7 @@ import fsp from 'node:fs/promises' import path from 'node:path' import * as graymatter from 'gray-matter' import { fetchCached } from '~/utils/cache.server' +import { fileURLToPath } from 'node:url' export type DocFrontMatter = { title: string From 09421c61ff4af50756790eb506ee8f70c475c5d1 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sat, 20 Jan 2024 19:36:02 +1100 Subject: [PATCH 39/39] Delete duplicate config --- app/projects/query.ts | 62 ----------------------------------------- app/projects/ranger.ts | 10 ------- app/projects/router.ts | 10 ------- app/projects/table.ts | 10 ------- app/projects/virtual.ts | 10 ------- 5 files changed, 102 deletions(-) delete mode 100644 app/projects/query.ts delete mode 100644 app/projects/ranger.ts delete mode 100644 app/projects/router.ts delete mode 100644 app/projects/table.ts delete mode 100644 app/projects/virtual.ts diff --git a/app/projects/query.ts b/app/projects/query.ts deleted file mode 100644 index 3f0c3d81..00000000 --- a/app/projects/query.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { useMatchesData } from '~/utils/utils' -import type { ReactNode } from 'react' - -export const gradientText = - 'inline-block text-transparent bg-clip-text bg-gradient-to-r from-red-500 to-amber-500' - -export const repo = 'tanstack/query' - -const latestBranch = 'main' -export const latestVersion = 'v5' -export const availableVersions = [ - { - name: 'v5', - branch: latestBranch, - }, - { - name: 'v4', - branch: 'v4', - }, - { - name: 'v3', - branch: 'v3', - }, -] as const - -export function getBranch(argVersion?: string) { - const version = argVersion || latestVersion - - if (version === 'latest') { - return latestBranch - } - - return ( - availableVersions.find((v) => v.name === version)?.branch ?? latestBranch - ) -} - -export type Menu = { - framework: string - menuItems: MenuItem[] -} - -export type MenuItem = { - label: string | ReactNode - children: { - label: string | ReactNode - to: string - }[] -} - -export type GithubDocsConfig = { - docSearch: { - appId: string - apiKey: string - indexName: string - } - menu: Menu[] - users: string[] -} - -export const useReactQueryDocsConfig = (version?: string) => - useMatchesData(`/query/${version}`) as GithubDocsConfig diff --git a/app/projects/ranger.ts b/app/projects/ranger.ts deleted file mode 100644 index f43e61a0..00000000 --- a/app/projects/ranger.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { DocsConfig } from '~/components/Docs' -import { useMatchesData } from '~/utils/utils' - -export const gradientText = - 'inline-block text-transparent bg-clip-text bg-gradient-to-r from-lime-500 to-emerald-500' - -export const v1branch = 'main' - -export const useRangerV1Config = () => - useMatchesData('/ranger/v1') as DocsConfig diff --git a/app/projects/router.ts b/app/projects/router.ts deleted file mode 100644 index 96149d54..00000000 --- a/app/projects/router.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { DocsConfig } from '~/components/Docs' -import { useMatchesData } from '~/utils/utils' - -export const v1branch = 'main' - -export const useRouterV1Config = () => - useMatchesData('/router/v1') as DocsConfig - -export const gradientText = - 'inline-block text-transparent bg-clip-text bg-gradient-to-r from-lime-500 to-emerald-500' diff --git a/app/projects/table.ts b/app/projects/table.ts deleted file mode 100644 index aa614649..00000000 --- a/app/projects/table.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { DocsConfig } from '~/components/Docs' -import { useMatchesData } from '~/utils/utils' - -export const gradientText = - 'inline-block text-transparent bg-clip-text bg-gradient-to-r from-teal-500 to-blue-600' - -export const v8branch = 'main' - -export const useReactTableV8Config = () => - useMatchesData('/table/v8') as DocsConfig diff --git a/app/projects/virtual.ts b/app/projects/virtual.ts deleted file mode 100644 index fad75e1a..00000000 --- a/app/projects/virtual.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { DocsConfig } from '~/components/Docs' -import { useMatchesData } from '~/utils/utils' - -export const v3branch = 'main' - -export const useVirtualV3Config = () => - useMatchesData('/virtual/v3') as DocsConfig - -export const gradientText = - 'inline-block text-transparent bg-clip-text bg-gradient-to-r from-rose-500 to-violet-600'