@sypnia/ui 0.0.0-stage → 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.
Files changed (597) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +95 -2
  3. package/astro/ActionCard.astro +17 -0
  4. package/astro/ActionCardSkeleton.astro +10 -0
  5. package/astro/Actions.astro +6 -0
  6. package/astro/AgentInstall.astro +13 -0
  7. package/astro/Alert.astro +20 -0
  8. package/astro/Announcement.astro +7 -0
  9. package/astro/ApiReference.astro +29 -0
  10. package/astro/ArticleHead.astro +24 -0
  11. package/astro/Aside.astro +17 -0
  12. package/astro/AspectRatio.astro +7 -0
  13. package/astro/AuthLayout.astro +31 -0
  14. package/astro/AuthLayoutSkeleton.astro +19 -0
  15. package/astro/Avatar.astro +7 -0
  16. package/astro/AvatarGroup.astro +16 -0
  17. package/astro/AvatarGroupSkeleton.astro +7 -0
  18. package/astro/AvatarSkeleton.astro +6 -0
  19. package/astro/Badge.astro +8 -0
  20. package/astro/BadgeSkeleton.astro +6 -0
  21. package/astro/Banner.astro +6 -0
  22. package/astro/Button.astro +26 -0
  23. package/astro/ButtonGroup.astro +6 -0
  24. package/astro/CallToAction.astro +10 -0
  25. package/astro/Callout.astro +13 -0
  26. package/astro/CalloutSkeleton.astro +10 -0
  27. package/astro/Card.astro +11 -0
  28. package/astro/CardGrid.astro +9 -0
  29. package/astro/CardGridSkeleton.astro +7 -0
  30. package/astro/CardSkeleton.astro +11 -0
  31. package/astro/Cards.astro +16 -0
  32. package/astro/CardsSkeleton.astro +5 -0
  33. package/astro/CaseMap.astro +72 -0
  34. package/astro/Center.astro +7 -0
  35. package/astro/Changelog.astro +23 -0
  36. package/astro/Character.astro +7 -0
  37. package/astro/Checklist.astro +27 -0
  38. package/astro/ChecklistSkeleton.astro +10 -0
  39. package/astro/Chip.astro +10 -0
  40. package/astro/ChipSkeleton.astro +4 -0
  41. package/astro/Cli.astro +10 -0
  42. package/astro/CodeBlock.astro +20 -0
  43. package/astro/CodeBlockSkeleton.astro +9 -0
  44. package/astro/CodeTabs.astro +31 -0
  45. package/astro/Columns.astro +7 -0
  46. package/astro/Compare.astro +16 -0
  47. package/astro/CompareTable.astro +29 -0
  48. package/astro/CompareTableSkeleton.astro +12 -0
  49. package/astro/Container.astro +6 -0
  50. package/astro/CopyButton.astro +15 -0
  51. package/astro/Count.astro +9 -0
  52. package/astro/CountSkeleton.astro +4 -0
  53. package/astro/Delta.astro +20 -0
  54. package/astro/DeltaSkeleton.astro +4 -0
  55. package/astro/DescriptionList.astro +8 -0
  56. package/astro/DescriptionListSkeleton.astro +7 -0
  57. package/astro/Divider.astro +6 -0
  58. package/astro/DocsArticleSkeleton.astro +25 -0
  59. package/astro/DocsHead.astro +78 -0
  60. package/astro/DocsHeader.astro +45 -0
  61. package/astro/DocsHero.astro +13 -0
  62. package/astro/DocsShell.astro +103 -0
  63. package/astro/EditLink.astro +9 -0
  64. package/astro/EmptyState.astro +14 -0
  65. package/astro/Endpoint.astro +21 -0
  66. package/astro/ErrorItem.astro +5 -0
  67. package/astro/ErrorList.astro +8 -0
  68. package/astro/Expected.astro +8 -0
  69. package/astro/Faq.astro +11 -0
  70. package/astro/FeatureGrid.astro +11 -0
  71. package/astro/FeatureGridSkeleton.astro +8 -0
  72. package/astro/FeatureList.astro +18 -0
  73. package/astro/FeatureListSkeleton.astro +7 -0
  74. package/astro/Figure.astro +17 -0
  75. package/astro/FigureSkeleton.astro +9 -0
  76. package/astro/Fireflies.astro +8 -0
  77. package/astro/Glossary.astro +8 -0
  78. package/astro/Grid.astro +7 -0
  79. package/astro/Heading.astro +7 -0
  80. package/astro/Hero.astro +21 -0
  81. package/astro/Icon.astro +17 -0
  82. package/astro/IconButton.astro +21 -0
  83. package/astro/Identity.astro +7 -0
  84. package/astro/IdentitySkeleton.astro +10 -0
  85. package/astro/Install.astro +7 -0
  86. package/astro/Kbd.astro +4 -0
  87. package/astro/KeyValue.astro +6 -0
  88. package/astro/KeyValueSkeleton.astro +7 -0
  89. package/astro/Ledger.astro +6 -0
  90. package/astro/Logo.astro +9 -0
  91. package/astro/Mark.astro +1 -0
  92. package/astro/McpTool.astro +13 -0
  93. package/astro/NewCard.astro +7 -0
  94. package/astro/Option.astro +6 -0
  95. package/astro/Options.astro +6 -0
  96. package/astro/PackageTabs.astro +12 -0
  97. package/astro/Page.astro +5 -0
  98. package/astro/PageFeedback.astro +20 -0
  99. package/astro/PageHeader.astro +14 -0
  100. package/astro/PageHeaderSkeleton.astro +12 -0
  101. package/astro/PageSkeleton.astro +19 -0
  102. package/astro/PaginationSkeleton.astro +17 -0
  103. package/astro/Panel.astro +11 -0
  104. package/astro/PanelSkeleton.astro +10 -0
  105. package/astro/Param.astro +15 -0
  106. package/astro/Params.astro +12 -0
  107. package/astro/ParamsSkeleton.astro +5 -0
  108. package/astro/Phone.astro +6 -0
  109. package/astro/PlanCard.astro +27 -0
  110. package/astro/PlanCardSkeleton.astro +13 -0
  111. package/astro/PrevNext.astro +15 -0
  112. package/astro/PricingTable.astro +41 -0
  113. package/astro/PricingTableSkeleton.astro +9 -0
  114. package/astro/ProductGrid.astro +10 -0
  115. package/astro/ProductMark.astro +10 -0
  116. package/astro/Progress.astro +12 -0
  117. package/astro/ProgressSkeleton.astro +9 -0
  118. package/astro/Prose.astro +7 -0
  119. package/astro/Quote.astro +10 -0
  120. package/astro/QuoteSkeleton.astro +10 -0
  121. package/astro/Releases.astro +6 -0
  122. package/astro/RequestExample.astro +8 -0
  123. package/astro/ResponseExample.astro +9 -0
  124. package/astro/Row.astro +7 -0
  125. package/astro/Says.astro +6 -0
  126. package/astro/ScrollArea.astro +7 -0
  127. package/astro/Search.astro +37 -0
  128. package/astro/SearchResult.astro +8 -0
  129. package/astro/SearchResultSkeleton.astro +5 -0
  130. package/astro/Section.astro +17 -0
  131. package/astro/SectionSkeleton.astro +9 -0
  132. package/astro/Setting.astro +19 -0
  133. package/astro/Show.astro +6 -0
  134. package/astro/SideNav.astro +65 -0
  135. package/astro/SideNavSkeleton.astro +13 -0
  136. package/astro/SiteFooter.astro +14 -0
  137. package/astro/SiteHeader.astro +28 -0
  138. package/astro/Skeleton.astro +8 -0
  139. package/astro/SkeletonText.astro +6 -0
  140. package/astro/Spacer.astro +7 -0
  141. package/astro/Split.astro +17 -0
  142. package/astro/Stack.astro +7 -0
  143. package/astro/Stage.astro +12 -0
  144. package/astro/Stat.astro +10 -0
  145. package/astro/StatGroup.astro +1 -0
  146. package/astro/StatGroupSkeleton.astro +7 -0
  147. package/astro/StatSkeleton.astro +10 -0
  148. package/astro/Status.astro +6 -0
  149. package/astro/StatusSkeleton.astro +4 -0
  150. package/astro/Step.astro +5 -0
  151. package/astro/Steps.astro +4 -0
  152. package/astro/Sticky.astro +7 -0
  153. package/astro/TableOfContents.astro +16 -0
  154. package/astro/TableOfContentsSkeleton.astro +5 -0
  155. package/astro/TableSkeleton.astro +16 -0
  156. package/astro/Tabs.astro +31 -0
  157. package/astro/TabsSkeleton.astro +6 -0
  158. package/astro/Term.astro +8 -0
  159. package/astro/Terms.astro +4 -0
  160. package/astro/Text.astro +6 -0
  161. package/astro/TextSkeleton.astro +9 -0
  162. package/astro/Toolbar.astro +7 -0
  163. package/astro/ToolbarGroup.astro +5 -0
  164. package/astro/ToolbarSeparator.astro +1 -0
  165. package/astro/ToolbarSkeleton.astro +6 -0
  166. package/astro/VersionBadge.astro +8 -0
  167. package/astro/_gap.ts +5 -0
  168. package/astro/_id.ts +3 -0
  169. package/astro/_locale.ts +9 -0
  170. package/css/base.css +92 -0
  171. package/css/components/actions.css +36 -0
  172. package/css/components/brand.css +28 -0
  173. package/css/components/button.css +84 -0
  174. package/css/components/charts-more.css +89 -0
  175. package/css/components/charts.css +83 -0
  176. package/css/components/code-editor.css +14 -0
  177. package/css/components/code.css +86 -0
  178. package/css/components/data-display.css +105 -0
  179. package/css/components/data-more.css +323 -0
  180. package/css/components/data-table.css +146 -0
  181. package/css/components/docs.css +466 -0
  182. package/css/components/feedback.css +103 -0
  183. package/css/components/field.css +92 -0
  184. package/css/components/fields-advanced.css +158 -0
  185. package/css/components/fields-more.css +93 -0
  186. package/css/components/floating.css +55 -0
  187. package/css/components/forms.css +109 -0
  188. package/css/components/layout.css +97 -0
  189. package/css/components/nav.css +107 -0
  190. package/css/components/navigation.css +133 -0
  191. package/css/components/overlay.css +112 -0
  192. package/css/components/primitives.css +15 -0
  193. package/css/components/screens.css +42 -0
  194. package/css/components/shell.css +118 -0
  195. package/css/components/site.css +114 -0
  196. package/css/components/status.css +81 -0
  197. package/css/components/surface.css +69 -0
  198. package/css/components/table.css +49 -0
  199. package/css/components/viz.css +117 -0
  200. package/css/fonts.css +8 -0
  201. package/css/index.css +35 -0
  202. package/css/tokens.css +409 -0
  203. package/dist/chunk-AXIJDECU.js +97 -0
  204. package/dist/chunk-P7RZ7TCP.js +108 -0
  205. package/dist/chunk-PGPCLRLZ.js +701 -0
  206. package/dist/chunk-UM27QNJ7.js +412 -0
  207. package/dist/dom/elements.d.ts +2 -0
  208. package/dist/dom/elements.js +558 -0
  209. package/dist/dom/index.d.ts +53 -0
  210. package/dist/dom/index.js +2 -0
  211. package/dist/i18n/index.d.ts +661 -0
  212. package/dist/i18n/index.js +1 -0
  213. package/dist/react/code-editor.d.ts +25 -0
  214. package/dist/react/code-editor.js +89 -0
  215. package/dist/react/index.d.ts +4461 -0
  216. package/dist/react/index.js +7807 -0
  217. package/dist/tokens/index.d.ts +64 -0
  218. package/dist/tokens/index.js +49 -0
  219. package/fonts/LICENSE-instrument-sans.txt +93 -0
  220. package/fonts/LICENSE-literata.txt +93 -0
  221. package/fonts/LICENSE-martian-mono.txt +93 -0
  222. package/fonts/instrument-sans.woff2 +0 -0
  223. package/fonts/literata-italic.woff2 +0 -0
  224. package/fonts/literata-roman.woff2 +0 -0
  225. package/fonts/martian-mono.woff2 +0 -0
  226. package/icons/sprite.svg +1 -0
  227. package/icons/svg/accessibility.svg +1 -0
  228. package/icons/svg/agent.svg +1 -0
  229. package/icons/svg/alert.svg +1 -0
  230. package/icons/svg/align-center.svg +1 -0
  231. package/icons/svg/align-left.svg +1 -0
  232. package/icons/svg/align-right.svg +1 -0
  233. package/icons/svg/api.svg +1 -0
  234. package/icons/svg/archive.svg +1 -0
  235. package/icons/svg/arrow-down-left.svg +1 -0
  236. package/icons/svg/arrow-down-right.svg +1 -0
  237. package/icons/svg/arrow-down.svg +1 -0
  238. package/icons/svg/arrow-left.svg +1 -0
  239. package/icons/svg/arrow-right.svg +1 -0
  240. package/icons/svg/arrow-up-left.svg +1 -0
  241. package/icons/svg/arrow-up-right.svg +1 -0
  242. package/icons/svg/arrow-up.svg +1 -0
  243. package/icons/svg/at.svg +1 -0
  244. package/icons/svg/audit.svg +1 -0
  245. package/icons/svg/award.svg +1 -0
  246. package/icons/svg/backend.svg +1 -0
  247. package/icons/svg/backup.svg +1 -0
  248. package/icons/svg/bag.svg +1 -0
  249. package/icons/svg/ban.svg +1 -0
  250. package/icons/svg/bank.svg +1 -0
  251. package/icons/svg/bell-off.svg +1 -0
  252. package/icons/svg/bell.svg +1 -0
  253. package/icons/svg/bold.svg +1 -0
  254. package/icons/svg/bolt.svg +1 -0
  255. package/icons/svg/book-open.svg +1 -0
  256. package/icons/svg/book.svg +1 -0
  257. package/icons/svg/bookmark.svg +1 -0
  258. package/icons/svg/box.svg +1 -0
  259. package/icons/svg/braces.svg +1 -0
  260. package/icons/svg/brackets.svg +1 -0
  261. package/icons/svg/browser.svg +1 -0
  262. package/icons/svg/brush.svg +1 -0
  263. package/icons/svg/bug.svg +1 -0
  264. package/icons/svg/calendar-check.svg +1 -0
  265. package/icons/svg/calendar-plus.svg +1 -0
  266. package/icons/svg/calendar.svg +1 -0
  267. package/icons/svg/camera.svg +1 -0
  268. package/icons/svg/cards.svg +1 -0
  269. package/icons/svg/cart.svg +1 -0
  270. package/icons/svg/certificate.svg +1 -0
  271. package/icons/svg/chart-area.svg +1 -0
  272. package/icons/svg/chart-bar.svg +1 -0
  273. package/icons/svg/chart-line.svg +1 -0
  274. package/icons/svg/chart-parts.svg +1 -0
  275. package/icons/svg/chart-scatter.svg +1 -0
  276. package/icons/svg/chat.svg +1 -0
  277. package/icons/svg/chats.svg +1 -0
  278. package/icons/svg/check-small.svg +1 -0
  279. package/icons/svg/check.svg +1 -0
  280. package/icons/svg/chevron-down.svg +1 -0
  281. package/icons/svg/chevron-left.svg +1 -0
  282. package/icons/svg/chevron-right.svg +1 -0
  283. package/icons/svg/chevron-up.svg +1 -0
  284. package/icons/svg/chevrons-down.svg +1 -0
  285. package/icons/svg/chevrons-left.svg +1 -0
  286. package/icons/svg/chevrons-right.svg +1 -0
  287. package/icons/svg/chevrons-up-down.svg +1 -0
  288. package/icons/svg/chevrons-up.svg +1 -0
  289. package/icons/svg/clipboard-check.svg +1 -0
  290. package/icons/svg/clipboard.svg +1 -0
  291. package/icons/svg/clock.svg +1 -0
  292. package/icons/svg/close-small.svg +1 -0
  293. package/icons/svg/close.svg +1 -0
  294. package/icons/svg/cloud-download.svg +1 -0
  295. package/icons/svg/cloud-off.svg +1 -0
  296. package/icons/svg/cloud-upload.svg +1 -0
  297. package/icons/svg/cloud.svg +1 -0
  298. package/icons/svg/code.svg +1 -0
  299. package/icons/svg/coins.svg +1 -0
  300. package/icons/svg/collapse.svg +1 -0
  301. package/icons/svg/columns.svg +1 -0
  302. package/icons/svg/comment.svg +1 -0
  303. package/icons/svg/commit.svg +1 -0
  304. package/icons/svg/compass.svg +1 -0
  305. package/icons/svg/contact.svg +1 -0
  306. package/icons/svg/container.svg +1 -0
  307. package/icons/svg/copy.svg +1 -0
  308. package/icons/svg/cpu.svg +1 -0
  309. package/icons/svg/credit-card.svg +1 -0
  310. package/icons/svg/cron.svg +1 -0
  311. package/icons/svg/crop.svg +1 -0
  312. package/icons/svg/crown.svg +1 -0
  313. package/icons/svg/csv.svg +1 -0
  314. package/icons/svg/cursor.svg +1 -0
  315. package/icons/svg/dark-mode.svg +1 -0
  316. package/icons/svg/dashboard.svg +1 -0
  317. package/icons/svg/data.svg +1 -0
  318. package/icons/svg/dead-click.svg +1 -0
  319. package/icons/svg/density.svg +1 -0
  320. package/icons/svg/deploy.svg +1 -0
  321. package/icons/svg/desktop.svg +1 -0
  322. package/icons/svg/disk.svg +1 -0
  323. package/icons/svg/dns.svg +1 -0
  324. package/icons/svg/dollar.svg +1 -0
  325. package/icons/svg/domain.svg +1 -0
  326. package/icons/svg/dot-off.svg +1 -0
  327. package/icons/svg/dot.svg +1 -0
  328. package/icons/svg/download.svg +1 -0
  329. package/icons/svg/duplicate.svg +1 -0
  330. package/icons/svg/edit.svg +1 -0
  331. package/icons/svg/engine.svg +1 -0
  332. package/icons/svg/enter.svg +1 -0
  333. package/icons/svg/environment.svg +1 -0
  334. package/icons/svg/equal.svg +1 -0
  335. package/icons/svg/eraser.svg +1 -0
  336. package/icons/svg/error.svg +1 -0
  337. package/icons/svg/expand.svg +1 -0
  338. package/icons/svg/export.svg +1 -0
  339. package/icons/svg/external.svg +1 -0
  340. package/icons/svg/eye-off.svg +1 -0
  341. package/icons/svg/failure.svg +1 -0
  342. package/icons/svg/fast-forward.svg +1 -0
  343. package/icons/svg/file-check.svg +1 -0
  344. package/icons/svg/file-code.svg +1 -0
  345. package/icons/svg/file-lock.svg +1 -0
  346. package/icons/svg/file-plus.svg +1 -0
  347. package/icons/svg/file-table.svg +1 -0
  348. package/icons/svg/file-text.svg +1 -0
  349. package/icons/svg/file.svg +1 -0
  350. package/icons/svg/files.svg +1 -0
  351. package/icons/svg/filter.svg +1 -0
  352. package/icons/svg/fingerprint.svg +1 -0
  353. package/icons/svg/fire.svg +1 -0
  354. package/icons/svg/firewall.svg +1 -0
  355. package/icons/svg/fix.svg +1 -0
  356. package/icons/svg/flag.svg +1 -0
  357. package/icons/svg/folder-open.svg +1 -0
  358. package/icons/svg/folder-plus.svg +1 -0
  359. package/icons/svg/folder.svg +1 -0
  360. package/icons/svg/fork.svg +1 -0
  361. package/icons/svg/fullscreen-exit.svg +1 -0
  362. package/icons/svg/fullscreen.svg +1 -0
  363. package/icons/svg/function.svg +1 -0
  364. package/icons/svg/funnel.svg +1 -0
  365. package/icons/svg/gauge.svg +1 -0
  366. package/icons/svg/gift.svg +1 -0
  367. package/icons/svg/git-branch.svg +1 -0
  368. package/icons/svg/globe.svg +1 -0
  369. package/icons/svg/grid.svg +1 -0
  370. package/icons/svg/grip.svg +1 -0
  371. package/icons/svg/hand.svg +1 -0
  372. package/icons/svg/handshake.svg +1 -0
  373. package/icons/svg/hash.svg +1 -0
  374. package/icons/svg/heading.svg +1 -0
  375. package/icons/svg/heart.svg +1 -0
  376. package/icons/svg/heatmap.svg +1 -0
  377. package/icons/svg/help.svg +1 -0
  378. package/icons/svg/highlight.svg +1 -0
  379. package/icons/svg/history.svg +1 -0
  380. package/icons/svg/home.svg +1 -0
  381. package/icons/svg/hourglass.svg +1 -0
  382. package/icons/svg/id-card.svg +1 -0
  383. package/icons/svg/idea.svg +1 -0
  384. package/icons/svg/image.svg +1 -0
  385. package/icons/svg/import.svg +1 -0
  386. package/icons/svg/inbox.svg +1 -0
  387. package/icons/svg/incognito.svg +1 -0
  388. package/icons/svg/indent.svg +1 -0
  389. package/icons/svg/index.svg +1 -0
  390. package/icons/svg/info.svg +1 -0
  391. package/icons/svg/invoice.svg +1 -0
  392. package/icons/svg/italic.svg +1 -0
  393. package/icons/svg/json.svg +1 -0
  394. package/icons/svg/kanban.svg +1 -0
  395. package/icons/svg/key.svg +1 -0
  396. package/icons/svg/keyboard.svg +1 -0
  397. package/icons/svg/laptop.svg +1 -0
  398. package/icons/svg/layers.svg +1 -0
  399. package/icons/svg/layout.svg +1 -0
  400. package/icons/svg/leaf.svg +1 -0
  401. package/icons/svg/light.svg +1 -0
  402. package/icons/svg/link.svg +1 -0
  403. package/icons/svg/list-checks.svg +1 -0
  404. package/icons/svg/list-ordered.svg +1 -0
  405. package/icons/svg/list.svg +1 -0
  406. package/icons/svg/load-balancer.svg +1 -0
  407. package/icons/svg/lock.svg +1 -0
  408. package/icons/svg/log-in.svg +1 -0
  409. package/icons/svg/logs.svg +1 -0
  410. package/icons/svg/mail-open.svg +1 -0
  411. package/icons/svg/mail.svg +1 -0
  412. package/icons/svg/map.svg +1 -0
  413. package/icons/svg/mcp.svg +1 -0
  414. package/icons/svg/megaphone.svg +1 -0
  415. package/icons/svg/memory.svg +1 -0
  416. package/icons/svg/menu.svg +1 -0
  417. package/icons/svg/merge.svg +1 -0
  418. package/icons/svg/mic-off.svg +1 -0
  419. package/icons/svg/mic.svg +1 -0
  420. package/icons/svg/migrate.svg +1 -0
  421. package/icons/svg/minus-circle.svg +1 -0
  422. package/icons/svg/minus.svg +1 -0
  423. package/icons/svg/mobile.svg +1 -0
  424. package/icons/svg/moon.svg +1 -0
  425. package/icons/svg/more-vertical.svg +1 -0
  426. package/icons/svg/more.svg +1 -0
  427. package/icons/svg/mouse.svg +1 -0
  428. package/icons/svg/move.svg +1 -0
  429. package/icons/svg/mute.svg +1 -0
  430. package/icons/svg/network.svg +1 -0
  431. package/icons/svg/notebook.svg +1 -0
  432. package/icons/svg/null.svg +1 -0
  433. package/icons/svg/open-source.svg +1 -0
  434. package/icons/svg/organization.svg +1 -0
  435. package/icons/svg/outdent.svg +1 -0
  436. package/icons/svg/p-agent.svg +1 -0
  437. package/icons/svg/p-ai.svg +1 -0
  438. package/icons/svg/p-app.svg +1 -0
  439. package/icons/svg/p-cases.svg +1 -0
  440. package/icons/svg/p-data.svg +1 -0
  441. package/icons/svg/p-design.svg +1 -0
  442. package/icons/svg/p-domains.svg +1 -0
  443. package/icons/svg/p-files.svg +1 -0
  444. package/icons/svg/p-git.svg +1 -0
  445. package/icons/svg/p-learn.svg +1 -0
  446. package/icons/svg/p-mail.svg +1 -0
  447. package/icons/svg/p-run.svg +1 -0
  448. package/icons/svg/p-skills.svg +1 -0
  449. package/icons/svg/p-telemetry.svg +1 -0
  450. package/icons/svg/p-ui.svg +1 -0
  451. package/icons/svg/palette.svg +1 -0
  452. package/icons/svg/panel-bottom.svg +1 -0
  453. package/icons/svg/paperclip.svg +1 -0
  454. package/icons/svg/paragraph.svg +1 -0
  455. package/icons/svg/password.svg +1 -0
  456. package/icons/svg/paste.svg +1 -0
  457. package/icons/svg/pause.svg +1 -0
  458. package/icons/svg/pending.svg +1 -0
  459. package/icons/svg/percent.svg +1 -0
  460. package/icons/svg/performance.svg +1 -0
  461. package/icons/svg/phone.svg +1 -0
  462. package/icons/svg/picture-in-picture.svg +1 -0
  463. package/icons/svg/pin.svg +1 -0
  464. package/icons/svg/pipeline.svg +1 -0
  465. package/icons/svg/plan.svg +1 -0
  466. package/icons/svg/play.svg +1 -0
  467. package/icons/svg/plug.svg +1 -0
  468. package/icons/svg/plus-circle.svg +1 -0
  469. package/icons/svg/plus.svg +1 -0
  470. package/icons/svg/pointer.svg +1 -0
  471. package/icons/svg/policy.svg +1 -0
  472. package/icons/svg/power.svg +1 -0
  473. package/icons/svg/primary-key.svg +1 -0
  474. package/icons/svg/print.svg +1 -0
  475. package/icons/svg/prompt.svg +1 -0
  476. package/icons/svg/pull-request.svg +1 -0
  477. package/icons/svg/puzzle.svg +1 -0
  478. package/icons/svg/qr-code.svg +1 -0
  479. package/icons/svg/query.svg +1 -0
  480. package/icons/svg/queue.svg +1 -0
  481. package/icons/svg/quote.svg +1 -0
  482. package/icons/svg/rage-click.svg +1 -0
  483. package/icons/svg/receipt.svg +1 -0
  484. package/icons/svg/record.svg +1 -0
  485. package/icons/svg/redo.svg +1 -0
  486. package/icons/svg/refresh.svg +1 -0
  487. package/icons/svg/region.svg +1 -0
  488. package/icons/svg/relation.svg +1 -0
  489. package/icons/svg/release.svg +1 -0
  490. package/icons/svg/replay.svg +1 -0
  491. package/icons/svg/rewind.svg +1 -0
  492. package/icons/svg/robot.svg +1 -0
  493. package/icons/svg/rocket.svg +1 -0
  494. package/icons/svg/role.svg +1 -0
  495. package/icons/svg/rollback.svg +1 -0
  496. package/icons/svg/route.svg +1 -0
  497. package/icons/svg/rows.svg +1 -0
  498. package/icons/svg/rss.svg +1 -0
  499. package/icons/svg/ruler.svg +1 -0
  500. package/icons/svg/save.svg +1 -0
  501. package/icons/svg/scan.svg +1 -0
  502. package/icons/svg/scissors.svg +1 -0
  503. package/icons/svg/sdk.svg +1 -0
  504. package/icons/svg/search.svg +1 -0
  505. package/icons/svg/secret.svg +1 -0
  506. package/icons/svg/seed.svg +1 -0
  507. package/icons/svg/select.svg +1 -0
  508. package/icons/svg/self-host.svg +1 -0
  509. package/icons/svg/send.svg +1 -0
  510. package/icons/svg/server.svg +1 -0
  511. package/icons/svg/settings.svg +1 -0
  512. package/icons/svg/share.svg +1 -0
  513. package/icons/svg/shield-alert.svg +1 -0
  514. package/icons/svg/shield-off.svg +1 -0
  515. package/icons/svg/shield-user.svg +1 -0
  516. package/icons/svg/shield.svg +1 -0
  517. package/icons/svg/sidebar-left.svg +1 -0
  518. package/icons/svg/sidebar-right.svg +1 -0
  519. package/icons/svg/sign-out.svg +1 -0
  520. package/icons/svg/signals-in.svg +1 -0
  521. package/icons/svg/skip-back.svg +1 -0
  522. package/icons/svg/skip-forward.svg +1 -0
  523. package/icons/svg/slash.svg +1 -0
  524. package/icons/svg/sleep.svg +1 -0
  525. package/icons/svg/sliders.svg +1 -0
  526. package/icons/svg/sort.svg +1 -0
  527. package/icons/svg/sparkle.svg +1 -0
  528. package/icons/svg/sparkline.svg +1 -0
  529. package/icons/svg/split.svg +1 -0
  530. package/icons/svg/star.svg +1 -0
  531. package/icons/svg/stop.svg +1 -0
  532. package/icons/svg/strikethrough.svg +1 -0
  533. package/icons/svg/success.svg +1 -0
  534. package/icons/svg/suggestion.svg +1 -0
  535. package/icons/svg/sum.svg +1 -0
  536. package/icons/svg/summary.svg +1 -0
  537. package/icons/svg/sun.svg +1 -0
  538. package/icons/svg/support.svg +1 -0
  539. package/icons/svg/swap-vertical.svg +1 -0
  540. package/icons/svg/swap.svg +1 -0
  541. package/icons/svg/table.svg +1 -0
  542. package/icons/svg/tablet.svg +1 -0
  543. package/icons/svg/tag.svg +1 -0
  544. package/icons/svg/target.svg +1 -0
  545. package/icons/svg/team.svg +1 -0
  546. package/icons/svg/terminal.svg +1 -0
  547. package/icons/svg/test.svg +1 -0
  548. package/icons/svg/text.svg +1 -0
  549. package/icons/svg/theme.svg +1 -0
  550. package/icons/svg/thumbs-down.svg +1 -0
  551. package/icons/svg/thumbs-up.svg +1 -0
  552. package/icons/svg/timer.svg +1 -0
  553. package/icons/svg/toggle.svg +1 -0
  554. package/icons/svg/traces.svg +1 -0
  555. package/icons/svg/translate.svg +1 -0
  556. package/icons/svg/trash.svg +1 -0
  557. package/icons/svg/trend-down.svg +1 -0
  558. package/icons/svg/trend-up.svg +1 -0
  559. package/icons/svg/two-factor.svg +1 -0
  560. package/icons/svg/underline.svg +1 -0
  561. package/icons/svg/undo.svg +1 -0
  562. package/icons/svg/unlink.svg +1 -0
  563. package/icons/svg/unlock.svg +1 -0
  564. package/icons/svg/upgrade.svg +1 -0
  565. package/icons/svg/upload.svg +1 -0
  566. package/icons/svg/uptime.svg +1 -0
  567. package/icons/svg/usage.svg +1 -0
  568. package/icons/svg/user-check.svg +1 -0
  569. package/icons/svg/user-circle.svg +1 -0
  570. package/icons/svg/user-minus.svg +1 -0
  571. package/icons/svg/user-plus.svg +1 -0
  572. package/icons/svg/user-x.svg +1 -0
  573. package/icons/svg/user.svg +1 -0
  574. package/icons/svg/users.svg +1 -0
  575. package/icons/svg/variable.svg +1 -0
  576. package/icons/svg/verified.svg +1 -0
  577. package/icons/svg/video.svg +1 -0
  578. package/icons/svg/volume.svg +1 -0
  579. package/icons/svg/wallet.svg +1 -0
  580. package/icons/svg/wand.svg +1 -0
  581. package/icons/svg/warning.svg +1 -0
  582. package/icons/svg/watch.svg +1 -0
  583. package/icons/svg/wave.svg +1 -0
  584. package/icons/svg/web.svg +1 -0
  585. package/icons/svg/webhook.svg +1 -0
  586. package/icons/svg/wifi-off.svg +1 -0
  587. package/icons/svg/wifi.svg +1 -0
  588. package/icons/svg/window.svg +1 -0
  589. package/icons/svg/zoom-in.svg +1 -0
  590. package/icons/svg/zoom-out.svg +1 -0
  591. package/package.json +119 -4
  592. package/src/characters/data.ts +13 -0
  593. package/src/characters/index.ts +23 -0
  594. package/src/dom/search.ts +78 -0
  595. package/src/i18n/index.ts +140 -0
  596. package/src/icons/data.ts +760 -0
  597. package/tokens/tokens.json +625 -0
@@ -0,0 +1,72 @@
1
+ ---
2
+ // The use-case map of a product, drawn as a constellation, with no JavaScript: every point of light is something a
3
+ // person can do, every line a flow. A pulse follows one journey; a request outside the map shows dim with a dashed
4
+ // ring. The same markup and classes as the React CaseMap, and the same words for whoever cannot see it.
5
+ // Points can be buttons for a page script: `interactive` adds role="button", tabindex and data-case to each.
6
+ import { formatters } from '../src/i18n/index';
7
+ import { wordsOf } from './_locale';
8
+ interface UseCase { id: string; name: string; x: number; y: number; focal?: boolean; out?: boolean; note?: string }
9
+ interface Props {
10
+ cases: UseCase[];
11
+ edges: { from: string; to: string; bend?: number }[];
12
+ journey?: string[];
13
+ actors?: { start?: string; end?: string };
14
+ label: string;
15
+ interactive?: boolean;
16
+ width?: number;
17
+ height?: number;
18
+ idPrefix?: string;
19
+ locale?: string;
20
+ }
21
+ const { cases, edges, journey = [], actors, label, interactive, width = 640, height = 470, idPrefix = 'cm' } = Astro.props;
22
+ const { t, locale } = wordsOf(Astro);
23
+ const list = formatters(locale).list;
24
+ const by = new Map(cases.map((c) => [c.id, c]));
25
+ const curve = (a: UseCase, b: UseCase, bend: number) => {
26
+ const mx = (a.x + b.x) / 2, my = (a.y + b.y) / 2, dx = b.x - a.x, dy = b.y - a.y;
27
+ const c = [mx - dy * bend, my + dx * bend];
28
+ return { d: `M${a.x},${a.y} Q${c[0].toFixed(1)},${c[1].toFixed(1)} ${b.x},${b.y}`, c };
29
+ };
30
+ const flow = journey.slice(1).map((b, i) => {
31
+ const a = journey[i], A = by.get(a), B = by.get(b);
32
+ if (!A || !B) return '';
33
+ const e = edges.find((x) => (x.from === a && x.to === b) || (x.from === b && x.to === a));
34
+ const bend = e ? (e.from === a ? e.bend ?? 0 : -(e.bend ?? 0)) : 0;
35
+ const { c } = curve(A, B, bend);
36
+ return `${i === 0 ? `M${A.x},${A.y} ` : ''}Q${c[0].toFixed(1)},${c[1].toFixed(1)} ${B.x},${B.y}`;
37
+ }).join(' ');
38
+ const name = (c?: UseCase) => (c ? c.name.replace(/\n/g, ' ') : '');
39
+ ---
40
+ <figure class="sy-casemap" aria-label={label}>
41
+ <svg class:list={['sy-casemap__svg', interactive && 'sy-casemap__svg--live']} viewBox={`0 0 ${width} ${height}`} role={interactive ? 'group' : 'img'} aria-label={label}>
42
+ <defs><radialGradient id={`${idPrefix}-halo`}><stop offset="0" class="sy-casemap__glow" stop-opacity=".5" /><stop offset="1" class="sy-casemap__glow" stop-opacity="0" /></radialGradient></defs>
43
+ {actors?.start && <text class="sy-casemap__actor" x="24" y={height - 18}>{actors.start}</text>}
44
+ {actors?.end && <text class="sy-casemap__actor" x={width - 24} y="28" text-anchor="end">{actors.end}</text>}
45
+ {edges.map((e) => { const A = by.get(e.from), B = by.get(e.to); return A && B && <path class="sy-casemap__edge" d={curve(A, B, e.bend ?? 0).d} />; })}
46
+ {flow && <path class="sy-casemap__flow" d={flow} />}
47
+ {flow && <circle class="sy-casemap__pulse" r="4"><animateMotion dur="7.5s" repeatCount="indefinite" path={flow} /></circle>}
48
+ {cases.map((c) => {
49
+ const lines = c.name.split('\n');
50
+ return (
51
+ <g class:list={['sy-casemap__case', c.focal && 'is-focal', c.out && 'is-out']} data-case={interactive ? c.id : undefined} role={interactive ? 'button' : undefined}
52
+ tabindex={interactive ? 0 : undefined} aria-label={interactive ? `${lines.join(' ')}${c.out ? `, ${c.note ?? t('outOfMap')}` : ''}` : undefined}>
53
+ <circle class="sy-casemap__hit" cx={c.x} cy={c.y} r="30" />
54
+ {c.out
55
+ ? <><circle class="sy-casemap__ring" cx={c.x} cy={c.y} r="13" /><circle class="sy-casemap__node sy-casemap__node--out" cx={c.x} cy={c.y} r="4" /></>
56
+ : <><circle class="sy-casemap__halo" cx={c.x} cy={c.y} r={c.focal ? 34 : 22} fill={`url(#${idPrefix}-halo)`} /><circle class="sy-casemap__node" cx={c.x} cy={c.y} r={c.focal ? 8 : 5.5} /></>}
57
+ <text class="sy-casemap__label" x={c.x} y={c.y + (c.focal ? 34 : 28)} text-anchor="middle">
58
+ {lines.map((l, i) => <tspan x={c.x} dy={i === 0 ? 0 : "1.15em"}>{l}</tspan>)}
59
+ {c.out && <tspan class="sy-casemap__why" x={c.x} dy="1.3em">{c.note ?? t('outOfMap')}</tspan>}
60
+ </text>
61
+ </g>
62
+ );
63
+ })}
64
+ </svg>
65
+ <details class="sy-figure__alt">
66
+ <summary>{t('casesMap')}</summary>
67
+ <div>
68
+ <ul>{cases.filter((c) => !c.out).map((c) => { const to = edges.filter((e) => e.from === c.id).map((e) => name(by.get(e.to))); return <li>{name(c)}{to.length > 0 && ` → ${list(to)}`}</li>; })}</ul>
69
+ {cases.some((c) => c.out) && <p>{cases.filter((c) => c.out).map((c) => `${name(c)}: ${c.note ?? t('outOfMap')}`).join('. ')}</p>}
70
+ </div>
71
+ </details>
72
+ </figure>
@@ -0,0 +1,7 @@
1
+ ---
2
+ // Puts its content in the middle, both ways. `minHeight` gives it room to be in the middle of.
3
+ import { styleOf } from './_gap';
4
+ interface Props { minHeight?: string; class?: string }
5
+ const { minHeight, class: className } = Astro.props;
6
+ ---
7
+ <div class:list={['sy-center', className]} style={styleOf({ '--min-h': minHeight })}><slot /></div>
@@ -0,0 +1,23 @@
1
+ ---
2
+ // What changed, version by version: the newest first, each change marked added, changed, fixed or removed.
3
+ import { formatters } from '../src/i18n/index';
4
+ import { wordsOf } from './_locale';
5
+ interface Change { kind: 'added' | 'changed' | 'fixed' | 'removed'; text: string }
6
+ interface Release { version: string; date?: string; title?: string; changes: Change[] }
7
+ interface Props { releases: Release[]; locale?: string }
8
+ const { releases } = Astro.props;
9
+ const { t, locale } = wordsOf(Astro);
10
+ const f = formatters(locale);
11
+ const tone = { added: 'sy-badge--ok', changed: 'sy-badge--info', fixed: 'sy-badge--outline', removed: 'sy-badge--warn' } as const;
12
+ ---
13
+ <ol class="sy-changes" role="list" aria-label={t('changelog')}>
14
+ {releases.map((r) => (
15
+ <li class="sy-change" id={`v${r.version.replace(/[^0-9a-z.-]/gi, '')}`}>
16
+ <div class="sy-change__when"><span class="sy-change__version">{r.version}</span>{r.date && <time datetime={r.date}>{f.date(r.date)}</time>}</div>
17
+ <div class="sy-change__body">
18
+ {r.title && <p class="sy-change__title">{r.title}</p>}
19
+ <ul class="sy-change__list" role="list">{r.changes.map((c) => <li><span><span class:list={['sy-badge', tone[c.kind]]}>{t(c.kind)}</span></span><span set:html={c.text} /></li>)}</ul>
20
+ </div>
21
+ </li>
22
+ ))}
23
+ </ol>
@@ -0,0 +1,7 @@
1
+ ---
2
+ // Nia or Nio: the two characters that keep the light. For empty states, waits and moments worth celebrating.
3
+ import { characterSvg, type CharacterName } from '../src/characters/index';
4
+ interface Props { name: CharacterName; label?: string; size?: string; class?: string }
5
+ const { name, label, size, class: className } = Astro.props;
6
+ ---
7
+ <span class:list={['sy-character', className]} style={size ? `--size:${size}` : undefined} role={label ? undefined : 'presentation'} set:html={characterSvg(name, label)} />
@@ -0,0 +1,27 @@
1
+ ---
2
+ // The steps to get something ready, and how many are done. Each step can link to where it is done (`href`, `action`).
3
+ import Icon from './Icon.astro';
4
+ import { formatters } from '../src/i18n/index';
5
+ import { wordsOf } from './_locale';
6
+ interface Props { title: string; items: { id: string; title: string; description?: string; done?: boolean; href?: string; action?: string }[]; locale?: string }
7
+ const { title, items } = Astro.props;
8
+ const { t, locale } = wordsOf(Astro);
9
+ const n = formatters(locale).number;
10
+ const done = items.filter((i) => i.done).length;
11
+ ---
12
+ <section class="sy-checklist" aria-label={title}>
13
+ <header class="sy-checklist__head">
14
+ <h3 class="sy-checklist__title">{title}</h3>
15
+ <span class="sy-checklist__count sy-num">{t('checklistOf', { done: n(done), total: n(items.length) })}</span>
16
+ <span class="sy-checklist__bar" aria-hidden="true"><i style={`inline-size: ${items.length ? (done / items.length) * 100 : 0}%`} /></span>
17
+ </header>
18
+ <ol class="sy-checklist__list">
19
+ {items.map((it) => (
20
+ <li class:list={['sy-checklist__item', it.done && 'sy-checklist__item--done']}>
21
+ <span class="sy-checklist__mark" role="img" aria-label={t(it.done ? 'stepDone' : 'stepTodo')}>{it.done && <Icon name="check-small" />}</span>
22
+ <div class="sy-checklist__text"><span class="sy-checklist__name">{it.title}</span>{it.description && !it.done && <span class="sy-checklist__desc">{it.description}</span>}</div>
23
+ {it.href && it.action && !it.done && <div class="sy-checklist__action"><a class="sy-btn sy-btn--secondary sy-btn--sm" href={it.href}>{it.action}</a></div>}
24
+ </li>
25
+ ))}
26
+ </ol>
27
+ </section>
@@ -0,0 +1,10 @@
1
+ ---
2
+ // A Checklist before its steps are known: the title, the count, the bar and each step.
3
+ interface Props { items?: number }
4
+ const { items = 4 } = Astro.props;
5
+ const W = ['62%', '48%', '71%', '55%', '66%', '40%'];
6
+ ---
7
+ <section class="sy-checklist" data-skeleton aria-hidden="true">
8
+ <div class="sy-checklist__head"><span class="sy-checklist__title"><span class="sy-skeleton sy-skeleton--text" style="width:10rem"></span></span><span class="sy-checklist__count"><span class="sy-skeleton sy-skeleton--text" style="width:5rem"></span></span><span class="sy-checklist__bar"></span></div>
9
+ <ol class="sy-checklist__list">{Array.from({ length: items }, (_, i) => <li class="sy-checklist__item"><span class="sy-checklist__mark"></span><div class="sy-checklist__text"><span class="sy-checklist__name"><span class="sy-skeleton sy-skeleton--text" style={`width:${W[i % 6]}`}></span></span></div></li>)}</ol>
10
+ </section>
@@ -0,0 +1,10 @@
1
+ ---
2
+ // A thing itself: a tag, a choice that is on. Static here: with `href` it is a link, otherwise a label.
3
+ // To toggle or remove chips, use the React Chip in an island.
4
+ import Icon from './Icon.astro';
5
+ import type { IconName } from '../src/icons/data';
6
+ interface Props { icon?: IconName; selected?: boolean; href?: string; class?: string }
7
+ const { icon, selected, href, class: className } = Astro.props;
8
+ const Tag = href ? 'a' : 'span';
9
+ ---
10
+ <Tag class:list={['sy-chip', className]} href={href} data-selected={selected ? '' : undefined} aria-current={href && selected ? 'true' : undefined}>{icon && <Icon name={icon} />}<slot /></Tag>
@@ -0,0 +1,4 @@
1
+ ---
2
+ // A Chip whose word is still loading.
3
+ ---
4
+ <span class="sy-chip" data-skeleton aria-hidden="true"><span class="sy-skeleton sy-skeleton--text" style="width:4.5em;display:inline-block;vertical-align:middle"></span></span>
@@ -0,0 +1,10 @@
1
+ ---
2
+ // One command to type, with its copy button and, optionally, what it prints (slot `output`).
3
+ import CodeBlock from './CodeBlock.astro';
4
+ interface Props { command: string; locale?: string }
5
+ const { command, locale } = Astro.props;
6
+ ---
7
+ <div class="sy-stack" style="--gap:var(--s-2)">
8
+ <CodeBlock code={command} lang="sh" bare locale={locale} />
9
+ {Astro.slots.has('output') && <div class="sy-code" data-lang="text"><pre><slot name="output" /></pre></div>}
10
+ </div>
@@ -0,0 +1,20 @@
1
+ ---
2
+ // Code to read and copy, highlighted at build time (Shiki, through astro:components) in the colours of the surface.
3
+ // `title` names the file; `mark` lights lines (1-based); `bare` drops the bar (a one-liner with its copy button).
4
+ import { Code } from 'astro:components';
5
+ import CopyButton from './CopyButton.astro';
6
+ import { wordsOf } from './_locale';
7
+ interface Props { code: string; lang?: string; title?: string; mark?: number[]; bare?: boolean; wrap?: boolean; locale?: string; class?: string }
8
+ const { code, lang = 'text', title, mark = [], bare = false, wrap = false, class: className } = Astro.props;
9
+ const { locale } = wordsOf(Astro);
10
+ const clean = code.replace(/^\n+|\s+$/g, '');
11
+ const transformers = mark.length ? [{ line(node: any, line: number) { if (mark.includes(line)) (this as any).addClassToHast(node, 'is-mark'); } }] : [];
12
+ const langName = ({ ts: 'TypeScript', tsx: 'TSX', js: 'JavaScript', jsx: 'JSX', sh: 'Shell', bash: 'Shell', json: 'JSON', astro: 'Astro', css: 'CSS', html: 'HTML', py: 'Python', python: 'Python', go: 'Go', yaml: 'YAML', sql: 'SQL', text: '' } as Record<string, string>)[lang] ?? lang;
13
+ ---
14
+ <div class:list={['sy-code', bare && 'sy-code--bare', wrap && 'sy-code--wrap', className]} data-lang={lang}>
15
+ {!bare && (
16
+ <div class="sy-code__bar">{title ? <span class="sy-code__title">{title}</span> : <span class="sy-code__lang">{langName}</span>}<CopyButton value={clean} iconOnly locale={locale} /></div>
17
+ )}
18
+ <Code code={clean} lang={lang as any} theme="css-variables" transformers={transformers as any} />
19
+ {bare && <span class="sy-code__copy"><CopyButton value={clean} iconOnly locale={locale} /></span>}
20
+ </div>
@@ -0,0 +1,9 @@
1
+ ---
2
+ // A code block while it loads: the bar and its lines.
3
+ interface Props { lines?: number; bare?: boolean }
4
+ const { lines = 4, bare } = Astro.props;
5
+ ---
6
+ <div class:list={['sy-code', bare && 'sy-code--bare']} data-skeleton aria-hidden="true">
7
+ {!bare && <div class="sy-code__bar"><span class="sy-skeleton sy-skeleton--text" style="--w:5rem"></span></div>}
8
+ <pre>{Array.from({ length: lines }, (_, i) => <span class="sy-skeleton sy-skeleton--text" style={`--w:${30 + ((i * 29) % 55)}%;margin-block:0.5em`}></span>)}</pre>
9
+ </div>
@@ -0,0 +1,31 @@
1
+ ---
2
+ // The same code in several languages or tools, one at a time, with the choice remembered across the site (`sync`):
3
+ // <CodeTabs sync="lang" items={[{ label: 'TypeScript', lang: 'ts', code: '…' }, { label: 'Python', lang: 'python', code: '…' }]} />
4
+ import { Code } from 'astro:components';
5
+ import CopyButton from './CopyButton.astro';
6
+ import { nextId } from './_id';
7
+ import { wordsOf } from './_locale';
8
+ interface Item { label: string; code: string; lang?: string; id?: string }
9
+ interface Props { items: Item[]; sync?: string; label?: string; title?: string; locale?: string }
10
+ const { items, sync, title } = Astro.props;
11
+ const { t, locale } = wordsOf(Astro);
12
+ const label = Astro.props.label ?? t('type');
13
+ const uid = nextId('code');
14
+ const id = (i: Item) => i.id ?? i.label.toLowerCase().replace(/[^a-z0-9]+/g, '-');
15
+ ---
16
+ <div class="sy-code">
17
+ <sy-tabs sync={sync}>
18
+ <div class="sy-code__bar">
19
+ <div role="tablist" class="sy-tabs" aria-label={title ?? label}>
20
+ {items.map((i, n) => <button type="button" role="tab" class="sy-tab" id={`${uid}-t${n}`} aria-controls={`${uid}-p${n}`} aria-selected={n === 0 ? 'true' : 'false'} tabindex={n === 0 ? 0 : -1} data-value={id(i)}>{i.label}</button>)}
21
+ </div>
22
+ </div>
23
+ {items.map((i, n) => (
24
+ <div role="tabpanel" class="sy-tabpanel" id={`${uid}-p${n}`} aria-labelledby={`${uid}-t${n}`} hidden={n !== 0}>
25
+ <p class="sy-tabpanel__label">{i.label}</p>
26
+ <span class="sy-code__copy"><CopyButton value={i.code.trim()} iconOnly locale={locale} /></span>
27
+ <Code code={i.code.trim()} lang={(i.lang ?? 'text') as any} theme="css-variables" />
28
+ </div>
29
+ ))}
30
+ </sy-tabs>
31
+ </div>
@@ -0,0 +1,7 @@
1
+ ---
2
+ // A fixed number of equal columns; two at most on phones, or one with `stack`.
3
+ import { gapVar, styleOf, type Gap } from './_gap';
4
+ interface Props { as?: string; gap?: Gap; cols?: number; stack?: boolean; class?: string; id?: string }
5
+ const { as: Tag = 'div', gap, cols = 2, stack, class: className, id } = Astro.props;
6
+ ---
7
+ <Tag id={id} class:list={['sy-cols', stack && 'sy-cols--stack', className]} style={styleOf({ '--gap': gapVar(gap), '--cols': cols })}><slot /></Tag>
@@ -0,0 +1,16 @@
1
+ ---
2
+ // Two sides of one thing, row by row: the open-source engine and the Cloud, a plan and another. On phones each row
3
+ // stacks, with the name of each side above its cell.
4
+ import Icon from './Icon.astro';
5
+ import type { IconName } from '../src/icons/data';
6
+ interface Side { name: string; kind?: string; icon?: IconName }
7
+ interface Row { label: string; values: [string, string] }
8
+ interface Props { sides: [Side, Side]; rows: Row[]; caption: string }
9
+ const { sides, rows, caption } = Astro.props;
10
+ ---
11
+ <table class="sy-compare">
12
+ <caption class="sy-sr-only">{caption}</caption>
13
+ <colgroup><col class="sy-compare__label" /><col /><col /></colgroup>
14
+ <thead><tr><td></td>{sides.map((s) => <th scope="col"><span class="sy-compare__side">{s.icon && <Icon name={s.icon} />}<b>{s.name}</b>{s.kind && <span>{s.kind}</span>}</span></th>)}</tr></thead>
15
+ <tbody>{rows.map((r) => <tr><th scope="row">{r.label}</th>{r.values.map((v, i) => <td data-side={sides[i]!.name} set:html={v} />)}</tr>)}</tbody>
16
+ </table>
@@ -0,0 +1,29 @@
1
+ ---
2
+ // Options compared on the same points: columns are the options, rows the points. true and false are a check and a
3
+ // dash, said in words. On phones each point is a card that lists every option.
4
+ import Icon from './Icon.astro';
5
+ import { wordsOf } from './_locale';
6
+ type Value = string | boolean | null;
7
+ interface Props { columns: { id: string; label: string; lit?: boolean }[]; rows: { id: string; label: string; hint?: string; values: Record<string, Value> }[]; caption: string; rowHeader?: string; locale?: string }
8
+ const { columns, rows, caption, rowHeader = '' } = Astro.props;
9
+ const { t } = wordsOf(Astro);
10
+ ---
11
+ <div class="sy-table-wrap sy-comparetable">
12
+ <table class="sy-table sy-table--cards sy-comparetable__table">
13
+ <caption class="sy-sr-only">{caption}</caption>
14
+ <thead><tr><th scope="col">{rowHeader || <span class="sy-sr-only">{caption}</span>}</th>{columns.map((c) => <th scope="col" class:list={[c.lit && 'is-lit']}>{c.label}</th>)}</tr></thead>
15
+ <tbody>
16
+ {rows.map((r) => (
17
+ <tr>
18
+ <th scope="row" data-title="">{r.label}{r.hint && <small class="sy-comparetable__hint">{r.hint}</small>}</th>
19
+ {columns.map((c) => {
20
+ const v = r.values[c.id];
21
+ return <td class:list={[c.lit && 'is-lit']} data-label={c.label}>{v === true
22
+ ? <span class="sy-comparetable__yes"><Icon name="check-small" /><span class="sy-sr-only">{t('included')}</span></span>
23
+ : v === false || v === null || v === undefined ? <span class="sy-comparetable__no"><Icon name="minus" /><span class="sy-sr-only">{t('notIncluded')}</span></span> : v}</td>;
24
+ })}
25
+ </tr>
26
+ ))}
27
+ </tbody>
28
+ </table>
29
+ </div>
@@ -0,0 +1,12 @@
1
+ ---
2
+ // A CompareTable before its options are known: the header row and a row per feature.
3
+ interface Props { columns?: number; rows?: number }
4
+ const { columns = 3, rows = 5 } = Astro.props;
5
+ const W = ['62%', '48%', '71%', '55%', '66%', '40%'];
6
+ ---
7
+ <div class="sy-table-wrap sy-comparetable" data-skeleton aria-hidden="true">
8
+ <table class="sy-table sy-table--cards sy-comparetable__table">
9
+ <thead><tr><th><span class="sy-skeleton sy-skeleton--text" style="width:6rem"></span></th>{Array.from({ length: columns }, () => <th><span class="sy-skeleton sy-skeleton--text" style="width:5rem"></span></th>)}</tr></thead>
10
+ <tbody>{Array.from({ length: rows }, (_, r) => <tr><th data-title=""><span class="sy-skeleton sy-skeleton--text" style={`width:${W[r % 6]}`}></span></th>{Array.from({ length: columns }, () => <td><span class="sy-skeleton sy-skeleton--text" style="width:2rem"></span></td>)}</tr>)}</tbody>
11
+ </table>
12
+ </div>
@@ -0,0 +1,6 @@
1
+ ---
2
+ // The page's width, centred, with the gutter on both sides. `narrow` for reading, `wide` for dashboards.
3
+ interface Props { as?: string; size?: 'narrow' | 'page' | 'wide'; class?: string; id?: string }
4
+ const { as: Tag = 'div', size = 'page', class: className, id } = Astro.props;
5
+ ---
6
+ <Tag id={id} class:list={['sy-wrap', size !== 'page' && `sy-wrap--${size}`, className]}><slot /></Tag>
@@ -0,0 +1,15 @@
1
+ ---
2
+ // Copies a text, or the text of an element (`for` = its id). Works through the <sy-copy> custom element:
3
+ // import '@sypnia/ui/dom/elements' once on the page.
4
+ import Icon from './Icon.astro';
5
+ import { wordsOf } from './_locale';
6
+ interface Props { value?: string; for?: string; label?: string; size?: 'sm' | 'md'; variant?: 'quiet' | 'secondary'; iconOnly?: boolean; locale?: string; class?: string }
7
+ const { value, for: target, label, size = 'sm', variant = 'quiet', iconOnly, class: className } = Astro.props;
8
+ const { t } = wordsOf(Astro);
9
+ const name = label ?? t('copy');
10
+ ---
11
+ <sy-copy value={value} for={target} done={t('copied')} class={className}>
12
+ <button type="button" class:list={['sy-btn', `sy-btn--${variant}`, size === 'sm' && 'sy-btn--sm', iconOnly && 'sy-btn--icon']} aria-label={iconOnly ? name : undefined} title={iconOnly ? name : undefined}>
13
+ <Icon name="copy" />{!iconOnly && <span data-label>{name}</span>}
14
+ </button>
15
+ </sy-copy>
@@ -0,0 +1,9 @@
1
+ ---
2
+ // A number on its own: unread, waiting, failed. Above 999 it shortens (1.2K).
3
+ import { formatters } from '../src/i18n/index';
4
+ import { localeOf } from './_locale';
5
+ interface Props { value: number; tone?: 'info' | 'ok' | 'warn' | 'fail' | 'neutral' | 'light'; label?: string; locale?: string }
6
+ const { value, tone = 'neutral', label } = Astro.props;
7
+ const shown = value > 999 ? formatters(localeOf(Astro)).compact(value) : value;
8
+ ---
9
+ <span class:list={['sy-badge sy-badge--count', tone !== 'neutral' && `sy-badge--${tone}`]} role={label ? 'img' : undefined} aria-label={label}>{shown}</span>
@@ -0,0 +1,4 @@
1
+ ---
2
+ // A Count whose number is still loading.
3
+ ---
4
+ <span class="sy-badge sy-badge--count" data-skeleton aria-hidden="true"><span class="sy-skeleton sy-skeleton--text" style="width:1.2em;display:inline-block;vertical-align:middle"></span></span>
@@ -0,0 +1,20 @@
1
+ ---
2
+ // How much a number moved: an arrow, the change, and whether that is good, in colour and in words.
3
+ import Icon from './Icon.astro';
4
+ import { formatters } from '../src/i18n/index';
5
+ import { wordsOf } from './_locale';
6
+ interface Props { value: number; as?: 'percent' | 'number'; goodWhen?: 'up' | 'down' | 'none'; flatWithin?: number; digits?: number; suffix?: string; locale?: string }
7
+ const { value, as = 'percent', goodWhen = 'up', flatWithin = 0, digits, suffix } = Astro.props;
8
+ const { t, locale } = wordsOf(Astro);
9
+ const format = formatters(locale);
10
+ const dir = Math.abs(value) <= flatWithin ? 'flat' : value > 0 ? 'up' : 'down';
11
+ const abs = Math.abs(value);
12
+ const text = as === 'percent' ? format.percent(abs, digits ?? (abs < 0.1 ? 1 : 0)) : format.number(abs, { maximumFractionDigits: digits ?? 2 });
13
+ const tone = dir === 'flat' || goodWhen === 'none' ? 'flat' : dir === goodWhen ? 'good' : 'bad';
14
+ const said = dir === 'flat' ? t('deltaFlat') : t(dir === 'up' ? 'deltaUp' : 'deltaDown', { value: text });
15
+ ---
16
+ <span class:list={['sy-delta', `sy-delta--${tone}`]}>
17
+ <Icon name={dir === 'flat' ? 'minus' : dir === 'up' ? 'arrow-up-right' : 'arrow-down-right'} />
18
+ <span aria-hidden="true">{dir === 'flat' ? t('deltaFlat') : text}</span><span class="sy-sr-only">{said}</span>
19
+ {suffix && <span class="sy-delta__suffix">{suffix}</span>}
20
+ </span>
@@ -0,0 +1,4 @@
1
+ ---
2
+ // A Delta before its change is known.
3
+ ---
4
+ <span class="sy-delta" data-skeleton aria-hidden="true"><span class="sy-skeleton sy-skeleton--text" style="width:3.5rem"></span></span>
@@ -0,0 +1,8 @@
1
+ ---
2
+ // The facts of one thing, by name, in columns: terms above their values; one column on phones.
3
+ interface Props { items: { term: string; description: string; hint?: string }[]; columns?: 1 | 2 | 3 }
4
+ const { items, columns = 2 } = Astro.props;
5
+ ---
6
+ <dl class:list={['sy-dlist', `sy-dlist--${columns}`]}>
7
+ {items.map((it) => <div class="sy-dlist__item"><dt>{it.term}</dt><dd>{it.description}{it.hint && <span class="sy-dlist__hint">{it.hint}</span>}</dd></div>)}
8
+ </dl>
@@ -0,0 +1,7 @@
1
+ ---
2
+ // A DescriptionList before its facts are known: each name and its value, in the same columns.
3
+ interface Props { items?: number; columns?: 1 | 2 | 3 }
4
+ const { items = 4, columns = 2 } = Astro.props;
5
+ const W = ['62%', '48%', '71%', '55%', '66%', '40%'];
6
+ ---
7
+ <dl class:list={['sy-dlist', `sy-dlist--${columns}`]} data-skeleton aria-hidden="true">{Array.from({ length: items }, (_, i) => <div class="sy-dlist__item"><dt><span class="sy-skeleton sy-skeleton--text" style={`width:${['5rem', '7rem', '4rem', '6rem'][i % 4]}`}></span></dt><dd><span class="sy-skeleton sy-skeleton--text" style={`width:${W[(i + 2) % 6]}`}></span></dd></div>)}</dl>
@@ -0,0 +1,6 @@
1
+ ---
2
+ // A line between things. With `label` it carries a word in the middle («or»); `vertical` between items of a row.
3
+ interface Props { vertical?: boolean; label?: string; class?: string }
4
+ const { vertical, label, class: className } = Astro.props;
5
+ ---
6
+ {label ? <div role="separator" class:list={['sy-divider sy-divider--label', className]}>{label}</div> : <hr class:list={['sy-divider', vertical && 'sy-divider--v', className]} aria-orientation={vertical ? 'vertical' : undefined} />}
@@ -0,0 +1,25 @@
1
+ ---
2
+ // The article while it loads: breadcrumb, title, lead, and paragraphs with a code block between them. DocsShell
3
+ // shows it in place of the article the moment a link to another page is pressed.
4
+ interface Props { paragraphs?: number; code?: boolean; toc?: boolean }
5
+ const { paragraphs = 3, code = true, toc = true } = Astro.props;
6
+ const line = (w: number) => `--w:${w}%`;
7
+ ---
8
+ <div class:list={['sy-dskel', toc && 'sy-dskel--toc']} data-skeleton aria-hidden="true">
9
+ <div class="sy-darticle">
10
+ <div class="sy-ahead">
11
+ <span class="sy-skeleton sy-skeleton--text" style="--w:9rem;margin-bottom:1.2rem"></span>
12
+ <span class="sy-skeleton" style="--w:min(26rem,80%);--h:clamp(2.125rem,1.55rem + 1.7vw,3.125rem);--r:var(--r-2)"></span>
13
+ <span class="sy-skeleton sy-skeleton--text" style="--w:min(34rem,95%);margin-top:1.1rem;--h:1.1em"></span>
14
+ <span class="sy-skeleton sy-skeleton--text" style="--w:min(22rem,70%);--h:1.1em"></span>
15
+ </div>
16
+ <div class="sy-prose" style="margin-top:1.9rem">
17
+ {Array.from({ length: paragraphs }, (_, p) => (
18
+ <>
19
+ <div>{[96, 92, 98, 64].map((w, i) => <span class="sy-skeleton sy-skeleton--text" style={line(w - ((p * 7 + i * 3) % 12))}></span>)}</div>
20
+ {code && p === 0 && <span class="sy-skeleton" style="--h:7.5rem;--r:var(--r-3)"></span>}
21
+ </>
22
+ ))}
23
+ </div>
24
+ </div>
25
+ </div>
@@ -0,0 +1,78 @@
1
+ ---
2
+ // Goes in <head> of every page that uses DocsShell. Every Sypnia docs site (and the gallery) moves between pages the
3
+ // same way, and this is where that way is set:
4
+ //
5
+ // - Links are plain links and every page is a whole page load. The browser does what people expect of it: focus
6
+ // starts at the top (the skip link is the first stop), the new title is announced, back and forward restore the
7
+ // scroll and the page (back-forward cache), and a middle click or a copied link works. No script is needed.
8
+ // - It is still instant: Chromium prerenders the page a link points to when the pointer rests on it or a finger
9
+ // presses it (speculation rules); other browsers fetch it on hover or focus.
10
+ // - What the person chose last time (surface, density, folded navigation, language) is applied here, before the first
11
+ // paint, so nothing flashes; the side navigation takes back its scroll and its open sections before it is painted
12
+ // (DocsShell, SideNav), so moving from page to page does not move it.
13
+ //
14
+ // There is no in-place page swap (no ClientRouter): it kept the navigation in the DOM, but needed focus, scroll,
15
+ // announcement and scripts redone by hand, and its View Transition overlay swallowed quick second clicks.
16
+ interface Props {
17
+ /** Colours of the browser bar on each surface. Defaults to the background of night and paper. */
18
+ themeColor?: { night: string; paper: string };
19
+ }
20
+ const { themeColor = { night: '#08282a', paper: '#f2f4e6' } } = Astro.props;
21
+ // Same-origin pages only: never files (Markdown twins, llms.txt, indexes, downloads) or links that open elsewhere.
22
+ const files = ['md', 'txt', 'json', 'xml', 'pdf', 'zip', 'svg', 'png', 'jpg', 'webp', 'mp4'].map((x) => `/*.${x}`);
23
+ const rules = JSON.stringify({
24
+ prerender: [{
25
+ where: { and: [{ href_matches: '/*' }, { not: { href_matches: files } }, { not: { selector_matches: '[data-no-prerender], [download], [target=_blank], [rel~=external]' } }] },
26
+ eagerness: 'moderate',
27
+ }],
28
+ });
29
+ ---
30
+ <meta name="color-scheme" content="dark light" />
31
+ <meta name="theme-color" content={themeColor.night} data-sy-theme-color data-night={themeColor.night} data-paper={themeColor.paper} />
32
+ <script is:inline>
33
+ (() => {
34
+ const d = document.documentElement;
35
+ const get = (k, old) => { try { const v = localStorage.getItem(k); return v === null && old ? localStorage.getItem(old) : v; } catch { return null; } };
36
+ // The language the person chose is kept: arriving from outside the site (a search engine, another site) at a page
37
+ // in the other language takes them to the same page in theirs. Moving inside the site never redirects.
38
+ const lang = get('sy-lang', 'sypnia-lang');
39
+ if (lang && lang !== d.lang && document.referrer.indexOf(location.origin + '/') !== 0) {
40
+ const alt = document.querySelector('link[rel="alternate"][hreflang="' + lang + '"]');
41
+ if (alt) { location.replace(new URL(alt.href).pathname + location.search + location.hash); return; }
42
+ }
43
+ const apply = () => {
44
+ const s = get('sy-surface', 'sypnia-surface'), n = get('sy-density'), f = get('sy-nav', 'sypnia-nav');
45
+ if (s === 'night' || s === 'paper') d.dataset.surface = s; else delete d.dataset.surface;
46
+ if (n === 'compact') d.dataset.density = n; else delete d.dataset.density;
47
+ if (f === 'hidden') d.dataset.nav = 'hidden'; else delete d.dataset.nav;
48
+ d.classList.add('sy-js');
49
+ // the search shortcut is written as this keyboard writes it (⌘ K or Ctrl K), before it is painted
50
+ if (/Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent)) d.classList.add('sy-mac');
51
+ const surface = d.dataset.surface || (matchMedia('(prefers-color-scheme: light)').matches ? 'paper' : 'night');
52
+ const meta = document.querySelector('meta[data-sy-theme-color]');
53
+ if (meta) meta.content = meta.dataset[surface];
54
+ };
55
+ apply();
56
+ // A page prepared ahead read the choices when it was prepared; it reads them again when it is shown.
57
+ if (document.prerendering) document.addEventListener('prerenderingchange', apply, { once: true });
58
+ // Browsers without speculation rules fetch a page ahead when a link to it is hovered or focused.
59
+ if (!(HTMLScriptElement.supports && HTMLScriptElement.supports('speculationrules'))) {
60
+ const done = new Set(), skip = /\.(md|txt|json|xml|pdf|zip|svg|png|jpe?g|webp|mp4)$/i;
61
+ let timer = 0;
62
+ const ahead = (e) => {
63
+ const a = e.target.closest && e.target.closest('a[href]');
64
+ if (!a || a.target === '_blank' || a.hasAttribute('download') || a.closest('[data-no-prerender]')) return;
65
+ const u = new URL(a.href, location.href);
66
+ if (u.origin !== location.origin || skip.test(u.pathname) || (u.pathname === location.pathname && u.search === location.search)) return;
67
+ const href = u.pathname + u.search;
68
+ if (done.has(href)) return;
69
+ clearTimeout(timer);
70
+ timer = setTimeout(() => { done.add(href); const l = document.createElement('link'); l.rel = 'prefetch'; l.href = href; document.head.append(l); }, e.type === 'pointerover' ? 80 : 0);
71
+ };
72
+ document.addEventListener('pointerover', ahead, { passive: true });
73
+ document.addEventListener('focusin', ahead);
74
+ document.addEventListener('touchstart', ahead, { passive: true });
75
+ }
76
+ })();
77
+ </script>
78
+ <script type="speculationrules" set:html={rules} />
@@ -0,0 +1,45 @@
1
+ ---
2
+ // The top of a docs site: the navigation button on phones, the fold button on wide screens, the brand, search,
3
+ // the site's main links, the language, the product switcher, night or paper, and one call to action.
4
+ // Slots: `brand` (instead of the Sypnia logo), `tools` (more buttons before the surface switch).
5
+ import Icon from './Icon.astro';
6
+ import Logo from './Logo.astro';
7
+ import { wordsOf } from './_locale';
8
+ export interface DocsLink { label: string; href: string; current?: boolean }
9
+ export interface DocsLanguage { code: string; label: string; href: string }
10
+ export interface DocsProduct { label: string; href: string; note?: string; current?: boolean }
11
+ interface Props {
12
+ homeHref?: string; product?: string; section?: string;
13
+ links?: DocsLink[]; languages?: DocsLanguage[]; products?: DocsProduct[];
14
+ cta?: { label: string; href: string }; search?: boolean; locale?: string;
15
+ /** false: a page without side navigation (a 404, say): no buttons to open or fold it. */
16
+ navigation?: boolean;
17
+ }
18
+ const { homeHref = '/', product, section, links = [], languages = [], products = [], cta, search = true, navigation = true } = Astro.props;
19
+ const { t, locale } = wordsOf(Astro);
20
+ const other = languages.filter((l) => l.code !== locale);
21
+ ---
22
+ <header class="sy-dhead">
23
+ <div class="sy-dhead__in">
24
+ {navigation && <button type="button" class="sy-btn sy-btn--quiet sy-btn--icon sy-dhead__menu" data-nav-open aria-expanded="false" aria-controls="sy-dside" aria-label={t('openNav')}><Icon name="menu" /></button>}
25
+ {navigation && <button type="button" class="sy-btn sy-btn--quiet sy-btn--icon sy-btn--sm sy-dhead__fold" data-nav-fold aria-expanded="true" aria-controls="sy-dside" aria-label={t('hideNav')} title={t('hideNav')}><Icon name="sidebar-left" /></button>}
26
+ <a class="sy-dhead__brand" href={homeHref}>{Astro.slots.has('brand') ? <slot name="brand" /> : <Logo product={product} />}{section && <span class="sy-dhead__section">{section}</span>}</a>
27
+ <div class="sy-dhead__mid">
28
+ {search && <button type="button" class="sy-search-btn" data-search-open aria-haspopup="dialog"><Icon name="search" /><span>{t('searchDocs')}</span><kbd class="sy-kbd sy-kbd--pc">Ctrl K</kbd><kbd class="sy-kbd sy-kbd--mac">⌘ K</kbd></button>}
29
+ {links.length > 0 && <nav class="sy-dhead__nav" aria-label={t('mainNav')}>{links.map((l) => <a class="sy-dhead__link" href={l.href} aria-current={l.current ? 'page' : undefined}>{l.label}</a>)}</nav>}
30
+ </div>
31
+ <div class="sy-dhead__end">
32
+ {search && <button type="button" class="sy-btn sy-btn--quiet sy-btn--icon sy-dhead__find" data-search-open aria-haspopup="dialog" aria-label={t('searchDocs')}><Icon name="search" /></button>}
33
+ {other.map((l) => <a class="sy-btn sy-btn--quiet sy-btn--sm sy-dhead__lang" href={l.href} hreflang={l.code} lang={l.code} data-set-lang={l.code} data-no-skeleton><Icon name="globe" />{l.label}</a>)}
34
+ <slot name="tools" />
35
+ {products.length > 0 && (
36
+ <details class="sy-dswitch">
37
+ <summary class="sy-btn sy-btn--quiet sy-btn--sm" aria-label={t('products')}><Icon name="grid" /></summary>
38
+ <ul class="sy-dswitch__menu" role="list">{products.map((p) => <li><a href={p.href} aria-current={p.current ? 'page' : undefined}>{p.label}{p.note && <small>{p.note}</small>}</a></li>)}</ul>
39
+ </details>
40
+ )}
41
+ <button type="button" class="sy-btn sy-btn--quiet sy-btn--icon sy-btn--sm" data-surface-toggle aria-label={t('surface')} title={t('surface')}><Icon name="moon" class="sy-surface-ico--night" /><Icon name="sun" class="sy-surface-ico--paper" /></button>
42
+ {cta && <a class="sy-btn sy-btn--primary sy-btn--sm" href={cta.href}>{cta.label}</a>}
43
+ </div>
44
+ </div>
45
+ </header>
@@ -0,0 +1,13 @@
1
+ ---
2
+ // The top of a docs home: what this documentation covers, in the voice, and where to start (slot `actions`, then
3
+ // anything else in the default slot: an <Install>, <Cards>).
4
+ interface Props { title: string; lead?: string; kicker?: string }
5
+ const { title, lead, kicker } = Astro.props;
6
+ ---
7
+ <header class="sy-dhero">
8
+ {kicker && <p class="sy-dhero__kicker"><span class="sy-dot"></span>{kicker}</p>}
9
+ <h1>{title}</h1>
10
+ {lead && <p class="sy-dhero__lead" set:html={lead} />}
11
+ {Astro.slots.has('actions') && <div class="sy-dhero__actions"><slot name="actions" /></div>}
12
+ <slot />
13
+ </header>