docsprout 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +224 -0
  3. package/dist/index.cjs +9725 -0
  4. package/dist/index.d.cts +1 -0
  5. package/dist/index.d.ts +1 -0
  6. package/dist/index.js +9730 -0
  7. package/package.json +36 -0
  8. package/templates/base/config.json +18 -0
  9. package/templates/base/content/index.md +10 -0
  10. package/templates/base/generated/pages.json +2 -0
  11. package/templates/base/generated/search-index.json +2 -0
  12. package/templates/base/sidebar.json +9 -0
  13. package/templates/base/themes/default.json +8 -0
  14. package/templates/web/app/(public)/docs/[[...slug]]/loading.tsx +9 -0
  15. package/templates/web/app/(public)/docs/[[...slug]]/page.tsx +74 -0
  16. package/templates/web/app/api/config/route.ts +47 -0
  17. package/templates/web/app/api/publish/route.ts +82 -0
  18. package/templates/web/app/api/search/route.ts +11 -0
  19. package/templates/web/app/docs-admin/loading.tsx +9 -0
  20. package/templates/web/app/docs-admin/page.tsx +237 -0
  21. package/templates/web/app/globals.css +141 -0
  22. package/templates/web/app/layout.tsx +46 -0
  23. package/templates/web/app/page.tsx +17 -0
  24. package/templates/web/components/markdown-content.tsx +100 -0
  25. package/templates/web/components/providers.tsx +12 -0
  26. package/templates/web/components/rich-editor.tsx +94 -0
  27. package/templates/web/components/search-box.tsx +43 -0
  28. package/templates/web/components/sidebar.tsx +36 -0
  29. package/templates/web/components/toc.tsx +53 -0
  30. package/templates/web/lib/content.ts +41 -0
  31. package/templates/web/lib/db.ts +9 -0
  32. package/templates/web/lib/types.ts +33 -0
  33. package/templates/web/next-env.d.ts +5 -0
  34. package/templates/web/next.config.mjs +16 -0
  35. package/templates/web/package.json +40 -0
  36. package/templates/web/postcss.config.cjs +8 -0
  37. package/templates/web/prisma/schema.prisma +21 -0
  38. package/templates/web/tailwind.config.cjs +10 -0
  39. package/templates/web/tsconfig.json +20 -0
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "docsprout-web",
3
+ "private": true,
4
+ "scripts": {
5
+ "dev": "next dev",
6
+ "build": "prisma generate \u0026\u0026 next build",
7
+ "start": "next start",
8
+ "typecheck": "tsc -p tsconfig.json --noEmit",
9
+ "prisma:generate": "prisma generate",
10
+ "prisma:migrate": "prisma migrate dev --name init"
11
+ },
12
+ "dependencies": {
13
+ "@mdx-js/react": "^3.0.1",
14
+ "@next/mdx": "^15.0.0",
15
+ "@prisma/client": "^5.20.0",
16
+ "@tiptap/extension-link": "^2.6.6",
17
+ "@tiptap/extension-task-item": "^2.6.6",
18
+ "@tiptap/extension-task-list": "^2.6.6",
19
+ "@tiptap/react": "^2.6.6",
20
+ "@tiptap/starter-kit": "^2.6.6",
21
+ "next": "15.0.0",
22
+ "next-themes": "^0.3.0",
23
+ "prisma": "^5.20.0",
24
+ "react": "^18.3.1",
25
+ "react-dom": "^18.3.1",
26
+ "react-markdown": "^9.0.1",
27
+ "rehype-highlight": "^7.0.0",
28
+ "rehype-slug": "^6.0.0",
29
+ "remark-gfm": "^4.0.0",
30
+ "mermaid": "^11.4.1"
31
+ },
32
+ "devDependencies": {
33
+ "@types/node": "^22.7.4",
34
+ "@types/react": "^18.3.8",
35
+ "autoprefixer": "^10.4.20",
36
+ "postcss": "^8.4.47",
37
+ "tailwindcss": "^3.4.13",
38
+ "typescript": "^5.5.4"
39
+ }
40
+ }
@@ -0,0 +1,8 @@
1
+ module.exports = {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {}
5
+ }
6
+ };
7
+
8
+
@@ -0,0 +1,21 @@
1
+ generator client {
2
+ provider = "prisma-client-js"
3
+ }
4
+
5
+ datasource db {
6
+ provider = "sqlite"
7
+ url = "file:./docsprout.db"
8
+ }
9
+
10
+ model Page {
11
+ id Int @id @default(autoincrement())
12
+ title String
13
+ slug String @unique
14
+ content String
15
+ status String @default("draft")
16
+ metadata String @default("{}")
17
+ createdAt DateTime @default(now())
18
+ updatedAt DateTime @updatedAt
19
+ }
20
+
21
+
@@ -0,0 +1,10 @@
1
+ module.exports = {
2
+ darkMode: ["class"],
3
+ content: ["./app/**/*.{ts,tsx}", "./components/**/*.{ts,tsx}"],
4
+ theme: {
5
+ extend: {}
6
+ },
7
+ plugins: []
8
+ };
9
+
10
+
@@ -0,0 +1,20 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "lib": ["dom", "dom.iterable", "es2022"],
5
+ "allowJs": false,
6
+ "skipLibCheck": true,
7
+ "strict": true,
8
+ "noEmit": true,
9
+ "esModuleInterop": true,
10
+ "module": "ESNext",
11
+ "moduleResolution": "Bundler",
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "jsx": "preserve",
15
+ "incremental": true,
16
+ "plugins": [{ "name": "next" }]
17
+ },
18
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
19
+ "exclude": ["node_modules"]
20
+ }