@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.
- package/app/app.config.ts +239 -0
- package/app/app.vue +19 -0
- package/app/assets/css/tailwind.css +335 -0
- package/app/assets/css/theme.css +1171 -0
- package/app/components/OgImage/Docs.takumi.vue +69 -0
- package/app/components/OgImage/Landing.takumi.vue +64 -0
- package/app/components/OgImage/Site.takumi.vue +32 -0
- package/app/components/Ui/Avatar/Avatar.vue +75 -0
- package/app/components/Ui/Avatar/Badge.vue +34 -0
- package/app/components/Ui/Avatar/Fallback.vue +30 -0
- package/app/components/Ui/Avatar/Group.vue +29 -0
- package/app/components/Ui/Avatar/GroupCount.vue +29 -0
- package/app/components/Ui/Avatar/Image.vue +29 -0
- package/app/components/Ui/Badge.vue +86 -0
- package/app/components/Ui/BadgeGroup.vue +314 -0
- package/app/components/Ui/BgPattern/Grid.vue +137 -0
- package/app/components/Ui/BorderBeam.vue +97 -0
- package/app/components/Ui/Breadcrumbs.vue +103 -0
- package/app/components/Ui/Button.vue +169 -0
- package/app/components/Ui/ButtonGroup/ButtonGroup.vue +54 -0
- package/app/components/Ui/ButtonGroup/Separator.vue +38 -0
- package/app/components/Ui/ButtonGroup/Text.vue +33 -0
- package/app/components/Ui/Card/Action.vue +31 -0
- package/app/components/Ui/Card/Card.vue +58 -0
- package/app/components/Ui/Card/Content.vue +34 -0
- package/app/components/Ui/Card/Description.vue +36 -0
- package/app/components/Ui/Card/Footer.vue +31 -0
- package/app/components/Ui/Card/Header.vue +31 -0
- package/app/components/Ui/Card/Title.vue +37 -0
- package/app/components/Ui/Collapsible/Collapsible.vue +16 -0
- package/app/components/Ui/Collapsible/Content.vue +27 -0
- package/app/components/Ui/Collapsible/Trigger.vue +13 -0
- package/app/components/Ui/Command/Command.vue +115 -0
- package/app/components/Ui/Command/Dialog.vue +65 -0
- package/app/components/Ui/Command/Empty.vue +32 -0
- package/app/components/Ui/Command/Footer.vue +40 -0
- package/app/components/Ui/Command/Group.vue +58 -0
- package/app/components/Ui/Command/Input.vue +57 -0
- package/app/components/Ui/Command/Item.vue +102 -0
- package/app/components/Ui/Command/List.vue +33 -0
- package/app/components/Ui/Command/Separator.vue +30 -0
- package/app/components/Ui/Command/Shortcut.vue +28 -0
- package/app/components/Ui/Container.vue +46 -0
- package/app/components/Ui/ContextMenu/Arrow.vue +43 -0
- package/app/components/Ui/ContextMenu/CheckboxItem.vue +42 -0
- package/app/components/Ui/ContextMenu/Content.vue +53 -0
- package/app/components/Ui/ContextMenu/ContextMenu.vue +14 -0
- package/app/components/Ui/ContextMenu/Group.vue +12 -0
- package/app/components/Ui/ContextMenu/Item.vue +65 -0
- package/app/components/Ui/ContextMenu/ItemIndicator.vue +30 -0
- package/app/components/Ui/ContextMenu/Label.vue +35 -0
- package/app/components/Ui/ContextMenu/Portal.vue +12 -0
- package/app/components/Ui/ContextMenu/RadioGroup.vue +16 -0
- package/app/components/Ui/ContextMenu/RadioItem.vue +40 -0
- package/app/components/Ui/ContextMenu/Separator.vue +25 -0
- package/app/components/Ui/ContextMenu/Shortcut.vue +30 -0
- package/app/components/Ui/ContextMenu/Sub.vue +15 -0
- package/app/components/Ui/ContextMenu/SubContent.vue +55 -0
- package/app/components/Ui/ContextMenu/SubTrigger.vue +42 -0
- package/app/components/Ui/ContextMenu/Trigger.vue +12 -0
- package/app/components/Ui/Dialog/Close.vue +12 -0
- package/app/components/Ui/Dialog/Content.vue +79 -0
- package/app/components/Ui/Dialog/Description.vue +29 -0
- package/app/components/Ui/Dialog/Dialog.vue +14 -0
- package/app/components/Ui/Dialog/Footer.vue +32 -0
- package/app/components/Ui/Dialog/Header.vue +32 -0
- package/app/components/Ui/Dialog/Overlay.vue +25 -0
- package/app/components/Ui/Dialog/Portal.vue +12 -0
- package/app/components/Ui/Dialog/Title.vue +29 -0
- package/app/components/Ui/Dialog/Trigger.vue +12 -0
- package/app/components/Ui/Divider.vue +102 -0
- package/app/components/Ui/Drawer/Close.vue +12 -0
- package/app/components/Ui/Drawer/Content.vue +67 -0
- package/app/components/Ui/Drawer/Description.vue +33 -0
- package/app/components/Ui/Drawer/Drawer.vue +17 -0
- package/app/components/Ui/Drawer/Footer.vue +35 -0
- package/app/components/Ui/Drawer/Header.vue +34 -0
- package/app/components/Ui/Drawer/Overlay.vue +20 -0
- package/app/components/Ui/Drawer/Portal.vue +12 -0
- package/app/components/Ui/Drawer/Title.vue +35 -0
- package/app/components/Ui/Drawer/Trigger.vue +12 -0
- package/app/components/Ui/DropdownMenu/Arrow.vue +43 -0
- package/app/components/Ui/DropdownMenu/CheckboxItem.vue +41 -0
- package/app/components/Ui/DropdownMenu/Content.vue +56 -0
- package/app/components/Ui/DropdownMenu/DropdownMenu.vue +15 -0
- package/app/components/Ui/DropdownMenu/Group.vue +12 -0
- package/app/components/Ui/DropdownMenu/Item.vue +64 -0
- package/app/components/Ui/DropdownMenu/ItemIndicator.vue +32 -0
- package/app/components/Ui/DropdownMenu/Label.vue +34 -0
- package/app/components/Ui/DropdownMenu/Portal.vue +12 -0
- package/app/components/Ui/DropdownMenu/RadioGroup.vue +16 -0
- package/app/components/Ui/DropdownMenu/RadioItem.vue +40 -0
- package/app/components/Ui/DropdownMenu/Separator.vue +25 -0
- package/app/components/Ui/DropdownMenu/Shortcut.vue +44 -0
- package/app/components/Ui/DropdownMenu/Sub.vue +14 -0
- package/app/components/Ui/DropdownMenu/SubContent.vue +56 -0
- package/app/components/Ui/DropdownMenu/SubTrigger.vue +47 -0
- package/app/components/Ui/DropdownMenu/Trigger.vue +12 -0
- package/app/components/Ui/FancyIcon.vue +243 -0
- package/app/components/Ui/GradientDivider.vue +26 -0
- package/app/components/Ui/IframeLazy.vue +97 -0
- package/app/components/Ui/Input.vue +97 -0
- package/app/components/Ui/InputGroup/Addon.vue +66 -0
- package/app/components/Ui/InputGroup/Button.vue +50 -0
- package/app/components/Ui/InputGroup/Input.vue +25 -0
- package/app/components/Ui/InputGroup/InputGroup.vue +44 -0
- package/app/components/Ui/InputGroup/Text.vue +33 -0
- package/app/components/Ui/InputGroup/Textarea.vue +25 -0
- package/app/components/Ui/Kbd/Group.vue +32 -0
- package/app/components/Ui/Kbd/Kbd.vue +62 -0
- package/app/components/Ui/Label.vue +40 -0
- package/app/components/Ui/Popover/Anchor.vue +13 -0
- package/app/components/Ui/Popover/Arrow.vue +42 -0
- package/app/components/Ui/Popover/Close.vue +13 -0
- package/app/components/Ui/Popover/Content.vue +55 -0
- package/app/components/Ui/Popover/Popover.vue +15 -0
- package/app/components/Ui/Popover/Portal.vue +13 -0
- package/app/components/Ui/Popover/Trigger.vue +12 -0
- package/app/components/Ui/Popover/X.vue +38 -0
- package/app/components/Ui/ScrollArea/Corner.vue +12 -0
- package/app/components/Ui/ScrollArea/ScrollArea.vue +38 -0
- package/app/components/Ui/ScrollArea/Scrollbar.vue +39 -0
- package/app/components/Ui/ScrollArea/Thumb.vue +39 -0
- package/app/components/Ui/ScrollArea/Viewport.vue +27 -0
- package/app/components/Ui/Scrollspy.vue +61 -0
- package/app/components/Ui/Separator.vue +40 -0
- package/app/components/Ui/Skeleton.vue +39 -0
- package/app/components/Ui/Sonner.vue +25 -0
- package/app/components/Ui/Tabs/Content.vue +27 -0
- package/app/components/Ui/Tabs/Indicator.vue +37 -0
- package/app/components/Ui/Tabs/List.vue +37 -0
- package/app/components/Ui/Tabs/Tabs.vue +25 -0
- package/app/components/Ui/Tabs/Trigger.vue +41 -0
- package/app/components/Ui/Textarea.vue +81 -0
- package/app/components/Ui/Tooltip/Arrow.vue +30 -0
- package/app/components/Ui/Tooltip/Content.vue +50 -0
- package/app/components/Ui/Tooltip/Portal.vue +12 -0
- package/app/components/Ui/Tooltip/Provider.vue +14 -0
- package/app/components/Ui/Tooltip/Tooltip.vue +25 -0
- package/app/components/Ui/Tooltip/Trigger.vue +12 -0
- package/app/components/Ui/Tree/Item.vue +15 -0
- package/app/components/Ui/Tree/Tree.vue +15 -0
- package/app/components/Ui/Tree/Virtualizer.vue +13 -0
- package/app/components/component-api/ComponentApiSection.vue +135 -0
- package/app/components/content/docs/Callout/DocsCallout.vue +99 -0
- package/app/components/content/prose/ProseA.global.vue +31 -0
- package/app/components/content/prose/ProseBlockquote.global.vue +28 -0
- package/app/components/content/prose/ProseCallout.global.vue +306 -0
- package/app/components/content/prose/ProseCard.global.vue +100 -0
- package/app/components/content/prose/ProseCodeCollapse.global.vue +125 -0
- package/app/components/content/prose/ProseCodeCopy.global.vue +67 -0
- package/app/components/content/prose/ProseCodeGroup.global.vue +104 -0
- package/app/components/content/prose/ProseCodeTree.global.vue +277 -0
- package/app/components/content/prose/ProseCollapsible.global.vue +64 -0
- package/app/components/content/prose/ProseColorModeImage.global.vue +58 -0
- package/app/components/content/prose/ProseComponentApi.global.vue +104 -0
- package/app/components/content/prose/ProseComponentEvents.global.vue +27 -0
- package/app/components/content/prose/ProseComponentExposed.global.vue +27 -0
- package/app/components/content/prose/ProseComponentProps.global.vue +27 -0
- package/app/components/content/prose/ProseComponentSlots.global.vue +27 -0
- package/app/components/content/prose/ProseEm.global.vue +5 -0
- package/app/components/content/prose/ProseField.global.vue +118 -0
- package/app/components/content/prose/ProseFieldGroup.global.vue +62 -0
- package/app/components/content/prose/ProseH1.global.vue +58 -0
- package/app/components/content/prose/ProseH2.global.vue +58 -0
- package/app/components/content/prose/ProseH3.global.vue +58 -0
- package/app/components/content/prose/ProseH4.global.vue +58 -0
- package/app/components/content/prose/ProseH5.global.vue +47 -0
- package/app/components/content/prose/ProseH6.global.vue +47 -0
- package/app/components/content/prose/ProseHr.global.vue +33 -0
- package/app/components/content/prose/ProseIconList.global.vue +113 -0
- package/app/components/content/prose/ProseImg.global.vue +119 -0
- package/app/components/content/prose/ProseLead.global.vue +28 -0
- package/app/components/content/prose/ProseLi.global.vue +25 -0
- package/app/components/content/prose/ProseMermaid.global.vue +127 -0
- package/app/components/content/prose/ProseOl.global.vue +25 -0
- package/app/components/content/prose/ProseP.global.vue +25 -0
- package/app/components/content/prose/ProsePmInstall.global.vue +60 -0
- package/app/components/content/prose/ProsePmRun.global.vue +51 -0
- package/app/components/content/prose/ProsePmX.global.vue +56 -0
- package/app/components/content/prose/ProsePre.global.vue +181 -0
- package/app/components/content/prose/ProseShowCase.global.vue +56 -0
- package/app/components/content/prose/ProseSmartIcon.global.vue +54 -0
- package/app/components/content/prose/ProseStep.global.vue +22 -0
- package/app/components/content/prose/ProseSteps.global.vue +22 -0
- package/app/components/content/prose/ProseStrong.global.vue +34 -0
- package/app/components/content/prose/ProseTable.global.vue +34 -0
- package/app/components/content/prose/ProseTabs.global.vue +104 -0
- package/app/components/content/prose/ProseTabsInner.global.vue +274 -0
- package/app/components/content/prose/ProseTbody.global.vue +5 -0
- package/app/components/content/prose/ProseTd.global.vue +25 -0
- package/app/components/content/prose/ProseTh.global.vue +25 -0
- package/app/components/content/prose/ProseThead.global.vue +9 -0
- package/app/components/content/prose/ProseTr.global.vue +35 -0
- package/app/components/content/prose/ProseUl.global.vue +25 -0
- package/app/components/docs/DocsExtraStuff.vue +39 -0
- package/app/components/docs/DocsGithubLink.vue +11 -0
- package/app/components/docs/DocsHeader.vue +3 -0
- package/app/components/docs/DocsLogo.vue +74 -0
- package/app/components/docs/DocsMobileBar.vue +26 -0
- package/app/components/docs/DocsMobileNav.vue +49 -0
- package/app/components/docs/DocsNav.vue +161 -0
- package/app/components/docs/DocsPageTransition.vue +32 -0
- package/app/components/docs/DocsSearch.vue +220 -0
- package/app/components/docs/DocsSearchButton.vue +20 -0
- package/app/components/docs/DocsThemeCustomizer.vue +229 -0
- package/app/components/docs/DocsThemeToggler.vue +98 -0
- package/app/components/docs/DocsTocRail.vue +162 -0
- package/app/components/docs/DocsToclink.vue +52 -0
- package/app/components/docs/DocsZigZagRail.vue +70 -0
- package/app/components/landing/Hero.vue +222 -0
- package/app/components/page/PageFooter.vue +49 -0
- package/app/components/page/PageHeader.vue +68 -0
- package/app/components/page/PageHeaderLinks.vue +138 -0
- package/app/components/page/PageMobileToc.vue +162 -0
- package/app/components/page/PageToc.vue +33 -0
- package/app/composables/useDefaultSlotItems.ts +90 -0
- package/app/composables/useDocPage.ts +66 -0
- package/app/composables/useDocSearch.ts +23 -0
- package/app/composables/useDocd.ts +107 -0
- package/app/composables/useLogoAssets.ts +319 -0
- package/app/composables/usePm.ts +73 -0
- package/app/composables/useProseComponentMeta.ts +30 -0
- package/app/composables/useScrollspy.ts +327 -0
- package/app/composables/useSeo.ts +240 -0
- package/app/composables/useUIConfig.ts +36 -0
- package/app/layouts/default.vue +5 -0
- package/app/layouts/docs.vue +64 -0
- package/app/middleware/colorMode.global.ts +8 -0
- package/app/middleware/doc-page-layout.ts +11 -0
- package/app/middleware/landing-page-layout.ts +11 -0
- package/app/pages/[...slug].vue +63 -0
- package/app/plugins/mermaid.client.ts +35 -0
- package/app/plugins/navigation-direction.client.ts +15 -0
- package/app/plugins/theme-restore.client.ts +7 -0
- package/app/templates/landing.vue +40 -0
- package/app/transitions/presets.ts +71 -0
- package/app/types/prose-component-meta.d.ts +4 -0
- package/app/utils/og.ts +26 -0
- package/app/utils/prerender.ts +9 -0
- package/app/utils/translucent.ts +56 -0
- package/app/utils/tw-helper.ts +4 -0
- package/content.config.ts +81 -0
- package/index.d.ts +25 -0
- package/modules/config.ts +89 -0
- package/modules/custom-icons.ts +17 -0
- package/modules/markdown-rewrite.ts +96 -0
- package/modules/prose-component-meta.ts +150 -0
- package/modules/routing.ts +22 -0
- package/modules/skills/index.ts +167 -0
- package/modules/skills/runtime/server/routes/skills-files.ts +49 -0
- package/modules/skills/runtime/server/routes/skills-index.ts +8 -0
- package/nuxt.config.ts +96 -0
- package/nuxt.schema.ts +288 -0
- package/package.json +95 -0
- package/server/mcp/tools/get-page.ts +66 -0
- package/server/mcp/tools/list-pages.ts +61 -0
- package/server/routes/sitemap.xml.ts +73 -0
- package/server/utils/content.ts +3 -0
- package/tailwind.config.cjs +55 -0
- package/utils/component-api-content.ts +467 -0
- package/utils/component-api-discovery.ts +165 -0
- package/utils/component-api-schema.ts +28 -0
- package/utils/component-api.ts +243 -0
- package/utils/generate-prose-component-meta.ts +303 -0
- package/utils/git.ts +123 -0
- package/utils/meta.ts +40 -0
- 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,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,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,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>
|