@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,67 @@
1
+ "use server";
2
+
3
+ import { createItem, getDirectus } from "@/lib/dkit/client";
4
+ import { z } from "zod";
5
+ import { collections } from "@/lib/dkit/config";
6
+ import type {
7
+ ContactFormState,
8
+ FormSubmission,
9
+ FormSubmissionInput,
10
+ } from "./types";
11
+
12
+ export type {
13
+ ContactFormState,
14
+ FormSubmission,
15
+ FormSubmissionInput,
16
+ } from "./types";
17
+
18
+ const schema = z.object({
19
+ name: z.string().min(1).max(120),
20
+ email: z.string().email().max(200),
21
+ message: z.string().min(1).max(5000),
22
+ });
23
+
24
+ /** Create a contact-form submission (inbox). Prefer submitContactForm from UI. */
25
+ export async function createContactSubmission(
26
+ input: FormSubmissionInput,
27
+ ): Promise<{ ok: true; id?: string } | { ok: false; error: string }> {
28
+ const parsed = schema.safeParse(input);
29
+ if (!parsed.success) {
30
+ return {
31
+ ok: false,
32
+ error: parsed.error.issues[0]?.message ?? "Invalid input",
33
+ };
34
+ }
35
+
36
+ const client = getDirectus();
37
+ if (!client) return { ok: false, error: "Missing DIRECTUS_URL" };
38
+
39
+ try {
40
+ const row = await client.request(
41
+ createItem(collections.form_submissions, parsed.data),
42
+ );
43
+ return { ok: true, id: (row as FormSubmission)?.id };
44
+ } catch (e) {
45
+ return {
46
+ ok: false,
47
+ error: e instanceof Error ? e.message : "Submission failed",
48
+ };
49
+ }
50
+ }
51
+
52
+ /** Server Action for the contact form UI. */
53
+ export async function submitContactForm(
54
+ _prev: ContactFormState,
55
+ formData: FormData,
56
+ ): Promise<ContactFormState> {
57
+ const result = await createContactSubmission({
58
+ name: String(formData.get("name") ?? ""),
59
+ email: String(formData.get("email") ?? ""),
60
+ message: String(formData.get("message") ?? ""),
61
+ });
62
+ if (!result.ok) return { ok: false, error: result.error };
63
+ return { ok: true };
64
+ }
65
+
66
+ /** @deprecated prefer createContactSubmission */
67
+ export const createSubmission = createContactSubmission;
@@ -0,0 +1,32 @@
1
+ {
2
+ "type": "dkit:module",
3
+ "id": "contact-form",
4
+ "title": "Contact form",
5
+ "description": "Public form → Directus inbox. Optional email notify if Directus mail is configured.",
6
+ "version": "0.1.0",
7
+ "directus": {
8
+ "min": "11.0.0"
9
+ },
10
+ "dependencies": [
11
+ "@directus/sdk",
12
+ "zod"
13
+ ],
14
+ "layers": [
15
+ "schema",
16
+ "access",
17
+ "services",
18
+ "types"
19
+ ],
20
+ "defaultBlocks": [
21
+ "contact-form-ui"
22
+ ],
23
+ "collections": [
24
+ "site",
25
+ "form_submissions"
26
+ ],
27
+ "defaultBasePath": "/contact",
28
+ "multilocale": {
29
+ "supported": true,
30
+ "mode": "submission-locale"
31
+ }
32
+ }
@@ -0,0 +1,193 @@
1
+ {
2
+ "format": "dkit.rest",
3
+ "collections": [
4
+ {
5
+ "collection": "site",
6
+ "schema": null,
7
+ "meta": {
8
+ "icon": "web",
9
+ "color": "#0F766E",
10
+ "collapse": "open",
11
+ "translations": [
12
+ {
13
+ "language": "en-US",
14
+ "translation": "Site",
15
+ "singular": "Site",
16
+ "plural": "Site"
17
+ }
18
+ ],
19
+ "note": "Site content and chrome — pages, settings, navigation, contact, page builder"
20
+ }
21
+ },
22
+ {
23
+ "collection": "form_submissions",
24
+ "schema": {},
25
+ "meta": {
26
+ "icon": "inbox",
27
+ "color": "#0F766E",
28
+ "group": "site",
29
+ "display_template": "{{name}} — {{email}}",
30
+ "archive_field": "status",
31
+ "archive_value": "archived",
32
+ "unarchive_value": "new",
33
+ "archive_app_filter": true,
34
+ "sort": 10,
35
+ "translations": [
36
+ {
37
+ "language": "en-US",
38
+ "translation": "Form submissions",
39
+ "singular": "Submission",
40
+ "plural": "Submissions"
41
+ }
42
+ ],
43
+ "note": "Stored in Directus as an inbox. Wire the optional notify flow only if email is configured."
44
+ },
45
+ "fields": [
46
+ {
47
+ "field": "id",
48
+ "type": "uuid",
49
+ "meta": {
50
+ "hidden": true,
51
+ "readonly": true,
52
+ "interface": "input",
53
+ "special": ["uuid"],
54
+ "sort": 1,
55
+ "width": "full",
56
+ "translations": [{ "language": "en-US", "translation": "ID" }]
57
+ },
58
+ "schema": {
59
+ "is_primary_key": true,
60
+ "length": 36,
61
+ "has_auto_increment": false
62
+ }
63
+ },
64
+ {
65
+ "field": "status",
66
+ "type": "string",
67
+ "meta": {
68
+ "interface": "select-dropdown",
69
+ "display": "labels",
70
+ "width": "half",
71
+ "sort": 2,
72
+ "options": {
73
+ "choices": [
74
+ { "text": "New", "value": "new" },
75
+ { "text": "Read", "value": "read" },
76
+ { "text": "Archived", "value": "archived" }
77
+ ]
78
+ },
79
+ "display_options": {
80
+ "choices": [
81
+ {
82
+ "text": "New",
83
+ "value": "new",
84
+ "foreground": "#FFFFFF",
85
+ "background": "#0F766E"
86
+ },
87
+ {
88
+ "text": "Read",
89
+ "value": "read",
90
+ "foreground": "#44403C",
91
+ "background": "#E7E5E4"
92
+ },
93
+ {
94
+ "text": "Archived",
95
+ "value": "archived",
96
+ "foreground": "#FFFFFF",
97
+ "background": "#A8A29E"
98
+ }
99
+ ]
100
+ },
101
+ "translations": [{ "language": "en-US", "translation": "Status" }],
102
+ "note": "Inbox triage in the Directus dashboard",
103
+ "validation": {
104
+ "_and": [{ "status": { "_in": ["new", "read", "archived"] } }]
105
+ },
106
+ "validation_message": "Choose New, Read, or Archived."
107
+ },
108
+ "schema": { "default_value": "new", "is_nullable": false }
109
+ },
110
+ {
111
+ "field": "created_at",
112
+ "type": "timestamp",
113
+ "meta": {
114
+ "interface": "datetime",
115
+ "display": "datetime",
116
+ "special": ["date-created"],
117
+ "readonly": true,
118
+ "width": "half",
119
+ "sort": 3,
120
+ "translations": [
121
+ { "language": "en-US", "translation": "Received at" }
122
+ ],
123
+ "note": "Set automatically when the submission is created"
124
+ },
125
+ "schema": {}
126
+ },
127
+ {
128
+ "field": "name",
129
+ "type": "string",
130
+ "meta": {
131
+ "interface": "input",
132
+ "required": true,
133
+ "width": "half",
134
+ "sort": 4,
135
+ "options": { "trim": true },
136
+ "translations": [{ "language": "en-US", "translation": "Name" }],
137
+ "validation": {
138
+ "_and": [{ "name": { "_regex": "^.{1,120}$" } }]
139
+ },
140
+ "validation_message": "Name is required (max 120 characters)."
141
+ },
142
+ "schema": { "is_nullable": false, "max_length": 120 }
143
+ },
144
+ {
145
+ "field": "email",
146
+ "type": "string",
147
+ "meta": {
148
+ "interface": "input",
149
+ "required": true,
150
+ "width": "half",
151
+ "sort": 5,
152
+ "options": {
153
+ "trim": true,
154
+ "placeholder": "name@example.com",
155
+ "iconLeft": "email"
156
+ },
157
+ "translations": [{ "language": "en-US", "translation": "Email" }],
158
+ "note": "Reply-to address",
159
+ "validation": {
160
+ "_and": [
161
+ {
162
+ "email": {
163
+ "_regex": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
164
+ }
165
+ }
166
+ ]
167
+ },
168
+ "validation_message": "Enter a valid email address."
169
+ },
170
+ "schema": { "is_nullable": false, "max_length": 200 }
171
+ },
172
+ {
173
+ "field": "message",
174
+ "type": "text",
175
+ "meta": {
176
+ "interface": "input-multiline",
177
+ "required": true,
178
+ "width": "full",
179
+ "sort": 6,
180
+ "options": { "trim": true },
181
+ "translations": [{ "language": "en-US", "translation": "Message" }],
182
+ "validation": {
183
+ "_and": [{ "message": { "_regex": "^[\\s\\S]{1,5000}$" } }]
184
+ },
185
+ "validation_message": "Message is required (max 5000 characters)."
186
+ },
187
+ "schema": { "is_nullable": false }
188
+ }
189
+ ]
190
+ }
191
+ ],
192
+ "relations": []
193
+ }
@@ -0,0 +1,293 @@
1
+ {
2
+ "format": "dkit.rest",
3
+ "collections": [
4
+ {
5
+ "collection": "site",
6
+ "schema": null,
7
+ "meta": {
8
+ "icon": "web",
9
+ "color": "#0F766E",
10
+ "collapse": "open",
11
+ "translations": [
12
+ {
13
+ "language": "en-US",
14
+ "translation": "Site",
15
+ "singular": "Site",
16
+ "plural": "Site"
17
+ }
18
+ ],
19
+ "note": "Site content and chrome — pages, settings, navigation, contact, page builder"
20
+ }
21
+ },
22
+ {
23
+ "collection": "form_submissions",
24
+ "schema": {},
25
+ "meta": {
26
+ "icon": "inbox",
27
+ "color": "#0F766E",
28
+ "group": "site",
29
+ "display_template": "{{name}} — {{email}}",
30
+ "archive_field": "status",
31
+ "archive_value": "archived",
32
+ "unarchive_value": "new",
33
+ "archive_app_filter": true,
34
+ "sort": 10,
35
+ "translations": [
36
+ {
37
+ "language": "en-US",
38
+ "translation": "Form submissions",
39
+ "singular": "Submission",
40
+ "plural": "Submissions"
41
+ }
42
+ ],
43
+ "note": "Stored in Directus as an inbox. Wire the optional notify flow only if email is configured."
44
+ },
45
+ "fields": [
46
+ {
47
+ "field": "id",
48
+ "type": "uuid",
49
+ "meta": {
50
+ "hidden": true,
51
+ "readonly": true,
52
+ "interface": "input",
53
+ "special": [
54
+ "uuid"
55
+ ],
56
+ "sort": 1,
57
+ "width": "full",
58
+ "translations": [
59
+ {
60
+ "language": "en-US",
61
+ "translation": "ID"
62
+ }
63
+ ]
64
+ },
65
+ "schema": {
66
+ "is_primary_key": true,
67
+ "length": 36,
68
+ "has_auto_increment": false
69
+ }
70
+ },
71
+ {
72
+ "field": "status",
73
+ "type": "string",
74
+ "meta": {
75
+ "interface": "select-dropdown",
76
+ "display": "labels",
77
+ "width": "half",
78
+ "sort": 2,
79
+ "options": {
80
+ "choices": [
81
+ {
82
+ "text": "New",
83
+ "value": "new"
84
+ },
85
+ {
86
+ "text": "Read",
87
+ "value": "read"
88
+ },
89
+ {
90
+ "text": "Archived",
91
+ "value": "archived"
92
+ }
93
+ ]
94
+ },
95
+ "display_options": {
96
+ "choices": [
97
+ {
98
+ "text": "New",
99
+ "value": "new",
100
+ "foreground": "#FFFFFF",
101
+ "background": "#0F766E"
102
+ },
103
+ {
104
+ "text": "Read",
105
+ "value": "read",
106
+ "foreground": "#44403C",
107
+ "background": "#E7E5E4"
108
+ },
109
+ {
110
+ "text": "Archived",
111
+ "value": "archived",
112
+ "foreground": "#FFFFFF",
113
+ "background": "#A8A29E"
114
+ }
115
+ ]
116
+ },
117
+ "translations": [
118
+ {
119
+ "language": "en-US",
120
+ "translation": "Status"
121
+ }
122
+ ],
123
+ "note": "Inbox triage in the Directus dashboard",
124
+ "validation": {
125
+ "_and": [
126
+ {
127
+ "status": {
128
+ "_in": [
129
+ "new",
130
+ "read",
131
+ "archived"
132
+ ]
133
+ }
134
+ }
135
+ ]
136
+ },
137
+ "validation_message": "Choose New, Read, or Archived."
138
+ },
139
+ "schema": {
140
+ "default_value": "new",
141
+ "is_nullable": false
142
+ }
143
+ },
144
+ {
145
+ "field": "created_at",
146
+ "type": "timestamp",
147
+ "meta": {
148
+ "interface": "datetime",
149
+ "display": "datetime",
150
+ "special": [
151
+ "date-created"
152
+ ],
153
+ "readonly": true,
154
+ "width": "half",
155
+ "sort": 3,
156
+ "translations": [
157
+ {
158
+ "language": "en-US",
159
+ "translation": "Received at"
160
+ }
161
+ ],
162
+ "note": "Set automatically when the submission is created"
163
+ },
164
+ "schema": {}
165
+ },
166
+ {
167
+ "field": "name",
168
+ "type": "string",
169
+ "meta": {
170
+ "interface": "input",
171
+ "required": true,
172
+ "width": "half",
173
+ "sort": 4,
174
+ "options": {
175
+ "trim": true
176
+ },
177
+ "translations": [
178
+ {
179
+ "language": "en-US",
180
+ "translation": "Name"
181
+ }
182
+ ],
183
+ "validation": {
184
+ "_and": [
185
+ {
186
+ "name": {
187
+ "_regex": "^.{1,120}$"
188
+ }
189
+ }
190
+ ]
191
+ },
192
+ "validation_message": "Name is required (max 120 characters)."
193
+ },
194
+ "schema": {
195
+ "is_nullable": false,
196
+ "max_length": 120
197
+ }
198
+ },
199
+ {
200
+ "field": "email",
201
+ "type": "string",
202
+ "meta": {
203
+ "interface": "input",
204
+ "required": true,
205
+ "width": "half",
206
+ "sort": 5,
207
+ "options": {
208
+ "trim": true,
209
+ "placeholder": "name@example.com",
210
+ "iconLeft": "email"
211
+ },
212
+ "translations": [
213
+ {
214
+ "language": "en-US",
215
+ "translation": "Email"
216
+ }
217
+ ],
218
+ "note": "Reply-to address",
219
+ "validation": {
220
+ "_and": [
221
+ {
222
+ "email": {
223
+ "_regex": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
224
+ }
225
+ }
226
+ ]
227
+ },
228
+ "validation_message": "Enter a valid email address."
229
+ },
230
+ "schema": {
231
+ "is_nullable": false,
232
+ "max_length": 200
233
+ }
234
+ },
235
+ {
236
+ "field": "message",
237
+ "type": "text",
238
+ "meta": {
239
+ "interface": "input-multiline",
240
+ "required": true,
241
+ "width": "full",
242
+ "sort": 6,
243
+ "options": {
244
+ "trim": true
245
+ },
246
+ "translations": [
247
+ {
248
+ "language": "en-US",
249
+ "translation": "Message"
250
+ }
251
+ ],
252
+ "validation": {
253
+ "_and": [
254
+ {
255
+ "message": {
256
+ "_regex": "^[\\s\\S]{1,5000}$"
257
+ }
258
+ }
259
+ ]
260
+ },
261
+ "validation_message": "Message is required (max 5000 characters)."
262
+ },
263
+ "schema": {
264
+ "is_nullable": false
265
+ }
266
+ },
267
+ {
268
+ "field": "locale",
269
+ "type": "string",
270
+ "meta": {
271
+ "interface": "input",
272
+ "width": "half",
273
+ "sort": 7,
274
+ "options": {
275
+ "trim": true
276
+ },
277
+ "translations": [
278
+ {
279
+ "language": "en-US",
280
+ "translation": "Locale"
281
+ }
282
+ ],
283
+ "note": "BCP 47 locale of the submission (e.g. en-US)"
284
+ },
285
+ "schema": {
286
+ "max_length": 15
287
+ }
288
+ }
289
+ ]
290
+ }
291
+ ],
292
+ "relations": []
293
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "flows": [
3
+ {
4
+ "name": "dkit Contact Form Notify",
5
+ "icon": "mail",
6
+ "color": "#0F766E",
7
+ "description": "Optional: fires on new form_submissions. Inactive by default — inbox works without mail. Enable and add a Send Email operation after configuring Directus email (EMAIL_* / SMTP).",
8
+ "status": "inactive",
9
+ "trigger": "event",
10
+ "accountability": "all",
11
+ "options": {
12
+ "type": "action",
13
+ "scope": ["items.create"],
14
+ "collections": ["form_submissions"]
15
+ }
16
+ }
17
+ ],
18
+ "operations": []
19
+ }
@@ -0,0 +1,21 @@
1
+ export type FormSubmission = {
2
+ id: string;
3
+ status: "new" | "read" | "archived";
4
+ name: string;
5
+ email: string;
6
+ message: string;
7
+ created_at?: string | null;
8
+ locale?: string | null;
9
+ };
10
+
11
+ export type FormSubmissionInput = {
12
+ name: string;
13
+ email: string;
14
+ message: string;
15
+ locale?: string | null;
16
+ };
17
+
18
+ export type ContactFormState = {
19
+ ok: boolean;
20
+ error?: string;
21
+ };
@@ -0,0 +1,19 @@
1
+ export type FormSubmission = {
2
+ id: string;
3
+ status: "new" | "read" | "archived";
4
+ name: string;
5
+ email: string;
6
+ message: string;
7
+ created_at?: string | null;
8
+ };
9
+
10
+ export type FormSubmissionInput = {
11
+ name: string;
12
+ email: string;
13
+ message: string;
14
+ };
15
+
16
+ export type ContactFormState = {
17
+ ok: boolean;
18
+ error?: string;
19
+ };
@@ -0,0 +1,25 @@
1
+ {
2
+ "policies": [
3
+ {
4
+ "name": "dkit FAQ Public Read",
5
+ "icon": "public",
6
+ "description": "Public read for FAQ items (flat rules — Core-compatible). UI filters published status.",
7
+ "admin_access": false,
8
+ "app_access": false
9
+ }
10
+ ],
11
+ "permissions": [
12
+ {
13
+ "policy": "dkit FAQ Public Read",
14
+ "collection": "faq_items",
15
+ "action": "read",
16
+ "fields": ["*"]
17
+ }
18
+ ],
19
+ "access": [
20
+ {
21
+ "role": "$public",
22
+ "policy": "dkit FAQ Public Read"
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "policies": [
3
+ {
4
+ "name": "dkit FAQ Public Read",
5
+ "icon": "public",
6
+ "description": "Public read for FAQ incl. translation table (flat rules — Core-compatible).",
7
+ "admin_access": false,
8
+ "app_access": false
9
+ }
10
+ ],
11
+ "permissions": [
12
+ { "policy": "dkit FAQ Public Read", "collection": "faq_items", "action": "read", "fields": ["*"] },
13
+ { "policy": "dkit FAQ Public Read", "collection": "faq_items_translations", "action": "read", "fields": ["*"] }
14
+ ],
15
+ "access": [
16
+ { "role": "$public", "policy": "dkit FAQ Public Read" }
17
+ ]
18
+ }