@lupinum/ginko-docs 0.2.2 → 0.2.3

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 (196) hide show
  1. package/README.md +130 -73
  2. package/app/app.config.ts +14 -12
  3. package/app/app.vue +2 -2
  4. package/app/assets/css/prose.css +2203 -149
  5. package/app/assets/css/tailwind.css +60 -38
  6. package/app/assets/css/theme-palettes.css +309 -0
  7. package/app/components/content/DocumentPageShell.vue +1 -1
  8. package/app/components/content/Feedback.vue +12 -11
  9. package/app/components/content/ImageZoomDialog.vue +84 -0
  10. package/app/components/content/PageMarkdownCopy.vue +2 -0
  11. package/app/components/content/imageZoom.ts +25 -0
  12. package/app/components/mdc/MdcAccordion.vue +6 -3
  13. package/app/components/mdc/MdcAccordionItem.vue +7 -16
  14. package/app/components/mdc/MdcApi.vue +159 -0
  15. package/app/components/mdc/MdcAside.vue +6 -10
  16. package/app/components/mdc/MdcCallout.vue +9 -10
  17. package/app/components/mdc/MdcCard.vue +36 -47
  18. package/app/components/mdc/MdcCards.vue +30 -0
  19. package/app/components/mdc/MdcCodeGroup.vue +4 -0
  20. package/app/components/mdc/MdcCodeTree.vue +234 -0
  21. package/app/components/mdc/MdcCollapse.vue +61 -0
  22. package/app/components/mdc/MdcError.vue +8 -1
  23. package/app/components/mdc/MdcExcerpt.vue +26 -0
  24. package/app/components/mdc/MdcFigure.vue +54 -20
  25. package/app/components/mdc/MdcFiles.vue +120 -0
  26. package/app/components/mdc/MdcIdea.vue +2 -1
  27. package/app/components/mdc/MdcInfo.vue +2 -1
  28. package/app/components/mdc/MdcInlineToc.vue +51 -0
  29. package/app/components/{ui/dialog/DialogHeader.vue → mdc/MdcKbd.vue} +2 -4
  30. package/app/components/mdc/MdcNote.vue +2 -1
  31. package/app/components/mdc/MdcQuiz.vue +43 -83
  32. package/app/components/mdc/MdcQuizQuestion.vue +104 -109
  33. package/app/components/mdc/MdcReadMore.vue +57 -77
  34. package/app/components/mdc/MdcSteps.vue +45 -11
  35. package/app/components/mdc/MdcSuccess.vue +8 -1
  36. package/app/components/mdc/MdcTabs.vue +44 -26
  37. package/app/components/mdc/MdcTimeline.vue +4 -1
  38. package/app/components/mdc/MdcTimelineItem.vue +18 -27
  39. package/app/components/mdc/MdcWarning.vue +8 -1
  40. package/app/components/mdc/api.utils.ts +132 -0
  41. package/app/components/mdc/code-tree.utils.ts +22 -0
  42. package/app/components/mdc/quiz.utils.ts +38 -0
  43. package/app/components/prose/ProseBlockquote.vue +17 -1
  44. package/app/components/prose/ProseH1.vue +1 -1
  45. package/app/components/prose/ProseH2.vue +7 -2
  46. package/app/components/prose/ProseH3.vue +7 -2
  47. package/app/components/prose/ProseH4.vue +17 -2
  48. package/app/components/{ui/kbd/KbdGroup.vue → prose/ProseH5.vue} +4 -3
  49. package/app/components/{ui/card/CardTitle.vue → prose/ProseH6.vue} +4 -3
  50. package/app/components/prose/ProseImg.vue +19 -112
  51. package/app/components/prose/ProsePre.vue +63 -100
  52. package/app/components/prose/ProseTable.vue +5 -3
  53. package/app/components/site/ModeToggle.vue +12 -3
  54. package/app/components/site/SiteBanner.vue +43 -2
  55. package/app/components/site/SiteFooter.vue +3 -5
  56. package/app/components/site/SiteHeader.vue +255 -132
  57. package/app/components/site/SiteHeroCode.vue +164 -0
  58. package/app/components/site/SiteLocaleSwitcher.vue +22 -4
  59. package/app/components/ui/badge/Badge.vue +1 -1
  60. package/app/components/ui/button/Button.vue +1 -1
  61. package/app/components/ui/collapsible/CollapsibleContent.vue +1 -1
  62. package/app/components/ui/dropdown-menu/DropdownMenuContent.vue +14 -4
  63. package/app/components/ui/dropdown-menu/DropdownMenuItem.vue +1 -1
  64. package/app/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +1 -1
  65. package/app/components/ui/dropdown-menu/DropdownMenuSeparator.vue +1 -1
  66. package/app/components/ui/dropdown-menu/index.ts +0 -9
  67. package/app/components/ui/kbd/Kbd.vue +1 -1
  68. package/app/components/ui/kbd/index.ts +0 -1
  69. package/app/components/ui/scroll-area/ScrollArea.vue +1 -1
  70. package/app/components/ui/scroll-area/ScrollBar.vue +1 -1
  71. package/app/components/ui/separator/Separator.vue +1 -1
  72. package/app/components/ui/sheet/SheetContent.vue +1 -1
  73. package/app/components/ui/sheet/SheetDescription.vue +1 -1
  74. package/app/components/ui/sheet/SheetOverlay.vue +1 -1
  75. package/app/components/ui/sheet/SheetTitle.vue +1 -1
  76. package/app/components/ui/sheet/index.ts +0 -3
  77. package/app/components/ui/tabs/Tabs.vue +1 -1
  78. package/app/components/ui/tabs/TabsList.vue +1 -1
  79. package/app/components/ui/tabs/TabsTrigger.vue +1 -1
  80. package/app/components/ui/tabs/index.ts +0 -1
  81. package/app/composables/site-navigation.utils.ts +29 -11
  82. package/app/composables/useContentRouteAlternates.ts +13 -21
  83. package/app/composables/useLocalizedRouteSwitch.ts +1 -1
  84. package/app/composables/useMetaKey.ts +18 -0
  85. package/app/composables/useProseAppearance.ts +24 -0
  86. package/app/composables/useSiteNavigation.ts +3 -18
  87. package/app/config/site.utils.ts +1 -1
  88. package/app/error.vue +1 -5
  89. package/app/features/docs/components/DocsBreadcrumb.vue +37 -0
  90. package/app/features/docs/components/DocsContributeLinks.vue +28 -18
  91. package/app/features/docs/components/DocsMobileToc.vue +12 -8
  92. package/app/features/docs/components/DocsPageContent.vue +84 -47
  93. package/app/features/docs/components/DocsPageNav.vue +1 -1
  94. package/app/features/docs/components/DocsSidebar.vue +30 -20
  95. package/app/features/docs/components/DocsSidebarItem.vue +53 -100
  96. package/app/features/docs/components/DocsSidebarRow.vue +27 -0
  97. package/app/features/docs/components/DocsSidebarTabs.vue +46 -22
  98. package/app/features/docs/components/DocsToc.vue +80 -34
  99. package/app/features/docs/composables/useDocsNavigation.ts +2 -2
  100. package/app/features/docs/composables/useDocsNavigationData.ts +4 -1
  101. package/app/features/docs/composables/useRevealActive.ts +58 -0
  102. package/app/features/docs/composables/useScrollspy.ts +87 -19
  103. package/app/features/docs/docs-navigation.ts +17 -30
  104. package/app/features/docs/toc-context.ts +6 -0
  105. package/app/features/search/command-center.ts +11 -90
  106. package/app/features/search/components/SiteCommandCenter.vue +58 -38
  107. package/app/features/search/useCommandCenter.ts +46 -46
  108. package/app/layouts/docs.vue +1 -1
  109. package/app/lib/errors.ts +2 -49
  110. package/app/pages/blog/[slug].vue +16 -8
  111. package/app/pages/blog/index.vue +26 -13
  112. package/app/pages/docs/index.vue +10 -14
  113. package/app/pages/index.vue +174 -59
  114. package/app/plugins/ginko-docs-theme.ts +12 -0
  115. package/app/utils/content.ts +11 -0
  116. package/app/utils/file-icons.ts +90 -0
  117. package/app/utils/index.ts +7 -1
  118. package/app/utils/repository.ts +20 -0
  119. package/content.js +23 -26
  120. package/content.ts +30 -28
  121. package/i18n/messages/global/blog.ts +4 -0
  122. package/i18n/messages/global/command.ts +6 -2
  123. package/i18n/messages/global/docs.ts +3 -0
  124. package/i18n/messages/global/nav.ts +6 -2
  125. package/i18n/messages/index.ts +3 -3
  126. package/icon-bundle.ts +5 -0
  127. package/index.d.ts +7 -1
  128. package/nuxt.config.ts +2 -2
  129. package/package.json +9 -6
  130. package/runtime/server/agent-markdown.ts +0 -2
  131. package/shared/theme-palettes.ts +37 -0
  132. package/shared/types/app-config.ts +63 -6
  133. package/tags.ts +47 -59
  134. package/app/components/mdc/MdcAlert.vue +0 -34
  135. package/app/components/mdc/MdcCardGroup.vue +0 -47
  136. package/app/components/mdc/MdcDocImg.vue +0 -25
  137. package/app/components/mdc/MdcField.vue +0 -62
  138. package/app/components/mdc/MdcFieldGroup.vue +0 -18
  139. package/app/components/mdc/MdcPassage.vue +0 -32
  140. package/app/components/mdc/MdcQuizOption.vue +0 -91
  141. package/app/components/mdc/MdcReadMoreGroup.vue +0 -18
  142. package/app/components/mdc/MdcShortcut.vue +0 -46
  143. package/app/components/mdc/MdcStep.vue +0 -42
  144. package/app/components/ui/accordion/Accordion.vue +0 -15
  145. package/app/components/ui/accordion/AccordionContent.vue +0 -23
  146. package/app/components/ui/accordion/AccordionItem.vue +0 -24
  147. package/app/components/ui/accordion/AccordionTrigger.vue +0 -35
  148. package/app/components/ui/accordion/index.ts +0 -4
  149. package/app/components/ui/alert/Alert.vue +0 -21
  150. package/app/components/ui/alert/AlertDescription.vue +0 -22
  151. package/app/components/ui/alert/AlertTitle.vue +0 -22
  152. package/app/components/ui/alert/index.ts +0 -34
  153. package/app/components/ui/card/Card.vue +0 -16
  154. package/app/components/ui/card/CardAction.vue +0 -17
  155. package/app/components/ui/card/CardContent.vue +0 -14
  156. package/app/components/ui/card/CardDescription.vue +0 -14
  157. package/app/components/ui/card/CardFooter.vue +0 -14
  158. package/app/components/ui/card/CardHeader.vue +0 -22
  159. package/app/components/ui/card/card-variants.ts +0 -15
  160. package/app/components/ui/card/index.ts +0 -8
  161. package/app/components/ui/checkbox/Checkbox.vue +0 -35
  162. package/app/components/ui/checkbox/index.ts +0 -1
  163. package/app/components/ui/dialog/Dialog.vue +0 -15
  164. package/app/components/ui/dialog/DialogClose.vue +0 -12
  165. package/app/components/ui/dialog/DialogContent.vue +0 -69
  166. package/app/components/ui/dialog/DialogDescription.vue +0 -21
  167. package/app/components/ui/dialog/DialogFooter.vue +0 -15
  168. package/app/components/ui/dialog/DialogOverlay.vue +0 -26
  169. package/app/components/ui/dialog/DialogPortal.vue +0 -12
  170. package/app/components/ui/dialog/DialogTitle.vue +0 -21
  171. package/app/components/ui/dialog/DialogTrigger.vue +0 -12
  172. package/app/components/ui/dialog/index.ts +0 -10
  173. package/app/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +0 -36
  174. package/app/components/ui/dropdown-menu/DropdownMenuGroup.vue +0 -12
  175. package/app/components/ui/dropdown-menu/DropdownMenuLabel.vue +0 -25
  176. package/app/components/ui/dropdown-menu/DropdownMenuShortcut.vue +0 -17
  177. package/app/components/ui/dropdown-menu/DropdownMenuSub.vue +0 -15
  178. package/app/components/ui/dropdown-menu/DropdownMenuSubContent.vue +0 -29
  179. package/app/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +0 -31
  180. package/app/components/ui/input/Input.vue +0 -23
  181. package/app/components/ui/input/index.ts +0 -1
  182. package/app/components/ui/label/Label.vue +0 -14
  183. package/app/components/ui/label/index.ts +0 -1
  184. package/app/components/ui/sheet/SheetClose.vue +0 -12
  185. package/app/components/ui/sheet/SheetFooter.vue +0 -12
  186. package/app/components/ui/sheet/SheetHeader.vue +0 -12
  187. package/app/components/ui/switch/Switch.vue +0 -39
  188. package/app/components/ui/switch/index.ts +0 -1
  189. package/app/components/ui/tabs/TabsContent.vue +0 -21
  190. package/app/components/ui/textarea/Textarea.vue +0 -31
  191. package/app/components/ui/textarea/index.ts +0 -1
  192. package/app/features/docs/composables/useDocsEntryPath.ts +0 -13
  193. package/app/lib/utils.ts +0 -7
  194. package/i18n/messages/source.ts +0 -5
  195. package/runtime/markdown/inline-code-highlight.ts +0 -155
  196. package/runtime/utils.ts +0 -7
@@ -1,8 +0,0 @@
1
- export { cardVariants, type CardVariants } from "./card-variants";
2
- export { default as Card } from "./Card.vue";
3
- export { default as CardAction } from "./CardAction.vue";
4
- export { default as CardContent } from "./CardContent.vue";
5
- export { default as CardDescription } from "./CardDescription.vue";
6
- export { default as CardFooter } from "./CardFooter.vue";
7
- export { default as CardHeader } from "./CardHeader.vue";
8
- export { default as CardTitle } from "./CardTitle.vue";
@@ -1,35 +0,0 @@
1
- <script setup lang="ts">
2
- import type { CheckboxRootEmits, CheckboxRootProps } from "reka-ui";
3
- import type { HTMLAttributes } from "vue";
4
- import { reactiveOmit } from "@vueuse/core";
5
- import { CheckboxIndicator, CheckboxRoot, useForwardPropsEmits } from "reka-ui";
6
- import { cn } from "#ginko-docs/lib/utils";
7
-
8
- const props = defineProps<CheckboxRootProps & { class?: HTMLAttributes["class"] }>();
9
- const emits = defineEmits<CheckboxRootEmits>();
10
-
11
- const delegatedProps = reactiveOmit(props, "class");
12
- const forwarded = useForwardPropsEmits(delegatedProps, emits);
13
- </script>
14
-
15
- <template>
16
- <CheckboxRoot
17
- data-slot="checkbox"
18
- v-bind="forwarded"
19
- :class="
20
- cn(
21
- 'peer size-4 shrink-0 rounded-[4px] border border-input bg-background shadow-xs transition-colors outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40',
22
- props.class,
23
- )
24
- "
25
- >
26
- <CheckboxIndicator
27
- data-slot="checkbox-indicator"
28
- class="flex items-center justify-center text-current transition-none"
29
- >
30
- <slot>
31
- <Icon name="lucide:check" class="size-3.5" aria-hidden="true" />
32
- </slot>
33
- </CheckboxIndicator>
34
- </CheckboxRoot>
35
- </template>
@@ -1 +0,0 @@
1
- export { default as Checkbox } from "./Checkbox.vue";
@@ -1,15 +0,0 @@
1
- <script setup lang="ts">
2
- import type { DialogRootEmits, DialogRootProps } from "reka-ui";
3
- import { DialogRoot, useForwardPropsEmits } from "reka-ui";
4
-
5
- const props = defineProps<DialogRootProps>();
6
- const emits = defineEmits<DialogRootEmits>();
7
-
8
- const forwarded = useForwardPropsEmits(props, emits);
9
- </script>
10
-
11
- <template>
12
- <DialogRoot v-slot="slotProps" data-slot="dialog" v-bind="forwarded">
13
- <slot v-bind="slotProps" />
14
- </DialogRoot>
15
- </template>
@@ -1,12 +0,0 @@
1
- <script setup lang="ts">
2
- import type { DialogCloseProps } from "reka-ui";
3
- import { DialogClose } from "reka-ui";
4
-
5
- const props = defineProps<DialogCloseProps>();
6
- </script>
7
-
8
- <template>
9
- <DialogClose data-slot="dialog-close" v-bind="props">
10
- <slot />
11
- </DialogClose>
12
- </template>
@@ -1,69 +0,0 @@
1
- <script setup lang="ts">
2
- import { cva, type VariantProps } from "class-variance-authority";
3
- import type { DialogContentEmits, DialogContentProps } from "reka-ui";
4
- import type { HTMLAttributes } from "vue";
5
- import { reactiveOmit } from "@vueuse/core";
6
- import { DialogClose, DialogContent, useForwardPropsEmits } from "reka-ui";
7
- import { cn } from "#ginko-docs/lib/utils";
8
- import DialogOverlay from "./DialogOverlay.vue";
9
- import DialogPortal from "./DialogPortal.vue";
10
-
11
- const dialogContentVariants = cva(
12
- "fixed top-[50%] left-[50%] z-50 grid translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border border-border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
13
- {
14
- variants: {
15
- size: {
16
- sm: "w-[min(calc(100vw-2rem),24rem)]",
17
- default: "w-[min(calc(100vw-2rem),32rem)]",
18
- lg: "w-[min(calc(100vw-2rem),48rem)]",
19
- xl: "w-[min(calc(100vw-2rem),64rem)]",
20
- full: "w-[calc(100vw-2rem)]",
21
- },
22
- },
23
- defaultVariants: {
24
- size: "default",
25
- },
26
- },
27
- );
28
-
29
- type DialogContentVariants = VariantProps<typeof dialogContentVariants>;
30
-
31
- interface Props extends DialogContentProps {
32
- class?: HTMLAttributes["class"];
33
- showClose?: boolean;
34
- size?: DialogContentVariants["size"];
35
- }
36
-
37
- defineOptions({
38
- inheritAttrs: false,
39
- });
40
-
41
- const props = withDefaults(defineProps<Props>(), {
42
- showClose: true,
43
- });
44
- const emits = defineEmits<DialogContentEmits>();
45
-
46
- const delegatedProps = reactiveOmit(props, "class", "showClose", "size");
47
- const forwarded = useForwardPropsEmits(delegatedProps, emits);
48
- </script>
49
-
50
- <template>
51
- <DialogPortal>
52
- <DialogOverlay />
53
- <DialogContent
54
- data-slot="dialog-content"
55
- :class="cn(dialogContentVariants({ size: props.size }), props.class)"
56
- v-bind="{ ...$attrs, ...forwarded }"
57
- >
58
- <slot />
59
-
60
- <DialogClose
61
- v-if="showClose"
62
- class="absolute top-4 right-4 inline-flex size-8 items-center justify-center rounded-md text-muted-foreground transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none"
63
- >
64
- <Icon name="lucide:x" class="size-4" aria-hidden="true" />
65
- <span class="sr-only">Close</span>
66
- </DialogClose>
67
- </DialogContent>
68
- </DialogPortal>
69
- </template>
@@ -1,21 +0,0 @@
1
- <script setup lang="ts">
2
- import type { DialogDescriptionProps } from "reka-ui";
3
- import type { HTMLAttributes } from "vue";
4
- import { reactiveOmit } from "@vueuse/core";
5
- import { DialogDescription } from "reka-ui";
6
- import { cn } from "#ginko-docs/lib/utils";
7
-
8
- const props = defineProps<DialogDescriptionProps & { class?: HTMLAttributes["class"] }>();
9
-
10
- const delegatedProps = reactiveOmit(props, "class");
11
- </script>
12
-
13
- <template>
14
- <DialogDescription
15
- data-slot="dialog-description"
16
- :class="cn('text-sm text-muted-foreground', props.class)"
17
- v-bind="delegatedProps"
18
- >
19
- <slot />
20
- </DialogDescription>
21
- </template>
@@ -1,15 +0,0 @@
1
- <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue";
3
- import { cn } from "#ginko-docs/lib/utils";
4
-
5
- const props = defineProps<{ class?: HTMLAttributes["class"] }>();
6
- </script>
7
-
8
- <template>
9
- <div
10
- data-slot="dialog-footer"
11
- :class="cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', props.class)"
12
- >
13
- <slot />
14
- </div>
15
- </template>
@@ -1,26 +0,0 @@
1
- <script setup lang="ts">
2
- import type { DialogOverlayProps } from "reka-ui";
3
- import type { HTMLAttributes } from "vue";
4
- import { reactiveOmit } from "@vueuse/core";
5
- import { DialogOverlay } from "reka-ui";
6
- import { cn } from "#ginko-docs/lib/utils";
7
-
8
- const props = defineProps<DialogOverlayProps & { class?: HTMLAttributes["class"] }>();
9
-
10
- const delegatedProps = reactiveOmit(props, "class");
11
- </script>
12
-
13
- <template>
14
- <DialogOverlay
15
- data-slot="dialog-overlay"
16
- :class="
17
- cn(
18
- 'fixed inset-0 z-50 bg-overlay backdrop-blur-sm data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0',
19
- props.class,
20
- )
21
- "
22
- v-bind="delegatedProps"
23
- >
24
- <slot />
25
- </DialogOverlay>
26
- </template>
@@ -1,12 +0,0 @@
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>
@@ -1,21 +0,0 @@
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>
@@ -1,12 +0,0 @@
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>
@@ -1,10 +0,0 @@
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";
@@ -1,36 +0,0 @@
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>
@@ -1,12 +0,0 @@
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>
@@ -1,25 +0,0 @@
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>
@@ -1,17 +0,0 @@
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>
@@ -1,15 +0,0 @@
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>
@@ -1,29 +0,0 @@
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>
@@ -1,31 +0,0 @@
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>
@@ -1,23 +0,0 @@
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>
@@ -1 +0,0 @@
1
- export { default as Input } from "./Input.vue";
@@ -1,14 +0,0 @@
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>
@@ -1 +0,0 @@
1
- export { default as Label } from "./Label.vue";
@@ -1,12 +0,0 @@
1
- <script setup lang="ts">
2
- import type { DialogCloseProps } from "reka-ui";
3
- import { DialogClose } from "reka-ui";
4
-
5
- const props = defineProps<DialogCloseProps>();
6
- </script>
7
-
8
- <template>
9
- <DialogClose data-slot="sheet-close" v-bind="props">
10
- <slot />
11
- </DialogClose>
12
- </template>
@@ -1,12 +0,0 @@
1
- <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue";
3
- import { cn } from "#ginko-docs/lib/utils";
4
-
5
- const props = defineProps<{ class?: HTMLAttributes["class"] }>();
6
- </script>
7
-
8
- <template>
9
- <div data-slot="sheet-footer" :class="cn('mt-auto flex flex-col gap-2 p-4', props.class)">
10
- <slot />
11
- </div>
12
- </template>
@@ -1,12 +0,0 @@
1
- <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue";
3
- import { cn } from "#ginko-docs/lib/utils";
4
-
5
- const props = defineProps<{ class?: HTMLAttributes["class"] }>();
6
- </script>
7
-
8
- <template>
9
- <div data-slot="sheet-header" :class="cn('flex flex-col gap-1.5 p-4', props.class)">
10
- <slot />
11
- </div>
12
- </template>
@@ -1,39 +0,0 @@
1
- <script setup lang="ts">
2
- import type { SwitchRootEmits, SwitchRootProps } from "reka-ui";
3
- import type { HTMLAttributes } from "vue";
4
- import { reactiveOmit } from "@vueuse/core";
5
- import { SwitchRoot, SwitchThumb, useForwardPropsEmits } from "reka-ui";
6
- import { cn } from "#ginko-docs/lib/utils";
7
-
8
- interface Props extends SwitchRootProps {
9
- class?: HTMLAttributes["class"];
10
- }
11
-
12
- const props = defineProps<Props>();
13
- const emits = defineEmits<SwitchRootEmits>();
14
-
15
- const delegatedProps = reactiveOmit(props, "class");
16
- const forwarded = useForwardPropsEmits(delegatedProps, emits);
17
- </script>
18
-
19
- <template>
20
- <SwitchRoot
21
- data-slot="switch"
22
- v-bind="forwarded"
23
- :class="
24
- cn(
25
- 'peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-xs transition-colors focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input',
26
- props.class,
27
- )
28
- "
29
- >
30
- <SwitchThumb
31
- data-slot="switch-thumb"
32
- :class="
33
- cn(
34
- 'pointer-events-none block size-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0',
35
- )
36
- "
37
- />
38
- </SwitchRoot>
39
- </template>
@@ -1 +0,0 @@
1
- export { default as Switch } from "./Switch.vue";
@@ -1,21 +0,0 @@
1
- <script setup lang="ts">
2
- import type { TabsContentProps } from "reka-ui";
3
- import type { HTMLAttributes } from "vue";
4
- import { reactiveOmit } from "@vueuse/core";
5
- import { TabsContent } from "reka-ui";
6
- import { cn } from "#ginko-docs/lib/utils";
7
-
8
- const props = defineProps<TabsContentProps & { class?: HTMLAttributes["class"] }>();
9
-
10
- const delegatedProps = reactiveOmit(props, "class");
11
- </script>
12
-
13
- <template>
14
- <TabsContent
15
- data-slot="tabs-content"
16
- :class="cn('flex-1 outline-none', props.class)"
17
- v-bind="delegatedProps"
18
- >
19
- <slot />
20
- </TabsContent>
21
- </template>
@@ -1,31 +0,0 @@
1
- <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue";
3
- import { ref } from "vue";
4
- import { cn } from "#ginko-docs/lib/utils";
5
- import { h } from "vue";
6
-
7
- const model = defineModel<string>();
8
- const textarea = ref<HTMLTextAreaElement | null>(null);
9
-
10
- const props = defineProps<{
11
- class?: HTMLAttributes["class"];
12
- }>();
13
-
14
- defineExpose({
15
- focus: () => textarea.value?.focus(),
16
- });
17
- </script>
18
-
19
- <template>
20
- <textarea
21
- ref="textarea"
22
- v-model="model"
23
- data-slot="textarea"
24
- :class="
25
- cn(
26
- 'min-h-36 w-full resize-y 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',
27
- props.class,
28
- )
29
- "
30
- />
31
- </template>
@@ -1 +0,0 @@
1
- export { default as Textarea } from "./Textarea.vue";
@@ -1,13 +0,0 @@
1
- import { computed } from "vue";
2
- import { findFirstNavigationPage } from "@lupinum/ginko-content/client";
3
- import { useLocalizedPath } from "#ginko-docs/composables/useLocalizedPath";
4
- import { useDocsNavigationData } from "./useDocsNavigationData";
5
-
6
- export async function useDocsEntryPath() {
7
- const localizedPath = useLocalizedPath();
8
- const { data } = await useDocsNavigationData();
9
-
10
- return computed(
11
- () => findFirstNavigationPage(data.value ?? undefined)?.path ?? localizedPath("docs"),
12
- );
13
- }