doccupine 0.0.98 → 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/Code.d.ts +1 -1
- package/dist/templates/components/layout/Code.js +228 -3
- package/dist/templates/mdx/code.mdx.d.ts +1 -1
- package/dist/templates/mdx/code.mdx.js +43 -1
- package/dist/templates/package.js +1 -1
- 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
|
@@ -1,441 +0,0 @@
|
|
|
1
|
-
export const docsComponentsTemplate = `
|
|
2
|
-
"use client";
|
|
3
|
-
import { mq, Theme } from "@/app/theme";
|
|
4
|
-
import {
|
|
5
|
-
resetButton,
|
|
6
|
-
styledStrong,
|
|
7
|
-
styledText,
|
|
8
|
-
} from "cherry-styled-components/src/lib";
|
|
9
|
-
import Link from "next/link";
|
|
10
|
-
import { rgba } from "polished";
|
|
11
|
-
import React from "react";
|
|
12
|
-
import styled, { css } from "styled-components";
|
|
13
|
-
import { interactiveStyles } from "./SharedStyled";
|
|
14
|
-
|
|
15
|
-
interface DocsProps {
|
|
16
|
-
children: React.ReactNode;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const StyledDocsWrapper = styled.div<{ theme: Theme }>\`
|
|
20
|
-
position: relative;
|
|
21
|
-
\`;
|
|
22
|
-
|
|
23
|
-
const StyledDocsSidebar = styled.div<{ theme: Theme }>\`
|
|
24
|
-
position: sticky;
|
|
25
|
-
top: 90px;
|
|
26
|
-
min-width: 200px;
|
|
27
|
-
float: left;
|
|
28
|
-
z-index: 999;
|
|
29
|
-
|
|
30
|
-
\${mq("lg")} {
|
|
31
|
-
z-index: 2;
|
|
32
|
-
}
|
|
33
|
-
\`;
|
|
34
|
-
|
|
35
|
-
const StyledDocsContainer = styled.div<{ theme: Theme }>\`
|
|
36
|
-
position: relative;
|
|
37
|
-
padding: 0;
|
|
38
|
-
width: 100%;
|
|
39
|
-
|
|
40
|
-
\${mq("lg")} {
|
|
41
|
-
padding-left: 230px;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
& ul {
|
|
45
|
-
list-style: none;
|
|
46
|
-
padding: 0;
|
|
47
|
-
margin: 0;
|
|
48
|
-
|
|
49
|
-
& li {
|
|
50
|
-
text-indent: 0;
|
|
51
|
-
display: block;
|
|
52
|
-
position: relative;
|
|
53
|
-
padding: 0 0 0 15px;
|
|
54
|
-
margin: 0;
|
|
55
|
-
\${({ theme }) => styledText(theme)};
|
|
56
|
-
min-height: 23px;
|
|
57
|
-
|
|
58
|
-
$mq: "lg" {
|
|
59
|
-
min-height: 27px;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&::before {
|
|
63
|
-
content: "";
|
|
64
|
-
display: block;
|
|
65
|
-
width: 6px;
|
|
66
|
-
height: 6px;
|
|
67
|
-
border-radius: 50%;
|
|
68
|
-
background: \${({ theme }) => theme.colors.primary};
|
|
69
|
-
position: absolute;
|
|
70
|
-
top: 8px;
|
|
71
|
-
left: 2px;
|
|
72
|
-
|
|
73
|
-
\${mq("lg")} {
|
|
74
|
-
top: 10px;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
& ol {
|
|
81
|
-
padding: 0;
|
|
82
|
-
margin: 0;
|
|
83
|
-
|
|
84
|
-
& > li {
|
|
85
|
-
position: relative;
|
|
86
|
-
padding: 0;
|
|
87
|
-
counter-increment: item;
|
|
88
|
-
padding: 0;
|
|
89
|
-
margin: 0;
|
|
90
|
-
\${({ theme }) => styledText(theme)};
|
|
91
|
-
|
|
92
|
-
&::before {
|
|
93
|
-
content: counter(item) ".";
|
|
94
|
-
display: inline-block;
|
|
95
|
-
margin: 0 4px 0 0;
|
|
96
|
-
font-weight: 700;
|
|
97
|
-
color: \${({ theme }) => theme.colors.primary};
|
|
98
|
-
min-width: max-content;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
\`;
|
|
103
|
-
|
|
104
|
-
export const StyledMarkdownContainer = styled.div\`
|
|
105
|
-
display: flex;
|
|
106
|
-
flex-direction: column;
|
|
107
|
-
gap: 20px;
|
|
108
|
-
flex-wrap: wrap;
|
|
109
|
-
flex: 1;
|
|
110
|
-
\`;
|
|
111
|
-
|
|
112
|
-
interface Props {
|
|
113
|
-
theme?: Theme;
|
|
114
|
-
$isActive?: boolean;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export const StyledSidebar = styled.nav<Props>\`
|
|
118
|
-
position: fixed;
|
|
119
|
-
overflow-y: auto;
|
|
120
|
-
max-height: calc(100svh - 70px);
|
|
121
|
-
width: 100%;
|
|
122
|
-
background: \${({ theme }) => theme.colors.light};
|
|
123
|
-
z-index: 99;
|
|
124
|
-
top: 70px;
|
|
125
|
-
height: 100%;
|
|
126
|
-
padding: 20px 0;
|
|
127
|
-
opacity: 0;
|
|
128
|
-
pointer-events: none;
|
|
129
|
-
transition: all 0.3s ease;
|
|
130
|
-
transform: translateY(30px);
|
|
131
|
-
|
|
132
|
-
\${mq("lg")} {
|
|
133
|
-
width: 220px;
|
|
134
|
-
left: 20px;
|
|
135
|
-
background: transparent;
|
|
136
|
-
padding: 20px 20px 20px 0;
|
|
137
|
-
opacity: 1;
|
|
138
|
-
pointer-events: all;
|
|
139
|
-
transform: translateY(0);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
\${mq("xl")} {
|
|
143
|
-
width: 220px;
|
|
144
|
-
left: calc(50% - 610px);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
\${mq("xxl")} {
|
|
148
|
-
width: 220px;
|
|
149
|
-
left: calc(50% - 690px);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
\${({ $isActive }) =>
|
|
153
|
-
$isActive &&
|
|
154
|
-
css\`
|
|
155
|
-
transform: translateY(0);
|
|
156
|
-
opacity: 1;
|
|
157
|
-
pointer-events: all;
|
|
158
|
-
\`}
|
|
159
|
-
\`;
|
|
160
|
-
|
|
161
|
-
export const StyledSidebarList = styled.ul\`
|
|
162
|
-
list-style: none;
|
|
163
|
-
margin: 0;
|
|
164
|
-
padding: 0;
|
|
165
|
-
\`;
|
|
166
|
-
|
|
167
|
-
export const StyledStrong = styled.strong<{ theme: Theme }>\`
|
|
168
|
-
font-weight: 600;
|
|
169
|
-
\${({ theme }) => styledStrong(theme)};
|
|
170
|
-
\`;
|
|
171
|
-
|
|
172
|
-
export const StyledSidebarListItem = styled.li\`
|
|
173
|
-
display: flex;
|
|
174
|
-
gap: 10px;
|
|
175
|
-
clear: both;
|
|
176
|
-
\`;
|
|
177
|
-
|
|
178
|
-
export const StyledSidebarListItemLink = styled(Link)<Props>\`
|
|
179
|
-
text-decoration: none;
|
|
180
|
-
font-size: \${({ theme }) => theme.fontSizes.strong.xs};
|
|
181
|
-
line-height: 2.1;
|
|
182
|
-
color: \${({ theme }) =>
|
|
183
|
-
theme.isDark ? theme.colors.grayDark : theme.colors.primary};
|
|
184
|
-
padding: 0 0 0 20px;
|
|
185
|
-
display: flex;
|
|
186
|
-
transition: all 0.3s ease;
|
|
187
|
-
border-left: solid 1px \${({ theme }) => theme.colors.grayLight};
|
|
188
|
-
|
|
189
|
-
\${mq("lg")} {
|
|
190
|
-
font-size: \${({ theme }) => theme.fontSizes.strong.lg};
|
|
191
|
-
line-height: 2.1;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
@media (hover: hover) {
|
|
195
|
-
&:hover {
|
|
196
|
-
color: \${({ theme }) =>
|
|
197
|
-
theme.isDark ? theme.colors.primaryLight : theme.colors.primaryDark};
|
|
198
|
-
border-color: \${({ theme }) => theme.colors.info};
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
\${({ $isActive, theme }) =>
|
|
203
|
-
$isActive &&
|
|
204
|
-
\`
|
|
205
|
-
color: \${theme.colors.dark};
|
|
206
|
-
border-color: \${theme.colors.info};
|
|
207
|
-
font-weight: 600;
|
|
208
|
-
\`};
|
|
209
|
-
\`;
|
|
210
|
-
|
|
211
|
-
export const StyleMobileBar = styled.button<Props>\`
|
|
212
|
-
\${resetButton};
|
|
213
|
-
position: fixed;
|
|
214
|
-
z-index: 1000;
|
|
215
|
-
bottom: 0;
|
|
216
|
-
right: 20px;
|
|
217
|
-
font-size: \${({ theme }) => theme.fontSizes.strong.lg};
|
|
218
|
-
line-height: \${({ theme }) => theme.fontSizes.strong.lg};
|
|
219
|
-
box-shadow: \${({ theme }) => theme.shadows.sm};
|
|
220
|
-
background: \${({ theme }) =>
|
|
221
|
-
theme.isDark
|
|
222
|
-
? rgba(theme.colors.grayLight, 0.7)
|
|
223
|
-
: rgba(theme.colors.light, 0.7)};
|
|
224
|
-
color: \${({ theme }) =>
|
|
225
|
-
theme.isDark ? theme.colors.dark : theme.colors.primary};
|
|
226
|
-
backdrop-filter: blur(10px);
|
|
227
|
-
-webkit-backdrop-filter: blur(10px);
|
|
228
|
-
padding: 30px;
|
|
229
|
-
border-radius: 100px;
|
|
230
|
-
margin: 0 0 20px 0;
|
|
231
|
-
font-weight: 600;
|
|
232
|
-
display: flex;
|
|
233
|
-
justify-content: flex-start;
|
|
234
|
-
width: auto;
|
|
235
|
-
|
|
236
|
-
\${mq("lg")} {
|
|
237
|
-
display: none;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
\${({ $isActive }) => $isActive && \`position: fixed; \`};
|
|
241
|
-
\`;
|
|
242
|
-
|
|
243
|
-
export const StyledMobileBurger = styled.span<Props>\`
|
|
244
|
-
display: block;
|
|
245
|
-
margin: auto 0;
|
|
246
|
-
width: 18px;
|
|
247
|
-
height: 18px;
|
|
248
|
-
position: relative;
|
|
249
|
-
overflow: hidden;
|
|
250
|
-
background: transparent;
|
|
251
|
-
position: relative;
|
|
252
|
-
|
|
253
|
-
&::before,
|
|
254
|
-
&::after {
|
|
255
|
-
content: "";
|
|
256
|
-
display: block;
|
|
257
|
-
position: absolute;
|
|
258
|
-
width: 18px;
|
|
259
|
-
height: 3px;
|
|
260
|
-
border-radius: 3px;
|
|
261
|
-
background: \${({ theme }) =>
|
|
262
|
-
theme.isDark ? theme.colors.dark : theme.colors.primary};
|
|
263
|
-
transition: all 0.3s ease;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
&::before {
|
|
267
|
-
top: 3px;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
&::after {
|
|
271
|
-
bottom: 3px;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
\${({ $isActive }) =>
|
|
275
|
-
$isActive &&
|
|
276
|
-
css\`
|
|
277
|
-
&::before {
|
|
278
|
-
transform: translateY(5px) rotate(45deg);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
&::after {
|
|
282
|
-
transform: translateY(-4px) rotate(-45deg);
|
|
283
|
-
}
|
|
284
|
-
\`};
|
|
285
|
-
\`;
|
|
286
|
-
|
|
287
|
-
export const StyledInlineButton = styled.button<{ theme: Theme }>\`
|
|
288
|
-
\${resetButton};
|
|
289
|
-
\${interactiveStyles};
|
|
290
|
-
color: \${({ theme }) => theme.colors.primary};
|
|
291
|
-
vertical-align: middle;
|
|
292
|
-
border: solid 1px \${({ theme }) => theme.colors.grayLight};
|
|
293
|
-
border-radius: \${({ theme }) => theme.spacing.radius.xs};
|
|
294
|
-
padding: 0;
|
|
295
|
-
width: 18px;
|
|
296
|
-
height: 18px;
|
|
297
|
-
display: flex;
|
|
298
|
-
margin: auto 0;
|
|
299
|
-
transition: all 0.3s ease;
|
|
300
|
-
|
|
301
|
-
@media (hover: hover) {
|
|
302
|
-
&:hover {
|
|
303
|
-
color: \${({ theme }) => theme.colors.light};
|
|
304
|
-
background: \${({ theme }) => theme.colors.primary};
|
|
305
|
-
border-color: \${({ theme }) => theme.colors.primary};
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
& svg {
|
|
310
|
-
vertical-align: middle;
|
|
311
|
-
width: 12px;
|
|
312
|
-
height: 12px;
|
|
313
|
-
margin: auto;
|
|
314
|
-
}
|
|
315
|
-
\`;
|
|
316
|
-
|
|
317
|
-
export const StyledPlusButton = styled.button<{ theme: Theme }>\`
|
|
318
|
-
\${resetButton};
|
|
319
|
-
color: \${({ theme }) => theme.colors.primary};
|
|
320
|
-
vertical-align: middle;
|
|
321
|
-
padding: 0;
|
|
322
|
-
width: 100%;
|
|
323
|
-
height: 18px;
|
|
324
|
-
display: flex;
|
|
325
|
-
margin: auto 0;
|
|
326
|
-
transition: all 0.3s ease;
|
|
327
|
-
position: relative;
|
|
328
|
-
margin: 20px 0 0 0;
|
|
329
|
-
|
|
330
|
-
&::before {
|
|
331
|
-
content: "";
|
|
332
|
-
display: block;
|
|
333
|
-
position: absolute;
|
|
334
|
-
top: 50%;
|
|
335
|
-
transform: translateY(-50%);
|
|
336
|
-
width: 100%;
|
|
337
|
-
height: 1px;
|
|
338
|
-
border-radius: 3px;
|
|
339
|
-
background: \${({ theme }) => theme.colors.grayLight};
|
|
340
|
-
transition: all 0.3s ease;
|
|
341
|
-
z-index: -1;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
&::after {
|
|
345
|
-
content: "";
|
|
346
|
-
display: block;
|
|
347
|
-
position: absolute;
|
|
348
|
-
left: 50%;
|
|
349
|
-
top: 50%;
|
|
350
|
-
transform: translate(-50%, -50%);
|
|
351
|
-
width: 18px;
|
|
352
|
-
height: 18px;
|
|
353
|
-
border: solid 1px \${({ theme }) => theme.colors.grayLight};
|
|
354
|
-
border-radius: \${({ theme }) => theme.spacing.radius.xs};
|
|
355
|
-
background: \${({ theme }) => theme.colors.light};
|
|
356
|
-
transition: all 0.3s ease;
|
|
357
|
-
z-index: -1;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
box-shadow: 0 0 0 0px \${({ theme }) => theme.colors.primary};
|
|
361
|
-
|
|
362
|
-
@media (hover: hover) {
|
|
363
|
-
&:hover {
|
|
364
|
-
&::after {
|
|
365
|
-
border-color: \${({ theme }) => theme.colors.primary};
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
&:focus {
|
|
371
|
-
&::after {
|
|
372
|
-
border-color: \${({ theme }) => theme.colors.primary};
|
|
373
|
-
box-shadow: 0 0 0 4px \${({ theme }) => theme.colors.primaryLight};
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
&:active {
|
|
378
|
-
&::after {
|
|
379
|
-
box-shadow: 0 0 0 2px \${({ theme }) => theme.colors.primaryLight};
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
@media (hover: hover) {
|
|
384
|
-
&:hover {
|
|
385
|
-
color: \${({ theme }) => theme.colors.light};
|
|
386
|
-
|
|
387
|
-
&::after {
|
|
388
|
-
background: \${({ theme }) => theme.colors.primary};
|
|
389
|
-
border-color: \${({ theme }) => theme.colors.primary};
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
& svg {
|
|
395
|
-
vertical-align: middle;
|
|
396
|
-
width: 14px;
|
|
397
|
-
height: 14px;
|
|
398
|
-
margin: auto;
|
|
399
|
-
}
|
|
400
|
-
\`;
|
|
401
|
-
|
|
402
|
-
export const StyledFullHeightInput = styled.div\`
|
|
403
|
-
height: 100%;
|
|
404
|
-
width: 100%;
|
|
405
|
-
display: flex;
|
|
406
|
-
flex-direction: column;
|
|
407
|
-
gap: 20px;
|
|
408
|
-
flex: 1;
|
|
409
|
-
|
|
410
|
-
& > span {
|
|
411
|
-
height: 100%;
|
|
412
|
-
width: 100%;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
& textarea {
|
|
416
|
-
height: 100%;
|
|
417
|
-
}
|
|
418
|
-
\`;
|
|
419
|
-
|
|
420
|
-
export const StyledEditorWrapper = styled.div\`
|
|
421
|
-
flex: 1;
|
|
422
|
-
|
|
423
|
-
&:empty {
|
|
424
|
-
display: none;
|
|
425
|
-
}
|
|
426
|
-
\`;
|
|
427
|
-
|
|
428
|
-
function DocsWrapper({ children }: DocsProps) {
|
|
429
|
-
return <StyledDocsWrapper>{children}</StyledDocsWrapper>;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
function DocsSidebar({ children }: DocsProps) {
|
|
433
|
-
return <StyledDocsSidebar>{children}</StyledDocsSidebar>;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
function DocsContainer({ children }: DocsProps) {
|
|
437
|
-
return <StyledDocsContainer>{children}</StyledDocsContainer>;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
export { DocsWrapper, DocsSidebar, DocsContainer };
|
|
441
|
-
`;
|
package/dist/templates/docs.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const docsTemplate = "\n\"use client\";\nimport { useState } from \"react\";\nimport Link from 'next/link';\nimport { usePathname } from \"next/navigation\";\nimport { Container, Flex, Space } from \"cherry-styled-components/src/lib\";\nimport Markdown from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\nimport { Code } from \"@/app/components/layout/Code\";\nimport { \n DocsWrapper,\n DocsSidebar,\n DocsContainer,\n StyledMarkdownContainer,\n StyledSidebar,\n StyledSidebarList,\n StyledSidebarListItem,\n StyledStrong,\n StyledSidebarListItemLink,\n StyleMobileBar,\n StyledMobileBurger\n} from \"@/app/components/layout/DocsComponents\";\n \nfunction Docs({content, result}) {\n const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);\n const pathname = usePathname();\n console.log(result, \"-\".repeat(100));\n return (\n <Container $padding={20}>\n <DocsWrapper>\n <DocsSidebar>\n <StyleMobileBar\n onClick={() => setIsMobileMenuOpen(!isMobileMenuOpen)}\n $isActive={isMobileMenuOpen}\n >\n <StyledMobileBurger $isActive={isMobileMenuOpen} />\n </StyleMobileBar>\n\n <StyledSidebar $isActive={isMobileMenuOpen}>\n <StyledSidebarList>\n {result && result.map((item: any, index: number) => {\n return (\n <div key={index}>\n <StyledSidebarListItem>\n <StyledStrong>{item.label}</StyledStrong>{\" \"}\n </StyledSidebarListItem>\n <Space $size={20} />\n {item.links &&\n item.links.map((link: any, indexChild: number) => {\n return (\n <StyledSidebarListItem key={indexChild}>\n <StyledSidebarListItemLink\n href={`/${link.slug}`}\n $isActive={\n pathname ===\n `/${link.slug}`\n }\n onClick={() => setIsMobileMenuOpen(false)}\n >\n {link.title}\n </StyledSidebarListItemLink>\n </StyledSidebarListItem>\n );\n })}\n <Space $size={20} />\n </div>\n );\n })}\n </StyledSidebarList>\n </StyledSidebar>\n </DocsSidebar>\n <DocsContainer>\n <Flex $gap={20}>\n <StyledMarkdownContainer>\n {content && (\n <Markdown\n remarkPlugins={[remarkGfm]}\n components={{\n code(props) {\n const { children, className, node, ...rest } = props;\n const match = /language-(\\w+)/.exec(className || \"\");\n return match ? (\n <Code\n {...rest}\n className={className}\n code={String(children).replace(/\\n$/, \"\")}\n />\n ) : (\n <code {...rest} className={className}>\n {children}\n </code>\n );\n },\n }}\n >\n {content}\n </Markdown>\n )}\n </StyledMarkdownContainer>\n </Flex>\n </DocsContainer>\n </DocsWrapper>\n </Container>\n );\n}\n\nexport { Docs };\n";
|
package/dist/templates/docs.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export const docsTemplate = `"use client";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { Flex } from "cherry-styled-components/src/lib";
|
|
4
|
-
import Markdown from "react-markdown";
|
|
5
|
-
import remarkGfm from "remark-gfm";
|
|
6
|
-
import { Code } from "@/app/components/layout/Code";
|
|
7
|
-
import {
|
|
8
|
-
DocsContainer,
|
|
9
|
-
StyledMarkdownContainer,
|
|
10
|
-
} from "@/app/components/layout/DocsComponents";
|
|
11
|
-
|
|
12
|
-
function Docs({content, result}) {
|
|
13
|
-
return (
|
|
14
|
-
<DocsContainer>
|
|
15
|
-
<Flex $gap={20}>
|
|
16
|
-
<StyledMarkdownContainer>
|
|
17
|
-
{content && (
|
|
18
|
-
<Markdown
|
|
19
|
-
remarkPlugins={[remarkGfm]}
|
|
20
|
-
components={{
|
|
21
|
-
code(props) {
|
|
22
|
-
const { children, className, node, ...rest } = props;
|
|
23
|
-
const match = /language-(\\w+)/.exec(className || "");
|
|
24
|
-
return match ? (
|
|
25
|
-
<Code
|
|
26
|
-
{...rest}
|
|
27
|
-
className={className}
|
|
28
|
-
code={String(children).replace(/\\n\$/, "")}
|
|
29
|
-
/>
|
|
30
|
-
) : (
|
|
31
|
-
<code {...rest} className={className}>
|
|
32
|
-
{children}
|
|
33
|
-
</code>
|
|
34
|
-
);
|
|
35
|
-
},
|
|
36
|
-
}}
|
|
37
|
-
>
|
|
38
|
-
{content}
|
|
39
|
-
</Markdown>
|
|
40
|
-
)}
|
|
41
|
-
</StyledMarkdownContainer>
|
|
42
|
-
</Flex>
|
|
43
|
-
</DocsContainer>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export { Docs };
|
|
48
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const fieldsMdxTemplate = "---\ntitle: \"Fields\"\ndescription: \"This is my first Doccupine project\"\ndate: \"2025-01-15\"\ncategory: \"Components\"\ncategoryOrder: 0\norder: 9\n---\n# Fields\n\nConfigure parameters for your API or SDK documentation.\n\nFields allow you to describe both the **inputs** (parameters) and **outputs** (responses) of your API. The main field component is available: `Field` for parameters and for responses.\n\n## Fields Usage\n\nUse the `<Field>` component to declare API or SDK parameters, or define the return values of an API.\n\n<Field value=\"param\" type=\"string\" required>\n Example definition of a parameter field.\n</Field>\n\n\n```text\n<Field value=\"param\" type=\"string\" required>\n Example definition of a parameter field.\n</Field>\n```\n\n## Properties\n\n<Field value=\"value\" type=\"string\" required>\n The name of the field.\n</Field>\n\n<Field value=\"type\" type=\"string\" required>\n The type of the field.\n</Field>\n\n<Field value=\"required\" type=\"boolean\">\n Whether the field is required.\n</Field>";
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export const fieldsMdxTemplate = `---
|
|
2
|
-
title: "Fields"
|
|
3
|
-
description: "This is my first Doccupine project"
|
|
4
|
-
date: "2025-01-15"
|
|
5
|
-
category: "Components"
|
|
6
|
-
categoryOrder: 0
|
|
7
|
-
order: 9
|
|
8
|
-
---
|
|
9
|
-
# Fields
|
|
10
|
-
|
|
11
|
-
Configure parameters for your API or SDK documentation.
|
|
12
|
-
|
|
13
|
-
Fields allow you to describe both the **inputs** (parameters) and **outputs** (responses) of your API. The main field component is available: \`Field\` for parameters and for responses.
|
|
14
|
-
|
|
15
|
-
## Fields Usage
|
|
16
|
-
|
|
17
|
-
Use the \`<Field>\` component to declare API or SDK parameters, or define the return values of an API.
|
|
18
|
-
|
|
19
|
-
<Field value="param" type="string" required>
|
|
20
|
-
Example definition of a parameter field.
|
|
21
|
-
</Field>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
\`\`\`text
|
|
25
|
-
<Field value="param" type="string" required>
|
|
26
|
-
Example definition of a parameter field.
|
|
27
|
-
</Field>
|
|
28
|
-
\`\`\`
|
|
29
|
-
|
|
30
|
-
## Properties
|
|
31
|
-
|
|
32
|
-
<Field value="value" type="string" required>
|
|
33
|
-
The name of the field.
|
|
34
|
-
</Field>
|
|
35
|
-
|
|
36
|
-
<Field value="type" type="string" required>
|
|
37
|
-
The type of the field.
|
|
38
|
-
</Field>
|
|
39
|
-
|
|
40
|
-
<Field value="required" type="boolean">
|
|
41
|
-
Whether the field is required.
|
|
42
|
-
</Field>`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const footerTemplate = "\n\"use client\";\nimport React from \"react\";\n\nfunction Footer() {\n return <footer> </footer>;\n}\nexport { Footer };\n";
|
package/dist/templates/footer.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const headerTemplate = "\n\"use client\";\nimport Image from \"next/image\";\nimport {\n Flex,\n MaxWidth,\n resetButton,\n styledText,\n} from \"cherry-styled-components/src/lib\";\nimport React, { useCallback, useContext, useRef, useState } from \"react\";\nimport styled, { css } from \"styled-components\";\nimport Link from \"next/link\";\nimport { mq, Theme } from \"@/app/theme\";\nimport { ToggleTheme } from \"@/app/components/layout/ThemeToggle\";\nimport {\n StyledDataArrowButton,\n StyledDataDropdown,\n StyledDataDropdownItem,\n StyledDataDropdownWrapper,\n StyledDataUserAvatar,\n StyledDesktopOnly,\n StyledMobileOnly,\n StyledTinyDesktopOnly,\n StyledTinyMobileOnly,\n} from \"@/app/components/layout/SharedStyled\";\nimport { Icon } from \"@/app/components/layout/Icon\";\nimport { useOnClickOutside } from \"@/app/components/ClickOutside\";\nimport { LinkButton } from \"@/app/components/layout/LinkButton\";\nimport { Logo } from \"@/app/components/layout/Pictograms\";\nimport { rgba } from \"polished\";\n\nconst StyledHeader = styled.header<{ theme: Theme }>`\n position: sticky;\n top: 0;\n padding: 20px;\n margin: 0;\n z-index: 1000;\n\n &::before,\n &::after {\n display: block;\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n background: ${({ theme }) => theme.colors.light};\n z-index: -2;\n }\n\n &::after {\n background: ${({ theme }) => rgba(theme.colors.primaryLight, 0.1)};\n z-index: -1;\n }\n\n & .logo {\n display: flex;\n\n & svg {\n margin: auto;\n }\n }\n`;\n\nconst StyledLink = styled(Link)<{ theme: Theme }>`\n text-decoration: none;\n margin: auto 0;\n color: ${({ theme }) => theme.colors.primary};\n font-weight: 500;\n\n @media (hover: hover) {\n &:hover {\n color: ${({ theme }) => theme.colors.primaryDark};\n }\n }\n`;\n\nexport const StyledMobileBurger = styled.button<{\n theme: Theme;\n $isActive: boolean;\n}>`\n ${resetButton};\n display: block;\n margin: auto 0;\n width: 18px;\n height: 18px;\n position: relative;\n overflow: hidden;\n background: transparent;\n position: relative;\n\n ${mq(\"lg\")} {\n display: none;\n }\n\n &::before,\n &::after {\n content: \"\";\n display: block;\n position: absolute;\n width: 18px;\n height: 2px;\n border-radius: 3px;\n background: ${({ theme }) => theme.colors.primary};\n transition: all 0.3s ease;\n }\n\n &::before {\n top: 4px;\n }\n\n &::after {\n bottom: 4px;\n }\n\n ${({ $isActive }) =>\n $isActive &&\n css`\n &::before {\n transform: translateY(4px) rotate(45deg);\n }\n\n &::after {\n transform: translateY(-4px) rotate(-45deg);\n }\n `};\n`;\n\nconst StyledMobileMenu = styled.ul<{ theme: Theme; $isActive: boolean }>`\n list-style: none;\n padding: 70px 0 0 0;\n margin: 0;\n position: fixed;\n top: 0;\n left: 0;\n background: ${({ theme }) => theme.colors.light};\n pointer-events: none;\n opacity: 0;\n width: 100%;\n height: 100dvh;\n transition: all 0.3s ease;\n z-index: 800;\n transform: translateY(40px) scale(1.2);\n display: block;\n\n ${({ $isActive }) =>\n $isActive &&\n css`\n pointer-events: all;\n opacity: 1;\n transform: translateY(0) scale(1);\n `};\n\n & li {\n display: block;\n width: 100%;\n padding: 0;\n margin: 0;\n border-bottom: solid 1px ${({ theme }) => theme.colors.grayLight};\n\n &.languages {\n display: flex;\n justify-content: center;\n gap: 10px;\n }\n\n & a,\n & button {\n ${({ theme }) => styledText(theme)};\n font-family: ${({ theme }) => theme.fonts.text};\n font-weight: 500;\n appearance: none;\n background: transparent;\n border: none;\n color: ${({ theme }) => theme.colors.dark};\n display: flex;\n margin: 0;\n padding: 20px;\n font-weight: 500;\n text-decoration: none;\n cursor: pointer;\n }\n\n & button {\n flex: 1;\n border-right: solid 1px ${({ theme }) => theme.colors.grayLight};\n text-align: center;\n justify-content: center;\n\n &:last-of-type {\n border-right: none;\n }\n }\n }\n`;\n\nconst StyledMenu = styled.div<{ theme: Theme }>`\n display: none;\n\n ${mq(\"lg\")} {\n display: flex;\n gap: 20px;\n }\n`;\n\nconst StyledDivider = styled.div<{ theme: Theme }>`\n width: 1px;\n height: calc(100% - 10px);\n margin: auto 0;\n background: ${({ theme }) => theme.colors.grayLight};\n`;\n\nfunction Header() {\n const [isOptionActive, setIsOptionActive] = useState(false);\n const [isLangActive, setIsLangActive] = useState(false);\n const [isMobileMenuActive, setIsMobileMenuActive] = useState(false);\n\n const wrapperRef = useRef<HTMLSpanElement>(null);\n const elmRef = useRef<HTMLDivElement>(null);\n const langRef = useRef<HTMLSpanElement>(null);\n const closeMenu = useCallback(() => {\n setIsOptionActive(false);\n setIsLangActive(false);\n }, []);\n\n useOnClickOutside(\n [elmRef, wrapperRef],\n isOptionActive ? closeMenu : () => {},\n );\n useOnClickOutside([langRef, wrapperRef], isLangActive ? closeMenu : () => {});\n\n return (\n <>\n <StyledHeader>\n <MaxWidth $size={1000}>\n <Flex $justifyContent=\"space-between\" $wrap=\"nowrap\">\n <Link href=\"/\" className=\"logo\" aria-label=\"Logo\">\n <StyledTinyDesktopOnly>\n <Logo />\n </StyledTinyDesktopOnly>\n <StyledTinyMobileOnly>\n <Logo />\n </StyledTinyMobileOnly>\n </Link>\n <span ref={wrapperRef}>\n <Flex $gap={20} $wrap=\"wrap\">\n <StyledMenu>\n <StyledLink href=\"/\">\n Doccupine\n </StyledLink>\n </StyledMenu>\n <ToggleTheme />\n <StyledMobileBurger\n $isActive={isMobileMenuActive}\n onClick={() => setIsMobileMenuActive(!isMobileMenuActive)}\n aria-label=\"Burger Menu\"\n />\n </Flex>\n </span>\n </Flex>\n </MaxWidth>\n </StyledHeader>\n <StyledMobileMenu $isActive={isMobileMenuActive}>\n <li onClick={() => setIsMobileMenuActive(false)}>\n <Link href=\"/\">Doccupine</Link>\n </li>\n </StyledMobileMenu>\n </>\n );\n}\n\nexport { Header };\n";
|