From 6ddd7678ffb6598ae6e263706813cb5e94535f02 Mon Sep 17 00:00:00 2001 From: Jonathan Neal Date: Wed, 22 Dec 2021 16:11:05 -0500 Subject: [PATCH] Use accessible indentation (#2253) --- .editorconfig | 11 +- .prettierrc.json | 11 +- docs/astro.config.mjs | 18 +- docs/public/code.css | 34 +- docs/public/index.css | 366 +- docs/public/make-scrollable-code-focusable.js | 2 +- docs/public/theme.css | 182 +- docs/src/components/Card.astro | 104 +- docs/src/components/Footer/AvatarList.astro | 229 +- docs/src/components/Footer/Footer.astro | 12 +- docs/src/components/HeadCommon.astro | 49 +- docs/src/components/HeadSEO.astro | 53 +- docs/src/components/Header/AstroLogo.astro | 52 +- docs/src/components/Header/Header.astro | 323 +- docs/src/components/Header/LanguageSelect.css | 76 +- docs/src/components/Header/LanguageSelect.tsx | 196 +- docs/src/components/Header/Search.css | 100 +- docs/src/components/Header/Search.tsx | 154 +- docs/src/components/Header/SidebarToggle.tsx | 68 +- .../src/components/Header/SkipToContent.astro | 41 +- .../components/LeftSidebar/LeftSidebar.astro | 275 +- .../components/PageContent/PageContent.astro | 115 +- .../components/RightSidebar/MoreMenu.astro | 143 +- .../RightSidebar/RightSidebar.astro | 42 +- .../RightSidebar/TableOfContents.tsx | 84 +- .../RightSidebar/ThemeToggleButton.css | 48 +- .../RightSidebar/ThemeToggleButton.tsx | 134 +- docs/src/config.ts | 374 +- docs/src/layouts/MainLayout.astro | 220 +- docs/src/layouts/SplashLayout.astro | 78 +- docs/src/pages/404.astro | 6 +- docs/src/pages/de/404.astro | 6 +- docs/src/pages/de/themes.astro | 83 +- .../pages/es/guides/markdown-content.astro | 11 +- docs/src/pages/es/guides/pagination.astro | 11 +- docs/src/pages/es/guides/publish-to-npm.astro | 11 +- docs/src/pages/es/guides/styling.astro | 11 +- .../es/reference/renderer-reference.astro | 15 +- docs/src/pages/index.astro | 48 +- docs/src/pages/ja/themes.astro | 85 +- docs/src/pages/themes.astro | 83 +- docs/src/pages/zh-TW/themes.astro | 83 +- docs/src/util.ts | 8 +- .../blog-multiple-authors/astro.config.mjs | 4 +- .../src/components/MainHead.astro | 40 +- .../src/components/Nav.astro | 110 +- .../src/components/Pagination.astro | 70 +- .../src/components/PostPreview.astro | 109 +- .../src/layouts/post.astro | 119 +- .../src/pages/about.astro | 110 +- .../src/pages/authors/[author].astro | 110 +- .../src/pages/index.astro | 38 +- .../src/pages/posts/[...page].astro | 108 +- .../src/styles/global.css | 22 +- examples/blog/astro.config.mjs | 4 +- examples/blog/src/components/Author.astro | 18 +- examples/blog/src/components/BaseHead.astro | 9 +- examples/blog/src/components/BlogHeader.astro | 176 +- examples/blog/src/components/BlogPost.astro | 130 +- .../blog/src/components/BlogPostPreview.astro | 77 +- examples/blog/src/components/Heading.astro | 8 +- examples/blog/src/components/Logo.astro | 128 +- examples/blog/src/layouts/BlogPost.astro | 31 +- examples/blog/src/pages/index.astro | 97 +- examples/blog/src/styles/blog.css | 334 +- examples/component/astro.config.mjs | 4 +- examples/component/demo/src/pages/index.astro | 45 +- .../packages/my-component/Button.astro | 16 +- .../packages/my-component/Heading.astro | 21 +- examples/docs/astro.config.mjs | 12 +- .../public/make-scrollable-code-focusable.js | 2 +- .../src/components/Footer/AvatarList.astro | 208 +- .../docs/src/components/Footer/Footer.astro | 12 +- examples/docs/src/components/HeadCommon.astro | 30 +- examples/docs/src/components/HeadSEO.astro | 41 +- .../src/components/Header/AstroLogo.astro | 39 +- .../docs/src/components/Header/Header.astro | 245 +- .../src/components/Header/LanguageSelect.css | 70 +- .../src/components/Header/LanguageSelect.tsx | 58 +- .../docs/src/components/Header/Search.css | 102 +- .../docs/src/components/Header/Search.tsx | 124 +- .../src/components/Header/SidebarToggle.tsx | 34 +- .../src/components/Header/SkipToContent.astro | 41 +- .../components/LeftSidebar/LeftSidebar.astro | 170 +- .../components/PageContent/PageContent.astro | 68 +- .../components/RightSidebar/MoreMenu.astro | 120 +- .../RightSidebar/RightSidebar.astro | 40 +- .../RightSidebar/TableOfContents.tsx | 66 +- .../RightSidebar/ThemeToggleButton.css | 46 +- .../RightSidebar/ThemeToggleButton.tsx | 110 +- examples/docs/src/config.ts | 36 +- examples/docs/src/languages.ts | 4 +- examples/docs/src/layouts/MainLayout.astro | 214 +- examples/docs/src/pages/index.astro | 6 +- examples/docs/src/styles/code.css | 32 +- examples/docs/src/styles/index.css | 370 +- examples/docs/src/styles/theme.css | 176 +- examples/fast-build/astro.config.mjs | 8 +- .../fast-build/src/components/Greeting.vue | 16 +- examples/fast-build/src/pages/index.astro | 46 +- examples/fast-build/src/styles/global.css | 2 +- examples/framework-alpine/astro.config.mjs | 4 +- .../src/components/Counter.astro | 28 +- .../framework-alpine/src/pages/index.astro | 61 +- examples/framework-lit/astro.config.mjs | 4 +- .../framework-lit/src/components/Counter.js | 44 +- .../framework-lit/src/components/Lorem.astro | 89 +- examples/framework-lit/src/components/Test.js | 20 +- examples/framework-lit/src/pages/index.astro | 22 +- examples/framework-multiple/astro.config.mjs | 4 +- .../framework-multiple/src/components/A.astro | 2 +- .../framework-multiple/src/components/B.astro | 2 +- .../src/components/PreactCounter.tsx | 26 +- .../src/components/PreactSFC.tsx | 10 +- .../src/components/ReactCounter.jsx | 26 +- .../src/components/SolidCounter.tsx | 26 +- .../src/components/VueCounter.vue | 36 +- .../framework-multiple/src/pages/index.astro | 59 +- .../framework-multiple/src/styles/global.css | 18 +- examples/framework-preact/astro.config.mjs | 4 +- .../src/components/Counter.css | 12 +- .../src/components/Counter.tsx | 26 +- .../framework-preact/src/pages/index.astro | 47 +- examples/framework-react/astro.config.mjs | 4 +- .../src/components/Counter.css | 12 +- .../src/components/Counter.jsx | 26 +- .../framework-react/src/pages/index.astro | 51 +- examples/framework-solid/astro.config.mjs | 4 +- .../src/components/Counter.css | 12 +- .../src/components/Counter.jsx | 26 +- .../framework-solid/src/pages/index.astro | 45 +- examples/framework-svelte/astro.config.mjs | 4 +- .../framework-svelte/src/pages/index.astro | 48 +- examples/framework-vue/astro.config.mjs | 4 +- .../framework-vue/src/components/Counter.vue | 48 +- examples/framework-vue/src/pages/index.astro | 48 +- examples/minimal/astro.config.mjs | 4 +- examples/minimal/src/pages/index.astro | 28 +- examples/portfolio-svelte/astro.config.mjs | 4 +- .../src/components/MainHead.astro | 12 +- .../src/layouts/project.astro | 153 +- examples/portfolio-svelte/src/pages/404.astro | 23 +- .../portfolio-svelte/src/pages/about.astro | 99 +- .../portfolio-svelte/src/pages/index.astro | 405 +- .../portfolio-svelte/src/pages/projects.astro | 46 +- .../portfolio-svelte/src/styles/global.scss | 224 +- examples/portfolio/astro.config.mjs | 4 +- .../portfolio/src/components/Button/index.jsx | 2 +- .../src/components/Button/styles.module.scss | 10 +- .../portfolio/src/components/Footer/index.jsx | 12 +- .../src/components/Footer/styles.module.scss | 20 +- .../portfolio/src/components/MainHead.astro | 12 +- .../portfolio/src/components/Nav/index.jsx | 58 +- .../src/components/Nav/styles.module.scss | 90 +- .../src/components/PortfolioPreview/index.jsx | 42 +- .../PortfolioPreview/styles.module.scss | 146 +- examples/portfolio/src/layouts/project.astro | 153 +- examples/portfolio/src/pages/404.astro | 23 +- examples/portfolio/src/pages/about.astro | 101 +- examples/portfolio/src/pages/index.astro | 394 +- examples/portfolio/src/pages/projects.astro | 46 +- examples/portfolio/src/styles/global.scss | 224 +- examples/starter/astro.config.mjs | 8 +- examples/starter/src/components/Tour.astro | 130 +- examples/starter/src/pages/index.astro | 68 +- examples/starter/src/styles/global.css | 34 +- examples/starter/src/styles/home.css | 50 +- examples/subpath/astro.config.mjs | 10 +- examples/subpath/src/components/Time.jsx | 6 +- examples/subpath/src/pages/index.astro | 44 +- examples/subpath/src/styles/main.scss | 6 +- .../with-markdown-plugins/astro.config.mjs | 30 +- .../src/layouts/main.astro | 56 +- .../src/pages/about.astro | 22 +- .../src/styles/global.css | 54 +- examples/with-markdown/astro.config.mjs | 8 +- .../src/components/PreactCounter.tsx | 26 +- .../src/components/ReactCounter.jsx | 26 +- .../src/components/VueCounter.vue | 36 +- examples/with-markdown/src/layouts/main.astro | 20 +- .../with-markdown/src/pages/external.astro | 16 +- examples/with-markdown/src/pages/index.astro | 52 +- examples/with-markdown/src/styles/global.css | 162 +- examples/with-nanostores/astro.config.mjs | 4 +- .../src/components/AdminsPreact.jsx | 38 +- .../src/components/AdminsReact.jsx | 38 +- .../src/components/AdminsSolid.jsx | 38 +- .../src/components/AdminsVue.vue | 40 +- .../with-nanostores/src/pages/index.astro | 67 +- examples/with-nanostores/src/store/counter.js | 4 +- examples/with-nanostores/src/store/users.js | 38 +- .../with-nanostores/src/styles/global.css | 34 +- examples/with-nanostores/src/styles/home.css | 34 +- examples/with-tailwindcss/astro.config.mjs | 4 +- examples/with-tailwindcss/postcss.config.js | 12 +- .../src/components/Button.astro | 8 +- .../with-tailwindcss/src/pages/index.astro | 21 +- examples/with-tailwindcss/tailwind.config.js | 2 +- .../with-vite-plugin-pwa/astro.config.mjs | 6 +- examples/with-vite-plugin-pwa/src/index.ts | 8 +- .../src/pages/index.astro | 22 +- .../with-vite-plugin-pwa/src/vite-env.d.ts | 16 +- package.json | 1 - packages/astro-parser/src/Stats.ts | 124 +- packages/astro-parser/src/interfaces.ts | 182 +- packages/astro-parser/src/parse/index.ts | 384 +- .../astro-parser/src/parse/read/context.ts | 108 +- .../astro-parser/src/parse/read/expression.ts | 382 +- .../astro-parser/src/parse/read/script.ts | 80 +- packages/astro-parser/src/parse/read/style.ts | 54 +- .../astro-parser/src/parse/state/codefence.ts | 48 +- .../astro-parser/src/parse/state/codespan.ts | 40 +- .../astro-parser/src/parse/state/fragment.ts | 36 +- .../astro-parser/src/parse/state/mustache.ts | 674 +-- .../astro-parser/src/parse/state/setup.ts | 56 +- packages/astro-parser/src/parse/state/tag.ts | 768 ++-- packages/astro-parser/src/parse/state/text.ts | 40 +- .../astro-parser/src/parse/utils/bracket.ts | 18 +- .../astro-parser/src/parse/utils/entities.ts | 4062 ++++++++--------- packages/astro-parser/src/parse/utils/html.ts | 140 +- packages/astro-parser/src/parse/utils/node.ts | 52 +- packages/astro-parser/src/utils/error.ts | 56 +- .../src/utils/full_char_code_at.ts | 8 +- packages/astro-parser/src/utils/fuzzymatch.ts | 344 +- .../astro-parser/src/utils/get_code_frame.ts | 34 +- packages/astro-parser/src/utils/link.ts | 4 +- packages/astro-parser/src/utils/list.ts | 4 +- packages/astro-parser/src/utils/names.ts | 234 +- .../astro-parser/src/utils/nodes_match.ts | 44 +- packages/astro-prism/index.mjs | 298 +- packages/astro/astro.js | 126 +- packages/astro/components/Code.astro | 68 +- packages/astro/components/Debug.astro | 77 +- packages/astro/components/Markdown.astro | 35 +- packages/astro/components/Prism.astro | 43 +- packages/astro/src/@types/astro.ts | 464 +- packages/astro/src/@types/shorthash.d.ts | 4 +- packages/astro/src/cli/check.ts | 148 +- packages/astro/src/cli/index.ts | 230 +- packages/astro/src/core/build/index.ts | 244 +- packages/astro/src/core/build/internal.ts | 58 +- packages/astro/src/core/build/page-data.ts | 188 +- .../astro/src/core/build/scan-based-build.ts | 98 +- packages/astro/src/core/build/static-build.ts | 268 +- packages/astro/src/core/build/types.d.ts | 6 +- packages/astro/src/core/config.ts | 228 +- packages/astro/src/core/create-vite.ts | 134 +- packages/astro/src/core/dev/index.ts | 662 +-- packages/astro/src/core/dev/messages.ts | 22 +- packages/astro/src/core/dev/template/4xx.ts | 42 +- packages/astro/src/core/dev/template/5xx.ts | 28 +- packages/astro/src/core/dev/util.ts | 10 +- packages/astro/src/core/logger.ts | 198 +- packages/astro/src/core/preview/index.ts | 126 +- packages/astro/src/core/ssr/css.ts | 40 +- packages/astro/src/core/ssr/html.ts | 132 +- packages/astro/src/core/ssr/index.ts | 672 +-- packages/astro/src/core/ssr/paginate.ts | 96 +- packages/astro/src/core/ssr/routing.ts | 516 +-- packages/astro/src/core/ssr/rss.ts | 130 +- packages/astro/src/core/ssr/sitemap.ts | 24 +- packages/astro/src/core/util.ts | 98 +- packages/astro/src/runtime/client/hmr.ts | 60 +- packages/astro/src/runtime/client/idle.ts | 26 +- packages/astro/src/runtime/client/load.ts | 12 +- packages/astro/src/runtime/client/media.ts | 32 +- packages/astro/src/runtime/client/only.ts | 12 +- packages/astro/src/runtime/client/visible.ts | 46 +- .../astro/src/runtime/server/hydration.ts | 170 +- packages/astro/src/runtime/server/index.ts | 598 +-- packages/astro/src/runtime/server/metadata.ts | 146 +- packages/astro/src/runtime/server/util.ts | 46 +- .../vite-plugin-astro-postprocess/index.ts | 116 +- .../astro/src/vite-plugin-astro/compile.ts | 156 +- packages/astro/src/vite-plugin-astro/index.ts | 190 +- packages/astro/src/vite-plugin-astro/query.ts | 52 +- .../astro/src/vite-plugin-astro/styles.ts | 26 +- .../astro/src/vite-plugin-build-css/index.ts | 262 +- .../src/vite-plugin-build-css/resolve.ts | 22 +- .../add-rollup-input.ts | 64 +- .../vite-plugin-build-html/extract-assets.ts | 296 +- .../astro/src/vite-plugin-build-html/index.ts | 834 ++-- .../astro/src/vite-plugin-build-html/util.ts | 46 +- .../src/vite-plugin-config-alias/index.ts | 124 +- packages/astro/src/vite-plugin-fetch/index.ts | 122 +- packages/astro/src/vite-plugin-jsx/index.ts | 318 +- .../astro/src/vite-plugin-markdown/index.ts | 100 +- packages/astro/test/0-css.test.js | 568 +-- packages/astro/test/astro-assets.test.js | 88 +- packages/astro/test/astro-attrs.test.js | 82 +- packages/astro/test/astro-basic.test.js | 180 +- packages/astro/test/astro-children.test.js | 106 +- packages/astro/test/astro-class-list.test.js | 46 +- packages/astro/test/astro-client-only.test.js | 40 +- .../astro/test/astro-component-code.test.js | 136 +- .../test/astro-css-bundling-import.test.js | 70 +- .../astro-css-bundling-nested-layouts.test.js | 50 +- .../astro/test/astro-css-bundling.test.js | 94 +- packages/astro/test/astro-doctype.test.js | 94 +- packages/astro/test/astro-dynamic.test.js | 80 +- packages/astro/test/astro-envs.test.js | 62 +- packages/astro/test/astro-expr.test.js | 144 +- packages/astro/test/astro-fallback.test.js | 26 +- .../astro/test/astro-get-static-paths.test.js | 30 +- packages/astro/test/astro-global.test.js | 86 +- packages/astro/test/astro-jsx.test.js | 54 +- .../astro/test/astro-markdown-plugins.test.js | 72 +- packages/astro/test/astro-markdown.test.js | 216 +- .../astro/test/astro-pageDirectoryUrl.test.js | 30 +- packages/astro/test/astro-pages.test.js | 20 +- packages/astro/test/astro-pagination.test.js | 68 +- .../astro/test/astro-partial-html.test.js | 54 +- packages/astro/test/astro-public.test.js | 22 +- packages/astro/test/astro-scripts.test.js | 118 +- packages/astro/test/astro-sitemap-rss.test.js | 54 +- packages/astro/test/astro-slots.test.js | 168 +- packages/astro/test/benchmark/benchmark.js | 106 +- packages/astro/test/benchmark/build.bench.js | 86 +- packages/astro/test/benchmark/dev.bench.js | 82 +- packages/astro/test/builtins.test.js | 26 +- packages/astro/test/cli.test.js | 52 +- packages/astro/test/config-validate.test.js | 66 +- packages/astro/test/config.test.js | 80 +- packages/astro/test/custom-elements.test.js | 106 +- packages/astro/test/debug-component.test.js | 32 +- packages/astro/test/dev-routing.test.js | 208 +- packages/astro/test/errors.test.js | 252 +- packages/astro/test/fetch.test.js | 56 +- .../src/pages/astro.astro | 6 +- .../astro-markdown/src/pages/braces.astro | 9 +- .../astro-markdown/src/pages/code.astro | 8 +- .../astro-markdown/src/pages/complex.astro | 12 +- .../astro-markdown/src/pages/deep.astro | 30 +- .../astro-markdown/src/pages/external.astro | 12 +- .../astro-markdown/src/pages/post.astro | 6 +- .../src/pages/scopedStyles-code.astro | 22 +- packages/astro/test/lit-element.test.js | 106 +- packages/astro/test/markdown.test.js | 40 +- packages/astro/test/postcss.test.js | 66 +- packages/astro/test/preact-component.test.js | 126 +- packages/astro/test/react-component.test.js | 190 +- packages/astro/test/route-manifest.test.js | 402 +- packages/astro/test/sass.test.js | 30 +- packages/astro/test/slots-preact.test.js | 30 +- packages/astro/test/slots-react.test.js | 30 +- packages/astro/test/slots-solid.test.js | 30 +- packages/astro/test/slots-svelte.test.js | 30 +- packages/astro/test/slots-vue.test.js | 30 +- packages/astro/test/solid-component.test.js | 78 +- packages/astro/test/svelte-component.test.js | 76 +- packages/astro/test/test-utils.js | 100 +- packages/astro/test/vue-component.test.js | 98 +- packages/create-astro/create-astro.mjs | 6 +- packages/create-astro/src/config.ts | 16 +- packages/create-astro/src/frameworks.ts | 80 +- packages/create-astro/src/index.ts | 310 +- packages/create-astro/src/templates.ts | 60 +- .../create-astro/test/create-astro.test.js | 194 +- packages/create-astro/test/external.test.js | 22 +- packages/markdown/remark/src/index.ts | 98 +- packages/markdown/remark/src/load-plugins.ts | 34 +- .../remark/src/rehype-collect-headers.ts | 50 +- packages/markdown/remark/src/rehype-escape.ts | 16 +- .../markdown/remark/src/rehype-expressions.ts | 16 +- .../markdown/remark/src/rehype-islands.ts | 46 +- packages/markdown/remark/src/rehype-jsx.ts | 48 +- .../markdown/remark/src/remark-expressions.ts | 38 +- packages/markdown/remark/src/remark-jsx.ts | 38 +- packages/markdown/remark/src/remark-prism.ts | 84 +- .../remark/src/remark-scoped-styles.ts | 20 +- packages/markdown/remark/src/remark-slug.ts | 28 +- packages/markdown/remark/src/remark-unwrap.ts | 50 +- packages/markdown/remark/src/types.ts | 14 +- .../renderers/renderer-lit/client-shim.js | 6 +- packages/renderers/renderer-lit/index.js | 52 +- packages/renderers/renderer-lit/server.js | 86 +- .../renderers/renderer-preact/compat/index.js | 58 +- packages/renderers/renderer-preact/index.js | 46 +- packages/renderers/renderer-preact/server.js | 38 +- .../renderers/renderer-preact/static-html.js | 4 +- packages/renderers/renderer-react/client.js | 16 +- packages/renderers/renderer-react/index.js | 52 +- packages/renderers/renderer-react/server.js | 90 +- .../renderers/renderer-react/static-html.js | 4 +- packages/renderers/renderer-solid/client.js | 18 +- packages/renderers/renderer-solid/index.js | 100 +- packages/renderers/renderer-solid/server.js | 36 +- .../renderers/renderer-solid/static-html.js | 4 +- .../renderer-svelte/Wrapper.svelte.ssr.js | 12 +- packages/renderers/renderer-svelte/client.js | 20 +- packages/renderers/renderer-svelte/index.js | 54 +- packages/renderers/renderer-svelte/server.js | 10 +- packages/renderers/renderer-vue/client.js | 18 +- packages/renderers/renderer-vue/index.js | 30 +- packages/renderers/renderer-vue/server.js | 20 +- .../renderers/renderer-vue/static-html.js | 14 +- scripts/cmd/build.js | 106 +- scripts/cmd/copy.js | 124 +- scripts/index.js | 28 +- scripts/notify/index.js | 106 +- scripts/smoke/index.js | 36 +- scripts/stats/index.js | 124 +- scripts/utils/svelte-plugin.js | 86 +- www/astro.config.mjs | 8 +- www/src/components/Article.astro | 126 +- www/src/components/ArticleFooter.astro | 12 +- www/src/components/Author.astro | 5 +- www/src/components/AvatarList.astro | 126 +- www/src/components/BackArrow.astro | 20 +- www/src/components/BaseHead.astro | 14 +- www/src/components/BlockQuote.astro | 56 +- www/src/components/BlogHead.astro | 5 +- www/src/components/BlogHeader.astro | 217 +- www/src/components/BlogPost.astro | 160 +- www/src/components/BlogPostPreview.astro | 77 +- www/src/components/GithubStarButton.astro | 7 +- www/src/components/GoogleAnalytics.astro | 10 +- www/src/components/Logo.astro | 128 +- www/src/components/Main.astro | 24 +- www/src/components/MainHeader.astro | 270 +- www/src/components/Note.astro | 66 +- www/src/components/Planets.astro | 176 +- www/src/components/Shell.astro | 28 +- www/src/components/Space.astro | 32 +- www/src/components/Sponsors.astro | 82 +- www/src/components/Stars.astro | 245 +- www/src/components/Tagline.astro | 32 +- www/src/components/YouTube.astro | 5 +- www/src/components/YouTube.css | 88 +- www/src/config.ts | 18 +- www/src/layouts/Blog.astro | 351 +- www/src/pages/404.astro | 20 +- www/src/pages/blog/[slug].astro | 32 +- www/src/pages/blog/index.astro | 126 +- www/src/pages/index.astro | 159 +- www/src/scss/blog.scss | 314 +- www/src/scss/code.scss | 80 +- www/src/scss/error.scss | 162 +- www/src/scss/fonts.scss | 40 +- www/src/scss/global.scss | 134 +- 440 files changed, 21261 insertions(+), 20879 deletions(-) diff --git a/.editorconfig b/.editorconfig index 58d264c1c..0bb4ad6ec 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,9 +4,12 @@ root = true [*] -indent_style = space -indent_size = 2 -end_of_line = lf charset = utf-8 -trim_trailing_whitespace = false +end_of_line = lf +indent_size = 2 +indent_style = tab insert_final_newline = true +trim_trailing_whitespace = false + +[{.*,*.md,*.json,*.toml,*.yml,}] +indent_style = space diff --git a/.prettierrc.json b/.prettierrc.json index 3da31c1ab..1daf43285 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -3,5 +3,14 @@ "semi": true, "singleQuote": true, "tabWidth": 2, - "trailingComma": "es5" + "trailingComma": "es5", + "useTabs": true, + "overrides": [ + { + "files": [".*", "*.json", "*.md", "*.toml", "*.yml"], + "options": { + "useTabs": false + } + } + ] } diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index a5299726c..94290bf17 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -1,12 +1,12 @@ // @ts-check export default /** @type {import('astro').AstroUserConfig} */ ({ - buildOptions: { - site: 'https://docs.astro.build/', - }, - renderers: [ - // Our main renderer for frontend components - '@astrojs/renderer-preact', - // Needed for Algolia search component - '@astrojs/renderer-react', - ], + buildOptions: { + site: 'https://docs.astro.build/', + }, + renderers: [ + // Our main renderer for frontend components + '@astrojs/renderer-preact', + // Needed for Algolia search component + '@astrojs/renderer-react', + ], }); diff --git a/docs/public/code.css b/docs/public/code.css index 0543b8416..3cb74322f 100644 --- a/docs/public/code.css +++ b/docs/public/code.css @@ -1,34 +1,34 @@ .language-css > code, .language-sass > code, .language-scss > code { - color: #fd9170; + color: #fd9170; } .language-diff .token.prefix.deleted, .language-diff .token.prefix.inserted { - user-select: none; + user-select: none; } [class*='language-'] .namespace { - opacity: 0.7; + opacity: 0.7; } .token.plain-text, [class*='language-bash'] span.token, [class*='language-shell'] span.token { - color: hsla(var(--color-gray-90), 1); + color: hsla(var(--color-gray-90), 1); } [class*='language-bash'] span.token, [class*='language-shell'] span.token { - font-style: bold; + font-style: bold; } .token.prolog, .token.comment, [class*='language-bash'] span.token.comment, [class*='language-shell'] span.token.comment { - color: hsla(var(--color-gray-70), 1); + color: hsla(var(--color-gray-70), 1); } .token.selector, @@ -38,7 +38,7 @@ .token.variable, .token.entity, .token.deleted { - color: #fa5e5b; + color: #fa5e5b; } .token.boolean, @@ -51,7 +51,7 @@ .token.hexcode, .token.class-name, .token.attr-name { - color: hsla(var(--color-yellow), 1); + color: hsla(var(--color-yellow), 1); } .token.atrule, @@ -61,41 +61,41 @@ .token.pseudo-class, .token.pseudo-element, .token.string { - color: hsla(var(--color-green), 1); + color: hsla(var(--color-green), 1); } .token.symbol, .token.function, .token.id, .token.important { - color: hsla(var(--color-blue), 1); + color: hsla(var(--color-blue), 1); } .token.important, .token.id { - font-weight: bold; + font-weight: bold; } .token.cdata, .token.char, .token.property { - color: #23b1af; + color: #23b1af; } .token.inserted { - color: hsla(var(--color-green), 1); + color: hsla(var(--color-green), 1); } .token.keyword { - color: #ff657c; - font-style: italic; + color: #ff657c; + font-style: italic; } .token.operator { - color: hsla(var(--color-gray-70), 1); + color: hsla(var(--color-gray-70), 1); } .token.attr-value .token.attr-equals, .token.punctuation { - color: hsla(var(--color-gray-80), 1); + color: hsla(var(--color-gray-80), 1); } diff --git a/docs/public/index.css b/docs/public/index.css index e8c8759b5..25bc0e16e 100644 --- a/docs/public/index.css +++ b/docs/public/index.css @@ -1,46 +1,46 @@ * { - box-sizing: border-box; - margin: 0; + box-sizing: border-box; + margin: 0; } /* Global focus outline reset */ *:focus:not(:focus-visible) { - outline: none; + outline: none; } :root { - --user-font-scale: 1rem - 16px; - --max-width: calc(100% - 1rem); + --user-font-scale: 1rem - 16px; + --max-width: calc(100% - 1rem); } @media (min-width: 50em) { - :root { - --max-width: 46em; - } + :root { + --max-width: 46em; + } } body { - display: flex; - flex-direction: column; - min-height: 100vh; - font-family: var(--font-body); - font-size: 1rem; - font-size: clamp(0.9rem, 0.75rem + 0.375vw + var(--user-font-scale), 1rem); - line-height: 1.5; - max-width: 100vw; + display: flex; + flex-direction: column; + min-height: 100vh; + font-family: var(--font-body); + font-size: 1rem; + font-size: clamp(0.9rem, 0.75rem + 0.375vw + var(--user-font-scale), 1rem); + line-height: 1.5; + max-width: 100vw; } nav ul { - list-style: none; - padding: 0; + list-style: none; + padding: 0; } .content > section > * + * { - margin-top: 1.25rem; + margin-top: 1.25rem; } .content > section > :first-child { - margin-top: 0; + margin-top: 0; } /* Typography */ @@ -50,335 +50,335 @@ h3, h4, h5, h6 { - margin-bottom: 1rem; - font-weight: bold; - line-height: 1; + margin-bottom: 1rem; + font-weight: bold; + line-height: 1; } h1, h2 { - max-width: 40ch; + max-width: 40ch; } :is(h2, h3):not(:first-child) { - margin-top: 3rem; + margin-top: 3rem; } :is(h4, h5, h6):not(:first-child) { - margin-top: 2rem; + margin-top: 2rem; } h1 { - font-size: 3.25rem; - font-weight: 800; + font-size: 3.25rem; + font-weight: 800; } h2 { - font-size: 2.5rem; + font-size: 2.5rem; } h3 { - font-size: 1.75rem; + font-size: 1.75rem; } h4 { - font-size: 1.3rem; + font-size: 1.3rem; } h5 { - font-size: 1rem; + font-size: 1rem; } p, .content ul { - line-height: 1.65em; + line-height: 1.65em; } p, .content ul { - color: var(--theme-text-light); + color: var(--theme-text-light); } small, .text_small { - font-size: 0.833rem; + font-size: 0.833rem; } a { - color: var(--theme-text-accent); - text-underline-offset: 0.08em; - align-items: center; - gap: 0.5rem; + color: var(--theme-text-accent); + text-underline-offset: 0.08em; + align-items: center; + gap: 0.5rem; } article > section :is(ul, ol) > * + * { - margin-top: 0.25rem; + margin-top: 0.25rem; } article > section nav :is(ul, ol) > * + * { - margin-top: inherit; + margin-top: inherit; } article > section li > :is(p, pre, blockquote):not(:first-child) { - margin-top: 1rem; + margin-top: 1rem; } article > section :is(ul, ol) { - padding-left: 1em; + padding-left: 1em; } article > section nav :is(ul, ol) { - padding-left: inherit; + padding-left: inherit; } article > section nav { - margin-top: 1rem; - margin-bottom: 2rem; + margin-top: 1rem; + margin-bottom: 2rem; } article > section ::marker { - font-weight: bold; - color: var(--theme-text-light); + font-weight: bold; + color: var(--theme-text-light); } article > section iframe { - width: 100%; - height: auto; - aspect-ratio: 16 / 9; + width: 100%; + height: auto; + aspect-ratio: 16 / 9; } a > code:not([class*='language']) { - position: relative; - color: var(--theme-text-accent); - background: transparent; - text-underline-offset: var(--padding-block); + position: relative; + color: var(--theme-text-accent); + background: transparent; + text-underline-offset: var(--padding-block); } a > code:not([class*='language'])::before { - content: ''; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - display: block; - background: var(--theme-accent); - opacity: var(--theme-accent-opacity); - border-radius: var(--border-radius); + content: ''; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + display: block; + background: var(--theme-accent); + opacity: var(--theme-accent-opacity); + border-radius: var(--border-radius); } a:hover, a:focus { - text-decoration: underline; + text-decoration: underline; } a:focus { - outline: 2px solid currentColor; - outline-offset: 0.25em; + outline: 2px solid currentColor; + outline-offset: 0.25em; } strong { - font-weight: 600; - color: inherit; + font-weight: 600; + color: inherit; } /* Supporting Content */ code { - font-family: var(--font-mono); - font-size: 0.85em; + font-family: var(--font-mono); + font-size: 0.85em; } code:not([class*='language']) { - --border-radius: 3px; - --padding-block: 0.2rem; - --padding-inline: 0.4rem; - color: var(--theme-code-inline-text); - background-color: var(--theme-code-inline-bg); - padding: var(--padding-block) var(--padding-inline); - margin: calc(var(--padding-block) * -1) -0.125em; - border-radius: var(--border-radius); - box-shadow: 0 2px 1px 0 rgba(0, 0, 0, 0.08); - word-break: break-word; + --border-radius: 3px; + --padding-block: 0.2rem; + --padding-inline: 0.4rem; + color: var(--theme-code-inline-text); + background-color: var(--theme-code-inline-bg); + padding: var(--padding-block) var(--padding-inline); + margin: calc(var(--padding-block) * -1) -0.125em; + border-radius: var(--border-radius); + box-shadow: 0 2px 1px 0 rgba(0, 0, 0, 0.08); + word-break: break-word; } pre > code:not([class*='language']) { - background-color: transparent; - padding: 0; - margin: 0; - border-radius: 0; - color: inherit; + background-color: transparent; + padding: 0; + margin: 0; + border-radius: 0; + color: inherit; } pre > code { - font-size: 1em; + font-size: 1em; } table, pre { - position: relative; - --padding-block: 1rem; - --padding-inline: 2rem; - padding: var(--padding-block) var(--padding-inline); - padding-right: calc(var(--padding-inline) * 2); - margin-left: calc(var(--padding-inline) * -1); - margin-right: calc(var(--padding-inline) * -1); - font-family: var(--font-mono); + position: relative; + --padding-block: 1rem; + --padding-inline: 2rem; + padding: var(--padding-block) var(--padding-inline); + padding-right: calc(var(--padding-inline) * 2); + margin-left: calc(var(--padding-inline) * -1); + margin-right: calc(var(--padding-inline) * -1); + font-family: var(--font-mono); - line-height: 1.5; - font-size: 0.85em; - overflow-y: hidden; - overflow-x: auto; + line-height: 1.5; + font-size: 0.85em; + overflow-y: hidden; + overflow-x: auto; } table { - width: 100%; - padding: var(--padding-block) 0; - margin: 0; - border-collapse: collapse; + width: 100%; + padding: var(--padding-block) 0; + margin: 0; + border-collapse: collapse; } /* Zebra striping */ tr:nth-of-type(odd) { - background: var(--theme-bg-hover); + background: var(--theme-bg-hover); } th { - background: var(--color-black); - color: var(--theme-color); - font-weight: bold; + background: var(--color-black); + color: var(--theme-color); + font-weight: bold; } td, th { - padding: 6px; - text-align: left; + padding: 6px; + text-align: left; } pre { - background-color: var(--theme-code-bg); - color: var(--theme-code-text); + background-color: var(--theme-code-bg); + color: var(--theme-code-text); } blockquote code:not([class*='language']) { - background-color: var(--theme-bg); + background-color: var(--theme-bg); } @media (min-width: 37.75em) { - pre { - --padding-inline: 1.25rem; - border-radius: 8px; - margin-left: 0; - margin-right: 0; - } + pre { + --padding-inline: 1.25rem; + border-radius: 8px; + margin-left: 0; + margin-right: 0; + } } blockquote { - margin: 2rem 0; - padding: 1.25em 1.5rem; - border-left: 3px solid var(--theme-text-light); - background-color: var(--theme-bg-offset); - border-radius: 0 0.25rem 0.25rem 0; - line-height: 1.7; + margin: 2rem 0; + padding: 1.25em 1.5rem; + border-left: 3px solid var(--theme-text-light); + background-color: var(--theme-bg-offset); + border-radius: 0 0.25rem 0.25rem 0; + line-height: 1.7; } img { - max-width: 100%; + max-width: 100%; } .flex { - display: flex; - align-items: center; + display: flex; + align-items: center; } button { - display: flex; - align-items: center; - justify-items: center; - gap: 0.25em; - padding: 0.33em 0.67em; - border: 0; - background: var(--theme-bg); - display: flex; - font-size: 1rem; - align-items: center; - gap: 0.25em; - border-radius: 99em; - color: var(--theme-text); - background-color: var(--theme-bg); + display: flex; + align-items: center; + justify-items: center; + gap: 0.25em; + padding: 0.33em 0.67em; + border: 0; + background: var(--theme-bg); + display: flex; + font-size: 1rem; + align-items: center; + gap: 0.25em; + border-radius: 99em; + color: var(--theme-text); + background-color: var(--theme-bg); } h2.heading { - font-size: 1rem; - font-weight: 700; - padding: 0.1rem 1rem; - text-transform: uppercase; - margin-bottom: 0.5rem; + font-size: 1rem; + font-weight: 700; + padding: 0.1rem 1rem; + text-transform: uppercase; + margin-bottom: 0.5rem; } .header-link { - font-size: 1rem; - padding: 0.1rem 0 0.1rem 1rem; - border-left: 4px solid var(--theme-divider); + font-size: 1rem; + padding: 0.1rem 0 0.1rem 1rem; + border-left: 4px solid var(--theme-divider); } .header-link:hover, .header-link:focus { - border-left-color: var(--theme-accent); - color: var(--theme-accent); + border-left-color: var(--theme-accent); + color: var(--theme-accent); } .header-link:focus-within { - color: var(--theme-text-light); - border-left-color: hsla(var(--color-gray-40), 1); + color: var(--theme-text-light); + border-left-color: hsla(var(--color-gray-40), 1); } .header-link svg { - opacity: 0.6; + opacity: 0.6; } .header-link:hover svg { - opacity: 0.8; + opacity: 0.8; } .header-link a { - display: inline-flex; - gap: 0.5em; - width: 100%; - padding: 0.15em 0 0.15em 0; + display: inline-flex; + gap: 0.5em; + width: 100%; + padding: 0.15em 0 0.15em 0; } .header-link.depth-3 { - padding-left: 2rem; + padding-left: 2rem; } .header-link.depth-4 { - padding-left: 3rem; + padding-left: 3rem; } .header-link a { - font: inherit; - color: inherit; - text-decoration: none; + font: inherit; + color: inherit; + text-decoration: none; } /* Screenreader Only Text */ .sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border-width: 0; + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; } .focus\:not-sr-only:focus, .focus\:not-sr-only:focus-visible { - position: static; - width: auto; - height: auto; - padding: 0; - margin: 0; - overflow: visible; - clip: auto; - white-space: normal; + position: static; + width: auto; + height: auto; + padding: 0; + margin: 0; + overflow: visible; + clip: auto; + white-space: normal; } :target { - scroll-margin: calc(var(--theme-sidebar-offset, 5rem) + 2rem) 0 2rem; + scroll-margin: calc(var(--theme-sidebar-offset, 5rem) + 2rem) 0 2rem; } diff --git a/docs/public/make-scrollable-code-focusable.js b/docs/public/make-scrollable-code-focusable.js index 35f104923..f2b7030f7 100644 --- a/docs/public/make-scrollable-code-focusable.js +++ b/docs/public/make-scrollable-code-focusable.js @@ -1,3 +1,3 @@ Array.from(document.getElementsByTagName('pre')).forEach((element) => { - element.setAttribute('tabindex', '0'); + element.setAttribute('tabindex', '0'); }); diff --git a/docs/public/theme.css b/docs/public/theme.css index 551ee15e0..44a933434 100644 --- a/docs/public/theme.css +++ b/docs/public/theme.css @@ -1,13 +1,13 @@ :root { - --font-fallback: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, - sans-serif, Apple Color Emoji, Segoe UI Emoji; - --font-body: system-ui, var(--font-fallback); - --font-mono: 'IBM Plex Mono', Consolas, 'Andale Mono WT', 'Andale Mono', - 'Lucida Console', 'Lucida Sans Typewriter', 'DejaVu Sans Mono', - 'Bitstream Vera Sans Mono', 'Liberation Mono', 'Nimbus Mono L', Monaco, - 'Courier New', Courier, monospace; + --font-fallback: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, + sans-serif, Apple Color Emoji, Segoe UI Emoji; + --font-body: system-ui, var(--font-fallback); + --font-mono: 'IBM Plex Mono', Consolas, 'Andale Mono WT', 'Andale Mono', + 'Lucida Console', 'Lucida Sans Typewriter', 'DejaVu Sans Mono', + 'Bitstream Vera Sans Mono', 'Liberation Mono', 'Nimbus Mono L', Monaco, + 'Courier New', Courier, monospace; - /* + /* * Variables with --color-base prefix define * the hue, and saturation values to be used for * hsla colors. @@ -18,109 +18,109 @@ * */ - --color-base-white: 0, 0%; - --color-base-black: 240, 100%; - --color-base-gray: 215, 14%; - --color-base-blue: 212, 100%; - --color-base-blue-dark: 212, 72%; - --color-base-green: 158, 79%; - --color-base-orange: 22, 100%; - --color-base-purple: 269, 79%; - --color-base-red: 351, 100%; - --color-base-yellow: 41, 100%; + --color-base-white: 0, 0%; + --color-base-black: 240, 100%; + --color-base-gray: 215, 14%; + --color-base-blue: 212, 100%; + --color-base-blue-dark: 212, 72%; + --color-base-green: 158, 79%; + --color-base-orange: 22, 100%; + --color-base-purple: 269, 79%; + --color-base-red: 351, 100%; + --color-base-yellow: 41, 100%; - /* + /* * Color palettes are made using --color-base * variables, along with a lightness value to * define different variants. * */ - --color-gray-5: var(--color-base-gray), 5%; - --color-gray-10: var(--color-base-gray), 10%; - --color-gray-20: var(--color-base-gray), 20%; - --color-gray-30: var(--color-base-gray), 30%; - --color-gray-40: var(--color-base-gray), 40%; - --color-gray-50: var(--color-base-gray), 50%; - --color-gray-60: var(--color-base-gray), 60%; - --color-gray-70: var(--color-base-gray), 70%; - --color-gray-80: var(--color-base-gray), 80%; - --color-gray-90: var(--color-base-gray), 90%; - --color-gray-95: var(--color-base-gray), 95%; + --color-gray-5: var(--color-base-gray), 5%; + --color-gray-10: var(--color-base-gray), 10%; + --color-gray-20: var(--color-base-gray), 20%; + --color-gray-30: var(--color-base-gray), 30%; + --color-gray-40: var(--color-base-gray), 40%; + --color-gray-50: var(--color-base-gray), 50%; + --color-gray-60: var(--color-base-gray), 60%; + --color-gray-70: var(--color-base-gray), 70%; + --color-gray-80: var(--color-base-gray), 80%; + --color-gray-90: var(--color-base-gray), 90%; + --color-gray-95: var(--color-base-gray), 95%; - --color-blue: var(--color-base-blue), 61%; - --color-blue-dark: var(--color-base-blue-dark), 39%; - --color-green: var(--color-base-green), 42%; - --color-orange: var(--color-base-orange), 50%; - --color-purple: var(--color-base-purple), 54%; - --color-red: var(--color-base-red), 54%; - --color-yellow: var(--color-base-yellow), 59%; + --color-blue: var(--color-base-blue), 61%; + --color-blue-dark: var(--color-base-blue-dark), 39%; + --color-green: var(--color-base-green), 42%; + --color-orange: var(--color-base-orange), 50%; + --color-purple: var(--color-base-purple), 54%; + --color-red: var(--color-base-red), 54%; + --color-yellow: var(--color-base-yellow), 59%; } :root { - color-scheme: light; - --theme-accent: hsla(var(--color-orange), 1); - --theme-text-accent: hsla(var(--color-orange), 1); - --theme-accent-opacity: 0.1; - --theme-divider: hsla(var(--color-gray-95), 1); - --theme-text: hsla(var(--color-gray-10), 1); - --theme-text-light: hsla(var(--color-gray-40), 1); - /* @@@: not used anywhere */ - --theme-text-lighter: hsla(var(--color-gray-80), 1); - --theme-bg: hsla(var(--color-base-white), 100%, 1); - --theme-bg-hover: hsla(var(--color-gray-95), 1); - --theme-bg-offset: hsla(var(--color-gray-90), 1); - --theme-bg-accent: hsla(var(--color-orange), var(--theme-accent-opacity)); - --theme-code-inline-bg: hsla(var(--color-gray-95), 1); - --theme-code-inline-text: var(--theme-text); - --theme-code-bg: hsla(217, 19%, 27%, 1); - --theme-code-text: hsla(var(--color-gray-95), 1); - --theme-navbar-bg: hsla(var(--color-base-white), 100%, 1); - --theme-navbar-height: 6rem; - --theme-selection-color: hsla(var(--color-orange), 1); - --theme-selection-bg: hsla(var(--color-orange), var(--theme-accent-opacity)); + color-scheme: light; + --theme-accent: hsla(var(--color-orange), 1); + --theme-text-accent: hsla(var(--color-orange), 1); + --theme-accent-opacity: 0.1; + --theme-divider: hsla(var(--color-gray-95), 1); + --theme-text: hsla(var(--color-gray-10), 1); + --theme-text-light: hsla(var(--color-gray-40), 1); + /* @@@: not used anywhere */ + --theme-text-lighter: hsla(var(--color-gray-80), 1); + --theme-bg: hsla(var(--color-base-white), 100%, 1); + --theme-bg-hover: hsla(var(--color-gray-95), 1); + --theme-bg-offset: hsla(var(--color-gray-90), 1); + --theme-bg-accent: hsla(var(--color-orange), var(--theme-accent-opacity)); + --theme-code-inline-bg: hsla(var(--color-gray-95), 1); + --theme-code-inline-text: var(--theme-text); + --theme-code-bg: hsla(217, 19%, 27%, 1); + --theme-code-text: hsla(var(--color-gray-95), 1); + --theme-navbar-bg: hsla(var(--color-base-white), 100%, 1); + --theme-navbar-height: 6rem; + --theme-selection-color: hsla(var(--color-orange), 1); + --theme-selection-bg: hsla(var(--color-orange), var(--theme-accent-opacity)); } body { - background: var(--theme-bg); - color: var(--theme-text); + background: var(--theme-bg); + color: var(--theme-text); } :root.theme-dark { - color-scheme: dark; - --theme-accent-opacity: 0.4; - --theme-accent: hsla(var(--color-orange), 1); - --theme-text-accent: hsla(var(--color-orange), 1); - --theme-divider: hsla(var(--color-gray-10), 1); - --theme-text: hsla(var(--color-gray-90), 1); - --theme-text-light: hsla(var(--color-gray-80), 1); + color-scheme: dark; + --theme-accent-opacity: 0.4; + --theme-accent: hsla(var(--color-orange), 1); + --theme-text-accent: hsla(var(--color-orange), 1); + --theme-divider: hsla(var(--color-gray-10), 1); + --theme-text: hsla(var(--color-gray-90), 1); + --theme-text-light: hsla(var(--color-gray-80), 1); - /* @@@: not used anywhere */ - --theme-text-lighter: hsla(var(--color-gray-40), 1); - --theme-bg: hsla(215, 28%, 17%, 1); - --theme-bg-hover: hsla(var(--color-gray-40), 1); - --theme-bg-offset: hsla(var(--color-gray-5), 1); - --theme-code-inline-bg: hsla(var(--color-gray-10), 1); - --theme-code-inline-text: hsla(var(--color-base-white), 100%, 1); - --theme-code-bg: hsla(var(--color-gray-5), 1); - --theme-code-text: hsla(var(--color-base-white), 100%, 1); - --theme-navbar-bg: hsla(215, 28%, 17%, 1); - --theme-selection-color: hsla(var(--color-base-white), 100%, 1); - --theme-selection-bg: hsla(var(--color-purple), var(--theme-accent-opacity)); + /* @@@: not used anywhere */ + --theme-text-lighter: hsla(var(--color-gray-40), 1); + --theme-bg: hsla(215, 28%, 17%, 1); + --theme-bg-hover: hsla(var(--color-gray-40), 1); + --theme-bg-offset: hsla(var(--color-gray-5), 1); + --theme-code-inline-bg: hsla(var(--color-gray-10), 1); + --theme-code-inline-text: hsla(var(--color-base-white), 100%, 1); + --theme-code-bg: hsla(var(--color-gray-5), 1); + --theme-code-text: hsla(var(--color-base-white), 100%, 1); + --theme-navbar-bg: hsla(215, 28%, 17%, 1); + --theme-selection-color: hsla(var(--color-base-white), 100%, 1); + --theme-selection-bg: hsla(var(--color-purple), var(--theme-accent-opacity)); - /* DocSearch [Algolia] */ - --docsearch-modal-background: var(--theme-bg); - --docsearch-searchbox-focus-background: var(--theme-divider); - --docsearch-footer-background: var(--theme-divider); - --docsearch-text-color: var(--theme-text); - --docsearch-hit-background: var(--theme-divider); - --docsearch-hit-shadow: none; - --docsearch-hit-color: var(--theme-text); - --docsearch-footer-shadow: inset 0 2px 10px #000; - --docsearch-modal-shadow: inset 0 0 8px #000; + /* DocSearch [Algolia] */ + --docsearch-modal-background: var(--theme-bg); + --docsearch-searchbox-focus-background: var(--theme-divider); + --docsearch-footer-background: var(--theme-divider); + --docsearch-text-color: var(--theme-text); + --docsearch-hit-background: var(--theme-divider); + --docsearch-hit-shadow: none; + --docsearch-hit-color: var(--theme-text); + --docsearch-footer-shadow: inset 0 2px 10px #000; + --docsearch-modal-shadow: inset 0 0 8px #000; } ::selection { - color: var(--theme-selection-color); - background-color: var(--theme-selection-bg); + color: var(--theme-selection-color); + background-color: var(--theme-selection-bg); } diff --git a/docs/src/components/Card.astro b/docs/src/components/Card.astro index c024981ff..21b5deb68 100644 --- a/docs/src/components/Card.astro +++ b/docs/src/components/Card.astro @@ -1,52 +1,62 @@ --- -const {data, index} = Astro.props; +const { data, index } = Astro.props; const hasScreenshot = !!data.demo; -const backgroundStyle = hasScreenshot ? `url('https://v1.screenshot.11ty.dev/${encodeURIComponent(data.demo)}/medium/9:16/')` : `linear-gradient(60deg, var(--theme-bg-accent), var(--theme-accent))` +const backgroundStyle = hasScreenshot + ? `url('https://v1.screenshot.11ty.dev/${encodeURIComponent( + data.demo + )}/medium/9:16/')` + : `linear-gradient(60deg, var(--theme-bg-accent), var(--theme-accent))`; --- + +
+ {hasScreenshot &&
} + +
+ -
- {hasScreenshot &&
} - -
\ No newline at end of file diff --git a/docs/src/components/Footer/AvatarList.astro b/docs/src/components/Footer/AvatarList.astro index 06ac2cd0b..5eb0c3692 100644 --- a/docs/src/components/Footer/AvatarList.astro +++ b/docs/src/components/Footer/AvatarList.astro @@ -2,7 +2,7 @@ // fetch all commits for just this page's path export interface Props { - path: string; + path: string; } const { path } = Astro.props as Props; @@ -11,147 +11,166 @@ const url = `https://api.github.com/repos/withastro/astro/commits?path=${commitP const commitsURL = `https://github.com/withastro/astro/commits/main/${commitPath}`; async function getCommits(url) { - try { - const token = import.meta.env.SNOWPACK_PUBLIC_GITHUB_TOKEN; - if (!token) { - throw new Error( - 'Cannot find "SNOWPACK_PUBLIC_GITHUB_TOKEN" used for escaping rate-limiting.' - ); - } + try { + const token = import.meta.env.SNOWPACK_PUBLIC_GITHUB_TOKEN; + if (!token) { + throw new Error( + 'Cannot find "SNOWPACK_PUBLIC_GITHUB_TOKEN" used for escaping rate-limiting.' + ); + } - const auth = `Basic ${Buffer.from(token, "binary").toString("base64")}`; + const auth = `Basic ${Buffer.from(token, 'binary').toString('base64')}`; - const res = await fetch(url, { - method: "GET", - headers: { - Authorization: auth, - "User-Agent": "astro-docs/1.0", - }, - }); + const res = await fetch(url, { + method: 'GET', + headers: { + Authorization: auth, + 'User-Agent': 'astro-docs/1.0', + }, + }); - const data = await res.json(); + const data = await res.json(); - if (!res.ok) { - throw new Error( - `Request to fetch commits failed. Reason: ${res.statusText} + if (!res.ok) { + throw new Error( + `Request to fetch commits failed. Reason: ${res.statusText} Message: ${data.message}` - ); - } + ); + } - return data; - } catch (e) { - console.warn(`[error] /src/components/AvatarList.astro + return data; + } catch (e) { + console.warn(`[error] /src/components/AvatarList.astro ${e?.message ?? e}`); - return new Array(); - } + return new Array(); + } } function removeDups(arr) { - if (!arr) { - return new Array(); - } - let map = new Map(); + if (!arr) { + return new Array(); + } + let map = new Map(); - for (let item of arr) { - let author = item.author; - // Deduplicate based on author.id - map.set(author.id, { login: author.login, id: author.id }); - } + for (let item of arr) { + let author = item.author; + // Deduplicate based on author.id + map.set(author.id, { login: author.login, id: author.id }); + } - return Array.from(map.values()); + return Array.from(map.values()); } const data = await getCommits(url); const unique = removeDups(data); const recentContributors = unique.slice(0, 3); // only show avatars for the 3 most recent contributors const additionalContributors = unique.length - recentContributors.length; // list the rest of them as # of extra contributors - --- +
- - {additionalContributors > 0 && {`and ${additionalContributors} additional contributor${additionalContributors > 1 ? 's' : ''}.`}} - {unique.length === 0 && Contributors} + + {additionalContributors > 0 && ( + + {`and ${additionalContributors} additional contributor${ + additionalContributors > 1 ? 's' : '' + }.`} + + )} + {unique.length === 0 && Contributors}
diff --git a/docs/src/components/Footer/Footer.astro b/docs/src/components/Footer/Footer.astro index 48de51054..d13f832e5 100644 --- a/docs/src/components/Footer/Footer.astro +++ b/docs/src/components/Footer/Footer.astro @@ -4,13 +4,13 @@ const { path } = Astro.props; --- diff --git a/docs/src/components/HeadCommon.astro b/docs/src/components/HeadCommon.astro index 222c17ac2..ca0782b60 100644 --- a/docs/src/components/HeadCommon.astro +++ b/docs/src/components/HeadCommon.astro @@ -1,10 +1,10 @@ - - - + + + - + @@ -12,29 +12,38 @@ - - - + + + - - + diff --git a/docs/src/components/HeadSEO.astro b/docs/src/components/HeadSEO.astro index d3cd80901..6b62c9d1f 100644 --- a/docs/src/components/HeadSEO.astro +++ b/docs/src/components/HeadSEO.astro @@ -1,43 +1,48 @@ --- -import {SITE, OPEN_GRAPH} from '../config.ts'; +import { SITE, OPEN_GRAPH } from '../config.ts'; import { getLanguageFromURL } from '../util.ts'; export interface Props { - content: any, - site: any, - canonicalURL: URL, -}; -const { - content = {}, - canonicalURL, - } = Astro.props; + content: any; + site: any; + canonicalURL: URL; +} +const { content = {}, canonicalURL } = Astro.props; const imageSrc = content?.image?.src ?? OPEN_GRAPH.image.src; const canonicalImageSrc = new URL(imageSrc, Astro.site); const imageAlt = content?.image?.alt ?? OPEN_GRAPH.image.alt; const lang = canonicalURL && getLanguageFromURL(canonicalURL.pathname); --- + - + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - + {title} - - - + + + - + - + - + {next && } {prev && } - - + + {image && ()} - - - - + + + + {image && ()} diff --git a/examples/blog-multiple-authors/src/components/Nav.astro b/examples/blog-multiple-authors/src/components/Nav.astro index 04a537f87..a2a5fc3a3 100644 --- a/examples/blog-multiple-authors/src/components/Nav.astro +++ b/examples/blog-multiple-authors/src/components/Nav.astro @@ -1,63 +1,63 @@ --- export interface Props { - title: string; + title: string; } const { title } = Astro.props; --- - - + + diff --git a/examples/blog-multiple-authors/src/components/Pagination.astro b/examples/blog-multiple-authors/src/components/Pagination.astro index 401931c07..8cc3941f6 100644 --- a/examples/blog-multiple-authors/src/components/Pagination.astro +++ b/examples/blog-multiple-authors/src/components/Pagination.astro @@ -1,44 +1,44 @@ --- export interface Props { - prevUrl: string; - nextUrl: string; + prevUrl: string; + nextUrl: string; } const { prevUrl, nextUrl } = Astro.props; --- - -
- +
+ + diff --git a/examples/blog-multiple-authors/src/components/PostPreview.astro b/examples/blog-multiple-authors/src/components/PostPreview.astro index 19e1362e5..81e80ba6c 100644 --- a/examples/blog-multiple-authors/src/components/PostPreview.astro +++ b/examples/blog-multiple-authors/src/components/PostPreview.astro @@ -1,66 +1,65 @@ --- export interface Props { - post: any; - author: string; + post: any; + author: string; } const { post, author } = Astro.props; function formatDate(date) { - return new Date(date).toUTCString().replace(/(\d\d\d\d) .*/, '$1'); // remove everything after YYYY + return new Date(date).toUTCString().replace(/(\d\d\d\d) .*/, '$1'); // remove everything after YYYY } --- - -
- -
-

{post.title}

- {author.name} - -

- {post.description} - Read -

-
+
+

{post.title}

+ {author.name} + +

+ {post.description} + Read +

+
+ + diff --git a/examples/blog-multiple-authors/src/layouts/post.astro b/examples/blog-multiple-authors/src/layouts/post.astro index 64ad9fabd..fd8fcefa6 100644 --- a/examples/blog-multiple-authors/src/layouts/post.astro +++ b/examples/blog-multiple-authors/src/layouts/post.astro @@ -7,73 +7,72 @@ const { content } = Astro.props; let canonicalURL = Astro.request.canonicalURL; --- - - - {content.title} - - - + .footer { + margin-top: 6rem; + padding-bottom: 6rem; + text-align: center; + } + + - -