@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.
- package/.cursor/rules/active-context-rule.mdc +8 -0
- package/.cursor/rules/memory-bank-overview.mdc +17 -0
- package/.cursor/rules/product-context-rule.mdc +8 -0
- package/.cursor/rules/progress-rule.mdc +8 -0
- package/.cursor/rules/projectbrief-rule.mdc +8 -0
- package/.cursor/rules/system-patterns-rule.mdc +8 -0
- package/.cursor/rules/tech-context-rule.mdc +8 -0
- package/.cursorrules +52 -0
- package/.editorconfig +12 -0
- package/.nuxtrc +1 -0
- package/.playground/app.config.ts +189 -0
- package/.playground/assets/style.css +15 -0
- package/.playground/components/content/MdcExample.vue +81 -0
- package/.playground/components/content/MdcReplay.vue +319 -0
- package/.playground/content/1.getting-started/1.introduction.md +8 -0
- package/.playground/content/1.getting-started/2.writing/1.markdown.md +56 -0
- package/.playground/content/1.getting-started/2.writing/2.pages.md +177 -0
- package/.playground/content/1.getting-started/2.writing/3.folders.md +56 -0
- package/.playground/content/1.getting-started/2.writing/_dir.yml +3 -0
- package/.playground/content/1.getting-started/_dir.yml +3 -0
- package/.playground/content/2.content-elements/1.text-formatting.md +60 -0
- package/.playground/content/2.content-elements/10.horizontal-rule.md +25 -0
- package/.playground/content/2.content-elements/11.tables.md +25 -0
- package/.playground/content/2.content-elements/12.overview.md +93 -0
- package/.playground/content/2.content-elements/13.text-components.md +36 -0
- package/.playground/content/2.content-elements/2.headings.md +32 -0
- package/.playground/content/2.content-elements/3.paragraphs.md +39 -0
- package/.playground/content/2.content-elements/4.lists.md +37 -0
- package/.playground/content/2.content-elements/5.links.md +17 -0
- package/.playground/content/2.content-elements/6.images.md +17 -0
- package/.playground/content/2.content-elements/7.blockquotes.md +17 -0
- package/.playground/content/2.content-elements/8.code-blocks.md +141 -0
- package/.playground/content/2.content-elements/9.inline-code.md +21 -0
- package/.playground/content/2.content-elements/_dir.yml +3 -0
- package/.playground/content/2.content-elements/index.md +8 -0
- package/.playground/content/3.components/1.index.md +187 -0
- package/.playground/content/3.components/2.docs/_dir.yml +3 -0
- package/.playground/content/3.components/2.docs/alert.md +152 -0
- package/.playground/content/3.components/2.docs/badge.md +131 -0
- package/.playground/content/3.components/2.docs/button-link.md +53 -0
- package/.playground/content/3.components/2.docs/callout.md +16 -0
- package/.playground/content/3.components/2.docs/code-group.md +77 -0
- package/.playground/content/3.components/2.docs/code-snippet.md +129 -0
- package/.playground/content/3.components/2.docs/field-group.md +62 -0
- package/.playground/content/3.components/2.docs/field.md +39 -0
- package/.playground/content/3.components/2.docs/file-tree.md +144 -0
- package/.playground/content/3.components/2.docs/icon.md +94 -0
- package/.playground/content/3.components/2.docs/pm.md +67 -0
- package/.playground/content/3.components/2.docs/read-more.md +44 -0
- package/.playground/content/3.components/2.docs/shortcut.md +36 -0
- package/.playground/content/3.components/2.docs/stack.md +81 -0
- package/.playground/content/3.components/2.docs/steps.md +148 -0
- package/.playground/content/3.components/2.docs/tabs.md +375 -0
- package/.playground/content/3.components/3.page/_dir.yml +2 -0
- package/.playground/content/3.components/3.page/accordion.md +74 -0
- package/.playground/content/3.components/3.page/card-group.md +115 -0
- package/.playground/content/3.components/3.page/card.md +142 -0
- package/.playground/content/3.components/3.page/collapsible.md +61 -0
- package/.playground/content/3.components/3.page/hero-alt.md +118 -0
- package/.playground/content/3.components/3.page/hero.md +60 -0
- package/.playground/content/3.components/3.page/team-card.md +82 -0
- package/.playground/content/3.components/_dir.yml +2 -0
- package/.playground/content/4.development/1.configuration/1.overview.md +297 -0
- package/.playground/content/4.development/1.configuration/2.nuxt-content.md +105 -0
- package/.playground/content/4.development/1.configuration/3.og-image.md +86 -0
- package/.playground/content/4.development/1.configuration/4.edit-link.md +63 -0
- package/.playground/content/4.development/1.configuration/5.banner.md +52 -0
- package/.playground/content/4.development/1.configuration/6.carbon-ads.md +65 -0
- package/.playground/content/4.development/1.configuration/7.umami.md +41 -0
- package/.playground/content/4.development/1.configuration/_dir.yml +3 -0
- package/.playground/content/4.development/2.advanced/1.override.md +49 -0
- package/.playground/content/4.development/2.advanced/2.math.md +89 -0
- package/.playground/content/4.development/2.advanced/_dir.yml +3 -0
- package/.playground/content/4.development/3.themes.md +9 -0
- package/.playground/content/4.development/4.composables.md +38 -0
- package/.playground/content/4.development/5.installation.md +36 -0
- package/.playground/content/4.development/_dir.yml +3 -0
- package/.playground/content/_menu-footer.md +5 -0
- package/.playground/content/index.md +67 -0
- package/.playground/content/test-card.md +187 -0
- package/.playground/content/test.md +88 -0
- package/.playground/content/test2.md +12 -0
- package/.playground/content/test3.md +187 -0
- package/.playground/nuxt.config.ts +52 -0
- package/.playground/public/banner-preview.png +0 -0
- package/.playground/public/favicon.ico +0 -0
- package/.playground/public/front-matter-showcase/authors.png +0 -0
- package/.playground/public/front-matter-showcase/badges.png +0 -0
- package/.playground/public/front-matter-showcase/nav-badges.png +0 -0
- package/.playground/public/hero.png +0 -0
- package/.playground/public/logo-dark.svg +12 -0
- package/.playground/public/logo.svg +12 -0
- package/.playground/public/og-nuxt-seo.png +0 -0
- package/.playground/public/og-nuxt.png +0 -0
- package/.playground/public/og-shadcn-docs-dark.png +0 -0
- package/.playground/public/og-shadcn-docs.png +0 -0
- package/.playground/public/sidebar-default.png +0 -0
- package/.playground/public/sidebar-group.png +0 -0
- package/.playground/public/sidebar-tree.png +0 -0
- package/.playground/uno.config.ts +16 -0
- package/README.md +93 -0
- package/app.vue +59 -0
- package/assets/css/a11y.css +48 -0
- package/assets/css/mdc-editor.css +91 -0
- package/components/A11yModeToggle.vue +23 -0
- package/components/DarkModeToggle.vue +26 -0
- package/components/LinkIcon.vue +32 -0
- package/components/OgImage/ShadcnDocs.vue +55 -0
- package/components/ThemeCustomizer.vue +156 -0
- package/components/ThemePopover.vue +27 -0
- package/components/content/Accordion.vue +18 -0
- package/components/content/AccordionItem.vue +32 -0
- package/components/content/Alert.vue +100 -0
- package/components/content/Badge.vue +52 -0
- package/components/content/ButtonLink.vue +38 -0
- package/components/content/Callout.vue +17 -0
- package/components/content/Card.vue +173 -0
- package/components/content/CardGroup.vue +38 -0
- package/components/content/CodeCopy.vue +52 -0
- package/components/content/CodeGroup._vue +27 -0
- package/components/content/CodeSnippet._vue +78 -0
- package/components/content/Collapsible.vue +80 -0
- package/components/content/Field.vue +53 -0
- package/components/content/FieldGroup.vue +5 -0
- package/components/content/FileTree.vue +110 -0
- package/components/content/FileTreeItem.vue +64 -0
- package/components/content/FileTreeRoot.vue +27 -0
- package/components/content/Hero.vue +154 -0
- package/components/content/HeroAlt.vue +116 -0
- package/components/content/Icon.vue +69 -0
- package/components/content/Kbd.vue +20 -0
- package/components/content/PmInstall.vue +35 -0
- package/components/content/PmRun.vue +31 -0
- package/components/content/PmX.vue +31 -0
- package/components/content/ProseA.vue +21 -0
- package/components/content/ProseBlockquote.vue +5 -0
- package/components/content/ProseCode.vue +121 -0
- package/components/content/ProseCodeInline.vue +24 -0
- package/components/content/ProseEm.vue +5 -0
- package/components/content/ProseH1.vue +27 -0
- package/components/content/ProseH2.vue +22 -0
- package/components/content/ProseH3.vue +21 -0
- package/components/content/ProseH4.vue +21 -0
- package/components/content/ProseH5.vue +21 -0
- package/components/content/ProseH6.vue +21 -0
- package/components/content/ProseHr.vue +3 -0
- package/components/content/ProseImg.vue +42 -0
- package/components/content/ProseLi.vue +5 -0
- package/components/content/ProseOl.vue +5 -0
- package/components/content/ProseP.vue +5 -0
- package/components/content/ProsePre.vue +56 -0
- package/components/content/ProseSection.vue +27 -0
- package/components/content/ProseStrong.vue +5 -0
- package/components/content/ProseTable.vue +7 -0
- package/components/content/ProseTbody.vue +5 -0
- package/components/content/ProseTd.vue +5 -0
- package/components/content/ProseTh.vue +5 -0
- package/components/content/ProseThead.vue +5 -0
- package/components/content/ProseTr.vue +5 -0
- package/components/content/ProseUl.vue +5 -0
- package/components/content/ReadMore.vue +41 -0
- package/components/content/Shortcut.vue +20 -0
- package/components/content/Stack.vue +17 -0
- package/components/content/Steps.vue +23 -0
- package/components/content/Tabs.vue +52 -0
- package/components/content/TabsInner.vue +263 -0
- package/components/content/TeamCard.vue +52 -0
- package/components/content/TeamCardGroup.vue +5 -0
- package/components/content/global/AlertEditor.vue +58 -0
- package/components/content/global/BadgeEditor.vue +56 -0
- package/components/content/global/BrEditor.vue +3 -0
- package/components/content/global/CardEditor.vue +142 -0
- package/components/content/global/CardGroupEditor.vue +50 -0
- package/components/content/global/CodeGroup.vue +13 -0
- package/components/content/global/CodeGroupEditor.vue +50 -0
- package/components/content/global/DivEditor.vue +22 -0
- package/components/content/global/FieldEditor.vue +38 -0
- package/components/content/global/FieldGroupEditor.vue +24 -0
- package/components/content/global/HeroEditor.vue +67 -0
- package/components/content/global/ProseSectionEditor.vue +180 -0
- package/components/content/global/ReadMoreEditor.vue +70 -0
- package/components/content/global/SectionEditor.vue +22 -0
- package/components/content/global/StackEditor.vue +35 -0
- package/components/content/global/StepsEditor.vue +55 -0
- package/components/content/global/Tabs._vue +97 -0
- package/components/content/global/TabsEditor.vue +38 -0
- package/components/layout/Aside.vue +83 -0
- package/components/layout/AsideTree.vue +25 -0
- package/components/layout/AsideTreeItem.vue +86 -0
- package/components/layout/AsideTreeItemButton.vue +32 -0
- package/components/layout/Banner.vue +77 -0
- package/components/layout/Breadcrumb.vue +34 -0
- package/components/layout/DocsFooter.vue +6 -0
- package/components/layout/EditLink.vue +23 -0
- package/components/layout/Footer.vue +80 -0
- package/components/layout/FooterItem.vue +50 -0
- package/components/layout/FooterSubmenuItem.vue +39 -0
- package/components/layout/Header/Logo.vue +30 -0
- package/components/layout/Header/MenuItem.vue +83 -0
- package/components/layout/Header/Nav.vue +112 -0
- package/components/layout/Header/NavMobile.vue +14 -0
- package/components/layout/Header/NavMobileItem.vue +79 -0
- package/components/layout/Header/SubmenuItem.vue +39 -0
- package/components/layout/Header.vue +160 -0
- package/components/layout/LangSwitcher.vue +90 -0
- package/components/layout/MobileNav.vue +44 -0
- package/components/layout/PrevNext.vue +24 -0
- package/components/layout/PrevNextButton.vue +50 -0
- package/components/layout/SearchButton.vue +46 -0
- package/components/layout/SearchDialog.vue +217 -0
- package/components/layout/Title.vue +98 -0
- package/components/layout/Toc.vue +99 -0
- package/components/layout/TocTree.vue +42 -0
- package/components/ui/accordion/Accordion.vue +19 -0
- package/components/ui/accordion/AccordionContent.vue +24 -0
- package/components/ui/accordion/AccordionItem.vue +24 -0
- package/components/ui/accordion/AccordionTrigger.vue +39 -0
- package/components/ui/accordion/index.ts +4 -0
- package/components/ui/alert/Alert.vue +19 -0
- package/components/ui/alert/AlertDescription.vue +14 -0
- package/components/ui/alert/AlertTitle.vue +14 -0
- package/components/ui/alert/index.ts +23 -0
- package/components/ui/avatar/Avatar.vue +25 -0
- package/components/ui/avatar/AvatarFallback.vue +11 -0
- package/components/ui/avatar/AvatarImage.vue +12 -0
- package/components/ui/avatar/index.ts +24 -0
- package/components/ui/badge/Badge.vue +17 -0
- package/components/ui/badge/index.ts +71 -0
- package/components/ui/breadcrumb/Breadcrumb.vue +16 -0
- package/components/ui/breadcrumb/BreadcrumbItem.vue +16 -0
- package/components/ui/breadcrumb/BreadcrumbLink.vue +23 -0
- package/components/ui/breadcrumb/BreadcrumbList.vue +16 -0
- package/components/ui/breadcrumb/BreadcrumbPage.vue +19 -0
- package/components/ui/breadcrumb/BreadcrumbSeparator.vue +23 -0
- package/components/ui/breadcrumb/index.ts +6 -0
- package/components/ui/button/Button.vue +29 -0
- package/components/ui/button/index.ts +35 -0
- package/components/ui/card/Card.vue +21 -0
- package/components/ui/card/CardContent.vue +14 -0
- package/components/ui/card/CardDescription.vue +14 -0
- package/components/ui/card/CardFooter.vue +14 -0
- package/components/ui/card/CardHeader.vue +14 -0
- package/components/ui/card/CardTitle.vue +18 -0
- package/components/ui/card/index.ts +6 -0
- package/components/ui/collapsible/Collapsible.vue +18 -0
- package/components/ui/collapsible/CollapsibleContent.vue +14 -0
- package/components/ui/collapsible/CollapsibleTrigger.vue +11 -0
- package/components/ui/collapsible/index.ts +3 -0
- package/components/ui/command/Command.vue +89 -0
- package/components/ui/command/CommandEmpty.vue +30 -0
- package/components/ui/command/CommandGroup.vue +50 -0
- package/components/ui/command/CommandInput.vue +44 -0
- package/components/ui/command/CommandInputOnly.vue +50 -0
- package/components/ui/command/CommandItem.vue +79 -0
- package/components/ui/command/CommandList.vue +28 -0
- package/components/ui/command/CommandSeparator.vue +24 -0
- package/components/ui/command/index.ts +24 -0
- package/components/ui/dialog/Dialog.vue +14 -0
- package/components/ui/dialog/DialogClose.vue +11 -0
- package/components/ui/dialog/DialogContent.vue +52 -0
- package/components/ui/dialog/DialogDescription.vue +24 -0
- package/components/ui/dialog/DialogFooter.vue +19 -0
- package/components/ui/dialog/DialogHeader.vue +16 -0
- package/components/ui/dialog/DialogScrollContent.vue +61 -0
- package/components/ui/dialog/DialogTitle.vue +29 -0
- package/components/ui/dialog/DialogTrigger.vue +11 -0
- package/components/ui/dialog/index.ts +9 -0
- package/components/ui/input/Input.vue +27 -0
- package/components/ui/input/index.ts +1 -0
- package/components/ui/label/Label.vue +27 -0
- package/components/ui/label/index.ts +1 -0
- package/components/ui/navigation-menu/NavigationMenu.vue +33 -0
- package/components/ui/navigation-menu/NavigationMenuContent.vue +34 -0
- package/components/ui/navigation-menu/NavigationMenuIndicator.vue +24 -0
- package/components/ui/navigation-menu/NavigationMenuItem.vue +11 -0
- package/components/ui/navigation-menu/NavigationMenuLink.vue +19 -0
- package/components/ui/navigation-menu/NavigationMenuList.vue +33 -0
- package/components/ui/navigation-menu/NavigationMenuTrigger.vue +34 -0
- package/components/ui/navigation-menu/NavigationMenuViewport.vue +33 -0
- package/components/ui/navigation-menu/index.ts +14 -0
- package/components/ui/popover/Popover.vue +15 -0
- package/components/ui/popover/PopoverContent.vue +49 -0
- package/components/ui/popover/PopoverTrigger.vue +11 -0
- package/components/ui/popover/index.ts +4 -0
- package/components/ui/scroll-area/ScrollArea.vue +32 -0
- package/components/ui/scroll-area/ScrollBar.vue +41 -0
- package/components/ui/scroll-area/index.ts +2 -0
- package/components/ui/separator/Separator.vue +20 -0
- package/components/ui/separator/index.ts +1 -0
- package/components/ui/sheet/Sheet.vue +14 -0
- package/components/ui/sheet/SheetClose.vue +11 -0
- package/components/ui/sheet/SheetContent.vue +58 -0
- package/components/ui/sheet/SheetDescription.vue +22 -0
- package/components/ui/sheet/SheetFooter.vue +19 -0
- package/components/ui/sheet/SheetHeader.vue +16 -0
- package/components/ui/sheet/SheetTitle.vue +22 -0
- package/components/ui/sheet/SheetTrigger.vue +11 -0
- package/components/ui/sheet/index.ts +31 -0
- package/components/ui/slider/Slider.vue +36 -0
- package/components/ui/slider/index.ts +1 -0
- package/components/ui/tabs/Tabs.vue +15 -0
- package/components/ui/tabs/TabsContent.vue +22 -0
- package/components/ui/tabs/TabsList.vue +25 -0
- package/components/ui/tabs/TabsTrigger.vue +27 -0
- package/components/ui/tabs/index.ts +4 -0
- package/components/ui/textarea/Textarea.vue +27 -0
- package/components/ui/textarea/index.ts +1 -0
- package/components/ui/toast/Toast.vue +28 -0
- package/components/ui/toast/ToastAction.vue +22 -0
- package/components/ui/toast/ToastClose.vue +27 -0
- package/components/ui/toast/ToastDescription.vue +22 -0
- package/components/ui/toast/ToastProvider.vue +11 -0
- package/components/ui/toast/ToastTitle.vue +22 -0
- package/components/ui/toast/ToastViewport.vue +20 -0
- package/components/ui/toast/Toaster.vue +34 -0
- package/components/ui/toast/index.ts +38 -0
- package/components/ui/toast/use-toast.ts +165 -0
- package/components.json +18 -0
- package/composables/useBreadcrumb.ts +47 -0
- package/composables/useCollapsedMap.ts +3 -0
- package/composables/useConfig.ts +227 -0
- package/composables/useEditLink.ts +27 -0
- package/composables/useI18nDocs.ts +114 -0
- package/composables/useMdcMenu.ts +204 -0
- package/composables/usePm.ts +58 -0
- package/composables/useScrollspy.ts +51 -0
- package/composables/useThemes.ts +46 -0
- package/composables/useToast.ts +1 -0
- package/content/index.md +45 -0
- package/eslint.config.js +3 -0
- package/i18n/i18n.config.ts +414 -0
- package/index.d.ts +610 -0
- package/layouts/blank.vue +5 -0
- package/layouts/default.vue +9 -0
- package/layouts/editorial.vue +83 -0
- package/lib/registry/themes.ts +636 -0
- package/lib/uno-preset.ts +143 -0
- package/memory-bank/activeContext.md +17 -0
- package/memory-bank/productContext.md +21 -0
- package/memory-bank/progress.md +16 -0
- package/memory-bank/projectbrief.md +20 -0
- package/memory-bank/systemPatterns.md +25 -0
- package/memory-bank/techContext.md +29 -0
- package/modules/inject-css.ts +40 -0
- package/nuxt.config.ts +124 -0
- package/package.json +71 -0
- package/pages/[...slug].vue +109 -0
- package/pages/admin/[...slug].vue +145 -0
- package/pages/index.vue +24 -0
- package/plugins/injectCssHmr.ts +26 -0
- package/plugins/wordup.ts +130 -0
- package/public/content-doc.json +792 -0
- package/public/iconesjs.svg +4 -0
- package/scripts/buildContentDoc-cli.ts +8 -0
- package/scripts/buildContentDoc.ts +165 -0
- package/tailwind.config.js +1 -0
- package/tsconfig.json +3 -0
- package/uno.config.mjs +58 -0
- package/utils/index.ts +12 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description:
|
|
3
|
+
globs:
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
# Active Context Rule
|
|
7
|
+
|
|
8
|
+
The [activeContext.md](mdc:memory-bank/activeContext.md) file tracks the current work focus, recent changes, next steps, and active decisions. It is updated frequently to reflect the project's current state and guide ongoing development.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description:
|
|
3
|
+
globs:
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
# Memory Bank Overview
|
|
7
|
+
|
|
8
|
+
The Memory Bank is the project's documentation backbone, ensuring continuity and clarity across sessions. It consists of the following core files:
|
|
9
|
+
|
|
10
|
+
- [projectbrief.md](mdc:memory-bank/projectbrief.md): Defines core requirements, goals, and project scope. Source of truth for all documentation.
|
|
11
|
+
- [productContext.md](mdc:memory-bank/productContext.md): Explains why the project exists, the problems it solves, and user experience goals.
|
|
12
|
+
- [systemPatterns.md](mdc:memory-bank/systemPatterns.md): Documents system architecture, key technical decisions, design patterns, and component relationships.
|
|
13
|
+
- [techContext.md](mdc:memory-bank/techContext.md): Details technologies used, development setup, technical constraints, and dependencies.
|
|
14
|
+
- [activeContext.md](mdc:memory-bank/activeContext.md): Tracks current work focus, recent changes, next steps, and active decisions.
|
|
15
|
+
- [progress.md](mdc:memory-bank/progress.md): Monitors what works, what's left to build, current status, and known issues.
|
|
16
|
+
|
|
17
|
+
These files are interlinked and should be updated as the project evolves. See each file for detailed context.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description:
|
|
3
|
+
globs:
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
# Product Context Rule
|
|
7
|
+
|
|
8
|
+
The [productContext.md](mdc:memory-bank/productContext.md) file explains why the project exists, the problems it solves, and the intended user experience. It provides essential context for understanding the project's purpose and how it should function from a user's perspective.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description:
|
|
3
|
+
globs:
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
# Progress Rule
|
|
7
|
+
|
|
8
|
+
The [progress.md](mdc:memory-bank/progress.md) file monitors what works, what's left to build, the current status, and known issues. It provides a snapshot of project progress and helps prioritize future work.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description:
|
|
3
|
+
globs:
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
# Project Brief Rule
|
|
7
|
+
|
|
8
|
+
The [projectbrief.md](mdc:memory-bank/projectbrief.md) file is the foundation of all project documentation. It defines the core requirements, goals, and scope, serving as the source of truth for project direction and decision-making. All other Memory Bank files build upon the context established here.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description:
|
|
3
|
+
globs:
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
# System Patterns Rule
|
|
7
|
+
|
|
8
|
+
The [systemPatterns.md](mdc:memory-bank/systemPatterns.md) file documents the system architecture, key technical decisions, design patterns, and component relationships. It serves as a reference for how the project is structured and the rationale behind major technical choices.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description:
|
|
3
|
+
globs:
|
|
4
|
+
alwaysApply: false
|
|
5
|
+
---
|
|
6
|
+
# Tech Context Rule
|
|
7
|
+
|
|
8
|
+
The [techContext.md](mdc:memory-bank/techContext.md) file details the technologies used, development setup, technical constraints, and dependencies. It provides a technical overview for onboarding and maintaining consistency across the project.
|
package/.cursorrules
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
You have extensive expertise in Vue 3, Nuxt 3, TypeScript, Node.js, Vite, Vue Router, Pinia, VueUse, ShadcnUI and Unocss. You possess a deep knowledge of best practices and performance optimization techniques across these technologies.
|
|
2
|
+
|
|
3
|
+
Code Style and Structure
|
|
4
|
+
- Write clean, maintainable, and technically accurate TypeScript code.
|
|
5
|
+
- Prioritize functional and declarative programming patterns; avoid using classes.
|
|
6
|
+
- Emphasize iteration and modularization to follow DRY principles and minimize code duplication.
|
|
7
|
+
- Prefer Composition API <script setup lang="ts"> style.
|
|
8
|
+
- Use Composables to encapsulate and share reusable client-side logic or state across multiple components in your Nuxt application.
|
|
9
|
+
|
|
10
|
+
Nuxt 3 Specifics
|
|
11
|
+
- Nuxt 3 provides auto imports, so there’s no need to manually import `ref`, `useState`, or `useRouter`.
|
|
12
|
+
- For color mode handling, use the built-in `@nuxtjs/color-mode` with the `useColorMode()` function.
|
|
13
|
+
- Take advantage of VueUse functions to enhance reactivity and performance (except for color mode management).
|
|
14
|
+
- Use the Server API (within the server/api directory) to handle server-side operations like database interactions, authentication, or processing sensitive data that must remain confidential.
|
|
15
|
+
- use useRuntimeConfig to access and manage runtime configuration variables that differ between environments and are needed both on the server and client sides.
|
|
16
|
+
|
|
17
|
+
Fetching Data
|
|
18
|
+
1. Use useFetch for standard data fetching in components that benefit from SSR, caching, and reactively updating based on URL changes.
|
|
19
|
+
2. Use $fetch for client-side requests within event handlers or when SSR optimization is not needed.
|
|
20
|
+
3. Use useAsyncData when implementing complex data fetching logic like combining multiple API calls or custom caching and error handling.
|
|
21
|
+
4. Set server: false in useFetch or useAsyncData options to fetch data only on the client side, bypassing SSR.
|
|
22
|
+
5. Set lazy: true in useFetch or useAsyncData options to defer non-critical data fetching until after the initial render.
|
|
23
|
+
|
|
24
|
+
Naming Conventions
|
|
25
|
+
- Utilize composables, naming them as use<MyComposable>.
|
|
26
|
+
- Use **PascalCase** for component file names (e.g., `components/MyComponent.vue`).
|
|
27
|
+
- Favor named exports for functions to maintain consistency and readability.
|
|
28
|
+
|
|
29
|
+
TypeScript Usage
|
|
30
|
+
- Use TypeScript for all code; prefer interfaces over types for their extendability and ability to merge.
|
|
31
|
+
- Avoid enums; use maps instead for better type safety and flexibility.
|
|
32
|
+
- Use functional components with TypeScript interfaces.
|
|
33
|
+
|
|
34
|
+
UI and Styling
|
|
35
|
+
- Use ShadcnUI and Unocss for components and styling.
|
|
36
|
+
- Implement responsive design with Unocss; use a mobile-first approach.
|
|
37
|
+
- Build UI components using atomic design principles, organizing them from smallest to largest (e.g., atoms, molecules, organisms, pages).
|
|
38
|
+
|
|
39
|
+
Performance Optimization
|
|
40
|
+
- Leverage VueUse functions where applicable to enhance reactivity and performance.
|
|
41
|
+
- Wrap asynchronous components in Suspense with a fallback UI.
|
|
42
|
+
- Use dynamic loading for non-critical components.
|
|
43
|
+
- Optimize images: use WebP format, include size data, implement lazy loading.
|
|
44
|
+
- Implement an optimized chunking strategy during the Vite build process, such as code splitting, to generate smaller bundle sizes.
|
|
45
|
+
- Optimize Web Vitals (LCP, CLS, FID) using tools like Lighthouse or WebPageTest.
|
|
46
|
+
- Implement proper error boundaries or try-catch mechanisms to handle errors gracefully, especially in asynchronous operations.
|
|
47
|
+
|
|
48
|
+
Accessibility
|
|
49
|
+
- Use ShadcnUI components with the `aria-*` attributes set automatically.
|
|
50
|
+
- Implement keyboard navigation for components that support it.
|
|
51
|
+
- Use semantic HTML elements and ARIA roles to structure content.
|
|
52
|
+
- Ensure proper color contrast and text readability.
|
package/.editorconfig
ADDED
package/.nuxtrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
typescript.includeWorkspace = true
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
export default defineAppConfig({
|
|
2
|
+
shadcnDocs: {
|
|
3
|
+
site: {
|
|
4
|
+
name: 'shadcn-docs',
|
|
5
|
+
description: 'Beautifully designed Nuxt Content template built with shadcn-vue and unocss.',
|
|
6
|
+
ogImage: '/hero.png',
|
|
7
|
+
ogImageComponent: 'ShadcnDocs',
|
|
8
|
+
ogImageColor: 'dark',
|
|
9
|
+
umami: {
|
|
10
|
+
enable: false,
|
|
11
|
+
src: 'https://cloud.umami.is/script.js',
|
|
12
|
+
dataWebsiteId: '',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
theme: {
|
|
16
|
+
color: 'orange',
|
|
17
|
+
radius: 0.5,
|
|
18
|
+
},
|
|
19
|
+
banner: {
|
|
20
|
+
enable: true,
|
|
21
|
+
showClose: true,
|
|
22
|
+
content: 'Welcome to **shadcn-docs-nuxt**',
|
|
23
|
+
to: 'https://github.com/ZTL-UwU/shadcn-docs-nuxt',
|
|
24
|
+
target: '_blank',
|
|
25
|
+
border: true,
|
|
26
|
+
},
|
|
27
|
+
header: {
|
|
28
|
+
title: 'shadcn-docs',
|
|
29
|
+
showTitle: true,
|
|
30
|
+
logo: {
|
|
31
|
+
light: '/logo.svg',
|
|
32
|
+
dark: '/logo-dark.svg',
|
|
33
|
+
},
|
|
34
|
+
border: true,
|
|
35
|
+
darkModeToggle: true,
|
|
36
|
+
nav: [{
|
|
37
|
+
title: 'Docs',
|
|
38
|
+
links: [{
|
|
39
|
+
title: 'Getting Started',
|
|
40
|
+
to: '/getting-started',
|
|
41
|
+
description: 'Start building your document with shadcn-docs-nuxt',
|
|
42
|
+
icon: 'lucide:rocket',
|
|
43
|
+
}, {
|
|
44
|
+
title: 'Development',
|
|
45
|
+
to: '/development',
|
|
46
|
+
description: 'Discover the configurations and exposed APIs.',
|
|
47
|
+
target: '_self',
|
|
48
|
+
icon: 'lucide:code',
|
|
49
|
+
}],
|
|
50
|
+
}, {
|
|
51
|
+
title: 'Credits',
|
|
52
|
+
links: [{
|
|
53
|
+
title: 'shadcn-ui',
|
|
54
|
+
to: 'https://ui.shadcn.com/',
|
|
55
|
+
description: 'For the beautiful component design & docs design',
|
|
56
|
+
target: '_blank',
|
|
57
|
+
}, {
|
|
58
|
+
title: 'shadcn-vue',
|
|
59
|
+
to: 'https://www.shadcn-vue.com/',
|
|
60
|
+
description: 'For the vue port of shadcn-ui & some docs component source',
|
|
61
|
+
target: '_blank',
|
|
62
|
+
}, {
|
|
63
|
+
title: 'Docus',
|
|
64
|
+
to: 'https://docus.dev/',
|
|
65
|
+
description: 'For inspiration & some docs component source',
|
|
66
|
+
target: '_blank',
|
|
67
|
+
}, {
|
|
68
|
+
title: 'Nuxt Content',
|
|
69
|
+
to: 'https://content.nuxt.com/',
|
|
70
|
+
description: 'Content made easy for Vue Developers',
|
|
71
|
+
target: '_blank',
|
|
72
|
+
}],
|
|
73
|
+
}, {
|
|
74
|
+
title: 'Use This Template',
|
|
75
|
+
to: '/getting-started/introduction',
|
|
76
|
+
target: '_self',
|
|
77
|
+
showLinkIcon: true,
|
|
78
|
+
}],
|
|
79
|
+
links: [{
|
|
80
|
+
icon: 'lucide:twitter',
|
|
81
|
+
to: 'https://x.com/unpress_dev',
|
|
82
|
+
target: '_blank',
|
|
83
|
+
}],
|
|
84
|
+
},
|
|
85
|
+
aside: {
|
|
86
|
+
useLevel: true,
|
|
87
|
+
collapse: false,
|
|
88
|
+
collapseLevel: 1,
|
|
89
|
+
folderStyle: 'default',
|
|
90
|
+
},
|
|
91
|
+
main: {
|
|
92
|
+
// padded: true,
|
|
93
|
+
breadCrumb: {
|
|
94
|
+
showIcon: true,
|
|
95
|
+
},
|
|
96
|
+
showTitle: true,
|
|
97
|
+
codeCopyToast: true,
|
|
98
|
+
editLink: {
|
|
99
|
+
enable: true,
|
|
100
|
+
pattern: 'https://github.com/ZTL-UwU/shadcn-docs-nuxt/edit/main/content/:path',
|
|
101
|
+
text: 'Edit this page',
|
|
102
|
+
icon: 'lucide:square-pen',
|
|
103
|
+
placement: ['docsFooter', 'toc'],
|
|
104
|
+
},
|
|
105
|
+
codeIcon: {
|
|
106
|
+
'package.json': 'vscode-icons:file-type-node',
|
|
107
|
+
'tsconfig.json': 'vscode-icons:file-type-tsconfig',
|
|
108
|
+
'.npmrc': 'vscode-icons:file-type-npm',
|
|
109
|
+
'.editorconfig': 'vscode-icons:file-type-editorconfig',
|
|
110
|
+
'.eslintrc': 'vscode-icons:file-type-eslint',
|
|
111
|
+
'.eslintrc.cjs': 'vscode-icons:file-type-eslint',
|
|
112
|
+
'.eslintignore': 'vscode-icons:file-type-eslint',
|
|
113
|
+
'eslint.config.js': 'vscode-icons:file-type-eslint',
|
|
114
|
+
'eslint.config.mjs': 'vscode-icons:file-type-eslint',
|
|
115
|
+
'eslint.config.cjs': 'vscode-icons:file-type-eslint',
|
|
116
|
+
'.gitignore': 'vscode-icons:file-type-git',
|
|
117
|
+
'yarn.lock': 'vscode-icons:file-type-yarn',
|
|
118
|
+
'.env': 'vscode-icons:file-type-dotenv',
|
|
119
|
+
'.env.example': 'vscode-icons:file-type-dotenv',
|
|
120
|
+
'.vscode/settings.json': 'vscode-icons:file-type-vscode',
|
|
121
|
+
'nuxt': 'vscode-icons:file-type-nuxt',
|
|
122
|
+
'.nuxtrc': 'vscode-icons:file-type-nuxt',
|
|
123
|
+
'.nuxtignore': 'vscode-icons:file-type-nuxt',
|
|
124
|
+
'nuxt.config.js': 'vscode-icons:file-type-nuxt',
|
|
125
|
+
'nuxt.config.ts': 'vscode-icons:file-type-nuxt',
|
|
126
|
+
'nuxt.schema.ts': 'vscode-icons:file-type-nuxt',
|
|
127
|
+
'tailwind.config.js': 'vscode-icons:file-type-tailwind',
|
|
128
|
+
'tailwind.config.ts': 'vscode-icons:file-type-tailwind',
|
|
129
|
+
'vue': 'vscode-icons:file-type-vue',
|
|
130
|
+
'ts': 'vscode-icons:file-type-typescript',
|
|
131
|
+
'tsx': 'vscode-icons:file-type-typescript',
|
|
132
|
+
'mjs': 'vscode-icons:file-type-js',
|
|
133
|
+
'cjs': 'vscode-icons:file-type-js',
|
|
134
|
+
'js': 'vscode-icons:file-type-js',
|
|
135
|
+
'jsx': 'vscode-icons:file-type-js',
|
|
136
|
+
'md': 'vscode-icons:file-type-markdown',
|
|
137
|
+
'mdc': 'vscode-icons:file-type-markdown',
|
|
138
|
+
'py': 'vscode-icons:file-type-python',
|
|
139
|
+
'npm': 'vscode-icons:file-type-npm',
|
|
140
|
+
'pnpm': 'vscode-icons:file-type-pnpm',
|
|
141
|
+
'npx': 'vscode-icons:file-type-npm',
|
|
142
|
+
'yarn': 'vscode-icons:file-type-yarn',
|
|
143
|
+
'bun': 'vscode-icons:file-type-bun',
|
|
144
|
+
'yml': 'vscode-icons:file-type-yaml',
|
|
145
|
+
'json': 'vscode-icons:file-type-json',
|
|
146
|
+
'terminal': 'lucide:terminal',
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
footer: {
|
|
150
|
+
credits: 'Made with ❤️ by [**Emmanuel Salomon**](https://github.com/ManUtopiK/) with [Unpress](https://unpress.dev)',
|
|
151
|
+
links: [
|
|
152
|
+
{
|
|
153
|
+
title: 'shadcn-vue',
|
|
154
|
+
icon: 'https://www.shadcn-vue.com/favicon.ico',
|
|
155
|
+
to: 'https://www.shadcn-vue.com/',
|
|
156
|
+
target: '_blank',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
icon: 'lucide:github',
|
|
160
|
+
to: 'https://github.com/ZTL-UwU/shadcn-docs-nuxt',
|
|
161
|
+
target: '_blank',
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
},
|
|
165
|
+
toc: {
|
|
166
|
+
enable: true,
|
|
167
|
+
title: 'On This Page',
|
|
168
|
+
links: [{
|
|
169
|
+
title: 'Star on GitHub',
|
|
170
|
+
icon: 'lucide:star',
|
|
171
|
+
to: 'https://github.com/ZTL-UwU/shadcn-docs-nuxt',
|
|
172
|
+
target: '_blank',
|
|
173
|
+
showLinkIcon: true,
|
|
174
|
+
}, {
|
|
175
|
+
title: 'Create Issues',
|
|
176
|
+
icon: 'lucide:circle-dot',
|
|
177
|
+
to: 'https://github.com/ZTL-UwU/shadcn-docs-nuxt/issues',
|
|
178
|
+
target: '_blank',
|
|
179
|
+
showLinkIcon: true,
|
|
180
|
+
}],
|
|
181
|
+
carbonAds: {
|
|
182
|
+
enable: false,
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
search: {
|
|
186
|
+
inAside: false,
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
})
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@unocss;
|
|
2
|
+
|
|
3
|
+
/* .app__header {
|
|
4
|
+
background-color: transparent !important;
|
|
5
|
+
border: none !important;
|
|
6
|
+
color: white !important;
|
|
7
|
+
} */
|
|
8
|
+
.bg-funky {
|
|
9
|
+
position: relative;
|
|
10
|
+
}
|
|
11
|
+
.bg-funky:before {
|
|
12
|
+
--at-apply: absolute inset-0 rounded-inherit content-[''];
|
|
13
|
+
--at-apply: origin-bottom-left rotate--1 translate-x--1 translate-y--2 -z-1;
|
|
14
|
+
--at-apply: bg-gradient-to-br from-primary to-primary/50;
|
|
15
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<UiCard class="divide-y overflow-hidden [&:not(:first-child)]:mt-5">
|
|
3
|
+
<!-- <div
|
|
4
|
+
v-for="(slot, i) in $slots.default?.() ?? []"
|
|
5
|
+
:key="i"
|
|
6
|
+
>
|
|
7
|
+
<button @click="console.log(slot)">
|
|
8
|
+
{{ i }}
|
|
9
|
+
|
|
10
|
+
{{ slot?.props?.language === 'mdc' }}
|
|
11
|
+
</button>
|
|
12
|
+
<component
|
|
13
|
+
:is="slot"
|
|
14
|
+
:in-stack="true"
|
|
15
|
+
/>
|
|
16
|
+
</div> -->
|
|
17
|
+
|
|
18
|
+
<div class="p-4">
|
|
19
|
+
<!-- <MdcEditor v-model="md" /> -->
|
|
20
|
+
a{{ md }}
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<MdcEditor
|
|
24
|
+
v-model="code"
|
|
25
|
+
editor-content-class="![&>div]:mt-0 [&_pre]:p-3 [&_pre]:bg-muted [&_code]:min-h-32"
|
|
26
|
+
/>
|
|
27
|
+
<!-- <pre
|
|
28
|
+
class="language-mdc shiki shiki-themes github-light github-dark"
|
|
29
|
+
>
|
|
30
|
+
<code
|
|
31
|
+
ref="editableCode"
|
|
32
|
+
contenteditable="true"
|
|
33
|
+
@input="updateCode"
|
|
34
|
+
>{{ md }}</code>
|
|
35
|
+
</pre> -->
|
|
36
|
+
</UiCard>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script setup lang="ts">
|
|
40
|
+
import type { SetupContext } from 'vue'
|
|
41
|
+
|
|
42
|
+
defineSlots()
|
|
43
|
+
|
|
44
|
+
const _slots: SetupContext['slots'] = useSlots()
|
|
45
|
+
|
|
46
|
+
const extractMdc = () => {
|
|
47
|
+
const slots = _slots?.default?.() ?? []
|
|
48
|
+
|
|
49
|
+
for (const slot of slots) {
|
|
50
|
+
if (slot.props?.language === 'mdc') {
|
|
51
|
+
console.log(slot)
|
|
52
|
+
return slot.props.code || ''
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return ''
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const _md = extractMdc()
|
|
59
|
+
const md = ref(_md)
|
|
60
|
+
|
|
61
|
+
const code = computed({
|
|
62
|
+
get() {
|
|
63
|
+
return '```mdc\n' + md.value + '\n```'
|
|
64
|
+
},
|
|
65
|
+
set(value) {
|
|
66
|
+
md.value = value.replace('```mdc\n', '').replace('\n```', '')
|
|
67
|
+
},
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
// const updateCode = (event: Event) => {
|
|
71
|
+
// md.value = (event.target as HTMLTextAreaElement).innerText
|
|
72
|
+
// console.log('Code updated:', md.value)
|
|
73
|
+
// }
|
|
74
|
+
// function render() {
|
|
75
|
+
// const slots = _slots?.default?.() || []
|
|
76
|
+
// const code = slots[0]
|
|
77
|
+
// console.log(code)
|
|
78
|
+
// code.props.contenteditable = 'true'
|
|
79
|
+
// return code
|
|
80
|
+
// }
|
|
81
|
+
</script>
|