@lupinum/ginko-docs 0.4.0-rc.9 → 0.5.0

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 (304) hide show
  1. package/CHANGELOG.md +141 -0
  2. package/LICENSE +1 -1
  3. package/README.md +300 -53
  4. package/app/app.config.ts +44 -55
  5. package/app/assets/docs.css +619 -0
  6. package/app/components/DocsBanner.vue +29 -0
  7. package/app/components/DocsExample.vue +43 -0
  8. package/app/components/DocsFooter.vue +19 -0
  9. package/app/components/DocsHeader.vue +113 -0
  10. package/app/components/DocsIcon.vue +12 -0
  11. package/app/components/DocsLanding.vue +58 -0
  12. package/app/components/DocsLanguage.vue +40 -0
  13. package/app/components/DocsNavSheet.vue +37 -0
  14. package/app/components/DocsNavTree.vue +38 -0
  15. package/app/components/DocsPage.vue +88 -0
  16. package/app/components/DocsPageActions.vue +47 -0
  17. package/app/components/DocsPageEnd.ts +12 -0
  18. package/app/components/DocsPost.vue +58 -0
  19. package/app/components/DocsSearch.vue +136 -0
  20. package/app/components/DocsShell.vue +36 -0
  21. package/app/components/DocsSidebar.vue +19 -0
  22. package/app/components/DocsSidebarEnd.ts +4 -0
  23. package/app/components/DocsTable.vue +11 -0
  24. package/app/components/DocsThemeToggle.vue +45 -0
  25. package/app/components/DocsToc.vue +73 -0
  26. package/app/composables/useDocs.ts +53 -0
  27. package/app/composables/useDocsBlog.ts +33 -0
  28. package/app/composables/useDocsCopy.ts +17 -0
  29. package/app/composables/useDocsFrame.ts +11 -0
  30. package/app/composables/useDocsPopover.ts +36 -0
  31. package/app/composables/useDocsSite.ts +31 -0
  32. package/app/docs-pages/blog.vue +55 -0
  33. package/app/docs-pages/changelog.vue +35 -0
  34. package/app/docs-pages/doc.vue +16 -0
  35. package/app/docs-pages/docs.vue +9 -0
  36. package/app/docs-pages/index.vue +12 -0
  37. package/app/docs-pages/post.vue +8 -0
  38. package/app/error.vue +38 -115
  39. package/app/layouts/default.vue +29 -7
  40. package/app/lib/blogTypes.ts +8 -0
  41. package/app/lib/docsFirst.ts +11 -0
  42. package/app/lib/docsInit.ts +18 -0
  43. package/app/lib/docsNav.ts +36 -0
  44. package/app/lib/docsPage.ts +84 -0
  45. package/app/lib/markdownComponents.ts +15 -0
  46. package/app/lib/previewToc.ts +18 -0
  47. package/dist/config.d.mts +252 -0
  48. package/dist/config.d.ts +252 -0
  49. package/dist/config.mjs +83 -0
  50. package/dist/icons.d.mts +38 -0
  51. package/dist/icons.d.ts +38 -0
  52. package/dist/icons.mjs +175 -0
  53. package/dist/pages.d.mts +5 -0
  54. package/dist/pages.d.ts +5 -0
  55. package/dist/pages.mjs +68 -0
  56. package/i18n/de.json +1 -0
  57. package/i18n/en.json +1 -0
  58. package/i18n/fr.json +1 -0
  59. package/icons/README.md +2 -0
  60. package/icons/bluesky.svg +1 -0
  61. package/icons/claude.svg +1 -0
  62. package/icons/discord.svg +1 -0
  63. package/icons/github.svg +1 -0
  64. package/icons/linkedin.svg +1 -0
  65. package/icons/mastodon.svg +1 -0
  66. package/icons/openai.svg +1 -0
  67. package/icons/x.svg +1 -0
  68. package/icons/youtube.svg +1 -0
  69. package/nuxt.config.ts +22 -212
  70. package/package.json +44 -76
  71. package/public/_docs/fonts/LICENSE +188 -0
  72. package/public/_docs/fonts/inter-latin-wght-normal.woff2 +0 -0
  73. package/public/_docs/fonts/jetbrains-mono-latin-400-normal.woff2 +0 -0
  74. package/public/_docs/fonts/jetbrains-mono-latin-500-normal.woff2 +0 -0
  75. package/server/feeds/blog-locale.get.ts +9 -0
  76. package/server/feeds/blog.get.ts +4 -0
  77. package/server/lib/blogFeed.ts +35 -0
  78. package/server/mcp/handler.ts +108 -0
  79. package/server/routes/__ginko/docs-mcp.ts +35 -0
  80. package/shared/layerRoutes.ts +66 -0
  81. package/shared/paths.ts +4 -0
  82. package/app/app.vue +0 -98
  83. package/app/assets/css/prose.css +0 -3240
  84. package/app/assets/css/tailwind.css +0 -394
  85. package/app/assets/css/theme-palettes.css +0 -309
  86. package/app/assets/css/theme-presets.css +0 -141
  87. package/app/components/OgImage/GinkoDocs.satori.vue +0 -238
  88. package/app/components/content/DocumentPageShell.vue +0 -55
  89. package/app/components/content/Feedback.vue +0 -102
  90. package/app/components/content/ImageZoomDialog.vue +0 -84
  91. package/app/components/content/PageMarkdownCopy.vue +0 -104
  92. package/app/components/content/imageZoom.ts +0 -25
  93. package/app/components/mdc/MdcAccordion.vue +0 -67
  94. package/app/components/mdc/MdcAccordionItem.vue +0 -42
  95. package/app/components/mdc/MdcApi.vue +0 -159
  96. package/app/components/mdc/MdcAside.vue +0 -23
  97. package/app/components/mdc/MdcCallout.vue +0 -61
  98. package/app/components/mdc/MdcCard.vue +0 -175
  99. package/app/components/mdc/MdcCards.vue +0 -30
  100. package/app/components/mdc/MdcCenter.vue +0 -71
  101. package/app/components/mdc/MdcCodeGroup.vue +0 -197
  102. package/app/components/mdc/MdcCodeTree.vue +0 -234
  103. package/app/components/mdc/MdcCollapse.vue +0 -61
  104. package/app/components/mdc/MdcColumn.vue +0 -70
  105. package/app/components/mdc/MdcDropcap.vue +0 -84
  106. package/app/components/mdc/MdcError.vue +0 -23
  107. package/app/components/mdc/MdcExcerpt.vue +0 -26
  108. package/app/components/mdc/MdcFigure.vue +0 -85
  109. package/app/components/mdc/MdcFiles.vue +0 -120
  110. package/app/components/mdc/MdcIdea.vue +0 -17
  111. package/app/components/mdc/MdcInfo.vue +0 -17
  112. package/app/components/mdc/MdcInlineToc.vue +0 -51
  113. package/app/components/mdc/MdcKbd.vue +0 -10
  114. package/app/components/mdc/MdcLayout.vue +0 -57
  115. package/app/components/mdc/MdcNote.vue +0 -17
  116. package/app/components/mdc/MdcQuiz.vue +0 -241
  117. package/app/components/mdc/MdcQuizQuestion.vue +0 -221
  118. package/app/components/mdc/MdcReadMore.vue +0 -70
  119. package/app/components/mdc/MdcSteps.vue +0 -59
  120. package/app/components/mdc/MdcSuccess.vue +0 -23
  121. package/app/components/mdc/MdcTab.vue +0 -17
  122. package/app/components/mdc/MdcTabs.vue +0 -150
  123. package/app/components/mdc/MdcTimeline.vue +0 -17
  124. package/app/components/mdc/MdcTimelineItem.vue +0 -40
  125. package/app/components/mdc/MdcWarning.vue +0 -23
  126. package/app/components/mdc/api.utils.ts +0 -132
  127. package/app/components/mdc/code-tree.utils.ts +0 -22
  128. package/app/components/mdc/icons.ts +0 -10
  129. package/app/components/mdc/quiz.utils.ts +0 -38
  130. package/app/components/prose/ProseA.vue +0 -27
  131. package/app/components/prose/ProseBlockquote.vue +0 -30
  132. package/app/components/prose/ProseCode.vue +0 -14
  133. package/app/components/prose/ProseEm.vue +0 -14
  134. package/app/components/prose/ProseH1.vue +0 -18
  135. package/app/components/prose/ProseH2.vue +0 -29
  136. package/app/components/prose/ProseH3.vue +0 -29
  137. package/app/components/prose/ProseH4.vue +0 -29
  138. package/app/components/prose/ProseH5.vue +0 -15
  139. package/app/components/prose/ProseH6.vue +0 -15
  140. package/app/components/prose/ProseHr.vue +0 -12
  141. package/app/components/prose/ProseImg.vue +0 -55
  142. package/app/components/prose/ProseLi.vue +0 -14
  143. package/app/components/prose/ProseOl.vue +0 -14
  144. package/app/components/prose/ProseP.vue +0 -14
  145. package/app/components/prose/ProsePre.vue +0 -180
  146. package/app/components/prose/ProseStrong.vue +0 -14
  147. package/app/components/prose/ProseTable.vue +0 -18
  148. package/app/components/prose/ProseTbody.vue +0 -14
  149. package/app/components/prose/ProseTd.vue +0 -14
  150. package/app/components/prose/ProseTh.vue +0 -14
  151. package/app/components/prose/ProseThead.vue +0 -14
  152. package/app/components/prose/ProseTr.vue +0 -14
  153. package/app/components/prose/ProseUl.vue +0 -14
  154. package/app/components/site/ModeToggle.vue +0 -81
  155. package/app/components/site/SiteBanner.vue +0 -97
  156. package/app/components/site/SiteFooter.vue +0 -90
  157. package/app/components/site/SiteHeader.vue +0 -371
  158. package/app/components/site/SiteHeroCode.vue +0 -173
  159. package/app/components/site/SiteInteractionLayer.vue +0 -42
  160. package/app/components/site/SiteLocaleSwitcher.vue +0 -190
  161. package/app/components/site/SiteLogoMark.vue +0 -12
  162. package/app/components/site/SiteSkipLink.vue +0 -14
  163. package/app/components/site/SiteSocialLinks.vue +0 -33
  164. package/app/components/site/header-utils.ts +0 -3
  165. package/app/components/site/mode-toggle.utils.ts +0 -18
  166. package/app/components/ui/badge/Badge.vue +0 -28
  167. package/app/components/ui/badge/index.ts +0 -24
  168. package/app/components/ui/button/Button.vue +0 -31
  169. package/app/components/ui/button/index.ts +0 -35
  170. package/app/components/ui/collapsible/Collapsible.vue +0 -15
  171. package/app/components/ui/collapsible/CollapsibleContent.vue +0 -25
  172. package/app/components/ui/collapsible/CollapsibleTrigger.vue +0 -12
  173. package/app/components/ui/collapsible/index.ts +0 -3
  174. package/app/components/ui/dropdown-menu/DropdownMenu.vue +0 -15
  175. package/app/components/ui/dropdown-menu/DropdownMenuContent.vue +0 -50
  176. package/app/components/ui/dropdown-menu/DropdownMenuItem.vue +0 -41
  177. package/app/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +0 -15
  178. package/app/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +0 -37
  179. package/app/components/ui/dropdown-menu/DropdownMenuSeparator.vue +0 -23
  180. package/app/components/ui/dropdown-menu/DropdownMenuTrigger.vue +0 -14
  181. package/app/components/ui/dropdown-menu/index.ts +0 -7
  182. package/app/components/ui/kbd/Kbd.vue +0 -23
  183. package/app/components/ui/kbd/index.ts +0 -21
  184. package/app/components/ui/scroll-area/ScrollArea.vue +0 -39
  185. package/app/components/ui/scroll-area/ScrollBar.vue +0 -33
  186. package/app/components/ui/scroll-area/index.ts +0 -2
  187. package/app/components/ui/separator/Separator.vue +0 -27
  188. package/app/components/ui/separator/index.ts +0 -1
  189. package/app/components/ui/sheet/Sheet.vue +0 -15
  190. package/app/components/ui/sheet/SheetContent.vue +0 -59
  191. package/app/components/ui/sheet/SheetDescription.vue +0 -21
  192. package/app/components/ui/sheet/SheetOverlay.vue +0 -26
  193. package/app/components/ui/sheet/SheetTitle.vue +0 -21
  194. package/app/components/ui/sheet/SheetTrigger.vue +0 -12
  195. package/app/components/ui/sheet/index.ts +0 -5
  196. package/app/components/ui/tabs/Tabs.vue +0 -24
  197. package/app/components/ui/tabs/TabsList.vue +0 -26
  198. package/app/components/ui/tabs/TabsTrigger.vue +0 -28
  199. package/app/components/ui/tabs/index.ts +0 -3
  200. package/app/composables/site-navigation.utils.ts +0 -133
  201. package/app/composables/useCanonicalUrl.ts +0 -9
  202. package/app/composables/useContentRouteAlternates.ts +0 -35
  203. package/app/composables/useGinkoAnalytics.ts +0 -52
  204. package/app/composables/useGinkoDocsConfig.ts +0 -6
  205. package/app/composables/useGinkoOgImage.ts +0 -20
  206. package/app/composables/useLocalizedPath.ts +0 -12
  207. package/app/composables/useLocalizedRouteSwitch.ts +0 -31
  208. package/app/composables/useMetaKey.ts +0 -18
  209. package/app/composables/usePageMarkdownActions.ts +0 -79
  210. package/app/composables/useProseAppearance.ts +0 -24
  211. package/app/composables/useSchemaJsonLd.ts +0 -25
  212. package/app/composables/useSiteNavigation.ts +0 -64
  213. package/app/config/site.utils.ts +0 -36
  214. package/app/features/docs/components/DocsBreadcrumb.vue +0 -37
  215. package/app/features/docs/components/DocsContributeLinks.vue +0 -75
  216. package/app/features/docs/components/DocsMobileToc.vue +0 -108
  217. package/app/features/docs/components/DocsPageContent.vue +0 -234
  218. package/app/features/docs/components/DocsPageNav.vue +0 -57
  219. package/app/features/docs/components/DocsSidebar.vue +0 -145
  220. package/app/features/docs/components/DocsSidebarDropdown.vue +0 -70
  221. package/app/features/docs/components/DocsSidebarItem.vue +0 -122
  222. package/app/features/docs/components/DocsSidebarList.vue +0 -35
  223. package/app/features/docs/components/DocsSidebarRow.vue +0 -27
  224. package/app/features/docs/components/DocsSidebarTabs.vue +0 -59
  225. package/app/features/docs/components/DocsToc.vue +0 -106
  226. package/app/features/docs/composables/useDocsNavigation.ts +0 -29
  227. package/app/features/docs/composables/useDocsNavigationData.ts +0 -18
  228. package/app/features/docs/composables/useRevealActive.ts +0 -58
  229. package/app/features/docs/composables/useScrollspy.ts +0 -135
  230. package/app/features/docs/docs-navigation.ts +0 -157
  231. package/app/features/docs/toc-context.ts +0 -6
  232. package/app/features/search/command-center.ts +0 -110
  233. package/app/features/search/components/SiteCommandCenter.vue +0 -359
  234. package/app/features/search/components/SiteSearchPageHighlight.vue +0 -126
  235. package/app/features/search/useCommandCenter.ts +0 -292
  236. package/app/layouts/blog.vue +0 -15
  237. package/app/layouts/docs.vue +0 -20
  238. package/app/lib/errors.ts +0 -37
  239. package/app/lib/schema-org.ts +0 -38
  240. package/app/pages/blog/[slug].vue +0 -228
  241. package/app/pages/blog/index.vue +0 -130
  242. package/app/pages/docs/[...slug].vue +0 -10
  243. package/app/pages/docs/index.vue +0 -19
  244. package/app/pages/index.vue +0 -278
  245. package/app/plugins/ginko-docs-theme.ts +0 -14
  246. package/app/plugins/ssr-width.ts +0 -6
  247. package/app/utils/content.ts +0 -67
  248. package/app/utils/file-icons.ts +0 -90
  249. package/app/utils/index.ts +0 -7
  250. package/app/utils/repository.ts +0 -20
  251. package/components.ts +0 -9
  252. package/content-collections.ts +0 -89
  253. package/content.js +0 -200
  254. package/content.ts +0 -104
  255. package/i18n/i18n.config.ts +0 -10
  256. package/i18n/locales.ts +0 -81
  257. package/i18n/messages/global/banner.ts +0 -8
  258. package/i18n/messages/global/blog.ts +0 -18
  259. package/i18n/messages/global/command.ts +0 -49
  260. package/i18n/messages/global/docs.ts +0 -36
  261. package/i18n/messages/global/errors.ts +0 -36
  262. package/i18n/messages/global/feedback.ts +0 -11
  263. package/i18n/messages/global/index.ts +0 -21
  264. package/i18n/messages/global/nav.ts +0 -26
  265. package/i18n/messages/global/site.ts +0 -4
  266. package/i18n/messages/global/theme.ts +0 -9
  267. package/i18n/messages/index.ts +0 -20
  268. package/i18n/messages/localize.ts +0 -35
  269. package/i18n/routes.ts +0 -33
  270. package/icon-bundle.ts +0 -116
  271. package/index.d.ts +0 -37
  272. package/modules/analytics-boundary.ts +0 -23
  273. package/modules/feature-routing.ts +0 -68
  274. package/modules/syntax-highlighting.ts +0 -120
  275. package/public/fonts/public-sans/LICENSE +0 -93
  276. package/public/fonts/public-sans/README.md +0 -12
  277. package/public/fonts/public-sans/public-sans-400-normal-latin.woff +0 -0
  278. package/public/fonts/public-sans/public-sans-500-normal-latin.woff +0 -0
  279. package/public/fonts/public-sans/public-sans-600-normal-latin.woff +0 -0
  280. package/public/fonts/public-sans/public-sans-700-normal-latin.woff +0 -0
  281. package/runtime/generate-favicons.mjs +0 -124
  282. package/runtime/server/agent-markdown.ts +0 -19
  283. package/server/api/_ginko-docs/redirects.get.ts +0 -28
  284. package/server/mcp/tools/get-page.ts +0 -14
  285. package/server/mcp/tools/list-pages.ts +0 -10
  286. package/server/middleware/redirects.ts +0 -22
  287. package/server/plugins/agent-markdown.ts +0 -6
  288. package/server/plugins/sitemap-policy.ts +0 -12
  289. package/server/routes/.well-known/ai-catalog.json.get.ts +0 -10
  290. package/server/routes/[locale]/blog/rss.xml.get.ts +0 -13
  291. package/server/routes/blog/rss.xml.get.ts +0 -5
  292. package/server/routes/mcp/server-card.get.ts +0 -14
  293. package/server/utils/blog-feed.ts +0 -51
  294. package/server/utils/feed.ts +0 -70
  295. package/server/utils/mcp-server-card.ts +0 -45
  296. package/server/utils/redirects.ts +0 -38
  297. package/server/utils/redirects.utils.ts +0 -58
  298. package/server/utils/sitemap.ts +0 -45
  299. package/shared/route-slugs.ts +0 -5
  300. package/shared/theme-palettes.ts +0 -37
  301. package/shared/theme-presets.ts +0 -3
  302. package/shared/types/app-config.ts +0 -172
  303. package/shared/types/nuxt-config.ts +0 -14
  304. package/tags.ts +0 -192
@@ -1,172 +0,0 @@
1
- export type { GinkoDocsNeutralPalette, GinkoDocsPrimaryPalette } from "../theme-palettes";
2
- export type { GinkoDocsThemePreset } from "../theme-presets";
3
- import type { GinkoDocsNeutralPalette, GinkoDocsPrimaryPalette } from "../theme-palettes";
4
- import type { GinkoDocsThemePreset } from "../theme-presets";
5
-
6
- export type GinkoDocsLocalizedText = string | { en: string; de?: string };
7
-
8
- export type GinkoDocsProseAppearance = "quiet" | "tint";
9
- export type GinkoDocsCodeBlockTheme = "dark" | "adaptive";
10
- export type GinkoDocsProseFamily =
11
- | "callout"
12
- | "aside"
13
- | "excerpt"
14
- | "cards"
15
- | "readMore"
16
- | "accordion"
17
- | "tabs"
18
- | "code"
19
- | "files"
20
- | "api"
21
- | "figure"
22
- | "quiz"
23
- | "steps"
24
- | "timeline";
25
-
26
- export interface GinkoDocsProseConfig {
27
- appearance: GinkoDocsProseAppearance;
28
- components?: Partial<Record<GinkoDocsProseFamily, GinkoDocsProseAppearance>>;
29
- }
30
-
31
- export interface GinkoDocsLink {
32
- label: GinkoDocsLocalizedText;
33
- to: GinkoDocsLocalizedText;
34
- /** Iconify icon shown where nav items render with icons (e.g. mobile menu). */
35
- icon?: string;
36
- /** One-line subtitle shown under the label in the mobile menu. */
37
- description?: GinkoDocsLocalizedText;
38
- }
39
-
40
- export type GinkoDocsSocialPlatform = "github" | "discord" | "linkedin";
41
-
42
- /**
43
- * A URL uses the platform's built-in label and icon. Pass an object to override
44
- * either — `icon` accepts any Iconify name the consuming app has registered, so
45
- * sites that ship brand marks are not limited to the layer's bundled icons.
46
- */
47
- export type GinkoDocsSocialEntry = string | { href: string; label?: string; icon?: string };
48
-
49
- export interface GinkoDocsHeroCodeTab {
50
- label: GinkoDocsLocalizedText;
51
- /** Iconify icon shown in the tab. */
52
- icon?: string;
53
- filename?: string;
54
- /** Shiki language id; derived from the filename extension when unset. */
55
- language?: string;
56
- code: string;
57
- }
58
-
59
- export type GinkoDocsHeroMedia =
60
- | { type: "image"; src: string; alt: string }
61
- | {
62
- type: "code";
63
- code: string;
64
- language?: string;
65
- filename?: string;
66
- /** Let the code panel use otherwise empty viewport space on wide screens. */
67
- layout?: "wide";
68
- }
69
- | {
70
- type: "code-tabs";
71
- tabs: GinkoDocsHeroCodeTab[];
72
- /** Let the code panel use otherwise empty viewport space on wide screens. */
73
- layout?: "wide";
74
- };
75
-
76
- export interface GinkoDocsAppConfig {
77
- theme: {
78
- /** Coordinated visual system. A non-default preset owns palette and surface tokens. */
79
- preset?: GinkoDocsThemePreset;
80
- neutral: GinkoDocsNeutralPalette;
81
- primary: GinkoDocsPrimaryPalette;
82
- codeBlocks: GinkoDocsCodeBlockTheme;
83
- };
84
- prose: GinkoDocsProseConfig;
85
- site: {
86
- name: GinkoDocsLocalizedText;
87
- description: GinkoDocsLocalizedText;
88
- url: string;
89
- /** Square product mark used for browser icons and generated social cards. */
90
- icon: string;
91
- logo: { light: string; dark: string };
92
- docsSidebarSwitcher: "dropdown" | "list" | "tabs";
93
- lupinumAttribution: boolean;
94
- /** Legal and company links rendered in the footer. */
95
- legalLinks: GinkoDocsLink[];
96
- };
97
- nav: {
98
- /** "auto" derives Docs (+ Blog when blog routes exist); an array overrides entirely. */
99
- links: "auto" | GinkoDocsLink[];
100
- /** Render configured social links as icon buttons in the header instead of labelled rows. */
101
- socialIcons: boolean;
102
- };
103
- banner: {
104
- enabled: boolean;
105
- /** Dismissal storage key — change it to re-show the banner after an update. */
106
- id: string;
107
- text?: GinkoDocsLocalizedText;
108
- link?: { label?: GinkoDocsLocalizedText; to?: GinkoDocsLocalizedText };
109
- showOnLanding: boolean;
110
- };
111
- analytics?: {
112
- plausible?: {
113
- /** Public site-specific ID from the Plausible pa-<id>.js script URL. */
114
- scriptId?: string;
115
- };
116
- };
117
- social: Partial<Record<GinkoDocsSocialPlatform, GinkoDocsSocialEntry>>;
118
- feedback: {
119
- enabled: boolean;
120
- };
121
- ogImage: {
122
- enabled: boolean;
123
- /** OgImage template component name (file in app/components/OgImage/). */
124
- component: string;
125
- };
126
- markdownActions: {
127
- chatGpt: boolean;
128
- claude: boolean;
129
- mcp: boolean;
130
- };
131
- images: {
132
- /** Click-to-zoom lightbox for prose images. */
133
- zoom: boolean;
134
- };
135
- toc: {
136
- depth: 2 | 3 | 4;
137
- };
138
- repository?: {
139
- url: string;
140
- branch?: string;
141
- contentDirectory?: string;
142
- };
143
- landing: {
144
- title: GinkoDocsLocalizedText;
145
- description: GinkoDocsLocalizedText;
146
- primary: GinkoDocsLink;
147
- secondary?: GinkoDocsLink;
148
- hero?: {
149
- media?: GinkoDocsHeroMedia;
150
- };
151
- /** Copyable install command shown under the hero CTAs. */
152
- install?: { command: string };
153
- features: Array<{
154
- title: GinkoDocsLocalizedText;
155
- description: GinkoDocsLocalizedText;
156
- icon?: string;
157
- }>;
158
- /** Dark full-width band highlighting agent readiness. */
159
- agent?: {
160
- title: GinkoDocsLocalizedText;
161
- description: GinkoDocsLocalizedText;
162
- /** Terminal transcript; "$"-prefixed lines render as commands, "#" as comments. */
163
- code: string;
164
- };
165
- /** Closing call to action; primary falls back to landing.primary. */
166
- cta?: {
167
- title: GinkoDocsLocalizedText;
168
- primary?: GinkoDocsLink;
169
- secondary?: GinkoDocsLink;
170
- };
171
- };
172
- }
@@ -1,14 +0,0 @@
1
- import type { BundledTheme } from "shiki";
2
-
3
- export type GinkoDocsSyntaxTheme = BundledTheme;
4
-
5
- export interface GinkoDocsSyntaxHighlightingConfig {
6
- themes: {
7
- light: GinkoDocsSyntaxTheme;
8
- dark: GinkoDocsSyntaxTheme;
9
- };
10
- }
11
-
12
- export interface GinkoDocsNuxtConfig {
13
- syntaxHighlighting?: GinkoDocsSyntaxHighlightingConfig;
14
- }
package/tags.ts DELETED
@@ -1,192 +0,0 @@
1
- import type { PortableComponentPolicyV1 } from "@lupinum/ginko-content/cms-contract";
2
-
3
- export const contentComponentTags = {
4
- accordion: "MdcAccordion",
5
- "accordion-item": "MdcAccordionItem",
6
- api: "MdcApi",
7
- aside: "MdcAside",
8
- card: "MdcCard",
9
- cards: "MdcCards",
10
- center: "MdcCenter",
11
- "code-group": "MdcCodeGroup",
12
- "code-tree": "MdcCodeTree",
13
- collapse: "MdcCollapse",
14
- column: "MdcColumn",
15
- dropcap: "MdcDropcap",
16
- error: "MdcError",
17
- excerpt: "MdcExcerpt",
18
- figure: "MdcFigure",
19
- files: "MdcFiles",
20
- idea: "MdcIdea",
21
- img: "ProseImg",
22
- info: "MdcInfo",
23
- kbd: "MdcKbd",
24
- layout: "MdcLayout",
25
- note: "MdcNote",
26
- quiz: "MdcQuiz",
27
- "quiz-question": "MdcQuizQuestion",
28
- "read-more": "MdcReadMore",
29
- steps: "MdcSteps",
30
- success: "MdcSuccess",
31
- tab: "MdcTab",
32
- tabs: "MdcTabs",
33
- timeline: "MdcTimeline",
34
- "timeline-item": "MdcTimelineItem",
35
- toc: "MdcInlineToc",
36
- warning: "MdcWarning",
37
- } as const;
38
-
39
- type ComponentDefinition = PortableComponentPolicyV1["components"][string];
40
- type ComponentProps = ComponentDefinition["props"];
41
-
42
- const optional = (type: ComponentProps[string]["type"]) => ({ type, required: false });
43
- const required = (type: ComponentProps[string]["type"]) => ({ type, required: true });
44
- const block = (
45
- props: ComponentProps = {},
46
- slots: string[] = ["default"],
47
- media: ComponentDefinition["media"] = null,
48
- ): ComponentDefinition => ({ kind: "block", props, slots, media });
49
- const inline = (props: ComponentProps = {}): ComponentDefinition => ({
50
- kind: "inline",
51
- props,
52
- slots: ["default"],
53
- media: null,
54
- });
55
-
56
- const appearance = { appearance: optional("string") };
57
- const notice = block({ title: optional("string"), icon: optional("string"), ...appearance });
58
-
59
- export const contentComponentPolicy = {
60
- components: {
61
- accordion: block({
62
- ...appearance,
63
- type: optional("string"),
64
- collapsible: optional("boolean"),
65
- defaultValue: optional("json"),
66
- }),
67
- "accordion-item": block(
68
- {
69
- value: optional("string"),
70
- title: optional("string"),
71
- content: optional("string"),
72
- },
73
- ["default", "title", "content"],
74
- ),
75
- api: block({
76
- ...appearance,
77
- title: optional("string"),
78
- icon: optional("string"),
79
- method: optional("string"),
80
- path: optional("string"),
81
- groups: optional("json"),
82
- }),
83
- aside: block({ label: optional("string"), ...appearance }),
84
- card: block(
85
- {
86
- title: optional("string"),
87
- description: optional("string"),
88
- footer: optional("string"),
89
- to: optional("string"),
90
- target: optional("string"),
91
- icon: optional("string"),
92
- iconColor: optional("string"),
93
- img: optional("asset"),
94
- showLinkIcon: optional("boolean"),
95
- horizontal: optional("boolean"),
96
- ...appearance,
97
- },
98
- ["default", "title", "description", "footer"],
99
- { sourceProp: "img", altProp: null, titleProp: null, filenameProp: null },
100
- ),
101
- cards: block({ cols: optional("string"), ...appearance }),
102
- center: block({
103
- size: optional("string"),
104
- max: optional("string"),
105
- type: optional("string"),
106
- }),
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
- column: block({ size: optional("string") }),
115
- dropcap: block({ lines: optional("json") }),
116
- error: notice,
117
- excerpt: block({ label: optional("string"), source: optional("string"), ...appearance }),
118
- figure: block(
119
- {
120
- ...appearance,
121
- src: required("asset"),
122
- alt: required("string"),
123
- caption: optional("string"),
124
- width: optional("json"),
125
- height: optional("json"),
126
- bleed: optional("string"),
127
- aspect: optional("string"),
128
- fit: optional("string"),
129
- zoom: optional("json"),
130
- },
131
- ["default"],
132
- { sourceProp: "src", altProp: "alt", titleProp: null, filenameProp: null },
133
- ),
134
- files: block({ active: optional("string"), annotations: optional("json"), ...appearance }),
135
- idea: notice,
136
- info: notice,
137
- kbd: inline(),
138
- layout: block({ type: optional("string") }),
139
- note: notice,
140
- quiz: block({
141
- ...appearance,
142
- title: optional("string"),
143
- description: optional("string"),
144
- questionLabel: optional("string"),
145
- backLabel: optional("string"),
146
- nextLabel: optional("string"),
147
- resultsLabel: optional("string"),
148
- correctSummaryLabel: optional("string"),
149
- perfectLabel: optional("string"),
150
- retryPrompt: optional("string"),
151
- resetLabel: optional("string"),
152
- }),
153
- "quiz-question": block({
154
- question: required("string"),
155
- type: optional("string"),
156
- explanation: optional("string"),
157
- options: required("json"),
158
- checkLabel: optional("string"),
159
- correctLabel: optional("string"),
160
- incorrectLabel: optional("string"),
161
- resetLabel: optional("string"),
162
- multipleChoiceLabel: optional("string"),
163
- }),
164
- "read-more": block({ title: optional("string"), links: required("json"), ...appearance }, []),
165
- steps: block({ mode: optional("string"), ...appearance }),
166
- success: notice,
167
- tab: block({ icon: optional("string"), label: optional("string") }),
168
- tabs: block({ layout: optional("string"), padded: optional("boolean"), ...appearance }),
169
- timeline: block(appearance),
170
- "timeline-item": block({
171
- date: optional("string"),
172
- label: optional("string"),
173
- title: optional("string"),
174
- icon: optional("string"),
175
- active: optional("boolean"),
176
- }),
177
- toc: block(
178
- {
179
- title: optional("string"),
180
- depth: optional("json"),
181
- open: optional("json"),
182
- },
183
- [],
184
- ),
185
- warning: notice,
186
- },
187
- } satisfies PortableComponentPolicyV1;
188
-
189
- export const contentComponentNames = Array.from(new Set(Object.values(contentComponentTags)));
190
-
191
- export type ContentComponentTag = keyof typeof contentComponentTags;
192
- export type ContentComponentName = (typeof contentComponentTags)[ContentComponentTag];