@veluai/velu 0.2.25 → 0.2.28

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 (114) hide show
  1. package/README.md +80 -80
  2. package/dist/cli.js +44 -44
  3. package/package.json +64 -64
  4. package/runtime/velu-ui/base.css +320 -320
  5. package/runtime/velu-ui/components/Accordion.jsx +64 -64
  6. package/runtime/velu-ui/components/ApiClient.jsx +207 -207
  7. package/runtime/velu-ui/components/ApiField.jsx +87 -87
  8. package/runtime/velu-ui/components/ApiPath.jsx +63 -63
  9. package/runtime/velu-ui/components/ApiReferencePage.jsx +384 -384
  10. package/runtime/velu-ui/components/ApiSamples.jsx +36 -36
  11. package/runtime/velu-ui/components/ApiSidebar.jsx +125 -125
  12. package/runtime/velu-ui/components/AskBar.jsx +71 -71
  13. package/runtime/velu-ui/components/Callout.jsx +114 -114
  14. package/runtime/velu-ui/components/Card.jsx +131 -131
  15. package/runtime/velu-ui/components/ChangelogFilters.jsx +75 -75
  16. package/runtime/velu-ui/components/Chatbot.jsx +972 -972
  17. package/runtime/velu-ui/components/CodeBlock.jsx +375 -375
  18. package/runtime/velu-ui/components/Columns.jsx +56 -56
  19. package/runtime/velu-ui/components/ContextMenu.jsx +327 -327
  20. package/runtime/velu-ui/components/ErrorCard.jsx +138 -138
  21. package/runtime/velu-ui/components/Field.jsx +81 -81
  22. package/runtime/velu-ui/components/Image.jsx +163 -163
  23. package/runtime/velu-ui/components/Logo.jsx +31 -31
  24. package/runtime/velu-ui/components/MethodBadge.jsx +31 -31
  25. package/runtime/velu-ui/components/NavSelect.jsx +108 -108
  26. package/runtime/velu-ui/components/NotFound.jsx +63 -63
  27. package/runtime/velu-ui/components/PageFeedback.jsx +219 -219
  28. package/runtime/velu-ui/components/PageFooter.jsx +145 -145
  29. package/runtime/velu-ui/components/PageHeader.jsx +422 -422
  30. package/runtime/velu-ui/components/PageNav.jsx +77 -77
  31. package/runtime/velu-ui/components/PoweredBy.jsx +51 -51
  32. package/runtime/velu-ui/components/Prompt.jsx +115 -115
  33. package/runtime/velu-ui/components/Search.jsx +460 -460
  34. package/runtime/velu-ui/components/Sidebar.jsx +246 -246
  35. package/runtime/velu-ui/components/SocialLinks.jsx +90 -90
  36. package/runtime/velu-ui/components/Steps.jsx +65 -65
  37. package/runtime/velu-ui/components/ThemeToggle.jsx +48 -48
  38. package/runtime/velu-ui/components/Toc.jsx +537 -537
  39. package/runtime/velu-ui/components/TocBar.jsx +195 -195
  40. package/runtime/velu-ui/components/Tree.jsx +87 -87
  41. package/runtime/velu-ui/components/TryItBar.jsx +102 -102
  42. package/runtime/velu-ui/components/Update.jsx +92 -92
  43. package/runtime/velu-ui/components/accordion.css +92 -92
  44. package/runtime/velu-ui/components/api-page.css +208 -208
  45. package/runtime/velu-ui/components/api.css +635 -635
  46. package/runtime/velu-ui/components/ask-bar.css +103 -103
  47. package/runtime/velu-ui/components/card.css +105 -105
  48. package/runtime/velu-ui/components/changelog-filters.css +43 -43
  49. package/runtime/velu-ui/components/chatbot.css +687 -687
  50. package/runtime/velu-ui/components/code-block.css +263 -263
  51. package/runtime/velu-ui/components/context-menu.css +199 -199
  52. package/runtime/velu-ui/components/docs-layout.css +822 -822
  53. package/runtime/velu-ui/components/field.css +82 -82
  54. package/runtime/velu-ui/components/image.css +237 -237
  55. package/runtime/velu-ui/components/nav-select.css +157 -157
  56. package/runtime/velu-ui/components/not-found.css +94 -94
  57. package/runtime/velu-ui/components/page-feedback.css +261 -261
  58. package/runtime/velu-ui/components/page-footer.css +130 -130
  59. package/runtime/velu-ui/components/page-header.css +558 -558
  60. package/runtime/velu-ui/components/page-nav.css +50 -50
  61. package/runtime/velu-ui/components/powered-by.css +92 -92
  62. package/runtime/velu-ui/components/prompt.css +99 -99
  63. package/runtime/velu-ui/components/search.css +307 -307
  64. package/runtime/velu-ui/components/sidebar.css +205 -205
  65. package/runtime/velu-ui/components/steps.css +77 -77
  66. package/runtime/velu-ui/components/theme-toggle.css +102 -102
  67. package/runtime/velu-ui/components/toc-bar.css +234 -234
  68. package/runtime/velu-ui/components/tree.css +49 -49
  69. package/runtime/velu-ui/components/update.css +111 -111
  70. package/runtime/velu-ui/index.js +58 -58
  71. package/runtime/velu-ui/lib/api-send.js +118 -118
  72. package/runtime/velu-ui/lib/brand-icons.jsx +103 -103
  73. package/runtime/velu-ui/lib/component-schemas.js +100 -100
  74. package/runtime/velu-ui/lib/copyText.js +64 -64
  75. package/runtime/velu-ui/lib/docs-assistant.js +273 -273
  76. package/runtime/velu-ui/lib/lang-icons.jsx +147 -147
  77. package/runtime/velu-ui/lib/page-feedback.js +72 -72
  78. package/runtime/velu-ui/lib/pagefind.js +116 -116
  79. package/runtime/velu-ui/lib/prism-langs.js +957 -957
  80. package/runtime/velu-ui/lib/prism-loader.js +74 -74
  81. package/runtime/velu-ui/lib/resolveIcon.jsx +29 -29
  82. package/runtime/velu-ui/lib/scrollIntoNearestView.js +66 -66
  83. package/runtime/velu-ui/mdx-components.jsx +107 -107
  84. package/runtime/velu-ui/primitives/Cluster.jsx +49 -49
  85. package/runtime/velu-ui/primitives/Stack.jsx +63 -63
  86. package/runtime/velu-ui/primitives/Switcher.jsx +57 -57
  87. package/runtime/velu-ui/primitives/stack.css +3 -3
  88. package/runtime/velu-ui/primitives/switcher.css +25 -25
  89. package/runtime/velu-ui/styles.css +48 -48
  90. package/runtime/velu-ui/tokens.css +4 -4
  91. package/schema/velu.schema.json +419 -419
  92. package/src/lib/extract-mdx-error.js +170 -170
  93. package/src/lib/issues.js +159 -159
  94. package/src/lib/known-components.js +35 -35
  95. package/src/navigation.js +459 -459
  96. package/src/runtime/App.jsx +1754 -1754
  97. package/src/runtime/ErrorBoundary.jsx +54 -54
  98. package/src/runtime/client-entry.jsx +27 -27
  99. package/src/runtime/server-entry.jsx +24 -24
  100. package/src/template.html +48 -48
  101. package/templates/starter/ai-tools/claude-code.mdx +26 -26
  102. package/templates/starter/ai-tools/cursor.mdx +17 -17
  103. package/templates/starter/api-reference/introduction.mdx +43 -43
  104. package/templates/starter/development.mdx +19 -19
  105. package/templates/starter/essentials/code.mdx +29 -29
  106. package/templates/starter/essentials/images.mdx +29 -29
  107. package/templates/starter/essentials/markdown.mdx +25 -25
  108. package/templates/starter/essentials/navigation.mdx +39 -39
  109. package/templates/starter/essentials/settings.mdx +30 -30
  110. package/templates/starter/favicon.svg +6 -6
  111. package/templates/starter/index.mdx +31 -31
  112. package/templates/starter/openapi.json +160 -160
  113. package/templates/starter/quickstart.mdx +31 -31
  114. package/templates/starter/velu.json +40 -40
@@ -1,170 +1,170 @@
1
- // Normalize a thrown error — from a Vite/MDX transform, an SSR render, or a
2
- // React error boundary — into the shared `issue` shape (see ./issues.js).
3
- //
4
- // Isomorphic: no Node `path` import (path handling is string-based) so the
5
- // browser ErrorBoundary can reuse it. The single hard rule is PATH SAFETY:
6
- // never surface an absolute path that isn't under the user's project — those
7
- // are Velu/Vite internals and must be stripped.
8
- import { makeIssue, suggestComponent } from './issues.js';
9
-
10
- // Unwrap a few layers of `err.cause` when the outer message is generic.
11
- function unwrap(err) {
12
- let e = err;
13
- let depth = 0;
14
- while (e && e.cause && depth < 3) {
15
- // Stop if the current layer already carries useful location info.
16
- if (e.loc || e.line || /`[^`]+` to be defined/.test(e.message || '')) break;
17
- e = e.cause;
18
- depth += 1;
19
- }
20
- return e || err;
21
- }
22
-
23
- const toPosix = (p) => String(p).replace(/\\/g, '/');
24
-
25
- // Make an absolute path project-relative; return null for anything that isn't
26
- // inside the project (i.e. our internals — never shown).
27
- function rel(rawPath, projectDir) {
28
- if (!rawPath) return null;
29
- let p = toPosix(rawPath).replace(/[?#].*$/, ''); // drop ?query / #hash
30
- const root = projectDir ? toPosix(projectDir).replace(/\/+$/, '') : '';
31
- if (root && p.toLowerCase().startsWith(root.toLowerCase())) {
32
- return p.slice(root.length).replace(/^\/+/, '');
33
- }
34
- // Already-relative, project-owned path (no drive letter, no node_modules).
35
- if (!/^([a-zA-Z]:\/|\/)/.test(p) && !/node_modules/.test(p)) return p;
36
- return null; // absolute and outside the project → hide it
37
- }
38
-
39
- // Strip any absolute path (and node_modules refs) from a message so internals
40
- // never leak; collapse them to "…".
41
- function cleanMessage(msg) {
42
- if (!msg) return '';
43
- return String(msg)
44
- .replace(/([a-zA-Z]:\\|\/)[^\s'"()]+/g, (m) => (/node_modules|[\\/]vite[\\/]|@veluai|velu-cli|velu-ui/.test(m) ? '…' : m))
45
- .trim();
46
- }
47
-
48
- // Pull a "(line:col)" / "(line:col-line:col)" position out of a message tail.
49
- // MDX/vfile errors often carry the location only in the message string, with
50
- // err.line/err.loc left undefined.
51
- function parseLocFromMessage(msg) {
52
- const m = /\((\d+):(\d+)(?:-\d+:\d+)?\)\s*$/.exec(String(msg || ''));
53
- return m ? { line: Number(m[1]), column: Number(m[2]) } : null;
54
- }
55
-
56
- // Drop a trailing "(line:col-…)" from a message once we've surfaced it as a
57
- // separate location, so it isn't shown twice.
58
- function stripLocSuffix(msg) {
59
- return String(msg || '').replace(/\s*\(\d+:\d+(?:-\d+:\d+)?\)\s*$/, '').trim();
60
- }
61
-
62
- // Phrases that mark a genuine MDX *parse* error (vs a runtime throw).
63
- const MDX_SYNTAX_RE =
64
- /closing tag|unexpected closing|could not parse (?:expression|import|export)|unexpected character|unexpected end of|expected a closing|expected the closing|unexpected `|in expression|misnested|before name/i;
65
-
66
- // Keep a code frame only when it clearly belongs to a project file; otherwise
67
- // drop it (an internal frame would leak paths and confuse the author).
68
- function safeFrame(frame, fileIsProjectOwned) {
69
- if (!frame || !fileIsProjectOwned) return null;
70
- const text = String(frame);
71
- if (/node_modules|[\\/]vite[\\/]|@veluai[\\/]/.test(text)) return null;
72
- return text;
73
- }
74
-
75
- export function extractMdxError(rawErr, opts = {}) {
76
- const { projectDir = '', knownComponents = [], file: fileHint = null } = opts;
77
-
78
- // A component (runtime) or the compile-time prop check attaches a ready-made
79
- // issue. Trust it directly — it already carries plain-language wording, a
80
- // suggestion, and (from the compile-time check) a file:line. Walk the cause
81
- // chain since Vite/rollup may re-wrap the thrown error.
82
- let tagged = null;
83
- for (let e = rawErr, depth = 0; e && depth < 6; e = e.cause, depth += 1) {
84
- if (e.veluIssue) {
85
- tagged = e.veluIssue;
86
- break;
87
- }
88
- }
89
- if (tagged) return makeIssue({ ...tagged, file: tagged.file || fileHint });
90
-
91
- const err = unwrap(rawErr) || {};
92
- const message = err.message || String(rawErr || '');
93
-
94
- // 1) Unknown component (MDX render: `_missingMdxReference`). The message
95
- // tail carries the spot: "...referenced in your code at `7:1-7:54` in
96
- // `<abs path>`" — pull the line/column + file out so the author knows
97
- // exactly where to look (path relative-ized for safety).
98
- const missing = /Expected component `([^`]+)` to be defined/.exec(message);
99
- if (missing) {
100
- const name = missing[1];
101
- const at = /referenced in your code at `(\d+):(\d+)/.exec(message);
102
- const inFile = /\bin `([^`]+)`/.exec(message);
103
- const relFile = inFile ? rel(inFile[1], projectDir) : null;
104
- return makeIssue({
105
- category: 'unknown-component',
106
- file: relFile || fileHint,
107
- line: at ? Number(at[1]) : null,
108
- column: at ? Number(at[2]) : null,
109
- title: `<${name}> is not a built-in component`,
110
- detail: '',
111
- hint: 'Components are built in — check the spelling and capitalization (you don’t import them).',
112
- suggestion: suggestComponent(name, knownComponents),
113
- });
114
- }
115
-
116
- // 2) Compile error carrying a source location (Vite plugin / MDX / vfile).
117
- // The location may be on err.loc, on err.line/column, or only inside the
118
- // message text — try all three.
119
- const loc =
120
- err.loc ||
121
- (err.line != null ? { line: err.line, column: err.column, file: err.file } : null) ||
122
- parseLocFromMessage(err.reason || message);
123
- const rawFile = err.id || (loc && loc.file) || err.file || null;
124
- const file = rel(rawFile, projectDir) || fileHint;
125
- const fileIsProjectOwned = Boolean(file) && rel(rawFile, projectDir) != null;
126
- const frame = safeFrame(err.frame, fileIsProjectOwned || Boolean(fileHint));
127
- const detail = cleanMessage(stripLocSuffix(err.reason || message));
128
- const isSyntax = MDX_SYNTAX_RE.test(message);
129
- const isFrontmatter =
130
- err.source === 'remark-frontmatter' ||
131
- /\byaml\b|frontmatter/i.test(message) ||
132
- (loc && loc.line === 1 && /unexpected|expected/i.test(message) && /---/.test(message));
133
-
134
- if (loc || isSyntax || (frame && fileIsProjectOwned)) {
135
- return makeIssue({
136
- category: isFrontmatter ? 'frontmatter' : 'mdx-syntax',
137
- file,
138
- line: loc ? loc.line : null,
139
- column: loc ? loc.column : null,
140
- frame,
141
- title: detail || (isFrontmatter ? 'Invalid frontmatter' : 'MDX syntax error'),
142
- detail: '',
143
- hint: isFrontmatter
144
- ? 'Check the YAML between the --- markers — indentation, quotes, and colons.'
145
- : 'Make sure every <Component> has a matching closing tag and that { } braces are balanced.',
146
- });
147
- }
148
-
149
- // 3) Bad prop / option that threw at render time.
150
- if (/\.map is not a function|is not iterable|reading '|undefined \(reading/i.test(message)) {
151
- return makeIssue({
152
- category: 'invalid-props',
153
- file,
154
- title: 'A component received an invalid value',
155
- detail,
156
- hint: 'Check the props/options you passed to a component on this page.',
157
- });
158
- }
159
-
160
- // 4) Anything else that threw while rendering.
161
- return makeIssue({
162
- category: 'render-crash',
163
- file,
164
- title: 'This page failed to render',
165
- detail,
166
- hint: 'Set VELU_DEBUG=1 for the full stack trace.',
167
- });
168
- }
169
-
170
- export default extractMdxError;
1
+ // Normalize a thrown error — from a Vite/MDX transform, an SSR render, or a
2
+ // React error boundary — into the shared `issue` shape (see ./issues.js).
3
+ //
4
+ // Isomorphic: no Node `path` import (path handling is string-based) so the
5
+ // browser ErrorBoundary can reuse it. The single hard rule is PATH SAFETY:
6
+ // never surface an absolute path that isn't under the user's project — those
7
+ // are Velu/Vite internals and must be stripped.
8
+ import { makeIssue, suggestComponent } from './issues.js';
9
+
10
+ // Unwrap a few layers of `err.cause` when the outer message is generic.
11
+ function unwrap(err) {
12
+ let e = err;
13
+ let depth = 0;
14
+ while (e && e.cause && depth < 3) {
15
+ // Stop if the current layer already carries useful location info.
16
+ if (e.loc || e.line || /`[^`]+` to be defined/.test(e.message || '')) break;
17
+ e = e.cause;
18
+ depth += 1;
19
+ }
20
+ return e || err;
21
+ }
22
+
23
+ const toPosix = (p) => String(p).replace(/\\/g, '/');
24
+
25
+ // Make an absolute path project-relative; return null for anything that isn't
26
+ // inside the project (i.e. our internals — never shown).
27
+ function rel(rawPath, projectDir) {
28
+ if (!rawPath) return null;
29
+ let p = toPosix(rawPath).replace(/[?#].*$/, ''); // drop ?query / #hash
30
+ const root = projectDir ? toPosix(projectDir).replace(/\/+$/, '') : '';
31
+ if (root && p.toLowerCase().startsWith(root.toLowerCase())) {
32
+ return p.slice(root.length).replace(/^\/+/, '');
33
+ }
34
+ // Already-relative, project-owned path (no drive letter, no node_modules).
35
+ if (!/^([a-zA-Z]:\/|\/)/.test(p) && !/node_modules/.test(p)) return p;
36
+ return null; // absolute and outside the project → hide it
37
+ }
38
+
39
+ // Strip any absolute path (and node_modules refs) from a message so internals
40
+ // never leak; collapse them to "…".
41
+ function cleanMessage(msg) {
42
+ if (!msg) return '';
43
+ return String(msg)
44
+ .replace(/([a-zA-Z]:\\|\/)[^\s'"()]+/g, (m) => (/node_modules|[\\/]vite[\\/]|@veluai|velu-cli|velu-ui/.test(m) ? '…' : m))
45
+ .trim();
46
+ }
47
+
48
+ // Pull a "(line:col)" / "(line:col-line:col)" position out of a message tail.
49
+ // MDX/vfile errors often carry the location only in the message string, with
50
+ // err.line/err.loc left undefined.
51
+ function parseLocFromMessage(msg) {
52
+ const m = /\((\d+):(\d+)(?:-\d+:\d+)?\)\s*$/.exec(String(msg || ''));
53
+ return m ? { line: Number(m[1]), column: Number(m[2]) } : null;
54
+ }
55
+
56
+ // Drop a trailing "(line:col-…)" from a message once we've surfaced it as a
57
+ // separate location, so it isn't shown twice.
58
+ function stripLocSuffix(msg) {
59
+ return String(msg || '').replace(/\s*\(\d+:\d+(?:-\d+:\d+)?\)\s*$/, '').trim();
60
+ }
61
+
62
+ // Phrases that mark a genuine MDX *parse* error (vs a runtime throw).
63
+ const MDX_SYNTAX_RE =
64
+ /closing tag|unexpected closing|could not parse (?:expression|import|export)|unexpected character|unexpected end of|expected a closing|expected the closing|unexpected `|in expression|misnested|before name/i;
65
+
66
+ // Keep a code frame only when it clearly belongs to a project file; otherwise
67
+ // drop it (an internal frame would leak paths and confuse the author).
68
+ function safeFrame(frame, fileIsProjectOwned) {
69
+ if (!frame || !fileIsProjectOwned) return null;
70
+ const text = String(frame);
71
+ if (/node_modules|[\\/]vite[\\/]|@veluai[\\/]/.test(text)) return null;
72
+ return text;
73
+ }
74
+
75
+ export function extractMdxError(rawErr, opts = {}) {
76
+ const { projectDir = '', knownComponents = [], file: fileHint = null } = opts;
77
+
78
+ // A component (runtime) or the compile-time prop check attaches a ready-made
79
+ // issue. Trust it directly — it already carries plain-language wording, a
80
+ // suggestion, and (from the compile-time check) a file:line. Walk the cause
81
+ // chain since Vite/rollup may re-wrap the thrown error.
82
+ let tagged = null;
83
+ for (let e = rawErr, depth = 0; e && depth < 6; e = e.cause, depth += 1) {
84
+ if (e.veluIssue) {
85
+ tagged = e.veluIssue;
86
+ break;
87
+ }
88
+ }
89
+ if (tagged) return makeIssue({ ...tagged, file: tagged.file || fileHint });
90
+
91
+ const err = unwrap(rawErr) || {};
92
+ const message = err.message || String(rawErr || '');
93
+
94
+ // 1) Unknown component (MDX render: `_missingMdxReference`). The message
95
+ // tail carries the spot: "...referenced in your code at `7:1-7:54` in
96
+ // `<abs path>`" — pull the line/column + file out so the author knows
97
+ // exactly where to look (path relative-ized for safety).
98
+ const missing = /Expected component `([^`]+)` to be defined/.exec(message);
99
+ if (missing) {
100
+ const name = missing[1];
101
+ const at = /referenced in your code at `(\d+):(\d+)/.exec(message);
102
+ const inFile = /\bin `([^`]+)`/.exec(message);
103
+ const relFile = inFile ? rel(inFile[1], projectDir) : null;
104
+ return makeIssue({
105
+ category: 'unknown-component',
106
+ file: relFile || fileHint,
107
+ line: at ? Number(at[1]) : null,
108
+ column: at ? Number(at[2]) : null,
109
+ title: `<${name}> is not a built-in component`,
110
+ detail: '',
111
+ hint: 'Components are built in — check the spelling and capitalization (you don’t import them).',
112
+ suggestion: suggestComponent(name, knownComponents),
113
+ });
114
+ }
115
+
116
+ // 2) Compile error carrying a source location (Vite plugin / MDX / vfile).
117
+ // The location may be on err.loc, on err.line/column, or only inside the
118
+ // message text — try all three.
119
+ const loc =
120
+ err.loc ||
121
+ (err.line != null ? { line: err.line, column: err.column, file: err.file } : null) ||
122
+ parseLocFromMessage(err.reason || message);
123
+ const rawFile = err.id || (loc && loc.file) || err.file || null;
124
+ const file = rel(rawFile, projectDir) || fileHint;
125
+ const fileIsProjectOwned = Boolean(file) && rel(rawFile, projectDir) != null;
126
+ const frame = safeFrame(err.frame, fileIsProjectOwned || Boolean(fileHint));
127
+ const detail = cleanMessage(stripLocSuffix(err.reason || message));
128
+ const isSyntax = MDX_SYNTAX_RE.test(message);
129
+ const isFrontmatter =
130
+ err.source === 'remark-frontmatter' ||
131
+ /\byaml\b|frontmatter/i.test(message) ||
132
+ (loc && loc.line === 1 && /unexpected|expected/i.test(message) && /---/.test(message));
133
+
134
+ if (loc || isSyntax || (frame && fileIsProjectOwned)) {
135
+ return makeIssue({
136
+ category: isFrontmatter ? 'frontmatter' : 'mdx-syntax',
137
+ file,
138
+ line: loc ? loc.line : null,
139
+ column: loc ? loc.column : null,
140
+ frame,
141
+ title: detail || (isFrontmatter ? 'Invalid frontmatter' : 'MDX syntax error'),
142
+ detail: '',
143
+ hint: isFrontmatter
144
+ ? 'Check the YAML between the --- markers — indentation, quotes, and colons.'
145
+ : 'Make sure every <Component> has a matching closing tag and that { } braces are balanced.',
146
+ });
147
+ }
148
+
149
+ // 3) Bad prop / option that threw at render time.
150
+ if (/\.map is not a function|is not iterable|reading '|undefined \(reading/i.test(message)) {
151
+ return makeIssue({
152
+ category: 'invalid-props',
153
+ file,
154
+ title: 'A component received an invalid value',
155
+ detail,
156
+ hint: 'Check the props/options you passed to a component on this page.',
157
+ });
158
+ }
159
+
160
+ // 4) Anything else that threw while rendering.
161
+ return makeIssue({
162
+ category: 'render-crash',
163
+ file,
164
+ title: 'This page failed to render',
165
+ detail,
166
+ hint: 'Set VELU_DEBUG=1 for the full stack trace.',
167
+ });
168
+ }
169
+
170
+ export default extractMdxError;