@docubook/create 1.15.2 → 1.15.3
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/package.json +1 -1
- package/src/dist/.vscode/image-link.code-snippets +1 -1
- package/src/dist/components/markdown/AccordionMdx.tsx +10 -6
- package/src/dist/contents/docs/api-reference/delete/index.mdx +2 -2
- package/src/dist/contents/docs/api-reference/fetch/index.mdx +2 -2
- package/src/dist/contents/docs/api-reference/get/index.mdx +2 -2
- package/src/dist/contents/docs/api-reference/post/index.mdx +2 -2
- package/src/dist/contents/docs/getting-started/development/index.mdx +2 -2
- package/src/dist/contents/docs/getting-started/introduction/index.mdx +14 -3
- package/src/dist/contents/docs/getting-started/quick-start-guide/index.mdx +2 -2
- package/src/dist/docu.json +3 -10
- package/src/dist/package.json +1 -1
package/package.json
CHANGED
|
@@ -2,29 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
import { ReactNode, useState } from 'react';
|
|
4
4
|
import { ChevronRight } from 'lucide-react';
|
|
5
|
+
import * as Icons from "lucide-react";
|
|
5
6
|
import { cn } from '@/lib/utils';
|
|
6
7
|
|
|
7
8
|
type AccordionProps = {
|
|
8
9
|
title: string;
|
|
9
10
|
children?: ReactNode;
|
|
10
11
|
defaultOpen?: boolean;
|
|
11
|
-
|
|
12
|
+
icon?: keyof typeof Icons;
|
|
12
13
|
};
|
|
13
14
|
|
|
14
|
-
const Accordion = ({
|
|
15
|
+
const Accordion: React.FC<AccordionProps> = ({
|
|
15
16
|
title,
|
|
16
17
|
children,
|
|
17
18
|
defaultOpen = false,
|
|
18
|
-
|
|
19
|
+
icon,
|
|
19
20
|
}: AccordionProps) => {
|
|
20
21
|
const [isOpen, setIsOpen] = useState(defaultOpen);
|
|
21
22
|
|
|
23
|
+
const Icon = icon ? (Icons[icon] as React.FC<{ className?: string }>) : null;
|
|
24
|
+
|
|
22
25
|
return (
|
|
23
|
-
<div className={cn("border rounded-lg overflow-hidden"
|
|
26
|
+
<div className={cn("border rounded-lg overflow-hidden")}>
|
|
24
27
|
<button
|
|
25
28
|
type="button"
|
|
26
29
|
onClick={() => setIsOpen(!isOpen)}
|
|
27
|
-
className="flex items-center
|
|
30
|
+
className="flex items-center space-x-2 w-full px-4 h-12 transition-colors bg-background dark:hover:bg-muted/50 hover:bg-muted/15"
|
|
28
31
|
>
|
|
29
32
|
<ChevronRight
|
|
30
33
|
className={cn(
|
|
@@ -32,7 +35,8 @@ const Accordion = ({
|
|
|
32
35
|
isOpen && "rotate-90"
|
|
33
36
|
)}
|
|
34
37
|
/>
|
|
35
|
-
<
|
|
38
|
+
{Icon && <Icon className="text-foreground w-4 h-4"/> }
|
|
39
|
+
<h3 className="font-medium text-base text-foreground m-0">{title}</h3>
|
|
36
40
|
</button>
|
|
37
41
|
|
|
38
42
|
{isOpen && (
|
|
@@ -42,11 +42,11 @@ example note :
|
|
|
42
42
|
displaying an image in markdown format :
|
|
43
43
|
|
|
44
44
|
```plaintext
|
|
45
|
-

|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
render as :
|
|
49
|
-

|
|
50
50
|
|
|
51
51
|
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
|
52
52
|
|
|
@@ -42,11 +42,11 @@ example note :
|
|
|
42
42
|
displaying an image in markdown format :
|
|
43
43
|
|
|
44
44
|
```plaintext
|
|
45
|
-

|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
render as :
|
|
49
|
-

|
|
50
50
|
|
|
51
51
|
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
|
52
52
|
|
|
@@ -42,11 +42,11 @@ example note :
|
|
|
42
42
|
displaying an image in markdown format :
|
|
43
43
|
|
|
44
44
|
```plaintext
|
|
45
|
-

|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
render as :
|
|
49
|
-

|
|
50
50
|
|
|
51
51
|
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
|
52
52
|
|
|
@@ -42,11 +42,11 @@ example note :
|
|
|
42
42
|
displaying an image in markdown format :
|
|
43
43
|
|
|
44
44
|
```plaintext
|
|
45
|
-

|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
render as :
|
|
49
|
-

|
|
50
50
|
|
|
51
51
|
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
|
52
52
|
|
|
@@ -42,11 +42,11 @@ example note :
|
|
|
42
42
|
displaying an image in markdown format :
|
|
43
43
|
|
|
44
44
|
```plaintext
|
|
45
|
-

|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
render as :
|
|
49
|
-

|
|
50
50
|
|
|
51
51
|
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
|
52
52
|
|
|
@@ -42,11 +42,11 @@ example note :
|
|
|
42
42
|
displaying an image in markdown format :
|
|
43
43
|
|
|
44
44
|
```plaintext
|
|
45
|
-

|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
render as :
|
|
49
|
-

|
|
50
50
|
|
|
51
51
|
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
|
52
52
|
|
|
@@ -60,4 +60,15 @@ date : 10-12-2024
|
|
|
60
60
|
image : example-img.png
|
|
61
61
|
---
|
|
62
62
|
```
|
|
63
|
-
</Note>
|
|
63
|
+
</Note>
|
|
64
|
+
|
|
65
|
+
<Accordion title="Code Block" defaultOpen={true} icon="Code">
|
|
66
|
+
```javascript:main.js showLineNumbers {3-4}
|
|
67
|
+
function isRocketAboutToCrash() {
|
|
68
|
+
// Check if the rocket is stable
|
|
69
|
+
if (!isStable()) {
|
|
70
|
+
NoCrash(); // Prevent the crash
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
</Accordion>
|
|
@@ -42,11 +42,11 @@ example note :
|
|
|
42
42
|
displaying an image in markdown format :
|
|
43
43
|
|
|
44
44
|
```plaintext
|
|
45
|
-

|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
render as :
|
|
49
|
-

|
|
50
50
|
|
|
51
51
|
For a complete guide on using markdown content in DocuBook, please refer to the [Components](https://docubook.pro/docs/components) page.
|
|
52
52
|
|
package/src/dist/docu.json
CHANGED
|
@@ -70,14 +70,7 @@
|
|
|
70
70
|
"items": [
|
|
71
71
|
{ "title": "Introduction", "href": "/introduction" },
|
|
72
72
|
{ "title": "Quick Start Guide", "href": "/quick-start-guide" },
|
|
73
|
-
{ "title": "Development", "href": "/development" }
|
|
74
|
-
{
|
|
75
|
-
"title": "Config",
|
|
76
|
-
"href": "/config",
|
|
77
|
-
"items": [
|
|
78
|
-
{ "title": "Sub Config", "href": "/subconfig" }
|
|
79
|
-
]
|
|
80
|
-
}
|
|
73
|
+
{ "title": "Development", "href": "/development" }
|
|
81
74
|
]
|
|
82
75
|
},
|
|
83
76
|
{
|
|
@@ -98,10 +91,10 @@
|
|
|
98
91
|
},
|
|
99
92
|
{
|
|
100
93
|
"title": "Changelog",
|
|
101
|
-
"href": "/
|
|
94
|
+
"href": "/changelog",
|
|
102
95
|
"noLink": true,
|
|
103
96
|
"context": {
|
|
104
|
-
"icon": "
|
|
97
|
+
"icon": "History",
|
|
105
98
|
"description": "Update and Changes",
|
|
106
99
|
"title": "Release"
|
|
107
100
|
},
|