@jant/core 0.3.6 → 0.3.8

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 (264) hide show
  1. package/dist/app.js +11 -21
  2. package/dist/client.js +1 -0
  3. package/dist/db/schema.js +15 -0
  4. package/dist/i18n/locales/en.js +1 -1
  5. package/dist/i18n/locales/zh-Hans.js +1 -1
  6. package/dist/i18n/locales/zh-Hant.js +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/lib/image.js +3 -3
  9. package/dist/lib/media-helpers.js +43 -0
  10. package/dist/lib/nav-reorder.js +27 -0
  11. package/dist/lib/navigation.js +35 -0
  12. package/dist/lib/schemas.js +32 -2
  13. package/dist/lib/sse.js +7 -8
  14. package/dist/lib/theme-components.js +49 -0
  15. package/dist/routes/api/posts.js +101 -5
  16. package/dist/routes/api/timeline.js +115 -0
  17. package/dist/routes/api/upload.js +9 -5
  18. package/dist/routes/dash/media.js +38 -0
  19. package/dist/routes/dash/navigation.js +274 -0
  20. package/dist/routes/dash/posts.js +45 -6
  21. package/dist/routes/feed/rss.js +10 -1
  22. package/dist/routes/pages/archive.js +14 -27
  23. package/dist/routes/pages/collection.js +10 -19
  24. package/dist/routes/pages/home.js +88 -98
  25. package/dist/routes/pages/page.js +19 -38
  26. package/dist/routes/pages/post.js +61 -48
  27. package/dist/routes/pages/search.js +13 -26
  28. package/dist/services/collection.js +13 -0
  29. package/dist/services/index.js +3 -1
  30. package/dist/services/media.js +55 -2
  31. package/dist/services/navigation.js +115 -0
  32. package/dist/services/post.js +26 -1
  33. package/dist/theme/components/MediaGallery.js +107 -0
  34. package/dist/theme/components/PostForm.js +158 -2
  35. package/dist/theme/components/PostList.js +5 -0
  36. package/dist/theme/components/index.js +3 -0
  37. package/dist/theme/components/timeline/ArticleCard.js +50 -0
  38. package/dist/theme/components/timeline/ImageCard.js +86 -0
  39. package/dist/theme/components/timeline/LinkCard.js +62 -0
  40. package/dist/theme/components/timeline/NoteCard.js +37 -0
  41. package/dist/theme/components/timeline/QuoteCard.js +51 -0
  42. package/dist/theme/components/timeline/ThreadPreview.js +52 -0
  43. package/dist/theme/components/timeline/TimelineFeed.js +43 -0
  44. package/dist/theme/components/timeline/TimelineItem.js +25 -0
  45. package/dist/theme/components/timeline/index.js +8 -0
  46. package/dist/theme/layouts/DashLayout.js +8 -0
  47. package/dist/theme/layouts/SiteLayout.js +160 -0
  48. package/dist/theme/layouts/index.js +1 -0
  49. package/dist/types/sortablejs.d.js +5 -0
  50. package/dist/types.js +27 -0
  51. package/package.json +3 -2
  52. package/src/__tests__/helpers/app.ts +6 -1
  53. package/src/__tests__/helpers/db.ts +20 -0
  54. package/src/app.tsx +11 -25
  55. package/src/client.ts +1 -0
  56. package/src/db/migrations/0002_add_media_attachments.sql +3 -0
  57. package/src/db/migrations/0003_add_navigation_links.sql +8 -0
  58. package/src/db/migrations/meta/0003_snapshot.json +821 -0
  59. package/src/db/migrations/meta/_journal.json +14 -0
  60. package/src/db/schema.ts +15 -0
  61. package/src/i18n/locales/en.po +170 -58
  62. package/src/i18n/locales/en.ts +1 -1
  63. package/src/i18n/locales/zh-Hans.po +162 -71
  64. package/src/i18n/locales/zh-Hans.ts +1 -1
  65. package/src/i18n/locales/zh-Hant.po +162 -71
  66. package/src/i18n/locales/zh-Hant.ts +1 -1
  67. package/src/index.ts +13 -1
  68. package/src/lib/__tests__/schemas.test.ts +89 -1
  69. package/src/lib/__tests__/sse.test.ts +13 -1
  70. package/src/lib/__tests__/theme-components.test.ts +107 -0
  71. package/src/lib/image.ts +3 -3
  72. package/src/lib/media-helpers.ts +54 -0
  73. package/src/lib/nav-reorder.ts +26 -0
  74. package/src/lib/navigation.ts +46 -0
  75. package/src/lib/schemas.ts +47 -1
  76. package/src/lib/sse.ts +10 -11
  77. package/src/lib/theme-components.ts +76 -0
  78. package/src/routes/api/__tests__/posts.test.ts +239 -0
  79. package/src/routes/api/__tests__/timeline.test.ts +242 -0
  80. package/src/routes/api/posts.ts +134 -5
  81. package/src/routes/api/timeline.tsx +145 -0
  82. package/src/routes/api/upload.ts +9 -5
  83. package/src/routes/dash/media.tsx +50 -0
  84. package/src/routes/dash/navigation.tsx +306 -0
  85. package/src/routes/dash/posts.tsx +79 -7
  86. package/src/routes/feed/rss.ts +14 -1
  87. package/src/routes/pages/archive.tsx +15 -23
  88. package/src/routes/pages/collection.tsx +8 -15
  89. package/src/routes/pages/home.tsx +121 -88
  90. package/src/routes/pages/page.tsx +17 -30
  91. package/src/routes/pages/post.tsx +64 -40
  92. package/src/routes/pages/search.tsx +18 -22
  93. package/src/services/__tests__/collection.test.ts +102 -0
  94. package/src/services/__tests__/media.test.ts +282 -7
  95. package/src/services/__tests__/navigation.test.ts +213 -0
  96. package/src/services/__tests__/post-timeline.test.ts +220 -0
  97. package/src/services/collection.ts +19 -0
  98. package/src/services/index.ts +7 -0
  99. package/src/services/media.ts +78 -2
  100. package/src/services/navigation.ts +165 -0
  101. package/src/services/post.ts +48 -1
  102. package/src/styles/components.css +59 -0
  103. package/src/theme/components/MediaGallery.tsx +128 -0
  104. package/src/theme/components/PostForm.tsx +170 -2
  105. package/src/theme/components/PostList.tsx +7 -0
  106. package/src/theme/components/index.ts +13 -0
  107. package/src/theme/components/timeline/ArticleCard.tsx +57 -0
  108. package/src/theme/components/timeline/ImageCard.tsx +80 -0
  109. package/src/theme/components/timeline/LinkCard.tsx +66 -0
  110. package/src/theme/components/timeline/NoteCard.tsx +41 -0
  111. package/src/theme/components/timeline/QuoteCard.tsx +55 -0
  112. package/src/theme/components/timeline/ThreadPreview.tsx +49 -0
  113. package/src/theme/components/timeline/TimelineFeed.tsx +52 -0
  114. package/src/theme/components/timeline/TimelineItem.tsx +39 -0
  115. package/src/theme/components/timeline/index.ts +8 -0
  116. package/src/theme/layouts/DashLayout.tsx +10 -0
  117. package/src/theme/layouts/SiteLayout.tsx +184 -0
  118. package/src/theme/layouts/index.ts +1 -0
  119. package/src/types/sortablejs.d.ts +23 -0
  120. package/src/types.ts +97 -0
  121. package/dist/app.d.ts +0 -38
  122. package/dist/app.d.ts.map +0 -1
  123. package/dist/auth.d.ts +0 -25
  124. package/dist/auth.d.ts.map +0 -1
  125. package/dist/db/index.d.ts +0 -10
  126. package/dist/db/index.d.ts.map +0 -1
  127. package/dist/db/schema.d.ts +0 -1507
  128. package/dist/db/schema.d.ts.map +0 -1
  129. package/dist/i18n/Trans.d.ts +0 -25
  130. package/dist/i18n/Trans.d.ts.map +0 -1
  131. package/dist/i18n/context.d.ts +0 -69
  132. package/dist/i18n/context.d.ts.map +0 -1
  133. package/dist/i18n/detect.d.ts +0 -20
  134. package/dist/i18n/detect.d.ts.map +0 -1
  135. package/dist/i18n/i18n.d.ts +0 -32
  136. package/dist/i18n/i18n.d.ts.map +0 -1
  137. package/dist/i18n/index.d.ts +0 -41
  138. package/dist/i18n/index.d.ts.map +0 -1
  139. package/dist/i18n/locales/en.d.ts +0 -3
  140. package/dist/i18n/locales/en.d.ts.map +0 -1
  141. package/dist/i18n/locales/zh-Hans.d.ts +0 -3
  142. package/dist/i18n/locales/zh-Hans.d.ts.map +0 -1
  143. package/dist/i18n/locales/zh-Hant.d.ts +0 -3
  144. package/dist/i18n/locales/zh-Hant.d.ts.map +0 -1
  145. package/dist/i18n/locales.d.ts +0 -11
  146. package/dist/i18n/locales.d.ts.map +0 -1
  147. package/dist/i18n/middleware.d.ts +0 -21
  148. package/dist/i18n/middleware.d.ts.map +0 -1
  149. package/dist/index.d.ts +0 -16
  150. package/dist/index.d.ts.map +0 -1
  151. package/dist/lib/config.d.ts +0 -83
  152. package/dist/lib/config.d.ts.map +0 -1
  153. package/dist/lib/constants.d.ts +0 -37
  154. package/dist/lib/constants.d.ts.map +0 -1
  155. package/dist/lib/image.d.ts +0 -73
  156. package/dist/lib/image.d.ts.map +0 -1
  157. package/dist/lib/index.d.ts +0 -9
  158. package/dist/lib/index.d.ts.map +0 -1
  159. package/dist/lib/markdown.d.ts +0 -60
  160. package/dist/lib/markdown.d.ts.map +0 -1
  161. package/dist/lib/schemas.d.ts +0 -113
  162. package/dist/lib/schemas.d.ts.map +0 -1
  163. package/dist/lib/sqid.d.ts +0 -60
  164. package/dist/lib/sqid.d.ts.map +0 -1
  165. package/dist/lib/sse.d.ts +0 -192
  166. package/dist/lib/sse.d.ts.map +0 -1
  167. package/dist/lib/theme.d.ts +0 -44
  168. package/dist/lib/theme.d.ts.map +0 -1
  169. package/dist/lib/time.d.ts +0 -90
  170. package/dist/lib/time.d.ts.map +0 -1
  171. package/dist/lib/url.d.ts +0 -82
  172. package/dist/lib/url.d.ts.map +0 -1
  173. package/dist/middleware/auth.d.ts +0 -24
  174. package/dist/middleware/auth.d.ts.map +0 -1
  175. package/dist/middleware/onboarding.d.ts +0 -26
  176. package/dist/middleware/onboarding.d.ts.map +0 -1
  177. package/dist/routes/api/posts.d.ts +0 -13
  178. package/dist/routes/api/posts.d.ts.map +0 -1
  179. package/dist/routes/api/search.d.ts +0 -13
  180. package/dist/routes/api/search.d.ts.map +0 -1
  181. package/dist/routes/api/upload.d.ts +0 -16
  182. package/dist/routes/api/upload.d.ts.map +0 -1
  183. package/dist/routes/dash/collections.d.ts +0 -13
  184. package/dist/routes/dash/collections.d.ts.map +0 -1
  185. package/dist/routes/dash/index.d.ts +0 -15
  186. package/dist/routes/dash/index.d.ts.map +0 -1
  187. package/dist/routes/dash/media.d.ts +0 -16
  188. package/dist/routes/dash/media.d.ts.map +0 -1
  189. package/dist/routes/dash/pages.d.ts +0 -15
  190. package/dist/routes/dash/pages.d.ts.map +0 -1
  191. package/dist/routes/dash/posts.d.ts +0 -13
  192. package/dist/routes/dash/posts.d.ts.map +0 -1
  193. package/dist/routes/dash/redirects.d.ts +0 -13
  194. package/dist/routes/dash/redirects.d.ts.map +0 -1
  195. package/dist/routes/dash/settings.d.ts +0 -15
  196. package/dist/routes/dash/settings.d.ts.map +0 -1
  197. package/dist/routes/feed/rss.d.ts +0 -13
  198. package/dist/routes/feed/rss.d.ts.map +0 -1
  199. package/dist/routes/feed/sitemap.d.ts +0 -13
  200. package/dist/routes/feed/sitemap.d.ts.map +0 -1
  201. package/dist/routes/pages/archive.d.ts +0 -15
  202. package/dist/routes/pages/archive.d.ts.map +0 -1
  203. package/dist/routes/pages/collection.d.ts +0 -13
  204. package/dist/routes/pages/collection.d.ts.map +0 -1
  205. package/dist/routes/pages/home.d.ts +0 -13
  206. package/dist/routes/pages/home.d.ts.map +0 -1
  207. package/dist/routes/pages/page.d.ts +0 -15
  208. package/dist/routes/pages/page.d.ts.map +0 -1
  209. package/dist/routes/pages/post.d.ts +0 -13
  210. package/dist/routes/pages/post.d.ts.map +0 -1
  211. package/dist/routes/pages/search.d.ts +0 -13
  212. package/dist/routes/pages/search.d.ts.map +0 -1
  213. package/dist/services/collection.d.ts +0 -31
  214. package/dist/services/collection.d.ts.map +0 -1
  215. package/dist/services/index.d.ts +0 -28
  216. package/dist/services/index.d.ts.map +0 -1
  217. package/dist/services/media.d.ts +0 -27
  218. package/dist/services/media.d.ts.map +0 -1
  219. package/dist/services/post.d.ts +0 -31
  220. package/dist/services/post.d.ts.map +0 -1
  221. package/dist/services/redirect.d.ts +0 -15
  222. package/dist/services/redirect.d.ts.map +0 -1
  223. package/dist/services/search.d.ts +0 -26
  224. package/dist/services/search.d.ts.map +0 -1
  225. package/dist/services/settings.d.ts +0 -18
  226. package/dist/services/settings.d.ts.map +0 -1
  227. package/dist/theme/color-themes.d.ts +0 -30
  228. package/dist/theme/color-themes.d.ts.map +0 -1
  229. package/dist/theme/components/ActionButtons.d.ts +0 -43
  230. package/dist/theme/components/ActionButtons.d.ts.map +0 -1
  231. package/dist/theme/components/CrudPageHeader.d.ts +0 -23
  232. package/dist/theme/components/CrudPageHeader.d.ts.map +0 -1
  233. package/dist/theme/components/DangerZone.d.ts +0 -36
  234. package/dist/theme/components/DangerZone.d.ts.map +0 -1
  235. package/dist/theme/components/EmptyState.d.ts +0 -27
  236. package/dist/theme/components/EmptyState.d.ts.map +0 -1
  237. package/dist/theme/components/ListItemRow.d.ts +0 -15
  238. package/dist/theme/components/ListItemRow.d.ts.map +0 -1
  239. package/dist/theme/components/PageForm.d.ts +0 -14
  240. package/dist/theme/components/PageForm.d.ts.map +0 -1
  241. package/dist/theme/components/Pagination.d.ts +0 -46
  242. package/dist/theme/components/Pagination.d.ts.map +0 -1
  243. package/dist/theme/components/PostForm.d.ts +0 -11
  244. package/dist/theme/components/PostForm.d.ts.map +0 -1
  245. package/dist/theme/components/PostList.d.ts +0 -10
  246. package/dist/theme/components/PostList.d.ts.map +0 -1
  247. package/dist/theme/components/ThreadView.d.ts +0 -15
  248. package/dist/theme/components/ThreadView.d.ts.map +0 -1
  249. package/dist/theme/components/TypeBadge.d.ts +0 -12
  250. package/dist/theme/components/TypeBadge.d.ts.map +0 -1
  251. package/dist/theme/components/VisibilityBadge.d.ts +0 -12
  252. package/dist/theme/components/VisibilityBadge.d.ts.map +0 -1
  253. package/dist/theme/components/index.d.ts +0 -13
  254. package/dist/theme/components/index.d.ts.map +0 -1
  255. package/dist/theme/index.d.ts +0 -21
  256. package/dist/theme/index.d.ts.map +0 -1
  257. package/dist/theme/layouts/BaseLayout.d.ts +0 -23
  258. package/dist/theme/layouts/BaseLayout.d.ts.map +0 -1
  259. package/dist/theme/layouts/DashLayout.d.ts +0 -17
  260. package/dist/theme/layouts/DashLayout.d.ts.map +0 -1
  261. package/dist/theme/layouts/index.d.ts +0 -3
  262. package/dist/theme/layouts/index.d.ts.map +0 -1
  263. package/dist/types.d.ts +0 -213
  264. package/dist/types.d.ts.map +0 -1
@@ -1,43 +0,0 @@
1
- /**
2
- * Action Buttons Component
3
- *
4
- * Provides consistent Edit/View/Delete button group for list and detail pages
5
- */
6
- import type { FC } from "hono/jsx";
7
- export interface ActionButtonsProps {
8
- /**
9
- * URL for the edit action
10
- */
11
- editHref?: string;
12
- /**
13
- * URL for the view action (opens in new tab)
14
- */
15
- viewHref?: string;
16
- /**
17
- * Delete action URL (sends POST via Datastar @post)
18
- */
19
- deleteAction?: string;
20
- /**
21
- * Delete confirmation message
22
- */
23
- deleteConfirm?: string;
24
- /**
25
- * Button size variant
26
- * @default "sm"
27
- */
28
- size?: "sm" | "md";
29
- /**
30
- * Custom edit button label (overrides default translation)
31
- */
32
- editLabel?: string;
33
- /**
34
- * Custom view button label (overrides default translation)
35
- */
36
- viewLabel?: string;
37
- /**
38
- * Custom delete button label (overrides default translation)
39
- */
40
- deleteLabel?: string;
41
- }
42
- export declare const ActionButtons: FC<ActionButtonsProps>;
43
- //# sourceMappingURL=ActionButtons.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionButtons.d.ts","sourceRoot":"","sources":["../../../src/theme/components/ActionButtons.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAGnC,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA6DhD,CAAC"}
@@ -1,23 +0,0 @@
1
- /**
2
- * CRUD Page Header Component
3
- *
4
- * Provides consistent header layout for dashboard CRUD list pages
5
- * with title and primary action button
6
- */
7
- import type { FC, PropsWithChildren } from "hono/jsx";
8
- export interface CrudPageHeaderProps extends PropsWithChildren {
9
- /**
10
- * Page title to display
11
- */
12
- title: string;
13
- /**
14
- * Primary action button text (e.g., "New Post")
15
- */
16
- ctaLabel?: string;
17
- /**
18
- * Primary action button href
19
- */
20
- ctaHref?: string;
21
- }
22
- export declare const CrudPageHeader: FC<CrudPageHeaderProps>;
23
- //# sourceMappingURL=CrudPageHeader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CrudPageHeader.d.ts","sourceRoot":"","sources":["../../../src/theme/components/CrudPageHeader.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAIlB;AAED,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAiBlD,CAAC"}
@@ -1,36 +0,0 @@
1
- /**
2
- * Danger Zone Component
3
- *
4
- * Displays a section for destructive actions (like delete) with
5
- * consistent styling and confirmation prompts
6
- */
7
- import type { FC, PropsWithChildren } from "hono/jsx";
8
- export interface DangerZoneProps extends PropsWithChildren {
9
- /**
10
- * Title for the danger zone section
11
- * @default "Danger Zone"
12
- */
13
- title?: string;
14
- /**
15
- * Optional description or warning text
16
- */
17
- description?: string;
18
- /**
19
- * Label for the destructive action button
20
- */
21
- actionLabel: string;
22
- /**
23
- * Form action URL for the destructive operation
24
- */
25
- formAction: string;
26
- /**
27
- * Confirmation message to show before executing action
28
- */
29
- confirmMessage?: string;
30
- /**
31
- * Whether the action button should be disabled
32
- */
33
- disabled?: boolean;
34
- }
35
- export declare const DangerZone: FC<DangerZoneProps>;
36
- //# sourceMappingURL=DangerZone.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DangerZone.d.ts","sourceRoot":"","sources":["../../../src/theme/components/DangerZone.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGtD,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACxD;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAuC1C,CAAC"}
@@ -1,27 +0,0 @@
1
- /**
2
- * Empty State Component
3
- *
4
- * Displays a message when a list or collection has no items,
5
- * optionally with a call-to-action button
6
- */
7
- import type { FC } from "hono/jsx";
8
- export interface EmptyStateProps {
9
- /**
10
- * Message to display when empty
11
- */
12
- message: string;
13
- /**
14
- * Optional call-to-action button text
15
- */
16
- ctaText?: string;
17
- /**
18
- * Optional call-to-action button href
19
- */
20
- ctaHref?: string;
21
- /**
22
- * Whether to center the content with padding (default: true)
23
- */
24
- centered?: boolean;
25
- }
26
- export declare const EmptyState: FC<EmptyStateProps>;
27
- //# sourceMappingURL=EmptyState.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/theme/components/EmptyState.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAEnC,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAoB1C,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * List Item Row Component
3
- *
4
- * Provides consistent layout for list items in dashboard CRUD pages.
5
- * Handles responsive spacing, overflow, and action button placement.
6
- */
7
- import type { FC, PropsWithChildren } from "hono/jsx";
8
- export interface ListItemRowProps extends PropsWithChildren {
9
- /**
10
- * Action buttons to display on the right side
11
- */
12
- actions?: unknown;
13
- }
14
- export declare const ListItemRow: FC<ListItemRowProps>;
15
- //# sourceMappingURL=ListItemRow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ListItemRow.d.ts","sourceRoot":"","sources":["../../../src/theme/components/ListItemRow.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAO5C,CAAC"}
@@ -1,14 +0,0 @@
1
- /**
2
- * Page Creation/Edit Form
3
- *
4
- * For managing custom pages (posts with type="page")
5
- */
6
- import type { FC } from "hono/jsx";
7
- import type { Post } from "../../types.js";
8
- export interface PageFormProps {
9
- page?: Post;
10
- action: string;
11
- cancelUrl?: string;
12
- }
13
- export declare const PageForm: FC<PageFormProps>;
14
- //# sourceMappingURL=PageForm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PageForm.d.ts","sourceRoot":"","sources":["../../../src/theme/components/PageForm.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAG3C,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAwJtC,CAAC"}
@@ -1,46 +0,0 @@
1
- /**
2
- * Pagination Component
3
- *
4
- * Cursor-based pagination for post lists
5
- */
6
- import type { FC } from "hono/jsx";
7
- export interface PaginationProps {
8
- /** Base URL for pagination links (e.g., "/archive", "/search?q=test") */
9
- baseUrl: string;
10
- /** Whether there are more items after the current page */
11
- hasMore: boolean;
12
- /** Cursor for the next page (typically the last item's ID) */
13
- nextCursor?: number | string;
14
- /** Cursor for the previous page */
15
- prevCursor?: number | string;
16
- /** Parameter name for cursor (default: "cursor") */
17
- cursorParam?: string;
18
- }
19
- export declare const Pagination: FC<PaginationProps>;
20
- /**
21
- * Simple "Load More" style pagination
22
- */
23
- export interface LoadMoreProps {
24
- /** URL for loading more items */
25
- href: string;
26
- /** Whether there are more items to load */
27
- hasMore: boolean;
28
- /** Button text */
29
- text?: string;
30
- }
31
- export declare const LoadMore: FC<LoadMoreProps>;
32
- /**
33
- * Page-based pagination (for search results etc.)
34
- */
35
- export interface PagePaginationProps {
36
- /** Base URL (query params will be added) */
37
- baseUrl: string;
38
- /** Current page (1-indexed) */
39
- currentPage: number;
40
- /** Whether there are more pages */
41
- hasMore: boolean;
42
- /** Page parameter name (default: "page") */
43
- pageParam?: string;
44
- }
45
- export declare const PagePagination: FC<PagePaginationProps>;
46
- //# sourceMappingURL=Pagination.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/theme/components/Pagination.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAGnC,MAAM,WAAW,eAAe;IAC9B,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA0D1C,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAoBtC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAoElD,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * Post Creation/Edit Form
3
- */
4
- import type { FC } from "hono/jsx";
5
- import type { Post } from "../../types.js";
6
- export interface PostFormProps {
7
- post?: Post;
8
- action: string;
9
- }
10
- export declare const PostForm: FC<PostFormProps>;
11
- //# sourceMappingURL=PostForm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PostForm.d.ts","sourceRoot":"","sources":["../../../src/theme/components/PostForm.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAG3C,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CA4KtC,CAAC"}
@@ -1,10 +0,0 @@
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
@@ -1 +0,0 @@
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,CAiEtC,CAAC"}
@@ -1,15 +0,0 @@
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
@@ -1 +0,0 @@
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;AA6DD,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAsD1C,CAAC"}
@@ -1,12 +0,0 @@
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
@@ -1 +0,0 @@
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,CAsBxC,CAAC"}
@@ -1,12 +0,0 @@
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
@@ -1 +0,0 @@
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,CA8BpD,CAAC"}
@@ -1,13 +0,0 @@
1
- export { ActionButtons, type ActionButtonsProps } from "./ActionButtons.js";
2
- export { CrudPageHeader, type CrudPageHeaderProps } from "./CrudPageHeader.js";
3
- export { DangerZone, type DangerZoneProps } from "./DangerZone.js";
4
- export { EmptyState, type EmptyStateProps } from "./EmptyState.js";
5
- export { ListItemRow, type ListItemRowProps } from "./ListItemRow.js";
6
- export { PageForm, type PageFormProps } from "./PageForm.js";
7
- export { Pagination, LoadMore, PagePagination, type PaginationProps, type LoadMoreProps, type PagePaginationProps, } from "./Pagination.js";
8
- export { PostForm, type PostFormProps } from "./PostForm.js";
9
- export { PostList, type PostListProps } from "./PostList.js";
10
- export { ThreadView, type ThreadViewProps } from "./ThreadView.js";
11
- export { TypeBadge, type TypeBadgeProps } from "./TypeBadge.js";
12
- export { VisibilityBadge, type VisibilityBadgeProps, } from "./VisibilityBadge.js";
13
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
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,EACL,UAAU,EACV,QAAQ,EACR,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,mBAAmB,GACzB,MAAM,iBAAiB,CAAC;AACzB,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,EACL,eAAe,EACf,KAAK,oBAAoB,GAC1B,MAAM,sBAAsB,CAAC"}
@@ -1,21 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,23 +0,0 @@
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
- * Uses vite-ssr-components for automatic dev/prod asset path resolution.
8
- */
9
- import type { FC, PropsWithChildren } from "hono/jsx";
10
- import type { Context } from "hono";
11
- export interface ToastProps {
12
- message: string;
13
- type?: "success" | "error";
14
- }
15
- export interface BaseLayoutProps {
16
- title: string;
17
- description?: string;
18
- lang?: string;
19
- c?: Context;
20
- toast?: ToastProps;
21
- }
22
- export declare const BaseLayout: FC<PropsWithChildren<BaseLayoutProps>>;
23
- //# sourceMappingURL=BaseLayout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseLayout.d.ts","sourceRoot":"","sources":["../../../src/theme/layouts/BaseLayout.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAIpC,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;CAC5B;AAED,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;IACZ,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAiF7D,CAAC"}
@@ -1,17 +0,0 @@
1
- /**
2
- * Dashboard Layout
3
- *
4
- * Layout for admin dashboard pages
5
- */
6
- import type { FC, PropsWithChildren } from "hono/jsx";
7
- import type { Context } from "hono";
8
- import { type ToastProps } from "./BaseLayout.js";
9
- export interface DashLayoutProps {
10
- c: Context;
11
- title: string;
12
- siteName: string;
13
- currentPath?: string;
14
- toast?: ToastProps;
15
- }
16
- export declare const DashLayout: FC<PropsWithChildren<DashLayoutProps>>;
17
- //# sourceMappingURL=DashLayout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DashLayout.d.ts","sourceRoot":"","sources":["../../../src/theme/layouts/DashLayout.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC9B,CAAC,EAAE,OAAO,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAkID,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAe7D,CAAC"}
@@ -1,3 +0,0 @@
1
- export { BaseLayout, type BaseLayoutProps, type ToastProps, } from "./BaseLayout.js";
2
- export { DashLayout, type DashLayoutProps } from "./DashLayout.js";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/layouts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,UAAU,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
package/dist/types.d.ts DELETED
@@ -1,213 +0,0 @@
1
- /**
2
- * Jant Type Definitions
3
- */
4
- export declare const POST_TYPES: readonly ["note", "article", "link", "quote", "image", "page"];
5
- export type PostType = (typeof POST_TYPES)[number];
6
- export declare const VISIBILITY_LEVELS: readonly ["featured", "quiet", "unlisted", "draft"];
7
- export type Visibility = (typeof VISIBILITY_LEVELS)[number];
8
- export interface Bindings {
9
- DB: D1Database;
10
- R2?: R2Bucket;
11
- SITE_URL: string;
12
- AUTH_SECRET?: string;
13
- R2_PUBLIC_URL?: string;
14
- IMAGE_TRANSFORM_URL?: string;
15
- DEMO_EMAIL?: string;
16
- DEMO_PASSWORD?: string;
17
- SITE_NAME?: string;
18
- SITE_DESCRIPTION?: string;
19
- SITE_LANGUAGE?: string;
20
- }
21
- /**
22
- * Configuration Registry - Single Source of Truth
23
- *
24
- * All available configuration fields with their metadata.
25
- * Add new fields here, and they'll automatically work everywhere.
26
- *
27
- * Priority logic:
28
- * - envOnly: false → User-configurable (DB > ENV > Default)
29
- * - envOnly: true → Environment-only (ENV > Default)
30
- */
31
- export declare const CONFIG_FIELDS: {
32
- readonly SITE_NAME: {
33
- readonly defaultValue: "Jant";
34
- readonly envOnly: false;
35
- };
36
- readonly SITE_DESCRIPTION: {
37
- readonly defaultValue: "A microblog powered by Jant";
38
- readonly envOnly: false;
39
- };
40
- readonly SITE_LANGUAGE: {
41
- readonly defaultValue: "en";
42
- readonly envOnly: false;
43
- };
44
- readonly SITE_URL: {
45
- readonly defaultValue: "";
46
- readonly envOnly: true;
47
- };
48
- readonly AUTH_SECRET: {
49
- readonly defaultValue: "";
50
- readonly envOnly: true;
51
- };
52
- readonly R2_PUBLIC_URL: {
53
- readonly defaultValue: "";
54
- readonly envOnly: true;
55
- };
56
- readonly IMAGE_TRANSFORM_URL: {
57
- readonly defaultValue: "";
58
- readonly envOnly: true;
59
- };
60
- readonly DEMO_EMAIL: {
61
- readonly defaultValue: "";
62
- readonly envOnly: true;
63
- };
64
- readonly DEMO_PASSWORD: {
65
- readonly defaultValue: "";
66
- readonly envOnly: true;
67
- };
68
- };
69
- export type ConfigKey = keyof typeof CONFIG_FIELDS;
70
- export interface Post {
71
- id: number;
72
- type: PostType;
73
- visibility: Visibility;
74
- title: string | null;
75
- path: string | null;
76
- content: string | null;
77
- contentHtml: string | null;
78
- sourceUrl: string | null;
79
- sourceName: string | null;
80
- sourceDomain: string | null;
81
- replyToId: number | null;
82
- threadId: number | null;
83
- deletedAt: number | null;
84
- publishedAt: number;
85
- createdAt: number;
86
- updatedAt: number;
87
- }
88
- export interface Media {
89
- id: string;
90
- postId: number | null;
91
- filename: string;
92
- originalName: string;
93
- mimeType: string;
94
- size: number;
95
- r2Key: string;
96
- width: number | null;
97
- height: number | null;
98
- alt: string | null;
99
- createdAt: number;
100
- }
101
- export interface Collection {
102
- id: number;
103
- title: string;
104
- path: string | null;
105
- description: string | null;
106
- createdAt: number;
107
- updatedAt: number;
108
- }
109
- export interface PostCollection {
110
- postId: number;
111
- collectionId: number;
112
- addedAt: number;
113
- }
114
- export interface Redirect {
115
- id: number;
116
- fromPath: string;
117
- toPath: string;
118
- type: 301 | 302;
119
- createdAt: number;
120
- }
121
- export interface Setting {
122
- key: string;
123
- value: string;
124
- updatedAt: number;
125
- }
126
- export interface CreatePost {
127
- type: PostType;
128
- visibility?: Visibility;
129
- title?: string;
130
- path?: string;
131
- content?: string;
132
- sourceUrl?: string;
133
- sourceName?: string;
134
- replyToId?: number;
135
- publishedAt?: number;
136
- }
137
- export interface UpdatePost {
138
- type?: PostType;
139
- visibility?: Visibility;
140
- title?: string | null;
141
- path?: string | null;
142
- content?: string | null;
143
- sourceUrl?: string | null;
144
- sourceName?: string | null;
145
- publishedAt?: number;
146
- }
147
- import type { FC, PropsWithChildren } from "hono/jsx";
148
- import type { ColorTheme } from "./theme/color-themes.js";
149
- /**
150
- * Props for overridable theme components
151
- */
152
- export interface BaseLayoutProps extends PropsWithChildren {
153
- title?: string;
154
- description?: string;
155
- }
156
- export interface PostCardProps {
157
- post: Post;
158
- showExcerpt?: boolean;
159
- showDate?: boolean;
160
- }
161
- export interface PostListProps {
162
- posts: Post[];
163
- emptyMessage?: string;
164
- }
165
- export interface PaginationProps {
166
- currentPage: number;
167
- totalPages: number;
168
- basePath: string;
169
- }
170
- export interface EmptyStateProps {
171
- title: string;
172
- description?: string;
173
- actionLabel?: string;
174
- actionHref?: string;
175
- }
176
- /**
177
- * Theme component overrides
178
- */
179
- export interface ThemeComponents {
180
- BaseLayout?: FC<BaseLayoutProps>;
181
- PostCard?: FC<PostCardProps>;
182
- PostList?: FC<PostListProps>;
183
- Pagination?: FC<PaginationProps>;
184
- EmptyState?: FC<EmptyStateProps>;
185
- }
186
- /**
187
- * Theme configuration
188
- */
189
- export interface JantTheme {
190
- /** Theme name */
191
- name?: string;
192
- /** Component overrides */
193
- components?: ThemeComponents;
194
- /** CSS variable overrides (highest priority, always applied) */
195
- cssVariables?: Record<string, string>;
196
- /** Replace built-in color themes with a custom list */
197
- colorThemes?: ColorTheme[];
198
- }
199
- /**
200
- * Main Jant configuration
201
- *
202
- * Configuration Philosophy:
203
- * - Use environment variables for runtime config (API keys, feature flags, site settings)
204
- * - Use code config (this object) for compile-time customization (theme components)
205
- *
206
- * Site-level settings (name, description, language) are configured via
207
- * environment variables, not here. See lib/config.ts for details.
208
- */
209
- export interface JantConfig {
210
- /** Theme configuration (components, CSS overrides) */
211
- theme?: JantTheme;
212
- }
213
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,eAAO,MAAM,UAAU,gEAOb,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD,eAAO,MAAM,iBAAiB,qDAKpB,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAM5D,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,UAAU,CAAC;IACf,EAAE,CAAC,EAAE,QAAQ,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa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