boltdocs 2.7.10 → 2.8.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 (193) hide show
  1. package/README.md +2 -2
  2. package/dist/banner-3N4Jd_L9.d.ts +100 -0
  3. package/dist/banner-MynZD_Ox.d.cts +100 -0
  4. package/dist/cache-BMUyNiiA.mjs +6 -0
  5. package/dist/cache-CKm45d2w.cjs +6 -0
  6. package/dist/client/index.cjs +2268 -1
  7. package/dist/client/index.d.cts +86 -110
  8. package/dist/client/index.d.ts +87 -111
  9. package/dist/client/index.js +2214 -1
  10. package/dist/client/mdx.cjs +12 -1
  11. package/dist/client/mdx.d.cts +39 -93
  12. package/dist/client/mdx.d.ts +38 -93
  13. package/dist/client/mdx.js +7 -1
  14. package/dist/client/primitives.cjs +60 -1
  15. package/dist/client/primitives.d.cts +411 -347
  16. package/dist/client/primitives.d.ts +411 -347
  17. package/dist/client/primitives.js +20 -1
  18. package/dist/docs-layout-CwCq42Zt.cjs +1348 -0
  19. package/dist/docs-layout-Dn6S5g59.js +1167 -0
  20. package/dist/doctor-BArviV8X.cjs +28 -0
  21. package/dist/doctor-CgLA7_Uv.mjs +28 -0
  22. package/dist/{doctor-CrytFkqW.cjs → doctor-DyNUVe96.cjs} +1 -1
  23. package/dist/{routes-DP1vmWRj.cjs → doctor-aN_leTbh.mjs} +1 -1
  24. package/dist/{generator-ClVanhvi.mjs → generator-BHCrLU6h.mjs} +2 -2
  25. package/dist/{generator-CHqxiQhF.cjs → generator-CC2yHzhZ.cjs} +2 -2
  26. package/dist/icons-dev-DvJ-hh9x.cjs +1209 -0
  27. package/dist/icons-dev-Oju24Wjp.js +845 -0
  28. package/dist/image-Ch4-GxdO.cjs +268 -0
  29. package/dist/image-Do8V9PCW.js +214 -0
  30. package/dist/mdx-D3A2_l7P.js +520 -0
  31. package/dist/mdx-PLhhPJRS.cjs +531 -0
  32. package/dist/node/cli-entry.cjs +3 -1
  33. package/dist/node/cli-entry.mjs +3 -1
  34. package/dist/node/index.cjs +1 -1
  35. package/dist/node/index.d.cts +258 -152
  36. package/dist/node/index.d.mts +258 -150
  37. package/dist/node/index.mjs +1 -1
  38. package/dist/node/routes/worker.cjs +1 -1
  39. package/dist/node/routes/worker.mjs +1 -1
  40. package/dist/node-BmlP0eBP.cjs +159 -0
  41. package/dist/node-Y8_4ayje.mjs +159 -0
  42. package/dist/package-2nFy_NsW.cjs +6 -0
  43. package/dist/{package--0Yf0t1N.mjs → package-DAbtltXX.mjs} +1 -1
  44. package/dist/parser-B7-6PyQz.cjs +6 -0
  45. package/dist/{parser-Aq8LoH-0.cjs → parser-BzB-zCkF.cjs} +1 -1
  46. package/dist/parser-WGZdWs0X.mjs +6 -0
  47. package/dist/routes-BDDSxAl0.mjs +6 -0
  48. package/dist/routes-DJNJ-rTt.cjs +6 -0
  49. package/dist/routes-DiYC4nD2.cjs +6 -0
  50. package/dist/routes-_Bb2f4eI.mjs +6 -0
  51. package/dist/search-dialog-BXVoecTx.cjs +483 -0
  52. package/dist/search-dialog-BYhOov4S.cjs +331 -0
  53. package/dist/search-dialog-C09riYmx.js +313 -0
  54. package/dist/search-dialog-CUeAfy-8.cjs +8 -0
  55. package/dist/search-dialog-D8gLkhUV.js +453 -0
  56. package/dist/search-dialog-DHc_8FFX.js +8 -0
  57. package/dist/{sidebar-CcBkrm06.d.cts → sidebar-DNq4_ZAa.d.ts} +118 -52
  58. package/dist/{sidebar-CyZS9YOm.d.ts → sidebar-Dlkgbxs6.d.cts} +118 -52
  59. package/dist/utils-BYITg7T5.mjs +7 -0
  60. package/dist/utils-Cjmx1hhk.cjs +7 -0
  61. package/dist/worker-pool-CtqklOXq.cjs +6 -0
  62. package/dist/worker-pool-k0DY6k8T.mjs +6 -0
  63. package/package.json +5 -6
  64. package/src/shared/config-utils.ts +4 -0
  65. package/src/shared/types.ts +52 -6
  66. package/dist/cache-Ba-DZQNH.cjs +0 -6
  67. package/dist/cache-BuMZ58L5.mjs +0 -6
  68. package/dist/cards-BakZPTz9.d.ts +0 -30
  69. package/dist/cards-CQn9mXZS.d.cts +0 -30
  70. package/dist/docs-layout-KoWNZc8_.js +0 -6
  71. package/dist/docs-layout-x2yKt2cL.cjs +0 -6
  72. package/dist/doctor-Be7Ly1oM.mjs +0 -21
  73. package/dist/doctor-jMxWZyLJ.cjs +0 -21
  74. package/dist/icons-dev-B_RZIyxu.js +0 -6
  75. package/dist/icons-dev-BlV3wWFT.cjs +0 -6
  76. package/dist/image-BHhTvQzr.cjs +0 -6
  77. package/dist/image-CqKzYD8f.js +0 -6
  78. package/dist/mdx-DudBEac0.js +0 -7
  79. package/dist/mdx-r4cDQxWu.cjs +0 -7
  80. package/dist/node-DtEDyN1u.cjs +0 -111
  81. package/dist/node-_1jhMGYx.mjs +0 -111
  82. package/dist/package-DrwtlXfk.cjs +0 -6
  83. package/dist/parser-CdNbqN5y.cjs +0 -6
  84. package/dist/parser-nE792MLO.mjs +0 -6
  85. package/dist/rolldown-runtime-fkIsjY3S.mjs +0 -6
  86. package/dist/routes-2k3tbUmC.cjs +0 -6
  87. package/dist/routes-CpxZIsMM.mjs +0 -6
  88. package/dist/search-dialog-B584t9ZF.js +0 -6
  89. package/dist/search-dialog-BvBopRsZ.cjs +0 -6
  90. package/dist/search-dialog-ByvGScjt.js +0 -6
  91. package/dist/search-dialog-Cyko6TJm.cjs +0 -6
  92. package/dist/search-dialog-D6BNohIJ.js +0 -6
  93. package/dist/search-dialog-DuYTIefy.cjs +0 -6
  94. package/dist/utils-CG65J0Sc.mjs +0 -7
  95. package/dist/utils-CKunkU96.cjs +0 -7
  96. package/dist/worker-pool-CGn7DrLb.mjs +0 -6
  97. package/dist/worker-pool-Crbqgw5R.cjs +0 -6
  98. package/src/client/app/config-context.tsx +0 -51
  99. package/src/client/app/doc-page.tsx +0 -38
  100. package/src/client/app/docs-layout.tsx +0 -28
  101. package/src/client/app/head.tsx +0 -122
  102. package/src/client/app/helmet-compat.tsx +0 -36
  103. package/src/client/app/mdx-component.tsx +0 -8
  104. package/src/client/app/mdx-components-context.tsx +0 -72
  105. package/src/client/app/routes-context.tsx +0 -34
  106. package/src/client/app/scroll-handler.tsx +0 -74
  107. package/src/client/app/theme-context.tsx +0 -103
  108. package/src/client/app/ui-context.tsx +0 -42
  109. package/src/client/components/docs-layout-default.tsx +0 -85
  110. package/src/client/components/icons-dev.tsx +0 -282
  111. package/src/client/components/mdx/callout.tsx +0 -97
  112. package/src/client/components/mdx/card.tsx +0 -99
  113. package/src/client/components/mdx/cards.tsx +0 -27
  114. package/src/client/components/mdx/code-block.tsx +0 -184
  115. package/src/client/components/mdx/field.tsx +0 -33
  116. package/src/client/components/mdx/image.tsx +0 -44
  117. package/src/client/components/mdx/index.ts +0 -19
  118. package/src/client/components/mdx/table.tsx +0 -54
  119. package/src/client/components/mdx/typographics.tsx +0 -120
  120. package/src/client/components/mdx/use-code-block.ts +0 -34
  121. package/src/client/components/primitives/breadcrumbs.tsx +0 -54
  122. package/src/client/components/primitives/button-group.tsx +0 -54
  123. package/src/client/components/primitives/button.tsx +0 -6
  124. package/src/client/components/primitives/code-block.tsx +0 -120
  125. package/src/client/components/primitives/docs-layout.tsx +0 -125
  126. package/src/client/components/primitives/error-boundary.tsx +0 -107
  127. package/src/client/components/primitives/heading.tsx +0 -128
  128. package/src/client/components/primitives/helpers/observer.ts +0 -141
  129. package/src/client/components/primitives/image.tsx +0 -26
  130. package/src/client/components/primitives/link.tsx +0 -102
  131. package/src/client/components/primitives/menu.tsx +0 -137
  132. package/src/client/components/primitives/navbar.tsx +0 -466
  133. package/src/client/components/primitives/on-this-page.tsx +0 -430
  134. package/src/client/components/primitives/page-nav.tsx +0 -51
  135. package/src/client/components/primitives/popover.tsx +0 -28
  136. package/src/client/components/primitives/search-dialog.tsx +0 -193
  137. package/src/client/components/primitives/sidebar.tsx +0 -423
  138. package/src/client/components/primitives/skeleton.tsx +0 -26
  139. package/src/client/components/primitives/tabs.tsx +0 -70
  140. package/src/client/components/primitives/tooltip.tsx +0 -81
  141. package/src/client/components/primitives/types.ts +0 -11
  142. package/src/client/components/ui-base/banner.tsx +0 -66
  143. package/src/client/components/ui-base/breadcrumbs.tsx +0 -44
  144. package/src/client/components/ui-base/copy-markdown.tsx +0 -107
  145. package/src/client/components/ui-base/error-boundary.tsx +0 -15
  146. package/src/client/components/ui-base/github-stars.tsx +0 -29
  147. package/src/client/components/ui-base/icons.tsx +0 -240
  148. package/src/client/components/ui-base/index.ts +0 -16
  149. package/src/client/components/ui-base/last-updated.tsx +0 -27
  150. package/src/client/components/ui-base/navbar.tsx +0 -266
  151. package/src/client/components/ui-base/not-found.tsx +0 -26
  152. package/src/client/components/ui-base/on-this-page.tsx +0 -57
  153. package/src/client/components/ui-base/page-nav.tsx +0 -50
  154. package/src/client/components/ui-base/search-dialog.tsx +0 -163
  155. package/src/client/components/ui-base/search-highlight.tsx +0 -10
  156. package/src/client/components/ui-base/sidebar.tsx +0 -92
  157. package/src/client/components/ui-base/tabs.tsx +0 -83
  158. package/src/client/components/ui-base/theme-toggle.tsx +0 -130
  159. package/src/client/components/ui-base/version-i18n.tsx +0 -80
  160. package/src/client/hooks/index.ts +0 -13
  161. package/src/client/hooks/use-analytics.ts +0 -272
  162. package/src/client/hooks/use-breadcrumbs.ts +0 -22
  163. package/src/client/hooks/use-i18n.ts +0 -182
  164. package/src/client/hooks/use-localized-to.ts +0 -113
  165. package/src/client/hooks/use-location.ts +0 -5
  166. package/src/client/hooks/use-navbar.ts +0 -130
  167. package/src/client/hooks/use-page-nav.ts +0 -46
  168. package/src/client/hooks/use-routes.ts +0 -108
  169. package/src/client/hooks/use-search-highlight.ts +0 -185
  170. package/src/client/hooks/use-search.ts +0 -118
  171. package/src/client/hooks/use-sidebar.ts +0 -205
  172. package/src/client/hooks/use-tabs.ts +0 -46
  173. package/src/client/hooks/use-version.ts +0 -111
  174. package/src/client/index.ts +0 -31
  175. package/src/client/mdx.ts +0 -2
  176. package/src/client/primitives.ts +0 -19
  177. package/src/client/ssg/boltdocs-shell.tsx +0 -148
  178. package/src/client/ssg/create-routes.tsx +0 -473
  179. package/src/client/ssg/index.ts +0 -4
  180. package/src/client/ssg/mdx-page.tsx +0 -38
  181. package/src/client/store/boltdocs-context.tsx +0 -137
  182. package/src/client/theme/neutral.css +0 -141
  183. package/src/client/theme/reset.css +0 -189
  184. package/src/client/types.ts +0 -116
  185. package/src/client/utils/cn.ts +0 -6
  186. package/src/client/utils/copy-clipboard.ts +0 -22
  187. package/src/client/utils/get-base-file-path.ts +0 -21
  188. package/src/client/utils/github.ts +0 -121
  189. package/src/client/utils/i18n.ts +0 -23
  190. package/src/client/utils/path.ts +0 -9
  191. package/src/client/utils/react-to-text.ts +0 -34
  192. package/src/client/virtual.d.ts +0 -24
  193. /package/dist/{meta-loader-CWg2gnbY.mjs → meta-loader-DzwDFtdT.mjs} +0 -0
@@ -1,44 +0,0 @@
1
- import { useBreadcrumbs } from '../../hooks/use-breadcrumbs'
2
- import { Home } from './icons'
3
- import { Breadcrumbs as BreadcrumbsRoot } from '../primitives/breadcrumbs'
4
- import { cn } from '../../utils/cn'
5
-
6
- export function Breadcrumbs() {
7
- const { crumbs, activeRoute } = useBreadcrumbs()
8
- if (crumbs.length === 0) return null
9
-
10
- return (
11
- <BreadcrumbsRoot.Root className="gap-2 text-xs sm:text-sm font-medium">
12
- <BreadcrumbsRoot.Item>
13
- <BreadcrumbsRoot.Link
14
- href="/"
15
- className="text-muted hover:text-body transition-colors flex items-center"
16
- >
17
- <Home size={14} />
18
- </BreadcrumbsRoot.Link>
19
- </BreadcrumbsRoot.Item>
20
- {crumbs.map((crumb, i) => {
21
- const isActive = crumb.href === activeRoute?.path
22
- return (
23
- <BreadcrumbsRoot.Item
24
- key={`crumb-${crumb.href}-${crumb.label}-${i}`}
25
- className="gap-2"
26
- >
27
- <BreadcrumbsRoot.Separator className="text-muted/40" />
28
- <BreadcrumbsRoot.Link
29
- href={crumb.href}
30
- className={cn(
31
- 'transition-colors',
32
- isActive
33
- ? 'text-body font-semibold cursor-default pointer-events-none'
34
- : 'text-muted hover:text-body',
35
- )}
36
- >
37
- {crumb.label}
38
- </BreadcrumbsRoot.Link>
39
- </BreadcrumbsRoot.Item>
40
- )
41
- })}
42
- </BreadcrumbsRoot.Root>
43
- )
44
- }
@@ -1,107 +0,0 @@
1
- import { useState } from 'react'
2
- import { Copy, Check, ExternalLink, ChevronDown } from './icons'
3
- import { Button } from '../primitives/button'
4
- import { ButtonGroup } from '../primitives/button-group'
5
- import { Menu } from '../primitives/menu'
6
- import { cn } from '../../utils/cn'
7
- import type { ComponentRoute } from '../../types'
8
-
9
- export interface CopyMarkdownProps {
10
- content?: string
11
- mdxRaw?: string
12
- route?: ComponentRoute
13
- }
14
-
15
- const useCopyMarkdown = (content: string) => {
16
- const [copied, setCopied] = useState(false)
17
-
18
- const handleCopy = () => {
19
- navigator.clipboard.writeText(content)
20
- setCopied(true)
21
- setTimeout(() => setCopied(false), 2000)
22
- }
23
-
24
- const handleOpenRaw = () => {
25
- const blob = new Blob([content], { type: 'text/plain;charset=utf-8' })
26
- const url = URL.createObjectURL(blob)
27
- window.open(url, '_blank')
28
- }
29
-
30
- return {
31
- copied,
32
- handleCopy,
33
- handleOpenRaw,
34
- }
35
- }
36
-
37
- export function CopyMarkdown({ content, mdxRaw }: CopyMarkdownProps) {
38
- const displayContent = mdxRaw || content || ''
39
- const { copied, handleCopy, handleOpenRaw } = useCopyMarkdown(displayContent)
40
-
41
- if (!displayContent) return null
42
-
43
- return (
44
- <div className="relative inline-flex z-100 shrink-0 w-max">
45
- <ButtonGroup className="rounded-xl border border-subtle bg-surface transition-all duration-300 hover:border-primary-500/50 group overflow-hidden">
46
- {/* Mobile: icon-only copy button */}
47
- <Button
48
- onPress={handleCopy}
49
- className={cn(
50
- 'md:hidden flex items-center justify-center w-8 h-8 bg-transparent outline-none select-none cursor-pointer border-none',
51
- 'text-muted transition-all duration-300 hover:bg-primary-500/5 hover:text-body',
52
- copied && 'text-emerald-500 hover:bg-emerald-500/5',
53
- )}
54
- aria-label={copied ? 'Copied!' : 'Copy Markdown'}
55
- >
56
- {copied ? <Check size={14} /> : <Copy size={14} />}
57
- </Button>
58
-
59
- {/* Desktop: full copy button with label */}
60
- <Button
61
- onPress={handleCopy}
62
- className={cn(
63
- 'hidden md:flex items-center gap-2 px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 shrink-0 outline-none select-none cursor-pointer border-none',
64
- 'text-body transition-all duration-300 hover:bg-primary-500/5',
65
- copied && 'text-emerald-500 hover:bg-emerald-500/5',
66
- )}
67
- >
68
- {copied ? <Check size={16} /> : <Copy size={16} />}
69
- {copied ? 'Copied!' : 'Copy Markdown'}
70
- </Button>
71
-
72
- <Menu.Trigger placement="bottom end">
73
- <Button
74
- className={cn(
75
- 'flex items-center justify-center px-2.5 md:px-3.5 h-8 md:h-9 border-none border-l border-subtle/50 text-muted rounded-none bg-transparent shrink-0 outline-none select-none cursor-pointer',
76
- 'transition-all duration-300 hover:bg-primary-500/5 hover:text-primary-500',
77
- )}
78
- >
79
- <ChevronDown size={14} />
80
- </Button>
81
- <Menu.Root className="w-52 bg-main border border-subtle rounded-xl p-1.5 shadow-md outline-none flex flex-col gap-0.5 animate-fade-in z-100">
82
- <Menu.Item
83
- onAction={handleCopy}
84
- className="flex items-center px-3 py-2 rounded-lg text-xs font-medium text-body dark:hover:bg-primary-300/50 hover:bg-primary-200/50 transition-colors duration-100 cursor-pointer select-none outline-none group"
85
- >
86
- <Copy
87
- size={16}
88
- className="size-4 text-muted dark:group-hover:text-primary-500 group-hover:text-primary-400"
89
- />
90
- <span className="ml-2">Copy Markdown</span>
91
- </Menu.Item>
92
- <Menu.Item
93
- onAction={handleOpenRaw}
94
- className="flex items-center gap-2 px-3 py-2 rounded-lg text-xs font-medium text-body dark:hover:bg-primary-300/50 hover:bg-primary-200/50 transition-colors duration-100 cursor-pointer select-none outline-none group"
95
- >
96
- <ExternalLink
97
- size={16}
98
- className="size-4 text-muted dark:group-hover:text-primary-500 group-hover:text-primary-400"
99
- />
100
- <span className="ml-2">View as Markdown</span>
101
- </Menu.Item>
102
- </Menu.Root>
103
- </Menu.Trigger>
104
- </ButtonGroup>
105
- </div>
106
- )
107
- }
@@ -1,15 +0,0 @@
1
- import { ErrorBoundary as PrimitiveErrorBoundary } from '../primitives/error-boundary'
2
- import type { ReactNode } from 'react'
3
-
4
- interface ErrorBoundaryProps {
5
- children?: ReactNode
6
- fallback?: ReactNode
7
- }
8
-
9
- export function ErrorBoundary({ children, fallback }: ErrorBoundaryProps) {
10
- return (
11
- <PrimitiveErrorBoundary fallback={fallback}>
12
- {children}
13
- </PrimitiveErrorBoundary>
14
- )
15
- }
@@ -1,29 +0,0 @@
1
- import { useEffect, useState } from 'react'
2
- import { getStarsRepo } from '../../utils/github'
3
- import { Github } from '../icons-dev'
4
-
5
- export function GithubStars({ repo }: { repo: string }) {
6
- const [stars, setStars] = useState<string | null>(null)
7
-
8
- useEffect(() => {
9
- if (repo) {
10
- getStarsRepo(repo)
11
- .then((stars) => setStars(stars))
12
- .catch(() => setStars('0'))
13
- }
14
- }, [repo])
15
-
16
- return (
17
- <a
18
- href={`https://github.com/${repo}`}
19
- target="_blank"
20
- rel="noopener noreferrer"
21
- className="inline-flex items-center gap-2 rounded-xl border border-subtle bg-surface px-3 py-1.5 text-xs font-semibold text-muted dark:hover:bg-primary-300/50 hover:bg-primary-200/50 transition-colors duration-100 hover:border-primary-500/50 hover:text-body select-none outline-none"
22
- >
23
- <Github className="h-4 w-4 text-body" />
24
- {stars !== null && (
25
- <span className="tabular-nums font-medium">{stars} stars</span>
26
- )}
27
- </a>
28
- )
29
- }
@@ -1,240 +0,0 @@
1
- import React from 'react'
2
-
3
- export interface IconProps extends React.SVGProps<SVGSVGElement> {
4
- size?: number | string
5
- }
6
-
7
- function createIcon(
8
- displayName: string,
9
- paths: React.ReactNode,
10
- viewBox = '0 0 24 24',
11
- ) {
12
- const Component = ({ size = 24, className, ...props }: IconProps) => {
13
- return (
14
- <svg
15
- xmlns="http://www.w3.org/2000/svg"
16
- width={size}
17
- height={size}
18
- viewBox={viewBox}
19
- fill="none"
20
- stroke="currentColor"
21
- strokeWidth="2"
22
- strokeLinecap="round"
23
- strokeLinejoin="round"
24
- className={className}
25
- {...props}
26
- >
27
- {paths}
28
- </svg>
29
- )
30
- }
31
- Component.displayName = displayName
32
- return Component
33
- }
34
-
35
- export const Info = createIcon('Info', (
36
- <>
37
- <circle cx="12" cy="12" r="10" />
38
- <path d="M12 16v-4" />
39
- <path d="M12 8h.01" />
40
- </>
41
- ))
42
-
43
- export const Lightbulb = createIcon('Lightbulb', (
44
- <>
45
- <path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A5 5 0 0 0 8 8c0 1 .3 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5" />
46
- <path d="M9 18h6" />
47
- <path d="M10 22h4" />
48
- </>
49
- ))
50
-
51
- export const AlertTriangle = createIcon('AlertTriangle', (
52
- <>
53
- <path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" />
54
- <line x1="12" y1="9" x2="12" y2="13" />
55
- <line x1="12" y1="17" x2="12.01" y2="17" />
56
- </>
57
- ))
58
-
59
- export const AlertCircle = createIcon('AlertCircle', (
60
- <>
61
- <circle cx="12" cy="12" r="10" />
62
- <line x1="12" y1="8" x2="12" y2="12" />
63
- <line x1="12" y1="16" x2="12.01" y2="16" />
64
- </>
65
- ))
66
-
67
- export const Copy = createIcon('Copy', (
68
- <>
69
- <rect width="14" height="14" x="8" y="8" rx="2" ry="2" />
70
- <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
71
- </>
72
- ))
73
-
74
- export const Check = createIcon('Check', (
75
- <path d="M20 6 9 17l-5-5" />
76
- ))
77
-
78
- export const File = createIcon('File', (
79
- <>
80
- <path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" />
81
- <path d="M14 2v4a2 2 0 0 0 2 2h4" />
82
- </>
83
- ))
84
-
85
- export const ArrowLeft = createIcon('ArrowLeft', (
86
- <>
87
- <path d="m12 19-7-7 7-7" />
88
- <path d="M19 12H5" />
89
- </>
90
- ))
91
-
92
- export const Pencil = createIcon('Pencil', (
93
- <>
94
- <path d="M12 20h9" />
95
- <path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z" />
96
- </>
97
- ))
98
-
99
- export const CircleHelp = createIcon('CircleHelp', (
100
- <>
101
- <circle cx="12" cy="12" r="10" />
102
- <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" />
103
- <path d="M12 17h.01" />
104
- </>
105
- ))
106
-
107
- export const TextAlignStart = createIcon('TextAlignStart', (
108
- <>
109
- <line x1="21" x2="3" y1="6" y2="6" />
110
- <line x1="15" x2="3" y1="12" y2="12" />
111
- <line x1="17" x2="3" y1="18" y2="18" />
112
- </>
113
- ))
114
-
115
- export const ExternalLink = createIcon('ExternalLink', (
116
- <>
117
- <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
118
- <polyline points="15 3 21 3 21 9" />
119
- <line x1="10" y1="14" x2="21" y2="3" />
120
- </>
121
- ))
122
-
123
- export const ChevronDown = createIcon('ChevronDown', (
124
- <path d="m6 9 6 6 6-6" />
125
- ))
126
-
127
- export const Home = createIcon('Home', (
128
- <>
129
- <path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />
130
- <polyline points="9 22 9 12 15 12 15 22" />
131
- </>
132
- ))
133
-
134
- export const Search = createIcon('Search', (
135
- <>
136
- <circle cx="11" cy="11" r="8" />
137
- <path d="m21 21-4.3-4.3" />
138
- </>
139
- ))
140
-
141
- export const Sun = createIcon('Sun', (
142
- <>
143
- <circle cx="12" cy="12" r="4" />
144
- <path d="M12 2v2" />
145
- <path d="M12 20v2" />
146
- <path d="m4.93 4.93 1.41 1.41" />
147
- <path d="m17.66 17.66 1.41 1.41" />
148
- <path d="M2 12h2" />
149
- <path d="M20 12h2" />
150
- <path d="m6.34 17.66-1.41 1.41" />
151
- <path d="m19.07 4.93-1.41 1.41" />
152
- </>
153
- ))
154
-
155
- export const Moon = createIcon('Moon', (
156
- <path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" />
157
- ))
158
-
159
- export const Monitor = createIcon('Monitor', (
160
- <>
161
- <rect width="20" height="14" x="2" y="3" rx="2" />
162
- <line x1="8" x2="16" y1="21" y2="21" />
163
- <line x1="12" x2="12" y1="17" y2="21" />
164
- </>
165
- ))
166
-
167
- export const Languages = createIcon('Languages', (
168
- <>
169
- <path d="m5 8 6 6" />
170
- <path d="m4 14 6-6 2-3" />
171
- <path d="M2 5h12" />
172
- <path d="M7 2h1" />
173
- <path d="m22 22-5-10-5 10" />
174
- <path d="M14 18h6" />
175
- </>
176
- ))
177
-
178
- export const Menu = createIcon('Menu', (
179
- <>
180
- <line x1="4" x2="20" y1="12" y2="12" />
181
- <line x1="4" x2="20" y1="6" y2="6" />
182
- <line x1="4" x2="20" y1="18" y2="18" />
183
- </>
184
- ))
185
-
186
- export const X = createIcon('X', (
187
- <>
188
- <path d="M18 6 6 18" />
189
- <path d="m6 6 12 12" />
190
- </>
191
- ))
192
-
193
- export const Link = createIcon('Link', (
194
- <>
195
- <path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" />
196
- <path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />
197
- </>
198
- ))
199
-
200
- export const ChevronRight = createIcon('ChevronRight', (
201
- <path d="m9 18 6-6-6-6" />
202
- ))
203
-
204
- export const MoreVertical = createIcon('MoreVertical', (
205
- <>
206
- <circle cx="12" cy="12" r="1" />
207
- <circle cx="12" cy="5" r="1" />
208
- <circle cx="12" cy="19" r="1" />
209
- </>
210
- ))
211
-
212
- export const ChevronLeft = createIcon('ChevronLeft', (
213
- <path d="m15 18-6-6 6-6" />
214
- ))
215
-
216
- export const Hash = createIcon('Hash', (
217
- <>
218
- <line x1="4" x2="20" y1="9" y2="9" />
219
- <line x1="4" x2="20" y1="15" y2="15" />
220
- <line x1="10" x2="8" y1="3" y2="21" />
221
- <line x1="16" x2="14" y1="3" y2="21" />
222
- </>
223
- ))
224
-
225
- export const FileText = createIcon('FileText', (
226
- <>
227
- <path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" />
228
- <path d="M14 2v4a2 2 0 0 0 2 2h4" />
229
- <path d="M10 9H8" />
230
- <path d="M16 13H8" />
231
- <path d="M16 17H8" />
232
- </>
233
- ))
234
-
235
- export const CornerDownLeft = createIcon('CornerDownLeft', (
236
- <>
237
- <polyline points="9 10 4 15 9 20" />
238
- <path d="M20 4v7a4 4 0 0 1-4 4H4" />
239
- </>
240
- ))
@@ -1,16 +0,0 @@
1
- export { Breadcrumbs } from './breadcrumbs'
2
- export { CopyMarkdown } from './copy-markdown'
3
- export type { CopyMarkdownProps } from './copy-markdown'
4
- export { ErrorBoundary } from './error-boundary'
5
- export { GithubStars } from './github-stars'
6
- export { Navbar } from './navbar'
7
- export { NotFound } from './not-found'
8
- export { OnThisPage } from './on-this-page'
9
- export { PageNav } from './page-nav'
10
- export { SearchDialog } from './search-dialog'
11
- export { Sidebar } from './sidebar'
12
- export { Tabs } from './tabs'
13
- export { Banner } from './banner'
14
- export { ThemeToggle } from './theme-toggle'
15
- export { LastUpdated } from './last-updated'
16
- export { Callout } from '../mdx/callout'
@@ -1,27 +0,0 @@
1
- interface LastUpdatedProps {
2
- date?: string | number | Date
3
- }
4
-
5
- /**
6
- * A subtle display for when the page was last updated.
7
- * Small, opaque, and positioned at the bottom of the content with a thin top border divider.
8
- */
9
- export function LastUpdated({ date }: LastUpdatedProps) {
10
- if (!date) return null
11
-
12
- const d = new Date(date)
13
- if (isNaN(d.getTime())) return null
14
-
15
- const formattedDate = d.toLocaleDateString(undefined, {
16
- year: 'numeric',
17
- month: 'long',
18
- day: 'numeric',
19
- })
20
-
21
- return (
22
- <div className="mt-16 pt-6 border-t border-subtle flex items-center justify-between text-xs text-muted select-none">
23
- <span></span>
24
- <span className="italic">Last updated on {formattedDate}</span>
25
- </div>
26
- )
27
- }