@jant/core 0.1.2 → 0.2.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.
- package/dist/app.d.ts +34 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +474 -0
- package/dist/assets/datastar.min.js +1775 -0
- package/dist/auth.d.ts +23 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +34 -0
- package/{src/client.ts → dist/client.d.ts} +1 -1
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +4 -0
- package/dist/db/index.d.ts +10 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +10 -0
- package/dist/db/schema.d.ts +1507 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +183 -0
- package/{src/i18n/Trans.tsx → dist/i18n/Trans.d.ts} +4 -10
- package/dist/i18n/Trans.d.ts.map +1 -0
- package/dist/i18n/Trans.js +24 -0
- package/dist/i18n/context.d.ts +69 -0
- package/dist/i18n/context.d.ts.map +1 -0
- package/dist/i18n/context.js +61 -0
- package/dist/i18n/detect.d.ts +31 -0
- package/dist/i18n/detect.d.ts.map +1 -0
- package/dist/i18n/detect.js +77 -0
- package/{src/i18n/i18n.ts → dist/i18n/i18n.d.ts} +5 -25
- package/dist/i18n/i18n.d.ts.map +1 -0
- package/dist/i18n/i18n.js +55 -0
- package/dist/i18n/index.d.ts +41 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/{src/i18n/index.ts → dist/i18n/index.js} +3 -24
- package/dist/i18n/locales/en.d.ts +3 -0
- package/dist/i18n/locales/en.d.ts.map +1 -0
- package/dist/i18n/locales/en.js +1 -0
- package/dist/i18n/locales/zh-Hans.d.ts +3 -0
- package/dist/i18n/locales/zh-Hans.d.ts.map +1 -0
- package/dist/i18n/locales/zh-Hans.js +1 -0
- package/dist/i18n/locales/zh-Hant.d.ts +3 -0
- package/dist/i18n/locales/zh-Hant.d.ts.map +1 -0
- package/dist/i18n/locales/zh-Hant.js +1 -0
- package/dist/i18n/locales.d.ts +11 -0
- package/dist/i18n/locales.d.ts.map +1 -0
- package/dist/i18n/locales.js +13 -0
- package/dist/i18n/middleware.d.ts +24 -0
- package/dist/i18n/middleware.d.ts.map +1 -0
- package/dist/i18n/middleware.js +41 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/{src/index.ts → dist/index.js} +1 -28
- package/dist/lib/assets.d.ts +19 -0
- package/dist/lib/assets.d.ts.map +1 -0
- package/dist/lib/assets.js +33 -0
- package/dist/lib/constants.d.ts +36 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +50 -0
- package/{src/lib/image.ts → dist/lib/image.d.ts} +13 -47
- package/dist/lib/image.d.ts.map +1 -0
- package/dist/lib/image.js +77 -0
- package/{src/lib/index.ts → dist/lib/index.d.ts} +1 -1
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +7 -0
- package/dist/lib/markdown.d.ts +60 -0
- package/dist/lib/markdown.d.ts.map +1 -0
- package/{src/lib/markdown.ts → dist/lib/markdown.js} +16 -26
- package/dist/lib/schemas.d.ts +113 -0
- package/dist/lib/schemas.d.ts.map +1 -0
- package/dist/lib/schemas.js +71 -0
- package/dist/lib/sqid.d.ts +60 -0
- package/dist/lib/sqid.d.ts.map +1 -0
- package/{src/lib/sqid.ts → dist/lib/sqid.js} +15 -22
- package/dist/lib/sse.d.ts +95 -0
- package/dist/lib/sse.d.ts.map +1 -0
- package/dist/lib/sse.js +81 -0
- package/dist/lib/time.d.ts +90 -0
- package/dist/lib/time.d.ts.map +1 -0
- package/{src/lib/time.ts → dist/lib/time.js} +20 -33
- package/{src/lib/url.ts → dist/lib/url.d.ts} +5 -30
- package/dist/lib/url.d.ts.map +1 -0
- package/dist/lib/url.js +89 -0
- package/dist/middleware/auth.d.ts +24 -0
- package/dist/middleware/auth.d.ts.map +1 -0
- package/dist/middleware/auth.js +52 -0
- package/dist/routes/api/posts.d.ts +13 -0
- package/dist/routes/api/posts.d.ts.map +1 -0
- package/dist/routes/api/posts.js +124 -0
- package/dist/routes/api/search.d.ts +13 -0
- package/dist/routes/api/search.d.ts.map +1 -0
- package/dist/routes/api/search.js +49 -0
- package/dist/routes/api/upload.d.ts +16 -0
- package/dist/routes/api/upload.d.ts.map +1 -0
- package/dist/routes/api/upload.js +227 -0
- package/dist/routes/dash/collections.d.ts +13 -0
- package/dist/routes/dash/collections.d.ts.map +1 -0
- package/dist/routes/dash/collections.js +512 -0
- package/dist/routes/dash/index.d.ts +15 -0
- package/dist/routes/dash/index.d.ts.map +1 -0
- package/dist/routes/dash/index.js +117 -0
- package/dist/routes/dash/media.d.ts +16 -0
- package/dist/routes/dash/media.d.ts.map +1 -0
- package/dist/routes/dash/media.js +589 -0
- package/dist/routes/dash/pages.d.ts +15 -0
- package/dist/routes/dash/pages.d.ts.map +1 -0
- package/dist/routes/dash/pages.js +290 -0
- package/dist/routes/dash/posts.d.ts +13 -0
- package/dist/routes/dash/posts.d.ts.map +1 -0
- package/dist/routes/dash/posts.js +226 -0
- package/dist/routes/dash/redirects.d.ts +13 -0
- package/dist/routes/dash/redirects.d.ts.map +1 -0
- package/dist/routes/dash/redirects.js +237 -0
- package/dist/routes/dash/settings.d.ts +13 -0
- package/dist/routes/dash/settings.d.ts.map +1 -0
- package/dist/routes/dash/settings.js +154 -0
- package/dist/routes/feed/rss.d.ts +13 -0
- package/dist/routes/feed/rss.d.ts.map +1 -0
- package/dist/routes/feed/rss.js +95 -0
- package/dist/routes/feed/sitemap.d.ts +13 -0
- package/dist/routes/feed/sitemap.d.ts.map +1 -0
- package/dist/routes/feed/sitemap.js +59 -0
- package/dist/routes/pages/archive.d.ts +15 -0
- package/dist/routes/pages/archive.d.ts.map +1 -0
- package/dist/routes/pages/archive.js +255 -0
- package/dist/routes/pages/collection.d.ts +13 -0
- package/dist/routes/pages/collection.d.ts.map +1 -0
- package/dist/routes/pages/collection.js +93 -0
- package/dist/routes/pages/home.d.ts +13 -0
- package/dist/routes/pages/home.d.ts.map +1 -0
- package/dist/routes/pages/home.js +122 -0
- package/dist/routes/pages/page.d.ts +15 -0
- package/dist/routes/pages/page.d.ts.map +1 -0
- package/dist/routes/pages/page.js +69 -0
- package/dist/routes/pages/post.d.ts +13 -0
- package/dist/routes/pages/post.d.ts.map +1 -0
- package/dist/routes/pages/post.js +90 -0
- package/dist/routes/pages/search.d.ts +13 -0
- package/dist/routes/pages/search.d.ts.map +1 -0
- package/dist/routes/pages/search.js +180 -0
- package/dist/services/collection.d.ts +31 -0
- package/dist/services/collection.d.ts.map +1 -0
- package/dist/services/collection.js +108 -0
- package/dist/services/index.d.ts +28 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +20 -0
- package/dist/services/media.d.ts +27 -0
- package/dist/services/media.d.ts.map +1 -0
- package/dist/services/media.js +62 -0
- package/dist/services/post.d.ts +31 -0
- package/dist/services/post.d.ts.map +1 -0
- package/dist/services/post.js +191 -0
- package/dist/services/redirect.d.ts +15 -0
- package/dist/services/redirect.d.ts.map +1 -0
- package/dist/services/redirect.js +48 -0
- package/dist/services/search.d.ts +26 -0
- package/dist/services/search.d.ts.map +1 -0
- package/dist/services/search.js +61 -0
- package/dist/services/settings.d.ts +17 -0
- package/dist/services/settings.d.ts.map +1 -0
- package/dist/services/settings.js +65 -0
- package/dist/theme/components/ActionButtons.d.ts +43 -0
- package/dist/theme/components/ActionButtons.d.ts.map +1 -0
- package/dist/theme/components/ActionButtons.js +50 -0
- package/dist/theme/components/CrudPageHeader.d.ts +23 -0
- package/dist/theme/components/CrudPageHeader.d.ts.map +1 -0
- package/dist/theme/components/CrudPageHeader.js +22 -0
- package/dist/theme/components/DangerZone.d.ts +36 -0
- package/dist/theme/components/DangerZone.d.ts.map +1 -0
- package/dist/theme/components/DangerZone.js +39 -0
- package/dist/theme/components/EmptyState.d.ts +27 -0
- package/dist/theme/components/EmptyState.d.ts.map +1 -0
- package/dist/theme/components/EmptyState.js +27 -0
- package/dist/theme/components/ListItemRow.d.ts +15 -0
- package/dist/theme/components/ListItemRow.d.ts.map +1 -0
- package/dist/theme/components/ListItemRow.js +21 -0
- package/dist/theme/components/PageForm.d.ts +14 -0
- package/dist/theme/components/PageForm.d.ts.map +1 -0
- package/dist/theme/components/PageForm.js +173 -0
- package/dist/theme/components/Pagination.d.ts +46 -0
- package/dist/theme/components/Pagination.d.ts.map +1 -0
- package/dist/theme/components/Pagination.js +159 -0
- package/dist/theme/components/PostForm.d.ts +12 -0
- package/dist/theme/components/PostForm.d.ts.map +1 -0
- package/dist/theme/components/PostForm.js +230 -0
- package/dist/theme/components/PostList.d.ts +10 -0
- package/dist/theme/components/PostList.d.ts.map +1 -0
- package/dist/theme/components/PostList.js +73 -0
- package/dist/theme/components/ThreadView.d.ts +15 -0
- package/dist/theme/components/ThreadView.d.ts.map +1 -0
- package/dist/theme/components/ThreadView.js +111 -0
- package/dist/theme/components/TypeBadge.d.ts +12 -0
- package/dist/theme/components/TypeBadge.d.ts.map +1 -0
- package/dist/theme/components/TypeBadge.js +39 -0
- package/dist/theme/components/VisibilityBadge.d.ts +12 -0
- package/dist/theme/components/VisibilityBadge.d.ts.map +1 -0
- package/dist/theme/components/VisibilityBadge.js +37 -0
- package/{src/theme/components/index.ts → dist/theme/components/index.d.ts} +1 -0
- package/dist/theme/components/index.d.ts.map +1 -0
- package/dist/theme/components/index.js +12 -0
- package/dist/theme/index.d.ts +21 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/{src/theme/index.ts → dist/theme/index.js} +1 -4
- package/dist/theme/layouts/BaseLayout.d.ts +16 -0
- package/dist/theme/layouts/BaseLayout.d.ts.map +1 -0
- package/dist/theme/layouts/BaseLayout.js +58 -0
- package/dist/theme/layouts/DashLayout.d.ts +15 -0
- package/dist/theme/layouts/DashLayout.d.ts.map +1 -0
- package/dist/theme/layouts/DashLayout.js +139 -0
- package/{src/theme/layouts/index.ts → dist/theme/layouts/index.d.ts} +1 -0
- package/dist/theme/layouts/index.d.ts.map +1 -0
- package/dist/theme/layouts/index.js +2 -0
- package/dist/theme/styles/main.css +2 -0
- package/dist/types.d.ts +179 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +19 -0
- package/package.json +26 -26
- package/drizzle.config.ts +0 -10
- package/lingui.config.ts +0 -16
- package/src/app.tsx +0 -377
- package/src/assets/datastar.min.js +0 -8
- package/src/auth.ts +0 -38
- package/src/db/index.ts +0 -14
- package/src/db/migrations/0000_solid_moon_knight.sql +0 -118
- package/src/db/migrations/0001_add_search_fts.sql +0 -40
- package/src/db/migrations/0002_collection_path.sql +0 -2
- package/src/db/migrations/0003_collection_path_nullable.sql +0 -21
- package/src/db/migrations/0004_media_uuid.sql +0 -35
- package/src/db/migrations/meta/0000_snapshot.json +0 -784
- package/src/db/migrations/meta/_journal.json +0 -41
- package/src/db/schema.ts +0 -159
- package/src/i18n/EXAMPLES.md +0 -235
- package/src/i18n/README.md +0 -296
- package/src/i18n/context.tsx +0 -101
- package/src/i18n/detect.ts +0 -100
- package/src/i18n/locales/en.po +0 -875
- package/src/i18n/locales/en.ts +0 -1
- package/src/i18n/locales/zh-Hans.po +0 -875
- package/src/i18n/locales/zh-Hans.ts +0 -1
- package/src/i18n/locales/zh-Hant.po +0 -875
- package/src/i18n/locales/zh-Hant.ts +0 -1
- package/src/i18n/locales.ts +0 -14
- package/src/i18n/middleware.ts +0 -59
- package/src/lib/assets.ts +0 -47
- package/src/lib/constants.ts +0 -67
- package/src/lib/schemas.ts +0 -92
- package/src/lib/sse.ts +0 -152
- package/src/middleware/auth.ts +0 -59
- package/src/routes/api/posts.ts +0 -127
- package/src/routes/api/search.ts +0 -53
- package/src/routes/api/upload.ts +0 -240
- package/src/routes/dash/collections.tsx +0 -341
- package/src/routes/dash/index.tsx +0 -89
- package/src/routes/dash/media.tsx +0 -551
- package/src/routes/dash/pages.tsx +0 -245
- package/src/routes/dash/posts.tsx +0 -202
- package/src/routes/dash/redirects.tsx +0 -155
- package/src/routes/dash/settings.tsx +0 -93
- package/src/routes/feed/rss.ts +0 -119
- package/src/routes/feed/sitemap.ts +0 -75
- package/src/routes/pages/archive.tsx +0 -223
- package/src/routes/pages/collection.tsx +0 -79
- package/src/routes/pages/home.tsx +0 -93
- package/src/routes/pages/page.tsx +0 -64
- package/src/routes/pages/post.tsx +0 -81
- package/src/routes/pages/search.tsx +0 -162
- package/src/services/collection.ts +0 -180
- package/src/services/index.ts +0 -40
- package/src/services/media.ts +0 -97
- package/src/services/post.ts +0 -279
- package/src/services/redirect.ts +0 -74
- package/src/services/search.ts +0 -117
- package/src/services/settings.ts +0 -76
- package/src/theme/components/ActionButtons.tsx +0 -98
- package/src/theme/components/CrudPageHeader.tsx +0 -48
- package/src/theme/components/DangerZone.tsx +0 -77
- package/src/theme/components/EmptyState.tsx +0 -56
- package/src/theme/components/ListItemRow.tsx +0 -24
- package/src/theme/components/PageForm.tsx +0 -114
- package/src/theme/components/Pagination.tsx +0 -196
- package/src/theme/components/PostForm.tsx +0 -122
- package/src/theme/components/PostList.tsx +0 -68
- package/src/theme/components/ThreadView.tsx +0 -118
- package/src/theme/components/TypeBadge.tsx +0 -28
- package/src/theme/components/VisibilityBadge.tsx +0 -33
- package/src/theme/layouts/BaseLayout.tsx +0 -49
- package/src/theme/layouts/DashLayout.tsx +0 -108
- package/src/theme/styles/main.css +0 -52
- package/src/types.ts +0 -222
- package/tsconfig.json +0 -16
- package/vite.config.ts +0 -82
- package/wrangler.toml +0 -21
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Post Creation/Edit Form
|
|
3
|
+
*/ import { jsx as _jsx, jsxs as _jsxs } from "hono/jsx/jsx-runtime";
|
|
4
|
+
import { useLingui } from "../../i18n/index.js";
|
|
5
|
+
export const PostForm = ({ post, action, method = "post" })=>{
|
|
6
|
+
const { t } = useLingui();
|
|
7
|
+
const isEdit = !!post;
|
|
8
|
+
return /*#__PURE__*/ _jsxs("form", {
|
|
9
|
+
method: method,
|
|
10
|
+
action: action,
|
|
11
|
+
class: "flex flex-col gap-4",
|
|
12
|
+
children: [
|
|
13
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
14
|
+
class: "field",
|
|
15
|
+
children: [
|
|
16
|
+
/*#__PURE__*/ _jsx("label", {
|
|
17
|
+
class: "label",
|
|
18
|
+
children: t({
|
|
19
|
+
message: "Type",
|
|
20
|
+
comment: "@context: Post form field - post type"
|
|
21
|
+
})
|
|
22
|
+
}),
|
|
23
|
+
/*#__PURE__*/ _jsxs("select", {
|
|
24
|
+
name: "type",
|
|
25
|
+
class: "select",
|
|
26
|
+
required: true,
|
|
27
|
+
children: [
|
|
28
|
+
/*#__PURE__*/ _jsx("option", {
|
|
29
|
+
value: "note",
|
|
30
|
+
selected: post?.type === "note",
|
|
31
|
+
children: t({
|
|
32
|
+
message: "Note",
|
|
33
|
+
comment: "@context: Post type option"
|
|
34
|
+
})
|
|
35
|
+
}),
|
|
36
|
+
/*#__PURE__*/ _jsx("option", {
|
|
37
|
+
value: "article",
|
|
38
|
+
selected: post?.type === "article",
|
|
39
|
+
children: t({
|
|
40
|
+
message: "Article",
|
|
41
|
+
comment: "@context: Post type option"
|
|
42
|
+
})
|
|
43
|
+
}),
|
|
44
|
+
/*#__PURE__*/ _jsx("option", {
|
|
45
|
+
value: "link",
|
|
46
|
+
selected: post?.type === "link",
|
|
47
|
+
children: t({
|
|
48
|
+
message: "Link",
|
|
49
|
+
comment: "@context: Post type option"
|
|
50
|
+
})
|
|
51
|
+
}),
|
|
52
|
+
/*#__PURE__*/ _jsx("option", {
|
|
53
|
+
value: "quote",
|
|
54
|
+
selected: post?.type === "quote",
|
|
55
|
+
children: t({
|
|
56
|
+
message: "Quote",
|
|
57
|
+
comment: "@context: Post type option"
|
|
58
|
+
})
|
|
59
|
+
}),
|
|
60
|
+
/*#__PURE__*/ _jsx("option", {
|
|
61
|
+
value: "image",
|
|
62
|
+
selected: post?.type === "image",
|
|
63
|
+
children: t({
|
|
64
|
+
message: "Image",
|
|
65
|
+
comment: "@context: Post type option"
|
|
66
|
+
})
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
}),
|
|
72
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
73
|
+
class: "field",
|
|
74
|
+
children: [
|
|
75
|
+
/*#__PURE__*/ _jsx("label", {
|
|
76
|
+
class: "label",
|
|
77
|
+
children: t({
|
|
78
|
+
message: "Title (optional)",
|
|
79
|
+
comment: "@context: Post form field"
|
|
80
|
+
})
|
|
81
|
+
}),
|
|
82
|
+
/*#__PURE__*/ _jsx("input", {
|
|
83
|
+
type: "text",
|
|
84
|
+
name: "title",
|
|
85
|
+
class: "input",
|
|
86
|
+
placeholder: t({
|
|
87
|
+
message: "Post title...",
|
|
88
|
+
comment: "@context: Post title placeholder"
|
|
89
|
+
}),
|
|
90
|
+
value: post?.title ?? ""
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
}),
|
|
94
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
95
|
+
class: "field",
|
|
96
|
+
children: [
|
|
97
|
+
/*#__PURE__*/ _jsx("label", {
|
|
98
|
+
class: "label",
|
|
99
|
+
children: t({
|
|
100
|
+
message: "Content",
|
|
101
|
+
comment: "@context: Post form field"
|
|
102
|
+
})
|
|
103
|
+
}),
|
|
104
|
+
/*#__PURE__*/ _jsx("textarea", {
|
|
105
|
+
name: "content",
|
|
106
|
+
class: "textarea min-h-32",
|
|
107
|
+
placeholder: t({
|
|
108
|
+
message: "What's on your mind?",
|
|
109
|
+
comment: "@context: Post content placeholder"
|
|
110
|
+
}),
|
|
111
|
+
required: true,
|
|
112
|
+
children: post?.content ?? ""
|
|
113
|
+
})
|
|
114
|
+
]
|
|
115
|
+
}),
|
|
116
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
117
|
+
class: "field",
|
|
118
|
+
children: [
|
|
119
|
+
/*#__PURE__*/ _jsx("label", {
|
|
120
|
+
class: "label",
|
|
121
|
+
children: t({
|
|
122
|
+
message: "Source URL (optional)",
|
|
123
|
+
comment: "@context: Post form field"
|
|
124
|
+
})
|
|
125
|
+
}),
|
|
126
|
+
/*#__PURE__*/ _jsx("input", {
|
|
127
|
+
type: "url",
|
|
128
|
+
name: "sourceUrl",
|
|
129
|
+
class: "input",
|
|
130
|
+
placeholder: "https://...",
|
|
131
|
+
value: post?.sourceUrl ?? ""
|
|
132
|
+
})
|
|
133
|
+
]
|
|
134
|
+
}),
|
|
135
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
136
|
+
class: "field",
|
|
137
|
+
children: [
|
|
138
|
+
/*#__PURE__*/ _jsx("label", {
|
|
139
|
+
class: "label",
|
|
140
|
+
children: t({
|
|
141
|
+
message: "Visibility",
|
|
142
|
+
comment: "@context: Post form field"
|
|
143
|
+
})
|
|
144
|
+
}),
|
|
145
|
+
/*#__PURE__*/ _jsxs("select", {
|
|
146
|
+
name: "visibility",
|
|
147
|
+
class: "select",
|
|
148
|
+
children: [
|
|
149
|
+
/*#__PURE__*/ _jsx("option", {
|
|
150
|
+
value: "quiet",
|
|
151
|
+
selected: post?.visibility === "quiet" || !post,
|
|
152
|
+
children: t({
|
|
153
|
+
message: "Quiet (normal)",
|
|
154
|
+
comment: "@context: Post visibility option"
|
|
155
|
+
})
|
|
156
|
+
}),
|
|
157
|
+
/*#__PURE__*/ _jsx("option", {
|
|
158
|
+
value: "featured",
|
|
159
|
+
selected: post?.visibility === "featured",
|
|
160
|
+
children: t({
|
|
161
|
+
message: "Featured",
|
|
162
|
+
comment: "@context: Post visibility option"
|
|
163
|
+
})
|
|
164
|
+
}),
|
|
165
|
+
/*#__PURE__*/ _jsx("option", {
|
|
166
|
+
value: "unlisted",
|
|
167
|
+
selected: post?.visibility === "unlisted",
|
|
168
|
+
children: t({
|
|
169
|
+
message: "Unlisted",
|
|
170
|
+
comment: "@context: Post visibility option"
|
|
171
|
+
})
|
|
172
|
+
}),
|
|
173
|
+
/*#__PURE__*/ _jsx("option", {
|
|
174
|
+
value: "draft",
|
|
175
|
+
selected: post?.visibility === "draft",
|
|
176
|
+
children: t({
|
|
177
|
+
message: "Draft",
|
|
178
|
+
comment: "@context: Post visibility option"
|
|
179
|
+
})
|
|
180
|
+
})
|
|
181
|
+
]
|
|
182
|
+
})
|
|
183
|
+
]
|
|
184
|
+
}),
|
|
185
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
186
|
+
class: "field",
|
|
187
|
+
children: [
|
|
188
|
+
/*#__PURE__*/ _jsx("label", {
|
|
189
|
+
class: "label",
|
|
190
|
+
children: t({
|
|
191
|
+
message: "Custom Path (optional)",
|
|
192
|
+
comment: "@context: Post form field"
|
|
193
|
+
})
|
|
194
|
+
}),
|
|
195
|
+
/*#__PURE__*/ _jsx("input", {
|
|
196
|
+
type: "text",
|
|
197
|
+
name: "path",
|
|
198
|
+
class: "input",
|
|
199
|
+
placeholder: "my-custom-url",
|
|
200
|
+
value: post?.path ?? ""
|
|
201
|
+
})
|
|
202
|
+
]
|
|
203
|
+
}),
|
|
204
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
205
|
+
class: "flex gap-2",
|
|
206
|
+
children: [
|
|
207
|
+
/*#__PURE__*/ _jsx("button", {
|
|
208
|
+
type: "submit",
|
|
209
|
+
class: "btn",
|
|
210
|
+
children: isEdit ? t({
|
|
211
|
+
message: "Update",
|
|
212
|
+
comment: "@context: Button to update existing post"
|
|
213
|
+
}) : t({
|
|
214
|
+
message: "Publish",
|
|
215
|
+
comment: "@context: Button to publish new post"
|
|
216
|
+
})
|
|
217
|
+
}),
|
|
218
|
+
/*#__PURE__*/ _jsx("a", {
|
|
219
|
+
href: "/dash/posts",
|
|
220
|
+
class: "btn-outline",
|
|
221
|
+
children: t({
|
|
222
|
+
message: "Cancel",
|
|
223
|
+
comment: "@context: Button to cancel form"
|
|
224
|
+
})
|
|
225
|
+
})
|
|
226
|
+
]
|
|
227
|
+
})
|
|
228
|
+
]
|
|
229
|
+
});
|
|
230
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Post List Component
|
|
3
|
+
*/
|
|
4
|
+
import type { FC } from "hono/jsx";
|
|
5
|
+
import type { Post } from "../../types.js";
|
|
6
|
+
export interface PostListProps {
|
|
7
|
+
posts: Post[];
|
|
8
|
+
}
|
|
9
|
+
export declare const PostList: FC<PostListProps>;
|
|
10
|
+
//# sourceMappingURL=PostList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostList.d.ts","sourceRoot":"","sources":["../../../src/theme/components/PostList.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAS3C,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAED,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAgDtC,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Post List Component
|
|
3
|
+
*/ import { jsx as _jsx, jsxs as _jsxs } from "hono/jsx/jsx-runtime";
|
|
4
|
+
import { useLingui } from "../../i18n/index.js";
|
|
5
|
+
import * as sqid from "../../lib/sqid.js";
|
|
6
|
+
import * as time from "../../lib/time.js";
|
|
7
|
+
import { VisibilityBadge } from "./VisibilityBadge.js";
|
|
8
|
+
import { TypeBadge } from "./TypeBadge.js";
|
|
9
|
+
import { EmptyState } from "./EmptyState.js";
|
|
10
|
+
import { ListItemRow } from "./ListItemRow.js";
|
|
11
|
+
import { ActionButtons } from "./ActionButtons.js";
|
|
12
|
+
export const PostList = ({ posts })=>{
|
|
13
|
+
const { t } = useLingui();
|
|
14
|
+
if (posts.length === 0) {
|
|
15
|
+
return /*#__PURE__*/ _jsx(EmptyState, {
|
|
16
|
+
message: t({
|
|
17
|
+
message: "No posts yet.",
|
|
18
|
+
comment: "@context: Empty state message when no posts exist"
|
|
19
|
+
}),
|
|
20
|
+
ctaText: t({
|
|
21
|
+
message: "Create your first post",
|
|
22
|
+
comment: "@context: Button in empty state to create first post"
|
|
23
|
+
}),
|
|
24
|
+
ctaHref: "/dash/posts/new"
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
28
|
+
class: "flex flex-col divide-y",
|
|
29
|
+
children: posts.map((post)=>/*#__PURE__*/ _jsxs(ListItemRow, {
|
|
30
|
+
actions: /*#__PURE__*/ _jsx(ActionButtons, {
|
|
31
|
+
editHref: `/dash/posts/${sqid.encode(post.id)}/edit`,
|
|
32
|
+
editLabel: t({
|
|
33
|
+
message: "Edit",
|
|
34
|
+
comment: "@context: Button to edit post"
|
|
35
|
+
}),
|
|
36
|
+
viewHref: `/p/${sqid.encode(post.id)}`,
|
|
37
|
+
viewLabel: t({
|
|
38
|
+
message: "View",
|
|
39
|
+
comment: "@context: Button to view post on public site"
|
|
40
|
+
})
|
|
41
|
+
}),
|
|
42
|
+
children: [
|
|
43
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
44
|
+
class: "flex items-center gap-2 mb-1",
|
|
45
|
+
children: [
|
|
46
|
+
/*#__PURE__*/ _jsx(TypeBadge, {
|
|
47
|
+
type: post.type
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ _jsx(VisibilityBadge, {
|
|
50
|
+
visibility: post.visibility
|
|
51
|
+
}),
|
|
52
|
+
/*#__PURE__*/ _jsx("span", {
|
|
53
|
+
class: "text-xs text-muted-foreground",
|
|
54
|
+
children: time.formatDate(post.publishedAt)
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
}),
|
|
58
|
+
/*#__PURE__*/ _jsx("a", {
|
|
59
|
+
href: `/dash/posts/${sqid.encode(post.id)}`,
|
|
60
|
+
class: "font-medium hover:underline",
|
|
61
|
+
children: post.title || post.content?.slice(0, 60) || t({
|
|
62
|
+
message: "Untitled",
|
|
63
|
+
comment: "@context: Default title for untitled post"
|
|
64
|
+
})
|
|
65
|
+
}),
|
|
66
|
+
post.content && !post.title && /*#__PURE__*/ _jsx("p", {
|
|
67
|
+
class: "text-sm text-muted-foreground mt-1 line-clamp-2",
|
|
68
|
+
children: post.content.slice(0, 120)
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
}, post.id))
|
|
72
|
+
});
|
|
73
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thread View Component
|
|
3
|
+
*
|
|
4
|
+
* Displays a thread of posts with reply chain visualization
|
|
5
|
+
*/
|
|
6
|
+
import type { FC } from "hono/jsx";
|
|
7
|
+
import type { Post } from "../../types.js";
|
|
8
|
+
export interface ThreadViewProps {
|
|
9
|
+
/** All posts in the thread, ordered by createdAt */
|
|
10
|
+
posts: Post[];
|
|
11
|
+
/** ID of the currently viewed post (to highlight) */
|
|
12
|
+
currentPostId: number;
|
|
13
|
+
}
|
|
14
|
+
export declare const ThreadView: FC<ThreadViewProps>;
|
|
15
|
+
//# sourceMappingURL=ThreadView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThreadView.d.ts","sourceRoot":"","sources":["../../../src/theme/components/ThreadView.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAI3C,MAAM,WAAW,eAAe;IAC9B,oDAAoD;IACpD,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,qDAAqD;IACrD,aAAa,EAAE,MAAM,CAAC;CACvB;AAoDD,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAgD1C,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thread View Component
|
|
3
|
+
*
|
|
4
|
+
* Displays a thread of posts with reply chain visualization
|
|
5
|
+
*/ import { jsx as _jsx, jsxs as _jsxs } from "hono/jsx/jsx-runtime";
|
|
6
|
+
import { useLingui } from "../../i18n/index.js";
|
|
7
|
+
import * as sqid from "../../lib/sqid.js";
|
|
8
|
+
import * as time from "../../lib/time.js";
|
|
9
|
+
const ThreadPost = ({ post, isCurrent, isRoot })=>{
|
|
10
|
+
const { t } = useLingui();
|
|
11
|
+
return /*#__PURE__*/ _jsxs("article", {
|
|
12
|
+
id: `post-${post.id}`,
|
|
13
|
+
class: `h-entry p-4 rounded-lg border ${isCurrent ? "border-primary bg-primary/5 ring-2 ring-primary/20" : "border-border hover:border-muted-foreground/30"}`,
|
|
14
|
+
children: [
|
|
15
|
+
post.title && /*#__PURE__*/ _jsx("h2", {
|
|
16
|
+
class: "p-name text-lg font-medium mb-2",
|
|
17
|
+
children: /*#__PURE__*/ _jsx("a", {
|
|
18
|
+
href: `/p/${sqid.encode(post.id)}`,
|
|
19
|
+
class: "u-url hover:underline",
|
|
20
|
+
children: post.title
|
|
21
|
+
})
|
|
22
|
+
}),
|
|
23
|
+
/*#__PURE__*/ _jsx("div", {
|
|
24
|
+
class: "e-content prose prose-sm",
|
|
25
|
+
dangerouslySetInnerHTML: {
|
|
26
|
+
__html: post.contentHtml || ""
|
|
27
|
+
}
|
|
28
|
+
}),
|
|
29
|
+
/*#__PURE__*/ _jsxs("footer", {
|
|
30
|
+
class: "mt-3 flex items-center gap-3 text-sm text-muted-foreground",
|
|
31
|
+
children: [
|
|
32
|
+
/*#__PURE__*/ _jsx("time", {
|
|
33
|
+
class: "dt-published",
|
|
34
|
+
datetime: time.toISOString(post.publishedAt),
|
|
35
|
+
children: time.formatDate(post.publishedAt)
|
|
36
|
+
}),
|
|
37
|
+
isRoot && /*#__PURE__*/ _jsx("span", {
|
|
38
|
+
class: "text-xs",
|
|
39
|
+
children: t({
|
|
40
|
+
message: "Thread start",
|
|
41
|
+
comment: "@context: Thread view indicator - first post in thread"
|
|
42
|
+
})
|
|
43
|
+
}),
|
|
44
|
+
!isCurrent && /*#__PURE__*/ _jsx("a", {
|
|
45
|
+
href: `/p/${sqid.encode(post.id)}`,
|
|
46
|
+
class: "text-xs hover:underline",
|
|
47
|
+
children: t({
|
|
48
|
+
message: "Permalink",
|
|
49
|
+
comment: "@context: Link to individual post in thread"
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
export const ThreadView = ({ posts, currentPostId })=>{
|
|
58
|
+
const { t } = useLingui();
|
|
59
|
+
if (posts.length === 0) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
const rootPost = posts[0];
|
|
63
|
+
const isThread = posts.length > 1;
|
|
64
|
+
// Single post, no thread
|
|
65
|
+
if (!isThread) {
|
|
66
|
+
return(// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- Early return for empty array at line 73 guarantees posts[0] exists
|
|
67
|
+
/*#__PURE__*/ _jsx(ThreadPost, {
|
|
68
|
+
post: rootPost,
|
|
69
|
+
isCurrent: true,
|
|
70
|
+
isRoot: false
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
const threadLabel = posts.length === 1 ? t({
|
|
74
|
+
message: "Thread with 1 post",
|
|
75
|
+
comment: "@context: Thread view header - single post"
|
|
76
|
+
}) : t({
|
|
77
|
+
message: "Thread with {count} posts",
|
|
78
|
+
comment: "@context: Thread view header - multiple posts",
|
|
79
|
+
values: {
|
|
80
|
+
count: String(posts.length)
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
84
|
+
class: "thread-view",
|
|
85
|
+
children: [
|
|
86
|
+
/*#__PURE__*/ _jsx("div", {
|
|
87
|
+
class: "mb-4 text-sm text-muted-foreground",
|
|
88
|
+
children: threadLabel
|
|
89
|
+
}),
|
|
90
|
+
/*#__PURE__*/ _jsx("div", {
|
|
91
|
+
class: "flex flex-col gap-3",
|
|
92
|
+
children: posts.map((post, index)=>/*#__PURE__*/ _jsxs("div", {
|
|
93
|
+
class: "relative",
|
|
94
|
+
children: [
|
|
95
|
+
index > 0 && /*#__PURE__*/ _jsx("div", {
|
|
96
|
+
class: "absolute left-6 -top-3 w-0.5 h-3 bg-border"
|
|
97
|
+
}),
|
|
98
|
+
index < posts.length - 1 && /*#__PURE__*/ _jsx("div", {
|
|
99
|
+
class: "absolute left-6 -bottom-3 w-0.5 h-3 bg-border"
|
|
100
|
+
}),
|
|
101
|
+
/*#__PURE__*/ _jsx(ThreadPost, {
|
|
102
|
+
post: post,
|
|
103
|
+
isCurrent: post.id === currentPostId,
|
|
104
|
+
isRoot: index === 0
|
|
105
|
+
})
|
|
106
|
+
]
|
|
107
|
+
}, post.id))
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
});
|
|
111
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type Badge Component
|
|
3
|
+
*
|
|
4
|
+
* Displays a badge indicating the type of a post (note, article, link, etc.)
|
|
5
|
+
*/
|
|
6
|
+
import type { FC } from "hono/jsx";
|
|
7
|
+
import type { PostType } from "../../types.js";
|
|
8
|
+
export interface TypeBadgeProps {
|
|
9
|
+
type: PostType;
|
|
10
|
+
}
|
|
11
|
+
export declare const TypeBadge: FC<TypeBadgeProps>;
|
|
12
|
+
//# sourceMappingURL=TypeBadge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypeBadge.d.ts","sourceRoot":"","sources":["../../../src/theme/components/TypeBadge.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAaxC,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type Badge Component
|
|
3
|
+
*
|
|
4
|
+
* Displays a badge indicating the type of a post (note, article, link, etc.)
|
|
5
|
+
*/ import { jsx as _jsx } from "hono/jsx/jsx-runtime";
|
|
6
|
+
import { useLingui } from "../../i18n/index.js";
|
|
7
|
+
export const TypeBadge = ({ type })=>{
|
|
8
|
+
const { t } = useLingui();
|
|
9
|
+
const labels = {
|
|
10
|
+
note: t({
|
|
11
|
+
message: "Note",
|
|
12
|
+
comment: "@context: Post type badge - note"
|
|
13
|
+
}),
|
|
14
|
+
article: t({
|
|
15
|
+
message: "Article",
|
|
16
|
+
comment: "@context: Post type badge - article"
|
|
17
|
+
}),
|
|
18
|
+
link: t({
|
|
19
|
+
message: "Link",
|
|
20
|
+
comment: "@context: Post type badge - link"
|
|
21
|
+
}),
|
|
22
|
+
quote: t({
|
|
23
|
+
message: "Quote",
|
|
24
|
+
comment: "@context: Post type badge - quote"
|
|
25
|
+
}),
|
|
26
|
+
image: t({
|
|
27
|
+
message: "Image",
|
|
28
|
+
comment: "@context: Post type badge - image"
|
|
29
|
+
}),
|
|
30
|
+
page: t({
|
|
31
|
+
message: "Page",
|
|
32
|
+
comment: "@context: Post type badge - page"
|
|
33
|
+
})
|
|
34
|
+
};
|
|
35
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
36
|
+
class: "badge-outline",
|
|
37
|
+
children: labels[type]
|
|
38
|
+
});
|
|
39
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Visibility Badge Component
|
|
3
|
+
*
|
|
4
|
+
* Displays a badge indicating the visibility level of a post
|
|
5
|
+
*/
|
|
6
|
+
import type { FC } from "hono/jsx";
|
|
7
|
+
import type { Visibility } from "../../types.js";
|
|
8
|
+
export interface VisibilityBadgeProps {
|
|
9
|
+
visibility: Visibility;
|
|
10
|
+
}
|
|
11
|
+
export declare const VisibilityBadge: FC<VisibilityBadgeProps>;
|
|
12
|
+
//# sourceMappingURL=VisibilityBadge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VisibilityBadge.d.ts","sourceRoot":"","sources":["../../../src/theme/components/VisibilityBadge.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAkBpD,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Visibility Badge Component
|
|
3
|
+
*
|
|
4
|
+
* Displays a badge indicating the visibility level of a post
|
|
5
|
+
*/ import { jsx as _jsx } from "hono/jsx/jsx-runtime";
|
|
6
|
+
import { useLingui } from "../../i18n/index.js";
|
|
7
|
+
export const VisibilityBadge = ({ visibility })=>{
|
|
8
|
+
const { t } = useLingui();
|
|
9
|
+
const variants = {
|
|
10
|
+
featured: "badge-primary",
|
|
11
|
+
quiet: "badge-secondary",
|
|
12
|
+
unlisted: "badge-outline",
|
|
13
|
+
draft: "badge-outline"
|
|
14
|
+
};
|
|
15
|
+
const labels = {
|
|
16
|
+
featured: t({
|
|
17
|
+
message: "Featured",
|
|
18
|
+
comment: "@context: Post visibility badge - featured"
|
|
19
|
+
}),
|
|
20
|
+
quiet: t({
|
|
21
|
+
message: "Quiet",
|
|
22
|
+
comment: "@context: Post visibility badge - normal"
|
|
23
|
+
}),
|
|
24
|
+
unlisted: t({
|
|
25
|
+
message: "Unlisted",
|
|
26
|
+
comment: "@context: Post visibility badge - unlisted"
|
|
27
|
+
}),
|
|
28
|
+
draft: t({
|
|
29
|
+
message: "Draft",
|
|
30
|
+
comment: "@context: Post visibility badge - draft"
|
|
31
|
+
})
|
|
32
|
+
};
|
|
33
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
34
|
+
class: variants[visibility],
|
|
35
|
+
children: labels[visibility]
|
|
36
|
+
});
|
|
37
|
+
};
|
|
@@ -10,3 +10,4 @@ export { PostList, type PostListProps } from "./PostList.js";
|
|
|
10
10
|
export { ThreadView, type ThreadViewProps } from "./ThreadView.js";
|
|
11
11
|
export { TypeBadge, type TypeBadgeProps } from "./TypeBadge.js";
|
|
12
12
|
export { VisibilityBadge, type VisibilityBadgeProps } from "./VisibilityBadge.js";
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3I,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { ActionButtons } from "./ActionButtons.js";
|
|
2
|
+
export { CrudPageHeader } from "./CrudPageHeader.js";
|
|
3
|
+
export { DangerZone } from "./DangerZone.js";
|
|
4
|
+
export { EmptyState } from "./EmptyState.js";
|
|
5
|
+
export { ListItemRow } from "./ListItemRow.js";
|
|
6
|
+
export { PageForm } from "./PageForm.js";
|
|
7
|
+
export { Pagination, LoadMore, PagePagination } from "./Pagination.js";
|
|
8
|
+
export { PostForm } from "./PostForm.js";
|
|
9
|
+
export { PostList } from "./PostList.js";
|
|
10
|
+
export { ThreadView } from "./ThreadView.js";
|
|
11
|
+
export { TypeBadge } from "./TypeBadge.js";
|
|
12
|
+
export { VisibilityBadge } from "./VisibilityBadge.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Jant Theme Components
|
|
3
|
+
*
|
|
4
|
+
* These components can be imported for wrapping/extending:
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* import { PostCard } from "@jant/core/theme";
|
|
9
|
+
*
|
|
10
|
+
* export function MyPostCard(props) {
|
|
11
|
+
* return (
|
|
12
|
+
* <div class="my-wrapper">
|
|
13
|
+
* <PostCard {...props} />
|
|
14
|
+
* </div>
|
|
15
|
+
* );
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export * from "./layouts/index.js";
|
|
20
|
+
export * from "./components/index.js";
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,cAAc,oBAAoB,CAAC;AAGnC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base HTML Layout
|
|
3
|
+
*
|
|
4
|
+
* Provides the HTML shell with meta tags, styles, and scripts.
|
|
5
|
+
* If Context is provided, automatically wraps children with I18nProvider.
|
|
6
|
+
*/
|
|
7
|
+
import type { FC, PropsWithChildren } from "hono/jsx";
|
|
8
|
+
import type { Context } from "hono";
|
|
9
|
+
export interface BaseLayoutProps {
|
|
10
|
+
title: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
lang?: string;
|
|
13
|
+
c?: Context;
|
|
14
|
+
}
|
|
15
|
+
export declare const BaseLayout: FC<PropsWithChildren<BaseLayoutProps>>;
|
|
16
|
+
//# sourceMappingURL=BaseLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseLayout.d.ts","sourceRoot":"","sources":["../../../src/theme/layouts/BaseLayout.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAIpC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,CAAC,EAAE,OAAO,CAAC;CACb;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,iBAAiB,CAAC,eAAe,CAAC,CA6B7D,CAAC"}
|