@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docubook/create",
3
- "version": "1.15.2",
3
+ "version": "1.15.3",
4
4
  "description": "CLI to create DocuBook projects",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -2,7 +2,7 @@
2
2
  "DocuImage": {
3
3
  "prefix": "image",
4
4
  "body": [
5
- "![${1:Alt text for the image}](${2:https://via.placeholder.com/150})"
5
+ "![${1:Alt text for the image}](${2:/images/example-img.png})"
6
6
  ],
7
7
  "description": "Snippet untuk menampilkan image komponen."
8
8
  },
@@ -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
- className?: string;
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
- className,
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", className)}>
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 my-auto space-x-2 space-y-2 w-full px-4 h-12 transition-colors bg-background dark:hover:bg-muted/50 hover:bg-muted/15"
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
- <h3 className="font-medium text-base text-foreground pb-2">{title}</h3>
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
- ![Alt text for the image](https://via.placeholder.com/150)
45
+ ![Alt text for the image](/images/example-img.png)
46
46
  ```
47
47
 
48
48
  render as :
49
- ![Alt text for the image](https://via.placeholder.com/150)
49
+ ![Alt text for the image](/images/example-img.png)
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
- ![Alt text for the image](https://via.placeholder.com/150)
45
+ ![Alt text for the image](/images/example-img.png)
46
46
  ```
47
47
 
48
48
  render as :
49
- ![Alt text for the image](https://via.placeholder.com/150)
49
+ ![Alt text for the image](/images/example-img.png)
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
- ![Alt text for the image](https://via.placeholder.com/150)
45
+ ![Alt text for the image](/images/example-img.png)
46
46
  ```
47
47
 
48
48
  render as :
49
- ![Alt text for the image](https://via.placeholder.com/150)
49
+ ![Alt text for the image](/images/example-img.png)
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
- ![Alt text for the image](https://via.placeholder.com/150)
45
+ ![Alt text for the image](/images/example-img.png)
46
46
  ```
47
47
 
48
48
  render as :
49
- ![Alt text for the image](https://via.placeholder.com/150)
49
+ ![Alt text for the image](/images/example-img.png)
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
- ![Alt text for the image](https://via.placeholder.com/150)
45
+ ![Alt text for the image](/images/example-img.png)
46
46
  ```
47
47
 
48
48
  render as :
49
- ![Alt text for the image](https://via.placeholder.com/150)
49
+ ![Alt text for the image](/images/example-img.png)
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
- ![Alt text for the image](https://via.placeholder.com/150)
45
+ ![Alt text for the image](/images/example-img.png)
46
46
  ```
47
47
 
48
48
  render as :
49
- ![Alt text for the image](https://via.placeholder.com/150)
49
+ ![Alt text for the image](/images/example-img.png)
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
- ![Alt text for the image](https://via.placeholder.com/150)
45
+ ![Alt text for the image](/images/example-img.png)
46
46
  ```
47
47
 
48
48
  render as :
49
- ![Alt text for the image](https://via.placeholder.com/150)
49
+ ![Alt text for the image](/images/example-img.png)
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
 
@@ -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": "/Changelog",
94
+ "href": "/changelog",
102
95
  "noLink": true,
103
96
  "context": {
104
- "icon": "Hystory",
97
+ "icon": "History",
105
98
  "description": "Update and Changes",
106
99
  "title": "Release"
107
100
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docubook",
3
- "version": "1.15.2",
3
+ "version": "1.15.3",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "next dev",