@master/internal-site 0.0.0-stage → 0.1.0
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 +66 -2
- package/dist/astro.d.mts +3 -0
- package/dist/astro.mjs +510 -0
- package/dist/config.d.mts +64 -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 +66 -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 +87 -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 +95 -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 +18 -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 +1077 -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 +69 -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,15 @@
|
|
|
1
|
+
const entities: Record<string, string> = { '&': '&', '<': '<', '>': '>', '"': '"', ''': "'", ''': "'" }
|
|
2
|
+
|
|
3
|
+
interface Slots {
|
|
4
|
+
has(name: string): boolean
|
|
5
|
+
render(name: string): Promise<string>
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The text an Astro component received as a slot, such as the source in
|
|
10
|
+
* `<Code lang="html">{`<div>`}</Code>`. Astro escapes text children; this restores them.
|
|
11
|
+
*/
|
|
12
|
+
export async function slotText(slots: Slots, name = 'default') {
|
|
13
|
+
if (!slots.has(name)) return undefined
|
|
14
|
+
return (await slots.render(name)).replace(/&(?:amp|lt|gt|quot|#39|#x27);/g, (entity) => entities[entity])
|
|
15
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
let lastSnackbarClose: (() => void) | null
|
|
2
|
+
|
|
3
|
+
export async function snackbar(text: string, { placement }: any = {}) {
|
|
4
|
+
if (lastSnackbarClose) {
|
|
5
|
+
lastSnackbarClose()
|
|
6
|
+
lastSnackbarClose = null
|
|
7
|
+
}
|
|
8
|
+
// A floating `ui-sheet`; placement is inline so a message never needs a utility class the page has not generated.
|
|
9
|
+
const element = document.createElement('div')
|
|
10
|
+
element.className = 'ui-sheet'
|
|
11
|
+
element.dataset.elevation = '3'
|
|
12
|
+
element.setAttribute('role', 'status')
|
|
13
|
+
Object.assign(element.style, {
|
|
14
|
+
position: 'fixed', left: '0', right: '0', [placement === 'top' ? 'top' : 'bottom']: '20px', zIndex: '1060',
|
|
15
|
+
width: 'fit-content', maxWidth: 'calc(100vw - 2rem)', margin: 'auto', padding: '.625rem 1rem', overflowWrap: 'anywhere',
|
|
16
|
+
color: 'var(--ui-text-strong)', fontSize: '.75rem', lineHeight: '1.5', cursor: 'pointer'
|
|
17
|
+
})
|
|
18
|
+
element.innerHTML = text
|
|
19
|
+
document.body.appendChild(element)
|
|
20
|
+
let closed = false
|
|
21
|
+
const close = lastSnackbarClose = async () => {
|
|
22
|
+
if (closed) return
|
|
23
|
+
closed = true
|
|
24
|
+
await element.animate([
|
|
25
|
+
{ opacity: 1 },
|
|
26
|
+
{ opacity: 0 }
|
|
27
|
+
], { duration: 100 }).finished
|
|
28
|
+
element.remove()
|
|
29
|
+
}
|
|
30
|
+
element.onclick = close
|
|
31
|
+
if (!matchMedia('(prefers-reduced-motion: reduce)').matches) await element.animate([
|
|
32
|
+
{ transform: 'translateY(100%) scale(0)', opacity: 0 },
|
|
33
|
+
{ transform: 'translateY(0%) scale(1)', opacity: 1 }
|
|
34
|
+
], {
|
|
35
|
+
duration: 200,
|
|
36
|
+
easing: 'ease'
|
|
37
|
+
}).finished
|
|
38
|
+
setTimeout(close, 3000)
|
|
39
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ThemeRegistration } from 'shiki/core'
|
|
2
|
+
|
|
3
|
+
/** Presentation only: native grammars and the Master CSS adapter share these scopes. */
|
|
4
|
+
const syntaxTheme = {
|
|
5
|
+
name: 'master-site',
|
|
6
|
+
type: 'dark',
|
|
7
|
+
colors: {
|
|
8
|
+
'editor.foreground': 'var(--ui-code-text)',
|
|
9
|
+
'editor.background': 'var(--ui-surface-code)'
|
|
10
|
+
},
|
|
11
|
+
tokenColors: [
|
|
12
|
+
{ scope: ['variable', 'meta.embedded'], settings: { foreground: 'var(--ui-code-text)' } },
|
|
13
|
+
{ scope: ['keyword', 'storage'], settings: { foreground: 'var(--ui-code-keyword)' } },
|
|
14
|
+
{ scope: ['punctuation', 'meta.brace', 'keyword.operator'], settings: { foreground: 'var(--ui-code-punctuation)' } },
|
|
15
|
+
{
|
|
16
|
+
// Word operators read as keywords, not symbols.
|
|
17
|
+
scope: ['keyword.operator.new', 'keyword.operator.expression', 'keyword.operator.word', 'keyword.operator.logical.feature', 'keyword.operator.logical.and.media', 'keyword.operator.logical.not.media', 'keyword.operator.logical.only.media', 'keyword.operator.logical.to'],
|
|
18
|
+
settings: { foreground: 'var(--ui-code-keyword)' }
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
scope: ['entity.name', 'support.function', 'support.type', 'support.class', 'entity.other.inherited-class'],
|
|
22
|
+
settings: { foreground: 'var(--ui-code-function)' }
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
scope: ['entity.other.attribute-name', 'support.type.property-name', 'support.variable.property', 'variable.other.property', 'variable.object.property', 'variable.other.key', 'meta.object-literal.key', 'meta.mapping.key'],
|
|
26
|
+
settings: { foreground: 'var(--ui-code-property)' }
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
scope: ['string', 'punctuation.definition.string', 'support.constant.property-value', 'support.constant.font-name', 'support.constant.color', 'support.constant.media', 'constant.other.color'],
|
|
30
|
+
settings: { foreground: 'var(--ui-code-string)' }
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
scope: ['constant.numeric', 'constant.language', 'constant.character', 'keyword.other.unit', 'entity.other.keyframe-offset.percentage'],
|
|
34
|
+
settings: { foreground: 'var(--ui-code-number)' }
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
scope: ['entity.other.attribute-name.class', 'entity.other.attribute-name.id'],
|
|
38
|
+
settings: { foreground: 'var(--ui-code-function)' }
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
scope: ['entity.other.attribute-name.pseudo-class', 'entity.other.attribute-name.pseudo-element', 'entity.other.keyframe-offset', 'keyword.other.important', 'keyword.operator.important', 'punctuation.definition.keyword'],
|
|
42
|
+
settings: { foreground: 'var(--ui-code-keyword)' }
|
|
43
|
+
},
|
|
44
|
+
{ scope: ['comment', 'punctuation.definition.comment', 'string.quoted.docstring.multi'], settings: { foreground: 'var(--ui-code-comment)' } },
|
|
45
|
+
{ scope: ['markup.heading', 'markup.bold'], settings: { foreground: 'var(--ui-code-function)' } },
|
|
46
|
+
{ scope: ['markup.inline', 'markup.raw', 'markup.underline.link'], settings: { foreground: 'var(--ui-code-string)' } },
|
|
47
|
+
{ scope: 'markup.inserted', settings: { foreground: 'var(--ui-status-success)' } },
|
|
48
|
+
// Grammar `invalid` scopes flag valid docs code such as custom elements and `<hash>` placeholders; they keep their host role.
|
|
49
|
+
{ scope: 'markup.deleted', settings: { foreground: 'var(--ui-status-danger)' } }
|
|
50
|
+
]
|
|
51
|
+
} satisfies ThemeRegistration
|
|
52
|
+
|
|
53
|
+
export default syntaxTheme
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import type { Element, ElementContent, Text } from 'hast'
|
|
2
|
+
import type { ShikiTransformer } from 'shiki/core'
|
|
3
|
+
|
|
4
|
+
/** `@MARK` wraps words in a plain `<mark>`; `@WARN` and `@ERROR` add a diagnostic tone (`ui-code` styles both). */
|
|
5
|
+
const controlTones = {
|
|
6
|
+
MARK: undefined,
|
|
7
|
+
WARN: 'warning',
|
|
8
|
+
ERROR: 'danger'
|
|
9
|
+
} as const
|
|
10
|
+
|
|
11
|
+
type ControlKind = keyof typeof controlTones
|
|
12
|
+
type Tone = typeof controlTones[ControlKind]
|
|
13
|
+
|
|
14
|
+
export default function transformerNotationWordMark(): ShikiTransformer {
|
|
15
|
+
return {
|
|
16
|
+
name: 'word-mark',
|
|
17
|
+
code(ast) {
|
|
18
|
+
let lines = ast.children.filter((i) => i.type === 'element')
|
|
19
|
+
let toRemove = new Set<ElementContent>()
|
|
20
|
+
let toHighlight = new Map<string, Tone>()
|
|
21
|
+
|
|
22
|
+
for (let line of lines) {
|
|
23
|
+
let highlights = parseHighlightDirectives(line)
|
|
24
|
+
if (highlights.length) {
|
|
25
|
+
toRemove.add(line)
|
|
26
|
+
for (let highlight of highlights) {
|
|
27
|
+
for (let mark of highlight.marks) {
|
|
28
|
+
toHighlight.set(mark, highlight.tone)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
continue
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (toHighlight.size === 0) continue
|
|
35
|
+
|
|
36
|
+
for (let [mark, tone] of toHighlight) {
|
|
37
|
+
applyCrossChildMarkHighlight(line, mark, tone)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
ast.children = ast.children.filter((i) => !toRemove.has(i))
|
|
42
|
+
},
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function applyCrossChildMarkHighlight(line: Element, mark: string, tone: Tone) {
|
|
47
|
+
let textFragments: { el: Element; text: string; index: number; start: number; end: number }[] = []
|
|
48
|
+
let currentPos = 0
|
|
49
|
+
line.children.forEach((child, index) => {
|
|
50
|
+
if (child.type === 'element' && (child.tagName === 'div' || child.tagName === 'span')) {
|
|
51
|
+
const text = getTextContent(child)
|
|
52
|
+
textFragments.push({ el: child, text, index, start: currentPos, end: currentPos + text.length })
|
|
53
|
+
currentPos += text.length
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
const combinedText = textFragments.map((f) => f.text).join('')
|
|
58
|
+
const startIndex = combinedText.indexOf(mark)
|
|
59
|
+
if (startIndex === -1) return
|
|
60
|
+
|
|
61
|
+
const markEnd = startIndex + mark.length
|
|
62
|
+
const replacements = new Map<number, { before?: Element, marked: Element, after?: Element }>()
|
|
63
|
+
for (const fragment of textFragments) {
|
|
64
|
+
const overlapStart = Math.max(startIndex, fragment.start)
|
|
65
|
+
const overlapEnd = Math.min(markEnd, fragment.end)
|
|
66
|
+
if (overlapStart >= overlapEnd) continue
|
|
67
|
+
const start = overlapStart - fragment.start
|
|
68
|
+
const end = overlapEnd - fragment.start
|
|
69
|
+
replacements.set(fragment.index, {
|
|
70
|
+
before: start > 0 ? cloneElementWithText(fragment.el, fragment.text.slice(0, start)) : undefined,
|
|
71
|
+
marked: cloneElementWithText(fragment.el, fragment.text.slice(start, end)),
|
|
72
|
+
after: end < fragment.text.length ? cloneElementWithText(fragment.el, fragment.text.slice(end)) : undefined
|
|
73
|
+
})
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (replacements.size === 0) return
|
|
77
|
+
|
|
78
|
+
// The marked pieces of every token the words span share one <mark>, so it reads as one highlight.
|
|
79
|
+
const markElement: Element = { type: 'element', tagName: 'mark', properties: tone ? { dataTone: tone } : {}, children: [] }
|
|
80
|
+
const children: ElementContent[] = []
|
|
81
|
+
line.children.forEach((child, index) => {
|
|
82
|
+
const replacement = replacements.get(index)
|
|
83
|
+
if (!replacement) return void children.push(child)
|
|
84
|
+
if (replacement.before) children.push(replacement.before)
|
|
85
|
+
if (!markElement.children.length) children.push(markElement)
|
|
86
|
+
markElement.children.push(replacement.marked)
|
|
87
|
+
if (replacement.after) children.push(replacement.after)
|
|
88
|
+
})
|
|
89
|
+
line.children = children
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function cloneElementWithText(el: Element, text: string): Element {
|
|
93
|
+
const properties = { ...el.properties }
|
|
94
|
+
if (Array.isArray(properties.class)) properties.class = [...properties.class]
|
|
95
|
+
return { ...el, properties, children: [{ type: 'text', value: text } as Text] }
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const commentBash = /^\s*\#\s*(.*)$/
|
|
99
|
+
const commentHTML = /^\s*<!--\s*(.*)\s*-->$/
|
|
100
|
+
const commentLine = /^\s*\/\/\s*(.*)$/
|
|
101
|
+
const commentBlock = /^\s*\/\*\s*(.*?)\s*\*\/$/
|
|
102
|
+
const marksControlPattern = /@(?<kind>MARK|WARN|ERROR)\s+(?<marks>.+?)(?=\s*(?:-->|$))/g
|
|
103
|
+
|
|
104
|
+
interface Highlight {
|
|
105
|
+
marks: string[];
|
|
106
|
+
tone: Tone;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function parseHighlightDirectives(el: Element): Highlight[] {
|
|
110
|
+
let comment = getControlComment(el)
|
|
111
|
+
if (!comment) return []
|
|
112
|
+
|
|
113
|
+
let highlights: Highlight[] = []
|
|
114
|
+
let match: RegExpExecArray | null
|
|
115
|
+
marksControlPattern.lastIndex = 0
|
|
116
|
+
while ((match = marksControlPattern.exec(comment))) {
|
|
117
|
+
const kind = match.groups?.kind as ControlKind | undefined
|
|
118
|
+
const rawMarks = match.groups?.marks
|
|
119
|
+
if (!kind || !rawMarks) continue
|
|
120
|
+
let marks = rawMarks.split(/\s+/).filter(Boolean)
|
|
121
|
+
if (marks.length === 0) continue
|
|
122
|
+
|
|
123
|
+
highlights.push({ marks, tone: controlTones[kind] })
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return highlights
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function getControlComment(el: Element): string | null {
|
|
130
|
+
let text = getTextContent(el)
|
|
131
|
+
if (text === '') return null
|
|
132
|
+
let match = text.match(commentHTML) || text.match(commentLine) || text.match(commentBlock)
|
|
133
|
+
if (match) return match[1]
|
|
134
|
+
|
|
135
|
+
return null
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function getTextContent(element: ElementContent): string {
|
|
139
|
+
if (element.type === 'text') {
|
|
140
|
+
return element.value
|
|
141
|
+
}
|
|
142
|
+
if (element.type === 'element' && (element.tagName === 'div' || element.tagName === 'span' || element.tagName === 'mark')) {
|
|
143
|
+
return element.children.map(getTextContent).join('')
|
|
144
|
+
}
|
|
145
|
+
return ''
|
|
146
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const counters = new WeakMap<Request, number>()
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A page-unique, deterministic id for an Astro component, like React's `useId`:
|
|
5
|
+
* `const id = uniqueId(Astro, 'code-tabs')`. Svelte components use `$props.id()`.
|
|
6
|
+
*/
|
|
7
|
+
export function uniqueId(astro: { request: Request }, prefix = 'id') {
|
|
8
|
+
const index = counters.get(astro.request) ?? 0
|
|
9
|
+
counters.set(astro.request, index + 1)
|
|
10
|
+
return `${prefix}-${index}`
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
import '@master/internal-site/examples/scene.css'
|
|
3
|
+
import '@master/internal-site/examples/article-transitions/transitions.css'
|
|
4
|
+
import ArticleTransitionScene from '@master/internal-site/examples/components/ArticleTransitionScene.svelte'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<ArticleTransitionScene client:load />
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Image from '@master/internal-site/components/Image.svelte'
|
|
3
|
+
import IconArrowLeft from '@tabler/icons-svelte-runes/icons/arrow-left'
|
|
4
|
+
import IconArrowUpRight from '@tabler/icons-svelte-runes/icons/arrow-up-right'
|
|
5
|
+
import DemoLabel from '@master/internal-site/demo/DemoLabel.svelte'
|
|
6
|
+
import DemoSurface from '@master/internal-site/demo/DemoSurface.svelte'
|
|
7
|
+
import { useDemoViewTransition } from '@master/internal-site/demo/useDemoViewTransition.svelte.ts'
|
|
8
|
+
import articleAuroraImage from '@master/internal-site/examples/images/article-aurora.jpg'
|
|
9
|
+
import articleStudioImage from '@master/internal-site/examples/images/article-studio.jpg'
|
|
10
|
+
|
|
11
|
+
const articles = [
|
|
12
|
+
{
|
|
13
|
+
id: 'aurora',
|
|
14
|
+
title: 'Designing transitions that preserve context',
|
|
15
|
+
date: 'May 12, 2026',
|
|
16
|
+
description: 'A practical pattern for moving readers from a dense article feed into a focused story view.',
|
|
17
|
+
image: articleAuroraImage,
|
|
18
|
+
imageAlt: 'Green mountain ridge with a winding road',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: 'studio',
|
|
22
|
+
title: 'Building quieter detail pages',
|
|
23
|
+
date: 'May 9, 2026',
|
|
24
|
+
description: 'How shared element motion helps a page change feel intentional without adding visual noise.',
|
|
25
|
+
image: articleStudioImage,
|
|
26
|
+
imageAlt: 'Snowy mountain valley with yellow tents',
|
|
27
|
+
},
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
let selectedId = $state<string>()
|
|
31
|
+
const selected = $derived(articles.find(article => article.id === selectedId))
|
|
32
|
+
let heading = $state<HTMLHeadingElement>()
|
|
33
|
+
const buttons = new Map<string, HTMLButtonElement>()
|
|
34
|
+
const transition = useDemoViewTransition()
|
|
35
|
+
|
|
36
|
+
/** Keep each card's button so focus can return to it from the detail view. */
|
|
37
|
+
function cardButton(id: string) {
|
|
38
|
+
return (element: HTMLButtonElement) => {
|
|
39
|
+
buttons.set(id, element)
|
|
40
|
+
return () => { buttons.delete(id) }
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<main class="container-inline p-md bg-surface-base fg-text-body">
|
|
46
|
+
<div class="flex flex-wrap items-baseline justify-between gap-xs mb-md">
|
|
47
|
+
<DemoLabel>Field notes / Collection 01</DemoLabel>
|
|
48
|
+
<span class="text-xs fg-text-muted" role="status">{selected ? 'Article detail' : '2 articles'} · {transition.mode}</span>
|
|
49
|
+
</div>
|
|
50
|
+
{#if selected}
|
|
51
|
+
<article data-article-detail class="overflow-hidden ui-sheet" data-elevation="1">
|
|
52
|
+
<Image alt={selected.imageAlt} src={selected.image} loading="eager" sizes="(max-width: 600px) 100vw, 600px"
|
|
53
|
+
style={`view-transition-name:article-${selected.id}-image`} class="block h-auto w-full (aspect-ratio:16/9) object-cover article-capture" />
|
|
54
|
+
<div class="p-lg">
|
|
55
|
+
<time datetime={selected.id === 'aurora' ? '2026-05-12' : '2026-05-09'} style={`view-transition-name:article-${selected.id}-date`} class="text-xs fg-text-muted article-capture">{selected.date}</time>
|
|
56
|
+
<h1 bind:this={heading} tabindex="-1" style={`view-transition-name:article-${selected.id}-title`} class="mb(0) mt-sm text-2xl font-regular outline-solid:focus-visible outline(2):focus-visible outline-text-link:focus-visible outline-offset-4xs:focus-visible article-capture">{selected.title}</h1>
|
|
57
|
+
<p class="mb(0) mt-md text-sm fg-text-muted">{selected.description} The image, title and date keep their names in both views. Each snapshot can move to its new bounds while surrounding content fades.</p>
|
|
58
|
+
<button type="button" class="mt-lg ui-button" onclick={() => { const id = selected.id; transition.run(() => { selectedId = undefined }, () => buttons.get(id) ?? null) }}>
|
|
59
|
+
<IconArrowLeft aria-hidden="true" />Back to collection
|
|
60
|
+
</button>
|
|
61
|
+
</div>
|
|
62
|
+
</article>
|
|
63
|
+
{:else}
|
|
64
|
+
<div class="grid-cols(1) grid gap-md grid-cols(2)@container(width>=28rem)">
|
|
65
|
+
{#each articles as article (article.id)}
|
|
66
|
+
<DemoSurface elevation="raised" class="flex overflow-hidden flex-col">
|
|
67
|
+
<Image alt={article.imageAlt} src={article.image} loading="eager" sizes="(max-width: 600px) 100vw, 600px"
|
|
68
|
+
style={`view-transition-name:article-${article.id}-image`} class="block h-auto w-full (aspect-ratio:16/10) object-cover article-capture" />
|
|
69
|
+
<article class="flex flex-col (flex:1) p-md">
|
|
70
|
+
<time datetime={article.id === 'aurora' ? '2026-05-12' : '2026-05-09'} style={`view-transition-name:article-${article.id}-date`} class="text-xs fg-text-muted article-capture">{article.date}</time>
|
|
71
|
+
<h2 style={`view-transition-name:article-${article.id}-title`} class="mb(0) mt-xs text-lg font-regular article-capture">{article.title}</h2>
|
|
72
|
+
<p class="mb-md mt-sm text-sm fg-text-muted">{article.description}</p>
|
|
73
|
+
<button {@attach cardButton(article.id)}
|
|
74
|
+
type="button" class="self-start mt-auto ui-button" aria-label={`Read ${article.title}`}
|
|
75
|
+
onclick={() => transition.run(() => { selectedId = article.id }, () => heading ?? null)}>
|
|
76
|
+
Read article<IconArrowUpRight aria-hidden="true" />
|
|
77
|
+
</button>
|
|
78
|
+
</article>
|
|
79
|
+
</DemoSurface>
|
|
80
|
+
{/each}
|
|
81
|
+
</div>
|
|
82
|
+
{/if}
|
|
83
|
+
</main>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import DemoControls from '@master/internal-site/demo/DemoControls.svelte'
|
|
3
|
+
import DemoLabel from '@master/internal-site/demo/DemoLabel.svelte'
|
|
4
|
+
import DemoSurface from '@master/internal-site/demo/DemoSurface.svelte'
|
|
5
|
+
import { useDemoViewTransition } from '@master/internal-site/demo/useDemoViewTransition.svelte.ts'
|
|
6
|
+
|
|
7
|
+
const views = [
|
|
8
|
+
{ id: 'overview', title: 'Overview', label: 'Workspace / 01', body: 'A shared workspace for the next release. Keep the plan, the work and the details together.' },
|
|
9
|
+
{ id: 'product', title: 'Product detail', label: 'Workspace / 02', body: 'The same panel and heading move into the next visual state. Their snapshot names remain stable.' },
|
|
10
|
+
{ id: 'settings', title: 'Settings', label: 'Workspace / 03', body: 'Update the view in place. The interface stays usable when animation is unavailable or motion is reduced.' },
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
let activeId = $state('overview')
|
|
14
|
+
const active = $derived(views.find(view => view.id === activeId)!)
|
|
15
|
+
const transition = useDemoViewTransition()
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<main class="wrap-anywhere p-md bg-surface-base fg-text-body">
|
|
19
|
+
<DemoControls label="Choose a view" variant="segmented">
|
|
20
|
+
{#each views as view (view.id)}
|
|
21
|
+
<button type="button" aria-pressed={activeId === view.id}
|
|
22
|
+
onclick={() => { if (view.id !== activeId) transition.run(() => { activeId = view.id }) }}>{view.title}</button>
|
|
23
|
+
{/each}
|
|
24
|
+
</DemoControls>
|
|
25
|
+
<DemoSurface elevation="raised" class="mt-md p-lg view-panel">
|
|
26
|
+
<DemoLabel>{active.label}</DemoLabel>
|
|
27
|
+
<h1 class="mb(0) mt-sm text-2xl font-semibold view-heading">{active.title}</h1>
|
|
28
|
+
<p class="mb(0) mt-md text-sm fg-text-muted">{active.body}</p>
|
|
29
|
+
</DemoSurface>
|
|
30
|
+
<p class="mb(0) mt-sm text-xs fg-text-muted" role="status">{active.title} · {transition.mode}</p>
|
|
31
|
+
</main>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Bare examples import the system parts they render: sheets and specimens.
|
|
3
|
+
import '@master/internal-site/styles/system/surfaces.css'
|
|
4
|
+
import '@master/internal-site/styles/system/specimens.css'
|
|
5
|
+
import DemoItem from '@master/internal-site/demo/DemoItem.svelte'
|
|
6
|
+
import DemoLabel from '@master/internal-site/demo/DemoLabel.svelte'
|
|
7
|
+
import DemoSurface from '@master/internal-site/demo/DemoSurface.svelte'
|
|
8
|
+
|
|
9
|
+
const bars = [
|
|
10
|
+
['Mon', 80, '(height:35%)'], ['Tue', 130, '(height:56%)'], ['Wed', 100, '(height:43%)'],
|
|
11
|
+
['Thu', 160, '(height:69%)'], ['Fri', 120, '(height:52%)'], ['Sat', 190, '(height:82%)'],
|
|
12
|
+
] as const
|
|
13
|
+
const tasks = [['Audit onboarding', 'Today'], ['Review campaign', 'Thu'], ['Ship billing panel', 'Fri']]
|
|
14
|
+
const metrics = [['Revenue', '$128.4k', '+12.8% from last month'], ['Activation', '64.2%', '+4.1 percentage points']]
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<main class="(min-height:100dvh) p-md bg-surface-base fg-text-body">
|
|
18
|
+
<section data-workspace class="grid-cols(4) gap-sm w-full max-w-3xl mx-auto grid-cols(8)@2xs gap-md@2xs">
|
|
19
|
+
<header id="overview" class="flex flex-wrap grid-col-span(4) items-end justify-between gap-sm grid-col-span(8)@2xs">
|
|
20
|
+
<div><DemoLabel>Sample workspace / 024</DemoLabel><h1 class="mb(0) mx(0) mt-2xs text-xl font-regular fg-text-strong">Project overview</h1></div>
|
|
21
|
+
<DemoLabel>September 2026</DemoLabel>
|
|
22
|
+
</header>
|
|
23
|
+
<nav aria-label="Workspace sections" class="flex grid-col-span(4) gap-lg bb-solid bb(1) bb-line-divider grid-col-span(8)@2xs">
|
|
24
|
+
<a href="#metrics" class="py-xs text-sm (text-decoration:none) fg-text-muted fg-text-strong:hover">Metrics</a>
|
|
25
|
+
<a href="#demand" class="py-xs text-sm (text-decoration:none) fg-text-muted fg-text-strong:hover">Demand</a>
|
|
26
|
+
<a href="#launch-tasks" class="py-xs text-sm (text-decoration:none) fg-text-muted fg-text-strong:hover">Tasks</a>
|
|
27
|
+
</nav>
|
|
28
|
+
{metrics.map(([name, value, change], index) => <DemoSurface elevation="raised" id={index ? undefined : 'metrics'} class="grid-col-span(4) p-md grid-col-span(4)@2xs">
|
|
29
|
+
<DemoLabel>{name}</DemoLabel>
|
|
30
|
+
<div class="mt-xs text-2xl font-regular (font-variant-numeric:tabular-nums) fg-text-strong">{value}</div>
|
|
31
|
+
<div class="mt-2xs text-xs fg-text-muted">{change}</div>
|
|
32
|
+
</DemoSurface>)}
|
|
33
|
+
<DemoSurface elevation="raised" id="demand" class="flex flex-col grid-col-span(4) min-w(0) p-md grid-col-span(5)@2xs">
|
|
34
|
+
<figure class="flex flex-col grow(1) m(0)">
|
|
35
|
+
<figcaption class="text-sm font-regular fg-text-strong">Weekly demand</figcaption>
|
|
36
|
+
<p class="mb(0) mx(0) mt-3xs text-xs fg-text-muted">Sample requests per day</p>
|
|
37
|
+
<div class="grid-cols(6) grow(1) gap-xs min-h(160) mt-md">
|
|
38
|
+
{bars.map(([day, value, height]) => <div class="flex flex-col gap-2xs min-w(0) text-center">
|
|
39
|
+
<div class="flex flex-col grow(1) items-center justify-end gap-2xs bb-solid bb(1) bb-line-divider">
|
|
40
|
+
<span class="text-xs (font-variant-numeric:tabular-nums) fg-text-muted">{value}</span>
|
|
41
|
+
<DemoItem variant="solid" class={`${height} (width:56%) min-h(0) p(0) rtl-xs rtr-xs rbr(0) rbl(0)`} aria-hidden="true" />
|
|
42
|
+
</div>
|
|
43
|
+
<span class="text-xs fg-text-muted">{day}</span>
|
|
44
|
+
</div>)}
|
|
45
|
+
</div>
|
|
46
|
+
</figure>
|
|
47
|
+
</DemoSurface>
|
|
48
|
+
<DemoSurface elevation="raised" id="launch-tasks" class="grid-col-span(4) min-w(0) p-md grid-col-span(3)@2xs">
|
|
49
|
+
<h2 class="m(0) text-sm font-regular fg-text-strong">Launch tasks</h2>
|
|
50
|
+
<p class="mb(0) mx(0) mt-3xs text-xs fg-text-muted">Check off a task to try the controls.</p>
|
|
51
|
+
<div class="mt-sm">
|
|
52
|
+
{tasks.map(([task, date]) => <label class="flex items-start gap-xs py-sm bt-solid:not(:first-child) bt(1):not(:first-child) bt-line-divider:not(:first-child)">
|
|
53
|
+
<input type="checkbox" class="shrink(0) mt(4) accent-text-strong" />
|
|
54
|
+
<span class="(flex:1) min-w(0) text-sm font-regular">{task}<span class="block mt-3xs text-xs fg-text-muted">{date}</span></span>
|
|
55
|
+
</label>)}
|
|
56
|
+
</div>
|
|
57
|
+
</DemoSurface>
|
|
58
|
+
</section>
|
|
59
|
+
</main>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
import '@master/internal-site/examples/scene.css'
|
|
3
|
+
import '@master/internal-site/examples/view-transitions/transitions.css'
|
|
4
|
+
import ViewTransitionScene from '@master/internal-site/examples/components/ViewTransitionScene.svelte'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<ViewTransitionScene client:load />
|