@master/internal-site 0.1.2 → 0.2.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/README.md +43 -0
- package/dist/astro.mjs +233 -47
- package/dist/config.d.mts +6 -0
- package/dist/localization-LfIbIysE.mjs +356 -0
- package/dist/localization.d.mts +69 -0
- package/dist/localization.mjs +1 -0
- package/package.json +12 -9
- package/src/astro/content-pages.ts +30 -11
- package/src/astro/index.ts +11 -5
- package/src/astro/localized-mdx.ts +45 -0
- package/src/astro/routes.template.ts +4 -0
- package/src/astro/site-context.ts +10 -2
- package/src/astro/style-assets.ts +107 -0
- package/src/benchmarks/BenchmarkBarRows.astro +3 -2
- package/src/benchmarks/BenchmarkBars.astro +1 -1
- package/src/benchmarks/BenchmarkChart.astro +5 -1
- package/src/benchmarks/BenchmarkChartGroup.astro +1 -1
- package/src/benchmarks/BenchmarkDataTable.astro +1 -1
- package/src/benchmarks/BenchmarkFigure.astro +2 -1
- package/src/benchmarks/BenchmarkMetricTable.astro +2 -2
- package/src/benchmarks/BenchmarkMetrics.astro +1 -1
- package/src/benchmarks/BenchmarkSampleSummary.astro +1 -1
- package/src/benchmarks/BenchmarkScrollRegion.svelte +2 -1
- package/src/benchmarks/BenchmarkSource.astro +1 -1
- package/src/benchmarks/BenchmarkStackedBars.astro +4 -3
- package/src/benchmarks/BenchmarkStatus.astro +3 -1
- package/src/benchmarks/localization.ts +22 -0
- package/src/benchmarks/types.ts +2 -0
- package/src/blog/article/BlogArticleContents.svelte +1 -1
- package/src/blog/article/BlogArticleEnd.astro +6 -9
- package/src/blog/article/BlogArticleMasthead.astro +17 -9
- package/src/config.ts +3 -0
- package/src/css/NamespaceUtilityTable.astro +1 -1
- package/src/css/ThemeNumberVariableTable.astro +1 -1
- package/src/css/foundation-data/specimen-content.ts +2 -2
- package/src/css/markdown.ts +64 -14
- package/src/demo/Demo.svelte +10 -4
- package/src/demo/DemoAsset.astro +6 -3
- package/src/demo/DemoAxes.svelte +4 -2
- package/src/demo/DemoCatalog.astro +9 -6
- package/src/demo/DemoComparison.svelte +3 -0
- package/src/demo/DemoContainer.svelte +8 -3
- package/src/demo/DemoControls.svelte +5 -1
- package/src/demo/DemoCopyButton.svelte +9 -4
- package/src/demo/DemoCopyGroup.svelte +6 -2
- package/src/demo/DemoExample.astro +3 -1
- package/src/demo/DemoFeatureSupport.svelte +5 -1
- package/src/demo/DemoGeneratedCSS.svelte +5 -1
- package/src/demo/DemoIndex.astro +6 -3
- package/src/demo/DemoLegend.svelte +3 -1
- package/src/demo/DemoMeasure.svelte +4 -2
- package/src/demo/DemoMedia.svelte +3 -1
- package/src/demo/DemoMotion.svelte +6 -3
- package/src/demo/DemoPaletteGroups.svelte +4 -2
- package/src/demo/DemoScrollArea.svelte +2 -0
- package/src/demo/DemoStyleComparison.astro +6 -3
- package/src/demo/DemoSurface.svelte +2 -0
- package/src/demo/DemoThemeComparison.astro +5 -2
- package/src/demo/DemoTokenTable.astro +5 -3
- package/src/demo/DemoViewTransition.astro +3 -1
- package/src/demo/DemoViewport.svelte +18 -11
- package/src/demo/DemoWaterfall.astro +4 -2
- package/src/demo/ProjectStyleExample.astro +4 -1
- package/src/demo/foundations/FoundationDialog.astro +6 -2
- package/src/demo/foundations/FoundationMedia.astro +1 -0
- package/src/demo/foundations/FoundationShrink.astro +1 -0
- package/src/demo/foundations/FoundationTokensView.astro +16 -5
- package/src/demo/foundations/Palette.svelte +11 -7
- package/src/demo/foundations/dialog-copy.d.ts +1 -0
- package/src/demo/foundations/dialog-copy.js +5 -0
- package/src/demo/illustration-materials.ts +1 -1
- package/src/demo/illustration.css +218 -0
- package/src/docs-shell/common/i18n.config.d.ts +1 -1
- package/src/docs-shell/common/i18n.config.js +4 -12
- package/src/docs-shell/common/locales.d.ts +8 -0
- package/src/docs-shell/common/locales.js +18 -0
- package/src/docs-shell/common/terminology.json +32 -0
- package/src/docs-shell/common/translations.d.ts +3 -0
- package/src/docs-shell/common/translations.js +294 -0
- package/src/docs-shell/components/ArticleHeader.astro +5 -3
- package/src/docs-shell/components/Callout.astro +1 -0
- package/src/docs-shell/components/CodeCopyButton.astro +5 -1
- package/src/docs-shell/components/CodeTabBar.astro +7 -3
- package/src/docs-shell/components/CodeTabs.astro +2 -1
- package/src/docs-shell/components/CodeView.astro +1 -1
- package/src/docs-shell/components/DocHeader.svelte +13 -17
- package/src/docs-shell/components/DocHeading.astro +3 -1
- package/src/docs-shell/components/DocMenuButton.svelte +126 -61
- package/src/docs-shell/components/DocSidebar.svelte +3 -2
- package/src/docs-shell/components/DocVersionSelect.svelte +2 -0
- package/src/docs-shell/components/DocumentAPIIndex.astro +1 -1
- package/src/docs-shell/components/DocumentChoices.astro +1 -1
- package/src/docs-shell/components/DocumentCodeExampleView.astro +3 -1
- package/src/docs-shell/components/DocumentCodeTable.astro +4 -2
- package/src/docs-shell/components/DocumentCopyButton.svelte +3 -0
- package/src/docs-shell/components/DocumentDisclosure.astro +2 -0
- package/src/docs-shell/components/DocumentFileTree.astro +3 -0
- package/src/docs-shell/components/DocumentFlow.astro +4 -1
- package/src/docs-shell/components/DocumentIllustration.astro +8 -12
- package/src/docs-shell/components/DocumentKeyList.astro +6 -4
- package/src/docs-shell/components/DocumentNamespaceTable.astro +5 -3
- package/src/docs-shell/components/DocumentOptionEntry.astro +0 -1
- package/src/docs-shell/components/DocumentOptionList.astro +1 -1
- package/src/docs-shell/components/DocumentOptions.astro +3 -2
- package/src/docs-shell/components/DocumentParameters.astro +1 -1
- package/src/docs-shell/components/DocumentPrompt.astro +2 -0
- package/src/docs-shell/components/DocumentValueList.astro +1 -1
- package/src/docs-shell/components/DocumentationIndex.svelte +8 -7
- package/src/docs-shell/components/ExpandContent.svelte +3 -0
- package/src/docs-shell/components/ExplorerView.astro +1 -0
- package/src/docs-shell/components/GeneratedCSS.astro +4 -1
- package/src/docs-shell/components/Header.svelte +1 -1
- package/src/docs-shell/components/InlineCode.astro +1 -0
- package/src/docs-shell/components/InteractingIndicator.astro +1 -0
- package/src/docs-shell/components/LanguageButton.svelte +1 -0
- package/src/docs-shell/components/LanguageSelect.svelte +2 -0
- package/src/docs-shell/components/Link.svelte +3 -2
- package/src/docs-shell/components/NotFound.astro +6 -4
- package/src/docs-shell/components/PMAction.astro +1 -0
- package/src/docs-shell/components/PageContent.svelte +1 -1
- package/src/docs-shell/components/PageContentDisclosure.astro +2 -1
- package/src/docs-shell/components/PageContentList.svelte +2 -0
- package/src/docs-shell/components/PageNavs.astro +3 -3
- package/src/docs-shell/components/SearchButton.svelte +3 -0
- package/src/docs-shell/components/SearchDialog.svelte +18 -16
- package/src/docs-shell/components/Segments.svelte +2 -0
- package/src/docs-shell/components/StepSection.astro +1 -2
- package/src/docs-shell/components/Tabs.astro +1 -0
- package/src/docs-shell/components/ThemeSelect.svelte +2 -0
- package/src/docs-shell/components/TimeAgo.svelte +6 -6
- package/src/docs-shell/components/markdown/Table.astro +1 -0
- package/src/docs-shell/components/markdown-components.ts +0 -1
- package/src/docs-shell/contexts/search.ts +1 -1
- package/src/docs-shell/factories/Page.astro +10 -5
- package/src/docs-shell/factories/create-page.ts +33 -6
- package/src/docs-shell/layouts/BlogArticle.astro +3 -11
- package/src/docs-shell/remark/markdown-components.js +28 -7
- package/src/docs-shell/remark/slug-and-toc.js +5 -7
- package/src/docs-shell/scripts/code.ts +5 -2
- package/src/docs-shell/scripts/document.ts +1 -1
- package/src/docs-shell/site.ts +9 -1
- package/src/docs-shell/types/Metadata.ts +11 -0
- package/src/docs-shell/utils/document-copy.d.ts +2 -0
- package/src/docs-shell/utils/document-copy.js +18 -0
- package/src/docs-shell/utils/generate-metadata.ts +5 -1
- package/src/docs-shell/utils/head.ts +5 -2
- package/src/docs-shell/utils/i18n-pathname.ts +13 -2
- package/src/docs-shell/utils/i18n.ts +4 -1
- package/src/docs-shell/utils/localized-metadata.ts +22 -0
- package/src/docs-shell/utils/markdown-links.ts +61 -0
- package/src/docs-shell/utils/markdown-tree.ts +19 -6
- package/src/docs-shell/utils/resolve-heading.d.ts +1 -0
- package/src/docs-shell/utils/resolve-heading.js +21 -0
- package/src/docs-shell/utils/search-pages.ts +75 -22
- package/src/examples/components/ArticleTransitionScene.svelte +4 -0
- package/src/examples/layout-system/page.astro +0 -1
- package/src/home/HomeBentoFrame.astro +1 -0
- package/src/home/HomeBentoGrid.astro +1 -0
- package/src/home/bento.css +167 -0
- package/src/home/design.css +1 -1
- package/src/home/hero.css +5 -0
- package/src/home/home.css +4 -576
- package/src/home/segmented-control.css +94 -0
- package/src/layouts/Document.astro +4 -2
- package/src/public/icons/json.svg +1 -0
- package/src/scripts/atomic-class-authoring.ts +98 -0
- package/src/scripts/localization.ts +239 -0
- package/src/scripts/mdx-sample.ts +12 -0
- package/src/scripts/static-social.ts +17 -3
- package/src/scripts/style-delivery.mjs +120 -0
- package/src/sections/blog.astro +1 -1
- package/src/sections/guide.astro +4 -3
- package/src/styles/blog-article.css +10 -7
- package/src/styles/blog-materials.css +13 -0
- package/src/styles/demo.css +0 -1
- package/src/styles/docs-shell/code.css +5 -61
- package/src/styles/docs-shell/documentation-search.css +1 -0
- package/src/styles/docs-shell/header.css +2 -73
- package/src/styles/docs-shell/menu.css +37 -17
- package/src/styles/docs-shell/page-content.css +2 -37
- package/src/styles/docs-shell/prose.css +18 -9
- package/src/styles/docs-shell/steps.css +2 -39
- package/src/styles/document-comparison.css +5 -2
- package/src/styles/documentation-illustration.css +1 -9
- package/src/styles/documentation-index.css +2 -1
- package/src/styles/documents.css +2 -4
- package/src/styles/interface.css +5 -3
- package/src/styles/system/DESIGN.md +34 -14
- package/src/styles/system/browser.css +21 -0
- package/src/styles/system/button-feedback.css +13 -0
- package/src/styles/system/callout.css +14 -0
- package/src/styles/system/chart.css +18 -0
- package/src/styles/system/checks.css +18 -0
- package/src/styles/system/code-panel.css +82 -0
- package/src/styles/system/code-tabs.css +40 -0
- package/src/styles/system/code.css +8 -85
- package/src/styles/system/compare.css +7 -0
- package/src/styles/system/controls.css +10 -109
- package/src/styles/system/copy.css +32 -0
- package/src/styles/system/data.css +10 -134
- package/src/styles/system/dialog.css +16 -0
- package/src/styles/system/disclosure.css +19 -0
- package/src/styles/system/expand.css +11 -0
- package/src/styles/system/fields.css +25 -0
- package/src/styles/system/header-core.css +101 -0
- package/src/styles/system/hint.css +5 -0
- package/src/styles/system/index.css +13 -0
- package/src/styles/system/inline-code.css +4 -0
- package/src/styles/system/kbd.css +4 -0
- package/src/styles/system/logos.css +10 -0
- package/src/styles/system/menu.css +14 -0
- package/src/styles/system/metrics.css +22 -0
- package/src/styles/system/pagehead.css +13 -0
- package/src/styles/system/pager.css +13 -0
- package/src/styles/system/parameters.css +17 -0
- package/src/styles/system/prompt.css +7 -0
- package/src/styles/system/prose.css +4 -75
- package/src/styles/system/range.css +12 -0
- package/src/styles/system/reading.css +44 -0
- package/src/styles/system/scroll.css +6 -0
- package/src/styles/system/search-trigger.css +10 -0
- package/src/styles/system/segmented.css +22 -0
- package/src/styles/system/sheet.css +8 -0
- package/src/styles/system/shell.css +8 -102
- package/src/styles/system/sidebar.css +14 -0
- package/src/styles/system/source.css +5 -0
- package/src/styles/system/specimens.css +3 -0
- package/src/styles/system/stage.css +18 -0
- package/src/styles/system/steps.css +51 -0
- package/src/styles/system/surfaces.css +8 -104
- package/src/styles/system/table.css +23 -0
- package/src/styles/system/toc.css +59 -0
- package/src/styles/system/tooltip.css +6 -0
- package/src/styles/system/tray-code.css +6 -0
- package/src/styles/system/tray.css +20 -0
- package/src/styles/system/tree.css +15 -0
- package/src/styles/system/waterfall.css +14 -0
- package/src/virtual.d.ts +5 -1
- package/src/blog/article/language.ts +0 -29
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/* * Cards stand directly on the page ground: no shell around them, so every edge is the card's own 1px
|
|
2
|
+
* contour. A card may hold its figure in a well, 12px in, and nothing deeper. */
|
|
3
|
+
/* The title and description stay together, with a separate illustration to their right. */
|
|
4
|
+
/* * A narrow card cannot spare a 7rem column beside its copy: the title shares a row with a smaller
|
|
5
|
+
* illustration and the description takes the full measure below, so neither wraps a word or two per line. */
|
|
6
|
+
/* * The well's contour is drawn above the figure, so a pane that fills the well never hides it and
|
|
7
|
+
* a pane's own edge never doubles it: every well reads as one 1px line. */
|
|
8
|
+
@layer components {
|
|
9
|
+
.home-bento-frame {
|
|
10
|
+
position: relative;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.home-bento-grid {
|
|
14
|
+
display: grid;
|
|
15
|
+
gap: var(--home-gap);
|
|
16
|
+
|
|
17
|
+
@media (--md) {
|
|
18
|
+
gap: 1rem;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.home-bento-card {
|
|
23
|
+
position: relative;
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
min-width: 0;
|
|
27
|
+
border-radius: var(--home-radius-sheet);
|
|
28
|
+
background-color: var(--home-sheet);
|
|
29
|
+
box-shadow: 0 0 0 1px var(--home-hairline), var(--home-elevation-1);
|
|
30
|
+
transition: box-shadow var(--home-base) var(--home-ease);
|
|
31
|
+
|
|
32
|
+
&:hover {
|
|
33
|
+
box-shadow: 0 0 0 1px var(--home-rule), var(--home-elevation-1);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
.home-bento-card-header {
|
|
37
|
+
/* Contain the header only: size containment on the subgrid card collapses auto-height code panes. */
|
|
38
|
+
container: home-card / inline-size;
|
|
39
|
+
padding: 1.75rem 1.5rem 2rem;
|
|
40
|
+
|
|
41
|
+
@media (--sm) {
|
|
42
|
+
padding: 2.25rem 2.25rem 2.5rem;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@media (--lg) {
|
|
46
|
+
padding: 2.5rem 2.75rem 2.75rem;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.home-bento-card-caption {
|
|
51
|
+
display: grid;
|
|
52
|
+
grid-template-columns: minmax(0, 44ch) 7rem;
|
|
53
|
+
/* In a wide card the copy keeps its measure and the illustration rides the card's right edge. */
|
|
54
|
+
justify-content: space-between;
|
|
55
|
+
align-items: start;
|
|
56
|
+
align-content: start;
|
|
57
|
+
column-gap: 1.5rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.home-bento-card-copy { min-width: 0; }
|
|
61
|
+
|
|
62
|
+
.home-bento-card-caption > .home-illustration {
|
|
63
|
+
--home-illustration-size: 7rem;
|
|
64
|
+
}
|
|
65
|
+
@container home-card (width < 28rem) {
|
|
66
|
+
.home-bento-card-caption {
|
|
67
|
+
grid-template-columns: minmax(0, 1fr) 4rem;
|
|
68
|
+
align-items: center;
|
|
69
|
+
gap: 0.75rem 1rem;
|
|
70
|
+
}
|
|
71
|
+
.home-bento-card-copy { display: contents; }
|
|
72
|
+
.home-bento-card-title { grid-column: 1; grid-row: 1; }
|
|
73
|
+
.home-bento-card-body { grid-column: 1 / -1; grid-row: 2; max-width: none; margin-top: 0; }
|
|
74
|
+
.home-bento-card-hint { grid-column: 1 / -1; grid-row: 3; margin-top: 0; }
|
|
75
|
+
.home-bento-card-caption > .home-illustration {
|
|
76
|
+
--home-illustration-size: 4rem;
|
|
77
|
+
grid-column: 2;
|
|
78
|
+
grid-row: 1;
|
|
79
|
+
margin-block: 0;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@container home-card (width < 16rem) {
|
|
84
|
+
.home-bento-card-caption { grid-template-columns: minmax(0, 1fr) 3rem; column-gap: 0.75rem; }
|
|
85
|
+
.home-bento-card-caption > .home-illustration { --home-illustration-size: 3rem; }
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@container home-card (width < 12rem) {
|
|
89
|
+
.home-bento-card-caption { grid-template-columns: minmax(0, 1fr); }
|
|
90
|
+
.home-bento-card-caption > .home-illustration { display: none; }
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@container home-card (width >= 28rem) {
|
|
94
|
+
.home-bento-card-caption { column-gap: 3rem; }
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.home-bento-card-title {
|
|
98
|
+
min-width: 0;
|
|
99
|
+
margin: 0;
|
|
100
|
+
font-size: var(--home-card-title);
|
|
101
|
+
font-weight: var(--font-weight-regular);
|
|
102
|
+
line-height: 1.25;
|
|
103
|
+
letter-spacing: -0.025em;
|
|
104
|
+
color: var(--home-text);
|
|
105
|
+
text-wrap: balance;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.home-bento-card-body {
|
|
109
|
+
min-width: 0;
|
|
110
|
+
max-width: 44ch;
|
|
111
|
+
margin: 0.75rem 0 0;
|
|
112
|
+
font-size: var(--home-body);
|
|
113
|
+
line-height: 1.6;
|
|
114
|
+
color: var(--home-text-quiet);
|
|
115
|
+
text-wrap: pretty;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.home-bento-card-hint {
|
|
119
|
+
margin: 0.75rem 0 0;
|
|
120
|
+
font-size: var(--home-caption);
|
|
121
|
+
line-height: 1.5;
|
|
122
|
+
color: var(--home-text-faint);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.home-heading-link {
|
|
126
|
+
color: inherit;
|
|
127
|
+
text-decoration: none;
|
|
128
|
+
text-decoration-thickness: 1px;
|
|
129
|
+
text-underline-offset: 0.2em;
|
|
130
|
+
|
|
131
|
+
&:hover { text-decoration-line: underline; }
|
|
132
|
+
|
|
133
|
+
&:focus-visible {
|
|
134
|
+
border-radius: var(--radius-sm);
|
|
135
|
+
outline: 2px solid var(--home-ink);
|
|
136
|
+
outline-offset: 4px;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
.home-bento-visual {
|
|
140
|
+
position: relative;
|
|
141
|
+
isolation: isolate;
|
|
142
|
+
overflow: hidden;
|
|
143
|
+
margin: auto var(--home-gap) var(--home-gap);
|
|
144
|
+
border-radius: var(--home-radius-well);
|
|
145
|
+
background-color: var(--home-well);
|
|
146
|
+
|
|
147
|
+
&::after {
|
|
148
|
+
position: absolute;
|
|
149
|
+
inset: 0;
|
|
150
|
+
z-index: 20;
|
|
151
|
+
border-radius: inherit;
|
|
152
|
+
box-shadow: var(--home-groove);
|
|
153
|
+
pointer-events: none;
|
|
154
|
+
content: '';
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.home-bento-visual-top {
|
|
159
|
+
margin-top: 0;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@layer components { @media (forced-colors: active) { .home-bento-card { outline: 1px solid CanvasText; } } }
|
|
164
|
+
|
|
165
|
+
@layer components {
|
|
166
|
+
.home-page:lang(zh) .home-bento-card-body { text-wrap: balance; }
|
|
167
|
+
}
|
package/src/home/design.css
CHANGED
|
@@ -420,7 +420,7 @@
|
|
|
420
420
|
* Han prose breaks between any two characters, so pretty wrapping still leaves a last line of two characters.
|
|
421
421
|
* Short leads and card descriptions balance their lines instead.
|
|
422
422
|
*/
|
|
423
|
-
.home-page:lang(zh)
|
|
423
|
+
.home-page:lang(zh) .home-section-body {
|
|
424
424
|
text-wrap: balance;
|
|
425
425
|
}
|
|
426
426
|
|
package/src/home/hero.css
CHANGED
|
@@ -238,6 +238,11 @@
|
|
|
238
238
|
color: var(--home-text);
|
|
239
239
|
text-wrap: balance;
|
|
240
240
|
overflow-wrap: anywhere;
|
|
241
|
+
|
|
242
|
+
/* Keep Japanese phrases and Korean words intact; very narrow enlarged text can still wrap in an emergency. */
|
|
243
|
+
&:is(:lang(ja), :lang(ko)) {
|
|
244
|
+
word-break: keep-all;
|
|
245
|
+
}
|
|
241
246
|
}
|
|
242
247
|
|
|
243
248
|
.home-display-line {
|