@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.
Files changed (687) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +66 -2
  3. package/dist/astro.d.mts +3 -0
  4. package/dist/astro.mjs +510 -0
  5. package/dist/config.d.mts +64 -0
  6. package/dist/config.mjs +10 -0
  7. package/package.json +384 -4
  8. package/src/astro/Page.astro +12 -0
  9. package/src/astro/content-pages.ts +75 -0
  10. package/src/astro/index.ts +124 -0
  11. package/src/astro/module-id.ts +4 -0
  12. package/src/astro/propagated-assets.ts +29 -0
  13. package/src/astro/route-paths.ts +78 -0
  14. package/src/astro/routes.template.ts +110 -0
  15. package/src/astro/server-styles.ts +26 -0
  16. package/src/astro/site-context.ts +27 -0
  17. package/src/astro/source-url.ts +22 -0
  18. package/src/astro/svelte-renderer.ts +45 -0
  19. package/src/astro/svg-markup.ts +23 -0
  20. package/src/benchmarks/BenchmarkBarRows.astro +34 -0
  21. package/src/benchmarks/BenchmarkBars.astro +14 -0
  22. package/src/benchmarks/BenchmarkChart.astro +53 -0
  23. package/src/benchmarks/BenchmarkChartGroup.astro +24 -0
  24. package/src/benchmarks/BenchmarkDataTable.astro +24 -0
  25. package/src/benchmarks/BenchmarkDelta.astro +23 -0
  26. package/src/benchmarks/BenchmarkFigure.astro +30 -0
  27. package/src/benchmarks/BenchmarkMetricTable.astro +38 -0
  28. package/src/benchmarks/BenchmarkMetrics.astro +23 -0
  29. package/src/benchmarks/BenchmarkSampleSummary.astro +30 -0
  30. package/src/benchmarks/BenchmarkScrollRegion.svelte +27 -0
  31. package/src/benchmarks/BenchmarkSource.astro +20 -0
  32. package/src/benchmarks/BenchmarkStackedBars.astro +54 -0
  33. package/src/benchmarks/BenchmarkStatus.astro +16 -0
  34. package/src/benchmarks/types.ts +98 -0
  35. package/src/benchmarks/utils.ts +42 -0
  36. package/src/blog/BlogAuthors.astro +25 -0
  37. package/src/blog/article/BlogArticleContents.svelte +24 -0
  38. package/src/blog/article/BlogArticleEnd.astro +55 -0
  39. package/src/blog/article/BlogArticleMasthead.astro +61 -0
  40. package/src/blog/article/language.ts +29 -0
  41. package/src/blog/article/neighbors.ts +27 -0
  42. package/src/blog/article/title-lines.astro +14 -0
  43. package/src/blog/article/title-parts.ts +9 -0
  44. package/src/components.d.ts +5 -0
  45. package/src/config.ts +66 -0
  46. package/src/css/ButtonPreview.astro +22 -0
  47. package/src/css/ConfiguredExample.astro +15 -0
  48. package/src/css/NamespaceUtilityTable.astro +50 -0
  49. package/src/css/StylesheetExample.astro +15 -0
  50. package/src/css/ThemeNumberVariableTable.astro +57 -0
  51. package/src/css/configured-example.ts +53 -0
  52. package/src/css/foundation-data/elevation/shadow-data.ts +52 -0
  53. package/src/css/foundation-data/sizing/scale-data.ts +37 -0
  54. package/src/css/foundation-data/specimen-content.ts +10 -0
  55. package/src/css/foundation-data/specimens.ts +96 -0
  56. package/src/css/foundation-data/tokens.ts +32 -0
  57. package/src/css/generate-preset-css.ts +12 -0
  58. package/src/css/highlight.ts +34 -0
  59. package/src/css/manifest-utilities.ts +29 -0
  60. package/src/css/markdown.ts +279 -0
  61. package/src/css/preset-css.ts +15 -0
  62. package/src/css/preset-manifest.ts +3 -0
  63. package/src/css/stylesheet-example.ts +26 -0
  64. package/src/css/theme-variables.ts +74 -0
  65. package/src/css/variable-namespace-sources.ts +20 -0
  66. package/src/demo/Demo.svelte +55 -0
  67. package/src/demo/DemoAsset.astro +38 -0
  68. package/src/demo/DemoAxes.svelte +22 -0
  69. package/src/demo/DemoBadge.svelte +18 -0
  70. package/src/demo/DemoCatalog.astro +36 -0
  71. package/src/demo/DemoComparison.svelte +36 -0
  72. package/src/demo/DemoConfiguredExample.astro +48 -0
  73. package/src/demo/DemoContainer.svelte +48 -0
  74. package/src/demo/DemoControls.svelte +16 -0
  75. package/src/demo/DemoCopyButton.svelte +50 -0
  76. package/src/demo/DemoCopyGroup.svelte +15 -0
  77. package/src/demo/DemoExample.astro +27 -0
  78. package/src/demo/DemoFeatureSupport.svelte +18 -0
  79. package/src/demo/DemoGeneratedCSS.svelte +8 -0
  80. package/src/demo/DemoIndex.astro +23 -0
  81. package/src/demo/DemoInstallation.astro +17 -0
  82. package/src/demo/DemoItem.svelte +17 -0
  83. package/src/demo/DemoLabel.svelte +15 -0
  84. package/src/demo/DemoLegend.svelte +15 -0
  85. package/src/demo/DemoMeasure.svelte +28 -0
  86. package/src/demo/DemoMedia.svelte +43 -0
  87. package/src/demo/DemoMotion.svelte +41 -0
  88. package/src/demo/DemoPageViewport.astro +17 -0
  89. package/src/demo/DemoPalette.astro +29 -0
  90. package/src/demo/DemoPaletteGroups.svelte +15 -0
  91. package/src/demo/DemoScrollArea.svelte +15 -0
  92. package/src/demo/DemoStyleComparison.astro +25 -0
  93. package/src/demo/DemoSurface.svelte +15 -0
  94. package/src/demo/DemoSwatch.svelte +19 -0
  95. package/src/demo/DemoThemeComparison.astro +30 -0
  96. package/src/demo/DemoTokenTable.astro +34 -0
  97. package/src/demo/DemoViewTransition.astro +18 -0
  98. package/src/demo/DemoViewport.svelte +324 -0
  99. package/src/demo/DemoWaterfall.astro +30 -0
  100. package/src/demo/FoundationBreakpoint.astro +12 -0
  101. package/src/demo/ProjectStyleExample.astro +13 -0
  102. package/src/demo/copy-feedback.ts +10 -0
  103. package/src/demo/demo-waterfall.ts +17 -0
  104. package/src/demo/drag-readings.ts +20 -0
  105. package/src/demo/foundations/FoundationAxes.astro +12 -0
  106. package/src/demo/foundations/FoundationColorRoles.astro +5 -0
  107. package/src/demo/foundations/FoundationContainerGrid.astro +24 -0
  108. package/src/demo/foundations/FoundationDialog.astro +14 -0
  109. package/src/demo/foundations/FoundationElevation.astro +5 -0
  110. package/src/demo/foundations/FoundationElevationState.astro +5 -0
  111. package/src/demo/foundations/FoundationHue.astro +5 -0
  112. package/src/demo/foundations/FoundationLines.astro +5 -0
  113. package/src/demo/foundations/FoundationMedia.astro +28 -0
  114. package/src/demo/foundations/FoundationMotion.astro +5 -0
  115. package/src/demo/foundations/FoundationPalette.astro +8 -0
  116. package/src/demo/foundations/FoundationRadius.astro +13 -0
  117. package/src/demo/foundations/FoundationShapes.astro +12 -0
  118. package/src/demo/foundations/FoundationShrink.astro +14 -0
  119. package/src/demo/foundations/FoundationSizing.astro +19 -0
  120. package/src/demo/foundations/FoundationSpecimen.astro +20 -0
  121. package/src/demo/foundations/FoundationSurfaces.astro +5 -0
  122. package/src/demo/foundations/FoundationTextHue.astro +5 -0
  123. package/src/demo/foundations/FoundationTextRoles.astro +5 -0
  124. package/src/demo/foundations/FoundationTokens.astro +22 -0
  125. package/src/demo/foundations/FoundationTokensView.astro +65 -0
  126. package/src/demo/foundations/FoundationTransition.astro +5 -0
  127. package/src/demo/foundations/FoundationTypeComparison.astro +12 -0
  128. package/src/demo/foundations/FoundationTypography.astro +5 -0
  129. package/src/demo/foundations/Palette.svelte +37 -0
  130. package/src/demo/foundations/ShadowScaleDemo.astro +22 -0
  131. package/src/demo/illustration-materials.ts +180 -0
  132. package/src/demo/maintenance-example.ts +62 -0
  133. package/src/demo/playback.ts +75 -0
  134. package/src/demo/project-style-examples.ts +128 -0
  135. package/src/demo/reference/alignment.ts +42 -0
  136. package/src/demo/reference/animations.ts +30 -0
  137. package/src/demo/reference/backgrounds.ts +39 -0
  138. package/src/demo/reference/border-paint.ts +31 -0
  139. package/src/demo/reference/clipping.ts +26 -0
  140. package/src/demo/reference/document.ts +55 -0
  141. package/src/demo/reference/edges.ts +40 -0
  142. package/src/demo/reference/effects.ts +27 -0
  143. package/src/demo/reference/flexbox.ts +33 -0
  144. package/src/demo/reference/frame.css +118 -0
  145. package/src/demo/reference/grid.ts +42 -0
  146. package/src/demo/reference/html.ts +40 -0
  147. package/src/demo/reference/interaction.ts +42 -0
  148. package/src/demo/reference/layout-html.ts +10 -0
  149. package/src/demo/reference/layout.ts +102 -0
  150. package/src/demo/reference/media.ts +29 -0
  151. package/src/demo/reference/positioning.ts +90 -0
  152. package/src/demo/reference/scenes.ts +197 -0
  153. package/src/demo/reference/scrolling.ts +66 -0
  154. package/src/demo/reference/shapes.ts +22 -0
  155. package/src/demo/reference/sizing.ts +43 -0
  156. package/src/demo/reference/source.ts +8 -0
  157. package/src/demo/reference/text-effects.ts +37 -0
  158. package/src/demo/reference/text-flow.ts +41 -0
  159. package/src/demo/reference/transforms.ts +26 -0
  160. package/src/demo/reference/transitions.ts +24 -0
  161. package/src/demo/reference/type-specimens.ts +56 -0
  162. package/src/demo/reference/types.ts +30 -0
  163. package/src/demo/reference/typography.ts +32 -0
  164. package/src/demo/specimens/accent-color.json +50 -0
  165. package/src/demo/specimens/align-items.json +56 -0
  166. package/src/demo/specimens/animation-delay.json +55 -0
  167. package/src/demo/specimens/animation-direction.json +49 -0
  168. package/src/demo/specimens/animation-fill-mode.json +55 -0
  169. package/src/demo/specimens/animation-iteration-count.json +55 -0
  170. package/src/demo/specimens/animation-play-state.json +83 -0
  171. package/src/demo/specimens/animation-timing-function.json +48 -0
  172. package/src/demo/specimens/appearance.json +44 -0
  173. package/src/demo/specimens/aspect-ratio.json +28 -0
  174. package/src/demo/specimens/backdrop-filter.json +44 -0
  175. package/src/demo/specimens/background-attachment.json +49 -0
  176. package/src/demo/specimens/background-image.json +25 -0
  177. package/src/demo/specimens/background-origin.json +36 -0
  178. package/src/demo/specimens/background-size.json +29 -0
  179. package/src/demo/specimens/border-collapse.json +45 -0
  180. package/src/demo/specimens/border-color.json +35 -0
  181. package/src/demo/specimens/border-image-repeat.json +50 -0
  182. package/src/demo/specimens/border-image-slice.json +45 -0
  183. package/src/demo/specimens/border-radius.json +30 -0
  184. package/src/demo/specimens/box-decoration-break.json +35 -0
  185. package/src/demo/specimens/box-shadow.json +33 -0
  186. package/src/demo/specimens/clear.json +77 -0
  187. package/src/demo/specimens/clip-path.json +38 -0
  188. package/src/demo/specimens/content.json +27 -0
  189. package/src/demo/specimens/counter-set.json +31 -0
  190. package/src/demo/specimens/fill.json +23 -0
  191. package/src/demo/specimens/filter.json +23 -0
  192. package/src/demo/specimens/flex-direction.json +27 -0
  193. package/src/demo/specimens/flex-grow.json +27 -0
  194. package/src/demo/specimens/font-style.json +23 -0
  195. package/src/demo/specimens/font-variant-numeric.json +28 -0
  196. package/src/demo/specimens/grid-auto-columns.json +29 -0
  197. package/src/demo/specimens/grid-auto-flow.json +37 -0
  198. package/src/demo/specimens/grid-template-areas.json +34 -0
  199. package/src/demo/specimens/grid-template-columns.json +36 -0
  200. package/src/demo/specimens/isolation.json +25 -0
  201. package/src/demo/specimens/justify-content.json +36 -0
  202. package/src/demo/specimens/line-height.json +28 -0
  203. package/src/demo/specimens/list-style-position.json +36 -0
  204. package/src/demo/specimens/mask-image.json +54 -0
  205. package/src/demo/specimens/min-width.json +39 -0
  206. package/src/demo/specimens/mix-blend-mode.json +43 -0
  207. package/src/demo/specimens/object-fit.json +27 -0
  208. package/src/demo/specimens/object-position.json +27 -0
  209. package/src/demo/specimens/opacity.json +37 -0
  210. package/src/demo/specimens/order.json +28 -0
  211. package/src/demo/specimens/overflow-wrap.json +26 -0
  212. package/src/demo/specimens/overflow.json +53 -0
  213. package/src/demo/specimens/overscroll-behavior.json +29 -0
  214. package/src/demo/specimens/padding.json +84 -0
  215. package/src/demo/specimens/place-content.json +31 -0
  216. package/src/demo/specimens/pointer-events.json +46 -0
  217. package/src/demo/specimens/position.json +29 -0
  218. package/src/demo/specimens/resize.json +32 -0
  219. package/src/demo/specimens/screen-readers.json +37 -0
  220. package/src/demo/specimens/scroll-padding.json +29 -0
  221. package/src/demo/specimens/scroll-snap-stop.json +33 -0
  222. package/src/demo/specimens/shape-image-threshold.json +37 -0
  223. package/src/demo/specimens/shape-margin.json +40 -0
  224. package/src/demo/specimens/shape-outside.json +37 -0
  225. package/src/demo/specimens/stroke-width.json +27 -0
  226. package/src/demo/specimens/text-fill-color.json +23 -0
  227. package/src/demo/specimens/text-stroke-width.json +32 -0
  228. package/src/demo/specimens/touch-action.json +45 -0
  229. package/src/demo/specimens/transform-box.json +37 -0
  230. package/src/demo/specimens/transform-origin.json +56 -0
  231. package/src/demo/specimens/transform-style.json +55 -0
  232. package/src/demo/specimens/transform.json +47 -0
  233. package/src/demo/specimens/transition-delay.json +57 -0
  234. package/src/demo/specimens/transition-duration.json +60 -0
  235. package/src/demo/specimens/transition-property.json +60 -0
  236. package/src/demo/specimens/transition-timing-function.json +65 -0
  237. package/src/demo/specimens/user-drag.json +28 -0
  238. package/src/demo/specimens/user-select.json +25 -0
  239. package/src/demo/specimens/vertical-align.json +28 -0
  240. package/src/demo/specimens/width.json +56 -0
  241. package/src/demo/specimens/will-change.json +50 -0
  242. package/src/demo/specimens/writing-mode.json +26 -0
  243. package/src/demo/specimens/z-index.json +35 -0
  244. package/src/demo/style.ts +15 -0
  245. package/src/demo/tone.ts +4 -0
  246. package/src/demo/useDemoViewTransition.svelte.ts +71 -0
  247. package/src/docs-shell/common/i18n.config.d.ts +2 -0
  248. package/src/docs-shell/common/i18n.config.js +13 -0
  249. package/src/docs-shell/common/svgo.config.d.ts +2 -0
  250. package/src/docs-shell/common/svgo.config.js +11 -0
  251. package/src/docs-shell/components/ArticleHeader.astro +65 -0
  252. package/src/docs-shell/components/ArticleTOC.astro +18 -0
  253. package/src/docs-shell/components/Callout.astro +26 -0
  254. package/src/docs-shell/components/Code.astro +25 -0
  255. package/src/docs-shell/components/CodeCopyButton.astro +25 -0
  256. package/src/docs-shell/components/CodeTabBar.astro +40 -0
  257. package/src/docs-shell/components/CodeTabs.astro +53 -0
  258. package/src/docs-shell/components/CodeView.astro +23 -0
  259. package/src/docs-shell/components/Do.astro +5 -0
  260. package/src/docs-shell/components/DoNot.astro +5 -0
  261. package/src/docs-shell/components/DocArticle.astro +14 -0
  262. package/src/docs-shell/components/DocHeader.svelte +87 -0
  263. package/src/docs-shell/components/DocHeading.astro +28 -0
  264. package/src/docs-shell/components/DocMain.astro +19 -0
  265. package/src/docs-shell/components/DocMenuButton.svelte +95 -0
  266. package/src/docs-shell/components/DocSidebar.svelte +62 -0
  267. package/src/docs-shell/components/DocVersionSelect.svelte +22 -0
  268. package/src/docs-shell/components/DocWrapper.astro +11 -0
  269. package/src/docs-shell/components/DocumentAPIIndex.astro +24 -0
  270. package/src/docs-shell/components/DocumentChoices.astro +24 -0
  271. package/src/docs-shell/components/DocumentCodeExample.astro +20 -0
  272. package/src/docs-shell/components/DocumentCodeExampleView.astro +35 -0
  273. package/src/docs-shell/components/DocumentCodeTable.astro +19 -0
  274. package/src/docs-shell/components/DocumentComparison.astro +7 -0
  275. package/src/docs-shell/components/DocumentCopyButton.svelte +41 -0
  276. package/src/docs-shell/components/DocumentDeclaration.astro +17 -0
  277. package/src/docs-shell/components/DocumentDeclarationView.astro +12 -0
  278. package/src/docs-shell/components/DocumentDisclosure.astro +14 -0
  279. package/src/docs-shell/components/DocumentFileTree.astro +34 -0
  280. package/src/docs-shell/components/DocumentFlow.astro +27 -0
  281. package/src/docs-shell/components/DocumentIdentifier.astro +14 -0
  282. package/src/docs-shell/components/DocumentIllustration.astro +46 -0
  283. package/src/docs-shell/components/DocumentKeyList.astro +22 -0
  284. package/src/docs-shell/components/DocumentNamespaceTable.astro +20 -0
  285. package/src/docs-shell/components/DocumentOptionEntry.astro +15 -0
  286. package/src/docs-shell/components/DocumentOptionList.astro +11 -0
  287. package/src/docs-shell/components/DocumentOptions.astro +23 -0
  288. package/src/docs-shell/components/DocumentParameters.astro +30 -0
  289. package/src/docs-shell/components/DocumentPrompt.astro +16 -0
  290. package/src/docs-shell/components/DocumentValueList.astro +25 -0
  291. package/src/docs-shell/components/DocumentationIndex.svelte +144 -0
  292. package/src/docs-shell/components/Dropped.astro +21 -0
  293. package/src/docs-shell/components/ExpandContent.svelte +21 -0
  294. package/src/docs-shell/components/ExplorerView.astro +37 -0
  295. package/src/docs-shell/components/FileIcon.astro +123 -0
  296. package/src/docs-shell/components/Footer.svelte +80 -0
  297. package/src/docs-shell/components/GeneratedCSS.astro +8 -0
  298. package/src/docs-shell/components/Header.svelte +121 -0
  299. package/src/docs-shell/components/HeaderIcon.astro +14 -0
  300. package/src/docs-shell/components/HeaderNav.svelte +18 -0
  301. package/src/docs-shell/components/Image.svelte +56 -0
  302. package/src/docs-shell/components/Info.astro +5 -0
  303. package/src/docs-shell/components/InlineCode.astro +30 -0
  304. package/src/docs-shell/components/InteractingIndicator.astro +19 -0
  305. package/src/docs-shell/components/LanguageButton.svelte +18 -0
  306. package/src/docs-shell/components/LanguageSelect.svelte +44 -0
  307. package/src/docs-shell/components/Link.svelte +127 -0
  308. package/src/docs-shell/components/ModeImg.astro +11 -0
  309. package/src/docs-shell/components/NotFound.astro +21 -0
  310. package/src/docs-shell/components/OverviewButtons.astro +36 -0
  311. package/src/docs-shell/components/PMAction.astro +25 -0
  312. package/src/docs-shell/components/PackageBadges.astro +39 -0
  313. package/src/docs-shell/components/PageContent.svelte +38 -0
  314. package/src/docs-shell/components/PageContentBootstrap.astro +13 -0
  315. package/src/docs-shell/components/PageContentDisclosure.astro +25 -0
  316. package/src/docs-shell/components/PageContentList.svelte +70 -0
  317. package/src/docs-shell/components/PageContentProvider.svelte +15 -0
  318. package/src/docs-shell/components/PageContentTitle.svelte +16 -0
  319. package/src/docs-shell/components/PageNavs.astro +40 -0
  320. package/src/docs-shell/components/PreparedCodeView.astro +12 -0
  321. package/src/docs-shell/components/RenderNode.astro +16 -0
  322. package/src/docs-shell/components/RouteLayers.astro +17 -0
  323. package/src/docs-shell/components/SearchButton.svelte +31 -0
  324. package/src/docs-shell/components/SearchDialog.svelte +174 -0
  325. package/src/docs-shell/components/Segments.svelte +62 -0
  326. package/src/docs-shell/components/Step.astro +13 -0
  327. package/src/docs-shell/components/StepL.astro +10 -0
  328. package/src/docs-shell/components/StepR.astro +10 -0
  329. package/src/docs-shell/components/StepSection.astro +12 -0
  330. package/src/docs-shell/components/Tab.astro +8 -0
  331. package/src/docs-shell/components/Tabs.astro +10 -0
  332. package/src/docs-shell/components/ThemeIcon.astro +19 -0
  333. package/src/docs-shell/components/ThemeSelect.svelte +20 -0
  334. package/src/docs-shell/components/TimeAgo.svelte +32 -0
  335. package/src/docs-shell/components/Translate.astro +14 -0
  336. package/src/docs-shell/components/Warn.astro +5 -0
  337. package/src/docs-shell/components/code-props.ts +28 -0
  338. package/src/docs-shell/components/document-types.ts +119 -0
  339. package/src/docs-shell/components/markdown/Anchor.astro +5 -0
  340. package/src/docs-shell/components/markdown/Heading2.astro +5 -0
  341. package/src/docs-shell/components/markdown/Heading3.astro +5 -0
  342. package/src/docs-shell/components/markdown/Table.astro +6 -0
  343. package/src/docs-shell/components/markdown-components.ts +36 -0
  344. package/src/docs-shell/components/page-content-bootstrap.ts +115 -0
  345. package/src/docs-shell/components/page-content.svelte.ts +125 -0
  346. package/src/docs-shell/contexts/search.ts +18 -0
  347. package/src/docs-shell/contexts/theme-mode.svelte.ts +61 -0
  348. package/src/docs-shell/data/authors.ts +17 -0
  349. package/src/docs-shell/data/base-colors.ts +29 -0
  350. package/src/docs-shell/data/brands.ts +79 -0
  351. package/src/docs-shell/data/color-names.ts +1 -0
  352. package/src/docs-shell/data/color-palette.ts +50 -0
  353. package/src/docs-shell/data/colors.ts +1 -0
  354. package/src/docs-shell/factories/Page.astro +35 -0
  355. package/src/docs-shell/factories/create-page.ts +31 -0
  356. package/src/docs-shell/layouts/BlogArticle.astro +53 -0
  357. package/src/docs-shell/layouts/Doc.astro +41 -0
  358. package/src/docs-shell/remark/markdown-components.d.ts +2 -0
  359. package/src/docs-shell/remark/markdown-components.js +101 -0
  360. package/src/docs-shell/remark/slug-and-toc.d.ts +2 -0
  361. package/src/docs-shell/remark/slug-and-toc.js +53 -0
  362. package/src/docs-shell/scripts/code-tabs-bootstrap.ts +34 -0
  363. package/src/docs-shell/scripts/code.ts +124 -0
  364. package/src/docs-shell/scripts/document-anchor.ts +57 -0
  365. package/src/docs-shell/scripts/document.ts +47 -0
  366. package/src/docs-shell/site.ts +67 -0
  367. package/src/docs-shell/types/IllustrationImages.ts +2 -0
  368. package/src/docs-shell/types/Metadata.ts +17 -0
  369. package/src/docs-shell/types/Props.ts +9 -0
  370. package/src/docs-shell/types/StaticImage.ts +6 -0
  371. package/src/docs-shell/uses/use-selected-preview-syntax.svelte.ts +16 -0
  372. package/src/docs-shell/utils/anchor.ts +24 -0
  373. package/src/docs-shell/utils/beautify-css.ts +14 -0
  374. package/src/docs-shell/utils/beautify-html.ts +12 -0
  375. package/src/docs-shell/utils/beautify-js.ts +9 -0
  376. package/src/docs-shell/utils/create-highlighter.ts +50 -0
  377. package/src/docs-shell/utils/css-modern-grammar.ts +339 -0
  378. package/src/docs-shell/utils/documentation-search.ts +68 -0
  379. package/src/docs-shell/utils/generate-metadata.ts +60 -0
  380. package/src/docs-shell/utils/group-page-content.ts +10 -0
  381. package/src/docs-shell/utils/head.ts +72 -0
  382. package/src/docs-shell/utils/highlight-code-core.ts +146 -0
  383. package/src/docs-shell/utils/highlight-code.ts +1 -0
  384. package/src/docs-shell/utils/highlighted-code-text.ts +27 -0
  385. package/src/docs-shell/utils/i18n-pathname.ts +98 -0
  386. package/src/docs-shell/utils/i18n.ts +12 -0
  387. package/src/docs-shell/utils/is-date-within-seven-days.ts +16 -0
  388. package/src/docs-shell/utils/isBrowser.ts +1 -0
  389. package/src/docs-shell/utils/isInteractOutside.ts +16 -0
  390. package/src/docs-shell/utils/markdown-tree.ts +22 -0
  391. package/src/docs-shell/utils/metadata.ts +25 -0
  392. package/src/docs-shell/utils/prepared-code.ts +21 -0
  393. package/src/docs-shell/utils/resolve-heading.d.ts +1 -0
  394. package/src/docs-shell/utils/resolve-heading.js +19 -0
  395. package/src/docs-shell/utils/search-pages.ts +271 -0
  396. package/src/docs-shell/utils/slot-text.ts +15 -0
  397. package/src/docs-shell/utils/snackbar.ts +39 -0
  398. package/src/docs-shell/utils/syntax-theme.ts +53 -0
  399. package/src/docs-shell/utils/transformer-notation-word-mark.ts +146 -0
  400. package/src/docs-shell/utils/unique-id.ts +11 -0
  401. package/src/examples/article-transitions/page.astro +7 -0
  402. package/src/examples/article-transitions/transitions.css +10 -0
  403. package/src/examples/components/ArticleTransitionScene.svelte +83 -0
  404. package/src/examples/components/ViewTransitionScene.svelte +31 -0
  405. package/src/examples/images/article-aurora.jpg +0 -0
  406. package/src/examples/images/article-coast.jpg +0 -0
  407. package/src/examples/images/article-grid.jpg +0 -0
  408. package/src/examples/images/article-studio.jpg +0 -0
  409. package/src/examples/layout-system/page.astro +59 -0
  410. package/src/examples/scene.css +3 -0
  411. package/src/examples/view-transitions/page.astro +7 -0
  412. package/src/examples/view-transitions/transitions.css +9 -0
  413. package/src/home/HeroCanvas.svelte +617 -0
  414. package/src/home/HomeAction.astro +17 -0
  415. package/src/home/HomeBentoFrame.astro +9 -0
  416. package/src/home/HomeBentoGrid.astro +9 -0
  417. package/src/home/HomeCompactIcon.astro +15 -0
  418. package/src/home/HomeFooter.svelte +63 -0
  419. package/src/home/HomeIllustration.astro +17 -0
  420. package/src/home/HomeIllustrationArt.svelte +15 -0
  421. package/src/home/HomeLamp.svelte +18 -0
  422. package/src/home/design.css +532 -0
  423. package/src/home/footer.css +225 -0
  424. package/src/home/hero-shaders.ts +460 -0
  425. package/src/home/hero-title-mask.ts +175 -0
  426. package/src/home/hero.css +547 -0
  427. package/src/home/home-illustration.ts +5 -0
  428. package/src/home/home-lamp.ts +225 -0
  429. package/src/home/home.css +1077 -0
  430. package/src/home/icons/agent-check-preview-apply.svg +24 -0
  431. package/src/home/icons/agent-clients.svg +26 -0
  432. package/src/home/icons/agent-project-tools.svg +23 -0
  433. package/src/home/icons/artwork/agent-check-preview-apply-dark.webp +0 -0
  434. package/src/home/icons/artwork/agent-check-preview-apply-light.webp +0 -0
  435. package/src/home/icons/artwork/agent-clients-dark.webp +0 -0
  436. package/src/home/icons/artwork/agent-clients-light.webp +0 -0
  437. package/src/home/icons/artwork/agent-edit-file-dark.webp +0 -0
  438. package/src/home/icons/artwork/agent-edit-file-light.webp +0 -0
  439. package/src/home/icons/artwork/agent-project-tools-dark.webp +0 -0
  440. package/src/home/icons/artwork/agent-project-tools-light.webp +0 -0
  441. package/src/home/icons/artwork/design-cascade-layers-dark.webp +0 -0
  442. package/src/home/icons/artwork/design-cascade-layers-light.webp +0 -0
  443. package/src/home/icons/artwork/design-layout-motion-dark.webp +0 -0
  444. package/src/home/icons/artwork/design-layout-motion-light.webp +0 -0
  445. package/src/home/icons/artwork/design-p3-gamut-dark.webp +0 -0
  446. package/src/home/icons/artwork/design-p3-gamut-light.webp +0 -0
  447. package/src/home/icons/artwork/design-theme-modes-dark.webp +0 -0
  448. package/src/home/icons/artwork/design-theme-modes-light.webp +0 -0
  449. package/src/home/icons/artwork/design-theme-tokens-dark.webp +0 -0
  450. package/src/home/icons/artwork/design-theme-tokens-light.webp +0 -0
  451. package/src/home/icons/artwork/editor-color-tools-dark.webp +0 -0
  452. package/src/home/icons/artwork/editor-color-tools-light.webp +0 -0
  453. package/src/home/icons/artwork/editor-focused-highlighting-dark.webp +0 -0
  454. package/src/home/icons/artwork/editor-focused-highlighting-light.webp +0 -0
  455. package/src/home/icons/artwork/editor-hover-inspection-dark.webp +0 -0
  456. package/src/home/icons/artwork/editor-hover-inspection-light.webp +0 -0
  457. package/src/home/icons/artwork/editor-manifest-completions-dark.webp +0 -0
  458. package/src/home/icons/artwork/editor-manifest-completions-light.webp +0 -0
  459. package/src/home/icons/artwork/lint-class-order-dark.webp +0 -0
  460. package/src/home/icons/artwork/lint-class-order-light.webp +0 -0
  461. package/src/home/icons/artwork/lint-conflicting-classes-dark.webp +0 -0
  462. package/src/home/icons/artwork/lint-conflicting-classes-light.webp +0 -0
  463. package/src/home/icons/artwork/lint-fix-previews-dark.webp +0 -0
  464. package/src/home/icons/artwork/lint-fix-previews-light.webp +0 -0
  465. package/src/home/icons/artwork/lint-invalid-classes-dark.webp +0 -0
  466. package/src/home/icons/artwork/lint-invalid-classes-light.webp +0 -0
  467. package/src/home/icons/artwork/lint-strict-vocabulary-dark.webp +0 -0
  468. package/src/home/icons/artwork/lint-strict-vocabulary-light.webp +0 -0
  469. package/src/home/icons/artwork/lint-theme-tokens-dark.webp +0 -0
  470. package/src/home/icons/artwork/lint-theme-tokens-light.webp +0 -0
  471. package/src/home/icons/artwork/mcp-apply-preview-dark.webp +0 -0
  472. package/src/home/icons/artwork/mcp-apply-preview-light.webp +0 -0
  473. package/src/home/icons/artwork/mcp-css-compare-dark.webp +0 -0
  474. package/src/home/icons/artwork/mcp-css-compare-light.webp +0 -0
  475. package/src/home/icons/artwork/mcp-inspect-class-dark.webp +0 -0
  476. package/src/home/icons/artwork/mcp-inspect-class-light.webp +0 -0
  477. package/src/home/icons/artwork/mcp-lint-project-dark.webp +0 -0
  478. package/src/home/icons/artwork/mcp-lint-project-light.webp +0 -0
  479. package/src/home/icons/artwork/mcp-manifest-query-dark.webp +0 -0
  480. package/src/home/icons/artwork/mcp-manifest-query-light.webp +0 -0
  481. package/src/home/icons/artwork/mcp-preview-fixes-dark.webp +0 -0
  482. package/src/home/icons/artwork/mcp-preview-fixes-light.webp +0 -0
  483. package/src/home/icons/artwork/mcp-render-css-dark.webp +0 -0
  484. package/src/home/icons/artwork/mcp-render-css-light.webp +0 -0
  485. package/src/home/icons/artwork/mcp-scan-project-dark.webp +0 -0
  486. package/src/home/icons/artwork/mcp-scan-project-light.webp +0 -0
  487. package/src/home/icons/artwork/mcp-trace-class-dark.webp +0 -0
  488. package/src/home/icons/artwork/mcp-trace-class-light.webp +0 -0
  489. package/src/home/icons/artwork/render-progressive-dark.webp +0 -0
  490. package/src/home/icons/artwork/render-progressive-light.webp +0 -0
  491. package/src/home/icons/artwork/render-runtime-dark.webp +0 -0
  492. package/src/home/icons/artwork/render-runtime-light.webp +0 -0
  493. package/src/home/icons/artwork/render-static-dark.webp +0 -0
  494. package/src/home/icons/artwork/render-static-light.webp +0 -0
  495. package/src/home/icons/artwork/section-ai-agents-dark.webp +0 -0
  496. package/src/home/icons/artwork/section-ai-agents-light.webp +0 -0
  497. package/src/home/icons/artwork/section-css-size-dark.webp +0 -0
  498. package/src/home/icons/artwork/section-css-size-light.webp +0 -0
  499. package/src/home/icons/artwork/section-design-system-dark.webp +0 -0
  500. package/src/home/icons/artwork/section-design-system-light.webp +0 -0
  501. package/src/home/icons/artwork/section-editor-dark.webp +0 -0
  502. package/src/home/icons/artwork/section-editor-light.webp +0 -0
  503. package/src/home/icons/artwork/section-lint-dark.webp +0 -0
  504. package/src/home/icons/artwork/section-lint-light.webp +0 -0
  505. package/src/home/icons/artwork/section-rendering-dark.webp +0 -0
  506. package/src/home/icons/artwork/section-rendering-light.webp +0 -0
  507. package/src/home/icons/artwork/section-workflow-dark.webp +0 -0
  508. package/src/home/icons/artwork/section-workflow-light.webp +0 -0
  509. package/src/home/icons/artwork/source.json +303 -0
  510. package/src/home/icons/artwork/workflow-integrations-dark.webp +0 -0
  511. package/src/home/icons/artwork/workflow-integrations-light.webp +0 -0
  512. package/src/home/icons/artwork/workflow-monorepo-dark.webp +0 -0
  513. package/src/home/icons/artwork/workflow-monorepo-light.webp +0 -0
  514. package/src/home/icons/artwork/workflow-route-styles-dark.webp +0 -0
  515. package/src/home/icons/artwork/workflow-route-styles-light.webp +0 -0
  516. package/src/home/icons/artwork/workflow-trace-change-dark.webp +0 -0
  517. package/src/home/icons/artwork/workflow-trace-change-light.webp +0 -0
  518. package/src/home/icons/artwork.css +4 -0
  519. package/src/home/icons/artwork.ts +131 -0
  520. package/src/home/icons/catalog.ts +381 -0
  521. package/src/home/icons/design-cascade-layers.svg +32 -0
  522. package/src/home/icons/design-layout-motion.svg +16 -0
  523. package/src/home/icons/design-p3-gamut.svg +12 -0
  524. package/src/home/icons/design-theme-modes.svg +12 -0
  525. package/src/home/icons/design-theme-tokens.svg +20 -0
  526. package/src/home/icons/editor-color-tools.svg +18 -0
  527. package/src/home/icons/editor-focused-highlighting.svg +15 -0
  528. package/src/home/icons/editor-hover-inspection.svg +19 -0
  529. package/src/home/icons/editor-manifest-completions.svg +24 -0
  530. package/src/home/icons/lint-class-order-compact.svg +15 -0
  531. package/src/home/icons/lint-class-order.svg +28 -0
  532. package/src/home/icons/lint-conflicting-classes-compact.svg +11 -0
  533. package/src/home/icons/lint-conflicting-classes.svg +24 -0
  534. package/src/home/icons/lint-fix-previews-compact.svg +9 -0
  535. package/src/home/icons/lint-fix-previews.svg +19 -0
  536. package/src/home/icons/lint-invalid-classes-compact.svg +7 -0
  537. package/src/home/icons/lint-invalid-classes.svg +17 -0
  538. package/src/home/icons/lint-strict-vocabulary-compact.svg +8 -0
  539. package/src/home/icons/lint-strict-vocabulary.svg +16 -0
  540. package/src/home/icons/lint-theme-tokens-compact.svg +7 -0
  541. package/src/home/icons/lint-theme-tokens.svg +14 -0
  542. package/src/home/icons/mcp-apply-preview-compact.svg +9 -0
  543. package/src/home/icons/mcp-apply-preview.svg +18 -0
  544. package/src/home/icons/mcp-css-compare-compact.svg +9 -0
  545. package/src/home/icons/mcp-css-compare.svg +20 -0
  546. package/src/home/icons/mcp-inspect-class-compact.svg +9 -0
  547. package/src/home/icons/mcp-inspect-class.svg +18 -0
  548. package/src/home/icons/mcp-lint-project-compact.svg +14 -0
  549. package/src/home/icons/mcp-lint-project.svg +30 -0
  550. package/src/home/icons/mcp-manifest-query-compact.svg +14 -0
  551. package/src/home/icons/mcp-manifest-query.svg +27 -0
  552. package/src/home/icons/mcp-preview-fixes-compact.svg +9 -0
  553. package/src/home/icons/mcp-preview-fixes.svg +15 -0
  554. package/src/home/icons/mcp-render-css-compact.svg +13 -0
  555. package/src/home/icons/mcp-render-css.svg +30 -0
  556. package/src/home/icons/mcp-scan-project-compact.svg +7 -0
  557. package/src/home/icons/mcp-scan-project.svg +13 -0
  558. package/src/home/icons/mcp-trace-class-compact.svg +11 -0
  559. package/src/home/icons/mcp-trace-class.svg +24 -0
  560. package/src/home/icons/render-progressive.svg +17 -0
  561. package/src/home/icons/render-runtime.svg +23 -0
  562. package/src/home/icons/render-static.svg +29 -0
  563. package/src/home/icons/section-ai-agents.svg +24 -0
  564. package/src/home/icons/section-css-size.svg +13 -0
  565. package/src/home/icons/section-design-system.svg +24 -0
  566. package/src/home/icons/section-editor.svg +14 -0
  567. package/src/home/icons/section-lint.svg +14 -0
  568. package/src/home/icons/section-rendering.svg +30 -0
  569. package/src/home/icons/section-workflow.svg +22 -0
  570. package/src/home/icons/workflow-integrations.svg +15 -0
  571. package/src/home/icons/workflow-monorepo.svg +27 -0
  572. package/src/home/icons/workflow-route-styles.svg +24 -0
  573. package/src/home/icons/workflow-trace-change.svg +21 -0
  574. package/src/layouts/Document.astro +71 -0
  575. package/src/public/brand/v2/logo/mark/master-mark-small-on-dark.svg +1 -0
  576. package/src/public/brand/v2/logo/master-css/master-css-horizontal-on-dark.svg +1 -0
  577. package/src/public/brand/v2/logo/master-css/master-css-horizontal-on-light.svg +1 -0
  578. package/src/public/demo/border-grid.svg +7 -0
  579. package/src/public/demo/landscape.svg +1 -0
  580. package/src/public/demo/marker.svg +1 -0
  581. package/src/public/demo/mask.svg +1 -0
  582. package/src/public/fonts/Geist-Medium.ttf +0 -0
  583. package/src/public/fonts/Geist-Regular.ttf +0 -0
  584. package/src/public/fonts/GeistVariable.woff2 +0 -0
  585. package/src/public/fonts/IBMPlexMono-Bold.woff2 +0 -0
  586. package/src/public/fonts/IBMPlexMono-Medium.woff2 +0 -0
  587. package/src/public/fonts/IBMPlexMono-Regular.woff2 +0 -0
  588. package/src/public/fonts/IBMPlexMono-SemiBold.woff2 +0 -0
  589. package/src/public/fonts/index.css +40 -0
  590. package/src/public/icons/csharp.svg +1 -0
  591. package/src/public/icons/css.svg +1 -0
  592. package/src/public/icons/eslint.svg +1 -0
  593. package/src/public/icons/folder.svg +12 -0
  594. package/src/public/icons/html.svg +1 -0
  595. package/src/public/icons/php.svg +1 -0
  596. package/src/public/icons/sass.svg +1 -0
  597. package/src/public/icons/storybook.svg +1 -0
  598. package/src/public/icons/visualstudiocode.svg +41 -0
  599. package/src/public/images/authors/aron.jpg +0 -0
  600. package/src/public/images/authors/benseage.jpg +0 -0
  601. package/src/public/images/authors/joy.jpg +0 -0
  602. package/src/public/images/authors/lola.jpg +0 -0
  603. package/src/public/images/authors/miles.jpg +0 -0
  604. package/src/public/images/bootstrap.svg +23 -0
  605. package/src/public/images/build-tools/rsbuild.svg +1 -0
  606. package/src/public/images/build-tools/rspack.svg +1 -0
  607. package/src/public/images/build-tools/vite.svg +15 -0
  608. package/src/public/images/build-tools/webpack.svg +10 -0
  609. package/src/public/images/cdns/esm-sh.svg +1 -0
  610. package/src/public/images/chevron-left.svg +4 -0
  611. package/src/public/images/cover-bg.jpg +0 -0
  612. package/src/public/images/emotion.svg +1 -0
  613. package/src/public/images/frameworks/angular.svg +29 -0
  614. package/src/public/images/frameworks/astro.svg +4 -0
  615. package/src/public/images/frameworks/blazor.svg +22 -0
  616. package/src/public/images/frameworks/express.svg +1 -0
  617. package/src/public/images/frameworks/laravel.svg +8 -0
  618. package/src/public/images/frameworks/line-liff.svg +1 -0
  619. package/src/public/images/frameworks/lit.svg +1 -0
  620. package/src/public/images/frameworks/nextjs.svg +16 -0
  621. package/src/public/images/frameworks/nuxtjs.svg +3 -0
  622. package/src/public/images/frameworks/rails.svg +1 -0
  623. package/src/public/images/frameworks/react.svg +8 -0
  624. package/src/public/images/frameworks/remix.svg +5 -0
  625. package/src/public/images/frameworks/shopify.svg +1 -0
  626. package/src/public/images/frameworks/svelte.svg +6 -0
  627. package/src/public/images/frameworks/tanstack.svg +1 -0
  628. package/src/public/images/frameworks/vuejs.svg +11 -0
  629. package/src/public/images/frameworks/wordpress.svg +1 -0
  630. package/src/public/images/mui.svg +1 -0
  631. package/src/public/images/styled-components.svg +4 -0
  632. package/src/public/images/tailwindcss.svg +1 -0
  633. package/src/scripts/bundler-imports.ts +25 -0
  634. package/src/scripts/static-social.ts +333 -0
  635. package/src/scripts/write-if-changed.ts +26 -0
  636. package/src/sections/blog.astro +11 -0
  637. package/src/sections/design-system.astro +14 -0
  638. package/src/sections/document.astro +8 -0
  639. package/src/sections/examples.astro +6 -0
  640. package/src/sections/guide.astro +26 -0
  641. package/src/sections/home.astro +7 -0
  642. package/src/sections/page.astro +12 -0
  643. package/src/styles/base.css +57 -0
  644. package/src/styles/benchmarks.css +20 -0
  645. package/src/styles/blog-article.css +670 -0
  646. package/src/styles/blog-materials.css +399 -0
  647. package/src/styles/blog.css +568 -0
  648. package/src/styles/demo.css +30 -0
  649. package/src/styles/design-system.css +15 -0
  650. package/src/styles/docs-shell/code.css +61 -0
  651. package/src/styles/docs-shell/docs.css +79 -0
  652. package/src/styles/docs-shell/documentation-search.css +42 -0
  653. package/src/styles/docs-shell/footer.css +38 -0
  654. package/src/styles/docs-shell/header.css +69 -0
  655. package/src/styles/docs-shell/materials.css +25 -0
  656. package/src/styles/docs-shell/menu.css +19 -0
  657. package/src/styles/docs-shell/not-found.css +10 -0
  658. package/src/styles/docs-shell/page-content.css +37 -0
  659. package/src/styles/docs-shell/prose.css +89 -0
  660. package/src/styles/docs-shell/segments.css +13 -0
  661. package/src/styles/docs-shell/steps.css +39 -0
  662. package/src/styles/docs-shell/syntax-theme.css +18 -0
  663. package/src/styles/docs-shell/theme.css +68 -0
  664. package/src/styles/docs-shell/wrapper.css +10 -0
  665. package/src/styles/document-comparison.css +7 -0
  666. package/src/styles/documentation-illustration.css +34 -0
  667. package/src/styles/documentation-index.css +100 -0
  668. package/src/styles/documents.css +4 -0
  669. package/src/styles/documents.ts +2 -0
  670. package/src/styles/foundation.css +4 -0
  671. package/src/styles/globals.css +2 -0
  672. package/src/styles/interface.css +3 -0
  673. package/src/styles/interface.ts +2 -0
  674. package/src/styles/site.ts +2 -0
  675. package/src/styles/system/DESIGN.md +108 -0
  676. package/src/styles/system/buttons.css +51 -0
  677. package/src/styles/system/code.css +85 -0
  678. package/src/styles/system/controls.css +110 -0
  679. package/src/styles/system/data.css +134 -0
  680. package/src/styles/system/mixins.css +7 -0
  681. package/src/styles/system/prose.css +75 -0
  682. package/src/styles/system/shell.css +102 -0
  683. package/src/styles/system/specimens.css +98 -0
  684. package/src/styles/system/surfaces.css +104 -0
  685. package/src/styles/system/tokens.css +136 -0
  686. package/src/utils/cloudflare-image-loader.js +85 -0
  687. package/src/virtual.d.ts +36 -0
@@ -0,0 +1,225 @@
1
+ @layer components {
2
+ .home-footer {
3
+ --home-gutter: 1.25rem;
4
+ --home-column: min(100%, 100rem);
5
+ --home-rail: calc((100% - var(--home-column)) / 2 + var(--home-gutter) - 1.25rem);
6
+ position: relative;
7
+ isolation: isolate;
8
+ overflow: hidden;
9
+ background-color: var(--home-ground);
10
+ box-shadow: inset 0 1px 0 var(--home-guide);
11
+
12
+ @media (--sm) {
13
+ --home-gutter: 2.5rem;
14
+ }
15
+ }
16
+
17
+ /* The page's rails continue into the footer and dissolve into its signature. */
18
+ .home-footer-drafting {
19
+ display: none;
20
+
21
+ @media (--md) {
22
+ --home-tick: color-mix(in oklab, var(--home-text) 9%, var(--home-ground));
23
+ --home-tick-major: color-mix(in oklab, var(--home-text) 20%, var(--home-ground));
24
+ position: absolute;
25
+ inset: 0 calc(var(--home-rail) - 0.75rem);
26
+ z-index: -1;
27
+ display: block;
28
+ background:
29
+ linear-gradient(var(--home-tick-major) 0 1px, transparent 1px) left 0 top 0 / 0.75rem 8rem repeat-y,
30
+ linear-gradient(var(--home-tick-major) 0 1px, transparent 1px) right 0 top 0 / 0.75rem 8rem repeat-y,
31
+ linear-gradient(var(--home-tick) 0 1px, transparent 1px) left 0.375rem top 0 / 0.375rem 1rem repeat-y,
32
+ linear-gradient(var(--home-tick) 0 1px, transparent 1px) right 0.375rem top 0 / 0.375rem 1rem repeat-y,
33
+ linear-gradient(var(--home-guide), var(--home-guide)) left 0.75rem top 0 / 1px 100% no-repeat,
34
+ linear-gradient(var(--home-guide), var(--home-guide)) right 0.75rem top 0 / 1px 100% no-repeat;
35
+ mask-image: linear-gradient(black 55%, transparent);
36
+ pointer-events: none;
37
+ }
38
+ }
39
+
40
+ .home-footer-wrap {
41
+ position: relative;
42
+ max-width: 100rem;
43
+ container-type: inline-size;
44
+ }
45
+
46
+ .home-footer-nav,
47
+ .home-footer-base {
48
+ position: relative;
49
+ z-index: 1;
50
+ }
51
+
52
+ .home-footer-nav {
53
+ display: grid;
54
+ grid-template-columns: repeat(2, minmax(0, 1fr));
55
+ align-content: start;
56
+ gap: var(--spacing-2xl) var(--spacing-lg);
57
+ padding-block: var(--spacing-2xl);
58
+
59
+ @media (width >= 40rem) {
60
+ grid-template-columns: repeat(4, minmax(0, 1fr));
61
+ gap: var(--spacing-xl);
62
+ }
63
+
64
+ @media (--sm) {
65
+ padding-block: var(--spacing-3xl);
66
+ }
67
+
68
+ @media (--md) {
69
+ padding-block: 5rem;
70
+ }
71
+ }
72
+
73
+ .home-footer-group {
74
+ min-width: 0;
75
+ }
76
+
77
+ .home-footer-heading {
78
+ margin: 0;
79
+ font-family: var(--home-mono);
80
+ font-size: 0.75rem;
81
+ font-weight: var(--font-weight-medium);
82
+ line-height: 1.5;
83
+ letter-spacing: 0.08em;
84
+ text-transform: uppercase;
85
+ color: var(--home-text);
86
+ }
87
+
88
+ .home-footer-links {
89
+ display: grid;
90
+ gap: var(--spacing-xs);
91
+ margin: var(--spacing-md) 0 0;
92
+ padding: 0;
93
+ list-style: none;
94
+ }
95
+
96
+ .home-footer-link {
97
+ display: inline-flex;
98
+ align-items: center;
99
+ /* A one-letter label such as X still gets a usable target. */
100
+ min-width: 2.75rem;
101
+ min-height: 2rem;
102
+ font-size: 0.875rem;
103
+ line-height: 1.6;
104
+ color: var(--home-text-quiet);
105
+ text-decoration-line: underline;
106
+ text-decoration-color: transparent;
107
+ text-decoration-thickness: 1px;
108
+ text-underline-offset: 0.3em;
109
+ transition: color var(--home-quick) var(--home-ease), text-decoration-color var(--home-quick) var(--home-ease);
110
+
111
+ &:hover {
112
+ color: var(--home-text);
113
+ text-decoration-color: var(--home-rule-strong);
114
+ }
115
+
116
+ &:focus-visible {
117
+ border-radius: var(--radius-sm);
118
+ outline: 2px solid var(--home-ink);
119
+ outline-offset: 3px;
120
+ }
121
+ }
122
+
123
+ .home-footer-base {
124
+ display: flex;
125
+ flex-wrap: wrap;
126
+ align-items: center;
127
+ justify-content: space-between;
128
+ gap: var(--spacing-lg) var(--spacing-xl);
129
+ padding-block: var(--spacing-lg);
130
+ border-top: 1px solid var(--home-rule);
131
+ background-color: var(--home-ground);
132
+ font-size: 0.75rem;
133
+ line-height: 1.6;
134
+ color: var(--home-text-faint);
135
+
136
+ & .home-footer-link {
137
+ font-size: inherit;
138
+ color: inherit;
139
+
140
+ &:hover {
141
+ color: var(--home-text);
142
+ }
143
+ }
144
+ }
145
+
146
+ .home-footer-meta {
147
+ display: flex;
148
+ flex-wrap: wrap;
149
+ align-items: center;
150
+ gap: var(--spacing-sm) var(--spacing-xl);
151
+ }
152
+
153
+ .home-footer-preferences {
154
+ display: flex;
155
+ flex-wrap: wrap;
156
+ gap: var(--spacing-lg);
157
+ }
158
+
159
+ /* Native selects retain their keyboard behavior and get a visible, generous hit area. */
160
+ .home-footer-select {
161
+ position: relative;
162
+ display: inline-flex;
163
+ align-items: center;
164
+ gap: var(--spacing-xs);
165
+ min-height: 2.5rem;
166
+ color: inherit;
167
+ transition: color var(--home-quick) var(--home-ease);
168
+
169
+ &:hover {
170
+ color: var(--home-text);
171
+ }
172
+
173
+ &:has(select:focus-visible) {
174
+ outline: 2px solid var(--home-ink);
175
+ outline-offset: 3px;
176
+ }
177
+ }
178
+
179
+ /* The engraved signature sits behind the navigation; the base row covers it. */
180
+ .home-footer-mark {
181
+ --home-footer-engrave: color-mix(in oklab, var(--home-text) 12%, transparent);
182
+ --home-footer-lamp: light-dark(oklch(0.72 0.12 78 / 0.75), color-mix(in oklab, var(--home-text) 42%, transparent));
183
+ position: absolute;
184
+ inset-inline: var(--home-gutter);
185
+ top: 50%;
186
+ z-index: 0;
187
+ opacity: 0.5;
188
+ margin: 0;
189
+ transform: translateY(-50%);
190
+ font-size: 20.6cqi;
191
+ font-weight: var(--font-weight-medium);
192
+ line-height: 0.78;
193
+ letter-spacing: -0.055em;
194
+ text-align: center;
195
+ white-space: nowrap;
196
+ color: transparent;
197
+ background-image:
198
+ linear-gradient(135deg, var(--home-footer-engrave) 9%, transparent 0 50%, var(--home-footer-engrave) 0 59%, transparent 0),
199
+ linear-gradient(color-mix(in oklab, var(--home-text) 3%, transparent) 0 0);
200
+ background-size: var(--home-hatch-size) var(--home-hatch-size), auto;
201
+ background-clip: text;
202
+ mask-image: linear-gradient(to bottom, black 20%, transparent);
203
+ pointer-events: none;
204
+ user-select: none;
205
+
206
+ /* The page lamp rakes across the engraving: the same hatch, lit, only where the lamp falls. */
207
+ &::after {
208
+ position: absolute;
209
+ inset: 0;
210
+ color: transparent;
211
+ background-image: linear-gradient(135deg, var(--home-footer-lamp) 9%, transparent 0 50%, var(--home-footer-lamp) 0 59%, transparent 0);
212
+ background-size: var(--home-hatch-size) var(--home-hatch-size);
213
+ background-clip: text;
214
+ opacity: var(--lit-near);
215
+ mask-image: radial-gradient(ellipse 16rem 9rem at var(--lit-x) var(--lit-y), #000, transparent 75%);
216
+ content: attr(data-mark);
217
+ }
218
+ }
219
+
220
+ @media (prefers-reduced-motion: reduce) {
221
+ .home-footer :is(a, label) {
222
+ transition: none;
223
+ }
224
+ }
225
+ }
@@ -0,0 +1,460 @@
1
+ export const heroPlaneScale = 5.5
2
+
3
+ export const heroVertexSource = `
4
+ attribute vec2 position;
5
+ varying vec2 vUv;
6
+ void main() {
7
+ vUv = position * 0.5 + 0.5;
8
+ gl_Position = vec4(position, 0.0, 1.0);
9
+ }`
10
+
11
+ // Resolve grain at CSS-pixel density. The shared coordinates prevent rectangular scissor seams.
12
+ const sceneSampling = `
13
+ float hash(vec2 p) {
14
+ vec3 q = fract(vec3(p.xyx) * 0.1031);
15
+ q += dot(q, q.yzx + 33.33);
16
+ return fract((q.x + q.y) * q.z);
17
+ }
18
+ float grainAt(vec2 p) {
19
+ vec2 cell = floor(p);
20
+ vec2 f = fract(p);
21
+ f = f * f * (3.0 - 2.0 * f);
22
+ return mix(mix(hash(cell), hash(cell + vec2(1.0, 0.0)), f.x),
23
+ mix(hash(cell + vec2(0.0, 1.0)), hash(cell + vec2(1.0)), f.x), f.y) - 0.5;
24
+ }
25
+ vec3 backgroundAt(vec2 uv) {
26
+ vec3 color = texture2D(scene, uv).rgb;
27
+ vec2 p = uv * resolution * 1.15;
28
+ p += vec2(sin(uv.y * 5.0 + time * 0.08) * 1.4, time * 0.12);
29
+ // Threads, not sand: the grain is drawn out along the folds' prevailing diagonal.
30
+ p = mat2(0.77, 0.64, -0.64, 0.77) * p * vec2(0.4, 1.0);
31
+ float luminance = dot(color, vec3(0.2126, 0.7152, 0.0722));
32
+ float coverage = clamp(length(color - ground) * 7.0, 0.0, 1.0);
33
+ return color + grainAt(p) * 0.034 * smoothstep(0.025, 0.25, luminance) * coverage;
34
+ }`
35
+
36
+ // The lamp is a point light in CSS pixels (y down) at a height above the page; z is that height.
37
+ const lampLighting = `
38
+ vec3 toLamp(vec2 screen) {
39
+ return normalize(vec3(lamp.x - screen.x, screen.y - lamp.y, lamp.z));
40
+ }
41
+ float titleDistance(vec2 screen) {
42
+ vec2 uv = (screen - title.xy) / title.zw;
43
+ if (uv.x < 0.0 || uv.y < 0.0 || uv.x > 1.0 || uv.y > 1.0) return -distanceRange;
44
+ return (texture2D(glyphs, uv).r - 0.5) * 2.0 * distanceRange;
45
+ }`
46
+
47
+ /**
48
+ * Upscale the sculpted gold, and let the raised title cast a soft shadow away from the lamp.
49
+ * Under each liquid-glass control the silk is refracted: the rim pulls in what lies just outside it,
50
+ * splitting it slightly by wavelength, and the middle magnifies a little.
51
+ */
52
+ export const heroCopySource = `
53
+ precision highp float;
54
+ varying vec2 vUv;
55
+ uniform sampler2D scene;
56
+ uniform sampler2D glyphs;
57
+ uniform vec2 resolution;
58
+ uniform float time;
59
+ uniform vec3 ground;
60
+ uniform vec4 title;
61
+ uniform float distanceRange;
62
+ uniform float fontSize;
63
+ uniform vec3 lamp;
64
+ uniform float shade;
65
+ uniform float intro;
66
+ uniform vec4 lenses[2];
67
+ uniform vec2 lensRadii;
68
+ uniform vec2 lensFocus;
69
+ ${sceneSampling}
70
+ ${lampLighting}
71
+ float lensDistance(vec2 p, vec4 rect, float radius) {
72
+ vec2 halfSize = rect.zw * 0.5;
73
+ vec2 q = abs(p - rect.xy - halfSize) - halfSize + radius;
74
+ return length(max(q, 0.0)) + min(max(q.x, q.y), 0.0) - radius;
75
+ }
76
+ // Most of the canvas is far from both controls; a box test skips their distance fields there.
77
+ bool near(vec2 p, vec4 rect, float margin) {
78
+ return rect.z > 0.0 && all(greaterThan(p, rect.xy - margin)) && all(lessThan(p, rect.xy + rect.zw + margin));
79
+ }
80
+ vec2 uvAt(vec2 screen) {
81
+ return vec2(screen.x / resolution.x, 1.0 - screen.y / resolution.y);
82
+ }
83
+ void main() {
84
+ vec2 screen = vec2(vUv.x, 1.0 - vUv.y) * resolution;
85
+ vec2 seen = screen;
86
+ vec2 dispersion = vec2(0.0);
87
+ float thick = 0.0;
88
+ for (int i = 0; i < 2; i++) {
89
+ vec4 rect = lenses[i];
90
+ if (!near(screen, rect, 0.0)) continue;
91
+ float radius = i == 0 ? lensRadii.x : lensRadii.y;
92
+ float d = lensDistance(screen, rect, radius);
93
+ if (d < 0.0) {
94
+ float band = min(rect.w * 0.42, 15.0);
95
+ float bend = pow(1.0 - clamp(-d / band, 0.0, 1.0), 2.2);
96
+ vec2 e = vec2(0.5, 0.0);
97
+ vec2 normal = normalize(vec2(
98
+ lensDistance(screen + e.xy, rect, radius) - lensDistance(screen - e.xy, rect, radius),
99
+ lensDistance(screen + e.yx, rect, radius) - lensDistance(screen - e.yx, rect, radius)) + 0.00001);
100
+ vec2 center = rect.xy + rect.zw * 0.5;
101
+ float focus = i == 0 ? lensFocus.x : lensFocus.y;
102
+ seen = center + (screen - center) * (0.94 - focus * 0.05) + normal * bend * band * (2.2 + focus * 1.2);
103
+ dispersion = normal * bend * (2.6 + focus * 1.6);
104
+ thick = max(thick, bend);
105
+ }
106
+ }
107
+ vec3 color = backgroundAt(uvAt(seen));
108
+ // Caustics: each glass control, a little above the silk, gathers the lamp through its curved rim into a
109
+ // thin warm line on the silk just past its far edge, where its shadow would otherwise fall.
110
+ float gathered = 0.0;
111
+ for (int i = 0; i < 2; i++) {
112
+ vec4 rect = lenses[i];
113
+ if (!near(screen, rect, 16.0)) continue;
114
+ float radius = i == 0 ? lensRadii.x : lensRadii.y;
115
+ vec2 throw = clamp((screen - lamp.xy) * 14.0 / max(lamp.z - 14.0, 1.0), vec2(-8.0), vec2(8.0));
116
+ float projected = lensDistance(screen - throw, rect, radius);
117
+ float outside = smoothstep(-0.5, 1.5, lensDistance(screen, rect, radius));
118
+ // The light lands in the crescent between the glass's edge and its projected edge, fading outward.
119
+ gathered += smoothstep(5.0, -3.0, projected) * outside * clamp(length(throw) / 4.0, 0.0, 1.0);
120
+ }
121
+ color += vec3(1.0, 0.86, 0.6) * gathered * mix(0.03, 0.035, step(dot(ground, vec3(0.2126, 0.7152, 0.0722)), 0.4));
122
+ if (dispersion != vec2(0.0)) {
123
+ color.r = backgroundAt(uvAt(seen + dispersion)).r;
124
+ color.b = backgroundAt(uvAt(seen - dispersion)).b;
125
+ // Light travels farther through the thick rim, so its color deepens there.
126
+ color = mix(color, color * color * 1.08, thick * 0.35);
127
+ }
128
+ if (shade > 0.0) {
129
+ screen = seen;
130
+ // Letters float a short height above the silk; a lower lamp throws a longer, softer shadow. Held close, the
131
+ // stone seems to lift toward it, so its shadow stretches further and the lamp's height reads at once.
132
+ float lifted = smoothstep(fontSize * 4.6, fontSize * 2.4, lamp.z);
133
+ float elevation = fontSize * mix(0.16, 0.26, lifted);
134
+ // The room's light comes from above as well, so shadows lean down even under a lamp held over the type.
135
+ vec2 offset = (screen - lamp.xy + vec2(0.0, fontSize * 0.6)) * elevation / max(lamp.z - elevation, 1.0);
136
+ float reach = length(offset);
137
+ offset *= min(1.0, distanceRange * 0.8 / max(reach, 0.0001));
138
+ // The penumbra widens with distance from the letter; the field saturates at its range, so it stays inside.
139
+ float softness = min(distanceRange * 0.95, 2.0 + reach * 0.85);
140
+ float thrown = smoothstep(-softness, softness * 0.35, titleDistance(screen - offset));
141
+ float contact = smoothstep(-fontSize * 0.05, 0.0, titleDistance(screen));
142
+ // A longer shadow spreads the same occlusion over a wider penumbra, so it also fades.
143
+ // Straight under the lamp the letter hides its own shadow; a penumbra all round would read as a blur.
144
+ float visible = smoothstep(0.5, 5.0, reach);
145
+ float amount = (thrown * thrown * mix(0.17, 0.26, lifted) * visible * (1.0 - 0.35 * smoothstep(0.0, distanceRange, reach)) + contact * 0.035) * shade;
146
+ // Shadows on gold keep a little warmth instead of turning gray.
147
+ color *= mix(vec3(1.0), vec3(0.78, 0.71, 0.60), amount);
148
+ }
149
+ // The whole field fades in over the page's static gold, so arrival never dips through the bare ground.
150
+ gl_FragColor = vec4(color * intro, intro);
151
+ }`
152
+
153
+ export const heroClothSource = `
154
+ precision highp float;
155
+ varying vec2 vUv;
156
+ uniform vec2 resolution;
157
+ uniform float time;
158
+ uniform vec3 pointer;
159
+ uniform vec3 shadow;
160
+ uniform vec3 body;
161
+ uniform vec3 sheen;
162
+ uniform vec3 ground;
163
+ uniform vec4 title;
164
+ uniform vec4 readingArea;
165
+ uniform float fontSize;
166
+ uniform vec3 lamp;
167
+ uniform float drift;
168
+ uniform vec3 ripple;
169
+
170
+ float cloth(vec2 p) {
171
+ // Independent warped folds form broad valleys and continuous curved crests. The silk lies deeper than the
172
+ // type, so while the page scrolls its folds lag behind a little.
173
+ vec2 s = p + vec2(0.0, drift);
174
+ vec2 q = s + vec2(sin(s.y * 0.82 + time * 0.11), sin(s.x * 0.68 - time * 0.09)) * 0.56;
175
+ float a = q.x * 1.13 + q.y * 0.92 + sin(q.y * 0.72 - time * 0.07) * 0.65 + time * 0.21;
176
+ float b = q.x * 0.48 - q.y * 1.22 + sin(q.x * 0.67 + time * 0.08) * 0.85 - time * 0.16;
177
+ float h = sin(a) * 0.72 + sin(b) * 0.64;
178
+ h += atan(sin(a + b * 0.38) * 6.0) * 0.58;
179
+ vec2 local = p - pointer.xy;
180
+ h += pointer.z * 0.20 * exp(-dot(local, local) * 1.15);
181
+ // Pressing a control sends one ring through the silk; it spreads and settles within about two seconds.
182
+ if (ripple.z >= 0.0) {
183
+ float travelled = length(p - ripple.xy) - ripple.z * 1.5;
184
+ h += sin(travelled * 5.0) * exp(-travelled * travelled * 2.6) * 0.34 * exp(-ripple.z * 0.85) * smoothstep(0.0, 0.12, ripple.z);
185
+ }
186
+ return h;
187
+ }
188
+
189
+ void main() {
190
+ float aspect = resolution.x / resolution.y;
191
+ vec2 p = (vUv - 0.5) * vec2(aspect, 1.0) * ${heroPlaneScale.toFixed(1)};
192
+ float e = 0.009;
193
+ float h = cloth(p);
194
+ vec2 slope = vec2(cloth(p + vec2(e, 0.0)) - h, cloth(p + vec2(0.0, e)) - h) / e;
195
+ // Where the sheet curves the same way in both directions it is a dome, not a fold; there the broad sheen
196
+ // would pool into a round, out-of-focus spot, so it gives way to the satin streak instead.
197
+ float c = 0.07;
198
+ float hxx = (cloth(p + vec2(c, 0.0)) + cloth(p - vec2(c, 0.0)) - 2.0 * h) / (c * c);
199
+ float hyy = (cloth(p + vec2(0.0, c)) + cloth(p - vec2(0.0, c)) - 2.0 * h) / (c * c);
200
+ float hxy = (cloth(p + vec2(c)) - cloth(p + vec2(c, -c)) - cloth(p + vec2(-c, c)) + cloth(p - vec2(c))) / (4.0 * c * c);
201
+ float dome = smoothstep(0.4, 4.0, hxx * hyy - hxy * hxy);
202
+ vec3 normal = normalize(vec3(-slope * 1.05, 1.0));
203
+ vec3 light = normalize(vec3(-0.65 + pointer.x * pointer.z * 0.035, 0.72, 0.72));
204
+ float lit = max(dot(normal, light), 0.0);
205
+ float facing = max(dot(normal, normalize(light + vec3(0.0, 0.0, 1.0))), 0.0);
206
+ // A wide rough reflection rolls over the folds, with a restrained highlight at the lip. Pale champagne has
207
+ // little room between body and sheen, so there the reflection tightens and the satin carries the folds.
208
+ float pale = smoothstep(0.6, 0.8, dot(ground, vec3(0.2126, 0.7152, 0.0722)));
209
+ float reflection = pow(facing, mix(18.0, 30.0, pale));
210
+ float crest = pow(facing, 40.0) * 0.1 + pow(facing, 160.0) * 0.3 * (1.0 - pale * 0.5);
211
+ vec3 color = mix(shadow, body, smoothstep(0.06, 0.91, lit));
212
+ // On dark silk part of the broad sheen moves into the satin streak below, so lit areas read as streaks along
213
+ // the folds rather than round, out-of-focus spots.
214
+ color = mix(color, sheen, clamp(reflection * mix(0.5, 0.74, pale) * (1.0 - dome * 0.7) + crest, 0.0, 1.0));
215
+ // Satin: threads run along each fold, so its highlight stretches along the fold and stays narrow across it.
216
+ vec3 along = vec3(-slope.y, slope.x, 0.0);
217
+ float folded = smoothstep(0.04, 0.35, length(along));
218
+ along = normalize(along + vec3(0.0001, 0.0, 0.0));
219
+ along = normalize(along - normal * dot(along, normal));
220
+ vec3 across = cross(normal, along);
221
+ vec3 halfway = normalize(light + vec3(0.0, 0.0, 1.0));
222
+ float aligned = max(dot(halfway, normal), 0.001);
223
+ float satin = exp(-(pow(dot(halfway, along) / 0.6, 2.0) + pow(dot(halfway, across) / 0.14, 2.0)) / (aligned * aligned));
224
+ color = mix(color, sheen, satin * folded * mix(0.5, 0.32, pale));
225
+ color *= 0.94 + 0.06 * smoothstep(-1.3, 1.3, h);
226
+ // On dark silk a broad, nearly flat lit area would read as a pillow; it settles a little toward shadow, so the
227
+ // light gathers on the folds' turns instead.
228
+ float flat0 = 1.0 - smoothstep(0.5, 3.5, abs(hxx) + abs(hyy));
229
+ color *= 1.0 - flat0 * smoothstep(0.55, 0.95, lit) * 0.14 * (1.0 - pale);
230
+
231
+ vec2 screen = vec2(vUv.x, 1.0 - vUv.y) * resolution;
232
+ // A carried lamp rakes across nearby folds: crests that face it brighten, and the light pools softly.
233
+ vec2 fromLamp = (screen - lamp.xy) / (fontSize * 3.2);
234
+ float pool = exp(-dot(fromLamp, fromLamp)) * pointer.z;
235
+ vec3 toLamp = normalize(vec3(lamp.x - screen.x, screen.y - lamp.y, lamp.z));
236
+ float raking = pow(max(dot(normal, toLamp), 0.0), 6.0);
237
+ color = mix(color, sheen, clamp(pool * (raking * 0.6 + 0.08), 0.0, 1.0));
238
+ // Raking light also deepens the folds turned away from it, so the lamp shows on pale silk as contrast.
239
+ color *= 1.0 - pool * (1.0 - raking) * 0.14;
240
+ // The crests nearest the lamp mirror it: a narrow satin glint that slides along the folds with the hand.
241
+ float glint = pow(max(dot(normal, normalize(toLamp + vec3(0.0, 0.0, 1.0))), 0.0), 60.0);
242
+ color = mix(color, sheen * 1.04, clamp(glint * pool * 0.65, 0.0, 1.0));
243
+ // A soft, open reading band keeps pale glass legible when a dark-theme crest crosses it.
244
+ float dark = 1.0 - smoothstep(0.25, 0.6, dot(ground, vec3(0.2126, 0.7152, 0.0722)));
245
+ float above = smoothstep(title.y - fontSize * 1.45, title.y - fontSize * 0.12, screen.y);
246
+ float below = 1.0 - smoothstep(title.y + title.w + fontSize * 0.12, title.y + title.w + fontSize * 1.45, screen.y);
247
+ // Dimmed warm rather than neutral: the same luminance drop keeps a bright crest amber instead of khaki.
248
+ color *= mix(vec3(1.0), vec3(0.5, 0.41, 0.27), above * below * dark);
249
+ float x = vUv.x - 0.5;
250
+ // On tall screens the silk's top edge also rises toward the header, so the space above the title is never bare.
251
+ float crown = 1.0 - title.y / resolution.y + 0.18 + clamp(1.0 - aspect, 0.0, 1.0) * 0.16;
252
+ float edge = crown - x * 0.24 + x * x * 0.9 + sin(x * 4.5 + 0.7) * 0.055 + h * 0.055;
253
+ // The fade is sized for a landscape screen; on a tall phone the same fraction of height would leave the top
254
+ // empty, so it narrows there and the silk reaches up toward the header.
255
+ float portrait = mix(0.5, 1.0, clamp(aspect, 0.0, 1.0));
256
+ float alpha = 1.0 - smoothstep(edge - 0.26 * portrait, edge + 0.12 * portrait, vUv.y);
257
+ // The reading space follows the sheet and opens toward the lower left, never a closed panel.
258
+ vec2 reading = (screen - readingArea.xy - readingArea.zw * 0.5) / max(readingArea.zw * vec2(0.62, 0.65) + fontSize * vec2(0.8, 1.05), vec2(1.0));
259
+ reading.x += reading.y * 0.17 - 0.08 + max(reading.y, 0.0) * 0.32;
260
+ reading.y /= 1.0 + max(reading.y, 0.0) * 0.6;
261
+ reading.y += sin(reading.x * 1.1 + 0.4) * 0.24 + h * 0.08;
262
+ alpha *= mix(0.55, 1.0, smoothstep(0.58, 1.9, length(reading)));
263
+ float bottom = smoothstep(0.0, 0.3 + x * 0.12 + h * 0.025, vUv.y);
264
+ alpha *= bottom * bottom * (3.0 - 2.0 * bottom);
265
+ alpha *= 1.0 - smoothstep(0.91, 1.12, vUv.y) * 0.55;
266
+ // Under the header the silk recedes, so a crest never passes behind its icons or the gold logo mark.
267
+ alpha *= 1.0 - (1.0 - smoothstep(fontSize * 0.45, fontSize * 1.15, screen.y)) * 0.6;
268
+ // Half-faded gold over a neutral ground turns gray; the middle of the fade passes through dark amber, or warm
269
+ // ivory in light mode, while both ends still meet the ground and the full silk exactly.
270
+ // Toward the section's foot the warmth lets go first, so the silk settles into the page without a seam.
271
+ vec3 warmth = mix(mix(ground, sheen, 0.55), shadow * 1.4, dark);
272
+ vec3 fadeGround = mix(ground, warmth, alpha * (1.0 - alpha) * 2.4 * smoothstep(0.12, 0.45, vUv.y));
273
+ gl_FragColor = vec4(mix(fadeGround, color, alpha), 1.0);
274
+ }`
275
+
276
+ /**
277
+ * Cut stone lit by the lamp. Light mode is polished obsidian: a near-black face, a narrow rounded bevel
278
+ * that mirrors the gold, and one sharp highlight. Dark mode is moonstone: a milky body whose bevel bends the gold behind it.
279
+ */
280
+ export const heroCompositeSource = `
281
+ precision highp float;
282
+ varying vec2 vUv;
283
+ uniform sampler2D scene;
284
+ uniform sampler2D glyphs;
285
+ uniform vec2 resolution;
286
+ uniform vec4 title;
287
+ uniform float distanceRange;
288
+ uniform float fontSize;
289
+ uniform float material;
290
+ uniform float glint;
291
+ uniform float time;
292
+ uniform vec3 lamp;
293
+ uniform vec3 ink;
294
+ uniform vec3 ground;
295
+ ${lampLighting}
296
+
297
+ vec3 sceneAt(vec2 uv) {
298
+ return texture2D(scene, clamp(uv, vec2(0.0), vec2(1.0))).rgb;
299
+ }
300
+
301
+ void main() {
302
+ vec2 screen = vec2(vUv.x, 1.0 - vUv.y) * resolution;
303
+ vec2 textUv = (screen - title.xy) / title.zw;
304
+ if (textUv.x < 0.0 || textUv.y < 0.0 || textUv.x > 1.0 || textUv.y > 1.0) {
305
+ gl_FragColor = vec4(0.0);
306
+ return;
307
+ }
308
+ vec4 glyph = texture2D(glyphs, textUv);
309
+ if (glyph.a < 0.002) {
310
+ gl_FragColor = vec4(0.0);
311
+ return;
312
+ }
313
+ float dark = 1.0 - smoothstep(0.25, 0.6, dot(ground, vec3(0.2126, 0.7152, 0.0722)));
314
+ // A rasterized diagonal leaves a pixel staircase in the field; four taps a little apart smooth the distance
315
+ // and give a steadier normal, so a lit bevel reads as one line instead of a row of beads.
316
+ vec2 tap = vec2(1.1) / title.zw;
317
+ float east = texture2D(glyphs, textUv + vec2(tap.x, 0.0)).r;
318
+ float west = texture2D(glyphs, textUv - vec2(tap.x, 0.0)).r;
319
+ float south = texture2D(glyphs, textUv + vec2(0.0, tap.y)).r;
320
+ float north = texture2D(glyphs, textUv - vec2(0.0, tap.y)).r;
321
+ float distance = (mix(glyph.r, (east + west + south + north) * 0.25, 0.75) - 0.5) * 2.0 * distanceRange;
322
+ // Screen-space outward direction, y up, so it shares a frame with the lamp.
323
+ vec2 gradient = vec2(west - east, south - north);
324
+ vec2 outward = mix((glyph.gb * 2.0 - 1.0) * vec2(1.0, -1.0), normalize(gradient + vec2(0.00001)), smoothstep(0.004, 0.02, length(gradient)));
325
+ float bevel = clamp(fontSize * 0.04, 1.6, 3.6);
326
+ float rise = clamp(distance / bevel, 0.0, 1.0);
327
+ // A quarter-round edge: steep at the contour, flat across the face.
328
+ float slope = (1.0 - rise) * (1.0 - rise) * 2.4;
329
+ // Hand polishing leaves a face that is almost, not perfectly, flat: reflections waver slightly across it.
330
+ vec2 polish = screen / fontSize;
331
+ vec2 undulation = vec2(sin(polish.y * 2.7 + polish.x * 0.6), sin(polish.x * 2.1 - polish.y * 1.2)) * 0.03;
332
+ vec3 normal = normalize(vec3(outward * slope + undulation * rise, 1.0));
333
+ vec3 light = toLamp(screen);
334
+ vec3 halfway = normalize(light + vec3(0.0, 0.0, 1.0));
335
+ float edge = 1.0 - rise;
336
+ // A flat mirror shows the lamp directly beneath it, at a fixed size however high it hangs; tilting the
337
+ // surface by an angle moves that image by twice the angle times the lamp's height.
338
+ vec2 image = screen - lamp.xy + normal.xy * lamp.z * 2.0;
339
+ // Polished stone mirrors the lamp as a small, crisp point; a broad soft one reads as a gray smudge on black.
340
+ float spot = exp(-dot(image, image) / pow(fontSize * 0.075, 2.0));
341
+ // The glow around the lamp's image belongs to a lamp held close; resting high, it leaves the stone even.
342
+ float held = smoothstep(fontSize * 4.6, fontSize * 3.4, lamp.z);
343
+ // The glow is diffuse, so it lights face and bevel alike rather than following the mirror image off the bevel,
344
+ // which would leave a dark ring inside every lit letter.
345
+ vec2 under = screen - lamp.xy;
346
+ float pool = exp(-dot(under, under) / pow(fontSize * 2.6, 2.0)) * held;
347
+ // The lamp is a long strip light: polished stone mirrors it as one crisp, slightly tilted streak running across
348
+ // the letters beneath it, the way glossy black type reflects a studio strip. A streak reads as a reflection,
349
+ // where a broad panel would read as a lighter fill inside dark outlines. At rest it still glides over the
350
+ // first line, at half strength.
351
+ vec2 panel = mat2(0.94, -0.34, 0.34, 0.94) * image / fontSize;
352
+ vec2 panelEdge = abs(panel) - vec2(1.1, 0.05);
353
+ float panelDistance = length(max(panelEdge, 0.0)) + min(max(panelEdge.x, panelEdge.y), 0.0) - 0.02;
354
+ float softbox = (1.0 - smoothstep(-0.012, 0.018, panelDistance)) * (1.0 - smoothstep(0.6, 1.1, abs(panel.x))) * mix(0.5, 1.0, held);
355
+ // The bevel catches the lamp as one band where its curve turns toward it. Placing that band by distance
356
+ // and weighting it by the edge's direction, not by the exact slope, keeps it even along a diagonal.
357
+ float bevelLine = exp(-pow((edge - 0.75) / 0.28, 2.0)) * pow(max(dot(outward, normalize(halfway.xy + vec2(0.0001))), 0.0), 4.0);
358
+ // Close to the lamp the bevels flare, so where it hangs reads at a glance.
359
+ vec2 fromLamp = (screen - lamp.xy) / (fontSize * 3.0);
360
+ float nearLamp = exp(-dot(fromLamp, fromLamp));
361
+ bevelLine *= 0.25 + nearLamp * mix(1.3, 2.2, held);
362
+ // Antialiased contour pixels sit on the steepest slope; holding reflections back there avoids a beaded rim.
363
+ float hold = smoothstep(0.0, 0.9, distance);
364
+ float view = (1.0 - normal.z) * hold;
365
+ // The bevel looks sideways into the silk around the letter.
366
+ vec2 aside = normal.xy * fontSize * 0.55 / resolution;
367
+ vec3 surround = sceneAt(vUv + aside);
368
+ vec3 behind = sceneAt(vUv);
369
+ // One studio light sweeps across slowly, plus the intro glint that travels once along the line.
370
+ vec2 plane = (screen - title.xy) / fontSize;
371
+ float band = plane.x * 0.8 - plane.y * 0.55;
372
+ float sweep = exp(-pow((band - (fract(time * 0.018 + 0.35) * 2.6 - 0.8) * title.z / fontSize) / 0.9, 2.0));
373
+ float pass = glint * (1.0 - glint) * 4.0;
374
+ float glintAt = band - mix(-2.0, title.z / fontSize + 2.0, glint);
375
+ float glinting = (exp(-pow(glintAt / 0.13, 2.0)) + exp(-pow(glintAt / 0.6, 2.0)) * 0.12) * pass;
376
+
377
+ vec3 obsidian;
378
+ {
379
+ // Edges turned toward the lamp mirror the lit silk; edges turned away fall into the stone's own black.
380
+ float toward = smoothstep(-0.35, 0.85, dot(outward, normalize(light.xy + vec2(0.0001))));
381
+ // The face takes the lamp as a small spot below full white, so a letter never turns to chrome; the bevel's
382
+ // line reaches the outermost pixel, so the rounded edge itself catches the light, not a ring inside it.
383
+ float plain = (1.0 - edge) * (1.0 - edge);
384
+ vec3 sheenTint = vec3(0.98, 0.86, 0.62);
385
+ float hot = spot * 0.85 * plain * hold;
386
+ vec3 face = vec3(0.030, 0.029, 0.033);
387
+ float fresnel = pow(view, 1.6);
388
+ vec3 color = face;
389
+ // Around the lamp's image the polished face mirrors the lit silk, warm rather than a gray haze.
390
+ color += mix(surround, sheenTint, 0.6) * pow(pool, 4.0) * 0.06 * hold;
391
+ color += surround * fresnel * mix(0.0, 0.5, toward * toward);
392
+ // Head-on, the polished face is a dark mirror: a few percent of distant silk, softened and dimmed.
393
+ vec3 mirrored = sceneAt(vec2(vUv.x + (vUv.x - 0.5) * 0.3, vUv.y + 0.22 + plane.y * 0.004) + normal.xy * 0.6);
394
+ // Its contrast is kept and its average lowered, so the face reads as black glass holding a reflection
395
+ // rather than as a brown tint.
396
+ vec3 distant = mix(behind, mirrored, 0.7);
397
+ distant = mix(vec3(dot(distant, vec3(0.2126, 0.7152, 0.0722))), distant, 0.2);
398
+ color += distant * distant * distant * 0.035 * hold;
399
+ // Thin edges facing away let a smoky brown through, the way obsidian does when held up to light.
400
+ color += vec3(0.11, 0.06, 0.03) * fresnel * (1.0 - toward) * 0.1;
401
+ color += vec3(1.0, 0.97, 0.92) * hot;
402
+ // The lit bevel mirrors the gold silk beside it, brightened by the lamp, so the cut edge reads as polished stone.
403
+ color += mix(surround * 1.5, vec3(1.0, 0.95, 0.85), 0.45) * bevelLine * 0.42 * smoothstep(-0.6, 0.4, distance);
404
+ color += vec3(0.95, 0.88, 0.74) * (sweep * sweep * 0.05 * hold + sweep * 0.16 * edge * toward);
405
+ // The lamp's softbox, mirrored below full white, so the type reads as black glass, not chrome. The bevel mirrors
406
+ // it too, through its own tilt, so only the side that turns toward the lamp catches it and no dark rim rings
407
+ // a lit face.
408
+ color += vec3(0.97, 0.9, 0.76) * softbox * 0.2 * hold;
409
+ color += vec3(1.0, 0.95, 0.86) * glinting * (0.28 + edge * 0.9) * hold;
410
+ obsidian = color;
411
+ }
412
+
413
+ vec3 moonstone;
414
+ {
415
+ float toward = smoothstep(-0.4, 0.9, dot(outward, normalize(light.xy + vec2(0.0001))));
416
+ float fresnel = pow(view, 1.4);
417
+ vec2 bend = normal.xy * fontSize * 0.3 / resolution;
418
+ vec3 refracted = sceneAt(vUv - bend);
419
+ // A warm, milky body; near the contour the bright gold behind it glows through, never the dark.
420
+ // The body sits a step below white, leaving room for the sheen and highlights to rise above it.
421
+ // The lamp lights the stone from within: the body is brightest and coolest near it and settles to a deeper
422
+ // warm ivory away from it, so where the lamp hangs reads across the whole line.
423
+ vec2 reach = (screen - lamp.xy) / (fontSize * 3.6);
424
+ float lampLit = exp(-dot(reach, reach)) * mix(0.65, 1.0, held);
425
+ vec3 color = ink * vec3(0.9, 0.875, 0.83) * mix(0.89, 1.14, lampLit);
426
+ color += refracted * refracted * edge * edge * 0.3;
427
+ // Light pools in the stone's lower edges, which turn a little denser and milkier.
428
+ color *= 1.0 - edge * smoothstep(0.2, 0.9, -outward.y) * 0.08;
429
+ // Adularescence: a cool light floats under the surface where the lamp's angle catches it, brighter than the
430
+ // body with a faint blue fringe, in broad clouds across the whole line rather than patches inside letters.
431
+ vec2 drift = (screen - lamp.xy) / fontSize;
432
+ float billow = 0.5 + 0.35 * sin(drift.x * 0.45 - drift.y * 0.3 + time * 0.16 + sin(drift.y * 0.6 + time * 0.11) * 1.4)
433
+ + 0.15 * sin(drift.x * 0.9 + drift.y * 0.7 - time * 0.21);
434
+ float sheen = smoothstep(0.35, 1.0, pow(halfway.z, 4.0) * billow);
435
+ float fringe = sheen * (1.0 - sheen) * 4.0;
436
+ color = mix(color, vec3(0.84, 0.88, 0.98), fringe * 0.14);
437
+ // At rest the sheen is a soft hint, so the line reads as one stone; a lamp held close brings it out.
438
+ color = mix(color, vec3(1.0, 1.01, 1.04), sheen * mix(0.45, 0.85, held));
439
+ // Where the lamp hangs, the sheen gathers across a few letters into a cool glow, so a held lamp reads at once.
440
+ color = mix(color, vec3(0.9, 0.94, 1.0), max(pool * 0.6, lampLit * 0.42) * (1.0 - edge * 0.5));
441
+ // Light that enters on the lamp's side leaves through the far edges as a warm amber glow, as it does through
442
+ // translucent stone held up to a light.
443
+ float rim = 1.0 - smoothstep(0.0, bevel * 2.4, distance);
444
+ color = mix(color, vec3(1.0, 0.78, 0.46), rim * (1.0 - toward) * nearLamp * 0.55 * hold);
445
+ color += vec3(1.0, 0.86, 0.62) * fresnel * toward * 0.24;
446
+ color *= 1.0 - fresnel * (1.0 - toward) * 0.08;
447
+ float plain = (1.0 - edge) * (1.0 - edge);
448
+ float hot = ((spot * 0.6 + pool * 0.07) * plain + bevelLine * 0.45) * hold;
449
+ color += vec3(1.0, 0.97, 0.9) * hot;
450
+ color += vec3(1.0, 0.9, 0.7) * sweep * (0.03 + edge * toward * 0.12);
451
+ // On a pale stone the intro glint reads as a wave of the cool sheen rather than more white.
452
+ float wave = exp(-pow(glintAt / 0.9, 2.0)) * pass;
453
+ color = mix(color, vec3(0.78, 0.85, 1.0), clamp(glinting * 0.6 + wave * 0.45, 0.0, 1.0) * hold);
454
+ moonstone = color;
455
+ }
456
+
457
+ vec3 stone = mix(obsidian, moonstone, dark);
458
+ vec3 color = mix(ink, clamp(stone, 0.0, 1.0), material);
459
+ gl_FragColor = vec4(color, glyph.a);
460
+ }`