@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,8 @@
1
+ # Seed image attribution
2
+
3
+ Photos from [Unsplash](https://unsplash.com) (free to use under the [Unsplash License](https://unsplash.com/license)).
4
+
5
+ | File | Source |
6
+ |------|--------|
7
+ | `ada-lovelace-avatar.jpg` | https://images.unsplash.com/photo-1573496359142-b8d87734a5a2 |
8
+ | `hello-from-dkit-cover.jpg` | https://images.unsplash.com/photo-1498050108023-c5249f4df085 |
@@ -0,0 +1,70 @@
1
+ {
2
+ "files": [
3
+ {
4
+ "id": "44444444-4444-4444-8444-444444444444",
5
+ "filename_download": "ada-lovelace-avatar.jpg",
6
+ "title": "Ada Lovelace avatar",
7
+ "type": "image/jpeg",
8
+ "path": "assets/ada-lovelace-avatar.jpg"
9
+ },
10
+ {
11
+ "id": "55555555-5555-4555-8555-555555555555",
12
+ "filename_download": "hello-from-dkit-cover.jpg",
13
+ "title": "Hello from dkit cover",
14
+ "type": "image/jpeg",
15
+ "path": "assets/hello-from-dkit-cover.jpg"
16
+ }
17
+ ],
18
+ "items": {
19
+ "authors": [
20
+ {
21
+ "id": "11111111-1111-4111-8111-111111111111",
22
+ "status": "published",
23
+ "name": "Ada Lovelace",
24
+ "slug": "ada-lovelace",
25
+ "bio": "Sample author \u2014 replace with your own writers.",
26
+ "avatar": "44444444-4444-4444-8444-444444444444"
27
+ }
28
+ ],
29
+ "categories": [
30
+ {
31
+ "id": "22222222-2222-4222-8222-222222222222",
32
+ "title": "Engineering",
33
+ "slug": "engineering"
34
+ }
35
+ ],
36
+ "posts": [
37
+ {
38
+ "id": "33333333-3333-4333-8333-333333333333",
39
+ "status": "published",
40
+ "title": "Sample post: getting started",
41
+ "slug": "sample-getting-started",
42
+ "excerpt": "Demo content so you can verify list/detail UI, relations, and .dkit-prose.",
43
+ "body": "<p>This is <strong>sample seed data</strong> from the blog module. Delete or rewrite it in Directus once your own content is ready.</p><h2>What to verify</h2><p>Use this post to confirm the public API, featured image, author relation, and rich-text rendering in your app.</p><blockquote><p>Sample HTML includes headings, quotes, and lists so you can judge layout and <code>.dkit-prose</code> immediately after install.</p></blockquote><h3>Checklist</h3><ul><li>List view shows title, excerpt, and image</li><li>Detail view renders this body</li><li>Author name and avatar resolve</li><li>Category \u201cEngineering\u201d is attached</li></ul><h3>Next steps</h3><ol><li>Edit this item in Directus</li><li>Add a second author or category</li><li>Point your routes at <code>getPosts</code> / <code>getPostBySlug</code></li></ol><p>Replace every sample field before going to production.</p>",
44
+ "published_at": "2026-01-15T10:00:00.000Z",
45
+ "author": "11111111-1111-4111-8111-111111111111",
46
+ "featured_image": "55555555-5555-4555-8555-555555555555"
47
+ },
48
+ {
49
+ "id": "66666666-6666-4666-8666-666666666666",
50
+ "status": "published",
51
+ "title": "Sample post: modeling notes",
52
+ "slug": "sample-modeling-notes",
53
+ "excerpt": "Second demo post \u2014 status, publish date, and prose without a featured image.",
54
+ "body": "<p>A second sample item helps you test sorting, cards vs list templates, and empty featured-image fallbacks.</p><h2>Fields to check</h2><p><code>status</code> gates public reads. <code>published_at</code> is the date shown on the site (auto-filled on create, editable for backdating).</p><h3>Prose elements</h3><ul><li>Paragraphs and <em>emphasis</em></li><li>Inline <code>code</code></li><li>Ordered and unordered lists</li></ul><blockquote><p>After install, open this post in your app and confirm list + detail layouts look right before you replace the sample content.</p></blockquote><p>Safe to delete once you have verified the install.</p>",
55
+ "published_at": "2026-01-22T14:30:00.000Z",
56
+ "author": "11111111-1111-4111-8111-111111111111"
57
+ }
58
+ ],
59
+ "posts_categories": [
60
+ {
61
+ "posts_id": "33333333-3333-4333-8333-333333333333",
62
+ "categories_id": "22222222-2222-4222-8222-222222222222"
63
+ },
64
+ {
65
+ "posts_id": "66666666-6666-4666-8666-666666666666",
66
+ "categories_id": "22222222-2222-4222-8222-222222222222"
67
+ }
68
+ ]
69
+ }
70
+ }
@@ -0,0 +1,90 @@
1
+ {
2
+ "files": [
3
+ {
4
+ "id": "44444444-4444-4444-8444-444444444444",
5
+ "filename_download": "ada-lovelace-avatar.jpg",
6
+ "title": "Ada Lovelace avatar",
7
+ "type": "image/jpeg",
8
+ "path": "assets/ada-lovelace-avatar.jpg"
9
+ },
10
+ {
11
+ "id": "55555555-5555-4555-8555-555555555555",
12
+ "filename_download": "hello-from-dkit-cover.jpg",
13
+ "title": "Hello from dkit cover",
14
+ "type": "image/jpeg",
15
+ "path": "assets/hello-from-dkit-cover.jpg"
16
+ }
17
+ ],
18
+ "items": {
19
+ "authors": [
20
+ {
21
+ "id": "11111111-1111-4111-8111-111111111111",
22
+ "status": "published",
23
+ "name": "Ada Lovelace",
24
+ "slug": "ada-lovelace",
25
+ "avatar": "44444444-4444-4444-8444-444444444444",
26
+ "translations": [
27
+ {
28
+ "languages_code": "en-US",
29
+ "bio": "Sample author \u2014 replace with your own writers."
30
+ }
31
+ ]
32
+ }
33
+ ],
34
+ "categories": [
35
+ {
36
+ "id": "22222222-2222-4222-8222-222222222222",
37
+ "translations": [
38
+ {
39
+ "languages_code": "en-US",
40
+ "title": "Engineering",
41
+ "slug": "engineering"
42
+ }
43
+ ]
44
+ }
45
+ ],
46
+ "posts": [
47
+ {
48
+ "id": "33333333-3333-4333-8333-333333333333",
49
+ "status": "published",
50
+ "published_at": "2026-01-15T10:00:00.000Z",
51
+ "author": "11111111-1111-4111-8111-111111111111",
52
+ "featured_image": "55555555-5555-4555-8555-555555555555",
53
+ "translations": [
54
+ {
55
+ "languages_code": "en-US",
56
+ "title": "Sample post: getting started",
57
+ "slug": "sample-getting-started",
58
+ "excerpt": "Demo content so you can verify list/detail UI, relations, and .dkit-prose.",
59
+ "body": "<p>This is <strong>sample seed data</strong> from the blog module. Delete or rewrite it in Directus once your own content is ready.</p><h2>What to verify</h2><p>Use this post to confirm the public API, featured image, author relation, and rich-text rendering in your app.</p><blockquote><p>Sample HTML includes headings, quotes, and lists so you can judge layout and <code>.dkit-prose</code> immediately after install.</p></blockquote><h3>Checklist</h3><ul><li>List view shows title, excerpt, and image</li><li>Detail view renders this body</li><li>Author name and avatar resolve</li><li>Category \"Engineering\" is attached</li></ul><h3>Next steps</h3><ol><li>Edit this item in Directus</li><li>Add a second author or category</li><li>Point your routes at <code>getPosts</code> / <code>getPostBySlug</code></li></ol><p>Replace every sample field before going to production.</p>"
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ "id": "66666666-6666-4666-8666-666666666666",
65
+ "status": "published",
66
+ "published_at": "2026-01-22T14:30:00.000Z",
67
+ "author": "11111111-1111-4111-8111-111111111111",
68
+ "translations": [
69
+ {
70
+ "languages_code": "en-US",
71
+ "title": "Sample post: modeling notes",
72
+ "slug": "sample-modeling-notes",
73
+ "excerpt": "Second demo post \u2014 status, publish date, and prose without a featured image.",
74
+ "body": "<p>A second sample item helps you test sorting, cards vs list templates, and empty featured-image fallbacks.</p><h2>Fields to check</h2><p><code>status</code> gates public reads. <code>published_at</code> is the date shown on the site (auto-filled on create, editable for backdating).</p><h3>Prose elements</h3><ul><li>Paragraphs and <em>emphasis</em></li><li>Inline <code>code</code></li><li>Ordered and unordered lists</li></ul><blockquote><p>After install, open this post in your app and confirm list + detail layouts look right before you replace the sample content.</p></blockquote><p>Safe to delete once you have verified the install.</p>"
75
+ }
76
+ ]
77
+ }
78
+ ],
79
+ "posts_categories": [
80
+ {
81
+ "posts_id": "33333333-3333-4333-8333-333333333333",
82
+ "categories_id": "22222222-2222-4222-8222-222222222222"
83
+ },
84
+ {
85
+ "posts_id": "66666666-6666-4666-8666-666666666666",
86
+ "categories_id": "22222222-2222-4222-8222-222222222222"
87
+ }
88
+ ]
89
+ }
90
+ }
@@ -0,0 +1,96 @@
1
+ export type DirectusFileRef = {
2
+ id: string;
3
+ };
4
+
5
+ /* ── Translation row types (for SDK schema / COLLECTION_TYPES) ── */
6
+
7
+ export type BlogPostTranslation = {
8
+ id: number;
9
+ posts_id?: string;
10
+ languages_code?: string | { code?: string };
11
+ title: string;
12
+ slug: string;
13
+ excerpt?: string | null;
14
+ body?: string | null;
15
+ };
16
+
17
+ export type BlogCategoryTranslation = {
18
+ id: number;
19
+ categories_id?: string;
20
+ languages_code?: string | { code?: string };
21
+ title: string;
22
+ slug: string;
23
+ };
24
+
25
+ export type BlogAuthorTranslation = {
26
+ id: number;
27
+ authors_id?: string;
28
+ languages_code?: string | { code?: string };
29
+ bio?: string | null;
30
+ };
31
+
32
+ /* ── Public API types (flat — UI sees the same shape) ── */
33
+
34
+ export type BlogAuthor = {
35
+ id: string;
36
+ status: "published" | "draft";
37
+ name: string;
38
+ slug: string;
39
+ avatar?: string | DirectusFileRef | null;
40
+ bio?: string | null;
41
+ };
42
+
43
+ export type BlogCategory = {
44
+ id: string;
45
+ title: string;
46
+ slug: string;
47
+ };
48
+
49
+ export type BlogPost = {
50
+ id: string;
51
+ status: "published" | "draft" | "archived";
52
+ title: string;
53
+ slug: string;
54
+ excerpt?: string | null;
55
+ body?: string | null;
56
+ published_at?: string | null;
57
+ featured_image?: string | DirectusFileRef | null;
58
+ author?: string | BlogAuthor | null;
59
+ categories?: Array<string | BlogCategory> | null;
60
+ };
61
+
62
+ export type PostsCategoriesRow = {
63
+ id: number;
64
+ posts_id: string | BlogPost;
65
+ categories_id: string | BlogCategory;
66
+ };
67
+
68
+ /** Shared list/query options for blog fetches. */
69
+ export type GetBlogPostsOptions = {
70
+ /** Directus status filter. Default `"published"`. Pass `null` to skip. */
71
+ status?: string | null;
72
+ limit?: number;
73
+ /** Filter by category slug. */
74
+ category?: string;
75
+ sort?: string[];
76
+ /** Override resolved locale (BCP 47 code). */
77
+ locale?: string;
78
+ };
79
+
80
+ export type GetBlogAuthorsOptions = {
81
+ status?: string | null;
82
+ limit?: number;
83
+ sort?: string[];
84
+ locale?: string;
85
+ };
86
+
87
+ export type GetBlogCategoriesOptions = {
88
+ limit?: number;
89
+ sort?: string[];
90
+ locale?: string;
91
+ };
92
+
93
+ export type GetBlogBySlugOptions = {
94
+ status?: string | null;
95
+ locale?: string;
96
+ };
@@ -0,0 +1,62 @@
1
+ export type DirectusFileRef = {
2
+ id: string;
3
+ };
4
+
5
+ export type BlogAuthor = {
6
+ id: string;
7
+ status: "published" | "draft";
8
+ name: string;
9
+ slug: string;
10
+ avatar?: string | DirectusFileRef | null;
11
+ bio?: string | null;
12
+ };
13
+
14
+ export type BlogCategory = {
15
+ id: string;
16
+ title: string;
17
+ slug: string;
18
+ };
19
+
20
+ export type BlogPost = {
21
+ id: string;
22
+ status: "published" | "draft" | "archived";
23
+ title: string;
24
+ slug: string;
25
+ excerpt?: string | null;
26
+ body?: string | null;
27
+ published_at?: string | null;
28
+ featured_image?: string | DirectusFileRef | null;
29
+ author?: string | BlogAuthor | null;
30
+ categories?: Array<string | BlogCategory> | null;
31
+ };
32
+
33
+ export type PostsCategoriesRow = {
34
+ id: number;
35
+ posts_id: string | BlogPost;
36
+ categories_id: string | BlogCategory;
37
+ };
38
+
39
+ /** Shared list/query options for blog fetches. */
40
+ export type GetBlogPostsOptions = {
41
+ /** Directus status filter. Default `"published"`. Pass `null` to skip. */
42
+ status?: string | null;
43
+ limit?: number;
44
+ /** Filter by category slug. */
45
+ category?: string;
46
+ sort?: string[];
47
+ };
48
+
49
+ export type GetBlogAuthorsOptions = {
50
+ status?: string | null;
51
+ limit?: number;
52
+ sort?: string[];
53
+ };
54
+
55
+ export type GetBlogCategoriesOptions = {
56
+ limit?: number;
57
+ sort?: string[];
58
+ };
59
+
60
+ export type GetBlogBySlugOptions = {
61
+ status?: string | null;
62
+ };
@@ -0,0 +1,25 @@
1
+ {
2
+ "policies": [
3
+ {
4
+ "name": "dkit Booking Request Public Create",
5
+ "icon": "edit",
6
+ "description": "Public can create booking requests (flat fields — Core-compatible)",
7
+ "admin_access": false,
8
+ "app_access": false
9
+ }
10
+ ],
11
+ "permissions": [
12
+ {
13
+ "policy": "dkit Booking Request Public Create",
14
+ "collection": "booking_requests",
15
+ "action": "create",
16
+ "fields": ["*"]
17
+ }
18
+ ],
19
+ "access": [
20
+ {
21
+ "role": "$public",
22
+ "policy": "dkit Booking Request Public Create"
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "policies": [
3
+ {
4
+ "name": "dkit Booking Request Public Create",
5
+ "icon": "edit",
6
+ "description": "Public can create booking requests (flat fields — Core-compatible)",
7
+ "admin_access": false,
8
+ "app_access": false
9
+ }
10
+ ],
11
+ "permissions": [
12
+ {
13
+ "policy": "dkit Booking Request Public Create",
14
+ "collection": "booking_requests",
15
+ "action": "create",
16
+ "fields": [
17
+ "*"
18
+ ]
19
+ }
20
+ ],
21
+ "access": [
22
+ {
23
+ "role": "$public",
24
+ "policy": "dkit Booking Request Public Create"
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,71 @@
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 { resolveLocale } from "@/lib/dkit/i18n";
7
+ import type {
8
+ BookingFormState,
9
+ BookingRequest,
10
+ BookingRequestInput,
11
+ } from "./types.multilocale";
12
+
13
+ export type {
14
+ BookingFormState,
15
+ BookingRequest,
16
+ BookingRequestInput,
17
+ } from "./types.multilocale";
18
+
19
+ const schema = z.object({
20
+ name: z.string().min(1, "Name is required").max(120),
21
+ email: z.string().email("Enter a valid email address").max(200),
22
+ phone: z.string().max(40).nullable().optional(),
23
+ service: z.string().max(120).nullable().optional(),
24
+ preferred_date: z.string().nullable().optional(),
25
+ preferred_time: z.string().max(40).nullable().optional(),
26
+ message: z.string().max(5000).nullable().optional(),
27
+ locale: z.string().max(15).nullable().optional(),
28
+ });
29
+
30
+ /** Create a booking request (inbox) with optional locale. */
31
+ export async function createBookingSubmission(
32
+ input: BookingRequestInput,
33
+ ): Promise<{ ok: true; id?: string } | { ok: false; error: string }> {
34
+ const locale = await resolveLocale(input.locale);
35
+ const parsed = schema.safeParse({ ...input, locale });
36
+ if (!parsed.success) {
37
+ return { ok: false, error: parsed.error.issues[0]?.message ?? "Invalid input" };
38
+ }
39
+
40
+ const client = getDirectus();
41
+ if (!client) return { ok: false, error: "Missing DIRECTUS_URL" };
42
+
43
+ try {
44
+ const row = await client.request(
45
+ createItem(collections.booking_requests, parsed.data),
46
+ );
47
+ return { ok: true, id: (row as BookingRequest)?.id };
48
+ } catch (e) {
49
+ return { ok: false, error: e instanceof Error ? e.message : "Submission failed" };
50
+ }
51
+ }
52
+
53
+ /** Server Action for the booking form UI. */
54
+ export async function submitBookingForm(
55
+ _prev: BookingFormState,
56
+ formData: FormData,
57
+ ): Promise<BookingFormState> {
58
+ const raw = {
59
+ name: String(formData.get("name") ?? ""),
60
+ email: String(formData.get("email") ?? ""),
61
+ phone: formData.get("phone") ? String(formData.get("phone")) : null,
62
+ service: formData.get("service") ? String(formData.get("service")) : null,
63
+ preferred_date: formData.get("preferred_date") ? String(formData.get("preferred_date")) : null,
64
+ preferred_time: formData.get("preferred_time") ? String(formData.get("preferred_time")) : null,
65
+ message: formData.get("message") ? String(formData.get("message")) : null,
66
+ locale: formData.get("locale") ? String(formData.get("locale")) : null,
67
+ };
68
+ const result = await createBookingSubmission(raw);
69
+ if (!result.ok) return { ok: false, error: result.error };
70
+ return { ok: true };
71
+ }
@@ -0,0 +1,77 @@
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
+ BookingFormState,
8
+ BookingRequest,
9
+ BookingRequestInput,
10
+ } from "./types";
11
+
12
+ export type {
13
+ BookingFormState,
14
+ BookingRequest,
15
+ BookingRequestInput,
16
+ } from "./types";
17
+
18
+ const schema = z.object({
19
+ name: z.string().min(1, "Name is required").max(120),
20
+ email: z.string().email("Enter a valid email address").max(200),
21
+ phone: z.string().max(40).nullable().optional(),
22
+ service: z.string().max(120).nullable().optional(),
23
+ preferred_date: z.string().nullable().optional(),
24
+ preferred_time: z.string().max(40).nullable().optional(),
25
+ message: z.string().max(5000).nullable().optional(),
26
+ });
27
+
28
+ /** Create a booking request (inbox). Prefer submitBookingForm from UI. */
29
+ export async function createBookingSubmission(
30
+ input: BookingRequestInput,
31
+ ): Promise<{ ok: true; id?: string } | { ok: false; error: string }> {
32
+ const parsed = schema.safeParse(input);
33
+ if (!parsed.success) {
34
+ return {
35
+ ok: false,
36
+ error: parsed.error.issues[0]?.message ?? "Invalid input",
37
+ };
38
+ }
39
+
40
+ const client = getDirectus();
41
+ if (!client) return { ok: false, error: "Missing DIRECTUS_URL" };
42
+
43
+ try {
44
+ const row = await client.request(
45
+ createItem(collections.booking_requests, parsed.data),
46
+ );
47
+ return { ok: true, id: (row as BookingRequest)?.id };
48
+ } catch (e) {
49
+ return {
50
+ ok: false,
51
+ error: e instanceof Error ? e.message : "Submission failed",
52
+ };
53
+ }
54
+ }
55
+
56
+ /** Server Action for the booking form UI. */
57
+ export async function submitBookingForm(
58
+ _prev: BookingFormState,
59
+ formData: FormData,
60
+ ): Promise<BookingFormState> {
61
+ const raw = {
62
+ name: String(formData.get("name") ?? ""),
63
+ email: String(formData.get("email") ?? ""),
64
+ phone: formData.get("phone") ? String(formData.get("phone")) : null,
65
+ service: formData.get("service") ? String(formData.get("service")) : null,
66
+ preferred_date: formData.get("preferred_date")
67
+ ? String(formData.get("preferred_date"))
68
+ : null,
69
+ preferred_time: formData.get("preferred_time")
70
+ ? String(formData.get("preferred_time"))
71
+ : null,
72
+ message: formData.get("message") ? String(formData.get("message")) : null,
73
+ };
74
+ const result = await createBookingSubmission(raw);
75
+ if (!result.ok) return { ok: false, error: result.error };
76
+ return { ok: true };
77
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "type": "dkit:module",
3
+ "id": "booking-form",
4
+ "title": "Booking request",
5
+ "description": "Public booking request → 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
+ "booking-form-ui"
22
+ ],
23
+ "collections": [
24
+ "site",
25
+ "booking_requests"
26
+ ],
27
+ "defaultBasePath": "/booking",
28
+ "multilocale": {
29
+ "supported": true,
30
+ "mode": "submission-locale"
31
+ }
32
+ }