@kyro-cms/core 0.1.5 → 0.1.7

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 (170) hide show
  1. package/dist/WebhookService-BCgL1bLF.d.cts +112 -0
  2. package/dist/WebhookService-BPVJUgTl.d.ts +112 -0
  3. package/dist/{base-DlhVlwnN.d.cts → base-B0Y6isUJ.d.cts} +1 -1
  4. package/dist/{base-CQkFzqQl.d.ts → base-DaP-5PPG.d.ts} +1 -1
  5. package/dist/bootstrap-BMWVB2T6.cjs +31 -0
  6. package/dist/{bootstrap-X6TP3NKX.cjs.map → bootstrap-BMWVB2T6.cjs.map} +1 -1
  7. package/dist/bootstrap-LL6O7PWO.js +6 -0
  8. package/dist/{bootstrap-BDTTUGY2.js.map → bootstrap-LL6O7PWO.js.map} +1 -1
  9. package/dist/{chunk-3VZCX4DF.cjs → chunk-42JPONZU.cjs} +77 -14
  10. package/dist/chunk-42JPONZU.cjs.map +1 -0
  11. package/dist/{chunk-MHS6CPO5.cjs → chunk-4M5PHMUE.cjs} +66 -346
  12. package/dist/chunk-4M5PHMUE.cjs.map +1 -0
  13. package/dist/chunk-4PWRCMTQ.cjs +15 -0
  14. package/dist/chunk-4PWRCMTQ.cjs.map +1 -0
  15. package/dist/chunk-6COM32WF.js +47 -0
  16. package/dist/chunk-6COM32WF.js.map +1 -0
  17. package/dist/chunk-6MSSF46R.js +941 -0
  18. package/dist/chunk-6MSSF46R.js.map +1 -0
  19. package/dist/{chunk-TZFJMPCH.cjs → chunk-7YITG2US.cjs} +9 -18
  20. package/dist/chunk-7YITG2US.cjs.map +1 -0
  21. package/dist/{chunk-A3RQWHKD.cjs → chunk-BLMFBDBG.cjs} +56 -6
  22. package/dist/chunk-BLMFBDBG.cjs.map +1 -0
  23. package/dist/{chunk-EINVJPFM.js → chunk-BTOE3VUK.js} +65 -3
  24. package/dist/chunk-BTOE3VUK.js.map +1 -0
  25. package/dist/chunk-E5X75WNB.js +497 -0
  26. package/dist/chunk-E5X75WNB.js.map +1 -0
  27. package/dist/chunk-E63IF3MD.cjs +951 -0
  28. package/dist/chunk-E63IF3MD.cjs.map +1 -0
  29. package/dist/{chunk-K7QF2QCM.cjs → chunk-FTSSDDZQ.cjs} +7 -3
  30. package/dist/chunk-FTSSDDZQ.cjs.map +1 -0
  31. package/dist/chunk-G7VZBCD6.cjs +35 -0
  32. package/dist/{chunk-5BLDMQED.cjs.map → chunk-G7VZBCD6.cjs.map} +1 -1
  33. package/dist/{chunk-VMSRTAH7.js → chunk-GLCPGZPM.js} +56 -6
  34. package/dist/chunk-GLCPGZPM.js.map +1 -0
  35. package/dist/{chunk-V3B25QOK.cjs → chunk-GVFB5C6O.cjs} +74 -2
  36. package/dist/chunk-GVFB5C6O.cjs.map +1 -0
  37. package/dist/chunk-HVSQDZZJ.cjs +765 -0
  38. package/dist/chunk-HVSQDZZJ.cjs.map +1 -0
  39. package/dist/chunk-HYC4GNHX.js +758 -0
  40. package/dist/chunk-HYC4GNHX.js.map +1 -0
  41. package/dist/chunk-KDVDIZ4Y.cjs +3479 -0
  42. package/dist/chunk-KDVDIZ4Y.cjs.map +1 -0
  43. package/dist/{chunk-OG3KX56O.js → chunk-KWGNR4HM.js} +7 -3
  44. package/dist/chunk-KWGNR4HM.js.map +1 -0
  45. package/dist/chunk-LIJVWQKU.cjs +256 -0
  46. package/dist/chunk-LIJVWQKU.cjs.map +1 -0
  47. package/dist/{chunk-XTZSUDSI.js → chunk-LTRCYJAG.js} +3 -18
  48. package/dist/chunk-LTRCYJAG.js.map +1 -0
  49. package/dist/{chunk-UEYC46RL.js → chunk-OUGKLCYF.js} +71 -8
  50. package/dist/chunk-OUGKLCYF.js.map +1 -0
  51. package/dist/chunk-RONAX6UU.js +3456 -0
  52. package/dist/chunk-RONAX6UU.js.map +1 -0
  53. package/dist/{chunk-C74MQIRL.js → chunk-RRYXQMZG.js} +66 -344
  54. package/dist/chunk-RRYXQMZG.js.map +1 -0
  55. package/dist/{chunk-QUJ4OLSC.js → chunk-U74F3YZU.js} +87 -7
  56. package/dist/chunk-U74F3YZU.js.map +1 -0
  57. package/dist/chunk-VIONYQ2K.cjs +517 -0
  58. package/dist/chunk-VIONYQ2K.cjs.map +1 -0
  59. package/dist/chunk-VSTRLXMQ.cjs +50 -0
  60. package/dist/chunk-VSTRLXMQ.cjs.map +1 -0
  61. package/dist/chunk-YT7HXXVN.js +13 -0
  62. package/dist/chunk-YT7HXXVN.js.map +1 -0
  63. package/dist/chunk-Z6ZWNWWR.js +30 -0
  64. package/dist/{chunk-NSBPE2FW.js.map → chunk-Z6ZWNWWR.js.map} +1 -1
  65. package/dist/cli/index.cjs +11 -7
  66. package/dist/cli/index.cjs.map +1 -1
  67. package/dist/cli/index.js +11 -7
  68. package/dist/cli/index.js.map +1 -1
  69. package/dist/drizzle/index.cjs +20 -17
  70. package/dist/drizzle/index.d.cts +4 -4
  71. package/dist/drizzle/index.d.ts +4 -4
  72. package/dist/drizzle/index.js +4 -5
  73. package/dist/graphql/index.cjs +4 -4
  74. package/dist/graphql/index.d.cts +3 -2
  75. package/dist/graphql/index.d.ts +3 -2
  76. package/dist/graphql/index.js +2 -2
  77. package/dist/{index-DI0DRPNv.d.cts → index-BwE4NueJ.d.cts} +1 -1
  78. package/dist/{index-CMUNCIWQ.d.ts → index-DUKmDSeC.d.cts} +96 -24
  79. package/dist/{index-BMySjW6o.d.cts → index-DtBi3zP0.d.ts} +96 -24
  80. package/dist/{index-4fJKLFK2.d.ts → index-DupWTmW6.d.ts} +1 -1
  81. package/dist/index.cjs +3317 -352
  82. package/dist/index.cjs.map +1 -1
  83. package/dist/index.d.cts +379 -105
  84. package/dist/index.d.ts +379 -105
  85. package/dist/index.js +3211 -310
  86. package/dist/index.js.map +1 -1
  87. package/dist/media-HOT3O7RW.js +4 -0
  88. package/dist/media-HOT3O7RW.js.map +1 -0
  89. package/dist/media-WKP5AOX2.cjs +17 -0
  90. package/dist/media-WKP5AOX2.cjs.map +1 -0
  91. package/dist/mongodb/index.cjs +1 -1
  92. package/dist/mongodb/index.d.cts +2 -2
  93. package/dist/mongodb/index.d.ts +2 -2
  94. package/dist/mongodb/index.js +1 -1
  95. package/dist/mysql-media-AI6YK767.cjs +48 -0
  96. package/dist/mysql-media-AI6YK767.cjs.map +1 -0
  97. package/dist/mysql-media-CDZUS7YX.js +45 -0
  98. package/dist/mysql-media-CDZUS7YX.js.map +1 -0
  99. package/dist/postgres-auth-adapter-EVRPO7BQ.cjs +14 -0
  100. package/dist/{postgres-auth-adapter-VK6GY7LX.cjs.map → postgres-auth-adapter-EVRPO7BQ.cjs.map} +1 -1
  101. package/dist/postgres-auth-adapter-OTRWSTT5.js +5 -0
  102. package/dist/{postgres-auth-adapter-REJFUMP7.js.map → postgres-auth-adapter-OTRWSTT5.js.map} +1 -1
  103. package/dist/redis-adapter-2N6VA7BI.cjs +13 -0
  104. package/dist/{redis-adapter-LBLNKGNS.cjs.map → redis-adapter-2N6VA7BI.cjs.map} +1 -1
  105. package/dist/redis-adapter-RA24FNCX.js +4 -0
  106. package/dist/{redis-adapter-4YDY4LWE.js.map → redis-adapter-RA24FNCX.js.map} +1 -1
  107. package/dist/rest/index.cjs +7 -5
  108. package/dist/rest/index.d.cts +29 -3
  109. package/dist/rest/index.d.ts +29 -3
  110. package/dist/rest/index.js +5 -3
  111. package/dist/schema-CNB2DDTX.js +6 -0
  112. package/dist/schema-CNB2DDTX.js.map +1 -0
  113. package/dist/schema-Y777CQQS.cjs +67 -0
  114. package/dist/schema-Y777CQQS.cjs.map +1 -0
  115. package/dist/templates/index.cjs +24 -28
  116. package/dist/templates/index.d.cts +2 -4
  117. package/dist/templates/index.d.ts +2 -4
  118. package/dist/templates/index.js +2 -2
  119. package/dist/trpc/index.cjs +12 -12
  120. package/dist/trpc/index.d.cts +19 -14
  121. package/dist/trpc/index.d.ts +19 -14
  122. package/dist/trpc/index.js +3 -3
  123. package/dist/{types-BGM5MV_K.d.cts → types-BM0s_YOy.d.cts} +67 -35
  124. package/dist/{types-BGM5MV_K.d.ts → types-BM0s_YOy.d.ts} +67 -35
  125. package/dist/ws/index.cjs +1 -1
  126. package/dist/ws/index.js +1 -1
  127. package/package.json +11 -1
  128. package/dist/bootstrap-BDTTUGY2.js +0 -4
  129. package/dist/bootstrap-X6TP3NKX.cjs +0 -29
  130. package/dist/chunk-3QX6KG2S.js +0 -2125
  131. package/dist/chunk-3QX6KG2S.js.map +0 -1
  132. package/dist/chunk-3VZCX4DF.cjs.map +0 -1
  133. package/dist/chunk-5BLDMQED.cjs +0 -18
  134. package/dist/chunk-7G6EVYCU.cjs +0 -94
  135. package/dist/chunk-7G6EVYCU.cjs.map +0 -1
  136. package/dist/chunk-A3RQWHKD.cjs.map +0 -1
  137. package/dist/chunk-C74MQIRL.js.map +0 -1
  138. package/dist/chunk-EINVJPFM.js.map +0 -1
  139. package/dist/chunk-F5B64H5S.cjs +0 -2149
  140. package/dist/chunk-F5B64H5S.cjs.map +0 -1
  141. package/dist/chunk-K7QF2QCM.cjs.map +0 -1
  142. package/dist/chunk-LRTZJJPD.js +0 -86
  143. package/dist/chunk-LRTZJJPD.js.map +0 -1
  144. package/dist/chunk-MHS6CPO5.cjs.map +0 -1
  145. package/dist/chunk-NSBPE2FW.js +0 -15
  146. package/dist/chunk-OG3KX56O.js.map +0 -1
  147. package/dist/chunk-QUJ4OLSC.js.map +0 -1
  148. package/dist/chunk-R3XIBBAW.cjs +0 -34
  149. package/dist/chunk-R3XIBBAW.cjs.map +0 -1
  150. package/dist/chunk-SDMNUYVU.js +0 -30
  151. package/dist/chunk-SDMNUYVU.js.map +0 -1
  152. package/dist/chunk-TZFJMPCH.cjs.map +0 -1
  153. package/dist/chunk-UEG7KMKC.cjs +0 -228
  154. package/dist/chunk-UEG7KMKC.cjs.map +0 -1
  155. package/dist/chunk-UEYC46RL.js.map +0 -1
  156. package/dist/chunk-V3B25QOK.cjs.map +0 -1
  157. package/dist/chunk-VMSRTAH7.js.map +0 -1
  158. package/dist/chunk-XTZSUDSI.js.map +0 -1
  159. package/dist/chunk-YD7Y25W7.cjs +0 -176
  160. package/dist/chunk-YD7Y25W7.cjs.map +0 -1
  161. package/dist/chunk-YPAFJ7EV.js +0 -225
  162. package/dist/chunk-YPAFJ7EV.js.map +0 -1
  163. package/dist/database-7CJOXEZR.js +0 -5
  164. package/dist/database-7CJOXEZR.js.map +0 -1
  165. package/dist/database-QOIV44GT.cjs +0 -22
  166. package/dist/database-QOIV44GT.cjs.map +0 -1
  167. package/dist/postgres-auth-adapter-REJFUMP7.js +0 -5
  168. package/dist/postgres-auth-adapter-VK6GY7LX.cjs +0 -14
  169. package/dist/redis-adapter-4YDY4LWE.js +0 -4
  170. package/dist/redis-adapter-LBLNKGNS.cjs +0 -13
@@ -0,0 +1,3456 @@
1
+ // src/templates/minimal.ts
2
+ var minimalCollections = {
3
+ pages: {
4
+ slug: "pages",
5
+ label: "Pages",
6
+ labelPlural: "Pages",
7
+ singularLabel: "Page",
8
+ admin: {
9
+ useAsTitle: "title",
10
+ defaultColumns: ["title", "slug", "status"],
11
+ description: "Static pages"
12
+ },
13
+ fields: [
14
+ {
15
+ name: "mainTabs",
16
+ type: "tabs",
17
+ tabs: [
18
+ {
19
+ label: "Content",
20
+ fields: [
21
+ {
22
+ name: "title",
23
+ type: "text",
24
+ required: true,
25
+ label: "Title",
26
+ admin: {
27
+ description: "The main title of the page as it will appear publicly."
28
+ }
29
+ },
30
+ {
31
+ name: "content",
32
+ type: "richtext",
33
+ label: "Content"
34
+ }
35
+ ]
36
+ },
37
+ {
38
+ label: "Meta",
39
+ fields: [
40
+ {
41
+ name: "menu",
42
+ type: "relationship",
43
+ label: "Menu",
44
+ relationTo: "navigation",
45
+ admin: { description: "Link to navigation menu item" }
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ label: "SEO",
51
+ fields: [
52
+ {
53
+ name: "metaTitle",
54
+ type: "text",
55
+ label: "Meta Title",
56
+ admin: { autoGenerate: "title" }
57
+ },
58
+ {
59
+ name: "metaDescription",
60
+ type: "textarea",
61
+ label: "Meta Description",
62
+ admin: { autoGenerate: "content" }
63
+ },
64
+ {
65
+ name: "ogImage",
66
+ type: "upload",
67
+ label: "OG Image",
68
+ relationTo: "media"
69
+ }
70
+ ]
71
+ }
72
+ ]
73
+ },
74
+ {
75
+ name: "slug",
76
+ type: "text",
77
+ required: true,
78
+ label: "Slug",
79
+ admin: { position: "sidebar" }
80
+ },
81
+ {
82
+ name: "status",
83
+ type: "select",
84
+ label: "Status",
85
+ options: [
86
+ { label: "Draft", value: "draft" },
87
+ { label: "Published", value: "published" }
88
+ ],
89
+ defaultValue: "draft",
90
+ admin: { position: "sidebar" }
91
+ },
92
+ {
93
+ name: "featuredImage",
94
+ type: "upload",
95
+ label: "Featured Image",
96
+ relationTo: "media",
97
+ admin: { position: "sidebar" }
98
+ }
99
+ ],
100
+ timestamps: true
101
+ },
102
+ posts: {
103
+ slug: "posts",
104
+ label: "Posts",
105
+ labelPlural: "Posts",
106
+ singularLabel: "Post",
107
+ admin: {
108
+ useAsTitle: "title",
109
+ defaultColumns: ["title", "status", "createdAt"],
110
+ description: "Blog posts and articles"
111
+ },
112
+ fields: [
113
+ {
114
+ name: "mainTabs",
115
+ type: "tabs",
116
+ tabs: [
117
+ {
118
+ label: "Content",
119
+ fields: [
120
+ {
121
+ name: "title",
122
+ type: "text",
123
+ required: true,
124
+ label: "Title",
125
+ admin: {
126
+ description: "The main title of the post as it will appear publicly."
127
+ }
128
+ },
129
+ {
130
+ name: "content",
131
+ type: "richtext",
132
+ label: "Content"
133
+ }
134
+ ]
135
+ },
136
+ {
137
+ label: "Meta",
138
+ fields: [
139
+ {
140
+ name: "category",
141
+ type: "relationship",
142
+ label: "Category",
143
+ relationTo: "categories",
144
+ admin: {
145
+ description: "Select the primary category this post belongs to."
146
+ }
147
+ },
148
+ {
149
+ name: "relatedPosts",
150
+ type: "array",
151
+ label: "Related Posts",
152
+ fields: [
153
+ {
154
+ name: "post",
155
+ type: "relationship",
156
+ relationTo: "posts",
157
+ label: "Post"
158
+ }
159
+ ],
160
+ admin: { description: "Select posts related to this one." }
161
+ }
162
+ ]
163
+ },
164
+ {
165
+ label: "SEO",
166
+ fields: [
167
+ {
168
+ name: "metaTitle",
169
+ type: "text",
170
+ label: "Meta Title",
171
+ admin: {
172
+ autoGenerate: "title",
173
+ description: "The title used for SEO and social sharing (recommended < 60 chars)."
174
+ }
175
+ },
176
+ {
177
+ name: "metaDescription",
178
+ type: "textarea",
179
+ label: "Meta Description",
180
+ admin: {
181
+ autoGenerate: "content",
182
+ description: "A brief summary for search engines (recommended < 160 chars)."
183
+ }
184
+ },
185
+ {
186
+ name: "ogImage",
187
+ type: "upload",
188
+ label: "OG Image",
189
+ relationTo: "media",
190
+ admin: {
191
+ description: "The image shown when the post is shared on social media."
192
+ }
193
+ }
194
+ ]
195
+ }
196
+ ]
197
+ },
198
+ {
199
+ name: "slug",
200
+ type: "text",
201
+ required: true,
202
+ label: "Slug",
203
+ admin: {
204
+ description: "The URL-friendly identifier for the post.",
205
+ position: "sidebar"
206
+ }
207
+ },
208
+ {
209
+ name: "authors",
210
+ type: "array",
211
+ label: "Authors",
212
+ fields: [
213
+ {
214
+ name: "user",
215
+ type: "relationship",
216
+ label: "User",
217
+ relationTo: "users"
218
+ }
219
+ ],
220
+ admin: {
221
+ description: "Select one or more authors for this post.",
222
+ position: "sidebar"
223
+ }
224
+ },
225
+ {
226
+ name: "featuredImage",
227
+ type: "upload",
228
+ label: "Featured Image",
229
+ relationTo: "media",
230
+ admin: {
231
+ description: "The primary visual used to represent this post.",
232
+ position: "sidebar"
233
+ }
234
+ },
235
+ {
236
+ name: "status",
237
+ type: "select",
238
+ label: "Status",
239
+ options: [
240
+ { label: "Draft", value: "draft" },
241
+ { label: "Published", value: "published" }
242
+ ],
243
+ defaultValue: "draft",
244
+ admin: { position: "sidebar" }
245
+ },
246
+ {
247
+ name: "publishedAt",
248
+ type: "date",
249
+ label: "Published At",
250
+ admin: {
251
+ description: "Date the post was or will be published.",
252
+ position: "sidebar"
253
+ }
254
+ }
255
+ ],
256
+ timestamps: true
257
+ },
258
+ categories: {
259
+ slug: "categories",
260
+ label: "Categories",
261
+ labelPlural: "Categories",
262
+ singularLabel: "Category",
263
+ admin: {
264
+ useAsTitle: "name",
265
+ defaultColumns: ["name", "slug"],
266
+ description: "Post categories"
267
+ },
268
+ fields: [
269
+ { name: "name", type: "text", required: true, label: "Name" },
270
+ { name: "slug", type: "text", required: true, label: "Slug" },
271
+ { name: "description", type: "richtext", label: "Description" },
272
+ {
273
+ name: "parent",
274
+ type: "relationship",
275
+ label: "Parent Category",
276
+ relationTo: "categories"
277
+ }
278
+ ],
279
+ timestamps: true
280
+ },
281
+ navigation: {
282
+ slug: "navigation",
283
+ label: "Menu",
284
+ labelPlural: "Menu",
285
+ singularLabel: "Menu Item",
286
+ admin: {
287
+ useAsTitle: "label",
288
+ defaultColumns: ["label", "location", "order"],
289
+ description: "Navigation menus"
290
+ },
291
+ fields: [
292
+ { name: "label", type: "text", required: true, label: "Label" },
293
+ { name: "url", type: "text", label: "URL" },
294
+ {
295
+ name: "linkType",
296
+ type: "select",
297
+ label: "Link Type",
298
+ options: [
299
+ { label: "Page", value: "page" },
300
+ { label: "Post", value: "post" },
301
+ { label: "Category", value: "category" }
302
+ ],
303
+ defaultValue: "",
304
+ admin: { position: "sidebar" }
305
+ },
306
+ {
307
+ name: "page",
308
+ type: "relationship",
309
+ label: "Page",
310
+ relationTo: "pages",
311
+ admin: {
312
+ condition: (_, current) => current?.linkType === "page",
313
+ position: "sidebar"
314
+ }
315
+ },
316
+ {
317
+ name: "post",
318
+ type: "relationship",
319
+ label: "Post",
320
+ relationTo: "posts",
321
+ admin: {
322
+ condition: (_, current) => current?.linkType === "post",
323
+ position: "sidebar"
324
+ }
325
+ },
326
+ {
327
+ name: "category",
328
+ type: "relationship",
329
+ label: "Category",
330
+ relationTo: "categories",
331
+ admin: {
332
+ condition: (_, current) => current?.linkType === "category",
333
+ position: "sidebar"
334
+ }
335
+ },
336
+ {
337
+ name: "location",
338
+ type: "select",
339
+ label: "Location",
340
+ options: [
341
+ { label: "Primary", value: "primary" },
342
+ { label: "Secondary", value: "secondary" },
343
+ { label: "Tertiary", value: "tertiary" }
344
+ ],
345
+ defaultValue: "primary",
346
+ admin: { position: "sidebar" }
347
+ },
348
+ {
349
+ name: "target",
350
+ type: "select",
351
+ label: "Target",
352
+ options: [
353
+ { label: "Same tab", value: "_self" },
354
+ { label: "New tab", value: "_blank" }
355
+ ],
356
+ defaultValue: "_self",
357
+ admin: { position: "sidebar" }
358
+ },
359
+ { name: "order", type: "number", label: "Order" }
360
+ ],
361
+ timestamps: true
362
+ }
363
+ };
364
+
365
+ // src/templates/blog.ts
366
+ var blogCollections = {
367
+ pages: {
368
+ slug: "pages",
369
+ label: "Pages",
370
+ labelPlural: "Pages",
371
+ singularLabel: "Page",
372
+ admin: {
373
+ useAsTitle: "title",
374
+ defaultColumns: ["title", "slug", "status"],
375
+ description: "Static pages"
376
+ },
377
+ fields: [
378
+ {
379
+ name: "title",
380
+ type: "text",
381
+ required: true,
382
+ label: "Title",
383
+ admin: {
384
+ description: "The title of the page as it will appear publicly."
385
+ }
386
+ },
387
+ {
388
+ name: "mainTabs",
389
+ type: "tabs",
390
+ tabs: [
391
+ {
392
+ label: "Content",
393
+ fields: [{ name: "content", type: "blocks", label: "Content" }]
394
+ },
395
+ {
396
+ label: "Meta",
397
+ fields: [
398
+ {
399
+ name: "menu",
400
+ type: "relationship",
401
+ label: "Menu",
402
+ relationTo: "navigation",
403
+ admin: { description: "Link to navigation menu item" }
404
+ }
405
+ ]
406
+ },
407
+ {
408
+ label: "SEO",
409
+ fields: [
410
+ {
411
+ name: "title",
412
+ type: "text",
413
+ required: true,
414
+ label: "Title",
415
+ admin: {
416
+ description: "The title of the page as it will appear publicly."
417
+ }
418
+ },
419
+ {
420
+ name: "content",
421
+ type: "blocks",
422
+ label: "Content"
423
+ },
424
+ {
425
+ name: "mainTabs",
426
+ type: "tabs",
427
+ tabs: [
428
+ {
429
+ label: "Meta",
430
+ fields: [
431
+ {
432
+ name: "menu",
433
+ type: "relationship",
434
+ label: "Menu",
435
+ relationTo: "navigation",
436
+ admin: { description: "Link to navigation menu item" }
437
+ }
438
+ ]
439
+ },
440
+ {
441
+ label: "SEO",
442
+ fields: [
443
+ {
444
+ name: "metaTitle",
445
+ type: "text",
446
+ label: "Meta Title",
447
+ admin: {
448
+ autoGenerate: "title",
449
+ description: "The title used for SEO and social sharing (recommended < 60 chars)."
450
+ }
451
+ },
452
+ {
453
+ name: "metaDescription",
454
+ type: "textarea",
455
+ label: "Meta Description",
456
+ admin: {
457
+ autoGenerate: "content",
458
+ description: "A brief summary for search engines (recommended < 160 chars)."
459
+ }
460
+ },
461
+ {
462
+ name: "ogImage",
463
+ type: "upload",
464
+ label: "OG Image",
465
+ relationTo: "media",
466
+ admin: {
467
+ description: "The image shown when the post is shared on social media."
468
+ }
469
+ }
470
+ ]
471
+ }
472
+ ]
473
+ },
474
+ {
475
+ name: "metaDescription",
476
+ type: "textarea",
477
+ label: "Meta Description",
478
+ admin: { autoGenerate: "content" }
479
+ },
480
+ {
481
+ name: "ogImage",
482
+ type: "upload",
483
+ label: "OG Image",
484
+ relationTo: "media"
485
+ }
486
+ ]
487
+ }
488
+ ]
489
+ },
490
+ {
491
+ name: "slug",
492
+ type: "text",
493
+ required: true,
494
+ label: "Slug",
495
+ admin: { position: "sidebar" }
496
+ },
497
+ {
498
+ name: "status",
499
+ type: "select",
500
+ label: "Status",
501
+ options: [
502
+ { label: "Draft", value: "draft" },
503
+ { label: "Published", value: "published" }
504
+ ],
505
+ defaultValue: "draft",
506
+ admin: { position: "sidebar" }
507
+ },
508
+ {
509
+ name: "featuredImage",
510
+ type: "upload",
511
+ label: "Featured Image",
512
+ relationTo: "media",
513
+ admin: { position: "sidebar" }
514
+ }
515
+ ],
516
+ timestamps: true
517
+ },
518
+ posts: {
519
+ slug: "posts",
520
+ label: "Posts",
521
+ labelPlural: "Posts",
522
+ singularLabel: "Post",
523
+ admin: {
524
+ useAsTitle: "title",
525
+ defaultColumns: ["title", "category", "status", "createdAt"],
526
+ description: "Blog posts and articles"
527
+ },
528
+ fields: [
529
+ {
530
+ name: "mainTabs",
531
+ type: "tabs",
532
+ tabs: [
533
+ {
534
+ label: "Content",
535
+ fields: [
536
+ {
537
+ name: "title",
538
+ type: "text",
539
+ required: true,
540
+ label: "Title",
541
+ admin: {
542
+ description: "The main title of the post as it will appear publicly."
543
+ }
544
+ },
545
+ {
546
+ name: "content",
547
+ type: "richtext",
548
+ label: "Content",
549
+ admin: {
550
+ description: "The comprehensive body content of the blog post."
551
+ }
552
+ }
553
+ ]
554
+ },
555
+ {
556
+ label: "Meta",
557
+ fields: [
558
+ {
559
+ name: "category",
560
+ type: "relationship",
561
+ label: "Category",
562
+ relationTo: "categories",
563
+ admin: {
564
+ description: "Select the primary category this post belongs to."
565
+ }
566
+ },
567
+ {
568
+ name: "relatedPosts",
569
+ type: "array",
570
+ label: "Related Posts",
571
+ fields: [
572
+ {
573
+ name: "post",
574
+ type: "relationship",
575
+ relationTo: "posts",
576
+ label: "Post"
577
+ }
578
+ ],
579
+ admin: { description: "Select posts related to this one." }
580
+ }
581
+ ]
582
+ },
583
+ {
584
+ label: "SEO",
585
+ fields: [
586
+ {
587
+ name: "metaTitle",
588
+ type: "text",
589
+ label: "Meta Title",
590
+ admin: {
591
+ autoGenerate: "title",
592
+ description: "The title used for SEO and social sharing (recommended < 60 chars)."
593
+ }
594
+ },
595
+ {
596
+ name: "metaDescription",
597
+ type: "textarea",
598
+ label: "Meta Description",
599
+ admin: {
600
+ autoGenerate: "content",
601
+ description: "A brief summary for search engines (recommended < 160 chars)."
602
+ }
603
+ },
604
+ {
605
+ name: "ogImage",
606
+ type: "upload",
607
+ label: "OG Image",
608
+ relationTo: "media",
609
+ admin: {
610
+ description: "The image shown when the post is shared on social media."
611
+ }
612
+ }
613
+ ]
614
+ }
615
+ ]
616
+ },
617
+ {
618
+ name: "slug",
619
+ type: "text",
620
+ required: true,
621
+ label: "Slug",
622
+ admin: {
623
+ description: "The URL-friendly identifier for the post.",
624
+ position: "sidebar"
625
+ }
626
+ },
627
+ {
628
+ name: "authors",
629
+ type: "array",
630
+ label: "Authors",
631
+ fields: [
632
+ {
633
+ name: "user",
634
+ type: "relationship",
635
+ label: "User",
636
+ relationTo: "users"
637
+ }
638
+ ],
639
+ admin: {
640
+ description: "Select one or more authors for this post.",
641
+ position: "sidebar"
642
+ }
643
+ },
644
+ {
645
+ name: "featuredImage",
646
+ type: "upload",
647
+ label: "Featured Image",
648
+ relationTo: "media",
649
+ admin: {
650
+ description: "The primary visual used to represent this post.",
651
+ position: "sidebar"
652
+ }
653
+ },
654
+ {
655
+ name: "tags",
656
+ type: "array",
657
+ label: "Tags",
658
+ fields: [{ name: "tag", type: "text" }],
659
+ admin: {
660
+ description: "Add keywords to help categorize your post.",
661
+ position: "sidebar"
662
+ }
663
+ },
664
+ {
665
+ name: "status",
666
+ type: "select",
667
+ label: "Status",
668
+ options: [
669
+ { label: "Draft", value: "draft" },
670
+ { label: "Published", value: "published" }
671
+ ],
672
+ defaultValue: "draft",
673
+ admin: { position: "sidebar" }
674
+ },
675
+ {
676
+ name: "publishedAt",
677
+ type: "date",
678
+ label: "Published At",
679
+ admin: {
680
+ description: "Date the post was or will be published.",
681
+ position: "sidebar"
682
+ }
683
+ }
684
+ ],
685
+ timestamps: true
686
+ },
687
+ categories: {
688
+ slug: "categories",
689
+ label: "Categories",
690
+ labelPlural: "Categories",
691
+ singularLabel: "Category",
692
+ admin: {
693
+ useAsTitle: "name",
694
+ defaultColumns: ["name", "slug"],
695
+ description: "Post categories"
696
+ },
697
+ fields: [
698
+ { name: "name", type: "text", required: true, label: "Name" },
699
+ { name: "slug", type: "text", required: true, label: "Slug" },
700
+ { name: "description", type: "richtext", label: "Description" },
701
+ {
702
+ name: "parent",
703
+ type: "relationship",
704
+ label: "Parent Category",
705
+ relationTo: "categories"
706
+ }
707
+ ],
708
+ timestamps: true
709
+ },
710
+ navigation: {
711
+ slug: "navigation",
712
+ label: "Navigation",
713
+ labelPlural: "Navigation",
714
+ singularLabel: "Navigation",
715
+ admin: {
716
+ useAsTitle: "label",
717
+ defaultColumns: ["label", "location", "order"],
718
+ description: "Navigation menus"
719
+ },
720
+ fields: [
721
+ { name: "label", type: "text", required: true, label: "Label" },
722
+ { name: "url", type: "text", label: "URL" },
723
+ { name: "location", type: "text", label: "Location" },
724
+ { name: "order", type: "number", label: "Order" }
725
+ ],
726
+ timestamps: true
727
+ }
728
+ };
729
+ var blogGlobals = [];
730
+
731
+ // src/templates/ecommerce.ts
732
+ var ecommerceCollections = {
733
+ pages: {
734
+ slug: "pages",
735
+ label: "Pages",
736
+ labelPlural: "Pages",
737
+ singularLabel: "Page",
738
+ admin: {
739
+ useAsTitle: "title",
740
+ defaultColumns: ["title", "slug", "status"],
741
+ description: "Static pages"
742
+ },
743
+ fields: [
744
+ {
745
+ name: "mainTabs",
746
+ type: "tabs",
747
+ tabs: [
748
+ {
749
+ label: "Content",
750
+ fields: [
751
+ { name: "title", type: "text", required: true, label: "Title" },
752
+ {
753
+ name: "content",
754
+ type: "blocks",
755
+ label: "Content",
756
+ blocks: [
757
+ {
758
+ slug: "hero",
759
+ label: "Hero Section",
760
+ fields: [
761
+ { name: "heading", type: "text", label: "Heading" },
762
+ { name: "subheading", type: "richtext", label: "Subheading" },
763
+ { name: "ctaText", type: "text", label: "CTA Button Text" },
764
+ { name: "ctaUrl", type: "text", label: "CTA Button URL" }
765
+ ]
766
+ },
767
+ {
768
+ slug: "text",
769
+ label: "Text Block",
770
+ fields: [{ name: "content", type: "richtext", label: "Content" }]
771
+ },
772
+ {
773
+ slug: "image",
774
+ label: "Image",
775
+ fields: [
776
+ { name: "image", type: "upload", label: "Image", relationTo: "media" },
777
+ { name: "caption", type: "text", label: "Caption" },
778
+ { name: "alt", type: "text", label: "Alt Text" }
779
+ ]
780
+ },
781
+ {
782
+ slug: "cta",
783
+ label: "Call to Action",
784
+ fields: [
785
+ { name: "heading", type: "text", label: "Heading" },
786
+ { name: "description", type: "richtext", label: "Description" },
787
+ { name: "buttonText", type: "text", label: "Button Text" },
788
+ { name: "buttonUrl", type: "text", label: "Button URL" }
789
+ ]
790
+ },
791
+ {
792
+ slug: "section",
793
+ label: "Section",
794
+ fields: [
795
+ {
796
+ name: "blocks",
797
+ type: "blocks",
798
+ label: "Section Blocks",
799
+ blocks: [
800
+ { slug: "text", label: "Text", fields: [{ name: "content", type: "richtext", label: "Content" }] },
801
+ { slug: "image", label: "Image", fields: [
802
+ { name: "image", type: "upload", label: "Image", relationTo: "media" },
803
+ { name: "caption", type: "text", label: "Caption" }
804
+ ] }
805
+ ]
806
+ }
807
+ ]
808
+ }
809
+ ]
810
+ }
811
+ ]
812
+ },
813
+ {
814
+ label: "Meta",
815
+ fields: [
816
+ {
817
+ name: "menu",
818
+ type: "relationship",
819
+ label: "Menu",
820
+ relationTo: "navigation",
821
+ admin: { description: "Link to navigation menu item" }
822
+ }
823
+ ]
824
+ },
825
+ {
826
+ label: "SEO",
827
+ fields: [
828
+ {
829
+ name: "metaTitle",
830
+ type: "text",
831
+ label: "Meta Title",
832
+ admin: { autoGenerate: "title" }
833
+ },
834
+ {
835
+ name: "metaDescription",
836
+ type: "textarea",
837
+ label: "Meta Description",
838
+ admin: { autoGenerate: "content" }
839
+ },
840
+ {
841
+ name: "ogImage",
842
+ type: "upload",
843
+ label: "OG Image",
844
+ relationTo: "media"
845
+ }
846
+ ]
847
+ }
848
+ ]
849
+ },
850
+ {
851
+ name: "slug",
852
+ type: "text",
853
+ required: true,
854
+ label: "Slug",
855
+ admin: { position: "sidebar" }
856
+ },
857
+ {
858
+ name: "status",
859
+ type: "select",
860
+ label: "Status",
861
+ options: [
862
+ { label: "Draft", value: "draft" },
863
+ { label: "Published", value: "published" }
864
+ ],
865
+ defaultValue: "draft",
866
+ admin: { position: "sidebar" }
867
+ },
868
+ {
869
+ name: "featuredImage",
870
+ type: "upload",
871
+ label: "Featured Image",
872
+ relationTo: "media",
873
+ admin: { position: "sidebar" }
874
+ }
875
+ ],
876
+ timestamps: true
877
+ },
878
+ posts: {
879
+ slug: "posts",
880
+ label: "Posts",
881
+ labelPlural: "Posts",
882
+ singularLabel: "Post",
883
+ admin: {
884
+ useAsTitle: "title",
885
+ defaultColumns: ["title", "status", "createdAt"],
886
+ description: "Blog posts and articles"
887
+ },
888
+ fields: [
889
+ {
890
+ name: "mainTabs",
891
+ type: "tabs",
892
+ tabs: [
893
+ {
894
+ label: "Content",
895
+ fields: [
896
+ {
897
+ name: "title",
898
+ type: "text",
899
+ required: true,
900
+ label: "Title",
901
+ admin: {
902
+ description: "The main title of the post as it will appear publicly."
903
+ }
904
+ },
905
+ {
906
+ name: "content",
907
+ type: "blocks",
908
+ label: "Content",
909
+ admin: {
910
+ description: "The comprehensive body content of the blog post."
911
+ },
912
+ blocks: [
913
+ {
914
+ slug: "hero",
915
+ label: "Hero Section",
916
+ fields: [
917
+ { name: "heading", type: "text", label: "Heading" },
918
+ { name: "subheading", type: "richtext", label: "Subheading" },
919
+ { name: "ctaText", type: "text", label: "CTA Button Text" },
920
+ { name: "ctaUrl", type: "text", label: "CTA Button URL" }
921
+ ]
922
+ },
923
+ {
924
+ slug: "text",
925
+ label: "Text Block",
926
+ fields: [{ name: "content", type: "richtext", label: "Content" }]
927
+ },
928
+ {
929
+ slug: "image",
930
+ label: "Image",
931
+ fields: [
932
+ { name: "image", type: "upload", label: "Image", relationTo: "media" },
933
+ { name: "caption", type: "text", label: "Caption" },
934
+ { name: "alt", type: "text", label: "Alt Text" }
935
+ ]
936
+ },
937
+ {
938
+ slug: "cta",
939
+ label: "Call to Action",
940
+ fields: [
941
+ { name: "heading", type: "text", label: "Heading" },
942
+ { name: "description", type: "richtext", label: "Description" },
943
+ { name: "buttonText", type: "text", label: "Button Text" },
944
+ { name: "buttonUrl", type: "text", label: "Button URL" }
945
+ ]
946
+ },
947
+ {
948
+ slug: "section",
949
+ label: "Section",
950
+ fields: [
951
+ {
952
+ name: "blocks",
953
+ type: "blocks",
954
+ label: "Section Blocks",
955
+ blocks: [
956
+ { slug: "text", label: "Text", fields: [{ name: "content", type: "richtext", label: "Content" }] },
957
+ { slug: "image", label: "Image", fields: [
958
+ { name: "image", type: "upload", label: "Image", relationTo: "media" },
959
+ { name: "caption", type: "text", label: "Caption" }
960
+ ] },
961
+ {
962
+ slug: "group",
963
+ label: "Collapsible Group",
964
+ fields: [
965
+ {
966
+ name: "details",
967
+ type: "collapsible",
968
+ label: "Details",
969
+ fields: [
970
+ { name: "content", type: "richtext", label: "Content" },
971
+ { name: "image", type: "upload", label: "Image", relationTo: "media" }
972
+ ]
973
+ }
974
+ ]
975
+ },
976
+ {
977
+ slug: "split",
978
+ label: "Two Columns",
979
+ fields: [
980
+ { name: "left", type: "row", fields: [{ name: "leftContent", type: "richtext", label: "Left Content" }] },
981
+ { name: "right", type: "row", fields: [{ name: "rightContent", type: "richtext", label: "Right Content" }] }
982
+ ]
983
+ },
984
+ {
985
+ slug: "tabs",
986
+ label: "Tabbed Section",
987
+ fields: [
988
+ {
989
+ name: "sections",
990
+ type: "tabs",
991
+ tabs: [
992
+ { label: "Tab 1", name: "tab1", fields: [{ name: "content", type: "richtext", label: "Content" }] },
993
+ { label: "Tab 2", name: "tab2", fields: [{ name: "content", type: "richtext", label: "Content" }] },
994
+ { label: "Tab 3", name: "tab3", fields: [{ name: "content", type: "richtext", label: "Content" }] }
995
+ ]
996
+ }
997
+ ]
998
+ }
999
+ ]
1000
+ }
1001
+ ]
1002
+ }
1003
+ ]
1004
+ }
1005
+ ]
1006
+ },
1007
+ {
1008
+ label: "Meta",
1009
+ fields: [
1010
+ {
1011
+ name: "category",
1012
+ type: "relationship",
1013
+ label: "Category",
1014
+ relationTo: "categories",
1015
+ admin: {
1016
+ description: "Select the primary category this post belongs to."
1017
+ }
1018
+ },
1019
+ {
1020
+ name: "relatedPosts",
1021
+ type: "array",
1022
+ label: "Related Posts",
1023
+ fields: [
1024
+ {
1025
+ name: "post",
1026
+ type: "relationship",
1027
+ relationTo: "posts",
1028
+ label: "Post"
1029
+ }
1030
+ ],
1031
+ admin: { description: "Select posts related to this one." }
1032
+ }
1033
+ ]
1034
+ },
1035
+ {
1036
+ label: "SEO",
1037
+ fields: [
1038
+ {
1039
+ name: "metaTitle",
1040
+ type: "text",
1041
+ label: "Meta Title",
1042
+ admin: {
1043
+ autoGenerate: "title",
1044
+ description: "The title used for SEO and social sharing (recommended < 60 chars)."
1045
+ }
1046
+ },
1047
+ {
1048
+ name: "metaDescription",
1049
+ type: "textarea",
1050
+ label: "Meta Description",
1051
+ admin: {
1052
+ autoGenerate: "content",
1053
+ description: "A brief summary for search engines (recommended < 160 chars)."
1054
+ }
1055
+ },
1056
+ {
1057
+ name: "ogImage",
1058
+ type: "upload",
1059
+ label: "OG Image",
1060
+ relationTo: "media",
1061
+ admin: {
1062
+ description: "The image shown when the post is shared on social media."
1063
+ }
1064
+ }
1065
+ ]
1066
+ }
1067
+ ]
1068
+ },
1069
+ {
1070
+ name: "slug",
1071
+ type: "text",
1072
+ required: true,
1073
+ label: "Slug",
1074
+ admin: {
1075
+ description: "The URL-friendly identifier for the post.",
1076
+ position: "sidebar"
1077
+ }
1078
+ },
1079
+ {
1080
+ name: "authors",
1081
+ type: "array",
1082
+ label: "Authors",
1083
+ fields: [
1084
+ {
1085
+ name: "user",
1086
+ type: "relationship",
1087
+ label: "User",
1088
+ relationTo: "users"
1089
+ }
1090
+ ],
1091
+ admin: {
1092
+ description: "Select one or more authors for this post.",
1093
+ position: "sidebar"
1094
+ }
1095
+ },
1096
+ {
1097
+ name: "featuredImage",
1098
+ type: "upload",
1099
+ label: "Featured Image",
1100
+ relationTo: "media",
1101
+ admin: {
1102
+ description: "The primary visual used to represent this post.",
1103
+ position: "sidebar"
1104
+ }
1105
+ },
1106
+ {
1107
+ name: "status",
1108
+ type: "select",
1109
+ label: "Status",
1110
+ options: [
1111
+ { label: "Draft", value: "draft" },
1112
+ { label: "Published", value: "published" }
1113
+ ],
1114
+ defaultValue: "draft",
1115
+ admin: { position: "sidebar" }
1116
+ },
1117
+ {
1118
+ name: "publishedAt",
1119
+ type: "date",
1120
+ label: "Published At",
1121
+ admin: {
1122
+ description: "Date the post was or will be published.",
1123
+ position: "sidebar"
1124
+ }
1125
+ }
1126
+ ],
1127
+ timestamps: true
1128
+ },
1129
+ products: {
1130
+ slug: "products",
1131
+ label: "Products",
1132
+ labelPlural: "Products",
1133
+ singularLabel: "Product",
1134
+ admin: {
1135
+ useAsTitle: "title",
1136
+ defaultColumns: ["title", "price", "status", "inventory"],
1137
+ description: "Product catalog"
1138
+ },
1139
+ fields: [
1140
+ { name: "title", type: "text", required: true, label: "Title" },
1141
+ { name: "slug", type: "text", required: true, label: "Slug" },
1142
+ { name: "description", type: "richtext", label: "Description" },
1143
+ { name: "price", type: "number", required: true, label: "Price" },
1144
+ {
1145
+ name: "compareAtPrice",
1146
+ type: "number",
1147
+ label: "Compare at Price",
1148
+ admin: { description: "Original price for sale display" }
1149
+ },
1150
+ {
1151
+ name: "costPrice",
1152
+ type: "number",
1153
+ label: "Cost Price",
1154
+ admin: { description: "For profit calculation" }
1155
+ },
1156
+ { name: "sku", type: "text", required: true, label: "SKU" },
1157
+ { name: "barcode", type: "text", label: "Barcode" },
1158
+ {
1159
+ name: "status",
1160
+ type: "select",
1161
+ label: "Status",
1162
+ options: [
1163
+ { label: "Draft", value: "draft" },
1164
+ { label: "Active", value: "active" },
1165
+ { label: "Archived", value: "archived" }
1166
+ ],
1167
+ defaultValue: "draft"
1168
+ },
1169
+ {
1170
+ name: "images",
1171
+ type: "array",
1172
+ label: "Images",
1173
+ fields: [
1174
+ { name: "url", type: "text", label: "URL" },
1175
+ { name: "alt", type: "text", label: "Alt Text" }
1176
+ ]
1177
+ },
1178
+ {
1179
+ name: "category",
1180
+ type: "relationship",
1181
+ label: "Category",
1182
+ relationTo: "categories"
1183
+ },
1184
+ {
1185
+ name: "inventory",
1186
+ type: "number",
1187
+ label: "Inventory",
1188
+ defaultValue: 0
1189
+ }
1190
+ ],
1191
+ timestamps: true
1192
+ },
1193
+ categories: {
1194
+ slug: "categories",
1195
+ label: "Categories",
1196
+ labelPlural: "Categories",
1197
+ singularLabel: "Category",
1198
+ admin: {
1199
+ useAsTitle: "name",
1200
+ defaultColumns: ["name", "slug", "productCount"],
1201
+ description: "Product categories"
1202
+ },
1203
+ fields: [
1204
+ { name: "name", type: "text", required: true, label: "Name" },
1205
+ { name: "slug", type: "text", required: true, label: "Slug" },
1206
+ { name: "description", type: "richtext", label: "Description" },
1207
+ { name: "image", type: "text", label: "Image URL" },
1208
+ {
1209
+ name: "parent",
1210
+ type: "relationship",
1211
+ label: "Parent Category",
1212
+ relationTo: "categories"
1213
+ }
1214
+ ],
1215
+ timestamps: true
1216
+ },
1217
+ customers: {
1218
+ slug: "customers",
1219
+ label: "Customers",
1220
+ labelPlural: "Customers",
1221
+ singularLabel: "Customer",
1222
+ admin: {
1223
+ useAsTitle: "email",
1224
+ defaultColumns: [
1225
+ "email",
1226
+ "firstName",
1227
+ "lastName",
1228
+ "orderCount",
1229
+ "createdAt"
1230
+ ],
1231
+ description: "Customer accounts"
1232
+ },
1233
+ fields: [
1234
+ { name: "email", type: "email", required: true, label: "Email" },
1235
+ { name: "firstName", type: "text", label: "First Name" },
1236
+ { name: "lastName", type: "text", label: "Last Name" },
1237
+ { name: "phone", type: "text", label: "Phone" },
1238
+ {
1239
+ name: "addresses",
1240
+ type: "array",
1241
+ label: "Addresses",
1242
+ fields: [
1243
+ { name: "type", type: "text", label: "Type" },
1244
+ { name: "line1", type: "text", label: "Address Line 1" },
1245
+ { name: "line2", type: "text", label: "Address Line 2" },
1246
+ { name: "city", type: "text", label: "City" },
1247
+ { name: "state", type: "text", label: "State" },
1248
+ { name: "postalCode", type: "text", label: "Postal Code" },
1249
+ { name: "country", type: "text", label: "Country" }
1250
+ ]
1251
+ },
1252
+ {
1253
+ name: "status",
1254
+ type: "select",
1255
+ label: "Status",
1256
+ options: [
1257
+ { label: "Active", value: "active" },
1258
+ { label: "Inactive", value: "inactive" },
1259
+ { label: "Banned", value: "banned" }
1260
+ ],
1261
+ defaultValue: "active"
1262
+ }
1263
+ ],
1264
+ timestamps: true
1265
+ },
1266
+ orders: {
1267
+ slug: "orders",
1268
+ label: "Orders",
1269
+ labelPlural: "Orders",
1270
+ singularLabel: "Order",
1271
+ admin: {
1272
+ useAsTitle: "orderNumber",
1273
+ defaultColumns: [
1274
+ "orderNumber",
1275
+ "customer",
1276
+ "status",
1277
+ "total",
1278
+ "createdAt"
1279
+ ],
1280
+ description: "Customer orders"
1281
+ },
1282
+ fields: [
1283
+ {
1284
+ name: "orderNumber",
1285
+ type: "text",
1286
+ required: true,
1287
+ label: "Order Number"
1288
+ },
1289
+ {
1290
+ name: "customer",
1291
+ type: "relationship",
1292
+ required: true,
1293
+ label: "Customer",
1294
+ relationTo: "customers"
1295
+ },
1296
+ {
1297
+ name: "status",
1298
+ type: "select",
1299
+ label: "Status",
1300
+ options: [
1301
+ { label: "Pending", value: "pending" },
1302
+ { label: "Confirmed", value: "confirmed" },
1303
+ { label: "Processing", value: "processing" },
1304
+ { label: "Shipped", value: "shipped" },
1305
+ { label: "Delivered", value: "delivered" },
1306
+ { label: "Cancelled", value: "cancelled" },
1307
+ { label: "Refunded", value: "refunded" }
1308
+ ],
1309
+ defaultValue: "pending"
1310
+ },
1311
+ {
1312
+ name: "paymentStatus",
1313
+ type: "select",
1314
+ label: "Payment Status",
1315
+ options: [
1316
+ { label: "Pending", value: "pending" },
1317
+ { label: "Paid", value: "paid" },
1318
+ { label: "Failed", value: "failed" },
1319
+ { label: "Refunded", value: "refunded" }
1320
+ ],
1321
+ defaultValue: "pending"
1322
+ },
1323
+ {
1324
+ name: "items",
1325
+ type: "array",
1326
+ label: "Items",
1327
+ fields: [
1328
+ { name: "product", type: "text", label: "Product" },
1329
+ { name: "quantity", type: "number", label: "Quantity" },
1330
+ { name: "unitPrice", type: "number", label: "Unit Price" },
1331
+ { name: "total", type: "number", label: "Total" }
1332
+ ]
1333
+ },
1334
+ { name: "subtotal", type: "number", required: true, label: "Subtotal" },
1335
+ { name: "tax", type: "number", label: "Tax" },
1336
+ { name: "shipping", type: "number", label: "Shipping" },
1337
+ { name: "discount", type: "number", label: "Discount" },
1338
+ { name: "total", type: "number", required: true, label: "Total" },
1339
+ { name: "notes", type: "richtext", label: "Notes" }
1340
+ ],
1341
+ timestamps: true
1342
+ },
1343
+ coupons: {
1344
+ slug: "coupons",
1345
+ label: "Coupons",
1346
+ labelPlural: "Coupons",
1347
+ singularLabel: "Coupon",
1348
+ admin: {
1349
+ useAsTitle: "code",
1350
+ defaultColumns: ["code", "type", "value", "active", "expiresAt"],
1351
+ description: "Discount codes and promotions"
1352
+ },
1353
+ fields: [
1354
+ { name: "code", type: "text", required: true, label: "Code" },
1355
+ {
1356
+ name: "type",
1357
+ type: "select",
1358
+ required: true,
1359
+ label: "Type",
1360
+ options: [
1361
+ { label: "Percentage", value: "percentage" },
1362
+ { label: "Fixed Amount", value: "fixed" },
1363
+ { label: "Free Shipping", value: "freeShipping" }
1364
+ ]
1365
+ },
1366
+ { name: "value", type: "number", label: "Value" },
1367
+ { name: "minPurchase", type: "number", label: "Minimum Purchase" },
1368
+ { name: "maxDiscount", type: "number", label: "Max Discount" },
1369
+ { name: "usageLimit", type: "number", label: "Usage Limit" },
1370
+ {
1371
+ name: "usedCount",
1372
+ type: "number",
1373
+ defaultValue: 0,
1374
+ label: "Used Count"
1375
+ },
1376
+ { name: "startsAt", type: "date", label: "Starts At" },
1377
+ { name: "expiresAt", type: "date", label: "Expires At" },
1378
+ { name: "active", type: "checkbox", defaultValue: true, label: "Active" }
1379
+ ],
1380
+ timestamps: true
1381
+ },
1382
+ navigation: {
1383
+ slug: "navigation",
1384
+ label: "Navigation",
1385
+ labelPlural: "Navigation",
1386
+ singularLabel: "Navigation",
1387
+ admin: {
1388
+ useAsTitle: "label",
1389
+ defaultColumns: ["label", "location", "order"],
1390
+ description: "Navigation menus"
1391
+ },
1392
+ fields: [
1393
+ { name: "label", type: "text", required: true, label: "Label" },
1394
+ { name: "url", type: "text", label: "URL" },
1395
+ {
1396
+ name: "linkType",
1397
+ type: "select",
1398
+ label: "Link Type",
1399
+ options: [
1400
+ { label: "Page", value: "page" },
1401
+ { label: "Product", value: "product" },
1402
+ { label: "Category", value: "category" }
1403
+ ],
1404
+ defaultValue: "",
1405
+ admin: { position: "sidebar" }
1406
+ },
1407
+ { name: "page", type: "relationship", label: "Page", relationTo: "pages", admin: { condition: (_, current) => current?.linkType === "page", position: "sidebar" } },
1408
+ { name: "product", type: "relationship", label: "Product", relationTo: "products", admin: { condition: (_, current) => current?.linkType === "product", position: "sidebar" } },
1409
+ { name: "category", type: "relationship", label: "Category", relationTo: "categories", admin: { condition: (_, current) => current?.linkType === "category", position: "sidebar" } },
1410
+ { name: "location", type: "text", label: "Location", admin: { position: "sidebar" } },
1411
+ { name: "target", type: "select", label: "Target", options: [
1412
+ { label: "Same tab", value: "_self" },
1413
+ { label: "New tab", value: "_blank" }
1414
+ ], defaultValue: "_self", admin: { position: "sidebar" } },
1415
+ { name: "order", type: "number", label: "Order" }
1416
+ ],
1417
+ timestamps: true
1418
+ }
1419
+ };
1420
+ var ecommerceGlobals = [];
1421
+
1422
+ // src/templates/kitchen-sink.ts
1423
+ var kitchenSinkCollections = {
1424
+ pages: {
1425
+ slug: "pages",
1426
+ label: "Pages",
1427
+ labelPlural: "Pages",
1428
+ singularLabel: "Page",
1429
+ admin: {
1430
+ useAsTitle: "title",
1431
+ defaultColumns: ["title", "slug", "status", "updatedAt"],
1432
+ description: "Static pages with custom layouts"
1433
+ },
1434
+ fields: [
1435
+ {
1436
+ name: "title",
1437
+ type: "text",
1438
+ required: true,
1439
+ label: "Title"
1440
+ },
1441
+ {
1442
+ name: "slug",
1443
+ type: "text",
1444
+ required: true,
1445
+ label: "Slug",
1446
+ admin: { description: "URL-friendly identifier" }
1447
+ },
1448
+ {
1449
+ name: "content",
1450
+ type: "blocks",
1451
+ label: "Content",
1452
+ blocks: [
1453
+ {
1454
+ slug: "hero",
1455
+ label: "Hero Section",
1456
+ fields: [
1457
+ { name: "heading", type: "text", label: "Heading" },
1458
+ { name: "subheading", type: "richtext", label: "Subheading" },
1459
+ { name: "ctaText", type: "text", label: "CTA Button Text" },
1460
+ { name: "ctaUrl", type: "text", label: "CTA Button URL" }
1461
+ ]
1462
+ },
1463
+ {
1464
+ slug: "text",
1465
+ label: "Text Block",
1466
+ fields: [{ name: "content", type: "richtext", label: "Content" }]
1467
+ },
1468
+ {
1469
+ slug: "image",
1470
+ label: "Image",
1471
+ fields: [
1472
+ {
1473
+ name: "image",
1474
+ type: "upload",
1475
+ label: "Image",
1476
+ relationTo: "media"
1477
+ },
1478
+ { name: "caption", type: "text", label: "Caption" },
1479
+ { name: "alt", type: "text", label: "Alt Text" }
1480
+ ]
1481
+ },
1482
+ {
1483
+ slug: "cta",
1484
+ label: "Call to Action",
1485
+ fields: [
1486
+ { name: "heading", type: "text", label: "Heading" },
1487
+ { name: "description", type: "richtext", label: "Description" },
1488
+ { name: "buttonText", type: "text", label: "Button Text" },
1489
+ { name: "buttonUrl", type: "text", label: "Button URL" }
1490
+ ]
1491
+ }
1492
+ ]
1493
+ },
1494
+ {
1495
+ name: "status",
1496
+ type: "select",
1497
+ label: "Status",
1498
+ options: [
1499
+ { label: "Draft", value: "draft" },
1500
+ { label: "Published", value: "published" }
1501
+ ],
1502
+ defaultValue: "draft"
1503
+ },
1504
+ {
1505
+ name: "publishedAt",
1506
+ type: "date",
1507
+ label: "Published At"
1508
+ }
1509
+ ],
1510
+ timestamps: true
1511
+ },
1512
+ navigation: {
1513
+ slug: "navigation",
1514
+ label: "Navigation",
1515
+ labelPlural: "Navigation",
1516
+ singularLabel: "Navigation Item",
1517
+ admin: {
1518
+ useAsTitle: "label",
1519
+ defaultColumns: ["label", "url", "location"],
1520
+ description: "Site navigation menus"
1521
+ },
1522
+ fields: [
1523
+ { name: "label", type: "text", required: true, label: "Label" },
1524
+ { name: "url", type: "text", label: "URL" },
1525
+ {
1526
+ name: "linkType",
1527
+ type: "select",
1528
+ label: "Link Type",
1529
+ options: [
1530
+ { label: "Page", value: "page" },
1531
+ { label: "Post", value: "post" },
1532
+ { label: "Product", value: "product" },
1533
+ { label: "Category", value: "category" }
1534
+ ],
1535
+ defaultValue: "",
1536
+ admin: { position: "sidebar" }
1537
+ },
1538
+ { name: "page", type: "relationship", label: "Page", relationTo: "pages", admin: { condition: (_, current) => current?.linkType === "page", position: "sidebar" } },
1539
+ { name: "post", type: "relationship", label: "Post", relationTo: "posts", admin: { condition: (_, current) => current?.linkType === "post", position: "sidebar" } },
1540
+ { name: "product", type: "relationship", label: "Product", relationTo: "products", admin: { condition: (_, current) => current?.linkType === "product", position: "sidebar" } },
1541
+ { name: "category", type: "relationship", label: "Category", relationTo: "categories", admin: { condition: (_, current) => current?.linkType === "category", position: "sidebar" } },
1542
+ {
1543
+ name: "location",
1544
+ type: "select",
1545
+ label: "Location",
1546
+ options: [
1547
+ { label: "Header", value: "header" },
1548
+ { label: "Footer", value: "footer" },
1549
+ { label: "Mobile", value: "mobile" }
1550
+ ],
1551
+ admin: { position: "sidebar" }
1552
+ },
1553
+ { name: "order", type: "number", label: "Sort Order", defaultValue: 0 },
1554
+ {
1555
+ name: "parent",
1556
+ type: "relationship",
1557
+ label: "Parent Item",
1558
+ relationTo: "navigation",
1559
+ admin: { position: "sidebar" }
1560
+ },
1561
+ {
1562
+ name: "newTab",
1563
+ type: "checkbox",
1564
+ label: "Open in New Tab",
1565
+ defaultValue: false
1566
+ }
1567
+ ],
1568
+ timestamps: true
1569
+ }
1570
+ };
1571
+
1572
+ // src/templates/media.ts
1573
+ var mediaCollection = {
1574
+ slug: "media",
1575
+ label: "Media Library",
1576
+ admin: {
1577
+ useAsTitle: "title",
1578
+ defaultColumns: ["thumbnailUrl", "title", "type", "fileSize", "createdAt"],
1579
+ group: "content"
1580
+ },
1581
+ access: {
1582
+ read: () => true,
1583
+ create: () => true,
1584
+ update: () => true,
1585
+ delete: () => true
1586
+ },
1587
+ fields: [
1588
+ {
1589
+ name: "title",
1590
+ type: "text",
1591
+ label: "Title",
1592
+ required: true,
1593
+ admin: {
1594
+ description: "Descriptive title for the file"
1595
+ }
1596
+ },
1597
+ {
1598
+ name: "filename",
1599
+ type: "text",
1600
+ label: "Filename",
1601
+ required: true,
1602
+ admin: {
1603
+ readOnly: true,
1604
+ description: "System filename (auto-generated)"
1605
+ }
1606
+ },
1607
+ {
1608
+ name: "originalName",
1609
+ type: "text",
1610
+ label: "Original Name",
1611
+ admin: {
1612
+ readOnly: true
1613
+ }
1614
+ },
1615
+ {
1616
+ name: "alt",
1617
+ type: "text",
1618
+ label: "Alt Text",
1619
+ admin: {
1620
+ description: "Alternative text for images (accessibility)"
1621
+ }
1622
+ },
1623
+ {
1624
+ name: "caption",
1625
+ type: "richtext",
1626
+ label: "Caption",
1627
+ admin: {
1628
+ description: "Optional caption or description"
1629
+ }
1630
+ },
1631
+ {
1632
+ name: "type",
1633
+ type: "select",
1634
+ label: "File Type",
1635
+ required: true,
1636
+ defaultValue: "document",
1637
+ options: [
1638
+ { label: "Image", value: "image" },
1639
+ { label: "Video", value: "video" },
1640
+ { label: "Audio", value: "audio" },
1641
+ { label: "Document", value: "document" },
1642
+ { label: "Archive", value: "archive" },
1643
+ { label: "Other", value: "other" }
1644
+ ],
1645
+ admin: {
1646
+ readOnly: true
1647
+ }
1648
+ },
1649
+ {
1650
+ name: "mimeType",
1651
+ type: "text",
1652
+ label: "MIME Type",
1653
+ admin: {
1654
+ readOnly: true
1655
+ }
1656
+ },
1657
+ {
1658
+ name: "url",
1659
+ type: "text",
1660
+ label: "URL",
1661
+ required: true,
1662
+ admin: {
1663
+ readOnly: true,
1664
+ description: "Public URL of the file"
1665
+ }
1666
+ },
1667
+ {
1668
+ name: "thumbnailUrl",
1669
+ type: "text",
1670
+ label: "Thumbnail URL",
1671
+ admin: {
1672
+ readOnly: true
1673
+ }
1674
+ },
1675
+ {
1676
+ name: "width",
1677
+ type: "number",
1678
+ label: "Width",
1679
+ admin: {
1680
+ readOnly: true,
1681
+ description: "Width in pixels (for images/videos)"
1682
+ }
1683
+ },
1684
+ {
1685
+ name: "height",
1686
+ type: "number",
1687
+ label: "Height",
1688
+ admin: {
1689
+ readOnly: true,
1690
+ description: "Height in pixels (for images/videos)"
1691
+ }
1692
+ },
1693
+ {
1694
+ name: "fileSize",
1695
+ type: "number",
1696
+ label: "File Size",
1697
+ admin: {
1698
+ readOnly: true,
1699
+ description: "Size in bytes"
1700
+ }
1701
+ },
1702
+ {
1703
+ name: "folder",
1704
+ type: "text",
1705
+ label: "Folder",
1706
+ admin: {
1707
+ description: "Folder path for organization (e.g., /products, /blog)"
1708
+ }
1709
+ },
1710
+ {
1711
+ name: "tags",
1712
+ type: "array",
1713
+ label: "Tags",
1714
+ fields: [
1715
+ {
1716
+ name: "tag",
1717
+ type: "text",
1718
+ label: "Tag"
1719
+ }
1720
+ ]
1721
+ },
1722
+ {
1723
+ name: "focalPoint",
1724
+ type: "group",
1725
+ label: "Focal Point",
1726
+ admin: {
1727
+ description: "Point of interest for cropping"
1728
+ },
1729
+ fields: [
1730
+ {
1731
+ name: "x",
1732
+ type: "number",
1733
+ label: "X",
1734
+ defaultValue: 50
1735
+ },
1736
+ {
1737
+ name: "y",
1738
+ type: "number",
1739
+ label: "Y",
1740
+ defaultValue: 50
1741
+ }
1742
+ ]
1743
+ },
1744
+ {
1745
+ name: "metadata",
1746
+ type: "json",
1747
+ label: "Metadata",
1748
+ admin: {
1749
+ readOnly: true,
1750
+ description: "Additional file metadata (EXIF, etc.)"
1751
+ }
1752
+ },
1753
+ {
1754
+ name: "provider",
1755
+ type: "select",
1756
+ label: "Storage Provider",
1757
+ defaultValue: "local",
1758
+ options: [
1759
+ { label: "Local", value: "local" },
1760
+ { label: "AWS S3", value: "s3" },
1761
+ { label: "Cloudinary", value: "cloudinary" },
1762
+ { label: "Imgix", value: "imgix" }
1763
+ ],
1764
+ admin: {
1765
+ readOnly: true
1766
+ }
1767
+ },
1768
+ {
1769
+ name: "status",
1770
+ type: "select",
1771
+ label: "Status",
1772
+ defaultValue: "active",
1773
+ options: [
1774
+ { label: "Active", value: "active" },
1775
+ { label: "Archived", value: "archived" }
1776
+ ]
1777
+ },
1778
+ {
1779
+ name: "createdAt",
1780
+ type: "date",
1781
+ label: "Created",
1782
+ admin: {
1783
+ readOnly: true
1784
+ }
1785
+ },
1786
+ {
1787
+ name: "updatedAt",
1788
+ type: "date",
1789
+ label: "Last Modified",
1790
+ admin: {
1791
+ readOnly: true
1792
+ }
1793
+ }
1794
+ ]
1795
+ };
1796
+ var mediaCollections = [mediaCollection];
1797
+
1798
+ // src/templates/settings/site.ts
1799
+ var siteSettingsGlobal = {
1800
+ slug: "site-settings",
1801
+ label: "Site Settings",
1802
+ admin: {
1803
+ group: "settings"
1804
+ },
1805
+ access: {
1806
+ read: () => true,
1807
+ update: () => true
1808
+ },
1809
+ fields: [
1810
+ {
1811
+ name: "siteName",
1812
+ type: "text",
1813
+ label: "Site Name",
1814
+ required: true,
1815
+ admin: {}
1816
+ },
1817
+ {
1818
+ name: "siteDescription",
1819
+ type: "richtext",
1820
+ label: "Site Description",
1821
+ hasBlocks: false,
1822
+ admin: {}
1823
+ },
1824
+ {
1825
+ name: "siteLogo",
1826
+ type: "relationship",
1827
+ label: "Site Logo",
1828
+ relationTo: "media",
1829
+ admin: {}
1830
+ },
1831
+ {
1832
+ name: "siteFavicon",
1833
+ type: "relationship",
1834
+ label: "Favicon",
1835
+ relationTo: "media",
1836
+ admin: {}
1837
+ },
1838
+ {
1839
+ name: "siteOgImage",
1840
+ type: "relationship",
1841
+ label: "Default OG Image",
1842
+ relationTo: "media",
1843
+ admin: {}
1844
+ },
1845
+ {
1846
+ name: "siteUrl",
1847
+ type: "text",
1848
+ label: "Site URL",
1849
+ admin: {}
1850
+ },
1851
+ {
1852
+ name: "maintenanceEnabled",
1853
+ type: "checkbox",
1854
+ label: "Enable Maintenance Mode",
1855
+ defaultValue: false,
1856
+ admin: {
1857
+ description: "When enabled, the public site will show a maintenance page."
1858
+ }
1859
+ },
1860
+ {
1861
+ name: "maintenance",
1862
+ type: "group",
1863
+ label: "Maintenance Configuration",
1864
+ admin: {
1865
+ condition: (data) => data.maintenanceEnabled === true
1866
+ },
1867
+ fields: [
1868
+ {
1869
+ name: "message",
1870
+ type: "textarea",
1871
+ label: "Maintenance Message",
1872
+ admin: {
1873
+ placeholder: "We'll be back soon! We're performing scheduled maintenance."
1874
+ }
1875
+ },
1876
+ {
1877
+ name: "bypassToken",
1878
+ type: "text",
1879
+ label: "Bypass Token",
1880
+ admin: {
1881
+ description: "Append ?bypass=YOUR_TOKEN to URL to view the site while in maintenance mode."
1882
+ }
1883
+ }
1884
+ ]
1885
+ },
1886
+ {
1887
+ name: "enableI18n",
1888
+ type: "checkbox",
1889
+ label: "Enable Internationalization (i18n)",
1890
+ defaultValue: false,
1891
+ admin: {
1892
+ description: "Enable support for multiple languages."
1893
+ }
1894
+ },
1895
+ {
1896
+ name: "i18n",
1897
+ type: "group",
1898
+ label: "Localization",
1899
+ admin: {
1900
+ condition: (data) => data.enableI18n === true
1901
+ },
1902
+ fields: [
1903
+ {
1904
+ name: "language",
1905
+ type: "select",
1906
+ label: "Default Language",
1907
+ defaultValue: "en",
1908
+ options: [
1909
+ { label: "English", value: "en" },
1910
+ { label: "Spanish", value: "es" },
1911
+ { label: "French", value: "fr" },
1912
+ { label: "German", value: "de" },
1913
+ { label: "Portuguese", value: "pt" },
1914
+ { label: "Italian", value: "it" },
1915
+ { label: "Dutch", value: "nl" },
1916
+ { label: "Russian", value: "ru" },
1917
+ { label: "Japanese", value: "ja" },
1918
+ { label: "Chinese", value: "zh" },
1919
+ { label: "Korean", value: "ko" },
1920
+ { label: "Arabic", value: "ar" }
1921
+ ]
1922
+ },
1923
+ {
1924
+ name: "timezone",
1925
+ type: "text",
1926
+ label: "Timezone",
1927
+ defaultValue: "UTC"
1928
+ }
1929
+ ]
1930
+ },
1931
+ {
1932
+ name: "logo",
1933
+ type: "group",
1934
+ label: "Logo Display Settings",
1935
+ fields: [
1936
+ {
1937
+ name: "width",
1938
+ type: "number",
1939
+ label: "Max Width (px)"
1940
+ },
1941
+ {
1942
+ name: "height",
1943
+ type: "number",
1944
+ label: "Max Height (px)"
1945
+ },
1946
+ {
1947
+ name: "altText",
1948
+ type: "text",
1949
+ label: "Alt Text"
1950
+ }
1951
+ ]
1952
+ },
1953
+ {
1954
+ name: "analyticsEnabled",
1955
+ type: "checkbox",
1956
+ label: "Enable Analytics & Tracking",
1957
+ defaultValue: false
1958
+ },
1959
+ {
1960
+ name: "analytics",
1961
+ type: "group",
1962
+ label: "Tracking Configurations",
1963
+ admin: {
1964
+ condition: (data) => data.analyticsEnabled === true
1965
+ },
1966
+ fields: [
1967
+ {
1968
+ name: "googleAnalyticsId",
1969
+ type: "text",
1970
+ label: "Google Analytics ID"
1971
+ },
1972
+ {
1973
+ name: "googleTagManagerId",
1974
+ type: "text",
1975
+ label: "Google Tag Manager ID"
1976
+ },
1977
+ {
1978
+ name: "plausibleDomain",
1979
+ type: "text",
1980
+ label: "Plausible Domain"
1981
+ },
1982
+ {
1983
+ name: "mixpanelToken",
1984
+ type: "password",
1985
+ label: "Mixpanel Token"
1986
+ }
1987
+ ]
1988
+ }
1989
+ ]
1990
+ };
1991
+
1992
+ // src/templates/settings/seo.ts
1993
+ var seoSettingsGlobal = {
1994
+ slug: "seo-settings",
1995
+ label: "SEO Settings",
1996
+ admin: {
1997
+ group: "settings"
1998
+ },
1999
+ access: {
2000
+ read: () => true,
2001
+ update: () => true
2002
+ },
2003
+ fields: [
2004
+ {
2005
+ name: "seoMode",
2006
+ type: "select",
2007
+ label: "Visibility Mode",
2008
+ defaultValue: "simple",
2009
+ options: [
2010
+ { label: "Simple (Basic Meta)", value: "simple" },
2011
+ { label: "Advanced (Full Technical SEO)", value: "advanced" }
2012
+ ],
2013
+ admin: {
2014
+ description: "Switch to advanced mode to control robots.txt, canonical URLs, and deep metadata."
2015
+ }
2016
+ },
2017
+ {
2018
+ name: "defaultTitle",
2019
+ type: "text",
2020
+ label: "Default Title",
2021
+ admin: {}
2022
+ },
2023
+ {
2024
+ name: "defaultDescription",
2025
+ type: "richtext",
2026
+ label: "Default Description",
2027
+ hasBlocks: false,
2028
+ admin: {}
2029
+ },
2030
+ {
2031
+ name: "titleTemplate",
2032
+ type: "text",
2033
+ label: "Title Template",
2034
+ defaultValue: "{{title}} | {{siteName}}",
2035
+ admin: {}
2036
+ },
2037
+ {
2038
+ name: "siteNameInTitle",
2039
+ type: "checkbox",
2040
+ label: "Include Site Name in Title",
2041
+ defaultValue: true
2042
+ },
2043
+ {
2044
+ name: "separator",
2045
+ type: "text",
2046
+ label: "Title Separator",
2047
+ defaultValue: " | ",
2048
+ admin: {}
2049
+ },
2050
+ {
2051
+ name: "meta",
2052
+ type: "group",
2053
+ label: "Technical Meta Settings",
2054
+ admin: {
2055
+ condition: (data) => data.seoMode === "advanced"
2056
+ },
2057
+ fields: [
2058
+ {
2059
+ name: "robots",
2060
+ type: "text",
2061
+ label: "Robots Meta",
2062
+ defaultValue: "index, follow"
2063
+ },
2064
+ {
2065
+ name: "canonicalUrl",
2066
+ type: "text",
2067
+ label: "Canonical URL"
2068
+ },
2069
+ {
2070
+ name: "ogType",
2071
+ type: "select",
2072
+ label: "Default OG Type",
2073
+ defaultValue: "website",
2074
+ options: [
2075
+ { label: "Website", value: "website" },
2076
+ { label: "Article", value: "article" },
2077
+ { label: "Product", value: "product" },
2078
+ { label: "Book", value: "book" },
2079
+ { label: "Music", value: "music" },
2080
+ { label: "Video", value: "video" }
2081
+ ]
2082
+ }
2083
+ ]
2084
+ },
2085
+ {
2086
+ name: "enableSitemap",
2087
+ type: "checkbox",
2088
+ label: "Enable XML Sitemap",
2089
+ defaultValue: true
2090
+ },
2091
+ {
2092
+ name: "sitemap",
2093
+ type: "group",
2094
+ label: "Sitemap Configuration",
2095
+ admin: {
2096
+ condition: (data) => data.enableSitemap === true && data.seoMode === "advanced"
2097
+ },
2098
+ fields: [
2099
+ {
2100
+ name: "sitemapUrls",
2101
+ type: "number",
2102
+ label: "Sitemap URL Limit",
2103
+ defaultValue: 5e4
2104
+ }
2105
+ ]
2106
+ },
2107
+ {
2108
+ name: "robotsTxt",
2109
+ type: "richtext",
2110
+ label: "Custom robots.txt",
2111
+ hasBlocks: false,
2112
+ admin: {
2113
+ condition: (data) => data.seoMode === "advanced"
2114
+ }
2115
+ },
2116
+ {
2117
+ name: "social",
2118
+ type: "group",
2119
+ label: "Social Media",
2120
+ fields: [
2121
+ {
2122
+ name: "twitterHandle",
2123
+ type: "text",
2124
+ label: "Twitter/X Handle",
2125
+ admin: {}
2126
+ },
2127
+ {
2128
+ name: "twitterCardType",
2129
+ type: "select",
2130
+ label: "Twitter Card Type",
2131
+ defaultValue: "summary_large_image",
2132
+ options: [
2133
+ { label: "Summary", value: "summary" },
2134
+ { label: "Summary with Large Image", value: "summary_large_image" },
2135
+ { label: "App", value: "app" },
2136
+ { label: "Player", value: "player" }
2137
+ ]
2138
+ },
2139
+ {
2140
+ name: "fbAppId",
2141
+ type: "text",
2142
+ label: "Facebook App ID"
2143
+ }
2144
+ ]
2145
+ },
2146
+ {
2147
+ name: "advanced",
2148
+ type: "group",
2149
+ label: "Advanced",
2150
+ fields: [
2151
+ {
2152
+ name: "jsonLdEnabled",
2153
+ type: "checkbox",
2154
+ label: "Enable JSON-LD",
2155
+ defaultValue: true,
2156
+ admin: {}
2157
+ },
2158
+ {
2159
+ name: "breadcrumbsEnabled",
2160
+ type: "checkbox",
2161
+ label: "Enable Breadcrumbs",
2162
+ defaultValue: true
2163
+ },
2164
+ {
2165
+ name: "paginationSize",
2166
+ type: "number",
2167
+ label: "Default Pagination Size",
2168
+ defaultValue: 10
2169
+ }
2170
+ ]
2171
+ }
2172
+ ]
2173
+ };
2174
+
2175
+ // src/templates/settings/social.ts
2176
+ var socialSettingsGlobal = {
2177
+ slug: "social-settings",
2178
+ label: "Social Media",
2179
+ admin: {
2180
+ group: "settings"
2181
+ },
2182
+ access: {
2183
+ read: () => true,
2184
+ update: () => true
2185
+ },
2186
+ fields: [
2187
+ {
2188
+ name: "showAll",
2189
+ type: "checkbox",
2190
+ label: "Show All Platforms",
2191
+ defaultValue: false,
2192
+ admin: {
2193
+ description: "Toggle to show niche or secondary social platforms."
2194
+ }
2195
+ },
2196
+ {
2197
+ name: "facebook",
2198
+ type: "text",
2199
+ label: "Facebook"
2200
+ },
2201
+ {
2202
+ name: "twitter",
2203
+ type: "text",
2204
+ label: "Twitter/X"
2205
+ },
2206
+ {
2207
+ name: "instagram",
2208
+ type: "text",
2209
+ label: "Instagram"
2210
+ },
2211
+ {
2212
+ name: "linkedin",
2213
+ type: "text",
2214
+ label: "LinkedIn"
2215
+ },
2216
+ {
2217
+ name: "youtube",
2218
+ type: "text",
2219
+ label: "YouTube"
2220
+ },
2221
+ {
2222
+ name: "tiktok",
2223
+ type: "text",
2224
+ label: "TikTok",
2225
+ admin: {
2226
+ condition: (data) => data.showAll === true
2227
+ }
2228
+ },
2229
+ {
2230
+ name: "pinterest",
2231
+ type: "text",
2232
+ label: "Pinterest",
2233
+ admin: {
2234
+ condition: (data) => data.showAll === true
2235
+ }
2236
+ },
2237
+ {
2238
+ name: "discord",
2239
+ type: "text",
2240
+ label: "Discord",
2241
+ admin: {
2242
+ condition: (data) => data.showAll === true
2243
+ }
2244
+ },
2245
+ {
2246
+ name: "twitch",
2247
+ type: "text",
2248
+ label: "Twitch",
2249
+ admin: {
2250
+ condition: (data) => data.showAll === true
2251
+ }
2252
+ },
2253
+ {
2254
+ name: "github",
2255
+ type: "text",
2256
+ label: "GitHub",
2257
+ admin: {
2258
+ condition: (data) => data.showAll === true
2259
+ }
2260
+ },
2261
+ {
2262
+ name: "mastodon",
2263
+ type: "text",
2264
+ label: "Mastodon",
2265
+ admin: {
2266
+ condition: (data) => data.showAll === true
2267
+ }
2268
+ }
2269
+ ]
2270
+ };
2271
+
2272
+ // src/templates/settings/email.ts
2273
+ var emailSettingsGlobal = {
2274
+ slug: "email-settings",
2275
+ label: "Email Settings",
2276
+ admin: {
2277
+ group: "settings"
2278
+ },
2279
+ access: {
2280
+ read: () => true,
2281
+ update: () => true
2282
+ },
2283
+ fields: [
2284
+ {
2285
+ name: "fromName",
2286
+ type: "text",
2287
+ label: "From Name",
2288
+ admin: {}
2289
+ },
2290
+ {
2291
+ name: "fromEmail",
2292
+ type: "email",
2293
+ label: "From Email",
2294
+ required: true,
2295
+ admin: {}
2296
+ },
2297
+ {
2298
+ name: "replyTo",
2299
+ type: "email",
2300
+ label: "Reply-To Email",
2301
+ admin: {}
2302
+ },
2303
+ {
2304
+ name: "provider",
2305
+ type: "select",
2306
+ label: "Email Provider",
2307
+ defaultValue: "smtp",
2308
+ options: [
2309
+ { label: "SMTP (Standard)", value: "smtp" },
2310
+ { label: "Resend", value: "resend" },
2311
+ { label: "SendGrid", value: "sendgrid" },
2312
+ { label: "Mailgun", value: "mailgun" },
2313
+ { label: "AWS SES", value: "ses" }
2314
+ ]
2315
+ },
2316
+ {
2317
+ name: "smtp",
2318
+ type: "group",
2319
+ label: "SMTP Settings",
2320
+ admin: {
2321
+ condition: (data) => data.provider === "smtp"
2322
+ },
2323
+ fields: [
2324
+ {
2325
+ name: "smtpService",
2326
+ type: "select",
2327
+ label: "SMTP Service",
2328
+ defaultValue: "custom",
2329
+ options: [
2330
+ { label: "Custom SMTP", value: "custom" },
2331
+ { label: "Gmail", value: "gmail" },
2332
+ { label: "Outlook / Office 365", value: "outlook" },
2333
+ { label: "Brevo (Sendinblue)", value: "brevo" },
2334
+ { label: "Mailgun (SMTP)", value: "mailgun-smtp" },
2335
+ { label: "SendGrid (SMTP)", value: "sendgrid-smtp" },
2336
+ { label: "Mandrill / Mailchimp", value: "mandrill" }
2337
+ ],
2338
+ admin: {
2339
+ description: "Selecting a known service will pre-configure host and port settings."
2340
+ }
2341
+ },
2342
+ {
2343
+ name: "host",
2344
+ type: "text",
2345
+ label: "Host",
2346
+ admin: {
2347
+ condition: (data, siblingData) => siblingData.smtpService === "custom",
2348
+ placeholder: "smtp.example.com"
2349
+ }
2350
+ },
2351
+ {
2352
+ name: "port",
2353
+ type: "number",
2354
+ label: "Port",
2355
+ defaultValue: 587,
2356
+ admin: {
2357
+ condition: (data, siblingData) => siblingData.smtpService === "custom"
2358
+ }
2359
+ },
2360
+ {
2361
+ name: "username",
2362
+ type: "text",
2363
+ label: "Username"
2364
+ },
2365
+ {
2366
+ name: "password",
2367
+ type: "password",
2368
+ label: "Password"
2369
+ },
2370
+ {
2371
+ name: "secure",
2372
+ type: "checkbox",
2373
+ label: "Use TLS/SSL",
2374
+ defaultValue: true
2375
+ }
2376
+ ]
2377
+ },
2378
+ {
2379
+ name: "resend",
2380
+ type: "group",
2381
+ label: "Resend Settings",
2382
+ admin: {
2383
+ condition: (data) => data.provider === "resend"
2384
+ },
2385
+ fields: [
2386
+ {
2387
+ name: "apiKey",
2388
+ type: "password",
2389
+ label: "API Key",
2390
+ required: true
2391
+ }
2392
+ ]
2393
+ },
2394
+ {
2395
+ name: "sendgrid",
2396
+ type: "group",
2397
+ label: "SendGrid Settings",
2398
+ admin: {
2399
+ condition: (data) => data.provider === "sendgrid"
2400
+ },
2401
+ fields: [
2402
+ {
2403
+ name: "apiKey",
2404
+ type: "password",
2405
+ label: "API Key",
2406
+ required: true
2407
+ }
2408
+ ]
2409
+ },
2410
+ {
2411
+ name: "mailgun",
2412
+ type: "group",
2413
+ label: "Mailgun Settings",
2414
+ admin: {
2415
+ condition: (data) => data.provider === "mailgun"
2416
+ },
2417
+ fields: [
2418
+ {
2419
+ name: "apiKey",
2420
+ type: "password",
2421
+ label: "API Key",
2422
+ required: true
2423
+ },
2424
+ {
2425
+ name: "domain",
2426
+ type: "text",
2427
+ label: "Domain",
2428
+ required: true
2429
+ },
2430
+ {
2431
+ name: "region",
2432
+ type: "select",
2433
+ label: "Region",
2434
+ defaultValue: "us",
2435
+ options: [
2436
+ { label: "US (United States)", value: "us" },
2437
+ { label: "EU (Europe)", value: "eu" }
2438
+ ]
2439
+ }
2440
+ ]
2441
+ },
2442
+ {
2443
+ name: "ses",
2444
+ type: "group",
2445
+ label: "AWS SES Settings",
2446
+ admin: {
2447
+ condition: (data) => data.provider === "ses"
2448
+ },
2449
+ fields: [
2450
+ {
2451
+ name: "accessKeyId",
2452
+ type: "text",
2453
+ label: "Access Key ID",
2454
+ required: true
2455
+ },
2456
+ {
2457
+ name: "secretAccessKey",
2458
+ type: "password",
2459
+ label: "Secret Access Key",
2460
+ required: true
2461
+ },
2462
+ {
2463
+ name: "region",
2464
+ type: "text",
2465
+ label: "Region",
2466
+ defaultValue: "us-east-1",
2467
+ admin: { placeholder: "us-east-1" }
2468
+ }
2469
+ ]
2470
+ },
2471
+ {
2472
+ name: "testEmailSection",
2473
+ type: "row",
2474
+ label: "Test Email",
2475
+ admin: {
2476
+ description: "Enter an email address to send a test email."
2477
+ },
2478
+ fields: [
2479
+ {
2480
+ name: "testEmail",
2481
+ type: "email",
2482
+ label: "Email",
2483
+ admin: {
2484
+ width: "300px"
2485
+ }
2486
+ },
2487
+ {
2488
+ name: "sendTestEmail",
2489
+ type: "button",
2490
+ label: "Send Test Email",
2491
+ admin: {
2492
+ action: "/api/globals/email-settings/test",
2493
+ method: "POST"
2494
+ }
2495
+ }
2496
+ ]
2497
+ }
2498
+ ]
2499
+ };
2500
+
2501
+ // src/templates/settings/storage.ts
2502
+ var storageSettingsGlobal = {
2503
+ slug: "storage-settings",
2504
+ label: "Storage Settings",
2505
+ admin: {
2506
+ group: "settings"
2507
+ },
2508
+ access: {
2509
+ read: () => true,
2510
+ update: () => true
2511
+ },
2512
+ fields: [
2513
+ {
2514
+ name: "provider",
2515
+ type: "select",
2516
+ label: "Storage Provider",
2517
+ defaultValue: "local",
2518
+ options: [
2519
+ { label: "Local Server", value: "local" },
2520
+ { label: "S3 Compatible (AWS, Backblaze, Wasabi, etc.)", value: "aws" },
2521
+ { label: "Cloudflare R2", value: "r2" },
2522
+ { label: "Cloudinary", value: "cloudinary" },
2523
+ { label: "FTP", value: "ftp" }
2524
+ ]
2525
+ },
2526
+ {
2527
+ name: "local",
2528
+ type: "group",
2529
+ label: "Local Storage",
2530
+ admin: {
2531
+ condition: (data) => data.provider === "local"
2532
+ },
2533
+ fields: [
2534
+ {
2535
+ name: "uploadDir",
2536
+ type: "text",
2537
+ label: "Upload Directory",
2538
+ defaultValue: "./public/uploads"
2539
+ },
2540
+ {
2541
+ name: "baseUrl",
2542
+ type: "text",
2543
+ label: "Base URL",
2544
+ defaultValue: "/uploads"
2545
+ }
2546
+ ]
2547
+ },
2548
+ {
2549
+ name: "aws",
2550
+ type: "group",
2551
+ label: "AWS S3 Settings",
2552
+ admin: {
2553
+ condition: (data) => data.provider === "aws"
2554
+ },
2555
+ fields: [
2556
+ {
2557
+ name: "bucket",
2558
+ type: "text",
2559
+ label: "Bucket Name",
2560
+ required: true
2561
+ },
2562
+ {
2563
+ name: "region",
2564
+ type: "text",
2565
+ label: "Region",
2566
+ defaultValue: "us-east-1",
2567
+ admin: {
2568
+ placeholder: "us-east-1"
2569
+ }
2570
+ },
2571
+ {
2572
+ name: "accessKeyId",
2573
+ type: "text",
2574
+ label: "Access Key ID",
2575
+ required: true
2576
+ },
2577
+ {
2578
+ name: "secretAccessKey",
2579
+ type: "password",
2580
+ label: "Secret Access Key",
2581
+ required: true
2582
+ },
2583
+ {
2584
+ name: "cdnUrl",
2585
+ type: "text",
2586
+ label: "CDN URL",
2587
+ admin: {
2588
+ placeholder: "https://cdn.example.com"
2589
+ }
2590
+ },
2591
+ {
2592
+ name: "prefix",
2593
+ type: "text",
2594
+ label: "Path Prefix",
2595
+ admin: {
2596
+ placeholder: "uploads"
2597
+ }
2598
+ }
2599
+ ]
2600
+ },
2601
+ {
2602
+ name: "r2",
2603
+ type: "group",
2604
+ label: "Cloudflare R2 Settings",
2605
+ admin: {
2606
+ condition: (data) => data.provider === "r2"
2607
+ },
2608
+ fields: [
2609
+ {
2610
+ name: "accountId",
2611
+ type: "text",
2612
+ label: "Account ID",
2613
+ required: true,
2614
+ admin: {
2615
+ placeholder: "Your Cloudflare Account ID"
2616
+ }
2617
+ },
2618
+ {
2619
+ name: "accessKeyId",
2620
+ type: "text",
2621
+ label: "Access Key ID",
2622
+ required: true
2623
+ },
2624
+ {
2625
+ name: "secretAccessKey",
2626
+ type: "password",
2627
+ label: "Secret Access Key",
2628
+ required: true
2629
+ },
2630
+ {
2631
+ name: "bucket",
2632
+ type: "text",
2633
+ label: "Bucket Name",
2634
+ required: true
2635
+ },
2636
+ {
2637
+ name: "publicDevUrl",
2638
+ type: "text",
2639
+ label: "Public Dev URL ID",
2640
+ admin: {
2641
+ placeholder: "pub-xxxxxxxxxxxxxxxx",
2642
+ description: "Enter ONLY the ID (e.g., pub-b8d8c4cc8bcf4d868ddd95efc1b305aa). Do NOT include https:// or the full URL. Found in R2 Dashboard \u2192 Public Dev URL."
2643
+ }
2644
+ },
2645
+ {
2646
+ name: "cdnUrl",
2647
+ type: "text",
2648
+ label: "Custom CDN URL",
2649
+ admin: {
2650
+ placeholder: "https://assets.example.com (optional)"
2651
+ }
2652
+ },
2653
+ {
2654
+ name: "prefix",
2655
+ type: "text",
2656
+ label: "Path Prefix",
2657
+ admin: {
2658
+ placeholder: "uploads (optional)",
2659
+ description: "Optional prefix for all object keys. Do not use '/' as prefix."
2660
+ }
2661
+ }
2662
+ ]
2663
+ },
2664
+ {
2665
+ name: "cloudinary",
2666
+ type: "group",
2667
+ label: "Cloudinary Settings",
2668
+ admin: {
2669
+ condition: (data) => data.provider === "cloudinary"
2670
+ },
2671
+ fields: [
2672
+ {
2673
+ name: "cloudName",
2674
+ type: "text",
2675
+ label: "Cloud Name",
2676
+ required: true
2677
+ },
2678
+ {
2679
+ name: "apiKey",
2680
+ type: "text",
2681
+ label: "API Key",
2682
+ required: true
2683
+ },
2684
+ {
2685
+ name: "apiSecret",
2686
+ type: "password",
2687
+ label: "API Secret",
2688
+ required: true
2689
+ },
2690
+ {
2691
+ name: "folder",
2692
+ type: "text",
2693
+ label: "Folder",
2694
+ admin: {
2695
+ placeholder: "Optional folder path"
2696
+ }
2697
+ },
2698
+ {
2699
+ name: "uploadPreset",
2700
+ type: "text",
2701
+ label: "Upload Preset (optional)",
2702
+ admin: {
2703
+ placeholder: "Leave empty for signed uploads",
2704
+ description: "If not set, uploads will be signed with API Secret"
2705
+ }
2706
+ }
2707
+ ]
2708
+ },
2709
+ {
2710
+ name: "ftp",
2711
+ type: "group",
2712
+ label: "FTP Settings",
2713
+ admin: {
2714
+ condition: (data) => data.provider === "ftp"
2715
+ },
2716
+ fields: [
2717
+ {
2718
+ name: "host",
2719
+ type: "text",
2720
+ label: "Host",
2721
+ required: true,
2722
+ admin: {
2723
+ placeholder: "ftp.example.com"
2724
+ }
2725
+ },
2726
+ {
2727
+ name: "port",
2728
+ type: "number",
2729
+ label: "Port",
2730
+ defaultValue: 21,
2731
+ admin: {
2732
+ placeholder: "21 for FTP"
2733
+ }
2734
+ },
2735
+ {
2736
+ name: "user",
2737
+ type: "text",
2738
+ label: "Username",
2739
+ required: true
2740
+ },
2741
+ {
2742
+ name: "password",
2743
+ type: "password",
2744
+ label: "Password",
2745
+ required: true
2746
+ },
2747
+ {
2748
+ name: "secure",
2749
+ type: "checkbox",
2750
+ label: "Use TLS/SSL",
2751
+ defaultValue: false,
2752
+ admin: {
2753
+ description: "Enable TLS/SSL for secure connections (FTP only)"
2754
+ }
2755
+ },
2756
+ {
2757
+ name: "baseUrl",
2758
+ type: "text",
2759
+ label: "Base URL",
2760
+ required: true,
2761
+ admin: {
2762
+ placeholder: "https://files.example.com"
2763
+ }
2764
+ },
2765
+ {
2766
+ name: "prefix",
2767
+ type: "text",
2768
+ label: "Path Prefix",
2769
+ admin: {
2770
+ placeholder: "uploads"
2771
+ }
2772
+ }
2773
+ ]
2774
+ },
2775
+ {
2776
+ name: "limits",
2777
+ type: "group",
2778
+ label: "Upload Limits",
2779
+ fields: [
2780
+ {
2781
+ name: "maxFileSize",
2782
+ type: "number",
2783
+ label: "Max File Size (bytes)",
2784
+ defaultValue: 10485760
2785
+ },
2786
+ {
2787
+ name: "allowedTypes",
2788
+ type: "json",
2789
+ label: "Allowed MIME Types",
2790
+ defaultValue: ["image/*", "video/*", "audio/*", "application/pdf"]
2791
+ },
2792
+ {
2793
+ name: "maxFilesPerUpload",
2794
+ type: "number",
2795
+ label: "Max Files per Upload",
2796
+ defaultValue: 10
2797
+ }
2798
+ ]
2799
+ }
2800
+ ]
2801
+ };
2802
+
2803
+ // src/templates/settings/access.ts
2804
+ var accessSettingsGlobal = {
2805
+ slug: "access-settings",
2806
+ label: "Access Control",
2807
+ admin: {
2808
+ group: "settings"
2809
+ },
2810
+ access: {
2811
+ read: () => true,
2812
+ update: () => true
2813
+ },
2814
+ fields: [
2815
+ {
2816
+ name: "enablePublicAccess",
2817
+ type: "checkbox",
2818
+ label: "Enable Public Access",
2819
+ defaultValue: true,
2820
+ admin: {}
2821
+ },
2822
+ {
2823
+ name: "defaultCollectionAccess",
2824
+ type: "select",
2825
+ label: "Default Collection Access",
2826
+ defaultValue: "read",
2827
+ options: [
2828
+ { label: "Read Only", value: "read" },
2829
+ { label: "Read & Create", value: "create" },
2830
+ { label: "Read & Create & Update", value: "update" },
2831
+ { label: "Full Access", value: "admin" },
2832
+ { label: "No Access", value: "none" }
2833
+ ],
2834
+ admin: {}
2835
+ },
2836
+ {
2837
+ name: "apiAccess",
2838
+ type: "group",
2839
+ label: "API Access",
2840
+ fields: [
2841
+ {
2842
+ name: "restEnabled",
2843
+ type: "checkbox",
2844
+ label: "Enable REST API",
2845
+ defaultValue: true
2846
+ },
2847
+ {
2848
+ name: "graphqlEnabled",
2849
+ type: "checkbox",
2850
+ label: "Enable GraphQL",
2851
+ defaultValue: false
2852
+ },
2853
+ {
2854
+ name: "trpcEnabled",
2855
+ type: "checkbox",
2856
+ label: "Enable tRPC",
2857
+ defaultValue: false
2858
+ },
2859
+ {
2860
+ name: "wsEnabled",
2861
+ type: "checkbox",
2862
+ label: "Enable WebSocket",
2863
+ defaultValue: false
2864
+ },
2865
+ {
2866
+ name: "requireAuth",
2867
+ type: "checkbox",
2868
+ label: "Require Authentication",
2869
+ defaultValue: false
2870
+ },
2871
+ {
2872
+ name: "cors",
2873
+ type: "group",
2874
+ label: "CORS Settings",
2875
+ admin: {
2876
+ condition: (data) => data.apiAccess?.restEnabled === true || data.apiAccess?.graphqlEnabled === true
2877
+ },
2878
+ fields: [
2879
+ {
2880
+ name: "allowedOrigins",
2881
+ type: "textarea",
2882
+ label: "Allowed Origins (one per line)",
2883
+ admin: {
2884
+ placeholder: "https://example.com\nhttps://app.example.com"
2885
+ }
2886
+ }
2887
+ ]
2888
+ }
2889
+ ]
2890
+ },
2891
+ {
2892
+ name: "rateLimiting",
2893
+ type: "group",
2894
+ label: "Rate Limiting Configuration",
2895
+ admin: {
2896
+ condition: (data) => data.rateLimiting?.enabled === true
2897
+ },
2898
+ fields: [
2899
+ {
2900
+ name: "enabled",
2901
+ type: "checkbox",
2902
+ label: "Enable Global Rate Limiting",
2903
+ defaultValue: true
2904
+ },
2905
+ {
2906
+ name: "maxRequests",
2907
+ type: "number",
2908
+ label: "Max Requests",
2909
+ defaultValue: 100,
2910
+ admin: {
2911
+ condition: (data, siblingData) => siblingData.enabled === true
2912
+ }
2913
+ },
2914
+ {
2915
+ name: "windowMs",
2916
+ type: "number",
2917
+ label: "Window (ms)",
2918
+ defaultValue: 6e4,
2919
+ admin: {
2920
+ condition: (data, siblingData) => siblingData.enabled === true
2921
+ }
2922
+ }
2923
+ ]
2924
+ }
2925
+ ]
2926
+ };
2927
+
2928
+ // src/templates/settings/store.ts
2929
+ var countryOptions = [
2930
+ { label: "United States", value: "US" },
2931
+ { label: "United Kingdom", value: "GB" },
2932
+ { label: "Canada", value: "CA" },
2933
+ { label: "Australia", value: "AU" },
2934
+ { label: "Germany", value: "DE" },
2935
+ { label: "France", value: "FR" },
2936
+ { label: "Netherlands", value: "NL" },
2937
+ { label: "Belgium", value: "BE" },
2938
+ { label: "Spain", value: "ES" },
2939
+ { label: "Italy", value: "IT" },
2940
+ { label: "Portugal", value: "PT" },
2941
+ { label: "Sweden", value: "SE" },
2942
+ { label: "Norway", value: "NO" },
2943
+ { label: "Denmark", value: "DK" },
2944
+ { label: "Finland", value: "FI" },
2945
+ { label: "Austria", value: "AT" },
2946
+ { label: "Switzerland", value: "CH" },
2947
+ { label: "Japan", value: "JP" },
2948
+ { label: "South Korea", value: "KR" },
2949
+ { label: "China", value: "CN" },
2950
+ { label: "India", value: "IN" },
2951
+ { label: "Brazil", value: "BR" },
2952
+ { label: "Mexico", value: "MX" }
2953
+ ];
2954
+ var storeSettingsGlobal = {
2955
+ slug: "store-settings",
2956
+ label: "Store Settings",
2957
+ admin: {
2958
+ group: "settings"
2959
+ },
2960
+ access: {
2961
+ read: () => true,
2962
+ update: () => true
2963
+ },
2964
+ fields: [
2965
+ {
2966
+ name: "storeName",
2967
+ type: "text",
2968
+ label: "Store Name",
2969
+ required: true
2970
+ },
2971
+ {
2972
+ name: "storeEmail",
2973
+ type: "email",
2974
+ label: "Contact Email",
2975
+ required: true
2976
+ },
2977
+ {
2978
+ name: "storePhone",
2979
+ type: "text",
2980
+ label: "Phone Number"
2981
+ },
2982
+ {
2983
+ name: "address",
2984
+ type: "group",
2985
+ label: "Store Address",
2986
+ fields: [
2987
+ {
2988
+ name: "street",
2989
+ type: "text",
2990
+ label: "Street Address"
2991
+ },
2992
+ {
2993
+ name: "city",
2994
+ type: "text",
2995
+ label: "City"
2996
+ },
2997
+ {
2998
+ name: "state",
2999
+ type: "text",
3000
+ label: "State/Province"
3001
+ },
3002
+ {
3003
+ name: "postalCode",
3004
+ type: "text",
3005
+ label: "Postal Code"
3006
+ },
3007
+ {
3008
+ name: "country",
3009
+ type: "select",
3010
+ label: "Country",
3011
+ options: countryOptions
3012
+ }
3013
+ ]
3014
+ },
3015
+ {
3016
+ name: "currency",
3017
+ type: "group",
3018
+ label: "Currency",
3019
+ fields: [
3020
+ {
3021
+ name: "code",
3022
+ type: "select",
3023
+ label: "Currency Code",
3024
+ defaultValue: "USD",
3025
+ options: [
3026
+ { label: "USD - US Dollar", value: "USD" },
3027
+ { label: "EUR - Euro", value: "EUR" },
3028
+ { label: "GBP - British Pound", value: "GBP" },
3029
+ { label: "CAD - Canadian Dollar", value: "CAD" },
3030
+ { label: "AUD - Australian Dollar", value: "AUD" },
3031
+ { label: "JPY - Japanese Yen", value: "JPY" },
3032
+ { label: "CNY - Chinese Yuan", value: "CNY" },
3033
+ { label: "INR - Indian Rupee", value: "INR" },
3034
+ { label: "BRL - Brazilian Real", value: "BRL" },
3035
+ { label: "MXN - Mexican Peso", value: "MXN" }
3036
+ ]
3037
+ },
3038
+ {
3039
+ name: "symbol",
3040
+ type: "text",
3041
+ label: "Symbol",
3042
+ defaultValue: "$"
3043
+ },
3044
+ {
3045
+ name: "position",
3046
+ type: "select",
3047
+ label: "Symbol Position",
3048
+ defaultValue: "before",
3049
+ options: [
3050
+ { label: "Before amount", value: "before" },
3051
+ { label: "After amount", value: "after" }
3052
+ ]
3053
+ },
3054
+ {
3055
+ name: "decimals",
3056
+ type: "number",
3057
+ label: "Decimal Places",
3058
+ defaultValue: 2
3059
+ }
3060
+ ]
3061
+ },
3062
+ {
3063
+ name: "tax",
3064
+ type: "group",
3065
+ label: "Tax Logistics",
3066
+ admin: {
3067
+ condition: (data) => data.tax?.enabled === true
3068
+ },
3069
+ fields: [
3070
+ {
3071
+ name: "enabled",
3072
+ type: "checkbox",
3073
+ label: "Enable Tax",
3074
+ defaultValue: true
3075
+ },
3076
+ {
3077
+ name: "rate",
3078
+ type: "number",
3079
+ label: "Tax Rate (%)",
3080
+ admin: {
3081
+ placeholder: "10",
3082
+ condition: (data, siblingData) => siblingData.enabled === true
3083
+ }
3084
+ },
3085
+ {
3086
+ name: "includedInPrice",
3087
+ type: "checkbox",
3088
+ label: "Tax Included in Prices",
3089
+ admin: {
3090
+ condition: (data, siblingData) => siblingData.enabled === true
3091
+ }
3092
+ },
3093
+ {
3094
+ name: "taxId",
3095
+ type: "text",
3096
+ label: "Tax ID / VAT Number",
3097
+ admin: {
3098
+ condition: (data, siblingData) => siblingData.enabled === true
3099
+ }
3100
+ }
3101
+ ]
3102
+ },
3103
+ {
3104
+ name: "shipping",
3105
+ type: "group",
3106
+ label: "Shipping Logic",
3107
+ admin: {
3108
+ condition: (data) => data.shipping?.enableLocalPickup === true || data.shipping?.flatRate > 0
3109
+ },
3110
+ fields: [
3111
+ {
3112
+ name: "enableLocalPickup",
3113
+ type: "checkbox",
3114
+ label: "Enable Local Pickup",
3115
+ defaultValue: true
3116
+ },
3117
+ {
3118
+ name: "flatRate",
3119
+ type: "number",
3120
+ label: "Flat Rate Shipping Fee",
3121
+ admin: {}
3122
+ },
3123
+ {
3124
+ name: "freeShippingThreshold",
3125
+ type: "number",
3126
+ label: "Free Shipping Minimum",
3127
+ admin: {
3128
+ condition: (data, siblingData) => siblingData.flatRate > 0
3129
+ }
3130
+ }
3131
+ ]
3132
+ },
3133
+ {
3134
+ name: "orders",
3135
+ type: "group",
3136
+ label: "Orders",
3137
+ fields: [
3138
+ {
3139
+ name: "orderNumberPrefix",
3140
+ type: "text",
3141
+ label: "Order Number Prefix",
3142
+ defaultValue: "ORD",
3143
+ admin: {}
3144
+ },
3145
+ {
3146
+ name: "allowGuestCheckout",
3147
+ type: "checkbox",
3148
+ label: "Allow Guest Checkout",
3149
+ defaultValue: true
3150
+ },
3151
+ {
3152
+ name: "requirePhone",
3153
+ type: "checkbox",
3154
+ label: "Require Phone Number",
3155
+ defaultValue: true
3156
+ }
3157
+ ]
3158
+ }
3159
+ ]
3160
+ };
3161
+
3162
+ // src/templates/settings/payments.ts
3163
+ var paymentSettingsGlobal = {
3164
+ slug: "payment-settings",
3165
+ label: "Payment Settings",
3166
+ admin: {
3167
+ group: "settings"
3168
+ },
3169
+ access: {
3170
+ read: () => true,
3171
+ update: () => true
3172
+ },
3173
+ fields: [
3174
+ {
3175
+ name: "testMode",
3176
+ type: "checkbox",
3177
+ label: "Test Mode",
3178
+ defaultValue: true,
3179
+ admin: {}
3180
+ },
3181
+ {
3182
+ name: "provider",
3183
+ type: "select",
3184
+ label: "Primary Payment Provider",
3185
+ defaultValue: "stripe",
3186
+ options: [
3187
+ { label: "Stripe", value: "stripe" },
3188
+ { label: "PayPal", value: "paypal" },
3189
+ { label: "Square", value: "square" },
3190
+ { label: "Manual Methods Only", value: "manual" }
3191
+ ]
3192
+ },
3193
+ {
3194
+ name: "stripe",
3195
+ type: "group",
3196
+ label: "Stripe",
3197
+ admin: {
3198
+ condition: (data) => data.provider === "stripe"
3199
+ },
3200
+ fields: [
3201
+ {
3202
+ name: "enabled",
3203
+ type: "checkbox",
3204
+ label: "Enable Stripe",
3205
+ defaultValue: false
3206
+ },
3207
+ {
3208
+ name: "publishableKey",
3209
+ type: "text",
3210
+ label: "Publishable Key",
3211
+ admin: {
3212
+ placeholder: "pk_live_..."
3213
+ }
3214
+ },
3215
+ {
3216
+ name: "secretKey",
3217
+ type: "password",
3218
+ label: "Secret Key"
3219
+ },
3220
+ {
3221
+ name: "webhookSecret",
3222
+ type: "password",
3223
+ label: "Webhook Secret",
3224
+ admin: {}
3225
+ }
3226
+ ]
3227
+ },
3228
+ {
3229
+ name: "paypal",
3230
+ type: "group",
3231
+ label: "PayPal",
3232
+ admin: {
3233
+ condition: (data) => data.provider === "paypal"
3234
+ },
3235
+ fields: [
3236
+ {
3237
+ name: "enabled",
3238
+ type: "checkbox",
3239
+ label: "Enable PayPal",
3240
+ defaultValue: false
3241
+ },
3242
+ {
3243
+ name: "clientId",
3244
+ type: "text",
3245
+ label: "Client ID"
3246
+ },
3247
+ {
3248
+ name: "clientSecret",
3249
+ type: "password",
3250
+ label: "Client Secret"
3251
+ },
3252
+ {
3253
+ name: "mode",
3254
+ type: "select",
3255
+ label: "Mode",
3256
+ defaultValue: "sandbox",
3257
+ options: [
3258
+ { label: "Sandbox (Test)", value: "sandbox" },
3259
+ { label: "Live", value: "live" }
3260
+ ]
3261
+ }
3262
+ ]
3263
+ },
3264
+ {
3265
+ name: "square",
3266
+ type: "group",
3267
+ label: "Square",
3268
+ admin: {
3269
+ condition: (data) => data.provider === "square"
3270
+ },
3271
+ fields: [
3272
+ {
3273
+ name: "enabled",
3274
+ type: "checkbox",
3275
+ label: "Enable Square",
3276
+ defaultValue: false
3277
+ },
3278
+ {
3279
+ name: "applicationId",
3280
+ type: "text",
3281
+ label: "Application ID"
3282
+ },
3283
+ {
3284
+ name: "accessToken",
3285
+ type: "password",
3286
+ label: "Access Token"
3287
+ },
3288
+ {
3289
+ name: "locationId",
3290
+ type: "text",
3291
+ label: "Location ID"
3292
+ }
3293
+ ]
3294
+ },
3295
+ {
3296
+ name: "methods",
3297
+ type: "group",
3298
+ label: "Manual Payment Methods",
3299
+ fields: [
3300
+ {
3301
+ name: "cod",
3302
+ type: "checkbox",
3303
+ label: "Cash on Delivery",
3304
+ defaultValue: true
3305
+ },
3306
+ {
3307
+ name: "bankTransfer",
3308
+ type: "checkbox",
3309
+ label: "Bank Transfer",
3310
+ defaultValue: true
3311
+ },
3312
+ {
3313
+ name: "cash",
3314
+ type: "checkbox",
3315
+ label: "Cash (Local Pickup)",
3316
+ defaultValue: true
3317
+ },
3318
+ {
3319
+ name: "check",
3320
+ type: "checkbox",
3321
+ label: "Check",
3322
+ defaultValue: false
3323
+ }
3324
+ ]
3325
+ },
3326
+ {
3327
+ name: "bankTransfer",
3328
+ type: "group",
3329
+ label: "Bank Transfer Details",
3330
+ admin: {},
3331
+ fields: [
3332
+ {
3333
+ name: "bankName",
3334
+ type: "text",
3335
+ label: "Bank Name"
3336
+ },
3337
+ {
3338
+ name: "accountName",
3339
+ type: "text",
3340
+ label: "Account Name"
3341
+ },
3342
+ {
3343
+ name: "accountNumber",
3344
+ type: "text",
3345
+ label: "Account Number"
3346
+ },
3347
+ {
3348
+ name: "routingNumber",
3349
+ type: "text",
3350
+ label: "Routing/Sort Code"
3351
+ },
3352
+ {
3353
+ name: "iban",
3354
+ type: "text",
3355
+ label: "IBAN"
3356
+ },
3357
+ {
3358
+ name: "swift",
3359
+ type: "text",
3360
+ label: "SWIFT/BIC"
3361
+ }
3362
+ ]
3363
+ }
3364
+ ]
3365
+ };
3366
+
3367
+ // src/templates/settings/index.ts
3368
+ var allSettingsGlobals = [
3369
+ siteSettingsGlobal,
3370
+ seoSettingsGlobal,
3371
+ socialSettingsGlobal,
3372
+ emailSettingsGlobal,
3373
+ storageSettingsGlobal,
3374
+ accessSettingsGlobal,
3375
+ storeSettingsGlobal,
3376
+ paymentSettingsGlobal
3377
+ ];
3378
+ var coreSettingsGlobals = [
3379
+ siteSettingsGlobal,
3380
+ seoSettingsGlobal,
3381
+ socialSettingsGlobal,
3382
+ emailSettingsGlobal,
3383
+ storageSettingsGlobal,
3384
+ accessSettingsGlobal
3385
+ ];
3386
+ var ecommerceSettingsGlobals = [
3387
+ storeSettingsGlobal,
3388
+ paymentSettingsGlobal
3389
+ ];
3390
+ var settingsBySlug = {
3391
+ [siteSettingsGlobal.slug]: siteSettingsGlobal,
3392
+ [seoSettingsGlobal.slug]: seoSettingsGlobal,
3393
+ [socialSettingsGlobal.slug]: socialSettingsGlobal,
3394
+ [emailSettingsGlobal.slug]: emailSettingsGlobal,
3395
+ [storageSettingsGlobal.slug]: storageSettingsGlobal,
3396
+ [accessSettingsGlobal.slug]: accessSettingsGlobal,
3397
+ [storeSettingsGlobal.slug]: storeSettingsGlobal,
3398
+ [paymentSettingsGlobal.slug]: paymentSettingsGlobal
3399
+ };
3400
+ function getSettingsForTemplate(template) {
3401
+ switch (template) {
3402
+ case "minimal":
3403
+ case "blog":
3404
+ return coreSettingsGlobals;
3405
+ case "ecommerce":
3406
+ return [...coreSettingsGlobals, ...ecommerceSettingsGlobals];
3407
+ case "kitchen-sink":
3408
+ return allSettingsGlobals;
3409
+ default:
3410
+ return coreSettingsGlobals;
3411
+ }
3412
+ }
3413
+
3414
+ // src/templates/index.ts
3415
+ function createTemplateConfig(options) {
3416
+ const collections = options.collections ? [...options.collections] : [];
3417
+ const globals = options.globals ? [...options.globals] : [];
3418
+ if (options.includeMedia !== false) {
3419
+ collections.push(...mediaCollections);
3420
+ }
3421
+ const templateSettings = options.template ? getSettingsForTemplate(options.template) : coreSettingsGlobals;
3422
+ if (options.includeSettings) {
3423
+ if (options.includeSettings === "all") {
3424
+ globals.push(...allSettingsGlobals);
3425
+ } else if (options.includeSettings === "core") {
3426
+ globals.push(...coreSettingsGlobals);
3427
+ } else if (options.includeSettings === "ecommerce") {
3428
+ globals.push(...ecommerceSettingsGlobals);
3429
+ } else if (Array.isArray(options.includeSettings)) {
3430
+ for (const setting of options.includeSettings) {
3431
+ const global = settingsBySlug[setting];
3432
+ if (global) {
3433
+ globals.push(global);
3434
+ }
3435
+ }
3436
+ }
3437
+ } else if (!options.globals || options.globals.length === 0) {
3438
+ globals.push(...templateSettings);
3439
+ }
3440
+ if (options.excludeSettings && options.excludeSettings.length > 0) {
3441
+ const excludeSet = new Set(options.excludeSettings);
3442
+ const filtered = globals.filter(
3443
+ (g) => !excludeSet.has(g.slug) && !excludeSet.has(g.label?.toLowerCase().replace(/\s+/g, "-") || "")
3444
+ );
3445
+ globals.length = 0;
3446
+ globals.push(...filtered);
3447
+ }
3448
+ return {
3449
+ collections: collections.length > 0 ? collections : void 0,
3450
+ globals: globals.length > 0 ? globals : void 0
3451
+ };
3452
+ }
3453
+
3454
+ export { accessSettingsGlobal, allSettingsGlobals, blogCollections, blogGlobals, coreSettingsGlobals, createTemplateConfig, ecommerceCollections, ecommerceGlobals, ecommerceSettingsGlobals, emailSettingsGlobal, getSettingsForTemplate, kitchenSinkCollections, mediaCollection, mediaCollections, minimalCollections, paymentSettingsGlobal, seoSettingsGlobal, settingsBySlug, siteSettingsGlobal, socialSettingsGlobal, storageSettingsGlobal, storeSettingsGlobal };
3455
+ //# sourceMappingURL=chunk-RONAX6UU.js.map
3456
+ //# sourceMappingURL=chunk-RONAX6UU.js.map