@lupinum/ginko-docs 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +112 -0
  3. package/app/app.config.ts +49 -0
  4. package/app/app.vue +71 -0
  5. package/app/assets/css/prose.css +1154 -0
  6. package/app/assets/css/tailwind.css +365 -0
  7. package/app/components/OgImage/GinkoDocs.satori.vue +117 -0
  8. package/app/components/content/DocumentPageShell.vue +55 -0
  9. package/app/components/content/Feedback.vue +97 -0
  10. package/app/components/content/PageMarkdownCopy.vue +102 -0
  11. package/app/components/mdc/MdcAccordion.vue +64 -0
  12. package/app/components/mdc/MdcAccordionItem.vue +51 -0
  13. package/app/components/mdc/MdcAlert.vue +34 -0
  14. package/app/components/mdc/MdcAside.vue +27 -0
  15. package/app/components/mdc/MdcCallout.vue +62 -0
  16. package/app/components/mdc/MdcCard.vue +186 -0
  17. package/app/components/mdc/MdcCardGroup.vue +47 -0
  18. package/app/components/mdc/MdcCenter.vue +71 -0
  19. package/app/components/mdc/MdcCodeGroup.vue +193 -0
  20. package/app/components/mdc/MdcColumn.vue +70 -0
  21. package/app/components/mdc/MdcDocImg.vue +25 -0
  22. package/app/components/mdc/MdcDropcap.vue +84 -0
  23. package/app/components/mdc/MdcError.vue +16 -0
  24. package/app/components/mdc/MdcField.vue +62 -0
  25. package/app/components/mdc/MdcFieldGroup.vue +18 -0
  26. package/app/components/mdc/MdcFigure.vue +51 -0
  27. package/app/components/mdc/MdcIdea.vue +16 -0
  28. package/app/components/mdc/MdcInfo.vue +16 -0
  29. package/app/components/mdc/MdcLayout.vue +57 -0
  30. package/app/components/mdc/MdcNote.vue +16 -0
  31. package/app/components/mdc/MdcPassage.vue +32 -0
  32. package/app/components/mdc/MdcQuiz.vue +281 -0
  33. package/app/components/mdc/MdcQuizOption.vue +91 -0
  34. package/app/components/mdc/MdcQuizQuestion.vue +226 -0
  35. package/app/components/mdc/MdcReadMore.vue +90 -0
  36. package/app/components/mdc/MdcReadMoreGroup.vue +18 -0
  37. package/app/components/mdc/MdcShortcut.vue +46 -0
  38. package/app/components/mdc/MdcStep.vue +42 -0
  39. package/app/components/mdc/MdcSteps.vue +25 -0
  40. package/app/components/mdc/MdcSuccess.vue +16 -0
  41. package/app/components/mdc/MdcTab.vue +17 -0
  42. package/app/components/mdc/MdcTabs.vue +132 -0
  43. package/app/components/mdc/MdcTimeline.vue +14 -0
  44. package/app/components/mdc/MdcTimelineItem.vue +49 -0
  45. package/app/components/mdc/MdcWarning.vue +16 -0
  46. package/app/components/mdc/icons.ts +10 -0
  47. package/app/components/prose/ProseA.vue +27 -0
  48. package/app/components/prose/ProseBlockquote.vue +14 -0
  49. package/app/components/prose/ProseCode.vue +14 -0
  50. package/app/components/prose/ProseEm.vue +14 -0
  51. package/app/components/prose/ProseH1.vue +18 -0
  52. package/app/components/prose/ProseH2.vue +24 -0
  53. package/app/components/prose/ProseH3.vue +24 -0
  54. package/app/components/prose/ProseH4.vue +14 -0
  55. package/app/components/prose/ProseHr.vue +12 -0
  56. package/app/components/prose/ProseImg.vue +120 -0
  57. package/app/components/prose/ProseLi.vue +14 -0
  58. package/app/components/prose/ProseOl.vue +14 -0
  59. package/app/components/prose/ProseP.vue +14 -0
  60. package/app/components/prose/ProsePre.vue +217 -0
  61. package/app/components/prose/ProseStrong.vue +14 -0
  62. package/app/components/prose/ProseTable.vue +16 -0
  63. package/app/components/prose/ProseTbody.vue +14 -0
  64. package/app/components/prose/ProseTd.vue +14 -0
  65. package/app/components/prose/ProseTh.vue +14 -0
  66. package/app/components/prose/ProseThead.vue +14 -0
  67. package/app/components/prose/ProseTr.vue +14 -0
  68. package/app/components/prose/ProseUl.vue +14 -0
  69. package/app/components/site/ModeToggle.vue +123 -0
  70. package/app/components/site/SiteBanner.vue +56 -0
  71. package/app/components/site/SiteFooter.vue +80 -0
  72. package/app/components/site/SiteHeader.vue +250 -0
  73. package/app/components/site/SiteInteractionLayer.vue +35 -0
  74. package/app/components/site/SiteLocaleSwitcher.vue +268 -0
  75. package/app/components/site/SiteLogoMark.vue +12 -0
  76. package/app/components/site/SiteSkipLink.vue +14 -0
  77. package/app/components/ui/accordion/Accordion.vue +15 -0
  78. package/app/components/ui/accordion/AccordionContent.vue +23 -0
  79. package/app/components/ui/accordion/AccordionItem.vue +24 -0
  80. package/app/components/ui/accordion/AccordionTrigger.vue +35 -0
  81. package/app/components/ui/accordion/index.ts +4 -0
  82. package/app/components/ui/alert/Alert.vue +21 -0
  83. package/app/components/ui/alert/AlertDescription.vue +22 -0
  84. package/app/components/ui/alert/AlertTitle.vue +22 -0
  85. package/app/components/ui/alert/index.ts +34 -0
  86. package/app/components/ui/badge/Badge.vue +28 -0
  87. package/app/components/ui/badge/index.ts +24 -0
  88. package/app/components/ui/button/Button.vue +31 -0
  89. package/app/components/ui/button/index.ts +35 -0
  90. package/app/components/ui/card/Card.vue +16 -0
  91. package/app/components/ui/card/CardAction.vue +17 -0
  92. package/app/components/ui/card/CardContent.vue +14 -0
  93. package/app/components/ui/card/CardDescription.vue +14 -0
  94. package/app/components/ui/card/CardFooter.vue +14 -0
  95. package/app/components/ui/card/CardHeader.vue +22 -0
  96. package/app/components/ui/card/CardTitle.vue +14 -0
  97. package/app/components/ui/card/card-variants.ts +15 -0
  98. package/app/components/ui/card/index.ts +8 -0
  99. package/app/components/ui/checkbox/Checkbox.vue +35 -0
  100. package/app/components/ui/checkbox/index.ts +1 -0
  101. package/app/components/ui/collapsible/Collapsible.vue +15 -0
  102. package/app/components/ui/collapsible/CollapsibleContent.vue +25 -0
  103. package/app/components/ui/collapsible/CollapsibleTrigger.vue +12 -0
  104. package/app/components/ui/collapsible/index.ts +3 -0
  105. package/app/components/ui/dialog/Dialog.vue +15 -0
  106. package/app/components/ui/dialog/DialogClose.vue +12 -0
  107. package/app/components/ui/dialog/DialogContent.vue +69 -0
  108. package/app/components/ui/dialog/DialogDescription.vue +21 -0
  109. package/app/components/ui/dialog/DialogFooter.vue +15 -0
  110. package/app/components/ui/dialog/DialogHeader.vue +12 -0
  111. package/app/components/ui/dialog/DialogOverlay.vue +26 -0
  112. package/app/components/ui/dialog/DialogPortal.vue +12 -0
  113. package/app/components/ui/dialog/DialogTitle.vue +21 -0
  114. package/app/components/ui/dialog/DialogTrigger.vue +12 -0
  115. package/app/components/ui/dialog/index.ts +10 -0
  116. package/app/components/ui/dropdown-menu/DropdownMenu.vue +15 -0
  117. package/app/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +36 -0
  118. package/app/components/ui/dropdown-menu/DropdownMenuContent.vue +40 -0
  119. package/app/components/ui/dropdown-menu/DropdownMenuGroup.vue +12 -0
  120. package/app/components/ui/dropdown-menu/DropdownMenuItem.vue +41 -0
  121. package/app/components/ui/dropdown-menu/DropdownMenuLabel.vue +25 -0
  122. package/app/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +15 -0
  123. package/app/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +37 -0
  124. package/app/components/ui/dropdown-menu/DropdownMenuSeparator.vue +23 -0
  125. package/app/components/ui/dropdown-menu/DropdownMenuShortcut.vue +17 -0
  126. package/app/components/ui/dropdown-menu/DropdownMenuSub.vue +15 -0
  127. package/app/components/ui/dropdown-menu/DropdownMenuSubContent.vue +29 -0
  128. package/app/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +31 -0
  129. package/app/components/ui/dropdown-menu/DropdownMenuTrigger.vue +14 -0
  130. package/app/components/ui/dropdown-menu/index.ts +16 -0
  131. package/app/components/ui/input/Input.vue +23 -0
  132. package/app/components/ui/input/index.ts +1 -0
  133. package/app/components/ui/kbd/Kbd.vue +23 -0
  134. package/app/components/ui/kbd/KbdGroup.vue +14 -0
  135. package/app/components/ui/kbd/index.ts +22 -0
  136. package/app/components/ui/label/Label.vue +14 -0
  137. package/app/components/ui/label/index.ts +1 -0
  138. package/app/components/ui/scroll-area/ScrollArea.vue +39 -0
  139. package/app/components/ui/scroll-area/ScrollBar.vue +33 -0
  140. package/app/components/ui/scroll-area/index.ts +2 -0
  141. package/app/components/ui/separator/Separator.vue +27 -0
  142. package/app/components/ui/separator/index.ts +1 -0
  143. package/app/components/ui/sheet/Sheet.vue +15 -0
  144. package/app/components/ui/sheet/SheetClose.vue +12 -0
  145. package/app/components/ui/sheet/SheetContent.vue +59 -0
  146. package/app/components/ui/sheet/SheetDescription.vue +21 -0
  147. package/app/components/ui/sheet/SheetFooter.vue +12 -0
  148. package/app/components/ui/sheet/SheetHeader.vue +12 -0
  149. package/app/components/ui/sheet/SheetOverlay.vue +26 -0
  150. package/app/components/ui/sheet/SheetTitle.vue +21 -0
  151. package/app/components/ui/sheet/SheetTrigger.vue +12 -0
  152. package/app/components/ui/sheet/index.ts +8 -0
  153. package/app/components/ui/switch/Switch.vue +39 -0
  154. package/app/components/ui/switch/index.ts +1 -0
  155. package/app/components/ui/tabs/Tabs.vue +24 -0
  156. package/app/components/ui/tabs/TabsContent.vue +21 -0
  157. package/app/components/ui/tabs/TabsList.vue +26 -0
  158. package/app/components/ui/tabs/TabsTrigger.vue +28 -0
  159. package/app/components/ui/tabs/index.ts +4 -0
  160. package/app/components/ui/textarea/Textarea.vue +31 -0
  161. package/app/components/ui/textarea/index.ts +1 -0
  162. package/app/composables/site-navigation.utils.ts +80 -0
  163. package/app/composables/useCanonicalUrl.ts +9 -0
  164. package/app/composables/useContentRouteAlternates.ts +43 -0
  165. package/app/composables/useGinkoAnalytics.ts +37 -0
  166. package/app/composables/useGinkoDocsConfig.ts +6 -0
  167. package/app/composables/useGinkoOgImage.ts +20 -0
  168. package/app/composables/useLocalizedPath.ts +12 -0
  169. package/app/composables/useLocalizedRouteSwitch.ts +31 -0
  170. package/app/composables/usePageMarkdownActions.ts +79 -0
  171. package/app/composables/useSchemaJsonLd.ts +25 -0
  172. package/app/composables/useSiteNavigation.ts +86 -0
  173. package/app/config/site.utils.ts +36 -0
  174. package/app/error.vue +125 -0
  175. package/app/features/docs/components/DocsContributeLinks.vue +65 -0
  176. package/app/features/docs/components/DocsMobileToc.vue +104 -0
  177. package/app/features/docs/components/DocsPageContent.vue +188 -0
  178. package/app/features/docs/components/DocsPageNav.vue +57 -0
  179. package/app/features/docs/components/DocsSidebar.vue +129 -0
  180. package/app/features/docs/components/DocsSidebarDropdown.vue +70 -0
  181. package/app/features/docs/components/DocsSidebarItem.vue +169 -0
  182. package/app/features/docs/components/DocsSidebarList.vue +35 -0
  183. package/app/features/docs/components/DocsSidebarTabs.vue +35 -0
  184. package/app/features/docs/components/DocsToc.vue +60 -0
  185. package/app/features/docs/composables/useDocsEntryPath.ts +13 -0
  186. package/app/features/docs/composables/useDocsNavigation.ts +29 -0
  187. package/app/features/docs/composables/useDocsNavigationData.ts +15 -0
  188. package/app/features/docs/composables/useScrollspy.ts +67 -0
  189. package/app/features/docs/docs-navigation.ts +170 -0
  190. package/app/features/search/command-center.ts +156 -0
  191. package/app/features/search/components/SiteCommandCenter.vue +323 -0
  192. package/app/features/search/components/SiteSearchPageHighlight.vue +124 -0
  193. package/app/features/search/useCommandCenter.ts +300 -0
  194. package/app/layouts/blog.vue +15 -0
  195. package/app/layouts/default.vue +12 -0
  196. package/app/layouts/docs.vue +20 -0
  197. package/app/lib/errors.ts +84 -0
  198. package/app/lib/schema-org.ts +38 -0
  199. package/app/lib/utils.ts +7 -0
  200. package/app/pages/blog/[slug].vue +211 -0
  201. package/app/pages/blog/index.vue +106 -0
  202. package/app/pages/docs/[...slug].vue +10 -0
  203. package/app/pages/docs/index.vue +23 -0
  204. package/app/pages/index.vue +140 -0
  205. package/app/plugins/ssr-width.ts +6 -0
  206. package/app/utils/content.ts +56 -0
  207. package/app/utils/index.ts +1 -0
  208. package/components.ts +9 -0
  209. package/content.js +175 -0
  210. package/content.ts +148 -0
  211. package/i18n/i18n.config.ts +10 -0
  212. package/i18n/locales.ts +81 -0
  213. package/i18n/messages/global/banner.ts +8 -0
  214. package/i18n/messages/global/blog.ts +14 -0
  215. package/i18n/messages/global/command.ts +44 -0
  216. package/i18n/messages/global/docs.ts +32 -0
  217. package/i18n/messages/global/errors.ts +36 -0
  218. package/i18n/messages/global/feedback.ts +11 -0
  219. package/i18n/messages/global/index.ts +21 -0
  220. package/i18n/messages/global/nav.ts +18 -0
  221. package/i18n/messages/global/site.ts +4 -0
  222. package/i18n/messages/global/theme.ts +7 -0
  223. package/i18n/messages/index.ts +20 -0
  224. package/i18n/messages/localize.ts +35 -0
  225. package/i18n/messages/source.ts +5 -0
  226. package/i18n/routes.ts +33 -0
  227. package/icon-bundle.ts +141 -0
  228. package/index.d.ts +13 -0
  229. package/modules/feature-routing.ts +32 -0
  230. package/nuxt.config.ts +194 -0
  231. package/package.json +91 -0
  232. package/runtime/markdown/inline-code-highlight.ts +155 -0
  233. package/runtime/server/agent-markdown.ts +21 -0
  234. package/runtime/utils.ts +7 -0
  235. package/server/mcp/tools/get-page.ts +14 -0
  236. package/server/mcp/tools/list-pages.ts +10 -0
  237. package/server/plugins/agent-markdown.ts +6 -0
  238. package/shared/route-slugs.ts +5 -0
  239. package/shared/types/app-config.ts +100 -0
  240. package/tags.ts +204 -0
@@ -0,0 +1,12 @@
1
+ <script setup lang="ts">
2
+ import type { DialogPortalProps } from "reka-ui";
3
+ import { DialogPortal } from "reka-ui";
4
+
5
+ const props = defineProps<DialogPortalProps>();
6
+ </script>
7
+
8
+ <template>
9
+ <DialogPortal data-slot="dialog-portal" v-bind="props">
10
+ <slot />
11
+ </DialogPortal>
12
+ </template>
@@ -0,0 +1,21 @@
1
+ <script setup lang="ts">
2
+ import type { DialogTitleProps } from "reka-ui";
3
+ import type { HTMLAttributes } from "vue";
4
+ import { reactiveOmit } from "@vueuse/core";
5
+ import { DialogTitle } from "reka-ui";
6
+ import { cn } from "#ginko-docs/lib/utils";
7
+
8
+ const props = defineProps<DialogTitleProps & { class?: HTMLAttributes["class"] }>();
9
+
10
+ const delegatedProps = reactiveOmit(props, "class");
11
+ </script>
12
+
13
+ <template>
14
+ <DialogTitle
15
+ data-slot="dialog-title"
16
+ :class="cn('text-lg leading-none font-semibold tracking-tight', props.class)"
17
+ v-bind="delegatedProps"
18
+ >
19
+ <slot />
20
+ </DialogTitle>
21
+ </template>
@@ -0,0 +1,12 @@
1
+ <script setup lang="ts">
2
+ import type { DialogTriggerProps } from "reka-ui";
3
+ import { DialogTrigger } from "reka-ui";
4
+
5
+ const props = defineProps<DialogTriggerProps>();
6
+ </script>
7
+
8
+ <template>
9
+ <DialogTrigger data-slot="dialog-trigger" v-bind="props">
10
+ <slot />
11
+ </DialogTrigger>
12
+ </template>
@@ -0,0 +1,10 @@
1
+ export { default as Dialog } from "./Dialog.vue";
2
+ export { default as DialogClose } from "./DialogClose.vue";
3
+ export { default as DialogContent } from "./DialogContent.vue";
4
+ export { default as DialogDescription } from "./DialogDescription.vue";
5
+ export { default as DialogFooter } from "./DialogFooter.vue";
6
+ export { default as DialogHeader } from "./DialogHeader.vue";
7
+ export { default as DialogOverlay } from "./DialogOverlay.vue";
8
+ export { default as DialogPortal } from "./DialogPortal.vue";
9
+ export { default as DialogTitle } from "./DialogTitle.vue";
10
+ export { default as DialogTrigger } from "./DialogTrigger.vue";
@@ -0,0 +1,15 @@
1
+ <script setup lang="ts">
2
+ import type { DropdownMenuRootEmits, DropdownMenuRootProps } from "reka-ui";
3
+ import { DropdownMenuRoot, useForwardPropsEmits } from "reka-ui";
4
+
5
+ const props = defineProps<DropdownMenuRootProps>();
6
+ const emits = defineEmits<DropdownMenuRootEmits>();
7
+
8
+ const forwarded = useForwardPropsEmits(props, emits);
9
+ </script>
10
+
11
+ <template>
12
+ <DropdownMenuRoot v-slot="slotProps" data-slot="dropdown-menu" v-bind="forwarded">
13
+ <slot v-bind="slotProps" />
14
+ </DropdownMenuRoot>
15
+ </template>
@@ -0,0 +1,36 @@
1
+ <script setup lang="ts">
2
+ import type { DropdownMenuCheckboxItemEmits, DropdownMenuCheckboxItemProps } from "reka-ui";
3
+ import type { HTMLAttributes } from "vue";
4
+ import { reactiveOmit } from "@vueuse/core";
5
+ import { DropdownMenuCheckboxItem, DropdownMenuItemIndicator, useForwardPropsEmits } from "reka-ui";
6
+ import { cn } from "#ginko-docs/lib/utils";
7
+
8
+ const props = defineProps<DropdownMenuCheckboxItemProps & { class?: HTMLAttributes["class"] }>();
9
+ const emits = defineEmits<DropdownMenuCheckboxItemEmits>();
10
+
11
+ const delegatedProps = reactiveOmit(props, "class");
12
+
13
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
14
+ </script>
15
+
16
+ <template>
17
+ <DropdownMenuCheckboxItem
18
+ data-slot="dropdown-menu-checkbox-item"
19
+ v-bind="forwarded"
20
+ :class="
21
+ cn(
22
+ 'relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4',
23
+ props.class,
24
+ )
25
+ "
26
+ >
27
+ <span class="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
28
+ <DropdownMenuItemIndicator>
29
+ <slot name="indicator-icon">
30
+ <Icon name="lucide:check" class="size-4" aria-hidden="true" />
31
+ </slot>
32
+ </DropdownMenuItemIndicator>
33
+ </span>
34
+ <slot />
35
+ </DropdownMenuCheckboxItem>
36
+ </template>
@@ -0,0 +1,40 @@
1
+ <script setup lang="ts">
2
+ import type { DropdownMenuContentEmits, DropdownMenuContentProps } from "reka-ui";
3
+ import type { HTMLAttributes } from "vue";
4
+ import { reactiveOmit } from "@vueuse/core";
5
+ import { DropdownMenuContent, DropdownMenuPortal, useForwardPropsEmits } from "reka-ui";
6
+ import { cn } from "#ginko-docs/lib/utils";
7
+
8
+ defineOptions({
9
+ inheritAttrs: false,
10
+ });
11
+
12
+ const props = withDefaults(
13
+ defineProps<DropdownMenuContentProps & { class?: HTMLAttributes["class"] }>(),
14
+ {
15
+ sideOffset: 4,
16
+ },
17
+ );
18
+ const emits = defineEmits<DropdownMenuContentEmits>();
19
+
20
+ const delegatedProps = reactiveOmit(props, "class");
21
+
22
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
23
+ </script>
24
+
25
+ <template>
26
+ <DropdownMenuPortal>
27
+ <DropdownMenuContent
28
+ data-slot="dropdown-menu-content"
29
+ v-bind="{ ...$attrs, ...forwarded }"
30
+ :class="
31
+ cn(
32
+ 'z-50 max-h-(--reka-dropdown-menu-content-available-height) min-w-[8rem] origin-(--reka-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
33
+ props.class,
34
+ )
35
+ "
36
+ >
37
+ <slot />
38
+ </DropdownMenuContent>
39
+ </DropdownMenuPortal>
40
+ </template>
@@ -0,0 +1,12 @@
1
+ <script setup lang="ts">
2
+ import type { DropdownMenuGroupProps } from "reka-ui";
3
+ import { DropdownMenuGroup } from "reka-ui";
4
+
5
+ const props = defineProps<DropdownMenuGroupProps>();
6
+ </script>
7
+
8
+ <template>
9
+ <DropdownMenuGroup data-slot="dropdown-menu-group" v-bind="props">
10
+ <slot />
11
+ </DropdownMenuGroup>
12
+ </template>
@@ -0,0 +1,41 @@
1
+ <script setup lang="ts">
2
+ import type { DropdownMenuItemProps } from "reka-ui";
3
+ import type { HTMLAttributes } from "vue";
4
+ import { reactiveOmit } from "@vueuse/core";
5
+ import { DropdownMenuItem, useForwardProps } from "reka-ui";
6
+ import { cn } from "#ginko-docs/lib/utils";
7
+
8
+ const props = withDefaults(
9
+ defineProps<
10
+ DropdownMenuItemProps & {
11
+ class?: HTMLAttributes["class"];
12
+ inset?: boolean;
13
+ variant?: "default" | "destructive";
14
+ }
15
+ >(),
16
+ {
17
+ variant: "default",
18
+ },
19
+ );
20
+
21
+ const delegatedProps = reactiveOmit(props, "inset", "variant", "class");
22
+
23
+ const forwardedProps = useForwardProps(delegatedProps);
24
+ </script>
25
+
26
+ <template>
27
+ <DropdownMenuItem
28
+ data-slot="dropdown-menu-item"
29
+ :data-inset="inset ? '' : undefined"
30
+ :data-variant="variant"
31
+ v-bind="forwardedProps"
32
+ :class="
33
+ cn(
34
+ 'relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4 [&_svg:not([class*=\'text-\'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:!text-destructive',
35
+ props.class,
36
+ )
37
+ "
38
+ >
39
+ <slot />
40
+ </DropdownMenuItem>
41
+ </template>
@@ -0,0 +1,25 @@
1
+ <script setup lang="ts">
2
+ import type { DropdownMenuLabelProps } from "reka-ui";
3
+ import type { HTMLAttributes } from "vue";
4
+ import { reactiveOmit } from "@vueuse/core";
5
+ import { DropdownMenuLabel, useForwardProps } from "reka-ui";
6
+ import { cn } from "#ginko-docs/lib/utils";
7
+
8
+ const props = defineProps<
9
+ DropdownMenuLabelProps & { class?: HTMLAttributes["class"]; inset?: boolean }
10
+ >();
11
+
12
+ const delegatedProps = reactiveOmit(props, "class", "inset");
13
+ const forwardedProps = useForwardProps(delegatedProps);
14
+ </script>
15
+
16
+ <template>
17
+ <DropdownMenuLabel
18
+ data-slot="dropdown-menu-label"
19
+ :data-inset="inset ? '' : undefined"
20
+ v-bind="forwardedProps"
21
+ :class="cn('px-2 py-1.5 text-sm font-medium data-[inset]:pl-8', props.class)"
22
+ >
23
+ <slot />
24
+ </DropdownMenuLabel>
25
+ </template>
@@ -0,0 +1,15 @@
1
+ <script setup lang="ts">
2
+ import type { DropdownMenuRadioGroupEmits, DropdownMenuRadioGroupProps } from "reka-ui";
3
+ import { DropdownMenuRadioGroup, useForwardPropsEmits } from "reka-ui";
4
+
5
+ const props = defineProps<DropdownMenuRadioGroupProps>();
6
+ const emits = defineEmits<DropdownMenuRadioGroupEmits>();
7
+
8
+ const forwarded = useForwardPropsEmits(props, emits);
9
+ </script>
10
+
11
+ <template>
12
+ <DropdownMenuRadioGroup data-slot="dropdown-menu-radio-group" v-bind="forwarded">
13
+ <slot />
14
+ </DropdownMenuRadioGroup>
15
+ </template>
@@ -0,0 +1,37 @@
1
+ <script setup lang="ts">
2
+ import type { DropdownMenuRadioItemEmits, DropdownMenuRadioItemProps } from "reka-ui";
3
+ import type { HTMLAttributes } from "vue";
4
+ import { reactiveOmit } from "@vueuse/core";
5
+ import { DropdownMenuItemIndicator, DropdownMenuRadioItem, useForwardPropsEmits } from "reka-ui";
6
+ import { cn } from "#ginko-docs/lib/utils";
7
+
8
+ const props = defineProps<DropdownMenuRadioItemProps & { class?: HTMLAttributes["class"] }>();
9
+
10
+ const emits = defineEmits<DropdownMenuRadioItemEmits>();
11
+
12
+ const delegatedProps = reactiveOmit(props, "class");
13
+
14
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
15
+ </script>
16
+
17
+ <template>
18
+ <DropdownMenuRadioItem
19
+ data-slot="dropdown-menu-radio-item"
20
+ v-bind="forwarded"
21
+ :class="
22
+ cn(
23
+ 'relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4',
24
+ props.class,
25
+ )
26
+ "
27
+ >
28
+ <span class="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
29
+ <DropdownMenuItemIndicator>
30
+ <slot name="indicator-icon">
31
+ <Icon name="lucide:circle" class="size-2 fill-current" aria-hidden="true" />
32
+ </slot>
33
+ </DropdownMenuItemIndicator>
34
+ </span>
35
+ <slot />
36
+ </DropdownMenuRadioItem>
37
+ </template>
@@ -0,0 +1,23 @@
1
+ <script setup lang="ts">
2
+ import type { DropdownMenuSeparatorProps } from "reka-ui";
3
+ import type { HTMLAttributes } from "vue";
4
+ import { reactiveOmit } from "@vueuse/core";
5
+ import { DropdownMenuSeparator } from "reka-ui";
6
+ import { cn } from "#ginko-docs/lib/utils";
7
+
8
+ const props = defineProps<
9
+ DropdownMenuSeparatorProps & {
10
+ class?: HTMLAttributes["class"];
11
+ }
12
+ >();
13
+
14
+ const delegatedProps = reactiveOmit(props, "class");
15
+ </script>
16
+
17
+ <template>
18
+ <DropdownMenuSeparator
19
+ data-slot="dropdown-menu-separator"
20
+ v-bind="delegatedProps"
21
+ :class="cn('-mx-1 my-1 h-px bg-border', props.class)"
22
+ />
23
+ </template>
@@ -0,0 +1,17 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from "vue";
3
+ import { cn } from "#ginko-docs/lib/utils";
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes["class"];
7
+ }>();
8
+ </script>
9
+
10
+ <template>
11
+ <span
12
+ data-slot="dropdown-menu-shortcut"
13
+ :class="cn('ml-auto text-xs tracking-widest text-muted-foreground', props.class)"
14
+ >
15
+ <slot />
16
+ </span>
17
+ </template>
@@ -0,0 +1,15 @@
1
+ <script setup lang="ts">
2
+ import type { DropdownMenuSubEmits, DropdownMenuSubProps } from "reka-ui";
3
+ import { DropdownMenuSub, useForwardPropsEmits } from "reka-ui";
4
+
5
+ const props = defineProps<DropdownMenuSubProps>();
6
+ const emits = defineEmits<DropdownMenuSubEmits>();
7
+
8
+ const forwarded = useForwardPropsEmits(props, emits);
9
+ </script>
10
+
11
+ <template>
12
+ <DropdownMenuSub v-slot="slotProps" data-slot="dropdown-menu-sub" v-bind="forwarded">
13
+ <slot v-bind="slotProps" />
14
+ </DropdownMenuSub>
15
+ </template>
@@ -0,0 +1,29 @@
1
+ <script setup lang="ts">
2
+ import type { DropdownMenuSubContentEmits, DropdownMenuSubContentProps } from "reka-ui";
3
+ import type { HTMLAttributes } from "vue";
4
+ import { reactiveOmit } from "@vueuse/core";
5
+ import { DropdownMenuSubContent, useForwardPropsEmits } from "reka-ui";
6
+ import { cn } from "#ginko-docs/lib/utils";
7
+
8
+ const props = defineProps<DropdownMenuSubContentProps & { class?: HTMLAttributes["class"] }>();
9
+ const emits = defineEmits<DropdownMenuSubContentEmits>();
10
+
11
+ const delegatedProps = reactiveOmit(props, "class");
12
+
13
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
14
+ </script>
15
+
16
+ <template>
17
+ <DropdownMenuSubContent
18
+ data-slot="dropdown-menu-sub-content"
19
+ v-bind="forwarded"
20
+ :class="
21
+ cn(
22
+ 'z-50 min-w-[8rem] origin-(--reka-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
23
+ props.class,
24
+ )
25
+ "
26
+ >
27
+ <slot />
28
+ </DropdownMenuSubContent>
29
+ </template>
@@ -0,0 +1,31 @@
1
+ <script setup lang="ts">
2
+ import type { DropdownMenuSubTriggerProps } from "reka-ui";
3
+ import type { HTMLAttributes } from "vue";
4
+ import { reactiveOmit } from "@vueuse/core";
5
+ import { DropdownMenuSubTrigger, useForwardProps } from "reka-ui";
6
+ import { cn } from "#ginko-docs/lib/utils";
7
+
8
+ const props = defineProps<
9
+ DropdownMenuSubTriggerProps & { class?: HTMLAttributes["class"]; inset?: boolean }
10
+ >();
11
+
12
+ const delegatedProps = reactiveOmit(props, "class", "inset");
13
+ const forwardedProps = useForwardProps(delegatedProps);
14
+ </script>
15
+
16
+ <template>
17
+ <DropdownMenuSubTrigger
18
+ data-slot="dropdown-menu-sub-trigger"
19
+ v-bind="forwardedProps"
20
+ :data-inset="inset ? '' : undefined"
21
+ :class="
22
+ cn(
23
+ 'relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4 [&_svg:not([class*=\'text-\'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:!text-destructive',
24
+ props.class,
25
+ )
26
+ "
27
+ >
28
+ <slot />
29
+ <Icon name="lucide:chevron-right" class="ml-auto size-4" aria-hidden="true" />
30
+ </DropdownMenuSubTrigger>
31
+ </template>
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ import type { DropdownMenuTriggerProps } from "reka-ui";
3
+ import { DropdownMenuTrigger, useForwardProps } from "reka-ui";
4
+
5
+ const props = defineProps<DropdownMenuTriggerProps>();
6
+
7
+ const forwardedProps = useForwardProps(props);
8
+ </script>
9
+
10
+ <template>
11
+ <DropdownMenuTrigger data-slot="dropdown-menu-trigger" v-bind="forwardedProps">
12
+ <slot />
13
+ </DropdownMenuTrigger>
14
+ </template>
@@ -0,0 +1,16 @@
1
+ export { default as DropdownMenu } from "./DropdownMenu.vue";
2
+
3
+ export { default as DropdownMenuCheckboxItem } from "./DropdownMenuCheckboxItem.vue";
4
+ export { default as DropdownMenuContent } from "./DropdownMenuContent.vue";
5
+ export { default as DropdownMenuGroup } from "./DropdownMenuGroup.vue";
6
+ export { default as DropdownMenuItem } from "./DropdownMenuItem.vue";
7
+ export { default as DropdownMenuLabel } from "./DropdownMenuLabel.vue";
8
+ export { default as DropdownMenuRadioGroup } from "./DropdownMenuRadioGroup.vue";
9
+ export { default as DropdownMenuRadioItem } from "./DropdownMenuRadioItem.vue";
10
+ export { default as DropdownMenuSeparator } from "./DropdownMenuSeparator.vue";
11
+ export { default as DropdownMenuShortcut } from "./DropdownMenuShortcut.vue";
12
+ export { default as DropdownMenuSub } from "./DropdownMenuSub.vue";
13
+ export { default as DropdownMenuSubContent } from "./DropdownMenuSubContent.vue";
14
+ export { default as DropdownMenuSubTrigger } from "./DropdownMenuSubTrigger.vue";
15
+ export { default as DropdownMenuTrigger } from "./DropdownMenuTrigger.vue";
16
+ export { DropdownMenuPortal } from "reka-ui";
@@ -0,0 +1,23 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from "vue";
3
+ import { cn } from "#ginko-docs/lib/utils";
4
+
5
+ const model = defineModel<string | number>();
6
+
7
+ const props = defineProps<{
8
+ class?: HTMLAttributes["class"];
9
+ }>();
10
+ </script>
11
+
12
+ <template>
13
+ <input
14
+ v-model="model"
15
+ data-slot="input"
16
+ :class="
17
+ cn(
18
+ 'min-h-11 w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground shadow-xs transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40',
19
+ props.class,
20
+ )
21
+ "
22
+ />
23
+ </template>
@@ -0,0 +1 @@
1
+ export { default as Input } from "./Input.vue";
@@ -0,0 +1,23 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from "vue";
3
+ import { cn } from "#ginko-docs/lib/utils";
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes["class"];
7
+ }>();
8
+ </script>
9
+
10
+ <template>
11
+ <kbd
12
+ :class="
13
+ cn(
14
+ 'pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none',
15
+ '[&_svg:not([class*=\'size-\'])]:size-3',
16
+ '[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10',
17
+ props.class,
18
+ )
19
+ "
20
+ >
21
+ <slot />
22
+ </kbd>
23
+ </template>
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from "vue";
3
+ import { cn } from "#ginko-docs/lib/utils";
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes["class"];
7
+ }>();
8
+ </script>
9
+
10
+ <template>
11
+ <kbd data-slot="kbd-group" :class="cn('inline-flex items-center gap-1', props.class)">
12
+ <slot />
13
+ </kbd>
14
+ </template>
@@ -0,0 +1,22 @@
1
+ import type { VariantProps } from "class-variance-authority";
2
+ import { cva } from "class-variance-authority";
3
+
4
+ export { default as Kbd } from "./Kbd.vue";
5
+ export { default as KbdGroup } from "./KbdGroup.vue";
6
+
7
+ export const kbdVariants = cva(
8
+ "bg-muted text-muted-foreground ring-1 ring-border pointer-events-none inline-flex w-fit items-center justify-center gap-1 rounded-sm font-sans font-medium select-none [&_svg:not([class*='size-'])]:size-3 [[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",
9
+ {
10
+ variants: {
11
+ size: {
12
+ sm: "h-5 min-w-5 px-1 text-xs",
13
+ md: "h-7 min-w-7 px-1.5 text-sm",
14
+ },
15
+ },
16
+ defaultVariants: {
17
+ size: "sm",
18
+ },
19
+ },
20
+ );
21
+
22
+ export type KbdVariants = VariantProps<typeof kbdVariants>;
@@ -0,0 +1,14 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from "vue";
3
+ import { cn } from "#ginko-docs/lib/utils";
4
+
5
+ const props = defineProps<{
6
+ class?: HTMLAttributes["class"];
7
+ }>();
8
+ </script>
9
+
10
+ <template>
11
+ <label data-slot="label" :class="cn('text-sm font-medium text-foreground', props.class)">
12
+ <slot />
13
+ </label>
14
+ </template>
@@ -0,0 +1 @@
1
+ export { default as Label } from "./Label.vue";
@@ -0,0 +1,39 @@
1
+ <script setup lang="ts">
2
+ import type { ScrollAreaRootProps } from "reka-ui";
3
+ import type { HTMLAttributes } from "vue";
4
+ import { reactiveOmit } from "@vueuse/core";
5
+ import { ScrollAreaCorner, ScrollAreaRoot, ScrollAreaViewport } from "reka-ui";
6
+ import { cn } from "#ginko-docs/lib/utils";
7
+ import ScrollBar from "./ScrollBar.vue";
8
+
9
+ const props = defineProps<
10
+ ScrollAreaRootProps & {
11
+ class?: HTMLAttributes["class"];
12
+ viewportClass?: HTMLAttributes["class"];
13
+ }
14
+ >();
15
+
16
+ const delegatedProps = reactiveOmit(props, "class", "viewportClass");
17
+ </script>
18
+
19
+ <template>
20
+ <ScrollAreaRoot
21
+ data-slot="scroll-area"
22
+ v-bind="delegatedProps"
23
+ :class="cn('relative', props.class)"
24
+ >
25
+ <ScrollAreaViewport
26
+ data-slot="scroll-area-viewport"
27
+ :class="
28
+ cn(
29
+ 'size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1',
30
+ props.viewportClass,
31
+ )
32
+ "
33
+ >
34
+ <slot />
35
+ </ScrollAreaViewport>
36
+ <ScrollBar />
37
+ <ScrollAreaCorner />
38
+ </ScrollAreaRoot>
39
+ </template>
@@ -0,0 +1,33 @@
1
+ <script setup lang="ts">
2
+ import type { ScrollAreaScrollbarProps } from "reka-ui";
3
+ import type { HTMLAttributes } from "vue";
4
+ import { reactiveOmit } from "@vueuse/core";
5
+ import { ScrollAreaScrollbar, ScrollAreaThumb } from "reka-ui";
6
+ import { cn } from "#ginko-docs/lib/utils";
7
+
8
+ const props = withDefaults(
9
+ defineProps<ScrollAreaScrollbarProps & { class?: HTMLAttributes["class"] }>(),
10
+ {
11
+ orientation: "vertical",
12
+ },
13
+ );
14
+
15
+ const delegatedProps = reactiveOmit(props, "class");
16
+ </script>
17
+
18
+ <template>
19
+ <ScrollAreaScrollbar
20
+ data-slot="scroll-area-scrollbar"
21
+ v-bind="delegatedProps"
22
+ :class="
23
+ cn(
24
+ 'flex touch-none p-px transition-colors select-none',
25
+ orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent',
26
+ orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent',
27
+ props.class,
28
+ )
29
+ "
30
+ >
31
+ <ScrollAreaThumb data-slot="scroll-area-thumb" class="relative flex-1 rounded-full bg-border" />
32
+ </ScrollAreaScrollbar>
33
+ </template>
@@ -0,0 +1,2 @@
1
+ export { default as ScrollArea } from "./ScrollArea.vue";
2
+ export { default as ScrollBar } from "./ScrollBar.vue";