diff --git a/astro.config.ts b/astro.config.ts index 61447a66c..00e9a466b 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -1,6 +1,7 @@ import { defineConfig } from "astro/config" import preact from "@astrojs/preact" import react from "@astrojs/react" +import svgr from "vite-plugin-svgr" import astroI18next from "astro-i18next" import { astroCallouts, asideAutoImport } from "./integrations/astro-callouts" import { solidityRemixCode, codeSampleAutoImport } from "./integrations/solidity-remix" @@ -32,6 +33,7 @@ export default defineConfig({ preact({ compat: true, }), + sitemap({ changefreq: "daily", }), @@ -47,6 +49,9 @@ export default defineConfig({ }), astroI18next(), ], + vite: { + plugins: [svgr()], + }, markdown: { drafts: true, remarkPlugins: [remarkMath, remarkGfm], diff --git a/integrations/utils/makeComponentNode.ts b/integrations/utils/makeComponentNode.ts index c624d909f..04b9b10d8 100644 --- a/integrations/utils/makeComponentNode.ts +++ b/integrations/utils/makeComponentNode.ts @@ -21,7 +21,7 @@ export function makeComponentNode( type: "mdxJsxFlowElement", name, attributes: Object.entries(attributes) - // Filter out non-truthy attributes to avoid empty attrs being parsed as `true`. + // Filter out non-truthy attributes to avoid empty attributes being parsed as `true`. .filter(([_k, v]) => v !== false && Boolean(v)) .map(([name, value]) => ({ type: "mdxJsxAttribute", diff --git a/package-lock.json b/package-lock.json index df6108cac..199b0e142 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,6 +34,7 @@ "rehype-mermaidjs": "^1.0.1", "remark-gfm": "^3.0.1", "remark-math": "^5.1.1", + "squirrel-gill": "^1.0.5", "tailwindcss": "^3.2.4", "to-querystring": "^1.1.1", "turndown": "^7.1.2" @@ -75,7 +76,8 @@ "solhint-plugin-prettier": "^0.0.5", "tsconfig-paths": "^4.1.0", "typescript": "^4.8.4", - "unist-util-remove": "^3.1.0" + "unist-util-remove": "^3.1.0", + "vite-plugin-svgr": "^4.2.0" } }, "node_modules/@algolia/cache-browser-local-storage": { @@ -2887,6 +2889,34 @@ "@proload/core": "^0.3.2" } }, + "node_modules/@rollup/pluginutils": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz", + "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, "node_modules/@scure/base": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz", @@ -3053,6 +3083,219 @@ "antlr4ts": "^0.5.0-alpha.4" } }, + "node_modules/@svgr/babel-plugin-add-jsx-attribute": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz", + "integrity": "sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-remove-jsx-attribute": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-8.0.0.tgz", + "integrity": "sha512-BcCkm/STipKvbCl6b7QFrMh/vx00vIP63k2eM66MfHJzPr6O2U0jYEViXkHJWqXqQYjdeA9cuCl5KWmlwjDvbA==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-remove-jsx-empty-expression": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-8.0.0.tgz", + "integrity": "sha512-5BcGCBfBxB5+XSDSWnhTThfI9jcO5f0Ai2V24gZpG+wXF14BzwxxdDb4g6trdOux0rhibGs385BeFMSmxtS3uA==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-replace-jsx-attribute-value": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-8.0.0.tgz", + "integrity": "sha512-KVQ+PtIjb1BuYT3ht8M5KbzWBhdAjjUPdlMtpuw/VjT8coTrItWX6Qafl9+ji831JaJcu6PJNKCV0bp01lBNzQ==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-svg-dynamic-title": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-8.0.0.tgz", + "integrity": "sha512-omNiKqwjNmOQJ2v6ge4SErBbkooV2aAWwaPFs2vUY7p7GhVkzRkJ00kILXQvRhA6miHnNpXv7MRnnSjdRjK8og==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-svg-em-dimensions": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-8.0.0.tgz", + "integrity": "sha512-mURHYnu6Iw3UBTbhGwE/vsngtCIbHE43xCRK7kCw4t01xyGqb2Pd+WXekRRoFOBIY29ZoOhUCTEweDMdrjfi9g==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-transform-react-native-svg": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-8.1.0.tgz", + "integrity": "sha512-Tx8T58CHo+7nwJ+EhUwx3LfdNSG9R2OKfaIXXs5soiy5HtgoAEkDay9LIimLOcG8dJQH1wPZp/cnAv6S9CrR1Q==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-plugin-transform-svg-component": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-8.0.0.tgz", + "integrity": "sha512-DFx8xa3cZXTdb/k3kfPeaixecQLgKh5NVBMwD0AQxOzcZawK4oo1Jh9LbrcACUivsCA7TLG8eeWgrDXjTMhRmw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/babel-preset": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-8.1.0.tgz", + "integrity": "sha512-7EYDbHE7MxHpv4sxvnVPngw5fuR6pw79SkcrILHJ/iMpuKySNCl5W1qcwPEpU+LgyRXOaAFgH0KhwD18wwg6ug==", + "dev": true, + "dependencies": { + "@svgr/babel-plugin-add-jsx-attribute": "8.0.0", + "@svgr/babel-plugin-remove-jsx-attribute": "8.0.0", + "@svgr/babel-plugin-remove-jsx-empty-expression": "8.0.0", + "@svgr/babel-plugin-replace-jsx-attribute-value": "8.0.0", + "@svgr/babel-plugin-svg-dynamic-title": "8.0.0", + "@svgr/babel-plugin-svg-em-dimensions": "8.0.0", + "@svgr/babel-plugin-transform-react-native-svg": "8.1.0", + "@svgr/babel-plugin-transform-svg-component": "8.0.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@svgr/core": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/core/-/core-8.1.0.tgz", + "integrity": "sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA==", + "dev": true, + "dependencies": { + "@babel/core": "^7.21.3", + "@svgr/babel-preset": "8.1.0", + "camelcase": "^6.2.0", + "cosmiconfig": "^8.1.3", + "snake-case": "^3.0.4" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + } + }, + "node_modules/@svgr/hast-util-to-babel-ast": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-8.0.0.tgz", + "integrity": "sha512-EbDKwO9GpfWP4jN9sGdYwPBU0kdomaPIL2Eu4YwmgP+sJeXT+L7bMwJUBnhzfH8Q2qMBqZ4fJwpCyYsAN3mt2Q==", + "dev": true, + "dependencies": { + "@babel/types": "^7.21.3", + "entities": "^4.4.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + } + }, + "node_modules/@svgr/plugin-jsx": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-8.1.0.tgz", + "integrity": "sha512-0xiIyBsLlr8quN+WyuxooNW9RJ0Dpr8uOnH/xrCVO8GLUcwHISwj1AG0k+LFzteTkAA0GbX0kj9q6Dk70PTiPA==", + "dev": true, + "dependencies": { + "@babel/core": "^7.21.3", + "@svgr/babel-preset": "8.1.0", + "@svgr/hast-util-to-babel-ast": "8.0.0", + "svg-parser": "^2.0.4" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/gregberge" + }, + "peerDependencies": { + "@svgr/core": "*" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -7017,6 +7260,22 @@ "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.5.tgz", "integrity": "sha512-F9e6wPGtY+8KNMRAVfxeCOHU0/NPWMSENNq4pQctuXRqqdEPW7q3CrLbR5Nse044WwacyjHGOMlvNsBe1y6z9A==" }, + "node_modules/dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "dev": true, + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/dot-case/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/dotenv": { "version": "16.0.3", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", @@ -12415,6 +12674,21 @@ "get-func-name": "^2.0.0" } }, + "node_modules/lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "dev": true, + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/lower-case/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/lru_map": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", @@ -14096,6 +14370,22 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "dev": true, + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "node_modules/no-case/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/node-abi": { "version": "3.40.0", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.40.0.tgz", @@ -17201,6 +17491,22 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/snake-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", + "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", + "dev": true, + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/snake-case/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/solc": { "version": "0.7.3", "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz", @@ -18146,6 +18452,14 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, + "node_modules/squirrel-gill": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/squirrel-gill/-/squirrel-gill-1.0.5.tgz", + "integrity": "sha512-Q28EimiXm9xyJkNPChWuf7pKE9UioMuhId1sSZ8arqElg1yt8NJGVasH+2myvFfjp22lO040VZ0Gv2fVcZWrgA==", + "peerDependencies": { + "react": ">=16.8.0" + } + }, "node_modules/sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -18513,6 +18827,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/svg-parser": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz", + "integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==", + "dev": true + }, "node_modules/sync-request": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", @@ -19940,6 +20260,20 @@ } } }, + "node_modules/vite-plugin-svgr": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/vite-plugin-svgr/-/vite-plugin-svgr-4.2.0.tgz", + "integrity": "sha512-SC7+FfVtNQk7So0XMjrrtLAbEC8qjFPifyD7+fs/E6aaNdVde6umlVVh0QuwDLdOMu7vp5RiGFsB70nj5yo0XA==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^5.0.5", + "@svgr/core": "^8.1.0", + "@svgr/plugin-jsx": "^8.1.0" + }, + "peerDependencies": { + "vite": "^2.6.0 || 3 || 4 || 5" + } + }, "node_modules/vitefu": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.4.tgz", @@ -22403,6 +22737,25 @@ "tsm": "^2.1.4" } }, + "@rollup/pluginutils": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz", + "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", + "dev": true, + "requires": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" + }, + "dependencies": { + "estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + } + } + }, "@scure/base": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz", @@ -22529,6 +22882,113 @@ "antlr4ts": "^0.5.0-alpha.4" } }, + "@svgr/babel-plugin-add-jsx-attribute": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz", + "integrity": "sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g==", + "dev": true, + "requires": {} + }, + "@svgr/babel-plugin-remove-jsx-attribute": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-8.0.0.tgz", + "integrity": "sha512-BcCkm/STipKvbCl6b7QFrMh/vx00vIP63k2eM66MfHJzPr6O2U0jYEViXkHJWqXqQYjdeA9cuCl5KWmlwjDvbA==", + "dev": true, + "requires": {} + }, + "@svgr/babel-plugin-remove-jsx-empty-expression": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-8.0.0.tgz", + "integrity": "sha512-5BcGCBfBxB5+XSDSWnhTThfI9jcO5f0Ai2V24gZpG+wXF14BzwxxdDb4g6trdOux0rhibGs385BeFMSmxtS3uA==", + "dev": true, + "requires": {} + }, + "@svgr/babel-plugin-replace-jsx-attribute-value": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-8.0.0.tgz", + "integrity": "sha512-KVQ+PtIjb1BuYT3ht8M5KbzWBhdAjjUPdlMtpuw/VjT8coTrItWX6Qafl9+ji831JaJcu6PJNKCV0bp01lBNzQ==", + "dev": true, + "requires": {} + }, + "@svgr/babel-plugin-svg-dynamic-title": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-8.0.0.tgz", + "integrity": "sha512-omNiKqwjNmOQJ2v6ge4SErBbkooV2aAWwaPFs2vUY7p7GhVkzRkJ00kILXQvRhA6miHnNpXv7MRnnSjdRjK8og==", + "dev": true, + "requires": {} + }, + "@svgr/babel-plugin-svg-em-dimensions": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-8.0.0.tgz", + "integrity": "sha512-mURHYnu6Iw3UBTbhGwE/vsngtCIbHE43xCRK7kCw4t01xyGqb2Pd+WXekRRoFOBIY29ZoOhUCTEweDMdrjfi9g==", + "dev": true, + "requires": {} + }, + "@svgr/babel-plugin-transform-react-native-svg": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-8.1.0.tgz", + "integrity": "sha512-Tx8T58CHo+7nwJ+EhUwx3LfdNSG9R2OKfaIXXs5soiy5HtgoAEkDay9LIimLOcG8dJQH1wPZp/cnAv6S9CrR1Q==", + "dev": true, + "requires": {} + }, + "@svgr/babel-plugin-transform-svg-component": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-8.0.0.tgz", + "integrity": "sha512-DFx8xa3cZXTdb/k3kfPeaixecQLgKh5NVBMwD0AQxOzcZawK4oo1Jh9LbrcACUivsCA7TLG8eeWgrDXjTMhRmw==", + "dev": true, + "requires": {} + }, + "@svgr/babel-preset": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-8.1.0.tgz", + "integrity": "sha512-7EYDbHE7MxHpv4sxvnVPngw5fuR6pw79SkcrILHJ/iMpuKySNCl5W1qcwPEpU+LgyRXOaAFgH0KhwD18wwg6ug==", + "dev": true, + "requires": { + "@svgr/babel-plugin-add-jsx-attribute": "8.0.0", + "@svgr/babel-plugin-remove-jsx-attribute": "8.0.0", + "@svgr/babel-plugin-remove-jsx-empty-expression": "8.0.0", + "@svgr/babel-plugin-replace-jsx-attribute-value": "8.0.0", + "@svgr/babel-plugin-svg-dynamic-title": "8.0.0", + "@svgr/babel-plugin-svg-em-dimensions": "8.0.0", + "@svgr/babel-plugin-transform-react-native-svg": "8.1.0", + "@svgr/babel-plugin-transform-svg-component": "8.0.0" + } + }, + "@svgr/core": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/core/-/core-8.1.0.tgz", + "integrity": "sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA==", + "dev": true, + "requires": { + "@babel/core": "^7.21.3", + "@svgr/babel-preset": "8.1.0", + "camelcase": "^6.2.0", + "cosmiconfig": "^8.1.3", + "snake-case": "^3.0.4" + } + }, + "@svgr/hast-util-to-babel-ast": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-8.0.0.tgz", + "integrity": "sha512-EbDKwO9GpfWP4jN9sGdYwPBU0kdomaPIL2Eu4YwmgP+sJeXT+L7bMwJUBnhzfH8Q2qMBqZ4fJwpCyYsAN3mt2Q==", + "dev": true, + "requires": { + "@babel/types": "^7.21.3", + "entities": "^4.4.0" + } + }, + "@svgr/plugin-jsx": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-8.1.0.tgz", + "integrity": "sha512-0xiIyBsLlr8quN+WyuxooNW9RJ0Dpr8uOnH/xrCVO8GLUcwHISwj1AG0k+LFzteTkAA0GbX0kj9q6Dk70PTiPA==", + "dev": true, + "requires": { + "@babel/core": "^7.21.3", + "@svgr/babel-preset": "8.1.0", + "@svgr/hast-util-to-babel-ast": "8.0.0", + "svg-parser": "^2.0.4" + } + }, "@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -25619,6 +26079,24 @@ "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.0.5.tgz", "integrity": "sha512-F9e6wPGtY+8KNMRAVfxeCOHU0/NPWMSENNq4pQctuXRqqdEPW7q3CrLbR5Nse044WwacyjHGOMlvNsBe1y6z9A==" }, + "dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "dev": true, + "requires": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + } + } + }, "dotenv": { "version": "16.0.3", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", @@ -29563,6 +30041,23 @@ "get-func-name": "^2.0.0" } }, + "lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "dev": true, + "requires": { + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + } + } + }, "lru_map": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", @@ -30733,6 +31228,24 @@ "@types/nlcst": "^1.0.0" } }, + "no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "dev": true, + "requires": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + } + } + }, "node-abi": { "version": "3.40.0", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.40.0.tgz", @@ -32979,6 +33492,24 @@ } } }, + "snake-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", + "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", + "dev": true, + "requires": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + }, + "dependencies": { + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + } + } + }, "solc": { "version": "0.7.3", "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz", @@ -33724,6 +34255,12 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, + "squirrel-gill": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/squirrel-gill/-/squirrel-gill-1.0.5.tgz", + "integrity": "sha512-Q28EimiXm9xyJkNPChWuf7pKE9UioMuhId1sSZ8arqElg1yt8NJGVasH+2myvFfjp22lO040VZ0Gv2fVcZWrgA==", + "requires": {} + }, "sshpk": { "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", @@ -33987,6 +34524,12 @@ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" }, + "svg-parser": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz", + "integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==", + "dev": true + }, "sync-request": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", @@ -35011,6 +35554,17 @@ "rollup": "^3.21.0" } }, + "vite-plugin-svgr": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/vite-plugin-svgr/-/vite-plugin-svgr-4.2.0.tgz", + "integrity": "sha512-SC7+FfVtNQk7So0XMjrrtLAbEC8qjFPifyD7+fs/E6aaNdVde6umlVVh0QuwDLdOMu7vp5RiGFsB70nj5yo0XA==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^5.0.5", + "@svgr/core": "^8.1.0", + "@svgr/plugin-jsx": "^8.1.0" + } + }, "vitefu": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.4.tgz", diff --git a/package.json b/package.json index 5d4044955..85f1efc4a 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "rehype-mermaidjs": "^1.0.1", "remark-gfm": "^3.0.1", "remark-math": "^5.1.1", + "squirrel-gill": "^1.0.5", "tailwindcss": "^3.2.4", "to-querystring": "^1.1.1", "turndown": "^7.1.2" @@ -88,7 +89,8 @@ "solhint-plugin-prettier": "^0.0.5", "tsconfig-paths": "^4.1.0", "typescript": "^4.8.4", - "unist-util-remove": "^3.1.0" + "unist-util-remove": "^3.1.0", + "vite-plugin-svgr": "^4.2.0" }, "lint-staged": { "*.{css,md,yml,yaml,astro}": "prettier --write", diff --git a/public/assets/search-white.svg b/public/assets/search-white.svg new file mode 100644 index 000000000..45c606a1a --- /dev/null +++ b/public/assets/search-white.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/svgs/Foundry.svg b/public/svgs/Foundry.svg index e9bf9381a..40d265b8e 100644 --- a/public/svgs/Foundry.svg +++ b/public/svgs/Foundry.svg @@ -1,9 +1,9 @@ - + - + - + diff --git a/public/svgs/summary-icon-white.svg b/public/svgs/summary-icon-white.svg new file mode 100644 index 000000000..568ca9af4 --- /dev/null +++ b/public/svgs/summary-icon-white.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/svgs/summary-icon.svg b/public/svgs/summary-icon.svg new file mode 100644 index 000000000..93b84590a --- /dev/null +++ b/public/svgs/summary-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/images/footer/arrow-right.svg b/src/assets/svgs/footer/arrow-right.svg similarity index 80% rename from public/images/footer/arrow-right.svg rename to src/assets/svgs/footer/arrow-right.svg index a759efe4b..ef0c9aa02 100644 --- a/public/images/footer/arrow-right.svg +++ b/src/assets/svgs/footer/arrow-right.svg @@ -1,3 +1,3 @@ - + diff --git a/public/images/footer/subscribe.svg b/src/assets/svgs/footer/subscribe.svg similarity index 93% rename from public/images/footer/subscribe.svg rename to src/assets/svgs/footer/subscribe.svg index cc34dafd4..5f3b0e8ad 100644 --- a/public/images/footer/subscribe.svg +++ b/src/assets/svgs/footer/subscribe.svg @@ -1,4 +1,4 @@ - - + + diff --git a/src/assets/svgs/header/moon.svg b/src/assets/svgs/header/moon.svg new file mode 100644 index 000000000..a31ab8f1c --- /dev/null +++ b/src/assets/svgs/header/moon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/svgs/header/sun.svg b/src/assets/svgs/header/sun.svg new file mode 100644 index 000000000..33f100310 --- /dev/null +++ b/src/assets/svgs/header/sun.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/svgs/Contribute.svg b/src/assets/svgs/home/Contribute.svg similarity index 95% rename from public/svgs/Contribute.svg rename to src/assets/svgs/home/Contribute.svg index 800f46c24..3b8b155c4 100644 --- a/public/svgs/Contribute.svg +++ b/src/assets/svgs/home/Contribute.svg @@ -1,6 +1,6 @@ - + diff --git a/public/svgs/Discord.svg b/src/assets/svgs/home/Discord.svg similarity index 91% rename from public/svgs/Discord.svg rename to src/assets/svgs/home/Discord.svg index bacb0fa41..41c4a450d 100644 --- a/public/svgs/Discord.svg +++ b/src/assets/svgs/home/Discord.svg @@ -1,8 +1,8 @@ - - - - + + + + diff --git a/public/svgs/EthersJS.svg b/src/assets/svgs/home/EthersJS.svg similarity index 94% rename from public/svgs/EthersJS.svg rename to src/assets/svgs/home/EthersJS.svg index ce96f60b9..16876c770 100644 --- a/public/svgs/EthersJS.svg +++ b/src/assets/svgs/home/EthersJS.svg @@ -1,3 +1,3 @@ - + diff --git a/public/svgs/Forum.svg b/src/assets/svgs/home/Forum.svg similarity index 90% rename from public/svgs/Forum.svg rename to src/assets/svgs/home/Forum.svg index af16e21de..02f9f2c9a 100644 --- a/public/svgs/Forum.svg +++ b/src/assets/svgs/home/Forum.svg @@ -1,9 +1,9 @@ - - - - - + + + + + diff --git a/public/svgs/home-develop.svg b/src/assets/svgs/home/home-develop.svg similarity index 98% rename from public/svgs/home-develop.svg rename to src/assets/svgs/home/home-develop.svg index 4a3e57090..5e22bd9e2 100644 --- a/public/svgs/home-develop.svg +++ b/src/assets/svgs/home/home-develop.svg @@ -1,6 +1,6 @@ - - + + diff --git a/public/svgs/home-learn.svg b/src/assets/svgs/home/home-learn.svg similarity index 77% rename from public/svgs/home-learn.svg rename to src/assets/svgs/home/home-learn.svg index 005a03d7b..b2ed73cba 100644 --- a/public/svgs/home-learn.svg +++ b/src/assets/svgs/home/home-learn.svg @@ -1,9 +1,9 @@ - - - - - + + + + + diff --git a/public/svgs/home-link-arrow.svg b/src/assets/svgs/home/home-link-arrow.svg similarity index 83% rename from public/svgs/home-link-arrow.svg rename to src/assets/svgs/home/home-link-arrow.svg index e87c0359d..ca96bd3c0 100644 --- a/public/svgs/home-link-arrow.svg +++ b/src/assets/svgs/home/home-link-arrow.svg @@ -1,6 +1,6 @@ - + diff --git a/public/svgs/home-link.svg b/src/assets/svgs/home/home-link.svg similarity index 96% rename from public/svgs/home-link.svg rename to src/assets/svgs/home/home-link.svg index c6edbf8d2..1b7c31566 100644 --- a/public/svgs/home-link.svg +++ b/src/assets/svgs/home/home-link.svg @@ -1,6 +1,6 @@ - + diff --git a/public/svgs/home-start.svg b/src/assets/svgs/home/home-start.svg similarity index 96% rename from public/svgs/home-start.svg rename to src/assets/svgs/home/home-start.svg index ef7bbeaee..f99f76403 100644 --- a/public/svgs/home-start.svg +++ b/src/assets/svgs/home/home-start.svg @@ -1,3 +1,3 @@ - + diff --git a/public/svgs/home-technology.svg b/src/assets/svgs/home/home-technology.svg similarity index 98% rename from public/svgs/home-technology.svg rename to src/assets/svgs/home/home-technology.svg index fff50c2de..9187e8e33 100644 --- a/public/svgs/home-technology.svg +++ b/src/assets/svgs/home/home-technology.svg @@ -1,3 +1,3 @@ - + diff --git a/src/assets/svgs/main/next.svg b/src/assets/svgs/main/next.svg new file mode 100644 index 000000000..7e53e0d72 --- /dev/null +++ b/src/assets/svgs/main/next.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/Alert/Assets/alert-icon.svg b/src/components/Alert/Assets/alert-icon.svg index 26f7b823a..40d67e11b 100644 --- a/src/components/Alert/Assets/alert-icon.svg +++ b/src/components/Alert/Assets/alert-icon.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/src/components/Alert/Assets/danger-icon.svg b/src/components/Alert/Assets/danger-icon.svg index 48e13858c..4e1a19d7a 100644 --- a/src/components/Alert/Assets/danger-icon.svg +++ b/src/components/Alert/Assets/danger-icon.svg @@ -1,5 +1,5 @@ - - - + + + \ No newline at end of file diff --git a/src/components/Alert/Assets/info-icon.svg b/src/components/Alert/Assets/info-icon.svg index 4dd820de3..fb34149d5 100644 --- a/src/components/Alert/Assets/info-icon.svg +++ b/src/components/Alert/Assets/info-icon.svg @@ -1,5 +1,5 @@ - - - + + + \ No newline at end of file diff --git a/src/components/Alert/Assets/tip-icon.svg b/src/components/Alert/Assets/tip-icon.svg index eb2e4c147..b6ddd4c17 100644 --- a/src/components/Alert/Assets/tip-icon.svg +++ b/src/components/Alert/Assets/tip-icon.svg @@ -1,6 +1,6 @@ - - - - + + + + \ No newline at end of file diff --git a/src/components/Aside.astro b/src/components/Aside.astro index 9a385a2d7..17c1f765f 100644 --- a/src/components/Aside.astro +++ b/src/components/Aside.astro @@ -1,8 +1,8 @@ --- -import alertIcon from "./Alert/Assets/alert-icon.svg" -import infoIcon from "./Alert/Assets/info-icon.svg" -import dangerIcon from "./Alert/Assets/danger-icon.svg" -import tipIcon from "./Alert/Assets/tip-icon.svg" +import alertIcon from "./Alert/Assets/alert-icon.svg?raw" +import infoIcon from "./Alert/Assets/info-icon.svg?raw" +import dangerIcon from "./Alert/Assets/danger-icon.svg?raw" +import tipIcon from "./Alert/Assets/tip-icon.svg?raw" export type Props = { type?: "note" | "tip" | "caution" | "danger" title?: string @@ -21,7 +21,9 @@ const icons = {
- {type} + + +
- -
Thank you for subscribing!
+
Thank you for subscribing!
) diff --git a/src/components/Footer/Subscribe/Subscribe.tsx b/src/components/Footer/Subscribe/Subscribe.tsx index 3ec79e912..6ab9d9824 100644 --- a/src/components/Footer/Subscribe/Subscribe.tsx +++ b/src/components/Footer/Subscribe/Subscribe.tsx @@ -1,5 +1,8 @@ +// import React from "react" import { useState, useEffect } from "preact/hooks" import MailchimpSubscribe from "react-mailchimp-subscribe" +import SubscribeSvg from "~/assets/svgs/footer/subscribe.svg?react" +import { clsx } from "~/lib" import EmailInput from "./EmailInput.tsx" import styles from "./Subscribe.module.css" @@ -7,7 +10,7 @@ import styles from "./Subscribe.module.css" const url = "https://gmail.us14.list-manage.com/subscribe/post?u=3b1d822eb27b2fa64d82d430b&id=0b4603244e" const isValidEmail = (email: string): boolean => { - const emailRegex: RegExp = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/ + const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/ return emailRegex.test(email) } @@ -37,12 +40,17 @@ export default function Subscribe() { } return ( -
+
- + + + +
Stay up-to-date on the latest Scroll Developer news
-
Roadmap updates, virtual and live events, ecosystem opportunities and more
+
+ Roadmap updates, virtual and live events, ecosystem opportunities and more +
+
+ diff --git a/src/components/RightSidebar/RightSidebar.astro b/src/components/RightSidebar/RightSidebar.astro index d26ad856c..c3f018818 100644 --- a/src/components/RightSidebar/RightSidebar.astro +++ b/src/components/RightSidebar/RightSidebar.astro @@ -16,7 +16,7 @@ const { content, githubEditUrl, headings, clientSideToc } = Astro.props
- +

{t("rightSidebar.feedback")}

@@ -37,7 +37,7 @@ const { content, githubEditUrl, headings, clientSideToc } = Astro.props @apply !mb-6; } .sidebar-nav-inner { - padding: 16px 20px 70px 4px; + padding: 24px 20px 24px 4px; overflow: auto; background: #fff8f3; border-radius: 1em; @@ -45,16 +45,12 @@ const { content, githubEditUrl, headings, clientSideToc } = Astro.props width: 280px; /* width: 250px; */ max-height: 100%; - /* @apply pt-doc; */ + @apply bg-white dark:bg-dark-normal; } .sidebar-nav-inner > * { - margin-top: 1rem; + margin-top: 32px; } .sidebar-nav-inner > *:first-child { margin-top: 0; } - - .sidebar-nav-inner h2 { - @apply m-0 mt-4; - } diff --git a/src/components/ToggleElement.astro b/src/components/ToggleElement.astro index 4e6c61234..e2a53d2b5 100644 --- a/src/components/ToggleElement.astro +++ b/src/components/ToggleElement.astro @@ -7,7 +7,9 @@ const anchorHash = anchor.replace(/\s+/g, "-") ---
- +
@@ -46,9 +48,9 @@ const anchorHash = anchor.replace(/\s+/g, "-") border-radius: 27px; border: 1px solid #dadada; overflow: hidden; - color: var(--color-text-primary); font-weight: 600; padding-left: 0.3rem; + @apply text-black dark:text-white border-primary dark:border-dark-primary; } details:hover { @@ -89,7 +91,6 @@ const anchorHash = anchor.replace(/\s+/g, "-") } summary::before { - content: ""; display: inline-block; font-size: 0.75em; transform: rotate(-90deg); @@ -97,8 +98,9 @@ const anchorHash = anchor.replace(/\s+/g, "-") margin-right: 1rem; height: 10px; width: 10px; - background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iNiIgdmlld0JveD0iMCAwIDEwIDYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGlkPSJWZWN0b3IiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNC45OTk3NiA2QzQuNzY4MSA2IDQuNTUwMjkgNS45MDc3NCA0LjM4NjQ0IDUuNzQwMTlMMC4yNTM0NTEgMS41MTM4N0MtMC4wODQ0ODM2IDEuMTY4MDIgLTAuMDg0NDgzNiAwLjYwNTY2IDAuMjUzNDUxIDAuMjU5ODExQzAuNDE3Mjk4IDAuMDkyMjY0MiAwLjYzNTExNSAwIDAuODY2NzcgMEMxLjA5ODQzIDAgMS4zMTYyNCAwLjA5MjI2NDIgMS40ODAwOSAwLjI1OTgxMUw1LjAwMDAzIDMuODU5MjVMOC41MTk3IDAuMjU5ODExQzguNjgzNTUgMC4wOTIyNjQyIDguOTAxMzcgMCA5LjEzMzAyIDBDOS4zNjQ2OCAwIDkuNTgyNDkgMC4wOTIyNjQyIDkuNzQ2MzQgMC4yNTk4MTFDMTAuMDg0NiAwLjYwNTY2IDEwLjA4NDYgMS4xNjgzIDkuNzQ2MzQgMS41MTM4N0w1LjYxMzM1IDUuNzQwMTlDNS40NDk1MSA1LjkwNzc0IDUuMjMxNjkgNiA1LjAwMDAzIDZINC45OTk3NloiIGZpbGw9ImJsYWNrIi8+Cjwvc3ZnPgo=) - center / contain no-repeat; + background-position: center; + background-size: contain; + background-repeat: no-repeat; } details[open] summary::before { transform: rotate(0deg); diff --git a/src/content/docs/en/developers/ethereum-and-scroll-differences.mdx b/src/content/docs/en/developers/ethereum-and-scroll-differences.mdx index 4328eb611..5d73ae02b 100644 --- a/src/content/docs/en/developers/ethereum-and-scroll-differences.mdx +++ b/src/content/docs/en/developers/ethereum-and-scroll-differences.mdx @@ -63,7 +63,7 @@ type StateAccount struct { Related to this, we maintain two types of codehash for each contract bytecode: Keccak hash and Poseidon hash. -`KeccakCodeHash` is kept to maintain compatibility for `EXTCODEHASH`. `PoseidonCodeHash` is used for verifying correctness of bytecodes loaded in the zkEVM, where Poseidon hashing is far more efficient. +`KeccakCodeHash` is kept to maintain compatibility for `EXTCODEHASH`. `PoseidonCodeHash` is used for verifying the correctness of bytecodes loaded in the zkEVM, where Poseidon hashing is far more efficient. ### CodeSize @@ -82,12 +82,6 @@ This was chosen for two reasons: We keep a close eye on all emerging EIPs adopted by Ethereum and adopt them when suitable. If you’re interested in more specifics, reach out in [our community forum](https://community.scroll.io) or on the [Scroll Discord](https://discord.gg/scroll). -## EVM Target version - -To ensure no unexpected behavior happens in your contracts, we recommend using `london` as the target version when compiling your smart contracts. - -You can read in more detail on Shanghai hard fork differences from London on the [Ethereum Execution spec](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md) and how the new `PUSH0` instruction [impacts the Solidity compiler](https://blog.soliditylang.org/2023/05/10/solidity-0.8.20-release-announcement/). - ## Transaction Fees The fee charged to Scroll transactions contains two parts: diff --git a/src/content/docs/en/developers/guides/estimating-gas-and-tx-fees.mdx b/src/content/docs/en/developers/guides/estimating-gas-and-tx-fees.mdx index 68629e130..339c10bde 100644 --- a/src/content/docs/en/developers/guides/estimating-gas-and-tx-fees.mdx +++ b/src/content/docs/en/developers/guides/estimating-gas-and-tx-fees.mdx @@ -53,7 +53,7 @@ But it also exposes the `getL1Fee(bytes memory data)` function, which abstracts First of all, let’s quickly go over the key folders inside our project structure. -It’s a standard Hardhat project, but most of our work is inside the c*ontracts* and _scripts_ folders. +It’s a standard Hardhat project, but most of our work is inside the *contracts* and _scripts_ folders. diff --git a/src/content/docs/en/developers/guides/scroll-messenger-cross-chain-interaction.mdx b/src/content/docs/en/developers/guides/scroll-messenger-cross-chain-interaction.mdx index 498899b8d..8ba6476b8 100644 --- a/src/content/docs/en/developers/guides/scroll-messenger-cross-chain-interaction.mdx +++ b/src/content/docs/en/developers/guides/scroll-messenger-cross-chain-interaction.mdx @@ -79,12 +79,12 @@ contract GreeterOperator { We pass the message by executing `executeFunctionCrosschain` and passing the following parameters: - `scrollMessengerAddress`: This will depend on where you deployed the `GreeterOperator` contract. - - If you deployed it on Sepolia use `0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A`. If you deployed on Scroll use `0xBa50f5340FB9F3Bd074bD638c9BE13eCB36E603d`. + - If you deployed it on Sepolia use `0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A`. If you deployed on Scroll Sepolia use `0xBa50f5340FB9F3Bd074bD638c9BE13eCB36E603d`. - `targetAddress`: The address of the `Greeter` contract on the opposite chain. - `value`: In this case, it is `0` because the `setGreeting`is not payable. -- `greeting`: This is the parameter that will be sent through the message. Try passing `“This message was crosschain!”` +- `greeting`: This is the parameter that will be sent through the message. Try passing `“This message was cross-chain!”` - `gasLimit`: - - If you are sending the message from L1 to L2, around `5000` gas limit should be more than enough. That said, if you set this too high, and `msg.value` doesn't cover `gasLimit` * `baseFee`, the transaction will revert. If `msg.value` is greater than the gas fee, the unused portion will be refunded. + - If you are sending the message from L1 to L2, around `1000000` gas limit should be more than enough. That said, if you set this too high, and `msg.value` doesn't cover `gasLimit` * `baseFee`, the transaction will revert. If `msg.value` is greater than the gas fee, the unused portion will be refunded. - If you are sending the message from L2 to L1, pass `0`, as the transaction will be completed by executing an additional transaction on L1. ### Relay the Message when sending from L2 to L1 @@ -117,6 +117,6 @@ in the [Scroll Messenger](/developers/l1-and-l2-bridging/the-scroll-messenger) a applications and users. -After executing and confirming the transaction on both L1 and L2, the new state of `greeting` on the `Greeter` contract should be `“This message was crosschain!”`. Sending a message from one chain to the other should take around 20 minutes after the transactions are confirmed on the origin chain. +After executing and confirming the transaction on both L1 and L2, the new state of `greeting` on the `Greeter` contract should be `“This message was cross-chain!”`. Sending a message from one chain to the other should take around 20 minutes after the transactions are confirmed on the origin chain. Congratulations, you now executed a transaction from one chain to the other using our native bridge! diff --git a/src/content/docs/en/developers/l1-and-l2-bridging/enforced-transactions.mdx b/src/content/docs/en/developers/l1-and-l2-bridging/enforced-transactions.mdx index 328478ed9..80ca6f427 100644 --- a/src/content/docs/en/developers/l1-and-l2-bridging/enforced-transactions.mdx +++ b/src/content/docs/en/developers/l1-and-l2-bridging/enforced-transactions.mdx @@ -25,10 +25,10 @@ Add an enforced transaction to L2 from an EOA account sender. | Parameter | Description | | ---------- | ---------------------------------------------------------- | -| \_target | The address of target contract to call in L2. | +| \_target | The address of the target contract to call in L2. | | \_value | The value passed. | | \_gasLimit | The maximum gas should be used for this transaction in L2. | -| \_data | The calldata passed to target contract. | +| \_data | The calldata passed to the target contract. | ### sendTransaction diff --git a/src/content/docs/en/developers/l1-and-l2-bridging/erc1155-token-bridge.mdx b/src/content/docs/en/developers/l1-and-l2-bridging/erc1155-token-bridge.mdx index d02879230..082ab18fd 100644 --- a/src/content/docs/en/developers/l1-and-l2-bridging/erc1155-token-bridge.mdx +++ b/src/content/docs/en/developers/l1-and-l2-bridging/erc1155-token-bridge.mdx @@ -16,7 +16,7 @@ ERC1155 bridging from L1 to L2 is done via the L1ERC1155Gateway. Similarly to ER diff --git a/src/content/docs/en/developers/l1-and-l2-bridging/erc721-nft-bridge.mdx b/src/content/docs/en/developers/l1-and-l2-bridging/erc721-nft-bridge.mdx index c7c044668..c14966466 100644 --- a/src/content/docs/en/developers/l1-and-l2-bridging/erc721-nft-bridge.mdx +++ b/src/content/docs/en/developers/l1-and-l2-bridging/erc721-nft-bridge.mdx @@ -106,7 +106,7 @@ Update the mapping that connects an NFT contract from L1 to L2. ### withdrawERC721 ```solidity -function depositERC721(address _token, address _to, uint256 _tokenId, uint256 _gasLimit) external payable; +function withdrawERC721(address _token, address _to, uint256 _tokenId, uint256 _gasLimit) external payable; ``` Send an ERC721 NFT from L2 to a recipient's account on L1. diff --git a/src/content/docs/en/developers/scroll-contracts.mdx b/src/content/docs/en/developers/scroll-contracts.mdx index 0bdd69f60..332f379d7 100644 --- a/src/content/docs/en/developers/scroll-contracts.mdx +++ b/src/content/docs/en/developers/scroll-contracts.mdx @@ -98,6 +98,13 @@ Use the table below to configure your Ethereum tools to the Scroll mainnet. - v3StakerAddress: [`0xFdFbE973c9ecB036Ecfb7af697FcACe789D3f928`](https://scrollscan.com/address/0xFdFbE973c9ecB036Ecfb7af697FcACe789D3f928) - quoterV2Address: [`0x2566e082Cb1656d22BCbe5644F5b997D194b5299`](https://scrollscan.com/address/0x2566e082Cb1656d22BCbe5644F5b997D194b5299) +#### Ethereum Attestation Service (EAS) + +- EAS: [`0xC47300428b6AD2c7D03BB76D05A176058b47E6B0`](https://scrollscan.com/address/0xC47300428b6AD2c7D03BB76D05A176058b47E6B0) +- SchemaRegistry: [`0xD2CDF46556543316e7D34e8eDc4624e2bB95e3B6`](https://scrollscan.com/address/0xD2CDF46556543316e7D34e8eDc4624e2bB95e3B6) +- EIP712Proxy: [`0x77b7DA1c40762Cd8AFfE2069b575328EfD4D9801`](https://scrollscan.com/address/0x77b7DA1c40762Cd8AFfE2069b575328EfD4D9801) +- Indexer: `Not deployed yet` + ## Additional Useful Contracts - Multicall3: [`0xcA11bde05977b3631167028862bE2a173976CA11`](https://scrollscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11) @@ -207,6 +214,13 @@ Use the table below to configure your Ethereum tools to the Scroll Sepolia Testn See this [Github gist](https://gist.github.com/dghelm/7fe68f0a524f30846e1142721c081d84). +#### Ethereum Attestation Service (EAS) + +- EAS: [`0xaEF4103A04090071165F78D45D83A0C0782c2B2a`](https://sepolia.scrollscan.com/address/0xaEF4103A04090071165F78D45D83A0C0782c2B2a) +- SchemaRegistry: [`0x55D26f9ae0203EF95494AE4C170eD35f4Cf77797`](https://sepolia.scrollscan.com/address/0x55D26f9ae0203EF95494AE4C170eD35f4Cf77797) +- EIP712Proxy: [`0xB3574f76b1720E61FdA98702c7016674CD6Eaa7b`](https://sepolia.scrollscan.com/address/0xB3574f76b1720E61FdA98702c7016674CD6Eaa7b) +- Indexer: [`0x7C2cb1eDC328491da52de2a0afc44D3B0Ae7ee17`](https://sepolia.scrollscan.com/address/0x7C2cb1eDC328491da52de2a0afc44D3B0Ae7ee17) + ### Additional Useful Contracts - Multicall3: [`0xcA11bde05977b3631167028862bE2a173976CA11`](https://sepolia.scrollscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11) diff --git a/src/content/docs/en/developers/verifying-smart-contracts.mdx b/src/content/docs/en/developers/verifying-smart-contracts.mdx index 400d78f22..be119ed8c 100644 --- a/src/content/docs/en/developers/verifying-smart-contracts.mdx +++ b/src/content/docs/en/developers/verifying-smart-contracts.mdx @@ -5,7 +5,7 @@ title: "Verifying Smart Contracts" lang: "en" permalink: "developers/verifying-smart-contracts" whatsnext: { "Scroll Contracts": "/developers/scroll-contracts" } -excerpt: "Easily verify your smart contracts with Scroll-supported developer tooling or the Blockscout Web API" +excerpt: "Easily verify your smart contracts with Scroll-supported developer tooling" --- import Aside from "../../../../components/Aside.astro" @@ -13,23 +13,26 @@ import ClickToZoom from "../../../../components/ClickToZoom.astro" import verify1 from "./_images/verify1.png" import CodeSample from "../../../../components/CodeSample/CodeSample.astro" -After deploying your smart contracts, it's important to verify your code on [our block explorer](https://scrollscan.com/) or the [Sepolia block explorer](https://sepolia-blockscout.scroll.io). +After deploying your smart contracts, it's important to verify your code on a block explorer. This can be done in an automated way using your developer tooling or the Web UI. -This can be done in an automated way using your developer tooling or using Blockscout's Web UI. +## Using Developer Tools - +Most smart contract tooling has plugins for verifying your contracts easily on Etherscan. Blockscout supports Etherscan's contract verification APIs, so it's straightforward to use these tools using the APIs of either of these block explorers. -## Using Developer Tools +| Network | Scroll | Scroll Sepolia | +| ---------- | -------------------------------- | ---------------------------------------- | +| Scrollscan | https://api.scrollscan.com/api | https://api-sepolia.scrollscan.com/api | +| Blockscout | https://blockscout.scroll.io/api | https://sepolia-blockscout.scroll.io/api | -Most smart contract tooling has plugins for verifying your contracts easily on Etherscan. Blockscout supports Etherscan's contract verification APIs, and it's straightforward to use these tools with the Scroll Sepolia Testnet. + ### Hardhat -First, modify `hardhat.config.ts` to point to Scroll's RPC and `sepolia-blockscout.scroll.io/api`. A dummy `apiKey` value is required, but anything works for its value. +Modify `hardhat.config.ts` to point to Scroll's RPC and block explorer API. For Blockscout, a dummy `apiKey` value is required, but anything works for its value. For Scrollscan, use your own API key. +For example, if you are using Scroll Sepolia on Blockscout, your config will look like this: ```javascript ... @@ -82,18 +85,46 @@ npx hardhat verify --network scrollSepolia 0xD9880690bd717189cC3Fbe7B9020F27fae7 ### Foundry - \ No newline at end of file diff --git a/src/content/docs/en/getting-started/overview.md b/src/content/docs/en/getting-started/overview.md index 9a854f2e8..acddb22f3 100644 --- a/src/content/docs/en/getting-started/overview.md +++ b/src/content/docs/en/getting-started/overview.md @@ -10,7 +10,7 @@ whatsnext: { "User Guide": "/user-guide/", "Building on Scroll": "/developers/" #### Welcome to the Scroll docs! -Scroll is a security-focused scaling solution for Ethereum, using innovations in scaling design and zero knowledge proofs to build a new layer on Ethereum. The Scroll network is more accessible, more responsive, and can support more users at once than Ethereum alone, and if you've ever used or developed an application on Ethereum, you'll be right home on Scroll. +Scroll is a security-focused scaling solution for Ethereum, using innovations in scaling design and zero knowledge proofs to build a new layer on Ethereum. The Scroll network is more accessible, more responsive, and can support more users at once than Ethereum alone, and if you've ever used or developed an application on Ethereum, you'll be right at home on Scroll. Want to try out the Scroll Sepolia testnet with free assets before using Scroll? Check out our [User Guide](/user-guide/). diff --git a/src/content/docs/en/learn/index.mdx b/src/content/docs/en/learn/index.mdx index 55b8184ed..ade566b4d 100644 --- a/src/content/docs/en/learn/index.mdx +++ b/src/content/docs/en/learn/index.mdx @@ -7,6 +7,8 @@ excerpt: "Learn more about Ethereum scalability and zero knowledge cryptography. --- import NavCard from "../../../../components/NavCard.astro" +import TechnologySvg from "../../../../assets/svgs/home/home-technology.svg?raw" +import LearnSvg from "../../../../assets/svgs/home/home-learn.svg?raw" Scroll pulls together research and engineering from Blockchain Protocols and Zero Knowledge Cryptography. If you want to dive deeper, keep reading and check out the additional resources. @@ -14,13 +16,13 @@ Want to see a specific topic covered? Create [an issue](https://github.com/scrol