radiant-docs 0.1.28 → 0.1.31
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.
- package/package.json +1 -1
- package/template/astro.config.mjs +4 -0
- package/template/package-lock.json +1204 -20
- package/template/package.json +9 -2
- package/template/src/assets/icons/sparkle.svg +22 -0
- package/template/src/components/Footer.astro +11 -3
- package/template/src/components/Header.astro +48 -16
- package/template/src/components/Search.astro +3 -3
- package/template/src/components/Sidebar.astro +1 -1
- package/template/src/components/SidebarDropdown.astro +2 -2
- package/template/src/components/chat/AskAiWidget.tsx +1771 -0
- package/template/src/components/user/Accordion.astro +12 -3
- package/template/src/content.config.ts +1 -1
- package/template/src/layouts/Layout.astro +57 -12
- package/template/src/styles/global.css +1 -0
- package/template/src/styles/vaul.css +255 -0
- package/template/tsconfig.json +4 -0
package/template/package.json
CHANGED
|
@@ -17,12 +17,14 @@
|
|
|
17
17
|
"@alpinejs/persist": "^3.15.2",
|
|
18
18
|
"@astrojs/alpinejs": "^0.4.9",
|
|
19
19
|
"@astrojs/mdx": "^4.3.12",
|
|
20
|
+
"@astrojs/preact": "^4.1.3",
|
|
20
21
|
"@aws-sdk/client-s3": "^3.964.0",
|
|
21
22
|
"@fontsource/google-sans-flex": "^5.2.2",
|
|
22
23
|
"@iconify-json/lucide": "^1.2.79",
|
|
23
24
|
"@iconify-json/simple-icons": "^1.2.69",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
25
|
+
"@iconify/react": "^6.0.2",
|
|
26
|
+
"@jongwooo/prism-theme-github": "^1.15.1",
|
|
27
|
+
"@preact/preset-vite": "^2.10.3",
|
|
26
28
|
"@readme/oas-to-snippet": "^29.3.0",
|
|
27
29
|
"@resvg/resvg-js": "^2.6.2",
|
|
28
30
|
"@stoplight/spectral-core": "^1.20.0",
|
|
@@ -34,15 +36,20 @@
|
|
|
34
36
|
"astro": "^5.16.4",
|
|
35
37
|
"astro-icon": "^1.1.5",
|
|
36
38
|
"fs-extra": "^11.3.3",
|
|
39
|
+
"mdast-util-gfm": "^3.1.0",
|
|
40
|
+
"micromark-extension-gfm": "^3.0.0",
|
|
37
41
|
"mime-types": "^3.0.2",
|
|
38
42
|
"oas": "^28.7.0",
|
|
39
43
|
"openapi-sampler": "^1.6.2",
|
|
44
|
+
"preact": "^10.29.0",
|
|
45
|
+
"prism-themes": "^1.9.0",
|
|
40
46
|
"prismjs": "^1.30.0",
|
|
41
47
|
"rehype-autolink-headings": "^7.1.0",
|
|
42
48
|
"rehype-slug": "^6.0.0",
|
|
43
49
|
"remark-gfm": "^4.0.1",
|
|
44
50
|
"simple-git": "^3.30.0",
|
|
45
51
|
"tailwindcss": "^4.1.17",
|
|
52
|
+
"vaul": "^1.1.2",
|
|
46
53
|
"yaml": "^2.8.2",
|
|
47
54
|
"zod": "^3.25.76"
|
|
48
55
|
},
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
3
|
+
data-testid="geist-icon"
|
|
4
|
+
height="16"
|
|
5
|
+
stroke-linejoin="round"
|
|
6
|
+
viewBox="0 0 16 16"
|
|
7
|
+
width="16"
|
|
8
|
+
style="color: currentcolor"
|
|
9
|
+
>
|
|
10
|
+
<path
|
|
11
|
+
d="M2.5 0.5V0H3.5V0.5C3.5 1.60457 4.39543 2.5 5.5 2.5H6V3V3.5H5.5C4.39543 3.5 3.5 4.39543 3.5 5.5V6H3H2.5V5.5C2.5 4.39543 1.60457 3.5 0.5 3.5H0V3V2.5H0.5C1.60457 2.5 2.5 1.60457 2.5 0.5Z"
|
|
12
|
+
fill="currentColor"
|
|
13
|
+
></path>
|
|
14
|
+
<path
|
|
15
|
+
d="M14.5 4.5V5H13.5V4.5C13.5 3.94772 13.0523 3.5 12.5 3.5H12V3V2.5H12.5C13.0523 2.5 13.5 2.05228 13.5 1.5V1H14H14.5V1.5C14.5 2.05228 14.9477 2.5 15.5 2.5H16V3V3.5H15.5C14.9477 3.5 14.5 3.94772 14.5 4.5Z"
|
|
16
|
+
fill="currentColor"
|
|
17
|
+
></path>
|
|
18
|
+
<path
|
|
19
|
+
d="M8.40706 4.92939L8.5 4H9.5L9.59294 4.92939C9.82973 7.29734 11.7027 9.17027 14.0706 9.40706L15 9.5V10.5L14.0706 10.5929C11.7027 10.8297 9.82973 12.7027 9.59294 15.0706L9.5 16H8.5L8.40706 15.0706C8.17027 12.7027 6.29734 10.8297 3.92939 10.5929L3 10.5V9.5L3.92939 9.40706C6.29734 9.17027 8.17027 7.29734 8.40706 4.92939Z"
|
|
20
|
+
fill="currentColor"
|
|
21
|
+
></path>
|
|
22
|
+
</svg>
|
|
@@ -3,6 +3,12 @@ import Icon from "./ui/Icon.astro";
|
|
|
3
3
|
import { getConfig } from "../lib/validation";
|
|
4
4
|
import LogoLink from "./LogoLink.astro";
|
|
5
5
|
|
|
6
|
+
interface Props {
|
|
7
|
+
askAiEnabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { askAiEnabled = false } = Astro.props as Props;
|
|
11
|
+
|
|
6
12
|
const config = await getConfig();
|
|
7
13
|
const { footer } = config;
|
|
8
14
|
|
|
@@ -26,7 +32,6 @@ const socialIcons: Record<string, string> = {
|
|
|
26
32
|
reddit: "simple-icons:reddit",
|
|
27
33
|
podcast: "lucide:podcast",
|
|
28
34
|
};
|
|
29
|
-
|
|
30
35
|
---
|
|
31
36
|
|
|
32
37
|
<footer class="border-t border-border-light pt-16" data-pagefind-ignore>
|
|
@@ -38,7 +43,7 @@ const socialIcons: Record<string, string> = {
|
|
|
38
43
|
<!-- Socials -->
|
|
39
44
|
{
|
|
40
45
|
footer.socials && (
|
|
41
|
-
<div class="flex items-center justify-center gap-6">
|
|
46
|
+
<div class="flex flex-wrap items-center justify-center gap-6">
|
|
42
47
|
{Object.entries(footer.socials).map(([platform, url]) => (
|
|
43
48
|
<a
|
|
44
49
|
href={url}
|
|
@@ -84,7 +89,10 @@ const socialIcons: Record<string, string> = {
|
|
|
84
89
|
</p>
|
|
85
90
|
<a
|
|
86
91
|
href="https://radiant.io"
|
|
87
|
-
class=
|
|
92
|
+
class:list={[
|
|
93
|
+
"group flex items-center gap-1.5 text-[13px] text-neutral-400 dark:text-neutral-500 hover:text-neutral-600 dark:hover:text-neutral-300 transition-colors duration-200",
|
|
94
|
+
askAiEnabled && "sm:pr-16",
|
|
95
|
+
]}
|
|
88
96
|
>
|
|
89
97
|
Built with <span
|
|
90
98
|
class="group-hover:text-neutral-900 dark:group-hover:text-neutral-100 font-medium duration-200"
|
|
@@ -3,18 +3,24 @@ import Icon from "./ui/Icon.astro";
|
|
|
3
3
|
import { getConfig } from "../lib/validation";
|
|
4
4
|
import Search from "./Search.astro";
|
|
5
5
|
import LogoLink from "./LogoLink.astro";
|
|
6
|
+
import sparkleIcon from "../assets/icons/sparkle.svg?url";
|
|
6
7
|
|
|
8
|
+
interface Props {
|
|
9
|
+
showAskAiTrigger?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { showAskAiTrigger = false } = Astro.props as Props;
|
|
7
13
|
const config = await getConfig();
|
|
8
14
|
---
|
|
9
15
|
|
|
10
16
|
<header
|
|
11
17
|
class:list={[
|
|
12
|
-
"fixed z-30 inset-x-1
|
|
13
|
-
config.navbar?.blur
|
|
14
|
-
|
|
15
|
-
: "bg-background",
|
|
18
|
+
"fixed z-30 top-1 inset-x-1 shadow-[0px_-20px_0px_20px_var(--color-neutral-100)] h-16 border-x border-t border-border rounded-t-2xl overflow-hidden border-b bg-background border-b-border-light",
|
|
19
|
+
config.navbar?.blur &&
|
|
20
|
+
"sm:bg-background/80 sm:backdrop-blur-[18px] sm:backdrop-saturate-50 sm:border-b-neutral-100/85 sm:bg-clip-padding",
|
|
16
21
|
]}
|
|
17
22
|
data-pagefind-ignore
|
|
23
|
+
data-vaul-scale-chrome
|
|
18
24
|
>
|
|
19
25
|
<div class="flex h-full">
|
|
20
26
|
<div class="lg:w-[283px] h-full">
|
|
@@ -46,7 +52,26 @@ const config = await getConfig();
|
|
|
46
52
|
<div
|
|
47
53
|
class="min-w-0 w-full flex items-center justify-end md:justify-between gap-3 px-4 sm:px-6"
|
|
48
54
|
>
|
|
49
|
-
<
|
|
55
|
+
<div class="flex items-center gap-2 mx-0 md:mx-auto lg:mx-0">
|
|
56
|
+
<Search />
|
|
57
|
+
{
|
|
58
|
+
showAskAiTrigger ? (
|
|
59
|
+
<button
|
|
60
|
+
type="button"
|
|
61
|
+
class="hidden md:inline-flex items-center gap-1.5 h-8 rounded-lg [corner-shape:superellipse(1.2)] bg-linear-to-b from-neutral-900/85 to-neutral-900 px-3 text-xs text-white shadow-sm dark:bg-white dark:text-neutral-900 cursor-pointer"
|
|
62
|
+
onclick="window.dispatchEvent(new CustomEvent('ask-ai:open'));"
|
|
63
|
+
>
|
|
64
|
+
<img
|
|
65
|
+
src={sparkleIcon}
|
|
66
|
+
alt=""
|
|
67
|
+
aria-hidden="true"
|
|
68
|
+
class="size-3 invert dark:invert-0"
|
|
69
|
+
/>
|
|
70
|
+
Ask AI
|
|
71
|
+
</button>
|
|
72
|
+
) : null
|
|
73
|
+
}
|
|
74
|
+
</div>
|
|
50
75
|
{
|
|
51
76
|
config.navbar && (
|
|
52
77
|
<nav class="hidden xs:flex items-center gap-3">
|
|
@@ -59,17 +84,22 @@ const config = await getConfig();
|
|
|
59
84
|
: "hidden lg:flex",
|
|
60
85
|
]}
|
|
61
86
|
>
|
|
62
|
-
{config.navbar.links.map((l, i) => (
|
|
87
|
+
{config.navbar.links.map((l, i, a) => (
|
|
63
88
|
<a
|
|
64
|
-
class=
|
|
89
|
+
class:list={[
|
|
90
|
+
"items-center gap-1 text-[13px] font-[450] text-neutral-600/85 hover:text-neutral-600 duration-200 px-1.5 py-[5px] whitespace-nowrap",
|
|
91
|
+
showAskAiTrigger && a.length === 3 && i === 2
|
|
92
|
+
? "hidden 2xl:flex"
|
|
93
|
+
: "flex",
|
|
94
|
+
]}
|
|
65
95
|
href={l.href}
|
|
66
96
|
>
|
|
67
97
|
{l.icon && (
|
|
68
98
|
<Icon
|
|
69
|
-
class="ml-
|
|
99
|
+
class="ml-[3px]"
|
|
70
100
|
name={l.icon}
|
|
71
|
-
width="
|
|
72
|
-
height="
|
|
101
|
+
width="14"
|
|
102
|
+
height="14"
|
|
73
103
|
/>
|
|
74
104
|
)}
|
|
75
105
|
{l.text}
|
|
@@ -80,7 +110,7 @@ const config = await getConfig();
|
|
|
80
110
|
{config.navbar.secondary && (
|
|
81
111
|
<a
|
|
82
112
|
class:list={[
|
|
83
|
-
"items-center gap-1.5 px-3
|
|
113
|
+
"h-[33px] items-center gap-1.5 px-3 text-[13px] bg-white/90 text-neutral-600/85 hover:text-neutral-600 rounded-lg [corner-shape:superellipse(1.2)] border border-neutral-200 shadow-xs hover:shadow-sm. transition-all whitespace-nowrap",
|
|
84
114
|
config.navbar.primary ? "hidden lg:flex" : "flex",
|
|
85
115
|
]}
|
|
86
116
|
href={config.navbar.secondary.href}
|
|
@@ -88,8 +118,9 @@ const config = await getConfig();
|
|
|
88
118
|
{config.navbar.secondary.icon && (
|
|
89
119
|
<Icon
|
|
90
120
|
name={config.navbar.secondary.icon}
|
|
91
|
-
width="
|
|
92
|
-
height="
|
|
121
|
+
width="14"
|
|
122
|
+
height="14"
|
|
123
|
+
class="-ml-px"
|
|
93
124
|
/>
|
|
94
125
|
)}
|
|
95
126
|
{config.navbar.secondary.text}
|
|
@@ -98,15 +129,16 @@ const config = await getConfig();
|
|
|
98
129
|
{config.navbar.primary && (
|
|
99
130
|
<a
|
|
100
131
|
class:list={[
|
|
101
|
-
"flex items-center gap-
|
|
132
|
+
"h-8 flex items-center gap-2 px-3 text-[13px] rounded-lg [corner-shape:superellipse(1.2)] bg-linear-to-b from-neutral-900/85 to-neutral-900 text-white duration-200 shadow-sm transition-all whitespace-nowrap",
|
|
102
133
|
]}
|
|
103
134
|
href={config.navbar.primary.href}
|
|
104
135
|
>
|
|
105
136
|
{config.navbar.primary.icon && (
|
|
106
137
|
<Icon
|
|
107
138
|
name={config.navbar.primary.icon}
|
|
108
|
-
width="
|
|
109
|
-
height="
|
|
139
|
+
width="14"
|
|
140
|
+
height="14"
|
|
141
|
+
class="-ml-px"
|
|
110
142
|
/>
|
|
111
143
|
)}
|
|
112
144
|
{config.navbar.primary.text}
|
|
@@ -12,7 +12,7 @@ import { Icon } from "astro-icon/components";
|
|
|
12
12
|
<!-- Search Trigger Button -->
|
|
13
13
|
<button
|
|
14
14
|
x-on:click="open()"
|
|
15
|
-
class="md:bg-white dark:md:bg-neutral-800 flex items-center gap-2 h-
|
|
15
|
+
class="md:bg-white/90 dark:md:bg-neutral-800 flex items-center gap-2 h-[33px] md:min-w-64 px-3 -mr-3 xs:mr-0 text-xs text-neutral-500/80 dark:text-neutral-400/80 hover:text-neutral-500 dark:hover:text-neutral-400 md:border border-border rounded-lg cursor-pointer md:shadow-xs md:hover:shadow-sm transition"
|
|
16
16
|
>
|
|
17
17
|
<Icon name="lucide:search" class="size-5 md:size-4" />
|
|
18
18
|
<span class="hidden md:inline">Search documentation</span>
|
|
@@ -235,7 +235,7 @@ import { Icon } from "astro-icon/components";
|
|
|
235
235
|
scrollToSelected() {
|
|
236
236
|
this.$nextTick(() => {
|
|
237
237
|
const selectedEl = document.querySelector(
|
|
238
|
-
`[data-index="${this.selectedIndex}"]
|
|
238
|
+
`[data-index="${this.selectedIndex}"]`,
|
|
239
239
|
);
|
|
240
240
|
selectedEl?.scrollIntoView({ block: "nearest" });
|
|
241
241
|
});
|
|
@@ -275,7 +275,7 @@ import { Icon } from "astro-icon/components";
|
|
|
275
275
|
const matchIsInHeading =
|
|
276
276
|
hasSubResults &&
|
|
277
277
|
result.sub_results!.some((sub) =>
|
|
278
|
-
sub.title.toLowerCase().startsWith(queryLower)
|
|
278
|
+
sub.title.toLowerCase().startsWith(queryLower),
|
|
279
279
|
);
|
|
280
280
|
|
|
281
281
|
// Collect sub-results first (they take priority)
|
|
@@ -7,7 +7,7 @@ const config: DocsConfig = await getConfig();
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
<aside class="flex flex-col h-full">
|
|
10
|
-
<nav class="overflow-y-auto">
|
|
10
|
+
<nav class="overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden">
|
|
11
11
|
<SidebarMenu navigation={config.navigation} />
|
|
12
12
|
</nav>
|
|
13
13
|
<div
|
|
@@ -71,7 +71,7 @@ const currentPrefix = parentSlug
|
|
|
71
71
|
}`>
|
|
72
72
|
<div
|
|
73
73
|
class:list={[
|
|
74
|
-
"mt-3 mx-2",
|
|
74
|
+
"mt-3 mx-2 z-10 relative",
|
|
75
75
|
menu.label && "rounded-lg bg-neutral-100 p-[3px]",
|
|
76
76
|
]}
|
|
77
77
|
>
|
|
@@ -155,7 +155,7 @@ const currentPrefix = parentSlug
|
|
|
155
155
|
</div>
|
|
156
156
|
<div
|
|
157
157
|
class:list={[
|
|
158
|
-
"relative overflow-y-auto",
|
|
158
|
+
"relative -mt-2 pt-2 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
|
|
159
159
|
menu.label
|
|
160
160
|
? "h-[calc(100vh-4px-64px-12px-70px-52px)]"
|
|
161
161
|
: "h-[calc(100vh-4px-64px-12px-38px-52px)]",
|