@kyro-cms/core 0.1.1 → 0.1.2

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 (74) hide show
  1. package/README.md +196 -109
  2. package/dist/bootstrap-2WJK6PG7.cjs +29 -0
  3. package/dist/bootstrap-2WJK6PG7.cjs.map +1 -0
  4. package/dist/bootstrap-Q2TWUQF3.js +4 -0
  5. package/dist/bootstrap-Q2TWUQF3.js.map +1 -0
  6. package/dist/chunk-3QX6KG2S.js +2125 -0
  7. package/dist/chunk-3QX6KG2S.js.map +1 -0
  8. package/dist/chunk-5AOILNGY.cjs +212 -0
  9. package/dist/chunk-5AOILNGY.cjs.map +1 -0
  10. package/dist/{chunk-DKSMFC3L.js → chunk-EINVJPFM.js} +2 -2
  11. package/dist/{chunk-DKSMFC3L.js.map → chunk-EINVJPFM.js.map} +1 -1
  12. package/dist/chunk-F5B64H5S.cjs +2149 -0
  13. package/dist/chunk-F5B64H5S.cjs.map +1 -0
  14. package/dist/chunk-I4BORBXT.cjs +914 -0
  15. package/dist/chunk-I4BORBXT.cjs.map +1 -0
  16. package/dist/chunk-KA3UOIFC.js +206 -0
  17. package/dist/chunk-KA3UOIFC.js.map +1 -0
  18. package/dist/chunk-KWTKEBHM.cjs +176 -0
  19. package/dist/chunk-KWTKEBHM.cjs.map +1 -0
  20. package/dist/chunk-M4JFHQ5J.js +170 -0
  21. package/dist/chunk-M4JFHQ5J.js.map +1 -0
  22. package/dist/chunk-PZ5AY32C.js +9 -0
  23. package/dist/chunk-PZ5AY32C.js.map +1 -0
  24. package/dist/chunk-Q7SFCCGT.cjs +11 -0
  25. package/dist/chunk-Q7SFCCGT.cjs.map +1 -0
  26. package/dist/chunk-U4CHJTWX.cjs +94 -0
  27. package/dist/chunk-U4CHJTWX.cjs.map +1 -0
  28. package/dist/{chunk-3Q3FS5J4.cjs → chunk-V3B25QOK.cjs} +2 -2
  29. package/dist/{chunk-3Q3FS5J4.cjs.map → chunk-V3B25QOK.cjs.map} +1 -1
  30. package/dist/chunk-V67YXRBT.js +899 -0
  31. package/dist/chunk-V67YXRBT.js.map +1 -0
  32. package/dist/chunk-XLMVCGXA.js +86 -0
  33. package/dist/chunk-XLMVCGXA.js.map +1 -0
  34. package/dist/cli/index.cjs +106 -14
  35. package/dist/cli/index.cjs.map +1 -1
  36. package/dist/cli/index.js +106 -14
  37. package/dist/cli/index.js.map +1 -1
  38. package/dist/database-37KXWUER.js +5 -0
  39. package/dist/database-37KXWUER.js.map +1 -0
  40. package/dist/database-LJKD3HE4.cjs +22 -0
  41. package/dist/database-LJKD3HE4.cjs.map +1 -0
  42. package/dist/drizzle/index.cjs +25 -5
  43. package/dist/drizzle/index.d.cts +5 -49
  44. package/dist/drizzle/index.d.ts +5 -49
  45. package/dist/drizzle/index.js +5 -1
  46. package/dist/graphql/index.cjs +1 -0
  47. package/dist/graphql/index.js +1 -0
  48. package/dist/index-BVFlb7uU.d.ts +192 -0
  49. package/dist/index-CzkEHKqu.d.cts +192 -0
  50. package/dist/index.cjs +1203 -23
  51. package/dist/index.cjs.map +1 -1
  52. package/dist/index.d.cts +382 -68
  53. package/dist/index.d.ts +382 -68
  54. package/dist/index.js +1110 -20
  55. package/dist/index.js.map +1 -1
  56. package/dist/mongodb/index.cjs +1 -0
  57. package/dist/mongodb/index.js +1 -0
  58. package/dist/postgres-auth-adapter-CYZAVPPP.cjs +14 -0
  59. package/dist/postgres-auth-adapter-CYZAVPPP.cjs.map +1 -0
  60. package/dist/postgres-auth-adapter-LTDUGBMB.js +5 -0
  61. package/dist/postgres-auth-adapter-LTDUGBMB.js.map +1 -0
  62. package/dist/rest/index.cjs +1 -0
  63. package/dist/rest/index.js +1 -0
  64. package/dist/templates/index.cjs +94 -536
  65. package/dist/templates/index.cjs.map +1 -1
  66. package/dist/templates/index.d.cts +45 -1
  67. package/dist/templates/index.d.ts +45 -1
  68. package/dist/templates/index.js +2 -535
  69. package/dist/templates/index.js.map +1 -1
  70. package/dist/trpc/index.cjs +1 -0
  71. package/dist/trpc/index.js +1 -0
  72. package/dist/ws/index.cjs +1 -0
  73. package/dist/ws/index.js +1 -0
  74. package/package.json +23 -8
@@ -0,0 +1,2125 @@
1
+ // src/templates/minimal.ts
2
+ var minimalCollections = {
3
+ posts: {
4
+ slug: "posts",
5
+ label: "Posts",
6
+ labelPlural: "Posts",
7
+ singularLabel: "Post",
8
+ admin: {
9
+ useAsTitle: "title",
10
+ defaultColumns: ["title", "status", "createdAt"],
11
+ description: "Blog posts and articles"
12
+ },
13
+ fields: [
14
+ {
15
+ name: "title",
16
+ type: "text",
17
+ required: true,
18
+ label: "Title",
19
+ admin: { description: "The post title" }
20
+ },
21
+ {
22
+ name: "slug",
23
+ type: "text",
24
+ required: true,
25
+ label: "Slug",
26
+ admin: { description: "URL-friendly identifier" }
27
+ },
28
+ {
29
+ name: "content",
30
+ type: "richtext",
31
+ label: "Content"
32
+ },
33
+ {
34
+ name: "status",
35
+ type: "select",
36
+ label: "Status",
37
+ options: [
38
+ { label: "Draft", value: "draft" },
39
+ { label: "Published", value: "published" }
40
+ ],
41
+ defaultValue: "draft",
42
+ admin: {
43
+ description: "Publication status"
44
+ }
45
+ },
46
+ {
47
+ name: "publishedAt",
48
+ type: "date",
49
+ label: "Published At",
50
+ admin: { description: "When to publish this post" }
51
+ }
52
+ ],
53
+ timestamps: true
54
+ }
55
+ };
56
+
57
+ // src/templates/blog.ts
58
+ var blogCollections = {
59
+ posts: {
60
+ slug: "posts",
61
+ label: "Posts",
62
+ labelPlural: "Posts",
63
+ singularLabel: "Post",
64
+ admin: {
65
+ useAsTitle: "title",
66
+ defaultColumns: ["title", "category", "status", "createdAt"],
67
+ description: "Blog posts and articles"
68
+ },
69
+ fields: [
70
+ {
71
+ name: "title",
72
+ type: "text",
73
+ required: true,
74
+ label: "Title",
75
+ admin: {
76
+ description: "The main title of the post as it will appear publicly."
77
+ }
78
+ },
79
+ {
80
+ name: "slug",
81
+ type: "text",
82
+ required: true,
83
+ label: "Slug",
84
+ admin: { description: "The URL-friendly identifier for the post." }
85
+ },
86
+ {
87
+ name: "excerpt",
88
+ type: "textarea",
89
+ label: "Excerpt",
90
+ admin: {
91
+ description: "A brief summary of the post used in listings and SEO meta tags."
92
+ }
93
+ },
94
+ {
95
+ name: "content",
96
+ type: "richtext",
97
+ label: "Content",
98
+ admin: {
99
+ description: "The comprehensive body content of the blog post."
100
+ }
101
+ },
102
+ {
103
+ name: "featuredImage",
104
+ type: "upload",
105
+ label: "Featured Image",
106
+ relationTo: "media",
107
+ admin: {
108
+ description: "The primary visual used to represent this post."
109
+ }
110
+ },
111
+ {
112
+ name: "category",
113
+ type: "relationship",
114
+ label: "Category",
115
+ relationTo: "categories",
116
+ admin: {
117
+ description: "Select the primary category this post belongs to."
118
+ }
119
+ },
120
+ {
121
+ name: "tags",
122
+ type: "array",
123
+ label: "Tags",
124
+ fields: [{ name: "tag", type: "text" }]
125
+ },
126
+ {
127
+ name: "status",
128
+ type: "select",
129
+ label: "Status",
130
+ options: [
131
+ { label: "Draft", value: "draft" },
132
+ { label: "Published", value: "published" }
133
+ ],
134
+ defaultValue: "draft"
135
+ },
136
+ {
137
+ name: "publishedAt",
138
+ type: "date",
139
+ label: "Published At"
140
+ }
141
+ ],
142
+ timestamps: true
143
+ },
144
+ categories: {
145
+ slug: "categories",
146
+ label: "Categories",
147
+ labelPlural: "Categories",
148
+ singularLabel: "Category",
149
+ admin: {
150
+ useAsTitle: "name",
151
+ defaultColumns: ["name", "slug"],
152
+ description: "Post categories"
153
+ },
154
+ fields: [
155
+ {
156
+ name: "name",
157
+ type: "text",
158
+ required: true,
159
+ label: "Name"
160
+ },
161
+ {
162
+ name: "slug",
163
+ type: "text",
164
+ required: true,
165
+ label: "Slug"
166
+ },
167
+ {
168
+ name: "description",
169
+ type: "textarea",
170
+ label: "Description"
171
+ },
172
+ {
173
+ name: "parent",
174
+ type: "relationship",
175
+ label: "Parent Category",
176
+ relationTo: "categories"
177
+ }
178
+ ],
179
+ timestamps: true
180
+ }
181
+ };
182
+ var blogGlobals = [];
183
+
184
+ // src/templates/ecommerce.ts
185
+ var ecommerceCollections = {
186
+ products: {
187
+ slug: "products",
188
+ label: "Products",
189
+ labelPlural: "Products",
190
+ singularLabel: "Product",
191
+ admin: {
192
+ useAsTitle: "title",
193
+ defaultColumns: ["title", "price", "status", "inventory"],
194
+ description: "Product catalog"
195
+ },
196
+ fields: [
197
+ {
198
+ name: "title",
199
+ type: "text",
200
+ required: true,
201
+ label: "Title"
202
+ },
203
+ {
204
+ name: "slug",
205
+ type: "text",
206
+ required: true,
207
+ label: "Slug"
208
+ },
209
+ {
210
+ name: "description",
211
+ type: "richtext",
212
+ label: "Description"
213
+ },
214
+ {
215
+ name: "price",
216
+ type: "number",
217
+ required: true,
218
+ label: "Price"
219
+ },
220
+ {
221
+ name: "compareAtPrice",
222
+ type: "number",
223
+ label: "Compare at Price",
224
+ admin: { description: "Original price for sale display" }
225
+ },
226
+ {
227
+ name: "costPrice",
228
+ type: "number",
229
+ label: "Cost Price",
230
+ admin: { description: "For profit calculation" }
231
+ },
232
+ {
233
+ name: "sku",
234
+ type: "text",
235
+ required: true,
236
+ label: "SKU"
237
+ },
238
+ {
239
+ name: "barcode",
240
+ type: "text",
241
+ label: "Barcode"
242
+ },
243
+ {
244
+ name: "status",
245
+ type: "select",
246
+ label: "Status",
247
+ options: [
248
+ { label: "Draft", value: "draft" },
249
+ { label: "Active", value: "active" },
250
+ { label: "Archived", value: "archived" }
251
+ ],
252
+ defaultValue: "draft"
253
+ },
254
+ {
255
+ name: "images",
256
+ type: "array",
257
+ label: "Images",
258
+ fields: [
259
+ { name: "url", type: "text", label: "URL" },
260
+ { name: "alt", type: "text", label: "Alt Text" }
261
+ ]
262
+ },
263
+ {
264
+ name: "category",
265
+ type: "relationship",
266
+ label: "Category",
267
+ relationTo: "categories"
268
+ },
269
+ {
270
+ name: "inventory",
271
+ type: "number",
272
+ label: "Inventory",
273
+ defaultValue: 0
274
+ }
275
+ ],
276
+ timestamps: true
277
+ },
278
+ categories: {
279
+ slug: "categories",
280
+ label: "Categories",
281
+ labelPlural: "Categories",
282
+ singularLabel: "Category",
283
+ admin: {
284
+ useAsTitle: "name",
285
+ defaultColumns: ["name", "slug", "productCount"],
286
+ description: "Product categories"
287
+ },
288
+ fields: [
289
+ { name: "name", type: "text", required: true, label: "Name" },
290
+ { name: "slug", type: "text", required: true, label: "Slug" },
291
+ { name: "description", type: "textarea", label: "Description" },
292
+ { name: "image", type: "text", label: "Image URL" },
293
+ {
294
+ name: "parent",
295
+ type: "relationship",
296
+ label: "Parent Category",
297
+ relationTo: "categories"
298
+ }
299
+ ],
300
+ timestamps: true
301
+ },
302
+ customers: {
303
+ slug: "customers",
304
+ label: "Customers",
305
+ labelPlural: "Customers",
306
+ singularLabel: "Customer",
307
+ admin: {
308
+ useAsTitle: "email",
309
+ defaultColumns: [
310
+ "email",
311
+ "firstName",
312
+ "lastName",
313
+ "orderCount",
314
+ "createdAt"
315
+ ],
316
+ description: "Customer accounts"
317
+ },
318
+ fields: [
319
+ { name: "email", type: "email", required: true, label: "Email" },
320
+ { name: "firstName", type: "text", label: "First Name" },
321
+ { name: "lastName", type: "text", label: "Last Name" },
322
+ { name: "phone", type: "text", label: "Phone" },
323
+ {
324
+ name: "addresses",
325
+ type: "array",
326
+ label: "Addresses",
327
+ fields: [
328
+ { name: "type", type: "text", label: "Type" },
329
+ { name: "line1", type: "text", label: "Address Line 1" },
330
+ { name: "line2", type: "text", label: "Address Line 2" },
331
+ { name: "city", type: "text", label: "City" },
332
+ { name: "state", type: "text", label: "State" },
333
+ { name: "postalCode", type: "text", label: "Postal Code" },
334
+ { name: "country", type: "text", label: "Country" }
335
+ ]
336
+ },
337
+ {
338
+ name: "status",
339
+ type: "select",
340
+ label: "Status",
341
+ options: [
342
+ { label: "Active", value: "active" },
343
+ { label: "Inactive", value: "inactive" },
344
+ { label: "Banned", value: "banned" }
345
+ ],
346
+ defaultValue: "active"
347
+ }
348
+ ],
349
+ timestamps: true
350
+ },
351
+ orders: {
352
+ slug: "orders",
353
+ label: "Orders",
354
+ labelPlural: "Orders",
355
+ singularLabel: "Order",
356
+ admin: {
357
+ useAsTitle: "orderNumber",
358
+ defaultColumns: [
359
+ "orderNumber",
360
+ "customer",
361
+ "status",
362
+ "total",
363
+ "createdAt"
364
+ ],
365
+ description: "Customer orders"
366
+ },
367
+ fields: [
368
+ {
369
+ name: "orderNumber",
370
+ type: "text",
371
+ required: true,
372
+ label: "Order Number"
373
+ },
374
+ {
375
+ name: "customer",
376
+ type: "relationship",
377
+ required: true,
378
+ label: "Customer",
379
+ relationTo: "customers"
380
+ },
381
+ {
382
+ name: "status",
383
+ type: "select",
384
+ label: "Status",
385
+ options: [
386
+ { label: "Pending", value: "pending" },
387
+ { label: "Confirmed", value: "confirmed" },
388
+ { label: "Processing", value: "processing" },
389
+ { label: "Shipped", value: "shipped" },
390
+ { label: "Delivered", value: "delivered" },
391
+ { label: "Cancelled", value: "cancelled" },
392
+ { label: "Refunded", value: "refunded" }
393
+ ],
394
+ defaultValue: "pending"
395
+ },
396
+ {
397
+ name: "paymentStatus",
398
+ type: "select",
399
+ label: "Payment Status",
400
+ options: [
401
+ { label: "Pending", value: "pending" },
402
+ { label: "Paid", value: "paid" },
403
+ { label: "Failed", value: "failed" },
404
+ { label: "Refunded", value: "refunded" }
405
+ ],
406
+ defaultValue: "pending"
407
+ },
408
+ {
409
+ name: "items",
410
+ type: "array",
411
+ label: "Items",
412
+ fields: [
413
+ { name: "product", type: "text", label: "Product" },
414
+ { name: "quantity", type: "number", label: "Quantity" },
415
+ { name: "unitPrice", type: "number", label: "Unit Price" },
416
+ { name: "total", type: "number", label: "Total" }
417
+ ]
418
+ },
419
+ { name: "subtotal", type: "number", required: true, label: "Subtotal" },
420
+ { name: "tax", type: "number", label: "Tax" },
421
+ { name: "shipping", type: "number", label: "Shipping" },
422
+ { name: "discount", type: "number", label: "Discount" },
423
+ { name: "total", type: "number", required: true, label: "Total" },
424
+ { name: "notes", type: "textarea", label: "Notes" }
425
+ ],
426
+ timestamps: true
427
+ },
428
+ coupons: {
429
+ slug: "coupons",
430
+ label: "Coupons",
431
+ labelPlural: "Coupons",
432
+ singularLabel: "Coupon",
433
+ admin: {
434
+ useAsTitle: "code",
435
+ defaultColumns: ["code", "type", "value", "active", "expiresAt"],
436
+ description: "Discount codes and promotions"
437
+ },
438
+ fields: [
439
+ { name: "code", type: "text", required: true, label: "Code" },
440
+ {
441
+ name: "type",
442
+ type: "select",
443
+ required: true,
444
+ label: "Type",
445
+ options: [
446
+ { label: "Percentage", value: "percentage" },
447
+ { label: "Fixed Amount", value: "fixed" },
448
+ { label: "Free Shipping", value: "freeShipping" }
449
+ ]
450
+ },
451
+ { name: "value", type: "number", label: "Value" },
452
+ { name: "minPurchase", type: "number", label: "Minimum Purchase" },
453
+ { name: "maxDiscount", type: "number", label: "Max Discount" },
454
+ { name: "usageLimit", type: "number", label: "Usage Limit" },
455
+ {
456
+ name: "usedCount",
457
+ type: "number",
458
+ defaultValue: 0,
459
+ label: "Used Count"
460
+ },
461
+ { name: "startsAt", type: "date", label: "Starts At" },
462
+ { name: "expiresAt", type: "date", label: "Expires At" },
463
+ { name: "active", type: "checkbox", defaultValue: true, label: "Active" }
464
+ ],
465
+ timestamps: true
466
+ }
467
+ };
468
+ var ecommerceGlobals = [];
469
+
470
+ // src/templates/kitchen-sink.ts
471
+ var kitchenSinkCollections = {
472
+ pages: {
473
+ slug: "pages",
474
+ label: "Pages",
475
+ labelPlural: "Pages",
476
+ singularLabel: "Page",
477
+ admin: {
478
+ useAsTitle: "title",
479
+ defaultColumns: ["title", "slug", "status", "updatedAt"],
480
+ description: "Static pages with custom layouts"
481
+ },
482
+ fields: [
483
+ {
484
+ name: "title",
485
+ type: "text",
486
+ required: true,
487
+ label: "Title"
488
+ },
489
+ {
490
+ name: "slug",
491
+ type: "text",
492
+ required: true,
493
+ label: "Slug",
494
+ admin: { description: "URL-friendly identifier" }
495
+ },
496
+ {
497
+ name: "content",
498
+ type: "blocks",
499
+ label: "Content",
500
+ blocks: [
501
+ {
502
+ slug: "hero",
503
+ label: "Hero Section",
504
+ fields: [
505
+ { name: "heading", type: "text", label: "Heading" },
506
+ { name: "subheading", type: "textarea", label: "Subheading" },
507
+ { name: "ctaText", type: "text", label: "CTA Button Text" },
508
+ { name: "ctaUrl", type: "text", label: "CTA Button URL" }
509
+ ]
510
+ },
511
+ {
512
+ slug: "text",
513
+ label: "Text Block",
514
+ fields: [{ name: "content", type: "richtext", label: "Content" }]
515
+ },
516
+ {
517
+ slug: "image",
518
+ label: "Image",
519
+ fields: [
520
+ {
521
+ name: "image",
522
+ type: "upload",
523
+ label: "Image",
524
+ relationTo: "media"
525
+ },
526
+ { name: "caption", type: "text", label: "Caption" },
527
+ { name: "alt", type: "text", label: "Alt Text" }
528
+ ]
529
+ },
530
+ {
531
+ slug: "cta",
532
+ label: "Call to Action",
533
+ fields: [
534
+ { name: "heading", type: "text", label: "Heading" },
535
+ { name: "description", type: "textarea", label: "Description" },
536
+ { name: "buttonText", type: "text", label: "Button Text" },
537
+ { name: "buttonUrl", type: "text", label: "Button URL" }
538
+ ]
539
+ }
540
+ ]
541
+ },
542
+ {
543
+ name: "status",
544
+ type: "select",
545
+ label: "Status",
546
+ options: [
547
+ { label: "Draft", value: "draft" },
548
+ { label: "Published", value: "published" }
549
+ ],
550
+ defaultValue: "draft"
551
+ },
552
+ {
553
+ name: "publishedAt",
554
+ type: "date",
555
+ label: "Published At"
556
+ }
557
+ ],
558
+ timestamps: true
559
+ },
560
+ navigation: {
561
+ slug: "navigation",
562
+ label: "Navigation",
563
+ labelPlural: "Navigation",
564
+ singularLabel: "Navigation Item",
565
+ admin: {
566
+ useAsTitle: "label",
567
+ defaultColumns: ["label", "url", "location"],
568
+ description: "Site navigation menus"
569
+ },
570
+ fields: [
571
+ { name: "label", type: "text", required: true, label: "Label" },
572
+ { name: "url", type: "text", required: true, label: "URL" },
573
+ {
574
+ name: "location",
575
+ type: "select",
576
+ label: "Location",
577
+ options: [
578
+ { label: "Header", value: "header" },
579
+ { label: "Footer", value: "footer" },
580
+ { label: "Mobile", value: "mobile" }
581
+ ]
582
+ },
583
+ { name: "order", type: "number", label: "Sort Order", defaultValue: 0 },
584
+ {
585
+ name: "parent",
586
+ type: "relationship",
587
+ label: "Parent Item",
588
+ relationTo: "navigation"
589
+ },
590
+ {
591
+ name: "newTab",
592
+ type: "checkbox",
593
+ label: "Open in New Tab",
594
+ defaultValue: false
595
+ }
596
+ ],
597
+ timestamps: true
598
+ }
599
+ };
600
+
601
+ // src/templates/media.ts
602
+ var mediaCollection = {
603
+ slug: "media",
604
+ label: "Media Library",
605
+ admin: {
606
+ useAsTitle: "title",
607
+ defaultColumns: ["thumbnailUrl", "title", "type", "fileSize", "createdAt"],
608
+ group: "content"
609
+ },
610
+ access: {
611
+ read: () => true,
612
+ create: () => true,
613
+ update: () => true,
614
+ delete: () => true
615
+ },
616
+ fields: [
617
+ {
618
+ name: "title",
619
+ type: "text",
620
+ label: "Title",
621
+ required: true,
622
+ admin: {
623
+ description: "Descriptive title for the file"
624
+ }
625
+ },
626
+ {
627
+ name: "filename",
628
+ type: "text",
629
+ label: "Filename",
630
+ required: true,
631
+ admin: {
632
+ readOnly: true,
633
+ description: "System filename (auto-generated)"
634
+ }
635
+ },
636
+ {
637
+ name: "originalName",
638
+ type: "text",
639
+ label: "Original Name",
640
+ admin: {
641
+ readOnly: true
642
+ }
643
+ },
644
+ {
645
+ name: "alt",
646
+ type: "text",
647
+ label: "Alt Text",
648
+ admin: {
649
+ description: "Alternative text for images (accessibility)"
650
+ }
651
+ },
652
+ {
653
+ name: "caption",
654
+ type: "textarea",
655
+ label: "Caption",
656
+ admin: {
657
+ description: "Optional caption or description"
658
+ }
659
+ },
660
+ {
661
+ name: "type",
662
+ type: "select",
663
+ label: "File Type",
664
+ required: true,
665
+ defaultValue: "document",
666
+ options: [
667
+ { label: "Image", value: "image" },
668
+ { label: "Video", value: "video" },
669
+ { label: "Audio", value: "audio" },
670
+ { label: "Document", value: "document" },
671
+ { label: "Archive", value: "archive" },
672
+ { label: "Other", value: "other" }
673
+ ],
674
+ admin: {
675
+ readOnly: true
676
+ }
677
+ },
678
+ {
679
+ name: "mimeType",
680
+ type: "text",
681
+ label: "MIME Type",
682
+ admin: {
683
+ readOnly: true
684
+ }
685
+ },
686
+ {
687
+ name: "url",
688
+ type: "text",
689
+ label: "URL",
690
+ required: true,
691
+ admin: {
692
+ readOnly: true,
693
+ description: "Public URL of the file"
694
+ }
695
+ },
696
+ {
697
+ name: "thumbnailUrl",
698
+ type: "text",
699
+ label: "Thumbnail URL",
700
+ admin: {
701
+ readOnly: true
702
+ }
703
+ },
704
+ {
705
+ name: "width",
706
+ type: "number",
707
+ label: "Width",
708
+ admin: {
709
+ readOnly: true,
710
+ description: "Width in pixels (for images/videos)"
711
+ }
712
+ },
713
+ {
714
+ name: "height",
715
+ type: "number",
716
+ label: "Height",
717
+ admin: {
718
+ readOnly: true,
719
+ description: "Height in pixels (for images/videos)"
720
+ }
721
+ },
722
+ {
723
+ name: "fileSize",
724
+ type: "number",
725
+ label: "File Size",
726
+ admin: {
727
+ readOnly: true,
728
+ description: "Size in bytes"
729
+ }
730
+ },
731
+ {
732
+ name: "folder",
733
+ type: "text",
734
+ label: "Folder",
735
+ admin: {
736
+ description: "Folder path for organization (e.g., /products, /blog)"
737
+ }
738
+ },
739
+ {
740
+ name: "tags",
741
+ type: "array",
742
+ label: "Tags",
743
+ fields: [
744
+ {
745
+ name: "tag",
746
+ type: "text",
747
+ label: "Tag"
748
+ }
749
+ ]
750
+ },
751
+ {
752
+ name: "focalPoint",
753
+ type: "group",
754
+ label: "Focal Point",
755
+ admin: {
756
+ description: "Point of interest for cropping"
757
+ },
758
+ fields: [
759
+ {
760
+ name: "x",
761
+ type: "number",
762
+ label: "X",
763
+ defaultValue: 50
764
+ },
765
+ {
766
+ name: "y",
767
+ type: "number",
768
+ label: "Y",
769
+ defaultValue: 50
770
+ }
771
+ ]
772
+ },
773
+ {
774
+ name: "metadata",
775
+ type: "json",
776
+ label: "Metadata",
777
+ admin: {
778
+ readOnly: true,
779
+ description: "Additional file metadata (EXIF, etc.)"
780
+ }
781
+ },
782
+ {
783
+ name: "provider",
784
+ type: "select",
785
+ label: "Storage Provider",
786
+ defaultValue: "local",
787
+ options: [
788
+ { label: "Local", value: "local" },
789
+ { label: "AWS S3", value: "s3" },
790
+ { label: "Cloudinary", value: "cloudinary" },
791
+ { label: "Imgix", value: "imgix" }
792
+ ],
793
+ admin: {
794
+ readOnly: true
795
+ }
796
+ },
797
+ {
798
+ name: "status",
799
+ type: "select",
800
+ label: "Status",
801
+ defaultValue: "active",
802
+ options: [
803
+ { label: "Active", value: "active" },
804
+ { label: "Archived", value: "archived" }
805
+ ]
806
+ },
807
+ {
808
+ name: "createdAt",
809
+ type: "date",
810
+ label: "Created",
811
+ admin: {
812
+ readOnly: true
813
+ }
814
+ },
815
+ {
816
+ name: "updatedAt",
817
+ type: "date",
818
+ label: "Last Modified",
819
+ admin: {
820
+ readOnly: true
821
+ }
822
+ }
823
+ ]
824
+ };
825
+ var mediaFoldersCollection = {
826
+ slug: "media-folders",
827
+ label: "Media Folders",
828
+ admin: {
829
+ useAsTitle: "name",
830
+ hidden: true
831
+ // Only accessible via API
832
+ },
833
+ access: {
834
+ read: () => true,
835
+ create: () => true,
836
+ update: () => true,
837
+ delete: () => true
838
+ },
839
+ fields: [
840
+ {
841
+ name: "name",
842
+ type: "text",
843
+ label: "Name",
844
+ required: true
845
+ },
846
+ {
847
+ name: "slug",
848
+ type: "text",
849
+ label: "Slug",
850
+ required: true,
851
+ admin: {
852
+ description: "URL-friendly identifier"
853
+ }
854
+ },
855
+ {
856
+ name: "parent",
857
+ type: "relationship",
858
+ label: "Parent Folder",
859
+ relationTo: "media-folders"
860
+ },
861
+ {
862
+ name: "path",
863
+ type: "text",
864
+ label: "Full Path",
865
+ admin: {
866
+ readOnly: true,
867
+ description: "Complete folder path"
868
+ }
869
+ },
870
+ {
871
+ name: "fileCount",
872
+ type: "number",
873
+ label: "File Count",
874
+ admin: {
875
+ readOnly: true
876
+ }
877
+ }
878
+ ]
879
+ };
880
+ var mediaCollections = [mediaCollection, mediaFoldersCollection];
881
+
882
+ // src/templates/settings/site.ts
883
+ var siteSettingsGlobal = {
884
+ slug: "site-settings",
885
+ label: "Site Settings",
886
+ admin: {
887
+ group: "settings"
888
+ },
889
+ access: {
890
+ read: () => true,
891
+ update: () => true
892
+ },
893
+ fields: [
894
+ {
895
+ name: "siteName",
896
+ type: "text",
897
+ label: "Site Name",
898
+ required: true,
899
+ admin: {}
900
+ },
901
+ {
902
+ name: "siteDescription",
903
+ type: "textarea",
904
+ label: "Site Description",
905
+ admin: {}
906
+ },
907
+ {
908
+ name: "siteLogo",
909
+ type: "relationship",
910
+ label: "Site Logo",
911
+ relationTo: "media",
912
+ admin: {}
913
+ },
914
+ {
915
+ name: "siteFavicon",
916
+ type: "relationship",
917
+ label: "Favicon",
918
+ relationTo: "media",
919
+ admin: {}
920
+ },
921
+ {
922
+ name: "siteOgImage",
923
+ type: "relationship",
924
+ label: "Default OG Image",
925
+ relationTo: "media",
926
+ admin: {}
927
+ },
928
+ {
929
+ name: "siteUrl",
930
+ type: "text",
931
+ label: "Site URL",
932
+ admin: {}
933
+ },
934
+ {
935
+ name: "language",
936
+ type: "select",
937
+ label: "Default Language",
938
+ defaultValue: "en",
939
+ options: [
940
+ { label: "English", value: "en" },
941
+ { label: "Spanish", value: "es" },
942
+ { label: "French", value: "fr" },
943
+ { label: "German", value: "de" },
944
+ { label: "Portuguese", value: "pt" },
945
+ { label: "Italian", value: "it" },
946
+ { label: "Dutch", value: "nl" },
947
+ { label: "Russian", value: "ru" },
948
+ { label: "Japanese", value: "ja" },
949
+ { label: "Chinese", value: "zh" },
950
+ { label: "Korean", value: "ko" },
951
+ { label: "Arabic", value: "ar" }
952
+ ]
953
+ },
954
+ {
955
+ name: "timezone",
956
+ type: "text",
957
+ label: "Timezone",
958
+ defaultValue: "UTC",
959
+ admin: {}
960
+ },
961
+ {
962
+ name: "logo",
963
+ type: "group",
964
+ label: "Logo Settings",
965
+ fields: [
966
+ {
967
+ name: "width",
968
+ type: "number",
969
+ label: "Max Width (px)"
970
+ },
971
+ {
972
+ name: "height",
973
+ type: "number",
974
+ label: "Max Height (px)"
975
+ },
976
+ {
977
+ name: "altText",
978
+ type: "text",
979
+ label: "Alt Text"
980
+ }
981
+ ]
982
+ },
983
+ {
984
+ name: "analytics",
985
+ type: "group",
986
+ label: "Analytics",
987
+ fields: [
988
+ {
989
+ name: "googleAnalyticsId",
990
+ type: "text",
991
+ label: "Google Analytics ID",
992
+ admin: {}
993
+ },
994
+ {
995
+ name: "googleTagManagerId",
996
+ type: "text",
997
+ label: "Google Tag Manager ID",
998
+ admin: {}
999
+ },
1000
+ {
1001
+ name: "plausibleDomain",
1002
+ type: "text",
1003
+ label: "Plausible Domain",
1004
+ admin: {}
1005
+ },
1006
+ {
1007
+ name: "mixpanelToken",
1008
+ type: "password",
1009
+ label: "Mixpanel Token"
1010
+ }
1011
+ ]
1012
+ }
1013
+ ]
1014
+ };
1015
+
1016
+ // src/templates/settings/seo.ts
1017
+ var seoSettingsGlobal = {
1018
+ slug: "seo-settings",
1019
+ label: "SEO Settings",
1020
+ admin: {
1021
+ group: "settings"
1022
+ },
1023
+ access: {
1024
+ read: () => true,
1025
+ update: () => true
1026
+ },
1027
+ fields: [
1028
+ {
1029
+ name: "defaultTitle",
1030
+ type: "text",
1031
+ label: "Default Title",
1032
+ admin: {}
1033
+ },
1034
+ {
1035
+ name: "defaultDescription",
1036
+ type: "textarea",
1037
+ label: "Default Description",
1038
+ admin: {}
1039
+ },
1040
+ {
1041
+ name: "titleTemplate",
1042
+ type: "text",
1043
+ label: "Title Template",
1044
+ defaultValue: "{{title}} | {{siteName}}",
1045
+ admin: {}
1046
+ },
1047
+ {
1048
+ name: "siteNameInTitle",
1049
+ type: "checkbox",
1050
+ label: "Include Site Name in Title",
1051
+ defaultValue: true
1052
+ },
1053
+ {
1054
+ name: "separator",
1055
+ type: "text",
1056
+ label: "Title Separator",
1057
+ defaultValue: " | ",
1058
+ admin: {}
1059
+ },
1060
+ {
1061
+ name: "meta",
1062
+ type: "group",
1063
+ label: "Meta Settings",
1064
+ fields: [
1065
+ {
1066
+ name: "robots",
1067
+ type: "text",
1068
+ label: "Robots Meta",
1069
+ defaultValue: "index, follow",
1070
+ admin: {}
1071
+ },
1072
+ {
1073
+ name: "canonicalUrl",
1074
+ type: "text",
1075
+ label: "Canonical URL",
1076
+ admin: {}
1077
+ },
1078
+ {
1079
+ name: "ogType",
1080
+ type: "select",
1081
+ label: "Default OG Type",
1082
+ defaultValue: "website",
1083
+ options: [
1084
+ { label: "Website", value: "website" },
1085
+ { label: "Article", value: "article" },
1086
+ { label: "Product", value: "product" },
1087
+ { label: "Book", value: "book" },
1088
+ { label: "Music", value: "music" },
1089
+ { label: "Video", value: "video" }
1090
+ ]
1091
+ }
1092
+ ]
1093
+ },
1094
+ {
1095
+ name: "sitemap",
1096
+ type: "checkbox",
1097
+ label: "Enable XML Sitemap",
1098
+ defaultValue: true,
1099
+ admin: {}
1100
+ },
1101
+ {
1102
+ name: "sitemapUrls",
1103
+ type: "number",
1104
+ label: "Sitemap URL Limit",
1105
+ defaultValue: 5e4,
1106
+ admin: {}
1107
+ },
1108
+ {
1109
+ name: "robotsTxt",
1110
+ type: "textarea",
1111
+ label: "Custom robots.txt",
1112
+ admin: {}
1113
+ },
1114
+ {
1115
+ name: "social",
1116
+ type: "group",
1117
+ label: "Social Media",
1118
+ fields: [
1119
+ {
1120
+ name: "twitterHandle",
1121
+ type: "text",
1122
+ label: "Twitter/X Handle",
1123
+ admin: {}
1124
+ },
1125
+ {
1126
+ name: "twitterCardType",
1127
+ type: "select",
1128
+ label: "Twitter Card Type",
1129
+ defaultValue: "summary_large_image",
1130
+ options: [
1131
+ { label: "Summary", value: "summary" },
1132
+ { label: "Summary with Large Image", value: "summary_large_image" },
1133
+ { label: "App", value: "app" },
1134
+ { label: "Player", value: "player" }
1135
+ ]
1136
+ },
1137
+ {
1138
+ name: "fbAppId",
1139
+ type: "text",
1140
+ label: "Facebook App ID"
1141
+ }
1142
+ ]
1143
+ },
1144
+ {
1145
+ name: "advanced",
1146
+ type: "group",
1147
+ label: "Advanced",
1148
+ fields: [
1149
+ {
1150
+ name: "jsonLdEnabled",
1151
+ type: "checkbox",
1152
+ label: "Enable JSON-LD",
1153
+ defaultValue: true,
1154
+ admin: {}
1155
+ },
1156
+ {
1157
+ name: "breadcrumbsEnabled",
1158
+ type: "checkbox",
1159
+ label: "Enable Breadcrumbs",
1160
+ defaultValue: true
1161
+ },
1162
+ {
1163
+ name: "paginationSize",
1164
+ type: "number",
1165
+ label: "Default Pagination Size",
1166
+ defaultValue: 10
1167
+ }
1168
+ ]
1169
+ }
1170
+ ]
1171
+ };
1172
+
1173
+ // src/templates/settings/social.ts
1174
+ var socialSettingsGlobal = {
1175
+ slug: "social-settings",
1176
+ label: "Social Media",
1177
+ admin: {
1178
+ group: "settings"
1179
+ },
1180
+ access: {
1181
+ read: () => true,
1182
+ update: () => true
1183
+ },
1184
+ fields: [
1185
+ {
1186
+ name: "facebook",
1187
+ type: "text",
1188
+ label: "Facebook",
1189
+ admin: {}
1190
+ },
1191
+ {
1192
+ name: "twitter",
1193
+ type: "text",
1194
+ label: "Twitter/X"
1195
+ },
1196
+ {
1197
+ name: "instagram",
1198
+ type: "text",
1199
+ label: "Instagram"
1200
+ },
1201
+ {
1202
+ name: "linkedin",
1203
+ type: "text",
1204
+ label: "LinkedIn"
1205
+ },
1206
+ {
1207
+ name: "youtube",
1208
+ type: "text",
1209
+ label: "YouTube"
1210
+ },
1211
+ {
1212
+ name: "tiktok",
1213
+ type: "text",
1214
+ label: "TikTok"
1215
+ },
1216
+ {
1217
+ name: "pinterest",
1218
+ type: "text",
1219
+ label: "Pinterest"
1220
+ },
1221
+ {
1222
+ name: "discord",
1223
+ type: "text",
1224
+ label: "Discord"
1225
+ },
1226
+ {
1227
+ name: "twitch",
1228
+ type: "text",
1229
+ label: "Twitch"
1230
+ },
1231
+ {
1232
+ name: "github",
1233
+ type: "text",
1234
+ label: "GitHub"
1235
+ },
1236
+ {
1237
+ name: "mastodon",
1238
+ type: "text",
1239
+ label: "Mastodon"
1240
+ }
1241
+ ]
1242
+ };
1243
+
1244
+ // src/templates/settings/email.ts
1245
+ var emailSettingsGlobal = {
1246
+ slug: "email-settings",
1247
+ label: "Email Settings",
1248
+ admin: {
1249
+ group: "settings"
1250
+ },
1251
+ access: {
1252
+ read: () => true,
1253
+ update: () => true
1254
+ },
1255
+ fields: [
1256
+ {
1257
+ name: "fromName",
1258
+ type: "text",
1259
+ label: "From Name",
1260
+ admin: {}
1261
+ },
1262
+ {
1263
+ name: "fromEmail",
1264
+ type: "email",
1265
+ label: "From Email",
1266
+ required: true,
1267
+ admin: {}
1268
+ },
1269
+ {
1270
+ name: "replyTo",
1271
+ type: "email",
1272
+ label: "Reply-To Email",
1273
+ admin: {}
1274
+ },
1275
+ {
1276
+ name: "provider",
1277
+ type: "select",
1278
+ label: "Email Provider",
1279
+ defaultValue: "smtp",
1280
+ options: [
1281
+ { label: "SMTP", value: "smtp" },
1282
+ { label: "SendGrid", value: "sendgrid" },
1283
+ { label: "Mailgun", value: "mailgun" },
1284
+ { label: "AWS SES", value: "ses" },
1285
+ { label: "Resend", value: "resend" }
1286
+ ]
1287
+ },
1288
+ {
1289
+ name: "smtp",
1290
+ type: "group",
1291
+ label: "SMTP Settings",
1292
+ fields: [
1293
+ {
1294
+ name: "host",
1295
+ type: "text",
1296
+ label: "Host",
1297
+ admin: {
1298
+ placeholder: "smtp.example.com"
1299
+ }
1300
+ },
1301
+ {
1302
+ name: "port",
1303
+ type: "number",
1304
+ label: "Port",
1305
+ defaultValue: 587
1306
+ },
1307
+ {
1308
+ name: "secure",
1309
+ type: "checkbox",
1310
+ label: "Use TLS/SSL",
1311
+ defaultValue: true
1312
+ },
1313
+ {
1314
+ name: "username",
1315
+ type: "text",
1316
+ label: "Username"
1317
+ },
1318
+ {
1319
+ name: "password",
1320
+ type: "password",
1321
+ label: "Password"
1322
+ }
1323
+ ]
1324
+ },
1325
+ {
1326
+ name: "api",
1327
+ type: "group",
1328
+ label: "API Settings",
1329
+ admin: {},
1330
+ fields: [
1331
+ {
1332
+ name: "apiKey",
1333
+ type: "password",
1334
+ label: "API Key"
1335
+ },
1336
+ {
1337
+ name: "domain",
1338
+ type: "text",
1339
+ label: "Domain",
1340
+ admin: {}
1341
+ },
1342
+ {
1343
+ name: "webhookSecret",
1344
+ type: "password",
1345
+ label: "Webhook Secret",
1346
+ admin: {}
1347
+ }
1348
+ ]
1349
+ },
1350
+ {
1351
+ name: "testEmail",
1352
+ type: "email",
1353
+ label: "Test Email",
1354
+ admin: {}
1355
+ }
1356
+ ]
1357
+ };
1358
+
1359
+ // src/templates/settings/storage.ts
1360
+ var storageSettingsGlobal = {
1361
+ slug: "storage-settings",
1362
+ label: "Storage Settings",
1363
+ admin: {
1364
+ group: "settings"
1365
+ },
1366
+ access: {
1367
+ read: () => true,
1368
+ update: () => true
1369
+ },
1370
+ fields: [
1371
+ {
1372
+ name: "provider",
1373
+ type: "select",
1374
+ label: "Storage Provider",
1375
+ defaultValue: "local",
1376
+ options: [
1377
+ { label: "Local Server", value: "local" },
1378
+ { label: "AWS S3", value: "s3" },
1379
+ { label: "Cloudinary", value: "cloudinary" },
1380
+ { label: "Imgix (Transforms Only)", value: "imgix" }
1381
+ ]
1382
+ },
1383
+ {
1384
+ name: "local",
1385
+ type: "group",
1386
+ label: "Local Storage",
1387
+ fields: [
1388
+ {
1389
+ name: "uploadDir",
1390
+ type: "text",
1391
+ label: "Upload Directory",
1392
+ defaultValue: "./public/uploads",
1393
+ admin: {}
1394
+ },
1395
+ {
1396
+ name: "baseUrl",
1397
+ type: "text",
1398
+ label: "Base URL",
1399
+ defaultValue: "/uploads",
1400
+ admin: {}
1401
+ }
1402
+ ]
1403
+ },
1404
+ {
1405
+ name: "s3",
1406
+ type: "group",
1407
+ label: "AWS S3 Settings",
1408
+ fields: [
1409
+ {
1410
+ name: "bucket",
1411
+ type: "text",
1412
+ label: "Bucket Name"
1413
+ },
1414
+ {
1415
+ name: "region",
1416
+ type: "text",
1417
+ label: "Region",
1418
+ admin: {
1419
+ placeholder: "us-east-1"
1420
+ }
1421
+ },
1422
+ {
1423
+ name: "accessKeyId",
1424
+ type: "password",
1425
+ label: "Access Key ID"
1426
+ },
1427
+ {
1428
+ name: "secretAccessKey",
1429
+ type: "password",
1430
+ label: "Secret Access Key"
1431
+ },
1432
+ {
1433
+ name: "cdnUrl",
1434
+ type: "text",
1435
+ label: "CDN URL",
1436
+ admin: {}
1437
+ },
1438
+ {
1439
+ name: "prefix",
1440
+ type: "text",
1441
+ label: "Path Prefix",
1442
+ admin: {}
1443
+ }
1444
+ ]
1445
+ },
1446
+ {
1447
+ name: "cloudinary",
1448
+ type: "group",
1449
+ label: "Cloudinary Settings",
1450
+ fields: [
1451
+ {
1452
+ name: "cloudName",
1453
+ type: "text",
1454
+ label: "Cloud Name"
1455
+ },
1456
+ {
1457
+ name: "apiKey",
1458
+ type: "password",
1459
+ label: "API Key"
1460
+ },
1461
+ {
1462
+ name: "apiSecret",
1463
+ type: "password",
1464
+ label: "API Secret"
1465
+ },
1466
+ {
1467
+ name: "folder",
1468
+ type: "text",
1469
+ label: "Folder",
1470
+ admin: {}
1471
+ }
1472
+ ]
1473
+ },
1474
+ {
1475
+ name: "imgix",
1476
+ type: "group",
1477
+ label: "Imgix Settings",
1478
+ fields: [
1479
+ {
1480
+ name: "domain",
1481
+ type: "text",
1482
+ label: "Imgix Domain",
1483
+ admin: {
1484
+ placeholder: "your-source.imgix.net"
1485
+ }
1486
+ },
1487
+ {
1488
+ name: "signKey",
1489
+ type: "password",
1490
+ label: "Signing Key",
1491
+ admin: {}
1492
+ }
1493
+ ]
1494
+ },
1495
+ {
1496
+ name: "limits",
1497
+ type: "group",
1498
+ label: "Upload Limits",
1499
+ fields: [
1500
+ {
1501
+ name: "maxFileSize",
1502
+ type: "number",
1503
+ label: "Max File Size (bytes)",
1504
+ defaultValue: 10485760,
1505
+ admin: {}
1506
+ },
1507
+ {
1508
+ name: "allowedTypes",
1509
+ type: "json",
1510
+ label: "Allowed MIME Types",
1511
+ defaultValue: ["image/*", "video/*", "audio/*", "application/pdf"],
1512
+ admin: {}
1513
+ },
1514
+ {
1515
+ name: "maxFilesPerUpload",
1516
+ type: "number",
1517
+ label: "Max Files per Upload",
1518
+ defaultValue: 10
1519
+ }
1520
+ ]
1521
+ }
1522
+ ]
1523
+ };
1524
+
1525
+ // src/templates/settings/access.ts
1526
+ var accessSettingsGlobal = {
1527
+ slug: "access-settings",
1528
+ label: "Access Control",
1529
+ admin: {
1530
+ group: "settings"
1531
+ },
1532
+ access: {
1533
+ read: () => true,
1534
+ update: () => true
1535
+ },
1536
+ fields: [
1537
+ {
1538
+ name: "enablePublicAccess",
1539
+ type: "checkbox",
1540
+ label: "Enable Public Access",
1541
+ defaultValue: true,
1542
+ admin: {}
1543
+ },
1544
+ {
1545
+ name: "defaultCollectionAccess",
1546
+ type: "select",
1547
+ label: "Default Collection Access",
1548
+ defaultValue: "read",
1549
+ options: [
1550
+ { label: "Read Only", value: "read" },
1551
+ { label: "Read & Create", value: "create" },
1552
+ { label: "Read & Create & Update", value: "update" },
1553
+ { label: "Full Access", value: "admin" },
1554
+ { label: "No Access", value: "none" }
1555
+ ],
1556
+ admin: {}
1557
+ },
1558
+ {
1559
+ name: "apiAccess",
1560
+ type: "group",
1561
+ label: "API Access",
1562
+ fields: [
1563
+ {
1564
+ name: "restEnabled",
1565
+ type: "checkbox",
1566
+ label: "Enable REST API",
1567
+ defaultValue: true
1568
+ },
1569
+ {
1570
+ name: "graphqlEnabled",
1571
+ type: "checkbox",
1572
+ label: "Enable GraphQL",
1573
+ defaultValue: false
1574
+ },
1575
+ {
1576
+ name: "trpcEnabled",
1577
+ type: "checkbox",
1578
+ label: "Enable tRPC",
1579
+ defaultValue: false
1580
+ },
1581
+ {
1582
+ name: "wsEnabled",
1583
+ type: "checkbox",
1584
+ label: "Enable WebSocket",
1585
+ defaultValue: false
1586
+ },
1587
+ {
1588
+ name: "requireAuth",
1589
+ type: "checkbox",
1590
+ label: "Require Authentication",
1591
+ defaultValue: false,
1592
+ admin: {}
1593
+ },
1594
+ {
1595
+ name: "allowedOrigins",
1596
+ type: "json",
1597
+ label: "CORS Allowed Origins",
1598
+ admin: {}
1599
+ }
1600
+ ]
1601
+ },
1602
+ {
1603
+ name: "rateLimiting",
1604
+ type: "group",
1605
+ label: "Rate Limiting",
1606
+ fields: [
1607
+ {
1608
+ name: "enabled",
1609
+ type: "checkbox",
1610
+ label: "Enable Rate Limiting",
1611
+ defaultValue: true
1612
+ },
1613
+ {
1614
+ name: "maxRequests",
1615
+ type: "number",
1616
+ label: "Max Requests",
1617
+ defaultValue: 100,
1618
+ admin: {}
1619
+ },
1620
+ {
1621
+ name: "windowMs",
1622
+ type: "number",
1623
+ label: "Window (ms)",
1624
+ defaultValue: 6e4,
1625
+ admin: {}
1626
+ }
1627
+ ]
1628
+ }
1629
+ ]
1630
+ };
1631
+
1632
+ // src/templates/settings/store.ts
1633
+ var countryOptions = [
1634
+ { label: "United States", value: "US" },
1635
+ { label: "United Kingdom", value: "GB" },
1636
+ { label: "Canada", value: "CA" },
1637
+ { label: "Australia", value: "AU" },
1638
+ { label: "Germany", value: "DE" },
1639
+ { label: "France", value: "FR" },
1640
+ { label: "Netherlands", value: "NL" },
1641
+ { label: "Belgium", value: "BE" },
1642
+ { label: "Spain", value: "ES" },
1643
+ { label: "Italy", value: "IT" },
1644
+ { label: "Portugal", value: "PT" },
1645
+ { label: "Sweden", value: "SE" },
1646
+ { label: "Norway", value: "NO" },
1647
+ { label: "Denmark", value: "DK" },
1648
+ { label: "Finland", value: "FI" },
1649
+ { label: "Austria", value: "AT" },
1650
+ { label: "Switzerland", value: "CH" },
1651
+ { label: "Japan", value: "JP" },
1652
+ { label: "South Korea", value: "KR" },
1653
+ { label: "China", value: "CN" },
1654
+ { label: "India", value: "IN" },
1655
+ { label: "Brazil", value: "BR" },
1656
+ { label: "Mexico", value: "MX" }
1657
+ ];
1658
+ var storeSettingsGlobal = {
1659
+ slug: "store-settings",
1660
+ label: "Store Settings",
1661
+ admin: {
1662
+ group: "settings"
1663
+ },
1664
+ access: {
1665
+ read: () => true,
1666
+ update: () => true
1667
+ },
1668
+ fields: [
1669
+ {
1670
+ name: "storeName",
1671
+ type: "text",
1672
+ label: "Store Name",
1673
+ required: true
1674
+ },
1675
+ {
1676
+ name: "storeEmail",
1677
+ type: "email",
1678
+ label: "Contact Email",
1679
+ required: true
1680
+ },
1681
+ {
1682
+ name: "storePhone",
1683
+ type: "text",
1684
+ label: "Phone Number"
1685
+ },
1686
+ {
1687
+ name: "address",
1688
+ type: "group",
1689
+ label: "Store Address",
1690
+ fields: [
1691
+ {
1692
+ name: "street",
1693
+ type: "text",
1694
+ label: "Street Address"
1695
+ },
1696
+ {
1697
+ name: "city",
1698
+ type: "text",
1699
+ label: "City"
1700
+ },
1701
+ {
1702
+ name: "state",
1703
+ type: "text",
1704
+ label: "State/Province"
1705
+ },
1706
+ {
1707
+ name: "postalCode",
1708
+ type: "text",
1709
+ label: "Postal Code"
1710
+ },
1711
+ {
1712
+ name: "country",
1713
+ type: "select",
1714
+ label: "Country",
1715
+ options: countryOptions
1716
+ }
1717
+ ]
1718
+ },
1719
+ {
1720
+ name: "currency",
1721
+ type: "group",
1722
+ label: "Currency",
1723
+ fields: [
1724
+ {
1725
+ name: "code",
1726
+ type: "select",
1727
+ label: "Currency Code",
1728
+ defaultValue: "USD",
1729
+ options: [
1730
+ { label: "USD - US Dollar", value: "USD" },
1731
+ { label: "EUR - Euro", value: "EUR" },
1732
+ { label: "GBP - British Pound", value: "GBP" },
1733
+ { label: "CAD - Canadian Dollar", value: "CAD" },
1734
+ { label: "AUD - Australian Dollar", value: "AUD" },
1735
+ { label: "JPY - Japanese Yen", value: "JPY" },
1736
+ { label: "CNY - Chinese Yuan", value: "CNY" },
1737
+ { label: "INR - Indian Rupee", value: "INR" },
1738
+ { label: "BRL - Brazilian Real", value: "BRL" },
1739
+ { label: "MXN - Mexican Peso", value: "MXN" }
1740
+ ]
1741
+ },
1742
+ {
1743
+ name: "symbol",
1744
+ type: "text",
1745
+ label: "Symbol",
1746
+ defaultValue: "$"
1747
+ },
1748
+ {
1749
+ name: "position",
1750
+ type: "select",
1751
+ label: "Symbol Position",
1752
+ defaultValue: "before",
1753
+ options: [
1754
+ { label: "Before amount", value: "before" },
1755
+ { label: "After amount", value: "after" }
1756
+ ]
1757
+ },
1758
+ {
1759
+ name: "decimals",
1760
+ type: "number",
1761
+ label: "Decimal Places",
1762
+ defaultValue: 2
1763
+ }
1764
+ ]
1765
+ },
1766
+ {
1767
+ name: "tax",
1768
+ type: "group",
1769
+ label: "Tax Settings",
1770
+ fields: [
1771
+ {
1772
+ name: "enabled",
1773
+ type: "checkbox",
1774
+ label: "Enable Tax",
1775
+ defaultValue: true
1776
+ },
1777
+ {
1778
+ name: "rate",
1779
+ type: "number",
1780
+ label: "Tax Rate (%)",
1781
+ admin: {
1782
+ placeholder: "10"
1783
+ }
1784
+ },
1785
+ {
1786
+ name: "includedInPrice",
1787
+ type: "checkbox",
1788
+ label: "Tax Included in Prices",
1789
+ admin: {}
1790
+ },
1791
+ {
1792
+ name: "taxId",
1793
+ type: "text",
1794
+ label: "Tax ID / VAT Number"
1795
+ }
1796
+ ]
1797
+ },
1798
+ {
1799
+ name: "shipping",
1800
+ type: "group",
1801
+ label: "Shipping",
1802
+ fields: [
1803
+ {
1804
+ name: "freeShippingThreshold",
1805
+ type: "number",
1806
+ label: "Free Shipping Minimum",
1807
+ admin: {}
1808
+ },
1809
+ {
1810
+ name: "flatRate",
1811
+ type: "number",
1812
+ label: "Flat Rate Shipping",
1813
+ admin: {}
1814
+ },
1815
+ {
1816
+ name: "enableLocalPickup",
1817
+ type: "checkbox",
1818
+ label: "Enable Local Pickup",
1819
+ defaultValue: true
1820
+ }
1821
+ ]
1822
+ },
1823
+ {
1824
+ name: "orders",
1825
+ type: "group",
1826
+ label: "Orders",
1827
+ fields: [
1828
+ {
1829
+ name: "orderNumberPrefix",
1830
+ type: "text",
1831
+ label: "Order Number Prefix",
1832
+ defaultValue: "ORD",
1833
+ admin: {}
1834
+ },
1835
+ {
1836
+ name: "allowGuestCheckout",
1837
+ type: "checkbox",
1838
+ label: "Allow Guest Checkout",
1839
+ defaultValue: true
1840
+ },
1841
+ {
1842
+ name: "requirePhone",
1843
+ type: "checkbox",
1844
+ label: "Require Phone Number",
1845
+ defaultValue: true
1846
+ }
1847
+ ]
1848
+ }
1849
+ ]
1850
+ };
1851
+
1852
+ // src/templates/settings/payments.ts
1853
+ var paymentSettingsGlobal = {
1854
+ slug: "payment-settings",
1855
+ label: "Payment Settings",
1856
+ admin: {
1857
+ group: "settings"
1858
+ },
1859
+ access: {
1860
+ read: () => true,
1861
+ update: () => true
1862
+ },
1863
+ fields: [
1864
+ {
1865
+ name: "testMode",
1866
+ type: "checkbox",
1867
+ label: "Test Mode",
1868
+ defaultValue: true,
1869
+ admin: {}
1870
+ },
1871
+ {
1872
+ name: "stripe",
1873
+ type: "group",
1874
+ label: "Stripe",
1875
+ fields: [
1876
+ {
1877
+ name: "enabled",
1878
+ type: "checkbox",
1879
+ label: "Enable Stripe",
1880
+ defaultValue: false
1881
+ },
1882
+ {
1883
+ name: "publishableKey",
1884
+ type: "text",
1885
+ label: "Publishable Key",
1886
+ admin: {
1887
+ placeholder: "pk_live_..."
1888
+ }
1889
+ },
1890
+ {
1891
+ name: "secretKey",
1892
+ type: "password",
1893
+ label: "Secret Key"
1894
+ },
1895
+ {
1896
+ name: "webhookSecret",
1897
+ type: "password",
1898
+ label: "Webhook Secret",
1899
+ admin: {}
1900
+ }
1901
+ ]
1902
+ },
1903
+ {
1904
+ name: "paypal",
1905
+ type: "group",
1906
+ label: "PayPal",
1907
+ fields: [
1908
+ {
1909
+ name: "enabled",
1910
+ type: "checkbox",
1911
+ label: "Enable PayPal",
1912
+ defaultValue: false
1913
+ },
1914
+ {
1915
+ name: "clientId",
1916
+ type: "text",
1917
+ label: "Client ID"
1918
+ },
1919
+ {
1920
+ name: "clientSecret",
1921
+ type: "password",
1922
+ label: "Client Secret"
1923
+ },
1924
+ {
1925
+ name: "mode",
1926
+ type: "select",
1927
+ label: "Mode",
1928
+ defaultValue: "sandbox",
1929
+ options: [
1930
+ { label: "Sandbox (Test)", value: "sandbox" },
1931
+ { label: "Live", value: "live" }
1932
+ ]
1933
+ }
1934
+ ]
1935
+ },
1936
+ {
1937
+ name: "square",
1938
+ type: "group",
1939
+ label: "Square",
1940
+ fields: [
1941
+ {
1942
+ name: "enabled",
1943
+ type: "checkbox",
1944
+ label: "Enable Square",
1945
+ defaultValue: false
1946
+ },
1947
+ {
1948
+ name: "applicationId",
1949
+ type: "text",
1950
+ label: "Application ID"
1951
+ },
1952
+ {
1953
+ name: "accessToken",
1954
+ type: "password",
1955
+ label: "Access Token"
1956
+ },
1957
+ {
1958
+ name: "locationId",
1959
+ type: "text",
1960
+ label: "Location ID"
1961
+ }
1962
+ ]
1963
+ },
1964
+ {
1965
+ name: "methods",
1966
+ type: "group",
1967
+ label: "Manual Payment Methods",
1968
+ fields: [
1969
+ {
1970
+ name: "cod",
1971
+ type: "checkbox",
1972
+ label: "Cash on Delivery",
1973
+ defaultValue: true
1974
+ },
1975
+ {
1976
+ name: "bankTransfer",
1977
+ type: "checkbox",
1978
+ label: "Bank Transfer",
1979
+ defaultValue: true
1980
+ },
1981
+ {
1982
+ name: "cash",
1983
+ type: "checkbox",
1984
+ label: "Cash (Local Pickup)",
1985
+ defaultValue: true
1986
+ },
1987
+ {
1988
+ name: "check",
1989
+ type: "checkbox",
1990
+ label: "Check",
1991
+ defaultValue: false
1992
+ }
1993
+ ]
1994
+ },
1995
+ {
1996
+ name: "bankTransfer",
1997
+ type: "group",
1998
+ label: "Bank Transfer Details",
1999
+ admin: {},
2000
+ fields: [
2001
+ {
2002
+ name: "bankName",
2003
+ type: "text",
2004
+ label: "Bank Name"
2005
+ },
2006
+ {
2007
+ name: "accountName",
2008
+ type: "text",
2009
+ label: "Account Name"
2010
+ },
2011
+ {
2012
+ name: "accountNumber",
2013
+ type: "text",
2014
+ label: "Account Number"
2015
+ },
2016
+ {
2017
+ name: "routingNumber",
2018
+ type: "text",
2019
+ label: "Routing/Sort Code"
2020
+ },
2021
+ {
2022
+ name: "iban",
2023
+ type: "text",
2024
+ label: "IBAN"
2025
+ },
2026
+ {
2027
+ name: "swift",
2028
+ type: "text",
2029
+ label: "SWIFT/BIC"
2030
+ }
2031
+ ]
2032
+ }
2033
+ ]
2034
+ };
2035
+
2036
+ // src/templates/settings/index.ts
2037
+ var allSettingsGlobals = [
2038
+ siteSettingsGlobal,
2039
+ seoSettingsGlobal,
2040
+ socialSettingsGlobal,
2041
+ emailSettingsGlobal,
2042
+ storageSettingsGlobal,
2043
+ accessSettingsGlobal,
2044
+ storeSettingsGlobal,
2045
+ paymentSettingsGlobal
2046
+ ];
2047
+ var coreSettingsGlobals = [
2048
+ siteSettingsGlobal,
2049
+ seoSettingsGlobal,
2050
+ socialSettingsGlobal,
2051
+ emailSettingsGlobal,
2052
+ storageSettingsGlobal,
2053
+ accessSettingsGlobal
2054
+ ];
2055
+ var ecommerceSettingsGlobals = [
2056
+ storeSettingsGlobal,
2057
+ paymentSettingsGlobal
2058
+ ];
2059
+ var settingsBySlug = {
2060
+ [siteSettingsGlobal.slug]: siteSettingsGlobal,
2061
+ [seoSettingsGlobal.slug]: seoSettingsGlobal,
2062
+ [socialSettingsGlobal.slug]: socialSettingsGlobal,
2063
+ [emailSettingsGlobal.slug]: emailSettingsGlobal,
2064
+ [storageSettingsGlobal.slug]: storageSettingsGlobal,
2065
+ [accessSettingsGlobal.slug]: accessSettingsGlobal,
2066
+ [storeSettingsGlobal.slug]: storeSettingsGlobal,
2067
+ [paymentSettingsGlobal.slug]: paymentSettingsGlobal
2068
+ };
2069
+ function getSettingsForTemplate(template) {
2070
+ switch (template) {
2071
+ case "minimal":
2072
+ case "blog":
2073
+ return coreSettingsGlobals;
2074
+ case "ecommerce":
2075
+ return [...coreSettingsGlobals, ...ecommerceSettingsGlobals];
2076
+ case "kitchen-sink":
2077
+ return allSettingsGlobals;
2078
+ default:
2079
+ return coreSettingsGlobals;
2080
+ }
2081
+ }
2082
+
2083
+ // src/templates/index.ts
2084
+ function createTemplateConfig(options) {
2085
+ const collections = options.collections ? [...options.collections] : [];
2086
+ const globals = options.globals ? [...options.globals] : [];
2087
+ if (options.includeMedia !== false) {
2088
+ collections.push(...mediaCollections);
2089
+ }
2090
+ const templateSettings = options.template ? getSettingsForTemplate(options.template) : coreSettingsGlobals;
2091
+ if (options.includeSettings) {
2092
+ if (options.includeSettings === "all") {
2093
+ globals.push(...allSettingsGlobals);
2094
+ } else if (options.includeSettings === "core") {
2095
+ globals.push(...coreSettingsGlobals);
2096
+ } else if (options.includeSettings === "ecommerce") {
2097
+ globals.push(...ecommerceSettingsGlobals);
2098
+ } else if (Array.isArray(options.includeSettings)) {
2099
+ for (const setting of options.includeSettings) {
2100
+ const global = settingsBySlug[setting];
2101
+ if (global) {
2102
+ globals.push(global);
2103
+ }
2104
+ }
2105
+ }
2106
+ } else if (!options.globals || options.globals.length === 0) {
2107
+ globals.push(...templateSettings);
2108
+ }
2109
+ if (options.excludeSettings && options.excludeSettings.length > 0) {
2110
+ const excludeSet = new Set(options.excludeSettings);
2111
+ const filtered = globals.filter(
2112
+ (g) => !excludeSet.has(g.slug) && !excludeSet.has(g.label?.toLowerCase().replace(/\s+/g, "-") || "")
2113
+ );
2114
+ globals.length = 0;
2115
+ globals.push(...filtered);
2116
+ }
2117
+ return {
2118
+ collections: collections.length > 0 ? collections : void 0,
2119
+ globals: globals.length > 0 ? globals : void 0
2120
+ };
2121
+ }
2122
+
2123
+ export { accessSettingsGlobal, allSettingsGlobals, blogCollections, blogGlobals, coreSettingsGlobals, createTemplateConfig, ecommerceCollections, ecommerceGlobals, ecommerceSettingsGlobals, emailSettingsGlobal, getSettingsForTemplate, kitchenSinkCollections, mediaCollection, mediaCollections, mediaFoldersCollection, minimalCollections, paymentSettingsGlobal, seoSettingsGlobal, settingsBySlug, siteSettingsGlobal, socialSettingsGlobal, storageSettingsGlobal, storeSettingsGlobal };
2124
+ //# sourceMappingURL=chunk-3QX6KG2S.js.map
2125
+ //# sourceMappingURL=chunk-3QX6KG2S.js.map