next-blogpanel 1.0.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 (127) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +211 -0
  3. package/dist/admin/index.cjs +3062 -0
  4. package/dist/admin/index.cjs.map +1 -0
  5. package/dist/admin/index.d.cts +51 -0
  6. package/dist/admin/index.d.ts +51 -0
  7. package/dist/admin/index.js +3029 -0
  8. package/dist/admin/index.js.map +1 -0
  9. package/dist/api/categories.cjs +82 -0
  10. package/dist/api/categories.cjs.map +1 -0
  11. package/dist/api/categories.d.cts +27 -0
  12. package/dist/api/categories.d.ts +27 -0
  13. package/dist/api/categories.js +77 -0
  14. package/dist/api/categories.js.map +1 -0
  15. package/dist/api/media-file.cjs +46 -0
  16. package/dist/api/media-file.cjs.map +1 -0
  17. package/dist/api/media-file.d.cts +7 -0
  18. package/dist/api/media-file.d.ts +7 -0
  19. package/dist/api/media-file.js +44 -0
  20. package/dist/api/media-file.js.map +1 -0
  21. package/dist/api/media.cjs +180 -0
  22. package/dist/api/media.cjs.map +1 -0
  23. package/dist/api/media.d.cts +22 -0
  24. package/dist/api/media.d.ts +22 -0
  25. package/dist/api/media.js +176 -0
  26. package/dist/api/media.js.map +1 -0
  27. package/dist/api/posts.cjs +103 -0
  28. package/dist/api/posts.cjs.map +1 -0
  29. package/dist/api/posts.d.cts +27 -0
  30. package/dist/api/posts.d.ts +27 -0
  31. package/dist/api/posts.js +98 -0
  32. package/dist/api/posts.js.map +1 -0
  33. package/dist/api/rss.cjs +25 -0
  34. package/dist/api/rss.cjs.map +1 -0
  35. package/dist/api/rss.d.cts +5 -0
  36. package/dist/api/rss.d.ts +5 -0
  37. package/dist/api/rss.js +23 -0
  38. package/dist/api/rss.js.map +1 -0
  39. package/dist/api/settings.cjs +40 -0
  40. package/dist/api/settings.cjs.map +1 -0
  41. package/dist/api/settings.d.cts +17 -0
  42. package/dist/api/settings.d.ts +17 -0
  43. package/dist/api/settings.js +37 -0
  44. package/dist/api/settings.js.map +1 -0
  45. package/dist/api/sitemap.cjs +25 -0
  46. package/dist/api/sitemap.cjs.map +1 -0
  47. package/dist/api/sitemap.d.cts +5 -0
  48. package/dist/api/sitemap.d.ts +5 -0
  49. package/dist/api/sitemap.js +23 -0
  50. package/dist/api/sitemap.js.map +1 -0
  51. package/dist/api/tokens.cjs +56 -0
  52. package/dist/api/tokens.cjs.map +1 -0
  53. package/dist/api/tokens.d.cts +22 -0
  54. package/dist/api/tokens.d.ts +22 -0
  55. package/dist/api/tokens.js +52 -0
  56. package/dist/api/tokens.js.map +1 -0
  57. package/dist/chunk-2M46MMWN.cjs +76 -0
  58. package/dist/chunk-2M46MMWN.cjs.map +1 -0
  59. package/dist/chunk-4GK22Q3R.cjs +229 -0
  60. package/dist/chunk-4GK22Q3R.cjs.map +1 -0
  61. package/dist/chunk-6PZ772NQ.js +595 -0
  62. package/dist/chunk-6PZ772NQ.js.map +1 -0
  63. package/dist/chunk-BZXPRGLN.cjs +351 -0
  64. package/dist/chunk-BZXPRGLN.cjs.map +1 -0
  65. package/dist/chunk-DAX5C6SC.cjs +86 -0
  66. package/dist/chunk-DAX5C6SC.cjs.map +1 -0
  67. package/dist/chunk-DWNMHQ4I.cjs +57 -0
  68. package/dist/chunk-DWNMHQ4I.cjs.map +1 -0
  69. package/dist/chunk-FPGVR2BX.cjs +121 -0
  70. package/dist/chunk-FPGVR2BX.cjs.map +1 -0
  71. package/dist/chunk-JBP3G4QJ.js +50 -0
  72. package/dist/chunk-JBP3G4QJ.js.map +1 -0
  73. package/dist/chunk-JDP4DIHI.js +215 -0
  74. package/dist/chunk-JDP4DIHI.js.map +1 -0
  75. package/dist/chunk-LIZOVA4W.js +118 -0
  76. package/dist/chunk-LIZOVA4W.js.map +1 -0
  77. package/dist/chunk-QLBTOCT3.js +118 -0
  78. package/dist/chunk-QLBTOCT3.js.map +1 -0
  79. package/dist/chunk-UI2KDZ5H.js +344 -0
  80. package/dist/chunk-UI2KDZ5H.js.map +1 -0
  81. package/dist/chunk-V7QPRX4A.cjs +125 -0
  82. package/dist/chunk-V7QPRX4A.cjs.map +1 -0
  83. package/dist/chunk-VEJFN65Y.js +82 -0
  84. package/dist/chunk-VEJFN65Y.js.map +1 -0
  85. package/dist/chunk-WYZFAI6O.js +74 -0
  86. package/dist/chunk-WYZFAI6O.js.map +1 -0
  87. package/dist/chunk-XLYTATRQ.cjs +637 -0
  88. package/dist/chunk-XLYTATRQ.cjs.map +1 -0
  89. package/dist/cli/index.cjs +2036 -0
  90. package/dist/components/index.cjs +647 -0
  91. package/dist/components/index.cjs.map +1 -0
  92. package/dist/components/index.d.cts +187 -0
  93. package/dist/components/index.d.ts +187 -0
  94. package/dist/components/index.js +633 -0
  95. package/dist/components/index.js.map +1 -0
  96. package/dist/db-M3KXLBUP.js +3 -0
  97. package/dist/db-M3KXLBUP.js.map +1 -0
  98. package/dist/db-TDCZNY3Q.cjs +112 -0
  99. package/dist/db-TDCZNY3Q.cjs.map +1 -0
  100. package/dist/editor/index.cjs +1126 -0
  101. package/dist/editor/index.cjs.map +1 -0
  102. package/dist/editor/index.d.cts +137 -0
  103. package/dist/editor/index.d.ts +137 -0
  104. package/dist/editor/index.js +1093 -0
  105. package/dist/editor/index.js.map +1 -0
  106. package/dist/index-BcNka7gK.d.cts +475 -0
  107. package/dist/index-DPRgaNEE.d.ts +475 -0
  108. package/dist/index.cjs +433 -0
  109. package/dist/index.cjs.map +1 -0
  110. package/dist/index.d.cts +27 -0
  111. package/dist/index.d.ts +27 -0
  112. package/dist/index.js +209 -0
  113. package/dist/index.js.map +1 -0
  114. package/dist/lib/index.cjs +193 -0
  115. package/dist/lib/index.cjs.map +1 -0
  116. package/dist/lib/index.d.cts +4 -0
  117. package/dist/lib/index.d.ts +4 -0
  118. package/dist/lib/index.js +8 -0
  119. package/dist/lib/index.js.map +1 -0
  120. package/dist/styles/admin.css +667 -0
  121. package/dist/styles/blog.css +851 -0
  122. package/dist/styles/editor.css +452 -0
  123. package/dist/styles/globals.css +270 -0
  124. package/dist/styles/prose.css +299 -0
  125. package/dist/types-CgrBuig-.d.cts +778 -0
  126. package/dist/types-CgrBuig-.d.ts +778 -0
  127. package/package.json +140 -0
@@ -0,0 +1,778 @@
1
+ import { z } from 'zod';
2
+ import { ObjectId } from 'mongodb';
3
+
4
+ declare const BlockTypeSchema: z.ZodEnum<["paragraph", "heading", "image", "codeBlock", "blockquote", "bulletList", "orderedList", "taskList", "table", "embed", "horizontalRule", "callout", "tableOfContents", "faq", "html"]>;
5
+ type BlockType = z.infer<typeof BlockTypeSchema>;
6
+ interface BlockContent {
7
+ type: string;
8
+ attrs?: Record<string, unknown>;
9
+ content?: BlockContent[];
10
+ text?: string;
11
+ marks?: {
12
+ type: string;
13
+ attrs?: Record<string, unknown>;
14
+ }[];
15
+ }
16
+ interface MediaReference {
17
+ _id: string;
18
+ url: string;
19
+ alt?: string;
20
+ caption?: string;
21
+ width?: number;
22
+ height?: number;
23
+ }
24
+ declare const MediaSchema: z.ZodObject<{
25
+ filename: z.ZodString;
26
+ originalName: z.ZodString;
27
+ mimeType: z.ZodString;
28
+ size: z.ZodNumber;
29
+ width: z.ZodOptional<z.ZodNumber>;
30
+ height: z.ZodOptional<z.ZodNumber>;
31
+ storageKey: z.ZodString;
32
+ provider: z.ZodString;
33
+ url: z.ZodEffects<z.ZodString, string, string>;
34
+ alt: z.ZodOptional<z.ZodString>;
35
+ caption: z.ZodOptional<z.ZodString>;
36
+ createdAt: z.ZodDate;
37
+ }, "strip", z.ZodTypeAny, {
38
+ filename: string;
39
+ originalName: string;
40
+ mimeType: string;
41
+ size: number;
42
+ storageKey: string;
43
+ provider: string;
44
+ url: string;
45
+ createdAt: Date;
46
+ width?: number | undefined;
47
+ height?: number | undefined;
48
+ alt?: string | undefined;
49
+ caption?: string | undefined;
50
+ }, {
51
+ filename: string;
52
+ originalName: string;
53
+ mimeType: string;
54
+ size: number;
55
+ storageKey: string;
56
+ provider: string;
57
+ url: string;
58
+ createdAt: Date;
59
+ width?: number | undefined;
60
+ height?: number | undefined;
61
+ alt?: string | undefined;
62
+ caption?: string | undefined;
63
+ }>;
64
+ interface Media {
65
+ _id: ObjectId;
66
+ filename: string;
67
+ originalName: string;
68
+ mimeType: string;
69
+ size: number;
70
+ width?: number;
71
+ height?: number;
72
+ storageKey: string;
73
+ /**
74
+ * Name of the backend that actually holds this object — `'gridfs'`, `'r2'`,
75
+ * or any name passed to `registerStorageProvider()`. Read back by DELETE to
76
+ * route the removal to the right backend rather than to whichever one is
77
+ * configured today. A `string`, not a union of the built-ins: a third-party
78
+ * backend that cannot be recorded here cannot have its objects deleted.
79
+ */
80
+ provider: string;
81
+ url: string;
82
+ alt?: string;
83
+ caption?: string;
84
+ createdAt: Date;
85
+ }
86
+ declare const AuthorSchema: z.ZodObject<{
87
+ name: z.ZodString;
88
+ avatar: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
89
+ bio: z.ZodOptional<z.ZodString>;
90
+ url: z.ZodOptional<z.ZodString>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ name: string;
93
+ url?: string | undefined;
94
+ avatar?: string | undefined;
95
+ bio?: string | undefined;
96
+ }, {
97
+ name: string;
98
+ url?: string | undefined;
99
+ avatar?: string | undefined;
100
+ bio?: string | undefined;
101
+ }>;
102
+ interface Author {
103
+ name: string;
104
+ avatar?: string;
105
+ bio?: string;
106
+ url?: string;
107
+ }
108
+ declare const PostSEOSchema: z.ZodObject<{
109
+ metaTitle: z.ZodOptional<z.ZodString>;
110
+ metaDescription: z.ZodOptional<z.ZodString>;
111
+ canonicalUrl: z.ZodOptional<z.ZodString>;
112
+ ogImage: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
113
+ ogType: z.ZodDefault<z.ZodString>;
114
+ noIndex: z.ZodDefault<z.ZodBoolean>;
115
+ structuredData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
116
+ focusKeyword: z.ZodOptional<z.ZodString>;
117
+ }, "strip", z.ZodTypeAny, {
118
+ ogType: string;
119
+ noIndex: boolean;
120
+ metaTitle?: string | undefined;
121
+ metaDescription?: string | undefined;
122
+ canonicalUrl?: string | undefined;
123
+ ogImage?: string | undefined;
124
+ structuredData?: Record<string, unknown> | undefined;
125
+ focusKeyword?: string | undefined;
126
+ }, {
127
+ metaTitle?: string | undefined;
128
+ metaDescription?: string | undefined;
129
+ canonicalUrl?: string | undefined;
130
+ ogImage?: string | undefined;
131
+ ogType?: string | undefined;
132
+ noIndex?: boolean | undefined;
133
+ structuredData?: Record<string, unknown> | undefined;
134
+ focusKeyword?: string | undefined;
135
+ }>;
136
+ interface PostSEO {
137
+ metaTitle?: string;
138
+ metaDescription?: string;
139
+ canonicalUrl?: string;
140
+ ogImage?: string;
141
+ ogType: string;
142
+ noIndex: boolean;
143
+ structuredData?: Record<string, unknown>;
144
+ focusKeyword?: string;
145
+ }
146
+ interface Revision {
147
+ version: number;
148
+ title: string;
149
+ content: BlockContent[];
150
+ contentHTML: string;
151
+ savedAt: Date;
152
+ }
153
+ declare const PostStatusSchema: z.ZodEnum<["draft", "published", "scheduled", "archived"]>;
154
+ type PostStatus = z.infer<typeof PostStatusSchema>;
155
+ declare const CreatePostSchema: z.ZodObject<{
156
+ title: z.ZodString;
157
+ slug: z.ZodOptional<z.ZodString>;
158
+ excerpt: z.ZodOptional<z.ZodString>;
159
+ content: z.ZodAny;
160
+ contentHTML: z.ZodOptional<z.ZodString>;
161
+ contentText: z.ZodOptional<z.ZodString>;
162
+ coverImage: z.ZodOptional<z.ZodObject<{
163
+ _id: z.ZodString;
164
+ url: z.ZodEffects<z.ZodString, string, string>;
165
+ alt: z.ZodOptional<z.ZodString>;
166
+ caption: z.ZodOptional<z.ZodString>;
167
+ width: z.ZodOptional<z.ZodNumber>;
168
+ height: z.ZodOptional<z.ZodNumber>;
169
+ }, "strip", z.ZodTypeAny, {
170
+ url: string;
171
+ _id: string;
172
+ width?: number | undefined;
173
+ height?: number | undefined;
174
+ alt?: string | undefined;
175
+ caption?: string | undefined;
176
+ }, {
177
+ url: string;
178
+ _id: string;
179
+ width?: number | undefined;
180
+ height?: number | undefined;
181
+ alt?: string | undefined;
182
+ caption?: string | undefined;
183
+ }>>;
184
+ categories: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
185
+ tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
186
+ author: z.ZodOptional<z.ZodObject<{
187
+ name: z.ZodString;
188
+ avatar: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
189
+ bio: z.ZodOptional<z.ZodString>;
190
+ url: z.ZodOptional<z.ZodString>;
191
+ }, "strip", z.ZodTypeAny, {
192
+ name: string;
193
+ url?: string | undefined;
194
+ avatar?: string | undefined;
195
+ bio?: string | undefined;
196
+ }, {
197
+ name: string;
198
+ url?: string | undefined;
199
+ avatar?: string | undefined;
200
+ bio?: string | undefined;
201
+ }>>;
202
+ seo: z.ZodOptional<z.ZodObject<{
203
+ metaTitle: z.ZodOptional<z.ZodString>;
204
+ metaDescription: z.ZodOptional<z.ZodString>;
205
+ canonicalUrl: z.ZodOptional<z.ZodString>;
206
+ ogImage: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
207
+ ogType: z.ZodDefault<z.ZodString>;
208
+ noIndex: z.ZodDefault<z.ZodBoolean>;
209
+ structuredData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
210
+ focusKeyword: z.ZodOptional<z.ZodString>;
211
+ }, "strip", z.ZodTypeAny, {
212
+ ogType: string;
213
+ noIndex: boolean;
214
+ metaTitle?: string | undefined;
215
+ metaDescription?: string | undefined;
216
+ canonicalUrl?: string | undefined;
217
+ ogImage?: string | undefined;
218
+ structuredData?: Record<string, unknown> | undefined;
219
+ focusKeyword?: string | undefined;
220
+ }, {
221
+ metaTitle?: string | undefined;
222
+ metaDescription?: string | undefined;
223
+ canonicalUrl?: string | undefined;
224
+ ogImage?: string | undefined;
225
+ ogType?: string | undefined;
226
+ noIndex?: boolean | undefined;
227
+ structuredData?: Record<string, unknown> | undefined;
228
+ focusKeyword?: string | undefined;
229
+ }>>;
230
+ status: z.ZodDefault<z.ZodEnum<["draft", "published", "scheduled", "archived"]>>;
231
+ publishedAt: z.ZodOptional<z.ZodDate>;
232
+ scheduledAt: z.ZodOptional<z.ZodDate>;
233
+ }, "strip", z.ZodTypeAny, {
234
+ status: "draft" | "published" | "scheduled" | "archived";
235
+ title: string;
236
+ categories: string[];
237
+ tags: string[];
238
+ slug?: string | undefined;
239
+ excerpt?: string | undefined;
240
+ content?: any;
241
+ contentHTML?: string | undefined;
242
+ contentText?: string | undefined;
243
+ coverImage?: {
244
+ url: string;
245
+ _id: string;
246
+ width?: number | undefined;
247
+ height?: number | undefined;
248
+ alt?: string | undefined;
249
+ caption?: string | undefined;
250
+ } | undefined;
251
+ author?: {
252
+ name: string;
253
+ url?: string | undefined;
254
+ avatar?: string | undefined;
255
+ bio?: string | undefined;
256
+ } | undefined;
257
+ seo?: {
258
+ ogType: string;
259
+ noIndex: boolean;
260
+ metaTitle?: string | undefined;
261
+ metaDescription?: string | undefined;
262
+ canonicalUrl?: string | undefined;
263
+ ogImage?: string | undefined;
264
+ structuredData?: Record<string, unknown> | undefined;
265
+ focusKeyword?: string | undefined;
266
+ } | undefined;
267
+ publishedAt?: Date | undefined;
268
+ scheduledAt?: Date | undefined;
269
+ }, {
270
+ title: string;
271
+ status?: "draft" | "published" | "scheduled" | "archived" | undefined;
272
+ slug?: string | undefined;
273
+ excerpt?: string | undefined;
274
+ content?: any;
275
+ contentHTML?: string | undefined;
276
+ contentText?: string | undefined;
277
+ coverImage?: {
278
+ url: string;
279
+ _id: string;
280
+ width?: number | undefined;
281
+ height?: number | undefined;
282
+ alt?: string | undefined;
283
+ caption?: string | undefined;
284
+ } | undefined;
285
+ categories?: string[] | undefined;
286
+ tags?: string[] | undefined;
287
+ author?: {
288
+ name: string;
289
+ url?: string | undefined;
290
+ avatar?: string | undefined;
291
+ bio?: string | undefined;
292
+ } | undefined;
293
+ seo?: {
294
+ metaTitle?: string | undefined;
295
+ metaDescription?: string | undefined;
296
+ canonicalUrl?: string | undefined;
297
+ ogImage?: string | undefined;
298
+ ogType?: string | undefined;
299
+ noIndex?: boolean | undefined;
300
+ structuredData?: Record<string, unknown> | undefined;
301
+ focusKeyword?: string | undefined;
302
+ } | undefined;
303
+ publishedAt?: Date | undefined;
304
+ scheduledAt?: Date | undefined;
305
+ }>;
306
+ declare const UpdatePostSchema: z.ZodObject<{
307
+ title: z.ZodOptional<z.ZodString>;
308
+ slug: z.ZodOptional<z.ZodOptional<z.ZodString>>;
309
+ excerpt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
310
+ content: z.ZodOptional<z.ZodAny>;
311
+ contentHTML: z.ZodOptional<z.ZodOptional<z.ZodString>>;
312
+ contentText: z.ZodOptional<z.ZodOptional<z.ZodString>>;
313
+ coverImage: z.ZodOptional<z.ZodOptional<z.ZodObject<{
314
+ _id: z.ZodString;
315
+ url: z.ZodEffects<z.ZodString, string, string>;
316
+ alt: z.ZodOptional<z.ZodString>;
317
+ caption: z.ZodOptional<z.ZodString>;
318
+ width: z.ZodOptional<z.ZodNumber>;
319
+ height: z.ZodOptional<z.ZodNumber>;
320
+ }, "strip", z.ZodTypeAny, {
321
+ url: string;
322
+ _id: string;
323
+ width?: number | undefined;
324
+ height?: number | undefined;
325
+ alt?: string | undefined;
326
+ caption?: string | undefined;
327
+ }, {
328
+ url: string;
329
+ _id: string;
330
+ width?: number | undefined;
331
+ height?: number | undefined;
332
+ alt?: string | undefined;
333
+ caption?: string | undefined;
334
+ }>>>;
335
+ categories: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
336
+ tags: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
337
+ author: z.ZodOptional<z.ZodOptional<z.ZodObject<{
338
+ name: z.ZodString;
339
+ avatar: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
340
+ bio: z.ZodOptional<z.ZodString>;
341
+ url: z.ZodOptional<z.ZodString>;
342
+ }, "strip", z.ZodTypeAny, {
343
+ name: string;
344
+ url?: string | undefined;
345
+ avatar?: string | undefined;
346
+ bio?: string | undefined;
347
+ }, {
348
+ name: string;
349
+ url?: string | undefined;
350
+ avatar?: string | undefined;
351
+ bio?: string | undefined;
352
+ }>>>;
353
+ seo: z.ZodOptional<z.ZodOptional<z.ZodObject<{
354
+ metaTitle: z.ZodOptional<z.ZodString>;
355
+ metaDescription: z.ZodOptional<z.ZodString>;
356
+ canonicalUrl: z.ZodOptional<z.ZodString>;
357
+ ogImage: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
358
+ ogType: z.ZodDefault<z.ZodString>;
359
+ noIndex: z.ZodDefault<z.ZodBoolean>;
360
+ structuredData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
361
+ focusKeyword: z.ZodOptional<z.ZodString>;
362
+ }, "strip", z.ZodTypeAny, {
363
+ ogType: string;
364
+ noIndex: boolean;
365
+ metaTitle?: string | undefined;
366
+ metaDescription?: string | undefined;
367
+ canonicalUrl?: string | undefined;
368
+ ogImage?: string | undefined;
369
+ structuredData?: Record<string, unknown> | undefined;
370
+ focusKeyword?: string | undefined;
371
+ }, {
372
+ metaTitle?: string | undefined;
373
+ metaDescription?: string | undefined;
374
+ canonicalUrl?: string | undefined;
375
+ ogImage?: string | undefined;
376
+ ogType?: string | undefined;
377
+ noIndex?: boolean | undefined;
378
+ structuredData?: Record<string, unknown> | undefined;
379
+ focusKeyword?: string | undefined;
380
+ }>>>;
381
+ status: z.ZodOptional<z.ZodDefault<z.ZodEnum<["draft", "published", "scheduled", "archived"]>>>;
382
+ publishedAt: z.ZodOptional<z.ZodOptional<z.ZodDate>>;
383
+ scheduledAt: z.ZodOptional<z.ZodOptional<z.ZodDate>>;
384
+ }, "strip", z.ZodTypeAny, {
385
+ status?: "draft" | "published" | "scheduled" | "archived" | undefined;
386
+ title?: string | undefined;
387
+ slug?: string | undefined;
388
+ excerpt?: string | undefined;
389
+ content?: any;
390
+ contentHTML?: string | undefined;
391
+ contentText?: string | undefined;
392
+ coverImage?: {
393
+ url: string;
394
+ _id: string;
395
+ width?: number | undefined;
396
+ height?: number | undefined;
397
+ alt?: string | undefined;
398
+ caption?: string | undefined;
399
+ } | undefined;
400
+ categories?: string[] | undefined;
401
+ tags?: string[] | undefined;
402
+ author?: {
403
+ name: string;
404
+ url?: string | undefined;
405
+ avatar?: string | undefined;
406
+ bio?: string | undefined;
407
+ } | undefined;
408
+ seo?: {
409
+ ogType: string;
410
+ noIndex: boolean;
411
+ metaTitle?: string | undefined;
412
+ metaDescription?: string | undefined;
413
+ canonicalUrl?: string | undefined;
414
+ ogImage?: string | undefined;
415
+ structuredData?: Record<string, unknown> | undefined;
416
+ focusKeyword?: string | undefined;
417
+ } | undefined;
418
+ publishedAt?: Date | undefined;
419
+ scheduledAt?: Date | undefined;
420
+ }, {
421
+ status?: "draft" | "published" | "scheduled" | "archived" | undefined;
422
+ title?: string | undefined;
423
+ slug?: string | undefined;
424
+ excerpt?: string | undefined;
425
+ content?: any;
426
+ contentHTML?: string | undefined;
427
+ contentText?: string | undefined;
428
+ coverImage?: {
429
+ url: string;
430
+ _id: string;
431
+ width?: number | undefined;
432
+ height?: number | undefined;
433
+ alt?: string | undefined;
434
+ caption?: string | undefined;
435
+ } | undefined;
436
+ categories?: string[] | undefined;
437
+ tags?: string[] | undefined;
438
+ author?: {
439
+ name: string;
440
+ url?: string | undefined;
441
+ avatar?: string | undefined;
442
+ bio?: string | undefined;
443
+ } | undefined;
444
+ seo?: {
445
+ metaTitle?: string | undefined;
446
+ metaDescription?: string | undefined;
447
+ canonicalUrl?: string | undefined;
448
+ ogImage?: string | undefined;
449
+ ogType?: string | undefined;
450
+ noIndex?: boolean | undefined;
451
+ structuredData?: Record<string, unknown> | undefined;
452
+ focusKeyword?: string | undefined;
453
+ } | undefined;
454
+ publishedAt?: Date | undefined;
455
+ scheduledAt?: Date | undefined;
456
+ }>;
457
+ type CreatePostInput = z.infer<typeof CreatePostSchema>;
458
+ type UpdatePostInput = z.infer<typeof UpdatePostSchema>;
459
+ interface BlogPost {
460
+ _id: ObjectId;
461
+ title: string;
462
+ slug: string;
463
+ excerpt: string;
464
+ content: BlockContent[];
465
+ contentHTML: string;
466
+ contentText: string;
467
+ coverImage?: MediaReference;
468
+ categories: string[];
469
+ tags: string[];
470
+ author: Author;
471
+ seo: PostSEO;
472
+ status: PostStatus;
473
+ publishedAt?: Date;
474
+ scheduledAt?: Date;
475
+ readingTime: number;
476
+ wordCount: number;
477
+ version: number;
478
+ revisions: Revision[];
479
+ createdAt: Date;
480
+ updatedAt: Date;
481
+ }
482
+ declare const CreateCategorySchema: z.ZodObject<{
483
+ name: z.ZodString;
484
+ slug: z.ZodOptional<z.ZodString>;
485
+ description: z.ZodOptional<z.ZodString>;
486
+ seo: z.ZodOptional<z.ZodObject<{
487
+ metaTitle: z.ZodOptional<z.ZodString>;
488
+ metaDescription: z.ZodOptional<z.ZodString>;
489
+ }, "strip", z.ZodTypeAny, {
490
+ metaTitle?: string | undefined;
491
+ metaDescription?: string | undefined;
492
+ }, {
493
+ metaTitle?: string | undefined;
494
+ metaDescription?: string | undefined;
495
+ }>>;
496
+ order: z.ZodDefault<z.ZodNumber>;
497
+ parentId: z.ZodOptional<z.ZodString>;
498
+ }, "strip", z.ZodTypeAny, {
499
+ name: string;
500
+ order: number;
501
+ slug?: string | undefined;
502
+ seo?: {
503
+ metaTitle?: string | undefined;
504
+ metaDescription?: string | undefined;
505
+ } | undefined;
506
+ description?: string | undefined;
507
+ parentId?: string | undefined;
508
+ }, {
509
+ name: string;
510
+ slug?: string | undefined;
511
+ seo?: {
512
+ metaTitle?: string | undefined;
513
+ metaDescription?: string | undefined;
514
+ } | undefined;
515
+ description?: string | undefined;
516
+ order?: number | undefined;
517
+ parentId?: string | undefined;
518
+ }>;
519
+ declare const UpdateCategorySchema: z.ZodObject<{
520
+ name: z.ZodOptional<z.ZodString>;
521
+ slug: z.ZodOptional<z.ZodOptional<z.ZodString>>;
522
+ description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
523
+ seo: z.ZodOptional<z.ZodOptional<z.ZodObject<{
524
+ metaTitle: z.ZodOptional<z.ZodString>;
525
+ metaDescription: z.ZodOptional<z.ZodString>;
526
+ }, "strip", z.ZodTypeAny, {
527
+ metaTitle?: string | undefined;
528
+ metaDescription?: string | undefined;
529
+ }, {
530
+ metaTitle?: string | undefined;
531
+ metaDescription?: string | undefined;
532
+ }>>>;
533
+ order: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
534
+ parentId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
535
+ }, "strip", z.ZodTypeAny, {
536
+ name?: string | undefined;
537
+ slug?: string | undefined;
538
+ seo?: {
539
+ metaTitle?: string | undefined;
540
+ metaDescription?: string | undefined;
541
+ } | undefined;
542
+ description?: string | undefined;
543
+ order?: number | undefined;
544
+ parentId?: string | undefined;
545
+ }, {
546
+ name?: string | undefined;
547
+ slug?: string | undefined;
548
+ seo?: {
549
+ metaTitle?: string | undefined;
550
+ metaDescription?: string | undefined;
551
+ } | undefined;
552
+ description?: string | undefined;
553
+ order?: number | undefined;
554
+ parentId?: string | undefined;
555
+ }>;
556
+ type CreateCategoryInput = z.infer<typeof CreateCategorySchema>;
557
+ type UpdateCategoryInput = z.infer<typeof UpdateCategorySchema>;
558
+ interface Category {
559
+ _id: ObjectId;
560
+ name: string;
561
+ slug: string;
562
+ description?: string;
563
+ seo?: {
564
+ metaTitle?: string;
565
+ metaDescription?: string;
566
+ };
567
+ order: number;
568
+ parentId?: ObjectId;
569
+ postCount: number;
570
+ }
571
+ declare const BlogSettingsSchema: z.ZodObject<{
572
+ postsPerPage: z.ZodDefault<z.ZodNumber>;
573
+ defaultAuthor: z.ZodOptional<z.ZodObject<{
574
+ name: z.ZodString;
575
+ avatar: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
576
+ bio: z.ZodOptional<z.ZodString>;
577
+ url: z.ZodOptional<z.ZodString>;
578
+ }, "strip", z.ZodTypeAny, {
579
+ name: string;
580
+ url?: string | undefined;
581
+ avatar?: string | undefined;
582
+ bio?: string | undefined;
583
+ }, {
584
+ name: string;
585
+ url?: string | undefined;
586
+ avatar?: string | undefined;
587
+ bio?: string | undefined;
588
+ }>>;
589
+ defaultOgImage: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
590
+ commentSystem: z.ZodDefault<z.ZodEnum<["none", "giscus", "disqus"]>>;
591
+ commentConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
592
+ customCSS: z.ZodOptional<z.ZodString>;
593
+ analytics: z.ZodOptional<z.ZodObject<{
594
+ gaId: z.ZodOptional<z.ZodString>;
595
+ plausibleDomain: z.ZodOptional<z.ZodString>;
596
+ }, "strip", z.ZodTypeAny, {
597
+ gaId?: string | undefined;
598
+ plausibleDomain?: string | undefined;
599
+ }, {
600
+ gaId?: string | undefined;
601
+ plausibleDomain?: string | undefined;
602
+ }>>;
603
+ }, "strip", z.ZodTypeAny, {
604
+ postsPerPage: number;
605
+ commentSystem: "none" | "giscus" | "disqus";
606
+ defaultAuthor?: {
607
+ name: string;
608
+ url?: string | undefined;
609
+ avatar?: string | undefined;
610
+ bio?: string | undefined;
611
+ } | undefined;
612
+ defaultOgImage?: string | undefined;
613
+ commentConfig?: Record<string, unknown> | undefined;
614
+ customCSS?: string | undefined;
615
+ analytics?: {
616
+ gaId?: string | undefined;
617
+ plausibleDomain?: string | undefined;
618
+ } | undefined;
619
+ }, {
620
+ postsPerPage?: number | undefined;
621
+ defaultAuthor?: {
622
+ name: string;
623
+ url?: string | undefined;
624
+ avatar?: string | undefined;
625
+ bio?: string | undefined;
626
+ } | undefined;
627
+ defaultOgImage?: string | undefined;
628
+ commentSystem?: "none" | "giscus" | "disqus" | undefined;
629
+ commentConfig?: Record<string, unknown> | undefined;
630
+ customCSS?: string | undefined;
631
+ analytics?: {
632
+ gaId?: string | undefined;
633
+ plausibleDomain?: string | undefined;
634
+ } | undefined;
635
+ }>;
636
+ interface BlogSettings {
637
+ _id: string;
638
+ postsPerPage: number;
639
+ defaultAuthor?: Author;
640
+ defaultOgImage?: string;
641
+ commentSystem: 'none' | 'giscus' | 'disqus';
642
+ commentConfig?: Record<string, unknown>;
643
+ customCSS?: string;
644
+ analytics?: {
645
+ gaId?: string;
646
+ plausibleDomain?: string;
647
+ };
648
+ }
649
+ declare const CreateApiTokenSchema: z.ZodObject<{
650
+ name: z.ZodString;
651
+ }, "strip", z.ZodTypeAny, {
652
+ name: string;
653
+ }, {
654
+ name: string;
655
+ }>;
656
+ interface ApiToken {
657
+ _id: ObjectId;
658
+ name: string;
659
+ tokenHash: string;
660
+ prefix: string;
661
+ lastUsedAt?: Date;
662
+ createdAt: Date;
663
+ }
664
+ interface ApiSuccessResponse<T = unknown> {
665
+ success: true;
666
+ data: T;
667
+ meta?: {
668
+ page: number;
669
+ limit: number;
670
+ total: number;
671
+ totalPages: number;
672
+ };
673
+ }
674
+ interface ApiErrorResponse {
675
+ success: false;
676
+ error: {
677
+ code: string;
678
+ message: string;
679
+ };
680
+ }
681
+ type ApiResponse<T = unknown> = ApiSuccessResponse<T> | ApiErrorResponse;
682
+ type SEOCheckStatus = 'pass' | 'warn' | 'fail';
683
+ type SEOOverallScore = 'good' | 'ok' | 'poor';
684
+ interface SEOCheck {
685
+ id: string;
686
+ status: SEOCheckStatus;
687
+ message: string;
688
+ }
689
+ interface SEOScore {
690
+ overall: SEOOverallScore;
691
+ checks: SEOCheck[];
692
+ }
693
+ interface BlogPanelConfig {
694
+ basePath: string;
695
+ adminPath: string;
696
+ apiPath: string;
697
+ postsPerPage: number;
698
+ excerptLength: number;
699
+ codeHighlighter: 'shiki' | 'prism';
700
+ editor: {
701
+ blocks: BlockType[];
702
+ /** Ceiling on the STORED result. Enforced by compression, never by rejection. */
703
+ maxImageSize: number;
704
+ /** Ceiling on the RAW upload. Enforced by rejection, before buffering. */
705
+ maxUploadSize: number;
706
+ imageFormats: string[];
707
+ autosaveInterval: number;
708
+ };
709
+ seo: {
710
+ titleTemplate: string;
711
+ defaultOgImage?: string;
712
+ generateRSS: boolean;
713
+ generateSitemap: boolean;
714
+ structuredData: boolean;
715
+ minContentLength: number;
716
+ };
717
+ auth: {
718
+ strategy: 'api-key' | 'custom' | 'credentials';
719
+ verify?: (request: Request) => Promise<boolean>;
720
+ admins?: string[];
721
+ };
722
+ features: {
723
+ search: boolean;
724
+ relatedPosts: boolean;
725
+ readingProgress: boolean;
726
+ tableOfContents: boolean;
727
+ shareButtons: boolean;
728
+ darkMode: boolean;
729
+ scheduling: boolean;
730
+ revisionHistory: boolean;
731
+ imageOptimization: boolean;
732
+ };
733
+ theme: {
734
+ variables?: Record<string, string>;
735
+ darkMode?: boolean;
736
+ components?: Record<string, React.ComponentType<unknown>>;
737
+ };
738
+ hooks: {
739
+ beforePublish?: (post: BlogPost) => Promise<void>;
740
+ afterPublish?: (post: BlogPost) => Promise<void>;
741
+ beforeDelete?: (post: BlogPost) => Promise<void>;
742
+ onMediaUpload?: (media: Media) => Promise<void>;
743
+ };
744
+ }
745
+ /**
746
+ * What a user's `next-blogpanel.config.ts` is allowed to contain.
747
+ *
748
+ * A plain `Partial<BlogPanelConfig>` only makes the top-level keys optional:
749
+ * it would demand all five `editor` keys from anyone who wanted to change
750
+ * `maxImageSize` alone. The merge in `getConfig()`/`setConfig()` has always
751
+ * been a per-key merge of the nested groups, so the type is what was wrong,
752
+ * not the behaviour.
753
+ */
754
+ type BlogPanelUserConfig = Partial<Omit<BlogPanelConfig, 'editor' | 'seo' | 'auth' | 'features' | 'theme' | 'hooks'>> & {
755
+ editor?: Partial<BlogPanelConfig['editor']>;
756
+ seo?: Partial<BlogPanelConfig['seo']>;
757
+ auth?: Partial<BlogPanelConfig['auth']>;
758
+ features?: Partial<BlogPanelConfig['features']>;
759
+ theme?: Partial<BlogPanelConfig['theme']>;
760
+ hooks?: Partial<BlogPanelConfig['hooks']>;
761
+ };
762
+ interface PostListQuery {
763
+ page?: number;
764
+ limit?: number;
765
+ category?: string;
766
+ tag?: string;
767
+ status?: PostStatus;
768
+ search?: string;
769
+ sortBy?: 'publishedAt' | 'createdAt' | 'title';
770
+ sortOrder?: 'asc' | 'desc';
771
+ }
772
+ interface MediaListQuery {
773
+ page?: number;
774
+ limit?: number;
775
+ mimeType?: string;
776
+ }
777
+
778
+ export { type ApiErrorResponse as A, type BlockContent as B, type Category as C, PostSEOSchema as D, PostStatusSchema as E, UpdateCategorySchema as F, UpdatePostSchema as G, type Media as M, type PostListQuery as P, type Revision as R, type SEOCheck as S, type UpdateCategoryInput as U, type ApiResponse as a, type ApiSuccessResponse as b, type Author as c, type BlockType as d, type BlogPanelConfig as e, type BlogPanelUserConfig as f, type BlogPost as g, type BlogSettings as h, type CreateCategoryInput as i, type CreatePostInput as j, type MediaListQuery as k, type MediaReference as l, type PostSEO as m, type PostStatus as n, type SEOCheckStatus as o, type SEOOverallScore as p, type SEOScore as q, type UpdatePostInput as r, type ApiToken as s, AuthorSchema as t, BlockTypeSchema as u, BlogSettingsSchema as v, CreateApiTokenSchema as w, CreateCategorySchema as x, CreatePostSchema as y, MediaSchema as z };