@aravindc26/velu 0.10.0 → 0.11.1

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 (65) hide show
  1. package/package.json +15 -6
  2. package/schema/velu.schema.json +1864 -30
  3. package/src/build.ts +1161 -180
  4. package/src/cli.ts +121 -16
  5. package/src/engine/_server.mjs +1708 -192
  6. package/src/engine/app/(docs)/[...slug]/layout.tsx +377 -0
  7. package/src/engine/app/(docs)/[...slug]/page.tsx +917 -0
  8. package/src/engine/app/(docs)/layout.tsx +1 -13
  9. package/src/engine/app/api/proxy/route.ts +23 -0
  10. package/src/engine/app/copy-page.css +59 -1
  11. package/src/engine/app/global.css +3487 -6
  12. package/src/engine/app/layout.tsx +59 -8
  13. package/src/engine/app/llms-file/route.ts +87 -0
  14. package/src/engine/app/llms-full-file/route.ts +62 -0
  15. package/src/engine/app/md-file/[...slug]/route.ts +409 -0
  16. package/src/engine/app/page.tsx +45 -0
  17. package/src/engine/app/robots.txt/route.ts +61 -0
  18. package/src/engine/app/rss-file/[...slug]/route.ts +176 -0
  19. package/src/engine/app/search.css +20 -0
  20. package/src/engine/app/sitemap.xml/route.ts +80 -0
  21. package/src/engine/components/assistant.tsx +16 -5
  22. package/src/engine/components/changelog-filters.tsx +114 -0
  23. package/src/engine/components/code-group.tsx +383 -0
  24. package/src/engine/components/color.tsx +118 -0
  25. package/src/engine/components/expandable.tsx +77 -0
  26. package/src/engine/components/icon.tsx +136 -0
  27. package/src/engine/components/image-zoom-fallback.tsx +147 -0
  28. package/src/engine/components/image.tsx +111 -0
  29. package/src/engine/components/lang-switcher.tsx +95 -0
  30. package/src/engine/components/manual-api-playground.tsx +154 -0
  31. package/src/engine/components/mermaid.tsx +142 -0
  32. package/src/engine/components/openapi-toc-sync.tsx +59 -0
  33. package/src/engine/components/openapi.tsx +1679 -0
  34. package/src/engine/components/page-feedback.tsx +153 -0
  35. package/src/engine/components/product-switcher.tsx +102 -0
  36. package/src/engine/components/prompt.tsx +90 -0
  37. package/src/engine/components/providers.tsx +21 -0
  38. package/src/engine/components/search.tsx +70 -3
  39. package/src/engine/components/sidebar-links.tsx +49 -0
  40. package/src/engine/components/synced-tabs.tsx +57 -0
  41. package/src/engine/components/theme-toggle.tsx +39 -0
  42. package/src/engine/components/toc-examples.tsx +110 -0
  43. package/src/engine/components/version-switcher.tsx +89 -0
  44. package/src/engine/components/view.tsx +344 -0
  45. package/src/engine/generated/redirects.ts +3 -0
  46. package/src/engine/lib/changelog.ts +246 -0
  47. package/src/engine/lib/layout.shared.ts +57 -7
  48. package/src/engine/lib/llms.ts +444 -0
  49. package/src/engine/lib/navigation-normalize.mjs +525 -0
  50. package/src/engine/lib/navigation-normalize.ts +695 -0
  51. package/src/engine/lib/redirects.ts +194 -0
  52. package/src/engine/lib/source.ts +121 -4
  53. package/src/engine/lib/velu.ts +635 -5
  54. package/src/engine/mdx-components.tsx +648 -0
  55. package/src/engine/middleware.ts +66 -0
  56. package/src/engine/next.config.mjs +2 -2
  57. package/src/engine/public/icons/cursor-dark.svg +12 -0
  58. package/src/engine/public/icons/cursor-light.svg +12 -0
  59. package/src/engine/source.config.ts +98 -1
  60. package/src/engine/src/components/PageTitle.astro +16 -5
  61. package/src/engine/src/lib/velu.ts +97 -16
  62. package/src/navigation-normalize.ts +686 -0
  63. package/src/themes.ts +6 -6
  64. package/src/validate.ts +235 -24
  65. package/src/engine/app/(docs)/[[...slug]]/page.tsx +0 -69
@@ -1,16 +1,4 @@
1
1
  import type { ReactNode } from 'react';
2
- import { DocsLayout } from 'fumadocs-ui/layouts/docs';
3
- import { baseOptions } from '@/lib/layout.shared';
4
- import { source } from '@/lib/source';
5
-
6
2
  export default function DocsRootLayout({ children }: { children: ReactNode }) {
7
- return (
8
- <DocsLayout
9
- tree={source.getPageTree()}
10
- sidebar={{ collapsible: false }}
11
- {...baseOptions()}
12
- >
13
- {children}
14
- </DocsLayout>
15
- );
3
+ return children;
16
4
  }
@@ -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.35rem;
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
+ }