doccupine 0.0.91 → 0.0.92
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/README.md +5 -5
- package/dist/templates/components/layout/ClientThemeProvider.d.ts +1 -1
- package/dist/templates/components/layout/ClientThemeProvider.js +6 -4
- package/dist/templates/package.js +11 -11
- package/dist/templates/pnpmWorkspace.d.ts +1 -1
- package/dist/templates/pnpmWorkspace.js +0 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -173,11 +173,11 @@ You can override the URL at deploy time by setting the `NEXT_PUBLIC_SITE_URL` en
|
|
|
173
173
|
|
|
174
174
|
Doccupine generates [llms.txt](https://llmstxt.org) artifacts so AI agents can discover and ingest your docs. On every regeneration, the following files are written to the generated app's `public/` directory:
|
|
175
175
|
|
|
176
|
-
| File
|
|
177
|
-
|
|
|
178
|
-
| `llms.txt`
|
|
179
|
-
| `llms-full.txt`
|
|
180
|
-
| `public/<slug>.md`
|
|
176
|
+
| File | Contents |
|
|
177
|
+
| ------------------ | --------------------------------------------------------------------------------------- |
|
|
178
|
+
| `llms.txt` | Index of every page (title, description, URL), grouped by section and category |
|
|
179
|
+
| `llms-full.txt` | Full-text bundle: every page's body concatenated for one-shot ingestion |
|
|
180
|
+
| `public/<slug>.md` | Per-page Markdown mirror of each MDX page, suitable for direct fetching at `/<slug>.md` |
|
|
181
181
|
|
|
182
182
|
The site name and description used in `llms.txt` come from `config.json` (`name`, `description`). Page URLs are absolute when `url` is set in `config.json` (or via `NEXT_PUBLIC_SITE_URL`), and root-relative otherwise.
|
|
183
183
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const clientThemeProviderTemplate = "\"use client\";\nimport React, { useCallback, useContext, useEffect, useState } from \"react\";\nimport { ThemeProvider as StyledThemeProvider } from \"styled-components\";\nimport { Theme } from \"@/app/theme\";\nimport { GlobalStyles } from \"@/components/layout/GlobalStyles\";\n\ntype ThemeMode = \"light\" | \"dark\";\n\ntype ThemeContextValue = {\n /** The styled-components theme object \u2014 same reference in both modes;\n the values it points to are CSS variables that flip per active class. */\n theme: Theme;\n /** Active mode, derived from the \"dark\" class on <html>. */\n mode: ThemeMode;\n /** Update the active mode: flips the class and persists the cookie. */\n setMode: (m: ThemeMode) => void;\n};\n\nconst ThemeContext = React.createContext<ThemeContextValue | null>(null);\n\nfunction useThemeOverride() {\n const ctx = useContext(ThemeContext);\n if (!ctx) {\n throw new Error(\"useThemeOverride must be used within ClientThemeProvider\");\n }\n return ctx;\n}\n\nfunction readMode(): ThemeMode {\n if (typeof document === \"undefined\") return \"light\";\n return document.documentElement.classList.contains(\"dark\") ? \"dark\" : \"light\";\n}\n\nfunction ClientThemeProvider({\n children,\n theme,\n}: {\n children: React.ReactNode;\n theme: Theme;\n}) {\n // Mode lives in React state so consumers (e.g. ThemeToggle) re-render when\n // the user toggles. The visual swap itself is driven entirely by the\n // \"dark\" class on <html> + CSS variables \u2014 React doesn't drive paint.\n const [mode, setModeState] = useState<ThemeMode>(
|
|
1
|
+
export declare const clientThemeProviderTemplate = "\"use client\";\nimport React, { useCallback, useContext, useEffect, useState } from \"react\";\nimport { ThemeProvider as StyledThemeProvider } from \"styled-components\";\nimport { Theme } from \"@/app/theme\";\nimport { GlobalStyles } from \"@/components/layout/GlobalStyles\";\n\ntype ThemeMode = \"light\" | \"dark\";\n\ntype ThemeContextValue = {\n /** The styled-components theme object \u2014 same reference in both modes;\n the values it points to are CSS variables that flip per active class. */\n theme: Theme;\n /** Active mode, derived from the \"dark\" class on <html>. */\n mode: ThemeMode;\n /** Update the active mode: flips the class and persists the cookie. */\n setMode: (m: ThemeMode) => void;\n};\n\nconst ThemeContext = React.createContext<ThemeContextValue | null>(null);\n\nfunction useThemeOverride() {\n const ctx = useContext(ThemeContext);\n if (!ctx) {\n throw new Error(\"useThemeOverride must be used within ClientThemeProvider\");\n }\n return ctx;\n}\n\nfunction readMode(): ThemeMode {\n if (typeof document === \"undefined\") return \"light\";\n return document.documentElement.classList.contains(\"dark\") ? \"dark\" : \"light\";\n}\n\nfunction ClientThemeProvider({\n children,\n theme,\n}: {\n children: React.ReactNode;\n theme: Theme;\n}) {\n // Mode lives in React state so consumers (e.g. ThemeToggle) re-render when\n // the user toggles. The visual swap itself is driven entirely by the\n // \"dark\" class on <html> + CSS variables \u2014 React doesn't drive paint.\n // The lazy initializer reads the class set by the theme-init blocking\n // script (SSR returns \"light\"); no rendered markup branches on mode, so\n // reading the DOM during the hydration render can't cause a mismatch.\n const [mode, setModeState] = useState<ThemeMode>(readMode);\n\n useEffect(() => {\n // Backfill the cookie if the theme-init script didn't get to write one\n // (rare \u2014 e.g. cookies disabled at first paint).\n try {\n const has = document.cookie\n .split(\";\")\n .some((c) => c.trim().startsWith(\"theme=\"));\n if (!has) {\n const m = readMode();\n document.cookie = `theme=${m};path=/;max-age=31536000;SameSite=Lax`;\n }\n } catch {}\n }, []);\n\n const setMode = useCallback((next: ThemeMode) => {\n if (typeof document !== \"undefined\") {\n document.documentElement.classList.toggle(\"dark\", next === \"dark\");\n document.documentElement.style.colorScheme = next;\n try {\n document.cookie = `theme=${next};path=/;max-age=31536000;SameSite=Lax`;\n } catch {}\n }\n setModeState(next);\n }, []);\n\n return (\n <ThemeContext.Provider value={{ theme, mode, setMode }}>\n <StyledThemeProvider theme={theme}>\n <GlobalStyles />\n {children}\n </StyledThemeProvider>\n </ThemeContext.Provider>\n );\n}\n\nexport { ClientThemeProvider, useThemeOverride };\n";
|
|
@@ -41,12 +41,14 @@ function ClientThemeProvider({
|
|
|
41
41
|
// Mode lives in React state so consumers (e.g. ThemeToggle) re-render when
|
|
42
42
|
// the user toggles. The visual swap itself is driven entirely by the
|
|
43
43
|
// "dark" class on <html> + CSS variables — React doesn't drive paint.
|
|
44
|
-
|
|
44
|
+
// The lazy initializer reads the class set by the theme-init blocking
|
|
45
|
+
// script (SSR returns "light"); no rendered markup branches on mode, so
|
|
46
|
+
// reading the DOM during the hydration render can't cause a mismatch.
|
|
47
|
+
const [mode, setModeState] = useState<ThemeMode>(readMode);
|
|
45
48
|
|
|
46
49
|
useEffect(() => {
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
setModeState(readMode());
|
|
50
|
+
// Backfill the cookie if the theme-init script didn't get to write one
|
|
51
|
+
// (rare — e.g. cookies disabled at first paint).
|
|
50
52
|
try {
|
|
51
53
|
const has = document.cookie
|
|
52
54
|
.split(";")
|
|
@@ -10,28 +10,28 @@ export const packageJsonTemplate = JSON.stringify({
|
|
|
10
10
|
format: "prettier --write .",
|
|
11
11
|
},
|
|
12
12
|
dependencies: {
|
|
13
|
-
"@langchain/anthropic": "^1.
|
|
14
|
-
"@langchain/core": "^1.1.
|
|
15
|
-
"@langchain/google-genai": "^2.1.
|
|
16
|
-
"@langchain/openai": "^1.4.
|
|
13
|
+
"@langchain/anthropic": "^1.4.0",
|
|
14
|
+
"@langchain/core": "^1.1.48",
|
|
15
|
+
"@langchain/google-genai": "^2.1.31",
|
|
16
|
+
"@langchain/openai": "^1.4.7",
|
|
17
17
|
"@mdx-js/react": "^3.1.1",
|
|
18
18
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
19
|
-
"@posthog/react": "^1.9.
|
|
19
|
+
"@posthog/react": "^1.9.1",
|
|
20
20
|
"cherry-styled-components": "^0.1.17",
|
|
21
|
-
langchain: "^1.4.
|
|
22
|
-
"lucide-react": "^1.
|
|
21
|
+
langchain: "^1.4.2",
|
|
22
|
+
"lucide-react": "^1.17.0",
|
|
23
23
|
minisearch: "^7.2.0",
|
|
24
24
|
next: "16.2.6",
|
|
25
25
|
"next-mdx-remote": "^6.0.0",
|
|
26
|
-
"posthog-js": "^1.
|
|
27
|
-
"posthog-node": "^5.
|
|
26
|
+
"posthog-js": "^1.376.4",
|
|
27
|
+
"posthog-node": "^5.35.6",
|
|
28
28
|
react: "19.2.6",
|
|
29
29
|
"react-dom": "19.2.6",
|
|
30
30
|
"rehype-highlight": "^7.0.2",
|
|
31
31
|
"rehype-parse": "^9.0.1",
|
|
32
32
|
"rehype-stringify": "^10.0.1",
|
|
33
33
|
"remark-gfm": "^4.0.1",
|
|
34
|
-
"styled-components": "^6.4.
|
|
34
|
+
"styled-components": "^6.4.2",
|
|
35
35
|
unified: "^11.0.5",
|
|
36
36
|
zod: "^4.4.3",
|
|
37
37
|
},
|
|
@@ -39,7 +39,7 @@ export const packageJsonTemplate = JSON.stringify({
|
|
|
39
39
|
"@types/node": "^25",
|
|
40
40
|
"@types/react": "^19",
|
|
41
41
|
"@types/react-dom": "^19",
|
|
42
|
-
"baseline-browser-mapping": "^2.10.
|
|
42
|
+
"baseline-browser-mapping": "^2.10.32",
|
|
43
43
|
eslint: "^9",
|
|
44
44
|
"eslint-config-next": "16.2.6",
|
|
45
45
|
prettier: "^3.8.3",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const pnpmWorkspaceTemplate = "allowBuilds:\n core-js: false\n
|
|
1
|
+
export declare const pnpmWorkspaceTemplate = "allowBuilds:\n core-js: false\n protobufjs: false\n sharp: false\n unrs-resolver: false\n";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doccupine",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.92",
|
|
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": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"chalk": "^5.6.2",
|
|
38
38
|
"chokidar": "^5.0.0",
|
|
39
|
-
"commander": "^
|
|
39
|
+
"commander": "^15.0.0",
|
|
40
40
|
"fs-extra": "^11.3.5",
|
|
41
41
|
"gray-matter": "^4.0.3",
|
|
42
42
|
"next": "^16.2.6",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/fs-extra": "^11.0.4",
|
|
49
|
-
"@types/node": "^25.
|
|
49
|
+
"@types/node": "^25.9.1",
|
|
50
50
|
"@types/prompts": "^2.4.9",
|
|
51
51
|
"prettier": "^3.8.3",
|
|
52
52
|
"typescript": "^6.0.3",
|
|
53
|
-
"vitest": "^4.1.
|
|
53
|
+
"vitest": "^4.1.7"
|
|
54
54
|
},
|
|
55
55
|
"files": [
|
|
56
56
|
"dist/**/*"
|