@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,100 @@
1
+ <script setup lang="ts">
2
+ import {
3
+ authorAvatarUrl,
4
+ authorName,
5
+ featuredImageUrl,
6
+ getBlogPosts,
7
+ } from '@/lib/dkit/blog'
8
+ import { joinModulePath, moduleBasePath } from '@/lib/dkit/config'
9
+
10
+ /** Uses your project's shadcn-vue theme (same layout as Next shadcn list). */
11
+ const props = withDefaults(defineProps<{ basePath?: string }>(), {
12
+ basePath: undefined,
13
+ })
14
+
15
+ const resolvedBase = computed(
16
+ () => props.basePath ?? moduleBasePath('blog', '/blog'),
17
+ )
18
+
19
+ const { data: posts } = await useAsyncData('dkit-blog-list', () => getBlogPosts())
20
+ </script>
21
+
22
+ <template>
23
+ <div class="relative mx-auto max-w-2xl px-6 py-16 sm:py-20">
24
+ <header class="mb-12 border-b border-border pb-10">
25
+ <p class="mb-3 text-xs font-medium tracking-[0.2em] text-primary uppercase">
26
+ Journal
27
+ </p>
28
+ <h1 class="text-4xl font-semibold leading-tight tracking-tight text-foreground sm:text-5xl">
29
+ Blog
30
+ </h1>
31
+ <p class="mt-4 max-w-md text-base leading-relaxed text-muted-foreground">
32
+ Newest posts first.
33
+ </p>
34
+ </header>
35
+
36
+ <p
37
+ v-if="!(posts && posts.length)"
38
+ class="rounded-xl border border-dashed border-border bg-muted/40 px-6 py-10 text-center text-muted-foreground"
39
+ >
40
+ No published posts yet.
41
+ </p>
42
+
43
+ <ul v-else class="space-y-1">
44
+ <li v-for="(post, i) in posts" :key="post.id">
45
+ <NuxtLink
46
+ :to="joinModulePath(resolvedBase, post.slug)"
47
+ class="group flex gap-5 rounded-xl px-4 py-5 transition-colors hover:bg-muted/60"
48
+ >
49
+ <img
50
+ v-if="featuredImageUrl(post)"
51
+ :src="featuredImageUrl(post)!"
52
+ alt=""
53
+ class="mt-0.5 h-16 w-16 shrink-0 rounded-lg object-cover ring-1 ring-border"
54
+ />
55
+ <span
56
+ v-else
57
+ class="mt-1 w-8 shrink-0 font-mono text-xs text-muted-foreground tabular-nums"
58
+ >
59
+ {{ String(i + 1).padStart(2, '0') }}
60
+ </span>
61
+ <span class="min-w-0 flex-1">
62
+ <span class="block text-xl font-medium tracking-tight text-foreground transition-colors group-hover:text-primary">
63
+ {{ post.title }}
64
+ </span>
65
+ <span
66
+ v-if="post.excerpt"
67
+ class="mt-2 block text-sm leading-relaxed text-muted-foreground"
68
+ >
69
+ {{ post.excerpt }}
70
+ </span>
71
+ <span class="mt-3 flex flex-wrap items-center gap-x-2 text-xs text-muted-foreground">
72
+ <span v-if="authorName(post)" class="inline-flex items-center gap-1.5">
73
+ <img
74
+ v-if="authorAvatarUrl(post)"
75
+ :src="authorAvatarUrl(post)!"
76
+ alt=""
77
+ class="h-5 w-5 rounded-full object-cover ring-1 ring-border"
78
+ />
79
+ <span>{{ authorName(post) }}</span>
80
+ </span>
81
+ <span v-if="authorName(post) && post.published_at" aria-hidden>·</span>
82
+ <time v-if="post.published_at" :datetime="post.published_at">
83
+ {{
84
+ new Date(post.published_at).toLocaleDateString(undefined, {
85
+ year: 'numeric',
86
+ month: 'short',
87
+ day: 'numeric',
88
+ })
89
+ }}
90
+ </time>
91
+ <span class="ml-auto text-primary opacity-0 transition group-hover:opacity-100">
92
+ Read →
93
+ </span>
94
+ </span>
95
+ </span>
96
+ </NuxtLink>
97
+ </li>
98
+ </ul>
99
+ </div>
100
+ </template>
@@ -0,0 +1,27 @@
1
+ {
2
+ "type": "dkit:block",
3
+ "id": "blog-list-cards",
4
+ "title": "Blog list (cards)",
5
+ "description": "Card grid of posts with date, excerpt, and hover accent",
6
+ "version": "0.1.0",
7
+ "frameworks": [
8
+ "next",
9
+ "nuxt"
10
+ ],
11
+ "uiKits": [
12
+ "shadcn",
13
+ "minimal"
14
+ ],
15
+ "shadcnComponents": ["card"],
16
+ "slot": "list",
17
+ "route": { "kind": "index" },
18
+ "registryDependencies": [
19
+ "blog"
20
+ ],
21
+ "dependencies": [
22
+ "@directus/sdk"
23
+ ],
24
+ "layers": [
25
+ "ui"
26
+ ]
27
+ }
@@ -0,0 +1,130 @@
1
+ import {
2
+ authorAvatarUrl,
3
+ authorName,
4
+ featuredImageUrl,
5
+ getBlogPosts,
6
+ } from "@/lib/dkit/blog";
7
+ import { moduleHref } from "@/lib/dkit/paths";
8
+
9
+ /** Minimal kit — plain HTML card grid (no Tailwind / shadcn). */
10
+ export async function BlogListCards() {
11
+ const posts = await getBlogPosts();
12
+ const hrefById = Object.fromEntries(
13
+ await Promise.all(
14
+ posts.map(async (post) => [post.id, await moduleHref("blog", post.slug)] as const),
15
+ ),
16
+ );
17
+
18
+ return (
19
+ <section>
20
+ <style>{`
21
+ .dkit-blog-cards {
22
+ display: grid;
23
+ gap: 1.25rem;
24
+ grid-template-columns: 1fr;
25
+ }
26
+ @media (min-width: 640px) {
27
+ .dkit-blog-cards {
28
+ grid-template-columns: 1fr 1fr;
29
+ }
30
+ }
31
+ .dkit-blog-cards article {
32
+ border: 1px solid #ccc;
33
+ padding: 0;
34
+ overflow: hidden;
35
+ }
36
+ .dkit-blog-cards article > a {
37
+ display: block;
38
+ color: inherit;
39
+ text-decoration: none;
40
+ }
41
+ .dkit-blog-cards .dkit-blog-cards__media {
42
+ display: block;
43
+ width: 100%;
44
+ aspect-ratio: 16 / 9;
45
+ object-fit: cover;
46
+ background: #eee;
47
+ border: 0;
48
+ }
49
+ .dkit-blog-cards .dkit-blog-cards__body {
50
+ padding: 0.75rem 1rem 1rem;
51
+ }
52
+ .dkit-blog-cards .dkit-blog-cards__meta {
53
+ display: flex;
54
+ flex-wrap: wrap;
55
+ align-items: center;
56
+ gap: 0.5rem;
57
+ margin: 0.75rem 0 0;
58
+ font-size: 0.875rem;
59
+ }
60
+ .dkit-blog-cards .dkit-blog-cards__avatar {
61
+ width: 1.5rem;
62
+ height: 1.5rem;
63
+ border-radius: 9999px;
64
+ object-fit: cover;
65
+ vertical-align: middle;
66
+ }
67
+ `}</style>
68
+
69
+ <header>
70
+ <h1>Blog</h1>
71
+ <p>Browse posts.</p>
72
+ </header>
73
+
74
+ {posts.length === 0 ? (
75
+ <p>No published posts yet.</p>
76
+ ) : (
77
+ <div className="dkit-blog-cards">
78
+ {posts.map((post) => {
79
+ const imageUrl = featuredImageUrl(post);
80
+ const name = authorName(post);
81
+ const avatar = authorAvatarUrl(post);
82
+ return (
83
+ <article key={post.id}>
84
+ <a href={hrefById[post.id]!}>
85
+ {imageUrl ? (
86
+ // eslint-disable-next-line @next/next/no-img-element
87
+ <img
88
+ className="dkit-blog-cards__media"
89
+ src={imageUrl}
90
+ alt=""
91
+ />
92
+ ) : (
93
+ <span
94
+ className="dkit-blog-cards__media"
95
+ aria-hidden
96
+ />
97
+ )}
98
+ <div className="dkit-blog-cards__body">
99
+ {post.published_at ? (
100
+ <p>
101
+ <time dateTime={post.published_at}>
102
+ {new Date(post.published_at).toLocaleDateString()}
103
+ </time>
104
+ </p>
105
+ ) : null}
106
+ <h2>{post.title}</h2>
107
+ {post.excerpt ? <p>{post.excerpt}</p> : null}
108
+ {name ? (
109
+ <p className="dkit-blog-cards__meta">
110
+ {avatar ? (
111
+ // eslint-disable-next-line @next/next/no-img-element
112
+ <img
113
+ className="dkit-blog-cards__avatar"
114
+ src={avatar}
115
+ alt=""
116
+ />
117
+ ) : null}
118
+ <span>{name}</span>
119
+ </p>
120
+ ) : null}
121
+ </div>
122
+ </a>
123
+ </article>
124
+ );
125
+ })}
126
+ </div>
127
+ )}
128
+ </section>
129
+ );
130
+ }
@@ -0,0 +1,114 @@
1
+ <script setup lang="ts">
2
+ import {
3
+ authorAvatarUrl,
4
+ authorName,
5
+ featuredImageUrl,
6
+ getBlogPosts,
7
+ } from '@/lib/dkit/blog'
8
+ import { joinModulePath, moduleBasePath } from '@/lib/dkit/config'
9
+
10
+ /** Minimal kit — plain HTML card grid (no Tailwind / shadcn). */
11
+ const props = withDefaults(defineProps<{ basePath?: string }>(), {
12
+ basePath: undefined,
13
+ })
14
+
15
+ const resolvedBase = computed(
16
+ () => props.basePath ?? moduleBasePath('blog', '/blog'),
17
+ )
18
+
19
+ const { data: posts } = await useAsyncData('dkit-blog-list-cards-min', () =>
20
+ getBlogPosts(),
21
+ )
22
+ </script>
23
+
24
+ <template>
25
+ <section>
26
+ <style>
27
+ .dkit-blog-cards {
28
+ display: grid;
29
+ gap: 1.25rem;
30
+ grid-template-columns: 1fr;
31
+ }
32
+ @media (min-width: 640px) {
33
+ .dkit-blog-cards {
34
+ grid-template-columns: 1fr 1fr;
35
+ }
36
+ }
37
+ .dkit-blog-cards article {
38
+ border: 1px solid #ccc;
39
+ padding: 0;
40
+ overflow: hidden;
41
+ }
42
+ .dkit-blog-cards article > a {
43
+ display: block;
44
+ color: inherit;
45
+ text-decoration: none;
46
+ }
47
+ .dkit-blog-cards .dkit-blog-cards__media {
48
+ display: block;
49
+ width: 100%;
50
+ aspect-ratio: 16 / 9;
51
+ object-fit: cover;
52
+ background: #eee;
53
+ border: 0;
54
+ }
55
+ .dkit-blog-cards .dkit-blog-cards__body {
56
+ padding: 0.75rem 1rem 1rem;
57
+ }
58
+ .dkit-blog-cards .dkit-blog-cards__meta {
59
+ display: flex;
60
+ flex-wrap: wrap;
61
+ align-items: center;
62
+ gap: 0.5rem;
63
+ margin: 0.75rem 0 0;
64
+ font-size: 0.875rem;
65
+ }
66
+ .dkit-blog-cards .dkit-blog-cards__avatar {
67
+ width: 1.5rem;
68
+ height: 1.5rem;
69
+ border-radius: 9999px;
70
+ object-fit: cover;
71
+ vertical-align: middle;
72
+ }
73
+ </style>
74
+
75
+ <header>
76
+ <h1>Blog</h1>
77
+ <p>Browse posts.</p>
78
+ </header>
79
+
80
+ <p v-if="!(posts && posts.length)">No published posts yet.</p>
81
+
82
+ <div v-else class="dkit-blog-cards">
83
+ <article v-for="post in posts" :key="post.id">
84
+ <NuxtLink :to="joinModulePath(resolvedBase, post.slug)">
85
+ <img
86
+ v-if="featuredImageUrl(post)"
87
+ class="dkit-blog-cards__media"
88
+ :src="featuredImageUrl(post)!"
89
+ alt=""
90
+ />
91
+ <span v-else class="dkit-blog-cards__media" aria-hidden="true" />
92
+ <div class="dkit-blog-cards__body">
93
+ <p v-if="post.published_at">
94
+ <time :datetime="post.published_at">
95
+ {{ new Date(post.published_at).toLocaleDateString() }}
96
+ </time>
97
+ </p>
98
+ <h2>{{ post.title }}</h2>
99
+ <p v-if="post.excerpt">{{ post.excerpt }}</p>
100
+ <p v-if="authorName(post)" class="dkit-blog-cards__meta">
101
+ <img
102
+ v-if="authorAvatarUrl(post)"
103
+ class="dkit-blog-cards__avatar"
104
+ :src="authorAvatarUrl(post)!"
105
+ alt=""
106
+ />
107
+ <span>{{ authorName(post) }}</span>
108
+ </p>
109
+ </div>
110
+ </NuxtLink>
111
+ </article>
112
+ </div>
113
+ </section>
114
+ </template>
@@ -0,0 +1,119 @@
1
+ import {
2
+ authorAvatarUrl,
3
+ authorName,
4
+ featuredImageUrl,
5
+ getBlogPosts,
6
+ } from "@/lib/dkit/blog";
7
+ import { moduleHref } from "@/lib/dkit/paths";
8
+ import {
9
+ Card,
10
+ CardContent,
11
+ CardDescription,
12
+ CardFooter,
13
+ CardHeader,
14
+ CardTitle,
15
+ } from "@/components/ui/card";
16
+
17
+ /** Uses your project's shadcn/ui components. */
18
+ export async function BlogListCards() {
19
+ const posts = await getBlogPosts();
20
+ const hrefById = Object.fromEntries(
21
+ await Promise.all(
22
+ posts.map(async (post) => [post.id, await moduleHref("blog", post.slug)] as const),
23
+ ),
24
+ );
25
+
26
+ return (
27
+ <div className="mx-auto max-w-5xl px-6 py-16 sm:py-20">
28
+ <header className="mb-12 max-w-xl">
29
+ <p className="mb-3 text-xs font-medium tracking-[0.2em] text-primary uppercase">
30
+ Journal
31
+ </p>
32
+ <h1 className="text-4xl font-semibold tracking-tight text-foreground sm:text-5xl">
33
+ Blog
34
+ </h1>
35
+ <p className="mt-4 text-muted-foreground">Browse posts in a card grid.</p>
36
+ </header>
37
+
38
+ {posts.length === 0 ? (
39
+ <p className="rounded-xl border border-dashed border-border px-6 py-12 text-center text-muted-foreground">
40
+ No published posts yet.
41
+ </p>
42
+ ) : (
43
+ <div className="grid gap-5 sm:grid-cols-2">
44
+ {posts.map((post) => {
45
+ const imageUrl = featuredImageUrl(post);
46
+ const name = authorName(post);
47
+ const avatar = authorAvatarUrl(post);
48
+ return (
49
+ <a
50
+ key={post.id}
51
+ href={hrefById[post.id]!}
52
+ className="group block no-underline transition hover:-translate-y-0.5"
53
+ >
54
+ <Card className="h-full overflow-hidden pt-0 pb-6 shadow-sm transition group-hover:border-primary/40 group-hover:shadow-md">
55
+ {imageUrl ? (
56
+ // eslint-disable-next-line @next/next/no-img-element
57
+ <img
58
+ src={imageUrl}
59
+ alt=""
60
+ className="aspect-[16/9] w-full object-cover"
61
+ />
62
+ ) : (
63
+ <div className="aspect-[16/9] w-full bg-muted" />
64
+ )}
65
+ <CardHeader>
66
+ {post.published_at ? (
67
+ <CardDescription>
68
+ <time dateTime={post.published_at}>
69
+ {new Date(post.published_at).toLocaleDateString(
70
+ undefined,
71
+ {
72
+ month: "short",
73
+ day: "numeric",
74
+ year: "numeric",
75
+ },
76
+ )}
77
+ </time>
78
+ </CardDescription>
79
+ ) : null}
80
+ <CardTitle className="text-2xl transition-colors group-hover:text-primary">
81
+ {post.title}
82
+ </CardTitle>
83
+ </CardHeader>
84
+ {post.excerpt ? (
85
+ <CardContent>
86
+ <p className="line-clamp-3 text-sm leading-relaxed text-muted-foreground">
87
+ {post.excerpt}
88
+ </p>
89
+ </CardContent>
90
+ ) : null}
91
+ <CardFooter className="justify-between gap-3">
92
+ {name ? (
93
+ <span className="inline-flex items-center gap-2 text-xs text-muted-foreground">
94
+ {avatar ? (
95
+ // eslint-disable-next-line @next/next/no-img-element
96
+ <img
97
+ src={avatar}
98
+ alt=""
99
+ className="h-6 w-6 rounded-full object-cover ring-1 ring-border"
100
+ />
101
+ ) : null}
102
+ {name}
103
+ </span>
104
+ ) : (
105
+ <span />
106
+ )}
107
+ <span className="text-sm font-medium text-primary">
108
+ Read article →
109
+ </span>
110
+ </CardFooter>
111
+ </Card>
112
+ </a>
113
+ );
114
+ })}
115
+ </div>
116
+ )}
117
+ </div>
118
+ );
119
+ }
@@ -0,0 +1,113 @@
1
+ <script setup lang="ts">
2
+ import {
3
+ authorAvatarUrl,
4
+ authorName,
5
+ featuredImageUrl,
6
+ getBlogPosts,
7
+ } from '@/lib/dkit/blog'
8
+ import { joinModulePath, moduleBasePath } from '@/lib/dkit/config'
9
+ import {
10
+ Card,
11
+ CardContent,
12
+ CardDescription,
13
+ CardFooter,
14
+ CardHeader,
15
+ CardTitle,
16
+ } from '@/components/ui/card'
17
+
18
+ /** Uses your project's shadcn-vue components. */
19
+ const props = withDefaults(defineProps<{ basePath?: string }>(), {
20
+ basePath: undefined,
21
+ })
22
+
23
+ const resolvedBase = computed(
24
+ () => props.basePath ?? moduleBasePath('blog', '/blog'),
25
+ )
26
+
27
+ const { data: posts } = await useAsyncData('dkit-blog-list-cards', () => getBlogPosts())
28
+ </script>
29
+
30
+ <template>
31
+ <div class="mx-auto max-w-5xl px-6 py-16 sm:py-20">
32
+ <header class="mb-12 max-w-xl">
33
+ <p class="mb-3 text-xs font-medium tracking-[0.2em] text-primary uppercase">
34
+ Journal
35
+ </p>
36
+ <h1 class="text-4xl font-semibold tracking-tight text-foreground sm:text-5xl">
37
+ Blog
38
+ </h1>
39
+ <p class="mt-4 text-muted-foreground">Browse posts in a card grid.</p>
40
+ </header>
41
+
42
+ <p
43
+ v-if="!(posts && posts.length)"
44
+ class="rounded-xl border border-dashed border-border px-6 py-12 text-center text-muted-foreground"
45
+ >
46
+ No published posts yet.
47
+ </p>
48
+
49
+ <div
50
+ v-else
51
+ class="grid gap-5 sm:grid-cols-2"
52
+ >
53
+ <NuxtLink
54
+ v-for="post in posts"
55
+ :key="post.id"
56
+ :to="joinModulePath(resolvedBase, post.slug)"
57
+ class="group block no-underline transition hover:-translate-y-0.5"
58
+ >
59
+ <Card class="h-full overflow-hidden pt-0 pb-6 shadow-sm transition group-hover:border-primary/40 group-hover:shadow-md">
60
+ <img
61
+ v-if="featuredImageUrl(post)"
62
+ :src="featuredImageUrl(post)!"
63
+ alt=""
64
+ class="aspect-[16/9] w-full object-cover"
65
+ />
66
+ <div
67
+ v-else
68
+ class="aspect-[16/9] w-full bg-muted"
69
+ />
70
+ <CardHeader>
71
+ <CardDescription v-if="post.published_at">
72
+ <time :datetime="post.published_at">
73
+ {{
74
+ new Date(post.published_at).toLocaleDateString(undefined, {
75
+ month: 'short',
76
+ day: 'numeric',
77
+ year: 'numeric',
78
+ })
79
+ }}
80
+ </time>
81
+ </CardDescription>
82
+ <CardTitle class="text-2xl transition-colors group-hover:text-primary">
83
+ {{ post.title }}
84
+ </CardTitle>
85
+ </CardHeader>
86
+ <CardContent v-if="post.excerpt">
87
+ <p class="line-clamp-3 text-sm leading-relaxed text-muted-foreground">
88
+ {{ post.excerpt }}
89
+ </p>
90
+ </CardContent>
91
+ <CardFooter class="justify-between gap-3">
92
+ <span
93
+ v-if="authorName(post)"
94
+ class="inline-flex items-center gap-2 text-xs text-muted-foreground"
95
+ >
96
+ <img
97
+ v-if="authorAvatarUrl(post)"
98
+ :src="authorAvatarUrl(post)!"
99
+ alt=""
100
+ class="h-6 w-6 rounded-full object-cover ring-1 ring-border"
101
+ />
102
+ {{ authorName(post) }}
103
+ </span>
104
+ <span v-else />
105
+ <span class="text-sm font-medium text-primary">
106
+ Read article →
107
+ </span>
108
+ </CardFooter>
109
+ </Card>
110
+ </NuxtLink>
111
+ </div>
112
+ </div>
113
+ </template>
@@ -0,0 +1,15 @@
1
+ {
2
+ "type": "dkit:block",
3
+ "id": "booking-form-ui",
4
+ "title": "Booking form UI",
5
+ "description": "Validated booking request form (Next Server Action)",
6
+ "version": "0.1.0",
7
+ "frameworks": ["next"],
8
+ "uiKits": ["shadcn", "minimal"],
9
+ "shadcnComponents": ["button", "input", "label", "textarea"],
10
+ "slot": "form",
11
+ "route": { "kind": "static" },
12
+ "registryDependencies": ["booking-form"],
13
+ "dependencies": ["@directus/sdk"],
14
+ "layers": ["ui"]
15
+ }