@md-plugins/quasar-app-extension-q-press 0.1.0-beta.0 → 0.1.0-beta.10

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 (240) hide show
  1. package/README.md +4 -6
  2. package/dist/index.js +97 -0
  3. package/dist/install.js +44 -0
  4. package/dist/q-press-globals.d.ts +49 -0
  5. package/dist/templates/.gitkeep +0 -0
  6. package/dist/templates/init/src/_q-press/.gitkeep +0 -0
  7. package/dist/templates/init/src/_q-press/api/components/DarkModeToggle.json +37 -0
  8. package/dist/templates/init/src/_q-press/api/components/MarkdownApi.json +67 -0
  9. package/dist/templates/init/src/_q-press/api/components/MarkdownApiEntry.json +76 -0
  10. package/dist/templates/init/src/_q-press/api/components/MarkdownCardLink.json +28 -0
  11. package/dist/templates/init/src/_q-press/api/components/MarkdownCardTitle.json +48 -0
  12. package/dist/templates/init/src/_q-press/api/components/MarkdownCode.json +37 -0
  13. package/dist/templates/init/src/_q-press/api/components/MarkdownCodePrism.json +29 -0
  14. package/dist/templates/init/src/_q-press/api/components/MarkdownCodepen.json +18 -0
  15. package/dist/templates/init/src/_q-press/api/components/MarkdownCopyButton.json +36 -0
  16. package/dist/templates/init/src/_q-press/api/components/MarkdownDrawerSidebar.json +17 -0
  17. package/dist/templates/init/src/_q-press/api/components/MarkdownDrawerToc.json +17 -0
  18. package/dist/templates/init/src/_q-press/api/components/MarkdownExample.json +47 -0
  19. package/dist/templates/init/src/_q-press/api/components/MarkdownHeader.json +28 -0
  20. package/dist/templates/init/src/_q-press/api/components/MarkdownHeaderIconLinks.json +16 -0
  21. package/dist/templates/init/src/_q-press/api/components/MarkdownHeaderMenu.json +77 -0
  22. package/dist/templates/init/src/_q-press/api/components/MarkdownHeaderTextLinks.json +33 -0
  23. package/dist/templates/init/src/_q-press/api/components/MarkdownInstallation.json +33 -0
  24. package/dist/templates/init/src/_q-press/api/components/MarkdownLayout.json +52 -0
  25. package/dist/templates/init/src/_q-press/api/components/MarkdownLink.json +23 -0
  26. package/dist/templates/init/src/_q-press/api/components/MarkdownPage.json +71 -0
  27. package/dist/templates/init/src/_q-press/api/components/MarkdownPageFooter.json +21 -0
  28. package/dist/templates/init/src/_q-press/api/components/MarkdownPageSidebar.json +56 -0
  29. package/dist/templates/init/src/_q-press/api/components/MarkdownPageToc.json +17 -0
  30. package/dist/templates/init/src/_q-press/api/components/MarkdownPrerender.json +25 -0
  31. package/dist/templates/init/src/_q-press/api/components/MarkdownTree.json +27 -0
  32. package/dist/templates/init/src/_q-press/api/composables/dark.json +29 -0
  33. package/dist/templates/init/src/_q-press/api/composables/scroll.json +34 -0
  34. package/dist/templates/init/src/_q-press/assets/get-meta.ts +29 -0
  35. package/dist/templates/init/src/_q-press/components/DarkModeToggle.vue +105 -0
  36. package/dist/templates/init/src/_q-press/components/MarkdownApi.vue +663 -0
  37. package/dist/templates/init/src/_q-press/components/MarkdownApiEntry.ts +836 -0
  38. package/dist/templates/init/src/_q-press/components/MarkdownCardLink.vue +25 -0
  39. package/dist/templates/init/src/_q-press/components/MarkdownCardTitle.vue +27 -0
  40. package/dist/templates/init/src/_q-press/components/MarkdownCode.vue +31 -0
  41. package/dist/templates/init/src/_q-press/components/MarkdownCodePrism.ts +36 -0
  42. package/dist/templates/init/src/_q-press/components/MarkdownCodepen.vue +313 -0
  43. package/dist/templates/init/src/_q-press/components/MarkdownCopyButton.vue +107 -0
  44. package/dist/templates/init/src/_q-press/components/MarkdownExample.vue +274 -0
  45. package/dist/templates/init/src/_q-press/components/MarkdownLink.vue +42 -0
  46. package/dist/templates/init/src/_q-press/components/MarkdownPrerender.ts +93 -0
  47. package/dist/templates/init/src/_q-press/components/MarkdownTree.vue +108 -0
  48. package/dist/templates/init/src/_q-press/components/markdown-utils.ts +105 -0
  49. package/dist/templates/init/src/_q-press/composables/dark.ts +39 -0
  50. package/dist/templates/init/src/_q-press/composables/scroll.ts +142 -0
  51. package/dist/templates/init/src/_q-press/css/app.scss +684 -0
  52. package/dist/templates/init/src/_q-press/css/fonts.scss +100 -0
  53. package/dist/templates/init/src/_q-press/css/prism-theme.scss +298 -0
  54. package/dist/templates/init/src/_q-press/css/themes/default.scss +68 -0
  55. package/dist/templates/init/src/_q-press/css/themes/mystic.scss +73 -0
  56. package/dist/templates/init/src/_q-press/css/themes/newspaper.scss +69 -0
  57. package/dist/templates/init/src/_q-press/css/themes/sunrise.scss +69 -0
  58. package/dist/templates/init/src/_q-press/css/themes/tawny.scss +69 -0
  59. package/dist/templates/init/src/_q-press/layouts/MarkdownDrawerSidebar.vue +32 -0
  60. package/dist/templates/init/src/_q-press/layouts/MarkdownDrawerToc.vue +37 -0
  61. package/dist/templates/init/src/_q-press/layouts/MarkdownHeader.vue +412 -0
  62. package/dist/templates/init/src/_q-press/layouts/MarkdownHeaderIconLinks.vue +36 -0
  63. package/dist/templates/init/src/_q-press/layouts/MarkdownHeaderMenu.ts +109 -0
  64. package/dist/templates/init/src/_q-press/layouts/MarkdownHeaderTextLinks.vue +46 -0
  65. package/dist/templates/init/src/_q-press/layouts/MarkdownLayout.vue +239 -0
  66. package/dist/templates/init/src/_q-press/layouts/MarkdownPage.vue +331 -0
  67. package/dist/templates/init/src/_q-press/layouts/MarkdownPageFooter.vue +199 -0
  68. package/dist/templates/init/src/_q-press/layouts/MarkdownPageSidebar.scss +54 -0
  69. package/dist/templates/init/src/_q-press/layouts/MarkdownPageSidebar.ts +218 -0
  70. package/dist/templates/init/src/_q-press/layouts/MarkdownPageToc.vue +23 -0
  71. package/dist/templates/init/src/_q-press/layouts/MarkdownSearch.vue +449 -0
  72. package/dist/templates/init/src/_q-press/stores/markdown.ts +100 -0
  73. package/dist/templates/init/src/components/LandingPage/LandingPage.vue +360 -0
  74. package/dist/templates/init/src/examples/QAvatar/BasicExample.vue +11 -0
  75. package/dist/templates/init/src/markdown/__elements.md +542 -0
  76. package/dist/templates/init/src/markdown/__elements2.md +355 -0
  77. package/dist/templates/init/src/markdown/faq/best-practices.md +0 -0
  78. package/dist/templates/init/src/markdown/faq/general.md +0 -0
  79. package/dist/templates/init/src/markdown/faq/troubleshooting.md +0 -0
  80. package/dist/templates/init/src/markdown/getting-started/introduction.md +67 -0
  81. package/dist/templates/init/src/markdown/guides/contributing.md +101 -0
  82. package/dist/templates/init/src/markdown/guides/faq.md +115 -0
  83. package/dist/templates/init/src/markdown/guides/release-notes.md +0 -0
  84. package/dist/templates/init/src/markdown/guides/style-guide.md +0 -0
  85. package/dist/templates/init/src/markdown/guides/upgrade-guide.md +86 -0
  86. package/dist/templates/init/src/markdown/landing-page.md +11 -0
  87. package/dist/templates/init/src/markdown/listing.ts +3 -0
  88. package/dist/templates/init/src/markdown/md-plugins/blockquote/advanced.md +83 -0
  89. package/dist/templates/init/src/markdown/md-plugins/blockquote/overview.md +183 -0
  90. package/dist/templates/init/src/markdown/md-plugins/codeblocks/advanced.md +210 -0
  91. package/dist/templates/init/src/markdown/md-plugins/codeblocks/overview.md +707 -0
  92. package/dist/templates/init/src/markdown/md-plugins/containers/advanced.md +329 -0
  93. package/dist/templates/init/src/markdown/md-plugins/containers/overview.md +236 -0
  94. package/dist/templates/init/src/markdown/md-plugins/frontmatter/advanced.md +164 -0
  95. package/dist/templates/init/src/markdown/md-plugins/frontmatter/overview.md +131 -0
  96. package/dist/templates/init/src/markdown/md-plugins/headers/advanced.md +90 -0
  97. package/dist/templates/init/src/markdown/md-plugins/headers/overview.md +140 -0
  98. package/dist/templates/init/src/markdown/md-plugins/image/advanced.md +114 -0
  99. package/dist/templates/init/src/markdown/md-plugins/image/overview.md +124 -0
  100. package/dist/templates/init/src/markdown/md-plugins/imports/advanced.md +105 -0
  101. package/dist/templates/init/src/markdown/md-plugins/imports/overview.md +76 -0
  102. package/dist/templates/init/src/markdown/md-plugins/inline-code/advanced.md +133 -0
  103. package/dist/templates/init/src/markdown/md-plugins/inline-code/overview.md +101 -0
  104. package/dist/templates/init/src/markdown/md-plugins/link/advanced.md +157 -0
  105. package/dist/templates/init/src/markdown/md-plugins/link/overview.md +126 -0
  106. package/dist/templates/init/src/markdown/md-plugins/shared/overview.md +195 -0
  107. package/dist/templates/init/src/markdown/md-plugins/table/advanced.md +190 -0
  108. package/dist/templates/init/src/markdown/md-plugins/table/overview.md +186 -0
  109. package/dist/templates/init/src/markdown/md-plugins/title/advanced.md +88 -0
  110. package/dist/templates/init/src/markdown/md-plugins/title/overview.md +99 -0
  111. package/dist/templates/init/src/markdown/other/release-notes.md +8 -0
  112. package/dist/templates/init/src/markdown/privacy-policy.md +10 -0
  113. package/dist/templates/init/src/markdown/quasar-app-extensions/qpress/advanced.md +107 -0
  114. package/dist/templates/init/src/markdown/quasar-app-extensions/qpress/components.md +67 -0
  115. package/dist/templates/init/src/markdown/quasar-app-extensions/qpress/overview.md +324 -0
  116. package/dist/templates/init/src/markdown/quasar-app-extensions/qpress/site-config.md +114 -0
  117. package/dist/templates/init/src/markdown/quasar-app-extensions/qpress/themes.md +130 -0
  118. package/dist/templates/init/src/markdown/quasar-app-extensions/vite-md-plugin-app-ext/advanced.md +4 -0
  119. package/dist/templates/init/src/markdown/quasar-app-extensions/vite-md-plugin-app-ext/overview.md +110 -0
  120. package/dist/templates/init/src/markdown/vite-plugins/index.md +6 -0
  121. package/dist/templates/init/src/markdown/vite-plugins/vite-examples-plugin/advanced.md +143 -0
  122. package/dist/templates/init/src/markdown/vite-plugins/vite-examples-plugin/overview.md +100 -0
  123. package/dist/templates/init/src/markdown/vite-plugins/vite-md-plugin/advanced.md +289 -0
  124. package/dist/templates/init/src/markdown/vite-plugins/vite-md-plugin/index.md +6 -0
  125. package/dist/templates/init/src/markdown/vite-plugins/vite-md-plugin/overview.md +164 -0
  126. package/dist/templates/init/src/siteConfig/index.ts +449 -0
  127. package/dist/templates/update/src/_q-press/.gitkeep +0 -0
  128. package/dist/templates/update/src/_q-press/api/components/DarkModeToggle.json +37 -0
  129. package/dist/templates/update/src/_q-press/api/components/MarkdownApi.json +67 -0
  130. package/dist/templates/update/src/_q-press/api/components/MarkdownApiEntry.json +76 -0
  131. package/dist/templates/update/src/_q-press/api/components/MarkdownCardLink.json +28 -0
  132. package/dist/templates/update/src/_q-press/api/components/MarkdownCardTitle.json +48 -0
  133. package/dist/templates/update/src/_q-press/api/components/MarkdownCode.json +37 -0
  134. package/dist/templates/update/src/_q-press/api/components/MarkdownCodePrism.json +29 -0
  135. package/dist/templates/update/src/_q-press/api/components/MarkdownCodepen.json +18 -0
  136. package/dist/templates/update/src/_q-press/api/components/MarkdownCopyButton.json +36 -0
  137. package/dist/templates/update/src/_q-press/api/components/MarkdownDrawerSidebar.json +17 -0
  138. package/dist/templates/update/src/_q-press/api/components/MarkdownDrawerToc.json +17 -0
  139. package/dist/templates/update/src/_q-press/api/components/MarkdownExample.json +47 -0
  140. package/dist/templates/update/src/_q-press/api/components/MarkdownHeader.json +28 -0
  141. package/dist/templates/update/src/_q-press/api/components/MarkdownHeaderIconLinks.json +16 -0
  142. package/dist/templates/update/src/_q-press/api/components/MarkdownHeaderMenu.json +77 -0
  143. package/dist/templates/update/src/_q-press/api/components/MarkdownHeaderTextLinks.json +33 -0
  144. package/dist/templates/update/src/_q-press/api/components/MarkdownInstallation.json +33 -0
  145. package/dist/templates/update/src/_q-press/api/components/MarkdownLayout.json +52 -0
  146. package/dist/templates/update/src/_q-press/api/components/MarkdownLink.json +23 -0
  147. package/dist/templates/update/src/_q-press/api/components/MarkdownPage.json +71 -0
  148. package/dist/templates/update/src/_q-press/api/components/MarkdownPageFooter.json +21 -0
  149. package/dist/templates/update/src/_q-press/api/components/MarkdownPageSidebar.json +56 -0
  150. package/dist/templates/update/src/_q-press/api/components/MarkdownPageToc.json +17 -0
  151. package/dist/templates/update/src/_q-press/api/components/MarkdownPrerender.json +25 -0
  152. package/dist/templates/update/src/_q-press/api/components/MarkdownTree.json +27 -0
  153. package/dist/templates/update/src/_q-press/api/composables/dark.json +29 -0
  154. package/dist/templates/update/src/_q-press/api/composables/scroll.json +34 -0
  155. package/dist/templates/update/src/_q-press/assets/get-meta.ts +29 -0
  156. package/dist/templates/update/src/_q-press/components/DarkModeToggle.vue +105 -0
  157. package/dist/templates/update/src/_q-press/components/MarkdownApi.vue +663 -0
  158. package/dist/templates/update/src/_q-press/components/MarkdownApiEntry.ts +836 -0
  159. package/dist/templates/update/src/_q-press/components/MarkdownCardLink.vue +25 -0
  160. package/dist/templates/update/src/_q-press/components/MarkdownCardTitle.vue +27 -0
  161. package/dist/templates/update/src/_q-press/components/MarkdownCode.vue +31 -0
  162. package/dist/templates/update/src/_q-press/components/MarkdownCodePrism.ts +36 -0
  163. package/dist/templates/update/src/_q-press/components/MarkdownCodepen.vue +313 -0
  164. package/dist/templates/update/src/_q-press/components/MarkdownCopyButton.vue +107 -0
  165. package/dist/templates/update/src/_q-press/components/MarkdownExample.vue +274 -0
  166. package/dist/templates/update/src/_q-press/components/MarkdownLink.vue +42 -0
  167. package/dist/templates/update/src/_q-press/components/MarkdownPrerender.ts +93 -0
  168. package/dist/templates/update/src/_q-press/components/MarkdownTree.vue +108 -0
  169. package/dist/templates/update/src/_q-press/components/markdown-utils.ts +105 -0
  170. package/dist/templates/update/src/_q-press/composables/dark.ts +39 -0
  171. package/dist/templates/update/src/_q-press/composables/scroll.ts +142 -0
  172. package/dist/templates/update/src/_q-press/css/app.scss +684 -0
  173. package/dist/templates/update/src/_q-press/css/fonts.scss +100 -0
  174. package/dist/templates/update/src/_q-press/css/prism-theme.scss +298 -0
  175. package/dist/templates/update/src/_q-press/css/themes/default.scss +68 -0
  176. package/dist/templates/update/src/_q-press/css/themes/mystic.scss +73 -0
  177. package/dist/templates/update/src/_q-press/css/themes/newspaper.scss +69 -0
  178. package/dist/templates/update/src/_q-press/css/themes/sunrise.scss +69 -0
  179. package/dist/templates/update/src/_q-press/css/themes/tawny.scss +69 -0
  180. package/dist/templates/update/src/_q-press/layouts/MarkdownDrawerSidebar.vue +32 -0
  181. package/dist/templates/update/src/_q-press/layouts/MarkdownDrawerToc.vue +37 -0
  182. package/dist/templates/update/src/_q-press/layouts/MarkdownHeader.vue +412 -0
  183. package/dist/templates/update/src/_q-press/layouts/MarkdownHeaderIconLinks.vue +36 -0
  184. package/dist/templates/update/src/_q-press/layouts/MarkdownHeaderMenu.ts +109 -0
  185. package/dist/templates/update/src/_q-press/layouts/MarkdownHeaderTextLinks.vue +46 -0
  186. package/dist/templates/update/src/_q-press/layouts/MarkdownLayout.vue +239 -0
  187. package/dist/templates/update/src/_q-press/layouts/MarkdownPage.vue +331 -0
  188. package/dist/templates/update/src/_q-press/layouts/MarkdownPageFooter.vue +199 -0
  189. package/dist/templates/update/src/_q-press/layouts/MarkdownPageSidebar.scss +54 -0
  190. package/dist/templates/update/src/_q-press/layouts/MarkdownPageSidebar.ts +218 -0
  191. package/dist/templates/update/src/_q-press/layouts/MarkdownPageToc.vue +23 -0
  192. package/dist/templates/update/src/_q-press/layouts/MarkdownSearch.vue +449 -0
  193. package/dist/templates/update/src/_q-press/stores/markdown.ts +100 -0
  194. package/package.json +25 -20
  195. package/src/index.ts +144 -0
  196. package/src/{install.js → install.ts} +6 -5
  197. package/src/q-press-globals.d.ts +49 -0
  198. package/src/templates/init/src/_q-press/api/components/MarkdownCodepen.json +6 -9
  199. package/src/templates/init/src/_q-press/api/components/MarkdownExample.json +27 -2
  200. package/src/templates/init/src/_q-press/components/MarkdownApi.vue +1 -1
  201. package/src/templates/init/src/_q-press/components/MarkdownCardLink.vue +1 -1
  202. package/src/templates/init/src/_q-press/components/MarkdownCardTitle.vue +1 -1
  203. package/src/templates/init/src/_q-press/components/MarkdownCode.vue +1 -1
  204. package/src/templates/init/src/_q-press/components/MarkdownCodepen.vue +169 -50
  205. package/src/templates/init/src/_q-press/components/MarkdownCopyButton.vue +1 -1
  206. package/src/templates/init/src/_q-press/components/MarkdownExample.vue +53 -18
  207. package/src/templates/init/src/_q-press/components/MarkdownLink.vue +6 -2
  208. package/src/templates/init/src/_q-press/components/MarkdownTree.vue +1 -1
  209. package/src/templates/init/src/_q-press/css/app.scss +12 -8
  210. package/src/templates/init/src/_q-press/layouts/MarkdownPage.vue +4 -3
  211. package/src/templates/init/src/_q-press/layouts/MarkdownSearch.vue +1 -1
  212. package/src/templates/init/src/_q-press/stores/markdown.ts +1 -2
  213. package/src/templates/init/src/markdown/getting-started/introduction.md +2 -2
  214. package/src/templates/init/src/markdown/guides/upgrade-guide.md +7 -11
  215. package/src/templates/init/src/markdown/quasar-app-extensions/qpress/advanced.md +8 -2
  216. package/src/templates/init/src/markdown/quasar-app-extensions/qpress/overview.md +34 -15
  217. package/src/templates/init/src/markdown/quasar-app-extensions/vite-md-plugin-app-ext/overview.md +1 -1
  218. package/src/templates/init/src/markdown/vite-plugins/vite-examples-plugin/advanced.md +8 -3
  219. package/src/templates/init/src/markdown/vite-plugins/vite-examples-plugin/overview.md +16 -4
  220. package/src/templates/init/src/siteConfig/index.ts +11 -0
  221. package/src/templates/update/src/_q-press/api/components/MarkdownCodepen.json +6 -9
  222. package/src/templates/update/src/_q-press/api/components/MarkdownExample.json +27 -2
  223. package/src/templates/update/src/_q-press/components/MarkdownApi.vue +1 -1
  224. package/src/templates/update/src/_q-press/components/MarkdownCardLink.vue +1 -1
  225. package/src/templates/update/src/_q-press/components/MarkdownCardTitle.vue +1 -1
  226. package/src/templates/update/src/_q-press/components/MarkdownCode.vue +1 -1
  227. package/src/templates/update/src/_q-press/components/MarkdownCodepen.vue +169 -50
  228. package/src/templates/update/src/_q-press/components/MarkdownCopyButton.vue +1 -1
  229. package/src/templates/update/src/_q-press/components/MarkdownExample.vue +53 -18
  230. package/src/templates/update/src/_q-press/components/MarkdownLink.vue +6 -2
  231. package/src/templates/update/src/_q-press/components/MarkdownTree.vue +1 -1
  232. package/src/templates/update/src/_q-press/css/app.scss +12 -8
  233. package/src/templates/update/src/_q-press/layouts/MarkdownPage.vue +4 -3
  234. package/src/templates/update/src/_q-press/layouts/MarkdownSearch.vue +1 -1
  235. package/src/templates/update/src/_q-press/stores/markdown.ts +1 -2
  236. package/tsconfig.build.json +11 -0
  237. package/tsconfig.json +16 -0
  238. package/src/index.js +0 -61
  239. package/src/templates/init/src/q-press.globals.d.ts +0 -36
  240. package/src/templates/update/src/q-press.globals.d.ts +0 -36
package/README.md CHANGED
@@ -4,7 +4,9 @@ The Ultimate Markdown Solution for the Quasar Framework.
4
4
 
5
5
  See the [documentation](https://md-plugins.netlify.app/quasar-app-extensions/qpress/overview) for more information.
6
6
 
7
- > Q-Press currently targets Quasar Vite projects using `@quasar/app-vite` `^3.0.0-beta.12`. TypeScript processing is required.
7
+ > Current beta release: `0.1.0-beta.10`.
8
+ >
9
+ > Q-Press currently targets Quasar Vite projects using `@quasar/app-vite` `>=3.0.0-beta.29`. TypeScript processing is required.
8
10
 
9
11
  ## Features
10
12
 
@@ -24,14 +26,12 @@ See the [documentation](https://md-plugins.netlify.app/quasar-app-extensions/qpr
24
26
  - `quasar ext add @md-plugins/q-press`
25
27
  - Here is what gets installed on a **new** install:
26
28
  - `src/.q-press`
27
- - `src/q-press.globals.d.ts`
28
29
  - `src/components`
29
30
  - `src/markdown`
30
31
  - `src/examples`
31
32
  - `src/siteConfig`
32
33
  - Here is what gets installed on an **update** install:
33
34
  - `src/.q-press`
34
- - `src/q-press.globals.d.ts`
35
35
 
36
36
  2. Install `markdown-it` and `@types/markdown-it` in your project devDependencies
37
37
 
@@ -60,8 +60,6 @@ See the [documentation](https://md-plugins.netlify.app/quasar-app-extensions/qpr
60
60
 
61
61
  - ```scss
62
62
  @import '../.q-press/css/app.scss';
63
- @import '../.q-press/css/fonts.scss';
64
- @import '../.q-press/css/prism-theme.scss';
65
63
  ```
66
64
 
67
65
  3. Modify your `quasar.config.ts`
@@ -220,7 +218,7 @@ If you don't have a `.prettierignore` file, create one and add the following:
220
218
 
221
219
  ## Updating
222
220
 
223
- When you update, only the `src/.q-press` folder will be updated as well as the file `src/q-press.globals.d.ts`. If you want to re-install everything, just remove the `src/siteConfig` folder.
221
+ When you update, only the `src/.q-press` folder will be updated. If you want to re-install everything, just remove the `src/siteConfig` folder.
224
222
 
225
223
  To make it easier to update, you can use the following command:
226
224
 
package/dist/index.js ADDED
@@ -0,0 +1,97 @@
1
+ /**
2
+ * Quasar App Extension index/runner script
3
+ * (runs on each dev/build)
4
+ *
5
+ * Docs: https://quasar.dev/app-extensions/development-guide/index-api
6
+ */
7
+ import { defineIndexScript } from '@quasar/app-vite';
8
+ import { fileURLToPath } from 'node:url';
9
+ const qPressGlobalsTsConfigPath = fileURLToPath(new URL('./q-press-globals.d.ts', import.meta.url)).replace(/\\/g, '/');
10
+ function normalizeAlias(alias) {
11
+ if (Array.isArray(alias)) {
12
+ return [...alias];
13
+ }
14
+ return Object.entries(alias ?? {}).map(([find, replacement]) => ({
15
+ find,
16
+ replacement,
17
+ }));
18
+ }
19
+ function addQuasarSourceAlias(viteConf, appDir) {
20
+ const alias = normalizeAlias(viteConf.resolve?.alias);
21
+ viteConf.resolve ??= {};
22
+ viteConf.resolve.alias = [
23
+ ...alias,
24
+ {
25
+ find: /^quasar\/src\/(.*)$/,
26
+ replacement: `${appDir.replace(/\\/g, '/')}/node_modules/quasar/src/$1`,
27
+ },
28
+ ];
29
+ }
30
+ function addQPressGlobalsToTsConfig(tsConfig) {
31
+ tsConfig.files ??= [];
32
+ if (!tsConfig.files.includes(qPressGlobalsTsConfigPath)) {
33
+ tsConfig.files.push(qPressGlobalsTsConfigPath);
34
+ }
35
+ }
36
+ function extendTypeScriptConfig(typescriptConfig) {
37
+ const userExtendTsConfig = typescriptConfig.extendTsConfig;
38
+ typescriptConfig.extendTsConfig = (tsConfig) => {
39
+ userExtendTsConfig?.(tsConfig);
40
+ addQPressGlobalsToTsConfig(tsConfig);
41
+ };
42
+ }
43
+ export default defineIndexScript((api) => {
44
+ // verify this is a Vite project
45
+ if (!api.hasVite) {
46
+ throw new Error('This extension requires Vite');
47
+ }
48
+ api.compatibleWith('quasar', '^2.0.0');
49
+ api.compatibleWith('@quasar/app-vite', '>=3.0.0-beta.29');
50
+ // here we extend /quasar.config, so we can add some Vite/Vue stuff
51
+ api.extendQuasarConf(async (config) => {
52
+ config.build ??= {};
53
+ config.build.typescript ??= {};
54
+ config.build.viteVuePluginOptions ??= {};
55
+ config.framework ??= {};
56
+ extendTypeScriptConfig(config.build.typescript);
57
+ // make sure 'vueRouterMode' has 'history' mode
58
+ if (config.build.vueRouterMode !== 'history') {
59
+ console.warn('Changing vueRouterMode to "history" - required for hash links to work correctly');
60
+ config.build.vueRouterMode = 'history';
61
+ }
62
+ // let Vite know to transpile md files
63
+ const include = config.build.viteVuePluginOptions.include;
64
+ if (Array.isArray(include)) {
65
+ include.push(/\.(vue|md)$/);
66
+ }
67
+ else if (include !== void 0) {
68
+ config.build.viteVuePluginOptions.include = [include, /\.(vue|md)$/];
69
+ }
70
+ else {
71
+ config.build.viteVuePluginOptions.include = [/\.(vue|md)$/];
72
+ }
73
+ // let Vue know to auto import md files
74
+ const extensions = new Set(config.framework.autoImportVueExtensions || []);
75
+ extensions.add('md');
76
+ extensions.add('vue');
77
+ config.framework.autoImportVueExtensions = Array.from(extensions);
78
+ // add the appropriate plugins
79
+ const plugins = new Set(config.framework.plugins || []);
80
+ plugins.add('Cookies');
81
+ plugins.add('Dark');
82
+ plugins.add('Meta');
83
+ plugins.add('Notify');
84
+ config.framework.plugins = Array.from(plugins);
85
+ // const markdownPath = api.resolve.src('markdown')
86
+ // const path = api.resolve.src('siteConfig')
87
+ // if (fse.pathExistsSync(path) && fse.pathExistsSync(markdownPath)) {
88
+ // const siteConfig = await import(path)
89
+ // const { sidebar } = siteConfig.default || siteConfig
90
+ // // add vite-md-plugin to quasar.config.js
91
+ // config.vite.plugins.push(viteMdPlugin({ path: markdownPath, menu: sidebar }))
92
+ // }
93
+ });
94
+ api.extendViteConf((viteConf, _invoke, aeApi) => {
95
+ addQuasarSourceAlias(viteConf, aeApi.appDir);
96
+ });
97
+ });
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Quasar App Extension install script
3
+ *
4
+ * Docs: https://quasar.dev/app-extensions/development-guide/install-api
5
+ */
6
+ import { defineInstallScript } from '@quasar/app-vite';
7
+ import { existsSync } from 'node:fs';
8
+ export default defineInstallScript(async (api) => {
9
+ // verify this is a Vite project
10
+ if (!api.hasVite) {
11
+ throw new Error('This extension requires Vite');
12
+ }
13
+ api.compatibleWith('quasar', '^2.0.0');
14
+ api.compatibleWith('@quasar/app-vite', '>=3.0.0-beta.29');
15
+ // project must have pinia installed
16
+ if ((await api.getStorePackageName()) !== 'pinia') {
17
+ console.error('-----------------------------');
18
+ console.error('This extension requires pinia');
19
+ console.error('-----------------------------');
20
+ throw new Error('This extension requires pinia');
21
+ }
22
+ // project must be typescript
23
+ if ((await api.hasTypescript()) !== true) {
24
+ console.error('----------------------------------');
25
+ console.error('This extension requires TypeScript');
26
+ console.error('----------------------------------');
27
+ throw new Error('This extension requires TypeScript');
28
+ }
29
+ const path = api.resolve.src('siteConfig');
30
+ if (existsSync(path)) {
31
+ // this is an update scenario
32
+ console.warn('-------------------------------------');
33
+ console.warn("Update only for 'src/.q-press' folder");
34
+ console.warn('-------------------------------------');
35
+ api.render('./templates/update');
36
+ }
37
+ else {
38
+ // this is a project initial setup
39
+ console.warn('--------------------------------------------');
40
+ console.warn('Initial setup. Be sure to read the\ndocumentation on the manual set up required.');
41
+ console.warn('--------------------------------------------');
42
+ api.render('./templates/init');
43
+ }
44
+ });
@@ -0,0 +1,49 @@
1
+ /// <reference types="@quasar/app-vite/client" />
2
+
3
+ declare module '*.md'
4
+
5
+ declare global {
6
+ interface ImportMetaHot {
7
+ accept(callback?: (..._args: unknown[]) => unknown): void
8
+ }
9
+
10
+ interface ImportMeta {
11
+ readonly env: ImportMetaEnv
12
+ glob: <T = unknown>(pattern: string) => Record<string, () => Promise<T>>
13
+ hot?: ImportMetaHot
14
+ }
15
+
16
+ interface TocMenuItem {
17
+ id: string
18
+ level: number
19
+ title: string
20
+ link?: string
21
+ deep?: boolean
22
+ sub?: boolean
23
+ onClick?: () => void
24
+ children?: TocMenuItem[]
25
+ }
26
+
27
+ interface MarkdownModule {
28
+ title?: string
29
+ headers?: TocMenuItem[]
30
+ frontmatter?: Record<string, unknown>
31
+ filename?: string
32
+ render: (..._args: unknown[]) => unknown
33
+ }
34
+
35
+ interface MenuItem {
36
+ name: string
37
+ path?: string
38
+ icon?: string
39
+ iconColor?: string
40
+ rightIcon?: string
41
+ rightIconColor?: string
42
+ badge?: string
43
+ children?: MenuItem[] | undefined
44
+ external?: boolean
45
+ expanded?: boolean
46
+ }
47
+ }
48
+
49
+ export {}
File without changes
File without changes
@@ -0,0 +1,37 @@
1
+ {
2
+ "type": "component",
3
+ "meta": {
4
+ "docsUrl": "https://path-to-your-docs/dark-mode-toggle"
5
+ },
6
+ "props": {
7
+ "darkIcon": {
8
+ "type": "String",
9
+ "desc": "Icon name for dark mode",
10
+ "examples": [
11
+ "mdiMoonWaningCrescent"
12
+ ],
13
+ "default": "mdiMoonWaningCrescent",
14
+ "category": "content"
15
+ },
16
+ "lightIcon": {
17
+ "type": "String",
18
+ "desc": "Icon name for light mode",
19
+ "examples": [
20
+ "mdiWhiteBalanceSunny"
21
+ ],
22
+ "default": "mdiWhiteBalanceSunny",
23
+ "category": "content"
24
+ }
25
+ },
26
+ "events": {
27
+ "update:mode": {
28
+ "desc": "Emitted when the mode is toggled",
29
+ "params": {
30
+ "mode": {
31
+ "type": "String",
32
+ "desc": "The current mode ('dark' or 'light')"
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "type": "component",
3
+ "meta": {
4
+ "docsUrl": "https://path-to-your-docs/markdown-api"
5
+ },
6
+ "props": {
7
+ "nameBanner": {
8
+ "type": "String",
9
+ "desc": "Title to display in the banner",
10
+ "examples": [
11
+ "'API Documentation'",
12
+ "'Component API'"
13
+ ],
14
+ "category": "content"
15
+ },
16
+ "pageLink": {
17
+ "type": "String",
18
+ "desc": "URL for the page link",
19
+ "examples": [
20
+ "'https://github.com/user/repo/edit/main/docs/page.md'"
21
+ ],
22
+ "category": "navigation"
23
+ }
24
+ },
25
+ "events": {
26
+ "searchFieldClick": {
27
+ "desc": "Emitted when the search field is clicked",
28
+ "params": {
29
+ "evt": {
30
+ "type": "Event",
31
+ "desc": "JS event object"
32
+ }
33
+ }
34
+ },
35
+ "filterClick": {
36
+ "desc": "Emitted when the filter button is clicked",
37
+ "params": {
38
+ "evt": {
39
+ "type": "Event",
40
+ "desc": "JS event object"
41
+ }
42
+ }
43
+ }
44
+ },
45
+ "methods": {
46
+ "onSearchFieldClick": {
47
+ "desc": "Handler for the search field click event",
48
+ "params": {
49
+ "evt": {
50
+ "type": "Event",
51
+ "desc": "JS event object"
52
+ }
53
+ },
54
+ "returns": null
55
+ },
56
+ "onFilterClick": {
57
+ "desc": "Handler for the filter button click event",
58
+ "params": {
59
+ "evt": {
60
+ "type": "Event",
61
+ "desc": "JS event object"
62
+ }
63
+ },
64
+ "returns": null
65
+ }
66
+ }
67
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "type": "component",
3
+ "meta": {
4
+ "docsUrl": "https://path-to-your-docs/markdown-api-entry"
5
+ },
6
+ "functions": {
7
+ "getProp": {
8
+ "desc": "Function to get a property node for the API entry.",
9
+ "params": {
10
+ "openState": {
11
+ "type": "Object",
12
+ "desc": "The state object to manage open/close state of nodes."
13
+ },
14
+ "masterKey": {
15
+ "type": "String",
16
+ "desc": "The master key for the API entry."
17
+ },
18
+ "prop": {
19
+ "type": "Object",
20
+ "desc": "The property object to generate the node for."
21
+ },
22
+ "paramName": {
23
+ "type": "String",
24
+ "desc": "The name of the parameter."
25
+ },
26
+ "level": {
27
+ "type": "Number",
28
+ "desc": "The level of the property in the hierarchy."
29
+ }
30
+ },
31
+ "returns": {
32
+ "type": "Array<VNode>",
33
+ "desc": "An array of VNode elements representing the property."
34
+ }
35
+ },
36
+ "getDiv": {
37
+ "desc": "Function to create a div element for the API entry.",
38
+ "params": {
39
+ "cols": {
40
+ "type": "Number",
41
+ "desc": "The number of columns the div should span."
42
+ },
43
+ "label": {
44
+ "type": "String",
45
+ "desc": "The label for the div."
46
+ },
47
+ "key": {
48
+ "type": "String",
49
+ "desc": "The key for the div."
50
+ },
51
+ "children": {
52
+ "type": "Array<VNode>",
53
+ "desc": "The child nodes for the div."
54
+ }
55
+ },
56
+ "returns": {
57
+ "type": "VNode",
58
+ "desc": "A VNode element representing the div."
59
+ }
60
+ },
61
+ "getStringType": {
62
+ "desc": "Function to get the string representation of a type.",
63
+ "params": {
64
+ "type": {
65
+ "type": "Object",
66
+ "desc": "The type object to get the string representation for."
67
+ }
68
+ },
69
+ "returns": {
70
+ "type": "String",
71
+ "desc": "The string representation of the type."
72
+ }
73
+ }
74
+ },
75
+ "types": {}
76
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "type": "component",
3
+ "meta": {
4
+ "docsUrl": "https://path-to-your-docs/markdown-card-link"
5
+ },
6
+ "props": {
7
+ "to": {
8
+ "type": "String",
9
+ "desc": "The target URL or path for the link",
10
+ "examples": [
11
+ "/home",
12
+ "https://example.com"
13
+ ],
14
+ "required": true,
15
+ "category": "navigation"
16
+ },
17
+ "external": {
18
+ "type": "Boolean",
19
+ "desc": "Flag to indicate if the link is external",
20
+ "category": "navigation"
21
+ }
22
+ },
23
+ "slots": {
24
+ "default": {
25
+ "desc": "Slot for custom content inside the link"
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "type": "component",
3
+ "meta": {
4
+ "docsUrl": "https://path-to-your-docs/markdown-card-title"
5
+ },
6
+ "props": {
7
+ "title": {
8
+ "type": "String",
9
+ "desc": "The title text to display",
10
+ "examples": [
11
+ "'Introduction'",
12
+ "'Chapter 1'"
13
+ ],
14
+ "category": "content"
15
+ },
16
+ "prefix": {
17
+ "type": "String",
18
+ "desc": "Prefix to add to the slugified title",
19
+ "examples": [
20
+ "'section-'"
21
+ ],
22
+ "category": "content"
23
+ }
24
+ },
25
+ "events": {
26
+ "click": {
27
+ "desc": "Emitted when the title is clicked",
28
+ "params": {
29
+ "evt": {
30
+ "type": "Event",
31
+ "desc": "JS event object"
32
+ }
33
+ }
34
+ }
35
+ },
36
+ "methods": {
37
+ "onClick": {
38
+ "desc": "Handler for the click event on the title",
39
+ "params": {
40
+ "evt": {
41
+ "type": "Event",
42
+ "desc": "JS event object"
43
+ }
44
+ },
45
+ "returns": null
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "type": "component",
3
+ "meta": {
4
+ "docsUrl": "https://path-to-your-docs/markdown-code"
5
+ },
6
+ "props": {
7
+ "code": {
8
+ "type": "String",
9
+ "desc": "The code to display",
10
+ "examples": [
11
+ "'const a = 1;'",
12
+ "'<div>Hello World</div>'"
13
+ ],
14
+ "category": "content"
15
+ },
16
+ "maxHeight": {
17
+ "type": "String",
18
+ "desc": "Maximum height for the code block",
19
+ "examples": [
20
+ "'200px'",
21
+ "'50vh'"
22
+ ],
23
+ "category": "style"
24
+ },
25
+ "lang": {
26
+ "type": "String",
27
+ "desc": "Language of the code for syntax highlighting",
28
+ "default": "js",
29
+ "examples": [
30
+ "'js'",
31
+ "'html'",
32
+ "'css'"
33
+ ],
34
+ "category": "content"
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "type": "component",
3
+ "meta": {
4
+ "docsUrl": "https://path-to-your-docs/markdown-code-prism"
5
+ },
6
+ "props": {
7
+ "code": {
8
+ "type": "String",
9
+ "desc": "The code to display with syntax highlighting",
10
+ "examples": [
11
+ "'const a = 1;'",
12
+ "'<div>Hello World</div>'"
13
+ ],
14
+ "required": true,
15
+ "category": "content"
16
+ },
17
+ "lang": {
18
+ "type": "String",
19
+ "desc": "Language of the code for syntax highlighting",
20
+ "examples": [
21
+ "'js'",
22
+ "'html'",
23
+ "'css'"
24
+ ],
25
+ "required": true,
26
+ "category": "content"
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "type": "component",
3
+ "meta": {
4
+ "docsUrl": "https://path-to-your-docs/markdown-codepen"
5
+ },
6
+ "props": {
7
+ "title": {
8
+ "type": "String",
9
+ "desc": "Title used for the generated CodePen",
10
+ "required": true,
11
+ "examples": [
12
+ "'Basic Example'",
13
+ "'Advanced Playground'"
14
+ ],
15
+ "category": "content"
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "type": "component",
3
+ "meta": {
4
+ "docsUrl": "https://path-to-your-docs/markdown-copy-button"
5
+ },
6
+ "props": {
7
+ "lang": {
8
+ "type": "String",
9
+ "desc": "Language of the code block to copy",
10
+ "examples": [
11
+ "'js'",
12
+ "'html'",
13
+ "'css'"
14
+ ],
15
+ "category": "content"
16
+ }
17
+ },
18
+ "events": {
19
+ "copy": {
20
+ "desc": "Emitted when the copy button is clicked",
21
+ "params": {
22
+ "evt": {
23
+ "type": "Event",
24
+ "desc": "JS event object"
25
+ }
26
+ }
27
+ }
28
+ },
29
+ "methods": {
30
+ "copy": {
31
+ "desc": "Method to copy the code block to the clipboard",
32
+ "params": {},
33
+ "returns": null
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "type": "component",
3
+ "meta": {
4
+ "docsUrl": "https://path-to-your-docs/markdown-drawer-toc"
5
+ },
6
+ "events": {
7
+ "toggleTocDrawer": {
8
+ "desc": "Emitted when the close button is clicked to toggle the Table of Contents drawer",
9
+ "params": {
10
+ "evt": {
11
+ "type": "Event",
12
+ "desc": "JS event object"
13
+ }
14
+ }
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "type": "component",
3
+ "meta": {
4
+ "docsUrl": "https://path-to-your-docs/markdown-drawer-toc"
5
+ },
6
+ "events": {
7
+ "toggleTocDrawer": {
8
+ "desc": "Emitted when the close button is clicked to toggle the Table of Contents drawer",
9
+ "params": {
10
+ "evt": {
11
+ "type": "Event",
12
+ "desc": "JS event object"
13
+ }
14
+ }
15
+ }
16
+ }
17
+ }