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