@master/internal-site 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +68 -2
- package/dist/astro.d.mts +3 -0
- package/dist/astro.mjs +510 -0
- package/dist/config.d.mts +69 -0
- package/dist/config.mjs +10 -0
- package/package.json +384 -4
- package/src/astro/Page.astro +12 -0
- package/src/astro/content-pages.ts +75 -0
- package/src/astro/index.ts +124 -0
- package/src/astro/module-id.ts +4 -0
- package/src/astro/propagated-assets.ts +29 -0
- package/src/astro/route-paths.ts +78 -0
- package/src/astro/routes.template.ts +110 -0
- package/src/astro/server-styles.ts +26 -0
- package/src/astro/site-context.ts +27 -0
- package/src/astro/source-url.ts +22 -0
- package/src/astro/svelte-renderer.ts +45 -0
- package/src/astro/svg-markup.ts +23 -0
- package/src/benchmarks/BenchmarkBarRows.astro +34 -0
- package/src/benchmarks/BenchmarkBars.astro +14 -0
- package/src/benchmarks/BenchmarkChart.astro +53 -0
- package/src/benchmarks/BenchmarkChartGroup.astro +24 -0
- package/src/benchmarks/BenchmarkDataTable.astro +24 -0
- package/src/benchmarks/BenchmarkDelta.astro +23 -0
- package/src/benchmarks/BenchmarkFigure.astro +30 -0
- package/src/benchmarks/BenchmarkMetricTable.astro +38 -0
- package/src/benchmarks/BenchmarkMetrics.astro +23 -0
- package/src/benchmarks/BenchmarkSampleSummary.astro +30 -0
- package/src/benchmarks/BenchmarkScrollRegion.svelte +27 -0
- package/src/benchmarks/BenchmarkSource.astro +20 -0
- package/src/benchmarks/BenchmarkStackedBars.astro +54 -0
- package/src/benchmarks/BenchmarkStatus.astro +16 -0
- package/src/benchmarks/types.ts +98 -0
- package/src/benchmarks/utils.ts +42 -0
- package/src/blog/BlogAuthors.astro +25 -0
- package/src/blog/article/BlogArticleContents.svelte +24 -0
- package/src/blog/article/BlogArticleEnd.astro +55 -0
- package/src/blog/article/BlogArticleMasthead.astro +61 -0
- package/src/blog/article/language.ts +29 -0
- package/src/blog/article/neighbors.ts +27 -0
- package/src/blog/article/title-lines.astro +14 -0
- package/src/blog/article/title-parts.ts +9 -0
- package/src/components.d.ts +5 -0
- package/src/config.ts +68 -0
- package/src/css/ButtonPreview.astro +22 -0
- package/src/css/ConfiguredExample.astro +15 -0
- package/src/css/NamespaceUtilityTable.astro +50 -0
- package/src/css/StylesheetExample.astro +15 -0
- package/src/css/ThemeNumberVariableTable.astro +57 -0
- package/src/css/configured-example.ts +53 -0
- package/src/css/foundation-data/elevation/shadow-data.ts +52 -0
- package/src/css/foundation-data/sizing/scale-data.ts +37 -0
- package/src/css/foundation-data/specimen-content.ts +10 -0
- package/src/css/foundation-data/specimens.ts +96 -0
- package/src/css/foundation-data/tokens.ts +32 -0
- package/src/css/generate-preset-css.ts +12 -0
- package/src/css/highlight.ts +34 -0
- package/src/css/manifest-utilities.ts +29 -0
- package/src/css/markdown.ts +279 -0
- package/src/css/preset-css.ts +15 -0
- package/src/css/preset-manifest.ts +3 -0
- package/src/css/stylesheet-example.ts +26 -0
- package/src/css/theme-variables.ts +74 -0
- package/src/css/variable-namespace-sources.ts +20 -0
- package/src/demo/Demo.svelte +55 -0
- package/src/demo/DemoAsset.astro +38 -0
- package/src/demo/DemoAxes.svelte +22 -0
- package/src/demo/DemoBadge.svelte +18 -0
- package/src/demo/DemoCatalog.astro +36 -0
- package/src/demo/DemoComparison.svelte +36 -0
- package/src/demo/DemoConfiguredExample.astro +48 -0
- package/src/demo/DemoContainer.svelte +48 -0
- package/src/demo/DemoControls.svelte +16 -0
- package/src/demo/DemoCopyButton.svelte +50 -0
- package/src/demo/DemoCopyGroup.svelte +15 -0
- package/src/demo/DemoExample.astro +27 -0
- package/src/demo/DemoFeatureSupport.svelte +18 -0
- package/src/demo/DemoGeneratedCSS.svelte +8 -0
- package/src/demo/DemoIndex.astro +23 -0
- package/src/demo/DemoInstallation.astro +17 -0
- package/src/demo/DemoItem.svelte +17 -0
- package/src/demo/DemoLabel.svelte +15 -0
- package/src/demo/DemoLegend.svelte +15 -0
- package/src/demo/DemoMeasure.svelte +28 -0
- package/src/demo/DemoMedia.svelte +43 -0
- package/src/demo/DemoMotion.svelte +41 -0
- package/src/demo/DemoPageViewport.astro +17 -0
- package/src/demo/DemoPalette.astro +29 -0
- package/src/demo/DemoPaletteGroups.svelte +15 -0
- package/src/demo/DemoScrollArea.svelte +15 -0
- package/src/demo/DemoStyleComparison.astro +25 -0
- package/src/demo/DemoSurface.svelte +15 -0
- package/src/demo/DemoSwatch.svelte +19 -0
- package/src/demo/DemoThemeComparison.astro +30 -0
- package/src/demo/DemoTokenTable.astro +34 -0
- package/src/demo/DemoViewTransition.astro +18 -0
- package/src/demo/DemoViewport.svelte +324 -0
- package/src/demo/DemoWaterfall.astro +30 -0
- package/src/demo/FoundationBreakpoint.astro +12 -0
- package/src/demo/ProjectStyleExample.astro +13 -0
- package/src/demo/copy-feedback.ts +10 -0
- package/src/demo/demo-waterfall.ts +17 -0
- package/src/demo/drag-readings.ts +20 -0
- package/src/demo/foundations/FoundationAxes.astro +12 -0
- package/src/demo/foundations/FoundationColorRoles.astro +5 -0
- package/src/demo/foundations/FoundationContainerGrid.astro +24 -0
- package/src/demo/foundations/FoundationDialog.astro +14 -0
- package/src/demo/foundations/FoundationElevation.astro +5 -0
- package/src/demo/foundations/FoundationElevationState.astro +5 -0
- package/src/demo/foundations/FoundationHue.astro +5 -0
- package/src/demo/foundations/FoundationLines.astro +5 -0
- package/src/demo/foundations/FoundationMedia.astro +28 -0
- package/src/demo/foundations/FoundationMotion.astro +5 -0
- package/src/demo/foundations/FoundationPalette.astro +8 -0
- package/src/demo/foundations/FoundationRadius.astro +13 -0
- package/src/demo/foundations/FoundationShapes.astro +12 -0
- package/src/demo/foundations/FoundationShrink.astro +14 -0
- package/src/demo/foundations/FoundationSizing.astro +19 -0
- package/src/demo/foundations/FoundationSpecimen.astro +20 -0
- package/src/demo/foundations/FoundationSurfaces.astro +5 -0
- package/src/demo/foundations/FoundationTextHue.astro +5 -0
- package/src/demo/foundations/FoundationTextRoles.astro +5 -0
- package/src/demo/foundations/FoundationTokens.astro +22 -0
- package/src/demo/foundations/FoundationTokensView.astro +65 -0
- package/src/demo/foundations/FoundationTransition.astro +5 -0
- package/src/demo/foundations/FoundationTypeComparison.astro +12 -0
- package/src/demo/foundations/FoundationTypography.astro +5 -0
- package/src/demo/foundations/Palette.svelte +37 -0
- package/src/demo/foundations/ShadowScaleDemo.astro +22 -0
- package/src/demo/illustration-materials.ts +180 -0
- package/src/demo/maintenance-example.ts +62 -0
- package/src/demo/playback.ts +75 -0
- package/src/demo/project-style-examples.ts +128 -0
- package/src/demo/reference/alignment.ts +42 -0
- package/src/demo/reference/animations.ts +30 -0
- package/src/demo/reference/backgrounds.ts +39 -0
- package/src/demo/reference/border-paint.ts +31 -0
- package/src/demo/reference/clipping.ts +26 -0
- package/src/demo/reference/document.ts +55 -0
- package/src/demo/reference/edges.ts +40 -0
- package/src/demo/reference/effects.ts +27 -0
- package/src/demo/reference/flexbox.ts +33 -0
- package/src/demo/reference/frame.css +118 -0
- package/src/demo/reference/grid.ts +42 -0
- package/src/demo/reference/html.ts +40 -0
- package/src/demo/reference/interaction.ts +42 -0
- package/src/demo/reference/layout-html.ts +10 -0
- package/src/demo/reference/layout.ts +102 -0
- package/src/demo/reference/media.ts +29 -0
- package/src/demo/reference/positioning.ts +90 -0
- package/src/demo/reference/scenes.ts +197 -0
- package/src/demo/reference/scrolling.ts +66 -0
- package/src/demo/reference/shapes.ts +22 -0
- package/src/demo/reference/sizing.ts +43 -0
- package/src/demo/reference/source.ts +8 -0
- package/src/demo/reference/text-effects.ts +37 -0
- package/src/demo/reference/text-flow.ts +41 -0
- package/src/demo/reference/transforms.ts +26 -0
- package/src/demo/reference/transitions.ts +24 -0
- package/src/demo/reference/type-specimens.ts +56 -0
- package/src/demo/reference/types.ts +30 -0
- package/src/demo/reference/typography.ts +32 -0
- package/src/demo/specimens/accent-color.json +50 -0
- package/src/demo/specimens/align-items.json +56 -0
- package/src/demo/specimens/animation-delay.json +55 -0
- package/src/demo/specimens/animation-direction.json +49 -0
- package/src/demo/specimens/animation-fill-mode.json +55 -0
- package/src/demo/specimens/animation-iteration-count.json +55 -0
- package/src/demo/specimens/animation-play-state.json +83 -0
- package/src/demo/specimens/animation-timing-function.json +48 -0
- package/src/demo/specimens/appearance.json +44 -0
- package/src/demo/specimens/aspect-ratio.json +28 -0
- package/src/demo/specimens/backdrop-filter.json +44 -0
- package/src/demo/specimens/background-attachment.json +49 -0
- package/src/demo/specimens/background-image.json +25 -0
- package/src/demo/specimens/background-origin.json +36 -0
- package/src/demo/specimens/background-size.json +29 -0
- package/src/demo/specimens/border-collapse.json +45 -0
- package/src/demo/specimens/border-color.json +35 -0
- package/src/demo/specimens/border-image-repeat.json +50 -0
- package/src/demo/specimens/border-image-slice.json +45 -0
- package/src/demo/specimens/border-radius.json +30 -0
- package/src/demo/specimens/box-decoration-break.json +35 -0
- package/src/demo/specimens/box-shadow.json +33 -0
- package/src/demo/specimens/clear.json +77 -0
- package/src/demo/specimens/clip-path.json +38 -0
- package/src/demo/specimens/content.json +27 -0
- package/src/demo/specimens/counter-set.json +31 -0
- package/src/demo/specimens/fill.json +23 -0
- package/src/demo/specimens/filter.json +23 -0
- package/src/demo/specimens/flex-direction.json +27 -0
- package/src/demo/specimens/flex-grow.json +27 -0
- package/src/demo/specimens/font-style.json +23 -0
- package/src/demo/specimens/font-variant-numeric.json +28 -0
- package/src/demo/specimens/grid-auto-columns.json +29 -0
- package/src/demo/specimens/grid-auto-flow.json +37 -0
- package/src/demo/specimens/grid-template-areas.json +34 -0
- package/src/demo/specimens/grid-template-columns.json +36 -0
- package/src/demo/specimens/isolation.json +25 -0
- package/src/demo/specimens/justify-content.json +36 -0
- package/src/demo/specimens/line-height.json +28 -0
- package/src/demo/specimens/list-style-position.json +36 -0
- package/src/demo/specimens/mask-image.json +54 -0
- package/src/demo/specimens/min-width.json +39 -0
- package/src/demo/specimens/mix-blend-mode.json +43 -0
- package/src/demo/specimens/object-fit.json +27 -0
- package/src/demo/specimens/object-position.json +27 -0
- package/src/demo/specimens/opacity.json +37 -0
- package/src/demo/specimens/order.json +28 -0
- package/src/demo/specimens/overflow-wrap.json +26 -0
- package/src/demo/specimens/overflow.json +53 -0
- package/src/demo/specimens/overscroll-behavior.json +29 -0
- package/src/demo/specimens/padding.json +84 -0
- package/src/demo/specimens/place-content.json +31 -0
- package/src/demo/specimens/pointer-events.json +46 -0
- package/src/demo/specimens/position.json +29 -0
- package/src/demo/specimens/resize.json +32 -0
- package/src/demo/specimens/screen-readers.json +37 -0
- package/src/demo/specimens/scroll-padding.json +29 -0
- package/src/demo/specimens/scroll-snap-stop.json +33 -0
- package/src/demo/specimens/shape-image-threshold.json +37 -0
- package/src/demo/specimens/shape-margin.json +40 -0
- package/src/demo/specimens/shape-outside.json +37 -0
- package/src/demo/specimens/stroke-width.json +27 -0
- package/src/demo/specimens/text-fill-color.json +23 -0
- package/src/demo/specimens/text-stroke-width.json +32 -0
- package/src/demo/specimens/touch-action.json +45 -0
- package/src/demo/specimens/transform-box.json +37 -0
- package/src/demo/specimens/transform-origin.json +56 -0
- package/src/demo/specimens/transform-style.json +55 -0
- package/src/demo/specimens/transform.json +47 -0
- package/src/demo/specimens/transition-delay.json +57 -0
- package/src/demo/specimens/transition-duration.json +60 -0
- package/src/demo/specimens/transition-property.json +60 -0
- package/src/demo/specimens/transition-timing-function.json +65 -0
- package/src/demo/specimens/user-drag.json +28 -0
- package/src/demo/specimens/user-select.json +25 -0
- package/src/demo/specimens/vertical-align.json +28 -0
- package/src/demo/specimens/width.json +56 -0
- package/src/demo/specimens/will-change.json +50 -0
- package/src/demo/specimens/writing-mode.json +26 -0
- package/src/demo/specimens/z-index.json +35 -0
- package/src/demo/style.ts +15 -0
- package/src/demo/tone.ts +4 -0
- package/src/demo/useDemoViewTransition.svelte.ts +71 -0
- package/src/docs-shell/common/i18n.config.d.ts +2 -0
- package/src/docs-shell/common/i18n.config.js +13 -0
- package/src/docs-shell/common/svgo.config.d.ts +2 -0
- package/src/docs-shell/common/svgo.config.js +11 -0
- package/src/docs-shell/components/ArticleHeader.astro +65 -0
- package/src/docs-shell/components/ArticleTOC.astro +18 -0
- package/src/docs-shell/components/Callout.astro +26 -0
- package/src/docs-shell/components/Code.astro +25 -0
- package/src/docs-shell/components/CodeCopyButton.astro +25 -0
- package/src/docs-shell/components/CodeTabBar.astro +40 -0
- package/src/docs-shell/components/CodeTabs.astro +53 -0
- package/src/docs-shell/components/CodeView.astro +23 -0
- package/src/docs-shell/components/Do.astro +5 -0
- package/src/docs-shell/components/DoNot.astro +5 -0
- package/src/docs-shell/components/DocArticle.astro +14 -0
- package/src/docs-shell/components/DocHeader.svelte +93 -0
- package/src/docs-shell/components/DocHeading.astro +28 -0
- package/src/docs-shell/components/DocMain.astro +19 -0
- package/src/docs-shell/components/DocMenuButton.svelte +96 -0
- package/src/docs-shell/components/DocSidebar.svelte +62 -0
- package/src/docs-shell/components/DocVersionSelect.svelte +22 -0
- package/src/docs-shell/components/DocWrapper.astro +11 -0
- package/src/docs-shell/components/DocumentAPIIndex.astro +24 -0
- package/src/docs-shell/components/DocumentChoices.astro +24 -0
- package/src/docs-shell/components/DocumentCodeExample.astro +20 -0
- package/src/docs-shell/components/DocumentCodeExampleView.astro +35 -0
- package/src/docs-shell/components/DocumentCodeTable.astro +19 -0
- package/src/docs-shell/components/DocumentComparison.astro +7 -0
- package/src/docs-shell/components/DocumentCopyButton.svelte +41 -0
- package/src/docs-shell/components/DocumentDeclaration.astro +17 -0
- package/src/docs-shell/components/DocumentDeclarationView.astro +12 -0
- package/src/docs-shell/components/DocumentDisclosure.astro +14 -0
- package/src/docs-shell/components/DocumentFileTree.astro +34 -0
- package/src/docs-shell/components/DocumentFlow.astro +27 -0
- package/src/docs-shell/components/DocumentIdentifier.astro +14 -0
- package/src/docs-shell/components/DocumentIllustration.astro +46 -0
- package/src/docs-shell/components/DocumentKeyList.astro +22 -0
- package/src/docs-shell/components/DocumentNamespaceTable.astro +20 -0
- package/src/docs-shell/components/DocumentOptionEntry.astro +15 -0
- package/src/docs-shell/components/DocumentOptionList.astro +11 -0
- package/src/docs-shell/components/DocumentOptions.astro +23 -0
- package/src/docs-shell/components/DocumentParameters.astro +30 -0
- package/src/docs-shell/components/DocumentPrompt.astro +16 -0
- package/src/docs-shell/components/DocumentValueList.astro +25 -0
- package/src/docs-shell/components/DocumentationIndex.svelte +144 -0
- package/src/docs-shell/components/Dropped.astro +21 -0
- package/src/docs-shell/components/ExpandContent.svelte +21 -0
- package/src/docs-shell/components/ExplorerView.astro +37 -0
- package/src/docs-shell/components/FileIcon.astro +123 -0
- package/src/docs-shell/components/Footer.svelte +80 -0
- package/src/docs-shell/components/GeneratedCSS.astro +8 -0
- package/src/docs-shell/components/Header.svelte +121 -0
- package/src/docs-shell/components/HeaderIcon.astro +14 -0
- package/src/docs-shell/components/HeaderNav.svelte +20 -0
- package/src/docs-shell/components/Image.svelte +56 -0
- package/src/docs-shell/components/Info.astro +5 -0
- package/src/docs-shell/components/InlineCode.astro +30 -0
- package/src/docs-shell/components/InteractingIndicator.astro +19 -0
- package/src/docs-shell/components/LanguageButton.svelte +18 -0
- package/src/docs-shell/components/LanguageSelect.svelte +44 -0
- package/src/docs-shell/components/Link.svelte +127 -0
- package/src/docs-shell/components/ModeImg.astro +11 -0
- package/src/docs-shell/components/NotFound.astro +21 -0
- package/src/docs-shell/components/OverviewButtons.astro +36 -0
- package/src/docs-shell/components/PMAction.astro +25 -0
- package/src/docs-shell/components/PackageBadges.astro +39 -0
- package/src/docs-shell/components/PageContent.svelte +38 -0
- package/src/docs-shell/components/PageContentBootstrap.astro +13 -0
- package/src/docs-shell/components/PageContentDisclosure.astro +25 -0
- package/src/docs-shell/components/PageContentList.svelte +70 -0
- package/src/docs-shell/components/PageContentProvider.svelte +15 -0
- package/src/docs-shell/components/PageContentTitle.svelte +16 -0
- package/src/docs-shell/components/PageNavs.astro +40 -0
- package/src/docs-shell/components/PreparedCodeView.astro +12 -0
- package/src/docs-shell/components/RenderNode.astro +16 -0
- package/src/docs-shell/components/RouteLayers.astro +17 -0
- package/src/docs-shell/components/SearchButton.svelte +31 -0
- package/src/docs-shell/components/SearchDialog.svelte +174 -0
- package/src/docs-shell/components/Segments.svelte +62 -0
- package/src/docs-shell/components/Step.astro +13 -0
- package/src/docs-shell/components/StepL.astro +10 -0
- package/src/docs-shell/components/StepR.astro +10 -0
- package/src/docs-shell/components/StepSection.astro +12 -0
- package/src/docs-shell/components/Tab.astro +8 -0
- package/src/docs-shell/components/Tabs.astro +10 -0
- package/src/docs-shell/components/ThemeIcon.astro +19 -0
- package/src/docs-shell/components/ThemeSelect.svelte +20 -0
- package/src/docs-shell/components/TimeAgo.svelte +32 -0
- package/src/docs-shell/components/Translate.astro +14 -0
- package/src/docs-shell/components/Warn.astro +5 -0
- package/src/docs-shell/components/code-props.ts +28 -0
- package/src/docs-shell/components/document-types.ts +119 -0
- package/src/docs-shell/components/markdown/Anchor.astro +5 -0
- package/src/docs-shell/components/markdown/Heading2.astro +5 -0
- package/src/docs-shell/components/markdown/Heading3.astro +5 -0
- package/src/docs-shell/components/markdown/Table.astro +6 -0
- package/src/docs-shell/components/markdown-components.ts +36 -0
- package/src/docs-shell/components/page-content-bootstrap.ts +115 -0
- package/src/docs-shell/components/page-content.svelte.ts +125 -0
- package/src/docs-shell/contexts/search.ts +18 -0
- package/src/docs-shell/contexts/theme-mode.svelte.ts +61 -0
- package/src/docs-shell/data/authors.ts +17 -0
- package/src/docs-shell/data/base-colors.ts +29 -0
- package/src/docs-shell/data/brands.ts +79 -0
- package/src/docs-shell/data/color-names.ts +1 -0
- package/src/docs-shell/data/color-palette.ts +50 -0
- package/src/docs-shell/data/colors.ts +1 -0
- package/src/docs-shell/factories/Page.astro +35 -0
- package/src/docs-shell/factories/create-page.ts +31 -0
- package/src/docs-shell/layouts/BlogArticle.astro +53 -0
- package/src/docs-shell/layouts/Doc.astro +41 -0
- package/src/docs-shell/remark/markdown-components.d.ts +2 -0
- package/src/docs-shell/remark/markdown-components.js +101 -0
- package/src/docs-shell/remark/slug-and-toc.d.ts +2 -0
- package/src/docs-shell/remark/slug-and-toc.js +53 -0
- package/src/docs-shell/scripts/code-tabs-bootstrap.ts +34 -0
- package/src/docs-shell/scripts/code.ts +124 -0
- package/src/docs-shell/scripts/document-anchor.ts +57 -0
- package/src/docs-shell/scripts/document.ts +47 -0
- package/src/docs-shell/site.ts +67 -0
- package/src/docs-shell/types/IllustrationImages.ts +2 -0
- package/src/docs-shell/types/Metadata.ts +17 -0
- package/src/docs-shell/types/Props.ts +9 -0
- package/src/docs-shell/types/StaticImage.ts +6 -0
- package/src/docs-shell/uses/use-selected-preview-syntax.svelte.ts +16 -0
- package/src/docs-shell/utils/anchor.ts +24 -0
- package/src/docs-shell/utils/beautify-css.ts +14 -0
- package/src/docs-shell/utils/beautify-html.ts +12 -0
- package/src/docs-shell/utils/beautify-js.ts +9 -0
- package/src/docs-shell/utils/create-highlighter.ts +50 -0
- package/src/docs-shell/utils/css-modern-grammar.ts +339 -0
- package/src/docs-shell/utils/documentation-search.ts +68 -0
- package/src/docs-shell/utils/generate-metadata.ts +60 -0
- package/src/docs-shell/utils/group-page-content.ts +10 -0
- package/src/docs-shell/utils/head.ts +72 -0
- package/src/docs-shell/utils/highlight-code-core.ts +146 -0
- package/src/docs-shell/utils/highlight-code.ts +1 -0
- package/src/docs-shell/utils/highlighted-code-text.ts +27 -0
- package/src/docs-shell/utils/i18n-pathname.ts +98 -0
- package/src/docs-shell/utils/i18n.ts +12 -0
- package/src/docs-shell/utils/is-date-within-seven-days.ts +16 -0
- package/src/docs-shell/utils/isBrowser.ts +1 -0
- package/src/docs-shell/utils/isInteractOutside.ts +16 -0
- package/src/docs-shell/utils/markdown-tree.ts +22 -0
- package/src/docs-shell/utils/metadata.ts +25 -0
- package/src/docs-shell/utils/prepared-code.ts +21 -0
- package/src/docs-shell/utils/resolve-heading.d.ts +1 -0
- package/src/docs-shell/utils/resolve-heading.js +19 -0
- package/src/docs-shell/utils/search-pages.ts +271 -0
- package/src/docs-shell/utils/slot-text.ts +15 -0
- package/src/docs-shell/utils/snackbar.ts +39 -0
- package/src/docs-shell/utils/syntax-theme.ts +53 -0
- package/src/docs-shell/utils/transformer-notation-word-mark.ts +146 -0
- package/src/docs-shell/utils/unique-id.ts +11 -0
- package/src/examples/article-transitions/page.astro +7 -0
- package/src/examples/article-transitions/transitions.css +10 -0
- package/src/examples/components/ArticleTransitionScene.svelte +83 -0
- package/src/examples/components/ViewTransitionScene.svelte +31 -0
- package/src/examples/images/article-aurora.jpg +0 -0
- package/src/examples/images/article-coast.jpg +0 -0
- package/src/examples/images/article-grid.jpg +0 -0
- package/src/examples/images/article-studio.jpg +0 -0
- package/src/examples/layout-system/page.astro +59 -0
- package/src/examples/scene.css +3 -0
- package/src/examples/view-transitions/page.astro +7 -0
- package/src/examples/view-transitions/transitions.css +9 -0
- package/src/home/HeroCanvas.svelte +617 -0
- package/src/home/HomeAction.astro +17 -0
- package/src/home/HomeBentoFrame.astro +9 -0
- package/src/home/HomeBentoGrid.astro +9 -0
- package/src/home/HomeCompactIcon.astro +15 -0
- package/src/home/HomeFooter.svelte +63 -0
- package/src/home/HomeIllustration.astro +17 -0
- package/src/home/HomeIllustrationArt.svelte +15 -0
- package/src/home/HomeLamp.svelte +18 -0
- package/src/home/design.css +532 -0
- package/src/home/footer.css +225 -0
- package/src/home/hero-shaders.ts +460 -0
- package/src/home/hero-title-mask.ts +175 -0
- package/src/home/hero.css +547 -0
- package/src/home/home-illustration.ts +5 -0
- package/src/home/home-lamp.ts +225 -0
- package/src/home/home.css +1081 -0
- package/src/home/icons/agent-check-preview-apply.svg +24 -0
- package/src/home/icons/agent-clients.svg +26 -0
- package/src/home/icons/agent-project-tools.svg +23 -0
- package/src/home/icons/artwork/agent-check-preview-apply-dark.webp +0 -0
- package/src/home/icons/artwork/agent-check-preview-apply-light.webp +0 -0
- package/src/home/icons/artwork/agent-clients-dark.webp +0 -0
- package/src/home/icons/artwork/agent-clients-light.webp +0 -0
- package/src/home/icons/artwork/agent-edit-file-dark.webp +0 -0
- package/src/home/icons/artwork/agent-edit-file-light.webp +0 -0
- package/src/home/icons/artwork/agent-project-tools-dark.webp +0 -0
- package/src/home/icons/artwork/agent-project-tools-light.webp +0 -0
- package/src/home/icons/artwork/design-cascade-layers-dark.webp +0 -0
- package/src/home/icons/artwork/design-cascade-layers-light.webp +0 -0
- package/src/home/icons/artwork/design-layout-motion-dark.webp +0 -0
- package/src/home/icons/artwork/design-layout-motion-light.webp +0 -0
- package/src/home/icons/artwork/design-p3-gamut-dark.webp +0 -0
- package/src/home/icons/artwork/design-p3-gamut-light.webp +0 -0
- package/src/home/icons/artwork/design-theme-modes-dark.webp +0 -0
- package/src/home/icons/artwork/design-theme-modes-light.webp +0 -0
- package/src/home/icons/artwork/design-theme-tokens-dark.webp +0 -0
- package/src/home/icons/artwork/design-theme-tokens-light.webp +0 -0
- package/src/home/icons/artwork/editor-color-tools-dark.webp +0 -0
- package/src/home/icons/artwork/editor-color-tools-light.webp +0 -0
- package/src/home/icons/artwork/editor-focused-highlighting-dark.webp +0 -0
- package/src/home/icons/artwork/editor-focused-highlighting-light.webp +0 -0
- package/src/home/icons/artwork/editor-hover-inspection-dark.webp +0 -0
- package/src/home/icons/artwork/editor-hover-inspection-light.webp +0 -0
- package/src/home/icons/artwork/editor-manifest-completions-dark.webp +0 -0
- package/src/home/icons/artwork/editor-manifest-completions-light.webp +0 -0
- package/src/home/icons/artwork/lint-class-order-dark.webp +0 -0
- package/src/home/icons/artwork/lint-class-order-light.webp +0 -0
- package/src/home/icons/artwork/lint-conflicting-classes-dark.webp +0 -0
- package/src/home/icons/artwork/lint-conflicting-classes-light.webp +0 -0
- package/src/home/icons/artwork/lint-fix-previews-dark.webp +0 -0
- package/src/home/icons/artwork/lint-fix-previews-light.webp +0 -0
- package/src/home/icons/artwork/lint-invalid-classes-dark.webp +0 -0
- package/src/home/icons/artwork/lint-invalid-classes-light.webp +0 -0
- package/src/home/icons/artwork/lint-strict-vocabulary-dark.webp +0 -0
- package/src/home/icons/artwork/lint-strict-vocabulary-light.webp +0 -0
- package/src/home/icons/artwork/lint-theme-tokens-dark.webp +0 -0
- package/src/home/icons/artwork/lint-theme-tokens-light.webp +0 -0
- package/src/home/icons/artwork/mcp-apply-preview-dark.webp +0 -0
- package/src/home/icons/artwork/mcp-apply-preview-light.webp +0 -0
- package/src/home/icons/artwork/mcp-css-compare-dark.webp +0 -0
- package/src/home/icons/artwork/mcp-css-compare-light.webp +0 -0
- package/src/home/icons/artwork/mcp-inspect-class-dark.webp +0 -0
- package/src/home/icons/artwork/mcp-inspect-class-light.webp +0 -0
- package/src/home/icons/artwork/mcp-lint-project-dark.webp +0 -0
- package/src/home/icons/artwork/mcp-lint-project-light.webp +0 -0
- package/src/home/icons/artwork/mcp-manifest-query-dark.webp +0 -0
- package/src/home/icons/artwork/mcp-manifest-query-light.webp +0 -0
- package/src/home/icons/artwork/mcp-preview-fixes-dark.webp +0 -0
- package/src/home/icons/artwork/mcp-preview-fixes-light.webp +0 -0
- package/src/home/icons/artwork/mcp-render-css-dark.webp +0 -0
- package/src/home/icons/artwork/mcp-render-css-light.webp +0 -0
- package/src/home/icons/artwork/mcp-scan-project-dark.webp +0 -0
- package/src/home/icons/artwork/mcp-scan-project-light.webp +0 -0
- package/src/home/icons/artwork/mcp-trace-class-dark.webp +0 -0
- package/src/home/icons/artwork/mcp-trace-class-light.webp +0 -0
- package/src/home/icons/artwork/render-progressive-dark.webp +0 -0
- package/src/home/icons/artwork/render-progressive-light.webp +0 -0
- package/src/home/icons/artwork/render-runtime-dark.webp +0 -0
- package/src/home/icons/artwork/render-runtime-light.webp +0 -0
- package/src/home/icons/artwork/render-static-dark.webp +0 -0
- package/src/home/icons/artwork/render-static-light.webp +0 -0
- package/src/home/icons/artwork/section-ai-agents-dark.webp +0 -0
- package/src/home/icons/artwork/section-ai-agents-light.webp +0 -0
- package/src/home/icons/artwork/section-css-size-dark.webp +0 -0
- package/src/home/icons/artwork/section-css-size-light.webp +0 -0
- package/src/home/icons/artwork/section-design-system-dark.webp +0 -0
- package/src/home/icons/artwork/section-design-system-light.webp +0 -0
- package/src/home/icons/artwork/section-editor-dark.webp +0 -0
- package/src/home/icons/artwork/section-editor-light.webp +0 -0
- package/src/home/icons/artwork/section-lint-dark.webp +0 -0
- package/src/home/icons/artwork/section-lint-light.webp +0 -0
- package/src/home/icons/artwork/section-rendering-dark.webp +0 -0
- package/src/home/icons/artwork/section-rendering-light.webp +0 -0
- package/src/home/icons/artwork/section-workflow-dark.webp +0 -0
- package/src/home/icons/artwork/section-workflow-light.webp +0 -0
- package/src/home/icons/artwork/source.json +303 -0
- package/src/home/icons/artwork/workflow-integrations-dark.webp +0 -0
- package/src/home/icons/artwork/workflow-integrations-light.webp +0 -0
- package/src/home/icons/artwork/workflow-monorepo-dark.webp +0 -0
- package/src/home/icons/artwork/workflow-monorepo-light.webp +0 -0
- package/src/home/icons/artwork/workflow-route-styles-dark.webp +0 -0
- package/src/home/icons/artwork/workflow-route-styles-light.webp +0 -0
- package/src/home/icons/artwork/workflow-trace-change-dark.webp +0 -0
- package/src/home/icons/artwork/workflow-trace-change-light.webp +0 -0
- package/src/home/icons/artwork.css +4 -0
- package/src/home/icons/artwork.ts +131 -0
- package/src/home/icons/catalog.ts +381 -0
- package/src/home/icons/design-cascade-layers.svg +32 -0
- package/src/home/icons/design-layout-motion.svg +16 -0
- package/src/home/icons/design-p3-gamut.svg +12 -0
- package/src/home/icons/design-theme-modes.svg +12 -0
- package/src/home/icons/design-theme-tokens.svg +20 -0
- package/src/home/icons/editor-color-tools.svg +18 -0
- package/src/home/icons/editor-focused-highlighting.svg +15 -0
- package/src/home/icons/editor-hover-inspection.svg +19 -0
- package/src/home/icons/editor-manifest-completions.svg +24 -0
- package/src/home/icons/lint-class-order-compact.svg +15 -0
- package/src/home/icons/lint-class-order.svg +28 -0
- package/src/home/icons/lint-conflicting-classes-compact.svg +11 -0
- package/src/home/icons/lint-conflicting-classes.svg +24 -0
- package/src/home/icons/lint-fix-previews-compact.svg +9 -0
- package/src/home/icons/lint-fix-previews.svg +19 -0
- package/src/home/icons/lint-invalid-classes-compact.svg +7 -0
- package/src/home/icons/lint-invalid-classes.svg +17 -0
- package/src/home/icons/lint-strict-vocabulary-compact.svg +8 -0
- package/src/home/icons/lint-strict-vocabulary.svg +16 -0
- package/src/home/icons/lint-theme-tokens-compact.svg +7 -0
- package/src/home/icons/lint-theme-tokens.svg +14 -0
- package/src/home/icons/mcp-apply-preview-compact.svg +9 -0
- package/src/home/icons/mcp-apply-preview.svg +18 -0
- package/src/home/icons/mcp-css-compare-compact.svg +9 -0
- package/src/home/icons/mcp-css-compare.svg +20 -0
- package/src/home/icons/mcp-inspect-class-compact.svg +9 -0
- package/src/home/icons/mcp-inspect-class.svg +18 -0
- package/src/home/icons/mcp-lint-project-compact.svg +14 -0
- package/src/home/icons/mcp-lint-project.svg +30 -0
- package/src/home/icons/mcp-manifest-query-compact.svg +14 -0
- package/src/home/icons/mcp-manifest-query.svg +27 -0
- package/src/home/icons/mcp-preview-fixes-compact.svg +9 -0
- package/src/home/icons/mcp-preview-fixes.svg +15 -0
- package/src/home/icons/mcp-render-css-compact.svg +13 -0
- package/src/home/icons/mcp-render-css.svg +30 -0
- package/src/home/icons/mcp-scan-project-compact.svg +7 -0
- package/src/home/icons/mcp-scan-project.svg +13 -0
- package/src/home/icons/mcp-trace-class-compact.svg +11 -0
- package/src/home/icons/mcp-trace-class.svg +24 -0
- package/src/home/icons/render-progressive.svg +17 -0
- package/src/home/icons/render-runtime.svg +23 -0
- package/src/home/icons/render-static.svg +29 -0
- package/src/home/icons/section-ai-agents.svg +24 -0
- package/src/home/icons/section-css-size.svg +13 -0
- package/src/home/icons/section-design-system.svg +24 -0
- package/src/home/icons/section-editor.svg +14 -0
- package/src/home/icons/section-lint.svg +14 -0
- package/src/home/icons/section-rendering.svg +30 -0
- package/src/home/icons/section-workflow.svg +22 -0
- package/src/home/icons/workflow-integrations.svg +15 -0
- package/src/home/icons/workflow-monorepo.svg +27 -0
- package/src/home/icons/workflow-route-styles.svg +24 -0
- package/src/home/icons/workflow-trace-change.svg +21 -0
- package/src/layouts/Document.astro +71 -0
- package/src/public/brand/v2/logo/mark/master-mark-small-on-dark.svg +1 -0
- package/src/public/brand/v2/logo/master-css/master-css-horizontal-on-dark.svg +1 -0
- package/src/public/brand/v2/logo/master-css/master-css-horizontal-on-light.svg +1 -0
- package/src/public/demo/border-grid.svg +7 -0
- package/src/public/demo/landscape.svg +1 -0
- package/src/public/demo/marker.svg +1 -0
- package/src/public/demo/mask.svg +1 -0
- package/src/public/fonts/Geist-Medium.ttf +0 -0
- package/src/public/fonts/Geist-Regular.ttf +0 -0
- package/src/public/fonts/GeistVariable.woff2 +0 -0
- package/src/public/fonts/IBMPlexMono-Bold.woff2 +0 -0
- package/src/public/fonts/IBMPlexMono-Medium.woff2 +0 -0
- package/src/public/fonts/IBMPlexMono-Regular.woff2 +0 -0
- package/src/public/fonts/IBMPlexMono-SemiBold.woff2 +0 -0
- package/src/public/fonts/index.css +40 -0
- package/src/public/icons/csharp.svg +1 -0
- package/src/public/icons/css.svg +1 -0
- package/src/public/icons/eslint.svg +1 -0
- package/src/public/icons/folder.svg +12 -0
- package/src/public/icons/html.svg +1 -0
- package/src/public/icons/php.svg +1 -0
- package/src/public/icons/sass.svg +1 -0
- package/src/public/icons/storybook.svg +1 -0
- package/src/public/icons/visualstudiocode.svg +41 -0
- package/src/public/images/authors/aron.jpg +0 -0
- package/src/public/images/authors/benseage.jpg +0 -0
- package/src/public/images/authors/joy.jpg +0 -0
- package/src/public/images/authors/lola.jpg +0 -0
- package/src/public/images/authors/miles.jpg +0 -0
- package/src/public/images/bootstrap.svg +23 -0
- package/src/public/images/build-tools/rsbuild.svg +1 -0
- package/src/public/images/build-tools/rspack.svg +1 -0
- package/src/public/images/build-tools/vite.svg +15 -0
- package/src/public/images/build-tools/webpack.svg +10 -0
- package/src/public/images/cdns/esm-sh.svg +1 -0
- package/src/public/images/chevron-left.svg +4 -0
- package/src/public/images/cover-bg.jpg +0 -0
- package/src/public/images/emotion.svg +1 -0
- package/src/public/images/frameworks/angular.svg +29 -0
- package/src/public/images/frameworks/astro.svg +4 -0
- package/src/public/images/frameworks/blazor.svg +22 -0
- package/src/public/images/frameworks/express.svg +1 -0
- package/src/public/images/frameworks/laravel.svg +8 -0
- package/src/public/images/frameworks/line-liff.svg +1 -0
- package/src/public/images/frameworks/lit.svg +1 -0
- package/src/public/images/frameworks/nextjs.svg +16 -0
- package/src/public/images/frameworks/nuxtjs.svg +3 -0
- package/src/public/images/frameworks/rails.svg +1 -0
- package/src/public/images/frameworks/react.svg +8 -0
- package/src/public/images/frameworks/remix.svg +5 -0
- package/src/public/images/frameworks/shopify.svg +1 -0
- package/src/public/images/frameworks/svelte.svg +6 -0
- package/src/public/images/frameworks/tanstack.svg +1 -0
- package/src/public/images/frameworks/vuejs.svg +11 -0
- package/src/public/images/frameworks/wordpress.svg +1 -0
- package/src/public/images/mui.svg +1 -0
- package/src/public/images/styled-components.svg +4 -0
- package/src/public/images/tailwindcss.svg +1 -0
- package/src/scripts/bundler-imports.ts +25 -0
- package/src/scripts/static-social.ts +333 -0
- package/src/scripts/write-if-changed.ts +26 -0
- package/src/sections/blog.astro +11 -0
- package/src/sections/design-system.astro +14 -0
- package/src/sections/document.astro +8 -0
- package/src/sections/examples.astro +6 -0
- package/src/sections/guide.astro +26 -0
- package/src/sections/home.astro +7 -0
- package/src/sections/page.astro +12 -0
- package/src/styles/base.css +57 -0
- package/src/styles/benchmarks.css +20 -0
- package/src/styles/blog-article.css +670 -0
- package/src/styles/blog-materials.css +399 -0
- package/src/styles/blog.css +568 -0
- package/src/styles/demo.css +30 -0
- package/src/styles/design-system.css +15 -0
- package/src/styles/docs-shell/code.css +61 -0
- package/src/styles/docs-shell/docs.css +79 -0
- package/src/styles/docs-shell/documentation-search.css +42 -0
- package/src/styles/docs-shell/footer.css +38 -0
- package/src/styles/docs-shell/header.css +73 -0
- package/src/styles/docs-shell/materials.css +25 -0
- package/src/styles/docs-shell/menu.css +19 -0
- package/src/styles/docs-shell/not-found.css +10 -0
- package/src/styles/docs-shell/page-content.css +37 -0
- package/src/styles/docs-shell/prose.css +89 -0
- package/src/styles/docs-shell/segments.css +13 -0
- package/src/styles/docs-shell/steps.css +39 -0
- package/src/styles/docs-shell/syntax-theme.css +18 -0
- package/src/styles/docs-shell/theme.css +68 -0
- package/src/styles/docs-shell/wrapper.css +10 -0
- package/src/styles/document-comparison.css +7 -0
- package/src/styles/documentation-illustration.css +34 -0
- package/src/styles/documentation-index.css +100 -0
- package/src/styles/documents.css +4 -0
- package/src/styles/documents.ts +2 -0
- package/src/styles/foundation.css +4 -0
- package/src/styles/globals.css +2 -0
- package/src/styles/interface.css +3 -0
- package/src/styles/interface.ts +2 -0
- package/src/styles/site.ts +2 -0
- package/src/styles/system/DESIGN.md +108 -0
- package/src/styles/system/buttons.css +51 -0
- package/src/styles/system/code.css +85 -0
- package/src/styles/system/controls.css +110 -0
- package/src/styles/system/data.css +134 -0
- package/src/styles/system/mixins.css +7 -0
- package/src/styles/system/prose.css +75 -0
- package/src/styles/system/shell.css +102 -0
- package/src/styles/system/specimens.css +98 -0
- package/src/styles/system/surfaces.css +104 -0
- package/src/styles/system/tokens.css +136 -0
- package/src/utils/cloudflare-image-loader.js +85 -0
- package/src/virtual.d.ts +36 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
import '@master/internal-site/styles/documentation-illustration.css'
|
|
3
|
+
import IconArrowsMaximize from '@tabler/icons-svelte-runes/icons/arrows-maximize'
|
|
4
|
+
import Image from '@master/internal-site/components/Image.svelte'
|
|
5
|
+
import type { IllustrationImages } from '../types/IllustrationImages'
|
|
6
|
+
|
|
7
|
+
export type { IllustrationImages } from '../types/IllustrationImages'
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
title: string
|
|
11
|
+
alt: string
|
|
12
|
+
images: IllustrationImages
|
|
13
|
+
caption: string
|
|
14
|
+
fullSize?: boolean
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** A static figure with one accessible image and an independent text description. */
|
|
18
|
+
const { title, alt, images, caption, fullSize = false } = Astro.props
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
<figure class="ui-tray" aria-label={title} data-illustration-expandable={fullSize || undefined}>
|
|
22
|
+
<figcaption class="ui-tray-head">
|
|
23
|
+
<p class="ui-tray-title">{title}</p>
|
|
24
|
+
{fullSize && (['light', 'dark'] as const).map(scheme => <a
|
|
25
|
+
class="document-illustration-expand ui-button"
|
|
26
|
+
data-variant="quiet" data-shape="icon" data-size="sm" data-scheme={scheme}
|
|
27
|
+
href={images[scheme].src} target="_blank" rel="noopener noreferrer"
|
|
28
|
+
aria-label={`View full-size illustration: ${title} (opens in a new tab)`}
|
|
29
|
+
title="View full-size illustration (opens in a new tab)"
|
|
30
|
+
><IconArrowsMaximize aria-hidden="true" /></a>)}
|
|
31
|
+
</figcaption>
|
|
32
|
+
<div class="document-illustration" role="img" aria-label={alt}>
|
|
33
|
+
{(['light', 'dark'] as const).map(scheme => <Image
|
|
34
|
+
src={images[scheme]}
|
|
35
|
+
data-scheme={scheme}
|
|
36
|
+
sizes="(max-width: 834px) 100vw, 900px"
|
|
37
|
+
alt=""
|
|
38
|
+
aria-hidden="true"
|
|
39
|
+
/>)}
|
|
40
|
+
</div>
|
|
41
|
+
<p class="ui-tray-caption">{caption}</p>
|
|
42
|
+
<details class="ui-disclosure" data-variant="text-description">
|
|
43
|
+
<summary>Text description</summary>
|
|
44
|
+
<div class="ui-disclosure-body ui-tray-caption"><slot /></div>
|
|
45
|
+
</details>
|
|
46
|
+
</figure>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
import '@master/internal-site/styles/system/data.css'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
keys: string[]
|
|
6
|
+
previewCount?: number
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** Keep complete utility keys together when a consumer list wraps. */
|
|
10
|
+
const { keys, previewCount = keys.length } = Astro.props
|
|
11
|
+
const lists = [keys.slice(0, previewCount), keys.slice(previewCount)]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<ul aria-label="Utility keys">
|
|
15
|
+
{lists[0].map(key => <li><code>{key}</code></li>)}
|
|
16
|
+
</ul>
|
|
17
|
+
{keys.length > previewCount && <details class="ui-disclosure">
|
|
18
|
+
<summary>Show {keys.length - previewCount} more keys</summary>
|
|
19
|
+
<ul aria-label="Utility keys">
|
|
20
|
+
{lists[1].map(key => <li><code>{key}</code></li>)}
|
|
21
|
+
</ul>
|
|
22
|
+
</details>}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
import '@master/internal-site/styles/system/data.css'
|
|
3
|
+
import DocumentKeyList from '@master/internal-site/components/DocumentKeyList.astro'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
rows: { namespace: string, consumers: string[] }[]
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** Native disclosure keeps large registry rows readable; every key remains in the HTML. */
|
|
10
|
+
const { rows } = Astro.props
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
{/* The table's narrow overflow region must be focusable for native keyboard scrolling. */}
|
|
14
|
+
<div class="ui-table" data-variant="lookup" role="region" aria-label="Namespace consumers" tabindex="0"><table>
|
|
15
|
+
<thead><tr><th scope="col">Namespace</th><th scope="col">Consumers</th></tr></thead>
|
|
16
|
+
<tbody>{rows.map(({ namespace, consumers }) => <tr>
|
|
17
|
+
<th scope="row"><code>{namespace}-*</code></th>
|
|
18
|
+
<td><DocumentKeyList keys={consumers} previewCount={6} /></td>
|
|
19
|
+
</tr>)}</tbody>
|
|
20
|
+
</table></div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
import '@master/internal-site/styles/system/data.css'
|
|
3
|
+
import DocumentIdentifier from '@master/internal-site/components/DocumentIdentifier.astro'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
name: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const { name } = Astro.props
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<div>
|
|
13
|
+
<dt><DocumentIdentifier text={name} /></dt>
|
|
14
|
+
<dd><slot /></dd>
|
|
15
|
+
</div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
import '@master/internal-site/styles/system/data.css'
|
|
3
|
+
import RenderNode from '@master/internal-site/components/RenderNode.astro'
|
|
4
|
+
import DocumentOptionEntry from '@master/internal-site/components/DocumentOptionEntry.astro'
|
|
5
|
+
import DocumentOptionList from '@master/internal-site/components/DocumentOptionList.astro'
|
|
6
|
+
import type { DocumentOption } from '@master/internal-site/components/document-types.ts'
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
label: string
|
|
11
|
+
options: readonly DocumentOption[]
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** Names keep their own column; defaults and prose stay readable on mobile. */
|
|
15
|
+
const { label, options } = Astro.props
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
<DocumentOptionList label={label}>
|
|
19
|
+
{options.map(option => <DocumentOptionEntry name={option.name}>
|
|
20
|
+
{option.defaultValue !== undefined && <small>Default <code>{option.defaultValue}</code></small>}
|
|
21
|
+
<p><RenderNode node={option.description} /></p>
|
|
22
|
+
</DocumentOptionEntry>)}
|
|
23
|
+
</DocumentOptionList>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
import '@master/internal-site/styles/system/data.css'
|
|
3
|
+
import '@master/internal-site/styles/system/specimens.css'
|
|
4
|
+
import RenderNode from '@master/internal-site/components/RenderNode.astro'
|
|
5
|
+
import DocumentIdentifier from '@master/internal-site/components/DocumentIdentifier.astro'
|
|
6
|
+
import type { DocumentParameter } from '@master/internal-site/components/document-types.ts'
|
|
7
|
+
|
|
8
|
+
export type { DocumentParameter } from '@master/internal-site/components/document-types.ts'
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
label: string
|
|
12
|
+
parameters: readonly DocumentParameter[]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Name, type and requirement read as one term; descriptions use the remaining width. */
|
|
16
|
+
const { label, parameters } = Astro.props
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
<dl class="ui-params" aria-label={label}>
|
|
20
|
+
{parameters.map(parameter => <div>
|
|
21
|
+
<dt>
|
|
22
|
+
<span><DocumentIdentifier text={parameter.name} /></span>
|
|
23
|
+
<small>{parameter.type}</small>
|
|
24
|
+
{parameter.requirement && (/^required$/i.test(parameter.requirement)
|
|
25
|
+
? <span class="ui-badge" data-size="sm">{parameter.requirement}</span>
|
|
26
|
+
: <small>{parameter.requirement}</small>)}
|
|
27
|
+
</dt>
|
|
28
|
+
<dd><p><RenderNode node={parameter.description} /></p></dd>
|
|
29
|
+
</div>)}
|
|
30
|
+
</dl>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
import DocumentCopyButton from '@master/internal-site/components/DocumentCopyButton.svelte'
|
|
3
|
+
import type { DocumentPromptProps } from '@master/internal-site/components/document-types.ts'
|
|
4
|
+
|
|
5
|
+
export type { DocumentPromptProps } from '@master/internal-site/components/document-types.ts'
|
|
6
|
+
|
|
7
|
+
type Props = DocumentPromptProps
|
|
8
|
+
|
|
9
|
+
/** Readable prose preserves its exact clipboard text while wrapping within the document. */
|
|
10
|
+
const { title, text } = Astro.props
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<figure class="ui-prompt" aria-label={title}>
|
|
14
|
+
<figcaption class="ui-code-bar"><span class="ui-code-file">{title}</span><DocumentCopyButton client:idle={{ timeout: 500 }} text={text} label={title} /></figcaption>
|
|
15
|
+
<p class="ui-prompt-body">{text}</p>
|
|
16
|
+
</figure>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
import '@master/internal-site/styles/system/data.css'
|
|
3
|
+
import type { DocumentValueRow } from '@master/internal-site/components/document-types.ts'
|
|
4
|
+
|
|
5
|
+
export type { DocumentValueRow } from '@master/internal-site/components/document-types.ts'
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
rows: DocumentValueRow[]
|
|
9
|
+
headingLevel?: 3 | 4
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** Compact, selectable reference facts. IDs belong to the visible row headings. */
|
|
13
|
+
const { rows, headingLevel = 3 } = Astro.props
|
|
14
|
+
const Heading = `h${headingLevel}` as const
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<dl class="ui-params">
|
|
18
|
+
{rows.map(row => <div>
|
|
19
|
+
<dt>
|
|
20
|
+
<Heading id={row.id}><a href={`#${row.id}`}>{row.title}</a></Heading>
|
|
21
|
+
{row.identifier && <small>{row.identifier}</small>}
|
|
22
|
+
</dt>
|
|
23
|
+
<dd>{row.values.map(({ label, value }) => <p><small>{label}</small> <code>{value}</code></p>)}</dd>
|
|
24
|
+
</div>)}
|
|
25
|
+
</dl>
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
export type { DocumentationIndexEntry, DocumentationIndexSection } from '@master/internal-site/components/document-types.ts'
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
import '@master/internal-site/styles/documentation-index.css'
|
|
7
|
+
import Link from '@master/internal-site/components/Link.svelte'
|
|
8
|
+
import { getSite } from '@master/internal-site/site'
|
|
9
|
+
import type { DocumentationIndexEntry, DocumentationIndexSection } from '@master/internal-site/components/document-types.ts'
|
|
10
|
+
|
|
11
|
+
interface SectionLink {
|
|
12
|
+
title: string
|
|
13
|
+
description: string
|
|
14
|
+
href: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let { name, sections, related, showDescriptions = false, idPrefix }: {
|
|
18
|
+
name: 'guide' | 'reference'
|
|
19
|
+
sections: DocumentationIndexSection[]
|
|
20
|
+
related: SectionLink
|
|
21
|
+
showDescriptions?: boolean
|
|
22
|
+
/** Scope anchor IDs when multiple catalogs are shown in one review. Omit on published indexes. */
|
|
23
|
+
idPrefix?: string
|
|
24
|
+
} = $props()
|
|
25
|
+
|
|
26
|
+
const { locale, t } = getSite()
|
|
27
|
+
const tw = locale === 'tw'
|
|
28
|
+
let alphabetical = $state(false)
|
|
29
|
+
const entries = $derived(sections.flatMap(section => section.groups.flatMap(group => group.entries)))
|
|
30
|
+
const letters = $derived(Map.groupBy([...entries].sort((a, b) => a.title.localeCompare(b.title)), entry => /^[a-z]/i.test(entry.title) ? entry.title[0].toUpperCase() : '#'))
|
|
31
|
+
const groupId = (section: DocumentationIndexSection, index: number) => section.groups[index].id ?? `${section.id}-group-${index + 1}`
|
|
32
|
+
const sectionIds = $derived(sections.flatMap(section => [section.id, ...section.groups.map((_, index) => groupId(section, index))]).join(','))
|
|
33
|
+
const panelId = (part: 'category' | 'alphabetical') => `${idPrefix ?? name}-${part}-index`
|
|
34
|
+
const letterId = (letter: string) => `${idPrefix ? `${idPrefix}-` : ''}index-${letter === '#' ? 'symbols' : letter.toLowerCase()}`
|
|
35
|
+
const letterHashPrefix = $derived(`#${idPrefix ? `${idPrefix}-` : ''}index-`)
|
|
36
|
+
const count = (section: DocumentationIndexSection) => section.groups.reduce((total, group) => total + group.entries.length, 0)
|
|
37
|
+
const ordinal = (index: number) => String(index + 1).padStart(2, '0')
|
|
38
|
+
|
|
39
|
+
$effect(() => {
|
|
40
|
+
const prefix = letterHashPrefix
|
|
41
|
+
const ids = sectionIds.split(',')
|
|
42
|
+
function syncView() {
|
|
43
|
+
if (location.hash.startsWith(prefix) && /^(symbols|[a-z])$/.test(location.hash.slice(prefix.length))) alphabetical = true
|
|
44
|
+
else if (ids.includes(location.hash.slice(1))) alphabetical = false
|
|
45
|
+
}
|
|
46
|
+
syncView()
|
|
47
|
+
window.addEventListener('hashchange', syncView)
|
|
48
|
+
return () => window.removeEventListener('hashchange', syncView)
|
|
49
|
+
})
|
|
50
|
+
$effect(() => {
|
|
51
|
+
void alphabetical
|
|
52
|
+
const target = document.getElementById(location.hash.slice(1))
|
|
53
|
+
if (target && !target.closest('[hidden]')) target.scrollIntoView({ block: 'start' })
|
|
54
|
+
})
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<!-- Described entries read as ruled rows with their summary; bare titles stay a quiet list of links. -->
|
|
58
|
+
{#snippet entryLinks(entries: DocumentationIndexEntry[], { columns = false, showCategory = false, showDescriptions = false } = {})}
|
|
59
|
+
<ul class="documentation-index-links" data-columns={columns || undefined} data-described={showDescriptions || undefined}>
|
|
60
|
+
{#each entries as entry (entry.id)}
|
|
61
|
+
<li>
|
|
62
|
+
<Link href={entry.url} disabled={entry.disabled} unfinished={entry.unfinished}>
|
|
63
|
+
<b>{entry.displayTitle || entry.title}</b>
|
|
64
|
+
{#if showDescriptions && entry.description}<span>{t(entry.description)}</span>{/if}
|
|
65
|
+
{#if showCategory}<small>{t(entry.category)}</small>{/if}
|
|
66
|
+
</Link>
|
|
67
|
+
</li>
|
|
68
|
+
{/each}
|
|
69
|
+
</ul>
|
|
70
|
+
{/snippet}
|
|
71
|
+
|
|
72
|
+
<div class="documentation-index">
|
|
73
|
+
<!-- A contents list, not a second catalog: each section by its number, name and size; the sibling index closes it. -->
|
|
74
|
+
<nav class="documentation-index-directory" aria-label={tw ? `${name === 'guide' ? 'Guide' : 'Reference'} 分區` : `${name === 'guide' ? 'Guide' : 'Reference'} sections`}>
|
|
75
|
+
{#each sections as section, index (section.id)}
|
|
76
|
+
<a href={`#${section.id}`} onclick={() => alphabetical = false}>
|
|
77
|
+
<small>{ordinal(index)}</small>
|
|
78
|
+
<b>{section.title}</b>
|
|
79
|
+
<span class="documentation-index-count">{count(section)}</span>
|
|
80
|
+
</a>
|
|
81
|
+
{/each}
|
|
82
|
+
<Link href={related.href} data-related="">
|
|
83
|
+
<small aria-hidden="true">→</small>
|
|
84
|
+
<b>{related.title}</b>
|
|
85
|
+
<span>{related.description}</span>
|
|
86
|
+
</Link>
|
|
87
|
+
</nav>
|
|
88
|
+
|
|
89
|
+
<div class="documentation-index-toolbar">
|
|
90
|
+
<p>{tw ? (name === 'guide' ? '所有教學' : '所有條目') : (name === 'guide' ? 'All guides' : 'All entries')} <span class="documentation-index-count">{entries.length}</span></p>
|
|
91
|
+
<div class="ui-segmented" data-variant="underline" role="group" aria-label={tw ? '索引顯示方式' : 'Index view'}>
|
|
92
|
+
<button type="button" aria-pressed={!alphabetical} aria-controls={panelId('category')} onclick={() => alphabetical = false}>{tw ? '依分類' : 'By category'}</button>
|
|
93
|
+
<button type="button" aria-pressed={alphabetical} aria-controls={panelId('alphabetical')} onclick={() => alphabetical = true}>A–Z</button>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<div id={panelId('category')} hidden={alphabetical}>
|
|
98
|
+
{#each sections as section, sectionIndex (section.id)}
|
|
99
|
+
<section class="documentation-index-section" aria-labelledby={section.id}>
|
|
100
|
+
<header>
|
|
101
|
+
<small aria-hidden="true">{ordinal(sectionIndex)}</small>
|
|
102
|
+
<h2 id={section.id}>{section.title} <span class="documentation-index-count">{count(section)}</span></h2>
|
|
103
|
+
<p>{section.description}</p>
|
|
104
|
+
{#if section.groups.length > 1}
|
|
105
|
+
<nav class="documentation-index-groups" aria-label={tw ? `${section.title}分類` : `${section.title} categories`}>
|
|
106
|
+
{#each section.groups as group, index (groupId(section, index))}
|
|
107
|
+
<a href={`#${groupId(section, index)}`}>{group.title}</a>
|
|
108
|
+
{/each}
|
|
109
|
+
</nav>
|
|
110
|
+
{/if}
|
|
111
|
+
</header>
|
|
112
|
+
{#if section.groups.length === 1}
|
|
113
|
+
{@render entryLinks(section.groups[0].entries, { columns: !showDescriptions, showDescriptions })}
|
|
114
|
+
{:else}
|
|
115
|
+
<div class="documentation-index-categories">
|
|
116
|
+
{#each section.groups as group, index (groupId(section, index))}
|
|
117
|
+
<section aria-labelledby={groupId(section, index)}>
|
|
118
|
+
<h3 id={groupId(section, index)}>{group.title} <span class="documentation-index-count">{group.entries.length}</span></h3>
|
|
119
|
+
{@render entryLinks(group.entries, { columns: true })}
|
|
120
|
+
</section>
|
|
121
|
+
{/each}
|
|
122
|
+
</div>
|
|
123
|
+
{/if}
|
|
124
|
+
</section>
|
|
125
|
+
{/each}
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
<div id={panelId('alphabetical')} hidden={!alphabetical}>
|
|
129
|
+
<nav class="documentation-index-letters" aria-label={tw ? '依字母跳轉' : 'Jump to a letter'}>
|
|
130
|
+
{#each [...letters.keys()] as letter (letter)}
|
|
131
|
+
<a href={`#${letterId(letter)}`}>{letter}</a>
|
|
132
|
+
{/each}
|
|
133
|
+
</nav>
|
|
134
|
+
<!-- A book's index: letters run in columns, each title followed by its section. -->
|
|
135
|
+
<div class="documentation-index-alphabet">
|
|
136
|
+
{#each [...letters] as [letter, documents] (letter)}
|
|
137
|
+
<section aria-labelledby={letterId(letter)}>
|
|
138
|
+
<h2 id={letterId(letter)}>{letter}</h2>
|
|
139
|
+
{@render entryLinks(documents, { showCategory: true })}
|
|
140
|
+
</section>
|
|
141
|
+
{/each}
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
interface Props {
|
|
3
|
+
p1?: string
|
|
4
|
+
p2?: string
|
|
5
|
+
target?: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
let { p1, p2, target } = Astro.props
|
|
9
|
+
if (p1 && p2) {
|
|
10
|
+
p1 = p1.trim()
|
|
11
|
+
p2 = p2.trim()
|
|
12
|
+
if (target === 'class') {
|
|
13
|
+
p1 = p1.replace(/.*class="(.*)".*/gm, '$1')
|
|
14
|
+
p2 = p2.replace(/.*class="(.*)".*/gm, '$1')
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
{p1 && p2 && <small class="(font-weight:var(--ui-weight-medium)) text-success">↓ {
|
|
20
|
+
Math.round(Math.abs((p1.length - p2.length) / p1.length) * 100)
|
|
21
|
+
}% code</small>}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte'
|
|
3
|
+
import IconChevronDown from '@tabler/icons-svelte-runes/icons/chevron-down'
|
|
4
|
+
import { getSite } from '../site'
|
|
5
|
+
|
|
6
|
+
/** A long surface clamped under a canvas fade; one quiet control shows the rest. */
|
|
7
|
+
let { children }: { children?: Snippet } = $props()
|
|
8
|
+
let expanded = $state(false)
|
|
9
|
+
const id = $props.id()
|
|
10
|
+
const { t } = getSite()
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div class="ui-expand" data-expanded={expanded}>
|
|
14
|
+
<div {id}>{@render children?.()}</div>
|
|
15
|
+
<div class="ui-expand-control">
|
|
16
|
+
<button type="button" class="ui-button" data-size="sm" aria-expanded={expanded} aria-controls={id} onclick={() => { expanded = !expanded }}>
|
|
17
|
+
{t(expanded ? 'Collapse' : 'Expand')}
|
|
18
|
+
<IconChevronDown aria-hidden="true" stroke={1.5} />
|
|
19
|
+
</button>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
import FileIcon from './FileIcon.astro'
|
|
3
|
+
import FolderSvg from '../../public/icons/folder.svg'
|
|
4
|
+
|
|
5
|
+
declare type ExplorerViewItemOption = {
|
|
6
|
+
name: string
|
|
7
|
+
children?: ExplorerViewItemOption[]
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
/** The tree's entries; folders list theirs as `children`. */
|
|
12
|
+
items: ExplorerViewItemOption[]
|
|
13
|
+
/** Nested folders render their list alone, without the `ui-tree` frame. */
|
|
14
|
+
nested?: boolean
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** A file tree (`ui-tree`): names in mono, nested folders on hairline guides. */
|
|
18
|
+
const { items, nested } = Astro.props
|
|
19
|
+
const extOf = (name: string) => name.includes('.') ? name.split('.').pop() : ''
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
{nested
|
|
23
|
+
? <ul>
|
|
24
|
+
{items.map((option) => {
|
|
25
|
+
const ext = extOf(option.name)
|
|
26
|
+
return (
|
|
27
|
+
<li>
|
|
28
|
+
<div>
|
|
29
|
+
{ext ? <FileIcon name={option.name} ext={ext} aria-hidden="true" /> : <FolderSvg aria-hidden="true" />}
|
|
30
|
+
<b>{option.name}</b>
|
|
31
|
+
</div>
|
|
32
|
+
{option.children?.length ? <Astro.self items={option.children} nested /> : null}
|
|
33
|
+
</li>
|
|
34
|
+
)
|
|
35
|
+
})}
|
|
36
|
+
</ul>
|
|
37
|
+
: <div class="ui-tree"><Astro.self items={items} nested /></div>}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from 'astro/types'
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
name: string
|
|
6
|
+
ext?: string
|
|
7
|
+
lang?: string
|
|
8
|
+
} & Omit<HTMLAttributes<'img'>, 'src' | 'alt'>
|
|
9
|
+
|
|
10
|
+
const { name, ext, lang, ...props } = Astro.props
|
|
11
|
+
let icon = ''
|
|
12
|
+
if (name) {
|
|
13
|
+
switch (true) {
|
|
14
|
+
case name.includes('react'):
|
|
15
|
+
icon = 'tsx'
|
|
16
|
+
break
|
|
17
|
+
case name.includes('eslint.config'):
|
|
18
|
+
case name.includes('.eslintrc'):
|
|
19
|
+
icon = 'eslint'
|
|
20
|
+
break
|
|
21
|
+
case name.includes('.component.'):
|
|
22
|
+
case name.includes('angular'):
|
|
23
|
+
case name == 'angular.json':
|
|
24
|
+
icon = 'angular'
|
|
25
|
+
break
|
|
26
|
+
case name.includes('Tailwind'):
|
|
27
|
+
case name.includes('tailwind.config'):
|
|
28
|
+
icon = 'tailwindcss'
|
|
29
|
+
break
|
|
30
|
+
case name.endsWith('blade.php'):
|
|
31
|
+
icon = 'laravel'
|
|
32
|
+
break
|
|
33
|
+
case name === 'PHP':
|
|
34
|
+
icon = 'php'
|
|
35
|
+
break
|
|
36
|
+
case name.includes('astro'):
|
|
37
|
+
icon = 'astro'
|
|
38
|
+
break
|
|
39
|
+
case name.includes('vue'):
|
|
40
|
+
case name.endsWith('vue'):
|
|
41
|
+
icon = 'vue'
|
|
42
|
+
break
|
|
43
|
+
case name == 'npx':
|
|
44
|
+
icon = 'npm'
|
|
45
|
+
break
|
|
46
|
+
case name === 'HTML':
|
|
47
|
+
icon = 'html'
|
|
48
|
+
break
|
|
49
|
+
case name === 'CSS':
|
|
50
|
+
icon = 'css'
|
|
51
|
+
break
|
|
52
|
+
case name.includes('json'):
|
|
53
|
+
icon = 'json'
|
|
54
|
+
break
|
|
55
|
+
case name.includes('webpack'):
|
|
56
|
+
icon = 'webpack'
|
|
57
|
+
break
|
|
58
|
+
case name.includes('vite'):
|
|
59
|
+
case name.startsWith('Vite'):
|
|
60
|
+
icon = 'vite'
|
|
61
|
+
break
|
|
62
|
+
case name.includes('master'):
|
|
63
|
+
case name.includes('Master'):
|
|
64
|
+
icon = 'master'
|
|
65
|
+
break
|
|
66
|
+
case name.includes('next.config'):
|
|
67
|
+
icon = 'nextConfig'
|
|
68
|
+
break
|
|
69
|
+
case name.includes('nuxt.config'):
|
|
70
|
+
icon = 'nuxtjs'
|
|
71
|
+
break
|
|
72
|
+
case name.includes('Bootstrap'):
|
|
73
|
+
icon = 'bootstrap'
|
|
74
|
+
break
|
|
75
|
+
case name.includes('.'):
|
|
76
|
+
icon = name.slice(name.lastIndexOf('.') + 1)
|
|
77
|
+
break
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
const icons = {
|
|
81
|
+
svelte: '/icons/svelte.svg',
|
|
82
|
+
angular: '/icons/angular.svg',
|
|
83
|
+
astro: '/icons/astro.svg',
|
|
84
|
+
php: '/icons/php.svg',
|
|
85
|
+
eslint: '/icons/eslint.svg',
|
|
86
|
+
ts: '/icons/typescript.svg',
|
|
87
|
+
js: '/icons/javascript.svg',
|
|
88
|
+
tsx: '/icons/react.svg',
|
|
89
|
+
jsx: '/icons/react.svg',
|
|
90
|
+
css: '/icons/css.svg',
|
|
91
|
+
html: '/icons/html.svg',
|
|
92
|
+
npm: '/icons/npm.svg',
|
|
93
|
+
yarn: '/icons/yarn.svg',
|
|
94
|
+
pnpm: '/icons/pnpm.svg',
|
|
95
|
+
bun: '/icons/bun.svg',
|
|
96
|
+
deno: '/icons/deno.svg',
|
|
97
|
+
laravel: '/icons/laravel.svg',
|
|
98
|
+
vue: '/icons/vue.svg',
|
|
99
|
+
json: '/icons/json.svg',
|
|
100
|
+
master: '/brand/v2/logo/mark/master-mark-small-on-dark.svg',
|
|
101
|
+
webpack: '/icons/webpack.svg',
|
|
102
|
+
styledComponent: '/images/styled-components.svg',
|
|
103
|
+
tailwindcss: '/images/tailwindcss.svg',
|
|
104
|
+
nextjs: '/images/frameworks/nextjs.svg',
|
|
105
|
+
nuxtjs: '/images/frameworks/nuxtjs.svg',
|
|
106
|
+
parcel: '/images/build-tools/parcel.svg',
|
|
107
|
+
reactFramework: '/images/frameworks/react.svg',
|
|
108
|
+
angularFramework: '/images/frameworks/angular.svg',
|
|
109
|
+
remix: '/images/frameworks/remix.svg',
|
|
110
|
+
vite: '/images/build-tools/vite.svg',
|
|
111
|
+
vuejs: '/images/frameworks/vuejs.svg',
|
|
112
|
+
webpackBuildTool: '/images/build-tools/webpack.svg',
|
|
113
|
+
nextConfig: '/icons/next.svg',
|
|
114
|
+
bootstrap: '/images/bootstrap.svg'
|
|
115
|
+
} as Record<string, string>
|
|
116
|
+
let source = icons[icon]
|
|
117
|
+
if (!source) source = icons[name]
|
|
118
|
+
if (!source && ext) source = icons[ext]
|
|
119
|
+
if (!source && lang) source = icons[lang]
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
{/* Public file badges have fixed colors and do not need an SVG component. */}
|
|
123
|
+
{source && <img {...props} src={source} alt="" />}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import type { Snippet } from 'svelte'
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements'
|
|
4
|
+
|
|
5
|
+
export interface FooterLink {
|
|
6
|
+
name: string
|
|
7
|
+
href?: string
|
|
8
|
+
disabled?: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface FooterNavGroup {
|
|
12
|
+
name: string
|
|
13
|
+
links: FooterLink[]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface FooterProps extends HTMLAttributes<HTMLElement> {
|
|
17
|
+
navGroups?: FooterNavGroup[]
|
|
18
|
+
/** Replaces the notice; from Astro, a `copyright` slot. */
|
|
19
|
+
copyright?: Snippet
|
|
20
|
+
}
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<script lang="ts">
|
|
24
|
+
import '../../styles/docs-shell/footer.css'
|
|
25
|
+
import clsx from 'clsx'
|
|
26
|
+
import Link from './Link.svelte'
|
|
27
|
+
import LanguageSelect from './LanguageSelect.svelte'
|
|
28
|
+
import ThemeSelect from './ThemeSelect.svelte'
|
|
29
|
+
import { useThemeMode } from '../contexts/theme-mode.svelte'
|
|
30
|
+
import IconChevronDown from '@tabler/icons-svelte-runes/icons/chevron-down'
|
|
31
|
+
import IconDeviceDesktop from '@tabler/icons-svelte-runes/icons/device-desktop'
|
|
32
|
+
import IconLanguage from '@tabler/icons-svelte-runes/icons/language'
|
|
33
|
+
import IconMoon from '@tabler/icons-svelte-runes/icons/moon'
|
|
34
|
+
import IconSun from '@tabler/icons-svelte-runes/icons/sun'
|
|
35
|
+
import { getSite } from '../site'
|
|
36
|
+
|
|
37
|
+
/** The site footer: link groups (legal links among them), then one quiet row: the notice, and the theme and language
|
|
38
|
+
* preferences shown by an icon and their value alone (the selects carry their names). */
|
|
39
|
+
let { navGroups = [], copyright, class: className, ...props }: FooterProps = $props()
|
|
40
|
+
const themeMode = useThemeMode()
|
|
41
|
+
const { locale, i18n, t } = getSite()
|
|
42
|
+
const localeName = i18n.nameOfLocale[locale] ?? locale
|
|
43
|
+
// The preference is read on the client; the server and the first paint show the default.
|
|
44
|
+
const preference = $derived(themeMode.preference ?? 'system')
|
|
45
|
+
const ThemeIcon = $derived(preference === 'light' ? IconSun : preference === 'dark' ? IconMoon : IconDeviceDesktop)
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<footer {...props} class={clsx('ui-footer', className)}>
|
|
49
|
+
<nav aria-label={t('Footer')} class="ui-footer-nav">
|
|
50
|
+
{#each navGroups as group (group.name)}
|
|
51
|
+
<div class="ui-footer-group">
|
|
52
|
+
<h2>{t(group.name)}</h2>
|
|
53
|
+
<ul>
|
|
54
|
+
{#each group.links as link (link.href || link.name)}
|
|
55
|
+
<li>
|
|
56
|
+
<Link href={link.href} disabled={link.disabled}>{t(link.name)}</Link>
|
|
57
|
+
</li>
|
|
58
|
+
{/each}
|
|
59
|
+
</ul>
|
|
60
|
+
</div>
|
|
61
|
+
{/each}
|
|
62
|
+
</nav>
|
|
63
|
+
<div class="ui-footer-legal">
|
|
64
|
+
<p class="ui-footer-notice">{#if copyright}{@render copyright()}{:else}© {new Date().getFullYear()} Aoyue Design LLC.{/if}</p>
|
|
65
|
+
<label class="ui-footer-preference">
|
|
66
|
+
<ThemeIcon aria-hidden="true" stroke={1.5} />
|
|
67
|
+
{t(preference.charAt(0).toUpperCase() + preference.slice(1))}
|
|
68
|
+
<ThemeSelect aria-label={t('Theme')} />
|
|
69
|
+
<IconChevronDown aria-hidden="true" stroke={1.5} />
|
|
70
|
+
</label>
|
|
71
|
+
{#if i18n.locales.length > 1}
|
|
72
|
+
<label class="ui-footer-preference">
|
|
73
|
+
<IconLanguage aria-hidden="true" stroke={1.5} />
|
|
74
|
+
{localeName}
|
|
75
|
+
<LanguageSelect aria-label={t('Language')} />
|
|
76
|
+
<IconChevronDown aria-hidden="true" stroke={1.5} />
|
|
77
|
+
</label>
|
|
78
|
+
{/if}
|
|
79
|
+
</div>
|
|
80
|
+
</footer>
|