@treeseed/core 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +145 -0
- package/dist/agents/index.js +5 -0
- package/dist/agents/registry-helper.js +14 -0
- package/dist/agents/registry.js +88 -0
- package/dist/components/DevWatchReload.astro +45 -0
- package/dist/components/SiteTitle.astro +51 -0
- package/dist/components/content/ContentStatusLegend.astro +18 -0
- package/dist/components/content/StatusBadge.astro +11 -0
- package/dist/components/docs/BookFontControls.astro +180 -0
- package/dist/components/docs/DesktopSidebarToggle.astro +88 -0
- package/dist/components/docs/DownloadBook.astro +34 -0
- package/dist/components/docs/Footer.astro +196 -0
- package/dist/components/docs/Header.astro +150 -0
- package/dist/components/docs/PageFrame.astro +260 -0
- package/dist/components/docs/PageSidebar.astro +63 -0
- package/dist/components/docs/PageTitle.astro +39 -0
- package/dist/components/docs/Sidebar.astro +41 -0
- package/dist/components/docs/ThemeSelect.astro +3 -0
- package/dist/components/forms/ContactForm.astro +234 -0
- package/dist/components/forms/FooterSubscribeForm.astro +189 -0
- package/dist/components/site/BookList.astro +27 -0
- package/dist/components/site/CTASection.astro +24 -0
- package/dist/components/site/ChronicleList.astro +33 -0
- package/dist/components/site/Hero.astro +18 -0
- package/dist/components/site/NotesList.astro +18 -0
- package/dist/components/site/PathCard.astro +16 -0
- package/dist/components/site/ProfileList.astro +30 -0
- package/dist/components/site/SectionIntro.astro +9 -0
- package/dist/components/site/StageBanner.astro +8 -0
- package/dist/components/site/TrustCallout.astro +9 -0
- package/dist/components/starlight.js +6 -0
- package/dist/config.js +8 -0
- package/dist/content-config.js +9 -0
- package/dist/content.js +230 -0
- package/dist/contracts.d.ts +130 -0
- package/dist/contracts.js +0 -0
- package/dist/deploy/config.d.ts +4 -0
- package/dist/deploy/config.js +154 -0
- package/dist/deploy/runtime.js +77 -0
- package/dist/env.yaml +322 -0
- package/dist/environment.d.ts +130 -0
- package/dist/environment.js +324 -0
- package/dist/index.js +81 -0
- package/dist/layouts/AuthoredEntryLayout.astro +87 -0
- package/dist/layouts/BookLayout.astro +35 -0
- package/dist/layouts/BridgeLayout.astro +11 -0
- package/dist/layouts/ContentLayout.astro +24 -0
- package/dist/layouts/MainLayout.astro +203 -0
- package/dist/layouts/NoteLayout.astro +26 -0
- package/dist/layouts/ProfileLayout.astro +81 -0
- package/dist/middleware/starlightRouteData.js +45 -0
- package/dist/pages/404.astro +29 -0
- package/dist/pages/[slug].astro +30 -0
- package/dist/pages/agents/[slug].astro +29 -0
- package/dist/pages/agents/index.astro +27 -0
- package/dist/pages/api/form/submit.js +14 -0
- package/dist/pages/books/[slug].astro +19 -0
- package/dist/pages/books/index.astro +28 -0
- package/dist/pages/contact.astro +27 -0
- package/dist/pages/feed.xml.js +34 -0
- package/dist/pages/index.astro +290 -0
- package/dist/pages/notes/[slug].astro +19 -0
- package/dist/pages/notes/index.astro +21 -0
- package/dist/pages/objectives/[slug].astro +31 -0
- package/dist/pages/objectives/index.astro +30 -0
- package/dist/pages/people/[slug].astro +29 -0
- package/dist/pages/people/index.astro +28 -0
- package/dist/pages/questions/[slug].astro +31 -0
- package/dist/pages/questions/index.astro +30 -0
- package/dist/plugin-default.js +4 -0
- package/dist/plugins/builtin/default-plugin.d.ts +21 -0
- package/dist/plugins/builtin/default-plugin.js +32 -0
- package/dist/plugins/constants.d.ts +21 -0
- package/dist/plugins/constants.js +28 -0
- package/dist/plugins/plugin.d.ts +42 -0
- package/dist/plugins/plugin.js +6 -0
- package/dist/plugins/runtime.d.ts +31 -0
- package/dist/plugins/runtime.js +120 -0
- package/dist/scripts/aggregate-book.js +112 -0
- package/dist/scripts/assert-release-tag-version.js +21 -0
- package/dist/scripts/build-dist.js +384 -0
- package/dist/scripts/build-tenant-worker.js +36 -0
- package/dist/scripts/package-tools.js +88 -0
- package/dist/scripts/patch-starlight-content-path.js +172 -0
- package/dist/scripts/paths.js +11 -0
- package/dist/scripts/publish-package.js +20 -0
- package/dist/scripts/release-verify.js +52 -0
- package/dist/scripts/run-fixture-astro-command.js +21 -0
- package/dist/scripts/tenant-astro-command.js +3 -0
- package/dist/scripts/tenant-build.js +16 -0
- package/dist/scripts/tenant-check.js +7 -0
- package/dist/scripts/test-smoke.js +105 -0
- package/dist/server.js +53 -0
- package/dist/site-resources.d.ts +29 -0
- package/dist/site-resources.js +127 -0
- package/dist/site.js +313 -0
- package/dist/styles/global.css +683 -0
- package/dist/styles/prose.css +89 -0
- package/dist/styles/tokens.css +24 -0
- package/dist/tenant/bridge.js +5 -0
- package/dist/tenant/config.d.ts +9 -0
- package/dist/tenant/config.js +124 -0
- package/dist/tenant/runtime-config.js +20 -0
- package/dist/tsconfigs/strict.json +3 -0
- package/dist/types/agents.d.ts +1 -0
- package/dist/types/agents.js +1 -0
- package/dist/types/astro-build.d.js +0 -0
- package/dist/types/cloudflare-sockets.d.js +0 -0
- package/dist/types/cloudflare.d.ts +1 -0
- package/dist/types/cloudflare.js +1 -0
- package/dist/types/forms.js +4 -0
- package/dist/utils/agents/adapters/execution.js +90 -0
- package/dist/utils/agents/adapters/mutations.js +30 -0
- package/dist/utils/agents/adapters/notification.js +16 -0
- package/dist/utils/agents/adapters/repository.js +61 -0
- package/dist/utils/agents/adapters/research.js +25 -0
- package/dist/utils/agents/adapters/verification.js +62 -0
- package/dist/utils/agents/cli-tools.js +5 -0
- package/dist/utils/agents/contracts/messages.d.ts +88 -0
- package/dist/utils/agents/contracts/messages.js +138 -0
- package/dist/utils/agents/contracts/run.d.ts +20 -0
- package/dist/utils/agents/contracts/run.js +0 -0
- package/dist/utils/agents/runtime-types.d.ts +117 -0
- package/dist/utils/agents/runtime-types.js +4 -0
- package/dist/utils/books-data.js +82 -0
- package/dist/utils/content-status.js +38 -0
- package/dist/utils/forms/config.js +87 -0
- package/dist/utils/forms/constants.js +27 -0
- package/dist/utils/forms/contact-submissions-local.js +19 -0
- package/dist/utils/forms/contact-submissions.js +72 -0
- package/dist/utils/forms/crypto.js +64 -0
- package/dist/utils/forms/guard.js +76 -0
- package/dist/utils/forms/http.js +51 -0
- package/dist/utils/forms/provider-core.js +88 -0
- package/dist/utils/forms/routing-core.js +7 -0
- package/dist/utils/forms/routing.js +13 -0
- package/dist/utils/forms/runtime-core.js +17 -0
- package/dist/utils/forms/runtime.js +27 -0
- package/dist/utils/forms/service-core.js +256 -0
- package/dist/utils/forms/service.js +55 -0
- package/dist/utils/forms/session.js +57 -0
- package/dist/utils/forms/smtp-cloudflare.js +107 -0
- package/dist/utils/forms/smtp-node.js +27 -0
- package/dist/utils/forms/smtp.js +10 -0
- package/dist/utils/forms/subscribers-local.js +21 -0
- package/dist/utils/forms/subscribers.js +53 -0
- package/dist/utils/forms/turnstile.js +31 -0
- package/dist/utils/forms/validation.js +58 -0
- package/dist/utils/hub-content.js +28 -0
- package/dist/utils/plugin-runtime.js +158 -0
- package/dist/utils/routes.js +17 -0
- package/dist/utils/seo.js +4 -0
- package/dist/utils/site-config-schema.js +282 -0
- package/dist/utils/site-config.js +122 -0
- package/dist/utils/starlight-nav.js +62 -0
- package/dist/utils/theme.js +49 -0
- package/dist/vendor/starlight/components/AnchorHeading.astro +53 -0
- package/dist/vendor/starlight/components/Banner.astro +23 -0
- package/dist/vendor/starlight/components/ContentNotice.astro +33 -0
- package/dist/vendor/starlight/components/ContentPanel.astro +27 -0
- package/dist/vendor/starlight/components/DraftContentNotice.astro +5 -0
- package/dist/vendor/starlight/components/EditLink.astro +28 -0
- package/dist/vendor/starlight/components/FallbackContentNotice.astro +5 -0
- package/dist/vendor/starlight/components/Footer.astro +61 -0
- package/dist/vendor/starlight/components/Head.astro +5 -0
- package/dist/vendor/starlight/components/Header.astro +94 -0
- package/dist/vendor/starlight/components/Hero.astro +143 -0
- package/dist/vendor/starlight/components/Icons.js +121 -0
- package/dist/vendor/starlight/components/LanguageSelect.astro +57 -0
- package/dist/vendor/starlight/components/LastUpdated.astro +14 -0
- package/dist/vendor/starlight/components/MarkdownContent.astro +5 -0
- package/dist/vendor/starlight/components/MobileMenuFooter.astro +35 -0
- package/dist/vendor/starlight/components/MobileMenuToggle.astro +107 -0
- package/dist/vendor/starlight/components/MobileTableOfContents.astro +151 -0
- package/dist/vendor/starlight/components/Page.astro +126 -0
- package/dist/vendor/starlight/components/PageFrame.astro +97 -0
- package/dist/vendor/starlight/components/PageSidebar.astro +59 -0
- package/dist/vendor/starlight/components/PageTitle.astro +17 -0
- package/dist/vendor/starlight/components/Pagination.astro +79 -0
- package/dist/vendor/starlight/components/Search.astro +488 -0
- package/dist/vendor/starlight/components/Select.astro +99 -0
- package/dist/vendor/starlight/components/Sidebar.astro +15 -0
- package/dist/vendor/starlight/components/SidebarPersistState.js +43 -0
- package/dist/vendor/starlight/components/SidebarPersister.astro +78 -0
- package/dist/vendor/starlight/components/SidebarRestorePoint.astro +12 -0
- package/dist/vendor/starlight/components/SidebarSublist.astro +154 -0
- package/dist/vendor/starlight/components/SiteTitle.astro +59 -0
- package/dist/vendor/starlight/components/SkipLink.astro +26 -0
- package/dist/vendor/starlight/components/SocialIcons.astro +32 -0
- package/dist/vendor/starlight/components/StarlightPage.astro +17 -0
- package/dist/vendor/starlight/components/TableOfContents/TableOfContentsList.astro +79 -0
- package/dist/vendor/starlight/components/TableOfContents/starlight-toc.js +93 -0
- package/dist/vendor/starlight/components/TableOfContents.astro +18 -0
- package/dist/vendor/starlight/components/ThemeProvider.astro +38 -0
- package/dist/vendor/starlight/components/ThemeSelect.astro +73 -0
- package/dist/vendor/starlight/components/TwoColumnContent.astro +54 -0
- package/dist/vendor/starlight/components.js +26 -0
- package/dist/vendor/starlight/constants.js +4 -0
- package/dist/vendor/starlight/expressive-code.d.js +1 -0
- package/dist/vendor/starlight/global.d.js +0 -0
- package/dist/vendor/starlight/i18n.d.js +1 -0
- package/dist/vendor/starlight/index.js +119 -0
- package/dist/vendor/starlight/integrations/asides-error.js +12 -0
- package/dist/vendor/starlight/integrations/asides.js +179 -0
- package/dist/vendor/starlight/integrations/code-rtl-support.js +21 -0
- package/dist/vendor/starlight/integrations/expressive-code/hast.d.js +1 -0
- package/dist/vendor/starlight/integrations/expressive-code/index.js +63 -0
- package/dist/vendor/starlight/integrations/expressive-code/preprocessor.js +92 -0
- package/dist/vendor/starlight/integrations/expressive-code/themes/night-owl-dark.jsonc +1796 -0
- package/dist/vendor/starlight/integrations/expressive-code/themes/night-owl-dark.jsonc.js +1 -0
- package/dist/vendor/starlight/integrations/expressive-code/themes/night-owl-light.jsonc +1695 -0
- package/dist/vendor/starlight/integrations/expressive-code/themes/night-owl-light.jsonc.js +1 -0
- package/dist/vendor/starlight/integrations/expressive-code/theming.js +62 -0
- package/dist/vendor/starlight/integrations/expressive-code/translations.js +29 -0
- package/dist/vendor/starlight/integrations/heading-links.js +61 -0
- package/dist/vendor/starlight/integrations/pagefind.js +43 -0
- package/dist/vendor/starlight/integrations/remark-rehype.js +68 -0
- package/dist/vendor/starlight/integrations/shared/absolutePathToLang.js +15 -0
- package/dist/vendor/starlight/integrations/shared/localeToLang.js +9 -0
- package/dist/vendor/starlight/integrations/shared/slugToLocale.js +10 -0
- package/dist/vendor/starlight/integrations/sitemap.js +20 -0
- package/dist/vendor/starlight/integrations/virtual-user-config.js +110 -0
- package/dist/vendor/starlight/integrations/vite-layer-order.js +42 -0
- package/dist/vendor/starlight/internal.js +6 -0
- package/dist/vendor/starlight/loaders.js +36 -0
- package/dist/vendor/starlight/locals.d.js +0 -0
- package/dist/vendor/starlight/locals.js +30 -0
- package/dist/vendor/starlight/package.json +231 -0
- package/dist/vendor/starlight/package.json.js +248 -0
- package/dist/vendor/starlight/props.js +0 -0
- package/dist/vendor/starlight/route-data.js +6 -0
- package/dist/vendor/starlight/routes/common.astro +23 -0
- package/dist/vendor/starlight/routes/ssr/404.astro +7 -0
- package/dist/vendor/starlight/routes/ssr/index.astro +14 -0
- package/dist/vendor/starlight/routes/static/404.astro +7 -0
- package/dist/vendor/starlight/routes/static/index.astro +12 -0
- package/dist/vendor/starlight/schema.js +102 -0
- package/dist/vendor/starlight/schemas/badge.js +26 -0
- package/dist/vendor/starlight/schemas/components.js +235 -0
- package/dist/vendor/starlight/schemas/expressiveCode.js +12 -0
- package/dist/vendor/starlight/schemas/favicon.js +33 -0
- package/dist/vendor/starlight/schemas/head.js +32 -0
- package/dist/vendor/starlight/schemas/hero.js +57 -0
- package/dist/vendor/starlight/schemas/i18n.js +101 -0
- package/dist/vendor/starlight/schemas/icon.js +7 -0
- package/dist/vendor/starlight/schemas/logo.js +24 -0
- package/dist/vendor/starlight/schemas/pagefind.js +108 -0
- package/dist/vendor/starlight/schemas/prevNextLink.js +14 -0
- package/dist/vendor/starlight/schemas/sidebar.js +80 -0
- package/dist/vendor/starlight/schemas/site-title.js +19 -0
- package/dist/vendor/starlight/schemas/social.js +19 -0
- package/dist/vendor/starlight/schemas/tableOfContents.js +16 -0
- package/dist/vendor/starlight/style/anchor-links.css +131 -0
- package/dist/vendor/starlight/style/asides.css +51 -0
- package/dist/vendor/starlight/style/layers.css +1 -0
- package/dist/vendor/starlight/style/markdown.css +253 -0
- package/dist/vendor/starlight/style/print.css +175 -0
- package/dist/vendor/starlight/style/props.css +188 -0
- package/dist/vendor/starlight/style/reset.css +52 -0
- package/dist/vendor/starlight/style/util.css +63 -0
- package/dist/vendor/starlight/translations/ar.json +30 -0
- package/dist/vendor/starlight/translations/ar.json.js +32 -0
- package/dist/vendor/starlight/translations/ca.json +43 -0
- package/dist/vendor/starlight/translations/ca.json.js +45 -0
- package/dist/vendor/starlight/translations/cs.json +43 -0
- package/dist/vendor/starlight/translations/cs.json.js +45 -0
- package/dist/vendor/starlight/translations/da.json +30 -0
- package/dist/vendor/starlight/translations/da.json.js +32 -0
- package/dist/vendor/starlight/translations/de.json +30 -0
- package/dist/vendor/starlight/translations/de.json.js +32 -0
- package/dist/vendor/starlight/translations/el.json +30 -0
- package/dist/vendor/starlight/translations/el.json.js +32 -0
- package/dist/vendor/starlight/translations/en.json +30 -0
- package/dist/vendor/starlight/translations/en.json.js +32 -0
- package/dist/vendor/starlight/translations/es.json +43 -0
- package/dist/vendor/starlight/translations/es.json.js +45 -0
- package/dist/vendor/starlight/translations/fa.json +30 -0
- package/dist/vendor/starlight/translations/fa.json.js +32 -0
- package/dist/vendor/starlight/translations/fi.json +30 -0
- package/dist/vendor/starlight/translations/fi.json.js +32 -0
- package/dist/vendor/starlight/translations/fr.json +33 -0
- package/dist/vendor/starlight/translations/fr.json.js +35 -0
- package/dist/vendor/starlight/translations/gl.json +43 -0
- package/dist/vendor/starlight/translations/gl.json.js +45 -0
- package/dist/vendor/starlight/translations/he.json +30 -0
- package/dist/vendor/starlight/translations/he.json.js +32 -0
- package/dist/vendor/starlight/translations/hi.json +30 -0
- package/dist/vendor/starlight/translations/hi.json.js +32 -0
- package/dist/vendor/starlight/translations/hu.json +43 -0
- package/dist/vendor/starlight/translations/hu.json.js +45 -0
- package/dist/vendor/starlight/translations/id.json +30 -0
- package/dist/vendor/starlight/translations/id.json.js +32 -0
- package/dist/vendor/starlight/translations/index.js +77 -0
- package/dist/vendor/starlight/translations/it.json +30 -0
- package/dist/vendor/starlight/translations/it.json.js +32 -0
- package/dist/vendor/starlight/translations/ja.json +30 -0
- package/dist/vendor/starlight/translations/ja.json.js +32 -0
- package/dist/vendor/starlight/translations/ko.json +30 -0
- package/dist/vendor/starlight/translations/ko.json.js +32 -0
- package/dist/vendor/starlight/translations/lv.json +30 -0
- package/dist/vendor/starlight/translations/lv.json.js +32 -0
- package/dist/vendor/starlight/translations/nb.json +30 -0
- package/dist/vendor/starlight/translations/nb.json.js +32 -0
- package/dist/vendor/starlight/translations/nl.json +30 -0
- package/dist/vendor/starlight/translations/nl.json.js +32 -0
- package/dist/vendor/starlight/translations/pl.json +33 -0
- package/dist/vendor/starlight/translations/pl.json.js +35 -0
- package/dist/vendor/starlight/translations/pt.json +30 -0
- package/dist/vendor/starlight/translations/pt.json.js +32 -0
- package/dist/vendor/starlight/translations/ro.json +30 -0
- package/dist/vendor/starlight/translations/ro.json.js +32 -0
- package/dist/vendor/starlight/translations/ru.json +33 -0
- package/dist/vendor/starlight/translations/ru.json.js +35 -0
- package/dist/vendor/starlight/translations/sk.json +30 -0
- package/dist/vendor/starlight/translations/sk.json.js +32 -0
- package/dist/vendor/starlight/translations/sv.json +30 -0
- package/dist/vendor/starlight/translations/sv.json.js +32 -0
- package/dist/vendor/starlight/translations/th.json +30 -0
- package/dist/vendor/starlight/translations/th.json.js +32 -0
- package/dist/vendor/starlight/translations/tr.json +30 -0
- package/dist/vendor/starlight/translations/tr.json.js +32 -0
- package/dist/vendor/starlight/translations/uk.json +30 -0
- package/dist/vendor/starlight/translations/uk.json.js +32 -0
- package/dist/vendor/starlight/translations/vi.json +30 -0
- package/dist/vendor/starlight/translations/vi.json.js +32 -0
- package/dist/vendor/starlight/translations/zh-CN.json +30 -0
- package/dist/vendor/starlight/translations/zh-CN.json.js +32 -0
- package/dist/vendor/starlight/translations/zh-TW.json +30 -0
- package/dist/vendor/starlight/translations/zh-TW.json.js +32 -0
- package/dist/vendor/starlight/types.js +0 -0
- package/dist/vendor/starlight/user-components/Aside.astro +40 -0
- package/dist/vendor/starlight/user-components/Badge.astro +148 -0
- package/dist/vendor/starlight/user-components/Card.astro +68 -0
- package/dist/vendor/starlight/user-components/CardGrid.astro +38 -0
- package/dist/vendor/starlight/user-components/FileTree.astro +137 -0
- package/dist/vendor/starlight/user-components/Icon.astro +42 -0
- package/dist/vendor/starlight/user-components/LinkButton.astro +78 -0
- package/dist/vendor/starlight/user-components/LinkCard.astro +78 -0
- package/dist/vendor/starlight/user-components/Steps.astro +90 -0
- package/dist/vendor/starlight/user-components/TabItem.astro +19 -0
- package/dist/vendor/starlight/user-components/Tabs.astro +268 -0
- package/dist/vendor/starlight/user-components/file-tree-icons.js +608 -0
- package/dist/vendor/starlight/user-components/rehype-file-tree.js +160 -0
- package/dist/vendor/starlight/user-components/rehype-steps.js +53 -0
- package/dist/vendor/starlight/user-components/rehype-tabs.js +73 -0
- package/dist/vendor/starlight/utils/base.js +14 -0
- package/dist/vendor/starlight/utils/canonical.js +13 -0
- package/dist/vendor/starlight/utils/collection-fs.js +13 -0
- package/dist/vendor/starlight/utils/collection.js +16 -0
- package/dist/vendor/starlight/utils/createPathFormatter.js +39 -0
- package/dist/vendor/starlight/utils/createTranslationSystem.js +60 -0
- package/dist/vendor/starlight/utils/error-map.js +110 -0
- package/dist/vendor/starlight/utils/format-path.js +9 -0
- package/dist/vendor/starlight/utils/generateToC.js +18 -0
- package/dist/vendor/starlight/utils/git.js +92 -0
- package/dist/vendor/starlight/utils/gitInlined.js +13 -0
- package/dist/vendor/starlight/utils/head.js +156 -0
- package/dist/vendor/starlight/utils/i18n.js +121 -0
- package/dist/vendor/starlight/utils/localizedUrl.js +37 -0
- package/dist/vendor/starlight/utils/navigation.js +320 -0
- package/dist/vendor/starlight/utils/path.js +52 -0
- package/dist/vendor/starlight/utils/plugins.js +355 -0
- package/dist/vendor/starlight/utils/routing/data.js +116 -0
- package/dist/vendor/starlight/utils/routing/index.js +107 -0
- package/dist/vendor/starlight/utils/routing/middleware.js +40 -0
- package/dist/vendor/starlight/utils/routing/types.js +0 -0
- package/dist/vendor/starlight/utils/routing.js +1 -0
- package/dist/vendor/starlight/utils/slugs.js +70 -0
- package/dist/vendor/starlight/utils/starlight-page.js +123 -0
- package/dist/vendor/starlight/utils/translations-fs.js +31 -0
- package/dist/vendor/starlight/utils/translations.js +31 -0
- package/dist/vendor/starlight/utils/types.js +0 -0
- package/dist/vendor/starlight/utils/url.js +5 -0
- package/dist/vendor/starlight/utils/user-config.js +255 -0
- package/dist/vendor/starlight/utils/validateLogoImports.js +22 -0
- package/dist/vendor/starlight/virtual-internal.d.js +0 -0
- package/dist/vendor/starlight/virtual.d.js +0 -0
- package/dist/worker/forms-worker.js +141 -0
- package/package.json +156 -0
- package/style/anchor-links.css +131 -0
- package/templates/github/deploy.workflow.yml +47 -0
- package/tsconfigs/strict.json +3 -0
- package/utils/git.ts +121 -0
- package/utils/gitInlined.ts +20 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
---
|
|
2
|
+
import EditLink from '../../vendor/starlight/components/EditLink.astro';
|
|
3
|
+
import LastUpdated from '../../vendor/starlight/components/LastUpdated.astro';
|
|
4
|
+
import Pagination from '../../vendor/starlight/components/Pagination.astro';
|
|
5
|
+
import config from 'virtual:starlight/user-config';
|
|
6
|
+
import FooterSubscribeForm from '../forms/FooterSubscribeForm.astro';
|
|
7
|
+
import DevWatchReload from '../DevWatchReload.astro';
|
|
8
|
+
import { PROJECT_STAGE } from '../../utils/content-status';
|
|
9
|
+
import { SITE } from '../../utils/seo';
|
|
10
|
+
import { SITE_FOOTER_MENU } from '../../utils/site-config';
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<div class="docs-footer-shell">
|
|
14
|
+
<div class="docs-footer-page-band">
|
|
15
|
+
<div class="docs-footer-page-inner">
|
|
16
|
+
<div class="docs-footer-page-meta">
|
|
17
|
+
<EditLink />
|
|
18
|
+
<LastUpdated />
|
|
19
|
+
</div>
|
|
20
|
+
<Pagination />
|
|
21
|
+
{
|
|
22
|
+
config.credits && (
|
|
23
|
+
<p class="docs-footer-credits">
|
|
24
|
+
Built with <a href="https://starlight.astro.build">Starlight</a>
|
|
25
|
+
</p>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<footer class="docs-site-footer">
|
|
32
|
+
<div class="docs-site-footer-inner">
|
|
33
|
+
<div class="docs-footer-grid">
|
|
34
|
+
<div class="docs-footer-column">
|
|
35
|
+
<p class="docs-footer-title">{SITE.name}</p>
|
|
36
|
+
<p class="docs-footer-copy">{SITE.summary}</p>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="docs-footer-column">
|
|
39
|
+
<p class="docs-footer-heading">Project stage</p>
|
|
40
|
+
<p class="docs-footer-column-title">{PROJECT_STAGE.label}</p>
|
|
41
|
+
<p class="docs-footer-copy">{PROJECT_STAGE.description}</p>
|
|
42
|
+
</div>
|
|
43
|
+
{SITE_FOOTER_MENU.map((group) => (
|
|
44
|
+
<div class="docs-footer-column">
|
|
45
|
+
<p class="docs-footer-heading">{group.label}</p>
|
|
46
|
+
<div class="docs-footer-links">
|
|
47
|
+
{group.items.map((item) => (
|
|
48
|
+
<a href={item.href}>{item.label}</a>
|
|
49
|
+
))}
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
))}
|
|
53
|
+
</div>
|
|
54
|
+
<FooterSubscribeForm currentPath={Astro.url.pathname} />
|
|
55
|
+
</div>
|
|
56
|
+
</footer>
|
|
57
|
+
<DevWatchReload />
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<style>
|
|
61
|
+
@layer starlight.core {
|
|
62
|
+
.docs-footer-shell {
|
|
63
|
+
margin-top: 4rem;
|
|
64
|
+
width: 100%;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.docs-footer-page-inner,
|
|
68
|
+
.docs-site-footer-inner {
|
|
69
|
+
width: min(100%, var(--site-max));
|
|
70
|
+
margin-inline: auto;
|
|
71
|
+
padding-inline: 1rem;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.docs-footer-page-band {
|
|
75
|
+
padding-bottom: 2.5rem;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.docs-footer-page-inner {
|
|
79
|
+
display: grid;
|
|
80
|
+
gap: 1.5rem;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:global(:root[data-docs-book-page='true']) .docs-footer-page-inner {
|
|
84
|
+
max-width: var(--docs-book-panel-width);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:global(:root[data-docs-book-page='true']) .docs-footer-page-inner .pagination-links > :only-child {
|
|
88
|
+
max-width: min(28rem, 100%);
|
|
89
|
+
margin-inline: auto;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.docs-footer-page-meta {
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-wrap: wrap;
|
|
95
|
+
gap: 0.75rem 3rem;
|
|
96
|
+
justify-content: space-between;
|
|
97
|
+
margin-top: 3rem;
|
|
98
|
+
font-size: var(--sl-text-sm);
|
|
99
|
+
color: var(--sl-color-gray-3);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.docs-footer-page-meta :global(p:only-child) {
|
|
103
|
+
margin-inline-start: auto;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.docs-footer-credits {
|
|
107
|
+
margin: 0 auto;
|
|
108
|
+
font-size: var(--sl-text-xs);
|
|
109
|
+
color: var(--sl-color-gray-3);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.docs-footer-credits a {
|
|
113
|
+
color: inherit;
|
|
114
|
+
text-decoration: none;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.docs-footer-credits a:hover,
|
|
118
|
+
.docs-footer-credits a:focus-visible {
|
|
119
|
+
color: var(--sl-color-white);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.docs-site-footer {
|
|
123
|
+
margin-top: 0;
|
|
124
|
+
border-top: 2px solid var(--site-border-strong);
|
|
125
|
+
padding-top: 2rem;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.docs-site-footer-inner {
|
|
129
|
+
padding-bottom: 3.75rem;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.docs-footer-grid {
|
|
133
|
+
display: flex;
|
|
134
|
+
flex-wrap: wrap;
|
|
135
|
+
justify-content: center;
|
|
136
|
+
gap: 2rem;
|
|
137
|
+
padding-bottom: 2rem;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.docs-footer-column {
|
|
141
|
+
width: 16rem;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.docs-footer-heading {
|
|
145
|
+
font-size: var(--sl-text-sm);
|
|
146
|
+
font-weight: 600;
|
|
147
|
+
letter-spacing: 0.16em;
|
|
148
|
+
text-transform: uppercase;
|
|
149
|
+
color: var(--site-blue-strong);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.docs-footer-title,
|
|
153
|
+
.docs-footer-column-title {
|
|
154
|
+
font-size: 1.25rem;
|
|
155
|
+
font-weight: 700;
|
|
156
|
+
color: var(--site-text);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.docs-footer-copy,
|
|
160
|
+
.docs-footer-links {
|
|
161
|
+
margin-top: 0.75rem;
|
|
162
|
+
font-size: 1rem;
|
|
163
|
+
line-height: 2;
|
|
164
|
+
color: var(--site-text-muted);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.docs-footer-links {
|
|
168
|
+
display: flex;
|
|
169
|
+
flex-direction: column;
|
|
170
|
+
gap: 0.5rem;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.docs-footer-links a {
|
|
174
|
+
text-decoration: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.docs-footer-links a:hover,
|
|
178
|
+
.docs-footer-links a:focus-visible {
|
|
179
|
+
color: var(--site-text);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
@media (min-width: 40rem) {
|
|
183
|
+
.docs-footer-page-inner,
|
|
184
|
+
.docs-site-footer-inner {
|
|
185
|
+
padding-inline: 1.5rem;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
@media (min-width: 64rem) {
|
|
190
|
+
.docs-footer-page-inner,
|
|
191
|
+
.docs-site-footer-inner {
|
|
192
|
+
padding-inline: 2rem;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
</style>
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
---
|
|
2
|
+
import config from 'virtual:starlight/user-config';
|
|
3
|
+
|
|
4
|
+
import LanguageSelect from '../../vendor/starlight/components/LanguageSelect.astro';
|
|
5
|
+
import Search from '../../vendor/starlight/components/Search.astro';
|
|
6
|
+
import SiteTitle from '../../vendor/starlight/components/SiteTitle.astro';
|
|
7
|
+
import SocialIcons from '../../vendor/starlight/components/SocialIcons.astro';
|
|
8
|
+
import DesktopSidebarToggle from './DesktopSidebarToggle.astro';
|
|
9
|
+
import BookFontControls from './BookFontControls.astro';
|
|
10
|
+
import DownloadBook from './DownloadBook.astro';
|
|
11
|
+
import { SITE } from '../../utils/seo';
|
|
12
|
+
|
|
13
|
+
const shouldRenderSearch =
|
|
14
|
+
config.pagefind || config.components.Search !== '../../vendor/starlight/components/Search.astro';
|
|
15
|
+
const { hasSidebar, toc } = Astro.locals.starlightRoute;
|
|
16
|
+
const hasToc = Boolean(toc);
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
<div class="header">
|
|
20
|
+
<div class="title-wrapper sl-flex">
|
|
21
|
+
<SiteTitle />
|
|
22
|
+
</div>
|
|
23
|
+
<div class="sl-hidden md:sl-flex print:hidden right-group">
|
|
24
|
+
<div class="desktop-sidebar-toggles" aria-label="Reading controls">
|
|
25
|
+
{hasSidebar && <DesktopSidebarToggle side="left" label="book contents" />}
|
|
26
|
+
{hasToc && <DesktopSidebarToggle side="right" label="page contents" />}
|
|
27
|
+
</div>
|
|
28
|
+
<BookFontControls />
|
|
29
|
+
{shouldRenderSearch && <Search class="docs-header-search" />}
|
|
30
|
+
<DownloadBook />
|
|
31
|
+
<div class="sl-flex social-icons">
|
|
32
|
+
<SocialIcons />
|
|
33
|
+
<a href="/contact/" aria-label={`Contact ${SITE.name}`} class="contact-icon">
|
|
34
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true">
|
|
35
|
+
<path d="M3.75 6.75h16.5v10.5H3.75z" />
|
|
36
|
+
<path d="m4.5 7.5 7.5 6 7.5-6" />
|
|
37
|
+
</svg>
|
|
38
|
+
</a>
|
|
39
|
+
</div>
|
|
40
|
+
<LanguageSelect />
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<style>
|
|
45
|
+
@layer starlight.core {
|
|
46
|
+
.header {
|
|
47
|
+
display: flex;
|
|
48
|
+
gap: var(--sl-nav-gap);
|
|
49
|
+
justify-content: space-between;
|
|
50
|
+
align-items: center;
|
|
51
|
+
height: 100%;
|
|
52
|
+
width: 100%;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.title-wrapper {
|
|
56
|
+
overflow: clip;
|
|
57
|
+
padding: 0.25rem;
|
|
58
|
+
margin: -0.25rem;
|
|
59
|
+
min-width: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.right-group,
|
|
63
|
+
.social-icons {
|
|
64
|
+
align-items: center;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.right-group {
|
|
68
|
+
margin-inline-start: auto;
|
|
69
|
+
gap: 1.25rem;
|
|
70
|
+
min-width: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.desktop-sidebar-toggles {
|
|
74
|
+
display: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.social-icons {
|
|
78
|
+
gap: 1rem;
|
|
79
|
+
flex: 0 0 auto;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.social-icons :global(a) {
|
|
83
|
+
display: inline-flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
padding: 0.5rem;
|
|
87
|
+
margin: 0;
|
|
88
|
+
flex: 0 0 auto;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.contact-icon {
|
|
92
|
+
display: inline-flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
width: 2rem;
|
|
96
|
+
height: 2rem;
|
|
97
|
+
color: var(--sl-color-text);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.contact-icon:hover,
|
|
101
|
+
.contact-icon:focus-visible {
|
|
102
|
+
color: var(--sl-color-text-accent);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.contact-icon svg {
|
|
106
|
+
width: 1.25rem;
|
|
107
|
+
height: 1.25rem;
|
|
108
|
+
fill: none;
|
|
109
|
+
stroke: currentColor;
|
|
110
|
+
stroke-width: 1.8;
|
|
111
|
+
stroke-linecap: round;
|
|
112
|
+
stroke-linejoin: round;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.social-icons::before {
|
|
116
|
+
content: '';
|
|
117
|
+
height: 2rem;
|
|
118
|
+
border-inline-start: 1px solid var(--sl-color-gray-5);
|
|
119
|
+
margin-inline-end: 0.25rem;
|
|
120
|
+
flex: 0 0 auto;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:global(.docs-header-search) {
|
|
124
|
+
margin-inline-start: auto;
|
|
125
|
+
flex: 1 1 22rem;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@media (min-width: 50rem) {
|
|
129
|
+
:global(:root[data-has-sidebar]) {
|
|
130
|
+
--__sidebar-pad: calc(2 * var(--sl-nav-pad-x));
|
|
131
|
+
}
|
|
132
|
+
:global(:root:not([data-has-toc])) {
|
|
133
|
+
--__toc-width: 0rem;
|
|
134
|
+
}
|
|
135
|
+
.header {
|
|
136
|
+
display: grid;
|
|
137
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
138
|
+
align-content: center;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@media (min-width: 72rem) {
|
|
143
|
+
.desktop-sidebar-toggles {
|
|
144
|
+
display: inline-flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
gap: 0.65rem;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
</style>
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
---
|
|
2
|
+
import MobileMenuToggle from '../../vendor/starlight/components/MobileMenuToggle.astro';
|
|
3
|
+
import { getBookForPath } from '../../utils/starlight-nav';
|
|
4
|
+
|
|
5
|
+
const { hasSidebar, toc } = Astro.locals.starlightRoute;
|
|
6
|
+
const hasToc = Boolean(toc);
|
|
7
|
+
const isBookPage = Boolean(getBookForPath(Astro.url.pathname));
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<div class:list={['page sl-flex', isBookPage && 'page--book']}>
|
|
11
|
+
<header class="header"><slot name="header" /></header>
|
|
12
|
+
{
|
|
13
|
+
hasSidebar && (
|
|
14
|
+
<nav class="sidebar print:hidden" aria-label={Astro.locals.t('sidebarNav.accessibleLabel')}>
|
|
15
|
+
<MobileMenuToggle />
|
|
16
|
+
<div id="starlight__sidebar" class="sidebar-pane docs-left-sidebar">
|
|
17
|
+
<div class="sidebar-content sl-flex">
|
|
18
|
+
<slot name="sidebar" />
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</nav>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
<div class="main-frame"><slot /></div>
|
|
25
|
+
<div class="docs-footer-host" data-docs-footer-host></div>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<script is:inline define:vars={{ hasSidebar, hasToc, isBookPage }}>
|
|
29
|
+
const desktopQuery = window.matchMedia('(min-width: 72rem)');
|
|
30
|
+
const storageKey = 'docs.desktop-sidebar-state';
|
|
31
|
+
const bookFontScaleStorageKey = 'docs.book-font-scale';
|
|
32
|
+
const defaultBookFontScale = 1;
|
|
33
|
+
const minBookFontScale = 0.85;
|
|
34
|
+
const maxBookFontScale = 1.35;
|
|
35
|
+
const root = document.documentElement;
|
|
36
|
+
const leftSidebar = document.getElementById('starlight__sidebar');
|
|
37
|
+
const rightSidebar = document.getElementById('starlight__page-toc');
|
|
38
|
+
const pageFrame = document.querySelector('.page');
|
|
39
|
+
const footerHost = document.querySelector('[data-docs-footer-host]');
|
|
40
|
+
|
|
41
|
+
const getDefaultState = () => ({
|
|
42
|
+
left: !hasSidebar,
|
|
43
|
+
right: !hasToc,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const readState = () => {
|
|
47
|
+
try {
|
|
48
|
+
const parsed = JSON.parse(localStorage.getItem(storageKey) || '{}');
|
|
49
|
+
return {
|
|
50
|
+
left: hasSidebar ? parsed.left === true : true,
|
|
51
|
+
right: hasToc ? parsed.right === true : true,
|
|
52
|
+
};
|
|
53
|
+
} catch {
|
|
54
|
+
return getDefaultState();
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const writeState = (state) => {
|
|
59
|
+
try {
|
|
60
|
+
localStorage.setItem(storageKey, JSON.stringify(state));
|
|
61
|
+
} catch {
|
|
62
|
+
// Ignore storage failures and keep the UI functional.
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const syncFooterOffset = () => {
|
|
67
|
+
if (!(footerHost instanceof HTMLElement) || !desktopQuery.matches) {
|
|
68
|
+
root.style.setProperty('--docs-footer-offset', '0px');
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const footerTop = footerHost.getBoundingClientRect().top;
|
|
73
|
+
const offset = Math.max(0, window.innerHeight - footerTop);
|
|
74
|
+
root.style.setProperty('--docs-footer-offset', `${offset}px`);
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const clampBookFontScale = (value) =>
|
|
78
|
+
Math.min(maxBookFontScale, Math.max(minBookFontScale, value));
|
|
79
|
+
|
|
80
|
+
const readBookFontScale = () => {
|
|
81
|
+
try {
|
|
82
|
+
const rawValue = localStorage.getItem(bookFontScaleStorageKey);
|
|
83
|
+
const parsedValue = rawValue === null ? defaultBookFontScale : Number(rawValue);
|
|
84
|
+
return Number.isFinite(parsedValue) ? clampBookFontScale(parsedValue) : defaultBookFontScale;
|
|
85
|
+
} catch {
|
|
86
|
+
return defaultBookFontScale;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const applyBookFontState = () => {
|
|
91
|
+
root.dataset.docsBookPage = String(isBookPage);
|
|
92
|
+
if (!isBookPage) {
|
|
93
|
+
root.style.removeProperty('--docs-book-font-scale');
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
root.style.setProperty('--docs-book-font-scale', String(readBookFontScale()));
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const setExpanded = (side, expanded) => {
|
|
101
|
+
root.dataset[`docs${side === 'left' ? 'Left' : 'Right'}SidebarExpanded`] = String(expanded);
|
|
102
|
+
const toggle = document.querySelector(`[data-docs-sidebar-toggle="${side}"]`);
|
|
103
|
+
if (toggle instanceof HTMLButtonElement) {
|
|
104
|
+
toggle.setAttribute('aria-expanded', String(expanded));
|
|
105
|
+
const label = toggle.dataset.label || '';
|
|
106
|
+
toggle.setAttribute('aria-label', `${expanded ? 'Hide' : 'Show'} ${label}`);
|
|
107
|
+
const text = toggle.querySelector('.desktop-sidebar-toggle__text');
|
|
108
|
+
if (text) {
|
|
109
|
+
text.textContent = `${expanded ? 'Hide' : 'Show'} ${label}`;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
const syncAccessibility = () => {
|
|
115
|
+
const desktop = desktopQuery.matches;
|
|
116
|
+
const leftExpanded = root.dataset.docsLeftSidebarExpanded === 'true';
|
|
117
|
+
const rightExpanded = root.dataset.docsRightSidebarExpanded === 'true';
|
|
118
|
+
|
|
119
|
+
if (leftSidebar) {
|
|
120
|
+
leftSidebar.toggleAttribute('inert', desktop && !leftExpanded);
|
|
121
|
+
leftSidebar.setAttribute('aria-hidden', String(desktop && !leftExpanded));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (rightSidebar) {
|
|
125
|
+
rightSidebar.toggleAttribute('inert', desktop && !rightExpanded);
|
|
126
|
+
rightSidebar.setAttribute('aria-hidden', String(desktop && !rightExpanded));
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const applyState = (state) => {
|
|
131
|
+
setExpanded('left', hasSidebar ? state.left : false);
|
|
132
|
+
setExpanded('right', hasToc ? state.right : false);
|
|
133
|
+
syncAccessibility();
|
|
134
|
+
syncFooterOffset();
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
const toggleSide = (side) => {
|
|
138
|
+
const current =
|
|
139
|
+
root.dataset[`docs${side === 'left' ? 'Left' : 'Right'}SidebarExpanded`] === 'true';
|
|
140
|
+
const nextState = {
|
|
141
|
+
left: root.dataset.docsLeftSidebarExpanded === 'true',
|
|
142
|
+
right: root.dataset.docsRightSidebarExpanded === 'true',
|
|
143
|
+
[side]: !current,
|
|
144
|
+
};
|
|
145
|
+
applyState(nextState);
|
|
146
|
+
writeState(nextState);
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
const initialize = () => {
|
|
150
|
+
applyBookFontState();
|
|
151
|
+
const state = readState();
|
|
152
|
+
applyState(state);
|
|
153
|
+
|
|
154
|
+
if (pageFrame instanceof HTMLElement && footerHost instanceof HTMLElement) {
|
|
155
|
+
const footerShell = pageFrame.querySelector('.docs-footer-shell');
|
|
156
|
+
if (footerShell instanceof HTMLElement && footerShell.parentElement !== footerHost) {
|
|
157
|
+
footerHost.append(footerShell);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
syncFooterOffset();
|
|
162
|
+
|
|
163
|
+
for (const button of document.querySelectorAll('[data-docs-sidebar-toggle]')) {
|
|
164
|
+
if (!(button instanceof HTMLButtonElement) || button.dataset.docsSidebarBound === 'true') continue;
|
|
165
|
+
button.dataset.docsSidebarBound = 'true';
|
|
166
|
+
button.addEventListener('click', () => {
|
|
167
|
+
const side = button.dataset.docsSidebarToggle;
|
|
168
|
+
if (side === 'left' || side === 'right') {
|
|
169
|
+
toggleSide(side);
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
initialize();
|
|
176
|
+
desktopQuery.addEventListener('change', syncAccessibility);
|
|
177
|
+
desktopQuery.addEventListener('change', syncFooterOffset);
|
|
178
|
+
window.addEventListener('scroll', syncFooterOffset, { passive: true });
|
|
179
|
+
window.addEventListener('resize', syncFooterOffset);
|
|
180
|
+
</script>
|
|
181
|
+
|
|
182
|
+
<style>
|
|
183
|
+
@layer starlight.core {
|
|
184
|
+
.page {
|
|
185
|
+
flex-direction: column;
|
|
186
|
+
min-height: 100vh;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.header {
|
|
190
|
+
z-index: var(--sl-z-index-navbar);
|
|
191
|
+
position: fixed;
|
|
192
|
+
inset-inline-start: 0;
|
|
193
|
+
inset-block-start: 0;
|
|
194
|
+
width: 100%;
|
|
195
|
+
height: var(--sl-nav-height);
|
|
196
|
+
border-bottom: 1px solid var(--sl-color-hairline-shade);
|
|
197
|
+
padding: var(--sl-nav-pad-y) var(--sl-nav-pad-x);
|
|
198
|
+
padding-inline-end: var(--sl-nav-pad-x);
|
|
199
|
+
background-color: var(--sl-color-bg-nav);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
:global([data-has-sidebar]) .header {
|
|
203
|
+
padding-inline-end: calc(
|
|
204
|
+
var(--sl-nav-gap) + var(--sl-nav-pad-x) + var(--sl-menu-button-size)
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.sidebar-pane {
|
|
209
|
+
visibility: var(--sl-sidebar-visibility, hidden);
|
|
210
|
+
position: fixed;
|
|
211
|
+
z-index: var(--sl-z-index-menu);
|
|
212
|
+
inset-block: var(--sl-nav-height) var(--docs-footer-offset, 0px);
|
|
213
|
+
inset-inline-start: 0;
|
|
214
|
+
width: 100%;
|
|
215
|
+
background-color: var(--sl-color-black);
|
|
216
|
+
overflow-y: auto;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
:global([aria-expanded='true']) ~ .sidebar-pane {
|
|
220
|
+
--sl-sidebar-visibility: visible;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.sidebar-content {
|
|
224
|
+
height: 100%;
|
|
225
|
+
min-height: max-content;
|
|
226
|
+
padding: 1rem var(--sl-sidebar-pad-x) 0;
|
|
227
|
+
flex-direction: column;
|
|
228
|
+
gap: 1rem;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@media (min-width: 50rem) {
|
|
232
|
+
.sidebar-content::after {
|
|
233
|
+
content: '';
|
|
234
|
+
padding-bottom: 1px;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.main-frame {
|
|
239
|
+
padding-top: calc(var(--sl-nav-height) + var(--sl-mobile-toc-height));
|
|
240
|
+
padding-inline-start: var(--sl-content-inline-start);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.docs-footer-host {
|
|
244
|
+
width: 100%;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
@media (min-width: 50rem) {
|
|
248
|
+
:global([data-has-sidebar]) .header {
|
|
249
|
+
padding-inline-end: var(--sl-nav-pad-x);
|
|
250
|
+
}
|
|
251
|
+
.sidebar-pane {
|
|
252
|
+
--sl-sidebar-visibility: visible;
|
|
253
|
+
width: var(--sl-sidebar-width);
|
|
254
|
+
background-color: var(--sl-color-bg-sidebar);
|
|
255
|
+
border-inline-end: 1px solid var(--sl-color-hairline-shade);
|
|
256
|
+
overflow-y: auto;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
</style>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
import MobileTableOfContents from '../../vendor/starlight/components/MobileTableOfContents.astro';
|
|
3
|
+
import TableOfContents from '../../vendor/starlight/components/TableOfContents.astro';
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
{
|
|
7
|
+
Astro.locals.starlightRoute.toc && (
|
|
8
|
+
<>
|
|
9
|
+
<div class="lg:sl-hidden">
|
|
10
|
+
<MobileTableOfContents />
|
|
11
|
+
</div>
|
|
12
|
+
<aside
|
|
13
|
+
id="starlight__page-toc"
|
|
14
|
+
class="right-sidebar-panel sl-hidden lg:sl-block"
|
|
15
|
+
aria-label={Astro.locals.t('tableOfContents.onThisPage')}
|
|
16
|
+
>
|
|
17
|
+
<div class="sl-container">
|
|
18
|
+
<TableOfContents />
|
|
19
|
+
</div>
|
|
20
|
+
</aside>
|
|
21
|
+
</>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
<style>
|
|
26
|
+
@layer starlight.core {
|
|
27
|
+
.right-sidebar-panel {
|
|
28
|
+
padding: 1rem var(--sl-sidebar-pad-x);
|
|
29
|
+
}
|
|
30
|
+
.sl-container {
|
|
31
|
+
width: calc(var(--sl-sidebar-width) - 2 * var(--sl-sidebar-pad-x));
|
|
32
|
+
}
|
|
33
|
+
.right-sidebar-panel :global(h2) {
|
|
34
|
+
color: var(--sl-color-white);
|
|
35
|
+
font-size: var(--sl-text-h5);
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
line-height: var(--sl-line-height-headings);
|
|
38
|
+
margin-bottom: 0.5rem;
|
|
39
|
+
}
|
|
40
|
+
.right-sidebar-panel :global(:where(a)) {
|
|
41
|
+
display: block;
|
|
42
|
+
font-size: var(--sl-text-xs);
|
|
43
|
+
text-decoration: none;
|
|
44
|
+
color: var(--sl-color-gray-3);
|
|
45
|
+
overflow-wrap: anywhere;
|
|
46
|
+
}
|
|
47
|
+
.right-sidebar-panel :global(:where(a):hover) {
|
|
48
|
+
color: var(--sl-color-white);
|
|
49
|
+
}
|
|
50
|
+
@media (min-width: 72rem) {
|
|
51
|
+
.sl-container {
|
|
52
|
+
max-width: calc(
|
|
53
|
+
(
|
|
54
|
+
(
|
|
55
|
+
100vw - var(--sl-sidebar-width) - 2 * var(--sl-content-pad-x) - 2 *
|
|
56
|
+
var(--sl-sidebar-pad-x)
|
|
57
|
+
) * 0.25
|
|
58
|
+
)
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
</style>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { getBookForPath } from '../../utils/starlight-nav';
|
|
3
|
+
|
|
4
|
+
const isBookPage = Boolean(getBookForPath(Astro.url.pathname));
|
|
5
|
+
const PAGE_TITLE_ID = '_top';
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<h1 id={PAGE_TITLE_ID} class:list={['docs-page-title', isBookPage && 'docs-page-title--book']}>
|
|
9
|
+
{Astro.locals.starlightRoute.entry.data.title}
|
|
10
|
+
</h1>
|
|
11
|
+
|
|
12
|
+
<style>
|
|
13
|
+
@layer starlight.core {
|
|
14
|
+
.docs-page-title {
|
|
15
|
+
margin-top: 1rem;
|
|
16
|
+
font-size: var(--sl-text-h1);
|
|
17
|
+
line-height: var(--sl-line-height-headings);
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
color: var(--sl-color-white);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.docs-page-title--book {
|
|
23
|
+
margin-top: 0;
|
|
24
|
+
font-size: clamp(1rem, 1.1vw, 1.4rem);
|
|
25
|
+
line-height: 1.18;
|
|
26
|
+
font-weight: 800;
|
|
27
|
+
color: var(--site-accent-strong);
|
|
28
|
+
text-wrap: pretty;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@media (min-width: 72rem) {
|
|
32
|
+
.docs-page-title--book {
|
|
33
|
+
max-width: var(--docs-book-panel-width);
|
|
34
|
+
margin-inline: auto;
|
|
35
|
+
text-wrap: balance;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
</style>
|