@md-plugins/quasar-app-extension-q-press 0.1.0-beta.2 → 0.1.0-beta.21

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.
Files changed (253) hide show
  1. package/README.md +20 -15
  2. package/dist/index.js +41 -7
  3. package/dist/install.js +7 -5
  4. package/dist/q-press-globals.d.ts +49 -0
  5. package/dist/templates/init/src/_q-press/api/components/MarkdownCode.json +2 -2
  6. package/dist/templates/init/src/_q-press/api/components/MarkdownCodepen.json +6 -9
  7. package/dist/templates/init/src/_q-press/api/components/MarkdownExample.json +27 -2
  8. package/dist/templates/init/src/_q-press/components/MarkdownApi.vue +129 -84
  9. package/dist/templates/init/src/_q-press/components/MarkdownCardLink.vue +1 -1
  10. package/dist/templates/init/src/_q-press/components/MarkdownCardTitle.vue +1 -1
  11. package/dist/templates/init/src/_q-press/components/MarkdownCode.vue +71 -3
  12. package/dist/templates/init/src/_q-press/components/MarkdownCodepen.vue +316 -59
  13. package/dist/templates/init/src/_q-press/components/MarkdownCopyButton.vue +1 -1
  14. package/dist/templates/init/src/_q-press/components/MarkdownExample.vue +54 -19
  15. package/dist/templates/init/src/_q-press/components/MarkdownLink.vue +5 -5
  16. package/dist/templates/init/src/_q-press/components/MarkdownMermaid.vue +123 -0
  17. package/dist/templates/init/src/_q-press/components/MarkdownTree.vue +2 -2
  18. package/dist/templates/init/src/_q-press/components/markdown-utils.ts +27 -3
  19. package/dist/templates/init/src/_q-press/css/app.scss +38 -26
  20. package/dist/templates/init/src/_q-press/css/code-theme.scss +634 -0
  21. package/dist/templates/init/src/_q-press/css/themes/default.scss +1 -1
  22. package/dist/templates/init/src/_q-press/css/themes/evergreen.scss +69 -0
  23. package/dist/templates/init/src/_q-press/css/themes/mystic.scss +1 -1
  24. package/dist/templates/init/src/_q-press/css/themes/newspaper.scss +1 -1
  25. package/dist/templates/init/src/_q-press/css/themes/sunrise.scss +1 -1
  26. package/dist/templates/init/src/_q-press/css/themes/tawny.scss +1 -1
  27. package/dist/templates/init/src/_q-press/layouts/MarkdownDrawerSidebar.vue +1 -1
  28. package/dist/templates/init/src/_q-press/layouts/MarkdownDrawerToc.vue +1 -1
  29. package/dist/templates/init/src/_q-press/layouts/MarkdownHeader.vue +1 -1
  30. package/dist/templates/init/src/_q-press/layouts/MarkdownLayout.vue +2 -2
  31. package/dist/templates/init/src/_q-press/layouts/MarkdownPage.vue +4 -3
  32. package/dist/templates/init/src/_q-press/layouts/MarkdownSearch.vue +1 -1
  33. package/dist/templates/init/src/_q-press/stores/markdown.ts +1 -2
  34. package/dist/templates/init/src/components/LandingPage/LandingPage.vue +15 -1
  35. package/dist/templates/init/src/components/QPressThemeGallery.vue +336 -0
  36. package/dist/templates/init/src/components/page-parts/releases/GitHubReleases.vue +121 -0
  37. package/dist/templates/init/src/components/page-parts/releases/PackageReleases.vue +191 -0
  38. package/dist/templates/init/src/components/page-parts/releases/md-table-parser.ts +52 -0
  39. package/dist/templates/init/src/components/page-parts/releases/sanitize.ts +132 -0
  40. package/dist/templates/init/src/markdown/__elements.md +8 -8
  41. package/dist/templates/init/src/markdown/__elements2.md +4 -4
  42. package/dist/templates/init/src/markdown/faq/best-practices.md +27 -0
  43. package/dist/templates/init/src/markdown/faq/general.md +27 -0
  44. package/dist/templates/init/src/markdown/faq/troubleshooting.md +27 -0
  45. package/dist/templates/init/src/markdown/getting-started/introduction.md +7 -5
  46. package/dist/templates/init/src/markdown/md-plugins/blockquote/overview.md +3 -1
  47. package/dist/templates/init/src/markdown/md-plugins/codeblocks/advanced.md +19 -15
  48. package/dist/templates/init/src/markdown/md-plugins/codeblocks/overview.md +45 -8
  49. package/dist/templates/init/src/markdown/md-plugins/containers/overview.md +3 -1
  50. package/dist/templates/init/src/markdown/md-plugins/frontmatter/overview.md +3 -1
  51. package/dist/templates/init/src/markdown/md-plugins/headers/overview.md +3 -1
  52. package/dist/templates/init/src/markdown/md-plugins/image/overview.md +3 -1
  53. package/dist/templates/init/src/markdown/md-plugins/imports/overview.md +3 -1
  54. package/dist/templates/init/src/markdown/md-plugins/inline-code/overview.md +3 -1
  55. package/dist/templates/init/src/markdown/md-plugins/link/advanced.md +2 -2
  56. package/dist/templates/init/src/markdown/md-plugins/link/overview.md +6 -4
  57. package/dist/templates/init/src/markdown/md-plugins/mermaid/advanced.md +69 -0
  58. package/dist/templates/init/src/markdown/md-plugins/mermaid/overview.md +73 -0
  59. package/dist/templates/init/src/markdown/md-plugins/shared/overview.md +28 -13
  60. package/dist/templates/init/src/markdown/md-plugins/table/overview.md +3 -1
  61. package/dist/templates/init/src/markdown/md-plugins/title/overview.md +3 -1
  62. package/dist/templates/init/src/markdown/other/contact.md +37 -0
  63. package/dist/templates/init/src/markdown/other/contributing/bugs-and-feature-requests.md +33 -0
  64. package/dist/templates/init/src/markdown/other/contributing/call-to-action.md +25 -0
  65. package/dist/templates/init/src/markdown/other/contributing/documentation.md +31 -0
  66. package/dist/templates/init/src/markdown/other/contributing/overview.md +41 -0
  67. package/dist/templates/init/src/markdown/other/contributing/packages.md +28 -0
  68. package/dist/templates/init/src/markdown/other/contributing/sponsor.md +23 -0
  69. package/dist/templates/init/src/markdown/other/faq.md +179 -0
  70. package/dist/templates/init/src/markdown/other/releases.md +11 -0
  71. package/dist/templates/init/src/markdown/other/upgrade-guide.md +165 -0
  72. package/dist/templates/init/src/markdown/quasar-app-extensions/qpress/advanced.md +11 -3
  73. package/dist/templates/init/src/markdown/quasar-app-extensions/qpress/components.md +25 -29
  74. package/dist/templates/init/src/markdown/quasar-app-extensions/qpress/overview.md +20 -20
  75. package/dist/templates/init/src/markdown/quasar-app-extensions/qpress/site-config.md +17 -3
  76. package/dist/templates/init/src/markdown/quasar-app-extensions/qpress/themes.md +101 -9
  77. package/dist/templates/init/src/markdown/quasar-app-extensions/vite-md-plugin-app-ext/advanced.md +158 -0
  78. package/dist/templates/init/src/markdown/quasar-app-extensions/vite-md-plugin-app-ext/overview.md +1 -1
  79. package/dist/templates/init/src/markdown/vite-plugins/vite-examples-plugin/advanced.md +8 -3
  80. package/dist/templates/init/src/markdown/vite-plugins/vite-examples-plugin/overview.md +19 -5
  81. package/dist/templates/init/src/markdown/vite-plugins/vite-md-plugin/advanced.md +84 -54
  82. package/dist/templates/init/src/markdown/vite-plugins/vite-md-plugin/overview.md +19 -3
  83. package/dist/templates/init/src/siteConfig/index.ts +52 -23
  84. package/dist/templates/update/src/_q-press/api/components/MarkdownCode.json +2 -2
  85. package/dist/templates/update/src/_q-press/api/components/MarkdownCodepen.json +6 -9
  86. package/dist/templates/update/src/_q-press/api/components/MarkdownExample.json +27 -2
  87. package/dist/templates/update/src/_q-press/components/MarkdownApi.vue +129 -84
  88. package/dist/templates/update/src/_q-press/components/MarkdownCardLink.vue +1 -1
  89. package/dist/templates/update/src/_q-press/components/MarkdownCardTitle.vue +1 -1
  90. package/dist/templates/update/src/_q-press/components/MarkdownCode.vue +71 -3
  91. package/dist/templates/update/src/_q-press/components/MarkdownCodepen.vue +316 -59
  92. package/dist/templates/update/src/_q-press/components/MarkdownCopyButton.vue +1 -1
  93. package/dist/templates/update/src/_q-press/components/MarkdownExample.vue +54 -19
  94. package/dist/templates/update/src/_q-press/components/MarkdownLink.vue +5 -5
  95. package/dist/templates/update/src/_q-press/components/MarkdownMermaid.vue +123 -0
  96. package/dist/templates/update/src/_q-press/components/MarkdownTree.vue +2 -2
  97. package/dist/templates/update/src/_q-press/components/markdown-utils.ts +27 -3
  98. package/dist/templates/update/src/_q-press/css/app.scss +38 -26
  99. package/dist/templates/update/src/_q-press/css/code-theme.scss +634 -0
  100. package/dist/templates/update/src/_q-press/css/themes/default.scss +1 -1
  101. package/dist/templates/update/src/_q-press/css/themes/evergreen.scss +69 -0
  102. package/dist/templates/update/src/_q-press/css/themes/mystic.scss +1 -1
  103. package/dist/templates/update/src/_q-press/css/themes/newspaper.scss +1 -1
  104. package/dist/templates/update/src/_q-press/css/themes/sunrise.scss +1 -1
  105. package/dist/templates/update/src/_q-press/css/themes/tawny.scss +1 -1
  106. package/dist/templates/update/src/_q-press/layouts/MarkdownDrawerSidebar.vue +1 -1
  107. package/dist/templates/update/src/_q-press/layouts/MarkdownDrawerToc.vue +1 -1
  108. package/dist/templates/update/src/_q-press/layouts/MarkdownHeader.vue +1 -1
  109. package/dist/templates/update/src/_q-press/layouts/MarkdownLayout.vue +2 -2
  110. package/dist/templates/update/src/_q-press/layouts/MarkdownPage.vue +4 -3
  111. package/dist/templates/update/src/_q-press/layouts/MarkdownSearch.vue +1 -1
  112. package/dist/templates/update/src/_q-press/stores/markdown.ts +1 -2
  113. package/package.json +22 -21
  114. package/src/index.ts +80 -11
  115. package/src/install.ts +10 -9
  116. package/src/q-press-globals.d.ts +49 -0
  117. package/src/templates/init/src/_q-press/api/components/MarkdownCode.json +2 -2
  118. package/src/templates/init/src/_q-press/api/components/MarkdownCodepen.json +6 -9
  119. package/src/templates/init/src/_q-press/api/components/MarkdownExample.json +27 -2
  120. package/src/templates/init/src/_q-press/components/MarkdownApi.vue +129 -84
  121. package/src/templates/init/src/_q-press/components/MarkdownCardLink.vue +1 -1
  122. package/src/templates/init/src/_q-press/components/MarkdownCardTitle.vue +1 -1
  123. package/src/templates/init/src/_q-press/components/MarkdownCode.vue +71 -3
  124. package/src/templates/init/src/_q-press/components/MarkdownCodepen.vue +316 -59
  125. package/src/templates/init/src/_q-press/components/MarkdownCopyButton.vue +1 -1
  126. package/src/templates/init/src/_q-press/components/MarkdownExample.vue +54 -19
  127. package/src/templates/init/src/_q-press/components/MarkdownLink.vue +5 -5
  128. package/src/templates/init/src/_q-press/components/MarkdownMermaid.vue +123 -0
  129. package/src/templates/init/src/_q-press/components/MarkdownTree.vue +2 -2
  130. package/src/templates/init/src/_q-press/components/markdown-utils.ts +27 -3
  131. package/src/templates/init/src/_q-press/css/app.scss +38 -26
  132. package/src/templates/init/src/_q-press/css/code-theme.scss +634 -0
  133. package/src/templates/init/src/_q-press/css/themes/default.scss +1 -1
  134. package/src/templates/init/src/_q-press/css/themes/evergreen.scss +69 -0
  135. package/src/templates/init/src/_q-press/css/themes/mystic.scss +1 -1
  136. package/src/templates/init/src/_q-press/css/themes/newspaper.scss +1 -1
  137. package/src/templates/init/src/_q-press/css/themes/sunrise.scss +1 -1
  138. package/src/templates/init/src/_q-press/css/themes/tawny.scss +1 -1
  139. package/src/templates/init/src/_q-press/layouts/MarkdownDrawerSidebar.vue +1 -1
  140. package/src/templates/init/src/_q-press/layouts/MarkdownDrawerToc.vue +1 -1
  141. package/src/templates/init/src/_q-press/layouts/MarkdownHeader.vue +1 -1
  142. package/src/templates/init/src/_q-press/layouts/MarkdownLayout.vue +2 -2
  143. package/src/templates/init/src/_q-press/layouts/MarkdownPage.vue +4 -3
  144. package/src/templates/init/src/_q-press/layouts/MarkdownSearch.vue +1 -1
  145. package/src/templates/init/src/_q-press/stores/markdown.ts +1 -2
  146. package/src/templates/init/src/components/LandingPage/LandingPage.vue +15 -1
  147. package/src/templates/init/src/components/QPressThemeGallery.vue +336 -0
  148. package/src/templates/init/src/components/page-parts/releases/GitHubReleases.vue +121 -0
  149. package/src/templates/init/src/components/page-parts/releases/PackageReleases.vue +191 -0
  150. package/src/templates/init/src/components/page-parts/releases/md-table-parser.ts +52 -0
  151. package/src/templates/init/src/components/page-parts/releases/sanitize.ts +132 -0
  152. package/src/templates/init/src/markdown/__elements.md +8 -8
  153. package/src/templates/init/src/markdown/__elements2.md +4 -4
  154. package/src/templates/init/src/markdown/faq/best-practices.md +27 -0
  155. package/src/templates/init/src/markdown/faq/general.md +27 -0
  156. package/src/templates/init/src/markdown/faq/troubleshooting.md +27 -0
  157. package/src/templates/init/src/markdown/getting-started/introduction.md +7 -5
  158. package/src/templates/init/src/markdown/md-plugins/blockquote/overview.md +3 -1
  159. package/src/templates/init/src/markdown/md-plugins/codeblocks/advanced.md +19 -15
  160. package/src/templates/init/src/markdown/md-plugins/codeblocks/overview.md +45 -8
  161. package/src/templates/init/src/markdown/md-plugins/containers/overview.md +3 -1
  162. package/src/templates/init/src/markdown/md-plugins/frontmatter/overview.md +3 -1
  163. package/src/templates/init/src/markdown/md-plugins/headers/overview.md +3 -1
  164. package/src/templates/init/src/markdown/md-plugins/image/overview.md +3 -1
  165. package/src/templates/init/src/markdown/md-plugins/imports/overview.md +3 -1
  166. package/src/templates/init/src/markdown/md-plugins/inline-code/overview.md +3 -1
  167. package/src/templates/init/src/markdown/md-plugins/link/advanced.md +2 -2
  168. package/src/templates/init/src/markdown/md-plugins/link/overview.md +6 -4
  169. package/src/templates/init/src/markdown/md-plugins/mermaid/advanced.md +69 -0
  170. package/src/templates/init/src/markdown/md-plugins/mermaid/overview.md +73 -0
  171. package/src/templates/init/src/markdown/md-plugins/shared/overview.md +28 -13
  172. package/src/templates/init/src/markdown/md-plugins/table/overview.md +3 -1
  173. package/src/templates/init/src/markdown/md-plugins/title/overview.md +3 -1
  174. package/src/templates/init/src/markdown/other/contact.md +37 -0
  175. package/src/templates/init/src/markdown/other/contributing/bugs-and-feature-requests.md +33 -0
  176. package/src/templates/init/src/markdown/other/contributing/call-to-action.md +25 -0
  177. package/src/templates/init/src/markdown/other/contributing/documentation.md +31 -0
  178. package/src/templates/init/src/markdown/other/contributing/overview.md +41 -0
  179. package/src/templates/init/src/markdown/other/contributing/packages.md +28 -0
  180. package/src/templates/init/src/markdown/other/contributing/sponsor.md +23 -0
  181. package/src/templates/init/src/markdown/other/faq.md +179 -0
  182. package/src/templates/init/src/markdown/other/releases.md +11 -0
  183. package/src/templates/init/src/markdown/other/upgrade-guide.md +165 -0
  184. package/src/templates/init/src/markdown/quasar-app-extensions/qpress/advanced.md +11 -3
  185. package/src/templates/init/src/markdown/quasar-app-extensions/qpress/components.md +25 -29
  186. package/src/templates/init/src/markdown/quasar-app-extensions/qpress/overview.md +20 -20
  187. package/src/templates/init/src/markdown/quasar-app-extensions/qpress/site-config.md +17 -3
  188. package/src/templates/init/src/markdown/quasar-app-extensions/qpress/themes.md +101 -9
  189. package/src/templates/init/src/markdown/quasar-app-extensions/vite-md-plugin-app-ext/advanced.md +158 -0
  190. package/src/templates/init/src/markdown/quasar-app-extensions/vite-md-plugin-app-ext/overview.md +1 -1
  191. package/src/templates/init/src/markdown/vite-plugins/vite-examples-plugin/advanced.md +8 -3
  192. package/src/templates/init/src/markdown/vite-plugins/vite-examples-plugin/overview.md +19 -5
  193. package/src/templates/init/src/markdown/vite-plugins/vite-md-plugin/advanced.md +84 -54
  194. package/src/templates/init/src/markdown/vite-plugins/vite-md-plugin/overview.md +19 -3
  195. package/src/templates/init/src/siteConfig/index.ts +52 -23
  196. package/src/templates/update/src/_q-press/api/components/MarkdownCode.json +2 -2
  197. package/src/templates/update/src/_q-press/api/components/MarkdownCodepen.json +6 -9
  198. package/src/templates/update/src/_q-press/api/components/MarkdownExample.json +27 -2
  199. package/src/templates/update/src/_q-press/components/MarkdownApi.vue +129 -84
  200. package/src/templates/update/src/_q-press/components/MarkdownCardLink.vue +1 -1
  201. package/src/templates/update/src/_q-press/components/MarkdownCardTitle.vue +1 -1
  202. package/src/templates/update/src/_q-press/components/MarkdownCode.vue +71 -3
  203. package/src/templates/update/src/_q-press/components/MarkdownCodepen.vue +316 -59
  204. package/src/templates/update/src/_q-press/components/MarkdownCopyButton.vue +1 -1
  205. package/src/templates/update/src/_q-press/components/MarkdownExample.vue +54 -19
  206. package/src/templates/update/src/_q-press/components/MarkdownLink.vue +5 -5
  207. package/src/templates/update/src/_q-press/components/MarkdownMermaid.vue +123 -0
  208. package/src/templates/update/src/_q-press/components/MarkdownTree.vue +2 -2
  209. package/src/templates/update/src/_q-press/components/markdown-utils.ts +27 -3
  210. package/src/templates/update/src/_q-press/css/app.scss +38 -26
  211. package/src/templates/update/src/_q-press/css/code-theme.scss +634 -0
  212. package/src/templates/update/src/_q-press/css/themes/default.scss +1 -1
  213. package/src/templates/update/src/_q-press/css/themes/evergreen.scss +69 -0
  214. package/src/templates/update/src/_q-press/css/themes/mystic.scss +1 -1
  215. package/src/templates/update/src/_q-press/css/themes/newspaper.scss +1 -1
  216. package/src/templates/update/src/_q-press/css/themes/sunrise.scss +1 -1
  217. package/src/templates/update/src/_q-press/css/themes/tawny.scss +1 -1
  218. package/src/templates/update/src/_q-press/layouts/MarkdownDrawerSidebar.vue +1 -1
  219. package/src/templates/update/src/_q-press/layouts/MarkdownDrawerToc.vue +1 -1
  220. package/src/templates/update/src/_q-press/layouts/MarkdownHeader.vue +1 -1
  221. package/src/templates/update/src/_q-press/layouts/MarkdownLayout.vue +2 -2
  222. package/src/templates/update/src/_q-press/layouts/MarkdownPage.vue +4 -3
  223. package/src/templates/update/src/_q-press/layouts/MarkdownSearch.vue +1 -1
  224. package/src/templates/update/src/_q-press/stores/markdown.ts +1 -2
  225. package/tsconfig.json +1 -1
  226. package/dist/templates/init/src/_q-press/api/components/MarkdownCodePrism.json +0 -29
  227. package/dist/templates/init/src/_q-press/components/MarkdownCodePrism.ts +0 -36
  228. package/dist/templates/init/src/_q-press/css/prism-theme.scss +0 -298
  229. package/dist/templates/init/src/markdown/guides/contributing.md +0 -101
  230. package/dist/templates/init/src/markdown/guides/faq.md +0 -115
  231. package/dist/templates/init/src/markdown/guides/release-notes.md +0 -0
  232. package/dist/templates/init/src/markdown/guides/style-guide.md +0 -0
  233. package/dist/templates/init/src/markdown/guides/upgrade-guide.md +0 -92
  234. package/dist/templates/init/src/markdown/other/release-notes.md +0 -8
  235. package/dist/templates/init/src/q-press.globals.d.ts +0 -36
  236. package/dist/templates/update/src/_q-press/api/components/MarkdownCodePrism.json +0 -29
  237. package/dist/templates/update/src/_q-press/components/MarkdownCodePrism.ts +0 -36
  238. package/dist/templates/update/src/_q-press/css/prism-theme.scss +0 -298
  239. package/dist/templates/update/src/q-press.globals.d.ts +0 -36
  240. package/src/templates/init/src/_q-press/api/components/MarkdownCodePrism.json +0 -29
  241. package/src/templates/init/src/_q-press/components/MarkdownCodePrism.ts +0 -36
  242. package/src/templates/init/src/_q-press/css/prism-theme.scss +0 -298
  243. package/src/templates/init/src/markdown/guides/contributing.md +0 -101
  244. package/src/templates/init/src/markdown/guides/faq.md +0 -115
  245. package/src/templates/init/src/markdown/guides/release-notes.md +0 -0
  246. package/src/templates/init/src/markdown/guides/style-guide.md +0 -0
  247. package/src/templates/init/src/markdown/guides/upgrade-guide.md +0 -92
  248. package/src/templates/init/src/markdown/other/release-notes.md +0 -8
  249. package/src/templates/init/src/q-press.globals.d.ts +0 -36
  250. package/src/templates/update/src/_q-press/api/components/MarkdownCodePrism.json +0 -29
  251. package/src/templates/update/src/_q-press/components/MarkdownCodePrism.ts +0 -36
  252. package/src/templates/update/src/_q-press/css/prism-theme.scss +0 -298
  253. package/src/templates/update/src/q-press.globals.d.ts +0 -36
@@ -0,0 +1,191 @@
1
+ <template>
2
+ <div>
3
+ <q-input
4
+ v-model="search"
5
+ dense
6
+ square
7
+ borderless
8
+ color="white"
9
+ placeholder="Search..."
10
+ clearable
11
+ class="q-mx-md"
12
+ >
13
+ <template #prepend>
14
+ <q-icon :name="mdiMagnify" />
15
+ </template>
16
+ </q-input>
17
+ <q-separator />
18
+ <q-splitter :model-value="20" :limits="[14, 90]" class="release__splitter">
19
+ <template #before>
20
+ <q-scroll-area>
21
+ <q-tabs
22
+ v-model="selectedVersion"
23
+ vertical
24
+ active-color="primary"
25
+ active-bg-color="blue-1"
26
+ indicator-color="primary"
27
+ >
28
+ <q-tab
29
+ v-for="releaseInfo in filteredReleases"
30
+ :key="releaseInfo.label"
31
+ :name="releaseInfo.label"
32
+ >
33
+ <div class="q-tab__label">{{ releaseInfo.version }}</div>
34
+ <small class="text-grey-7">{{ releaseInfo.date }}</small>
35
+ </q-tab>
36
+ </q-tabs>
37
+ </q-scroll-area>
38
+ </template>
39
+ <template #after>
40
+ <q-tab-panels
41
+ v-model="selectedVersion"
42
+ animated
43
+ transition-prev="slide-down"
44
+ transition-next="slide-up"
45
+ class="releases-container"
46
+ >
47
+ <q-tab-panel
48
+ v-for="releaseInfo in filteredReleases"
49
+ :key="releaseInfo.label"
50
+ :name="releaseInfo.label"
51
+ class="q-pa-none"
52
+ >
53
+ <q-scroll-area>
54
+ <div class="q-pa-md" v-html="currentReleaseBody" />
55
+ </q-scroll-area>
56
+ </q-tab-panel>
57
+ </q-tab-panels>
58
+ </template>
59
+ </q-splitter>
60
+ </div>
61
+ </template>
62
+
63
+ <script setup lang="ts">
64
+ import { computed, ref, watch } from 'vue'
65
+ import { mdiMagnify } from '@quasar/extras/mdi-v7'
66
+
67
+ import sanitize from './sanitize'
68
+ import parseMdTable from './md-table-parser'
69
+
70
+ export interface ReleaseInfo {
71
+ version: string
72
+ date: string
73
+ body: string
74
+ label: string
75
+ }
76
+
77
+ const props = withDefaults(
78
+ defineProps<{
79
+ latestVersion?: string | undefined
80
+ releases?: ReleaseInfo[]
81
+ repoUrl?: string
82
+ }>(),
83
+ {
84
+ releases: () => [],
85
+ repoUrl: 'https://github.com/md-plugins/md-plugins',
86
+ },
87
+ )
88
+
89
+ const search = ref('')
90
+ const selectedVersion = ref<string | undefined>(props.latestVersion)
91
+
92
+ watch(
93
+ () => props.latestVersion,
94
+ (val) => {
95
+ selectedVersion.value = val
96
+ },
97
+ )
98
+
99
+ const filteredReleases = computed(() => {
100
+ if (search.value !== '') {
101
+ const val = search.value.toLowerCase()
102
+
103
+ return props.releases.filter((release) => release.body.toLowerCase().includes(val))
104
+ }
105
+
106
+ return props.releases
107
+ })
108
+
109
+ function escapeRegExp(value: string): string {
110
+ return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
111
+ }
112
+
113
+ function parse(body: string): string {
114
+ let content = sanitize(body) + '\n'
115
+
116
+ if (search.value !== '') {
117
+ content = content.replace(
118
+ new RegExp(`(${escapeRegExp(search.value)})`, 'gi'),
119
+ '<span class="bg-accent text-white">$1</span>',
120
+ )
121
+ }
122
+
123
+ content = content
124
+ .replace(/### ([\S ]+)/g, '<div class="text-h6">$1</div>')
125
+ .replace(/## ([\S ]+)/g, '<div class="text-h5">$1</div>')
126
+ .replace(/# ([\S ]+)/g, '<div class="text-h4">$1</div>')
127
+ .replace(/\*\*([\S ]*?)\*\*/g, '<strong>$1</strong>')
128
+ .replace(/\*([\S ]*?)\*/g, '<em>$1</em>')
129
+ .replace(/```([\S]+)/g, '<pre class="markdown-code release__code"><code>')
130
+ .replace(/```\n/g, '</code></pre>')
131
+ .replace(/`(.*?)`/g, '<code class="markdown-token">$1</code>')
132
+ .replace(
133
+ /#([\d]+)/g,
134
+ `<a class="markdown-link" href="${props.repoUrl}/issues/$1" target="_blank">#$1</a>`,
135
+ )
136
+ .replace(/^&gt; ([\S ]+)$/gm, '<div class="release__blockquote">$1</div>')
137
+ .replace(
138
+ /\[([\S ]*?)\]\((\S*?)\)/g,
139
+ '<a class="markdown-link" href="$2" target="_blank">$1</a>',
140
+ )
141
+ .replace(/^ {2}[-*] ([\S .]+)$/gm, '<li class="q-pl-md">$1</li>')
142
+ .replace(/^[-*] ([\S .]+)$/gm, '<li>$1</li>')
143
+ .replace(/<\/li>[\s\n\r]*<li/g, '</li><li')
144
+ .replace(/(<li(?: class="[^"]*")?>.*?<\/li>)+/g, '<ul class="release__list">$&</ul>')
145
+ .replace(/\n/g, '<br>')
146
+
147
+ return content.includes('| -') ? parseMdTable(content) : content
148
+ }
149
+
150
+ const currentReleaseBody = computed(() => {
151
+ const release = props.releases.find((entry) => entry.label === selectedVersion.value)
152
+
153
+ return release ? parse(release.body) : ''
154
+ })
155
+ </script>
156
+
157
+ <style lang="scss">
158
+ .release__splitter .q-scrollarea {
159
+ height: 600px;
160
+ }
161
+
162
+ .release__body {
163
+ white-space: pre-line;
164
+
165
+ .q-markup-table {
166
+ white-space: normal;
167
+ }
168
+ }
169
+
170
+ .release__list {
171
+ margin: 8px 0 16px;
172
+ padding-left: 28px;
173
+
174
+ li {
175
+ margin: 4px 0;
176
+ padding-left: 4px;
177
+ }
178
+ }
179
+
180
+ .release__blockquote {
181
+ background: rgba($primary, 0.05);
182
+ border: 1px solid $primary;
183
+ padding: 4px 8px;
184
+ border-radius: $generic-border-radius;
185
+ }
186
+
187
+ .release__code {
188
+ padding: 4px;
189
+ margin: 8px;
190
+ }
191
+ </style>
@@ -0,0 +1,52 @@
1
+ function getTable(rows: string[]): string {
2
+ const header = (rows[0] ?? '')
3
+ .split('|')
4
+ .filter((col) => col)
5
+ .map((col) => `<th class="text-left">${col.trim()}</th>`)
6
+ .join('')
7
+
8
+ const body = rows
9
+ .slice(2)
10
+ .map(
11
+ (row) =>
12
+ '<tr>' +
13
+ row
14
+ .split('|')
15
+ .filter((col) => col)
16
+ .map((col) => `<td>${col.trim()}</td>`)
17
+ .join('') +
18
+ '</tr>',
19
+ )
20
+ .join('')
21
+
22
+ return (
23
+ '<div class="q-markup-table q-table__container q-table__card ' +
24
+ 'q-table--horizontal-separator q-table--flat q-table--bordered ' +
25
+ 'q-table--no-wrap q-table--dense">' +
26
+ `<table class="q-table"><thead>${header}</thead>` +
27
+ `<tbody>${body}</tbody></table></div>`
28
+ )
29
+ }
30
+
31
+ export default function parseMdTable(raw: string): string {
32
+ let content = ''
33
+ let tableRows: string[] = []
34
+
35
+ for (const row of raw.split('\n')) {
36
+ if (row.indexOf('|') > -1) {
37
+ tableRows.push(row.trim())
38
+ } else {
39
+ if (tableRows.length > 0) {
40
+ content += getTable(tableRows) + '\n'
41
+ tableRows = []
42
+ }
43
+ content += row + '\n'
44
+ }
45
+ }
46
+
47
+ if (tableRows.length > 0) {
48
+ content += getTable(tableRows) + '\n'
49
+ }
50
+
51
+ return content
52
+ }
@@ -0,0 +1,132 @@
1
+ type AttributeSanitizer = (value: string | null) => string
2
+ type AllowedAttributes = Record<string, AttributeSanitizer>
3
+ type AllowedTags = Record<string, AllowedAttributes>
4
+
5
+ function unconstrained(value: string | null): string {
6
+ return value ?? ''
7
+ }
8
+
9
+ class HtmlWhitelistedSanitizer {
10
+ private readonly doc: Document
11
+ private readonly allowedTags: AllowedTags
12
+ private readonly allowedCss: string[]
13
+
14
+ constructor(
15
+ private readonly escape: boolean,
16
+ tags?: AllowedTags,
17
+ css?: string[],
18
+ urls: string[] = ['http://', 'https://'],
19
+ ) {
20
+ this.doc = document.implementation.createHTMLDocument()
21
+ this.allowedTags = tags ?? HtmlWhitelistedSanitizer.getDefaultTags(urls)
22
+ this.allowedCss = css ?? ['border', 'margin', 'padding']
23
+ }
24
+
25
+ static makeUrlSanitizer(allowedUrls: string[]): AttributeSanitizer {
26
+ return (value) => {
27
+ if (value === null) {
28
+ return ''
29
+ }
30
+
31
+ return allowedUrls.some((url) => value.startsWith(url)) ? value : ''
32
+ }
33
+ }
34
+
35
+ static mergeMap(...maps: AllowedAttributes[]): AllowedAttributes {
36
+ return Object.assign({}, ...maps)
37
+ }
38
+
39
+ private static getDefaultTags(urls: string[]): AllowedTags {
40
+ const globalAttributes = {
41
+ dir: unconstrained,
42
+ lang: unconstrained,
43
+ title: unconstrained,
44
+ }
45
+ const urlSanitizer = HtmlWhitelistedSanitizer.makeUrlSanitizer(urls)
46
+
47
+ return {
48
+ a: HtmlWhitelistedSanitizer.mergeMap(globalAttributes, {
49
+ download: unconstrained,
50
+ href: urlSanitizer,
51
+ hreflang: unconstrained,
52
+ ping: urlSanitizer,
53
+ rel: unconstrained,
54
+ target: unconstrained,
55
+ type: unconstrained,
56
+ }),
57
+ img: HtmlWhitelistedSanitizer.mergeMap(globalAttributes, {
58
+ alt: unconstrained,
59
+ height: unconstrained,
60
+ src: urlSanitizer,
61
+ width: unconstrained,
62
+ }),
63
+ p: globalAttributes,
64
+ div: globalAttributes,
65
+ span: globalAttributes,
66
+ br: globalAttributes,
67
+ b: globalAttributes,
68
+ i: globalAttributes,
69
+ u: globalAttributes,
70
+ }
71
+ }
72
+
73
+ sanitizeString(input: string): string {
74
+ const div = this.doc.createElement('div')
75
+ div.innerHTML = input
76
+
77
+ return (this.sanitizeNode(div) as HTMLElement).innerHTML
78
+ }
79
+
80
+ private sanitizeNode(node: Node): Node {
81
+ const nodeName = node.nodeName.toLowerCase()
82
+
83
+ if (nodeName === '#text') {
84
+ return node
85
+ }
86
+
87
+ if (nodeName === '#comment') {
88
+ return this.doc.createTextNode('')
89
+ }
90
+
91
+ if (this.allowedTags[nodeName] === void 0) {
92
+ return this.doc.createTextNode(this.escape && node instanceof Element ? node.outerHTML : '')
93
+ }
94
+
95
+ const source = node as HTMLElement
96
+ const copy = this.doc.createElement(nodeName)
97
+ const allowedAttributes = this.allowedTags[nodeName]
98
+
99
+ for (let index = 0; index < source.attributes.length; index++) {
100
+ const attr = source.attributes.item(index)
101
+ const sanitizer = attr !== null ? allowedAttributes[attr.name] : undefined
102
+
103
+ if (attr !== null && sanitizer !== void 0) {
104
+ copy.setAttribute(attr.name, sanitizer(source.getAttribute(attr.name)))
105
+ }
106
+ }
107
+
108
+ for (const cssProperty of this.allowedCss) {
109
+ copy.style.setProperty(cssProperty, source.style.getPropertyValue(cssProperty))
110
+ }
111
+
112
+ while (source.childNodes.length > 0) {
113
+ const firstChild = source.childNodes[0]
114
+ if (firstChild === void 0) {
115
+ break
116
+ }
117
+
118
+ const child = source.removeChild(firstChild)
119
+ if (child === void 0) {
120
+ break
121
+ }
122
+ copy.appendChild(this.sanitizeNode(child))
123
+ }
124
+
125
+ return copy
126
+ }
127
+ }
128
+
129
+ export default function runSanitizer(html: string): string {
130
+ const parser = new HtmlWhitelistedSanitizer(true)
131
+ return parser.sanitizeString(html)
132
+ }
@@ -349,7 +349,7 @@ sudo apt autoremove
349
349
  { name: 'diff' }
350
350
  ]
351
351
 
352
- @@ -20,6 +22,12 @@ loadLanguages(langList.map(l => l.name))
352
+ @@ -20,6 +22,12 @@ const highlighter = await createHighlighter({
353
353
 
354
354
  const langMatch = langList.map(l => l.aliases || l.name).join('|')
355
355
 
@@ -388,7 +388,7 @@ sudo apt autoremove
388
388
 
389
389
  -function highlight (content, attrs) {
390
390
  - const { lang, numbered } = attrs
391
- - const highlightedText = prism.highlight(content, prism.languages[ lang ], lang)
391
+ - const highlightedText = highlighter.codeToHtml(content, { lang })
392
392
  +const magicCommentRE = / *\/\/\[! (?<klass>[\w-]+)\] */
393
393
  +const magicCommentGlobalRE = new RegExp(magicCommentRE, 'g')
394
394
 
@@ -469,7 +469,7 @@ const x = {
469
469
  | Prop name | Description |
470
470
  | ------------ | ----------------------------------------------------------------------------------------------------------------- |
471
471
  | `app` | Vue app instance |
472
- | `router` | Instance of Vue Router from 'src/router/index.js' |
472
+ | `router` | Instance of Vue Router from '@/router/index.js' |
473
473
  | `store` | Instance of Pinia - **store only will be passed if your project uses Pinia (you have src/stores)** |
474
474
  | `ssrContext` | Available only on server-side, if building for SSR. [More info](/quasar-cli-vite/developing-ssr/ssr-context) |
475
475
  | `urlPath` | The pathname (path + search) part of the URL. It also contains the hash on client-side. |
@@ -481,7 +481,7 @@ const x = {
481
481
  | Prop name | Description |
482
482
  | :----------- | :---------------------------------------------------------------------------------------------------------------- |
483
483
  | `app` | Vue app instance |
484
- | `router` | Instance of Vue Router from 'src/router/index.js' |
484
+ | `router` | Instance of Vue Router from '@/router/index.js' |
485
485
  | `store` | Instance of Pinia - **store only will be passed if your project uses Pinia (you have src/stores)** |
486
486
  | `ssrContext` | Available only on server-side, if building for SSR. [More info](/quasar-cli-vite/developing-ssr/ssr-context) |
487
487
  | `urlPath` | The pathname (path + search) part of the URL. It also contains the hash on client-side. |
@@ -493,7 +493,7 @@ const x = {
493
493
  | Prop name | Description |
494
494
  | -----------: | ----------------------------------------------------------------------------------------------------------------: |
495
495
  | `app` | Vue app instance |
496
- | `router` | Instance of Vue Router from 'src/router/index.js' |
496
+ | `router` | Instance of Vue Router from '@/router/index.js' |
497
497
  | `store` | Instance of Pinia - **store only will be passed if your project uses Pinia (you have src/stores)** |
498
498
  | `ssrContext` | Available only on server-side, if building for SSR. [More info](/quasar-cli-vite/developing-ssr/ssr-context) |
499
499
  | `urlPath` | The pathname (path + search) part of the URL. It also contains the hash on client-side. |
@@ -505,7 +505,7 @@ const x = {
505
505
  | Prop name | Description |
506
506
  | :----------: | :---------------------------------------------------------------------------------------------------------------: |
507
507
  | `app` | Vue app instance |
508
- | `router` | Instance of Vue Router from 'src/router/index.js' |
508
+ | `router` | Instance of Vue Router from '@/router/index.js' |
509
509
  | `store` | Instance of Pinia - **store only will be passed if your project uses Pinia (you have src/stores)** |
510
510
  | `ssrContext` | Available only on server-side, if building for SSR. [More info](/quasar-cli-vite/developing-ssr/ssr-context) |
511
511
  | `urlPath` | The pathname (path + search) part of the URL. It also contains the hash on client-side. |
@@ -532,8 +532,8 @@ Lorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do _eiusmod_ te
532
532
  Lorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do _eiusmod_ tempor incididunt ut labore et dolore magna aliqua.
533
533
 
534
534
  <script import>
535
- import MarkdownExampleApi from 'src/.q-press/api/components/MarkdownExample.json'
536
- import MarkdownPageApi from 'src/.q-press/api/components/MarkdownPage.json'
535
+ import MarkdownExampleApi from '@/.q-press/api/components/MarkdownExample.json'
536
+ import MarkdownPageApi from '@/.q-press/api/components/MarkdownPage.json'
537
537
  </script>
538
538
 
539
539
  <MarkdownApi :api="MarkdownExampleApi" name="MarkdownExample"/>
@@ -229,7 +229,7 @@ sudo apt autoremove
229
229
  { name: 'diff' }
230
230
  ]
231
231
 
232
- @@ -20,6 +22,12 @@ loadLanguages(langList.map(l => l.name))
232
+ @@ -20,6 +22,12 @@ const highlighter = await createHighlighter({
233
233
 
234
234
  const langMatch = langList.map(l => l.aliases || l.name).join('|')
235
235
 
@@ -268,7 +268,7 @@ sudo apt autoremove
268
268
 
269
269
  -function highlight (content, attrs) {
270
270
  - const { lang, numbered } = attrs
271
- - const highlightedText = prism.highlight(content, prism.languages[ lang ], lang)
271
+ - const highlightedText = highlighter.codeToHtml(content, { lang })
272
272
  +const magicCommentRE = / *\/\/\[! (?<klass>[\w-]+)\] */
273
273
  +const magicCommentGlobalRE = new RegExp(magicCommentRE, 'g')
274
274
 
@@ -345,8 +345,8 @@ import AvatarApi from 'quasar/dist/api/QAvatar.json'
345
345
  <MarkdownApi :api="AvatarApi" name="QAvatar"/>
346
346
 
347
347
  <script import>
348
- import MarkdownExampleApi from 'src/.q-press/api/components/MarkdownExample.json'
349
- import MarkdownPageApi from 'src/.q-press/api/components/MarkdownPage.json'
348
+ import MarkdownExampleApi from '@/.q-press/api/components/MarkdownExample.json'
349
+ import MarkdownPageApi from '@/.q-press/api/components/MarkdownPage.json'
350
350
  </script>
351
351
 
352
352
  <MarkdownApi :api="MarkdownExampleApi" name="MarkdownExample"/>
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: Best Practices FAQ
3
+ desc: Recommended setup and maintenance practices for MD-Plugins.
4
+ keys: FAQ
5
+ ---
6
+
7
+ ## Best Practices
8
+
9
+ :::details Q. Should I install every MD-Plugins package?
10
+
11
+ **A.** No. Install the packages you actually use. Q-Press pulls together the generated documentation-site pieces for Quasar projects, while direct Vite or MarkdownIt projects can stay smaller by installing only the plugin packages they need.
12
+ :::
13
+
14
+ :::details Q. Should I edit generated Q-Press files directly?
15
+
16
+ **A.** Keep project-specific content in your app where possible, and treat generated `src/.q-press` files as replaceable. If you need the latest templates, update the package and run `quasar ext invoke @md-plugins/q-press`.
17
+ :::
18
+
19
+ :::details Q. How should I handle Q-Press themes?
20
+
21
+ **A.** Import one Q-Press theme in `src/css/quasar.variables.scss` or `src/css/quasar.variables.sass`, then put project-specific overrides below that import. This keeps theme defaults predictable.
22
+ :::
23
+
24
+ :::details Q. Where is the full FAQ?
25
+
26
+ **A.** The main FAQ lives at [Frequently Asked Questions](/other/faq).
27
+ :::
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: General FAQ
3
+ desc: General questions about MD-Plugins and where each package fits.
4
+ keys: FAQ
5
+ ---
6
+
7
+ ## General Questions
8
+
9
+ :::details Q. What are MD-Plugins?
10
+
11
+ **A.** MD-Plugins are Markdown-it and Vite plugins that help turn Markdown into application-ready content. They cover headings, links, frontmatter, images, code blocks, examples, and Q-Press documentation sites.
12
+ :::
13
+
14
+ :::details Q. Can I use MD-Plugins without Quasar?
15
+
16
+ **A.** Yes. The individual Markdown-it plugins and direct Vite plugins can be used in non-Quasar projects. The Quasar-only pieces are the app extensions, such as Q-Press.
17
+ :::
18
+
19
+ :::details Q. Which package should I start with?
20
+
21
+ **A.** Use Q-Press for a full Quasar documentation site, `@md-plugins/vite-md-plugin` for direct Vue/Vite Markdown usage, and individual `@md-plugins/md-plugin-*` packages when you already own the MarkdownIt setup.
22
+ :::
23
+
24
+ :::details Q. Where is the full FAQ?
25
+
26
+ **A.** The main FAQ lives at [Frequently Asked Questions](/other/faq).
27
+ :::
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: Troubleshooting FAQ
3
+ desc: Common problems and fixes for MD-Plugins and Q-Press.
4
+ keys: FAQ
5
+ ---
6
+
7
+ ## Troubleshooting
8
+
9
+ :::details Q. My Markdown content is not rendering correctly. What should I check first?
10
+
11
+ **A.** Confirm that the package is installed, the plugin is registered with MarkdownIt or Vite, and your generated Q-Press files are current. If you recently upgraded Q-Press, run `quasar ext invoke @md-plugins/q-press`.
12
+ :::
13
+
14
+ :::details Q. I upgraded Q-Press and now browser code says `process is not defined`. What changed?
15
+
16
+ **A.** Quasar CLI Vite 3 expects browser-side code to use `import.meta.env` instead of `process.env`. Refresh generated Q-Press files with `quasar ext invoke @md-plugins/q-press` and choose `Overwrite All` if you want the current templates.
17
+ :::
18
+
19
+ :::details Q. How do I report a bug or request a feature?
20
+
21
+ **A.** Open an issue in the MD-Plugins repository and include the package name, version, reproduction steps, expected result, and actual result.
22
+ :::
23
+
24
+ :::details Q. Where is the full FAQ?
25
+
26
+ **A.** The main FAQ lives at [Frequently Asked Questions](/other/faq).
27
+ :::
@@ -9,6 +9,8 @@ Welcome to the Markdown Plugins documentation! This guide will help you start us
9
9
 
10
10
  Markdown Plugins are a set of tools and extensions designed to enhance the functionality of Markdown. They provide additional features and capabilities that go beyond the standard Markdown syntax, allowing you to create more dynamic and interactive content.
11
11
 
12
+ The core Markdown-it plugins and direct Vite plugins work in Vue/Vite projects as well as Quasar projects. Use the Quasar app extensions when you want Quasar CLI integration, generated Q-Press docs files, and Quasar-specific routing/build configuration.
13
+
12
14
  ## Key Features
13
15
 
14
16
  - **Extended Syntax**: Add custom syntax and elements to your Markdown documents.
@@ -21,7 +23,8 @@ Markdown Plugins are a set of tools and extensions designed to enhance the funct
21
23
  - **Title Extraction**: Extract the first header in Markdown as the page title.
22
24
  - **Script Imports**: Extract and process **&lt;script import&gt;** blocks from Markdown.
23
25
  - **Code Block Enhancements**: Enhance code block rendering with syntax highlighting, tabs, and more.
24
- - **Custom Styling**: Apply custom styles to your Markdown content for a more polished look.
26
+ - **Mermaid Diagrams**: Render Mermaid fenced code blocks as client-side diagrams.
27
+ - **Custom Styling**: Apply custom styles to your Markdown content for a more refined look.
25
28
  - **Integration**: Easily integrate with other tools and platforms to streamline your workflow.
26
29
 
27
30
  ## Why Use Markdown Plugins?
@@ -48,7 +51,7 @@ Here are some examples of what you can achieve with Markdown Plugins:
48
51
 
49
52
  - **Custom Syntax**: Add custom syntax for specific use cases.
50
53
  - **Enhanced Components**: Embed interactive and enhanced components.
51
- - **Custom Styling**: Apply custom styles to your content for a polished look.
54
+ - **Custom Styling**: Apply custom styles to your content for a refined look.
52
55
  - **Frontmatter Support**: Extract and process frontmatter content from your Markdown files.
53
56
  - **Header Management**: Extract and process headers for generating ToCs or managing headers.
54
57
  - **Inline Code Styling**: Add custom classes to inline code blocks for styling.
@@ -57,11 +60,10 @@ Here are some examples of what you can achieve with Markdown Plugins:
57
60
  - **Title Extraction**: Extract the first header in Markdown as the page title.
58
61
  - **Script Imports**: Extract and process `<script import>` blocks from Markdown.
59
62
  - **Code Block Enhancements**: Enhance code block rendering with syntax highlighting, tabs, and more.
60
-
61
- <!-- Check out the [Examples](../guides/examples) section for more detailed examples and use cases. -->
63
+ - **Mermaid Diagrams**: Add flowcharts, sequence diagrams, and other Mermaid diagrams to Markdown pages.
62
64
 
63
65
  ## Support
64
66
 
65
- If you have any questions or need assistance, please refer to the [FAQ](../guides/faq) or reach out to our support team.
67
+ If you have any questions or need assistance, please refer to the [FAQ](/other/faq) or reach out to our support team.
66
68
 
67
69
  Happy coding!
@@ -115,11 +115,13 @@ The official NPM name is `@md-plugins/md-plugin-blockquote`.
115
115
 
116
116
  ## Installation
117
117
 
118
- You can install the Blockquote plugin using `npm`, `yarn`, or `pnpm`. Choose your preferred method below:
118
+ You can install the Blockquote plugin using `npm`, `yarn`, `pnpm`, or `bun`. Choose your preferred method below:
119
119
 
120
120
  ```tabs
121
121
  <<| bash pnpm |>>
122
122
  pnpm add @md-plugins/md-plugin-blockquote
123
+ <<| bash bun |>>
124
+ bun add @md-plugins/md-plugin-blockquote
123
125
  <<| bash yarn |>>
124
126
  yarn add @md-plugins/md-plugin-blockquote
125
127
  <<| bash npm |>>
@@ -9,9 +9,7 @@ The `codeblocks` plugin enhances code block rendering in your Markdown content.
9
9
 
10
10
  ### Type Information
11
11
 
12
- ```ts
13
- import { PluginWithOptions } from 'markdown-it'
14
-
12
+ ```ts [twoslash]
15
13
  interface Lang {
16
14
  name: string
17
15
  customCopy?: boolean
@@ -59,24 +57,30 @@ interface CodeblockPluginOptions {
59
57
  */
60
58
  pageScripts?: string[]
61
59
  /**
62
- * Optional Prism languages configuration array. This allows you to override or add custom language definitions.
60
+ * Optional Shiki languages configuration array. This allows you to override or add custom language definitions.
63
61
  * Each item can have a `name`, optional `aliases`, and `customCopy` boolean.
64
62
  */
65
63
  langList?: Lang[]
66
64
  }
67
65
 
68
- declare module '@md-plugins/shared' {
69
- interface MarkdownItEnv {
70
- /**
71
- * An array of page script (import statements) to be included.
72
- */
73
- pageScripts?: Set<string>
74
- }
75
- }
66
+ const options = {
67
+ defaultLang: 'typescript',
68
+ preClass: 'markdown-code',
69
+ langList: [{ name: 'typescript', aliases: 'typescript|ts' }],
70
+ } satisfies CodeblockPluginOptions
71
+
72
+ const firstLanguage = options.langList?.[0]
73
+ // ^?
76
74
 
77
- declare const codeblocksPlugin: PluginWithOptions<CodeblockPluginOptions>
75
+ type CodeblockLanguage = NonNullable<CodeblockPluginOptions['langList']>[number]
76
+ // ^?
78
77
 
79
- export { type CodeblockPluginOptions, type Lang, codeblocksPlugin }
78
+ interface MarkdownItEnv {
79
+ /**
80
+ * An array of page script (import statements) to be included.
81
+ */
82
+ pageScripts?: Set<string>
83
+ }
80
84
  ```
81
85
 
82
86
  ### Default CSS
@@ -201,7 +205,7 @@ The `codeblocks` plugin provides several options for customization. Here are the
201
205
  #### `langList`
202
206
 
203
207
  - **Type**: `Array<{ name: string; aliases?: string; customCopy?: boolean }>`
204
- - **Description**: Optional Prism languages configuration array. This allows you to override or add custom language definitions. Each item can have a `name`, optional `aliases`, and `customCopy` boolean.
208
+ - **Description**: Optional Shiki languages configuration array. This allows you to override or add custom language definitions. Each item can have a `name`, optional `aliases`, and `customCopy` boolean.
205
209
 
206
210
  ### Conclusion
207
211