doccupine 0.0.139 → 0.0.141
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/README.md +14 -7
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +191 -0
- package/dist/index.d.ts +3 -7
- package/dist/index.js +5 -1895
- package/dist/lib/config-manager.d.ts +1 -0
- package/dist/lib/config-manager.js +63 -3
- package/dist/lib/generated-artifacts.d.ts +26 -0
- package/dist/lib/generated-artifacts.js +147 -0
- package/dist/lib/layout.js +30 -30
- package/dist/lib/metadata.js +58 -30
- package/dist/lib/openapi-types.d.ts +2 -2
- package/dist/lib/openapi.d.ts +6 -3
- package/dist/lib/openapi.js +330 -50
- package/dist/lib/output-safety.d.ts +15 -0
- package/dist/lib/output-safety.js +428 -0
- package/dist/lib/structures.js +11 -0
- package/dist/lib/utils.d.ts +18 -0
- package/dist/lib/utils.js +125 -0
- package/dist/mdx-to-nextjs-generator.d.ts +166 -0
- package/dist/mdx-to-nextjs-generator.js +2229 -0
- package/dist/templates/app/api/gate/route.d.ts +1 -1
- package/dist/templates/app/api/gate/route.js +18 -6
- package/dist/templates/app/api/mcp/route.d.ts +1 -1
- package/dist/templates/app/api/mcp/route.js +181 -111
- package/dist/templates/app/api/playground/route.d.ts +1 -1
- package/dist/templates/app/api/playground/route.js +45 -13
- package/dist/templates/app/api/rag/route.d.ts +1 -1
- package/dist/templates/app/api/rag/route.js +102 -25
- package/dist/templates/app/api/search/route.d.ts +1 -1
- package/dist/templates/app/api/search/route.js +5 -0
- package/dist/templates/app/robots.d.ts +1 -1
- package/dist/templates/app/robots.js +1 -26
- package/dist/templates/app/theme.d.ts +1 -1
- package/dist/templates/app/theme.js +31 -19
- package/dist/templates/components/Chat.d.ts +1 -1
- package/dist/templates/components/Chat.js +411 -104
- package/dist/templates/components/Docs.d.ts +1 -1
- package/dist/templates/components/Docs.js +56 -13
- package/dist/templates/components/SearchDocs.d.ts +1 -1
- package/dist/templates/components/SearchDocs.js +63 -11
- package/dist/templates/components/SearchModalContent.d.ts +1 -1
- package/dist/templates/components/SearchModalContent.js +191 -49
- package/dist/templates/components/SideBar.d.ts +1 -1
- package/dist/templates/components/SideBar.js +8 -2
- package/dist/templates/components/layout/Accordion.d.ts +1 -1
- package/dist/templates/components/layout/Accordion.js +26 -3
- package/dist/templates/components/layout/ApiPlayground.d.ts +1 -1
- package/dist/templates/components/layout/ApiPlayground.js +4 -7
- package/dist/templates/components/layout/Badge.d.ts +1 -1
- package/dist/templates/components/layout/Badge.js +1 -1
- package/dist/templates/components/layout/Button.d.ts +1 -1
- package/dist/templates/components/layout/Button.js +4 -4
- package/dist/templates/components/layout/Callout.d.ts +1 -1
- package/dist/templates/components/layout/Callout.js +6 -6
- package/dist/templates/components/layout/Card.d.ts +1 -1
- package/dist/templates/components/layout/Card.js +9 -4
- package/dist/templates/components/layout/CherryThemeProvider.d.ts +1 -1
- package/dist/templates/components/layout/CherryThemeProvider.js +63 -12
- package/dist/templates/components/layout/Code.d.ts +1 -1
- package/dist/templates/components/layout/Code.js +5 -5
- package/dist/templates/components/layout/CopyButton.d.ts +1 -1
- package/dist/templates/components/layout/CopyButton.js +1 -1
- package/dist/templates/components/layout/DemoTheme.d.ts +1 -1
- package/dist/templates/components/layout/DemoTheme.js +8 -28
- package/dist/templates/components/layout/DocsComponents.d.ts +1 -1
- package/dist/templates/components/layout/DocsComponents.js +57 -18
- package/dist/templates/components/layout/GlobalStyles.d.ts +1 -1
- package/dist/templates/components/layout/GlobalStyles.js +15 -9
- package/dist/templates/components/layout/Prompt.d.ts +1 -1
- package/dist/templates/components/layout/Prompt.js +4 -7
- package/dist/templates/components/layout/Steps.d.ts +1 -1
- package/dist/templates/components/layout/Steps.js +7 -1
- package/dist/templates/components/layout/Tabs.d.ts +1 -1
- package/dist/templates/components/layout/Tabs.js +108 -19
- package/dist/templates/env.example.d.ts +1 -1
- package/dist/templates/env.example.js +11 -0
- package/dist/templates/eslint.config.d.ts +1 -1
- package/dist/templates/eslint.config.js +20 -0
- package/dist/templates/gitignore.d.ts +1 -1
- package/dist/templates/gitignore.js +4 -3
- package/dist/templates/lib/access.d.ts +1 -0
- package/dist/templates/lib/access.js +41 -0
- package/dist/templates/mdx/ai-assistant.mdx.d.ts +1 -1
- package/dist/templates/mdx/ai-assistant.mdx.js +17 -1
- package/dist/templates/mdx/api-playground.mdx.d.ts +1 -1
- package/dist/templates/mdx/api-playground.mdx.js +5 -3
- package/dist/templates/mdx/authentication.mdx.d.ts +1 -1
- package/dist/templates/mdx/authentication.mdx.js +5 -3
- package/dist/templates/mdx/commands.mdx.d.ts +1 -1
- package/dist/templates/mdx/commands.mdx.js +20 -6
- package/dist/templates/mdx/components.mdx.d.ts +1 -1
- package/dist/templates/mdx/components.mdx.js +3 -0
- package/dist/templates/mdx/deployment-and-hosting.mdx.d.ts +1 -1
- package/dist/templates/mdx/deployment-and-hosting.mdx.js +2 -2
- package/dist/templates/mdx/globals.mdx.d.ts +1 -1
- package/dist/templates/mdx/globals.mdx.js +14 -11
- package/dist/templates/mdx/model-context-protocol.mdx.d.ts +1 -1
- package/dist/templates/mdx/model-context-protocol.mdx.js +22 -35
- package/dist/templates/mdx/platform/ai-assistant.mdx.d.ts +1 -1
- package/dist/templates/mdx/platform/ai-assistant.mdx.js +23 -0
- package/dist/templates/mdx/platform/api-playground.mdx.d.ts +1 -1
- package/dist/templates/mdx/platform/api-playground.mdx.js +7 -0
- package/dist/templates/mdx/platform/authentication.mdx.d.ts +1 -0
- package/dist/templates/mdx/platform/authentication.mdx.js +63 -0
- package/dist/templates/mdx/platform/build-and-deploy.mdx.d.ts +1 -1
- package/dist/templates/mdx/platform/build-and-deploy.mdx.js +1 -1
- package/dist/templates/mdx/platform/import-from-github.mdx.d.ts +1 -1
- package/dist/templates/mdx/platform/import-from-github.mdx.js +2 -2
- package/dist/templates/mdx/platform/index.mdx.d.ts +1 -1
- package/dist/templates/mdx/platform/index.mdx.js +1 -0
- package/dist/templates/mdx/platform/mcp.mdx.d.ts +1 -1
- package/dist/templates/mdx/platform/mcp.mdx.js +2 -1
- package/dist/templates/mdx/platform/navigation-settings.mdx.d.ts +1 -1
- package/dist/templates/mdx/platform/navigation-settings.mdx.js +12 -1
- package/dist/templates/mdx/platform/publishing.mdx.d.ts +1 -1
- package/dist/templates/mdx/platform/publishing.mdx.js +43 -10
- package/dist/templates/mdx/platform/self-updating-docs.mdx.d.ts +1 -1
- package/dist/templates/mdx/platform/self-updating-docs.mdx.js +48 -9
- package/dist/templates/mdx/sections.mdx.d.ts +1 -1
- package/dist/templates/mdx/sections.mdx.js +4 -0
- package/dist/templates/mdx/space.mdx.d.ts +1 -0
- package/dist/templates/mdx/space.mdx.js +125 -0
- package/dist/templates/mdx/tabs.mdx.d.ts +1 -1
- package/dist/templates/mdx/tabs.mdx.js +4 -0
- package/dist/templates/next.config.js +20 -8
- package/dist/templates/package.js +3 -3
- package/dist/templates/prettierignore.d.ts +1 -1
- package/dist/templates/prettierignore.js +1 -0
- package/dist/templates/proxy.js +47 -19
- package/dist/templates/scripts/build-docs-index.d.ts +1 -1
- package/dist/templates/scripts/build-docs-index.js +1 -0
- package/dist/templates/services/mcp/docsContentStub.d.ts +1 -0
- package/dist/templates/services/mcp/docsContentStub.js +1 -0
- package/dist/templates/services/mcp/server.d.ts +1 -1
- package/dist/templates/services/mcp/server.js +140 -83
- package/dist/templates/services/mcp/tools.d.ts +1 -1
- package/dist/templates/services/mcp/tools.js +65 -137
- package/dist/templates/utils/playgroundAllowlist.d.ts +1 -1
- package/dist/templates/utils/playgroundAllowlist.js +13 -4
- package/dist/templates/utils/rateLimit.d.ts +1 -1
- package/dist/templates/utils/rateLimit.js +40 -3
- package/dist/templates/utils/requestBody.d.ts +1 -0
- package/dist/templates/utils/requestBody.js +56 -0
- package/dist/templates/utils/ssrfGuard.d.ts +1 -1
- package/dist/templates/utils/ssrfGuard.js +138 -33
- package/package.json +14 -9
- package/dist/lib/mdxToMarkdown.d.ts +0 -1
- package/dist/lib/mdxToMarkdown.js +0 -134
- package/dist/templates/mdx/image-and-embeds.mdx.d.ts +0 -1
- package/dist/templates/mdx/image-and-embeds.mdx.js +0 -118
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
export const imageAndEmbedsMdxTemplate = `---
|
|
2
|
-
title: "Images and embeds"
|
|
3
|
-
description: "Enrich your documentation with visuals, videos, and interactive embeds."
|
|
4
|
-
date: "2026-02-19"
|
|
5
|
-
category: "Components"
|
|
6
|
-
categoryOrder: 1
|
|
7
|
-
order: 14
|
|
8
|
-
---
|
|
9
|
-
# Images and embeds
|
|
10
|
-
|
|
11
|
-
Enrich your documentation with visuals, videos, and interactive embeds.
|
|
12
|
-
|
|
13
|
-
Display images, embed video content, or add interactive frames via iframes to supplement your docs.
|
|
14
|
-
|
|
15
|
-

|
|
16
|
-
|
|
17
|
-
## Images
|
|
18
|
-
|
|
19
|
-
Images enhance documentation with context, illustration, or decorative visual cues.
|
|
20
|
-
|
|
21
|
-
### Basic Image Syntax
|
|
22
|
-
|
|
23
|
-
Include an image in Markdown using the syntax below:
|
|
24
|
-
|
|
25
|
-
\`\`\`md
|
|
26
|
-

|
|
27
|
-
\`\`\`
|
|
28
|
-
|
|
29
|
-
<Callout type="note">
|
|
30
|
-
Use clear, descriptive alt text for accessibility and better SEO. Alt text should describe the image’s appearance or content.
|
|
31
|
-
</Callout>
|
|
32
|
-
|
|
33
|
-
### HTML image embeds
|
|
34
|
-
|
|
35
|
-
Embed images in your Markdown content using HTML syntax.
|
|
36
|
-
|
|
37
|
-
\`\`\`md
|
|
38
|
-
<img src="https://docs.doccupine.com/demo.png" alt="Alt text">
|
|
39
|
-
\`\`\`
|
|
40
|
-
|
|
41
|
-
### Theme-aware images
|
|
42
|
-
|
|
43
|
-
Show different images depending on whether the user is in light or dark mode. Add the \`light-only\` or \`dark-only\` className to display an image exclusively in that theme.
|
|
44
|
-
|
|
45
|
-
\`\`\`md
|
|
46
|
-
<img className="light-only" src="/images/diagram-light.png" alt="Diagram">
|
|
47
|
-
<img className="dark-only" src="/images/diagram-dark.png" alt="Diagram">
|
|
48
|
-
\`\`\`
|
|
49
|
-
|
|
50
|
-
<img className="light-only" src="https://docs.doccupine.com/demo.png" alt="This image is only visible in light mode" />
|
|
51
|
-
<img className="dark-only" src="https://docs.doccupine.com/demo.png" alt="This image is only visible in dark mode" style={{ filter: "invert(1)" }} />
|
|
52
|
-
|
|
53
|
-
<Callout type="note">
|
|
54
|
-
The \`light-only\` and \`dark-only\` classes work on any element, not just images. You can use them on videos, iframes, or wrapper divs too.
|
|
55
|
-
</Callout>
|
|
56
|
-
|
|
57
|
-
## Videos
|
|
58
|
-
|
|
59
|
-
Videos add a dynamic element to your documentation, engaging your audience and providing a more immersive experience.
|
|
60
|
-
|
|
61
|
-
### YouTube Embed
|
|
62
|
-
|
|
63
|
-
To embed a YouTube video, use the following syntax:
|
|
64
|
-
|
|
65
|
-
\`\`\`html
|
|
66
|
-
<iframe
|
|
67
|
-
className="aspect-video"
|
|
68
|
-
src="https://www.youtube.com/embed/ResP_eVPYQo"
|
|
69
|
-
title="YouTube video player"
|
|
70
|
-
frameborder="0"
|
|
71
|
-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
|
72
|
-
allowfullscreen
|
|
73
|
-
></iframe>
|
|
74
|
-
\`\`\`
|
|
75
|
-
|
|
76
|
-
<iframe
|
|
77
|
-
className="aspect-video"
|
|
78
|
-
src="https://www.youtube.com/embed/ResP_eVPYQo"
|
|
79
|
-
title="YouTube video player"
|
|
80
|
-
frameBorder="0"
|
|
81
|
-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
|
82
|
-
allowFullScreen
|
|
83
|
-
></iframe>
|
|
84
|
-
|
|
85
|
-
### Self-hosted videos
|
|
86
|
-
|
|
87
|
-
Serve up your own video content using the \`<video>\` tag:
|
|
88
|
-
|
|
89
|
-
\`\`\`html
|
|
90
|
-
<video
|
|
91
|
-
controls
|
|
92
|
-
className="aspect-video"
|
|
93
|
-
src="https://samplelib.com/lib/preview/mp4/sample-20s.mp4"
|
|
94
|
-
></video>
|
|
95
|
-
\`\`\`
|
|
96
|
-
|
|
97
|
-
<video
|
|
98
|
-
controls
|
|
99
|
-
className="aspect-video"
|
|
100
|
-
src="https://samplelib.com/lib/preview/mp4/sample-20s.mp4"
|
|
101
|
-
|
|
102
|
-
> </video>
|
|
103
|
-
|
|
104
|
-
#### Autoplay and Looping
|
|
105
|
-
|
|
106
|
-
For demonstration videos that loop or start automatically, add attributes as shown:
|
|
107
|
-
|
|
108
|
-
\`\`\`html
|
|
109
|
-
<video
|
|
110
|
-
controls
|
|
111
|
-
className="aspect-video"
|
|
112
|
-
src="https://samplelib.com/lib/preview/mp4/sample-20s.mp4"
|
|
113
|
-
autoplay
|
|
114
|
-
muted
|
|
115
|
-
loop
|
|
116
|
-
playsinline
|
|
117
|
-
></video>
|
|
118
|
-
\`\`\``;
|