nextblogkit 0.6.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 (107) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +951 -0
  3. package/dist/admin/index.cjs +2465 -0
  4. package/dist/admin/index.cjs.map +1 -0
  5. package/dist/admin/index.d.cts +44 -0
  6. package/dist/admin/index.d.ts +44 -0
  7. package/dist/admin/index.js +2438 -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.cjs +113 -0
  16. package/dist/api/media.cjs.map +1 -0
  17. package/dist/api/media.d.cts +22 -0
  18. package/dist/api/media.d.ts +22 -0
  19. package/dist/api/media.js +109 -0
  20. package/dist/api/media.js.map +1 -0
  21. package/dist/api/posts.cjs +103 -0
  22. package/dist/api/posts.cjs.map +1 -0
  23. package/dist/api/posts.d.cts +27 -0
  24. package/dist/api/posts.d.ts +27 -0
  25. package/dist/api/posts.js +98 -0
  26. package/dist/api/posts.js.map +1 -0
  27. package/dist/api/rss.cjs +25 -0
  28. package/dist/api/rss.cjs.map +1 -0
  29. package/dist/api/rss.d.cts +5 -0
  30. package/dist/api/rss.d.ts +5 -0
  31. package/dist/api/rss.js +23 -0
  32. package/dist/api/rss.js.map +1 -0
  33. package/dist/api/settings.cjs +40 -0
  34. package/dist/api/settings.cjs.map +1 -0
  35. package/dist/api/settings.d.cts +17 -0
  36. package/dist/api/settings.d.ts +17 -0
  37. package/dist/api/settings.js +37 -0
  38. package/dist/api/settings.js.map +1 -0
  39. package/dist/api/sitemap.cjs +25 -0
  40. package/dist/api/sitemap.cjs.map +1 -0
  41. package/dist/api/sitemap.d.cts +5 -0
  42. package/dist/api/sitemap.d.ts +5 -0
  43. package/dist/api/sitemap.js +23 -0
  44. package/dist/api/sitemap.js.map +1 -0
  45. package/dist/chunk-4NKOJYWJ.js +68 -0
  46. package/dist/chunk-4NKOJYWJ.js.map +1 -0
  47. package/dist/chunk-4PY224XM.js +103 -0
  48. package/dist/chunk-4PY224XM.js.map +1 -0
  49. package/dist/chunk-64HUVJOZ.js +446 -0
  50. package/dist/chunk-64HUVJOZ.js.map +1 -0
  51. package/dist/chunk-6HKMZOI4.cjs +48 -0
  52. package/dist/chunk-6HKMZOI4.cjs.map +1 -0
  53. package/dist/chunk-A2S32RZN.js +138 -0
  54. package/dist/chunk-A2S32RZN.js.map +1 -0
  55. package/dist/chunk-E2QLTHKN.cjs +70 -0
  56. package/dist/chunk-E2QLTHKN.cjs.map +1 -0
  57. package/dist/chunk-JLPJKNRZ.js +37 -0
  58. package/dist/chunk-JLPJKNRZ.js.map +1 -0
  59. package/dist/chunk-JM7QRXXK.js +330 -0
  60. package/dist/chunk-JM7QRXXK.js.map +1 -0
  61. package/dist/chunk-KDZER3PU.cjs +43 -0
  62. package/dist/chunk-KDZER3PU.cjs.map +1 -0
  63. package/dist/chunk-N5MKAD7J.cjs +109 -0
  64. package/dist/chunk-N5MKAD7J.cjs.map +1 -0
  65. package/dist/chunk-QE4VLQYN.cjs +337 -0
  66. package/dist/chunk-QE4VLQYN.cjs.map +1 -0
  67. package/dist/chunk-R6MO3QIP.js +46 -0
  68. package/dist/chunk-R6MO3QIP.js.map +1 -0
  69. package/dist/chunk-U2ROR6AY.cjs +476 -0
  70. package/dist/chunk-U2ROR6AY.cjs.map +1 -0
  71. package/dist/chunk-ZP5XRVVH.cjs +141 -0
  72. package/dist/chunk-ZP5XRVVH.cjs.map +1 -0
  73. package/dist/cli/index.cjs +1308 -0
  74. package/dist/components/index.cjs +541 -0
  75. package/dist/components/index.cjs.map +1 -0
  76. package/dist/components/index.d.cts +165 -0
  77. package/dist/components/index.d.ts +165 -0
  78. package/dist/components/index.js +527 -0
  79. package/dist/components/index.js.map +1 -0
  80. package/dist/editor/index.cjs +1083 -0
  81. package/dist/editor/index.cjs.map +1 -0
  82. package/dist/editor/index.d.cts +133 -0
  83. package/dist/editor/index.d.ts +133 -0
  84. package/dist/editor/index.js +1051 -0
  85. package/dist/editor/index.js.map +1 -0
  86. package/dist/index-Cgzphklp.d.ts +266 -0
  87. package/dist/index-vjlZDWNr.d.cts +266 -0
  88. package/dist/index.cjs +368 -0
  89. package/dist/index.cjs.map +1 -0
  90. package/dist/index.d.cts +27 -0
  91. package/dist/index.d.ts +27 -0
  92. package/dist/index.js +208 -0
  93. package/dist/index.js.map +1 -0
  94. package/dist/lib/index.cjs +120 -0
  95. package/dist/lib/index.cjs.map +1 -0
  96. package/dist/lib/index.d.cts +4 -0
  97. package/dist/lib/index.d.ts +4 -0
  98. package/dist/lib/index.js +7 -0
  99. package/dist/lib/index.js.map +1 -0
  100. package/dist/styles/admin.css +657 -0
  101. package/dist/styles/blog.css +851 -0
  102. package/dist/styles/editor.css +452 -0
  103. package/dist/styles/globals.css +270 -0
  104. package/dist/styles/prose.css +299 -0
  105. package/dist/types-CBEEBR4A.d.cts +732 -0
  106. package/dist/types-CBEEBR4A.d.ts +732 -0
  107. package/package.json +134 -0
@@ -0,0 +1,732 @@
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
+ r2Key: z.ZodString;
32
+ url: z.ZodString;
33
+ alt: z.ZodOptional<z.ZodString>;
34
+ caption: z.ZodOptional<z.ZodString>;
35
+ createdAt: z.ZodDate;
36
+ }, "strip", z.ZodTypeAny, {
37
+ filename: string;
38
+ originalName: string;
39
+ mimeType: string;
40
+ size: number;
41
+ r2Key: string;
42
+ url: string;
43
+ createdAt: Date;
44
+ width?: number | undefined;
45
+ height?: number | undefined;
46
+ alt?: string | undefined;
47
+ caption?: string | undefined;
48
+ }, {
49
+ filename: string;
50
+ originalName: string;
51
+ mimeType: string;
52
+ size: number;
53
+ r2Key: string;
54
+ url: string;
55
+ createdAt: Date;
56
+ width?: number | undefined;
57
+ height?: number | undefined;
58
+ alt?: string | undefined;
59
+ caption?: string | undefined;
60
+ }>;
61
+ interface Media {
62
+ _id: ObjectId;
63
+ filename: string;
64
+ originalName: string;
65
+ mimeType: string;
66
+ size: number;
67
+ width?: number;
68
+ height?: number;
69
+ r2Key: string;
70
+ url: string;
71
+ alt?: string;
72
+ caption?: string;
73
+ createdAt: Date;
74
+ }
75
+ declare const AuthorSchema: z.ZodObject<{
76
+ name: z.ZodString;
77
+ avatar: z.ZodOptional<z.ZodString>;
78
+ bio: z.ZodOptional<z.ZodString>;
79
+ url: z.ZodOptional<z.ZodString>;
80
+ }, "strip", z.ZodTypeAny, {
81
+ name: string;
82
+ url?: string | undefined;
83
+ avatar?: string | undefined;
84
+ bio?: string | undefined;
85
+ }, {
86
+ name: string;
87
+ url?: string | undefined;
88
+ avatar?: string | undefined;
89
+ bio?: string | undefined;
90
+ }>;
91
+ interface Author {
92
+ name: string;
93
+ avatar?: string;
94
+ bio?: string;
95
+ url?: string;
96
+ }
97
+ declare const PostSEOSchema: z.ZodObject<{
98
+ metaTitle: z.ZodOptional<z.ZodString>;
99
+ metaDescription: z.ZodOptional<z.ZodString>;
100
+ canonicalUrl: z.ZodOptional<z.ZodString>;
101
+ ogImage: z.ZodOptional<z.ZodString>;
102
+ ogType: z.ZodDefault<z.ZodString>;
103
+ noIndex: z.ZodDefault<z.ZodBoolean>;
104
+ structuredData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
105
+ focusKeyword: z.ZodOptional<z.ZodString>;
106
+ }, "strip", z.ZodTypeAny, {
107
+ ogType: string;
108
+ noIndex: boolean;
109
+ metaTitle?: string | undefined;
110
+ metaDescription?: string | undefined;
111
+ canonicalUrl?: string | undefined;
112
+ ogImage?: string | undefined;
113
+ structuredData?: Record<string, unknown> | undefined;
114
+ focusKeyword?: string | undefined;
115
+ }, {
116
+ metaTitle?: string | undefined;
117
+ metaDescription?: string | undefined;
118
+ canonicalUrl?: string | undefined;
119
+ ogImage?: string | undefined;
120
+ ogType?: string | undefined;
121
+ noIndex?: boolean | undefined;
122
+ structuredData?: Record<string, unknown> | undefined;
123
+ focusKeyword?: string | undefined;
124
+ }>;
125
+ interface PostSEO {
126
+ metaTitle?: string;
127
+ metaDescription?: string;
128
+ canonicalUrl?: string;
129
+ ogImage?: string;
130
+ ogType: string;
131
+ noIndex: boolean;
132
+ structuredData?: Record<string, unknown>;
133
+ focusKeyword?: string;
134
+ }
135
+ interface Revision {
136
+ version: number;
137
+ title: string;
138
+ content: BlockContent[];
139
+ contentHTML: string;
140
+ savedAt: Date;
141
+ }
142
+ declare const PostStatusSchema: z.ZodEnum<["draft", "published", "scheduled", "archived"]>;
143
+ type PostStatus = z.infer<typeof PostStatusSchema>;
144
+ declare const CreatePostSchema: z.ZodObject<{
145
+ title: z.ZodString;
146
+ slug: z.ZodOptional<z.ZodString>;
147
+ excerpt: z.ZodOptional<z.ZodString>;
148
+ content: z.ZodAny;
149
+ contentHTML: z.ZodOptional<z.ZodString>;
150
+ contentText: z.ZodOptional<z.ZodString>;
151
+ coverImage: z.ZodOptional<z.ZodObject<{
152
+ _id: z.ZodString;
153
+ url: z.ZodString;
154
+ alt: z.ZodOptional<z.ZodString>;
155
+ caption: z.ZodOptional<z.ZodString>;
156
+ width: z.ZodOptional<z.ZodNumber>;
157
+ height: z.ZodOptional<z.ZodNumber>;
158
+ }, "strip", z.ZodTypeAny, {
159
+ url: string;
160
+ _id: string;
161
+ width?: number | undefined;
162
+ height?: number | undefined;
163
+ alt?: string | undefined;
164
+ caption?: string | undefined;
165
+ }, {
166
+ url: string;
167
+ _id: string;
168
+ width?: number | undefined;
169
+ height?: number | undefined;
170
+ alt?: string | undefined;
171
+ caption?: string | undefined;
172
+ }>>;
173
+ categories: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
174
+ tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
175
+ author: z.ZodOptional<z.ZodObject<{
176
+ name: z.ZodString;
177
+ avatar: z.ZodOptional<z.ZodString>;
178
+ bio: z.ZodOptional<z.ZodString>;
179
+ url: z.ZodOptional<z.ZodString>;
180
+ }, "strip", z.ZodTypeAny, {
181
+ name: string;
182
+ url?: string | undefined;
183
+ avatar?: string | undefined;
184
+ bio?: string | undefined;
185
+ }, {
186
+ name: string;
187
+ url?: string | undefined;
188
+ avatar?: string | undefined;
189
+ bio?: string | undefined;
190
+ }>>;
191
+ seo: z.ZodOptional<z.ZodObject<{
192
+ metaTitle: z.ZodOptional<z.ZodString>;
193
+ metaDescription: z.ZodOptional<z.ZodString>;
194
+ canonicalUrl: z.ZodOptional<z.ZodString>;
195
+ ogImage: z.ZodOptional<z.ZodString>;
196
+ ogType: z.ZodDefault<z.ZodString>;
197
+ noIndex: z.ZodDefault<z.ZodBoolean>;
198
+ structuredData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
199
+ focusKeyword: z.ZodOptional<z.ZodString>;
200
+ }, "strip", z.ZodTypeAny, {
201
+ ogType: string;
202
+ noIndex: boolean;
203
+ metaTitle?: string | undefined;
204
+ metaDescription?: string | undefined;
205
+ canonicalUrl?: string | undefined;
206
+ ogImage?: string | undefined;
207
+ structuredData?: Record<string, unknown> | undefined;
208
+ focusKeyword?: string | undefined;
209
+ }, {
210
+ metaTitle?: string | undefined;
211
+ metaDescription?: string | undefined;
212
+ canonicalUrl?: string | undefined;
213
+ ogImage?: string | undefined;
214
+ ogType?: string | undefined;
215
+ noIndex?: boolean | undefined;
216
+ structuredData?: Record<string, unknown> | undefined;
217
+ focusKeyword?: string | undefined;
218
+ }>>;
219
+ status: z.ZodDefault<z.ZodEnum<["draft", "published", "scheduled", "archived"]>>;
220
+ publishedAt: z.ZodOptional<z.ZodDate>;
221
+ scheduledAt: z.ZodOptional<z.ZodDate>;
222
+ }, "strip", z.ZodTypeAny, {
223
+ status: "draft" | "published" | "scheduled" | "archived";
224
+ title: string;
225
+ categories: string[];
226
+ tags: string[];
227
+ slug?: string | undefined;
228
+ excerpt?: string | undefined;
229
+ content?: any;
230
+ contentHTML?: string | undefined;
231
+ contentText?: string | undefined;
232
+ coverImage?: {
233
+ url: string;
234
+ _id: string;
235
+ width?: number | undefined;
236
+ height?: number | undefined;
237
+ alt?: string | undefined;
238
+ caption?: string | undefined;
239
+ } | undefined;
240
+ author?: {
241
+ name: string;
242
+ url?: string | undefined;
243
+ avatar?: string | undefined;
244
+ bio?: string | undefined;
245
+ } | undefined;
246
+ seo?: {
247
+ ogType: string;
248
+ noIndex: boolean;
249
+ metaTitle?: string | undefined;
250
+ metaDescription?: string | undefined;
251
+ canonicalUrl?: string | undefined;
252
+ ogImage?: string | undefined;
253
+ structuredData?: Record<string, unknown> | undefined;
254
+ focusKeyword?: string | undefined;
255
+ } | undefined;
256
+ publishedAt?: Date | undefined;
257
+ scheduledAt?: Date | undefined;
258
+ }, {
259
+ title: string;
260
+ status?: "draft" | "published" | "scheduled" | "archived" | undefined;
261
+ slug?: string | undefined;
262
+ excerpt?: string | undefined;
263
+ content?: any;
264
+ contentHTML?: string | undefined;
265
+ contentText?: string | undefined;
266
+ coverImage?: {
267
+ url: string;
268
+ _id: string;
269
+ width?: number | undefined;
270
+ height?: number | undefined;
271
+ alt?: string | undefined;
272
+ caption?: string | undefined;
273
+ } | undefined;
274
+ categories?: string[] | undefined;
275
+ tags?: string[] | undefined;
276
+ author?: {
277
+ name: string;
278
+ url?: string | undefined;
279
+ avatar?: string | undefined;
280
+ bio?: string | undefined;
281
+ } | undefined;
282
+ seo?: {
283
+ metaTitle?: string | undefined;
284
+ metaDescription?: string | undefined;
285
+ canonicalUrl?: string | undefined;
286
+ ogImage?: string | undefined;
287
+ ogType?: string | undefined;
288
+ noIndex?: boolean | undefined;
289
+ structuredData?: Record<string, unknown> | undefined;
290
+ focusKeyword?: string | undefined;
291
+ } | undefined;
292
+ publishedAt?: Date | undefined;
293
+ scheduledAt?: Date | undefined;
294
+ }>;
295
+ declare const UpdatePostSchema: z.ZodObject<{
296
+ title: z.ZodOptional<z.ZodString>;
297
+ slug: z.ZodOptional<z.ZodOptional<z.ZodString>>;
298
+ excerpt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
299
+ content: z.ZodOptional<z.ZodAny>;
300
+ contentHTML: z.ZodOptional<z.ZodOptional<z.ZodString>>;
301
+ contentText: z.ZodOptional<z.ZodOptional<z.ZodString>>;
302
+ coverImage: z.ZodOptional<z.ZodOptional<z.ZodObject<{
303
+ _id: z.ZodString;
304
+ url: z.ZodString;
305
+ alt: z.ZodOptional<z.ZodString>;
306
+ caption: z.ZodOptional<z.ZodString>;
307
+ width: z.ZodOptional<z.ZodNumber>;
308
+ height: z.ZodOptional<z.ZodNumber>;
309
+ }, "strip", z.ZodTypeAny, {
310
+ url: string;
311
+ _id: string;
312
+ width?: number | undefined;
313
+ height?: number | undefined;
314
+ alt?: string | undefined;
315
+ caption?: string | undefined;
316
+ }, {
317
+ url: string;
318
+ _id: string;
319
+ width?: number | undefined;
320
+ height?: number | undefined;
321
+ alt?: string | undefined;
322
+ caption?: string | undefined;
323
+ }>>>;
324
+ categories: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
325
+ tags: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
326
+ author: z.ZodOptional<z.ZodOptional<z.ZodObject<{
327
+ name: z.ZodString;
328
+ avatar: z.ZodOptional<z.ZodString>;
329
+ bio: z.ZodOptional<z.ZodString>;
330
+ url: z.ZodOptional<z.ZodString>;
331
+ }, "strip", z.ZodTypeAny, {
332
+ name: string;
333
+ url?: string | undefined;
334
+ avatar?: string | undefined;
335
+ bio?: string | undefined;
336
+ }, {
337
+ name: string;
338
+ url?: string | undefined;
339
+ avatar?: string | undefined;
340
+ bio?: string | undefined;
341
+ }>>>;
342
+ seo: z.ZodOptional<z.ZodOptional<z.ZodObject<{
343
+ metaTitle: z.ZodOptional<z.ZodString>;
344
+ metaDescription: z.ZodOptional<z.ZodString>;
345
+ canonicalUrl: z.ZodOptional<z.ZodString>;
346
+ ogImage: z.ZodOptional<z.ZodString>;
347
+ ogType: z.ZodDefault<z.ZodString>;
348
+ noIndex: z.ZodDefault<z.ZodBoolean>;
349
+ structuredData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
350
+ focusKeyword: z.ZodOptional<z.ZodString>;
351
+ }, "strip", z.ZodTypeAny, {
352
+ ogType: string;
353
+ noIndex: boolean;
354
+ metaTitle?: string | undefined;
355
+ metaDescription?: string | undefined;
356
+ canonicalUrl?: string | undefined;
357
+ ogImage?: string | undefined;
358
+ structuredData?: Record<string, unknown> | undefined;
359
+ focusKeyword?: string | undefined;
360
+ }, {
361
+ metaTitle?: string | undefined;
362
+ metaDescription?: string | undefined;
363
+ canonicalUrl?: string | undefined;
364
+ ogImage?: string | undefined;
365
+ ogType?: string | undefined;
366
+ noIndex?: boolean | undefined;
367
+ structuredData?: Record<string, unknown> | undefined;
368
+ focusKeyword?: string | undefined;
369
+ }>>>;
370
+ status: z.ZodOptional<z.ZodDefault<z.ZodEnum<["draft", "published", "scheduled", "archived"]>>>;
371
+ publishedAt: z.ZodOptional<z.ZodOptional<z.ZodDate>>;
372
+ scheduledAt: z.ZodOptional<z.ZodOptional<z.ZodDate>>;
373
+ }, "strip", z.ZodTypeAny, {
374
+ status?: "draft" | "published" | "scheduled" | "archived" | undefined;
375
+ title?: string | undefined;
376
+ slug?: string | undefined;
377
+ excerpt?: string | undefined;
378
+ content?: any;
379
+ contentHTML?: string | undefined;
380
+ contentText?: string | undefined;
381
+ coverImage?: {
382
+ url: string;
383
+ _id: string;
384
+ width?: number | undefined;
385
+ height?: number | undefined;
386
+ alt?: string | undefined;
387
+ caption?: string | undefined;
388
+ } | undefined;
389
+ categories?: string[] | undefined;
390
+ tags?: string[] | undefined;
391
+ author?: {
392
+ name: string;
393
+ url?: string | undefined;
394
+ avatar?: string | undefined;
395
+ bio?: string | undefined;
396
+ } | undefined;
397
+ seo?: {
398
+ ogType: string;
399
+ noIndex: boolean;
400
+ metaTitle?: string | undefined;
401
+ metaDescription?: string | undefined;
402
+ canonicalUrl?: string | undefined;
403
+ ogImage?: string | undefined;
404
+ structuredData?: Record<string, unknown> | undefined;
405
+ focusKeyword?: string | undefined;
406
+ } | undefined;
407
+ publishedAt?: Date | undefined;
408
+ scheduledAt?: Date | undefined;
409
+ }, {
410
+ status?: "draft" | "published" | "scheduled" | "archived" | undefined;
411
+ title?: string | undefined;
412
+ slug?: string | undefined;
413
+ excerpt?: string | undefined;
414
+ content?: any;
415
+ contentHTML?: string | undefined;
416
+ contentText?: string | undefined;
417
+ coverImage?: {
418
+ url: string;
419
+ _id: string;
420
+ width?: number | undefined;
421
+ height?: number | undefined;
422
+ alt?: string | undefined;
423
+ caption?: string | undefined;
424
+ } | undefined;
425
+ categories?: string[] | undefined;
426
+ tags?: string[] | undefined;
427
+ author?: {
428
+ name: string;
429
+ url?: string | undefined;
430
+ avatar?: string | undefined;
431
+ bio?: string | undefined;
432
+ } | undefined;
433
+ seo?: {
434
+ metaTitle?: string | undefined;
435
+ metaDescription?: string | undefined;
436
+ canonicalUrl?: string | undefined;
437
+ ogImage?: string | undefined;
438
+ ogType?: string | undefined;
439
+ noIndex?: boolean | undefined;
440
+ structuredData?: Record<string, unknown> | undefined;
441
+ focusKeyword?: string | undefined;
442
+ } | undefined;
443
+ publishedAt?: Date | undefined;
444
+ scheduledAt?: Date | undefined;
445
+ }>;
446
+ type CreatePostInput = z.infer<typeof CreatePostSchema>;
447
+ type UpdatePostInput = z.infer<typeof UpdatePostSchema>;
448
+ interface BlogPost {
449
+ _id: ObjectId;
450
+ title: string;
451
+ slug: string;
452
+ excerpt: string;
453
+ content: BlockContent[];
454
+ contentHTML: string;
455
+ contentText: string;
456
+ coverImage?: MediaReference;
457
+ categories: string[];
458
+ tags: string[];
459
+ author: Author;
460
+ seo: PostSEO;
461
+ status: PostStatus;
462
+ publishedAt?: Date;
463
+ scheduledAt?: Date;
464
+ readingTime: number;
465
+ wordCount: number;
466
+ version: number;
467
+ revisions: Revision[];
468
+ createdAt: Date;
469
+ updatedAt: Date;
470
+ }
471
+ declare const CreateCategorySchema: z.ZodObject<{
472
+ name: z.ZodString;
473
+ slug: z.ZodOptional<z.ZodString>;
474
+ description: z.ZodOptional<z.ZodString>;
475
+ seo: z.ZodOptional<z.ZodObject<{
476
+ metaTitle: z.ZodOptional<z.ZodString>;
477
+ metaDescription: z.ZodOptional<z.ZodString>;
478
+ }, "strip", z.ZodTypeAny, {
479
+ metaTitle?: string | undefined;
480
+ metaDescription?: string | undefined;
481
+ }, {
482
+ metaTitle?: string | undefined;
483
+ metaDescription?: string | undefined;
484
+ }>>;
485
+ order: z.ZodDefault<z.ZodNumber>;
486
+ parentId: z.ZodOptional<z.ZodString>;
487
+ }, "strip", z.ZodTypeAny, {
488
+ name: string;
489
+ order: number;
490
+ slug?: string | undefined;
491
+ seo?: {
492
+ metaTitle?: string | undefined;
493
+ metaDescription?: string | undefined;
494
+ } | undefined;
495
+ description?: string | undefined;
496
+ parentId?: string | undefined;
497
+ }, {
498
+ name: string;
499
+ slug?: string | undefined;
500
+ seo?: {
501
+ metaTitle?: string | undefined;
502
+ metaDescription?: string | undefined;
503
+ } | undefined;
504
+ description?: string | undefined;
505
+ order?: number | undefined;
506
+ parentId?: string | undefined;
507
+ }>;
508
+ declare const UpdateCategorySchema: z.ZodObject<{
509
+ name: z.ZodOptional<z.ZodString>;
510
+ slug: z.ZodOptional<z.ZodOptional<z.ZodString>>;
511
+ description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
512
+ seo: z.ZodOptional<z.ZodOptional<z.ZodObject<{
513
+ metaTitle: z.ZodOptional<z.ZodString>;
514
+ metaDescription: z.ZodOptional<z.ZodString>;
515
+ }, "strip", z.ZodTypeAny, {
516
+ metaTitle?: string | undefined;
517
+ metaDescription?: string | undefined;
518
+ }, {
519
+ metaTitle?: string | undefined;
520
+ metaDescription?: string | undefined;
521
+ }>>>;
522
+ order: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
523
+ parentId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
524
+ }, "strip", z.ZodTypeAny, {
525
+ name?: string | undefined;
526
+ slug?: string | undefined;
527
+ seo?: {
528
+ metaTitle?: string | undefined;
529
+ metaDescription?: string | undefined;
530
+ } | undefined;
531
+ description?: string | undefined;
532
+ order?: number | undefined;
533
+ parentId?: string | undefined;
534
+ }, {
535
+ name?: string | undefined;
536
+ slug?: string | undefined;
537
+ seo?: {
538
+ metaTitle?: string | undefined;
539
+ metaDescription?: string | undefined;
540
+ } | undefined;
541
+ description?: string | undefined;
542
+ order?: number | undefined;
543
+ parentId?: string | undefined;
544
+ }>;
545
+ type CreateCategoryInput = z.infer<typeof CreateCategorySchema>;
546
+ type UpdateCategoryInput = z.infer<typeof UpdateCategorySchema>;
547
+ interface Category {
548
+ _id: ObjectId;
549
+ name: string;
550
+ slug: string;
551
+ description?: string;
552
+ seo?: {
553
+ metaTitle?: string;
554
+ metaDescription?: string;
555
+ };
556
+ order: number;
557
+ parentId?: ObjectId;
558
+ postCount: number;
559
+ }
560
+ declare const BlogSettingsSchema: z.ZodObject<{
561
+ postsPerPage: z.ZodDefault<z.ZodNumber>;
562
+ defaultAuthor: z.ZodOptional<z.ZodObject<{
563
+ name: z.ZodString;
564
+ avatar: z.ZodOptional<z.ZodString>;
565
+ bio: z.ZodOptional<z.ZodString>;
566
+ url: z.ZodOptional<z.ZodString>;
567
+ }, "strip", z.ZodTypeAny, {
568
+ name: string;
569
+ url?: string | undefined;
570
+ avatar?: string | undefined;
571
+ bio?: string | undefined;
572
+ }, {
573
+ name: string;
574
+ url?: string | undefined;
575
+ avatar?: string | undefined;
576
+ bio?: string | undefined;
577
+ }>>;
578
+ defaultOgImage: z.ZodOptional<z.ZodString>;
579
+ commentSystem: z.ZodDefault<z.ZodEnum<["none", "giscus", "disqus"]>>;
580
+ commentConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
581
+ customCSS: z.ZodOptional<z.ZodString>;
582
+ analytics: z.ZodOptional<z.ZodObject<{
583
+ gaId: z.ZodOptional<z.ZodString>;
584
+ plausibleDomain: z.ZodOptional<z.ZodString>;
585
+ }, "strip", z.ZodTypeAny, {
586
+ gaId?: string | undefined;
587
+ plausibleDomain?: string | undefined;
588
+ }, {
589
+ gaId?: string | undefined;
590
+ plausibleDomain?: string | undefined;
591
+ }>>;
592
+ }, "strip", z.ZodTypeAny, {
593
+ postsPerPage: number;
594
+ commentSystem: "none" | "giscus" | "disqus";
595
+ defaultAuthor?: {
596
+ name: string;
597
+ url?: string | undefined;
598
+ avatar?: string | undefined;
599
+ bio?: string | undefined;
600
+ } | undefined;
601
+ defaultOgImage?: string | undefined;
602
+ commentConfig?: Record<string, unknown> | undefined;
603
+ customCSS?: string | undefined;
604
+ analytics?: {
605
+ gaId?: string | undefined;
606
+ plausibleDomain?: string | undefined;
607
+ } | undefined;
608
+ }, {
609
+ postsPerPage?: number | undefined;
610
+ defaultAuthor?: {
611
+ name: string;
612
+ url?: string | undefined;
613
+ avatar?: string | undefined;
614
+ bio?: string | undefined;
615
+ } | undefined;
616
+ defaultOgImage?: string | undefined;
617
+ commentSystem?: "none" | "giscus" | "disqus" | undefined;
618
+ commentConfig?: Record<string, unknown> | undefined;
619
+ customCSS?: string | undefined;
620
+ analytics?: {
621
+ gaId?: string | undefined;
622
+ plausibleDomain?: string | undefined;
623
+ } | undefined;
624
+ }>;
625
+ interface BlogSettings {
626
+ _id: string;
627
+ postsPerPage: number;
628
+ defaultAuthor?: Author;
629
+ defaultOgImage?: string;
630
+ commentSystem: 'none' | 'giscus' | 'disqus';
631
+ commentConfig?: Record<string, unknown>;
632
+ customCSS?: string;
633
+ analytics?: {
634
+ gaId?: string;
635
+ plausibleDomain?: string;
636
+ };
637
+ }
638
+ interface ApiSuccessResponse<T = unknown> {
639
+ success: true;
640
+ data: T;
641
+ meta?: {
642
+ page: number;
643
+ limit: number;
644
+ total: number;
645
+ totalPages: number;
646
+ };
647
+ }
648
+ interface ApiErrorResponse {
649
+ success: false;
650
+ error: {
651
+ code: string;
652
+ message: string;
653
+ };
654
+ }
655
+ type ApiResponse<T = unknown> = ApiSuccessResponse<T> | ApiErrorResponse;
656
+ type SEOCheckStatus = 'pass' | 'warn' | 'fail';
657
+ type SEOOverallScore = 'good' | 'ok' | 'poor';
658
+ interface SEOCheck {
659
+ id: string;
660
+ status: SEOCheckStatus;
661
+ message: string;
662
+ }
663
+ interface SEOScore {
664
+ overall: SEOOverallScore;
665
+ checks: SEOCheck[];
666
+ }
667
+ interface NextBlogKitConfig {
668
+ basePath: string;
669
+ adminPath: string;
670
+ apiPath: string;
671
+ postsPerPage: number;
672
+ excerptLength: number;
673
+ codeHighlighter: 'shiki' | 'prism';
674
+ editor: {
675
+ blocks: BlockType[];
676
+ maxImageSize: number;
677
+ imageFormats: string[];
678
+ autosaveInterval: number;
679
+ };
680
+ seo: {
681
+ titleTemplate: string;
682
+ defaultOgImage?: string;
683
+ generateRSS: boolean;
684
+ generateSitemap: boolean;
685
+ structuredData: boolean;
686
+ minContentLength: number;
687
+ };
688
+ auth: {
689
+ strategy: 'api-key' | 'custom' | 'credentials';
690
+ verify?: (request: Request) => Promise<boolean>;
691
+ admins?: string[];
692
+ };
693
+ features: {
694
+ search: boolean;
695
+ relatedPosts: boolean;
696
+ readingProgress: boolean;
697
+ tableOfContents: boolean;
698
+ shareButtons: boolean;
699
+ darkMode: boolean;
700
+ scheduling: boolean;
701
+ revisionHistory: boolean;
702
+ imageOptimization: boolean;
703
+ };
704
+ theme: {
705
+ variables?: Record<string, string>;
706
+ darkMode?: boolean;
707
+ components?: Record<string, React.ComponentType<unknown>>;
708
+ };
709
+ hooks: {
710
+ beforePublish?: (post: BlogPost) => Promise<void>;
711
+ afterPublish?: (post: BlogPost) => Promise<void>;
712
+ beforeDelete?: (post: BlogPost) => Promise<void>;
713
+ onMediaUpload?: (media: Media) => Promise<void>;
714
+ };
715
+ }
716
+ interface PostListQuery {
717
+ page?: number;
718
+ limit?: number;
719
+ category?: string;
720
+ tag?: string;
721
+ status?: PostStatus;
722
+ search?: string;
723
+ sortBy?: 'publishedAt' | 'createdAt' | 'title';
724
+ sortOrder?: 'asc' | 'desc';
725
+ }
726
+ interface MediaListQuery {
727
+ page?: number;
728
+ limit?: number;
729
+ mimeType?: string;
730
+ }
731
+
732
+ export { type ApiErrorResponse as A, type BlockContent as B, type Category as C, type Media as M, type NextBlogKitConfig as N, 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 BlogPost as e, type BlogSettings as f, type CreateCategoryInput as g, type CreatePostInput as h, type MediaListQuery as i, type MediaReference as j, type PostSEO as k, type PostStatus as l, type SEOCheckStatus as m, type SEOOverallScore as n, type SEOScore as o, type UpdatePostInput as p, AuthorSchema as q, BlockTypeSchema as r, BlogSettingsSchema as s, CreateCategorySchema as t, CreatePostSchema as u, MediaSchema as v, PostSEOSchema as w, PostStatusSchema as x, UpdateCategorySchema as y, UpdatePostSchema as z };