@arch-cadre/blog-module 0.0.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.
Files changed (44) hide show
  1. package/dist/actions/index.cjs +158 -0
  2. package/dist/actions/index.d.ts +34 -0
  3. package/dist/actions/index.mjs +121 -0
  4. package/dist/components/ui/button.cjs +53 -0
  5. package/dist/components/ui/button.d.ts +11 -0
  6. package/dist/components/ui/button.mjs +44 -0
  7. package/dist/components/ui/card.cjs +46 -0
  8. package/dist/components/ui/card.d.ts +6 -0
  9. package/dist/components/ui/card.mjs +35 -0
  10. package/dist/components/ui/input.cjs +23 -0
  11. package/dist/components/ui/input.d.ts +5 -0
  12. package/dist/components/ui/input.mjs +20 -0
  13. package/dist/components/ui/table.cjs +66 -0
  14. package/dist/components/ui/table.d.ts +8 -0
  15. package/dist/components/ui/table.mjs +59 -0
  16. package/dist/components/ui/textarea.cjs +21 -0
  17. package/dist/components/ui/textarea.d.ts +5 -0
  18. package/dist/components/ui/textarea.mjs +19 -0
  19. package/dist/index.cjs +37 -0
  20. package/dist/index.d.ts +3 -0
  21. package/dist/index.mjs +30 -0
  22. package/dist/intl.d.ts +7 -0
  23. package/dist/lib/utils.cjs +11 -0
  24. package/dist/lib/utils.d.ts +2 -0
  25. package/dist/lib/utils.mjs +5 -0
  26. package/dist/lib/validation.cjs +16 -0
  27. package/dist/lib/validation.d.ts +24 -0
  28. package/dist/lib/validation.mjs +10 -0
  29. package/dist/navigation.cjs +21 -0
  30. package/dist/navigation.d.ts +2 -0
  31. package/dist/navigation.mjs +19 -0
  32. package/dist/routes.cjs +70 -0
  33. package/dist/routes.d.ts +3 -0
  34. package/dist/routes.mjs +64 -0
  35. package/dist/schema.cjs +62 -0
  36. package/dist/schema.d.ts +0 -0
  37. package/dist/schema.mjs +53 -0
  38. package/dist/styles/globals.css +1 -0
  39. package/dist/ui/views.cjs +448 -0
  40. package/dist/ui/views.d.ts +16 -0
  41. package/dist/ui/views.mjs +232 -0
  42. package/locales/en/global.json +36 -0
  43. package/manifest.json +11 -0
  44. package/package.json +62 -0
@@ -0,0 +1,232 @@
1
+ "use client";
2
+ import { useTranslation } from "@arch-cadre/intl/client";
3
+ import { zodResolver } from "@hookform/resolvers/zod";
4
+ import {
5
+ ArrowLeft,
6
+ Eye,
7
+ MessageSquare,
8
+ Pencil,
9
+ Plus,
10
+ Trash2,
11
+ User as UserIcon
12
+ } from "lucide-react";
13
+ import Link from "next/link";
14
+ import { useRouter } from "next/navigation";
15
+ import * as React from "react";
16
+ import { useForm } from "react-hook-form";
17
+ import { toast } from "sonner";
18
+ import { createComment, createPost, deletePost, updatePost } from "../actions/index.mjs";
19
+ import { Button } from "../components/ui/button.mjs";
20
+ import {
21
+ Card,
22
+ CardContent,
23
+ CardHeader,
24
+ CardTitle
25
+ } from "../components/ui/card.mjs";
26
+ import { Input } from "../components/ui/input.mjs";
27
+ import {
28
+ Table,
29
+ TableBody,
30
+ TableCell,
31
+ TableHead,
32
+ TableHeader,
33
+ TableRow
34
+ } from "../components/ui/table.mjs";
35
+ import { Textarea } from "../components/ui/textarea.mjs";
36
+ import { commentSchema, postSchema } from "../lib/validation.mjs";
37
+ export function BlogListPage({ posts = [] }) {
38
+ const { t } = useTranslation();
39
+ return /* @__PURE__ */ React.createElement("div", { className: "max-w-4xl mx-auto p-6 space-y-8" }, /* @__PURE__ */ React.createElement("header", { className: "border-b pb-6" }, /* @__PURE__ */ React.createElement("h1", { className: "text-4xl font-black tracking-tighter text-primary" }, t("Blog Posts")), /* @__PURE__ */ React.createElement("p", { className: "text-muted-foreground mt-2" }, t("Reading your blog posts"))), /* @__PURE__ */ React.createElement("div", { className: "grid gap-6" }, posts.map((post) => /* @__PURE__ */ React.createElement(Link, { href: `/blog/${post.slug}`, key: post.id }, /* @__PURE__ */ React.createElement(Card, { className: "group hover:shadow-lg transition-all cursor-pointer overflow-hidden border-primary/5" }, /* @__PURE__ */ React.createElement(CardHeader, null, /* @__PURE__ */ React.createElement(CardTitle, { className: "text-2xl group-hover:text-primary transition-colors" }, post.title), /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2 text-xs text-muted-foreground mt-1" }, /* @__PURE__ */ React.createElement(UserIcon, { className: "size-3" }), /* @__PURE__ */ React.createElement("span", null, post.author?.name), /* @__PURE__ */ React.createElement("span", null, "\u2022"), /* @__PURE__ */ React.createElement("span", null, new Date(post.createdAt).toLocaleDateString()))), /* @__PURE__ */ React.createElement(CardContent, null, /* @__PURE__ */ React.createElement("p", { className: "text-secondary-foreground line-clamp-2" }, post.content)))))));
40
+ }
41
+ function CommentForm({ postId }) {
42
+ const router = useRouter();
43
+ const { t } = useTranslation();
44
+ const {
45
+ register,
46
+ handleSubmit,
47
+ reset,
48
+ formState: { errors, isSubmitting }
49
+ } = useForm({
50
+ resolver: zodResolver(commentSchema.omit({ postId: true }))
51
+ });
52
+ const onSubmit = async (data) => {
53
+ const result = await createComment({ ...data, postId });
54
+ if (result.success) {
55
+ toast.success(t("Comment added"));
56
+ reset();
57
+ router.refresh();
58
+ } else {
59
+ toast.error(result.error);
60
+ }
61
+ };
62
+ return /* @__PURE__ */ React.createElement("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-4" }, /* @__PURE__ */ React.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React.createElement(
63
+ Textarea,
64
+ {
65
+ ...register("content"),
66
+ placeholder: t("Add your comment here..."),
67
+ className: errors.content ? "border-destructive" : ""
68
+ }
69
+ ), errors.content && /* @__PURE__ */ React.createElement("p", { className: "text-xs text-destructive" }, errors.content.message)), /* @__PURE__ */ React.createElement(Button, { type: "submit", disabled: isSubmitting, size: "sm" }, isSubmitting ? t("Please wait...") : t("Create Comment")));
70
+ }
71
+ export function PostDetailPage({
72
+ post,
73
+ comments = [],
74
+ currentUser
75
+ }) {
76
+ const { t } = useTranslation();
77
+ if (!post)
78
+ return /* @__PURE__ */ React.createElement("div", { className: "p-20 text-center" }, t("Post not found"));
79
+ return /* @__PURE__ */ React.createElement("div", { className: "max-w-3xl mx-auto p-6 space-y-10 pb-20" }, /* @__PURE__ */ React.createElement(Button, { asChild: true, variant: "ghost", size: "sm", className: "gap-2" }, /* @__PURE__ */ React.createElement(Link, { href: "/blog" }, /* @__PURE__ */ React.createElement(ArrowLeft, { className: "size-4" }), " ", t("Back to posts"))), /* @__PURE__ */ React.createElement("article", { className: "space-y-6" }, /* @__PURE__ */ React.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React.createElement("h1", { className: "text-5xl font-black tracking-tighter leading-tight" }, post.title), /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-3 text-muted-foreground" }, /* @__PURE__ */ React.createElement("div", { className: "size-8 rounded-full bg-primary/10 flex items-center justify-center" }, /* @__PURE__ */ React.createElement(UserIcon, { className: "size-4 text-primary" })), /* @__PURE__ */ React.createElement("div", { className: "text-sm" }, /* @__PURE__ */ React.createElement("p", { className: "font-bold text-foreground leading-none" }, post.author?.name), /* @__PURE__ */ React.createElement("p", { className: "text-xs" }, new Date(post.createdAt).toLocaleDateString())))), /* @__PURE__ */ React.createElement("div", { className: "prose prose-lg dark:prose-invert max-w-none whitespace-pre-wrap pt-4 border-t" }, post.content)), /* @__PURE__ */ React.createElement("section", { className: "pt-10 border-t space-y-8" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React.createElement(MessageSquare, { className: "size-5" }), /* @__PURE__ */ React.createElement("h3", { className: "text-2xl font-bold tracking-tight" }, t("Comments"), " (", comments.length, ")")), currentUser ? /* @__PURE__ */ React.createElement("div", { className: "bg-muted/30 p-6 rounded-2xl border" }, /* @__PURE__ */ React.createElement("p", { className: "text-sm font-bold mb-4" }, t("Leave a comment")), /* @__PURE__ */ React.createElement(CommentForm, { postId: post.id })) : /* @__PURE__ */ React.createElement("div", { className: "p-6 bg-amber-50 border border-amber-100 rounded-2xl text-center" }, /* @__PURE__ */ React.createElement("p", { className: "text-sm font-medium text-amber-800" }, "Please", " ", /* @__PURE__ */ React.createElement(Link, { href: "/signin", className: "underline font-bold" }, t("Sign in")), " ", t("to join the conversation."))), /* @__PURE__ */ React.createElement("div", { className: "space-y-6" }, comments.map((comment) => /* @__PURE__ */ React.createElement("div", { key: comment.id, className: "flex gap-4" }, /* @__PURE__ */ React.createElement("div", { className: "size-10 rounded-full bg-muted flex items-center justify-center shrink-0" }, /* @__PURE__ */ React.createElement(UserIcon, { className: "size-5 opacity-40" })), /* @__PURE__ */ React.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React.createElement("span", { className: "font-bold text-sm" }, comment.author?.name), /* @__PURE__ */ React.createElement("span", { className: "text-[10px] opacity-50" }, new Date(comment.createdAt).toLocaleDateString())), /* @__PURE__ */ React.createElement("p", { className: "text-sm text-secondary-foreground leading-relaxed" }, comment.content)))), comments.length === 0 && /* @__PURE__ */ React.createElement("p", { className: "text-center text-muted-foreground text-sm py-10 italic" }, t("No comments yet. Be the first to comment!")))));
80
+ }
81
+ export function BlogAdminPage({ posts = [] }) {
82
+ const router = useRouter();
83
+ const { t } = useTranslation();
84
+ const handleDelete = async (id) => {
85
+ if (!confirm(t("Confirm deletion of this post?"))) return;
86
+ const result = await deletePost(id);
87
+ if (result.success) {
88
+ toast.success(t("Post deleted"));
89
+ router.refresh();
90
+ } else {
91
+ toast.error(t("UnexpectedError") + result.error);
92
+ }
93
+ };
94
+ return /* @__PURE__ */ React.createElement("div", { className: "p-6 space-y-6" }, /* @__PURE__ */ React.createElement("div", { className: "flex justify-between items-center" }, /* @__PURE__ */ React.createElement("h1", { className: "text-3xl font-black tracking-tight text-foreground" }, t("Blog posts")), /* @__PURE__ */ React.createElement(Button, { asChild: true, size: "sm", className: "gap-2" }, /* @__PURE__ */ React.createElement(Link, { href: "/kryo/blog/new" }, /* @__PURE__ */ React.createElement(Plus, { className: "size-4" }), " ", t("New Post")))), /* @__PURE__ */ React.createElement(Card, { className: "border-primary/10 shadow-sm overflow-hidden" }, /* @__PURE__ */ React.createElement(Table, null, /* @__PURE__ */ React.createElement(TableHeader, null, /* @__PURE__ */ React.createElement(TableRow, null, /* @__PURE__ */ React.createElement(TableHead, { className: "w-[40%]" }, t("Title")), /* @__PURE__ */ React.createElement(TableHead, null, t("Author")), /* @__PURE__ */ React.createElement(TableHead, null, t("Date")), /* @__PURE__ */ React.createElement(TableHead, { className: "text-right" }, t("Actions")))), /* @__PURE__ */ React.createElement(TableBody, null, posts.length === 0 && /* @__PURE__ */ React.createElement(TableRow, null, /* @__PURE__ */ React.createElement(
95
+ TableCell,
96
+ {
97
+ colSpan: 4,
98
+ className: "h-24 text-center text-muted-foreground italic"
99
+ },
100
+ t("No posts found. Create your first post!")
101
+ )), posts.map((post) => /* @__PURE__ */ React.createElement(TableRow, { key: post.id, className: "transition-colors" }, /* @__PURE__ */ React.createElement(TableCell, { className: "font-bold" }, post.title), /* @__PURE__ */ React.createElement(TableCell, { className: "text-xs" }, post.author?.name), /* @__PURE__ */ React.createElement(TableCell, { className: "text-muted-foreground text-xs" }, new Date(post.createdAt).toLocaleDateString()), /* @__PURE__ */ React.createElement(TableCell, { className: "text-right" }, /* @__PURE__ */ React.createElement("div", { className: "flex justify-end gap-2" }, /* @__PURE__ */ React.createElement(
102
+ Button,
103
+ {
104
+ asChild: true,
105
+ variant: "ghost",
106
+ size: "icon",
107
+ className: "size-8"
108
+ },
109
+ /* @__PURE__ */ React.createElement(Link, { href: `/blog/${post.slug}`, target: "_blank" }, /* @__PURE__ */ React.createElement(Eye, { className: "size-4" }))
110
+ ), /* @__PURE__ */ React.createElement(
111
+ Button,
112
+ {
113
+ asChild: true,
114
+ variant: "ghost",
115
+ size: "icon",
116
+ className: "size-8"
117
+ },
118
+ /* @__PURE__ */ React.createElement(Link, { href: `/kryo/blog/edit/${post.id}` }, /* @__PURE__ */ React.createElement(Pencil, { className: "size-4" }))
119
+ ), /* @__PURE__ */ React.createElement(
120
+ Button,
121
+ {
122
+ variant: "ghost",
123
+ size: "icon",
124
+ className: "size-8 text-destructive hover:text-destructive hover:bg-destructive/10",
125
+ onClick: () => handleDelete(post.id)
126
+ },
127
+ /* @__PURE__ */ React.createElement(Trash2, { className: "size-4" })
128
+ )))))))));
129
+ }
130
+ export function CreatePostForm() {
131
+ const router = useRouter();
132
+ const { t } = useTranslation();
133
+ const {
134
+ register,
135
+ handleSubmit,
136
+ formState: { errors, isSubmitting }
137
+ } = useForm({
138
+ resolver: zodResolver(postSchema.omit({ slug: true }))
139
+ });
140
+ const onSubmit = async (data) => {
141
+ const slug = data.title.toLowerCase().replace(/ /g, "-").replace(/[^\w-]+/g, "");
142
+ const result = await createPost({ ...data, slug });
143
+ if (result.success) {
144
+ toast.success(t("Post created"));
145
+ router.push("/kryo/blog");
146
+ router.refresh();
147
+ } else {
148
+ toast.error(t("UnexpectedError") + result.error);
149
+ }
150
+ };
151
+ return /* @__PURE__ */ React.createElement("div", { className: "max-w-2xl mx-auto p-6 space-y-6" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React.createElement(Button, { asChild: true, variant: "outline", size: "icon", className: "rounded-lg" }, /* @__PURE__ */ React.createElement(Link, { href: "/kryo/blog" }, /* @__PURE__ */ React.createElement(ArrowLeft, { className: "size-4" }))), /* @__PURE__ */ React.createElement("h1", { className: "text-2xl font-black text-foreground" }, t("New Post"))), /* @__PURE__ */ React.createElement(Card, { className: "border-primary/10 shadow-lg" }, /* @__PURE__ */ React.createElement(CardContent, { className: "pt-6" }, /* @__PURE__ */ React.createElement("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-6" }, /* @__PURE__ */ React.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React.createElement("label", { className: "text-xs font-black uppercase tracking-widest opacity-50 px-1" }, t("Title")), /* @__PURE__ */ React.createElement(
152
+ Input,
153
+ {
154
+ ...register("title"),
155
+ className: errors.title ? "border-destructive font-bold" : "font-bold",
156
+ placeholder: t("Title of your post")
157
+ }
158
+ ), errors.title && /* @__PURE__ */ React.createElement("p", { className: "text-xs text-destructive font-bold" }, errors.title.message)), /* @__PURE__ */ React.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React.createElement("label", { className: "text-xs font-black uppercase tracking-widest opacity-50 px-1" }, t("Content")), /* @__PURE__ */ React.createElement(
159
+ Textarea,
160
+ {
161
+ ...register("content"),
162
+ rows: 12,
163
+ className: errors.content ? "border-destructive resize-none" : "resize-none",
164
+ placeholder: t("Content of your post")
165
+ }
166
+ ), errors.content && /* @__PURE__ */ React.createElement("p", { className: "text-xs text-destructive font-bold" }, errors.content.message)), /* @__PURE__ */ React.createElement(
167
+ Button,
168
+ {
169
+ type: "submit",
170
+ disabled: isSubmitting,
171
+ className: "w-full text-sm uppercase tracking-widest transition-all"
172
+ },
173
+ isSubmitting ? t("Please wait...") : t("Publish")
174
+ )))));
175
+ }
176
+ export function EditPostForm({ post }) {
177
+ const router = useRouter();
178
+ const { t } = useTranslation();
179
+ const {
180
+ register,
181
+ handleSubmit,
182
+ formState: { errors, isSubmitting }
183
+ } = useForm({
184
+ resolver: zodResolver(postSchema),
185
+ defaultValues: {
186
+ title: post.title,
187
+ content: post.content,
188
+ slug: post.slug
189
+ }
190
+ });
191
+ const onSubmit = async (data) => {
192
+ const result = await updatePost(post.id, data);
193
+ if (result.success) {
194
+ toast.success(t("Post updated"));
195
+ router.push("/kryo/blog");
196
+ router.refresh();
197
+ } else {
198
+ toast.error(t("UnexpectedError") + result.error);
199
+ }
200
+ };
201
+ return /* @__PURE__ */ React.createElement("div", { className: "max-w-2xl mx-auto p-6 space-y-6" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React.createElement(Button, { asChild: true, variant: "outline", size: "icon", className: "rounded-lg" }, /* @__PURE__ */ React.createElement(Link, { href: "/kryo/blog" }, /* @__PURE__ */ React.createElement(ArrowLeft, { className: "size-4" }))), /* @__PURE__ */ React.createElement("h1", { className: "text-2xl font-black text-foreground" }, t("Edit Post"))), /* @__PURE__ */ React.createElement(Card, { className: "border-primary/10 shadow-lg" }, /* @__PURE__ */ React.createElement(CardContent, { className: "pt-6" }, /* @__PURE__ */ React.createElement("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-6" }, /* @__PURE__ */ React.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React.createElement("label", { className: "text-xs font-black uppercase tracking-widest opacity-50 px-1" }, t("Title")), /* @__PURE__ */ React.createElement(
202
+ Input,
203
+ {
204
+ ...register("title"),
205
+ className: errors.title ? "border-destructive font-bold" : "font-bold",
206
+ placeholder: t("Title of your post")
207
+ }
208
+ ), errors.title && /* @__PURE__ */ React.createElement("p", { className: "text-xs text-destructive font-bold" }, errors.title.message)), /* @__PURE__ */ React.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React.createElement("label", { className: "text-xs font-black uppercase tracking-widest opacity-50 px-1" }, t("Slug")), /* @__PURE__ */ React.createElement(
209
+ Input,
210
+ {
211
+ ...register("slug"),
212
+ className: errors.slug ? "border-destructive font-mono text-sm" : "font-mono text-sm",
213
+ placeholder: t("Slug URL")
214
+ }
215
+ ), errors.slug && /* @__PURE__ */ React.createElement("p", { className: "text-xs text-destructive font-bold" }, errors.slug.message)), /* @__PURE__ */ React.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React.createElement("label", { className: "text-xs font-black uppercase tracking-widest opacity-50 px-1" }, t("Content")), /* @__PURE__ */ React.createElement(
216
+ Textarea,
217
+ {
218
+ ...register("content"),
219
+ rows: 12,
220
+ className: errors.content ? "border-destructive resize-none" : "resize-none",
221
+ placeholder: t("Content of your post")
222
+ }
223
+ ), errors.content && /* @__PURE__ */ React.createElement("p", { className: "text-xs text-destructive font-bold" }, errors.content.message)), /* @__PURE__ */ React.createElement(
224
+ Button,
225
+ {
226
+ type: "submit",
227
+ disabled: isSubmitting,
228
+ className: "w-full text-sm uppercase tracking-widest transition-all"
229
+ },
230
+ isSubmitting ? t("Please wait...") : t("Update")
231
+ )))));
232
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "Blog Posts": "Blog Posts",
3
+ "Reading your blog posts": "Reading your blog posts",
4
+ "Comment added": "Comment added",
5
+ "Add your comment here...": "Add your comment here...",
6
+ "Create Comment": "Create Comment",
7
+ "Post not found": "Post not found",
8
+ "Back to posts": "Back to posts",
9
+ "Comments": "Comments",
10
+ "Leave a comment": "Leave a comment",
11
+ "Sign in": "Sign in",
12
+ "to join the conversation.": "to join the conversation.",
13
+ "No comments yet. Be the first to comment!": "No comments yet. Be the first to comment!",
14
+ "Confirm deletion of this post?": "Confirm deletion of this post?",
15
+ "Post deleted": "Post deleted",
16
+ "Blog posts": "Blog posts",
17
+ "New Post": "New Post",
18
+ "Title": "Title",
19
+ "Author": "Author",
20
+ "Date": "Date",
21
+ "Actions": "Actions",
22
+ "No posts found. Create your first post!": "No posts found. Create your first post!",
23
+ "Post created": "Post created",
24
+ "Title of your post": "Title of your post",
25
+ "Content": "Content",
26
+ "Content of your post": "Content of your post",
27
+ "Publish": "Publish",
28
+ "Post updated": "Post updated",
29
+ "Edit Post": "Edit Post",
30
+ "Slug": "Slug",
31
+ "Slug URL": "Slug URL",
32
+ "Update": "Update",
33
+ "Blog": "Blog",
34
+ "CMS": "CMS",
35
+ "Blog Manager": "Blog Manager"
36
+ }
package/manifest.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "blog-module",
3
+ "name": "Kryo Blog",
4
+ "version": "0.0.1",
5
+ "description": "A lightweight blog module with posts and categories.",
6
+ "enabled": true,
7
+ "system": false,
8
+ "dependencies": [],
9
+ "extends": [],
10
+ "isNpm": true
11
+ }
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@arch-cadre/blog-module",
3
+ "version": "0.0.1",
4
+ "description": "A sample module for Kryo framework",
5
+ "type": "module",
6
+ "exports": {
7
+ "./package.json": "./package.json",
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.cjs"
12
+ },
13
+ "./actions": {
14
+ "types": "./dist/actions/index.d.ts",
15
+ "import": "./dist/actions/index.mjs",
16
+ "require": "./dist/actions/index.cjs"
17
+ }
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "locales",
22
+ "manifest.json"
23
+ ],
24
+ "scripts": {
25
+ "release": "npm publish --access public --no-git-checks",
26
+ "clean": "rm -rf ./dist",
27
+ "switch:dev": "node scripts/switchToSrc.js",
28
+ "switch:prod": "node scripts/switchToDist.js",
29
+ "build": "unbuild",
30
+ "devs": "unbuild --stub"
31
+ },
32
+ "dependencies": {
33
+ "@arch-cadre/modules": "^0.0.15",
34
+ "@hookform/resolvers": "^3.10.0",
35
+ "@radix-ui/react-slot": "^1.2.3",
36
+ "class-variance-authority": "^0.7.1",
37
+ "clsx": "^2.1.1",
38
+ "drizzle-orm": "1.0.0-beta.15-859cf75",
39
+ "lucide-react": "^0.475.0",
40
+ "pg": "^8.18.0",
41
+ "react-hook-form": "^7.54.2",
42
+ "sonner": "^2.0.7",
43
+ "tailwind-merge": "^1.14.0",
44
+ "tw-animate-css": "^1.3.6",
45
+ "zod": "^3.24.1"
46
+ },
47
+ "devDependencies": {
48
+ "@types/pg": "^8.16.0",
49
+ "@types/react": "^19",
50
+ "next": "16.1.1",
51
+ "react": "^19.0.0",
52
+ "typescript": "^5.3.3",
53
+ "unbuild": "^3.6.1"
54
+ },
55
+ "peerDependencies": {
56
+ "@arch-cadre/core": "^0.0.15",
57
+ "@arch-cadre/intl": "^0.0.15",
58
+ "@arch-cadre/ui": "^0.0.15",
59
+ "react": "^19.0.0"
60
+ },
61
+ "main": "./dist/index.mjs"
62
+ }