doccupine 0.0.97 → 0.0.99
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/index.js +0 -0
- package/dist/templates/components/MDXComponents.d.ts +1 -1
- package/dist/templates/components/MDXComponents.js +3 -1
- package/dist/templates/components/layout/Card.d.ts +1 -1
- package/dist/templates/components/layout/Card.js +10 -1
- package/dist/templates/components/layout/Code.d.ts +1 -1
- package/dist/templates/components/layout/Code.js +228 -3
- package/dist/templates/components/layout/Footer.d.ts +1 -1
- package/dist/templates/components/layout/Footer.js +9 -1
- package/dist/templates/components/layout/SiteGate.d.ts +1 -1
- package/dist/templates/components/layout/SiteGate.js +8 -1
- package/dist/templates/mdx/code.mdx.d.ts +1 -1
- package/dist/templates/mdx/code.mdx.js +43 -1
- package/dist/templates/package.js +2 -2
- package/package.json +1 -1
- package/dist/index.test.d.ts +0 -1
- package/dist/index.test.js +0 -48
- package/dist/metadata.d.ts +0 -11
- package/dist/metadata.js +0 -52
- package/dist/templates/accordion.mdx.d.ts +0 -1
- package/dist/templates/accordion.mdx.js +0 -41
- package/dist/templates/api/theme/routes.d.ts +0 -1
- package/dist/templates/api/theme/routes.js +0 -28
- package/dist/templates/app/api/theme/routes.d.ts +0 -1
- package/dist/templates/app/api/theme/routes.js +0 -29
- package/dist/templates/app/error.d.ts +0 -1
- package/dist/templates/app/error.js +0 -45
- package/dist/templates/app/layout.d.ts +0 -34
- package/dist/templates/app/layout.js +0 -184
- package/dist/templates/callouts.mdx.d.ts +0 -1
- package/dist/templates/callouts.mdx.js +0 -57
- package/dist/templates/cards.mdx.d.ts +0 -1
- package/dist/templates/cards.mdx.js +0 -25
- package/dist/templates/click-outside.d.ts +0 -1
- package/dist/templates/click-outside.js +0 -28
- package/dist/templates/code.d.ts +0 -1
- package/dist/templates/code.js +0 -202
- package/dist/templates/code.mdx.d.ts +0 -1
- package/dist/templates/code.mdx.js +0 -46
- package/dist/templates/commands.mdx.d.ts +0 -1
- package/dist/templates/commands.mdx.js +0 -48
- package/dist/templates/components/ClickOutside.d.ts +0 -1
- package/dist/templates/components/ClickOutside.js +0 -29
- package/dist/templates/components/layout/ClientThemeProvider.d.ts +0 -1
- package/dist/templates/components/layout/ClientThemeProvider.js +0 -85
- package/dist/templates/components/layout/CopyButton.d.ts +0 -1
- package/dist/templates/components/layout/CopyButton.js +0 -85
- package/dist/templates/components/layout/RenderMarkdown.d.ts +0 -1
- package/dist/templates/components/layout/RenderMarkdown.js +0 -61
- package/dist/templates/components/layout/Stepts.d.ts +0 -1
- package/dist/templates/components/layout/Stepts.js +0 -114
- package/dist/templates/components/layout/ThemeToggle.d.ts +0 -1
- package/dist/templates/components/layout/ThemeToggle.js +0 -107
- package/dist/templates/constants.d.ts +0 -5
- package/dist/templates/constants.js +0 -5
- package/dist/templates/docs-components.d.ts +0 -1
- package/dist/templates/docs-components.js +0 -441
- package/dist/templates/docs.d.ts +0 -1
- package/dist/templates/docs.js +0 -48
- package/dist/templates/fields.mdx.d.ts +0 -1
- package/dist/templates/fields.mdx.js +0 -42
- package/dist/templates/footer.d.ts +0 -1
- package/dist/templates/footer.js +0 -9
- package/dist/templates/header.d.ts +0 -1
- package/dist/templates/header.js +0 -275
- package/dist/templates/home.d.ts +0 -1
- package/dist/templates/home.js +0 -74
- package/dist/templates/home.mdx.d.ts +0 -1
- package/dist/templates/home.mdx.js +0 -44
- package/dist/templates/homemdx.d.ts +0 -1
- package/dist/templates/homemdx.js +0 -59
- package/dist/templates/icon.d.ts +0 -1
- package/dist/templates/icon.js +0 -20
- package/dist/templates/icons.mdx.d.ts +0 -1
- package/dist/templates/icons.mdx.js +0 -44
- package/dist/templates/image-embeds.mdx.d.ts +0 -1
- package/dist/templates/image-embeds.mdx.js +0 -103
- package/dist/templates/layout.d.ts +0 -1
- package/dist/templates/layout.js +0 -69
- package/dist/templates/list-table.mdx.d.ts +0 -1
- package/dist/templates/list-table.mdx.js +0 -85
- package/dist/templates/mdx/config.mdx.d.ts +0 -1
- package/dist/templates/mdx/config.mdx.js +0 -47
- package/dist/templates/mdx/deployment.mdx.d.ts +0 -1
- package/dist/templates/mdx/deployment.mdx.js +0 -61
- package/dist/templates/mdx/image-embeds.mdx.d.ts +0 -1
- package/dist/templates/mdx/image-embeds.mdx.js +0 -95
- package/dist/templates/mdx/links.mdx.d.ts +0 -1
- package/dist/templates/mdx/links.mdx.js +0 -45
- package/dist/templates/mdx/list-and-tables.mdx.d.ts +0 -1
- package/dist/templates/mdx/list-and-tables.mdx.js +0 -78
- package/dist/templates/mdx/list-table.mdx.d.ts +0 -1
- package/dist/templates/mdx/list-table.mdx.js +0 -78
- package/dist/templates/mdx/platform/deployments.mdx.d.ts +0 -1
- package/dist/templates/mdx/platform/deployments.mdx.js +0 -36
- package/dist/templates/mdx/platform/sections-settings.mdx.d.ts +0 -1
- package/dist/templates/mdx/platform/sections-settings.mdx.js +0 -46
- package/dist/templates/mdx/stepts.mdx.d.ts +0 -1
- package/dist/templates/mdx/stepts.mdx.js +0 -60
- package/dist/templates/mdx/text.mdx.d.ts +0 -1
- package/dist/templates/mdx/text.mdx.js +0 -139
- package/dist/templates/middleware.d.ts +0 -1
- package/dist/templates/middleware.js +0 -28
- package/dist/templates/not-found.d.ts +0 -1
- package/dist/templates/not-found.js +0 -22
- package/dist/templates/pictograms.d.ts +0 -1
- package/dist/templates/pictograms.js +0 -67
- package/dist/templates/shared-styles.d.ts +0 -1
- package/dist/templates/shared-styles.js +0 -792
- package/dist/templates/structures.d.ts +0 -2
- package/dist/templates/structures.js +0 -208
- package/dist/templates/tabs.mdx.d.ts +0 -1
- package/dist/templates/tabs.mdx.js +0 -59
- package/dist/templates/text.mdx.d.ts +0 -1
- package/dist/templates/text.mdx.js +0 -142
- package/dist/templates/theme-toggle.d.ts +0 -1
- package/dist/templates/theme-toggle.js +0 -111
- package/dist/templates/theme.d.ts +0 -1
- package/dist/templates/theme.js +0 -307
- package/dist/templates/typography.d.ts +0 -1
- package/dist/templates/typography.js +0 -52
- package/dist/templates/update.mdx.d.ts +0 -1
- package/dist/templates/update.mdx.js +0 -58
package/dist/templates/code.js
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
export const codeTemplate = `"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
import styled from "styled-components";
|
|
4
|
-
import { Theme, styledCode } from "cherry-styled-components/src/lib";
|
|
5
|
-
import { rgba } from "polished";
|
|
6
|
-
import { unified } from "unified";
|
|
7
|
-
import rehypeParse from "rehype-parse";
|
|
8
|
-
import rehypeHighlight from "rehype-highlight";
|
|
9
|
-
import rehypeStringify from "rehype-stringify";
|
|
10
|
-
import { editableContent } from "@/app/components/layout/SharedStyled";
|
|
11
|
-
|
|
12
|
-
interface CodeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
13
|
-
code: string;
|
|
14
|
-
language?: string;
|
|
15
|
-
theme?: Theme;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const CodeWrapper = styled.span<{ theme: Theme }>\`
|
|
19
|
-
position: relative;
|
|
20
|
-
z-index: 2;
|
|
21
|
-
display: block;
|
|
22
|
-
width: 100%;
|
|
23
|
-
border-radius: \${({ theme }) => theme.spacing.radius.lg};
|
|
24
|
-
border: solid 1px
|
|
25
|
-
\${({ theme }) =>
|
|
26
|
-
theme.isDark ? rgba(theme.colors.dark, 0.2) : rgba(theme.colors.dark, 0)};
|
|
27
|
-
\`;
|
|
28
|
-
|
|
29
|
-
const TopBar = styled.div<{ theme: Theme }>\`
|
|
30
|
-
background: #0d1117;
|
|
31
|
-
border-top-left-radius: \${({ theme }) => theme.spacing.radius.lg};
|
|
32
|
-
border-top-right-radius: \${({ theme }) => theme.spacing.radius.lg};
|
|
33
|
-
border-bottom: solid 1px \${rgba("#ffffff", 0.1)};
|
|
34
|
-
height: 33px;
|
|
35
|
-
width: 100%;
|
|
36
|
-
display: flex;
|
|
37
|
-
justify-content: flex-start;
|
|
38
|
-
gap: 5px;
|
|
39
|
-
padding: 10px;
|
|
40
|
-
\`;
|
|
41
|
-
|
|
42
|
-
const Dot = styled.span<{ theme: Theme }>\`
|
|
43
|
-
margin: auto 0;
|
|
44
|
-
width: 10px;
|
|
45
|
-
height: 10px;
|
|
46
|
-
border-radius: 50%;
|
|
47
|
-
background: \${rgba("#ffffff", 0.1)};
|
|
48
|
-
\`;
|
|
49
|
-
|
|
50
|
-
const Body = styled.div<{ theme: Theme }>\`
|
|
51
|
-
background: #0d1117;
|
|
52
|
-
border-bottom-left-radius: \${({ theme }) => theme.spacing.radius.lg};
|
|
53
|
-
border-bottom-right-radius: \${({ theme }) => theme.spacing.radius.lg};
|
|
54
|
-
color: #ffffff;
|
|
55
|
-
padding: 20px;
|
|
56
|
-
font-family: \${({ theme }) => theme.fonts.mono};
|
|
57
|
-
text-align: left;
|
|
58
|
-
overflow-x: auto;
|
|
59
|
-
overflow-y: auto;
|
|
60
|
-
max-height: calc(100svh - 400px);
|
|
61
|
-
\${({ theme }) => styledCode(theme)};
|
|
62
|
-
|
|
63
|
-
&[contenteditable="true"] {
|
|
64
|
-
\${editableContent};
|
|
65
|
-
border-top-left-radius: 0;
|
|
66
|
-
border-top-right-radius: 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
& .hljs {
|
|
70
|
-
color: #c9d1d9;
|
|
71
|
-
background: #0d1117;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
& .hljs-doctag,
|
|
75
|
-
& .hljs-keyword,
|
|
76
|
-
& .hljs-meta .hljs-keyword,
|
|
77
|
-
& .hljs-template-tag,
|
|
78
|
-
& .hljs-template-variable,
|
|
79
|
-
& .hljs-type,
|
|
80
|
-
& .hljs-variable.language_ {
|
|
81
|
-
color: #ff7b72;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
& .hljs-title,
|
|
85
|
-
& .hljs-title.class_,
|
|
86
|
-
& .hljs-title.class_.inherited__,
|
|
87
|
-
& .hljs-title.function_ {
|
|
88
|
-
color: #d2a8ff;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
& .hljs-attr,
|
|
92
|
-
& .hljs-attribute,
|
|
93
|
-
& .hljs-literal,
|
|
94
|
-
& .hljs-meta,
|
|
95
|
-
& .hljs-number,
|
|
96
|
-
& .hljs-operator,
|
|
97
|
-
& .hljs-selector-attr,
|
|
98
|
-
& .hljs-selector-class,
|
|
99
|
-
& .hljs-selector-id,
|
|
100
|
-
& .hljs-variable {
|
|
101
|
-
color: #79c0ff;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
& .hljs-meta .hljs-string,
|
|
105
|
-
& .hljs-regexp,
|
|
106
|
-
& .hljs-string {
|
|
107
|
-
color: #a5d6ff;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
& .hljs-built_in,
|
|
111
|
-
& .hljs-symbol {
|
|
112
|
-
color: #ffa657;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
& .hljs-code,
|
|
116
|
-
& .hljs-comment,
|
|
117
|
-
& .hljs-formula {
|
|
118
|
-
color: #8b949e;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
& .hljs-name,
|
|
122
|
-
& .hljs-quote,
|
|
123
|
-
& .hljs-selector-pseudo,
|
|
124
|
-
& .hljs-selector-tag {
|
|
125
|
-
color: #7ee787;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
& .hljs-subst {
|
|
129
|
-
color: #c9d1d9;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
& .hljs-section {
|
|
133
|
-
color: #1f6feb;
|
|
134
|
-
font-weight: 700;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
& .hljs-bullet {
|
|
138
|
-
color: #f2cc60;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
& .hljs-emphasis {
|
|
142
|
-
color: #c9d1d9;
|
|
143
|
-
font-style: italic;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
& .hljs-strong {
|
|
147
|
-
color: #c9d1d9;
|
|
148
|
-
font-weight: 700;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
& .hljs-addition {
|
|
152
|
-
color: #aff5b4;
|
|
153
|
-
background-color: #033a16;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
& .hljs-deletion {
|
|
157
|
-
color: #ffdcd7;
|
|
158
|
-
background-color: #67060c;
|
|
159
|
-
}
|
|
160
|
-
\`;
|
|
161
|
-
|
|
162
|
-
const escapeHtml = (unsafe: string): string => {
|
|
163
|
-
return unsafe
|
|
164
|
-
.replace(/&/g, "&")
|
|
165
|
-
.replace(/</g, "<")
|
|
166
|
-
.replace(/>/g, ">")
|
|
167
|
-
.replace(/"/g, """)
|
|
168
|
-
.replace(/'/g, "'");
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
const highlightCode = (code: string, language: string): string => {
|
|
172
|
-
const escapedCode = escapeHtml(code);
|
|
173
|
-
const result = unified()
|
|
174
|
-
.use(rehypeParse, { fragment: true })
|
|
175
|
-
.use(rehypeHighlight, {
|
|
176
|
-
detect: true,
|
|
177
|
-
ignoreMissing: true,
|
|
178
|
-
})
|
|
179
|
-
.use(rehypeStringify)
|
|
180
|
-
.processSync(
|
|
181
|
-
\`<pre><code class="language-\${language}">\${escapedCode}</code></pre>\`,
|
|
182
|
-
);
|
|
183
|
-
|
|
184
|
-
return String(result);
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
function Code({ code, language = "javascript", ...props }: CodeProps) {
|
|
188
|
-
const highlightedCode = highlightCode(code, language);
|
|
189
|
-
return (
|
|
190
|
-
<CodeWrapper>
|
|
191
|
-
<TopBar>
|
|
192
|
-
<Dot />
|
|
193
|
-
<Dot />
|
|
194
|
-
<Dot />
|
|
195
|
-
</TopBar>
|
|
196
|
-
<Body dangerouslySetInnerHTML={{ __html: highlightedCode }} {...props} />
|
|
197
|
-
</CodeWrapper>
|
|
198
|
-
);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export { Code };
|
|
202
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const codeMdxTemplate = "---\ntitle: \"Code\"\ndescription: \"Doccupine CLI commands\"\ndate: \"2025-01-15\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 3\n---\n# Code\nLearn how to display inline code and code blocks in documentation.\n\n## Adding Code Samples\nBoth inline code snippets and full code blocks are supported. Code blocks offer customization for syntax highlighting and more to improve readability and user experience.\n\n### Inline Code\nHighlight code within text by wrapping it with backticks:\n\n```text\nEnclose any `word` or `phrase` in backticks to format it as code.\n```\n\nEnclose any `word` or `phrase` in backticks to format it as code.\n\n## Code Blocks\nTo present larger code samples, use triple backticks for fenced code blocks. Each block can be copied, and\u2014if assistant features are enabled\u2014users can request explanations.\n\nYou may specify the language for highlighting:\n\n~~~text\n```java\nclass HelloWorld {\n public static void main(String[] args) {\n System.out.println(\"Hello, World!\");\n }\n}\n```\n~~~\n\n\n```java\nclass HelloWorld {\n public static void main(String[] args) {\n System.out.println(\"Hello, World!\");\n }\n}\n```";
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export const codeMdxTemplate = `---
|
|
2
|
-
title: "Code"
|
|
3
|
-
description: "Doccupine CLI commands"
|
|
4
|
-
date: "2025-01-15"
|
|
5
|
-
category: "Components"
|
|
6
|
-
categoryOrder: 1
|
|
7
|
-
order: 3
|
|
8
|
-
---
|
|
9
|
-
# Code
|
|
10
|
-
Learn how to display inline code and code blocks in documentation.
|
|
11
|
-
|
|
12
|
-
## Adding Code Samples
|
|
13
|
-
Both inline code snippets and full code blocks are supported. Code blocks offer customization for syntax highlighting and more to improve readability and user experience.
|
|
14
|
-
|
|
15
|
-
### Inline Code
|
|
16
|
-
Highlight code within text by wrapping it with backticks:
|
|
17
|
-
|
|
18
|
-
\`\`\`text
|
|
19
|
-
Enclose any \`word\` or \`phrase\` in backticks to format it as code.
|
|
20
|
-
\`\`\`
|
|
21
|
-
|
|
22
|
-
Enclose any \`word\` or \`phrase\` in backticks to format it as code.
|
|
23
|
-
|
|
24
|
-
## Code Blocks
|
|
25
|
-
To present larger code samples, use triple backticks for fenced code blocks. Each block can be copied, and—if assistant features are enabled—users can request explanations.
|
|
26
|
-
|
|
27
|
-
You may specify the language for highlighting:
|
|
28
|
-
|
|
29
|
-
~~~text
|
|
30
|
-
\`\`\`java
|
|
31
|
-
class HelloWorld {
|
|
32
|
-
public static void main(String[] args) {
|
|
33
|
-
System.out.println("Hello, World!");
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
\`\`\`
|
|
37
|
-
~~~
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
\`\`\`java
|
|
41
|
-
class HelloWorld {
|
|
42
|
-
public static void main(String[] args) {
|
|
43
|
-
System.out.println("Hello, World!");
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
\`\`\``;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const commandsMdxTemplate = "---\ntitle: \"Commands\"\ndescription: \"Doccupine CLI commands\"\ndate: \"2025-01-15\"\ncategory: \"General\"\ncategoryOrder: 0\norder: 1\n---\n# Commands\n\nIn this page, you can find all the commands available in Doccupine CLI.\n\n## Run Doccupine CLI\n\nCreate a new directory for your project and navigate to it in your terminal. Run the following command to create a new Doccupine project:\n\n~~~bash\nnpx doccupine\n~~~\n\nOnce you run the command, Doccupine will ask you to select a directory to store your MDX files. Choose the directory where you want to create your documentation files.\nAfter selecting the directory, Doccupine will ask you to enter the name of the directory for the generated website. Enter the name of the directory where you want to create your website.\n\nThis will start the development server on port 3000. Open your browser and navigate to http://localhost:3000 to view your documentation.\n\n## Generate the website\n\n~~~bash\nnpx doccupine build\n~~~\n\nThis will generate the build files for your documentation website without starting the development server. You can then deploy the generated files to a hosting service of your choice.\n\n## Show current configuration\n\n~~~bash\nnpx doccupine config --show\n~~~\n\nThis will show the current configuration for Doccupine.\n\n## Reset configuration\n\n~~~bash\nnpx doccupine config --reset\n~~~\n \nThis will reset the current configuration for Doccupine.";
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export const commandsMdxTemplate = `---
|
|
2
|
-
title: "Commands"
|
|
3
|
-
description: "Doccupine CLI commands"
|
|
4
|
-
date: "2025-01-15"
|
|
5
|
-
category: "General"
|
|
6
|
-
categoryOrder: 0
|
|
7
|
-
order: 1
|
|
8
|
-
---
|
|
9
|
-
# Commands
|
|
10
|
-
|
|
11
|
-
In this page, you can find all the commands available in Doccupine CLI.
|
|
12
|
-
|
|
13
|
-
## Run Doccupine CLI
|
|
14
|
-
|
|
15
|
-
Create a new directory for your project and navigate to it in your terminal. Run the following command to create a new Doccupine project:
|
|
16
|
-
|
|
17
|
-
~~~bash
|
|
18
|
-
npx doccupine
|
|
19
|
-
~~~
|
|
20
|
-
|
|
21
|
-
Once you run the command, Doccupine will ask you to select a directory to store your MDX files. Choose the directory where you want to create your documentation files.
|
|
22
|
-
After selecting the directory, Doccupine will ask you to enter the name of the directory for the generated website. Enter the name of the directory where you want to create your website.
|
|
23
|
-
|
|
24
|
-
This will start the development server on port 3000. Open your browser and navigate to http://localhost:3000 to view your documentation.
|
|
25
|
-
|
|
26
|
-
## Generate the website
|
|
27
|
-
|
|
28
|
-
~~~bash
|
|
29
|
-
npx doccupine build
|
|
30
|
-
~~~
|
|
31
|
-
|
|
32
|
-
This will generate the build files for your documentation website without starting the development server. You can then deploy the generated files to a hosting service of your choice.
|
|
33
|
-
|
|
34
|
-
## Show current configuration
|
|
35
|
-
|
|
36
|
-
~~~bash
|
|
37
|
-
npx doccupine config --show
|
|
38
|
-
~~~
|
|
39
|
-
|
|
40
|
-
This will show the current configuration for Doccupine.
|
|
41
|
-
|
|
42
|
-
## Reset configuration
|
|
43
|
-
|
|
44
|
-
~~~bash
|
|
45
|
-
npx doccupine config --reset
|
|
46
|
-
~~~
|
|
47
|
-
|
|
48
|
-
This will reset the current configuration for Doccupine.`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const clickOutsideTemplate = "import { RefObject, useCallback, useEffect } from \"react\";\n\nexport function useOnClickOutside(\n refs: RefObject<HTMLElement | null>[],\n cb: () => void,\n) {\n // Stable callback ref to avoid re-subscribing on every render\n const handleClickOutside = useCallback(\n (event: MouseEvent) => {\n if (\n refs.every(\n (ref) => !ref.current || !ref.current.contains(event.target as Node),\n )\n ) {\n cb();\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [...refs, cb],\n );\n\n useEffect(() => {\n document.addEventListener(\"mousedown\", handleClickOutside);\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [handleClickOutside]);\n}\n";
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export const clickOutsideTemplate = `import { RefObject, useCallback, useEffect } from "react";
|
|
2
|
-
|
|
3
|
-
export function useOnClickOutside(
|
|
4
|
-
refs: RefObject<HTMLElement | null>[],
|
|
5
|
-
cb: () => void,
|
|
6
|
-
) {
|
|
7
|
-
// Stable callback ref to avoid re-subscribing on every render
|
|
8
|
-
const handleClickOutside = useCallback(
|
|
9
|
-
(event: MouseEvent) => {
|
|
10
|
-
if (
|
|
11
|
-
refs.every(
|
|
12
|
-
(ref) => !ref.current || !ref.current.contains(event.target as Node),
|
|
13
|
-
)
|
|
14
|
-
) {
|
|
15
|
-
cb();
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
19
|
-
[...refs, cb],
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
24
|
-
return () => {
|
|
25
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
26
|
-
};
|
|
27
|
-
}, [handleClickOutside]);
|
|
28
|
-
}
|
|
29
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const clientThemeProviderTemplate = "\"use client\";\nimport React, { useCallback, useContext, useEffect, useState } from \"react\";\nimport { ThemeProvider as StyledThemeProvider } from \"styled-components\";\nimport { Theme } from \"@/app/theme\";\nimport { GlobalStyles } from \"@/components/layout/GlobalStyles\";\n\ntype ThemeMode = \"light\" | \"dark\";\n\ntype ThemeContextValue = {\n /** The styled-components theme object \u2014 same reference in both modes;\n the values it points to are CSS variables that flip per active class. */\n theme: Theme;\n /** Active mode, derived from the \"dark\" class on <html>. */\n mode: ThemeMode;\n /** Update the active mode: flips the class and persists the cookie. */\n setMode: (m: ThemeMode) => void;\n};\n\nconst ThemeContext = React.createContext<ThemeContextValue | null>(null);\n\nfunction useThemeOverride() {\n const ctx = useContext(ThemeContext);\n if (!ctx) {\n throw new Error(\"useThemeOverride must be used within ClientThemeProvider\");\n }\n return ctx;\n}\n\nfunction readMode(): ThemeMode {\n if (typeof document === \"undefined\") return \"light\";\n return document.documentElement.classList.contains(\"dark\") ? \"dark\" : \"light\";\n}\n\nfunction ClientThemeProvider({\n children,\n theme,\n}: {\n children: React.ReactNode;\n theme: Theme;\n}) {\n // Mode lives in React state so consumers (e.g. ThemeToggle) re-render when\n // the user toggles. The visual swap itself is driven entirely by the\n // \"dark\" class on <html> + CSS variables \u2014 React doesn't drive paint.\n // The lazy initializer reads the class set by the theme-init blocking\n // script (SSR returns \"light\"); no rendered markup branches on mode, so\n // reading the DOM during the hydration render can't cause a mismatch.\n const [mode, setModeState] = useState<ThemeMode>(readMode);\n\n useEffect(() => {\n // Backfill the cookie if the theme-init script didn't get to write one\n // (rare \u2014 e.g. cookies disabled at first paint).\n try {\n const has = document.cookie\n .split(\";\")\n .some((c) => c.trim().startsWith(\"theme=\"));\n if (!has) {\n const m = readMode();\n document.cookie = `theme=${m};path=/;max-age=31536000;SameSite=Lax`;\n }\n } catch {}\n }, []);\n\n const setMode = useCallback((next: ThemeMode) => {\n if (typeof document !== \"undefined\") {\n document.documentElement.classList.toggle(\"dark\", next === \"dark\");\n document.documentElement.style.colorScheme = next;\n try {\n document.cookie = `theme=${next};path=/;max-age=31536000;SameSite=Lax`;\n } catch {}\n }\n setModeState(next);\n }, []);\n\n return (\n <ThemeContext.Provider value={{ theme, mode, setMode }}>\n <StyledThemeProvider theme={theme}>\n <GlobalStyles />\n {children}\n </StyledThemeProvider>\n </ThemeContext.Provider>\n );\n}\n\nexport { ClientThemeProvider, useThemeOverride };\n";
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
export const clientThemeProviderTemplate = `"use client";
|
|
2
|
-
import React, { useCallback, useContext, useEffect, useState } from "react";
|
|
3
|
-
import { ThemeProvider as StyledThemeProvider } from "styled-components";
|
|
4
|
-
import { Theme } from "@/app/theme";
|
|
5
|
-
import { GlobalStyles } from "@/components/layout/GlobalStyles";
|
|
6
|
-
|
|
7
|
-
type ThemeMode = "light" | "dark";
|
|
8
|
-
|
|
9
|
-
type ThemeContextValue = {
|
|
10
|
-
/** The styled-components theme object — same reference in both modes;
|
|
11
|
-
the values it points to are CSS variables that flip per active class. */
|
|
12
|
-
theme: Theme;
|
|
13
|
-
/** Active mode, derived from the "dark" class on <html>. */
|
|
14
|
-
mode: ThemeMode;
|
|
15
|
-
/** Update the active mode: flips the class and persists the cookie. */
|
|
16
|
-
setMode: (m: ThemeMode) => void;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const ThemeContext = React.createContext<ThemeContextValue | null>(null);
|
|
20
|
-
|
|
21
|
-
function useThemeOverride() {
|
|
22
|
-
const ctx = useContext(ThemeContext);
|
|
23
|
-
if (!ctx) {
|
|
24
|
-
throw new Error("useThemeOverride must be used within ClientThemeProvider");
|
|
25
|
-
}
|
|
26
|
-
return ctx;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function readMode(): ThemeMode {
|
|
30
|
-
if (typeof document === "undefined") return "light";
|
|
31
|
-
return document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function ClientThemeProvider({
|
|
35
|
-
children,
|
|
36
|
-
theme,
|
|
37
|
-
}: {
|
|
38
|
-
children: React.ReactNode;
|
|
39
|
-
theme: Theme;
|
|
40
|
-
}) {
|
|
41
|
-
// Mode lives in React state so consumers (e.g. ThemeToggle) re-render when
|
|
42
|
-
// the user toggles. The visual swap itself is driven entirely by the
|
|
43
|
-
// "dark" class on <html> + CSS variables — React doesn't drive paint.
|
|
44
|
-
// The lazy initializer reads the class set by the theme-init blocking
|
|
45
|
-
// script (SSR returns "light"); no rendered markup branches on mode, so
|
|
46
|
-
// reading the DOM during the hydration render can't cause a mismatch.
|
|
47
|
-
const [mode, setModeState] = useState<ThemeMode>(readMode);
|
|
48
|
-
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
// Backfill the cookie if the theme-init script didn't get to write one
|
|
51
|
-
// (rare — e.g. cookies disabled at first paint).
|
|
52
|
-
try {
|
|
53
|
-
const has = document.cookie
|
|
54
|
-
.split(";")
|
|
55
|
-
.some((c) => c.trim().startsWith("theme="));
|
|
56
|
-
if (!has) {
|
|
57
|
-
const m = readMode();
|
|
58
|
-
document.cookie = \`theme=\${m};path=/;max-age=31536000;SameSite=Lax\`;
|
|
59
|
-
}
|
|
60
|
-
} catch {}
|
|
61
|
-
}, []);
|
|
62
|
-
|
|
63
|
-
const setMode = useCallback((next: ThemeMode) => {
|
|
64
|
-
if (typeof document !== "undefined") {
|
|
65
|
-
document.documentElement.classList.toggle("dark", next === "dark");
|
|
66
|
-
document.documentElement.style.colorScheme = next;
|
|
67
|
-
try {
|
|
68
|
-
document.cookie = \`theme=\${next};path=/;max-age=31536000;SameSite=Lax\`;
|
|
69
|
-
} catch {}
|
|
70
|
-
}
|
|
71
|
-
setModeState(next);
|
|
72
|
-
}, []);
|
|
73
|
-
|
|
74
|
-
return (
|
|
75
|
-
<ThemeContext.Provider value={{ theme, mode, setMode }}>
|
|
76
|
-
<StyledThemeProvider theme={theme}>
|
|
77
|
-
<GlobalStyles />
|
|
78
|
-
{children}
|
|
79
|
-
</StyledThemeProvider>
|
|
80
|
-
</ThemeContext.Provider>
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export { ClientThemeProvider, useThemeOverride };
|
|
85
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const copyButtonTemplate = "\"use client\";\nimport { useState } from \"react\";\nimport styled from \"styled-components\";\nimport { Icon } from \"@/components/layout/Icon\";\nimport { mq, Theme } from \"@/app/theme\";\n\ninterface CopyButtonProps {\n content: string;\n}\n\nconst StyledCopyWrapper = styled.div`\n position: relative;\n padding-top: 70px;\n\n ${mq(\"lg\")} {\n padding-top: 80px;\n }\n`;\n\nconst StyledCopyButton = styled.button<{ theme: Theme; $copied: boolean }>`\n background: transparent;\n border: solid 1px\n ${({ theme, $copied }) =>\n $copied ? theme.colors.success : theme.colors.grayLight};\n color: ${({ theme, $copied }) =>\n $copied ? theme.colors.success : theme.colors.primary};\n border-radius: ${({ theme }) => theme.spacing.radius.xs};\n padding: 4px 8px;\n font-size: 12px;\n font-family: ${({ theme }) => theme.fonts.mono};\n cursor: pointer;\n transition: all 0.2s ease;\n display: flex;\n align-items: center;\n gap: 4px;\n margin-right: -6px;\n\n & svg.lucide {\n color: ${({ theme, $copied }) =>\n $copied ? theme.colors.success : theme.colors.primary};\n }\n\n &:hover {\n border-color: ${({ theme, $copied }) =>\n $copied ? theme.colors.success : theme.colors.primary};\n }\n\n &:active {\n transform: scale(0.95);\n }\n`;\n\nfunction CopyButton({ content }: CopyButtonProps) {\n const [copied, setCopied] = useState(false);\n\n const handleCopyContent = async () => {\n try {\n await navigator.clipboard.writeText(content);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n } catch (err) {\n console.error(\"Failed to copy:\", err);\n }\n };\n\n return (\n <StyledCopyWrapper>\n <StyledCopyButton onClick={handleCopyContent} $copied={copied}>\n {copied ? (\n <>\n <Icon name=\"check\" size={12} />\n <span>Copied!</span>\n </>\n ) : (\n <>\n <Icon name=\"copy\" size={12} />\n <span>Copy Content</span>\n </>\n )}\n </StyledCopyButton>\n </StyledCopyWrapper>\n );\n}\n\nexport { CopyButton };";
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
export const copyButtonTemplate = `"use client";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import styled from "styled-components";
|
|
4
|
-
import { Icon } from "@/components/layout/Icon";
|
|
5
|
-
import { mq, Theme } from "@/app/theme";
|
|
6
|
-
|
|
7
|
-
interface CopyButtonProps {
|
|
8
|
-
content: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const StyledCopyWrapper = styled.div\`
|
|
12
|
-
position: relative;
|
|
13
|
-
padding-top: 70px;
|
|
14
|
-
|
|
15
|
-
\${mq("lg")} {
|
|
16
|
-
padding-top: 80px;
|
|
17
|
-
}
|
|
18
|
-
\`;
|
|
19
|
-
|
|
20
|
-
const StyledCopyButton = styled.button<{ theme: Theme; $copied: boolean }>\`
|
|
21
|
-
background: transparent;
|
|
22
|
-
border: solid 1px
|
|
23
|
-
\${({ theme, $copied }) =>
|
|
24
|
-
$copied ? theme.colors.success : theme.colors.grayLight};
|
|
25
|
-
color: \${({ theme, $copied }) =>
|
|
26
|
-
$copied ? theme.colors.success : theme.colors.primary};
|
|
27
|
-
border-radius: \${({ theme }) => theme.spacing.radius.xs};
|
|
28
|
-
padding: 4px 8px;
|
|
29
|
-
font-size: 12px;
|
|
30
|
-
font-family: \${({ theme }) => theme.fonts.mono};
|
|
31
|
-
cursor: pointer;
|
|
32
|
-
transition: all 0.2s ease;
|
|
33
|
-
display: flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
gap: 4px;
|
|
36
|
-
margin-right: -6px;
|
|
37
|
-
|
|
38
|
-
& svg.lucide {
|
|
39
|
-
color: \${({ theme, $copied }) =>
|
|
40
|
-
$copied ? theme.colors.success : theme.colors.primary};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&:hover {
|
|
44
|
-
border-color: \${({ theme, $copied }) =>
|
|
45
|
-
$copied ? theme.colors.success : theme.colors.primary};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&:active {
|
|
49
|
-
transform: scale(0.95);
|
|
50
|
-
}
|
|
51
|
-
\`;
|
|
52
|
-
|
|
53
|
-
function CopyButton({ content }: CopyButtonProps) {
|
|
54
|
-
const [copied, setCopied] = useState(false);
|
|
55
|
-
|
|
56
|
-
const handleCopyContent = async () => {
|
|
57
|
-
try {
|
|
58
|
-
await navigator.clipboard.writeText(content);
|
|
59
|
-
setCopied(true);
|
|
60
|
-
setTimeout(() => setCopied(false), 2000);
|
|
61
|
-
} catch (err) {
|
|
62
|
-
console.error("Failed to copy:", err);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<StyledCopyWrapper>
|
|
68
|
-
<StyledCopyButton onClick={handleCopyContent} $copied={copied}>
|
|
69
|
-
{copied ? (
|
|
70
|
-
<>
|
|
71
|
-
<Icon name="check" size={12} />
|
|
72
|
-
<span>Copied!</span>
|
|
73
|
-
</>
|
|
74
|
-
) : (
|
|
75
|
-
<>
|
|
76
|
-
<Icon name="copy" size={12} />
|
|
77
|
-
<span>Copy Content</span>
|
|
78
|
-
</>
|
|
79
|
-
)}
|
|
80
|
-
</StyledCopyButton>
|
|
81
|
-
</StyledCopyWrapper>
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export { CopyButton };`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const renderMarkdownTemplate = "import React from \"react\";\nimport { StyledMarkdownContainer } from \"@/components/layout/DocsComponents\";\nimport { MDXRemote } from \"next-mdx-remote/rsc\";\nimport remarkGfm from \"remark-gfm\";\nimport { useMDXComponents } from \"@/components/MDXComponents\";\n\nfunction extractAllTextFromChildren(children: React.ReactNode): string {\n if (children == null) return \"\";\n\n if (typeof children === \"string\") return children;\n if (typeof children === \"number\") return String(children);\n if (typeof children === \"boolean\") return \"\";\n\n if (Array.isArray(children)) {\n return children.map(extractAllTextFromChildren).join(\"\");\n }\n\n if (React.isValidElement(children)) {\n const element = children as React.ReactElement<any>;\n return extractAllTextFromChildren(element.props.children);\n }\n\n return \"\";\n}\n\nfunction normalizeMarkdownSpacing(input: string): string {\n return (\n input\n // Ensure a blank line before headings\n .replace(/([^\\n])(#[\\s]+)/g, '$1\\n\\n$2')\n\n // Ensure a blank line before fenced code blocks\n .replace(/([^\\n])(~~~|```)/g, '$1\\n\\n$2')\n\n // Ensure a blank line before images/links if they start a line\n .replace(/([^\\n])(!\\[)/g, '$1\\n\\n$2')\n );\n}\n\nfunction RenderMarkdown({ children }: { children: React.ReactNode }) {\n const childrenAsString = extractAllTextFromChildren(children);\n const normalizedChildren = normalizeMarkdownSpacing(childrenAsString);\n const components = useMDXComponents({});\n\n return (\n <StyledMarkdownContainer>\n <MDXRemote\n source={normalizedChildren}\n options={{\n mdxOptions: {\n remarkPlugins: [remarkGfm],\n },\n }}\n components={components}\n />\n </StyledMarkdownContainer>\n );\n}\n\nexport { RenderMarkdown };\n";
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
export const renderMarkdownTemplate = `import React from "react";
|
|
2
|
-
import { StyledMarkdownContainer } from "@/components/layout/DocsComponents";
|
|
3
|
-
import { MDXRemote } from "next-mdx-remote/rsc";
|
|
4
|
-
import remarkGfm from "remark-gfm";
|
|
5
|
-
import { useMDXComponents } from "@/components/MDXComponents";
|
|
6
|
-
|
|
7
|
-
function extractAllTextFromChildren(children: React.ReactNode): string {
|
|
8
|
-
if (children == null) return "";
|
|
9
|
-
|
|
10
|
-
if (typeof children === "string") return children;
|
|
11
|
-
if (typeof children === "number") return String(children);
|
|
12
|
-
if (typeof children === "boolean") return "";
|
|
13
|
-
|
|
14
|
-
if (Array.isArray(children)) {
|
|
15
|
-
return children.map(extractAllTextFromChildren).join("");
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (React.isValidElement(children)) {
|
|
19
|
-
const element = children as React.ReactElement<any>;
|
|
20
|
-
return extractAllTextFromChildren(element.props.children);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return "";
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function normalizeMarkdownSpacing(input: string): string {
|
|
27
|
-
return (
|
|
28
|
-
input
|
|
29
|
-
// Ensure a blank line before headings
|
|
30
|
-
.replace(/([^\\n])(#[\\s]+)/g, '$1\\n\\n$2')
|
|
31
|
-
|
|
32
|
-
// Ensure a blank line before fenced code blocks
|
|
33
|
-
.replace(/([^\\n])(~~~|\`\`\`)/g, '$1\\n\\n$2')
|
|
34
|
-
|
|
35
|
-
// Ensure a blank line before images/links if they start a line
|
|
36
|
-
.replace(/([^\\n])(!\\[)/g, '$1\\n\\n$2')
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function RenderMarkdown({ children }: { children: React.ReactNode }) {
|
|
41
|
-
const childrenAsString = extractAllTextFromChildren(children);
|
|
42
|
-
const normalizedChildren = normalizeMarkdownSpacing(childrenAsString);
|
|
43
|
-
const components = useMDXComponents({});
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<StyledMarkdownContainer>
|
|
47
|
-
<MDXRemote
|
|
48
|
-
source={normalizedChildren}
|
|
49
|
-
options={{
|
|
50
|
-
mdxOptions: {
|
|
51
|
-
remarkPlugins: [remarkGfm],
|
|
52
|
-
},
|
|
53
|
-
}}
|
|
54
|
-
components={components}
|
|
55
|
-
/>
|
|
56
|
-
</StyledMarkdownContainer>
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export { RenderMarkdown };
|
|
61
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const stepsTemplate = "\"use client\";\nimport React from \"react\";\nimport styled, { useTheme } from \"styled-components\";\nimport { styledText, Theme } from \"cherry-styled-components/src/lib\";\nimport { rgba } from \"polished\";\nimport { Icon, IconProps } from \"@/components/layout/Icon\";\n\nconst StyledStepsContainer = styled.div<{ theme: Theme }>`\n position: relative;\n width: 100%;\n`;\n\nconst StyledStep = styled.div<{ theme: Theme }>`\n background: ${({ theme }) => theme.colors.light};\n border-radius: ${({ theme }) => theme.spacing.radius.lg};\n padding: 0 0 20px 52px;\n margin: 0;\n position: relative;\n ${({ theme }) => styledText(theme)}\n color: ${({ theme }) => theme.colors.grayDark};\n\n &::after {\n content: \"\";\n position: absolute;\n left: 16px;\n top: 0;\n width: 1px;\n height: 100%;\n background: ${({ theme }) => theme.colors.primary};\n background: linear-gradient(\n 180deg,\n ${({ theme }) => theme.colors.primary},\n ${({ theme }) => rgba(theme.colors.primary, 0)}\n );\n border-radius: 4px;\n }\n`;\n\nconst StepNumber = styled.div<{ theme: Theme }>`\n width: 32px;\n height: 32px;\n border-radius: 50%;\n background: ${({ theme }) => theme.colors.primary};\n color: ${({ theme }) => theme.colors.light};\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: 700;\n margin-bottom: 12px;\n ${({ theme }) => styledText(theme)};\n position: absolute;\n left: 0;\n top: 0;\n z-index: 1;\n`;\n\nconst StyledStepTitle = styled.h3<{ theme: Theme }>`\n margin: 0 0 10px 0;\n padding: 2px 0 0 0;\n color: ${({ theme }) => theme.colors.dark};\n ${({ theme }) => styledText(theme)};\n`;\n\nconst StepContent = styled.div<{ theme: Theme }>`\n color: ${({ theme }) => theme.colors.grayDark};\n ${({ theme }) => styledText(theme)};\n\n & > .code-wrapper {\n margin: 10px 0;\n }\n`;\n\ninterface StepProps extends React.HTMLAttributes<HTMLDivElement> {\n title: string;\n children: React.ReactNode;\n icon?: IconProps;\n}\n\nfunction Step({ title, children, icon, ...props }: StepProps) {\n return null;\n}\n\ninterface StepsProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n}\n\nfunction Steps({ children, ...props }: StepsProps) {\n const theme = useTheme() as Theme;\n\n const steps = React.Children.toArray(children).filter(\n (child): child is React.ReactElement<StepProps> =>\n React.isValidElement(child),\n );\n\n return (\n <StyledStepsContainer theme={theme}>\n {steps.map((step, index) => {\n const { title, children: stepContent, icon } = step.props;\n\n return (\n <StyledStep key={index} theme={theme}>\n <StepNumber theme={theme}>{index + 1}</StepNumber>\n {icon && <Icon name={icon} color={theme.colors.primary} />}\n <StyledStepTitle theme={theme}>{title}</StyledStepTitle>\n <StepContent theme={theme}>{stepContent}</StepContent>\n </StyledStep>\n );\n })}\n </StyledStepsContainer>\n );\n}\n\nexport { Steps, Step };\n";
|