@vercel/geistdocs 2.16.0 → 3.0.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.
- package/dist/cli/index.js +1 -1
- package/dist/config.d.ts +12 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/internal/lazy-mdx-components.d.ts +0 -2
- package/dist/internal/lazy-mdx-components.d.ts.map +1 -1
- package/dist/internal/lazy-mdx-components.js +0 -1
- package/dist/internal/mermaid-source.d.ts +5 -0
- package/dist/internal/mermaid-source.d.ts.map +1 -0
- package/dist/internal/mermaid-source.js +5 -0
- package/dist/internal/page-action-options.d.ts +9 -4
- package/dist/internal/page-action-options.d.ts.map +1 -1
- package/dist/internal/page-action-options.js +19 -12
- package/dist/internal/page-actions-client.d.ts.map +1 -1
- package/dist/internal/page-actions-client.js +19 -112
- package/dist/internal/page-actions-gate.d.ts +6 -0
- package/dist/internal/page-actions-gate.d.ts.map +1 -1
- package/dist/internal/page-actions-gate.js +11 -9
- package/dist/internal/page-actions-menu-client.d.ts +8 -0
- package/dist/internal/page-actions-menu-client.d.ts.map +1 -0
- package/dist/internal/page-actions-menu-client.js +105 -0
- package/dist/internal/page-markdown.d.ts +3 -0
- package/dist/internal/page-markdown.d.ts.map +1 -0
- package/dist/internal/page-markdown.js +45 -0
- package/dist/internal/sidebar.js +1 -1
- package/dist/internal/toc-actions-client.d.ts +3 -1
- package/dist/internal/toc-actions-client.d.ts.map +1 -1
- package/dist/internal/toc-actions-client.js +7 -9
- package/dist/mdx.js +3 -2
- package/dist/pages/docs.d.ts +6 -1
- package/dist/pages/docs.d.ts.map +1 -1
- package/dist/pages/docs.js +11 -6
- package/docs/agents.md +2 -3
- package/docs/llms.txt +31 -180
- package/docs/manifest.json +2 -11
- package/docs/pages/changelog.md +1 -1
- package/docs/pages/components/index.md +0 -1
- package/docs/pages/configuration.md +24 -3
- package/docs/pages/edit-on-github.md +1 -1
- package/docs/pages/index.md +0 -29
- package/docs/pages/md.md +1 -1
- package/docs/pages/migration.md +1 -1
- package/docs/pages/syntax.md +1 -107
- package/docs/sitemap.md +1 -2
- package/package.json +8 -2
- package/template/app/[lang]/docs/[[...slug]]/page.tsx +1 -0
- package/template/content/docs/changelog.mdx +1 -1
- package/template/content/docs/components/index.mdx +0 -1
- package/template/content/docs/components/meta.json +0 -1
- package/template/content/docs/configuration.mdx +24 -3
- package/template/content/docs/edit-on-github.mdx +1 -1
- package/template/content/docs/index.mdx +0 -28
- package/template/content/docs/md.mdx +1 -1
- package/template/content/docs/migration.mdx +1 -1
- package/template/content/docs/syntax.cn.mdx +1 -107
- package/template/content/docs/syntax.mdx +1 -107
- package/template/package.json +1 -2
- package/docs/pages/components/mermaid.md +0 -29
- package/template/content/docs/components/mermaid.mdx +0 -25
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/geistdocs",
|
|
3
3
|
"description": "Runtime and CLI for Geistdocs projects.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -330,7 +330,6 @@
|
|
|
330
330
|
"geist": "1.7.1",
|
|
331
331
|
"glob": "^11.0.0",
|
|
332
332
|
"mcp-handler": "2.2.0",
|
|
333
|
-
"mermaid": "^11.12.2",
|
|
334
333
|
"next-themes": "^0.4.6",
|
|
335
334
|
"phase": "^0.5.4",
|
|
336
335
|
"radix-ui": "1.6.4",
|
|
@@ -354,6 +353,7 @@
|
|
|
354
353
|
"zod": "^4.6.5"
|
|
355
354
|
},
|
|
356
355
|
"peerDependencies": {
|
|
356
|
+
"mermaid": "^11.12.2",
|
|
357
357
|
"next": "^16.3.3",
|
|
358
358
|
"react": "^19.2.3",
|
|
359
359
|
"react-dom": "^19.2.3",
|
|
@@ -366,12 +366,18 @@
|
|
|
366
366
|
"@types/node": "^24.10.1",
|
|
367
367
|
"@types/react-dom": "^19.2.3",
|
|
368
368
|
"mdast-util-mdx-jsx": "^3.2.0",
|
|
369
|
+
"mermaid": "^11.12.2",
|
|
369
370
|
"next": "16.3.3",
|
|
370
371
|
"react": "^19.2.3",
|
|
371
372
|
"react-dom": "^19.2.3",
|
|
372
373
|
"tsup": "^8.5.1",
|
|
373
374
|
"typescript": "^5.9.3"
|
|
374
375
|
},
|
|
376
|
+
"peerDependenciesMeta": {
|
|
377
|
+
"mermaid": {
|
|
378
|
+
"optional": true
|
|
379
|
+
}
|
|
380
|
+
},
|
|
375
381
|
"scripts": {
|
|
376
382
|
"build": "rm -rf dist docs template && node ./scripts/bundle-template.mjs && node ./scripts/bundle-docs.mjs && tsc -p tsconfig.runtime.json && tsup --config tsup.config.cli.ts",
|
|
377
383
|
"dev": "tsc -p tsconfig.runtime.json --watch --preserveWatchOutput"
|
|
@@ -80,7 +80,7 @@ export default changelogPage.Page;
|
|
|
80
80
|
|
|
81
81
|
The root adapter uses `Page`, `generateMetadata`, and `generateStaticParams`. The page includes its own `<main>` element, so render it without another main wrapper. Without `getLang`, the helper reads `params.lang`; apps using root parameters should pass their server-side language getter.
|
|
82
82
|
|
|
83
|
-
`config` and `source` are required. `path` defaults to `/changelog`, `title` to `Changelog`, and `description` to `The latest releases, improvements, and fixes.` Set `pageSize` in the shared options; it defaults to `10` and accepts integers from `1` to `100`. Set `markdownPath` only when both Markdown adapters are installed. It enables the shared **Copy page** control
|
|
83
|
+
`config` and `source` are required. `path` defaults to `/changelog`, `title` to `Changelog`, and `description` to `The latest releases, improvements, and fixes.` Set `pageSize` in the shared options; it defaults to `10` and accepts integers from `1` to `100`. Set `markdownPath` only when both Markdown adapters are installed. It enables the shared **Copy page** control (plus **View Markdown** in the mobile row) and alternate metadata; it does not create an endpoint. These actions use the current numbered page's Markdown endpoint and honor `config.pageActions`, matching the docs controls.
|
|
84
84
|
|
|
85
85
|
Keep `path`, `markdownPath`, and `dataPath` app-local, without a locale or deployment `basePath`. Geistdocs adds those prefixes when generating public links and canonical URLs; it does not strip prefixes you supply. Set `config.siteUrl` for absolute canonical URLs.
|
|
86
86
|
|
|
@@ -31,7 +31,6 @@ Internal projects using `@vercel/geistdocs-private` use the same component subpa
|
|
|
31
31
|
| [Image](/docs/components/image) | `components/image` | Next.js images with optional light and dark sources |
|
|
32
32
|
| [Input](/docs/components/input) | `components/input` | Text input fields with provider-backed styling |
|
|
33
33
|
| [Native Link](/docs/components/link) | `components/link` | Styled anchors using browser-native navigation |
|
|
34
|
-
| [Mermaid](/docs/components/mermaid) | `components/mermaid` | Mermaid diagram rendering |
|
|
35
34
|
| [Navigation Menu](/docs/components/navigation-menu) | `components/navigation-menu` | Accessible navigation flyouts |
|
|
36
35
|
| [Popover](/docs/components/popover) | `components/popover` | Anchored floating content |
|
|
37
36
|
| [Scroll Area](/docs/components/scroll-area) | `components/scroll-area` | Styled overflow regions and scrollbars |
|
|
@@ -340,17 +340,17 @@ For example, a root-mounted source with `baseUrl: "/"` still uses `page.url ===
|
|
|
340
340
|
|
|
341
341
|
## Page actions
|
|
342
342
|
|
|
343
|
-
|
|
343
|
+
An icon-only **Copy page** button sits beside the page title. **Give feedback** and **Edit this page on GitHub** sit below the table of contents so they stay available while you read. On mobile, an inline row below the title offers Copy, View Markdown, and Ask AI. These actions are enabled by default and can be disabled through `defineConfig` in `lib/geistdocs/config.tsx`:
|
|
344
344
|
|
|
345
345
|
```tsx title="lib/geistdocs/config.tsx"
|
|
346
346
|
export const config = defineConfig({
|
|
347
347
|
// ...
|
|
348
348
|
pageActions: {
|
|
349
349
|
editSource: false,
|
|
350
|
-
scrollTop: true,
|
|
351
350
|
copyPage: true,
|
|
352
351
|
askAI: true,
|
|
353
|
-
|
|
352
|
+
menu: false,
|
|
353
|
+
openInChat: true,
|
|
354
354
|
},
|
|
355
355
|
feedback: {
|
|
356
356
|
enabled: false,
|
|
@@ -358,6 +358,8 @@ export const config = defineConfig({
|
|
|
358
358
|
});
|
|
359
359
|
```
|
|
360
360
|
|
|
361
|
+
Set `menu: true` to add an actions dropdown beside **Copy page** on desktop, with View as Markdown, Open in v0 and other chats, and Ask AI. The menu is off by default, so sites that don't opt in never download its code. `openInChat` only applies to the menu. Edit on GitHub stays below the table of contents either way.
|
|
362
|
+
|
|
361
363
|
`github.editPath` controls the file path used by the "Edit this page on GitHub" action. Use `{path}` where the page path should be inserted. For monorepos, include the app directory, such as `apps/docs/content/docs/{path}`.
|
|
362
364
|
|
|
363
365
|
## Page visibility
|
|
@@ -504,6 +506,25 @@ const docsPage = createDocsPage({
|
|
|
504
506
|
});
|
|
505
507
|
```
|
|
506
508
|
|
|
509
|
+
### Markdown in custom page headers
|
|
510
|
+
|
|
511
|
+
By default, `renderTop` receives the full page Markdown. If the hook only reads page data, opt out of that conversion:
|
|
512
|
+
|
|
513
|
+
```tsx title="app/[lang]/docs/[[...slug]]/page.tsx"
|
|
514
|
+
const docsPage = createDocsPage({
|
|
515
|
+
config,
|
|
516
|
+
source: geistdocsSource,
|
|
517
|
+
renderTopMarkdown: false,
|
|
518
|
+
renderTop: ({ data }) => <MobileDocsBar toc={data.toc} />,
|
|
519
|
+
});
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
`renderTopMarkdown` defaults to `true` for backward compatibility. Setting it to `false` passes `markdown: ""` to `renderTop`, unless `pageActions.getExtraActions` also needs Markdown; in that case both hooks receive the full Markdown. Leave the default when your header reads `markdown`.
|
|
523
|
+
|
|
524
|
+
Both package variants support this option. Newly generated sites opt out for their TOC-only header. Existing consumers can add `renderTopMarkdown: false` to their local `createDocsPage` call after confirming that `renderTop` does not use Markdown. Updating the package does not overwrite local adapters. This option does not change per-page Markdown routes, `llms.txt`, search exports, or metadata.
|
|
525
|
+
|
|
526
|
+
### Page URLs and metadata
|
|
527
|
+
|
|
507
528
|
Use `getPageUrl` when the app-local route differs from the source URL, such as `/v5/docs`. Geistdocs keeps that value app-local for previous and next navigation, then derives the public action URL with `config.basePath`.
|
|
508
529
|
|
|
509
530
|
For unusual deployments, `getPublicPageUrl` can override the public HTML URL and `getMarkdownUrl` can override the Copy Page, View as Markdown, and metadata URL. Most sites should use the package defaults so these surfaces cannot drift apart.
|
|
@@ -7,7 +7,7 @@ related:
|
|
|
7
7
|
- /docs/configuration
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
The "Edit on GitHub" feature gives readers a direct link to propose documentation changes. This link appears
|
|
10
|
+
The "Edit on GitHub" feature gives readers a direct link to propose documentation changes. This link appears below the table of contents, next to **Give feedback**, on every documentation page that has a table of contents.
|
|
11
11
|
|
|
12
12
|
<CopyPrompt text="Help me configure Edit on GitHub for this Geistdocs site. Check the github owner and repo in geistdocs.tsx, verify the generated edit URL for this page, and tell me how to disable the action if needed.">
|
|
13
13
|
Help me configure Edit on GitHub for this Geistdocs site. Check the `github` owner and repo in `geistdocs.tsx`, verify the generated edit URL for this page, and tell me how to disable the action if needed.
|
|
@@ -23,34 +23,6 @@ Geistdocs has three main parts:
|
|
|
23
23
|
- Local adapter files: The files in your generated project that connect your configuration, content source, routes, and UI customization to the package.
|
|
24
24
|
- Platform services: Hosted endpoints at `geistdocs.com` for optional translation, feedback, and markdown tracking features.
|
|
25
25
|
|
|
26
|
-
```mermaid
|
|
27
|
-
flowchart TB
|
|
28
|
-
subgraph Package["@vercel/geistdocs package"]
|
|
29
|
-
cli["CLI: init, update, translate, search sync"]
|
|
30
|
-
runtime["Runtime: layout, routes, MDX, controls"]
|
|
31
|
-
bundledTemplate["Bundled template snapshot"]
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
subgraph Site["Generated docs site"]
|
|
35
|
-
config["geistdocs.tsx"]
|
|
36
|
-
adapters["app/, components/geistdocs/, lib/geistdocs/"]
|
|
37
|
-
content["content/docs/*.mdx"]
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
subgraph Platform["Geistdocs platform"]
|
|
41
|
-
translate["/translate"]
|
|
42
|
-
feedback["/feedback"]
|
|
43
|
-
tracking["/md-tracking"]
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
cli --> bundledTemplate
|
|
47
|
-
bundledTemplate --> Site
|
|
48
|
-
adapters --> runtime
|
|
49
|
-
content --> adapters
|
|
50
|
-
cli --> translate
|
|
51
|
-
runtime --> feedback
|
|
52
|
-
runtime --> tracking
|
|
53
|
-
```
|
|
54
26
|
|
|
55
27
|
## What you edit
|
|
56
28
|
|
|
@@ -37,7 +37,7 @@ The `.mdx` version returns:
|
|
|
37
37
|
|
|
38
38
|
For a docs section mounted at `/docs`, the section root remains `/docs.md`. For a source mounted at the app root with `baseUrl: "/"`, Geistdocs uses `/index.md` for the root page. If Next.js has `basePath: "/docs"`, that public root Markdown URL is `/docs/index.md`.
|
|
39
39
|
|
|
40
|
-
Copy Page, View
|
|
40
|
+
Copy Page, View Markdown, and the `text/markdown` metadata alternate all use the same package resolver. View Markdown, in the mobile page actions row, opens the resolved `.md` URL in a new tab from a button, which keeps the URL shareable without adding an anchor to the page. Use `createDocsPage({ getMarkdownUrl })` only when the deployment needs a different public contract.
|
|
41
41
|
|
|
42
42
|
## Use cases
|
|
43
43
|
|
|
@@ -118,7 +118,7 @@ Replace imports according to this table:
|
|
|
118
118
|
| `assets/icons`, `assets/icons/*`, `assets/logos`, or `assets/logos/*` | Keep the import package-backed. Both Geistdocs package variants expose the index and deep asset subpaths. |
|
|
119
119
|
| `components/button-group`, `components/card`, or `components/input-group` | Use an appropriate Geistcn component or keep an application-owned composition. There is no direct Geistcn replacement with the same API. |
|
|
120
120
|
|
|
121
|
-
Keep documentation-specific composites such as `Callout`, `CodeBlock`, `CodeBlockTabs`, `CommandPrompt`,
|
|
121
|
+
Keep documentation-specific composites such as `Callout`, `CodeBlock`, `CodeBlockTabs`, `CommandPrompt`, and `CopyPrompt` imported from `@vercel/geistdocs/components/*`.
|
|
122
122
|
|
|
123
123
|
## Configure Next.js
|
|
124
124
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: MDX 组件
|
|
3
3
|
description: 使用支持的组件、Markdown 语法和格式选项编写 MDX 内容
|
|
4
4
|
type: reference
|
|
5
|
-
summary: MDX
|
|
5
|
+
summary: MDX 组件和编写参考,包括文本格式、代码块和行高亮。
|
|
6
6
|
prerequisites:
|
|
7
7
|
- /docs/getting-started
|
|
8
8
|
related:
|
|
@@ -361,109 +361,3 @@ const numbers = [1, 2, 3, 4, 5];
|
|
|
361
361
|
const sum = numbers.reduce((a, b) => a + b, 0); // [!code focus]
|
|
362
362
|
console.log(sum);
|
|
363
363
|
```
|
|
364
|
-
|
|
365
|
-
## Mermaid 图表
|
|
366
|
-
|
|
367
|
-
使用 Mermaid 语法创建图表和流程图。
|
|
368
|
-
|
|
369
|
-
### 流程图
|
|
370
|
-
|
|
371
|
-
````md
|
|
372
|
-
```mermaid
|
|
373
|
-
graph TD;
|
|
374
|
-
A[Start] --> B{Is it working?};
|
|
375
|
-
B -->|Yes| C[Great!];
|
|
376
|
-
B -->|No| D[Debug];
|
|
377
|
-
D --> B;
|
|
378
|
-
```
|
|
379
|
-
````
|
|
380
|
-
|
|
381
|
-
渲染为:
|
|
382
|
-
|
|
383
|
-
```mermaid
|
|
384
|
-
graph TD;
|
|
385
|
-
A[Start] --> B{Is it working?};
|
|
386
|
-
B -->|Yes| C[Great!];
|
|
387
|
-
B -->|No| D[Debug];
|
|
388
|
-
D --> B;
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
### 时序图
|
|
392
|
-
|
|
393
|
-
````md
|
|
394
|
-
```mermaid
|
|
395
|
-
sequenceDiagram
|
|
396
|
-
participant User
|
|
397
|
-
participant API
|
|
398
|
-
participant Database
|
|
399
|
-
User->>API: Request data
|
|
400
|
-
API->>Database: Query
|
|
401
|
-
Database-->>API: Results
|
|
402
|
-
API-->>User: Response
|
|
403
|
-
```
|
|
404
|
-
````
|
|
405
|
-
|
|
406
|
-
渲染为:
|
|
407
|
-
|
|
408
|
-
```mermaid
|
|
409
|
-
sequenceDiagram
|
|
410
|
-
participant User
|
|
411
|
-
participant API
|
|
412
|
-
participant Database
|
|
413
|
-
User->>API: Request data
|
|
414
|
-
API->>Database: Query
|
|
415
|
-
Database-->>API: Results
|
|
416
|
-
API-->>User: Response
|
|
417
|
-
```
|
|
418
|
-
|
|
419
|
-
### 架构图
|
|
420
|
-
|
|
421
|
-
````md
|
|
422
|
-
```mermaid
|
|
423
|
-
graph TD;
|
|
424
|
-
subgraph Frontend
|
|
425
|
-
A[Web App]
|
|
426
|
-
B[Mobile App]
|
|
427
|
-
end
|
|
428
|
-
subgraph Backend
|
|
429
|
-
C[API Gateway]
|
|
430
|
-
D[Auth Service]
|
|
431
|
-
E[Data Service]
|
|
432
|
-
end
|
|
433
|
-
subgraph Storage
|
|
434
|
-
F[(Database)]
|
|
435
|
-
G[(Cache)]
|
|
436
|
-
end
|
|
437
|
-
A --> C
|
|
438
|
-
B --> C
|
|
439
|
-
C --> D
|
|
440
|
-
C --> E
|
|
441
|
-
E --> F
|
|
442
|
-
E --> G
|
|
443
|
-
```
|
|
444
|
-
````
|
|
445
|
-
|
|
446
|
-
渲染为:
|
|
447
|
-
|
|
448
|
-
```mermaid
|
|
449
|
-
graph TD;
|
|
450
|
-
subgraph Frontend
|
|
451
|
-
A[Web App]
|
|
452
|
-
B[Mobile App]
|
|
453
|
-
end
|
|
454
|
-
subgraph Backend
|
|
455
|
-
C[API Gateway]
|
|
456
|
-
D[Auth Service]
|
|
457
|
-
E[Data Service]
|
|
458
|
-
end
|
|
459
|
-
subgraph Storage
|
|
460
|
-
F[(Database)]
|
|
461
|
-
G[(Cache)]
|
|
462
|
-
end
|
|
463
|
-
A --> C
|
|
464
|
-
B --> C
|
|
465
|
-
C --> D
|
|
466
|
-
C --> E
|
|
467
|
-
E --> F
|
|
468
|
-
E --> G
|
|
469
|
-
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: MDX Components
|
|
3
3
|
description: Author MDX content with supported components, Markdown syntax, and formatting options
|
|
4
4
|
type: reference
|
|
5
|
-
summary: MDX component and authoring reference covering tabs, text formatting, code blocks, line highlighting
|
|
5
|
+
summary: MDX component and authoring reference covering tabs, text formatting, code blocks, and line highlighting.
|
|
6
6
|
prerequisites:
|
|
7
7
|
- /docs/getting-started
|
|
8
8
|
related:
|
|
@@ -716,109 +716,3 @@ const numbers = [1, 2, 3, 4, 5];
|
|
|
716
716
|
const sum = numbers.reduce((a, b) => a + b, 0); // [!code focus]
|
|
717
717
|
console.log(sum);
|
|
718
718
|
```
|
|
719
|
-
|
|
720
|
-
## Mermaid Diagrams
|
|
721
|
-
|
|
722
|
-
Create diagrams and flowcharts using Mermaid syntax.
|
|
723
|
-
|
|
724
|
-
### Flowcharts
|
|
725
|
-
|
|
726
|
-
````md
|
|
727
|
-
```mermaid
|
|
728
|
-
graph TD;
|
|
729
|
-
A[Start] --> B{Is it working?};
|
|
730
|
-
B -->|Yes| C[Great!];
|
|
731
|
-
B -->|No| D[Debug];
|
|
732
|
-
D --> B;
|
|
733
|
-
```
|
|
734
|
-
````
|
|
735
|
-
|
|
736
|
-
This renders as:
|
|
737
|
-
|
|
738
|
-
```mermaid
|
|
739
|
-
graph TD;
|
|
740
|
-
A[Start] --> B{Is it working?};
|
|
741
|
-
B -->|Yes| C[Great!];
|
|
742
|
-
B -->|No| D[Debug];
|
|
743
|
-
D --> B;
|
|
744
|
-
```
|
|
745
|
-
|
|
746
|
-
### Sequence Diagrams
|
|
747
|
-
|
|
748
|
-
````md
|
|
749
|
-
```mermaid
|
|
750
|
-
sequenceDiagram
|
|
751
|
-
participant User
|
|
752
|
-
participant API
|
|
753
|
-
participant Database
|
|
754
|
-
User->>API: Request data
|
|
755
|
-
API->>Database: Query
|
|
756
|
-
Database-->>API: Results
|
|
757
|
-
API-->>User: Response
|
|
758
|
-
```
|
|
759
|
-
````
|
|
760
|
-
|
|
761
|
-
This renders as:
|
|
762
|
-
|
|
763
|
-
```mermaid
|
|
764
|
-
sequenceDiagram
|
|
765
|
-
participant User
|
|
766
|
-
participant API
|
|
767
|
-
participant Database
|
|
768
|
-
User->>API: Request data
|
|
769
|
-
API->>Database: Query
|
|
770
|
-
Database-->>API: Results
|
|
771
|
-
API-->>User: Response
|
|
772
|
-
```
|
|
773
|
-
|
|
774
|
-
### Architecture Diagrams
|
|
775
|
-
|
|
776
|
-
````md
|
|
777
|
-
```mermaid
|
|
778
|
-
graph TD;
|
|
779
|
-
subgraph Frontend
|
|
780
|
-
A[Web App]
|
|
781
|
-
B[Mobile App]
|
|
782
|
-
end
|
|
783
|
-
subgraph Backend
|
|
784
|
-
C[API Gateway]
|
|
785
|
-
D[Auth Service]
|
|
786
|
-
E[Data Service]
|
|
787
|
-
end
|
|
788
|
-
subgraph Storage
|
|
789
|
-
F[(Database)]
|
|
790
|
-
G[(Cache)]
|
|
791
|
-
end
|
|
792
|
-
A --> C
|
|
793
|
-
B --> C
|
|
794
|
-
C --> D
|
|
795
|
-
C --> E
|
|
796
|
-
E --> F
|
|
797
|
-
E --> G
|
|
798
|
-
```
|
|
799
|
-
````
|
|
800
|
-
|
|
801
|
-
This renders as:
|
|
802
|
-
|
|
803
|
-
```mermaid
|
|
804
|
-
graph TD;
|
|
805
|
-
subgraph Frontend
|
|
806
|
-
A[Web App]
|
|
807
|
-
B[Mobile App]
|
|
808
|
-
end
|
|
809
|
-
subgraph Backend
|
|
810
|
-
C[API Gateway]
|
|
811
|
-
D[Auth Service]
|
|
812
|
-
E[Data Service]
|
|
813
|
-
end
|
|
814
|
-
subgraph Storage
|
|
815
|
-
F[(Database)]
|
|
816
|
-
G[(Cache)]
|
|
817
|
-
end
|
|
818
|
-
A --> C
|
|
819
|
-
B --> C
|
|
820
|
-
C --> D
|
|
821
|
-
C --> E
|
|
822
|
-
E --> F
|
|
823
|
-
E --> G
|
|
824
|
-
```
|
package/template/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@streamdown/code": "^1.0.1",
|
|
18
18
|
"@vercel/agent-readability": "^0.7.0",
|
|
19
19
|
"@vercel/analytics": "^1.6.1",
|
|
20
|
-
"@vercel/geistdocs": "
|
|
20
|
+
"@vercel/geistdocs": "3.0.1",
|
|
21
21
|
"@vercel/speed-insights": "^1.3.1",
|
|
22
22
|
"ai": "^6.0.132",
|
|
23
23
|
"clsx": "^2.1.1",
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"fumadocs-ui": "16.2.2",
|
|
30
30
|
"geist": "1.7.1",
|
|
31
31
|
"jotai": "^2.15.2",
|
|
32
|
-
"mermaid": "^11.12.2",
|
|
33
32
|
"nanoid": "^5.1.6",
|
|
34
33
|
"next": "16.3.3",
|
|
35
34
|
"next-themes": "^0.4.6",
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Mermaid
|
|
3
|
-
description: Render Mermaid diagrams from chart source
|
|
4
|
-
type: reference
|
|
5
|
-
summary: Use Mermaid directly when diagram source is assembled outside an MDX Mermaid fence.
|
|
6
|
-
url: /docs/components/mermaid
|
|
7
|
-
source: apps/template/content/docs/components/mermaid.mdx
|
|
8
|
-
related:
|
|
9
|
-
- /docs/components
|
|
10
|
-
- /docs/syntax
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# Mermaid
|
|
14
|
-
|
|
15
|
-
import { Mermaid } from "@vercel/geistdocs/components/mermaid";
|
|
16
|
-
|
|
17
|
-
<div className="not-prose my-6 rounded-lg border border-gray-400 bg-background-100 p-6">
|
|
18
|
-
<Mermaid chart={'graph LR; A["Start"] --> B["Finish"]'} />
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
```tsx
|
|
22
|
-
import { Mermaid } from "@vercel/geistdocs/components/mermaid";
|
|
23
|
-
|
|
24
|
-
export function Flow() {
|
|
25
|
-
return <Mermaid chart={'graph LR; A["Start"] --> B["Finish"]'} />;
|
|
26
|
-
}
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Mermaid code fences render this component automatically in authored MDX.
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Mermaid
|
|
3
|
-
description: Render Mermaid diagrams from chart source
|
|
4
|
-
type: reference
|
|
5
|
-
summary: Use Mermaid directly when diagram source is assembled outside an MDX Mermaid fence.
|
|
6
|
-
related:
|
|
7
|
-
- /docs/components
|
|
8
|
-
- /docs/syntax
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
import { Mermaid } from "@vercel/geistdocs/components/mermaid";
|
|
12
|
-
|
|
13
|
-
<div className="not-prose my-6 rounded-lg border border-gray-400 bg-background-100 p-6">
|
|
14
|
-
<Mermaid chart={'graph LR; A["Start"] --> B["Finish"]'} />
|
|
15
|
-
</div>
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
import { Mermaid } from "@vercel/geistdocs/components/mermaid";
|
|
19
|
-
|
|
20
|
-
export function Flow() {
|
|
21
|
-
return <Mermaid chart={'graph LR; A["Start"] --> B["Finish"]'} />;
|
|
22
|
-
}
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Mermaid code fences render this component automatically in authored MDX.
|