@wordup-md/nuxt-layer-shadcn-unocss 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (359) hide show
  1. package/.cursor/rules/active-context-rule.mdc +8 -0
  2. package/.cursor/rules/memory-bank-overview.mdc +17 -0
  3. package/.cursor/rules/product-context-rule.mdc +8 -0
  4. package/.cursor/rules/progress-rule.mdc +8 -0
  5. package/.cursor/rules/projectbrief-rule.mdc +8 -0
  6. package/.cursor/rules/system-patterns-rule.mdc +8 -0
  7. package/.cursor/rules/tech-context-rule.mdc +8 -0
  8. package/.cursorrules +52 -0
  9. package/.editorconfig +12 -0
  10. package/.nuxtrc +1 -0
  11. package/.playground/app.config.ts +189 -0
  12. package/.playground/assets/style.css +15 -0
  13. package/.playground/components/content/MdcExample.vue +81 -0
  14. package/.playground/components/content/MdcReplay.vue +319 -0
  15. package/.playground/content/1.getting-started/1.introduction.md +8 -0
  16. package/.playground/content/1.getting-started/2.writing/1.markdown.md +56 -0
  17. package/.playground/content/1.getting-started/2.writing/2.pages.md +177 -0
  18. package/.playground/content/1.getting-started/2.writing/3.folders.md +56 -0
  19. package/.playground/content/1.getting-started/2.writing/_dir.yml +3 -0
  20. package/.playground/content/1.getting-started/_dir.yml +3 -0
  21. package/.playground/content/2.content-elements/1.text-formatting.md +60 -0
  22. package/.playground/content/2.content-elements/10.horizontal-rule.md +25 -0
  23. package/.playground/content/2.content-elements/11.tables.md +25 -0
  24. package/.playground/content/2.content-elements/12.overview.md +93 -0
  25. package/.playground/content/2.content-elements/13.text-components.md +36 -0
  26. package/.playground/content/2.content-elements/2.headings.md +32 -0
  27. package/.playground/content/2.content-elements/3.paragraphs.md +39 -0
  28. package/.playground/content/2.content-elements/4.lists.md +37 -0
  29. package/.playground/content/2.content-elements/5.links.md +17 -0
  30. package/.playground/content/2.content-elements/6.images.md +17 -0
  31. package/.playground/content/2.content-elements/7.blockquotes.md +17 -0
  32. package/.playground/content/2.content-elements/8.code-blocks.md +141 -0
  33. package/.playground/content/2.content-elements/9.inline-code.md +21 -0
  34. package/.playground/content/2.content-elements/_dir.yml +3 -0
  35. package/.playground/content/2.content-elements/index.md +8 -0
  36. package/.playground/content/3.components/1.index.md +187 -0
  37. package/.playground/content/3.components/2.docs/_dir.yml +3 -0
  38. package/.playground/content/3.components/2.docs/alert.md +152 -0
  39. package/.playground/content/3.components/2.docs/badge.md +131 -0
  40. package/.playground/content/3.components/2.docs/button-link.md +53 -0
  41. package/.playground/content/3.components/2.docs/callout.md +16 -0
  42. package/.playground/content/3.components/2.docs/code-group.md +77 -0
  43. package/.playground/content/3.components/2.docs/code-snippet.md +129 -0
  44. package/.playground/content/3.components/2.docs/field-group.md +62 -0
  45. package/.playground/content/3.components/2.docs/field.md +39 -0
  46. package/.playground/content/3.components/2.docs/file-tree.md +144 -0
  47. package/.playground/content/3.components/2.docs/icon.md +94 -0
  48. package/.playground/content/3.components/2.docs/pm.md +67 -0
  49. package/.playground/content/3.components/2.docs/read-more.md +44 -0
  50. package/.playground/content/3.components/2.docs/shortcut.md +36 -0
  51. package/.playground/content/3.components/2.docs/stack.md +81 -0
  52. package/.playground/content/3.components/2.docs/steps.md +148 -0
  53. package/.playground/content/3.components/2.docs/tabs.md +375 -0
  54. package/.playground/content/3.components/3.page/_dir.yml +2 -0
  55. package/.playground/content/3.components/3.page/accordion.md +74 -0
  56. package/.playground/content/3.components/3.page/card-group.md +115 -0
  57. package/.playground/content/3.components/3.page/card.md +142 -0
  58. package/.playground/content/3.components/3.page/collapsible.md +61 -0
  59. package/.playground/content/3.components/3.page/hero-alt.md +118 -0
  60. package/.playground/content/3.components/3.page/hero.md +60 -0
  61. package/.playground/content/3.components/3.page/team-card.md +82 -0
  62. package/.playground/content/3.components/_dir.yml +2 -0
  63. package/.playground/content/4.development/1.configuration/1.overview.md +297 -0
  64. package/.playground/content/4.development/1.configuration/2.nuxt-content.md +105 -0
  65. package/.playground/content/4.development/1.configuration/3.og-image.md +86 -0
  66. package/.playground/content/4.development/1.configuration/4.edit-link.md +63 -0
  67. package/.playground/content/4.development/1.configuration/5.banner.md +52 -0
  68. package/.playground/content/4.development/1.configuration/6.carbon-ads.md +65 -0
  69. package/.playground/content/4.development/1.configuration/7.umami.md +41 -0
  70. package/.playground/content/4.development/1.configuration/_dir.yml +3 -0
  71. package/.playground/content/4.development/2.advanced/1.override.md +49 -0
  72. package/.playground/content/4.development/2.advanced/2.math.md +89 -0
  73. package/.playground/content/4.development/2.advanced/_dir.yml +3 -0
  74. package/.playground/content/4.development/3.themes.md +9 -0
  75. package/.playground/content/4.development/4.composables.md +38 -0
  76. package/.playground/content/4.development/5.installation.md +36 -0
  77. package/.playground/content/4.development/_dir.yml +3 -0
  78. package/.playground/content/_menu-footer.md +5 -0
  79. package/.playground/content/index.md +67 -0
  80. package/.playground/content/test-card.md +187 -0
  81. package/.playground/content/test.md +88 -0
  82. package/.playground/content/test2.md +12 -0
  83. package/.playground/content/test3.md +187 -0
  84. package/.playground/nuxt.config.ts +52 -0
  85. package/.playground/public/banner-preview.png +0 -0
  86. package/.playground/public/favicon.ico +0 -0
  87. package/.playground/public/front-matter-showcase/authors.png +0 -0
  88. package/.playground/public/front-matter-showcase/badges.png +0 -0
  89. package/.playground/public/front-matter-showcase/nav-badges.png +0 -0
  90. package/.playground/public/hero.png +0 -0
  91. package/.playground/public/logo-dark.svg +12 -0
  92. package/.playground/public/logo.svg +12 -0
  93. package/.playground/public/og-nuxt-seo.png +0 -0
  94. package/.playground/public/og-nuxt.png +0 -0
  95. package/.playground/public/og-shadcn-docs-dark.png +0 -0
  96. package/.playground/public/og-shadcn-docs.png +0 -0
  97. package/.playground/public/sidebar-default.png +0 -0
  98. package/.playground/public/sidebar-group.png +0 -0
  99. package/.playground/public/sidebar-tree.png +0 -0
  100. package/.playground/uno.config.ts +16 -0
  101. package/README.md +93 -0
  102. package/app.vue +59 -0
  103. package/assets/css/a11y.css +48 -0
  104. package/assets/css/mdc-editor.css +91 -0
  105. package/components/A11yModeToggle.vue +23 -0
  106. package/components/DarkModeToggle.vue +26 -0
  107. package/components/LinkIcon.vue +32 -0
  108. package/components/OgImage/ShadcnDocs.vue +55 -0
  109. package/components/ThemeCustomizer.vue +156 -0
  110. package/components/ThemePopover.vue +27 -0
  111. package/components/content/Accordion.vue +18 -0
  112. package/components/content/AccordionItem.vue +32 -0
  113. package/components/content/Alert.vue +100 -0
  114. package/components/content/Badge.vue +52 -0
  115. package/components/content/ButtonLink.vue +38 -0
  116. package/components/content/Callout.vue +17 -0
  117. package/components/content/Card.vue +173 -0
  118. package/components/content/CardGroup.vue +38 -0
  119. package/components/content/CodeCopy.vue +52 -0
  120. package/components/content/CodeGroup._vue +27 -0
  121. package/components/content/CodeSnippet._vue +78 -0
  122. package/components/content/Collapsible.vue +80 -0
  123. package/components/content/Field.vue +53 -0
  124. package/components/content/FieldGroup.vue +5 -0
  125. package/components/content/FileTree.vue +110 -0
  126. package/components/content/FileTreeItem.vue +64 -0
  127. package/components/content/FileTreeRoot.vue +27 -0
  128. package/components/content/Hero.vue +154 -0
  129. package/components/content/HeroAlt.vue +116 -0
  130. package/components/content/Icon.vue +69 -0
  131. package/components/content/Kbd.vue +20 -0
  132. package/components/content/PmInstall.vue +35 -0
  133. package/components/content/PmRun.vue +31 -0
  134. package/components/content/PmX.vue +31 -0
  135. package/components/content/ProseA.vue +21 -0
  136. package/components/content/ProseBlockquote.vue +5 -0
  137. package/components/content/ProseCode.vue +121 -0
  138. package/components/content/ProseCodeInline.vue +24 -0
  139. package/components/content/ProseEm.vue +5 -0
  140. package/components/content/ProseH1.vue +27 -0
  141. package/components/content/ProseH2.vue +22 -0
  142. package/components/content/ProseH3.vue +21 -0
  143. package/components/content/ProseH4.vue +21 -0
  144. package/components/content/ProseH5.vue +21 -0
  145. package/components/content/ProseH6.vue +21 -0
  146. package/components/content/ProseHr.vue +3 -0
  147. package/components/content/ProseImg.vue +42 -0
  148. package/components/content/ProseLi.vue +5 -0
  149. package/components/content/ProseOl.vue +5 -0
  150. package/components/content/ProseP.vue +5 -0
  151. package/components/content/ProsePre.vue +56 -0
  152. package/components/content/ProseSection.vue +27 -0
  153. package/components/content/ProseStrong.vue +5 -0
  154. package/components/content/ProseTable.vue +7 -0
  155. package/components/content/ProseTbody.vue +5 -0
  156. package/components/content/ProseTd.vue +5 -0
  157. package/components/content/ProseTh.vue +5 -0
  158. package/components/content/ProseThead.vue +5 -0
  159. package/components/content/ProseTr.vue +5 -0
  160. package/components/content/ProseUl.vue +5 -0
  161. package/components/content/ReadMore.vue +41 -0
  162. package/components/content/Shortcut.vue +20 -0
  163. package/components/content/Stack.vue +17 -0
  164. package/components/content/Steps.vue +23 -0
  165. package/components/content/Tabs.vue +52 -0
  166. package/components/content/TabsInner.vue +263 -0
  167. package/components/content/TeamCard.vue +52 -0
  168. package/components/content/TeamCardGroup.vue +5 -0
  169. package/components/content/global/AlertEditor.vue +58 -0
  170. package/components/content/global/BadgeEditor.vue +56 -0
  171. package/components/content/global/BrEditor.vue +3 -0
  172. package/components/content/global/CardEditor.vue +142 -0
  173. package/components/content/global/CardGroupEditor.vue +50 -0
  174. package/components/content/global/CodeGroup.vue +13 -0
  175. package/components/content/global/CodeGroupEditor.vue +50 -0
  176. package/components/content/global/DivEditor.vue +22 -0
  177. package/components/content/global/FieldEditor.vue +38 -0
  178. package/components/content/global/FieldGroupEditor.vue +24 -0
  179. package/components/content/global/HeroEditor.vue +67 -0
  180. package/components/content/global/ProseSectionEditor.vue +180 -0
  181. package/components/content/global/ReadMoreEditor.vue +70 -0
  182. package/components/content/global/SectionEditor.vue +22 -0
  183. package/components/content/global/StackEditor.vue +35 -0
  184. package/components/content/global/StepsEditor.vue +55 -0
  185. package/components/content/global/Tabs._vue +97 -0
  186. package/components/content/global/TabsEditor.vue +38 -0
  187. package/components/layout/Aside.vue +83 -0
  188. package/components/layout/AsideTree.vue +25 -0
  189. package/components/layout/AsideTreeItem.vue +86 -0
  190. package/components/layout/AsideTreeItemButton.vue +32 -0
  191. package/components/layout/Banner.vue +77 -0
  192. package/components/layout/Breadcrumb.vue +34 -0
  193. package/components/layout/DocsFooter.vue +6 -0
  194. package/components/layout/EditLink.vue +23 -0
  195. package/components/layout/Footer.vue +80 -0
  196. package/components/layout/FooterItem.vue +50 -0
  197. package/components/layout/FooterSubmenuItem.vue +39 -0
  198. package/components/layout/Header/Logo.vue +30 -0
  199. package/components/layout/Header/MenuItem.vue +83 -0
  200. package/components/layout/Header/Nav.vue +112 -0
  201. package/components/layout/Header/NavMobile.vue +14 -0
  202. package/components/layout/Header/NavMobileItem.vue +79 -0
  203. package/components/layout/Header/SubmenuItem.vue +39 -0
  204. package/components/layout/Header.vue +160 -0
  205. package/components/layout/LangSwitcher.vue +90 -0
  206. package/components/layout/MobileNav.vue +44 -0
  207. package/components/layout/PrevNext.vue +24 -0
  208. package/components/layout/PrevNextButton.vue +50 -0
  209. package/components/layout/SearchButton.vue +46 -0
  210. package/components/layout/SearchDialog.vue +217 -0
  211. package/components/layout/Title.vue +98 -0
  212. package/components/layout/Toc.vue +99 -0
  213. package/components/layout/TocTree.vue +42 -0
  214. package/components/ui/accordion/Accordion.vue +19 -0
  215. package/components/ui/accordion/AccordionContent.vue +24 -0
  216. package/components/ui/accordion/AccordionItem.vue +24 -0
  217. package/components/ui/accordion/AccordionTrigger.vue +39 -0
  218. package/components/ui/accordion/index.ts +4 -0
  219. package/components/ui/alert/Alert.vue +19 -0
  220. package/components/ui/alert/AlertDescription.vue +14 -0
  221. package/components/ui/alert/AlertTitle.vue +14 -0
  222. package/components/ui/alert/index.ts +23 -0
  223. package/components/ui/avatar/Avatar.vue +25 -0
  224. package/components/ui/avatar/AvatarFallback.vue +11 -0
  225. package/components/ui/avatar/AvatarImage.vue +12 -0
  226. package/components/ui/avatar/index.ts +24 -0
  227. package/components/ui/badge/Badge.vue +17 -0
  228. package/components/ui/badge/index.ts +71 -0
  229. package/components/ui/breadcrumb/Breadcrumb.vue +16 -0
  230. package/components/ui/breadcrumb/BreadcrumbItem.vue +16 -0
  231. package/components/ui/breadcrumb/BreadcrumbLink.vue +23 -0
  232. package/components/ui/breadcrumb/BreadcrumbList.vue +16 -0
  233. package/components/ui/breadcrumb/BreadcrumbPage.vue +19 -0
  234. package/components/ui/breadcrumb/BreadcrumbSeparator.vue +23 -0
  235. package/components/ui/breadcrumb/index.ts +6 -0
  236. package/components/ui/button/Button.vue +29 -0
  237. package/components/ui/button/index.ts +35 -0
  238. package/components/ui/card/Card.vue +21 -0
  239. package/components/ui/card/CardContent.vue +14 -0
  240. package/components/ui/card/CardDescription.vue +14 -0
  241. package/components/ui/card/CardFooter.vue +14 -0
  242. package/components/ui/card/CardHeader.vue +14 -0
  243. package/components/ui/card/CardTitle.vue +18 -0
  244. package/components/ui/card/index.ts +6 -0
  245. package/components/ui/collapsible/Collapsible.vue +18 -0
  246. package/components/ui/collapsible/CollapsibleContent.vue +14 -0
  247. package/components/ui/collapsible/CollapsibleTrigger.vue +11 -0
  248. package/components/ui/collapsible/index.ts +3 -0
  249. package/components/ui/command/Command.vue +89 -0
  250. package/components/ui/command/CommandEmpty.vue +30 -0
  251. package/components/ui/command/CommandGroup.vue +50 -0
  252. package/components/ui/command/CommandInput.vue +44 -0
  253. package/components/ui/command/CommandInputOnly.vue +50 -0
  254. package/components/ui/command/CommandItem.vue +79 -0
  255. package/components/ui/command/CommandList.vue +28 -0
  256. package/components/ui/command/CommandSeparator.vue +24 -0
  257. package/components/ui/command/index.ts +24 -0
  258. package/components/ui/dialog/Dialog.vue +14 -0
  259. package/components/ui/dialog/DialogClose.vue +11 -0
  260. package/components/ui/dialog/DialogContent.vue +52 -0
  261. package/components/ui/dialog/DialogDescription.vue +24 -0
  262. package/components/ui/dialog/DialogFooter.vue +19 -0
  263. package/components/ui/dialog/DialogHeader.vue +16 -0
  264. package/components/ui/dialog/DialogScrollContent.vue +61 -0
  265. package/components/ui/dialog/DialogTitle.vue +29 -0
  266. package/components/ui/dialog/DialogTrigger.vue +11 -0
  267. package/components/ui/dialog/index.ts +9 -0
  268. package/components/ui/input/Input.vue +27 -0
  269. package/components/ui/input/index.ts +1 -0
  270. package/components/ui/label/Label.vue +27 -0
  271. package/components/ui/label/index.ts +1 -0
  272. package/components/ui/navigation-menu/NavigationMenu.vue +33 -0
  273. package/components/ui/navigation-menu/NavigationMenuContent.vue +34 -0
  274. package/components/ui/navigation-menu/NavigationMenuIndicator.vue +24 -0
  275. package/components/ui/navigation-menu/NavigationMenuItem.vue +11 -0
  276. package/components/ui/navigation-menu/NavigationMenuLink.vue +19 -0
  277. package/components/ui/navigation-menu/NavigationMenuList.vue +33 -0
  278. package/components/ui/navigation-menu/NavigationMenuTrigger.vue +34 -0
  279. package/components/ui/navigation-menu/NavigationMenuViewport.vue +33 -0
  280. package/components/ui/navigation-menu/index.ts +14 -0
  281. package/components/ui/popover/Popover.vue +15 -0
  282. package/components/ui/popover/PopoverContent.vue +49 -0
  283. package/components/ui/popover/PopoverTrigger.vue +11 -0
  284. package/components/ui/popover/index.ts +4 -0
  285. package/components/ui/scroll-area/ScrollArea.vue +32 -0
  286. package/components/ui/scroll-area/ScrollBar.vue +41 -0
  287. package/components/ui/scroll-area/index.ts +2 -0
  288. package/components/ui/separator/Separator.vue +20 -0
  289. package/components/ui/separator/index.ts +1 -0
  290. package/components/ui/sheet/Sheet.vue +14 -0
  291. package/components/ui/sheet/SheetClose.vue +11 -0
  292. package/components/ui/sheet/SheetContent.vue +58 -0
  293. package/components/ui/sheet/SheetDescription.vue +22 -0
  294. package/components/ui/sheet/SheetFooter.vue +19 -0
  295. package/components/ui/sheet/SheetHeader.vue +16 -0
  296. package/components/ui/sheet/SheetTitle.vue +22 -0
  297. package/components/ui/sheet/SheetTrigger.vue +11 -0
  298. package/components/ui/sheet/index.ts +31 -0
  299. package/components/ui/slider/Slider.vue +36 -0
  300. package/components/ui/slider/index.ts +1 -0
  301. package/components/ui/tabs/Tabs.vue +15 -0
  302. package/components/ui/tabs/TabsContent.vue +22 -0
  303. package/components/ui/tabs/TabsList.vue +25 -0
  304. package/components/ui/tabs/TabsTrigger.vue +27 -0
  305. package/components/ui/tabs/index.ts +4 -0
  306. package/components/ui/textarea/Textarea.vue +27 -0
  307. package/components/ui/textarea/index.ts +1 -0
  308. package/components/ui/toast/Toast.vue +28 -0
  309. package/components/ui/toast/ToastAction.vue +22 -0
  310. package/components/ui/toast/ToastClose.vue +27 -0
  311. package/components/ui/toast/ToastDescription.vue +22 -0
  312. package/components/ui/toast/ToastProvider.vue +11 -0
  313. package/components/ui/toast/ToastTitle.vue +22 -0
  314. package/components/ui/toast/ToastViewport.vue +20 -0
  315. package/components/ui/toast/Toaster.vue +34 -0
  316. package/components/ui/toast/index.ts +38 -0
  317. package/components/ui/toast/use-toast.ts +165 -0
  318. package/components.json +18 -0
  319. package/composables/useBreadcrumb.ts +47 -0
  320. package/composables/useCollapsedMap.ts +3 -0
  321. package/composables/useConfig.ts +227 -0
  322. package/composables/useEditLink.ts +27 -0
  323. package/composables/useI18nDocs.ts +114 -0
  324. package/composables/useMdcMenu.ts +204 -0
  325. package/composables/usePm.ts +58 -0
  326. package/composables/useScrollspy.ts +51 -0
  327. package/composables/useThemes.ts +46 -0
  328. package/composables/useToast.ts +1 -0
  329. package/content/index.md +45 -0
  330. package/eslint.config.js +3 -0
  331. package/i18n/i18n.config.ts +414 -0
  332. package/index.d.ts +610 -0
  333. package/layouts/blank.vue +5 -0
  334. package/layouts/default.vue +9 -0
  335. package/layouts/editorial.vue +83 -0
  336. package/lib/registry/themes.ts +636 -0
  337. package/lib/uno-preset.ts +143 -0
  338. package/memory-bank/activeContext.md +17 -0
  339. package/memory-bank/productContext.md +21 -0
  340. package/memory-bank/progress.md +16 -0
  341. package/memory-bank/projectbrief.md +20 -0
  342. package/memory-bank/systemPatterns.md +25 -0
  343. package/memory-bank/techContext.md +29 -0
  344. package/modules/inject-css.ts +40 -0
  345. package/nuxt.config.ts +124 -0
  346. package/package.json +71 -0
  347. package/pages/[...slug].vue +109 -0
  348. package/pages/admin/[...slug].vue +145 -0
  349. package/pages/index.vue +24 -0
  350. package/plugins/injectCssHmr.ts +26 -0
  351. package/plugins/wordup.ts +130 -0
  352. package/public/content-doc.json +792 -0
  353. package/public/iconesjs.svg +4 -0
  354. package/scripts/buildContentDoc-cli.ts +8 -0
  355. package/scripts/buildContentDoc.ts +165 -0
  356. package/tailwind.config.js +1 -0
  357. package/tsconfig.json +3 -0
  358. package/uno.config.mjs +58 -0
  359. package/utils/index.ts +12 -0
@@ -0,0 +1,143 @@
1
+ import { definePreset } from 'unocss'
2
+ import { builtinColors, presetShadcn } from 'unocss-preset-shadcn'
3
+
4
+ type MyPresetOptions = {
5
+ colors?: typeof builtinColors
6
+ }
7
+
8
+ export default definePreset((options?: MyPresetOptions) => {
9
+ const colors = options?.colors ?? builtinColors
10
+
11
+ const shadcn = presetShadcn(colors.map(c => ({ color: c })), { componentLibrary: 'reka' })
12
+
13
+ return {
14
+ name: 'nuxt-layer-unocss-preset-shadcn',
15
+ theme: {
16
+ container: {
17
+ center: true,
18
+ maxWidth: {
19
+ '2xl': 'var(--breakpoint-container)',
20
+ },
21
+ },
22
+ colors: {
23
+ ...shadcn.theme?.colors,
24
+ info: {
25
+ DEFAULT: 'hsl(var(--info))',
26
+ foreground: 'hsl(var(--info-foreground))',
27
+ },
28
+ warning: {
29
+ DEFAULT: 'hsl(var(--warning))',
30
+ foreground: 'hsl(var(--warning-foreground))',
31
+ },
32
+ success: {
33
+ DEFAULT: 'hsl(var(--success))',
34
+ foreground: 'hsl(var(--success-foreground))',
35
+ },
36
+ danger: {
37
+ DEFAULT: 'hsl(var(--danger))',
38
+ foreground: 'hsl(var(--danger-foreground))',
39
+ },
40
+ new: {
41
+ DEFAULT: 'hsl(var(--new))',
42
+ foreground: 'hsl(var(--new-foreground))',
43
+ },
44
+ },
45
+ borderRadius: {
46
+ ...shadcn.theme?.borderRadius,
47
+ },
48
+ // animation: {
49
+ // keyframes: {
50
+ // 'collapsible-down': '{from{height: 0}to{height:var(--reka-collapsible-content-height)}}',
51
+ // 'collapsible-up': '{from{height:var(--reka-collapsible-content-height)}to{height: 0}}',
52
+ // 'fadeIn': '{from{ opacity: 0 }to{ opacity: 1 }}',
53
+ // 'fadeOut': '{from{ opacity: 1 }to{ opacity: 0 }}',
54
+ // },
55
+ // durations: {
56
+ // 'collapsible-down': '0.2s',
57
+ // 'collapsible-up': '0.2s',
58
+ // 'fadeIn': '0.2s',
59
+ // 'fadeOut': '0.2s',
60
+ // },
61
+ // timingFns: {
62
+ // 'collapsible-down': 'ease-in-out',
63
+ // 'collapsible-up': 'ease-in-out',
64
+ // 'fadeIn': 'ease-out',
65
+ // 'fadeOut': 'ease-out',
66
+ // },
67
+ // },
68
+ },
69
+ rules: [
70
+ ...(shadcn.rules ?? []),
71
+ ],
72
+ // variants: [
73
+ // ],
74
+ shortcuts: [
75
+ [/^step$/, () => {
76
+ return `
77
+ [counter-increment:step]
78
+ before:[content:counter(step)] before:absolute before:w-9 before:h-9 before:bg-muted before:rounded-full before:font-mono before:font-medium before:text-center before:text-base before:inline-flex before:items-center before:justify-center before:-indent-px before:border-4 before:border-background
79
+ before:-ml-[50px] before:-mt-1
80
+ `
81
+ }],
82
+ ],
83
+ preflights: [
84
+ {
85
+ getCSS: () => addForceLightAndDark((shadcn.preflights?.[0] as unknown as { getCSS: () => string }).getCSS() ?? ''),
86
+ },
87
+ {
88
+ getCSS: ({ theme }) => {
89
+ const breakpoints = generateBreakpointsCSSVars(theme.breakpoints!)
90
+
91
+ return `
92
+ :root {
93
+ ${breakpoints}
94
+ --breakpoint-container: 1200px;
95
+
96
+ --info: 200 90% 50%;
97
+ --info-foreground: 200 90% 50%;
98
+ --warning: 42.4 100% 50%;
99
+ --warning-foreground: 42.4 100% 50%;
100
+ --success: 94.5 100% 39.6%;
101
+ --success-foreground: 94.5 100% 39.6%;
102
+ --danger: 358.3 100% 64.9%;
103
+ --danger-foreground: 358.3 100% 64.9%;
104
+ --new: 81 96% 55%;
105
+ --new-foreground: 81 96% 15%;
106
+ }
107
+ `
108
+ },
109
+ },
110
+ ],
111
+ }
112
+ })
113
+
114
+ function addForceLightAndDark(css: string) {
115
+ const themeRegex = /^(\.theme-\w+)\s*{/gm
116
+ const darkThemeRegex = /^(\.dark\s+\.theme-(\w+))\s*{/gm
117
+
118
+ css = css.replace(themeRegex, (match, p1) => `${p1}, ${p1} .force-light {`)
119
+ css = css.replace(darkThemeRegex, (match, p1, p2) => `${p1}, .theme-${p2} .force-dark {`)
120
+
121
+ css += `
122
+ .force-light, .force-dark {
123
+ color: hsl(var(--foreground));
124
+ background: hsl(var(--background));
125
+ }
126
+ .force-light .shiki span {
127
+ color: var(--shiki-default);
128
+ }
129
+ .force-dark .shiki span {
130
+ color: var(--shiki-dark);
131
+ }
132
+ `
133
+ return css
134
+ }
135
+
136
+ function generateBreakpointsCSSVars(breakpoints: Record<string, string>) {
137
+ return Object.entries(breakpoints)
138
+ .map(([key, value]) => {
139
+ return ` --breakpoint-${key}: ${value};`
140
+ })
141
+ .filter(Boolean)
142
+ .join('\n')
143
+ }
@@ -0,0 +1,17 @@
1
+ # Active Context
2
+
3
+ ## Current Work Focus
4
+ - Establishing Memory Bank documentation and Cursor Rules for project continuity
5
+ - Ensuring all core documentation files are present and up to date
6
+
7
+ ## Recent Changes
8
+ - Scaffolded all required Memory Bank files
9
+ - Defined project brief, product context, system patterns, and tech context
10
+
11
+ ## Next Steps
12
+ - Create the progress.md file to track project status and known issues
13
+ - Generate initial Cursor Rules in .cursor/rules as .mdc files
14
+
15
+ ## Active Decisions and Considerations
16
+ - All documentation follows the structure outlined in custom instructions
17
+ - Cursor Rules will reference Memory Bank files for project intelligence
@@ -0,0 +1,21 @@
1
+ # Product Context
2
+
3
+ ## Why This Project Exists
4
+ This project was initiated to provide a modern, scalable, and maintainable web application foundation using Nuxt 3 and related technologies. It addresses the need for a robust, reusable component system and optimized developer workflows.
5
+
6
+ ## Problems It Solves
7
+ - Reduces boilerplate and repetitive code in frontend projects
8
+ - Provides a consistent, accessible, and customizable UI system
9
+ - Simplifies state management and data fetching
10
+ - Enhances performance and SEO with SSR and code-splitting
11
+
12
+ ## How It Should Work
13
+ - Modular, atomic design for UI components
14
+ - Auto-imports and composables for streamlined development
15
+ - SSR and client-side rendering optimized for speed
16
+ - Theming and accessibility built-in by default
17
+
18
+ ## User Experience Goals
19
+ - Fast load times and smooth interactions
20
+ - Intuitive navigation and clear information architecture
21
+ - Fully accessible and responsive across devices
@@ -0,0 +1,16 @@
1
+ # Progress
2
+
3
+ ## What Works
4
+ - Memory Bank documentation structure established
5
+ - Core project requirements, context, and patterns defined
6
+
7
+ ## What's Left to Build
8
+ - Implement .cursor/rules directory and generate initial Cursor Rules
9
+ - Continue feature development and component implementation
10
+
11
+ ## Current Status
12
+ - Documentation up to date as of initial setup
13
+ - Ready to proceed with Cursor Rules and further development
14
+
15
+ ## Known Issues
16
+ - No outstanding issues at this stage
@@ -0,0 +1,20 @@
1
+ # Project Brief
2
+
3
+ ## Purpose
4
+ This document defines the core requirements, goals, and scope of the project. It serves as the foundation for all other documentation and guides the project's direction.
5
+
6
+ ## Core Requirements
7
+ - Build a modern, performant, and accessible web application using Nuxt 3, Vue 3, TypeScript, and related technologies.
8
+ - Ensure maintainability, scalability, and a great developer experience.
9
+ - Prioritize best practices in code quality, performance, and accessibility.
10
+
11
+ ## Goals
12
+ - Deliver a robust, modular, and reusable component system.
13
+ - Optimize for both SSR and client-side performance.
14
+ - Provide a seamless and intuitive user experience.
15
+
16
+ ## Scope
17
+ - Frontend architecture and UI components
18
+ - Data fetching and state management
19
+ - Server-side API integration
20
+ - Theming, accessibility, and responsive design
@@ -0,0 +1,25 @@
1
+ # System Patterns
2
+
3
+ ## System Architecture
4
+ - Modular, atomic design for UI components (atoms, molecules, organisms, pages)
5
+ - Nuxt 3 for SSR, routing, and module system
6
+ - TypeScript for type safety and maintainability
7
+ - Pinia for state management
8
+ - VueUse for enhanced reactivity
9
+
10
+ ## Key Technical Decisions
11
+ - Use of Composition API and <script setup lang="ts"> for all components
12
+ - Auto-imports for composables and utilities
13
+ - ShadcnUI and Unocss for UI and styling
14
+ - Server API endpoints for backend operations
15
+
16
+ ## Design Patterns
17
+ - DRY and modular code organization
18
+ - Functional, declarative programming
19
+ - Composables for shared logic
20
+ - Dynamic imports and Suspense for async components
21
+
22
+ ## Component Relationships
23
+ - Components organized by atomic design principles
24
+ - Shared state via composables and Pinia stores
25
+ - UI components consume composables for logic and state
@@ -0,0 +1,29 @@
1
+ # Tech Context
2
+
3
+ ## Technologies Used
4
+ - Nuxt 3 (Vue 3, Vite)
5
+ - TypeScript
6
+ - Pinia (state management)
7
+ - VueUse (utility functions)
8
+ - ShadcnUI (UI components)
9
+ - Unocss (utility-first CSS)
10
+
11
+ ## Development Setup
12
+ - Node.js and pnpm for package management
13
+ - ESLint and EditorConfig for code quality
14
+ - Auto-imports for composables and utilities
15
+ - Modular directory structure for components, composables, and pages
16
+
17
+ ## Technical Constraints
18
+ - All code must be TypeScript
19
+ - Use interfaces over types; avoid enums
20
+ - No class-based components
21
+ - SSR and client-side rendering must be supported
22
+
23
+ ## Dependencies
24
+ - Nuxt 3
25
+ - Vue 3
26
+ - Pinia
27
+ - VueUse
28
+ - ShadcnUI
29
+ - Unocss
@@ -0,0 +1,40 @@
1
+ import { resolve } from 'node:path'
2
+ import { existsSync, readFileSync } from 'node:fs'
3
+ import { defineNuxtModule } from '@nuxt/kit'
4
+
5
+ export default defineNuxtModule({
6
+ meta: {
7
+ name: 'inject-css-module',
8
+ configKey: 'injectCss',
9
+ },
10
+ defaults: {
11
+ cssPath: 'assets/style.css', // Default path to the CSS file
12
+ },
13
+ setup(options, nuxt) {
14
+ // Use the `modules:done` hook to ensure this runs last
15
+ nuxt.hook('modules:done', () => {
16
+ // Resolve the absolute path to the CSS file
17
+ const cssFilePath = resolve(nuxt.options.rootDir, options.cssPath)
18
+ const innerHTML = existsSync(cssFilePath) ? readFileSync(cssFilePath, 'utf-8') : ''
19
+
20
+ nuxt.options.app.head.style = nuxt.options.app.head.style || []
21
+ nuxt.options.app.head.style.push({
22
+ id: 'global-style',
23
+ innerHTML,
24
+ tagPosition: 'bodyClose', // Ensure it's added at the end of the head
25
+ })
26
+ })
27
+
28
+ // nuxt.hook('vite:extendConfig', (config, { isClient, isServer }) => {
29
+ // config.plugins = config.plugins || []
30
+ // config.plugins.push({
31
+ // name: 'vite-hmr-listener',
32
+ // handleHotUpdate({ file, server }) {
33
+ // console.log('File updated:', file)
34
+ // // You can add your custom logic here
35
+ // return []
36
+ // },
37
+ // })
38
+ // })
39
+ },
40
+ })
package/nuxt.config.ts ADDED
@@ -0,0 +1,124 @@
1
+ import { dirname, join } from 'node:path'
2
+ import { fileURLToPath } from 'node:url'
3
+
4
+ const currentDir = dirname(fileURLToPath(import.meta.url))
5
+
6
+ export default defineNuxtConfig({
7
+ modules: [
8
+ '@nuxt/eslint',
9
+ '@unocss/nuxt',
10
+ 'shadcn-nuxt',
11
+ '@vueuse/nuxt',
12
+ '@nuxt/content',
13
+ '@nuxt/image',
14
+ '@nuxt/icon',
15
+ '@nuxtjs/color-mode',
16
+ '@nuxtjs/i18n',
17
+ '@unpress/nuxt-module',
18
+ // '../../../unpress/packages/nuxt-module/src/module',
19
+ // 'nuxt-og-image',
20
+ ],
21
+
22
+ components: {
23
+ dirs: [
24
+ {
25
+ path: join(currentDir, './components'),
26
+ ignore: ['**/*.ts'],
27
+ },
28
+ ],
29
+ },
30
+
31
+ devtools: { enabled: true },
32
+
33
+ css: [
34
+ '@unocss/reset/tailwind.css',
35
+ join(currentDir, './assets/css/a11y.css'),
36
+ join(currentDir, './assets/css/mdc-editor.css'),
37
+ ],
38
+
39
+ colorMode: {
40
+ classSuffix: '',
41
+ disableTransition: true,
42
+ },
43
+
44
+ content: {
45
+ documentDriven: true,
46
+ highlight: {
47
+ theme: {
48
+ default: 'github-light',
49
+ dark: 'github-dark',
50
+ },
51
+ preload: ['json', 'js', 'ts', 'html', 'css', 'vue', 'diff', 'shell', 'markdown', 'yaml', 'bash', 'ini'],
52
+ },
53
+ navigation: {
54
+ fields: [
55
+ 'description',
56
+ 'icon',
57
+ 'navBadges',
58
+ 'navTruncate',
59
+ 'badges',
60
+ 'toc',
61
+ 'sidebar',
62
+ 'collapse',
63
+ 'editLink',
64
+ 'prevNext',
65
+ 'breadcrumb',
66
+ ],
67
+ },
68
+ experimental: {
69
+ search: {
70
+ indexed: true,
71
+ },
72
+ },
73
+ },
74
+
75
+ build: {
76
+ transpile: ['shiki', 'ohash'],
77
+ },
78
+
79
+ routeRules: {
80
+ '/': { prerender: true },
81
+ // Admin dashboard renders only on client-side
82
+ // '/admin/**': { ssr: false },
83
+ },
84
+
85
+ sourcemap: {
86
+ server: true,
87
+ client: true,
88
+ },
89
+
90
+ compatibilityDate: '2025-01-10',
91
+
92
+ nitro: {
93
+ compressPublicAssets: {
94
+ gzip: true,
95
+ brotli: true,
96
+ },
97
+ },
98
+
99
+ eslint: {
100
+ config: {
101
+ stylistic: {
102
+ quotes: 'single',
103
+ semi: false,
104
+ },
105
+ },
106
+ },
107
+
108
+ i18n: {
109
+ defaultLocale: 'en',
110
+ bundle: {
111
+ optimizeTranslationDirective: false,
112
+ },
113
+ strategy: 'prefix_except_default',
114
+ },
115
+
116
+ icon: {
117
+ componentName: 'NuxtIcon',
118
+ },
119
+
120
+ shadcn: {
121
+ prefix: 'Ui',
122
+ componentDir: join(currentDir, './components/ui'),
123
+ },
124
+ })
package/package.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "@wordup-md/nuxt-layer-shadcn-unocss",
3
+ "type": "module",
4
+ "version": "0.2.0",
5
+ "author": "Emmanuel Salomon <emmanuel.salomon@gmail.com>",
6
+ "main": "./nuxt.config.ts",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/wordup-md/nuxt-layer-shadcn-unocss.git"
10
+ },
11
+ "homepage": "https://github.com/wordup-md/nuxt-layer-shadcn-unocss#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/wordup-md/nuxt-layer-shadcn-unocss/issues"
14
+ },
15
+ "keywords": [
16
+ "wordup-md"
17
+ ],
18
+ "license": "MIT",
19
+ "scripts": {
20
+ "dev": "nuxi dev .playground",
21
+ "dev:root": "nuxi dev",
22
+ "prepare": "nuxt prepare .playground",
23
+ "build": "nuxt build .playground",
24
+ "generate": "nuxt generate .playground",
25
+ "preview": "nuxt preview .playground",
26
+ "lint": "eslint .",
27
+ "build:json-doc": "tsx scripts/buildContentDoc-cli.ts",
28
+ "clean": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + && find . -name '.nuxt' -type d -prune -exec rm -rf '{}' + && find . -name '.output' -type d -prune -exec rm -rf '{}' + && find . -name 'dist' -prune -exec rm -rf '{}' +"
29
+ },
30
+ "devDependencies": {
31
+ "@nuxt/eslint": "latest",
32
+ "@nuxt/kit": "^3.17.2",
33
+ "@unocss/eslint-plugin": "^66.0.0",
34
+ "@unocss/extractor-mdc": "^66.0.0",
35
+ "@unocss/nuxt": "^66.0.0",
36
+ "@vueuse/core": "^13.1.0",
37
+ "@vueuse/nuxt": "^13.1.0",
38
+ "eslint": "^9.26.0",
39
+ "shadcn-nuxt": "^2.1.0",
40
+ "shiki": "^2.1.0",
41
+ "tsx": "^4.19.4",
42
+ "typescript": "^5.8.3",
43
+ "unocss": "^66.0.0",
44
+ "unocss-preset-animations": "^1.2.1",
45
+ "unocss-preset-shadcn": "^0.5.0",
46
+ "vue": "latest",
47
+ "yaml": "^2.7.1"
48
+ },
49
+ "dependencies": {
50
+ "@iconify-json/lucide": "^1.2.39",
51
+ "@iconify-json/vscode-icons": "^1.2.20",
52
+ "@nuxt/content": "^2.13.4",
53
+ "@nuxt/icon": "^1.12.0",
54
+ "@nuxt/image": "^1.10.0",
55
+ "@nuxtjs/color-mode": "^3.5.2",
56
+ "@nuxtjs/i18n": "^9.5.4",
57
+ "@unpress/nuxt-module": "0.1.12-beta.1",
58
+ "class-variance-authority": "^0.7.1",
59
+ "clsx": "^2.1.1",
60
+ "nuxt": "3.17.2",
61
+ "nuxt-og-image": "^4.1.4",
62
+ "reka-ui": "^2.2.1",
63
+ "tailwind-merge": "^3.2.0"
64
+ },
65
+ "packageManager": "pnpm@10.4.1",
66
+ "pnpm": {
67
+ "onlyBuiltDependencies": [
68
+ "sharp"
69
+ ]
70
+ }
71
+ }
@@ -0,0 +1,109 @@
1
+ <template>
2
+ <NuxtLayout>
3
+ <div
4
+ class="h-full flex-1 items-start px-4 md:grid md:gap-6 md:px-8 lg:gap-10"
5
+ :class="[
6
+ (page?.aside ?? true)
7
+ && 'md:grid-cols-[220px_minmax(0,1fr)] lg:grid-cols-[240px_minmax(0,1fr)]',
8
+ ]"
9
+ >
10
+ <aside
11
+ v-if="page?.aside ?? (page?.body && true)"
12
+ class="sticky hidden z-30 w-full shrink-0 overflow-y-auto top-[calc(var(--header-height)+var(--banner-height))] md:sticky md:block"
13
+ >
14
+ <LayoutAside :is-mobile="false" />
15
+ </aside>
16
+
17
+ <div
18
+ v-if="!page?.body"
19
+ class="col-span-3 mt-[20vh] flex items-center justify-center"
20
+ >
21
+ <h3 class="scroll-m-20 border-r px-4 py-3 text-2xl font-semibold">
22
+ 404
23
+ </h3>
24
+ <span class="scroll-m-20 px-4"> This page could not be found. </span>
25
+ </div>
26
+
27
+ <main
28
+ v-else
29
+ class="relative mt-3"
30
+ :class="[
31
+ config.toc.enable
32
+ && (page.toc ?? true)
33
+ && 'lg:grid lg:grid-cols-[1fr_220px] lg:gap-14',
34
+ ]"
35
+ >
36
+ <article class="mx-auto w-full min-w-0">
37
+ <LayoutBreadcrumb
38
+ v-if="
39
+ page?.body
40
+ && config.main.breadCrumb
41
+ && (page.breadcrumb ?? true)
42
+ "
43
+ class="mt-4.5 mb-6"
44
+ />
45
+
46
+ <LayoutTitle
47
+ v-if="config.main?.showTitle && (page.showTitle ?? true)"
48
+ :title="page?.title"
49
+ :description="page?.description"
50
+ :badges="page?.badges"
51
+ />
52
+
53
+ <Alert
54
+ v-if="page?.body?.children?.length === 0"
55
+ title="Empty Page"
56
+ icon="lucide:circle-x"
57
+ >
58
+ Start writing in
59
+ <ProseCodeInline>content/{{ page?._file }}</ProseCodeInline> to
60
+ see this page taking shape.
61
+ </Alert>
62
+
63
+ <!-- <ContentRenderer
64
+ v-else
65
+ :key="page._id"
66
+ :value="page"
67
+ class="docs-content"
68
+ /> -->
69
+ <!-- ℹ️ .docs-content is only used for TOC -->
70
+ <ContentCms
71
+ v-else
72
+ :key="page._id"
73
+ :value="page"
74
+ class="docs-content"
75
+ />
76
+
77
+ <LayoutDocsFooter />
78
+ </article>
79
+
80
+ <div
81
+ v-if="config.toc.enable && (page.toc ?? true)"
82
+ class="text-sm hidden lg:block lg:sticky lg:top-[calc(var(--header-height)+var(--banner-height)+1.75rem)] h-min max-h-[calc(100vh-var(--header-height)-var(--banner-height)-6rem)]"
83
+ >
84
+ <div class="overflow-hidden">
85
+ <LayoutToc :is-small="false" />
86
+ </div>
87
+ </div>
88
+ </main>
89
+ </div>
90
+ </NuxtLayout>
91
+ </template>
92
+
93
+ <script setup lang="ts">
94
+ const { page } = useContent()
95
+ const config = useConfig()
96
+
97
+ useSeoMeta({
98
+ title: `${page.value?.title ?? '404'} - ${config.value.site.name}`,
99
+ ogTitle: page.value?.title,
100
+ description: page.value?.description,
101
+ ogDescription: page.value?.description,
102
+ twitterCard: 'summary_large_image',
103
+ })
104
+
105
+ // defineOgImageComponent(config.value.site.ogImageComponent, {
106
+ // title: page.value?.title,
107
+ // description: page.value?.description,
108
+ // })
109
+ </script>