@btst/stack 2.11.3 → 2.11.5

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 (68) hide show
  1. package/dist/packages/stack/src/plugins/cms/api/mutations.cjs +12 -1
  2. package/dist/packages/stack/src/plugins/cms/api/mutations.mjs +12 -1
  3. package/dist/packages/stack/src/plugins/cms/api/plugin.cjs +11 -51
  4. package/dist/packages/stack/src/plugins/cms/api/plugin.mjs +3 -43
  5. package/dist/packages/stack/src/plugins/cms/api/relations.cjs +76 -0
  6. package/dist/packages/stack/src/plugins/cms/api/relations.mjs +70 -0
  7. package/dist/packages/stack/src/plugins/cms/client/components/forms/content-form.cjs +58 -34
  8. package/dist/packages/stack/src/plugins/cms/client/components/forms/content-form.mjs +58 -34
  9. package/dist/packages/stack/src/plugins/cms/client/components/inverse-relations-panel.cjs +29 -7
  10. package/dist/packages/stack/src/plugins/cms/client/components/inverse-relations-panel.mjs +29 -7
  11. package/dist/packages/ui/src/components/auto-form/helpers.cjs +24 -1
  12. package/dist/packages/ui/src/components/auto-form/helpers.mjs +24 -1
  13. package/dist/plugins/blog/api/index.d.cts +3 -2
  14. package/dist/plugins/blog/api/index.d.mts +3 -2
  15. package/dist/plugins/blog/api/index.d.ts +3 -2
  16. package/dist/plugins/blog/client/components/index.cjs +21 -0
  17. package/dist/plugins/blog/client/components/index.d.cts +71 -1
  18. package/dist/plugins/blog/client/components/index.d.mts +71 -1
  19. package/dist/plugins/blog/client/components/index.d.ts +71 -1
  20. package/dist/plugins/blog/client/components/index.mjs +15 -1
  21. package/dist/plugins/blog/client/hooks/index.d.cts +3 -2
  22. package/dist/plugins/blog/client/hooks/index.d.mts +3 -2
  23. package/dist/plugins/blog/client/hooks/index.d.ts +3 -2
  24. package/dist/plugins/blog/client/index.d.cts +3 -2
  25. package/dist/plugins/blog/client/index.d.mts +3 -2
  26. package/dist/plugins/blog/client/index.d.ts +3 -2
  27. package/dist/plugins/blog/query-keys.d.cts +3 -2
  28. package/dist/plugins/blog/query-keys.d.mts +3 -2
  29. package/dist/plugins/blog/query-keys.d.ts +3 -2
  30. package/dist/plugins/cms/api/index.d.cts +1 -1
  31. package/dist/plugins/cms/api/index.d.mts +1 -1
  32. package/dist/plugins/cms/api/index.d.ts +1 -1
  33. package/dist/plugins/cms/query-keys.d.cts +1 -1
  34. package/dist/plugins/cms/query-keys.d.mts +1 -1
  35. package/dist/plugins/cms/query-keys.d.ts +1 -1
  36. package/dist/plugins/kanban/api/index.d.cts +1 -1
  37. package/dist/plugins/kanban/api/index.d.mts +1 -1
  38. package/dist/plugins/kanban/api/index.d.ts +1 -1
  39. package/dist/plugins/kanban/query-keys.d.cts +1 -1
  40. package/dist/plugins/kanban/query-keys.d.mts +1 -1
  41. package/dist/plugins/kanban/query-keys.d.ts +1 -1
  42. package/dist/shared/{stack.DGsFF5qb.d.cts → stack.BnSAhKJi.d.ts} +6 -5
  43. package/dist/shared/{stack.CntKf20s.d.cts → stack.CLWhMntf.d.cts} +12 -11
  44. package/dist/shared/{stack.Sod_PZhB.d.cts → stack.CuhcFsAx.d.cts} +7 -42
  45. package/dist/shared/{stack.Sod_PZhB.d.mts → stack.CuhcFsAx.d.mts} +7 -42
  46. package/dist/shared/{stack.Sod_PZhB.d.ts → stack.CuhcFsAx.d.ts} +7 -42
  47. package/dist/shared/{stack.QrBE0Bc8.d.ts → stack.DNLuzDb3.d.cts} +6 -5
  48. package/dist/shared/{stack.BX7MHi0J.d.mts → stack.DbnCLdNF.d.mts} +34 -7
  49. package/dist/shared/{stack.NtflNnnH.d.mts → stack.Dfc44JiE.d.mts} +6 -5
  50. package/dist/shared/{stack.CLrGRIj0.d.mts → stack.DiodAFAa.d.mts} +12 -11
  51. package/dist/shared/stack.Dsatjh0B.d.cts +35 -0
  52. package/dist/shared/stack.Dsatjh0B.d.mts +35 -0
  53. package/dist/shared/stack.Dsatjh0B.d.ts +35 -0
  54. package/dist/shared/{stack.fQjVhw5a.d.ts → stack.fXlShnhv.d.ts} +34 -7
  55. package/dist/shared/{stack.C9zoS1TN.d.cts → stack.r6HohbyX.d.cts} +34 -7
  56. package/dist/shared/{stack.BQSy-NDc.d.ts → stack.ufcExQIR.d.ts} +12 -11
  57. package/package.json +14 -1
  58. package/src/plugins/blog/client/components/index.tsx +52 -0
  59. package/src/plugins/cms/__tests__/auto-form-nested-config.test.ts +177 -0
  60. package/src/plugins/cms/api/index.ts +1 -0
  61. package/src/plugins/cms/api/mutations.ts +48 -3
  62. package/src/plugins/cms/api/plugin.ts +11 -101
  63. package/src/plugins/cms/api/relations.ts +174 -0
  64. package/src/plugins/cms/client/components/forms/content-form.tsx +93 -47
  65. package/src/plugins/cms/client/components/inverse-relations-panel.tsx +49 -1
  66. package/dist/shared/{stack.CMbX8Q5C.d.ts → stack.D4Cea8II.d.ts} +13 -13
  67. package/dist/shared/{stack.Dj04W2c3.d.mts → stack.HE_IvqV5.d.mts} +13 -13
  68. package/dist/shared/{stack.eq5eg1yt.d.cts → stack.Rtcvl8sS.d.cts} +13 -13
@@ -42,6 +42,13 @@ function InverseRelationsPanel({
42
42
  if (inverseRelations.length === 0) {
43
43
  return null;
44
44
  }
45
+ const sourceTypeCounts = /* @__PURE__ */ new Map();
46
+ for (const rel of inverseRelations) {
47
+ sourceTypeCounts.set(
48
+ rel.sourceType,
49
+ (sourceTypeCounts.get(rel.sourceType) ?? 0) + 1
50
+ );
51
+ }
45
52
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
46
53
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold", children: "Related Items" }),
47
54
  inverseRelations.map((relation) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -54,12 +61,18 @@ function InverseRelationsPanel({
54
61
  navigate,
55
62
  Link,
56
63
  client: client$1,
57
- headers
64
+ headers,
65
+ ambiguous: (sourceTypeCounts.get(relation.sourceType) ?? 0) > 1
58
66
  },
59
67
  `${relation.sourceType}-${relation.fieldName}`
60
68
  ))
61
69
  ] });
62
70
  }
71
+ function humanizeFieldName(fieldName) {
72
+ const stripped = fieldName.replace(/Ids?$/, "") || fieldName;
73
+ const words = stripped.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().split(/\s+/);
74
+ return words.map((w) => w ? w[0].toUpperCase() + w.slice(1) : w).join(" ");
75
+ }
63
76
  function InverseRelationSection({
64
77
  relation,
65
78
  contentTypeSlug,
@@ -68,7 +81,8 @@ function InverseRelationSection({
68
81
  navigate,
69
82
  Link,
70
83
  client,
71
- headers
84
+ headers,
85
+ ambiguous
72
86
  }) {
73
87
  const [isExpanded, setIsExpanded] = React.useState(true);
74
88
  const [deleteItemId, setDeleteItemId] = React.useState(null);
@@ -117,6 +131,7 @@ function InverseRelationSection({
117
131
  navigate(createUrl);
118
132
  };
119
133
  const LinkComponent = Link ?? "a";
134
+ const fieldLabel = ambiguous ? humanizeFieldName(relation.fieldName) : null;
120
135
  return /* @__PURE__ */ jsxRuntime.jsxs(card.Card, { children: [
121
136
  /* @__PURE__ */ jsxRuntime.jsx(card.CardHeader, { className: "py-3", children: /* @__PURE__ */ jsxRuntime.jsx(
122
137
  "button",
@@ -126,10 +141,16 @@ function InverseRelationSection({
126
141
  className: "flex items-center justify-between w-full text-left",
127
142
  children: /* @__PURE__ */ jsxRuntime.jsxs(card.CardTitle, { className: "text-base flex items-center gap-2", children: [
128
143
  isExpanded ? /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.ChevronRight, { className: "h-4 w-4" }),
129
- relation.sourceTypeName,
130
- " (",
131
- total,
132
- ")"
144
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: relation.sourceTypeName }),
145
+ fieldLabel && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-normal text-muted-foreground", children: [
146
+ "\xB7 ",
147
+ fieldLabel
148
+ ] }),
149
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-normal text-muted-foreground", children: [
150
+ "(",
151
+ total,
152
+ ")"
153
+ ] })
133
154
  ] })
134
155
  }
135
156
  ) }),
@@ -182,7 +203,8 @@ function InverseRelationSection({
182
203
  children: [
183
204
  /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.Plus, { className: "h-4 w-4 mr-2" }),
184
205
  "Add ",
185
- relation.sourceTypeName
206
+ relation.sourceTypeName,
207
+ fieldLabel ? ` (${fieldLabel})` : ""
186
208
  ]
187
209
  }
188
210
  ) })
@@ -40,6 +40,13 @@ function InverseRelationsPanel({
40
40
  if (inverseRelations.length === 0) {
41
41
  return null;
42
42
  }
43
+ const sourceTypeCounts = /* @__PURE__ */ new Map();
44
+ for (const rel of inverseRelations) {
45
+ sourceTypeCounts.set(
46
+ rel.sourceType,
47
+ (sourceTypeCounts.get(rel.sourceType) ?? 0) + 1
48
+ );
49
+ }
43
50
  return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
44
51
  /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold", children: "Related Items" }),
45
52
  inverseRelations.map((relation) => /* @__PURE__ */ jsx(
@@ -52,12 +59,18 @@ function InverseRelationsPanel({
52
59
  navigate,
53
60
  Link,
54
61
  client,
55
- headers
62
+ headers,
63
+ ambiguous: (sourceTypeCounts.get(relation.sourceType) ?? 0) > 1
56
64
  },
57
65
  `${relation.sourceType}-${relation.fieldName}`
58
66
  ))
59
67
  ] });
60
68
  }
69
+ function humanizeFieldName(fieldName) {
70
+ const stripped = fieldName.replace(/Ids?$/, "") || fieldName;
71
+ const words = stripped.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().split(/\s+/);
72
+ return words.map((w) => w ? w[0].toUpperCase() + w.slice(1) : w).join(" ");
73
+ }
61
74
  function InverseRelationSection({
62
75
  relation,
63
76
  contentTypeSlug,
@@ -66,7 +79,8 @@ function InverseRelationSection({
66
79
  navigate,
67
80
  Link,
68
81
  client,
69
- headers
82
+ headers,
83
+ ambiguous
70
84
  }) {
71
85
  const [isExpanded, setIsExpanded] = useState(true);
72
86
  const [deleteItemId, setDeleteItemId] = useState(null);
@@ -115,6 +129,7 @@ function InverseRelationSection({
115
129
  navigate(createUrl);
116
130
  };
117
131
  const LinkComponent = Link ?? "a";
132
+ const fieldLabel = ambiguous ? humanizeFieldName(relation.fieldName) : null;
118
133
  return /* @__PURE__ */ jsxs(Card, { children: [
119
134
  /* @__PURE__ */ jsx(CardHeader, { className: "py-3", children: /* @__PURE__ */ jsx(
120
135
  "button",
@@ -124,10 +139,16 @@ function InverseRelationSection({
124
139
  className: "flex items-center justify-between w-full text-left",
125
140
  children: /* @__PURE__ */ jsxs(CardTitle, { className: "text-base flex items-center gap-2", children: [
126
141
  isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" }),
127
- relation.sourceTypeName,
128
- " (",
129
- total,
130
- ")"
142
+ /* @__PURE__ */ jsx("span", { children: relation.sourceTypeName }),
143
+ fieldLabel && /* @__PURE__ */ jsxs("span", { className: "font-normal text-muted-foreground", children: [
144
+ "\xB7 ",
145
+ fieldLabel
146
+ ] }),
147
+ /* @__PURE__ */ jsxs("span", { className: "font-normal text-muted-foreground", children: [
148
+ "(",
149
+ total,
150
+ ")"
151
+ ] })
131
152
  ] })
132
153
  }
133
154
  ) }),
@@ -180,7 +201,8 @@ function InverseRelationSection({
180
201
  children: [
181
202
  /* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-2" }),
182
203
  "Add ",
183
- relation.sourceTypeName
204
+ relation.sourceTypeName,
205
+ fieldLabel ? ` (${fieldLabel})` : ""
184
206
  ]
185
207
  }
186
208
  ) })
@@ -216,12 +216,19 @@ function buildFieldConfigFromJsonSchema(jsonSchema, fieldComponents) {
216
216
  );
217
217
  }
218
218
  }
219
+ const reservedProps = /* @__PURE__ */ new Set([
220
+ "description",
221
+ "label",
222
+ "inputProps",
223
+ "fieldType",
224
+ "renderParent",
225
+ "order"
226
+ ]);
219
227
  if (value.properties) {
220
228
  const nestedConfig = buildFieldConfigFromJsonSchema(
221
229
  { properties: value.properties },
222
230
  fieldComponents
223
231
  );
224
- const reservedProps = /* @__PURE__ */ new Set(["description", "label", "inputProps", "fieldType", "renderParent", "order"]);
225
232
  for (const [nestedKey, nestedValue] of Object.entries(nestedConfig)) {
226
233
  if (!reservedProps.has(nestedKey)) {
227
234
  config[nestedKey] = nestedValue;
@@ -232,6 +239,22 @@ function buildFieldConfigFromJsonSchema(jsonSchema, fieldComponents) {
232
239
  }
233
240
  }
234
241
  }
242
+ const items = value.items;
243
+ if (items?.properties) {
244
+ const itemConfig = buildFieldConfigFromJsonSchema(
245
+ { properties: items.properties },
246
+ fieldComponents
247
+ );
248
+ for (const [itemKey, itemValue] of Object.entries(itemConfig)) {
249
+ if (!reservedProps.has(itemKey)) {
250
+ config[itemKey] = itemValue;
251
+ } else {
252
+ console.warn(
253
+ `Array field "${key}" has an item property named "${itemKey}" which conflicts with a reserved FieldConfigItem property. The item field's config will not be accessible inside array items.`
254
+ );
255
+ }
256
+ }
257
+ }
235
258
  if (Object.keys(config).length > 0) {
236
259
  fieldConfig[key] = config;
237
260
  }
@@ -214,12 +214,19 @@ function buildFieldConfigFromJsonSchema(jsonSchema, fieldComponents) {
214
214
  );
215
215
  }
216
216
  }
217
+ const reservedProps = /* @__PURE__ */ new Set([
218
+ "description",
219
+ "label",
220
+ "inputProps",
221
+ "fieldType",
222
+ "renderParent",
223
+ "order"
224
+ ]);
217
225
  if (value.properties) {
218
226
  const nestedConfig = buildFieldConfigFromJsonSchema(
219
227
  { properties: value.properties },
220
228
  fieldComponents
221
229
  );
222
- const reservedProps = /* @__PURE__ */ new Set(["description", "label", "inputProps", "fieldType", "renderParent", "order"]);
223
230
  for (const [nestedKey, nestedValue] of Object.entries(nestedConfig)) {
224
231
  if (!reservedProps.has(nestedKey)) {
225
232
  config[nestedKey] = nestedValue;
@@ -230,6 +237,22 @@ function buildFieldConfigFromJsonSchema(jsonSchema, fieldComponents) {
230
237
  }
231
238
  }
232
239
  }
240
+ const items = value.items;
241
+ if (items?.properties) {
242
+ const itemConfig = buildFieldConfigFromJsonSchema(
243
+ { properties: items.properties },
244
+ fieldComponents
245
+ );
246
+ for (const [itemKey, itemValue] of Object.entries(itemConfig)) {
247
+ if (!reservedProps.has(itemKey)) {
248
+ config[itemKey] = itemValue;
249
+ } else {
250
+ console.warn(
251
+ `Array field "${key}" has an item property named "${itemKey}" which conflicts with a reserved FieldConfigItem property. The item field's config will not be accessible inside array items.`
252
+ );
253
+ }
254
+ }
255
+ }
233
256
  if (Object.keys(config).length > 0) {
234
257
  fieldConfig[key] = config;
235
258
  }
@@ -1,11 +1,12 @@
1
- export { B as BLOG_QUERY_KEYS, j as BlogApiContext, m as BlogApiRouter, k as BlogBackendHooks, h as BlogRouteKey, C as CreatePostInput, N as NextPreviousPostsQuerySchema, P as PostListParams, i as PostListQuerySchema, c as PostListResult, U as UpdatePostInput, l as blogBackendPlugin, f as createBlogQueryKeys, d as createPost, e as deletePost, g as getAllPosts, b as getAllTags, a as getPostBySlug, u as updatePost } from '../../../shared/stack.CntKf20s.cjs';
2
- import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.Sod_PZhB.cjs';
1
+ export { B as BLOG_QUERY_KEYS, j as BlogApiContext, m as BlogApiRouter, k as BlogBackendHooks, h as BlogRouteKey, C as CreatePostInput, N as NextPreviousPostsQuerySchema, P as PostListParams, i as PostListQuerySchema, c as PostListResult, U as UpdatePostInput, l as blogBackendPlugin, f as createBlogQueryKeys, d as createPost, e as deletePost, g as getAllPosts, b as getAllTags, a as getPostBySlug, u as updatePost } from '../../../shared/stack.CLWhMntf.cjs';
2
+ import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.Dsatjh0B.cjs';
3
3
  import '@tanstack/react-query';
4
4
  import '@btst/stack/plugins/client';
5
5
  import '@btst/stack/plugins/api';
6
6
  import '@btst/db';
7
7
  import 'better-call';
8
8
  import 'zod';
9
+ import '../../../shared/stack.CuhcFsAx.cjs';
9
10
 
10
11
  /**
11
12
  * Serialize a Tag for SSR/SSG use (convert dates to strings).
@@ -1,11 +1,12 @@
1
- export { B as BLOG_QUERY_KEYS, j as BlogApiContext, m as BlogApiRouter, k as BlogBackendHooks, h as BlogRouteKey, C as CreatePostInput, N as NextPreviousPostsQuerySchema, P as PostListParams, i as PostListQuerySchema, c as PostListResult, U as UpdatePostInput, l as blogBackendPlugin, f as createBlogQueryKeys, d as createPost, e as deletePost, g as getAllPosts, b as getAllTags, a as getPostBySlug, u as updatePost } from '../../../shared/stack.CLrGRIj0.mjs';
2
- import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.Sod_PZhB.mjs';
1
+ export { B as BLOG_QUERY_KEYS, j as BlogApiContext, m as BlogApiRouter, k as BlogBackendHooks, h as BlogRouteKey, C as CreatePostInput, N as NextPreviousPostsQuerySchema, P as PostListParams, i as PostListQuerySchema, c as PostListResult, U as UpdatePostInput, l as blogBackendPlugin, f as createBlogQueryKeys, d as createPost, e as deletePost, g as getAllPosts, b as getAllTags, a as getPostBySlug, u as updatePost } from '../../../shared/stack.DiodAFAa.mjs';
2
+ import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.Dsatjh0B.mjs';
3
3
  import '@tanstack/react-query';
4
4
  import '@btst/stack/plugins/client';
5
5
  import '@btst/stack/plugins/api';
6
6
  import '@btst/db';
7
7
  import 'better-call';
8
8
  import 'zod';
9
+ import '../../../shared/stack.CuhcFsAx.mjs';
9
10
 
10
11
  /**
11
12
  * Serialize a Tag for SSR/SSG use (convert dates to strings).
@@ -1,11 +1,12 @@
1
- export { B as BLOG_QUERY_KEYS, j as BlogApiContext, m as BlogApiRouter, k as BlogBackendHooks, h as BlogRouteKey, C as CreatePostInput, N as NextPreviousPostsQuerySchema, P as PostListParams, i as PostListQuerySchema, c as PostListResult, U as UpdatePostInput, l as blogBackendPlugin, f as createBlogQueryKeys, d as createPost, e as deletePost, g as getAllPosts, b as getAllTags, a as getPostBySlug, u as updatePost } from '../../../shared/stack.BQSy-NDc.js';
2
- import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.Sod_PZhB.js';
1
+ export { B as BLOG_QUERY_KEYS, j as BlogApiContext, m as BlogApiRouter, k as BlogBackendHooks, h as BlogRouteKey, C as CreatePostInput, N as NextPreviousPostsQuerySchema, P as PostListParams, i as PostListQuerySchema, c as PostListResult, U as UpdatePostInput, l as blogBackendPlugin, f as createBlogQueryKeys, d as createPost, e as deletePost, g as getAllPosts, b as getAllTags, a as getPostBySlug, u as updatePost } from '../../../shared/stack.ufcExQIR.js';
2
+ import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.Dsatjh0B.js';
3
3
  import '@tanstack/react-query';
4
4
  import '@btst/stack/plugins/client';
5
5
  import '@btst/stack/plugins/api';
6
6
  import '@btst/db';
7
7
  import 'better-call';
8
8
  import 'zod';
9
+ import '../../../shared/stack.CuhcFsAx.js';
9
10
 
10
11
  /**
11
12
  * Serialize a Tag for SSR/SSG use (convert dates to strings).
@@ -5,13 +5,34 @@ const homePage = require('../../../../packages/stack/src/plugins/blog/client/com
5
5
  const newPostPage = require('../../../../packages/stack/src/plugins/blog/client/components/pages/new-post-page.cjs');
6
6
  const postPage = require('../../../../packages/stack/src/plugins/blog/client/components/pages/post-page.cjs');
7
7
  const editPostPage = require('../../../../packages/stack/src/plugins/blog/client/components/pages/edit-post-page.cjs');
8
+ const postCard = require('../../../../packages/stack/src/plugins/blog/client/components/shared/post-card.cjs');
9
+ const postsList = require('../../../../packages/stack/src/plugins/blog/client/components/shared/posts-list.cjs');
10
+ const emptyList = require('../../../../packages/stack/src/plugins/blog/client/components/shared/empty-list.cjs');
11
+ const recentPostsCarousel = require('../../../../packages/stack/src/plugins/blog/client/components/shared/recent-posts-carousel.cjs');
12
+ const postNavigation = require('../../../../packages/stack/src/plugins/blog/client/components/shared/post-navigation.cjs');
13
+ const tagsList = require('../../../../packages/stack/src/plugins/blog/client/components/shared/tags-list.cjs');
14
+ const postCardSkeleton = require('../../../../packages/stack/src/plugins/blog/client/components/loading/post-card-skeleton.cjs');
8
15
 
9
16
  const PostListPage = homePage.HomePageComponent;
10
17
  const NewPostPage = newPostPage.NewPostPageComponent;
11
18
  const PostPage = postPage.PostPageComponent;
12
19
  const EditPostPage = editPostPage.EditPostPageComponent;
20
+ const PostCard = postCard.PostCard;
21
+ const PostCardSkeleton = postCardSkeleton.PostCardSkeleton;
22
+ const PostsList = postsList.PostsList;
23
+ const EmptyList = emptyList.EmptyList;
24
+ const RecentPostsCarousel = recentPostsCarousel.RecentPostsCarousel;
25
+ const PostNavigation = postNavigation.PostNavigation;
26
+ const TagsList = tagsList.TagsList;
13
27
 
14
28
  exports.EditPostPage = EditPostPage;
29
+ exports.EmptyList = EmptyList;
15
30
  exports.NewPostPage = NewPostPage;
31
+ exports.PostCard = PostCard;
32
+ exports.PostCardSkeleton = PostCardSkeleton;
16
33
  exports.PostListPage = PostListPage;
34
+ exports.PostNavigation = PostNavigation;
17
35
  exports.PostPage = PostPage;
36
+ exports.PostsList = PostsList;
37
+ exports.RecentPostsCarousel = RecentPostsCarousel;
38
+ exports.TagsList = TagsList;
@@ -1,4 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { S as SerializedPost } from '../../../../shared/stack.Dsatjh0B.cjs';
2
3
 
3
4
  declare function HomePageComponent({ published, }: {
4
5
  published?: boolean;
@@ -14,9 +15,78 @@ declare function EditPostPageComponent({ slug }: {
14
15
  slug: string;
15
16
  }): react_jsx_runtime.JSX.Element;
16
17
 
18
+ declare function PostCard$1({ post }: {
19
+ post: SerializedPost;
20
+ }): react_jsx_runtime.JSX.Element;
21
+
22
+ interface PostsListProps {
23
+ posts: SerializedPost[];
24
+ onLoadMore?: () => void;
25
+ hasMore?: boolean;
26
+ isLoadingMore?: boolean;
27
+ }
28
+ declare function PostsList$1({ posts, onLoadMore, hasMore, isLoadingMore, }: PostsListProps): react_jsx_runtime.JSX.Element;
29
+
30
+ declare function EmptyList$1({ message }: {
31
+ message: string;
32
+ }): react_jsx_runtime.JSX.Element;
33
+
34
+ interface RecentPostsCarouselProps {
35
+ posts: SerializedPost[];
36
+ }
37
+ declare function RecentPostsCarousel$1({ posts }: RecentPostsCarouselProps): react_jsx_runtime.JSX.Element;
38
+
39
+ interface PostNavigationProps {
40
+ previousPost: SerializedPost | null;
41
+ nextPost: SerializedPost | null;
42
+ }
43
+ declare function PostNavigation$1({ previousPost, nextPost, }: PostNavigationProps): react_jsx_runtime.JSX.Element;
44
+
45
+ declare function TagsList$1(): react_jsx_runtime.JSX.Element | null;
46
+
47
+ declare function PostCardSkeleton$1(): react_jsx_runtime.JSX.Element;
48
+
17
49
  declare const PostListPage: typeof HomePageComponent;
18
50
  declare const NewPostPage: typeof NewPostPageComponent;
19
51
  declare const PostPage: typeof PostPageComponent;
20
52
  declare const EditPostPage: typeof EditPostPageComponent;
53
+ /**
54
+ * Card component that renders a single blog post summary
55
+ * (cover image, title, date, tags). Used by the built-in posts list and
56
+ * available for composing custom blog landing pages.
57
+ *
58
+ * Requires a `StackProvider` with the blog plugin registered so that
59
+ * `Link` and `Image` overrides are resolved correctly.
60
+ */
61
+ declare const PostCard: typeof PostCard$1;
62
+ /**
63
+ * Skeleton placeholder that mirrors the layout of {@link PostCard}.
64
+ * Use inside a `<Suspense>` fallback or while data is loading.
65
+ */
66
+ declare const PostCardSkeleton: typeof PostCardSkeleton$1;
67
+ /**
68
+ * Grid of {@link PostCard}s with optional load-more pagination and a
69
+ * built-in search input. Pass an array of `SerializedPost`s.
70
+ */
71
+ declare const PostsList: typeof PostsList$1;
72
+ /**
73
+ * Empty-state placeholder used by the built-in blog list pages.
74
+ * Renders a centered icon and a customisable message.
75
+ */
76
+ declare const EmptyList: typeof EmptyList$1;
77
+ /**
78
+ * Horizontal carousel of recent posts. Drop-in component for "you might
79
+ * also like" sections on a blog post page.
80
+ */
81
+ declare const RecentPostsCarousel: typeof RecentPostsCarousel$1;
82
+ /**
83
+ * Previous/next post navigation strip, typically rendered at the bottom
84
+ * of a post page.
85
+ */
86
+ declare const PostNavigation: typeof PostNavigation$1;
87
+ /**
88
+ * Renders a list of tags for a post or for the whole blog.
89
+ */
90
+ declare const TagsList: typeof TagsList$1;
21
91
 
22
- export { EditPostPage, NewPostPage, PostListPage, PostPage };
92
+ export { EditPostPage, EmptyList, NewPostPage, PostCard, PostCardSkeleton, PostListPage, PostNavigation, PostPage, PostsList, RecentPostsCarousel, TagsList };
@@ -1,4 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { S as SerializedPost } from '../../../../shared/stack.Dsatjh0B.mjs';
2
3
 
3
4
  declare function HomePageComponent({ published, }: {
4
5
  published?: boolean;
@@ -14,9 +15,78 @@ declare function EditPostPageComponent({ slug }: {
14
15
  slug: string;
15
16
  }): react_jsx_runtime.JSX.Element;
16
17
 
18
+ declare function PostCard$1({ post }: {
19
+ post: SerializedPost;
20
+ }): react_jsx_runtime.JSX.Element;
21
+
22
+ interface PostsListProps {
23
+ posts: SerializedPost[];
24
+ onLoadMore?: () => void;
25
+ hasMore?: boolean;
26
+ isLoadingMore?: boolean;
27
+ }
28
+ declare function PostsList$1({ posts, onLoadMore, hasMore, isLoadingMore, }: PostsListProps): react_jsx_runtime.JSX.Element;
29
+
30
+ declare function EmptyList$1({ message }: {
31
+ message: string;
32
+ }): react_jsx_runtime.JSX.Element;
33
+
34
+ interface RecentPostsCarouselProps {
35
+ posts: SerializedPost[];
36
+ }
37
+ declare function RecentPostsCarousel$1({ posts }: RecentPostsCarouselProps): react_jsx_runtime.JSX.Element;
38
+
39
+ interface PostNavigationProps {
40
+ previousPost: SerializedPost | null;
41
+ nextPost: SerializedPost | null;
42
+ }
43
+ declare function PostNavigation$1({ previousPost, nextPost, }: PostNavigationProps): react_jsx_runtime.JSX.Element;
44
+
45
+ declare function TagsList$1(): react_jsx_runtime.JSX.Element | null;
46
+
47
+ declare function PostCardSkeleton$1(): react_jsx_runtime.JSX.Element;
48
+
17
49
  declare const PostListPage: typeof HomePageComponent;
18
50
  declare const NewPostPage: typeof NewPostPageComponent;
19
51
  declare const PostPage: typeof PostPageComponent;
20
52
  declare const EditPostPage: typeof EditPostPageComponent;
53
+ /**
54
+ * Card component that renders a single blog post summary
55
+ * (cover image, title, date, tags). Used by the built-in posts list and
56
+ * available for composing custom blog landing pages.
57
+ *
58
+ * Requires a `StackProvider` with the blog plugin registered so that
59
+ * `Link` and `Image` overrides are resolved correctly.
60
+ */
61
+ declare const PostCard: typeof PostCard$1;
62
+ /**
63
+ * Skeleton placeholder that mirrors the layout of {@link PostCard}.
64
+ * Use inside a `<Suspense>` fallback or while data is loading.
65
+ */
66
+ declare const PostCardSkeleton: typeof PostCardSkeleton$1;
67
+ /**
68
+ * Grid of {@link PostCard}s with optional load-more pagination and a
69
+ * built-in search input. Pass an array of `SerializedPost`s.
70
+ */
71
+ declare const PostsList: typeof PostsList$1;
72
+ /**
73
+ * Empty-state placeholder used by the built-in blog list pages.
74
+ * Renders a centered icon and a customisable message.
75
+ */
76
+ declare const EmptyList: typeof EmptyList$1;
77
+ /**
78
+ * Horizontal carousel of recent posts. Drop-in component for "you might
79
+ * also like" sections on a blog post page.
80
+ */
81
+ declare const RecentPostsCarousel: typeof RecentPostsCarousel$1;
82
+ /**
83
+ * Previous/next post navigation strip, typically rendered at the bottom
84
+ * of a post page.
85
+ */
86
+ declare const PostNavigation: typeof PostNavigation$1;
87
+ /**
88
+ * Renders a list of tags for a post or for the whole blog.
89
+ */
90
+ declare const TagsList: typeof TagsList$1;
21
91
 
22
- export { EditPostPage, NewPostPage, PostListPage, PostPage };
92
+ export { EditPostPage, EmptyList, NewPostPage, PostCard, PostCardSkeleton, PostListPage, PostNavigation, PostPage, PostsList, RecentPostsCarousel, TagsList };
@@ -1,4 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { S as SerializedPost } from '../../../../shared/stack.Dsatjh0B.js';
2
3
 
3
4
  declare function HomePageComponent({ published, }: {
4
5
  published?: boolean;
@@ -14,9 +15,78 @@ declare function EditPostPageComponent({ slug }: {
14
15
  slug: string;
15
16
  }): react_jsx_runtime.JSX.Element;
16
17
 
18
+ declare function PostCard$1({ post }: {
19
+ post: SerializedPost;
20
+ }): react_jsx_runtime.JSX.Element;
21
+
22
+ interface PostsListProps {
23
+ posts: SerializedPost[];
24
+ onLoadMore?: () => void;
25
+ hasMore?: boolean;
26
+ isLoadingMore?: boolean;
27
+ }
28
+ declare function PostsList$1({ posts, onLoadMore, hasMore, isLoadingMore, }: PostsListProps): react_jsx_runtime.JSX.Element;
29
+
30
+ declare function EmptyList$1({ message }: {
31
+ message: string;
32
+ }): react_jsx_runtime.JSX.Element;
33
+
34
+ interface RecentPostsCarouselProps {
35
+ posts: SerializedPost[];
36
+ }
37
+ declare function RecentPostsCarousel$1({ posts }: RecentPostsCarouselProps): react_jsx_runtime.JSX.Element;
38
+
39
+ interface PostNavigationProps {
40
+ previousPost: SerializedPost | null;
41
+ nextPost: SerializedPost | null;
42
+ }
43
+ declare function PostNavigation$1({ previousPost, nextPost, }: PostNavigationProps): react_jsx_runtime.JSX.Element;
44
+
45
+ declare function TagsList$1(): react_jsx_runtime.JSX.Element | null;
46
+
47
+ declare function PostCardSkeleton$1(): react_jsx_runtime.JSX.Element;
48
+
17
49
  declare const PostListPage: typeof HomePageComponent;
18
50
  declare const NewPostPage: typeof NewPostPageComponent;
19
51
  declare const PostPage: typeof PostPageComponent;
20
52
  declare const EditPostPage: typeof EditPostPageComponent;
53
+ /**
54
+ * Card component that renders a single blog post summary
55
+ * (cover image, title, date, tags). Used by the built-in posts list and
56
+ * available for composing custom blog landing pages.
57
+ *
58
+ * Requires a `StackProvider` with the blog plugin registered so that
59
+ * `Link` and `Image` overrides are resolved correctly.
60
+ */
61
+ declare const PostCard: typeof PostCard$1;
62
+ /**
63
+ * Skeleton placeholder that mirrors the layout of {@link PostCard}.
64
+ * Use inside a `<Suspense>` fallback or while data is loading.
65
+ */
66
+ declare const PostCardSkeleton: typeof PostCardSkeleton$1;
67
+ /**
68
+ * Grid of {@link PostCard}s with optional load-more pagination and a
69
+ * built-in search input. Pass an array of `SerializedPost`s.
70
+ */
71
+ declare const PostsList: typeof PostsList$1;
72
+ /**
73
+ * Empty-state placeholder used by the built-in blog list pages.
74
+ * Renders a centered icon and a customisable message.
75
+ */
76
+ declare const EmptyList: typeof EmptyList$1;
77
+ /**
78
+ * Horizontal carousel of recent posts. Drop-in component for "you might
79
+ * also like" sections on a blog post page.
80
+ */
81
+ declare const RecentPostsCarousel: typeof RecentPostsCarousel$1;
82
+ /**
83
+ * Previous/next post navigation strip, typically rendered at the bottom
84
+ * of a post page.
85
+ */
86
+ declare const PostNavigation: typeof PostNavigation$1;
87
+ /**
88
+ * Renders a list of tags for a post or for the whole blog.
89
+ */
90
+ declare const TagsList: typeof TagsList$1;
21
91
 
22
- export { EditPostPage, NewPostPage, PostListPage, PostPage };
92
+ export { EditPostPage, EmptyList, NewPostPage, PostCard, PostCardSkeleton, PostListPage, PostNavigation, PostPage, PostsList, RecentPostsCarousel, TagsList };
@@ -3,10 +3,24 @@ import { HomePageComponent } from '../../../../packages/stack/src/plugins/blog/c
3
3
  import { NewPostPageComponent } from '../../../../packages/stack/src/plugins/blog/client/components/pages/new-post-page.mjs';
4
4
  import { PostPageComponent } from '../../../../packages/stack/src/plugins/blog/client/components/pages/post-page.mjs';
5
5
  import { EditPostPageComponent } from '../../../../packages/stack/src/plugins/blog/client/components/pages/edit-post-page.mjs';
6
+ import { PostCard as PostCard$1 } from '../../../../packages/stack/src/plugins/blog/client/components/shared/post-card.mjs';
7
+ import { PostsList as PostsList$1 } from '../../../../packages/stack/src/plugins/blog/client/components/shared/posts-list.mjs';
8
+ import { EmptyList as EmptyList$1 } from '../../../../packages/stack/src/plugins/blog/client/components/shared/empty-list.mjs';
9
+ import { RecentPostsCarousel as RecentPostsCarousel$1 } from '../../../../packages/stack/src/plugins/blog/client/components/shared/recent-posts-carousel.mjs';
10
+ import { PostNavigation as PostNavigation$1 } from '../../../../packages/stack/src/plugins/blog/client/components/shared/post-navigation.mjs';
11
+ import { TagsList as TagsList$1 } from '../../../../packages/stack/src/plugins/blog/client/components/shared/tags-list.mjs';
12
+ import { PostCardSkeleton as PostCardSkeleton$1 } from '../../../../packages/stack/src/plugins/blog/client/components/loading/post-card-skeleton.mjs';
6
13
 
7
14
  const PostListPage = HomePageComponent;
8
15
  const NewPostPage = NewPostPageComponent;
9
16
  const PostPage = PostPageComponent;
10
17
  const EditPostPage = EditPostPageComponent;
18
+ const PostCard = PostCard$1;
19
+ const PostCardSkeleton = PostCardSkeleton$1;
20
+ const PostsList = PostsList$1;
21
+ const EmptyList = EmptyList$1;
22
+ const RecentPostsCarousel = RecentPostsCarousel$1;
23
+ const PostNavigation = PostNavigation$1;
24
+ const TagsList = TagsList$1;
11
25
 
12
- export { EditPostPage, NewPostPage, PostListPage, PostPage };
26
+ export { EditPostPage, EmptyList, NewPostPage, PostCard, PostCardSkeleton, PostListPage, PostNavigation, PostPage, PostsList, RecentPostsCarousel, TagsList };
@@ -1,7 +1,8 @@
1
- export { P as PostCreateInput, e as PostUpdateInput, o as UseNextPreviousPostsOptions, p as UseNextPreviousPostsResult, d as UsePostResult, b as UsePostSearchOptions, c as UsePostSearchResult, U as UsePostsOptions, a as UsePostsResult, r as UseRecentPostsOptions, s as UseRecentPostsResult, k as useCreatePost, m as useDeletePost, q as useNextPreviousPosts, g as usePost, n as usePostSearch, u as usePosts, t as useRecentPosts, h as useSuspensePost, f as useSuspensePosts, j as useSuspenseTags, i as useTags, l as useUpdatePost } from '../../../../shared/stack.DGsFF5qb.cjs';
1
+ export { P as PostCreateInput, e as PostUpdateInput, o as UseNextPreviousPostsOptions, p as UseNextPreviousPostsResult, d as UsePostResult, b as UsePostSearchOptions, c as UsePostSearchResult, U as UsePostsOptions, a as UsePostsResult, r as UseRecentPostsOptions, s as UseRecentPostsResult, k as useCreatePost, m as useDeletePost, q as useNextPreviousPosts, g as usePost, n as usePostSearch, u as usePosts, t as useRecentPosts, h as useSuspensePost, f as useSuspensePosts, j as useSuspenseTags, i as useTags, l as useUpdatePost } from '../../../../shared/stack.DNLuzDb3.cjs';
2
2
  import '@tanstack/react-query';
3
- import '../../../../shared/stack.Sod_PZhB.cjs';
3
+ import '../../../../shared/stack.Dsatjh0B.cjs';
4
4
  import 'zod';
5
+ import '../../../../shared/stack.CuhcFsAx.cjs';
5
6
 
6
7
  declare function useDebounce<T>(value: T, delay?: number): T;
7
8
  declare function useThrottle<T>(value: T, wait?: number): T;
@@ -1,7 +1,8 @@
1
- export { P as PostCreateInput, e as PostUpdateInput, o as UseNextPreviousPostsOptions, p as UseNextPreviousPostsResult, d as UsePostResult, b as UsePostSearchOptions, c as UsePostSearchResult, U as UsePostsOptions, a as UsePostsResult, r as UseRecentPostsOptions, s as UseRecentPostsResult, k as useCreatePost, m as useDeletePost, q as useNextPreviousPosts, g as usePost, n as usePostSearch, u as usePosts, t as useRecentPosts, h as useSuspensePost, f as useSuspensePosts, j as useSuspenseTags, i as useTags, l as useUpdatePost } from '../../../../shared/stack.NtflNnnH.mjs';
1
+ export { P as PostCreateInput, e as PostUpdateInput, o as UseNextPreviousPostsOptions, p as UseNextPreviousPostsResult, d as UsePostResult, b as UsePostSearchOptions, c as UsePostSearchResult, U as UsePostsOptions, a as UsePostsResult, r as UseRecentPostsOptions, s as UseRecentPostsResult, k as useCreatePost, m as useDeletePost, q as useNextPreviousPosts, g as usePost, n as usePostSearch, u as usePosts, t as useRecentPosts, h as useSuspensePost, f as useSuspensePosts, j as useSuspenseTags, i as useTags, l as useUpdatePost } from '../../../../shared/stack.Dfc44JiE.mjs';
2
2
  import '@tanstack/react-query';
3
- import '../../../../shared/stack.Sod_PZhB.mjs';
3
+ import '../../../../shared/stack.Dsatjh0B.mjs';
4
4
  import 'zod';
5
+ import '../../../../shared/stack.CuhcFsAx.mjs';
5
6
 
6
7
  declare function useDebounce<T>(value: T, delay?: number): T;
7
8
  declare function useThrottle<T>(value: T, wait?: number): T;