@kurbo/dkit 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/README.md +24 -0
  2. package/dist/bin.js +8066 -0
  3. package/dist/bin.js.map +1 -0
  4. package/package.json +58 -0
  5. package/vendor/registry/blocks/blog-detail/module.json +27 -0
  6. package/vendor/registry/blocks/blog-detail/ui/minimal/next/blog-detail.tsx +26 -0
  7. package/vendor/registry/blocks/blog-detail/ui/minimal/nuxt/BlogDetail.vue +27 -0
  8. package/vendor/registry/blocks/blog-detail/ui/shadcn/next/blog-detail.tsx +106 -0
  9. package/vendor/registry/blocks/blog-detail/ui/shadcn/nuxt/BlogDetail.vue +116 -0
  10. package/vendor/registry/blocks/blog-list/module.json +26 -0
  11. package/vendor/registry/blocks/blog-list/ui/minimal/next/blog-list.tsx +130 -0
  12. package/vendor/registry/blocks/blog-list/ui/minimal/nuxt/BlogList.vue +62 -0
  13. package/vendor/registry/blocks/blog-list/ui/shadcn/next/blog-list.tsx +109 -0
  14. package/vendor/registry/blocks/blog-list/ui/shadcn/nuxt/BlogList.vue +100 -0
  15. package/vendor/registry/blocks/blog-list-cards/module.json +27 -0
  16. package/vendor/registry/blocks/blog-list-cards/ui/minimal/next/blog-list-cards.tsx +130 -0
  17. package/vendor/registry/blocks/blog-list-cards/ui/minimal/nuxt/BlogListCards.vue +114 -0
  18. package/vendor/registry/blocks/blog-list-cards/ui/shadcn/next/blog-list-cards.tsx +119 -0
  19. package/vendor/registry/blocks/blog-list-cards/ui/shadcn/nuxt/BlogListCards.vue +113 -0
  20. package/vendor/registry/blocks/booking-form-ui/module.json +15 -0
  21. package/vendor/registry/blocks/booking-form-ui/ui/minimal/next/booking-form.tsx +89 -0
  22. package/vendor/registry/blocks/booking-form-ui/ui/shadcn/next/booking-form.tsx +92 -0
  23. package/vendor/registry/blocks/contact-form-ui/module.json +27 -0
  24. package/vendor/registry/blocks/contact-form-ui/ui/minimal/next/contact-form.tsx +45 -0
  25. package/vendor/registry/blocks/contact-form-ui/ui/minimal/nuxt/ContactForm.vue +79 -0
  26. package/vendor/registry/blocks/contact-form-ui/ui/shadcn/next/contact-form.tsx +55 -0
  27. package/vendor/registry/blocks/contact-form-ui/ui/shadcn/nuxt/ContactForm.vue +92 -0
  28. package/vendor/registry/blocks/faq-list/module.json +15 -0
  29. package/vendor/registry/blocks/faq-list/ui/minimal/next/faq-list.tsx +78 -0
  30. package/vendor/registry/blocks/faq-list/ui/shadcn/next/faq-list.tsx +77 -0
  31. package/vendor/registry/blocks/maintenance-gate/module.json +13 -0
  32. package/vendor/registry/blocks/maintenance-gate/ui/minimal/next/maintenance-gate.tsx +135 -0
  33. package/vendor/registry/blocks/maintenance-gate/ui/shadcn/next/maintenance-gate.tsx +87 -0
  34. package/vendor/registry/blocks/nav-footer/module.json +13 -0
  35. package/vendor/registry/blocks/nav-footer/ui/minimal/next/nav-footer.tsx +55 -0
  36. package/vendor/registry/blocks/nav-footer/ui/shadcn/next/nav-footer.tsx +41 -0
  37. package/vendor/registry/blocks/nav-header/module.json +14 -0
  38. package/vendor/registry/blocks/nav-header/ui/minimal/next/nav-header.tsx +244 -0
  39. package/vendor/registry/blocks/nav-header/ui/shadcn/next/nav-header-client.tsx +185 -0
  40. package/vendor/registry/blocks/nav-header/ui/shadcn/next/nav-header.tsx +12 -0
  41. package/vendor/registry/blocks/page-detail/module.json +26 -0
  42. package/vendor/registry/blocks/page-detail/ui/minimal/next/page-detail.tsx +26 -0
  43. package/vendor/registry/blocks/page-detail/ui/minimal/nuxt/PageDetail.vue +26 -0
  44. package/vendor/registry/blocks/page-detail/ui/shadcn/next/page-detail.tsx +61 -0
  45. package/vendor/registry/blocks/page-detail/ui/shadcn/nuxt/PageDetail.vue +62 -0
  46. package/vendor/registry/blocks/project-detail/module.json +15 -0
  47. package/vendor/registry/blocks/project-detail/ui/minimal/next/project-detail.tsx +58 -0
  48. package/vendor/registry/blocks/project-detail/ui/shadcn/next/project-detail.tsx +91 -0
  49. package/vendor/registry/blocks/project-list/module.json +14 -0
  50. package/vendor/registry/blocks/project-list/ui/minimal/next/project-list.tsx +104 -0
  51. package/vendor/registry/blocks/project-list/ui/shadcn/next/project-list.tsx +81 -0
  52. package/vendor/registry/blocks/project-list-cards/module.json +15 -0
  53. package/vendor/registry/blocks/project-list-cards/ui/minimal/next/project-list-cards.tsx +125 -0
  54. package/vendor/registry/blocks/project-list-cards/ui/shadcn/next/project-list-cards.tsx +94 -0
  55. package/vendor/registry/blocks/projects-carousel/module.json +15 -0
  56. package/vendor/registry/blocks/projects-carousel/ui/minimal/next/projects-carousel-client.tsx +239 -0
  57. package/vendor/registry/blocks/projects-carousel/ui/minimal/next/projects-carousel.tsx +24 -0
  58. package/vendor/registry/blocks/projects-carousel/ui/shadcn/next/projects-carousel-client.tsx +102 -0
  59. package/vendor/registry/blocks/projects-carousel/ui/shadcn/next/projects-carousel.tsx +24 -0
  60. package/vendor/registry/blocks/service-detail/module.json +15 -0
  61. package/vendor/registry/blocks/service-detail/ui/minimal/next/service-detail.tsx +49 -0
  62. package/vendor/registry/blocks/service-detail/ui/shadcn/next/service-detail.tsx +75 -0
  63. package/vendor/registry/blocks/service-list/module.json +14 -0
  64. package/vendor/registry/blocks/service-list/ui/minimal/next/service-list.tsx +103 -0
  65. package/vendor/registry/blocks/service-list/ui/shadcn/next/service-list.tsx +80 -0
  66. package/vendor/registry/blocks/service-list-cards/module.json +15 -0
  67. package/vendor/registry/blocks/service-list-cards/ui/minimal/next/service-list-cards.tsx +124 -0
  68. package/vendor/registry/blocks/service-list-cards/ui/shadcn/next/service-list-cards.tsx +92 -0
  69. package/vendor/registry/blocks/site-brand/module.json +13 -0
  70. package/vendor/registry/blocks/site-brand/ui/minimal/next/site-brand.tsx +61 -0
  71. package/vendor/registry/blocks/site-brand/ui/shadcn/next/site-brand.tsx +48 -0
  72. package/vendor/registry/blocks/site-logo/module.json +13 -0
  73. package/vendor/registry/blocks/site-logo/ui/minimal/next/site-logo.tsx +37 -0
  74. package/vendor/registry/blocks/site-logo/ui/shadcn/next/site-logo.tsx +34 -0
  75. package/vendor/registry/blocks/social-links/module.json +13 -0
  76. package/vendor/registry/blocks/social-links/ui/minimal/next/social-links.tsx +55 -0
  77. package/vendor/registry/blocks/social-links/ui/shadcn/next/social-links.tsx +46 -0
  78. package/vendor/registry/blocks/team-detail/module.json +15 -0
  79. package/vendor/registry/blocks/team-detail/ui/minimal/next/team-detail.tsx +113 -0
  80. package/vendor/registry/blocks/team-detail/ui/shadcn/next/team-detail.tsx +77 -0
  81. package/vendor/registry/blocks/team-list/module.json +14 -0
  82. package/vendor/registry/blocks/team-list/ui/minimal/next/team-list.tsx +113 -0
  83. package/vendor/registry/blocks/team-list/ui/shadcn/next/team-list.tsx +77 -0
  84. package/vendor/registry/blocks/team-list-cards/module.json +15 -0
  85. package/vendor/registry/blocks/team-list-cards/ui/minimal/next/team-list-cards.tsx +111 -0
  86. package/vendor/registry/blocks/team-list-cards/ui/shadcn/next/team-list-cards.tsx +83 -0
  87. package/vendor/registry/blocks/testimonials-carousel/module.json +15 -0
  88. package/vendor/registry/blocks/testimonials-carousel/ui/minimal/next/testimonials-carousel-client.tsx +230 -0
  89. package/vendor/registry/blocks/testimonials-carousel/ui/minimal/next/testimonials-carousel.tsx +23 -0
  90. package/vendor/registry/blocks/testimonials-carousel/ui/shadcn/next/testimonials-carousel-client.tsx +91 -0
  91. package/vendor/registry/blocks/testimonials-carousel/ui/shadcn/next/testimonials-carousel.tsx +23 -0
  92. package/vendor/registry/blocks/testimonials-list/module.json +14 -0
  93. package/vendor/registry/blocks/testimonials-list/ui/minimal/next/testimonials-list.tsx +109 -0
  94. package/vendor/registry/blocks/testimonials-list/ui/shadcn/next/testimonials-list.tsx +72 -0
  95. package/vendor/registry/blocks/testimonials-list-cards/module.json +15 -0
  96. package/vendor/registry/blocks/testimonials-list-cards/ui/minimal/next/testimonials-list-cards.tsx +114 -0
  97. package/vendor/registry/blocks/testimonials-list-cards/ui/shadcn/next/testimonials-list-cards.tsx +72 -0
  98. package/vendor/registry/core/languages/policies.json +25 -0
  99. package/vendor/registry/core/languages/seed.json +16 -0
  100. package/vendor/registry/core/languages/snapshot.json +94 -0
  101. package/vendor/registry/modules/blog/access/policies.json +49 -0
  102. package/vendor/registry/modules/blog/access/policies.multilocale.json +67 -0
  103. package/vendor/registry/modules/blog/lib.multilocale.ts +552 -0
  104. package/vendor/registry/modules/blog/lib.ts +346 -0
  105. package/vendor/registry/modules/blog/module.json +50 -0
  106. package/vendor/registry/modules/blog/schema/snapshot.json +701 -0
  107. package/vendor/registry/modules/blog/schema/snapshot.multilocale.json +884 -0
  108. package/vendor/registry/modules/blog/services/ATTRIBUTION.md +8 -0
  109. package/vendor/registry/modules/blog/services/assets/ada-lovelace-avatar.jpg +0 -0
  110. package/vendor/registry/modules/blog/services/assets/hello-from-dkit-cover.jpg +0 -0
  111. package/vendor/registry/modules/blog/services/seed.json +70 -0
  112. package/vendor/registry/modules/blog/services/seed.multilocale.json +90 -0
  113. package/vendor/registry/modules/blog/types.multilocale.ts +96 -0
  114. package/vendor/registry/modules/blog/types.ts +62 -0
  115. package/vendor/registry/modules/booking-form/access/policies.json +25 -0
  116. package/vendor/registry/modules/booking-form/access/policies.multilocale.json +27 -0
  117. package/vendor/registry/modules/booking-form/lib.multilocale.ts +71 -0
  118. package/vendor/registry/modules/booking-form/lib.ts +77 -0
  119. package/vendor/registry/modules/booking-form/module.json +32 -0
  120. package/vendor/registry/modules/booking-form/schema/snapshot.json +294 -0
  121. package/vendor/registry/modules/booking-form/schema/snapshot.multilocale.json +467 -0
  122. package/vendor/registry/modules/booking-form/services/flows.json +19 -0
  123. package/vendor/registry/modules/booking-form/types.multilocale.ts +29 -0
  124. package/vendor/registry/modules/booking-form/types.ts +27 -0
  125. package/vendor/registry/modules/contact-form/access/policies.json +25 -0
  126. package/vendor/registry/modules/contact-form/access/policies.multilocale.json +27 -0
  127. package/vendor/registry/modules/contact-form/lib.multilocale.ts +65 -0
  128. package/vendor/registry/modules/contact-form/lib.ts +67 -0
  129. package/vendor/registry/modules/contact-form/module.json +32 -0
  130. package/vendor/registry/modules/contact-form/schema/snapshot.json +193 -0
  131. package/vendor/registry/modules/contact-form/schema/snapshot.multilocale.json +293 -0
  132. package/vendor/registry/modules/contact-form/services/flows.json +19 -0
  133. package/vendor/registry/modules/contact-form/types.multilocale.ts +21 -0
  134. package/vendor/registry/modules/contact-form/types.ts +19 -0
  135. package/vendor/registry/modules/faq/access/policies.json +25 -0
  136. package/vendor/registry/modules/faq/access/policies.multilocale.json +18 -0
  137. package/vendor/registry/modules/faq/lib.multilocale.ts +120 -0
  138. package/vendor/registry/modules/faq/lib.ts +73 -0
  139. package/vendor/registry/modules/faq/module.json +31 -0
  140. package/vendor/registry/modules/faq/schema/snapshot.json +180 -0
  141. package/vendor/registry/modules/faq/schema/snapshot.multilocale.json +116 -0
  142. package/vendor/registry/modules/faq/services/seed.json +38 -0
  143. package/vendor/registry/modules/faq/services/seed.multilocale.json +32 -0
  144. package/vendor/registry/modules/faq/types.multilocale.ts +31 -0
  145. package/vendor/registry/modules/faq/types.ts +17 -0
  146. package/vendor/registry/modules/navigation/access/policies.json +31 -0
  147. package/vendor/registry/modules/navigation/access/policies.multilocale.json +51 -0
  148. package/vendor/registry/modules/navigation/lib.multilocale.ts +198 -0
  149. package/vendor/registry/modules/navigation/lib.ts +252 -0
  150. package/vendor/registry/modules/navigation/module.json +46 -0
  151. package/vendor/registry/modules/navigation/schema/snapshot.json +453 -0
  152. package/vendor/registry/modules/navigation/schema/snapshot.multilocale.json +864 -0
  153. package/vendor/registry/modules/navigation/services/seed.json +103 -0
  154. package/vendor/registry/modules/navigation/services/seed.multilocale.json +88 -0
  155. package/vendor/registry/modules/navigation/types.multilocale.ts +60 -0
  156. package/vendor/registry/modules/navigation/types.ts +44 -0
  157. package/vendor/registry/modules/pages/access/policies.json +25 -0
  158. package/vendor/registry/modules/pages/access/policies.multilocale.json +18 -0
  159. package/vendor/registry/modules/pages/lib.multilocale.ts +166 -0
  160. package/vendor/registry/modules/pages/lib.ts +123 -0
  161. package/vendor/registry/modules/pages/module.json +39 -0
  162. package/vendor/registry/modules/pages/schema/snapshot.json +247 -0
  163. package/vendor/registry/modules/pages/schema/snapshot.multilocale.json +187 -0
  164. package/vendor/registry/modules/pages/services/seed.json +24 -0
  165. package/vendor/registry/modules/pages/services/seed.multilocale.json +34 -0
  166. package/vendor/registry/modules/pages/types.multilocale.ts +37 -0
  167. package/vendor/registry/modules/pages/types.ts +21 -0
  168. package/vendor/registry/modules/projects/access/policies.json +31 -0
  169. package/vendor/registry/modules/projects/access/policies.multilocale.json +43 -0
  170. package/vendor/registry/modules/projects/lib.multilocale.ts +111 -0
  171. package/vendor/registry/modules/projects/lib.ts +138 -0
  172. package/vendor/registry/modules/projects/module.json +48 -0
  173. package/vendor/registry/modules/projects/schema/snapshot.json +348 -0
  174. package/vendor/registry/modules/projects/schema/snapshot.multilocale.json +577 -0
  175. package/vendor/registry/modules/projects/services/ATTRIBUTION.md +7 -0
  176. package/vendor/registry/modules/projects/services/assets/brand-identity-cover.jpg +0 -0
  177. package/vendor/registry/modules/projects/services/seed.json +40 -0
  178. package/vendor/registry/modules/projects/services/seed.multilocale.json +31 -0
  179. package/vendor/registry/modules/projects/types.multilocale.ts +38 -0
  180. package/vendor/registry/modules/projects/types.ts +28 -0
  181. package/vendor/registry/modules/services/access/policies.json +31 -0
  182. package/vendor/registry/modules/services/access/policies.multilocale.json +43 -0
  183. package/vendor/registry/modules/services/lib.multilocale.ts +109 -0
  184. package/vendor/registry/modules/services/lib.ts +134 -0
  185. package/vendor/registry/modules/services/module.json +47 -0
  186. package/vendor/registry/modules/services/schema/snapshot.json +305 -0
  187. package/vendor/registry/modules/services/schema/snapshot.multilocale.json +510 -0
  188. package/vendor/registry/modules/services/services/ATTRIBUTION.md +8 -0
  189. package/vendor/registry/modules/services/services/assets/design-development.jpg +0 -0
  190. package/vendor/registry/modules/services/services/assets/strategy-consulting.jpg +0 -0
  191. package/vendor/registry/modules/services/services/seed.json +44 -0
  192. package/vendor/registry/modules/services/services/seed.multilocale.json +31 -0
  193. package/vendor/registry/modules/services/types.multilocale.ts +36 -0
  194. package/vendor/registry/modules/services/types.ts +26 -0
  195. package/vendor/registry/modules/settings/access/policies.json +31 -0
  196. package/vendor/registry/modules/settings/access/policies.multilocale.json +43 -0
  197. package/vendor/registry/modules/settings/lib.multilocale.ts +158 -0
  198. package/vendor/registry/modules/settings/lib.ts +259 -0
  199. package/vendor/registry/modules/settings/module.json +33 -0
  200. package/vendor/registry/modules/settings/schema/snapshot.json +315 -0
  201. package/vendor/registry/modules/settings/schema/snapshot.multilocale.json +586 -0
  202. package/vendor/registry/modules/settings/services/assets/dkit-logo.svg +4 -0
  203. package/vendor/registry/modules/settings/services/seed.json +31 -0
  204. package/vendor/registry/modules/settings/services/seed.multilocale.json +42 -0
  205. package/vendor/registry/modules/settings/types.multilocale.ts +72 -0
  206. package/vendor/registry/modules/settings/types.ts +94 -0
  207. package/vendor/registry/modules/team/access/policies.json +31 -0
  208. package/vendor/registry/modules/team/access/policies.multilocale.json +43 -0
  209. package/vendor/registry/modules/team/lib.multilocale.ts +88 -0
  210. package/vendor/registry/modules/team/lib.ts +120 -0
  211. package/vendor/registry/modules/team/module.json +47 -0
  212. package/vendor/registry/modules/team/schema/snapshot.json +295 -0
  213. package/vendor/registry/modules/team/schema/snapshot.multilocale.json +525 -0
  214. package/vendor/registry/modules/team/services/ATTRIBUTION.md +8 -0
  215. package/vendor/registry/modules/team/services/assets/morgan-lee-photo.jpg +0 -0
  216. package/vendor/registry/modules/team/services/assets/taylor-kim-photo.jpg +0 -0
  217. package/vendor/registry/modules/team/services/seed.json +52 -0
  218. package/vendor/registry/modules/team/services/seed.multilocale.json +30 -0
  219. package/vendor/registry/modules/team/types.multilocale.ts +33 -0
  220. package/vendor/registry/modules/team/types.ts +27 -0
  221. package/vendor/registry/modules/testimonials/access/policies.json +31 -0
  222. package/vendor/registry/modules/testimonials/access/policies.multilocale.json +43 -0
  223. package/vendor/registry/modules/testimonials/lib.multilocale.ts +93 -0
  224. package/vendor/registry/modules/testimonials/lib.ts +85 -0
  225. package/vendor/registry/modules/testimonials/module.json +41 -0
  226. package/vendor/registry/modules/testimonials/schema/snapshot.json +248 -0
  227. package/vendor/registry/modules/testimonials/schema/snapshot.multilocale.json +462 -0
  228. package/vendor/registry/modules/testimonials/services/ATTRIBUTION.md +8 -0
  229. package/vendor/registry/modules/testimonials/services/assets/jane-doe-avatar.jpg +0 -0
  230. package/vendor/registry/modules/testimonials/services/assets/sample-author-avatar.jpg +0 -0
  231. package/vendor/registry/modules/testimonials/services/seed.json +49 -0
  232. package/vendor/registry/modules/testimonials/services/seed.multilocale.json +30 -0
  233. package/vendor/registry/modules/testimonials/types.multilocale.ts +27 -0
  234. package/vendor/registry/modules/testimonials/types.ts +22 -0
  235. package/vendor/registry/registry.json +832 -0
  236. package/vendor/registry/shared/helpers.ts +16 -0
  237. package/vendor/registry/shared/i18n.ts +74 -0
  238. package/vendor/registry/shared/minimal.css +83 -0
  239. package/vendor/registry/shared/paths.ts +50 -0
  240. package/vendor/registry/shared/prose.css +113 -0
  241. package/vendor/registry/tsconfig.json +49 -0
@@ -0,0 +1,701 @@
1
+ {
2
+ "format": "dkit.rest",
3
+ "collections": [
4
+ {
5
+ "collection": "blog",
6
+ "schema": null,
7
+ "meta": {
8
+ "icon": "auto_stories",
9
+ "color": "#0F766E",
10
+ "collapse": "open",
11
+ "translations": [
12
+ {
13
+ "language": "en-US",
14
+ "translation": "Blog",
15
+ "singular": "Blog",
16
+ "plural": "Blog"
17
+ }
18
+ ]
19
+ }
20
+ },
21
+ {
22
+ "collection": "authors",
23
+ "schema": {},
24
+ "meta": {
25
+ "icon": "person",
26
+ "color": "#0F766E",
27
+ "group": "blog",
28
+ "display_template": "{{name}}",
29
+ "archive_field": null,
30
+ "singleton": false,
31
+ "sort": 2,
32
+ "translations": [
33
+ {
34
+ "language": "en-US",
35
+ "translation": "Authors",
36
+ "singular": "Author",
37
+ "plural": "Authors"
38
+ }
39
+ ],
40
+ "note": "People who write blog posts"
41
+ },
42
+ "fields": [
43
+ {
44
+ "field": "id",
45
+ "type": "uuid",
46
+ "meta": {
47
+ "hidden": true,
48
+ "readonly": true,
49
+ "interface": "input",
50
+ "special": ["uuid"],
51
+ "sort": 1,
52
+ "width": "full",
53
+ "translations": [
54
+ { "language": "en-US", "translation": "ID" }
55
+ ]
56
+ },
57
+ "schema": {
58
+ "is_primary_key": true,
59
+ "length": 36,
60
+ "has_auto_increment": false
61
+ }
62
+ },
63
+ {
64
+ "field": "status",
65
+ "type": "string",
66
+ "meta": {
67
+ "interface": "select-dropdown",
68
+ "display": "labels",
69
+ "width": "half",
70
+ "sort": 2,
71
+ "options": {
72
+ "choices": [
73
+ { "text": "Published", "value": "published" },
74
+ { "text": "Draft", "value": "draft" }
75
+ ]
76
+ },
77
+ "display_options": {
78
+ "choices": [
79
+ {
80
+ "text": "Published",
81
+ "value": "published",
82
+ "foreground": "#FFFFFF",
83
+ "background": "#0F766E"
84
+ },
85
+ {
86
+ "text": "Draft",
87
+ "value": "draft",
88
+ "foreground": "#44403C",
89
+ "background": "#E7E5E4"
90
+ }
91
+ ]
92
+ },
93
+ "translations": [
94
+ { "language": "en-US", "translation": "Status" }
95
+ ],
96
+ "note": "Only published authors appear on the public site",
97
+ "validation": {
98
+ "_and": [{ "status": { "_in": ["published", "draft"] } }]
99
+ },
100
+ "validation_message": "Choose Published or Draft."
101
+ },
102
+ "schema": { "default_value": "draft", "is_nullable": false }
103
+ },
104
+ {
105
+ "field": "name",
106
+ "type": "string",
107
+ "meta": {
108
+ "interface": "input",
109
+ "required": true,
110
+ "width": "half",
111
+ "sort": 3,
112
+ "options": { "trim": true },
113
+ "translations": [
114
+ { "language": "en-US", "translation": "Name" }
115
+ ],
116
+ "note": "Display name shown on posts",
117
+ "validation": {
118
+ "_and": [{ "name": { "_regex": "^.{1,120}$" } }]
119
+ },
120
+ "validation_message": "Name is required (max 120 characters)."
121
+ },
122
+ "schema": { "is_nullable": false, "max_length": 120 }
123
+ },
124
+ {
125
+ "field": "slug",
126
+ "type": "string",
127
+ "meta": {
128
+ "interface": "input",
129
+ "required": true,
130
+ "width": "half",
131
+ "sort": 4,
132
+ "options": { "trim": true, "slug": true },
133
+ "translations": [
134
+ { "language": "en-US", "translation": "Slug" }
135
+ ],
136
+ "note": "URL-friendly identifier (unique)",
137
+ "validation": {
138
+ "_and": [
139
+ {
140
+ "slug": {
141
+ "_regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
142
+ }
143
+ }
144
+ ]
145
+ },
146
+ "validation_message": "Use lowercase letters, numbers, and hyphens only."
147
+ },
148
+ "schema": { "is_nullable": false, "is_unique": true, "max_length": 120 }
149
+ },
150
+ {
151
+ "field": "avatar",
152
+ "type": "uuid",
153
+ "meta": {
154
+ "interface": "file-image",
155
+ "special": ["file"],
156
+ "display": "image",
157
+ "width": "half",
158
+ "sort": 5,
159
+ "translations": [
160
+ { "language": "en-US", "translation": "Avatar" }
161
+ ],
162
+ "note": "Author profile photo shown next to bylines"
163
+ },
164
+ "schema": {}
165
+ },
166
+ {
167
+ "field": "bio",
168
+ "type": "text",
169
+ "meta": {
170
+ "interface": "input-multiline",
171
+ "width": "full",
172
+ "sort": 6,
173
+ "translations": [
174
+ { "language": "en-US", "translation": "Bio" }
175
+ ],
176
+ "note": "Short author biography"
177
+ },
178
+ "schema": {}
179
+ }
180
+ ]
181
+ },
182
+ {
183
+ "collection": "categories",
184
+ "schema": {},
185
+ "meta": {
186
+ "icon": "sell",
187
+ "color": "#0F766E",
188
+ "group": "blog",
189
+ "display_template": "{{title}}",
190
+ "sort": 3,
191
+ "translations": [
192
+ {
193
+ "language": "en-US",
194
+ "translation": "Categories",
195
+ "singular": "Category",
196
+ "plural": "Categories"
197
+ }
198
+ ],
199
+ "note": "Topics used to organize posts"
200
+ },
201
+ "fields": [
202
+ {
203
+ "field": "id",
204
+ "type": "uuid",
205
+ "meta": {
206
+ "hidden": true,
207
+ "readonly": true,
208
+ "interface": "input",
209
+ "special": ["uuid"],
210
+ "sort": 1,
211
+ "width": "full",
212
+ "translations": [
213
+ { "language": "en-US", "translation": "ID" }
214
+ ]
215
+ },
216
+ "schema": {
217
+ "is_primary_key": true,
218
+ "length": 36,
219
+ "has_auto_increment": false
220
+ }
221
+ },
222
+ {
223
+ "field": "title",
224
+ "type": "string",
225
+ "meta": {
226
+ "interface": "input",
227
+ "required": true,
228
+ "width": "half",
229
+ "sort": 2,
230
+ "options": { "trim": true },
231
+ "translations": [
232
+ { "language": "en-US", "translation": "Title" }
233
+ ],
234
+ "validation": {
235
+ "_and": [{ "title": { "_regex": "^.{1,120}$" } }]
236
+ },
237
+ "validation_message": "Title is required (max 120 characters)."
238
+ },
239
+ "schema": { "is_nullable": false, "max_length": 120 }
240
+ },
241
+ {
242
+ "field": "slug",
243
+ "type": "string",
244
+ "meta": {
245
+ "interface": "input",
246
+ "required": true,
247
+ "width": "half",
248
+ "sort": 3,
249
+ "options": { "trim": true, "slug": true },
250
+ "translations": [
251
+ { "language": "en-US", "translation": "Slug" }
252
+ ],
253
+ "note": "URL-friendly identifier (unique)",
254
+ "validation": {
255
+ "_and": [
256
+ {
257
+ "slug": {
258
+ "_regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
259
+ }
260
+ }
261
+ ]
262
+ },
263
+ "validation_message": "Use lowercase letters, numbers, and hyphens only."
264
+ },
265
+ "schema": { "is_nullable": false, "is_unique": true, "max_length": 120 }
266
+ }
267
+ ]
268
+ },
269
+ {
270
+ "collection": "posts",
271
+ "schema": {},
272
+ "meta": {
273
+ "icon": "article",
274
+ "color": "#0F766E",
275
+ "group": "blog",
276
+ "display_template": "{{title}}",
277
+ "archive_field": "status",
278
+ "archive_value": "archived",
279
+ "unarchive_value": "draft",
280
+ "archive_app_filter": true,
281
+ "sort": 1,
282
+ "translations": [
283
+ {
284
+ "language": "en-US",
285
+ "translation": "Posts",
286
+ "singular": "Post",
287
+ "plural": "Posts"
288
+ }
289
+ ],
290
+ "note": "Blog articles published to the site"
291
+ },
292
+ "fields": [
293
+ {
294
+ "field": "id",
295
+ "type": "uuid",
296
+ "meta": {
297
+ "hidden": true,
298
+ "readonly": true,
299
+ "interface": "input",
300
+ "special": ["uuid"],
301
+ "sort": 1,
302
+ "width": "full",
303
+ "translations": [
304
+ { "language": "en-US", "translation": "ID" }
305
+ ]
306
+ },
307
+ "schema": {
308
+ "is_primary_key": true,
309
+ "length": 36,
310
+ "has_auto_increment": false
311
+ }
312
+ },
313
+ {
314
+ "field": "status",
315
+ "type": "string",
316
+ "meta": {
317
+ "interface": "select-dropdown",
318
+ "display": "labels",
319
+ "width": "half",
320
+ "sort": 2,
321
+ "options": {
322
+ "choices": [
323
+ { "text": "Published", "value": "published" },
324
+ { "text": "Draft", "value": "draft" },
325
+ { "text": "Archived", "value": "archived" }
326
+ ]
327
+ },
328
+ "display_options": {
329
+ "choices": [
330
+ {
331
+ "text": "Published",
332
+ "value": "published",
333
+ "foreground": "#FFFFFF",
334
+ "background": "#0F766E"
335
+ },
336
+ {
337
+ "text": "Draft",
338
+ "value": "draft",
339
+ "foreground": "#44403C",
340
+ "background": "#E7E5E4"
341
+ },
342
+ {
343
+ "text": "Archived",
344
+ "value": "archived",
345
+ "foreground": "#FFFFFF",
346
+ "background": "#A8A29E"
347
+ }
348
+ ]
349
+ },
350
+ "translations": [
351
+ { "language": "en-US", "translation": "Status" }
352
+ ],
353
+ "note": "Only published posts appear on the public site",
354
+ "validation": {
355
+ "_and": [
356
+ {
357
+ "status": {
358
+ "_in": ["published", "draft", "archived"]
359
+ }
360
+ }
361
+ ]
362
+ },
363
+ "validation_message": "Choose Published, Draft, or Archived."
364
+ },
365
+ "schema": { "default_value": "draft", "is_nullable": false }
366
+ },
367
+ {
368
+ "field": "published_at",
369
+ "type": "timestamp",
370
+ "meta": {
371
+ "interface": "datetime",
372
+ "display": "datetime",
373
+ "width": "half",
374
+ "sort": 3,
375
+ "special": ["date-created"],
376
+ "readonly": false,
377
+ "translations": [
378
+ { "language": "en-US", "translation": "Published at" }
379
+ ],
380
+ "note": "Auto-filled on create; change freely for backdating or scheduling",
381
+ "conditions": [
382
+ {
383
+ "name": "Required when published",
384
+ "rule": {
385
+ "_and": [{ "status": { "_eq": "published" } }]
386
+ },
387
+ "required": true
388
+ }
389
+ ]
390
+ },
391
+ "schema": {}
392
+ },
393
+ {
394
+ "field": "title",
395
+ "type": "string",
396
+ "meta": {
397
+ "interface": "input",
398
+ "required": true,
399
+ "width": "full",
400
+ "sort": 4,
401
+ "options": { "trim": true },
402
+ "translations": [
403
+ { "language": "en-US", "translation": "Title" }
404
+ ],
405
+ "validation": {
406
+ "_and": [{ "title": { "_regex": "^.{1,200}$" } }]
407
+ },
408
+ "validation_message": "Title is required (max 200 characters)."
409
+ },
410
+ "schema": { "is_nullable": false, "max_length": 200 }
411
+ },
412
+ {
413
+ "field": "slug",
414
+ "type": "string",
415
+ "meta": {
416
+ "interface": "input",
417
+ "required": true,
418
+ "width": "half",
419
+ "sort": 5,
420
+ "options": { "trim": true, "slug": true },
421
+ "translations": [
422
+ { "language": "en-US", "translation": "Slug" }
423
+ ],
424
+ "note": "Used in the post URL",
425
+ "validation": {
426
+ "_and": [
427
+ {
428
+ "slug": {
429
+ "_regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
430
+ }
431
+ }
432
+ ]
433
+ },
434
+ "validation_message": "Use lowercase letters, numbers, and hyphens only."
435
+ },
436
+ "schema": { "is_nullable": false, "is_unique": true, "max_length": 200 }
437
+ },
438
+ {
439
+ "field": "author",
440
+ "type": "uuid",
441
+ "meta": {
442
+ "interface": "select-dropdown-m2o",
443
+ "special": ["m2o"],
444
+ "display": "related-values",
445
+ "display_options": {
446
+ "template": "{{name}}"
447
+ },
448
+ "width": "half",
449
+ "sort": 6,
450
+ "translations": [
451
+ { "language": "en-US", "translation": "Author" }
452
+ ],
453
+ "note": "Primary author of this post",
454
+ "conditions": [
455
+ {
456
+ "name": "Required when published",
457
+ "rule": {
458
+ "_and": [{ "status": { "_eq": "published" } }]
459
+ },
460
+ "required": true
461
+ }
462
+ ]
463
+ },
464
+ "schema": {}
465
+ },
466
+ {
467
+ "field": "featured_image",
468
+ "type": "uuid",
469
+ "meta": {
470
+ "interface": "file-image",
471
+ "special": ["file"],
472
+ "display": "image",
473
+ "width": "half",
474
+ "sort": 7,
475
+ "translations": [
476
+ { "language": "en-US", "translation": "Featured image" }
477
+ ],
478
+ "note": "Cover image shown on list and detail pages"
479
+ },
480
+ "schema": {}
481
+ },
482
+ {
483
+ "field": "categories",
484
+ "type": "alias",
485
+ "meta": {
486
+ "interface": "list-m2m",
487
+ "special": ["m2m"],
488
+ "width": "full",
489
+ "sort": 8,
490
+ "options": {
491
+ "enableCreate": true,
492
+ "enableSelect": true,
493
+ "template": "{{categories_id.title}}"
494
+ },
495
+ "translations": [
496
+ { "language": "en-US", "translation": "Categories" }
497
+ ],
498
+ "note": "Optional topics for this post"
499
+ },
500
+ "schema": null
501
+ },
502
+ {
503
+ "field": "excerpt",
504
+ "type": "text",
505
+ "meta": {
506
+ "interface": "input-multiline",
507
+ "width": "full",
508
+ "sort": 9,
509
+ "translations": [
510
+ { "language": "en-US", "translation": "Excerpt" }
511
+ ],
512
+ "note": "Short summary shown on listing pages",
513
+ "validation": {
514
+ "_and": [
515
+ {
516
+ "_or": [
517
+ { "excerpt": { "_null": true } },
518
+ { "excerpt": { "_empty": true } },
519
+ { "excerpt": { "_regex": "^[\\s\\S]{1,500}$" } }
520
+ ]
521
+ }
522
+ ]
523
+ },
524
+ "validation_message": "Excerpt must be at most 500 characters."
525
+ },
526
+ "schema": {}
527
+ },
528
+ {
529
+ "field": "body",
530
+ "type": "text",
531
+ "meta": {
532
+ "interface": "input-rich-text-html",
533
+ "width": "fill",
534
+ "sort": 10,
535
+ "options": {
536
+ "toolbar": [
537
+ "bold",
538
+ "italic",
539
+ "underline",
540
+ "h2",
541
+ "h3",
542
+ "numlist",
543
+ "bullist",
544
+ "blockquote",
545
+ "link",
546
+ "code",
547
+ "empty"
548
+ ]
549
+ },
550
+ "translations": [
551
+ { "language": "en-US", "translation": "Body" }
552
+ ],
553
+ "note": "Main post content",
554
+ "conditions": [
555
+ {
556
+ "name": "Required when published",
557
+ "rule": {
558
+ "_and": [{ "status": { "_eq": "published" } }]
559
+ },
560
+ "required": true
561
+ }
562
+ ]
563
+ },
564
+ "schema": {}
565
+ }
566
+ ]
567
+ },
568
+ {
569
+ "collection": "posts_categories",
570
+ "schema": {},
571
+ "meta": {
572
+ "hidden": true,
573
+ "icon": "import_export",
574
+ "group": "blog",
575
+ "translations": [
576
+ {
577
+ "language": "en-US",
578
+ "translation": "Posts ↔ Categories",
579
+ "singular": "Post category link",
580
+ "plural": "Post category links"
581
+ }
582
+ ]
583
+ },
584
+ "fields": [
585
+ {
586
+ "field": "id",
587
+ "type": "integer",
588
+ "meta": {
589
+ "hidden": true,
590
+ "interface": "input",
591
+ "sort": 1,
592
+ "width": "full",
593
+ "translations": [
594
+ { "language": "en-US", "translation": "ID" }
595
+ ]
596
+ },
597
+ "schema": {
598
+ "is_primary_key": true,
599
+ "has_auto_increment": true
600
+ }
601
+ },
602
+ {
603
+ "field": "posts_id",
604
+ "type": "uuid",
605
+ "meta": {
606
+ "hidden": true,
607
+ "sort": 2,
608
+ "width": "half",
609
+ "translations": [
610
+ { "language": "en-US", "translation": "Post" }
611
+ ]
612
+ },
613
+ "schema": {}
614
+ },
615
+ {
616
+ "field": "categories_id",
617
+ "type": "uuid",
618
+ "meta": {
619
+ "hidden": true,
620
+ "sort": 3,
621
+ "width": "half",
622
+ "translations": [
623
+ { "language": "en-US", "translation": "Category" }
624
+ ]
625
+ },
626
+ "schema": {}
627
+ }
628
+ ]
629
+ }
630
+ ],
631
+ "relations": [
632
+ {
633
+ "collection": "posts",
634
+ "field": "author",
635
+ "related_collection": "authors",
636
+ "meta": {
637
+ "many_collection": "posts",
638
+ "many_field": "author",
639
+ "one_collection": "authors",
640
+ "one_field": null
641
+ },
642
+ "schema": {
643
+ "on_delete": "SET NULL"
644
+ }
645
+ },
646
+ {
647
+ "collection": "authors",
648
+ "field": "avatar",
649
+ "related_collection": "directus_files",
650
+ "meta": {
651
+ "many_collection": "authors",
652
+ "many_field": "avatar",
653
+ "one_collection": "directus_files",
654
+ "one_field": null
655
+ },
656
+ "schema": {
657
+ "on_delete": "SET NULL"
658
+ }
659
+ },
660
+ {
661
+ "collection": "posts",
662
+ "field": "featured_image",
663
+ "related_collection": "directus_files",
664
+ "meta": {
665
+ "many_collection": "posts",
666
+ "many_field": "featured_image",
667
+ "one_collection": "directus_files",
668
+ "one_field": null
669
+ },
670
+ "schema": {
671
+ "on_delete": "SET NULL"
672
+ }
673
+ },
674
+ {
675
+ "collection": "posts_categories",
676
+ "field": "posts_id",
677
+ "related_collection": "posts",
678
+ "meta": {
679
+ "many_collection": "posts_categories",
680
+ "many_field": "posts_id",
681
+ "one_collection": "posts",
682
+ "one_field": "categories",
683
+ "junction_field": "categories_id"
684
+ },
685
+ "schema": { "on_delete": "CASCADE" }
686
+ },
687
+ {
688
+ "collection": "posts_categories",
689
+ "field": "categories_id",
690
+ "related_collection": "categories",
691
+ "meta": {
692
+ "many_collection": "posts_categories",
693
+ "many_field": "categories_id",
694
+ "one_collection": "categories",
695
+ "one_field": null,
696
+ "junction_field": "posts_id"
697
+ },
698
+ "schema": { "on_delete": "CASCADE" }
699
+ }
700
+ ]
701
+ }