doccupine 0.0.94 → 0.0.95

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.
@@ -10,7 +10,6 @@ import { gateRoutesTemplate } from "../templates/app/api/gate/route.js";
10
10
  import { mcpRoutesTemplate } from "../templates/app/api/mcp/route.js";
11
11
  import { ragRoutesTemplate } from "../templates/app/api/rag/route.js";
12
12
  import { searchRoutesTemplate } from "../templates/app/api/search/route.js";
13
- import { routesTemplate } from "../templates/app/api/theme/routes.js";
14
13
  import { notFoundTemplate } from "../templates/app/not-found.js";
15
14
  import { themeTemplate } from "../templates/app/theme.js";
16
15
  import { chatTemplate } from "../templates/components/Chat.js";
@@ -131,7 +130,6 @@ export const appStructure = {
131
130
  "app/api/mcp/route.ts": mcpRoutesTemplate,
132
131
  "app/api/rag/route.ts": ragRoutesTemplate,
133
132
  "app/api/search/route.ts": searchRoutesTemplate,
134
- "app/api/theme/route.ts": routesTemplate,
135
133
  "services/search.ts": searchServiceTemplate,
136
134
  "services/mcp/index.ts": mcpIndexTemplate,
137
135
  "services/mcp/server.ts": mcpServerTemplate,
@@ -1 +1 @@
1
- export declare const themeToggleTemplate = "\"use client\";\nimport { resetButton } from \"cherry-styled-components\";\nimport styled, { css } from \"styled-components\";\nimport { Theme } from \"@/app/theme\";\nimport { Icon } from \"@/components/layout/Icon\";\nimport { useThemeOverride } from \"@/components/layout/ClientThemeProvider\";\n\nconst StyledThemeToggle = styled.button<{ theme: Theme; $hidden?: boolean }>`\n ${resetButton}\n width: 59px;\n height: 32px;\n border-radius: 30px;\n display: flex;\n position: relative;\n margin: auto 0;\n transform: scale(1);\n background: ${({ theme }) => theme.colors.light};\n border: solid 1px ${({ theme }) => theme.colors.grayLight};\n\n &::after {\n content: \"\";\n position: absolute;\n top: 3px;\n left: 3px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background: ${({ theme }) =>\n `color-mix(in srgb, ${theme.colors.primaryLight} 20%, transparent)`};\n transition: all 0.3s ease;\n z-index: 1;\n }\n\n /* Knob position depends on the active mode, signaled by the \"dark\" class\n on <html>. Pure CSS \u2014 no JS conditional needed for the visual swap. */\n :root.dark &::after {\n transform: translateX(27px);\n }\n\n ${({ $hidden }) =>\n $hidden &&\n css`\n display: none;\n `}\n\n & svg {\n width: 16px;\n height: 16px;\n object-fit: contain;\n margin: auto;\n transition: all 0.3s ease;\n position: relative;\n z-index: 2;\n }\n\n & .lucide-sun {\n transform: translateX(1px);\n }\n\n & .lucide-moon-star {\n transform: translateX(-1px);\n }\n\n & svg[stroke] {\n stroke: ${({ theme }) => theme.colors.primary};\n }\n\n &:hover {\n transform: scale(1.05);\n color: ${({ theme }) => theme.colors.accent};\n\n & svg[stroke] {\n stroke: ${({ theme }) => theme.colors.accent};\n }\n }\n\n &:active {\n transform: scale(0.97);\n }\n`;\n\nfunction ToggleTheme({ $hidden }: { $hidden?: boolean }) {\n const { mode, setMode } = useThemeOverride();\n\n return (\n <StyledThemeToggle\n onClick={async () => {\n const next = mode === \"dark\" ? \"light\" : \"dark\";\n setMode(next);\n await fetch(\"/api/theme\", {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ theme: next }),\n }).catch((err) => console.error(\"Failed to persist theme:\", err));\n }}\n $hidden={$hidden}\n aria-label=\"Toggle Theme\"\n >\n <Icon name=\"Sun\" className=\"light\" />\n <Icon name=\"MoonStar\" className=\"dark\" />\n </StyledThemeToggle>\n );\n}\n\nfunction ToggleThemeLoading() {\n return (\n <StyledThemeToggle $hidden aria-label=\"Toggle Theme\">\n <Icon name=\"MoonStar\" className=\"dark\" />\n <Icon name=\"Sun\" className=\"light\" />\n </StyledThemeToggle>\n );\n}\n\nexport { ToggleTheme, ToggleThemeLoading };\n";
1
+ export declare const themeToggleTemplate = "\"use client\";\nimport { resetButton } from \"cherry-styled-components\";\nimport styled, { css } from \"styled-components\";\nimport { Theme } from \"@/app/theme\";\nimport { Icon } from \"@/components/layout/Icon\";\nimport { useThemeOverride } from \"@/components/layout/ClientThemeProvider\";\n\nconst StyledThemeToggle = styled.button<{ theme: Theme; $hidden?: boolean }>`\n ${resetButton}\n width: 59px;\n height: 32px;\n border-radius: 30px;\n display: flex;\n position: relative;\n margin: auto 0;\n transform: scale(1);\n background: ${({ theme }) => theme.colors.light};\n border: solid 1px ${({ theme }) => theme.colors.grayLight};\n\n &::after {\n content: \"\";\n position: absolute;\n top: 3px;\n left: 3px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background: ${({ theme }) =>\n `color-mix(in srgb, ${theme.colors.primaryLight} 20%, transparent)`};\n transition: all 0.3s ease;\n z-index: 1;\n }\n\n /* Knob position depends on the active mode, signaled by the \"dark\" class\n on <html>. Pure CSS \u2014 no JS conditional needed for the visual swap. */\n :root.dark &::after {\n transform: translateX(27px);\n }\n\n ${({ $hidden }) =>\n $hidden &&\n css`\n display: none;\n `}\n\n & svg {\n width: 16px;\n height: 16px;\n object-fit: contain;\n margin: auto;\n transition: all 0.3s ease;\n position: relative;\n z-index: 2;\n }\n\n & .lucide-sun {\n transform: translateX(1px);\n }\n\n & .lucide-moon-star {\n transform: translateX(-1px);\n }\n\n & svg[stroke] {\n stroke: ${({ theme }) => theme.colors.primary};\n }\n\n &:hover {\n transform: scale(1.05);\n color: ${({ theme }) => theme.colors.accent};\n\n & svg[stroke] {\n stroke: ${({ theme }) => theme.colors.accent};\n }\n }\n\n &:active {\n transform: scale(0.97);\n }\n`;\n\nfunction ToggleTheme({ $hidden }: { $hidden?: boolean }) {\n const { mode, setMode } = useThemeOverride();\n\n return (\n <StyledThemeToggle\n onClick={() => setMode(mode === \"dark\" ? \"light\" : \"dark\")}\n $hidden={$hidden}\n aria-label=\"Toggle Theme\"\n >\n <Icon name=\"Sun\" className=\"light\" />\n <Icon name=\"MoonStar\" className=\"dark\" />\n </StyledThemeToggle>\n );\n}\n\nfunction ToggleThemeLoading() {\n return (\n <StyledThemeToggle $hidden aria-label=\"Toggle Theme\">\n <Icon name=\"MoonStar\" className=\"dark\" />\n <Icon name=\"Sun\" className=\"light\" />\n </StyledThemeToggle>\n );\n}\n\nexport { ToggleTheme, ToggleThemeLoading };\n";
@@ -84,15 +84,7 @@ function ToggleTheme({ $hidden }: { $hidden?: boolean }) {
84
84
 
85
85
  return (
86
86
  <StyledThemeToggle
87
- onClick={async () => {
88
- const next = mode === "dark" ? "light" : "dark";
89
- setMode(next);
90
- await fetch("/api/theme", {
91
- method: "POST",
92
- headers: { "Content-Type": "application/json" },
93
- body: JSON.stringify({ theme: next }),
94
- }).catch((err) => console.error("Failed to persist theme:", err));
95
- }}
87
+ onClick={() => setMode(mode === "dark" ? "light" : "dark")}
96
88
  $hidden={$hidden}
97
89
  aria-label="Toggle Theme"
98
90
  >
@@ -17,14 +17,14 @@ export const packageJsonTemplate = JSON.stringify({
17
17
  "@mdx-js/react": "^3.1.1",
18
18
  "@modelcontextprotocol/sdk": "^1.29.0",
19
19
  "@posthog/react": "^1.10.3",
20
- "cherry-styled-components": "^0.1.18",
20
+ "cherry-styled-components": "^0.2.0",
21
21
  langchain: "^1.5.2",
22
22
  "lucide-react": "^1.23.0",
23
23
  minisearch: "^7.2.0",
24
- next: "16.2.9",
24
+ next: "16.2.10",
25
25
  "next-mdx-remote": "^6.0.0",
26
- "posthog-js": "^1.396.4",
27
- "posthog-node": "^5.39.2",
26
+ "posthog-js": "^1.396.5",
27
+ "posthog-node": "^5.39.4",
28
28
  react: "19.2.7",
29
29
  "react-dom": "19.2.7",
30
30
  "rehype-highlight": "^7.0.2",
@@ -39,9 +39,9 @@ export const packageJsonTemplate = JSON.stringify({
39
39
  "@types/node": "^26",
40
40
  "@types/react": "^19",
41
41
  "@types/react-dom": "^19",
42
- "baseline-browser-mapping": "^2.10.40",
42
+ "baseline-browser-mapping": "^2.10.41",
43
43
  eslint: "^9",
44
- "eslint-config-next": "16.2.9",
44
+ "eslint-config-next": "16.2.10",
45
45
  prettier: "^3.9.4",
46
46
  typescript: "^6",
47
47
  },
@@ -105,8 +105,7 @@ ${posthogCall} const pathname = req.nextUrl.pathname;
105
105
 
106
106
  // Content APIs (RAG chat + search) return 401 without a valid cookie so the
107
107
  // docs can't be scraped around the login screen. /api/mcp keeps its own key
108
- // auth above; /api/gate and /api/theme stay open so the gate can unlock and
109
- // the theme can toggle.
108
+ // auth above; /api/gate stays open so the gate can unlock.
110
109
  if (
111
110
  !unlocked &&
112
111
  (pathname.startsWith("/api/rag") || pathname.startsWith("/api/search"))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doccupine",
3
- "version": "0.0.94",
3
+ "version": "0.0.95",
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": {
@@ -39,7 +39,7 @@
39
39
  "commander": "^15.0.0",
40
40
  "fs-extra": "^11.3.6",
41
41
  "gray-matter": "^4.0.3",
42
- "next": "^16.2.9",
42
+ "next": "^16.2.10",
43
43
  "prompts": "^2.4.2",
44
44
  "react": "^19.2.7",
45
45
  "react-dom": "^19.2.7"