@baybreezy/docd 0.0.1

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 (268) hide show
  1. package/app/app.config.ts +239 -0
  2. package/app/app.vue +19 -0
  3. package/app/assets/css/tailwind.css +335 -0
  4. package/app/assets/css/theme.css +1171 -0
  5. package/app/components/OgImage/Docs.takumi.vue +69 -0
  6. package/app/components/OgImage/Landing.takumi.vue +64 -0
  7. package/app/components/OgImage/Site.takumi.vue +32 -0
  8. package/app/components/Ui/Avatar/Avatar.vue +75 -0
  9. package/app/components/Ui/Avatar/Badge.vue +34 -0
  10. package/app/components/Ui/Avatar/Fallback.vue +30 -0
  11. package/app/components/Ui/Avatar/Group.vue +29 -0
  12. package/app/components/Ui/Avatar/GroupCount.vue +29 -0
  13. package/app/components/Ui/Avatar/Image.vue +29 -0
  14. package/app/components/Ui/Badge.vue +86 -0
  15. package/app/components/Ui/BadgeGroup.vue +314 -0
  16. package/app/components/Ui/BgPattern/Grid.vue +137 -0
  17. package/app/components/Ui/BorderBeam.vue +97 -0
  18. package/app/components/Ui/Breadcrumbs.vue +103 -0
  19. package/app/components/Ui/Button.vue +169 -0
  20. package/app/components/Ui/ButtonGroup/ButtonGroup.vue +54 -0
  21. package/app/components/Ui/ButtonGroup/Separator.vue +38 -0
  22. package/app/components/Ui/ButtonGroup/Text.vue +33 -0
  23. package/app/components/Ui/Card/Action.vue +31 -0
  24. package/app/components/Ui/Card/Card.vue +58 -0
  25. package/app/components/Ui/Card/Content.vue +34 -0
  26. package/app/components/Ui/Card/Description.vue +36 -0
  27. package/app/components/Ui/Card/Footer.vue +31 -0
  28. package/app/components/Ui/Card/Header.vue +31 -0
  29. package/app/components/Ui/Card/Title.vue +37 -0
  30. package/app/components/Ui/Collapsible/Collapsible.vue +16 -0
  31. package/app/components/Ui/Collapsible/Content.vue +27 -0
  32. package/app/components/Ui/Collapsible/Trigger.vue +13 -0
  33. package/app/components/Ui/Command/Command.vue +115 -0
  34. package/app/components/Ui/Command/Dialog.vue +65 -0
  35. package/app/components/Ui/Command/Empty.vue +32 -0
  36. package/app/components/Ui/Command/Footer.vue +40 -0
  37. package/app/components/Ui/Command/Group.vue +58 -0
  38. package/app/components/Ui/Command/Input.vue +57 -0
  39. package/app/components/Ui/Command/Item.vue +102 -0
  40. package/app/components/Ui/Command/List.vue +33 -0
  41. package/app/components/Ui/Command/Separator.vue +30 -0
  42. package/app/components/Ui/Command/Shortcut.vue +28 -0
  43. package/app/components/Ui/Container.vue +46 -0
  44. package/app/components/Ui/ContextMenu/Arrow.vue +43 -0
  45. package/app/components/Ui/ContextMenu/CheckboxItem.vue +42 -0
  46. package/app/components/Ui/ContextMenu/Content.vue +53 -0
  47. package/app/components/Ui/ContextMenu/ContextMenu.vue +14 -0
  48. package/app/components/Ui/ContextMenu/Group.vue +12 -0
  49. package/app/components/Ui/ContextMenu/Item.vue +65 -0
  50. package/app/components/Ui/ContextMenu/ItemIndicator.vue +30 -0
  51. package/app/components/Ui/ContextMenu/Label.vue +35 -0
  52. package/app/components/Ui/ContextMenu/Portal.vue +12 -0
  53. package/app/components/Ui/ContextMenu/RadioGroup.vue +16 -0
  54. package/app/components/Ui/ContextMenu/RadioItem.vue +40 -0
  55. package/app/components/Ui/ContextMenu/Separator.vue +25 -0
  56. package/app/components/Ui/ContextMenu/Shortcut.vue +30 -0
  57. package/app/components/Ui/ContextMenu/Sub.vue +15 -0
  58. package/app/components/Ui/ContextMenu/SubContent.vue +55 -0
  59. package/app/components/Ui/ContextMenu/SubTrigger.vue +42 -0
  60. package/app/components/Ui/ContextMenu/Trigger.vue +12 -0
  61. package/app/components/Ui/Dialog/Close.vue +12 -0
  62. package/app/components/Ui/Dialog/Content.vue +79 -0
  63. package/app/components/Ui/Dialog/Description.vue +29 -0
  64. package/app/components/Ui/Dialog/Dialog.vue +14 -0
  65. package/app/components/Ui/Dialog/Footer.vue +32 -0
  66. package/app/components/Ui/Dialog/Header.vue +32 -0
  67. package/app/components/Ui/Dialog/Overlay.vue +25 -0
  68. package/app/components/Ui/Dialog/Portal.vue +12 -0
  69. package/app/components/Ui/Dialog/Title.vue +29 -0
  70. package/app/components/Ui/Dialog/Trigger.vue +12 -0
  71. package/app/components/Ui/Divider.vue +102 -0
  72. package/app/components/Ui/Drawer/Close.vue +12 -0
  73. package/app/components/Ui/Drawer/Content.vue +67 -0
  74. package/app/components/Ui/Drawer/Description.vue +33 -0
  75. package/app/components/Ui/Drawer/Drawer.vue +17 -0
  76. package/app/components/Ui/Drawer/Footer.vue +35 -0
  77. package/app/components/Ui/Drawer/Header.vue +34 -0
  78. package/app/components/Ui/Drawer/Overlay.vue +20 -0
  79. package/app/components/Ui/Drawer/Portal.vue +12 -0
  80. package/app/components/Ui/Drawer/Title.vue +35 -0
  81. package/app/components/Ui/Drawer/Trigger.vue +12 -0
  82. package/app/components/Ui/DropdownMenu/Arrow.vue +43 -0
  83. package/app/components/Ui/DropdownMenu/CheckboxItem.vue +41 -0
  84. package/app/components/Ui/DropdownMenu/Content.vue +56 -0
  85. package/app/components/Ui/DropdownMenu/DropdownMenu.vue +15 -0
  86. package/app/components/Ui/DropdownMenu/Group.vue +12 -0
  87. package/app/components/Ui/DropdownMenu/Item.vue +64 -0
  88. package/app/components/Ui/DropdownMenu/ItemIndicator.vue +32 -0
  89. package/app/components/Ui/DropdownMenu/Label.vue +34 -0
  90. package/app/components/Ui/DropdownMenu/Portal.vue +12 -0
  91. package/app/components/Ui/DropdownMenu/RadioGroup.vue +16 -0
  92. package/app/components/Ui/DropdownMenu/RadioItem.vue +40 -0
  93. package/app/components/Ui/DropdownMenu/Separator.vue +25 -0
  94. package/app/components/Ui/DropdownMenu/Shortcut.vue +44 -0
  95. package/app/components/Ui/DropdownMenu/Sub.vue +14 -0
  96. package/app/components/Ui/DropdownMenu/SubContent.vue +56 -0
  97. package/app/components/Ui/DropdownMenu/SubTrigger.vue +47 -0
  98. package/app/components/Ui/DropdownMenu/Trigger.vue +12 -0
  99. package/app/components/Ui/FancyIcon.vue +243 -0
  100. package/app/components/Ui/GradientDivider.vue +26 -0
  101. package/app/components/Ui/IframeLazy.vue +97 -0
  102. package/app/components/Ui/Input.vue +97 -0
  103. package/app/components/Ui/InputGroup/Addon.vue +66 -0
  104. package/app/components/Ui/InputGroup/Button.vue +50 -0
  105. package/app/components/Ui/InputGroup/Input.vue +25 -0
  106. package/app/components/Ui/InputGroup/InputGroup.vue +44 -0
  107. package/app/components/Ui/InputGroup/Text.vue +33 -0
  108. package/app/components/Ui/InputGroup/Textarea.vue +25 -0
  109. package/app/components/Ui/Kbd/Group.vue +32 -0
  110. package/app/components/Ui/Kbd/Kbd.vue +62 -0
  111. package/app/components/Ui/Label.vue +40 -0
  112. package/app/components/Ui/Popover/Anchor.vue +13 -0
  113. package/app/components/Ui/Popover/Arrow.vue +42 -0
  114. package/app/components/Ui/Popover/Close.vue +13 -0
  115. package/app/components/Ui/Popover/Content.vue +55 -0
  116. package/app/components/Ui/Popover/Popover.vue +15 -0
  117. package/app/components/Ui/Popover/Portal.vue +13 -0
  118. package/app/components/Ui/Popover/Trigger.vue +12 -0
  119. package/app/components/Ui/Popover/X.vue +38 -0
  120. package/app/components/Ui/ScrollArea/Corner.vue +12 -0
  121. package/app/components/Ui/ScrollArea/ScrollArea.vue +38 -0
  122. package/app/components/Ui/ScrollArea/Scrollbar.vue +39 -0
  123. package/app/components/Ui/ScrollArea/Thumb.vue +39 -0
  124. package/app/components/Ui/ScrollArea/Viewport.vue +27 -0
  125. package/app/components/Ui/Scrollspy.vue +61 -0
  126. package/app/components/Ui/Separator.vue +40 -0
  127. package/app/components/Ui/Skeleton.vue +39 -0
  128. package/app/components/Ui/Sonner.vue +25 -0
  129. package/app/components/Ui/Tabs/Content.vue +27 -0
  130. package/app/components/Ui/Tabs/Indicator.vue +37 -0
  131. package/app/components/Ui/Tabs/List.vue +37 -0
  132. package/app/components/Ui/Tabs/Tabs.vue +25 -0
  133. package/app/components/Ui/Tabs/Trigger.vue +41 -0
  134. package/app/components/Ui/Textarea.vue +81 -0
  135. package/app/components/Ui/Tooltip/Arrow.vue +30 -0
  136. package/app/components/Ui/Tooltip/Content.vue +50 -0
  137. package/app/components/Ui/Tooltip/Portal.vue +12 -0
  138. package/app/components/Ui/Tooltip/Provider.vue +14 -0
  139. package/app/components/Ui/Tooltip/Tooltip.vue +25 -0
  140. package/app/components/Ui/Tooltip/Trigger.vue +12 -0
  141. package/app/components/Ui/Tree/Item.vue +15 -0
  142. package/app/components/Ui/Tree/Tree.vue +15 -0
  143. package/app/components/Ui/Tree/Virtualizer.vue +13 -0
  144. package/app/components/component-api/ComponentApiSection.vue +135 -0
  145. package/app/components/content/docs/Callout/DocsCallout.vue +99 -0
  146. package/app/components/content/prose/ProseA.global.vue +31 -0
  147. package/app/components/content/prose/ProseBlockquote.global.vue +28 -0
  148. package/app/components/content/prose/ProseCallout.global.vue +306 -0
  149. package/app/components/content/prose/ProseCard.global.vue +100 -0
  150. package/app/components/content/prose/ProseCodeCollapse.global.vue +125 -0
  151. package/app/components/content/prose/ProseCodeCopy.global.vue +67 -0
  152. package/app/components/content/prose/ProseCodeGroup.global.vue +104 -0
  153. package/app/components/content/prose/ProseCodeTree.global.vue +277 -0
  154. package/app/components/content/prose/ProseCollapsible.global.vue +64 -0
  155. package/app/components/content/prose/ProseColorModeImage.global.vue +58 -0
  156. package/app/components/content/prose/ProseComponentApi.global.vue +104 -0
  157. package/app/components/content/prose/ProseComponentEvents.global.vue +27 -0
  158. package/app/components/content/prose/ProseComponentExposed.global.vue +27 -0
  159. package/app/components/content/prose/ProseComponentProps.global.vue +27 -0
  160. package/app/components/content/prose/ProseComponentSlots.global.vue +27 -0
  161. package/app/components/content/prose/ProseEm.global.vue +5 -0
  162. package/app/components/content/prose/ProseField.global.vue +118 -0
  163. package/app/components/content/prose/ProseFieldGroup.global.vue +62 -0
  164. package/app/components/content/prose/ProseH1.global.vue +58 -0
  165. package/app/components/content/prose/ProseH2.global.vue +58 -0
  166. package/app/components/content/prose/ProseH3.global.vue +58 -0
  167. package/app/components/content/prose/ProseH4.global.vue +58 -0
  168. package/app/components/content/prose/ProseH5.global.vue +47 -0
  169. package/app/components/content/prose/ProseH6.global.vue +47 -0
  170. package/app/components/content/prose/ProseHr.global.vue +33 -0
  171. package/app/components/content/prose/ProseIconList.global.vue +113 -0
  172. package/app/components/content/prose/ProseImg.global.vue +119 -0
  173. package/app/components/content/prose/ProseLead.global.vue +28 -0
  174. package/app/components/content/prose/ProseLi.global.vue +25 -0
  175. package/app/components/content/prose/ProseMermaid.global.vue +127 -0
  176. package/app/components/content/prose/ProseOl.global.vue +25 -0
  177. package/app/components/content/prose/ProseP.global.vue +25 -0
  178. package/app/components/content/prose/ProsePmInstall.global.vue +60 -0
  179. package/app/components/content/prose/ProsePmRun.global.vue +51 -0
  180. package/app/components/content/prose/ProsePmX.global.vue +56 -0
  181. package/app/components/content/prose/ProsePre.global.vue +181 -0
  182. package/app/components/content/prose/ProseShowCase.global.vue +56 -0
  183. package/app/components/content/prose/ProseSmartIcon.global.vue +54 -0
  184. package/app/components/content/prose/ProseStep.global.vue +22 -0
  185. package/app/components/content/prose/ProseSteps.global.vue +22 -0
  186. package/app/components/content/prose/ProseStrong.global.vue +34 -0
  187. package/app/components/content/prose/ProseTable.global.vue +34 -0
  188. package/app/components/content/prose/ProseTabs.global.vue +104 -0
  189. package/app/components/content/prose/ProseTabsInner.global.vue +274 -0
  190. package/app/components/content/prose/ProseTbody.global.vue +5 -0
  191. package/app/components/content/prose/ProseTd.global.vue +25 -0
  192. package/app/components/content/prose/ProseTh.global.vue +25 -0
  193. package/app/components/content/prose/ProseThead.global.vue +9 -0
  194. package/app/components/content/prose/ProseTr.global.vue +35 -0
  195. package/app/components/content/prose/ProseUl.global.vue +25 -0
  196. package/app/components/docs/DocsExtraStuff.vue +39 -0
  197. package/app/components/docs/DocsGithubLink.vue +11 -0
  198. package/app/components/docs/DocsHeader.vue +3 -0
  199. package/app/components/docs/DocsLogo.vue +74 -0
  200. package/app/components/docs/DocsMobileBar.vue +26 -0
  201. package/app/components/docs/DocsMobileNav.vue +49 -0
  202. package/app/components/docs/DocsNav.vue +161 -0
  203. package/app/components/docs/DocsPageTransition.vue +32 -0
  204. package/app/components/docs/DocsSearch.vue +220 -0
  205. package/app/components/docs/DocsSearchButton.vue +20 -0
  206. package/app/components/docs/DocsThemeCustomizer.vue +229 -0
  207. package/app/components/docs/DocsThemeToggler.vue +98 -0
  208. package/app/components/docs/DocsTocRail.vue +162 -0
  209. package/app/components/docs/DocsToclink.vue +52 -0
  210. package/app/components/docs/DocsZigZagRail.vue +70 -0
  211. package/app/components/landing/Hero.vue +222 -0
  212. package/app/components/page/PageFooter.vue +49 -0
  213. package/app/components/page/PageHeader.vue +68 -0
  214. package/app/components/page/PageHeaderLinks.vue +138 -0
  215. package/app/components/page/PageMobileToc.vue +162 -0
  216. package/app/components/page/PageToc.vue +33 -0
  217. package/app/composables/useDefaultSlotItems.ts +90 -0
  218. package/app/composables/useDocPage.ts +66 -0
  219. package/app/composables/useDocSearch.ts +23 -0
  220. package/app/composables/useDocd.ts +107 -0
  221. package/app/composables/useLogoAssets.ts +319 -0
  222. package/app/composables/usePm.ts +73 -0
  223. package/app/composables/useProseComponentMeta.ts +30 -0
  224. package/app/composables/useScrollspy.ts +327 -0
  225. package/app/composables/useSeo.ts +240 -0
  226. package/app/composables/useUIConfig.ts +36 -0
  227. package/app/layouts/default.vue +5 -0
  228. package/app/layouts/docs.vue +64 -0
  229. package/app/middleware/colorMode.global.ts +8 -0
  230. package/app/middleware/doc-page-layout.ts +11 -0
  231. package/app/middleware/landing-page-layout.ts +11 -0
  232. package/app/pages/[...slug].vue +63 -0
  233. package/app/plugins/mermaid.client.ts +35 -0
  234. package/app/plugins/navigation-direction.client.ts +15 -0
  235. package/app/plugins/theme-restore.client.ts +7 -0
  236. package/app/templates/landing.vue +40 -0
  237. package/app/transitions/presets.ts +71 -0
  238. package/app/types/prose-component-meta.d.ts +4 -0
  239. package/app/utils/og.ts +26 -0
  240. package/app/utils/prerender.ts +9 -0
  241. package/app/utils/translucent.ts +56 -0
  242. package/app/utils/tw-helper.ts +4 -0
  243. package/content.config.ts +81 -0
  244. package/index.d.ts +25 -0
  245. package/modules/config.ts +89 -0
  246. package/modules/custom-icons.ts +17 -0
  247. package/modules/markdown-rewrite.ts +96 -0
  248. package/modules/prose-component-meta.ts +150 -0
  249. package/modules/routing.ts +22 -0
  250. package/modules/skills/index.ts +167 -0
  251. package/modules/skills/runtime/server/routes/skills-files.ts +49 -0
  252. package/modules/skills/runtime/server/routes/skills-index.ts +8 -0
  253. package/nuxt.config.ts +96 -0
  254. package/nuxt.schema.ts +288 -0
  255. package/package.json +95 -0
  256. package/server/mcp/tools/get-page.ts +66 -0
  257. package/server/mcp/tools/list-pages.ts +61 -0
  258. package/server/routes/sitemap.xml.ts +73 -0
  259. package/server/utils/content.ts +3 -0
  260. package/tailwind.config.cjs +55 -0
  261. package/utils/component-api-content.ts +467 -0
  262. package/utils/component-api-discovery.ts +165 -0
  263. package/utils/component-api-schema.ts +28 -0
  264. package/utils/component-api.ts +243 -0
  265. package/utils/generate-prose-component-meta.ts +303 -0
  266. package/utils/git.ts +123 -0
  267. package/utils/meta.ts +40 -0
  268. package/utils/pages.ts +21 -0
@@ -0,0 +1,274 @@
1
+ <template>
2
+ <UiTabs v-if="variant === 'separate'" v-model="activeTabIndex" class="not-first:mt-5">
3
+ <UiTabsList>
4
+ <UiTabsTrigger
5
+ v-for="(slot, i) in defaultSlots"
6
+ :key="slot.key"
7
+ :value="i"
8
+ class="items-center gap-2"
9
+ >
10
+ <ProseSmartIcon v-if="icon(slot)" :name="icon(slot)!" :size="14" class="self-center" />
11
+ {{ label(slot) }}
12
+ </UiTabsTrigger>
13
+ </UiTabsList>
14
+
15
+ <div
16
+ v-for="(slot, i) in defaultSlots"
17
+ v-show="activeTabIndex === i"
18
+ :key="slot.key"
19
+ class="mt-2"
20
+ >
21
+ <component :is="slot.vnode" class="[&>*:first-child]:mt-0" />
22
+ </div>
23
+ </UiTabs>
24
+
25
+ <UiTabs
26
+ v-else-if="variant === 'line'"
27
+ v-model="activeTabIndex"
28
+ class="relative mr-auto w-full not-first:mt-5"
29
+ >
30
+ <div class="flex items-center justify-between overflow-x-auto pb-3">
31
+ <UiTabsList :pill="false" class="relative h-9 w-full justify-start rounded-none border-b p-0">
32
+ <UiTabsTrigger
33
+ v-for="(slot, i) in defaultSlots"
34
+ :key="slot.key"
35
+ class="gap-2"
36
+ :pill="false"
37
+ :value="i"
38
+ >
39
+ <ProseSmartIcon v-if="icon(slot)" :name="icon(slot)!" :size="14" class="self-center" />
40
+ {{ label(slot) }}
41
+ </UiTabsTrigger>
42
+ <UiTabsIndicator />
43
+ </UiTabsList>
44
+ </div>
45
+
46
+ <div
47
+ v-for="(slot, i) in defaultSlots"
48
+ v-show="activeTabIndex === i"
49
+ :key="slot.key"
50
+ class="relative space-y-10"
51
+ >
52
+ <component :is="slot.vnode" class="mt-0 [&>*:first-child]:mt-0" />
53
+ </div>
54
+ </UiTabs>
55
+
56
+ <UiCard
57
+ v-else-if="variant === 'card'"
58
+ class="gap-0 rounded-lg py-0 not-first:mt-5"
59
+ :class="[inStack && 'mb-0 rounded-none border-none shadow-none']"
60
+ >
61
+ <TabsRoot v-model="activeTabIndex">
62
+ <UiScrollArea orientation="horizontal" class="**:data-[slot='scroll-area-scrollbar']:h-1.5">
63
+ <TabsList class="relative flex w-full p-1">
64
+ <TabsTrigger
65
+ v-for="(slot, i) in defaultSlots"
66
+ :key="slot.key"
67
+ :value="i"
68
+ class="relative z-20 flex cursor-pointer items-center gap-2 rounded-md px-3 py-1.5 text-sm font-medium whitespace-nowrap text-muted-foreground transition-all duration-75 hover:text-foreground focus-visible:outline-none data-active:text-foreground"
69
+ >
70
+ <ProseSmartIcon v-if="icon(slot)" :name="icon(slot)!" :size="14" class="shrink-0" />
71
+ <span class="truncate">{{ label(slot) }}</span>
72
+ </TabsTrigger>
73
+ <UiTabsIndicator class="inset-0 size-full px-0 py-1 [&>div]:bg-muted" />
74
+ </TabsList>
75
+ </UiScrollArea>
76
+
77
+ <div
78
+ v-for="(slot, i) in defaultSlots"
79
+ v-show="activeTabIndex === i"
80
+ :key="slot.key"
81
+ :value="label(slot)"
82
+ class="mt-0"
83
+ :class="[
84
+ padded && ($slots.default?.()[activeTabIndex]?.type as any).tag !== 'pre' && 'p-3',
85
+ ]"
86
+ >
87
+ <component
88
+ :is="slot.vnode"
89
+ :in-group="true"
90
+ class="mt-0 border-none [&>*:first-child]:mt-0"
91
+ />
92
+ </div>
93
+ </TabsRoot>
94
+ </UiCard>
95
+
96
+ <div v-else-if="variant === 'combobox'">
97
+ <UiPopover v-model:open="dropDownOpen">
98
+ <UiPopoverTrigger as-child>
99
+ <UiButton
100
+ variant="outline"
101
+ role="combobox"
102
+ :aria-expanded="dropDownOpen"
103
+ class="justify-between"
104
+ :class="[comboBoxFullWidth ? 'w-full' : 'w-62.5']"
105
+ >
106
+ <div class="flex items-center gap-2">
107
+ <ProseSmartIcon
108
+ v-if="icon(defaultSlots?.[activeTabIndex])"
109
+ :name="icon(defaultSlots?.[activeTabIndex])!"
110
+ :size="14"
111
+ />
112
+ <span>
113
+ {{ label(defaultSlots?.[activeTabIndex]) }}
114
+ </span>
115
+ </div>
116
+ <Icon class="text-muted-foreground" name="lucide:chevrons-up-down" />
117
+ </UiButton>
118
+ </UiPopoverTrigger>
119
+ <UiPopoverContent class="w-(--reka-popover-trigger-width) p-0">
120
+ <UiCommand>
121
+ <UiCommandInput v-if="!disableSearch" class="h-9" :placeholder="searchPlaceholder" />
122
+ <UiCommandEmpty>{{ searchEmpty }}</UiCommandEmpty>
123
+ <UiCommandList>
124
+ <UiCommandGroup>
125
+ <UiCommandItem
126
+ v-for="(slot, i) in defaultSlots"
127
+ :key="slot.key"
128
+ :value="label(slot)"
129
+ @select="
130
+ () => {
131
+ activeTabIndex = i;
132
+ dropDownOpen = false;
133
+ }
134
+ "
135
+ >
136
+ <ProseSmartIcon
137
+ v-if="icon(slot)"
138
+ :name="icon(slot)!"
139
+ :size="14"
140
+ class="mr-2 self-center"
141
+ />
142
+ {{ label(slot) }}
143
+ <Icon
144
+ name="lucide:check"
145
+ :class="['ml-auto h-4 w-4', activeTabIndex === i ? 'opacity-100' : 'opacity-0']"
146
+ />
147
+ </UiCommandItem>
148
+ </UiCommandGroup>
149
+ </UiCommandList>
150
+ </UiCommand>
151
+ </UiPopoverContent>
152
+ </UiPopover>
153
+
154
+ <div
155
+ v-for="(slot, i) in defaultSlots"
156
+ v-show="activeTabIndex === i"
157
+ :key="slot.key"
158
+ :value="label(slot)"
159
+ class="mt-4"
160
+ >
161
+ <component :is="slot.vnode" :in-group="true" class="[&>*:first-child]:mt-0" />
162
+ </div>
163
+ </div>
164
+ </template>
165
+ <script lang="ts">
166
+ import { getMaterialFileIcon } from "@baybreezy/file-extension-icon";
167
+
168
+ import type { ProseTabsProps } from "./ProseTabs.global.vue";
169
+
170
+ export type ProseTabsInnerSlotData = {
171
+ label: string;
172
+ index: number;
173
+ };
174
+
175
+ export type ProseTabsInnerProps = ProseTabsProps & {
176
+ /**
177
+ * Data to be used for rendering tabs
178
+ */
179
+ slotsData: ProseTabsInnerSlotData[];
180
+ };
181
+ </script>
182
+
183
+ <script setup lang="ts">
184
+ const { sync } = defineProps<ProseTabsInnerProps>();
185
+
186
+ const syncState = useCookie<{ scope: string; value?: string }[]>("tabs-sync-state", {
187
+ default: () => [],
188
+ });
189
+
190
+ const syncScopeIndex = computed(() => syncState.value.findIndex((x) => x.scope === sync));
191
+
192
+ const activeTabIndexData = ref(0);
193
+
194
+ const { items: slotItems } = useDefaultSlotItems({
195
+ mapMeta: ({ props, index }) => {
196
+ const filename = props.filename as string | undefined;
197
+ const language = props.language as string | undefined;
198
+ const meta = props.meta as string | undefined;
199
+
200
+ const normalizedLabel = props.label ?? filename ?? `Tab ${index + 1}`;
201
+
202
+ // Extract icon from multiple sources:
203
+ // 1. Direct icon prop
204
+ // 2. Icon in meta string (e.g., icon="lucide:terminal")
205
+ // 3. Language-based icon
206
+ let normalizedIcon = props.icon as string | undefined;
207
+
208
+ if (!normalizedIcon && meta) {
209
+ const iconMatch = meta.match(/icon="?([a-zA-Z0-9-_:]+)"?/);
210
+ normalizedIcon = iconMatch ? iconMatch[1] : undefined;
211
+ }
212
+
213
+ if (!normalizedIcon && language) {
214
+ normalizedIcon = getMaterialFileIcon(language);
215
+ }
216
+
217
+ return {
218
+ label: normalizedLabel,
219
+ icon: normalizedIcon,
220
+ };
221
+ },
222
+ });
223
+
224
+ const tabItems = computed(() =>
225
+ slotItems.value.map((item) => ({
226
+ key: item.key ?? `${item.index}${item.meta.label}`,
227
+ index: item.index,
228
+ vnode: item.vnode,
229
+ props: item.props,
230
+ label: item.meta.label,
231
+ icon: item.meta.icon,
232
+ }))
233
+ );
234
+
235
+ const activeTabIndex = computed<number>({
236
+ get: () => {
237
+ if (sync === undefined || syncScopeIndex.value === -1) return activeTabIndexData.value;
238
+
239
+ return (
240
+ tabItems.value.find((item) => item.label === syncState.value[syncScopeIndex.value]?.value)
241
+ ?.index ?? activeTabIndexData.value
242
+ );
243
+ },
244
+ set(index: number) {
245
+ if (sync === undefined) {
246
+ activeTabIndexData.value = index;
247
+ return;
248
+ }
249
+
250
+ let scopeIndex = syncScopeIndex.value;
251
+
252
+ if (scopeIndex === -1) {
253
+ syncState.value.push({ scope: sync, value: undefined });
254
+ scopeIndex = syncState.value.length - 1;
255
+ }
256
+
257
+ const label = tabItems.value[index]?.label;
258
+ if (syncState.value[scopeIndex] !== undefined) {
259
+ syncState.value[scopeIndex]!.value = label;
260
+ }
261
+ activeTabIndexData.value = index;
262
+ },
263
+ });
264
+
265
+ const defaultSlots = computed(() => tabItems.value);
266
+ function icon(slot?: (typeof tabItems.value)[number]) {
267
+ return slot?.icon;
268
+ }
269
+ function label(slot?: (typeof tabItems.value)[number]) {
270
+ return slot?.label ?? "";
271
+ }
272
+
273
+ const dropDownOpen = ref(false);
274
+ </script>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <tbody data-slot="prose-tbody">
3
+ <slot />
4
+ </tbody>
5
+ </template>
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <td data-slot="prose-td" :class="proseTdStyles({ class: normalizeClass(_class) || undefined })">
3
+ <slot />
4
+ </td>
5
+ </template>
6
+
7
+ <script lang="ts">
8
+ import { normalizeClass } from "vue";
9
+ import type { HTMLAttributes } from "vue";
10
+
11
+ export type ProseTdProps = {
12
+ /**
13
+ * Additional classes for the parent element
14
+ */
15
+ class?: HTMLAttributes["class"];
16
+ };
17
+
18
+ export const proseTdStyles = tv({
19
+ base: "px-4 py-2 text-left text-pretty [[align=center]]:text-center [[align=right]]:text-right",
20
+ });
21
+ </script>
22
+
23
+ <script setup lang="ts">
24
+ const { class: _class } = defineProps<ProseTdProps>();
25
+ </script>
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <th data-slot="prose-th" :class="proseThStyles({ class: normalizeClass(_class) || undefined })">
3
+ <slot />
4
+ </th>
5
+ </template>
6
+
7
+ <script lang="ts">
8
+ import { normalizeClass } from "vue";
9
+ import type { HTMLAttributes } from "vue";
10
+
11
+ export type ProseThProps = {
12
+ /**
13
+ * Additional classes for the parent element
14
+ */
15
+ class?: HTMLAttributes["class"];
16
+ };
17
+
18
+ export const proseThStyles = tv({
19
+ base: "px-4 py-2 text-left font-bold text-pretty [[align=center]]:text-center [[align=right]]:text-right",
20
+ });
21
+ </script>
22
+
23
+ <script setup lang="ts">
24
+ const { class: _class } = defineProps<ProseThProps>();
25
+ </script>
@@ -0,0 +1,9 @@
1
+ <template>
2
+ <thead data-slot="prose-thead" :class="[isDashed ? 'border-dashed' : '']">
3
+ <slot />
4
+ </thead>
5
+ </template>
6
+
7
+ <script lang="ts" setup>
8
+ const { isDashed } = useDocd();
9
+ </script>
@@ -0,0 +1,35 @@
1
+ <template>
2
+ <tr
3
+ data-slot="prose-tr"
4
+ :class="proseTrStyles({ class: normalizeClass(_class) || undefined, isDashed })"
5
+ >
6
+ <slot />
7
+ </tr>
8
+ </template>
9
+
10
+ <script lang="ts">
11
+ import { normalizeClass } from "vue";
12
+ import type { HTMLAttributes } from "vue";
13
+
14
+ export type ProseTrProps = {
15
+ /**
16
+ * Additional classes for the parent element
17
+ */
18
+ class?: HTMLAttributes["class"];
19
+ };
20
+
21
+ export const proseTrStyles = tv({
22
+ base: "m-0 p-0 even:bg-muted/70 dark:even:bg-muted/50 [&:not(:has(th)):hover]:bg-muted dark:[&:not(:has(th)):hover]:bg-muted/50",
23
+ variants: {
24
+ isDashed: {
25
+ true: "border-dashed",
26
+ false: "",
27
+ },
28
+ },
29
+ });
30
+ </script>
31
+
32
+ <script setup lang="ts">
33
+ const { class: _class } = defineProps<ProseTrProps>();
34
+ const { isDashed } = useDocd();
35
+ </script>
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <ul data-slot="prose-ul" :class="proseUlStyles({ class: normalizeClass(_class) || undefined })">
3
+ <slot mdc-unwrap="p" />
4
+ </ul>
5
+ </template>
6
+
7
+ <script lang="ts">
8
+ import { normalizeClass } from "vue";
9
+ import type { HTMLAttributes } from "vue";
10
+
11
+ export type ProseUlProps = {
12
+ /**
13
+ * Additional classes for the parent element
14
+ */
15
+ class?: HTMLAttributes["class"];
16
+ };
17
+
18
+ export const proseUlStyles = tv({
19
+ base: "ml-4 list-disc not-first:mt-6 not-last:mb-6 [&>li:not(:first-child)]:mt-2",
20
+ });
21
+ </script>
22
+
23
+ <script setup lang="ts">
24
+ const { class: _class } = defineProps<ProseUlProps>();
25
+ </script>
@@ -0,0 +1,39 @@
1
+ <template>
2
+ <nav v-if="allLinks.length" class="flex flex-col gap-2 text-sm">
3
+ <NuxtLink
4
+ v-for="(link, i) in allLinks"
5
+ :key="i"
6
+ :title="link.label"
7
+ :href="link.href"
8
+ :target="link.external ? '_blank' : '_self'"
9
+ :external="link.external"
10
+ class="flex items-center gap-2 text-muted-foreground transition-all hover:text-foreground"
11
+ >
12
+ <Icon :name="link.icon" />
13
+ {{ link.label }}
14
+ </NuxtLink>
15
+ </nav>
16
+ </template>
17
+
18
+ <script lang="ts" setup>
19
+ const { github, extraLinks } = useDocd();
20
+ const { page } = await useDocPage();
21
+
22
+ const editLink = computed(() => {
23
+ if (!github.value?.repo || !page.value?.stem) return null;
24
+ const branch = github.value.branch ?? "main";
25
+ const contentDir = github.value.contentDir ?? "content";
26
+ return {
27
+ icon: "lucide:pen",
28
+ label: "Edit this page",
29
+ href: `${github.value.repo}/edit/${branch}/${contentDir}/${page.value.stem}.md`,
30
+ external: true,
31
+ };
32
+ });
33
+
34
+ const allLinks = computed(() =>
35
+ [editLink.value, ...extraLinks.value].filter(
36
+ (l): l is NonNullable<typeof l> => l !== null && l !== undefined
37
+ )
38
+ );
39
+ </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <NuxtLink :href="github?.repo" target="_blank" rel="noopener noreferrer">
3
+ <UiButton class="dark:text-muted-foreground" size="icon-sm" variant="ghost">
4
+ <Icon name="simple-icons:github" />
5
+ </UiButton>
6
+ </NuxtLink>
7
+ </template>
8
+
9
+ <script lang="ts" setup>
10
+ const { github } = useDocd();
11
+ </script>
@@ -0,0 +1,3 @@
1
+ <template>
2
+ <div></div>
3
+ </template>
@@ -0,0 +1,74 @@
1
+ <template>
2
+ <ClientOnly>
3
+ <UiContextMenu v-if="contextMenuItems.length">
4
+ <UiContextMenuTrigger as-child>
5
+ <NuxtLink :to="logoUrl" class="flex min-w-0 items-center gap-2 py-4">
6
+ <NuxtImg
7
+ v-if="activeDisplayUrl"
8
+ :src="activeDisplayUrl"
9
+ :alt="logoAlt"
10
+ :class="[
11
+ isWordmarkDisplay
12
+ ? 'h-6 w-auto shrink-0'
13
+ : 'size-6 shrink-0 rounded ring-1 ring-border/80',
14
+ logoClasses,
15
+ ]"
16
+ />
17
+ <span v-if="showTitle" class="truncate font-extrabold">{{ headerTitle }}</span>
18
+ </NuxtLink>
19
+ </UiContextMenuTrigger>
20
+
21
+ <UiContextMenuContent :collision-padding="10" translucent>
22
+ <template v-for="(group, groupIndex) in contextMenuItems" :key="groupIndex">
23
+ <UiContextMenuGroup>
24
+ <UiContextMenuItem
25
+ v-for="action in group"
26
+ :key="action.label"
27
+ @select="action.action()"
28
+ >
29
+ <Icon :name="action.icon" class="size-4" />
30
+ <span>{{ action.label }}</span>
31
+ </UiContextMenuItem>
32
+ </UiContextMenuGroup>
33
+ <UiContextMenuSeparator v-if="groupIndex < contextMenuItems.length - 1" />
34
+ </template>
35
+ </UiContextMenuContent>
36
+ </UiContextMenu>
37
+
38
+ <NuxtLink v-else :to="logoUrl" class="flex min-w-0 items-center gap-2 py-4">
39
+ <NuxtImg
40
+ v-if="activeDisplayUrl"
41
+ :src="activeDisplayUrl"
42
+ :alt="logoAlt"
43
+ :class="[
44
+ isWordmarkDisplay
45
+ ? 'h-6 w-auto shrink-0'
46
+ : 'size-6 shrink-0 rounded ring-1 ring-border/80',
47
+ logoClasses,
48
+ ]"
49
+ />
50
+ <span v-if="showTitle" class="truncate font-extrabold">{{ headerTitle }}</span>
51
+ </NuxtLink>
52
+
53
+ <template #fallback>
54
+ <div class="flex min-w-0 items-center gap-2 py-4">
55
+ <UiSkeleton class="size-6 shrink-0 rounded" />
56
+ <UiSkeleton class="h-5 w-20 rounded" />
57
+ </div>
58
+ </template>
59
+ </ClientOnly>
60
+ </template>
61
+
62
+ <script lang="ts" setup>
63
+ const { headerTitle, logoUrl } = useDocd();
64
+ const {
65
+ activeDisplayUrl,
66
+ contextMenuItems,
67
+ hasWordmark,
68
+ isWordmarkDisplay,
69
+ logoAlt,
70
+ logoClasses,
71
+ } = useLogoAssets();
72
+
73
+ const showTitle = computed(() => !isWordmarkDisplay.value || !hasWordmark.value);
74
+ </script>
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <div
3
+ class="flex h-(--header-height) items-center justify-between border-b px-4 tablet:hidden"
4
+ :class="isDashed ? 'border-dashed' : ''"
5
+ >
6
+ <DocsLogo />
7
+ <div class="flex items-center gap-1">
8
+ <DocsSearchButton v-if="!hideSearch" />
9
+ <UiButton
10
+ variant="ghost"
11
+ size="icon-sm"
12
+ class="size-7 text-muted-foreground"
13
+ aria-label="Open navigation"
14
+ @click="navOpen = true"
15
+ >
16
+ <Icon name="lucide:menu" class="size-4" />
17
+ </UiButton>
18
+ </div>
19
+ <DocsMobileNav v-model:open="navOpen" />
20
+ </div>
21
+ </template>
22
+
23
+ <script lang="ts" setup>
24
+ const { isDashed, hideSearch } = useDocd();
25
+ const navOpen = ref(false);
26
+ </script>
@@ -0,0 +1,49 @@
1
+ <template>
2
+ <UiDrawer v-model:open="open">
3
+ <UiDrawerContent hide-knob class="mx-2 flex h-full flex-col gap-0 border p-0">
4
+ <UiDrawerTitle class="sr-only">Mobile Navigation</UiDrawerTitle>
5
+ <UiDrawerDescription class="sr-only">Main navigation for mobile devices</UiDrawerDescription>
6
+ <UiDrawerHeader
7
+ class="flex items-center justify-between border-b px-4 py-0"
8
+ :class="isDashed ? 'border-dashed' : ''"
9
+ >
10
+ <DocsLogo />
11
+ <UiDrawerClose as-child>
12
+ <UiButton variant="ghost" size="icon-sm" class="size-7 text-muted-foreground">
13
+ <Icon name="lucide:x" class="size-4" />
14
+ </UiButton>
15
+ </UiDrawerClose>
16
+ </UiDrawerHeader>
17
+
18
+ <UiScrollArea
19
+ class="min-h-0 flex-1 mask-[linear-gradient(to_bottom,transparent,white_12px,white_calc(100%-12px),transparent)] px-4 py-4"
20
+ >
21
+ <DocsNav v-if="navigation" :items="navigation" />
22
+ </UiScrollArea>
23
+
24
+ <div
25
+ class="mt-auto flex h-(--header-height) items-center justify-between gap-3 border-t px-2"
26
+ :class="isDashed ? 'border-dashed' : ''"
27
+ >
28
+ <DocsGithubLink v-if="github" />
29
+ <div class="ml-auto flex items-center gap-1.5">
30
+ <template v-if="github && (!hideThemeCustomizer || !hideLightDarkToggle)">
31
+ <UiDivider
32
+ :type="isDashed ? 'dashed' : 'solid'"
33
+ orientation="vertical"
34
+ class="h-[calc(var(--header-height)-2rem)]"
35
+ />
36
+ </template>
37
+ <DocsThemeCustomizer v-if="!hideThemeCustomizer" />
38
+ <DocsThemeToggler v-if="!hideLightDarkToggle" class="dark:text-muted-foreground" />
39
+ </div>
40
+ </div>
41
+ </UiDrawerContent>
42
+ </UiDrawer>
43
+ </template>
44
+
45
+ <script lang="ts" setup>
46
+ const open = defineModel<boolean>("open", { default: false });
47
+ const { navigation } = await useDocPage();
48
+ const { isDashed, github, hideThemeCustomizer, hideLightDarkToggle } = useDocd();
49
+ </script>