@aravindc26/velu 0.11.0 → 0.11.3
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 +15 -6
- package/schema/velu.schema.json +1251 -115
- package/src/build.ts +1121 -304
- package/src/cli.ts +90 -26
- package/src/engine/_server.mjs +1684 -277
- package/src/engine/app/(docs)/[...slug]/layout.tsx +371 -0
- package/src/engine/app/(docs)/[...slug]/page.tsx +926 -0
- package/src/engine/app/api/proxy/route.ts +23 -0
- package/src/engine/app/copy-page.css +59 -1
- package/src/engine/app/global.css +3157 -3
- package/src/engine/app/layout.tsx +56 -1
- package/src/engine/app/llms-file/route.ts +87 -0
- package/src/engine/app/llms-full-file/route.ts +62 -0
- package/src/engine/app/md-file/[...slug]/route.ts +409 -0
- package/src/engine/app/page.tsx +45 -0
- package/src/engine/app/robots.txt/route.ts +63 -0
- package/src/engine/app/rss-file/[...slug]/route.ts +169 -0
- package/src/engine/app/sitemap.xml/route.ts +82 -0
- package/src/engine/components/assistant.tsx +16 -5
- package/src/engine/components/changelog-filters.tsx +114 -0
- package/src/engine/components/code-group.tsx +383 -0
- package/src/engine/components/color.tsx +118 -0
- package/src/engine/components/expandable.tsx +77 -0
- package/src/engine/components/icon.tsx +136 -0
- package/src/engine/components/image-zoom-fallback.tsx +147 -0
- package/src/engine/components/image.tsx +111 -0
- package/src/engine/components/manual-api-playground.tsx +154 -0
- package/src/engine/components/mermaid.tsx +142 -0
- package/src/engine/components/openapi-toc-sync.tsx +59 -0
- package/src/engine/components/openapi.tsx +1682 -0
- package/src/engine/components/page-feedback.tsx +153 -0
- package/src/engine/components/product-switcher.tsx +27 -3
- package/src/engine/components/prompt.tsx +90 -0
- package/src/engine/components/providers.tsx +1 -6
- package/src/engine/components/search.tsx +4 -0
- package/src/engine/components/sidebar-links.tsx +13 -15
- package/src/engine/components/synced-tabs.tsx +57 -0
- package/src/engine/components/toc-examples.tsx +110 -0
- package/src/engine/components/view.tsx +344 -0
- package/src/engine/generated/redirects.ts +3 -0
- package/src/engine/lib/changelog.ts +246 -0
- package/src/engine/lib/layout.shared.ts +30 -2
- package/src/engine/lib/llms.ts +444 -0
- package/src/engine/lib/navigation-normalize.mjs +481 -412
- package/src/engine/lib/navigation-normalize.ts +261 -54
- package/src/engine/lib/redirects.ts +194 -0
- package/src/engine/lib/source.ts +107 -4
- package/src/engine/lib/velu.ts +368 -2
- package/src/engine/mdx-components.tsx +648 -0
- package/src/engine/middleware.ts +66 -0
- package/src/engine/public/icons/cursor-dark.svg +12 -0
- package/src/engine/public/icons/cursor-light.svg +12 -0
- package/src/engine/source.config.ts +98 -1
- package/src/engine/src/components/PageTitle.astro +16 -5
- package/src/engine/src/lib/velu.ts +11 -3
- package/src/navigation-normalize.ts +252 -54
- package/src/themes.ts +6 -6
- package/src/validate.ts +119 -6
- package/src/engine/app/(docs)/[[...slug]]/layout.tsx +0 -87
- package/src/engine/app/(docs)/[[...slug]]/page.tsx +0 -146
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createOpenAPI } from 'fumadocs-openapi/server';
|
|
2
|
+
|
|
3
|
+
const proxy = createOpenAPI().createProxy({
|
|
4
|
+
filterRequest(request) {
|
|
5
|
+
const target = new URL(request.url).searchParams.get('url');
|
|
6
|
+
if (!target) return false;
|
|
7
|
+
|
|
8
|
+
try {
|
|
9
|
+
const parsed = new URL(target);
|
|
10
|
+
return parsed.protocol === 'http:' || parsed.protocol === 'https:';
|
|
11
|
+
} catch {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const GET = proxy.GET;
|
|
18
|
+
export const POST = proxy.POST;
|
|
19
|
+
export const PUT = proxy.PUT;
|
|
20
|
+
export const PATCH = proxy.PATCH;
|
|
21
|
+
export const DELETE = proxy.DELETE;
|
|
22
|
+
export const HEAD = proxy.HEAD;
|
|
23
|
+
|
|
@@ -11,10 +11,57 @@
|
|
|
11
11
|
margin: 0;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
.velu-title-main {
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: 0.55rem;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.velu-page-deprecated-badge {
|
|
22
|
+
text-transform: uppercase;
|
|
23
|
+
letter-spacing: 0.02em;
|
|
24
|
+
font-size: 0.65rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.velu-title-actions {
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 0.5rem;
|
|
31
|
+
flex-shrink: 0;
|
|
32
|
+
margin-top: 0.35rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.velu-rss-button {
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
border: 1px solid var(--color-fd-border, #27272a);
|
|
40
|
+
border-radius: 999px;
|
|
41
|
+
width: 2.25rem;
|
|
42
|
+
height: 2.25rem;
|
|
43
|
+
padding: 0;
|
|
44
|
+
color: var(--color-fd-muted-foreground, #a1a1aa);
|
|
45
|
+
text-decoration: none;
|
|
46
|
+
line-height: 1;
|
|
47
|
+
transition: color 0.15s, border-color 0.15s, background-color 0.15s;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.velu-rss-button svg {
|
|
51
|
+
width: 0.95rem;
|
|
52
|
+
height: 0.95rem;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.velu-rss-button:hover {
|
|
56
|
+
color: var(--color-fd-primary, #f46130);
|
|
57
|
+
border-color: color-mix(in oklab, var(--color-fd-primary, #f46130) 45%, var(--color-fd-border, #27272a));
|
|
58
|
+
background: color-mix(in oklab, var(--color-fd-primary, #f46130) 10%, transparent);
|
|
59
|
+
}
|
|
60
|
+
|
|
14
61
|
.velu-copy-page-container {
|
|
15
62
|
position: relative;
|
|
16
63
|
flex-shrink: 0;
|
|
17
|
-
margin-top: 0
|
|
64
|
+
margin-top: 0;
|
|
18
65
|
}
|
|
19
66
|
|
|
20
67
|
.velu-copy-split-btn {
|
|
@@ -130,3 +177,14 @@
|
|
|
130
177
|
font-size: 0.75em;
|
|
131
178
|
opacity: 0.5;
|
|
132
179
|
}
|
|
180
|
+
|
|
181
|
+
@media (max-width: 640px) {
|
|
182
|
+
.velu-title-row {
|
|
183
|
+
flex-wrap: wrap;
|
|
184
|
+
gap: 0.75rem;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.velu-title-actions {
|
|
188
|
+
margin-top: 0;
|
|
189
|
+
}
|
|
190
|
+
}
|