create-nextjs-cms 0.5.67 → 0.5.69

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 (61) hide show
  1. package/package.json +3 -3
  2. package/templates/default/app/(rootLayout)/(plugins)/[...slug]/page.tsx +36 -0
  3. package/templates/default/app/(rootLayout)/(plugins)/[...slug]/plugin-server-registry.ts +25 -0
  4. package/templates/default/app/(rootLayout)/dashboard/page.tsx +44 -7
  5. package/templates/default/app/(rootLayout)/page.tsx +6 -5
  6. package/templates/default/app/_trpc/client.ts +3 -4
  7. package/templates/default/app/api/editor/photo/route.ts +7 -0
  8. package/templates/default/app/api/trpc/[trpc]/route.ts +3 -3
  9. package/templates/default/app/api/video/route.ts +1 -1
  10. package/templates/default/cms.config.ts +1 -2
  11. package/templates/default/components/AdminCard.tsx +16 -13
  12. package/templates/default/components/AdminPrivilegeCard.tsx +1 -1
  13. package/templates/default/components/CategorySectionSelectInput.tsx +1 -1
  14. package/templates/default/components/DashboardPage.tsx +1 -1
  15. package/templates/default/components/EmailCard.tsx +1 -1
  16. package/templates/default/components/EmailPasswordForm.tsx +1 -1
  17. package/templates/default/components/EmailQuotaForm.tsx +1 -1
  18. package/templates/default/components/EmailsPage.tsx +1 -1
  19. package/templates/default/components/NewAdminForm.tsx +1 -1
  20. package/templates/default/components/NewEmailForm.tsx +1 -1
  21. package/templates/default/components/SectionItemCard.tsx +1 -1
  22. package/templates/default/components/Sidebar.tsx +1 -1
  23. package/templates/default/components/form/Form.tsx +1 -1
  24. package/templates/default/components/form/helpers/_section-hot-reload.js +1 -1
  25. package/templates/default/next.config.ts +10 -50
  26. package/templates/default/package.json +2 -2
  27. package/templates/default/app/(rootLayout)/analytics/page.tsx +0 -7
  28. package/templates/default/app/(rootLayout)/emails/page.tsx +0 -6
  29. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/LICENSE +0 -191
  30. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/README.md +0 -118
  31. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/install/build.js +0 -38
  32. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/install/check.js +0 -14
  33. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/channel.js +0 -177
  34. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/colour.js +0 -195
  35. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/composite.js +0 -212
  36. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/constructor.js +0 -499
  37. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/index.d.ts +0 -1971
  38. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/index.js +0 -16
  39. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/input.js +0 -809
  40. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/is.js +0 -143
  41. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/libvips.js +0 -207
  42. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/operation.js +0 -1016
  43. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/output.js +0 -1666
  44. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/resize.js +0 -595
  45. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/sharp.js +0 -121
  46. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/utility.js +0 -291
  47. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/package.json +0 -202
  48. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/binding.gyp +0 -298
  49. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/common.cc +0 -1130
  50. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/common.h +0 -402
  51. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/metadata.cc +0 -346
  52. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/metadata.h +0 -90
  53. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/operations.cc +0 -499
  54. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/operations.h +0 -137
  55. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/pipeline.cc +0 -1814
  56. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/pipeline.h +0 -408
  57. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/sharp.cc +0 -43
  58. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/stats.cc +0 -186
  59. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/stats.h +0 -62
  60. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/utilities.cc +0 -288
  61. package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/utilities.h +0 -22
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nextjs-cms",
3
- "version": "0.5.67",
3
+ "version": "0.5.69",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {
@@ -29,8 +29,8 @@
29
29
  "tsx": "^4.20.6",
30
30
  "typescript": "^5.9.2",
31
31
  "@lzcms/eslint-config": "0.3.0",
32
- "@lzcms/prettier-config": "0.1.0",
33
- "@lzcms/tsconfig": "0.1.0"
32
+ "@lzcms/tsconfig": "0.1.0",
33
+ "@lzcms/prettier-config": "0.1.0"
34
34
  },
35
35
  "prettier": "@lzcms/prettier-config",
36
36
  "scripts": {
@@ -0,0 +1,36 @@
1
+ import { notFound } from 'next/navigation'
2
+ import auth from 'nextjs-cms/auth'
3
+ import { getAdminPrivileges } from 'nextjs-cms/api/helpers'
4
+ import { findPluginRouteByPath } from 'nextjs-cms/plugins/server'
5
+ import { getPluginServerComponent } from './plugin-server-registry'
6
+
7
+ export const dynamic = 'force-dynamic'
8
+ type Params = Promise<{ slug?: string[] }>
9
+
10
+ export default async function Page(props: { params: Params }) {
11
+ const params = await props.params
12
+ const slug = params.slug ?? []
13
+
14
+ const path = `/${slug.join('/')}`
15
+ const session = await auth()
16
+ if (!session?.user) {
17
+ notFound()
18
+ }
19
+
20
+ const plugin = await findPluginRouteByPath(path)
21
+ if (!plugin) {
22
+ notFound()
23
+ }
24
+
25
+ const privilegeSet = await getAdminPrivileges(session.user.id)
26
+ if (!privilegeSet.has(plugin.pluginName)) {
27
+ notFound()
28
+ }
29
+
30
+ const PluginComponent = await getPluginServerComponent(plugin.pluginId, plugin.component)
31
+ if (!PluginComponent) {
32
+ notFound()
33
+ }
34
+
35
+ return <PluginComponent />
36
+ }
@@ -0,0 +1,25 @@
1
+ import type { ReactNode } from 'react'
2
+ import { pluginServerLoaders } from 'nextjs-cms/plugins/server'
3
+
4
+ export type PluginServerComponent = (props?: Record<string, unknown>) => ReactNode | Promise<ReactNode>
5
+
6
+ export type PluginServerModule = {
7
+ default?: PluginServerComponent
8
+ [key: string]: unknown
9
+ }
10
+
11
+ export const getPluginServerComponent = async (packageName: string, componentName: string | undefined) => {
12
+ const loader = pluginServerLoaders[packageName]
13
+ if (!loader) return null
14
+
15
+ const mod = await loader()
16
+ const resolved = componentName
17
+ ? (mod as Record<string, PluginServerComponent | undefined>)[componentName]
18
+ : mod.default
19
+
20
+ if (!resolved || typeof resolved !== 'function') {
21
+ return null
22
+ }
23
+
24
+ return resolved
25
+ }
@@ -1,7 +1,44 @@
1
- import DashboardPage from '@/components/DashboardPage'
2
-
3
- export const dynamic = 'force-dynamic'
4
-
5
- export default async function Page() {
6
- return <DashboardPage />
7
- }
1
+ export const dynamic = 'force-dynamic'
2
+
3
+ export default function DashboardPage() {
4
+ return (
5
+ <div className='w-full'>
6
+ <div className='bg-linear-to-r from-amber-200 via-orange-200 to-rose-200 p-8 text-foreground dark:from-amber-900 dark:via-orange-900 dark:to-rose-900'>
7
+ <h1 className='text-3xl font-extrabold tracking-tight'>Welcome to Mission Control</h1>
8
+ <p className='mt-2 text-base text-muted-foreground'>
9
+ Your CMS is ready. Chart a course, publish boldly, and keep the lights green.
10
+ </p>
11
+ </div>
12
+
13
+ <div className='space-y-6 p-6'>
14
+ <section className='rounded-lg border bg-card p-6 text-card-foreground shadow-sm'>
15
+ <h2 className='text-xl font-semibold'>Today&apos;s focus</h2>
16
+ <p className='mt-2 text-sm text-muted-foreground'>
17
+ Start with one small win: verify a section, ship a quick update, or polish a headline.
18
+ </p>
19
+ </section>
20
+
21
+ <section className='grid gap-4 md:grid-cols-3'>
22
+ <div className='rounded-lg border bg-card p-4 text-card-foreground shadow-sm'>
23
+ <div className='text-sm font-semibold'>Ship with confidence</div>
24
+ <div className='mt-2 text-sm text-muted-foreground'>
25
+ Keep changes tight and reversible. Small releases, fast feedback.
26
+ </div>
27
+ </div>
28
+ <div className='rounded-lg border bg-card p-4 text-card-foreground shadow-sm'>
29
+ <div className='text-sm font-semibold'>Stay organized</div>
30
+ <div className='mt-2 text-sm text-muted-foreground'>
31
+ Group your content by intent, not just by type.
32
+ </div>
33
+ </div>
34
+ <div className='rounded-lg border bg-card p-4 text-card-foreground shadow-sm'>
35
+ <div className='text-sm font-semibold'>Delight users</div>
36
+ <div className='mt-2 text-sm text-muted-foreground'>
37
+ A clean headline and a single strong image can do the heavy lifting.
38
+ </div>
39
+ </div>
40
+ </section>
41
+ </div>
42
+ </div>
43
+ )
44
+ }
@@ -1,9 +1,10 @@
1
- import React from 'react'
2
-
3
- import Dashboard from './dashboard/page'
1
+ import { redirect } from 'next/navigation'
2
+ import { getPluginRoutes } from 'nextjs-cms/plugins/server'
4
3
 
5
4
  export const dynamic = 'force-dynamic'
6
5
 
7
- export default function Home() {
8
- return <Dashboard />
6
+ export default async function Home() {
7
+ const routes = await getPluginRoutes()
8
+ const target = routes[0]?.path ?? '/admins'
9
+ redirect(target)
9
10
  }
@@ -1,4 +1,3 @@
1
- import type { AppRouter } from 'nextjs-cms/api'
2
- import { createTRPCReact} from '@trpc/react-query'
3
-
4
- export const trpc = createTRPCReact<AppRouter>()
1
+ 'use client'
2
+
3
+ export { trpc } from 'nextjs-cms/api/trpc/client'
@@ -2,6 +2,13 @@ import { NextRequest, NextResponse } from 'next/server'
2
2
  import sharp from 'sharp'
3
3
  import auth from 'nextjs-cms/auth'
4
4
 
5
+ /**
6
+ * This route handler is used to use a photo in rich text editor
7
+ * It expects an image file in the request body
8
+ * It returns the base64 string of the image
9
+ * @param request
10
+ * @returns NextResponse with the base64 string of the image
11
+ */
5
12
  export async function POST(request: NextRequest) {
6
13
  const session = await auth()
7
14
 
@@ -1,5 +1,5 @@
1
1
  import { fetchRequestHandler } from '@trpc/server/adapters/fetch'
2
- import { appRouter, createTRPCContext } from 'nextjs-cms/api'
2
+ import { createTRPCContext, getAppRouter } from 'nextjs-cms/api'
3
3
  import { NextRequest } from 'next/server'
4
4
 
5
5
  /**
@@ -13,11 +13,11 @@ const context = async (req: NextRequest) => {
13
13
  })
14
14
  }
15
15
 
16
- const handler = (req: NextRequest) =>
16
+ const handler = async (req: NextRequest) =>
17
17
  fetchRequestHandler({
18
18
  endpoint: '/api/trpc',
19
19
  req,
20
- router: appRouter,
20
+ router: await getAppRouter(),
21
21
  createContext: () => context(req),
22
22
  /*onError(opts) {
23
23
  return opts.error
@@ -65,7 +65,7 @@ export async function GET(request: NextRequest) {
65
65
  if (!section || !section.name) {
66
66
  return NextResponse.json(
67
67
  {
68
- error: 'Invalid file path',
68
+ error: 'File not found, or you do not have access to it.',
69
69
  },
70
70
  { status: 400 },
71
71
  )
@@ -2,8 +2,7 @@ import type { CMSConfig } from 'nextjs-cms/core/config'
2
2
  import process from 'process'
3
3
  import { resolve } from 'path'
4
4
 
5
- export const config: CMSConfig = {
6
- ui: {
5
+ export const config: CMSConfig = {
7
6
  title: 'NEXT CMS Admin',
8
7
  defaultTheme: 'dark',
9
8
  logo: '/logo.svg',
@@ -4,12 +4,13 @@ import useModal from '@/hooks/useModal'
4
4
  import ProtectedImage from '@/components/ProtectedImage'
5
5
  import AdminEditPage from '@/components/AdminEditPage'
6
6
  import { useToast } from '@/components/ui/use-toast'
7
+ import { ScrollArea } from '@/components/ui/scroll-area'
7
8
  import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '@/components/ui/card'
8
9
  import { Badge } from '@/components/ui/badge'
9
10
  import { Button } from '@/components/ui/button'
10
11
  import { trpc } from '@/app/_trpc/client'
11
12
  import Image from 'next/image'
12
- import { RouterOutputs } from 'nextjs-cms/api'
13
+ import type { RouterOutputs } from 'nextjs-cms/api'
13
14
 
14
15
  export default function AdminCard({
15
16
  admin,
@@ -76,28 +77,30 @@ export default function AdminCard({
76
77
  height={50}
77
78
  width={50}
78
79
  alt={admin.username}
79
- className='rounded-full ring-2 ring-inset ring-amber-300'
80
+ className='rounded-full ring-2 ring-amber-300 ring-inset'
80
81
  />
81
82
  )}
82
83
  </div>
83
84
  <div className='flex flex-col break-all'>
84
- <div className='text-sm font-medium text-foreground'>
85
+ <div className='text-foreground text-sm font-medium'>
85
86
  <div className='font-bold'>{admin.username}</div>
86
87
  </div>
87
88
  </div>
88
89
  </div>
89
90
  </CardTitle>
90
91
  </CardHeader>
91
- <CardContent>
92
- <div className='flex flex-wrap gap-2'>
93
- {admin.roles &&
94
- admin.roles.length > 0 &&
95
- admin.roles.map((role, index: number) => (
96
- <Badge key={index} className='border-foreground' variant='secondary'>
97
- {role.sectionName} ({role.operations})
98
- </Badge>
99
- ))}
100
- </div>
92
+ <CardContent className='p-1'>
93
+ <ScrollArea className='bg-accent/50 h-[100px] p-2' type='always'>
94
+ <div className='flex flex-wrap gap-2'>
95
+ {admin.roles &&
96
+ admin.roles.length > 0 &&
97
+ admin.roles.map((role, index: number) => (
98
+ <Badge key={index} className='border-foreground/30' variant='outline'>
99
+ {role.sectionName} ({role.operations})
100
+ </Badge>
101
+ ))}
102
+ </div>
103
+ </ScrollArea>
101
104
  </CardContent>
102
105
  <CardFooter className='flex flex-wrap gap-4'>
103
106
  <Button
@@ -5,7 +5,7 @@ import React, { useEffect } from 'react'
5
5
  import getString from 'nextjs-cms/translations'
6
6
  import { Badge } from '@/components/ui/badge'
7
7
  import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'
8
- import { RouterOutputs } from 'nextjs-cms/api'
8
+ import type { RouterOutputs } from 'nextjs-cms/api'
9
9
 
10
10
  export default function AdminRoleCard({
11
11
  privilege,
@@ -7,7 +7,7 @@ import SelectInputButtons from '@/components/SelectInputButtons'
7
7
  import getString from 'nextjs-cms/translations'
8
8
  import { trpc } from '@/app/_trpc/client'
9
9
  import { SelectOption } from 'nextjs-cms/core/fields'
10
- import { RouterOutputs } from 'nextjs-cms/api'
10
+ import type { RouterOutputs } from 'nextjs-cms/api'
11
11
  import { nanoid } from 'nanoid'
12
12
 
13
13
  type CategorySelect = RouterOutputs['categorySections']['get']['data']
@@ -11,7 +11,7 @@ import { trpc } from '@/app/_trpc/client'
11
11
  ChartJS.register(ArcElement, Tooltip, Legend)
12
12
 
13
13
  const DashboardPage = () => {
14
- const { isLoading, isError, data, error } = trpc.cpanel.getData.useQuery()
14
+ const { isLoading, isError, data, error } = trpc.cpanelDashboard.getData.useQuery()
15
15
 
16
16
  useEffect(() => {}, [])
17
17
 
@@ -14,7 +14,7 @@ export default function EmailCard({ email, action }: { email: EmailItem; action:
14
14
  const { setModal, modal, modalResponse, setModalResponse } = useModal()
15
15
  const { toast } = useToast()
16
16
 
17
- const deleteMutation = trpc.cpanel.deleteEmail.useMutation({
17
+ const deleteMutation = trpc.cpanelEmails.deleteEmail.useMutation({
18
18
  onError: (error) => {
19
19
  setModalResponse({
20
20
  message: error.message,
@@ -9,7 +9,7 @@ export default function EmailPasswordForm({ email, action }: { email: string; ac
9
9
  const { setModal, modal, modalResponse, setModalResponse } = useModal()
10
10
 
11
11
  const { toast } = useToast()
12
- const quotaMutation = trpc.cpanel.passwordChange.useMutation({
12
+ const quotaMutation = trpc.cpanelEmails.passwordChange.useMutation({
13
13
  onError: (error) => {
14
14
  setModal({
15
15
  title: getString('error'),
@@ -10,7 +10,7 @@ export default function EmailQuotaForm({ email, action }: { email: string; actio
10
10
  const { setModal, modal, modalResponse, setModalResponse } = useModal()
11
11
  const { toast } = useToast()
12
12
 
13
- const quotaMutation = trpc.cpanel.quotaChange.useMutation({
13
+ const quotaMutation = trpc.cpanelEmails.quotaChange.useMutation({
14
14
  onError: (error) => {
15
15
  setModal({
16
16
  title: getString('error'),
@@ -11,7 +11,7 @@ import { trpc } from '@/app/_trpc/client'
11
11
  const EmailsPage = () => {
12
12
  const controller = new AbortController()
13
13
 
14
- const { isLoading, isError, data, error, refetch } = trpc.cpanel.getEmails.useQuery()
14
+ const { isLoading, isError, data, error, refetch } = trpc.cpanelEmails.getEmails.useQuery()
15
15
 
16
16
  useEffect(() => {
17
17
  return () => {
@@ -6,7 +6,7 @@ import { useToast } from '@/components/ui/use-toast'
6
6
  import { trpc } from '@/app/_trpc/client'
7
7
  import AdminRoleCard from '@/components/AdminPrivilegeCard'
8
8
  import { Button } from '@/components/ui/button'
9
- import { RouterOutputs } from 'nextjs-cms/api'
9
+ import type { RouterOutputs } from 'nextjs-cms/api'
10
10
 
11
11
  export default function NewAdminForm({
12
12
  privileges,
@@ -10,7 +10,7 @@ export default function NewEmailForm({ action }: { action: any }) {
10
10
  const { setModal, modal, modalResponse, setModalResponse } = useModal()
11
11
  const formRef = React.useRef<HTMLFormElement>(null)
12
12
  const { toast } = useToast()
13
- const newEmailMutation = trpc.cpanel.createEmail.useMutation({
13
+ const newEmailMutation = trpc.cpanelEmails.createEmail.useMutation({
14
14
  onError: (error) => {
15
15
  setModal({
16
16
  title: getString('error'),
@@ -9,7 +9,7 @@ import { CardTitle, CardHeader, CardFooter, Card, CardContent } from '@/componen
9
9
  import { Button } from '@/components/ui/button'
10
10
  import { PersonIcon } from '@radix-ui/react-icons'
11
11
  import { trpc } from '@/app/_trpc/client'
12
- import { RouterOutputs } from 'nextjs-cms/api'
12
+ import type { RouterOutputs } from 'nextjs-cms/api'
13
13
 
14
14
  // Used to get elements of array types as types
15
15
  type ArrElement<ArrType> = ArrType extends readonly (infer ElementType)[] ? ElementType : never
@@ -51,7 +51,7 @@ const Sidebar = (props: SidebarProps) => {
51
51
  'justify-between p-4': true,
52
52
  })}
53
53
  >
54
- <span className='bg-gray-800 px-2 font-bold tracking-tighter text-amber-200 ring-1 ring-sky-500 transition-all duration-150 hover:bg-transparent hover:font-normal hover:tracking-[1em] hover:ring-0'>
54
+ <span className='bg-gray-800 px-2 font-bold tracking-tighter text-amber-200 ring-1 ring-sky-500 transition-all duration-150 hover:bg-transparent hover:font-normal hover:tracking-[0.1em] hover:ring-0'>
55
55
  nextjs-cms
56
56
  </span>
57
57
  </div>
@@ -8,7 +8,7 @@ import NewVariantComponent, { VariantHandles } from '@/components/NewVariantComp
8
8
  import classNames from 'classnames'
9
9
  import ProgressBar from '@/components/ProgressBar'
10
10
  import React, { RefObject, useEffect } from 'react'
11
- import { RouterOutputs } from 'nextjs-cms/api'
11
+ import type { RouterOutputs } from 'nextjs-cms/api'
12
12
  import * as z from 'zod'
13
13
  import { zodResolver } from '@hookform/resolvers/zod'
14
14
  import { useForm, FormProvider } from 'react-hook-form'
@@ -8,4 +8,4 @@ export const revalidate = 0
8
8
 
9
9
  // @refresh reset
10
10
 
11
- export const configLastUpdated = 1766857134012
11
+ export const configLastUpdated = 1767365990312
@@ -1,36 +1,7 @@
1
1
  import type { NextConfig } from 'next'
2
2
 
3
3
  const nextConfig: NextConfig = {
4
- serverExternalPackages: [
5
- 'esbuild',
6
- 'esbuild-register',
7
- '@esbuild/win32-x64',
8
- // optional: if you deploy to linux/mac too, include these:
9
- '@esbuild/linux-x64',
10
- '@esbuild/linux-arm64',
11
- '@esbuild/darwin-x64',
12
- '@esbuild/darwin-arm64',
13
- ],
14
- turbopack: {
15
- rules: {
16
- 'esbuild.exe': {
17
- loaders: ['raw-loader'],
18
- as: 'executable',
19
- },
20
- '*.md': {
21
- loaders: ['raw-loader'],
22
- as: '*.js',
23
- },
24
- },
25
- },
26
4
 
27
- typescript: {
28
- // !! WARN !!
29
- // Dangerously allow production builds to successfully complete even if
30
- // your project has type errors.
31
- // !! WARN !!
32
- ignoreBuildErrors: true,
33
- },
34
5
  reactStrictMode: true,
35
6
  async rewrites() {
36
7
  return [
@@ -42,27 +13,16 @@ const nextConfig: NextConfig = {
42
13
  },
43
14
  images: {
44
15
  formats: ['image/avif', 'image/webp'],
45
- unoptimized: true,
46
- remotePatterns: [
47
- {
48
- protocol: 'https',
49
- hostname: 'lazemnicms.com',
50
- port: '',
51
- pathname: '/**',
52
- },
53
- {
54
- protocol: 'https',
55
- hostname: 'api.lazemnicms.com',
56
- port: '',
57
- pathname: '/**',
58
- },
59
- {
60
- protocol: 'https',
61
- hostname: 'images.lazemnicms.com',
62
- port: '',
63
- pathname: '/**',
64
- },
65
- ],
16
+ remotePatterns: [
17
+ // Use remotePatterns in your next.config.js file to allow images from specific external paths and block all others.
18
+ // https://nextjs.org/docs/app/api-reference/components/image#remotepatterns
19
+ // {
20
+ // protocol: 'https',
21
+ // hostname: 'example.com',
22
+ // port: '',
23
+ // pathname: '/**',
24
+ // },
25
+ ],
66
26
  },
67
27
  }
68
28
 
@@ -64,7 +64,7 @@
64
64
  "nanoid": "^5.1.2",
65
65
  "next": "16.1.1",
66
66
  "next-themes": "^0.4.6",
67
- "nextjs-cms": "0.5.67",
67
+ "nextjs-cms": "0.5.69",
68
68
  "plaiceholder": "^3.0.0",
69
69
  "prettier-plugin-tailwindcss": "^0.7.2",
70
70
  "qrcode": "^1.5.4",
@@ -97,7 +97,7 @@
97
97
  "eslint-config-prettier": "^10.0.1",
98
98
  "eslint-plugin-prettier": "^5.2.3",
99
99
  "fs-extra": "^11.3.3",
100
- "nextjs-cms-kit": "0.5.67",
100
+ "nextjs-cms-kit": "0.5.69",
101
101
  "postcss": "^8.5.1",
102
102
  "prettier": "3.5.0",
103
103
  "raw-loader": "^4.0.2",
@@ -1,7 +0,0 @@
1
- import AnalyticsPage from '@/components/AnalyticsPage'
2
-
3
- export const dynamic = 'force-dynamic'
4
-
5
- export default async function Page() {
6
- return <AnalyticsPage />
7
- }
@@ -1,6 +0,0 @@
1
- import EmailsPage from '@/components/EmailsPage'
2
-
3
- export const dynamic = 'force-dynamic'
4
- export default async function Page() {
5
- return <EmailsPage />
6
- }