@kurbo/dkit 0.4.0 → 0.5.1
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.
- package/README.md +4 -0
- package/dist/bin.js +385 -139
- package/dist/bin.js.map +1 -1
- package/package.json +4 -1
- package/vendor/registry/blocks/blog-detail/ui/minimal/next/blog-detail.tsx +0 -1
- package/vendor/registry/blocks/blog-detail/ui/shadcn/next/blog-detail.tsx +0 -1
- package/vendor/registry/blocks/blog-list/ui/minimal/next/blog-list.tsx +0 -1
- package/vendor/registry/blocks/blog-list/ui/shadcn/next/blog-list.tsx +0 -1
- package/vendor/registry/blocks/blog-list-cards/ui/minimal/next/blog-list-cards.tsx +0 -1
- package/vendor/registry/blocks/blog-list-cards/ui/shadcn/next/blog-list-cards.tsx +0 -1
- package/vendor/registry/blocks/booking-form-ui/ui/minimal/next/booking-form.tsx +0 -1
- package/vendor/registry/blocks/booking-form-ui/ui/shadcn/next/booking-form.tsx +0 -1
- package/vendor/registry/blocks/contact-form-ui/ui/minimal/next/contact-form.tsx +0 -1
- package/vendor/registry/blocks/contact-form-ui/ui/shadcn/next/contact-form.tsx +0 -1
- package/vendor/registry/blocks/faq-list/ui/minimal/next/faq-list.tsx +0 -1
- package/vendor/registry/blocks/faq-list/ui/shadcn/next/faq-list.tsx +0 -1
- package/vendor/registry/blocks/page-detail/ui/minimal/next/page-detail.tsx +0 -1
- package/vendor/registry/blocks/page-detail/ui/shadcn/next/page-detail.tsx +0 -1
- package/vendor/registry/blocks/project-detail/ui/minimal/next/project-detail.tsx +0 -1
- package/vendor/registry/blocks/project-detail/ui/shadcn/next/project-detail.tsx +0 -1
- package/vendor/registry/blocks/project-list/ui/minimal/next/project-list.tsx +0 -1
- package/vendor/registry/blocks/project-list/ui/shadcn/next/project-list.tsx +0 -1
- package/vendor/registry/blocks/project-list-cards/ui/minimal/next/project-list-cards.tsx +0 -1
- package/vendor/registry/blocks/project-list-cards/ui/shadcn/next/project-list-cards.tsx +0 -1
- package/vendor/registry/blocks/projects-carousel/ui/minimal/next/projects-carousel-client.tsx +0 -4
- package/vendor/registry/blocks/projects-carousel/ui/minimal/next/projects-carousel.tsx +0 -1
- package/vendor/registry/blocks/projects-carousel/ui/shadcn/next/projects-carousel-client.tsx +0 -1
- package/vendor/registry/blocks/projects-carousel/ui/shadcn/next/projects-carousel.tsx +0 -1
- package/vendor/registry/blocks/service-detail/ui/minimal/next/service-detail.tsx +0 -1
- package/vendor/registry/blocks/service-detail/ui/shadcn/next/service-detail.tsx +0 -1
- package/vendor/registry/blocks/service-list/ui/minimal/next/service-list.tsx +0 -1
- package/vendor/registry/blocks/service-list/ui/shadcn/next/service-list.tsx +0 -1
- package/vendor/registry/blocks/service-list-cards/ui/minimal/next/service-list-cards.tsx +0 -1
- package/vendor/registry/blocks/service-list-cards/ui/shadcn/next/service-list-cards.tsx +0 -1
- package/vendor/registry/blocks/social-links/ui/minimal/next/social-links.tsx +0 -1
- package/vendor/registry/blocks/social-links/ui/shadcn/next/social-links.tsx +0 -1
- package/vendor/registry/blocks/team-detail/ui/minimal/next/team-detail.tsx +0 -1
- package/vendor/registry/blocks/team-detail/ui/shadcn/next/team-detail.tsx +0 -1
- package/vendor/registry/blocks/team-list/ui/minimal/next/team-list.tsx +0 -1
- package/vendor/registry/blocks/team-list/ui/shadcn/next/team-list.tsx +0 -1
- package/vendor/registry/blocks/team-list-cards/ui/minimal/next/team-list-cards.tsx +0 -1
- package/vendor/registry/blocks/team-list-cards/ui/shadcn/next/team-list-cards.tsx +0 -1
- package/vendor/registry/blocks/testimonials-carousel/ui/minimal/next/testimonials-carousel-client.tsx +0 -4
- package/vendor/registry/blocks/testimonials-carousel/ui/minimal/next/testimonials-carousel.tsx +0 -1
- package/vendor/registry/blocks/testimonials-carousel/ui/shadcn/next/testimonials-carousel-client.tsx +0 -1
- package/vendor/registry/blocks/testimonials-carousel/ui/shadcn/next/testimonials-carousel.tsx +0 -1
- package/vendor/registry/blocks/testimonials-list/ui/minimal/next/testimonials-list.tsx +0 -1
- package/vendor/registry/blocks/testimonials-list/ui/shadcn/next/testimonials-list.tsx +0 -1
- package/vendor/registry/blocks/testimonials-list-cards/ui/minimal/next/testimonials-list-cards.tsx +0 -1
- package/vendor/registry/blocks/testimonials-list-cards/ui/shadcn/next/testimonials-list-cards.tsx +0 -1
- package/vendor/registry/modules/blog/lib.multilocale.ts +124 -129
- package/vendor/registry/modules/blog/lib.ts +12 -9
- package/vendor/registry/modules/blog/services/seed.json +1 -1
- package/vendor/registry/modules/blog/services/seed.multilocale.json +1 -1
- package/vendor/registry/modules/blog/types.multilocale.ts +41 -12
- package/vendor/registry/modules/blog/types.ts +8 -6
- package/vendor/registry/modules/faq/lib.multilocale.ts +30 -30
- package/vendor/registry/modules/faq/lib.ts +4 -5
- package/vendor/registry/modules/faq/types.multilocale.ts +13 -2
- package/vendor/registry/modules/faq/types.ts +4 -2
- package/vendor/registry/modules/navigation/lib.multilocale.ts +207 -76
- package/vendor/registry/modules/navigation/lib.ts +18 -17
- package/vendor/registry/modules/navigation/types.multilocale.ts +24 -4
- package/vendor/registry/modules/navigation/types.ts +6 -4
- package/vendor/registry/modules/pages/lib.multilocale.ts +34 -39
- package/vendor/registry/modules/pages/lib.ts +4 -3
- package/vendor/registry/modules/pages/types.multilocale.ts +14 -3
- package/vendor/registry/modules/pages/types.ts +5 -3
- package/vendor/registry/modules/projects/lib.multilocale.ts +149 -65
- package/vendor/registry/modules/projects/lib.ts +6 -6
- package/vendor/registry/modules/projects/services/seed.json +2 -2
- package/vendor/registry/modules/projects/services/seed.multilocale.json +2 -2
- package/vendor/registry/modules/projects/types.multilocale.ts +15 -3
- package/vendor/registry/modules/projects/types.ts +5 -3
- package/vendor/registry/modules/services/lib.multilocale.ts +143 -63
- package/vendor/registry/modules/services/lib.ts +6 -6
- package/vendor/registry/modules/services/services/seed.json +4 -4
- package/vendor/registry/modules/services/services/seed.multilocale.json +2 -2
- package/vendor/registry/modules/services/types.multilocale.ts +13 -3
- package/vendor/registry/modules/services/types.ts +5 -3
- package/vendor/registry/modules/settings/lib.multilocale.ts +159 -57
- package/vendor/registry/modules/settings/types.multilocale.ts +15 -0
- package/vendor/registry/modules/settings/types.ts +2 -2
- package/vendor/registry/modules/team/lib.multilocale.ts +116 -49
- package/vendor/registry/modules/team/lib.ts +4 -3
- package/vendor/registry/modules/team/services/seed.json +4 -4
- package/vendor/registry/modules/team/services/seed.multilocale.json +2 -2
- package/vendor/registry/modules/team/types.multilocale.ts +16 -3
- package/vendor/registry/modules/team/types.ts +5 -3
- package/vendor/registry/modules/testimonials/lib.multilocale.ts +82 -50
- package/vendor/registry/modules/testimonials/services/seed.json +4 -4
- package/vendor/registry/modules/testimonials/services/seed.multilocale.json +2 -2
- package/vendor/registry/modules/testimonials/types.multilocale.ts +14 -2
- package/vendor/registry/modules/testimonials/types.ts +4 -2
- package/vendor/registry/shared/helpers.ts +9 -3
- package/vendor/registry/shared/i18n.ts +84 -12
- package/vendor/registry/shared/prose.css +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kurbo/dkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Install Directus modules — schema, permissions, flows, and frontend code you own",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -35,6 +35,9 @@
|
|
|
35
35
|
"dev": "tsx watch src/bin.ts",
|
|
36
36
|
"link:global": "pnpm build && pnpm link --global",
|
|
37
37
|
"test": "node --import tsx --test src/**/*.test.ts",
|
|
38
|
+
"test:e2e:directus": "node --import tsx ./scripts/run-directus-e2e.mjs",
|
|
39
|
+
"test:e2e:directus:12": "DKIT_E2E_DIRECTUS_VERSIONS=12 node --import tsx ./scripts/run-directus-e2e.mjs",
|
|
40
|
+
"test:e2e:directus:11": "DKIT_E2E_DIRECTUS_VERSIONS=11 node --import tsx ./scripts/run-directus-e2e.mjs",
|
|
38
41
|
"lint": "echo 'no lint configured'"
|
|
39
42
|
},
|
|
40
43
|
"dependencies": {
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
} from "@/lib/dkit/blog";
|
|
7
7
|
import { moduleHref } from "@/lib/dkit/paths";
|
|
8
8
|
|
|
9
|
-
/** Minimal kit — semantic HTML + small inlined layout CSS (no Tailwind). */
|
|
10
9
|
export async function BlogList() {
|
|
11
10
|
const posts = await getBlogPosts();
|
|
12
11
|
const hrefById = Object.fromEntries(
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
} from "@/lib/dkit/blog";
|
|
7
7
|
import { moduleHref } from "@/lib/dkit/paths";
|
|
8
8
|
|
|
9
|
-
/** Styled with shadcn theme tokens — inherits your app theme (Next shadcn/ui). */
|
|
10
9
|
export async function BlogList() {
|
|
11
10
|
const posts = await getBlogPosts();
|
|
12
11
|
const hrefById = Object.fromEntries(
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
} from "@/lib/dkit/blog";
|
|
7
7
|
import { moduleHref } from "@/lib/dkit/paths";
|
|
8
8
|
|
|
9
|
-
/** Minimal kit — plain HTML card grid (no Tailwind / shadcn). */
|
|
10
9
|
export async function BlogListCards() {
|
|
11
10
|
const posts = await getBlogPosts();
|
|
12
11
|
const hrefById = Object.fromEntries(
|
|
@@ -13,7 +13,6 @@ import { Textarea } from "@/components/ui/textarea";
|
|
|
13
13
|
|
|
14
14
|
const initial: BookingFormState = { ok: false };
|
|
15
15
|
|
|
16
|
-
/** Uses your project's shadcn/ui components. */
|
|
17
16
|
export function BookingForm() {
|
|
18
17
|
const [state, action, pending] = useActionState(submitBookingForm, initial);
|
|
19
18
|
|
|
@@ -13,7 +13,6 @@ import { Textarea } from "@/components/ui/textarea";
|
|
|
13
13
|
|
|
14
14
|
const initial: ContactFormState = { ok: false };
|
|
15
15
|
|
|
16
|
-
/** Uses your project's shadcn/ui components. */
|
|
17
16
|
export function ContactForm() {
|
|
18
17
|
const [state, action, pending] = useActionState(submitContactForm, initial);
|
|
19
18
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getProjects, projectImageUrl } from "@/lib/dkit/projects";
|
|
2
2
|
import { moduleHref } from "@/lib/dkit/paths";
|
|
3
3
|
|
|
4
|
-
/** Minimal kit — stacked list (shared type primitives). */
|
|
5
4
|
export async function ProjectList() {
|
|
6
5
|
const projects = await getProjects();
|
|
7
6
|
const hrefById = Object.fromEntries(
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getProjects, projectImageUrl } from "@/lib/dkit/projects";
|
|
2
2
|
import { moduleHref } from "@/lib/dkit/paths";
|
|
3
3
|
|
|
4
|
-
/** Styled with shadcn theme tokens — stacked list like blog-list. */
|
|
5
4
|
export async function ProjectList() {
|
|
6
5
|
const projects = await getProjects();
|
|
7
6
|
const hrefById = Object.fromEntries(
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getProjects, projectImageUrl } from "@/lib/dkit/projects";
|
|
2
2
|
import { moduleHref } from "@/lib/dkit/paths";
|
|
3
3
|
|
|
4
|
-
/** Minimal kit — uses shared .dkit-card / type primitives. */
|
|
5
4
|
export async function ProjectListCards() {
|
|
6
5
|
const projects = await getProjects();
|
|
7
6
|
const hrefById = Object.fromEntries(
|
package/vendor/registry/blocks/projects-carousel/ui/minimal/next/projects-carousel-client.tsx
CHANGED
|
@@ -12,10 +12,6 @@ export type ProjectSlide = {
|
|
|
12
12
|
imageUrl?: string | null;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
/**
|
|
16
|
-
* Full-bleed CSS scroll-snap carousel.
|
|
17
|
-
* Prev/next only call scrollBy — motion is CSS (snap + smooth scroll).
|
|
18
|
-
*/
|
|
19
15
|
export function ProjectsCarouselClient({
|
|
20
16
|
slides,
|
|
21
17
|
}: {
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
type ProjectSlide,
|
|
6
6
|
} from "./projects-carousel-client";
|
|
7
7
|
|
|
8
|
-
/** Minimal kit — CSS scroll-snap carousel with tiny prev/next JS. */
|
|
9
8
|
export async function ProjectsCarousel() {
|
|
10
9
|
const projects = await getProjects();
|
|
11
10
|
const slides: ProjectSlide[] = await Promise.all(
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
type ProjectSlide,
|
|
6
6
|
} from "./projects-carousel-client";
|
|
7
7
|
|
|
8
|
-
/** Uses your project's shadcn carousel — full-bleed, one project per slide. */
|
|
9
8
|
export async function ProjectsCarousel() {
|
|
10
9
|
const projects = await getProjects();
|
|
11
10
|
const slides: ProjectSlide[] = await Promise.all(
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getServices, serviceImageUrl } from "@/lib/dkit/services";
|
|
2
2
|
import { moduleHref } from "@/lib/dkit/paths";
|
|
3
3
|
|
|
4
|
-
/** Minimal kit — stacked list (shared type primitives). */
|
|
5
4
|
export async function ServiceList() {
|
|
6
5
|
const services = await getServices();
|
|
7
6
|
const hrefById = Object.fromEntries(
|
|
@@ -2,7 +2,6 @@ import { getServices, serviceImageUrl } from "@/lib/dkit/services";
|
|
|
2
2
|
import { moduleHref } from "@/lib/dkit/paths";
|
|
3
3
|
import { Badge } from "@/components/ui/badge";
|
|
4
4
|
|
|
5
|
-
/** Uses your project's shadcn/ui components. */
|
|
6
5
|
export async function ServiceList() {
|
|
7
6
|
const services = await getServices();
|
|
8
7
|
const hrefById = Object.fromEntries(
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getServices, serviceImageUrl } from "@/lib/dkit/services";
|
|
2
2
|
import { moduleHref } from "@/lib/dkit/paths";
|
|
3
3
|
|
|
4
|
-
/** Minimal kit — uses shared .dkit-card / type primitives. */
|
|
5
4
|
export async function ServiceListCards() {
|
|
6
5
|
const services = await getServices();
|
|
7
6
|
const hrefById = Object.fromEntries(
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getTeamMembers, teamMemberPhotoUrl } from "@/lib/dkit/team";
|
|
2
2
|
import { moduleHref } from "@/lib/dkit/paths";
|
|
3
3
|
|
|
4
|
-
/** Minimal kit — stacked list (shared type primitives). */
|
|
5
4
|
export async function TeamList() {
|
|
6
5
|
const members = await getTeamMembers();
|
|
7
6
|
const hrefById = Object.fromEntries(
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getTeamMembers, teamMemberPhotoUrl } from "@/lib/dkit/team";
|
|
2
2
|
import { moduleHref } from "@/lib/dkit/paths";
|
|
3
3
|
|
|
4
|
-
/** Styled with shadcn theme tokens — stacked list like blog-list. */
|
|
5
4
|
export async function TeamList() {
|
|
6
5
|
const members = await getTeamMembers();
|
|
7
6
|
const hrefById = Object.fromEntries(
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getTeamMembers, teamMemberPhotoUrl } from "@/lib/dkit/team";
|
|
2
2
|
import { moduleHref } from "@/lib/dkit/paths";
|
|
3
3
|
|
|
4
|
-
/** Minimal kit — uses shared .dkit-card / type primitives. */
|
|
5
4
|
export async function TeamListCards() {
|
|
6
5
|
const members = await getTeamMembers();
|
|
7
6
|
const hrefById = Object.fromEntries(
|
|
@@ -11,10 +11,6 @@ export type TestimonialSlide = {
|
|
|
11
11
|
avatarUrl?: string | null;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
/**
|
|
15
|
-
* Full-bleed CSS scroll-snap carousel.
|
|
16
|
-
* Prev/next only call scrollBy — motion is CSS (snap + smooth scroll).
|
|
17
|
-
*/
|
|
18
14
|
export function TestimonialsCarouselClient({
|
|
19
15
|
slides,
|
|
20
16
|
}: {
|
package/vendor/registry/blocks/testimonials-carousel/ui/minimal/next/testimonials-carousel.tsx
CHANGED
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
type TestimonialSlide,
|
|
8
8
|
} from "./testimonials-carousel-client";
|
|
9
9
|
|
|
10
|
-
/** Minimal kit — CSS scroll-snap carousel with tiny prev/next JS. */
|
|
11
10
|
export async function TestimonialsCarousel() {
|
|
12
11
|
const testimonials = await getTestimonials();
|
|
13
12
|
const slides: TestimonialSlide[] = testimonials.map((t) => ({
|
package/vendor/registry/blocks/testimonials-carousel/ui/shadcn/next/testimonials-carousel.tsx
CHANGED
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
type TestimonialSlide,
|
|
8
8
|
} from "./testimonials-carousel-client";
|
|
9
9
|
|
|
10
|
-
/** Uses your project's shadcn carousel — full-bleed, one quote per slide. */
|
|
11
10
|
export async function TestimonialsCarousel() {
|
|
12
11
|
const testimonials = await getTestimonials();
|
|
13
12
|
const slides: TestimonialSlide[] = testimonials.map((t) => ({
|