doccupine 0.0.160 → 0.0.161
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/dist/templates/components/layout/DocsComponents.d.ts +1 -1
- package/dist/templates/components/layout/DocsComponents.js +17 -3
- package/dist/templates/mdx/languages.mdx.d.ts +1 -1
- package/dist/templates/mdx/languages.mdx.js +14 -10
- package/dist/templates/package.js +21 -21
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const docsComponentsTemplate = "\"use client\";\nimport React, { createContext } from \"react\";\nimport styled, { css } from \"styled-components\";\nimport {\n Button,\n resetButton,\n styledSmall,\n styledStrong,\n styledText,\n useChat,\n} from \"cherry-styled-components\";\nimport Link from \"next/link\";\nimport { mq, Theme } from \"@/app/theme\";\nimport {\n focusModeColumn,\n focusModeHide,\n sidePanelOffset,\n styledAnchor,\n styledTable,\n stylesLists,\n} from \"@/components/layout/SharedStyled\";\nimport { Badge } from \"@/components/layout/Badge\";\nimport { useVariant } from \"@/components/useVariant\";\nimport { joinVariantSlug } from \"@/utils/variants\";\n\nconst SectionBarContext = createContext(false);\n\nfunction SectionBarProvider({\n hasSectionBar,\n children,\n}: {\n hasSectionBar: boolean;\n children: React.ReactNode;\n}) {\n return (\n <SectionBarContext.Provider value={hasSectionBar}>\n {children}\n </SectionBarContext.Provider>\n );\n}\n\ninterface DocsProps {\n children: React.ReactNode;\n}\n\nconst StyledDocsWrapper = styled.div<{ theme: Theme }>`\n position: relative;\n`;\n\nconst StyledDocsSidebar = styled.div<{ theme: Theme }>`\n clear: both;\n`;\n\n// The <main> landmark wraps only the article content: the sidebar, footer,\n// and nav render outside it so content extractors and assistive tech start at\n// the article.\nconst StyledDocsContainer = styled.main<{\n theme: Theme;\n $isChatOpen?: boolean;\n}>`\n position: relative;\n padding: 0 20px 100px 20px;\n width: 100%;\n ${({ theme }) => styledText(theme)};\n transition: all 0.3s ease;\n\n ${mq(\"lg\")} {\n padding: 0 300px 80px 300px;\n\n ${({ $isChatOpen }) =>\n $isChatOpen &&\n css`\n padding: 0 440px 80px 300px;\n `}\n }\n\n ${sidePanelOffset};\n ${({ $isChatOpen }) => !$isChatOpen && focusModeColumn};\n\n & p {\n color: ${({ theme }) => theme.colors.grayDark};\n hyphens: auto;\n }\n\n & pre {\n max-width: 100%;\n }\n\n ${styledAnchor};\n ${stylesLists};\n ${styledTable};\n\n & img,\n & video,\n & iframe {\n max-width: 100%;\n border-radius: ${({ theme }) => theme.spacing.radius.lg};\n }\n\n & code:not([class]),\n & kbd {\n max-width: max-content;\n background: ${({ theme }) =>\n `color-mix(in srgb, ${theme.colors.primaryLight} 20%, transparent)`};\n color: ${({ theme }) => theme.colors.dark};\n padding: 2px 4px;\n border-radius: ${({ theme }) => theme.spacing.radius.xs};\n overflow-wrap: anywhere;\n }\n\n & .lucide {\n color: ${({ theme }) => theme.colors.primary};\n }\n\n & .aspect-video {\n aspect-ratio: 16 / 9;\n border-radius: ${({ theme }) => theme.spacing.radius.lg};\n }\n`;\n\nexport const StyledMarkdownContainer = styled.div`\n display: flex;\n flex-direction: column;\n gap: 20px;\n flex: 1;\n max-width: 640px;\n margin: auto;\n`;\n\ninterface Props {\n theme?: Theme;\n $isActive?: boolean;\n $isOpen?: boolean;\n $hasSectionBar?: boolean;\n}\n\nexport const StyledSidebar = styled.nav<Props>`\n position: fixed;\n overflow-y: auto;\n max-height: calc(\n 100dvh - ${({ $hasSectionBar }) => ($hasSectionBar ? 104 : 62)}px\n );\n width: 100%;\n z-index: 99;\n top: ${({ $hasSectionBar }) => ($hasSectionBar ? 104 : 62)}px;\n height: 100%;\n padding: 20px;\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n transition:\n transform 0.3s ease,\n opacity 0.3s ease,\n visibility 0s linear 0.3s;\n transform: translateY(30px);\n left: 0;\n background: ${({ theme }) => theme.colors.light};\n -webkit-overflow-scrolling: touch;\n display: flex;\n flex-direction: column;\n\n &::-webkit-scrollbar {\n display: none;\n }\n\n ${mq(\"lg\")} {\n border-right: solid 1px ${({ theme }) => theme.colors.grayLight};\n transition: none;\n max-height: 100dvh;\n padding: 82px 20px 20px 20px;\n opacity: 1;\n pointer-events: all;\n visibility: visible;\n transform: translateY(0);\n /* Mixed over the page background rather than transparent so the panel\n reads as a filled surface in both modes. */\n background: ${({ theme }) =>\n `color-mix(in srgb, ${theme.colors.primaryLight} 8%, ${theme.colors.light})`};\n top: 0;\n width: 280px;\n }\n\n ${({ $isActive }) =>\n $isActive &&\n css`\n transform: translateY(0);\n opacity: 1;\n pointer-events: all;\n visibility: visible;\n transition-delay: 0s;\n `}\n\n ${focusModeHide(\"left\")};\n\n ${mq(\"lg\")} {\n html[data-focus-mode] & {\n visibility: hidden;\n transition:\n transform 0.3s ease,\n opacity 0.3s ease,\n visibility 0s linear 0.3s;\n }\n }\n`;\n\n// One row of 30px controls: the focus-mode toggle, the language and version\n// switchers, then the theme toggle. The focus toggle is fixed rather than a\n// child (it outlives the sidebar in focus mode), so on the rail the row's own\n// padding leaves its 30px plus a gap free at the left.\nexport const StyledSidebarFooter = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 22px 20px;\n position: sticky;\n border-top: 1px solid ${({ theme }) => theme.colors.grayLight};\n /* Same opaque mix as the sidebar panel so the sticky footer blends into it\n while still masking the list scrolling underneath. */\n background: ${({ theme }) =>\n `color-mix(in srgb, ${theme.colors.primaryLight} 8%, ${theme.colors.light})`};\n margin: 0 -20px -20px;\n bottom: -20px;\n\n ${mq(\"lg\")} {\n padding: 16px 20px 16px 58px;\n }\n`;\n\n// The theme toggle's slot takes whatever the switchers leave, so the toggle\n// stays beside them in the mobile menu and holds the right end of the rail.\n// A plain flex row rather than Cherry's Flex: the slot has to grow, which is a\n// property of the child, and styled(Flex) would swallow Flex's own $-prefixed\n// props on the way through.\nexport const StyledSidebarFooterToggle = styled.div`\n display: flex;\n flex: 1;\n justify-content: flex-start;\n\n /* On the rail the switchers claim the free width when both are configured,\n so the toggle keeps its own size and is pushed to the right end. */\n ${mq(\"lg\")} {\n flex: 0 0 auto;\n margin-left: auto;\n }\n`;\n\nexport const StyledIndexSidebar = styled.ul<{ theme: Theme }>`\n display: none;\n list-style: none;\n margin: 0;\n padding: 0;\n position: fixed;\n top: 0;\n right: 0;\n width: 280px;\n height: 100dvh;\n overflow-y: auto;\n z-index: 1;\n padding: 82px 20px 20px 20px;\n background: ${({ theme }) => theme.colors.light};\n border-left: solid 1px ${({ theme }) => theme.colors.grayLight};\n -webkit-overflow-scrolling: touch;\n\n &::-webkit-scrollbar {\n display: none;\n }\n\n ${mq(\"lg\")} {\n display: block;\n }\n\n & li {\n padding: 5px 0;\n }\n\n ${focusModeHide(\"right\")};\n\n ${mq(\"lg\")} {\n html[data-focus-mode] & {\n visibility: hidden;\n transition:\n transform 0.3s ease,\n opacity 0.3s ease,\n visibility 0s linear 0.3s;\n }\n }\n`;\n\nexport const StyledIndexSidebarLabel = styled.span<{ theme: Theme }>`\n ${({ theme }) => styledSmall(theme)};\n color: ${({ theme }) => theme.colors.grayDark};\n`;\n\nexport const StyledIndexSidebarLi = styled.li<{\n theme: Theme;\n $isActive: boolean;\n}>`\n &::before {\n content: \"\";\n display: block;\n position: absolute;\n left: 0;\n height: 20px;\n width: 1px;\n background: transparent;\n transition: all 0.3s ease;\n }\n\n ${({ $isActive, theme }) =>\n $isActive &&\n css`\n &::before {\n background: ${theme.colors.primary};\n }\n `}\n`;\n\nexport const StyledIndexSidebarLink = styled.a<{\n theme: Theme;\n $isActive: boolean;\n}>`\n ${({ theme }) => styledSmall(theme)};\n color: ${({ theme, $isActive }) =>\n $isActive ? theme.colors.primary : theme.colors.dark};\n font-weight: ${({ $isActive }) => ($isActive ? \"600\" : \"400\")};\n text-decoration: none;\n transition: all 0.3s ease;\n\n &:hover {\n color: ${({ theme }) => theme.colors.primary};\n }\n`;\n\nexport const StyledSidebarList = styled.ul`\n list-style: none;\n margin: 0;\n padding: 0;\n\n &:last-of-type {\n margin-bottom: auto;\n }\n`;\n\nexport const StyledStrong = styled.strong<{ theme: Theme }>`\n font-weight: 600;\n ${({ theme }) => styledStrong(theme)};\n color: ${({ theme }) => theme.colors.accentStrong};\n display: inline-flex;\n align-items: center;\n gap: 8px;\n\n & svg {\n flex-shrink: 0;\n }\n`;\n\nexport const StyledSidebarListItem = styled.li`\n display: flex;\n gap: 10px;\n clear: both;\n`;\n\n// Shared appearance for every sidebar row - leaf links AND nested group\n// headers - so hover, active state, and the left rail read identically.\nconst sidebarRowStyles = css<Props>`\n text-decoration: none;\n font-size: ${({ theme }) => theme.fontSizes.small.lg};\n line-height: 1.6;\n color: ${({ theme }) => theme.colors.accentMuted};\n padding: 5px 0 5px 20px;\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1;\n min-width: 0;\n transition: all 0.3s ease;\n border-left: solid 1px ${({ theme }) => theme.colors.grayLight};\n\n & svg {\n flex-shrink: 0;\n }\n\n &:hover {\n color: ${({ theme }) => theme.colors.accent};\n border-color: ${({ theme }) => theme.colors.primary};\n }\n\n ${({ $isActive, theme }) =>\n $isActive &&\n css`\n color: ${theme.colors.accentStrong};\n border-color: ${theme.colors.primary};\n font-weight: 600;\n `};\n`;\n\n// The collapse chevron points right when closed and rotates to point down\n// when the group is open.\nconst sidebarChevron = css<Props>`\n & .lucide-chevron-right {\n margin-left: auto;\n transition: transform 0.3s ease;\n\n ${({ $isOpen }) =>\n $isOpen &&\n css`\n transform: rotate(90deg);\n `}\n }\n`;\n\nexport const StyledSidebarListItemLink = styled(Link)<Props>`\n ${sidebarRowStyles};\n`;\n\n// Compact HTTP-method label shown before a generated API endpoint link, colored\n// by verb so endpoints are scannable in the sidebar. Only rendered when a link\n// carries an `httpMethod` (endpoint pages do; hand-written pages do not).\n// The look is Badge's mono variation (tinted, solid when active); only\n// sidebar metrics are adjusted here.\nexport const StyledSidebarMethodTag = styled(Badge)`\n flex-shrink: 0;\n font-size: 9px;\n letter-spacing: 0.02em;\n padding: 1px 4px;\n border: none;\n`;\n\n// Nested navigation group. The header shares the link appearance/hover; a\n// non-navigable group is a single toggle button, while a group that is also a\n// page pairs a link with a chevron toggle. Children live in\n// StyledSidebarGroupContent, which animates open/closed via height 0 <-> auto\n// (enabled by interpolate-size in GlobalStyles, same as the Accordion).\nexport const StyledSidebarGroupButton = styled(Button)<Props>`\n ${resetButton};\n ${sidebarRowStyles};\n ${sidebarChevron};\n width: 100%;\n height: auto;\n min-height: 0;\n text-align: left;\n\n /* Buttons aren't covered by the global a:focus-visible ring, so this\n nav-row toggle carries its own copy of it. */\n &:focus-visible {\n outline: none;\n border-radius: ${({ theme }) => theme.spacing.radius.xs};\n box-shadow: 0 0 0 2px ${({ theme }) => theme.colors.primaryLight};\n }\n`;\n\nexport const StyledSidebarGroupRow = styled.div<Props>`\n ${sidebarRowStyles};\n ${sidebarChevron};\n\n /* The row is a plain div, so it never matches :focus-visible itself. Ring the\n whole row when its inner link or chevron takes keyboard focus instead, to\n match the leaf-row focus treatment. */\n &:has(:focus-visible) {\n border-radius: ${({ theme }) => theme.spacing.radius.xs};\n box-shadow: 0 0 0 2px ${({ theme }) => theme.colors.primaryLight};\n }\n`;\n\nexport const StyledSidebarGroupLink = styled(Link)`\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1;\n min-width: 0;\n color: inherit;\n text-decoration: none;\n\n & svg {\n flex-shrink: 0;\n }\n\n /* Ring is drawn on the parent row via :has(:focus-visible); suppress the\n global a:focus-visible glow so it isn't drawn twice. */\n &:focus-visible {\n outline: none;\n box-shadow: none;\n }\n`;\n\nexport const StyledSidebarGroupChevron = styled(Button)`\n ${resetButton};\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: auto;\n height: auto;\n min-height: 0;\n padding: 0;\n border: 0;\n background: none;\n color: inherit;\n cursor: pointer;\n\n /* Ring is drawn on the parent row via :has(:focus-visible). */\n &:focus-visible {\n outline: none;\n }\n`;\n\nexport const StyledSidebarGroupContent = styled.ul.attrs<Props>(\n ({ $isOpen }) => ({\n \"aria-hidden\": !$isOpen,\n inert: !$isOpen,\n }),\n)<Props>`\n list-style: none;\n margin: 0;\n padding: 0;\n height: 0;\n overflow: clip;\n visibility: hidden;\n transition:\n height 0.3s ease,\n visibility 0s linear 0.3s;\n\n ${({ $isOpen }) =>\n $isOpen &&\n css`\n height: auto;\n visibility: visible;\n transition-delay: 0s;\n `}\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n`;\n\nexport const StyleMobileBar = styled(Button)<Props>`\n ${resetButton};\n position: fixed;\n z-index: 999;\n bottom: 0;\n right: 20px;\n font-size: ${({ theme }) => theme.fontSizes.strong.lg};\n line-height: ${({ theme }) => theme.fontSizes.strong.lg};\n box-shadow: ${({ theme }) => theme.shadows.sm};\n background: ${({ theme }) => theme.colors.primary};\n color: ${({ theme }) => theme.colors.surface};\n backdrop-filter: blur(10px);\n -webkit-backdrop-filter: blur(10px);\n padding: 10px;\n border-radius: 100px;\n margin: 0 0 20px 0;\n font-weight: 600;\n display: flex;\n justify-content: flex-start;\n width: auto;\n height: auto;\n min-height: 0;\n\n ${mq(\"lg\")} {\n display: none;\n }\n\n ${({ $isActive }) => $isActive && `position: fixed;`};\n`;\n\nexport const StyledMobileBurger = styled.span<Props>`\n display: block;\n margin: auto 0;\n width: 18px;\n height: 18px;\n position: relative;\n overflow: hidden;\n background: transparent;\n position: relative;\n transform: scale(0.8);\n\n &::before,\n &::after {\n content: \"\";\n display: block;\n position: absolute;\n width: 18px;\n height: 3px;\n border-radius: 3px;\n background: ${({ theme }) => theme.colors.surface};\n transition: all 0.3s ease;\n }\n\n &::before {\n top: 3px;\n }\n\n &::after {\n bottom: 3px;\n }\n\n ${({ $isActive }) =>\n $isActive &&\n css`\n &::before {\n transform: translateY(5px) rotate(45deg);\n }\n\n &::after {\n transform: translateY(-4px) rotate(-45deg);\n }\n `};\n`;\n\n// Visually hidden but present for crawlers and agents: points at llms.txt and\n// the .md mirrors. Rendered as the first element of the site layout.\nconst StyledLlmsDirective = styled.div`\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n`;\n\nfunction LlmsDirective() {\n // Every language and version has its own llms.txt under its URL prefix.\n const { prefix } = useVariant();\n const indexHref = \"/\" + joinVariantSlug(prefix, \"llms.txt\");\n const fullHref = \"/\" + joinVariantSlug(prefix, \"llms-full.txt\");\n return (\n <StyledLlmsDirective data-markdown-ignore>\n <a href={indexHref}>Documentation index for AI agents (llms.txt)</a>.\n Markdown versions of every page are available by appending .md to the page\n URL. The full corpus is at <a href={fullHref}>{fullHref}</a>.\n </StyledLlmsDirective>\n );\n}\n\ninterface DocsWrapperProps {\n children: React.ReactNode;\n}\n\nfunction DocsWrapper({ children }: DocsWrapperProps) {\n return <StyledDocsWrapper>{children}</StyledDocsWrapper>;\n}\n\nfunction DocsSidebar({ children }: DocsProps) {\n return <StyledDocsSidebar>{children}</StyledDocsSidebar>;\n}\n\nfunction DocsContainer({ children, lang }: DocsProps & { lang?: string }) {\n const { isOpen } = useChat();\n\n return (\n <StyledDocsContainer $isChatOpen={isOpen} lang={lang}>\n {children}\n </StyledDocsContainer>\n );\n}\n\nexport {\n DocsWrapper,\n DocsSidebar,\n DocsContainer,\n LlmsDirective,\n SectionBarContext,\n SectionBarProvider,\n};\n";
|
|
1
|
+
export declare const docsComponentsTemplate = "\"use client\";\nimport React, { createContext } from \"react\";\nimport styled, { css } from \"styled-components\";\nimport {\n Button,\n resetButton,\n styledSmall,\n styledStrong,\n styledText,\n useChat,\n} from \"cherry-styled-components\";\nimport Link from \"next/link\";\nimport { mq, Theme } from \"@/app/theme\";\nimport {\n focusModeColumn,\n focusModeHide,\n sidePanelOffset,\n styledAnchor,\n styledTable,\n stylesLists,\n} from \"@/components/layout/SharedStyled\";\nimport { Badge } from \"@/components/layout/Badge\";\nimport { useVariant } from \"@/components/useVariant\";\nimport { joinVariantSlug } from \"@/utils/variants\";\n\nconst SectionBarContext = createContext(false);\n\nfunction SectionBarProvider({\n hasSectionBar,\n children,\n}: {\n hasSectionBar: boolean;\n children: React.ReactNode;\n}) {\n return (\n <SectionBarContext.Provider value={hasSectionBar}>\n {children}\n </SectionBarContext.Provider>\n );\n}\n\ninterface DocsProps {\n children: React.ReactNode;\n}\n\nconst StyledDocsWrapper = styled.div<{ theme: Theme }>`\n position: relative;\n`;\n\nconst StyledDocsSidebar = styled.div<{ theme: Theme }>`\n clear: both;\n`;\n\n// The <main> landmark wraps only the article content: the sidebar, footer,\n// and nav render outside it so content extractors and assistive tech start at\n// the article.\nconst StyledDocsContainer = styled.main<{\n theme: Theme;\n $isChatOpen?: boolean;\n}>`\n position: relative;\n padding: 0 20px 100px 20px;\n width: 100%;\n ${({ theme }) => styledText(theme)};\n transition: all 0.3s ease;\n\n ${mq(\"lg\")} {\n padding: 0 300px 80px 300px;\n\n ${({ $isChatOpen }) =>\n $isChatOpen &&\n css`\n padding: 0 440px 80px 300px;\n `}\n }\n\n ${sidePanelOffset};\n ${({ $isChatOpen }) => !$isChatOpen && focusModeColumn};\n\n & p {\n color: ${({ theme }) => theme.colors.grayDark};\n hyphens: auto;\n }\n\n & pre {\n max-width: 100%;\n }\n\n ${styledAnchor};\n ${stylesLists};\n ${styledTable};\n\n & img,\n & video,\n & iframe {\n max-width: 100%;\n border-radius: ${({ theme }) => theme.spacing.radius.lg};\n }\n\n & code:not([class]),\n & kbd {\n max-width: max-content;\n background: ${({ theme }) =>\n `color-mix(in srgb, ${theme.colors.primaryLight} 20%, transparent)`};\n color: ${({ theme }) => theme.colors.dark};\n padding: 2px 4px;\n border-radius: ${({ theme }) => theme.spacing.radius.xs};\n overflow-wrap: anywhere;\n }\n\n & .lucide {\n color: ${({ theme }) => theme.colors.primary};\n }\n\n & .aspect-video {\n aspect-ratio: 16 / 9;\n border-radius: ${({ theme }) => theme.spacing.radius.lg};\n }\n`;\n\nexport const StyledMarkdownContainer = styled.div`\n display: flex;\n flex-direction: column;\n gap: 20px;\n flex: 1;\n max-width: 640px;\n margin: auto;\n`;\n\ninterface Props {\n theme?: Theme;\n $isActive?: boolean;\n $isOpen?: boolean;\n $hasSectionBar?: boolean;\n}\n\nexport const StyledSidebar = styled.nav<Props>`\n position: fixed;\n overflow-y: auto;\n max-height: calc(\n 100dvh - ${({ $hasSectionBar }) => ($hasSectionBar ? 104 : 62)}px\n );\n width: 100%;\n z-index: 99;\n top: ${({ $hasSectionBar }) => ($hasSectionBar ? 104 : 62)}px;\n height: 100%;\n padding: 20px;\n opacity: 0;\n pointer-events: none;\n visibility: hidden;\n transition:\n transform 0.3s ease,\n opacity 0.3s ease,\n visibility 0s linear 0.3s;\n transform: translateY(30px);\n left: 0;\n background: ${({ theme }) => theme.colors.light};\n -webkit-overflow-scrolling: touch;\n display: flex;\n flex-direction: column;\n\n &::-webkit-scrollbar {\n display: none;\n }\n\n ${mq(\"lg\")} {\n border-right: solid 1px ${({ theme }) => theme.colors.grayLight};\n transition: none;\n max-height: 100dvh;\n padding: 82px 20px 20px 20px;\n opacity: 1;\n pointer-events: all;\n visibility: visible;\n transform: translateY(0);\n /* Mixed over the page background rather than transparent so the panel\n reads as a filled surface in both modes. */\n background: ${({ theme }) =>\n `color-mix(in srgb, ${theme.colors.primaryLight} 8%, ${theme.colors.light})`};\n top: 0;\n width: 280px;\n }\n\n ${({ $isActive }) =>\n $isActive &&\n css`\n transform: translateY(0);\n opacity: 1;\n pointer-events: all;\n visibility: visible;\n transition-delay: 0s;\n `}\n\n ${focusModeHide(\"left\")};\n\n ${mq(\"lg\")} {\n html[data-focus-mode] & {\n visibility: hidden;\n transition:\n transform 0.3s ease,\n opacity 0.3s ease,\n visibility 0s linear 0.3s;\n }\n }\n`;\n\n// One row of 30px controls: the focus-mode toggle, the language and version\n// switchers, then the theme toggle. The focus toggle is fixed rather than a\n// child (it outlives the sidebar in focus mode), so on the rail the row's own\n// padding leaves its 30px plus a gap free at the left.\nexport const StyledSidebarFooter = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 22px 20px;\n position: sticky;\n border-top: 1px solid ${({ theme }) => theme.colors.grayLight};\n /* Same opaque mix as the sidebar panel so the sticky footer blends into it\n while still masking the list scrolling underneath. */\n background: ${({ theme }) =>\n `color-mix(in srgb, ${theme.colors.primaryLight} 8%, ${theme.colors.light})`};\n margin: 0 -20px -20px;\n bottom: -20px;\n\n ${mq(\"lg\")} {\n padding: 16px 20px 16px 58px;\n }\n`;\n\n// The theme toggle's slot takes whatever the switchers leave, so the toggle\n// stays beside them in the mobile menu and holds the right end of the rail.\n// A plain flex row rather than Cherry's Flex: the slot has to grow, which is a\n// property of the child, and styled(Flex) would swallow Flex's own $-prefixed\n// props on the way through.\nexport const StyledSidebarFooterToggle = styled.div`\n display: flex;\n flex: 1;\n justify-content: flex-start;\n\n /* On the rail the switchers claim the free width when both are configured,\n so the toggle keeps its own size and is pushed to the right end. */\n ${mq(\"lg\")} {\n flex: 0 0 auto;\n margin-left: auto;\n }\n`;\n\nexport const StyledIndexSidebar = styled.ul<{ theme: Theme }>`\n display: none;\n list-style: none;\n margin: 0;\n padding: 0;\n position: fixed;\n top: 0;\n right: 0;\n width: 280px;\n height: 100dvh;\n overflow-y: auto;\n z-index: 1;\n padding: 82px 20px 20px 20px;\n background: ${({ theme }) => theme.colors.light};\n border-left: solid 1px ${({ theme }) => theme.colors.grayLight};\n -webkit-overflow-scrolling: touch;\n\n &::-webkit-scrollbar {\n display: none;\n }\n\n ${mq(\"lg\")} {\n display: block;\n }\n\n & li {\n padding: 5px 0;\n }\n\n ${focusModeHide(\"right\")};\n\n ${mq(\"lg\")} {\n html[data-focus-mode] & {\n visibility: hidden;\n transition:\n transform 0.3s ease,\n opacity 0.3s ease,\n visibility 0s linear 0.3s;\n }\n }\n`;\n\nexport const StyledIndexSidebarLabel = styled.span<{ theme: Theme }>`\n ${({ theme }) => styledSmall(theme)};\n color: ${({ theme }) => theme.colors.grayDark};\n`;\n\nexport const StyledIndexSidebarLi = styled.li<{\n theme: Theme;\n $isActive: boolean;\n}>`\n &::before {\n content: \"\";\n display: block;\n position: absolute;\n left: 0;\n height: 20px;\n width: 1px;\n background: transparent;\n transition: all 0.3s ease;\n }\n\n ${({ $isActive, theme }) =>\n $isActive &&\n css`\n &::before {\n background: ${theme.colors.primary};\n }\n `}\n`;\n\nexport const StyledIndexSidebarLink = styled.a<{\n theme: Theme;\n $isActive: boolean;\n}>`\n ${({ theme }) => styledSmall(theme)};\n color: ${({ theme, $isActive }) =>\n $isActive ? theme.colors.primary : theme.colors.dark};\n font-weight: ${({ $isActive }) => ($isActive ? \"600\" : \"400\")};\n text-decoration: none;\n transition: all 0.3s ease;\n\n &:hover {\n color: ${({ theme }) => theme.colors.primary};\n }\n`;\n\nexport const StyledSidebarList = styled.ul`\n list-style: none;\n margin: 0;\n padding: 0;\n\n &:last-of-type {\n margin-bottom: auto;\n }\n`;\n\nexport const StyledStrong = styled.strong<{ theme: Theme }>`\n font-weight: 600;\n ${({ theme }) => styledStrong(theme)};\n color: ${({ theme }) => theme.colors.accentStrong};\n display: inline-flex;\n align-items: center;\n gap: 8px;\n\n & svg {\n flex-shrink: 0;\n }\n`;\n\nexport const StyledSidebarListItem = styled.li`\n display: flex;\n gap: 10px;\n clear: both;\n`;\n\nconst sidebarRowLineHeight = 1.6;\n\n// Shared appearance for every sidebar row - leaf links AND nested group\n// headers - so hover, active state, and the left rail read identically.\nconst sidebarRowStyles = css<Props>`\n text-decoration: none;\n font-size: ${({ theme }) => theme.fontSizes.small.lg};\n line-height: ${sidebarRowLineHeight};\n color: ${({ theme }) => theme.colors.accentMuted};\n padding: 5px 0 5px 20px;\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1;\n min-width: 0;\n transition: all 0.3s ease;\n border-left: solid 1px ${({ theme }) => theme.colors.grayLight};\n\n & svg {\n flex-shrink: 0;\n }\n\n &:hover {\n color: ${({ theme }) => theme.colors.accent};\n border-color: ${({ theme }) => theme.colors.primary};\n }\n\n ${({ $isActive, theme }) =>\n $isActive &&\n css`\n color: ${theme.colors.accentStrong};\n border-color: ${theme.colors.primary};\n font-weight: 600;\n `};\n`;\n\n// The collapse chevron points right when closed and rotates to point down\n// when the group is open.\nconst sidebarChevron = css<Props>`\n & .lucide-chevron-right {\n margin-left: auto;\n transition: transform 0.3s ease;\n\n ${({ $isOpen }) =>\n $isOpen &&\n css`\n transform: rotate(90deg);\n `}\n }\n`;\n\nexport const StyledSidebarListItemLink = styled(Link)<Props>`\n ${sidebarRowStyles};\n`;\n\n// Compact HTTP-method label shown before a generated API endpoint link, colored\n// by verb so endpoints are scannable in the sidebar. Only rendered when a link\n// carries an `httpMethod` (endpoint pages do; hand-written pages do not).\n// The look is Badge's mono variation (tinted, solid when active); only\n// sidebar metrics are adjusted here. The tag stays on the title's first line\n// when the title wraps, so its top offset centers it within one line box. The\n// min-width fits the longest verb (OPTIONS), so every title starts on one edge.\nconst sidebarMethodTagHeight = 18;\n\nconst sidebarMethodTagOffset = ({ theme }: { theme: Theme }) =>\n `calc((${theme.fontSizes.small.lg} * ${sidebarRowLineHeight} - ${sidebarMethodTagHeight}px) / 2)`;\n\nexport const StyledSidebarMethodTag = styled(Badge)<{ theme: Theme }>`\n flex-shrink: 0;\n align-self: flex-start;\n justify-content: center;\n min-width: 48px;\n height: ${sidebarMethodTagHeight}px;\n margin-top: ${sidebarMethodTagOffset};\n font-size: 9px;\n letter-spacing: 0.02em;\n padding: 1px 4px;\n border: none;\n`;\n\n// Nested navigation group. The header shares the link appearance/hover; a\n// non-navigable group is a single toggle button, while a group that is also a\n// page pairs a link with a chevron toggle. Children live in\n// StyledSidebarGroupContent, which animates open/closed via height 0 <-> auto\n// (enabled by interpolate-size in GlobalStyles, same as the Accordion).\nexport const StyledSidebarGroupButton = styled(Button)<Props>`\n ${resetButton};\n ${sidebarRowStyles};\n ${sidebarChevron};\n width: 100%;\n height: auto;\n min-height: 0;\n text-align: left;\n\n /* Buttons aren't covered by the global a:focus-visible ring, so this\n nav-row toggle carries its own copy of it. */\n &:focus-visible {\n outline: none;\n border-radius: ${({ theme }) => theme.spacing.radius.xs};\n box-shadow: 0 0 0 2px ${({ theme }) => theme.colors.primaryLight};\n }\n`;\n\nexport const StyledSidebarGroupRow = styled.div<Props>`\n ${sidebarRowStyles};\n ${sidebarChevron};\n\n /* The row is a plain div, so it never matches :focus-visible itself. Ring the\n whole row when its inner link or chevron takes keyboard focus instead, to\n match the leaf-row focus treatment. */\n &:has(:focus-visible) {\n border-radius: ${({ theme }) => theme.spacing.radius.xs};\n box-shadow: 0 0 0 2px ${({ theme }) => theme.colors.primaryLight};\n }\n`;\n\nexport const StyledSidebarGroupLink = styled(Link)`\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1;\n min-width: 0;\n color: inherit;\n text-decoration: none;\n\n & svg {\n flex-shrink: 0;\n }\n\n /* Ring is drawn on the parent row via :has(:focus-visible); suppress the\n global a:focus-visible glow so it isn't drawn twice. */\n &:focus-visible {\n outline: none;\n box-shadow: none;\n }\n`;\n\nexport const StyledSidebarGroupChevron = styled(Button)`\n ${resetButton};\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: auto;\n height: auto;\n min-height: 0;\n padding: 0;\n border: 0;\n background: none;\n color: inherit;\n cursor: pointer;\n\n /* Ring is drawn on the parent row via :has(:focus-visible). */\n &:focus-visible {\n outline: none;\n }\n`;\n\nexport const StyledSidebarGroupContent = styled.ul.attrs<Props>(\n ({ $isOpen }) => ({\n \"aria-hidden\": !$isOpen,\n inert: !$isOpen,\n }),\n)<Props>`\n list-style: none;\n margin: 0;\n padding: 0;\n height: 0;\n overflow: clip;\n visibility: hidden;\n transition:\n height 0.3s ease,\n visibility 0s linear 0.3s;\n\n ${({ $isOpen }) =>\n $isOpen &&\n css`\n height: auto;\n visibility: visible;\n transition-delay: 0s;\n `}\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n`;\n\nexport const StyleMobileBar = styled(Button)<Props>`\n ${resetButton};\n position: fixed;\n z-index: 999;\n bottom: 0;\n right: 20px;\n font-size: ${({ theme }) => theme.fontSizes.strong.lg};\n line-height: ${({ theme }) => theme.fontSizes.strong.lg};\n box-shadow: ${({ theme }) => theme.shadows.sm};\n background: ${({ theme }) => theme.colors.primary};\n color: ${({ theme }) => theme.colors.surface};\n backdrop-filter: blur(10px);\n -webkit-backdrop-filter: blur(10px);\n padding: 10px;\n border-radius: 100px;\n margin: 0 0 20px 0;\n font-weight: 600;\n display: flex;\n justify-content: flex-start;\n width: auto;\n height: auto;\n min-height: 0;\n\n ${mq(\"lg\")} {\n display: none;\n }\n\n ${({ $isActive }) => $isActive && `position: fixed;`};\n`;\n\nexport const StyledMobileBurger = styled.span<Props>`\n display: block;\n margin: auto 0;\n width: 18px;\n height: 18px;\n position: relative;\n overflow: hidden;\n background: transparent;\n position: relative;\n transform: scale(0.8);\n\n &::before,\n &::after {\n content: \"\";\n display: block;\n position: absolute;\n width: 18px;\n height: 3px;\n border-radius: 3px;\n background: ${({ theme }) => theme.colors.surface};\n transition: all 0.3s ease;\n }\n\n &::before {\n top: 3px;\n }\n\n &::after {\n bottom: 3px;\n }\n\n ${({ $isActive }) =>\n $isActive &&\n css`\n &::before {\n transform: translateY(5px) rotate(45deg);\n }\n\n &::after {\n transform: translateY(-4px) rotate(-45deg);\n }\n `};\n`;\n\n// Visually hidden but present for crawlers and agents: points at llms.txt and\n// the .md mirrors. Rendered as the first element of the site layout.\nconst StyledLlmsDirective = styled.div`\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n`;\n\nfunction LlmsDirective() {\n // Every language and version has its own llms.txt under its URL prefix.\n const { prefix } = useVariant();\n const indexHref = \"/\" + joinVariantSlug(prefix, \"llms.txt\");\n const fullHref = \"/\" + joinVariantSlug(prefix, \"llms-full.txt\");\n return (\n <StyledLlmsDirective data-markdown-ignore>\n <a href={indexHref}>Documentation index for AI agents (llms.txt)</a>.\n Markdown versions of every page are available by appending .md to the page\n URL. The full corpus is at <a href={fullHref}>{fullHref}</a>.\n </StyledLlmsDirective>\n );\n}\n\ninterface DocsWrapperProps {\n children: React.ReactNode;\n}\n\nfunction DocsWrapper({ children }: DocsWrapperProps) {\n return <StyledDocsWrapper>{children}</StyledDocsWrapper>;\n}\n\nfunction DocsSidebar({ children }: DocsProps) {\n return <StyledDocsSidebar>{children}</StyledDocsSidebar>;\n}\n\nfunction DocsContainer({ children, lang }: DocsProps & { lang?: string }) {\n const { isOpen } = useChat();\n\n return (\n <StyledDocsContainer $isChatOpen={isOpen} lang={lang}>\n {children}\n </StyledDocsContainer>\n );\n}\n\nexport {\n DocsWrapper,\n DocsSidebar,\n DocsContainer,\n LlmsDirective,\n SectionBarContext,\n SectionBarProvider,\n};\n";
|
|
@@ -361,12 +361,14 @@ export const StyledSidebarListItem = styled.li\`
|
|
|
361
361
|
clear: both;
|
|
362
362
|
\`;
|
|
363
363
|
|
|
364
|
+
const sidebarRowLineHeight = 1.6;
|
|
365
|
+
|
|
364
366
|
// Shared appearance for every sidebar row - leaf links AND nested group
|
|
365
367
|
// headers - so hover, active state, and the left rail read identically.
|
|
366
368
|
const sidebarRowStyles = css<Props>\`
|
|
367
369
|
text-decoration: none;
|
|
368
370
|
font-size: \${({ theme }) => theme.fontSizes.small.lg};
|
|
369
|
-
line-height:
|
|
371
|
+
line-height: \${sidebarRowLineHeight};
|
|
370
372
|
color: \${({ theme }) => theme.colors.accentMuted};
|
|
371
373
|
padding: 5px 0 5px 20px;
|
|
372
374
|
display: flex;
|
|
@@ -418,9 +420,21 @@ export const StyledSidebarListItemLink = styled(Link)<Props>\`
|
|
|
418
420
|
// by verb so endpoints are scannable in the sidebar. Only rendered when a link
|
|
419
421
|
// carries an \`httpMethod\` (endpoint pages do; hand-written pages do not).
|
|
420
422
|
// The look is Badge's mono variation (tinted, solid when active); only
|
|
421
|
-
// sidebar metrics are adjusted here.
|
|
422
|
-
|
|
423
|
+
// sidebar metrics are adjusted here. The tag stays on the title's first line
|
|
424
|
+
// when the title wraps, so its top offset centers it within one line box. The
|
|
425
|
+
// min-width fits the longest verb (OPTIONS), so every title starts on one edge.
|
|
426
|
+
const sidebarMethodTagHeight = 18;
|
|
427
|
+
|
|
428
|
+
const sidebarMethodTagOffset = ({ theme }: { theme: Theme }) =>
|
|
429
|
+
\`calc((\${theme.fontSizes.small.lg} * \${sidebarRowLineHeight} - \${sidebarMethodTagHeight}px) / 2)\`;
|
|
430
|
+
|
|
431
|
+
export const StyledSidebarMethodTag = styled(Badge)<{ theme: Theme }>\`
|
|
423
432
|
flex-shrink: 0;
|
|
433
|
+
align-self: flex-start;
|
|
434
|
+
justify-content: center;
|
|
435
|
+
min-width: 48px;
|
|
436
|
+
height: \${sidebarMethodTagHeight}px;
|
|
437
|
+
margin-top: \${sidebarMethodTagOffset};
|
|
424
438
|
font-size: 9px;
|
|
425
439
|
letter-spacing: 0.02em;
|
|
426
440
|
padding: 1px 4px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const languagesMdxTemplate = "---\ntitle: \"Languages\"\ndescription: \"Publish your documentation in several languages from one project, with a language switcher, hreflang tags, and scoped search.\"\ndate: \"2026-09-08\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 4\n---\n# Languages\n\nTranslate your documentation by adding a `languages.json` file and one folder per language. Each language gets its own URL prefix, its own sidebar, a switcher in the sidebar, `hreflang` tags for search engines, and search and AI chat that stay inside the language the reader is looking at.\n\n<Callout type=\"note\">\n Languages are entirely opt-in. Without a `languages.json` file nothing changes: your docs live at the root of the docs folder and publish exactly as before.\n</Callout>\n\n## Configuration\n\nCreate `languages.json` in your project root, next to `doccupine.json`:\n\n```json\n[\n { \"code\": \"en\", \"label\": \"English\", \"default\": true },\n { \"code\": \"de\", \"label\": \"Deutsch\" }\n]\n```\n\n- **code**: a lowercase URL segment (letters, digits, and hyphens, such as `en`, `de`, or `pt-br`). It is the folder name, the URL prefix, and the value of the page's `lang` and `hreflang` attributes.\n- **label**: the name shown in the language switcher.\n- **default**: exactly one entry must be the default. Its pages live at the docs root and keep unprefixed URLs.\n- **strings** (optional): overrides for the site's own interface text in that language. See [Interface strings](#interface-strings).\n\nThe order of the entries is the order of the switcher.\n\n## Folder layout\n\nThe default language lives at the root of the docs folder. Every other language lives in a folder named after its code, mirroring the default layout:\n\n
|
|
1
|
+
export declare const languagesMdxTemplate = "---\ntitle: \"Languages\"\ndescription: \"Publish your documentation in several languages from one project, with a language switcher, hreflang tags, and scoped search.\"\ndate: \"2026-09-08\"\ncategory: \"Configuration\"\ncategoryOrder: 2\norder: 4\n---\n# Languages\n\nTranslate your documentation by adding a `languages.json` file and one folder per language. Each language gets its own URL prefix, its own sidebar, a switcher in the sidebar, `hreflang` tags for search engines, and search and AI chat that stay inside the language the reader is looking at.\n\n<Callout type=\"note\">\n Languages are entirely opt-in. Without a `languages.json` file nothing changes: your docs live at the root of the docs folder and publish exactly as before.\n</Callout>\n\n## Configuration\n\nCreate `languages.json` in your project root, next to `doccupine.json`:\n\n```json\n[\n { \"code\": \"en\", \"label\": \"English\", \"default\": true },\n { \"code\": \"de\", \"label\": \"Deutsch\" }\n]\n```\n\n- **code**: a lowercase URL segment (letters, digits, and hyphens, such as `en`, `de`, or `pt-br`). It is the folder name, the URL prefix, and the value of the page's `lang` and `hreflang` attributes.\n- **label**: the name shown in the language switcher.\n- **default**: exactly one entry must be the default. Its pages live at the docs root and keep unprefixed URLs.\n- **strings** (optional): overrides for the site's own interface text in that language. See [Interface strings](#interface-strings).\n\nThe order of the entries is the order of the switcher.\n\n## Folder layout\n\nThe default language lives at the root of the docs folder. Every other language lives in a folder named after its code, mirroring the default layout:\n\n<FileTree>\n\n- docs/\n - index.mdx\n - guides/\n - intro.mdx\n - de/\n - index.mdx\n - guides/\n - intro.mdx\n\n</FileTree>\n\nThese files publish at `/`, `/guides/intro`, `/de`, and `/de/guides/intro`.\n\nA page is the translation of another when it sits at the same path inside its language folder. Only translated pages exist in a language: a page you have not translated yet returns a 404 under that language's prefix, and the switcher takes readers to that language's home page instead.\n\nA language folder without an `index.mdx` gets a generated home page that redirects to its first page.\n\n## What the generated site does\n\n- **Switcher**: the sidebar footer row, between the focus-mode and theme toggles, shows a language dropdown when at least two languages are configured: a 30px pill carrying the current language that opens a menu of every language above it (the same dropdown the Doccupine platform uses), with the arrow keys, Escape, and a click outside to close it. When a version switcher shares the row, the two pills grow from their labels' widths to fill the sidebar's free width, and on the narrow desktop rail each shows its short form: the language's code and the version's own label. Switching goes to the same page in the chosen language when it exists, otherwise to that language's home.\n- **Sidebar and sections**: the sidebar lists only the pages of the current language. [Sections](/sections) work inside every language; a section tab is hidden in a language that has no pages in it.\n- **Search and AI chat**: results and answers come from the current language only. The MCP server's `search_docs` and `list_docs` tools accept a `language` parameter and default to the default language.\n- **SEO**: every translated page carries `alternates.languages` (`hreflang`) links to its other languages, an `x-default` pointing at the default language, and an Open Graph locale. The sitemap lists the same alternates. The `<main>` element carries the page's `lang` attribute; the `<html lang>` attribute is the default language server-side and is corrected from the URL before the first paint.\n- **Agents**: each language has its own `llms.txt` and `llms-full.txt` under its prefix (`/de/llms.txt`), and the root files link to them.\n\n## Navigation\n\nFrontmatter navigation is built per language automatically. To define a language's sidebar by hand, key `navigation.json` by URL prefix: `\"de\"` for the German root, `\"de/api\"` for the German API section. See [Navigation](/navigation).\n\n## Interface strings\n\nThe generated site's own labels (the search box, \"On this page\", the previous and next links, the action bar, the footer) are English by default. Override any of them per language with a `strings` object:\n\n```json\n[\n { \"code\": \"en\", \"label\": \"English\", \"default\": true },\n {\n \"code\": \"de\",\n \"label\": \"Deutsch\",\n \"strings\": {\n \"searchPlaceholder\": \"Dokumentation durchsuchen...\",\n \"onThisPage\": \"Auf dieser Seite\",\n \"previous\": \"Zur\u00FCck\",\n \"next\": \"Weiter\"\n }\n }\n]\n```\n\nKeys you leave out keep their default. The known keys are `searchButton`, `searchDialog`, `searchPlaceholder`, `searchResults`, `searching`, `noResults`, `resultsAvailable` (with a `{count}` placeholder), `resultAvailable`, `askAi`, `askAiAssistant`, `closeSearch`, `onThisPage`, `previous`, `next`, `openNavigation`, `closeNavigation`, `expandGroup` and `collapseGroup` (both with a `{title}` placeholder), `enterFocusMode`, `exitFocusMode`, `focusMode`, `copyContent`, `copied`, `copyCode`, `codeVariants`, `rss`, `rssFeed`, `viewAsMarkdown`, `toggleView`, `poweredBy`, `githubLink`, `aiAssistant`, `resetChat`, `chatGreeting`, `chatPlaceholder`, `chatInputLabel`, `chatAnswering`, `chatError`, `language`, and `version`. An unknown key is reported when the site is generated and ignored.\n\n## Rules\n\n- A language code must not be the slug of a [section](/sections), the first folder of a section's `directory`, a [version](/versions) slug, or one of the reserved segments `api`, `gate`, `mcp`, and `ingest`. The build stops with a message naming the file when it is.\n- The default language has no folder: a `docs/en/` folder on a site whose default is `en` stops the build.\n- When [versions](/versions) are configured too, the language folder comes first: `docs/de/v1/`.\n- The API reference generated from an OpenAPI spec is published in the default language only.\n";
|
|
@@ -36,16 +36,20 @@ The order of the entries is the order of the switcher.
|
|
|
36
36
|
|
|
37
37
|
The default language lives at the root of the docs folder. Every other language lives in a folder named after its code, mirroring the default layout:
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
39
|
+
<FileTree>
|
|
40
|
+
|
|
41
|
+
- docs/
|
|
42
|
+
- index.mdx
|
|
43
|
+
- guides/
|
|
44
|
+
- intro.mdx
|
|
45
|
+
- de/
|
|
46
|
+
- index.mdx
|
|
47
|
+
- guides/
|
|
48
|
+
- intro.mdx
|
|
49
|
+
|
|
50
|
+
</FileTree>
|
|
51
|
+
|
|
52
|
+
These files publish at \`/\`, \`/guides/intro\`, \`/de\`, and \`/de/guides/intro\`.
|
|
49
53
|
|
|
50
54
|
A page is the translation of another when it sits at the same path inside its language folder. Only translated pages exist in a language: a page you have not translated yet returns a 404 under that language's prefix, and the switcher takes readers to that language's home page instead.
|
|
51
55
|
|
|
@@ -12,47 +12,47 @@ export const packageJsonTemplate = JSON.stringify({
|
|
|
12
12
|
"type-check": "tsgo --noEmit",
|
|
13
13
|
},
|
|
14
14
|
dependencies: {
|
|
15
|
-
"@langchain/anthropic": "^1.
|
|
16
|
-
"@langchain/core": "^1.2
|
|
17
|
-
"@langchain/google-genai": "^2.3.
|
|
18
|
-
"@langchain/openai": "^1.
|
|
15
|
+
"@langchain/anthropic": "^1.6.0",
|
|
16
|
+
"@langchain/core": "^1.3.2",
|
|
17
|
+
"@langchain/google-genai": "^2.3.4",
|
|
18
|
+
"@langchain/openai": "^1.8.0",
|
|
19
19
|
"@mdx-js/react": "^3.1.1",
|
|
20
|
-
"@modelcontextprotocol/sdk": "^1.32.
|
|
20
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
21
21
|
"beautiful-mermaid": "^1.1.3",
|
|
22
|
-
"cherry-styled-components": "^0.2.
|
|
23
|
-
langchain: "^1.
|
|
24
|
-
"lucide-react": "^1.
|
|
22
|
+
"cherry-styled-components": "^0.2.20",
|
|
23
|
+
langchain: "^1.6.0",
|
|
24
|
+
"lucide-react": "^1.66.0",
|
|
25
25
|
minisearch: "^7.2.0",
|
|
26
|
-
next: "16.3
|
|
26
|
+
next: "16.4.3",
|
|
27
27
|
"next-mdx-remote": "^6.0.0",
|
|
28
|
-
"posthog-js": "^1.
|
|
29
|
-
"posthog-node": "^5.
|
|
30
|
-
react: "19.3.
|
|
31
|
-
"react-dom": "19.3.
|
|
28
|
+
"posthog-js": "^1.444.0",
|
|
29
|
+
"posthog-node": "^5.61.1",
|
|
30
|
+
react: "19.3.1",
|
|
31
|
+
"react-dom": "19.3.1",
|
|
32
32
|
"rehype-highlight": "^7.0.2",
|
|
33
33
|
"rehype-parse": "^9.0.1",
|
|
34
34
|
"rehype-stringify": "^10.0.1",
|
|
35
35
|
"remark-gfm": "^4.0.1",
|
|
36
|
-
"styled-components": "^6.
|
|
36
|
+
"styled-components": "^6.6.0",
|
|
37
37
|
unified: "^11.0.5",
|
|
38
|
-
zod: "^4.6.
|
|
38
|
+
zod: "^4.6.7",
|
|
39
39
|
},
|
|
40
40
|
devDependencies: {
|
|
41
|
-
"@next/env": "16.3
|
|
42
|
-
"@next/eslint-plugin-next": "16.3
|
|
41
|
+
"@next/env": "16.4.3",
|
|
42
|
+
"@next/eslint-plugin-next": "16.4.3",
|
|
43
43
|
"@types/node": "^26",
|
|
44
44
|
"@types/react": "^19",
|
|
45
45
|
"@types/react-dom": "^19",
|
|
46
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
47
|
-
"@typescript-eslint/parser": "^8.
|
|
46
|
+
"@typescript-eslint/eslint-plugin": "^8.72.1",
|
|
47
|
+
"@typescript-eslint/parser": "^8.72.1",
|
|
48
48
|
"@typescript/native-preview": "^7.0.0-dev.20260707.2",
|
|
49
49
|
eslint: "^10",
|
|
50
50
|
"eslint-plugin-import": "^2.32.0",
|
|
51
51
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
52
52
|
"eslint-plugin-react": "^7.37.5",
|
|
53
53
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
54
|
-
globals: "^17.
|
|
55
|
-
prettier: "^3.9.
|
|
54
|
+
globals: "^17.14.0",
|
|
55
|
+
prettier: "^3.9.10",
|
|
56
56
|
tsx: "^4.23.15",
|
|
57
57
|
typescript: "npm:@typescript/typescript6@^6.0.2",
|
|
58
58
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doccupine",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.161",
|
|
4
4
|
"description": "Free and open-source documentation platform. Write MDX, get a production-ready site with AI chat, built-in components, and an MCP server - in one command.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"engines": {
|
|
11
11
|
"node": ">=22.12.0"
|
|
12
12
|
},
|
|
13
|
-
"packageManager": "pnpm@12.
|
|
13
|
+
"packageManager": "pnpm@12.16.1",
|
|
14
14
|
"scripts": {
|
|
15
15
|
"clean": "node scripts/clean.mjs",
|
|
16
16
|
"build": "pnpm clean && tsc",
|
|
@@ -42,25 +42,25 @@
|
|
|
42
42
|
"author": "Luan Gjokaj",
|
|
43
43
|
"license": "SEE LICENSE IN LICENSE",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@readme/openapi-parser": "^
|
|
45
|
+
"@readme/openapi-parser": "^10.0.0",
|
|
46
46
|
"chalk": "^6.0.1",
|
|
47
|
-
"chokidar": "^
|
|
47
|
+
"chokidar": "^6.0.0",
|
|
48
48
|
"commander": "^15.0.0",
|
|
49
49
|
"fs-extra": "^11.4.1",
|
|
50
50
|
"gray-matter": "^4.0.3",
|
|
51
|
-
"lucide-react": "^1.
|
|
52
|
-
"next": "^16.3
|
|
51
|
+
"lucide-react": "^1.66.0",
|
|
52
|
+
"next": "^16.4.3",
|
|
53
53
|
"prompts": "^2.4.2",
|
|
54
|
-
"react": "^19.3.
|
|
55
|
-
"react-dom": "^19.3.
|
|
54
|
+
"react": "^19.3.1",
|
|
55
|
+
"react-dom": "^19.3.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/fs-extra": "^11.0.4",
|
|
59
|
-
"@types/node": "^26.6.
|
|
59
|
+
"@types/node": "^26.6.6",
|
|
60
60
|
"@types/prompts": "^2.4.9",
|
|
61
|
-
"prettier": "^3.9.
|
|
61
|
+
"prettier": "^3.9.10",
|
|
62
62
|
"typescript": "^7.0.2",
|
|
63
|
-
"vitest": "^5.0.
|
|
63
|
+
"vitest": "^5.0.5"
|
|
64
64
|
},
|
|
65
65
|
"files": [
|
|
66
66
|
"dist/**/*"
|