boltdocs 2.7.10 → 2.7.11

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 (137) hide show
  1. package/dist/client/index.cjs +1929 -1
  2. package/dist/client/index.js +1880 -1
  3. package/dist/client/mdx.cjs +7 -1
  4. package/dist/client/mdx.js +7 -1
  5. package/dist/client/primitives.cjs +60 -1
  6. package/dist/client/primitives.js +20 -1
  7. package/dist/docs-layout-BXHV0xw_.cjs +1431 -0
  8. package/dist/docs-layout-DwFndmj5.js +1231 -0
  9. package/dist/icons-dev-3cZMyt8r.cjs +1204 -0
  10. package/dist/icons-dev-Df8OQ481.js +839 -0
  11. package/dist/image-DtrI2cw3.cjs +268 -0
  12. package/dist/image-jxPb-2iV.js +214 -0
  13. package/dist/mdx-BdWkJTeB.cjs +523 -0
  14. package/dist/mdx-UTTLFWJq.js +494 -0
  15. package/dist/node/cli-entry.cjs +1 -1
  16. package/dist/node/cli-entry.mjs +1 -1
  17. package/dist/node/index.cjs +1 -1
  18. package/dist/node/index.mjs +1 -1
  19. package/dist/{node-DtEDyN1u.cjs → node-BSM4qcDK.cjs} +1 -1
  20. package/dist/{node-_1jhMGYx.mjs → node-BspZN3R2.mjs} +1 -1
  21. package/dist/{package-DrwtlXfk.cjs → package-DIIrjuWI.cjs} +1 -1
  22. package/dist/{package--0Yf0t1N.mjs → package-K0zsjGIz.mjs} +1 -1
  23. package/dist/{search-dialog-ByvGScjt.js → search-dialog-BHuIiUC6.js} +3 -1
  24. package/dist/search-dialog-BNF10tDl.js +375 -0
  25. package/dist/search-dialog-BwkDuI9R.cjs +220 -0
  26. package/dist/search-dialog-C7xuvyNk.cjs +386 -0
  27. package/dist/search-dialog-CIQg6k8c.cjs +8 -0
  28. package/dist/search-dialog-D-DDN7zJ.js +208 -0
  29. package/package.json +3 -4
  30. package/dist/docs-layout-KoWNZc8_.js +0 -6
  31. package/dist/docs-layout-x2yKt2cL.cjs +0 -6
  32. package/dist/icons-dev-B_RZIyxu.js +0 -6
  33. package/dist/icons-dev-BlV3wWFT.cjs +0 -6
  34. package/dist/image-BHhTvQzr.cjs +0 -6
  35. package/dist/image-CqKzYD8f.js +0 -6
  36. package/dist/mdx-DudBEac0.js +0 -7
  37. package/dist/mdx-r4cDQxWu.cjs +0 -7
  38. package/dist/search-dialog-B584t9ZF.js +0 -6
  39. package/dist/search-dialog-BvBopRsZ.cjs +0 -6
  40. package/dist/search-dialog-Cyko6TJm.cjs +0 -6
  41. package/dist/search-dialog-D6BNohIJ.js +0 -6
  42. package/dist/search-dialog-DuYTIefy.cjs +0 -6
  43. package/src/client/app/config-context.tsx +0 -51
  44. package/src/client/app/doc-page.tsx +0 -38
  45. package/src/client/app/docs-layout.tsx +0 -28
  46. package/src/client/app/head.tsx +0 -122
  47. package/src/client/app/helmet-compat.tsx +0 -36
  48. package/src/client/app/mdx-component.tsx +0 -8
  49. package/src/client/app/mdx-components-context.tsx +0 -72
  50. package/src/client/app/routes-context.tsx +0 -34
  51. package/src/client/app/scroll-handler.tsx +0 -74
  52. package/src/client/app/theme-context.tsx +0 -103
  53. package/src/client/app/ui-context.tsx +0 -42
  54. package/src/client/components/docs-layout-default.tsx +0 -85
  55. package/src/client/components/icons-dev.tsx +0 -282
  56. package/src/client/components/mdx/callout.tsx +0 -97
  57. package/src/client/components/mdx/card.tsx +0 -99
  58. package/src/client/components/mdx/cards.tsx +0 -27
  59. package/src/client/components/mdx/code-block.tsx +0 -184
  60. package/src/client/components/mdx/field.tsx +0 -33
  61. package/src/client/components/mdx/image.tsx +0 -44
  62. package/src/client/components/mdx/index.ts +0 -19
  63. package/src/client/components/mdx/table.tsx +0 -54
  64. package/src/client/components/mdx/typographics.tsx +0 -120
  65. package/src/client/components/mdx/use-code-block.ts +0 -34
  66. package/src/client/components/primitives/breadcrumbs.tsx +0 -54
  67. package/src/client/components/primitives/button-group.tsx +0 -54
  68. package/src/client/components/primitives/button.tsx +0 -6
  69. package/src/client/components/primitives/code-block.tsx +0 -120
  70. package/src/client/components/primitives/docs-layout.tsx +0 -125
  71. package/src/client/components/primitives/error-boundary.tsx +0 -107
  72. package/src/client/components/primitives/heading.tsx +0 -128
  73. package/src/client/components/primitives/helpers/observer.ts +0 -141
  74. package/src/client/components/primitives/image.tsx +0 -26
  75. package/src/client/components/primitives/link.tsx +0 -102
  76. package/src/client/components/primitives/menu.tsx +0 -137
  77. package/src/client/components/primitives/navbar.tsx +0 -466
  78. package/src/client/components/primitives/on-this-page.tsx +0 -430
  79. package/src/client/components/primitives/page-nav.tsx +0 -51
  80. package/src/client/components/primitives/popover.tsx +0 -28
  81. package/src/client/components/primitives/search-dialog.tsx +0 -193
  82. package/src/client/components/primitives/sidebar.tsx +0 -423
  83. package/src/client/components/primitives/skeleton.tsx +0 -26
  84. package/src/client/components/primitives/tabs.tsx +0 -70
  85. package/src/client/components/primitives/tooltip.tsx +0 -81
  86. package/src/client/components/primitives/types.ts +0 -11
  87. package/src/client/components/ui-base/banner.tsx +0 -66
  88. package/src/client/components/ui-base/breadcrumbs.tsx +0 -44
  89. package/src/client/components/ui-base/copy-markdown.tsx +0 -107
  90. package/src/client/components/ui-base/error-boundary.tsx +0 -15
  91. package/src/client/components/ui-base/github-stars.tsx +0 -29
  92. package/src/client/components/ui-base/icons.tsx +0 -240
  93. package/src/client/components/ui-base/index.ts +0 -16
  94. package/src/client/components/ui-base/last-updated.tsx +0 -27
  95. package/src/client/components/ui-base/navbar.tsx +0 -266
  96. package/src/client/components/ui-base/not-found.tsx +0 -26
  97. package/src/client/components/ui-base/on-this-page.tsx +0 -57
  98. package/src/client/components/ui-base/page-nav.tsx +0 -50
  99. package/src/client/components/ui-base/search-dialog.tsx +0 -163
  100. package/src/client/components/ui-base/search-highlight.tsx +0 -10
  101. package/src/client/components/ui-base/sidebar.tsx +0 -92
  102. package/src/client/components/ui-base/tabs.tsx +0 -83
  103. package/src/client/components/ui-base/theme-toggle.tsx +0 -130
  104. package/src/client/components/ui-base/version-i18n.tsx +0 -80
  105. package/src/client/hooks/index.ts +0 -13
  106. package/src/client/hooks/use-analytics.ts +0 -272
  107. package/src/client/hooks/use-breadcrumbs.ts +0 -22
  108. package/src/client/hooks/use-i18n.ts +0 -182
  109. package/src/client/hooks/use-localized-to.ts +0 -113
  110. package/src/client/hooks/use-location.ts +0 -5
  111. package/src/client/hooks/use-navbar.ts +0 -130
  112. package/src/client/hooks/use-page-nav.ts +0 -46
  113. package/src/client/hooks/use-routes.ts +0 -108
  114. package/src/client/hooks/use-search-highlight.ts +0 -185
  115. package/src/client/hooks/use-search.ts +0 -118
  116. package/src/client/hooks/use-sidebar.ts +0 -205
  117. package/src/client/hooks/use-tabs.ts +0 -46
  118. package/src/client/hooks/use-version.ts +0 -111
  119. package/src/client/index.ts +0 -31
  120. package/src/client/mdx.ts +0 -2
  121. package/src/client/primitives.ts +0 -19
  122. package/src/client/ssg/boltdocs-shell.tsx +0 -148
  123. package/src/client/ssg/create-routes.tsx +0 -473
  124. package/src/client/ssg/index.ts +0 -4
  125. package/src/client/ssg/mdx-page.tsx +0 -38
  126. package/src/client/store/boltdocs-context.tsx +0 -137
  127. package/src/client/theme/neutral.css +0 -141
  128. package/src/client/theme/reset.css +0 -189
  129. package/src/client/types.ts +0 -116
  130. package/src/client/utils/cn.ts +0 -6
  131. package/src/client/utils/copy-clipboard.ts +0 -22
  132. package/src/client/utils/get-base-file-path.ts +0 -21
  133. package/src/client/utils/github.ts +0 -121
  134. package/src/client/utils/i18n.ts +0 -23
  135. package/src/client/utils/path.ts +0 -9
  136. package/src/client/utils/react-to-text.ts +0 -34
  137. package/src/client/virtual.d.ts +0 -24
@@ -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
- }