@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,81 @@
1
+ import { getProjects, projectImageUrl } from "@/lib/dkit/projects";
2
+ import { moduleHref } from "@/lib/dkit/paths";
3
+
4
+ /** Styled with shadcn theme tokens — stacked list like blog-list. */
5
+ export async function ProjectList() {
6
+ const projects = await getProjects();
7
+ const hrefById = Object.fromEntries(
8
+ await Promise.all(
9
+ projects.map(async (project) => [project.id, await moduleHref("projects", project.slug)] as const),
10
+ ),
11
+ );
12
+
13
+ return (
14
+ <div className="relative mx-auto max-w-2xl px-6 py-16 sm:py-20">
15
+ <header className="mb-12 border-b border-border pb-10">
16
+ <p className="mb-3 text-xs font-medium tracking-[0.2em] text-primary uppercase">
17
+ Portfolio
18
+ </p>
19
+ <h1 className="text-4xl font-semibold leading-tight tracking-tight text-foreground sm:text-5xl">
20
+ Projects
21
+ </h1>
22
+ <p className="mt-4 max-w-md text-base leading-relaxed text-muted-foreground">
23
+ Selected work and case studies.
24
+ </p>
25
+ </header>
26
+
27
+ {projects.length === 0 ? (
28
+ <p className="rounded-xl border border-dashed border-border bg-muted/40 px-6 py-10 text-center text-muted-foreground">
29
+ No published projects yet.
30
+ </p>
31
+ ) : (
32
+ <ul className="space-y-1">
33
+ {projects.map((project, i) => {
34
+ const imageUrl = projectImageUrl(project);
35
+ return (
36
+ <li key={project.id}>
37
+ <a
38
+ href={hrefById[project.id]!}
39
+ className="group flex gap-5 rounded-xl px-4 py-5 transition-colors hover:bg-muted/60"
40
+ >
41
+ {imageUrl ? (
42
+ // eslint-disable-next-line @next/next/no-img-element
43
+ <img
44
+ src={imageUrl}
45
+ alt=""
46
+ className="mt-0.5 h-16 w-16 shrink-0 rounded-lg object-cover ring-1 ring-border"
47
+ />
48
+ ) : (
49
+ <span className="mt-1 w-8 shrink-0 font-mono text-xs text-muted-foreground tabular-nums">
50
+ {String(i + 1).padStart(2, "0")}
51
+ </span>
52
+ )}
53
+ <span className="min-w-0 flex-1">
54
+ <span className="block text-xl font-medium tracking-tight text-foreground transition-colors group-hover:text-primary">
55
+ {project.title}
56
+ </span>
57
+ {project.summary ? (
58
+ <span className="mt-2 block text-sm leading-relaxed text-muted-foreground">
59
+ {project.summary}
60
+ </span>
61
+ ) : null}
62
+ <span className="mt-3 flex flex-wrap items-center gap-x-2 text-xs text-muted-foreground">
63
+ {project.client ? <span>{project.client}</span> : null}
64
+ {project.client && project.location ? (
65
+ <span aria-hidden>·</span>
66
+ ) : null}
67
+ {project.location ? <span>{project.location}</span> : null}
68
+ <span className="ml-auto text-primary opacity-0 transition group-hover:opacity-100">
69
+ View →
70
+ </span>
71
+ </span>
72
+ </span>
73
+ </a>
74
+ </li>
75
+ );
76
+ })}
77
+ </ul>
78
+ )}
79
+ </div>
80
+ );
81
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "type": "dkit:block",
3
+ "id": "project-list-cards",
4
+ "title": "Project list (cards)",
5
+ "description": "Card grid of projects with image, meta, and summary",
6
+ "version": "0.1.0",
7
+ "frameworks": ["next"],
8
+ "uiKits": ["shadcn", "minimal"],
9
+ "shadcnComponents": ["card"],
10
+ "slot": "list",
11
+ "route": { "kind": "index" },
12
+ "registryDependencies": ["projects"],
13
+ "dependencies": ["@directus/sdk"],
14
+ "layers": ["ui"]
15
+ }
@@ -0,0 +1,125 @@
1
+ import { getProjects, projectImageUrl } from "@/lib/dkit/projects";
2
+ import { moduleHref } from "@/lib/dkit/paths";
3
+
4
+ /** Minimal kit — uses shared .dkit-card / type primitives. */
5
+ export async function ProjectListCards() {
6
+ const projects = await getProjects();
7
+ const hrefById = Object.fromEntries(
8
+ await Promise.all(
9
+ projects.map(async (project) => [project.id, await moduleHref("projects", project.slug)] as const),
10
+ ),
11
+ );
12
+
13
+ return (
14
+ <section>
15
+ <style>{`
16
+ .dkit-project-cards {
17
+ display: grid;
18
+ gap: 1.25rem;
19
+ grid-template-columns: 1fr;
20
+ list-style: none;
21
+ margin: 0;
22
+ padding: 0;
23
+ }
24
+ @media (min-width: 640px) {
25
+ .dkit-project-cards {
26
+ grid-template-columns: 1fr 1fr;
27
+ }
28
+ }
29
+ .dkit-project-cards__media,
30
+ .dkit-project-cards__placeholder {
31
+ display: block;
32
+ width: 100%;
33
+ aspect-ratio: 16 / 10;
34
+ object-fit: cover;
35
+ background: #eee;
36
+ }
37
+ .dkit-project-cards__placeholder {
38
+ display: flex;
39
+ align-items: center;
40
+ justify-content: center;
41
+ color: #bbb;
42
+ font-size: 2rem;
43
+ }
44
+ .dkit-project-cards__meta {
45
+ margin: 0 0 0.25rem;
46
+ font-size: 0.875rem;
47
+ color: var(--dkit-muted, #666);
48
+ }
49
+ .dkit-project-cards__title {
50
+ margin: 0;
51
+ font-size: 1.25rem;
52
+ }
53
+ .dkit-project-cards__summary {
54
+ margin: 0.75rem 0 0;
55
+ flex: 1;
56
+ font-size: 0.875rem;
57
+ color: var(--dkit-muted, #555);
58
+ }
59
+ .dkit-card__body .dkit-link {
60
+ margin-top: 1rem;
61
+ }
62
+ `}</style>
63
+
64
+ <header>
65
+ <p className="dkit-label">Portfolio</p>
66
+ <h1 className="dkit-headline">Projects</h1>
67
+ <p className="dkit-subtitle">Browse work.</p>
68
+ </header>
69
+
70
+ {projects.length === 0 ? (
71
+ <p>No published projects yet.</p>
72
+ ) : (
73
+ <ul className="dkit-project-cards">
74
+ {projects.map((project) => {
75
+ const imageUrl = projectImageUrl(project);
76
+ return (
77
+ <li key={project.id}>
78
+ <a
79
+ className="dkit-card dkit-card--media"
80
+ href={hrefById[project.id]!}
81
+ >
82
+ {imageUrl ? (
83
+ // eslint-disable-next-line @next/next/no-img-element
84
+ <img
85
+ className="dkit-project-cards__media"
86
+ src={imageUrl}
87
+ alt=""
88
+ />
89
+ ) : (
90
+ <span
91
+ className="dkit-project-cards__placeholder"
92
+ aria-hidden
93
+ >
94
+ ◇
95
+ </span>
96
+ )}
97
+ <div className="dkit-card__body">
98
+ {project.client || project.location ? (
99
+ <p className="dkit-project-cards__meta">
100
+ {[project.client, project.location]
101
+ .filter(Boolean)
102
+ .join(" · ")}
103
+ </p>
104
+ ) : null}
105
+ <h2 className="dkit-project-cards__title">
106
+ {project.title}
107
+ </h2>
108
+ {project.summary ? (
109
+ <p className="dkit-project-cards__summary">
110
+ {project.summary}
111
+ </p>
112
+ ) : (
113
+ <span className="dkit-project-cards__summary" />
114
+ )}
115
+ <span className="dkit-link">View project →</span>
116
+ </div>
117
+ </a>
118
+ </li>
119
+ );
120
+ })}
121
+ </ul>
122
+ )}
123
+ </section>
124
+ );
125
+ }
@@ -0,0 +1,94 @@
1
+ import { getProjects, projectImageUrl } from "@/lib/dkit/projects";
2
+ import { moduleHref } from "@/lib/dkit/paths";
3
+ import {
4
+ Card,
5
+ CardContent,
6
+ CardDescription,
7
+ CardFooter,
8
+ CardHeader,
9
+ CardTitle,
10
+ } from "@/components/ui/card";
11
+
12
+ /** Uses your project's shadcn/ui components. */
13
+ export async function ProjectListCards() {
14
+ const projects = await getProjects();
15
+ const hrefById = Object.fromEntries(
16
+ await Promise.all(
17
+ projects.map(async (project) => [project.id, await moduleHref("projects", project.slug)] as const),
18
+ ),
19
+ );
20
+
21
+ return (
22
+ <div className="mx-auto max-w-5xl px-6 py-16 sm:py-20">
23
+ <header className="mb-12 max-w-xl">
24
+ <p className="mb-3 text-xs font-medium tracking-[0.2em] text-primary uppercase">
25
+ Portfolio
26
+ </p>
27
+ <h1 className="text-4xl font-semibold tracking-tight text-foreground sm:text-5xl">
28
+ Projects
29
+ </h1>
30
+ <p className="mt-4 text-muted-foreground">
31
+ Browse work in a card grid.
32
+ </p>
33
+ </header>
34
+
35
+ {projects.length === 0 ? (
36
+ <p className="rounded-xl border border-dashed border-border px-6 py-12 text-center text-muted-foreground">
37
+ No published projects yet.
38
+ </p>
39
+ ) : (
40
+ <div className="grid gap-5 sm:grid-cols-2">
41
+ {projects.map((project) => {
42
+ const imageUrl = projectImageUrl(project);
43
+ return (
44
+ <a
45
+ key={project.id}
46
+ href={hrefById[project.id]!}
47
+ className="group block h-full no-underline transition hover:-translate-y-0.5"
48
+ >
49
+ <Card className="h-full overflow-hidden pt-0 shadow-sm transition group-hover:border-primary/40 group-hover:shadow-md">
50
+ {imageUrl ? (
51
+ // eslint-disable-next-line @next/next/no-img-element
52
+ <img
53
+ src={imageUrl}
54
+ alt=""
55
+ className="aspect-[16/10] w-full object-cover"
56
+ />
57
+ ) : (
58
+ <div className="aspect-[16/10] w-full bg-muted" />
59
+ )}
60
+ <CardHeader>
61
+ {project.client || project.location ? (
62
+ <CardDescription>
63
+ {[project.client, project.location]
64
+ .filter(Boolean)
65
+ .join(" · ")}
66
+ </CardDescription>
67
+ ) : null}
68
+ <CardTitle className="text-xl transition-colors group-hover:text-primary">
69
+ {project.title}
70
+ </CardTitle>
71
+ </CardHeader>
72
+ {project.summary ? (
73
+ <CardContent className="flex-1">
74
+ <p className="line-clamp-3 text-sm leading-relaxed text-muted-foreground">
75
+ {project.summary}
76
+ </p>
77
+ </CardContent>
78
+ ) : (
79
+ <div className="flex-1" />
80
+ )}
81
+ <CardFooter className="mt-auto">
82
+ <span className="text-sm font-medium text-primary">
83
+ View project →
84
+ </span>
85
+ </CardFooter>
86
+ </Card>
87
+ </a>
88
+ );
89
+ })}
90
+ </div>
91
+ )}
92
+ </div>
93
+ );
94
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "type": "dkit:block",
3
+ "id": "projects-carousel",
4
+ "title": "Projects carousel",
5
+ "description": "Full-bleed portfolio slider — one project per slide",
6
+ "version": "0.1.0",
7
+ "frameworks": ["next"],
8
+ "uiKits": ["shadcn", "minimal"],
9
+ "shadcnComponents": ["carousel", "button"],
10
+ "slot": "list",
11
+ "route": { "kind": "static" },
12
+ "registryDependencies": ["projects"],
13
+ "dependencies": ["@directus/sdk", "embla-carousel-react"],
14
+ "layers": ["ui"]
15
+ }
@@ -0,0 +1,239 @@
1
+ "use client";
2
+
3
+ import { useRef } from "react";
4
+
5
+ export type ProjectSlide = {
6
+ id: string;
7
+ title: string;
8
+ href: string;
9
+ summary?: string | null;
10
+ client?: string | null;
11
+ location?: string | null;
12
+ imageUrl?: string | null;
13
+ };
14
+
15
+ /**
16
+ * Full-bleed CSS scroll-snap carousel.
17
+ * Prev/next only call scrollBy — motion is CSS (snap + smooth scroll).
18
+ */
19
+ export function ProjectsCarouselClient({
20
+ slides,
21
+ }: {
22
+ slides: ProjectSlide[];
23
+ }) {
24
+ const scrollerRef = useRef<HTMLDivElement>(null);
25
+
26
+ function scrollByPage(dir: -1 | 1) {
27
+ const el = scrollerRef.current;
28
+ if (!el) return;
29
+ el.scrollBy({ left: dir * el.clientWidth, behavior: "smooth" });
30
+ }
31
+
32
+ if (!slides.length) {
33
+ return <p>No published projects yet.</p>;
34
+ }
35
+
36
+ return (
37
+ <section className="dkit-projects-carousel">
38
+ <style>{`
39
+ .dkit-projects-carousel {
40
+ width: 100%;
41
+ overflow-x: clip;
42
+ padding: 3.5rem 0;
43
+ background: #f5f5f5;
44
+ }
45
+ .dkit-projects-carousel__intro {
46
+ max-width: 40rem;
47
+ margin: 0 auto 2.5rem;
48
+ padding: 0 1.5rem;
49
+ text-align: center;
50
+ }
51
+ .dkit-projects-carousel__intro h2 {
52
+ margin: 0.5rem 0 0;
53
+ font-size: 1.75rem;
54
+ }
55
+ .dkit-projects-carousel__eyebrow {
56
+ margin: 0;
57
+ font-size: 0.75rem;
58
+ letter-spacing: 0.2em;
59
+ text-transform: uppercase;
60
+ }
61
+ .dkit-projects-carousel__frame {
62
+ position: relative;
63
+ max-width: 64rem;
64
+ margin: 0 auto;
65
+ padding: 0 3rem;
66
+ }
67
+ .dkit-projects-carousel__track {
68
+ display: flex;
69
+ overflow-x: auto;
70
+ scroll-snap-type: x mandatory;
71
+ scroll-behavior: smooth;
72
+ overscroll-behavior-x: contain;
73
+ scrollbar-width: none;
74
+ -webkit-overflow-scrolling: touch;
75
+ }
76
+ .dkit-projects-carousel__track::-webkit-scrollbar {
77
+ display: none;
78
+ }
79
+ .dkit-projects-carousel__slide {
80
+ flex: 0 0 100%;
81
+ scroll-snap-align: center;
82
+ scroll-snap-stop: always;
83
+ box-sizing: border-box;
84
+ }
85
+ .dkit-projects-carousel__link {
86
+ display: block;
87
+ max-width: 56rem;
88
+ margin: 0 auto;
89
+ color: inherit;
90
+ text-decoration: none;
91
+ }
92
+ .dkit-projects-carousel__media,
93
+ .dkit-projects-carousel__placeholder {
94
+ display: block;
95
+ width: 100%;
96
+ aspect-ratio: 16 / 9;
97
+ object-fit: cover;
98
+ background: #e5e5e5;
99
+ }
100
+ .dkit-projects-carousel__placeholder {
101
+ display: flex;
102
+ align-items: center;
103
+ justify-content: center;
104
+ color: #666;
105
+ }
106
+ .dkit-projects-carousel__body {
107
+ margin-top: 1.75rem;
108
+ padding: 0 0.5rem;
109
+ text-align: center;
110
+ }
111
+ .dkit-projects-carousel__meta {
112
+ margin: 0 0 0.5rem;
113
+ font-size: 0.75rem;
114
+ letter-spacing: 0.08em;
115
+ text-transform: uppercase;
116
+ color: #666;
117
+ }
118
+ .dkit-projects-carousel__title {
119
+ margin: 0;
120
+ font-size: 1.75rem;
121
+ }
122
+ .dkit-projects-carousel__summary {
123
+ margin: 0.75rem auto 0;
124
+ max-width: 36rem;
125
+ line-height: 1.5;
126
+ color: #555;
127
+ }
128
+ .dkit-projects-carousel__cta {
129
+ display: inline-block;
130
+ margin-top: 1.25rem;
131
+ font-size: 0.875rem;
132
+ font-weight: 600;
133
+ }
134
+ .dkit-projects-carousel__nav {
135
+ position: absolute;
136
+ inset: 0 0.25rem;
137
+ display: flex;
138
+ align-items: center;
139
+ justify-content: space-between;
140
+ pointer-events: none;
141
+ }
142
+ .dkit-projects-carousel__nav button {
143
+ pointer-events: auto;
144
+ width: 2.25rem;
145
+ height: 2.25rem;
146
+ border-radius: 9999px;
147
+ border: 1px solid #ccc;
148
+ background: #fff;
149
+ cursor: pointer;
150
+ }
151
+ .dkit-projects-carousel__nav button:hover {
152
+ background: #f0f0f0;
153
+ }
154
+ @media (prefers-reduced-motion: reduce) {
155
+ .dkit-projects-carousel__track {
156
+ scroll-behavior: auto;
157
+ }
158
+ }
159
+ `}</style>
160
+
161
+ <header className="dkit-projects-carousel__intro">
162
+ <p className="dkit-projects-carousel__eyebrow">Portfolio</p>
163
+ <h2>Selected work</h2>
164
+ </header>
165
+
166
+ <div className="dkit-projects-carousel__frame">
167
+ <div
168
+ ref={scrollerRef}
169
+ className="dkit-projects-carousel__track"
170
+ tabIndex={0}
171
+ aria-roledescription="carousel"
172
+ aria-label="Projects"
173
+ >
174
+ {slides.map((project) => (
175
+ <div
176
+ key={project.id}
177
+ className="dkit-projects-carousel__slide"
178
+ aria-roledescription="slide"
179
+ >
180
+ <a className="dkit-projects-carousel__link" href={project.href}>
181
+ {project.imageUrl ? (
182
+ // eslint-disable-next-line @next/next/no-img-element
183
+ <img
184
+ className="dkit-projects-carousel__media"
185
+ src={project.imageUrl}
186
+ alt=""
187
+ />
188
+ ) : (
189
+ <div className="dkit-projects-carousel__placeholder">
190
+ No image
191
+ </div>
192
+ )}
193
+ <div className="dkit-projects-carousel__body">
194
+ {project.client || project.location ? (
195
+ <p className="dkit-projects-carousel__meta">
196
+ {[project.client, project.location]
197
+ .filter(Boolean)
198
+ .join(" · ")}
199
+ </p>
200
+ ) : null}
201
+ <h3 className="dkit-projects-carousel__title">
202
+ {project.title}
203
+ </h3>
204
+ {project.summary ? (
205
+ <p className="dkit-projects-carousel__summary">
206
+ {project.summary}
207
+ </p>
208
+ ) : null}
209
+ <span className="dkit-projects-carousel__cta">
210
+ View project →
211
+ </span>
212
+ </div>
213
+ </a>
214
+ </div>
215
+ ))}
216
+ </div>
217
+
218
+ {slides.length > 1 ? (
219
+ <div className="dkit-projects-carousel__nav">
220
+ <button
221
+ type="button"
222
+ aria-label="Previous project"
223
+ onClick={() => scrollByPage(-1)}
224
+ >
225
+ ←
226
+ </button>
227
+ <button
228
+ type="button"
229
+ aria-label="Next project"
230
+ onClick={() => scrollByPage(1)}
231
+ >
232
+ →
233
+ </button>
234
+ </div>
235
+ ) : null}
236
+ </div>
237
+ </section>
238
+ );
239
+ }
@@ -0,0 +1,24 @@
1
+ import { getProjects, projectImageUrl } from "@/lib/dkit/projects";
2
+ import { moduleHref } from "@/lib/dkit/paths";
3
+ import {
4
+ ProjectsCarouselClient,
5
+ type ProjectSlide,
6
+ } from "./projects-carousel-client";
7
+
8
+ /** Minimal kit — CSS scroll-snap carousel with tiny prev/next JS. */
9
+ export async function ProjectsCarousel() {
10
+ const projects = await getProjects();
11
+ const slides: ProjectSlide[] = await Promise.all(
12
+ projects.map(async (project) => ({
13
+ id: project.id,
14
+ title: project.title,
15
+ href: await moduleHref("projects", project.slug),
16
+ summary: project.summary,
17
+ client: project.client,
18
+ location: project.location,
19
+ imageUrl: projectImageUrl(project),
20
+ })),
21
+ );
22
+
23
+ return <ProjectsCarouselClient slides={slides} />;
24
+ }