docus 2.1.0 → 3.0.0-beta.11

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 (282) hide show
  1. package/README.md +6 -4
  2. package/package.json +39 -83
  3. package/theme/app/router.options.ts +18 -0
  4. package/theme/assets/css/fonts.css +84 -0
  5. package/theme/assets/css/main.css +104 -0
  6. package/theme/components/app/Container.vue +25 -0
  7. package/theme/components/app/Footer.vue +40 -0
  8. package/theme/components/app/MobileNav.vue +85 -0
  9. package/theme/components/app/Navbar.vue +37 -0
  10. package/theme/components/app/NavbarLogo.vue +33 -0
  11. package/theme/components/app/Page.vue +7 -0
  12. package/theme/components/app/PoweredByDocus.vue +11 -0
  13. package/theme/components/content/Alert.vue +124 -0
  14. package/theme/components/content/BlockHero.vue +54 -0
  15. package/theme/components/content/ButtonLink.vue +45 -0
  16. package/theme/components/content/Card.vue +46 -0
  17. package/theme/components/content/CardGrid.vue +23 -0
  18. package/theme/components/content/CodeBlock.vue +47 -0
  19. package/theme/components/content/CodeGroup.vue +135 -0
  20. package/theme/components/content/CopyButton.vue +49 -0
  21. package/{dist/runtime/app/components/prose/ProseOl.vue → theme/components/content/List.vue} +2 -2
  22. package/theme/components/content/NeedContribution.vue +23 -0
  23. package/theme/components/content/ReadMore.vue +25 -0
  24. package/theme/components/content/Sandbox.vue +102 -0
  25. package/theme/components/content/TabsHeader.vue +44 -0
  26. package/theme/components/content/Terminal.vue +64 -0
  27. package/theme/components/content/VideoPlayer.vue +115 -0
  28. package/theme/components/dev/Debug.vue +65 -0
  29. package/theme/components/docs/DocsAside.vue +21 -0
  30. package/theme/components/docs/DocsAsideTree.vue +104 -0
  31. package/theme/components/docs/DocsHero.vue +39 -0
  32. package/theme/components/docs/DocsPage.vue +21 -0
  33. package/theme/components/docs/DocsPageContent.vue +32 -0
  34. package/theme/components/docs/DocsToc.vue +77 -0
  35. package/theme/components/globals/Icon.vue +24 -0
  36. package/{dist/runtime/app/components/prose/ProseHr.vue → theme/components/globals/Logo.vue} +1 -1
  37. package/theme/components/globals/NuxtImg.vue +45 -0
  38. package/theme/components/globals/SocialIcons.vue +45 -0
  39. package/theme/components/globals/ThemeSelect.vue +35 -0
  40. package/theme/components/icons/IconAlgolia.vue +8 -0
  41. package/theme/components/icons/IconArrowLeft.vue +10 -0
  42. package/theme/components/icons/IconArrowRight.vue +10 -0
  43. package/theme/components/icons/IconBadgeCheck.vue +14 -0
  44. package/theme/components/icons/IconCheck.vue +10 -0
  45. package/theme/components/icons/IconCheckCircle.vue +10 -0
  46. package/theme/components/icons/IconChevronRight.vue +12 -0
  47. package/theme/components/icons/IconClipboardCheck.vue +14 -0
  48. package/theme/components/icons/IconClipboardCopy.vue +14 -0
  49. package/theme/components/icons/IconCodeSandbox.vue +8 -0
  50. package/theme/components/icons/IconCopy.vue +17 -0
  51. package/theme/components/icons/IconDots.vue +10 -0
  52. package/theme/components/icons/IconEdit.vue +18 -0
  53. package/theme/components/icons/IconExclamationCircle.vue +12 -0
  54. package/theme/components/icons/IconExclamationTriangle.vue +10 -0
  55. package/theme/components/icons/IconExternalLink.vue +12 -0
  56. package/theme/components/icons/IconGit.vue +7 -0
  57. package/theme/components/icons/IconGitHub.vue +10 -0
  58. package/theme/components/icons/IconHeart.vue +9 -0
  59. package/theme/components/icons/IconInformationCircle.vue +10 -0
  60. package/theme/components/icons/IconLighthouse.vue +83 -0
  61. package/theme/components/icons/IconLine.vue +10 -0
  62. package/theme/components/icons/IconMarkdown.vue +13 -0
  63. package/theme/components/icons/IconMenu.vue +12 -0
  64. package/theme/components/icons/IconMenuAlt.vue +10 -0
  65. package/theme/components/icons/IconMinus.vue +10 -0
  66. package/theme/components/icons/IconMoon.vue +10 -0
  67. package/theme/components/icons/IconNuxt.vue +14 -0
  68. package/theme/components/icons/IconNuxtContent.vue +20 -0
  69. package/theme/components/icons/IconNuxtLabs.vue +21 -0
  70. package/theme/components/icons/IconPlus.vue +10 -0
  71. package/theme/components/icons/IconPuzzle.vue +8 -0
  72. package/theme/components/icons/IconSSG.vue +7 -0
  73. package/theme/components/icons/IconSearch.vue +12 -0
  74. package/theme/components/icons/IconSun.vue +10 -0
  75. package/theme/components/icons/IconTailwind.vue +3 -0
  76. package/theme/components/icons/IconTocBack.vue +21 -0
  77. package/theme/components/icons/IconTocCurrent.vue +21 -0
  78. package/theme/components/icons/IconTocNext.vue +8 -0
  79. package/theme/components/icons/IconTranslate.vue +14 -0
  80. package/theme/components/icons/IconTwitter.vue +8 -0
  81. package/theme/components/icons/IconVite.vue +30 -0
  82. package/theme/components/icons/IconVue.vue +6 -0
  83. package/theme/components/icons/IconVueTelescope.vue +11 -0
  84. package/theme/components/icons/IconWindi.vue +17 -0
  85. package/theme/components/icons/IconX.vue +12 -0
  86. package/theme/components/icons/IconXCircle.vue +10 -0
  87. package/theme/components/icons/IconZap.vue +8 -0
  88. package/theme/components/prose/ProseA.vue +66 -0
  89. package/theme/components/prose/ProseBlockquote.vue +21 -0
  90. package/theme/components/prose/ProseCode.vue +67 -0
  91. package/theme/components/prose/ProseCodeInline.vue +38 -0
  92. package/theme/components/prose/ProseEm.vue +11 -0
  93. package/theme/components/prose/ProseH1.vue +22 -0
  94. package/theme/components/prose/ProseH2.vue +22 -0
  95. package/theme/components/prose/ProseH3.vue +24 -0
  96. package/theme/components/prose/ProseH4.vue +24 -0
  97. package/theme/components/prose/ProseHr.vue +13 -0
  98. package/theme/components/prose/ProseImg.vue +30 -0
  99. package/theme/components/prose/ProseLi.vue +31 -0
  100. package/theme/components/prose/ProseOl.vue +16 -0
  101. package/theme/components/prose/ProseP.vue +14 -0
  102. package/theme/components/prose/ProseStrong.vue +14 -0
  103. package/theme/components/prose/ProseTable.vue +13 -0
  104. package/{dist/runtime/app → theme}/components/prose/ProseTbody.vue +0 -0
  105. package/theme/components/prose/ProseTd.vue +11 -0
  106. package/theme/components/prose/ProseTh.vue +11 -0
  107. package/theme/components/prose/ProseThead.vue +11 -0
  108. package/theme/components/prose/ProseTr.vue +11 -0
  109. package/theme/components/prose/ProseUl.vue +15 -0
  110. package/theme/composables/useDocus.ts +43 -0
  111. package/theme/composables/useMenu.ts +7 -0
  112. package/theme/composables/useScrollToHeading.ts +35 -0
  113. package/theme/composables/useScrollspy.ts +46 -0
  114. package/theme/composables/useUserAgent.ts +7 -0
  115. package/theme/composables/utils.ts +4 -0
  116. package/theme/layouts/default.vue +29 -0
  117. package/theme/layouts/page.vue +19 -0
  118. package/theme/middleware/components.ts +26 -0
  119. package/theme/middleware/navigation.global.ts +12 -0
  120. package/theme/middleware/page.ts +8 -0
  121. package/theme/middleware/theme.global.ts +12 -0
  122. package/theme/nuxt.config.ts +171 -0
  123. package/theme/pages/[...slug].vue +64 -0
  124. package/theme/plugins/menu.ts +67 -0
  125. package/theme/plugins/user-agent.ts +27 -0
  126. package/theme/utils/components.ts +25 -0
  127. package/theme/utils/navigation.ts +49 -0
  128. package/theme/utils/plugin.ts +21 -0
  129. package/theme/utils/queries.ts +68 -0
  130. package/theme/utils/state.ts +33 -0
  131. package/theme/utils/theme.ts +66 -0
  132. package/LICENSE +0 -21
  133. package/dist/index.cjs +0 -549
  134. package/dist/index.d.ts +0 -25
  135. package/dist/index.mjs +0 -523
  136. package/dist/runtime/app/components/DocusContent.vue +0 -215
  137. package/dist/runtime/app/components/DocusContent.vue.d.ts +0 -25
  138. package/dist/runtime/app/components/Error.vue +0 -19
  139. package/dist/runtime/app/components/Error.vue.d.ts +0 -9
  140. package/dist/runtime/app/components/Markdown.vue +0 -56
  141. package/dist/runtime/app/components/Markdown.vue.d.ts +0 -25
  142. package/dist/runtime/app/components/Page.vue +0 -29
  143. package/dist/runtime/app/components/Page.vue.d.ts +0 -2
  144. package/dist/runtime/app/components/Props.vue +0 -130
  145. package/dist/runtime/app/components/Props.vue.d.ts +0 -80
  146. package/dist/runtime/app/components/prose/ProseA.vue +0 -41
  147. package/dist/runtime/app/components/prose/ProseA.vue.d.ts +0 -23
  148. package/dist/runtime/app/components/prose/ProseBlockquote.vue +0 -5
  149. package/dist/runtime/app/components/prose/ProseCode.vue +0 -5
  150. package/dist/runtime/app/components/prose/ProseCodeInline.vue +0 -5
  151. package/dist/runtime/app/components/prose/ProseEm.vue +0 -5
  152. package/dist/runtime/app/components/prose/ProseH1.vue +0 -3
  153. package/dist/runtime/app/components/prose/ProseH2.vue +0 -3
  154. package/dist/runtime/app/components/prose/ProseH3.vue +0 -3
  155. package/dist/runtime/app/components/prose/ProseH4.vue +0 -3
  156. package/dist/runtime/app/components/prose/ProseH5.vue +0 -3
  157. package/dist/runtime/app/components/prose/ProseH6.vue +0 -3
  158. package/dist/runtime/app/components/prose/ProseImg.vue +0 -32
  159. package/dist/runtime/app/components/prose/ProseImg.vue.d.ts +0 -21
  160. package/dist/runtime/app/components/prose/ProseLi.vue +0 -3
  161. package/dist/runtime/app/components/prose/ProseParagraph.vue +0 -3
  162. package/dist/runtime/app/components/prose/ProseStrong.vue +0 -5
  163. package/dist/runtime/app/components/prose/ProseTable.vue +0 -5
  164. package/dist/runtime/app/components/prose/ProseTd.vue +0 -5
  165. package/dist/runtime/app/components/prose/ProseTh.vue +0 -5
  166. package/dist/runtime/app/components/prose/ProseThead.vue +0 -5
  167. package/dist/runtime/app/components/prose/ProseTr.vue +0 -5
  168. package/dist/runtime/app/components/prose/ProseUl.vue +0 -5
  169. package/dist/runtime/app/composables/helpers.d.ts +0 -4
  170. package/dist/runtime/app/composables/helpers.js +0 -66
  171. package/dist/runtime/app/composables/helpers.mjs +0 -40
  172. package/dist/runtime/app/composables/index.d.ts +0 -90
  173. package/dist/runtime/app/composables/index.js +0 -108
  174. package/dist/runtime/app/composables/index.mjs +0 -63
  175. package/dist/runtime/app/composables/navigation.d.ts +0 -37
  176. package/dist/runtime/app/composables/navigation.js +0 -227
  177. package/dist/runtime/app/composables/navigation.mjs +0 -148
  178. package/dist/runtime/app/composables/store.d.ts +0 -7
  179. package/dist/runtime/app/composables/store.js +0 -52
  180. package/dist/runtime/app/composables/store.mjs +0 -35
  181. package/dist/runtime/app/composables/style.d.ts +0 -11
  182. package/dist/runtime/app/composables/style.js +0 -117
  183. package/dist/runtime/app/composables/style.mjs +0 -71
  184. package/dist/runtime/app/composables/theme-colors.d.ts +0 -30
  185. package/dist/runtime/app/composables/theme-colors.js +0 -80
  186. package/dist/runtime/app/composables/theme-colors.mjs +0 -48
  187. package/dist/runtime/app/composables/websocket.d.ts +0 -3
  188. package/dist/runtime/app/composables/websocket.js +0 -79
  189. package/dist/runtime/app/composables/websocket.mjs +0 -63
  190. package/dist/runtime/app/layouts/default.vue +0 -5
  191. package/dist/runtime/app/layouts/error.vue +0 -33
  192. package/dist/runtime/app/layouts/error.vue.d.ts +0 -21
  193. package/dist/runtime/app/pages/_.vue +0 -222
  194. package/dist/runtime/app/pages/_.vue.d.ts +0 -2
  195. package/dist/runtime/context.d.ts +0 -1
  196. package/dist/runtime/context.js +0 -17
  197. package/dist/runtime/context.mjs +0 -5
  198. package/dist/runtime/database/Query.d.ts +0 -18
  199. package/dist/runtime/database/Query.js +0 -68
  200. package/dist/runtime/database/Query.mjs +0 -49
  201. package/dist/runtime/database/index.d.ts +0 -4
  202. package/dist/runtime/database/index.js +0 -45
  203. package/dist/runtime/database/index.mjs +0 -25
  204. package/dist/runtime/database/providers/local/Query.d.ts +0 -14
  205. package/dist/runtime/database/providers/local/Query.js +0 -85
  206. package/dist/runtime/database/providers/local/Query.mjs +0 -60
  207. package/dist/runtime/database/providers/local/index.d.ts +0 -3
  208. package/dist/runtime/database/providers/local/index.js +0 -63
  209. package/dist/runtime/database/providers/local/index.mjs +0 -39
  210. package/dist/runtime/database/providers/local/operations.d.ts +0 -2
  211. package/dist/runtime/database/providers/local/operations.js +0 -83
  212. package/dist/runtime/database/providers/local/operations.mjs +0 -53
  213. package/dist/runtime/database/providers/local/utils.d.ts +0 -8
  214. package/dist/runtime/database/providers/local/utils.js +0 -28
  215. package/dist/runtime/database/providers/local/utils.mjs +0 -17
  216. package/dist/runtime/index.d.ts +0 -3
  217. package/dist/runtime/index.js +0 -44
  218. package/dist/runtime/index.mjs +0 -3
  219. package/dist/runtime/navigation.d.ts +0 -4
  220. package/dist/runtime/navigation.js +0 -176
  221. package/dist/runtime/navigation.mjs +0 -137
  222. package/dist/runtime/server/api/get.d.ts +0 -10
  223. package/dist/runtime/server/api/get.js +0 -24
  224. package/dist/runtime/server/api/get.mjs +0 -13
  225. package/dist/runtime/server/api/list.d.ts +0 -9
  226. package/dist/runtime/server/api/list.js +0 -34
  227. package/dist/runtime/server/api/list.mjs +0 -18
  228. package/dist/runtime/server/api/navigation.d.ts +0 -7
  229. package/dist/runtime/server/api/navigation.js +0 -20
  230. package/dist/runtime/server/api/navigation.mjs +0 -10
  231. package/dist/runtime/server/api/preview.d.ts +0 -3
  232. package/dist/runtime/server/api/preview.js +0 -54
  233. package/dist/runtime/server/api/preview.mjs +0 -31
  234. package/dist/runtime/server/api/reload.d.ts +0 -6
  235. package/dist/runtime/server/api/reload.js +0 -27
  236. package/dist/runtime/server/api/reload.mjs +0 -11
  237. package/dist/runtime/server/api/search.d.ts +0 -6
  238. package/dist/runtime/server/api/search.js +0 -27
  239. package/dist/runtime/server/api/search.mjs +0 -13
  240. package/dist/runtime/server/content.d.ts +0 -46
  241. package/dist/runtime/server/content.js +0 -175
  242. package/dist/runtime/server/content.mjs +0 -114
  243. package/dist/runtime/server/socket.d.ts +0 -9
  244. package/dist/runtime/server/socket.js +0 -33
  245. package/dist/runtime/server/socket.mjs +0 -20
  246. package/dist/runtime/server/utils/cache.d.ts +0 -19
  247. package/dist/runtime/server/utils/cache.js +0 -110
  248. package/dist/runtime/server/utils/cache.mjs +0 -75
  249. package/dist/runtime/server/utils/index.d.ts +0 -4
  250. package/dist/runtime/server/utils/index.js +0 -18
  251. package/dist/runtime/server/utils/index.mjs +0 -8
  252. package/dist/runtime/transformers/index.d.ts +0 -1
  253. package/dist/runtime/transformers/index.js +0 -26
  254. package/dist/runtime/transformers/index.mjs +0 -11
  255. package/dist/runtime/transformers/json.d.ts +0 -3
  256. package/dist/runtime/transformers/json.js +0 -15
  257. package/dist/runtime/transformers/json.mjs +0 -5
  258. package/dist/runtime/transformers/markdown/index.d.ts +0 -8
  259. package/dist/runtime/transformers/markdown/index.js +0 -25
  260. package/dist/runtime/transformers/markdown/index.mjs +0 -16
  261. package/dist/runtime/transformers/utils/index.d.ts +0 -1
  262. package/dist/runtime/transformers/utils/index.js +0 -18
  263. package/dist/runtime/transformers/utils/index.mjs +0 -1
  264. package/dist/runtime/transformers/utils/path.d.ts +0 -26
  265. package/dist/runtime/transformers/utils/path.js +0 -88
  266. package/dist/runtime/transformers/utils/path.mjs +0 -56
  267. package/dist/runtime/utils/index.d.ts +0 -1
  268. package/dist/runtime/utils/index.js +0 -18
  269. package/dist/runtime/utils/index.mjs +0 -1
  270. package/dist/runtime/utils/log.d.ts +0 -1
  271. package/dist/runtime/utils/log.js +0 -14
  272. package/dist/runtime/utils/log.mjs +0 -2
  273. package/dist/runtime/utils/object.d.ts +0 -9
  274. package/dist/runtime/utils/object.js +0 -22
  275. package/dist/runtime/utils/object.mjs +0 -4
  276. package/dist/templates/content.mjs +0 -50
  277. package/dist/templates/docus.mjs +0 -13
  278. package/dist/templates/hot.mjs +0 -16
  279. package/dist/templates/i18n.mjs +0 -23
  280. package/dist/templates/options.mjs +0 -46
  281. package/shims.d.ts +0 -24
  282. package/types.d.ts +0 -397
package/README.md CHANGED
@@ -1,9 +1,11 @@
1
1
  <h1>
2
- <img src="./.github/banner.png" >
3
- </h1>
2
+ <img src="https://user-images.githubusercontent.com/904724/105075054-872fac80-5a89-11eb-8aab-46dd254ad986.png">
3
+ </h1>
4
4
 
5
- <p>
5
+ <p>
6
6
  <a href="https://www.npmjs.com/package/docus"><img src="https://badgen.net/npm/dm/docus" alt="Downloads"></a>
7
7
  <a href="https://www.npmjs.com/package/docus"><img src="https://badgen.net/npm/v/docus" alt="Version"></a>
8
8
  <a href="https://www.npmjs.com/package/docus"><img src="https://badgen.net/npm/license/docus" alt="License"></a>
9
- </p>
9
+ </p>
10
+
11
+ Docus is the fastest way to create documentations websites with [**Nuxt3**](https://v3.nuxtjs.org).
package/package.json CHANGED
@@ -1,91 +1,47 @@
1
1
  {
2
+ "version": "3.0.0-beta.11",
2
3
  "name": "docus",
3
- "version": "2.1.0",
4
- "description": "The Modern Website Generator.",
5
- "keywords": [
6
- "nuxt",
7
- "module",
8
- "nuxt-module",
9
- "docus-core"
10
- ],
11
- "repository": "https://github.com/docusgen/docus",
12
- "license": "MIT",
13
- "exports": {
14
- ".": "./dist/index.mjs"
15
- },
16
- "main": "./dist/index.mjs",
17
- "module": "./dist/index.mjs",
18
- "types": "./types.d.ts",
19
- "files": [
20
- "dist",
21
- "types.d.ts",
22
- "shims.d.ts"
23
- ],
24
4
  "scripts": {
25
- "build": "unbuild",
26
- "dev": "nuxt dev example",
27
- "generate": "nuxt generate example",
28
- "start": "nuxt start example",
29
- "lint": "eslint --ext .js,.ts,.vue .",
30
- "test": "yarn lint && mocha --timeout 10000 --exit -r jiti/register test/**/*.test.ts",
31
- "clean:example": "rm -rf example/.nuxt example/node_modules",
32
- "clean:dist": "rm -rf dist node_modules",
33
- "clean": "yarn clean:example && yarn clean:dist"
5
+ "build": "nuxi build",
6
+ "dev": "nuxi dev",
7
+ "preview": "nuxi preview",
8
+ "lint": "eslint --ext .ts,.js,.vue,.css ."
34
9
  },
35
- "resolutions": {
36
- "mdast-util-from-markdown": "1.0.4"
10
+ "devDependencies": {
11
+ "@antfu/eslint-config": "^0.21.1",
12
+ "@nuxtjs/eslint-config-typescript": "^9.0.0",
13
+ "eslint": "^8.14.0",
14
+ "jiti": "^1.13.0",
15
+ "nuxt": "npm:nuxt3@latest",
16
+ "parse-entities": "^4.0.0",
17
+ "typescript": "^4.6.4"
37
18
  },
38
19
  "dependencies": {
39
- "@docus/cli": "^1.1.0",
40
- "@docus/mdc": "npm:@docus/mdc-edge@latest",
41
- "@nuxt/image": "^0.6.0",
42
- "@nuxt/kit": "npm:@nuxt/kit-edge@latest",
43
- "@nuxtjs/i18n": "^7.2.0",
44
- "chalk": "^4.1.2",
45
- "clear-module": "^4.1.2",
46
- "consola": "^2.15.3",
47
- "core-js": "3",
48
- "debounce": "^1.2.1",
49
- "defu": "^5.0.0",
50
- "glob": "^7.2.0",
51
- "h3": "^0.3.3",
52
- "iso-639-1": "^2.1.10",
53
- "jiti": "^1.12.9",
54
- "micromatch": "^4.0.4",
55
- "murmurhash-es": "^0.1.1",
56
- "node-fetch": "^2.6.6",
57
- "nuxt-component-meta": "^0.0.7",
58
- "pathe": "^0.2.0",
59
- "property-information": "6.1.1",
60
- "scule": "^0.2.1",
61
- "ufo": "^0.7.9",
62
- "unctx": "^1.0.2",
63
- "unstorage": "^0.3.3",
64
- "ws": "^8.3.0"
20
+ "@iconify/vue": "^3.2.1",
21
+ "@nuxt/content": "npm:@nuxt/content-edge@latest",
22
+ "@nuxthq/admin": "npm:@nuxthq/admin-edge@latest",
23
+ "@nuxtjs/color-mode": "^3.0.2",
24
+ "@nuxtjs/tailwindcss": "^5.0.3",
25
+ "@tailwindcss/aspect-ratio": "^0.4.0",
26
+ "@tailwindcss/forms": "^0.5.0",
27
+ "@tailwindcss/line-clamp": "^0.4.0",
28
+ "@tailwindcss/typography": "^0.5.2",
29
+ "@vueuse/core": "^8.3.1",
30
+ "@vueuse/motion": "2.0.0-beta.12",
31
+ "@vueuse/nuxt": "^8.3.1",
32
+ "clipboard": "^2.0.10",
33
+ "defu": "^6.0.0",
34
+ "lodash-es": "^4.17.21",
35
+ "tailwindcss": "^3.0.24",
36
+ "vue-plausible": "^1.3.1"
65
37
  },
66
- "devDependencies": {
67
- "@babel/preset-env": "latest",
68
- "@babel/preset-typescript": "latest",
69
- "@nuxt/bridge": "npm:@nuxt/bridge-edge@latest",
70
- "@nuxt/test-utils": "latest",
71
- "@nuxt/types": "^2.15.8",
72
- "@nuxtjs/eslint-config-typescript": "latest",
73
- "@types/chai": "^4.2.22",
74
- "@types/debounce": "^1.2.1",
75
- "@types/glob": "^7.2.0",
76
- "@types/micromatch": "^4.0.2",
77
- "@types/mocha": "^9.0.0",
78
- "@types/node-fetch": "^3.0.3",
79
- "@types/ws": "^8.2.0",
80
- "chai": "^4.3.4",
81
- "eslint": "^8.3.0",
82
- "eslint-config-prettier": "^8.3.0",
83
- "eslint-plugin-nuxt": "^3.0.0",
84
- "eslint-plugin-prettier": "^4.0.0",
85
- "mocha": "^9.1.3",
86
- "nuxt-edge": "^2.16.0-27295215.ab1c6cb4",
87
- "playwright": "^1.16.3",
88
- "prettier": "^2.4.1",
89
- "unbuild": "^0.5.13"
90
- }
38
+ "main": "./nuxt.config.ts",
39
+ "exports": {
40
+ "./theme": "./theme/nuxt.config.ts",
41
+ "./theme/*": "./theme/*/*.*"
42
+ },
43
+ "files": [
44
+ "README.md",
45
+ "theme"
46
+ ]
91
47
  }
@@ -0,0 +1,18 @@
1
+ import type { RouterConfig } from '@nuxt/schema'
2
+
3
+ // https://router.vuejs.org/api/#routeroptions
4
+ export default <RouterConfig>{
5
+ scrollBehavior: (to) => {
6
+ if (to.params?.smooth) {
7
+ return {
8
+ el: to.params?.smooth,
9
+ behavior: 'smooth',
10
+ }
11
+ }
12
+
13
+ // Scroll to top of window
14
+ window.scrollTo({
15
+ top: 0,
16
+ })
17
+ },
18
+ }
@@ -0,0 +1,84 @@
1
+ /* `font-light` */
2
+ @font-face {
3
+ font-family: "RoobertPRO";
4
+ src: url("/fonts/RoobertPRO-Light.woff2") format("woff2"),
5
+ url("/fonts/RoobertPRO-Light.woff") format("woff");
6
+ font-weight: 300;
7
+ }
8
+ @font-face {
9
+ font-family: "RoobertPRO";
10
+ src: url("/fonts/RoobertPRO-LightItalic.woff2") format("woff2"),
11
+ url("/fonts/RoobertPRO-LightItalic.woff") format("woff");
12
+ font-weight: 300;
13
+ font-style: italic;
14
+ }
15
+ /* `font-normal` */
16
+ @font-face {
17
+ font-family: "RoobertPRO";
18
+ src: url("/fonts/RoobertPRO-Regular.woff2") format("woff2"),
19
+ url("/fonts/RoobertPRO-Regular.woff") format("woff");
20
+ font-weight: 400;
21
+ }
22
+ @font-face {
23
+ font-family: "RoobertPRO";
24
+ src: url("/fonts/RoobertPRO-RegularItalic.woff2") format("woff2"),
25
+ url("/fonts/RoobertPRO-RegularItalic.woff") format("woff");
26
+ font-weight: 400;
27
+ font-style: italic;
28
+ }
29
+ /* `font-medium */
30
+ @font-face {
31
+ font-family: "RoobertPRO";
32
+ src: url("/fonts/RoobertPRO-Medium.woff2") format("woff2"),
33
+ url("/fonts/RoobertPRO-Medium.woff") format("woff");
34
+ font-weight: 500;
35
+ }
36
+ @font-face {
37
+ font-family: "RoobertPRO";
38
+ src: url("/fonts/RoobertPRO-MediumItalic.woff2") format("woff2"),
39
+ url("/fonts/RoobertPRO-MediumItalic.woff") format("woff");
40
+ font-weight: 500;
41
+ font-style: italic;
42
+ }
43
+ /* `font-semibold` */
44
+ @font-face {
45
+ font-family: "RoobertPRO";
46
+ src: url("/fonts/RoobertPRO-SemiBold.woff2") format("woff2"),
47
+ url("/fonts/RoobertPRO-SemiBold.woff") format("woff");
48
+ font-weight: 600;
49
+ }
50
+ @font-face {
51
+ font-family: "RoobertPRO";
52
+ src: url("/fonts/RoobertPRO-SemiBoldItalic.woff2") format("woff2"),
53
+ url("/fonts/RoobertPRO-SemiBoldItalic.woff") format("woff");
54
+ font-weight: 600;
55
+ font-style: italic;
56
+ }
57
+ /* `font-bold` */
58
+ @font-face {
59
+ font-family: "RoobertPRO";
60
+ src: url("/fonts/RoobertPRO-Bold.woff2") format("woff2"),
61
+ url("/fonts/RoobertPRO-Bold.woff") format("woff");
62
+ font-weight: 700;
63
+ }
64
+ @font-face {
65
+ font-family: "RoobertPRO";
66
+ src: url("/fonts/RoobertPRO-BoldItalic.woff2") format("woff2"),
67
+ url("/fonts/RoobertPRO-BoldItalic.woff") format("woff");
68
+ font-weight: 700;
69
+ font-style: italic;
70
+ }
71
+ /* `font-extrabold` */
72
+ @font-face {
73
+ font-family: "RoobertPRO";
74
+ src: url("/fonts/RoobertPRO-Heavy.woff2") format("woff2"),
75
+ url("/fonts/RoobertPRO-Heavy.woff") format("woff");
76
+ font-weight: 800;
77
+ }
78
+ @font-face {
79
+ font-family: "RoobertPRO";
80
+ src: url("/fonts/RoobertPRO-HeavyItalic.woff2") format("woff2"),
81
+ url("/fonts/RoobertPRO-HeavyItalic.woff") format("woff");
82
+ font-weight: 800;
83
+ font-style: italic;
84
+ }
@@ -0,0 +1,104 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ /* Variables */
6
+ :root {
7
+ --header-height: 4rem;
8
+ --codeblocks-background: theme('colors.gray.900');
9
+ }
10
+
11
+ @layer components {
12
+ /* Text primary */
13
+
14
+ .text-primary {
15
+ @apply text-gray-900 dark:text-gray-50;
16
+ }
17
+
18
+ /* Text secondary */
19
+
20
+ .text-secondary {
21
+ @apply text-gray-500 dark:text-gray-400;
22
+ }
23
+
24
+ .text-secondary-active {
25
+ @apply text-primary-500 dark:text-primary-400;
26
+ }
27
+
28
+ .text-secondary-hover {
29
+ @apply hover:text-primary-500 hover:dark:text-primary-400;
30
+ }
31
+
32
+ .text-secondary-group-hover {
33
+ @apply group-hover:dark:text-primary-400 group-hover:text-primary-500;
34
+ }
35
+
36
+ /* Transitions */
37
+
38
+ .transition-base {
39
+ @apply transition-colors transition-opacity duration-100 ease-in-out;
40
+ }
41
+
42
+ /* Surface */
43
+
44
+ .surface {
45
+ @apply dark:bg-gray-900 bg-white;
46
+ }
47
+
48
+ .surface-secondary {
49
+ @apply bg-gray-500 dark:bg-gray-400;
50
+ }
51
+
52
+ .blurry-surface {
53
+ @apply backdrop-blur bg-white/95 dark:bg-gray-900/95;
54
+ }
55
+
56
+ /* Borders */
57
+
58
+ .surface-border {
59
+ @apply border-gray-200 dark:border-gray-800;
60
+ }
61
+
62
+ .surface-border-hover {
63
+ @apply border-primary-200 dark:border-gray-700;
64
+ }
65
+
66
+ .surface-border-header {
67
+ @apply border-b border-gray-200 dark:border-gray-800 border-opacity-50;
68
+ }
69
+
70
+ /* Icons */
71
+
72
+ .icon-base {
73
+ @apply transition-base text-secondary text-secondary-hover;
74
+ }
75
+
76
+ /* Code blocks */
77
+
78
+ .code-background {
79
+ /* background-color: var(--codeblocks-background); */
80
+ @apply bg-gray-800;
81
+ }
82
+
83
+ /* Images */
84
+
85
+ .light-img {
86
+ @apply dark:hidden;
87
+ }
88
+
89
+ .dark-img {
90
+ @apply hidden;
91
+ }
92
+ }
93
+
94
+ html {
95
+ @apply text-primary bg-white overflow-y-scroll;
96
+
97
+ &.dark {
98
+ @apply bg-gray-900;
99
+ }
100
+ }
101
+
102
+ body {
103
+ @apply antialiased font-sans text-gray-700 dark:text-gray-200;
104
+ }
@@ -0,0 +1,25 @@
1
+ <script setup lang="ts">
2
+ import { classNames, computed } from '#imports'
3
+
4
+ const props = defineProps({
5
+ padded: {
6
+ type: Boolean,
7
+ default: false,
8
+ },
9
+ constrained: {
10
+ type: Boolean,
11
+ default: true,
12
+ },
13
+ })
14
+
15
+ const containerClass = computed(() => classNames(
16
+ 'mx-auto max-w-7xl px-4 sm:px-6',
17
+ props.padded && 'px-4',
18
+ ))
19
+ </script>
20
+
21
+ <template>
22
+ <div :class="containerClass">
23
+ <slot />
24
+ </div>
25
+ </template>
@@ -0,0 +1,40 @@
1
+ <script setup lang="ts">
2
+ import { computed, useDocus } from '#imports'
3
+
4
+ const { theme } = useDocus()
5
+
6
+ const icons = computed(() => theme.value?.footer?.icons || [])
7
+ </script>
8
+
9
+ <template>
10
+ <footer class="py-6 sm:py-0 bg-gray-50 dark:bg-gray-800 dark:bg-opacity-25 h-[8rem] sm:h-[4rem]">
11
+ <Container class="flex h-full flex-col gap-y-4 sm:flex-row justify-between items-center">
12
+ <a
13
+ v-if="theme.footer.credits"
14
+ href="https://nuxtlabs.com"
15
+ rel="noopener"
16
+ target="_blank"
17
+ class="flex items-end text-secondary transition-base dark:hover:text-gray-100 hover:text-gray-600 mb-3 sm:mb-0"
18
+ >
19
+ <IconNuxtLabs class="mr-2" />
20
+ <p class="font-semibold text-sm">Made by Nuxt Labs</p>
21
+ </a>
22
+
23
+ <div class="flex">
24
+ <a
25
+ v-for="icon in icons"
26
+ :key="icon.label"
27
+ rel="noopener"
28
+ :aria-label="icon.label"
29
+ :href="icon.href"
30
+ target="_blank"
31
+ class="text-sm flex items-center font-medium p-1 icon-base"
32
+ >
33
+ <Component :is="icon.component" class="w-8 h-8" />
34
+ </a>
35
+
36
+ <SocialIcons size="w-8 h-8" padding="p-1" />
37
+ </div>
38
+ </Container>
39
+ </footer>
40
+ </template>
@@ -0,0 +1,85 @@
1
+ <script setup lang="ts">
2
+ import { computed, useDocus, useMenu, useUserAgent, watch } from '#imports'
3
+
4
+ const { navigation } = useDocus()
5
+
6
+ const tree = computed(() => {
7
+ return navigation.value.filter(
8
+ (item) => {
9
+ if (item.slug === '/' || item.slug === '/templates')
10
+ return false
11
+ return true
12
+ },
13
+ )
14
+ })
15
+
16
+ const { scrollBarGap, visible, open, close, toggle } = useMenu()
17
+
18
+ const { isDesktopSafari, isDesktopFirefox } = useUserAgent()
19
+
20
+ const buttonStyles = 'w-12 h-8 focus:outline-none bg-warmgray-50 hover:bg-warmgray-100 dark:bg-warmgray-800 rounded-xl'
21
+
22
+ watch(visible, v => (v ? open() : close()))
23
+
24
+ // Necessary because of body lock layout shift
25
+ const buttonBodyLockHack = computed(
26
+ () => `top: 1rem; right: calc(1.5rem + ${isDesktopSafari.value || isDesktopFirefox.value ? scrollBarGap.value : 0}px);`,
27
+ )
28
+
29
+ const surfaceBodyLockHack = computed(
30
+ () => `top: 0.5rem; right: calc(1rem + ${isDesktopSafari.value || isDesktopFirefox.value ? scrollBarGap.value : 0}px); bottom: 0.5rem; max-height: calc(100vh- 2rem); min-width: calc(320px - 2rem);`,
31
+ )
32
+ </script>
33
+
34
+ <template>
35
+ <div class="relative">
36
+ <button :class="[buttonStyles]" class="z-10 relative" @click="toggle">
37
+ <IconDots class="w-6 h-6 icon-base h-full mx-auto" />
38
+ </button>
39
+
40
+ <ClientOnly>
41
+ <teleport to="body">
42
+ <!-- Scrim overlay -->
43
+ <div
44
+ :class="[visible ? 'opacity-100 pointer-events-auto' : 'opacity-0 pointer-events-none']"
45
+ class="xl:hidden fixed top-0 left-0 z-10 w-full h-full bg-warmgray-100 bg-opacity-50 dark:bg-warmgray-800 dark:bg-opacity-50 backdrop-blur transition"
46
+ @click="toggle"
47
+ />
48
+
49
+ <!-- clone AppHeader button, due to stacking context limitations -->
50
+ <button
51
+ :style="buttonBodyLockHack"
52
+ :class="[
53
+ buttonStyles,
54
+ visible
55
+ ? 'opacity-100 pointer-events-auto'
56
+ : `opacity-0 transition ${
57
+ isDesktopSafari || isDesktopFirefox ? 'duration-0' : 'duration-400'
58
+ } pointer-events-none`
59
+ ]"
60
+ class="xl:hidden z-30 fixed"
61
+ @click="toggle"
62
+ >
63
+ <IconLine class="w-6 h-6 icon-base h-full mx-auto" />
64
+ </button>
65
+
66
+ <!-- Nav menu surface -->
67
+ <div
68
+ :style="surfaceBodyLockHack"
69
+ :class="[visible ? 'opacity-100 scale-100 pointer-events-auto' : 'opacity-0 scale-95 pointer-events-none']"
70
+ class="fixed z-20 w-[calc(100%-3rem)] md:w-auto min-w-full md:min-w-[calc(320px-2rem)] transform origin-top-right transition-transform ease-out"
71
+ >
72
+ <div
73
+ class="lg:hidden pl-8 pr-0 overflow-y-auto mb-2 surface pb-6 pt-12 rounded-2xl shadow-xl border-2 surface-border max-h-full"
74
+ >
75
+ <DocsAsideTree :tree="tree" />
76
+
77
+ <div class="flex items-center justify-end px-6">
78
+ <ThemeSelect class="block" />
79
+ </div>
80
+ </div>
81
+ </div>
82
+ </teleport>
83
+ </ClientOnly>
84
+ </div>
85
+ </template>
@@ -0,0 +1,37 @@
1
+ <script setup lang="ts">
2
+ import { onMounted, onUnmounted, ref } from '#imports'
3
+
4
+ const onTop = ref(true)
5
+
6
+ function setOnTop(): void {
7
+ if (window.pageYOffset <= 0)
8
+ onTop.value = true
9
+ else onTop.value = false
10
+ }
11
+
12
+ onMounted(() => {
13
+ setOnTop()
14
+ document.addEventListener('scroll', setOnTop)
15
+ })
16
+
17
+ onUnmounted(() => document.removeEventListener('scroll', setOnTop))
18
+ </script>
19
+
20
+ <template>
21
+ <header class="sticky w-full top-0 surface surface-blurry border-b border-gray-200 dark:border-gray-800 border-opacity-50 h-header surface surface-blurry z-10">
22
+ <Container class="grid grid-cols-12 items-center h-full">
23
+ <div class="col-span-6 lg:col-span-3">
24
+ <NavbarLogo />
25
+ </div>
26
+
27
+ <div class="hidden lg:block lg:col-span-6">
28
+ <!-- <HeaderNavigation /> -->
29
+ </div>
30
+
31
+ <div class="col-span-6 lg:col-span-3 flex justify-end">
32
+ <MobileNav class="flex lg:hidden" />
33
+ <ThemeSelect class="hidden lg:block" />
34
+ </div>
35
+ </Container>
36
+ </header>
37
+ </template>
@@ -0,0 +1,33 @@
1
+ <script setup lang="ts">
2
+ import { computed, useDocus } from '#imports'
3
+
4
+ const { theme } = useDocus()
5
+ const hasLogo = computed(() => theme.value?.header?.logo)
6
+ const hasTitle = computed(() => theme.value?.header?.title)
7
+ </script>
8
+
9
+ <template>
10
+ <NuxtLink to="/" :aria-label="theme.header.title">
11
+ <!-- Only title -->
12
+ <span v-if="!hasLogo && hasTitle">
13
+ {{ theme.header.title }}
14
+ </span>
15
+
16
+ <!-- Title and Logo -->
17
+ <template v-else-if="hasLogo && hasTitle">
18
+ <Logo />
19
+
20
+ <span>
21
+ {{ theme.header.title }}
22
+ </span>
23
+ </template>
24
+
25
+ <!-- Only Logo -->
26
+ <Logo v-else-if="hasLogo" class="w-12 h-12" />
27
+
28
+ <!-- Placeholder -->
29
+ <template v-else>
30
+ <IconDots class="w-12 h-12" />
31
+ </template>
32
+ </NuxtLink>
33
+ </template>
@@ -0,0 +1,7 @@
1
+ <template>
2
+ <main class="relative flex-1 pb-4 sm:pb-6 lg:py-8">
3
+ <Container padded>
4
+ <slot />
5
+ </Container>
6
+ </main>
7
+ </template>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <div class="p-3 text-center border-t border-gray-200 border-dashed dark:border-gray-800 dark:bg-gray-900">
3
+ <a
4
+ href="https://docus.dev"
5
+ target="_blank"
6
+ class="text-xs text-gray-400 hover:text-gray-600 dark:text-gray-600 group dark:hover:text-gray-400"
7
+ >
8
+ Powered by <strong class="font-bold">Docus</strong>
9
+ </a>
10
+ </div>
11
+ </template>