@docubook/create 1.11.3 → 1.12.0

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/bun.lock ADDED
@@ -0,0 +1,102 @@
1
+ {
2
+ "lockfileVersion": 1,
3
+ "workspaces": {
4
+ "": {
5
+ "name": "@docubook/create",
6
+ "dependencies": {
7
+ "boxen": "^8.0.1",
8
+ "chalk": "^5.3.0",
9
+ "cli-progress": "^3.12.0",
10
+ "commander": "^12.1.0",
11
+ "enquirer": "^2.4.1",
12
+ "figlet": "^1.8.0",
13
+ "ora": "^8.1.0",
14
+ },
15
+ },
16
+ },
17
+ "packages": {
18
+ "ansi-align": ["ansi-align@3.0.1", "", { "dependencies": { "string-width": "^4.1.0" } }, "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w=="],
19
+
20
+ "ansi-colors": ["ansi-colors@4.1.3", "", {}, "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw=="],
21
+
22
+ "ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
23
+
24
+ "ansi-styles": ["ansi-styles@6.2.1", "", {}, "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug=="],
25
+
26
+ "boxen": ["boxen@8.0.1", "", { "dependencies": { "ansi-align": "^3.0.1", "camelcase": "^8.0.0", "chalk": "^5.3.0", "cli-boxes": "^3.0.0", "string-width": "^7.2.0", "type-fest": "^4.21.0", "widest-line": "^5.0.0", "wrap-ansi": "^9.0.0" } }, "sha512-F3PH5k5juxom4xktynS7MoFY+NUWH5LC4CnH11YB8NPew+HLpmBLCybSAEyb2F+4pRXhuhWqFesoQd6DAyc2hw=="],
27
+
28
+ "camelcase": ["camelcase@8.0.0", "", {}, "sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA=="],
29
+
30
+ "chalk": ["chalk@5.4.1", "", {}, "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w=="],
31
+
32
+ "cli-boxes": ["cli-boxes@3.0.0", "", {}, "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g=="],
33
+
34
+ "cli-cursor": ["cli-cursor@5.0.0", "", { "dependencies": { "restore-cursor": "^5.0.0" } }, "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw=="],
35
+
36
+ "cli-progress": ["cli-progress@3.12.0", "", { "dependencies": { "string-width": "^4.2.3" } }, "sha512-tRkV3HJ1ASwm19THiiLIXLO7Im7wlTuKnvkYaTkyoAPefqjNg7W7DHKUlGRxy9vxDvbyCYQkQozvptuMkGCg8A=="],
37
+
38
+ "cli-spinners": ["cli-spinners@2.9.2", "", {}, "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg=="],
39
+
40
+ "commander": ["commander@12.1.0", "", {}, "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="],
41
+
42
+ "emoji-regex": ["emoji-regex@10.4.0", "", {}, "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw=="],
43
+
44
+ "enquirer": ["enquirer@2.4.1", "", { "dependencies": { "ansi-colors": "^4.1.1", "strip-ansi": "^6.0.1" } }, "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ=="],
45
+
46
+ "figlet": ["figlet@1.8.1", "", { "bin": { "figlet": "bin/index.js" } }, "sha512-kEC3Sme+YvA8Hkibv0NR1oClGcWia0VB2fC1SlMy027cwe795Xx40Xiv/nw/iFAwQLupymWh+uhAAErn/7hwPg=="],
47
+
48
+ "get-east-asian-width": ["get-east-asian-width@1.3.0", "", {}, "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ=="],
49
+
50
+ "is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="],
51
+
52
+ "is-interactive": ["is-interactive@2.0.0", "", {}, "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ=="],
53
+
54
+ "is-unicode-supported": ["is-unicode-supported@2.1.0", "", {}, "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ=="],
55
+
56
+ "log-symbols": ["log-symbols@6.0.0", "", { "dependencies": { "chalk": "^5.3.0", "is-unicode-supported": "^1.3.0" } }, "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw=="],
57
+
58
+ "mimic-function": ["mimic-function@5.0.1", "", {}, "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA=="],
59
+
60
+ "onetime": ["onetime@7.0.0", "", { "dependencies": { "mimic-function": "^5.0.0" } }, "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ=="],
61
+
62
+ "ora": ["ora@8.2.0", "", { "dependencies": { "chalk": "^5.3.0", "cli-cursor": "^5.0.0", "cli-spinners": "^2.9.2", "is-interactive": "^2.0.0", "is-unicode-supported": "^2.0.0", "log-symbols": "^6.0.0", "stdin-discarder": "^0.2.2", "string-width": "^7.2.0", "strip-ansi": "^7.1.0" } }, "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw=="],
63
+
64
+ "restore-cursor": ["restore-cursor@5.1.0", "", { "dependencies": { "onetime": "^7.0.0", "signal-exit": "^4.1.0" } }, "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA=="],
65
+
66
+ "signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="],
67
+
68
+ "stdin-discarder": ["stdin-discarder@0.2.2", "", {}, "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ=="],
69
+
70
+ "string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="],
71
+
72
+ "strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
73
+
74
+ "type-fest": ["type-fest@4.41.0", "", {}, "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA=="],
75
+
76
+ "widest-line": ["widest-line@5.0.0", "", { "dependencies": { "string-width": "^7.0.0" } }, "sha512-c9bZp7b5YtRj2wOe6dlj32MK+Bx/M/d+9VB2SHM1OtsUHR0aV0tdP6DWh/iMt0kWi1t5g1Iudu6hQRNd1A4PVA=="],
77
+
78
+ "wrap-ansi": ["wrap-ansi@9.0.0", "", { "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", "strip-ansi": "^7.1.0" } }, "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q=="],
79
+
80
+ "ansi-align/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
81
+
82
+ "cli-progress/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
83
+
84
+ "log-symbols/is-unicode-supported": ["is-unicode-supported@1.3.0", "", {}, "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ=="],
85
+
86
+ "ora/strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="],
87
+
88
+ "string-width/strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="],
89
+
90
+ "wrap-ansi/strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="],
91
+
92
+ "ansi-align/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
93
+
94
+ "cli-progress/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
95
+
96
+ "ora/strip-ansi/ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="],
97
+
98
+ "string-width/strip-ansi/ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="],
99
+
100
+ "wrap-ansi/strip-ansi/ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="],
101
+ }
102
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docubook/create",
3
- "version": "1.11.3",
3
+ "version": "1.12.0",
4
4
  "main": "src/index.js",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,14 @@
1
+ {
2
+ "DocuAccordion": {
3
+ "prefix": "accordion",
4
+ "body": [
5
+ "<Accordion title=\"${1:Plain Text}\">",
6
+ " this is an example of plain text content from the accordion component and below is markdown ;",
7
+ " 1. number one",
8
+ " 2. number two",
9
+ " 3. number three",
10
+ "</Accordion>"
11
+ ],
12
+ "description": "Create a DocuAccordion component with markdown list."
13
+ }
14
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "DocuButton": {
3
+ "prefix": "button",
4
+ "body": [
5
+ "<Button",
6
+ " text=\"${1:Learn More}\"",
7
+ " href=\"${2:https://learn.example.com}\"",
8
+ " icon=\"${3:MoveUpRight}\"",
9
+ " size=\"${4:md}\"",
10
+ " target=\"${5:_blank}\"",
11
+ " variation=\"${6:primary}\"",
12
+ "/>"
13
+ ],
14
+ "description": "Create a DocuButton component on markdown."
15
+ }
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "DocuCards": {
3
+ "prefix": "card",
4
+ "body": [
5
+ "<CardGroup cols={2}>",
6
+ "<Card title=\"${1:Heading2}\" icon=\"${2:Heading2}\">",
7
+ " This is an example of card content with columns.",
8
+ "</Card>",
9
+ "<Card title=\"${3:Heading3}\" icon=\"${4:Heading3}\">",
10
+ " This is an example of card content with columns.",
11
+ "</Card>",
12
+ "</CardGroup>"
13
+ ],
14
+ "description": "Create a DocuCards component on markdown."
15
+ }
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "DocuCodeBlock": {
3
+ "prefix": "codeblock",
4
+ "description": "Checks if the rocket is stable and prevents a crash if it's not.",
5
+ "body": [
6
+ "```${1:javascript:main.js} showLineNumbers {${2:3-4}}",
7
+ "function isRocketAboutToCrash() {",
8
+ " // Check if the rocket is stable",
9
+ " if (!isStable()) {",
10
+ " NoCrash(); // Prevent the crash",
11
+ " }",
12
+ "}",
13
+ "```",
14
+ ],
15
+ }
16
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "recommendations": []
3
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "File Tree Component": {
3
+ "prefix": "filetree",
4
+ "body": [
5
+ "<Files>",
6
+ " <Folder name=\"${1:folder-name}\">",
7
+ " <File name=\"${2:file-name}\" />",
8
+ " <Folder name=\"${3:subfolder}\">",
9
+ " <File name=\"${4:file.tsx}\" />",
10
+ " </Folder>\n$0",
11
+ " </Folder>",
12
+ "</Files>"
13
+ ],
14
+ "description": "DocuBook File Tree component with nested structure"
15
+ },
16
+ "File Tree Minimal": {
17
+ "prefix": "filetree-mini",
18
+ "body": [
19
+ "<Files>\n <Folder name=\"${1:folder}\">\n <File name=\"${2:file}\" />\n </Folder>\n</Files>$0"
20
+ ],
21
+ "description": "Minimal DocuBook File Tree component"
22
+ },
23
+ "File Tree Complex": {
24
+ "prefix": "filetree-complex",
25
+ "body": [
26
+ "<Files>",
27
+ " <Folder name=\"${1:project-root}\">",
28
+ " <File name=\"package.json\" />",
29
+ " <File name=\"tsconfig.json\" />",
30
+ " <Folder name=\"src\">",
31
+ " <File name=\"index.ts\" />",
32
+ " <Folder name=\"components\">",
33
+ " <File name=\"${2:Component}.tsx\" />",
34
+ " <File name=\"${3:Component}.types.ts\" />",
35
+ " <File name=\"index.ts\" />",
36
+ " </Folder>\n$0",
37
+ " </Folder>",
38
+ " </Folder>",
39
+ "</Files>"
40
+ ],
41
+ "description": "Complex DocuBook File Tree with common project structure"
42
+ },
43
+ "File Tree Folder": {
44
+ "prefix": "folder",
45
+ "body": "<Folder name=\"${1:folder-name}\">\n $0\n</Folder>",
46
+ "description": "DocuBook Folder component for file trees"
47
+ },
48
+ "File Tree File": {
49
+ "prefix": "file",
50
+ "body": "<File name=\"${1:file-name}\" />$0",
51
+ "description": "DocuBook File component for file trees"
52
+ }
53
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "DocuImage": {
3
+ "prefix": "image",
4
+ "body": [
5
+ "![${1:Alt text for the image}](${2:https://via.placeholder.com/150})"
6
+ ],
7
+ "description": "Snippet untuk menampilkan image komponen."
8
+ },
9
+ "DocuLink": {
10
+ "prefix": "link",
11
+ "body": [
12
+ "[${1:Text Link}](${2:https://www.openai.com})"
13
+ ],
14
+ "description": "Snippet untuk menampilkan link komponen."
15
+ }
16
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "Keyboard - Mac": {
3
+ "prefix": "keymac",
4
+ "body": [
5
+ "<Kbd show=\"${1:ctrl}\" type=\"mac\" />"
6
+ ],
7
+ "description": "Mac keyboard shortcut."
8
+ },
9
+ "Keyboard - Windows": {
10
+ "prefix": "keywin",
11
+ "body": [
12
+ "<Kbd show=\"${1:ctrl}\" type=\"windows\" />"
13
+ ],
14
+ "description": "Windows keyboard shortcut."
15
+ },
16
+ "Keyboard - Custom": {
17
+ "prefix": "keycustom",
18
+ "body": [
19
+ "<Kbd show=\"${1:custom}\">${2:Custom}</Kbd>"
20
+ ],
21
+ "description": "Custom keyboard shortcut."
22
+ }
23
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "DocuMetadata": {
3
+ "prefix": "metadata",
4
+ "body": [
5
+ "---",
6
+ "title : ${1:judul post}",
7
+ "description : ${2:deskripsi singkat dari post}",
8
+ "date : ${3:10-12-2024}",
9
+ "---"
10
+ ],
11
+ "description": "Snippet untuk membuat metadata."
12
+ }
13
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "DocuNote - General Note": {
3
+ "prefix": "note",
4
+ "body": [
5
+ "<Note type=\"note\" title=\"Note\">",
6
+ " ${1:This is a general note to convey information to the user.}",
7
+ "</Note>"
8
+ ],
9
+ "description": "Insert a general note"
10
+ },
11
+ "DocuNote - Danger Note": {
12
+ "prefix": "danger",
13
+ "body": [
14
+ "<Note type=\"danger\" title=\"Danger\">",
15
+ " ${1:This is a danger alert to notify the user of a critical issue.}",
16
+ "</Note>"
17
+ ],
18
+ "description": "Insert a danger note"
19
+ },
20
+ "DocuNote - Warning Note": {
21
+ "prefix": "warning",
22
+ "body": [
23
+ "<Note type=\"warning\" title=\"Warning\">",
24
+ " ${1:This is a warning alert for issues that require attention.}",
25
+ "</Note>"
26
+ ],
27
+ "description": "Insert a warning note"
28
+ },
29
+ "DocuNote - Success Note": {
30
+ "prefix": "success",
31
+ "body": [
32
+ "<Note type=\"success\" title=\"Success\">",
33
+ " ${1:This is a success message to inform the user of successful actions.}",
34
+ "</Note>"
35
+ ],
36
+ "description": "Insert a success note"
37
+ }
38
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "Release Note Component": {
3
+ "prefix": "release",
4
+ "body": [
5
+ "<Release version=\"$1\" date=\"${2:$CURRENT_YEAR-${CURRENT_MONTH}-${CURRENT_DATE}}\" title=\"$3\">",
6
+ " <Changes type=\"added\">",
7
+ " - $4",
8
+ " </Changes>",
9
+ "",
10
+ " <Changes type=\"fixed\">",
11
+ " - $5",
12
+ " </Changes>",
13
+ "",
14
+ " <Changes type=\"improved\">",
15
+ " - $6",
16
+ " </Changes>",
17
+ "",
18
+ " <Changes type=\"deprecated\">",
19
+ " - $7",
20
+ " </Changes>",
21
+ "",
22
+ " <Changes type=\"removed\">",
23
+ " - $8",
24
+ " </Changes>",
25
+ "</Release>"
26
+ ],
27
+ "description": "DocuBook Release Note component with all change types"
28
+ },
29
+ "Release Note Simple": {
30
+ "prefix": "release-simple",
31
+ "body": [
32
+ "<Release version=\"$1\" date=\"${2:$CURRENT_YEAR-${CURRENT_MONTH}-${CURRENT_DATE}}\" title=\"$3\">",
33
+ " <Changes type=\"$4\">",
34
+ " - $5",
35
+ " </Changes>\n$0",
36
+ "</Release>"
37
+ ],
38
+ "description": "Simple DocuBook Release Note component with one change type"
39
+ },
40
+ "Changes Only": {
41
+ "prefix": "changes",
42
+ "body": [
43
+ "<Changes type=\"$1\">",
44
+ " - $2",
45
+ "</Changes>"
46
+ ],
47
+ "description": "DocuBook Changes component for individual change items"
48
+ }
49
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "DocuStepper": {
3
+ "prefix": "stepper",
4
+ "body": [
5
+ "<Stepper>",
6
+ " <StepperItem title=\"${1:Step 1: Clone the DocuBook Repository}\">",
7
+ " Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec interdum,",
8
+ " felis sed efficitur tincidunt, justo nulla viverra enim, et maximus nunc",
9
+ " dolor in lorem.",
10
+ " </StepperItem>${2:}",
11
+ "</Stepper>"
12
+ ],
13
+ "description": "Snippet untuk menampilkan stepper komponen."
14
+ },
15
+ "DocuStepperItem": {
16
+ "prefix": "item",
17
+ "body": [
18
+ "<StepperItem title=\"${1:Step X: Your Step Title}\">",
19
+ " ${2:Your step description here.}",
20
+ "</StepperItem>${3:}"
21
+ ],
22
+ "description": "Snippet untuk menambahkan item baru ke dalam Stepper."
23
+ }
24
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "DocuTable": {
3
+ "prefix": "table",
4
+ "body": [
5
+ "| **${1:Feature}** | **${2:Description}** |",
6
+ "| ------------------------------- | ----------------------------------------------------- |",
7
+ "| ${3:MDX Support} | ${4:Write interactive documentation with MDX.} |",
8
+ "| Nested Pages | Organize content in a nested, hierarchical structure. |",
9
+ "| Blog Section | Include a dedicated blog section. |",
10
+ "| Pagination | Split content across multiple pages. |",
11
+ "| Syntax Highlighting | Highlight code for better readability. |",
12
+ "| Code Line Highlighting & Titles | Highlight specific lines with descriptive titles. |",
13
+ "| Interactive Code Blocks | Language-specific and interactive code display. |",
14
+ "| Custom Markdown Components | Embed custom, reusable components in your docs. |",
15
+ "| Static Site Generation | Generate a static, high-performance site. |",
16
+ "| SEO-Optimized | Structured for optimal search engine indexing. |"
17
+ ],
18
+ "description": "Create a DocuTable component on markdown."
19
+ }
20
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "DocuTabs": {
3
+ "prefix": "tabs",
4
+ "body": [
5
+ "<Tabs defaultValue=\"${1:java}\" className=\"pt-5 pb-1\">",
6
+ " <TabsList>",
7
+ " <TabsTrigger value=\"${2:java}\">Java</TabsTrigger>",
8
+ " <TabsTrigger value=\"${3:typescript}\">TypeScript</TabsTrigger>",
9
+ " </TabsList>",
10
+ " <TabsContent value=\"${4:java}\">",
11
+ " ```java",
12
+ " // HelloWorld.java",
13
+ " public class HelloWorld {",
14
+ " public static void main(String[] args) {",
15
+ " System.out.println(\"Hello, World!\");",
16
+ " }",
17
+ " }",
18
+ " ```",
19
+ " </TabsContent>",
20
+ " <TabsContent value=\"${5:typescript}\">",
21
+ " ```typescript",
22
+ " // helloWorld.ts",
23
+ " function helloWorld(): void {",
24
+ " console.log(\"Hello, World!\");",
25
+ " }",
26
+ " helloWorld();",
27
+ " ```",
28
+ " </TabsContent>",
29
+ "</Tabs>"
30
+ ],
31
+ "description": "Create a DocuTabs component with Java and TypeScript examples."
32
+ }
33
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "DocuTooltips": {
3
+ "prefix": "tooltips",
4
+ "body": [
5
+ "${1:What do you know about }<Tooltip text=\"${2:DocuBook}\" tip=\"${3:npx @docubook/create@latest}\" /> ${4:? Create interactive nested documentations using MDX.}",
6
+ ],
7
+ "description": "Create a DocuTooltips component with version examples."
8
+ }
9
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "DocuH2": {
3
+ "prefix": "h2",
4
+ "body": [
5
+ "## Heading 2"
6
+ ],
7
+ "description": "Tag Heading 2 for markdown."
8
+ },
9
+ "DocuH3": {
10
+ "prefix": "h3",
11
+ "body": [
12
+ "### Heading 3"
13
+ ],
14
+ "description": "Tag Heading 3 for markdown."
15
+ },
16
+ "DocuText": {
17
+ "prefix": "text",
18
+ "body": [
19
+ "DocuBook is proudly **open-source**! 🎉 We believe in creating an accessible, collaborative platform that thrives on community contributions."
20
+ ],
21
+ "description": "Tag Paragraph for markdown."
22
+ },
23
+ "Docu-UndorderList": {
24
+ "prefix": "unorderlist",
25
+ "body": [
26
+ "- ${1:**Next.js 14** - The powerful React framework optimized for production.}",
27
+ "- **Tailwind CSS** - Utility-first styling for quick, clean designs.",
28
+ "- **Shadcn-UI** - Elegant, accessible components for a polished look.",
29
+ "- **next-mdx-remote** - Enables MDX support for dynamic, interactive Markdown content."
30
+ ],
31
+ "description": "Tag Undorderlist for markdown."
32
+ },
33
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "DocuVideo": {
3
+ "prefix": "youtube",
4
+ "body": [
5
+ "<Youtube videoId=\"${1:zQnBQ4tB3ZA}\" />"
6
+ ],
7
+ "description": "Snippet untuk menampilkan komponen video Youtube."
8
+ }
9
+ }
@@ -25,7 +25,7 @@ export default function Home() {
25
25
  )}
26
26
  >
27
27
  <AnimatedShinyText className="inline-flex items-center justify-center px-4 py-1 transition ease-out hover:text-neutral-100 hover:duration-300 hover:dark:text-neutral-200">
28
- <span>🚀 New Version - Release v1.11.0</span>
28
+ <span>🚀 New Version - Release v1.12.0</span>
29
29
  <ArrowRightIcon className="ml-1 size-3 transition-transform duration-300 ease-in-out group-hover:translate-x-0.5" />
30
30
  </AnimatedShinyText>
31
31
  </div>
@@ -0,0 +1,119 @@
1
+ 'use client';
2
+
3
+ import React, { useState, ReactNode, Children, isValidElement, cloneElement } from 'react';
4
+ import { ChevronRight, ChevronDown, File as FileIcon, Folder as FolderIcon, FolderOpen } from 'lucide-react';
5
+
6
+ interface FileTreeProps {
7
+ children: ReactNode;
8
+ defaultOpen?: boolean;
9
+ }
10
+
11
+ interface FileProps {
12
+ name: string;
13
+ children?: ReactNode;
14
+ }
15
+
16
+ const FileComponent = ({ name }: FileProps) => {
17
+ const [isHovered, setIsHovered] = useState(false);
18
+
19
+ return (
20
+ <div
21
+ className={`
22
+ flex items-center gap-2 py-1.5 pl-7 pr-3 text-sm
23
+ transition-all duration-200 ease-in-out rounded-md
24
+ ${isHovered
25
+ ? 'bg-blue-50 dark:bg-blue-900/30'
26
+ : 'hover:bg-gray-50 dark:hover:bg-gray-800/50'}
27
+ `}
28
+ onMouseEnter={() => setIsHovered(true)}
29
+ onMouseLeave={() => setIsHovered(false)}
30
+ >
31
+ <FileIcon className={`h-3.5 w-3.5 transition-colors ${isHovered ? 'text-blue-500' : 'text-gray-400 dark:text-gray-500'}`} />
32
+ <span className="font-mono text-sm text-gray-700 dark:text-gray-300">{name}</span>
33
+ {isHovered && (
34
+ <span className="ml-auto text-xs text-gray-400 dark:text-gray-500">
35
+ {name.split('.').pop()?.toUpperCase()}
36
+ </span>
37
+ )}
38
+ </div>
39
+ );
40
+ };
41
+
42
+ const FolderComponent = ({ name, children }: FileProps) => {
43
+ const [isOpen, setIsOpen] = useState(true); // Set to true by default
44
+ const [isHovered, setIsHovered] = useState(false);
45
+ const hasChildren = React.Children.count(children) > 0;
46
+
47
+ return (
48
+ <div className="relative">
49
+ <div
50
+ className={`
51
+ flex items-center gap-2 py-1.5 pl-4 pr-3 rounded-md cursor-pointer
52
+ transition-all duration-200 ease-in-out
53
+ ${isHovered ? 'bg-gray-50 dark:bg-gray-800/50' : ''}
54
+ ${isOpen ? 'text-blue-600 dark:text-blue-400' : 'text-gray-800 dark:text-gray-200'}
55
+ `}
56
+ onClick={() => setIsOpen(!isOpen)}
57
+ onMouseEnter={() => setIsHovered(true)}
58
+ onMouseLeave={() => setIsHovered(false)}
59
+ >
60
+ {hasChildren ? (
61
+ <ChevronRight
62
+ className={`h-3.5 w-3.5 transition-transform duration-200 ${isOpen ? 'transform rotate-90' : ''}`}
63
+ />
64
+ ) : (
65
+ <div className="w-3.5" />
66
+ )}
67
+ {isOpen ? (
68
+ <FolderOpen className="h-4 w-4 text-blue-500 dark:text-blue-400" />
69
+ ) : (
70
+ <FolderIcon className="h-4 w-4 text-blue-400 dark:text-blue-500" />
71
+ )}
72
+ <span className="font-medium">{name}</span>
73
+ </div>
74
+ {isOpen && hasChildren && (
75
+ <div className="ml-5 border-l-2 border-gray-100 dark:border-gray-700/50 pl-2">
76
+ {children}
77
+ </div>
78
+ )}
79
+ </div>
80
+ );
81
+ };
82
+
83
+ export const Files = ({ children }: { children: ReactNode }) => {
84
+ return (
85
+ <div className="
86
+ rounded-xl border border-gray-100 dark:border-gray-700/50
87
+ bg-white/50 dark:bg-gray-800/30 backdrop-blur-sm
88
+ shadow-sm overflow-hidden
89
+ transition-all duration-200
90
+ hover:shadow-md hover:border-gray-200 dark:hover:border-gray-600/50
91
+ ">
92
+ <div className="p-2">
93
+ {Children.map(children, (child, index) => {
94
+ if (isValidElement(child)) {
95
+ return cloneElement(child, { key: index });
96
+ }
97
+ return null;
98
+ })}
99
+ </div>
100
+ </div>
101
+ );
102
+ };
103
+
104
+ export const Folder = ({ name, children }: FileProps) => {
105
+ return <FolderComponent name={name}>{children}</FolderComponent>;
106
+ };
107
+
108
+ export const File = ({ name }: FileProps) => {
109
+ return <FileComponent name={name} />;
110
+ };
111
+
112
+ // MDX Components
113
+ export const FileTreeMdx = {
114
+ Files,
115
+ File,
116
+ Folder,
117
+ };
118
+
119
+ export default FileTreeMdx;
@@ -8,6 +8,44 @@ date: 24-05-2025
8
8
 
9
9
  > This changelog contains a list of all the changes made to the DocuBook template. It will be updated with each new release and will include information about new features, bug fixes, and other improvements.
10
10
 
11
+ <div className="sr-only">
12
+ ### v 1.12.0
13
+ </div>
14
+
15
+ <Release version="1.12.0" date="2025-05-28" title="New File Tree Component and enhancements for existing components or features">
16
+ <Changes type="added">
17
+ - New FileTree component for displaying hierarchical file structures
18
+ - Support for nested folders and files with expand/collapse functionality
19
+ - Hover effects showing file extensions
20
+ - Dark mode support with modern styling
21
+ - Keyboard navigation and accessibility features
22
+ - add toc-observer data attribute to detect toc section
23
+ - cli to copy from path npm registry
24
+ </Changes>
25
+ <Changes type="improved">
26
+ - search dialog hover effect return key
27
+ - search icon showing on mobile screens
28
+ </Changes>
29
+ <Changes type="fixed">
30
+ - fix search dialog on mobile screens
31
+ - fix release note component eslint error on mdx when rendering
32
+ - fix mob-toc callback function
33
+ - fix toc height issue when toc section is longer than screen height
34
+ </Changes>
35
+ <Changes type="removed">
36
+ - remove prompts depedencies
37
+ - remove degit depedencies
38
+ - remove prompts functions
39
+ - remove degit functions
40
+ - remove prompts and degit from package.json
41
+ - remove clone repository using git
42
+ </Changes>
43
+ </Release>
44
+
45
+ <Note type="note" title="Note">
46
+ on this version `1.12.0`, we remove clone repository using git and replace it with cli to copy from path npm registry
47
+ </Note>
48
+
11
49
  <div className="sr-only">
12
50
  ### v 1.11.0
13
51
  </div>
@@ -0,0 +1,109 @@
1
+ ---
2
+ title: File Tree Component
3
+ description: A customizable file tree component for displaying hierarchical file structures in your documentation.
4
+ date: 28-05-2025
5
+ ---
6
+
7
+ The File Tree component allows you to display hierarchical file structures in your documentation with collapsible folders and files.
8
+
9
+ ## Basic Usage
10
+
11
+ ```
12
+ <Files>
13
+ <Folder name="src">
14
+ <File name="App.tsx" />
15
+ <File name="index.tsx" />
16
+ <Folder name="components">
17
+ <File name="Button.tsx" />
18
+ <File name="Card.tsx" />
19
+ </Folder>
20
+ <Folder name="pages">
21
+ <File name="Home.tsx" />
22
+ <File name="About.tsx" />
23
+ </Folder>
24
+ </Folder>
25
+ </Files>
26
+ ```
27
+
28
+ Render As:
29
+ <Files>
30
+ <Folder name="src">
31
+ <File name="App.tsx" />
32
+ <File name="index.tsx" />
33
+ <Folder name="components">
34
+ <File name="Button.tsx" />
35
+ <File name="Card.tsx" />
36
+ </Folder>
37
+ <Folder name="pages">
38
+ <File name="Home.tsx" />
39
+ <File name="About.tsx" />
40
+ </Folder>
41
+ </Folder>
42
+ </Files>
43
+
44
+ ## Props
45
+
46
+ ### Files
47
+
48
+ The root component that wraps the entire file tree.
49
+
50
+ ### Folder
51
+
52
+ | Prop | Type | Required | Description |
53
+ |----------|----------|----------|---------------------------------------|
54
+ | name | string | Yes | The name of the folder |
55
+ | children | ReactNode | No | Child elements (File or Folder) |
56
+
57
+ ### File
58
+
59
+ | Prop | Type | Required | Description |
60
+ |------|--------|----------|----------------------------|
61
+ | name | string | Yes | The name of the file |
62
+
63
+
64
+ ## Examples
65
+
66
+ ### Nested Folder Structure
67
+
68
+ ```
69
+ <Files>
70
+ <Folder name="project-root">
71
+ <File name="package.json" />
72
+ <File name="tsconfig.json" />
73
+ <Folder name="src">
74
+ <File name="index.ts" />
75
+ <Folder name="components">
76
+ <File name="Button.tsx" />
77
+ <File name="Card.tsx" />
78
+ </Folder>
79
+ </Folder>
80
+ </Folder>
81
+ </Files>
82
+ ```
83
+
84
+ ### Minimal Example
85
+
86
+ ```
87
+ <Files>
88
+ <Folder name="components">
89
+ <File name="Button.tsx" />
90
+ <File name="Input.tsx" />
91
+ </Folder>
92
+ </Files>
93
+ ```
94
+
95
+ ## Best Practices
96
+
97
+ 1. Keep the nesting level reasonable (recommended max 3-4 levels deep)
98
+ 2. Use clear and descriptive names for files and folders
99
+ 3. Consider the user experience when displaying large file structures
100
+ 4. Use consistent naming conventions throughout your file tree
101
+
102
+ ## Accessibility
103
+
104
+ The File Tree component includes built-in accessibility features:
105
+
106
+ - Keyboard navigation support
107
+ - ARIA attributes for screen readers
108
+ - Focus management for interactive elements
109
+ - High contrast mode support
@@ -14,11 +14,6 @@
14
14
  "footer": {
15
15
  "copyright": "DocuBook",
16
16
  "social": [
17
- {
18
- "name": "Gitlab",
19
- "url": "https://gitlab.com/mywildancloud",
20
- "iconName": "GitlabIcon"
21
- },
22
17
  {
23
18
  "name": "Instagram",
24
19
  "url": "https://www.instagram.com/wildan.nrs",
@@ -80,6 +75,7 @@
80
75
  { "title": "Card", "href": "/card" },
81
76
  { "title": "Card Group", "href": "/card-group" },
82
77
  { "title": "Code Block", "href": "/code-block" },
78
+ { "title": "File Tree", "href": "/file-tree" },
83
79
  { "title": "Image", "href": "/image" },
84
80
  { "title": "Keyboard", "href": "/keyboard" },
85
81
  { "title": "Link", "href": "/link" },
@@ -26,6 +26,7 @@ import Accordion from "@/components/markdown/AccordionMdx";
26
26
  import CardGroup from "@/components/markdown/CardGroupMdx";
27
27
  import Kbd from "@/components/markdown/KeyboardMdx";
28
28
  import { Release, Changes } from "@/components/markdown/ReleaseMdx";
29
+ import { File, Files, Folder } from "@/components/markdown/FileTreeMdx";
29
30
 
30
31
  // add custom components
31
32
  const components = {
@@ -47,8 +48,13 @@ const components = {
47
48
  Accordion,
48
49
  CardGroup,
49
50
  Kbd,
51
+ // Release Note Components
50
52
  Release,
51
53
  Changes,
54
+ // File Tree Components
55
+ File,
56
+ Files,
57
+ Folder,
52
58
  };
53
59
 
54
60
  // can be used for other pages like blogs, Guides etc
@@ -181,64 +187,3 @@ const postProcess = () => (tree: any) => {
181
187
  }
182
188
  });
183
189
  };
184
-
185
- // export type Author = {
186
- // avatar?: string;
187
- // handle: string;
188
- // username: string;
189
- // handleUrl: string;
190
- // };
191
-
192
- // Blog related types and functions have been removed
193
- /*
194
- export type BlogMdxFrontmatter = BaseMdxFrontmatter & {
195
- date: string;
196
- authors: Author[];
197
- cover: string;
198
- };
199
-
200
- export async function getAllBlogStaticPaths() {
201
- try {
202
- const blogFolder = path.join(process.cwd(), "/contents/blogs/");
203
- const res = await fs.readdir(blogFolder);
204
- return res.map((file) => file.split(".")[0]);
205
- } catch (err) {
206
- console.log(err);
207
- return [];
208
- }
209
- }
210
-
211
- export async function getAllBlogs() {
212
- const blogFolder = path.join(process.cwd(), "/contents/blogs/");
213
- const files = await fs.readdir(blogFolder);
214
- const uncheckedRes = await Promise.all(
215
- files.map(async (file) => {
216
- try {
217
- const filepath = path.join(process.cwd(), `/contents/blogs/${file}`);
218
- const rawMdx = await fs.readFile(filepath, "utf-8");
219
- return {
220
- ...justGetFrontmatterFromMD<BlogMdxFrontmatter>(rawMdx),
221
- slug: file.split(".")[0],
222
- };
223
- } catch (err) {
224
- console.log(err);
225
- return null;
226
- }
227
- })
228
- );
229
- return uncheckedRes.filter((it) => !!it) as (BlogMdxFrontmatter & {
230
- slug: string;
231
- })[];
232
- }
233
-
234
- export async function getBlogForSlug(slug: string) {
235
- try {
236
- const blogFile = path.join(process.cwd(), "/contents/blogs/", `${slug}.mdx`);
237
- const rawMdx = await fs.readFile(blogFile, "utf-8");
238
- return await parseMdx<BlogMdxFrontmatter>(rawMdx);
239
- } catch (err) {
240
- console.log(err);
241
- return null;
242
- }
243
- }
244
- */
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docubook",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "dev": "next dev",
@@ -1,5 +0,0 @@
1
- /// <reference types="next" />
2
- /// <reference types="next/image-types/global" />
3
-
4
- // NOTE: This file should not be edited
5
- // see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.