boltdocs 2.7.9 → 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 (174) hide show
  1. package/dist/{cache-DorPMFgW.cjs → cache-Ba-DZQNH.cjs} +1 -1
  2. package/dist/{cache-CQKlT4fI.mjs → cache-BuMZ58L5.mjs} +1 -1
  3. package/dist/chunk-CU-zTemE.cjs +6 -0
  4. package/dist/client/index.cjs +1929 -1
  5. package/dist/client/index.js +1880 -1
  6. package/dist/client/mdx.cjs +7 -1
  7. package/dist/client/mdx.js +7 -1
  8. package/dist/client/primitives.cjs +60 -1
  9. package/dist/client/primitives.js +20 -1
  10. package/dist/docs-layout-BXHV0xw_.cjs +1431 -0
  11. package/dist/docs-layout-DwFndmj5.js +1231 -0
  12. package/dist/doctor-Be7Ly1oM.mjs +21 -0
  13. package/dist/{doctor-D4_Y7M4p.cjs → doctor-CrytFkqW.cjs} +1 -1
  14. package/dist/doctor-jMxWZyLJ.cjs +21 -0
  15. package/dist/generator-CHqxiQhF.cjs +21 -0
  16. package/dist/generator-ClVanhvi.mjs +21 -0
  17. package/dist/icons-dev-3cZMyt8r.cjs +1204 -0
  18. package/dist/icons-dev-Df8OQ481.js +839 -0
  19. package/dist/image-DtrI2cw3.cjs +268 -0
  20. package/dist/image-jxPb-2iV.js +214 -0
  21. package/dist/mdx-BdWkJTeB.cjs +523 -0
  22. package/dist/mdx-UTTLFWJq.js +494 -0
  23. package/dist/meta-loader-CWg2gnbY.mjs +6 -0
  24. package/dist/meta-loader-Cv9O0Pzl.cjs +6 -0
  25. package/dist/node/cli-entry.cjs +1 -1
  26. package/dist/node/cli-entry.mjs +1 -1
  27. package/dist/node/index.cjs +1 -1
  28. package/dist/node/index.mjs +1 -1
  29. package/dist/node/routes/worker.cjs +1 -1
  30. package/dist/node/routes/worker.mjs +1 -1
  31. package/dist/node-BSM4qcDK.cjs +111 -0
  32. package/dist/node-BspZN3R2.mjs +111 -0
  33. package/dist/{package-VfQM94VL.cjs → package-DIIrjuWI.cjs} +1 -1
  34. package/dist/{package-B4MD00N3.mjs → package-K0zsjGIz.mjs} +1 -1
  35. package/dist/{parser-Bh11BsdA.cjs → parser-Aq8LoH-0.cjs} +1 -1
  36. package/dist/{parser-DYRzXWmA.cjs → parser-CdNbqN5y.cjs} +1 -1
  37. package/dist/parser-nE792MLO.mjs +6 -0
  38. package/dist/rolldown-runtime-fkIsjY3S.mjs +6 -0
  39. package/dist/{routes-Co1mRM58.cjs → routes-2k3tbUmC.cjs} +1 -1
  40. package/dist/routes-CpxZIsMM.mjs +6 -0
  41. package/dist/{routes-CHf76Ye4.cjs → routes-DP1vmWRj.cjs} +1 -1
  42. package/dist/search-dialog-BHuIiUC6.js +8 -0
  43. package/dist/search-dialog-BNF10tDl.js +375 -0
  44. package/dist/search-dialog-BwkDuI9R.cjs +220 -0
  45. package/dist/search-dialog-C7xuvyNk.cjs +386 -0
  46. package/dist/search-dialog-CIQg6k8c.cjs +8 -0
  47. package/dist/search-dialog-D-DDN7zJ.js +208 -0
  48. package/dist/utils-CG65J0Sc.mjs +7 -0
  49. package/dist/utils-CKunkU96.cjs +7 -0
  50. package/dist/{worker-pool-BwU8ckrg.cjs → worker-pool-Crbqgw5R.cjs} +1 -1
  51. package/package.json +5 -5
  52. package/dist/chunk-Ds5LZdWN.cjs +0 -6
  53. package/dist/docs-layout-KoWNZc8_.js +0 -6
  54. package/dist/docs-layout-x2yKt2cL.cjs +0 -6
  55. package/dist/doctor-BD1BSB03.mjs +0 -23
  56. package/dist/doctor-BHc9ua6r.cjs +0 -23
  57. package/dist/generator-DGW6pkCC.cjs +0 -22
  58. package/dist/generator-Dv3wEmhZ.mjs +0 -22
  59. package/dist/icons-dev-B_RZIyxu.js +0 -6
  60. package/dist/icons-dev-BlV3wWFT.cjs +0 -6
  61. package/dist/image-BHhTvQzr.cjs +0 -6
  62. package/dist/image-CqKzYD8f.js +0 -6
  63. package/dist/mdx-DudBEac0.js +0 -7
  64. package/dist/mdx-r4cDQxWu.cjs +0 -7
  65. package/dist/meta-loader-0gJ4PtBC.cjs +0 -6
  66. package/dist/meta-loader-9IpAHWDS.mjs +0 -6
  67. package/dist/node-DBaH7kat.mjs +0 -111
  68. package/dist/node-t5C3Q85p.cjs +0 -111
  69. package/dist/parser-9cVdK7w9.mjs +0 -6
  70. package/dist/routes-DwrMa5-z.mjs +0 -6
  71. package/dist/search-dialog-B584t9ZF.js +0 -6
  72. package/dist/search-dialog-BvBopRsZ.cjs +0 -6
  73. package/dist/search-dialog-ByvGScjt.js +0 -6
  74. package/dist/search-dialog-Cyko6TJm.cjs +0 -6
  75. package/dist/search-dialog-D6BNohIJ.js +0 -6
  76. package/dist/search-dialog-DuYTIefy.cjs +0 -6
  77. package/dist/utils-BxNAXhZZ.mjs +0 -7
  78. package/dist/utils-Clzu7jvb.cjs +0 -7
  79. package/src/client/app/config-context.tsx +0 -51
  80. package/src/client/app/doc-page.tsx +0 -38
  81. package/src/client/app/docs-layout.tsx +0 -28
  82. package/src/client/app/head.tsx +0 -122
  83. package/src/client/app/helmet-compat.tsx +0 -36
  84. package/src/client/app/mdx-component.tsx +0 -8
  85. package/src/client/app/mdx-components-context.tsx +0 -72
  86. package/src/client/app/routes-context.tsx +0 -34
  87. package/src/client/app/scroll-handler.tsx +0 -74
  88. package/src/client/app/theme-context.tsx +0 -103
  89. package/src/client/app/ui-context.tsx +0 -42
  90. package/src/client/components/docs-layout-default.tsx +0 -85
  91. package/src/client/components/icons-dev.tsx +0 -282
  92. package/src/client/components/mdx/callout.tsx +0 -97
  93. package/src/client/components/mdx/card.tsx +0 -99
  94. package/src/client/components/mdx/cards.tsx +0 -27
  95. package/src/client/components/mdx/code-block.tsx +0 -184
  96. package/src/client/components/mdx/field.tsx +0 -33
  97. package/src/client/components/mdx/image.tsx +0 -44
  98. package/src/client/components/mdx/index.ts +0 -19
  99. package/src/client/components/mdx/table.tsx +0 -54
  100. package/src/client/components/mdx/typographics.tsx +0 -120
  101. package/src/client/components/mdx/use-code-block.ts +0 -34
  102. package/src/client/components/primitives/breadcrumbs.tsx +0 -54
  103. package/src/client/components/primitives/button-group.tsx +0 -54
  104. package/src/client/components/primitives/button.tsx +0 -6
  105. package/src/client/components/primitives/code-block.tsx +0 -120
  106. package/src/client/components/primitives/docs-layout.tsx +0 -125
  107. package/src/client/components/primitives/error-boundary.tsx +0 -107
  108. package/src/client/components/primitives/heading.tsx +0 -128
  109. package/src/client/components/primitives/helpers/observer.ts +0 -141
  110. package/src/client/components/primitives/image.tsx +0 -26
  111. package/src/client/components/primitives/link.tsx +0 -102
  112. package/src/client/components/primitives/menu.tsx +0 -137
  113. package/src/client/components/primitives/navbar.tsx +0 -466
  114. package/src/client/components/primitives/on-this-page.tsx +0 -430
  115. package/src/client/components/primitives/page-nav.tsx +0 -51
  116. package/src/client/components/primitives/popover.tsx +0 -28
  117. package/src/client/components/primitives/search-dialog.tsx +0 -193
  118. package/src/client/components/primitives/sidebar.tsx +0 -423
  119. package/src/client/components/primitives/skeleton.tsx +0 -26
  120. package/src/client/components/primitives/tabs.tsx +0 -70
  121. package/src/client/components/primitives/tooltip.tsx +0 -81
  122. package/src/client/components/primitives/types.ts +0 -11
  123. package/src/client/components/ui-base/banner.tsx +0 -66
  124. package/src/client/components/ui-base/breadcrumbs.tsx +0 -44
  125. package/src/client/components/ui-base/copy-markdown.tsx +0 -107
  126. package/src/client/components/ui-base/error-boundary.tsx +0 -15
  127. package/src/client/components/ui-base/github-stars.tsx +0 -29
  128. package/src/client/components/ui-base/icons.tsx +0 -240
  129. package/src/client/components/ui-base/index.ts +0 -16
  130. package/src/client/components/ui-base/last-updated.tsx +0 -27
  131. package/src/client/components/ui-base/navbar.tsx +0 -266
  132. package/src/client/components/ui-base/not-found.tsx +0 -26
  133. package/src/client/components/ui-base/on-this-page.tsx +0 -57
  134. package/src/client/components/ui-base/page-nav.tsx +0 -50
  135. package/src/client/components/ui-base/search-dialog.tsx +0 -163
  136. package/src/client/components/ui-base/search-highlight.tsx +0 -10
  137. package/src/client/components/ui-base/sidebar.tsx +0 -92
  138. package/src/client/components/ui-base/tabs.tsx +0 -83
  139. package/src/client/components/ui-base/theme-toggle.tsx +0 -130
  140. package/src/client/components/ui-base/version-i18n.tsx +0 -80
  141. package/src/client/hooks/index.ts +0 -13
  142. package/src/client/hooks/use-analytics.ts +0 -272
  143. package/src/client/hooks/use-breadcrumbs.ts +0 -22
  144. package/src/client/hooks/use-i18n.ts +0 -182
  145. package/src/client/hooks/use-localized-to.ts +0 -113
  146. package/src/client/hooks/use-location.ts +0 -5
  147. package/src/client/hooks/use-navbar.ts +0 -130
  148. package/src/client/hooks/use-page-nav.ts +0 -46
  149. package/src/client/hooks/use-routes.ts +0 -108
  150. package/src/client/hooks/use-search-highlight.ts +0 -185
  151. package/src/client/hooks/use-search.ts +0 -118
  152. package/src/client/hooks/use-sidebar.ts +0 -205
  153. package/src/client/hooks/use-tabs.ts +0 -46
  154. package/src/client/hooks/use-version.ts +0 -111
  155. package/src/client/index.ts +0 -31
  156. package/src/client/mdx.ts +0 -2
  157. package/src/client/primitives.ts +0 -19
  158. package/src/client/ssg/boltdocs-shell.tsx +0 -148
  159. package/src/client/ssg/create-routes.tsx +0 -473
  160. package/src/client/ssg/index.ts +0 -4
  161. package/src/client/ssg/mdx-page.tsx +0 -38
  162. package/src/client/store/boltdocs-context.tsx +0 -137
  163. package/src/client/theme/neutral.css +0 -141
  164. package/src/client/theme/reset.css +0 -189
  165. package/src/client/types.ts +0 -116
  166. package/src/client/utils/cn.ts +0 -6
  167. package/src/client/utils/copy-clipboard.ts +0 -22
  168. package/src/client/utils/get-base-file-path.ts +0 -21
  169. package/src/client/utils/github.ts +0 -121
  170. package/src/client/utils/i18n.ts +0 -23
  171. package/src/client/utils/path.ts +0 -9
  172. package/src/client/utils/react-to-text.ts +0 -34
  173. package/src/client/virtual.d.ts +0 -24
  174. /package/dist/{worker-pool-Bd8Y9KDv.mjs → worker-pool-CGn7DrLb.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
- }