@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
@@ -19,10 +19,14 @@ export const command = {
19
19
  recent: { de: "Zuletzt", en: "Recent" },
20
20
  pages: { de: "Navigation", en: "Navigation" },
21
21
  docs_nav: { de: "Docs-Navigation", en: "Docs Navigation" },
22
- blog: { de: "Blog-Ergebnisse", en: "Blog Results" },
23
- docs: { de: "Docs-Ergebnisse", en: "Docs Results" },
22
+ search: { de: "Suchergebnisse", en: "Search results" },
24
23
  actions: { de: "Aktionen", en: "Actions" },
25
24
  },
25
+ loading: { de: "Suche läuft …", en: "Searching…" },
26
+ error: {
27
+ de: "Die Suche ist gerade nicht verfügbar. Versuche es erneut.",
28
+ en: "Search is temporarily unavailable. Please try again.",
29
+ },
26
30
  pages: {
27
31
  home: {
28
32
  title: { de: "Start", en: "Home" },
@@ -14,6 +14,8 @@ export const docs = {
14
14
  copiedText: { de: "Text kopiert", en: "Copied text" },
15
15
  copyFailed: { de: "Kopieren fehlgeschlagen", en: "Copy failed" },
16
16
  codeSample: { de: "Codebeispiel", en: "Code sample" },
17
+ showAllLines: { de: "Alle {count} Zeilen anzeigen", en: "Show all {count} lines" },
18
+ showMore: { de: "Mehr anzeigen", en: "Show more" },
17
19
  zoomImage: { de: "Bild vergrößern", en: "Zoom image" },
18
20
  moreActions: { de: "Weitere Seitenaktionen", en: "More page actions" },
19
21
  copyLink: { de: "Markdown-Link kopieren", en: "Copy Markdown link" },
@@ -22,6 +24,7 @@ export const docs = {
22
24
  askClaude: { de: "In Claude öffnen", en: "Open in Claude" },
23
25
  copyMcpUrl: { de: "MCP-Server-URL kopieren", en: "Copy MCP server URL" },
24
26
  contribute: { de: "Zu dieser Seite beitragen", en: "Contribute to this page" },
27
+ backToTop: { de: "Nach oben", en: "Back to top" },
25
28
  editPage: { de: "Diese Seite bearbeiten", en: "Edit this page" },
26
29
  reportIssue: { de: "Problem melden", en: "Report an issue" },
27
30
  issueTitle: { de: "Dokumentation: {title}", en: "Docs: {title}" },
@@ -3,8 +3,12 @@ export const nav = {
3
3
  home: { de: "Startseite", en: "Home" },
4
4
  main: { de: "Hauptnavigation", en: "Main navigation" },
5
5
  mobile: { de: "Mobile Navigation", en: "Mobile navigation" },
6
- navigationSection: { de: "Navigation", en: "Navigation" },
7
- settingsHelp: { de: "Einstellungen & Hilfe", en: "Settings & Help" },
6
+ menu: { de: "Menü", en: "Menu" },
7
+ docsDescription: {
8
+ de: "Anleitungen, Komponenten, Referenz",
9
+ en: "Guides, components, reference",
10
+ },
11
+ blogDescription: { de: "Releases und Artikel", en: "Releases and writing" },
8
12
  language: { de: "Sprache wechseln", en: "Change language" },
9
13
  openMenu: { de: "Menü öffnen", en: "Open menu" },
10
14
  closeMenu: { de: "Menü schließen", en: "Close menu" },
@@ -1,19 +1,19 @@
1
1
  import { type LocaleCode, localeCodes } from "../locales";
2
2
  import { localizedRoutes } from "../routes";
3
+ import { globalMessages } from "./global";
3
4
  import { localizeMessages } from "./localize";
4
- import { messageSource } from "./source";
5
5
 
6
6
  export const messages = localeCodes.reduce(
7
7
  (localizedMessages, locale) => {
8
8
  localizedMessages[locale] = {
9
- ...localizeMessages(messageSource, locale),
9
+ ...localizeMessages(globalMessages, locale),
10
10
  routes: localizedRoutes[locale],
11
11
  };
12
12
  return localizedMessages;
13
13
  },
14
14
  {} as Record<
15
15
  LocaleCode,
16
- ReturnType<typeof localizeMessages<typeof messageSource>> & {
16
+ ReturnType<typeof localizeMessages<typeof globalMessages>> & {
17
17
  routes: (typeof localizedRoutes)[LocaleCode];
18
18
  }
19
19
  >,
package/icon-bundle.ts CHANGED
@@ -12,12 +12,14 @@ export const layerIconNames = [
12
12
  "logos:yarn",
13
13
  "lucide:arrow-left",
14
14
  "lucide:arrow-right",
15
+ "lucide:arrow-up",
15
16
  "lucide:arrow-up-right",
16
17
  "lucide:atom",
17
18
  "lucide:badge-check",
18
19
  "lucide:blocks",
19
20
  "lucide:book-open",
20
21
  "lucide:bookmark",
22
+ "lucide:calendar",
21
23
  "lucide:braces",
22
24
  "lucide:building-2",
23
25
  "lucide:check",
@@ -41,6 +43,8 @@ export const layerIconNames = [
41
43
  "lucide:file-json",
42
44
  "lucide:file-key",
43
45
  "lucide:file-text",
46
+ "lucide:folder",
47
+ "lucide:folder-open",
44
48
  "lucide:git-branch",
45
49
  "lucide:github",
46
50
  "lucide:hash",
@@ -49,6 +53,7 @@ export const layerIconNames = [
49
53
  "lucide:lightbulb",
50
54
  "lucide:link",
51
55
  "lucide:linkedin",
56
+ "lucide:loader-circle",
52
57
  "lucide:list",
53
58
  "lucide:menu",
54
59
  "lucide:message-circle",
package/index.d.ts CHANGED
@@ -1,12 +1,18 @@
1
1
  import type { GinkoDocsAppConfig } from "./shared/types/app-config";
2
2
 
3
+ type GinkoDocsAppConfigInput<T> = T extends readonly unknown[]
4
+ ? T
5
+ : T extends object
6
+ ? { [Key in keyof T]?: GinkoDocsAppConfigInput<T[Key]> }
7
+ : T;
8
+
3
9
  declare module "nuxt/schema" {
4
10
  interface AppConfig {
5
11
  ginkoDocs: GinkoDocsAppConfig;
6
12
  }
7
13
 
8
14
  interface AppConfigInput {
9
- ginkoDocs?: Partial<GinkoDocsAppConfig>;
15
+ ginkoDocs?: GinkoDocsAppConfigInput<GinkoDocsAppConfig>;
10
16
  }
11
17
  }
12
18
 
package/nuxt.config.ts CHANGED
@@ -41,7 +41,7 @@ export default defineNuxtConfig({
41
41
  },
42
42
  mcp: {
43
43
  name: "Ginko Docs",
44
- version: "0.2.2",
44
+ version: "0.2.3",
45
45
  },
46
46
  components: {
47
47
  dirs: [
@@ -69,7 +69,6 @@ export default defineNuxtConfig({
69
69
  { path: join(app, "components/prose"), pathPrefix: false, global: true },
70
70
  ],
71
71
  },
72
- imports: { autoImport: false },
73
72
  colorMode: { classSuffix: "" },
74
73
  icon: {
75
74
  provider: "none",
@@ -181,6 +180,7 @@ export default defineNuxtConfig({
181
180
  "@vueuse/core",
182
181
  "class-variance-authority",
183
182
  "clsx",
183
+ "motion-v",
184
184
  "reka-ui",
185
185
  "tailwind-merge",
186
186
  "zod",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lupinum/ginko-docs",
3
- "version": "0.2.2",
4
- "description": "A polished Nuxt documentation layer powered by Ginko Content.",
3
+ "version": "0.2.3",
4
+ "description": "A Nuxt documentation layer powered by Ginko Content.",
5
5
  "keywords": [
6
6
  "content",
7
7
  "documentation",
@@ -57,7 +57,7 @@
57
57
  "@nuxt/fonts": "^0.14.0",
58
58
  "@nuxt/icon": "^2.2.3",
59
59
  "@nuxt/image": "^2.0.0",
60
- "@nuxt/kit": "^4.4.6",
60
+ "@nuxt/kit": "^4.4.7",
61
61
  "@nuxt/scripts": "^0.13.2",
62
62
  "@nuxtjs/color-mode": "^4.0.0",
63
63
  "@nuxtjs/i18n": "^10.4.0",
@@ -70,7 +70,7 @@
70
70
  "@vueuse/core": "^14.2.1",
71
71
  "class-variance-authority": "^0.7.1",
72
72
  "clsx": "^2.1.1",
73
- "h3": "^1.15.4",
73
+ "motion-v": "^2.3.0",
74
74
  "nitropack": "^2.13.4",
75
75
  "nuxt-og-image": "^6.7.2",
76
76
  "reka-ui": "^2.9.2",
@@ -82,10 +82,13 @@
82
82
  "zod": "^4.4.3"
83
83
  },
84
84
  "peerDependencies": {
85
- "@lupinum/ginko-content": ">=0.3.0-rc.2 <0.4.0",
86
- "nuxt": "^4.4.6",
85
+ "@lupinum/ginko-content": ">=0.3.2 <0.4.0",
86
+ "nuxt": ">=4.4.7 <5",
87
87
  "vue": "^3.5.35",
88
88
  "vue-router": "^5.1.0"
89
89
  },
90
+ "engines": {
91
+ "node": "^22.18.0 || ^24.11.0 || >=26.0.0"
92
+ },
90
93
  "scripts": {}
91
94
  }
@@ -8,8 +8,6 @@ import { contentComponentTags } from "../../tags";
8
8
  const renderXmlComponent: AgentMarkdownSerializer = (node, ctx) =>
9
9
  ctx.xmlComponent(node.tag || "component", ctx.cleanProps(node), ctx.renderChildren(node));
10
10
 
11
- export const contentComponentAgentMarkdownTags = Object.keys(contentComponentTags);
12
-
13
11
  export function registerContentComponentAgentMarkdownSerializers() {
14
12
  const serializers: AgentMarkdownSerializerMap = {};
15
13
  for (const [tag, component] of Object.entries(contentComponentTags)) {
@@ -0,0 +1,37 @@
1
+ export const GINKO_DOCS_NEUTRAL_PALETTES = [
2
+ "slate",
3
+ "gray",
4
+ "zinc",
5
+ "neutral",
6
+ "stone",
7
+ "taupe",
8
+ "mauve",
9
+ "mist",
10
+ "olive",
11
+ "custom",
12
+ ] as const;
13
+
14
+ export const GINKO_DOCS_PRIMARY_PALETTES = [
15
+ "neutral",
16
+ "red",
17
+ "orange",
18
+ "amber",
19
+ "yellow",
20
+ "lime",
21
+ "green",
22
+ "emerald",
23
+ "teal",
24
+ "cyan",
25
+ "sky",
26
+ "blue",
27
+ "indigo",
28
+ "violet",
29
+ "purple",
30
+ "fuchsia",
31
+ "pink",
32
+ "rose",
33
+ "custom",
34
+ ] as const;
35
+
36
+ export type GinkoDocsNeutralPalette = (typeof GINKO_DOCS_NEUTRAL_PALETTES)[number];
37
+ export type GinkoDocsPrimaryPalette = (typeof GINKO_DOCS_PRIMARY_PALETTES)[number];
@@ -1,13 +1,53 @@
1
- export type GinkoDocsLocalizedText = { en: string; de?: string };
1
+ export type { GinkoDocsNeutralPalette, GinkoDocsPrimaryPalette } from "../theme-palettes";
2
+ import type { GinkoDocsNeutralPalette, GinkoDocsPrimaryPalette } from "../theme-palettes";
3
+
4
+ export type GinkoDocsLocalizedText = string | { en: string; de?: string };
5
+
6
+ export type GinkoDocsProseAppearance = "quiet" | "tint";
7
+ export type GinkoDocsProseFamily =
8
+ | "callout"
9
+ | "aside"
10
+ | "excerpt"
11
+ | "cards"
12
+ | "readMore"
13
+ | "accordion"
14
+ | "tabs"
15
+ | "code"
16
+ | "files"
17
+ | "api"
18
+ | "figure"
19
+ | "quiz"
20
+ | "steps"
21
+ | "timeline";
22
+
23
+ export interface GinkoDocsProseConfig {
24
+ appearance: GinkoDocsProseAppearance;
25
+ components?: Partial<Record<GinkoDocsProseFamily, GinkoDocsProseAppearance>>;
26
+ }
2
27
 
3
28
  export interface GinkoDocsLink {
4
29
  label: GinkoDocsLocalizedText;
5
30
  to: GinkoDocsLocalizedText;
31
+ /** Iconify icon shown where nav items render with icons (e.g. mobile menu). */
32
+ icon?: string;
33
+ /** One-line subtitle shown under the label in the mobile menu. */
34
+ description?: GinkoDocsLocalizedText;
35
+ }
36
+
37
+ export interface GinkoDocsHeroCodeTab {
38
+ label: GinkoDocsLocalizedText;
39
+ /** Iconify icon shown in the tab. */
40
+ icon?: string;
41
+ filename?: string;
42
+ /** Shiki language id; derived from the filename extension when unset. */
43
+ language?: string;
44
+ code: string;
6
45
  }
7
46
 
8
47
  export type GinkoDocsHeroMedia =
9
48
  | { type: "image"; src: string; alt: string }
10
- | { type: "code"; code: string; language?: string; filename?: string };
49
+ | { type: "code"; code: string; language?: string; filename?: string }
50
+ | { type: "code-tabs"; tabs: GinkoDocsHeroCodeTab[] };
11
51
 
12
52
  export type GinkoDocsPlausibleExtension =
13
53
  | "hash"
@@ -21,12 +61,16 @@ export type GinkoDocsPlausibleExtension =
21
61
  | "manual";
22
62
 
23
63
  export interface GinkoDocsAppConfig {
64
+ theme: {
65
+ neutral: GinkoDocsNeutralPalette;
66
+ primary: GinkoDocsPrimaryPalette;
67
+ };
68
+ prose: GinkoDocsProseConfig;
24
69
  site: {
25
70
  name: GinkoDocsLocalizedText;
26
71
  description: GinkoDocsLocalizedText;
27
72
  url: string;
28
73
  logo: { light: string; dark: string };
29
- localeSwitcher: "dropdown" | "segmented";
30
74
  docsSidebarSwitcher: "dropdown" | "list" | "tabs";
31
75
  lupinumAttribution: boolean;
32
76
  };
@@ -35,8 +79,7 @@ export interface GinkoDocsAppConfig {
35
79
  links: "auto" | GinkoDocsLink[];
36
80
  };
37
81
  banner: {
38
- /** "auto" shows the banner when blog routes exist (legacy behavior). */
39
- enabled: boolean | "auto";
82
+ enabled: boolean;
40
83
  /** Dismissal storage key — change it to re-show the banner after an update. */
41
84
  id: string;
42
85
  text?: GinkoDocsLocalizedText;
@@ -83,7 +126,6 @@ export interface GinkoDocsAppConfig {
83
126
  contentDirectory?: string;
84
127
  };
85
128
  landing: {
86
- eyebrow?: GinkoDocsLocalizedText;
87
129
  title: GinkoDocsLocalizedText;
88
130
  description: GinkoDocsLocalizedText;
89
131
  primary: GinkoDocsLink;
@@ -91,10 +133,25 @@ export interface GinkoDocsAppConfig {
91
133
  hero?: {
92
134
  media?: GinkoDocsHeroMedia;
93
135
  };
136
+ /** Copyable install command shown under the hero CTAs. */
137
+ install?: { command: string };
94
138
  features: Array<{
95
139
  title: GinkoDocsLocalizedText;
96
140
  description: GinkoDocsLocalizedText;
97
141
  icon?: string;
98
142
  }>;
143
+ /** Dark full-width band highlighting agent readiness. */
144
+ agent?: {
145
+ title: GinkoDocsLocalizedText;
146
+ description: GinkoDocsLocalizedText;
147
+ /** Terminal transcript; "$"-prefixed lines render as commands, "#" as comments. */
148
+ code: string;
149
+ };
150
+ /** Closing call to action; primary falls back to landing.primary. */
151
+ cta?: {
152
+ title: GinkoDocsLocalizedText;
153
+ primary?: GinkoDocsLink;
154
+ secondary?: GinkoDocsLink;
155
+ };
99
156
  };
100
157
  }
package/tags.ts CHANGED
@@ -3,42 +3,36 @@ import type { PortableComponentPolicyV1 } from "@lupinum/ginko-content/cms-contr
3
3
  export const contentComponentTags = {
4
4
  accordion: "MdcAccordion",
5
5
  "accordion-item": "MdcAccordionItem",
6
- alert: "MdcAlert",
6
+ api: "MdcApi",
7
7
  aside: "MdcAside",
8
- callout: "MdcCallout",
9
8
  card: "MdcCard",
10
- "card-group": "MdcCardGroup",
9
+ cards: "MdcCards",
11
10
  center: "MdcCenter",
12
11
  "code-group": "MdcCodeGroup",
12
+ "code-tree": "MdcCodeTree",
13
+ collapse: "MdcCollapse",
13
14
  column: "MdcColumn",
14
- danger: "MdcError",
15
- "doc-img": "MdcDocImg",
16
15
  dropcap: "MdcDropcap",
17
16
  error: "MdcError",
18
- field: "MdcField",
19
- "field-group": "MdcFieldGroup",
17
+ excerpt: "MdcExcerpt",
20
18
  figure: "MdcFigure",
19
+ files: "MdcFiles",
21
20
  idea: "MdcIdea",
22
21
  img: "ProseImg",
23
22
  info: "MdcInfo",
24
- kbd: "MdcShortcut",
23
+ kbd: "MdcKbd",
25
24
  layout: "MdcLayout",
26
25
  note: "MdcNote",
27
- passage: "MdcPassage",
28
26
  quiz: "MdcQuiz",
29
- "quiz-option": "MdcQuizOption",
30
27
  "quiz-question": "MdcQuizQuestion",
31
28
  "read-more": "MdcReadMore",
32
- "read-more-group": "MdcReadMoreGroup",
33
- shortcut: "MdcShortcut",
34
- step: "MdcStep",
35
29
  steps: "MdcSteps",
36
30
  success: "MdcSuccess",
37
31
  tab: "MdcTab",
38
32
  tabs: "MdcTabs",
39
33
  timeline: "MdcTimeline",
40
34
  "timeline-item": "MdcTimelineItem",
41
- warn: "MdcWarning",
35
+ toc: "MdcInlineToc",
42
36
  warning: "MdcWarning",
43
37
  } as const;
44
38
 
@@ -59,12 +53,13 @@ const inline = (props: ComponentProps = {}): ComponentDefinition => ({
59
53
  media: null,
60
54
  });
61
55
 
62
- const notice = block({ title: optional("string"), icon: optional("string") });
63
- const shortcut = inline({ value: optional("string"), size: optional("string") });
56
+ const appearance = { appearance: optional("string") };
57
+ const notice = block({ title: optional("string"), icon: optional("string"), ...appearance });
64
58
 
65
59
  export const contentComponentPolicy = {
66
60
  components: {
67
61
  accordion: block({
62
+ ...appearance,
68
63
  type: optional("string"),
69
64
  collapsible: optional("boolean"),
70
65
  defaultValue: optional("json"),
@@ -77,17 +72,15 @@ export const contentComponentPolicy = {
77
72
  },
78
73
  ["default", "title", "content"],
79
74
  ),
80
- alert: block({
75
+ api: block({
76
+ ...appearance,
81
77
  title: optional("string"),
82
78
  icon: optional("string"),
83
- type: optional("string"),
84
- }),
85
- aside: block({ label: optional("string") }),
86
- callout: block({
87
- title: optional("string"),
88
- type: optional("string"),
89
- icon: optional("string"),
79
+ method: optional("string"),
80
+ path: optional("string"),
81
+ groups: optional("json"),
90
82
  }),
83
+ aside: block({ label: optional("string"), ...appearance }),
91
84
  card: block(
92
85
  {
93
86
  title: optional("string"),
@@ -100,32 +93,31 @@ export const contentComponentPolicy = {
100
93
  img: optional("asset"),
101
94
  showLinkIcon: optional("boolean"),
102
95
  horizontal: optional("boolean"),
96
+ ...appearance,
103
97
  },
104
98
  ["default", "title", "description", "footer"],
105
99
  { sourceProp: "img", altProp: null, titleProp: null, filenameProp: null },
106
100
  ),
107
- "card-group": block({ cols: optional("string") }),
101
+ cards: block({ cols: optional("string"), ...appearance }),
108
102
  center: block({
109
103
  size: optional("string"),
110
104
  max: optional("string"),
111
105
  type: optional("string"),
112
106
  }),
113
- "code-group": block(),
107
+ "code-group": block(appearance),
108
+ "code-tree": block({
109
+ ...appearance,
110
+ defaultValue: optional("string"),
111
+ expandAll: optional("boolean"),
112
+ }),
113
+ collapse: block(appearance),
114
114
  column: block({ size: optional("string") }),
115
- danger: notice,
116
- "doc-img": block({ bleed: optional("string") }),
117
115
  dropcap: block({ lines: optional("json") }),
118
116
  error: notice,
119
- field: block({
120
- name: required("string"),
121
- type: optional("string"),
122
- required: optional("boolean"),
123
- description: optional("string"),
124
- defaultValue: optional("string"),
125
- }),
126
- "field-group": block(),
117
+ excerpt: block({ label: optional("string"), source: optional("string"), ...appearance }),
127
118
  figure: block(
128
119
  {
120
+ ...appearance,
129
121
  src: required("asset"),
130
122
  alt: required("string"),
131
123
  caption: optional("string"),
@@ -134,17 +126,19 @@ export const contentComponentPolicy = {
134
126
  bleed: optional("string"),
135
127
  aspect: optional("string"),
136
128
  fit: optional("string"),
129
+ zoom: optional("json"),
137
130
  },
138
131
  ["default"],
139
132
  { sourceProp: "src", altProp: "alt", titleProp: null, filenameProp: null },
140
133
  ),
134
+ files: block({ active: optional("string"), annotations: optional("json"), ...appearance }),
141
135
  idea: notice,
142
136
  info: notice,
143
- kbd: shortcut,
137
+ kbd: inline(),
144
138
  layout: block({ type: optional("string") }),
145
139
  note: notice,
146
- passage: block({ label: optional("string") }),
147
140
  quiz: block({
141
+ ...appearance,
148
142
  title: optional("string"),
149
143
  description: optional("string"),
150
144
  questionLabel: optional("string"),
@@ -156,44 +150,38 @@ export const contentComponentPolicy = {
156
150
  retryPrompt: optional("string"),
157
151
  resetLabel: optional("string"),
158
152
  }),
159
- "quiz-option": block({
160
- correct: optional("boolean"),
161
- label: optional("string"),
162
- }),
163
153
  "quiz-question": block({
164
154
  question: required("string"),
165
155
  type: optional("string"),
166
156
  explanation: optional("string"),
167
- options: optional("json"),
157
+ options: required("json"),
168
158
  checkLabel: optional("string"),
169
159
  correctLabel: optional("string"),
170
160
  incorrectLabel: optional("string"),
171
161
  resetLabel: optional("string"),
172
162
  multipleChoiceLabel: optional("string"),
173
163
  }),
174
- "read-more": block(
175
- {
176
- title: optional("string"),
177
- to: required("string"),
178
- target: optional("string"),
179
- icon: optional("string"),
180
- },
181
- [],
182
- ),
183
- "read-more-group": block(),
184
- shortcut,
185
- step: block({ title: optional("string"), icon: optional("string") }),
186
- steps: block({ variant: optional("string") }),
164
+ "read-more": block({ title: optional("string"), links: required("json"), ...appearance }, []),
165
+ steps: block({ mode: optional("string"), ...appearance }),
187
166
  success: notice,
188
167
  tab: block({ icon: optional("string"), label: optional("string") }),
189
- tabs: block({ variant: optional("string"), padded: optional("boolean") }),
190
- timeline: block(),
168
+ tabs: block({ layout: optional("string"), padded: optional("boolean"), ...appearance }),
169
+ timeline: block(appearance),
191
170
  "timeline-item": block({
192
171
  date: optional("string"),
193
172
  label: optional("string"),
194
173
  title: optional("string"),
174
+ icon: optional("string"),
175
+ active: optional("boolean"),
195
176
  }),
196
- warn: notice,
177
+ toc: block(
178
+ {
179
+ title: optional("string"),
180
+ depth: optional("json"),
181
+ open: optional("json"),
182
+ },
183
+ [],
184
+ ),
197
185
  warning: notice,
198
186
  },
199
187
  } satisfies PortableComponentPolicyV1;
@@ -1,34 +0,0 @@
1
- <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue";
3
- import { computed } from "vue";
4
- import MdcCallout from "./MdcCallout.vue";
5
-
6
- type AlertType = "default" | "info" | "warning" | "success" | "danger" | "secondary";
7
- type CalloutType = "info" | "warning" | "error" | "success" | "idea";
8
-
9
- const props = withDefaults(
10
- defineProps<{
11
- title?: string;
12
- icon?: string;
13
- type?: AlertType;
14
- class?: HTMLAttributes["class"];
15
- }>(),
16
- {
17
- type: "warning",
18
- },
19
- );
20
-
21
- const calloutType = computed<CalloutType>(() => {
22
- if (props.type === "danger") return "error";
23
- if (props.type === "success") return "success";
24
- if (props.type === "info" || props.type === "secondary") return "info";
25
-
26
- return "warning";
27
- });
28
- </script>
29
-
30
- <template>
31
- <MdcCallout :title="title" :icon="icon" :type="calloutType" :class="props.class">
32
- <slot />
33
- </MdcCallout>
34
- </template>
@@ -1,47 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed, provide, type HTMLAttributes } from "vue";
3
- import { cn } from "../../utils";
4
-
5
- const props = withDefaults(
6
- defineProps<{
7
- cols?: 1 | 2 | 3 | 4 | 5 | 6 | "1" | "2" | "3" | "4" | "5" | "6";
8
- class?: HTMLAttributes["class"];
9
- }>(),
10
- {
11
- cols: 2,
12
- },
13
- );
14
-
15
- provide("contentCardInGroup", true);
16
-
17
- const colsClass = {
18
- 1: "sm:grid-cols-1",
19
- 2: "sm:grid-cols-2",
20
- 3: "sm:grid-cols-3",
21
- 4: "sm:grid-cols-4",
22
- 5: "sm:grid-cols-5",
23
- 6: "sm:grid-cols-6",
24
- } as const;
25
-
26
- const normalizedCols = computed<keyof typeof colsClass>(() => {
27
- const cols = Number(props.cols);
28
-
29
- return cols === 1 || cols === 2 || cols === 3 || cols === 4 || cols === 5 || cols === 6
30
- ? cols
31
- : 2;
32
- });
33
- </script>
34
-
35
- <template>
36
- <div
37
- :class="
38
- cn(
39
- 'content-card-group not-prose my-4 grid grid-cols-1 items-start gap-2',
40
- colsClass[normalizedCols],
41
- props.class,
42
- )
43
- "
44
- >
45
- <slot />
46
- </div>
47
- </template>