create-noxion 0.1.1 → 0.3.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 (97) hide show
  1. package/README.md +2 -2
  2. package/dist/add.d.ts +13 -0
  3. package/dist/add.d.ts.map +1 -0
  4. package/dist/add.js +141 -0
  5. package/dist/add.js.map +1 -0
  6. package/dist/index.d.ts +4 -2
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +195 -5
  9. package/dist/index.js.map +1 -1
  10. package/dist/scaffold.d.ts +9 -1
  11. package/dist/scaffold.d.ts.map +1 -1
  12. package/dist/scaffold.js +20 -3
  13. package/dist/scaffold.js.map +1 -1
  14. package/dist/templates/docs/.env +8 -0
  15. package/dist/templates/docs/.env.example +9 -0
  16. package/dist/templates/docs/app/[slug]/page.tsx +49 -0
  17. package/dist/templates/docs/app/api/notion-webhook/route.ts +12 -0
  18. package/dist/templates/docs/app/api/revalidate/route.ts +12 -0
  19. package/dist/templates/docs/app/globals.css +31 -0
  20. package/dist/templates/docs/app/layout.tsx +36 -0
  21. package/dist/templates/docs/app/not-found.tsx +38 -0
  22. package/dist/templates/docs/app/page.tsx +45 -0
  23. package/dist/templates/docs/app/robots.ts +7 -0
  24. package/dist/templates/docs/app/site-layout.tsx +28 -0
  25. package/dist/templates/docs/app/sitemap.ts +9 -0
  26. package/dist/templates/docs/app/tailwind.css +3 -0
  27. package/dist/templates/docs/app/theme-script.tsx +16 -0
  28. package/dist/templates/docs/lib/config.ts +24 -0
  29. package/dist/templates/docs/lib/notion.ts +48 -0
  30. package/dist/templates/docs/next.config.ts +26 -0
  31. package/dist/templates/docs/noxion.config.ts +23 -0
  32. package/dist/templates/docs/package.json +25 -0
  33. package/dist/templates/docs/tsconfig.json +19 -0
  34. package/dist/templates/full/.env +10 -0
  35. package/dist/templates/full/.env.example +11 -0
  36. package/dist/templates/full/app/[slug]/page.tsx +55 -0
  37. package/dist/templates/full/app/api/notion-webhook/route.ts +12 -0
  38. package/dist/templates/full/app/api/revalidate/route.ts +12 -0
  39. package/dist/templates/full/app/globals.css +31 -0
  40. package/dist/templates/full/app/home-content.tsx +59 -0
  41. package/dist/templates/full/app/layout.tsx +36 -0
  42. package/dist/templates/full/app/not-found.tsx +38 -0
  43. package/dist/templates/full/app/page.tsx +50 -0
  44. package/dist/templates/full/app/robots.ts +7 -0
  45. package/dist/templates/full/app/site-layout.tsx +32 -0
  46. package/dist/templates/full/app/sitemap.ts +9 -0
  47. package/dist/templates/full/app/tag/[tag]/page.tsx +66 -0
  48. package/dist/templates/full/app/tailwind.css +3 -0
  49. package/dist/templates/full/app/theme-script.tsx +16 -0
  50. package/dist/templates/full/lib/config.ts +24 -0
  51. package/dist/templates/full/lib/notion.ts +66 -0
  52. package/dist/templates/full/next.config.ts +26 -0
  53. package/dist/templates/full/noxion.config.ts +40 -0
  54. package/dist/templates/full/package.json +25 -0
  55. package/dist/templates/full/tsconfig.json +19 -0
  56. package/dist/templates/nextjs/.env.example +1 -0
  57. package/dist/templates/nextjs/app/api/notion-webhook/route.ts +12 -0
  58. package/dist/templates/nextjs/app/home-content.tsx +17 -26
  59. package/dist/templates/nextjs/app/layout.tsx +4 -3
  60. package/dist/templates/nextjs/app/page.tsx +3 -3
  61. package/dist/templates/nextjs/app/site-layout.tsx +28 -0
  62. package/dist/templates/nextjs/app/tag/[tag]/page.tsx +4 -4
  63. package/dist/templates/nextjs/app/tailwind.css +3 -0
  64. package/dist/templates/nextjs/lib/config.ts +1 -0
  65. package/dist/templates/nextjs/lib/notion.ts +5 -5
  66. package/dist/templates/nextjs/package.json +3 -3
  67. package/dist/templates/plugin/noxion-plugin.json +10 -0
  68. package/dist/templates/plugin/package.json +41 -0
  69. package/dist/templates/plugin/src/__tests__/plugin.test.ts +39 -0
  70. package/dist/templates/plugin/src/index.ts +20 -0
  71. package/dist/templates/plugin/tsconfig.json +20 -0
  72. package/dist/templates/portfolio/.env +8 -0
  73. package/dist/templates/portfolio/.env.example +9 -0
  74. package/dist/templates/portfolio/app/[slug]/page.tsx +48 -0
  75. package/dist/templates/portfolio/app/api/notion-webhook/route.ts +12 -0
  76. package/dist/templates/portfolio/app/api/revalidate/route.ts +12 -0
  77. package/dist/templates/portfolio/app/globals.css +31 -0
  78. package/dist/templates/portfolio/app/layout.tsx +36 -0
  79. package/dist/templates/portfolio/app/not-found.tsx +38 -0
  80. package/dist/templates/portfolio/app/page.tsx +70 -0
  81. package/dist/templates/portfolio/app/robots.ts +7 -0
  82. package/dist/templates/portfolio/app/site-layout.tsx +31 -0
  83. package/dist/templates/portfolio/app/sitemap.ts +9 -0
  84. package/dist/templates/portfolio/app/tailwind.css +3 -0
  85. package/dist/templates/portfolio/app/theme-script.tsx +16 -0
  86. package/dist/templates/portfolio/lib/config.ts +24 -0
  87. package/dist/templates/portfolio/lib/notion.ts +48 -0
  88. package/dist/templates/portfolio/next.config.ts +26 -0
  89. package/dist/templates/portfolio/noxion.config.ts +23 -0
  90. package/dist/templates/portfolio/package.json +25 -0
  91. package/dist/templates/portfolio/tsconfig.json +19 -0
  92. package/dist/templates/theme/package.json +42 -0
  93. package/dist/templates/theme/src/index.ts +41 -0
  94. package/dist/templates/theme/styles/theme.css +23 -0
  95. package/dist/templates/theme/tsconfig.json +20 -0
  96. package/package.json +1 -1
  97. package/dist/templates/nextjs/app/providers.tsx +0 -45
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "noxion-theme-{{THEME_NAME}}",
3
+ "version": "0.1.0",
4
+ "description": "A custom Noxion theme",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ },
14
+ "./styles": "./styles/theme.css"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "styles"
19
+ ],
20
+ "sideEffects": [
21
+ "styles/**/*.css"
22
+ ],
23
+ "scripts": {
24
+ "build": "tsc",
25
+ "prepublishOnly": "bun run build"
26
+ },
27
+ "keywords": [
28
+ "notion",
29
+ "noxion",
30
+ "noxion-theme"
31
+ ],
32
+ "peerDependencies": {
33
+ "@noxion/renderer": ">=0.3.0",
34
+ "react": ">=18.0.0"
35
+ },
36
+ "devDependencies": {
37
+ "@noxion/renderer": "^0.3.0",
38
+ "@types/react": "^19.2.14",
39
+ "react": "^19.2.4",
40
+ "typescript": "^5.7.0"
41
+ }
42
+ }
@@ -0,0 +1,41 @@
1
+ import { defineThemeContract } from "@noxion/renderer";
2
+ import type { NoxionThemeContract } from "@noxion/renderer";
3
+
4
+ // Import your components, layouts, and templates here
5
+ // import { Header } from "./components/Header";
6
+ // import { Footer } from "./components/Footer";
7
+ // import { BlogLayout } from "./layouts/BlogLayout";
8
+ // import { HomePage } from "./templates/HomePage";
9
+ // import { PostPage } from "./templates/PostPage";
10
+
11
+ // Define and export your theme contract
12
+ // export const {{THEME_NAME}}ThemeContract: NoxionThemeContract = defineThemeContract({
13
+ // name: "noxion-theme-{{THEME_NAME}}",
14
+ // components: {
15
+ // Header,
16
+ // Footer,
17
+ // PostCard,
18
+ // FeaturedPostCard,
19
+ // PostList,
20
+ // HeroSection,
21
+ // TOC,
22
+ // Search,
23
+ // TagFilter,
24
+ // ThemeToggle,
25
+ // EmptyState,
26
+ // NotionPage,
27
+ // DocsSidebar,
28
+ // DocsBreadcrumb,
29
+ // PortfolioProjectCard,
30
+ // PortfolioFilter,
31
+ // },
32
+ // layouts: {
33
+ // base: BlogLayout,
34
+ // blog: BlogLayout,
35
+ // },
36
+ // templates: {
37
+ // home: HomePage,
38
+ // post: PostPage,
39
+ // },
40
+ // supports: ["blog"],
41
+ // });
@@ -0,0 +1,23 @@
1
+ :root {
2
+ --noxion-primary: #2563eb;
3
+ --noxion-primaryForeground: #ffffff;
4
+ --noxion-background: #ffffff;
5
+ --noxion-foreground: #0a0a0a;
6
+ --noxion-muted: #f5f5f5;
7
+ --noxion-mutedForeground: #737373;
8
+ --noxion-border: #e5e7eb;
9
+ --noxion-accent: #f0f9ff;
10
+ --noxion-accentForeground: #1e40af;
11
+ }
12
+
13
+ [data-theme="dark"] {
14
+ --noxion-primary: #3b82f6;
15
+ --noxion-primaryForeground: #ffffff;
16
+ --noxion-background: #0a0a0a;
17
+ --noxion-foreground: #fafafa;
18
+ --noxion-muted: #262626;
19
+ --noxion-mutedForeground: #a3a3a3;
20
+ --noxion-border: #404040;
21
+ --noxion-accent: #1e3a5f;
22
+ --noxion-accentForeground: #93c5fd;
23
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "declaration": true,
7
+ "declarationMap": true,
8
+ "sourceMap": true,
9
+ "outDir": "./dist",
10
+ "rootDir": "./src",
11
+ "strict": true,
12
+ "esModuleInterop": true,
13
+ "skipLibCheck": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "isolatedModules": true,
16
+ "jsx": "react-jsx"
17
+ },
18
+ "include": ["src/**/*.ts", "src/**/*.tsx"],
19
+ "exclude": ["node_modules", "dist"]
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-noxion",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "description": "CLI scaffolding tool for Noxion projects",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,45 +0,0 @@
1
- "use client";
2
-
3
- import { NoxionThemeProvider, defaultTheme, Header, Footer } from "@noxion/renderer";
4
-
5
- interface ProvidersProps {
6
- siteName: string;
7
- author: string;
8
- children: React.ReactNode;
9
- }
10
-
11
- export function Providers({ siteName, author, children }: ProvidersProps) {
12
- return (
13
- <NoxionThemeProvider theme={defaultTheme}>
14
- <div
15
- style={{
16
- display: "flex",
17
- flexDirection: "column",
18
- minHeight: "100vh",
19
- }}
20
- >
21
- <Header
22
- siteName={siteName}
23
- navigation={[
24
- { label: "Home", href: "/" },
25
- ]}
26
- />
27
- <main
28
- style={{
29
- flex: 1,
30
- width: "100%",
31
- maxWidth: "var(--noxion-content-width, 720px)",
32
- margin: "0 auto",
33
- padding: "2rem 1.5rem",
34
- }}
35
- >
36
- {children}
37
- </main>
38
- <Footer
39
- siteName={siteName}
40
- author={author}
41
- />
42
- </div>
43
- </NoxionThemeProvider>
44
- );
45
- }