@btst/stack 2.3.0 → 2.5.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/packages/stack/src/client/components/compose.cjs +1 -2
- package/dist/packages/stack/src/client/components/compose.mjs +1 -2
- package/dist/packages/stack/src/plugins/ai-chat/api/page-tools.cjs +71 -0
- package/dist/packages/stack/src/plugins/ai-chat/api/page-tools.mjs +68 -0
- package/dist/packages/stack/src/plugins/ai-chat/api/plugin.cjs +87 -54
- package/dist/packages/stack/src/plugins/ai-chat/api/plugin.mjs +87 -54
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-input.cjs +2 -2
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-input.mjs +2 -2
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-interface.cjs +89 -22
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-interface.mjs +90 -23
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-layout.cjs +110 -33
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-layout.mjs +112 -35
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-sidebar.cjs +1 -1
- package/dist/packages/stack/src/plugins/ai-chat/client/components/chat-sidebar.mjs +1 -1
- package/dist/packages/stack/src/plugins/ai-chat/client/plugin.cjs +14 -21
- package/dist/packages/stack/src/plugins/ai-chat/client/plugin.mjs +15 -22
- package/dist/packages/stack/src/plugins/ai-chat/schemas.cjs +17 -1
- package/dist/packages/stack/src/plugins/ai-chat/schemas.mjs +17 -1
- package/dist/packages/stack/src/plugins/blog/api/plugin.cjs +28 -45
- package/dist/packages/stack/src/plugins/blog/api/plugin.mjs +22 -39
- package/dist/packages/stack/src/plugins/blog/client/components/forms/post-forms.cjs +15 -2
- package/dist/packages/stack/src/plugins/blog/client/components/forms/post-forms.mjs +16 -3
- package/dist/packages/stack/src/plugins/blog/client/components/pages/edit-post-page.internal.cjs +24 -1
- package/dist/packages/stack/src/plugins/blog/client/components/pages/edit-post-page.internal.mjs +24 -1
- package/dist/packages/stack/src/plugins/blog/client/components/pages/fill-blog-form-handler.cjs +26 -0
- package/dist/packages/stack/src/plugins/blog/client/components/pages/fill-blog-form-handler.mjs +24 -0
- package/dist/packages/stack/src/plugins/blog/client/components/pages/new-post-page.internal.cjs +30 -1
- package/dist/packages/stack/src/plugins/blog/client/components/pages/new-post-page.internal.mjs +30 -1
- package/dist/packages/stack/src/plugins/blog/client/components/pages/post-page.internal.cjs +18 -0
- package/dist/packages/stack/src/plugins/blog/client/components/pages/post-page.internal.mjs +18 -0
- package/dist/packages/stack/src/plugins/blog/client/plugin.cjs +23 -27
- package/dist/packages/stack/src/plugins/blog/client/plugin.mjs +24 -28
- package/dist/packages/stack/src/plugins/cms/api/mutations.cjs +48 -0
- package/dist/packages/stack/src/plugins/cms/api/mutations.mjs +46 -0
- package/dist/packages/stack/src/plugins/cms/api/plugin.cjs +21 -18
- package/dist/packages/stack/src/plugins/cms/api/plugin.mjs +21 -18
- package/dist/packages/stack/src/plugins/cms/client/plugin.cjs +11 -15
- package/dist/packages/stack/src/plugins/cms/client/plugin.mjs +12 -16
- package/dist/packages/stack/src/plugins/form-builder/api/plugin.cjs +58 -62
- package/dist/packages/stack/src/plugins/form-builder/api/plugin.mjs +58 -62
- package/dist/packages/stack/src/plugins/form-builder/client/plugin.cjs +12 -12
- package/dist/packages/stack/src/plugins/form-builder/client/plugin.mjs +13 -13
- package/dist/packages/stack/src/plugins/kanban/api/mutations.cjs +91 -0
- package/dist/packages/stack/src/plugins/kanban/api/mutations.mjs +87 -0
- package/dist/packages/stack/src/plugins/kanban/api/plugin.cjs +92 -118
- package/dist/packages/stack/src/plugins/kanban/api/plugin.mjs +89 -115
- package/dist/packages/stack/src/plugins/kanban/client/hooks/kanban-hooks.cjs +7 -3
- package/dist/packages/stack/src/plugins/kanban/client/hooks/kanban-hooks.mjs +7 -3
- package/dist/packages/stack/src/plugins/kanban/client/plugin.cjs +22 -29
- package/dist/packages/stack/src/plugins/kanban/client/plugin.mjs +23 -30
- package/dist/packages/stack/src/plugins/ui-builder/client/components/pages/page-builder-page.internal.cjs +89 -0
- package/dist/packages/stack/src/plugins/ui-builder/client/components/pages/page-builder-page.internal.mjs +89 -0
- package/dist/packages/stack/src/plugins/ui-builder/client/plugin.cjs +8 -8
- package/dist/packages/stack/src/plugins/ui-builder/client/plugin.mjs +9 -9
- package/dist/packages/stack/src/plugins/utils.cjs +42 -0
- package/dist/packages/stack/src/plugins/utils.mjs +41 -1
- package/dist/plugins/ai-chat/api/index.d.cts +1 -1
- package/dist/plugins/ai-chat/api/index.d.mts +1 -1
- package/dist/plugins/ai-chat/api/index.d.ts +1 -1
- package/dist/plugins/ai-chat/client/components/index.d.cts +1 -1
- package/dist/plugins/ai-chat/client/components/index.d.mts +1 -1
- package/dist/plugins/ai-chat/client/components/index.d.ts +1 -1
- package/dist/plugins/ai-chat/client/context/page-ai-context.cjs +92 -0
- package/dist/plugins/ai-chat/client/context/page-ai-context.d.cts +84 -0
- package/dist/plugins/ai-chat/client/context/page-ai-context.d.mts +84 -0
- package/dist/plugins/ai-chat/client/context/page-ai-context.d.ts +84 -0
- package/dist/plugins/ai-chat/client/context/page-ai-context.mjs +88 -0
- package/dist/plugins/ai-chat/client/hooks/index.d.cts +1 -1
- package/dist/plugins/ai-chat/client/hooks/index.d.mts +1 -1
- package/dist/plugins/ai-chat/client/hooks/index.d.ts +1 -1
- package/dist/plugins/ai-chat/client/index.d.cts +10 -10
- package/dist/plugins/ai-chat/client/index.d.mts +10 -10
- package/dist/plugins/ai-chat/client/index.d.ts +10 -10
- package/dist/plugins/ai-chat/query-keys.d.cts +1 -1
- package/dist/plugins/ai-chat/query-keys.d.mts +1 -1
- package/dist/plugins/ai-chat/query-keys.d.ts +1 -1
- package/dist/plugins/blog/api/index.d.cts +2 -2
- package/dist/plugins/blog/api/index.d.mts +2 -2
- package/dist/plugins/blog/api/index.d.ts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
- package/dist/plugins/blog/client/index.d.cts +13 -13
- package/dist/plugins/blog/client/index.d.mts +13 -13
- package/dist/plugins/blog/client/index.d.ts +13 -13
- package/dist/plugins/blog/query-keys.d.cts +2 -2
- package/dist/plugins/blog/query-keys.d.mts +2 -2
- package/dist/plugins/blog/query-keys.d.ts +2 -2
- package/dist/plugins/client/index.cjs +1 -0
- package/dist/plugins/client/index.d.cts +8 -1
- package/dist/plugins/client/index.d.mts +8 -1
- package/dist/plugins/client/index.d.ts +8 -1
- package/dist/plugins/client/index.mjs +1 -1
- package/dist/plugins/cms/api/index.cjs +2 -0
- package/dist/plugins/cms/api/index.d.cts +2 -2
- package/dist/plugins/cms/api/index.d.mts +2 -2
- package/dist/plugins/cms/api/index.d.ts +2 -2
- package/dist/plugins/cms/api/index.mjs +1 -0
- package/dist/plugins/cms/client/hooks/index.d.cts +1 -1
- package/dist/plugins/cms/client/hooks/index.d.mts +1 -1
- package/dist/plugins/cms/client/hooks/index.d.ts +1 -1
- package/dist/plugins/cms/client/index.d.cts +6 -6
- package/dist/plugins/cms/client/index.d.mts +6 -6
- package/dist/plugins/cms/client/index.d.ts +6 -6
- package/dist/plugins/cms/query-keys.d.cts +2 -2
- package/dist/plugins/cms/query-keys.d.mts +2 -2
- package/dist/plugins/cms/query-keys.d.ts +2 -2
- package/dist/plugins/form-builder/api/index.d.cts +2 -2
- package/dist/plugins/form-builder/api/index.d.mts +2 -2
- package/dist/plugins/form-builder/api/index.d.ts +2 -2
- package/dist/plugins/form-builder/client/components/index.d.cts +1 -1
- package/dist/plugins/form-builder/client/components/index.d.mts +1 -1
- package/dist/plugins/form-builder/client/components/index.d.ts +1 -1
- package/dist/plugins/form-builder/client/hooks/index.d.cts +1 -1
- package/dist/plugins/form-builder/client/hooks/index.d.mts +1 -1
- package/dist/plugins/form-builder/client/hooks/index.d.ts +1 -1
- package/dist/plugins/form-builder/client/index.d.cts +6 -6
- package/dist/plugins/form-builder/client/index.d.mts +6 -6
- package/dist/plugins/form-builder/client/index.d.ts +6 -6
- package/dist/plugins/form-builder/query-keys.d.cts +2 -2
- package/dist/plugins/form-builder/query-keys.d.mts +2 -2
- package/dist/plugins/form-builder/query-keys.d.ts +2 -2
- package/dist/plugins/kanban/api/index.cjs +4 -0
- package/dist/plugins/kanban/api/index.d.cts +1 -1
- package/dist/plugins/kanban/api/index.d.mts +1 -1
- package/dist/plugins/kanban/api/index.d.ts +1 -1
- package/dist/plugins/kanban/api/index.mjs +1 -0
- package/dist/plugins/kanban/client/index.d.cts +12 -12
- package/dist/plugins/kanban/client/index.d.mts +12 -12
- package/dist/plugins/kanban/client/index.d.ts +12 -12
- package/dist/plugins/kanban/query-keys.d.cts +1 -1
- package/dist/plugins/kanban/query-keys.d.mts +1 -1
- package/dist/plugins/kanban/query-keys.d.ts +1 -1
- package/dist/plugins/ui-builder/client/hooks/index.d.cts +1 -1
- package/dist/plugins/ui-builder/client/hooks/index.d.mts +1 -1
- package/dist/plugins/ui-builder/client/hooks/index.d.ts +1 -1
- package/dist/plugins/ui-builder/client/index.d.cts +3 -3
- package/dist/plugins/ui-builder/client/index.d.mts +3 -3
- package/dist/plugins/ui-builder/client/index.d.ts +3 -3
- package/dist/plugins/ui-builder/index.d.cts +2 -2
- package/dist/plugins/ui-builder/index.d.mts +2 -2
- package/dist/plugins/ui-builder/index.d.ts +2 -2
- package/dist/shared/{stack.C-WUPMT6.d.cts → stack.B2xZTSiO.d.cts} +4 -4
- package/dist/shared/{stack.B1EeBt1b.d.ts → stack.B58oHdqm.d.mts} +33 -3
- package/dist/shared/{stack.CVDTkMoO.d.mts → stack.B8QD11QU.d.cts} +7 -7
- package/dist/shared/{stack.CVDTkMoO.d.cts → stack.B8QD11QU.d.mts} +7 -7
- package/dist/shared/{stack.CVDTkMoO.d.ts → stack.B8QD11QU.d.ts} +7 -7
- package/dist/shared/{stack.CIP6QS9l.d.ts → stack.BDVEpue1.d.ts} +1 -1
- package/dist/shared/{stack.C5dtIncc.d.mts → stack.BTvbxZvw.d.cts} +1 -1
- package/dist/shared/{stack.DaOcgmrM.d.ts → stack.BV9hnvu4.d.cts} +31 -7
- package/dist/shared/{stack.DaOcgmrM.d.cts → stack.BV9hnvu4.d.mts} +31 -7
- package/dist/shared/{stack.DaOcgmrM.d.mts → stack.BV9hnvu4.d.ts} +31 -7
- package/dist/shared/{stack.DdI5W6MB.d.mts → stack.BozPgbrZ.d.cts} +19 -19
- package/dist/shared/{stack.DdI5W6MB.d.ts → stack.BozPgbrZ.d.mts} +19 -19
- package/dist/shared/{stack.DdI5W6MB.d.cts → stack.BozPgbrZ.d.ts} +19 -19
- package/dist/shared/{stack.CP68pFEH.d.mts → stack.C9Mg2Q46.d.cts} +33 -3
- package/dist/shared/{stack.BeSm90va.d.ts → stack.CTDVxbrA.d.ts} +72 -14
- package/dist/shared/{stack.C-Ptrz8s.d.ts → stack.Cj_zKww4.d.ts} +4 -4
- package/dist/shared/{stack.TIBF2AOx.d.ts → stack.CxaFNQCV.d.mts} +89 -34
- package/dist/shared/{stack.CMh_EdxW.d.cts → stack.D-b5zbPm.d.cts} +72 -14
- package/dist/shared/{stack.Dw0Ly2TM.d.cts → stack.DTtmJPQO.d.mts} +1 -1
- package/dist/shared/{stack.BKfolAyK.d.ts → stack.DXnclTG7.d.ts} +11 -11
- package/dist/shared/{stack.snB1EDP7.d.cts → stack.DaZM10cp.d.cts} +11 -11
- package/dist/shared/{stack.Dg09R0oB.d.mts → stack.FVWf2JhZ.d.mts} +72 -14
- package/dist/shared/{stack.BIXEI6v_.d.mts → stack.cfCkioTe.d.mts} +11 -11
- package/dist/shared/{stack.6fUOjLs9.d.mts → stack.dH7u-TJH.d.mts} +4 -4
- package/dist/shared/{stack.BpolpQpf.d.cts → stack.j75TpKh2.d.ts} +89 -34
- package/dist/shared/{stack.rTy7-wQU.d.mts → stack.n1_i1p2B.d.cts} +89 -34
- package/dist/shared/{stack.IdtKDRka.d.cts → stack.sO33ZDhK.d.ts} +33 -3
- package/package.json +14 -1
- package/src/client/components/compose.tsx +7 -4
- package/src/plugins/ai-chat/api/page-tools.ts +111 -0
- package/src/plugins/ai-chat/api/plugin.ts +228 -72
- package/src/plugins/ai-chat/client/components/chat-input.tsx +2 -2
- package/src/plugins/ai-chat/client/components/chat-interface.tsx +154 -58
- package/src/plugins/ai-chat/client/components/chat-layout.tsx +166 -32
- package/src/plugins/ai-chat/client/components/chat-sidebar.tsx +1 -1
- package/src/plugins/ai-chat/client/context/page-ai-context.tsx +240 -0
- package/src/plugins/ai-chat/client/plugin.tsx +23 -31
- package/src/plugins/ai-chat/schemas.ts +16 -0
- package/src/plugins/blog/api/plugin.ts +31 -47
- package/src/plugins/blog/client/components/forms/post-forms.tsx +29 -2
- package/src/plugins/blog/client/components/pages/edit-post-page.internal.tsx +28 -0
- package/src/plugins/blog/client/components/pages/fill-blog-form-handler.ts +38 -0
- package/src/plugins/blog/client/components/pages/new-post-page.internal.tsx +33 -1
- package/src/plugins/blog/client/components/pages/post-page.internal.tsx +20 -0
- package/src/plugins/blog/client/plugin.tsx +36 -39
- package/src/plugins/client/index.ts +5 -1
- package/src/plugins/cms/api/index.ts +4 -0
- package/src/plugins/cms/api/mutations.ts +84 -0
- package/src/plugins/cms/api/plugin.ts +23 -17
- package/src/plugins/cms/client/plugin.tsx +18 -21
- package/src/plugins/cms/types.ts +7 -7
- package/src/plugins/form-builder/api/plugin.ts +64 -64
- package/src/plugins/form-builder/client/plugin.tsx +19 -18
- package/src/plugins/form-builder/types.ts +19 -24
- package/src/plugins/kanban/api/index.ts +6 -0
- package/src/plugins/kanban/api/mutations.ts +169 -0
- package/src/plugins/kanban/api/plugin.ts +123 -136
- package/src/plugins/kanban/client/hooks/kanban-hooks.tsx +4 -0
- package/src/plugins/kanban/client/plugin.tsx +35 -41
- package/src/plugins/ui-builder/client/components/pages/page-builder-page.internal.tsx +132 -0
- package/src/plugins/ui-builder/client/plugin.tsx +11 -10
- package/src/plugins/ui-builder/types.ts +4 -4
- package/src/plugins/utils.ts +92 -1
- package/dist/shared/{stack.CBON0dWL.d.mts → stack.BQmuNl5p.d.cts} +2 -2
- package/dist/shared/{stack.CBON0dWL.d.ts → stack.BQmuNl5p.d.mts} +2 -2
- package/dist/shared/{stack.CBON0dWL.d.cts → stack.BQmuNl5p.d.ts} +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@tanstack/react-query';
|
|
2
2
|
import '@btst/stack/plugins/client';
|
|
3
3
|
import '../../shared/stack.Be1QIHEn.js';
|
|
4
|
-
export { f as ConversationWithMessages, c as createAiChatQueryKeys } from '../../shared/stack.
|
|
4
|
+
export { f as ConversationWithMessages, c as createAiChatQueryKeys } from '../../shared/stack.CTDVxbrA.js';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
6
6
|
import 'better-call';
|
|
7
7
|
import 'zod/v4/core';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { B as BLOG_QUERY_KEYS, h as BlogApiContext, k as BlogApiRouter, i as BlogBackendHooks, e as BlogRouteKey, N as NextPreviousPostsQuerySchema, P as PostListParams, f as PostListQuerySchema, c as PostListResult, j as blogBackendPlugin, d as createBlogQueryKeys, g as getAllPosts, b as getAllTags, a as getPostBySlug } from '../../../shared/stack.
|
|
2
|
-
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.
|
|
1
|
+
export { B as BLOG_QUERY_KEYS, h as BlogApiContext, k as BlogApiRouter, i as BlogBackendHooks, e as BlogRouteKey, N as NextPreviousPostsQuerySchema, P as PostListParams, f as PostListQuerySchema, c as PostListResult, j as blogBackendPlugin, d as createBlogQueryKeys, g as getAllPosts, b as getAllTags, a as getPostBySlug } from '../../../shared/stack.DaZM10cp.cjs';
|
|
2
|
+
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.BQmuNl5p.cjs';
|
|
3
3
|
import '@tanstack/react-query';
|
|
4
4
|
import '@btst/stack/plugins/client';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { B as BLOG_QUERY_KEYS, h as BlogApiContext, k as BlogApiRouter, i as BlogBackendHooks, e as BlogRouteKey, N as NextPreviousPostsQuerySchema, P as PostListParams, f as PostListQuerySchema, c as PostListResult, j as blogBackendPlugin, d as createBlogQueryKeys, g as getAllPosts, b as getAllTags, a as getPostBySlug } from '../../../shared/stack.
|
|
2
|
-
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.
|
|
1
|
+
export { B as BLOG_QUERY_KEYS, h as BlogApiContext, k as BlogApiRouter, i as BlogBackendHooks, e as BlogRouteKey, N as NextPreviousPostsQuerySchema, P as PostListParams, f as PostListQuerySchema, c as PostListResult, j as blogBackendPlugin, d as createBlogQueryKeys, g as getAllPosts, b as getAllTags, a as getPostBySlug } from '../../../shared/stack.cfCkioTe.mjs';
|
|
2
|
+
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.BQmuNl5p.mjs';
|
|
3
3
|
import '@tanstack/react-query';
|
|
4
4
|
import '@btst/stack/plugins/client';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { B as BLOG_QUERY_KEYS, h as BlogApiContext, k as BlogApiRouter, i as BlogBackendHooks, e as BlogRouteKey, N as NextPreviousPostsQuerySchema, P as PostListParams, f as PostListQuerySchema, c as PostListResult, j as blogBackendPlugin, d as createBlogQueryKeys, g as getAllPosts, b as getAllTags, a as getPostBySlug } from '../../../shared/stack.
|
|
2
|
-
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.
|
|
1
|
+
export { B as BLOG_QUERY_KEYS, h as BlogApiContext, k as BlogApiRouter, i as BlogBackendHooks, e as BlogRouteKey, N as NextPreviousPostsQuerySchema, P as PostListParams, f as PostListQuerySchema, c as PostListResult, j as blogBackendPlugin, d as createBlogQueryKeys, g as getAllPosts, b as getAllTags, a as getPostBySlug } from '../../../shared/stack.DXnclTG7.js';
|
|
2
|
+
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.BQmuNl5p.js';
|
|
3
3
|
import '@tanstack/react-query';
|
|
4
4
|
import '@btst/stack/plugins/client';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from '../../../../shared/stack.
|
|
2
|
+
import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from '../../../../shared/stack.BQmuNl5p.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -140,9 +140,9 @@ declare function useCreatePost(): _tanstack_react_query.UseMutationResult<Serial
|
|
|
140
140
|
excerpt: string;
|
|
141
141
|
published: boolean;
|
|
142
142
|
slug?: string | undefined;
|
|
143
|
-
publishedAt?: Date | undefined;
|
|
144
143
|
createdAt?: Date | undefined;
|
|
145
144
|
updatedAt?: Date | undefined;
|
|
145
|
+
publishedAt?: Date | undefined;
|
|
146
146
|
image?: string | undefined;
|
|
147
147
|
}, unknown>;
|
|
148
148
|
/** Update an existing post by id */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from '../../../../shared/stack.
|
|
2
|
+
import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from '../../../../shared/stack.BQmuNl5p.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -140,9 +140,9 @@ declare function useCreatePost(): _tanstack_react_query.UseMutationResult<Serial
|
|
|
140
140
|
excerpt: string;
|
|
141
141
|
published: boolean;
|
|
142
142
|
slug?: string | undefined;
|
|
143
|
-
publishedAt?: Date | undefined;
|
|
144
143
|
createdAt?: Date | undefined;
|
|
145
144
|
updatedAt?: Date | undefined;
|
|
145
|
+
publishedAt?: Date | undefined;
|
|
146
146
|
image?: string | undefined;
|
|
147
147
|
}, unknown>;
|
|
148
148
|
/** Update an existing post by id */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from '../../../../shared/stack.
|
|
2
|
+
import { S as SerializedPost, c as createPostSchema, u as updatePostSchema, a as SerializedTag } from '../../../../shared/stack.BQmuNl5p.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -140,9 +140,9 @@ declare function useCreatePost(): _tanstack_react_query.UseMutationResult<Serial
|
|
|
140
140
|
excerpt: string;
|
|
141
141
|
published: boolean;
|
|
142
142
|
slug?: string | undefined;
|
|
143
|
-
publishedAt?: Date | undefined;
|
|
144
143
|
createdAt?: Date | undefined;
|
|
145
144
|
updatedAt?: Date | undefined;
|
|
145
|
+
publishedAt?: Date | undefined;
|
|
146
146
|
image?: string | undefined;
|
|
147
147
|
}, unknown>;
|
|
148
148
|
/** Update an existing post by id */
|
|
@@ -3,7 +3,7 @@ import * as react from 'react';
|
|
|
3
3
|
import { ComponentType } from 'react';
|
|
4
4
|
import * as _btst_yar from '@btst/yar';
|
|
5
5
|
import { QueryClient } from '@tanstack/react-query';
|
|
6
|
-
import { P as Post, S as SerializedPost } from '../../../shared/stack.
|
|
6
|
+
import { P as Post, S as SerializedPost } from '../../../shared/stack.BQmuNl5p.cjs';
|
|
7
7
|
export { UsePostsOptions, UsePostsResult } from './hooks/index.cjs';
|
|
8
8
|
import 'zod';
|
|
9
9
|
|
|
@@ -78,45 +78,45 @@ interface BlogClientConfig {
|
|
|
78
78
|
*/
|
|
79
79
|
interface BlogClientHooks {
|
|
80
80
|
/**
|
|
81
|
-
* Called before loading posts list.
|
|
81
|
+
* Called before loading posts list. Throw an error to cancel loading.
|
|
82
82
|
* @param filter - Filter parameters including published status
|
|
83
83
|
* @param context - Loader context with path, params, etc.
|
|
84
84
|
*/
|
|
85
85
|
beforeLoadPosts?: (filter: {
|
|
86
86
|
published: boolean;
|
|
87
|
-
}, context: LoaderContext) => Promise<
|
|
87
|
+
}, context: LoaderContext) => Promise<void> | void;
|
|
88
88
|
/**
|
|
89
|
-
* Called after posts are loaded.
|
|
89
|
+
* Called after posts are loaded. Throw an error to cancel further processing.
|
|
90
90
|
* @param posts - Array of loaded posts or null
|
|
91
91
|
* @param filter - Filter parameters used
|
|
92
92
|
* @param context - Loader context
|
|
93
93
|
*/
|
|
94
94
|
afterLoadPosts?: (posts: Post[] | null, filter: {
|
|
95
95
|
published: boolean;
|
|
96
|
-
}, context: LoaderContext) => Promise<
|
|
96
|
+
}, context: LoaderContext) => Promise<void> | void;
|
|
97
97
|
/**
|
|
98
|
-
* Called before loading a single post.
|
|
98
|
+
* Called before loading a single post. Throw an error to cancel loading.
|
|
99
99
|
* @param slug - Post slug being loaded
|
|
100
100
|
* @param context - Loader context
|
|
101
101
|
*/
|
|
102
|
-
beforeLoadPost?: (slug: string, context: LoaderContext) => Promise<
|
|
102
|
+
beforeLoadPost?: (slug: string, context: LoaderContext) => Promise<void> | void;
|
|
103
103
|
/**
|
|
104
|
-
* Called after a post is loaded.
|
|
104
|
+
* Called after a post is loaded. Throw an error to cancel further processing.
|
|
105
105
|
* @param post - Loaded post or null if not found
|
|
106
106
|
* @param slug - Post slug that was requested
|
|
107
107
|
* @param context - Loader context
|
|
108
108
|
*/
|
|
109
|
-
afterLoadPost?: (post: Post | null, slug: string, context: LoaderContext) => Promise<
|
|
109
|
+
afterLoadPost?: (post: Post | null, slug: string, context: LoaderContext) => Promise<void> | void;
|
|
110
110
|
/**
|
|
111
|
-
* Called before loading the new post page.
|
|
111
|
+
* Called before loading the new post page. Throw an error to cancel.
|
|
112
112
|
* @param context - Loader context
|
|
113
113
|
*/
|
|
114
|
-
beforeLoadNewPost?: (context: LoaderContext) => Promise<
|
|
114
|
+
beforeLoadNewPost?: (context: LoaderContext) => Promise<void> | void;
|
|
115
115
|
/**
|
|
116
|
-
* Called after the new post page is loaded.
|
|
116
|
+
* Called after the new post page is loaded. Throw an error to cancel.
|
|
117
117
|
* @param context - Loader context
|
|
118
118
|
*/
|
|
119
|
-
afterLoadNewPost?: (context: LoaderContext) => Promise<
|
|
119
|
+
afterLoadNewPost?: (context: LoaderContext) => Promise<void> | void;
|
|
120
120
|
/**
|
|
121
121
|
* Called when a loading error occurs
|
|
122
122
|
* @param error - The error that occurred
|
|
@@ -3,7 +3,7 @@ import * as react from 'react';
|
|
|
3
3
|
import { ComponentType } from 'react';
|
|
4
4
|
import * as _btst_yar from '@btst/yar';
|
|
5
5
|
import { QueryClient } from '@tanstack/react-query';
|
|
6
|
-
import { P as Post, S as SerializedPost } from '../../../shared/stack.
|
|
6
|
+
import { P as Post, S as SerializedPost } from '../../../shared/stack.BQmuNl5p.mjs';
|
|
7
7
|
export { UsePostsOptions, UsePostsResult } from './hooks/index.mjs';
|
|
8
8
|
import 'zod';
|
|
9
9
|
|
|
@@ -78,45 +78,45 @@ interface BlogClientConfig {
|
|
|
78
78
|
*/
|
|
79
79
|
interface BlogClientHooks {
|
|
80
80
|
/**
|
|
81
|
-
* Called before loading posts list.
|
|
81
|
+
* Called before loading posts list. Throw an error to cancel loading.
|
|
82
82
|
* @param filter - Filter parameters including published status
|
|
83
83
|
* @param context - Loader context with path, params, etc.
|
|
84
84
|
*/
|
|
85
85
|
beforeLoadPosts?: (filter: {
|
|
86
86
|
published: boolean;
|
|
87
|
-
}, context: LoaderContext) => Promise<
|
|
87
|
+
}, context: LoaderContext) => Promise<void> | void;
|
|
88
88
|
/**
|
|
89
|
-
* Called after posts are loaded.
|
|
89
|
+
* Called after posts are loaded. Throw an error to cancel further processing.
|
|
90
90
|
* @param posts - Array of loaded posts or null
|
|
91
91
|
* @param filter - Filter parameters used
|
|
92
92
|
* @param context - Loader context
|
|
93
93
|
*/
|
|
94
94
|
afterLoadPosts?: (posts: Post[] | null, filter: {
|
|
95
95
|
published: boolean;
|
|
96
|
-
}, context: LoaderContext) => Promise<
|
|
96
|
+
}, context: LoaderContext) => Promise<void> | void;
|
|
97
97
|
/**
|
|
98
|
-
* Called before loading a single post.
|
|
98
|
+
* Called before loading a single post. Throw an error to cancel loading.
|
|
99
99
|
* @param slug - Post slug being loaded
|
|
100
100
|
* @param context - Loader context
|
|
101
101
|
*/
|
|
102
|
-
beforeLoadPost?: (slug: string, context: LoaderContext) => Promise<
|
|
102
|
+
beforeLoadPost?: (slug: string, context: LoaderContext) => Promise<void> | void;
|
|
103
103
|
/**
|
|
104
|
-
* Called after a post is loaded.
|
|
104
|
+
* Called after a post is loaded. Throw an error to cancel further processing.
|
|
105
105
|
* @param post - Loaded post or null if not found
|
|
106
106
|
* @param slug - Post slug that was requested
|
|
107
107
|
* @param context - Loader context
|
|
108
108
|
*/
|
|
109
|
-
afterLoadPost?: (post: Post | null, slug: string, context: LoaderContext) => Promise<
|
|
109
|
+
afterLoadPost?: (post: Post | null, slug: string, context: LoaderContext) => Promise<void> | void;
|
|
110
110
|
/**
|
|
111
|
-
* Called before loading the new post page.
|
|
111
|
+
* Called before loading the new post page. Throw an error to cancel.
|
|
112
112
|
* @param context - Loader context
|
|
113
113
|
*/
|
|
114
|
-
beforeLoadNewPost?: (context: LoaderContext) => Promise<
|
|
114
|
+
beforeLoadNewPost?: (context: LoaderContext) => Promise<void> | void;
|
|
115
115
|
/**
|
|
116
|
-
* Called after the new post page is loaded.
|
|
116
|
+
* Called after the new post page is loaded. Throw an error to cancel.
|
|
117
117
|
* @param context - Loader context
|
|
118
118
|
*/
|
|
119
|
-
afterLoadNewPost?: (context: LoaderContext) => Promise<
|
|
119
|
+
afterLoadNewPost?: (context: LoaderContext) => Promise<void> | void;
|
|
120
120
|
/**
|
|
121
121
|
* Called when a loading error occurs
|
|
122
122
|
* @param error - The error that occurred
|
|
@@ -3,7 +3,7 @@ import * as react from 'react';
|
|
|
3
3
|
import { ComponentType } from 'react';
|
|
4
4
|
import * as _btst_yar from '@btst/yar';
|
|
5
5
|
import { QueryClient } from '@tanstack/react-query';
|
|
6
|
-
import { P as Post, S as SerializedPost } from '../../../shared/stack.
|
|
6
|
+
import { P as Post, S as SerializedPost } from '../../../shared/stack.BQmuNl5p.js';
|
|
7
7
|
export { UsePostsOptions, UsePostsResult } from './hooks/index.js';
|
|
8
8
|
import 'zod';
|
|
9
9
|
|
|
@@ -78,45 +78,45 @@ interface BlogClientConfig {
|
|
|
78
78
|
*/
|
|
79
79
|
interface BlogClientHooks {
|
|
80
80
|
/**
|
|
81
|
-
* Called before loading posts list.
|
|
81
|
+
* Called before loading posts list. Throw an error to cancel loading.
|
|
82
82
|
* @param filter - Filter parameters including published status
|
|
83
83
|
* @param context - Loader context with path, params, etc.
|
|
84
84
|
*/
|
|
85
85
|
beforeLoadPosts?: (filter: {
|
|
86
86
|
published: boolean;
|
|
87
|
-
}, context: LoaderContext) => Promise<
|
|
87
|
+
}, context: LoaderContext) => Promise<void> | void;
|
|
88
88
|
/**
|
|
89
|
-
* Called after posts are loaded.
|
|
89
|
+
* Called after posts are loaded. Throw an error to cancel further processing.
|
|
90
90
|
* @param posts - Array of loaded posts or null
|
|
91
91
|
* @param filter - Filter parameters used
|
|
92
92
|
* @param context - Loader context
|
|
93
93
|
*/
|
|
94
94
|
afterLoadPosts?: (posts: Post[] | null, filter: {
|
|
95
95
|
published: boolean;
|
|
96
|
-
}, context: LoaderContext) => Promise<
|
|
96
|
+
}, context: LoaderContext) => Promise<void> | void;
|
|
97
97
|
/**
|
|
98
|
-
* Called before loading a single post.
|
|
98
|
+
* Called before loading a single post. Throw an error to cancel loading.
|
|
99
99
|
* @param slug - Post slug being loaded
|
|
100
100
|
* @param context - Loader context
|
|
101
101
|
*/
|
|
102
|
-
beforeLoadPost?: (slug: string, context: LoaderContext) => Promise<
|
|
102
|
+
beforeLoadPost?: (slug: string, context: LoaderContext) => Promise<void> | void;
|
|
103
103
|
/**
|
|
104
|
-
* Called after a post is loaded.
|
|
104
|
+
* Called after a post is loaded. Throw an error to cancel further processing.
|
|
105
105
|
* @param post - Loaded post or null if not found
|
|
106
106
|
* @param slug - Post slug that was requested
|
|
107
107
|
* @param context - Loader context
|
|
108
108
|
*/
|
|
109
|
-
afterLoadPost?: (post: Post | null, slug: string, context: LoaderContext) => Promise<
|
|
109
|
+
afterLoadPost?: (post: Post | null, slug: string, context: LoaderContext) => Promise<void> | void;
|
|
110
110
|
/**
|
|
111
|
-
* Called before loading the new post page.
|
|
111
|
+
* Called before loading the new post page. Throw an error to cancel.
|
|
112
112
|
* @param context - Loader context
|
|
113
113
|
*/
|
|
114
|
-
beforeLoadNewPost?: (context: LoaderContext) => Promise<
|
|
114
|
+
beforeLoadNewPost?: (context: LoaderContext) => Promise<void> | void;
|
|
115
115
|
/**
|
|
116
|
-
* Called after the new post page is loaded.
|
|
116
|
+
* Called after the new post page is loaded. Throw an error to cancel.
|
|
117
117
|
* @param context - Loader context
|
|
118
118
|
*/
|
|
119
|
-
afterLoadNewPost?: (context: LoaderContext) => Promise<
|
|
119
|
+
afterLoadNewPost?: (context: LoaderContext) => Promise<void> | void;
|
|
120
120
|
/**
|
|
121
121
|
* Called when a loading error occurs
|
|
122
122
|
* @param error - The error that occurred
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@tanstack/react-query';
|
|
2
|
-
export { d as createBlogQueryKeys } from '../../shared/stack.
|
|
2
|
+
export { d as createBlogQueryKeys } from '../../shared/stack.DaZM10cp.cjs';
|
|
3
3
|
import '@btst/stack/plugins/client';
|
|
4
|
-
import '../../shared/stack.
|
|
4
|
+
import '../../shared/stack.BQmuNl5p.cjs';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
6
6
|
import 'better-call';
|
|
7
7
|
import '@btst/db';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@tanstack/react-query';
|
|
2
|
-
export { d as createBlogQueryKeys } from '../../shared/stack.
|
|
2
|
+
export { d as createBlogQueryKeys } from '../../shared/stack.cfCkioTe.mjs';
|
|
3
3
|
import '@btst/stack/plugins/client';
|
|
4
|
-
import '../../shared/stack.
|
|
4
|
+
import '../../shared/stack.BQmuNl5p.mjs';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
6
6
|
import 'better-call';
|
|
7
7
|
import '@btst/db';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@tanstack/react-query';
|
|
2
|
-
export { d as createBlogQueryKeys } from '../../shared/stack.
|
|
2
|
+
export { d as createBlogQueryKeys } from '../../shared/stack.DXnclTG7.js';
|
|
3
3
|
import '@btst/stack/plugins/client';
|
|
4
|
-
import '../../shared/stack.
|
|
4
|
+
import '../../shared/stack.BQmuNl5p.js';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
6
6
|
import 'better-call';
|
|
7
7
|
import '@btst/db';
|
|
@@ -10,6 +10,7 @@ function defineClientPlugin(plugin) {
|
|
|
10
10
|
|
|
11
11
|
exports.createApiClient = utils.createApiClient;
|
|
12
12
|
exports.isConnectionError = utils.isConnectionError;
|
|
13
|
+
exports.runClientHookWithShim = utils.runClientHookWithShim;
|
|
13
14
|
exports.createRoute = yar.createRoute;
|
|
14
15
|
exports.createRouter = yar.createRouter;
|
|
15
16
|
exports.createClient = client.createClient;
|
|
@@ -7,6 +7,13 @@ export { createClient } from 'better-call/client';
|
|
|
7
7
|
import { Router, Endpoint } from 'better-call';
|
|
8
8
|
import '@btst/db';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Client-side equivalent of runHookWithShim — throws a plain Error instead of an HTTP error.
|
|
12
|
+
* Hooks may deny by returning false (old) or throwing (new); both normalize to an Error.
|
|
13
|
+
*
|
|
14
|
+
* See `runHookWithShim` for the full migration note on boolean-vs-void semantics.
|
|
15
|
+
*/
|
|
16
|
+
declare function runClientHookWithShim<T>(hookFn: () => Promise<T> | T, defaultMessage: string): Promise<Exclude<Awaited<T>, false>>;
|
|
10
17
|
/**
|
|
11
18
|
* Returns true when a fetch error is a connection-refused / no-server error.
|
|
12
19
|
* Used in SSR loaders to emit an actionable build-time warning when
|
|
@@ -60,4 +67,4 @@ declare function createApiClient<TRouter extends Router | Record<string, Endpoin
|
|
|
60
67
|
*/
|
|
61
68
|
declare function defineClientPlugin<TOverrides = Record<string, never>, TRoutes extends Record<string, Route> = Record<string, Route>>(plugin: ClientPlugin<TOverrides, TRoutes>): ClientPlugin<TOverrides, TRoutes>;
|
|
62
69
|
|
|
63
|
-
export { ClientPlugin, createApiClient, defineClientPlugin, isConnectionError };
|
|
70
|
+
export { ClientPlugin, createApiClient, defineClientPlugin, isConnectionError, runClientHookWithShim };
|
|
@@ -7,6 +7,13 @@ export { createClient } from 'better-call/client';
|
|
|
7
7
|
import { Router, Endpoint } from 'better-call';
|
|
8
8
|
import '@btst/db';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Client-side equivalent of runHookWithShim — throws a plain Error instead of an HTTP error.
|
|
12
|
+
* Hooks may deny by returning false (old) or throwing (new); both normalize to an Error.
|
|
13
|
+
*
|
|
14
|
+
* See `runHookWithShim` for the full migration note on boolean-vs-void semantics.
|
|
15
|
+
*/
|
|
16
|
+
declare function runClientHookWithShim<T>(hookFn: () => Promise<T> | T, defaultMessage: string): Promise<Exclude<Awaited<T>, false>>;
|
|
10
17
|
/**
|
|
11
18
|
* Returns true when a fetch error is a connection-refused / no-server error.
|
|
12
19
|
* Used in SSR loaders to emit an actionable build-time warning when
|
|
@@ -60,4 +67,4 @@ declare function createApiClient<TRouter extends Router | Record<string, Endpoin
|
|
|
60
67
|
*/
|
|
61
68
|
declare function defineClientPlugin<TOverrides = Record<string, never>, TRoutes extends Record<string, Route> = Record<string, Route>>(plugin: ClientPlugin<TOverrides, TRoutes>): ClientPlugin<TOverrides, TRoutes>;
|
|
62
69
|
|
|
63
|
-
export { ClientPlugin, createApiClient, defineClientPlugin, isConnectionError };
|
|
70
|
+
export { ClientPlugin, createApiClient, defineClientPlugin, isConnectionError, runClientHookWithShim };
|
|
@@ -7,6 +7,13 @@ export { createClient } from 'better-call/client';
|
|
|
7
7
|
import { Router, Endpoint } from 'better-call';
|
|
8
8
|
import '@btst/db';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Client-side equivalent of runHookWithShim — throws a plain Error instead of an HTTP error.
|
|
12
|
+
* Hooks may deny by returning false (old) or throwing (new); both normalize to an Error.
|
|
13
|
+
*
|
|
14
|
+
* See `runHookWithShim` for the full migration note on boolean-vs-void semantics.
|
|
15
|
+
*/
|
|
16
|
+
declare function runClientHookWithShim<T>(hookFn: () => Promise<T> | T, defaultMessage: string): Promise<Exclude<Awaited<T>, false>>;
|
|
10
17
|
/**
|
|
11
18
|
* Returns true when a fetch error is a connection-refused / no-server error.
|
|
12
19
|
* Used in SSR loaders to emit an actionable build-time warning when
|
|
@@ -60,4 +67,4 @@ declare function createApiClient<TRouter extends Router | Record<string, Endpoin
|
|
|
60
67
|
*/
|
|
61
68
|
declare function defineClientPlugin<TOverrides = Record<string, never>, TRoutes extends Record<string, Route> = Record<string, Route>>(plugin: ClientPlugin<TOverrides, TRoutes>): ClientPlugin<TOverrides, TRoutes>;
|
|
62
69
|
|
|
63
|
-
export { ClientPlugin, createApiClient, defineClientPlugin, isConnectionError };
|
|
70
|
+
export { ClientPlugin, createApiClient, defineClientPlugin, isConnectionError, runClientHookWithShim };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createApiClient, isConnectionError } from '../../packages/stack/src/plugins/utils.mjs';
|
|
1
|
+
export { createApiClient, isConnectionError, runClientHookWithShim } from '../../packages/stack/src/plugins/utils.mjs';
|
|
2
2
|
export { createRoute, createRouter } from '@btst/yar';
|
|
3
3
|
export { createClient } from 'better-call/client';
|
|
4
4
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const plugin = require('../../../packages/stack/src/plugins/cms/api/plugin.cjs');
|
|
4
4
|
const getters = require('../../../packages/stack/src/plugins/cms/api/getters.cjs');
|
|
5
|
+
const mutations = require('../../../packages/stack/src/plugins/cms/api/mutations.cjs');
|
|
5
6
|
const queryKeyDefs = require('../../../packages/stack/src/plugins/cms/api/query-key-defs.cjs');
|
|
6
7
|
|
|
7
8
|
|
|
@@ -14,4 +15,5 @@ exports.getContentItemBySlug = getters.getContentItemBySlug;
|
|
|
14
15
|
exports.serializeContentItem = getters.serializeContentItem;
|
|
15
16
|
exports.serializeContentItemWithType = getters.serializeContentItemWithType;
|
|
16
17
|
exports.serializeContentType = getters.serializeContentType;
|
|
18
|
+
exports.createCMSContentItem = mutations.createCMSContentItem;
|
|
17
19
|
exports.CMS_QUERY_KEYS = queryKeyDefs.CMS_QUERY_KEYS;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as CMSApiRouter, b as CMSRouteKey,
|
|
1
|
+
export { C as CMSApiRouter, b as CMSRouteKey, l as CMS_QUERY_KEYS, k as CreateCMSContentItemInput, c as cmsBackendPlugin, j as createCMSContentItem, d as getAllContentItems, g as getAllContentTypes, f as getContentItemById, e as getContentItemBySlug, h as serializeContentItem, i as serializeContentItemWithType, s as serializeContentType } from '../../../shared/stack.C9Mg2Q46.cjs';
|
|
2
2
|
import '@btst/stack/plugins/api';
|
|
3
|
-
import '../../../shared/stack.
|
|
3
|
+
import '../../../shared/stack.B8QD11QU.cjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import 'better-call';
|
|
6
6
|
import '@btst/db';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as CMSApiRouter, b as CMSRouteKey,
|
|
1
|
+
export { C as CMSApiRouter, b as CMSRouteKey, l as CMS_QUERY_KEYS, k as CreateCMSContentItemInput, c as cmsBackendPlugin, j as createCMSContentItem, d as getAllContentItems, g as getAllContentTypes, f as getContentItemById, e as getContentItemBySlug, h as serializeContentItem, i as serializeContentItemWithType, s as serializeContentType } from '../../../shared/stack.B58oHdqm.mjs';
|
|
2
2
|
import '@btst/stack/plugins/api';
|
|
3
|
-
import '../../../shared/stack.
|
|
3
|
+
import '../../../shared/stack.B8QD11QU.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import 'better-call';
|
|
6
6
|
import '@btst/db';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as CMSApiRouter, b as CMSRouteKey,
|
|
1
|
+
export { C as CMSApiRouter, b as CMSRouteKey, l as CMS_QUERY_KEYS, k as CreateCMSContentItemInput, c as cmsBackendPlugin, j as createCMSContentItem, d as getAllContentItems, g as getAllContentTypes, f as getContentItemById, e as getContentItemBySlug, h as serializeContentItem, i as serializeContentItemWithType, s as serializeContentType } from '../../../shared/stack.sO33ZDhK.js';
|
|
2
2
|
import '@btst/stack/plugins/api';
|
|
3
|
-
import '../../../shared/stack.
|
|
3
|
+
import '../../../shared/stack.B8QD11QU.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import 'better-call';
|
|
6
6
|
import '@btst/db';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { cmsBackendPlugin } from '../../../packages/stack/src/plugins/cms/api/plugin.mjs';
|
|
2
2
|
export { getAllContentItems, getAllContentTypes, getContentItemById, getContentItemBySlug, serializeContentItem, serializeContentItemWithType, serializeContentType } from '../../../packages/stack/src/plugins/cms/api/getters.mjs';
|
|
3
|
+
export { createCMSContentItem } from '../../../packages/stack/src/plugins/cms/api/mutations.mjs';
|
|
3
4
|
export { CMS_QUERY_KEYS } from '../../../packages/stack/src/plugins/cms/api/query-key-defs.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import { S as SerializedContentType, a as SerializedContentItemWithType } from '../../../../shared/stack.
|
|
2
|
+
import { S as SerializedContentType, a as SerializedContentItemWithType } from '../../../../shared/stack.B8QD11QU.cjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
interface UseContentTypesResult {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import { S as SerializedContentType, a as SerializedContentItemWithType } from '../../../../shared/stack.
|
|
2
|
+
import { S as SerializedContentType, a as SerializedContentItemWithType } from '../../../../shared/stack.B8QD11QU.mjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
interface UseContentTypesResult {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import { S as SerializedContentType, a as SerializedContentItemWithType } from '../../../../shared/stack.
|
|
2
|
+
import { S as SerializedContentType, a as SerializedContentItemWithType } from '../../../../shared/stack.B8QD11QU.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
interface UseContentTypesResult {
|
|
@@ -34,21 +34,21 @@ interface LoaderContext {
|
|
|
34
34
|
*/
|
|
35
35
|
interface CMSClientHooks {
|
|
36
36
|
/**
|
|
37
|
-
* Called before loading the dashboard page.
|
|
37
|
+
* Called before loading the dashboard page. Throw an error to cancel loading.
|
|
38
38
|
* @param context - Loader context with path, params, etc.
|
|
39
39
|
*/
|
|
40
|
-
beforeLoadDashboard?: (context: LoaderContext) => Promise<
|
|
40
|
+
beforeLoadDashboard?: (context: LoaderContext) => Promise<void> | void;
|
|
41
41
|
/**
|
|
42
42
|
* Called after the dashboard is loaded.
|
|
43
43
|
* @param context - Loader context
|
|
44
44
|
*/
|
|
45
45
|
afterLoadDashboard?: (context: LoaderContext) => Promise<void> | void;
|
|
46
46
|
/**
|
|
47
|
-
* Called before loading a content list page.
|
|
47
|
+
* Called before loading a content list page. Throw an error to cancel loading.
|
|
48
48
|
* @param typeSlug - The content type slug
|
|
49
49
|
* @param context - Loader context
|
|
50
50
|
*/
|
|
51
|
-
beforeLoadContentList?: (typeSlug: string, context: LoaderContext) => Promise<
|
|
51
|
+
beforeLoadContentList?: (typeSlug: string, context: LoaderContext) => Promise<void> | void;
|
|
52
52
|
/**
|
|
53
53
|
* Called after a content list is loaded.
|
|
54
54
|
* @param typeSlug - The content type slug
|
|
@@ -56,12 +56,12 @@ interface CMSClientHooks {
|
|
|
56
56
|
*/
|
|
57
57
|
afterLoadContentList?: (typeSlug: string, context: LoaderContext) => Promise<void> | void;
|
|
58
58
|
/**
|
|
59
|
-
* Called before loading the content editor page.
|
|
59
|
+
* Called before loading the content editor page. Throw an error to cancel loading.
|
|
60
60
|
* @param typeSlug - The content type slug
|
|
61
61
|
* @param id - The content item ID (undefined for new items)
|
|
62
62
|
* @param context - Loader context
|
|
63
63
|
*/
|
|
64
|
-
beforeLoadContentEditor?: (typeSlug: string, id: string | undefined, context: LoaderContext) => Promise<
|
|
64
|
+
beforeLoadContentEditor?: (typeSlug: string, id: string | undefined, context: LoaderContext) => Promise<void> | void;
|
|
65
65
|
/**
|
|
66
66
|
* Called after the content editor is loaded.
|
|
67
67
|
* @param typeSlug - The content type slug
|
|
@@ -34,21 +34,21 @@ interface LoaderContext {
|
|
|
34
34
|
*/
|
|
35
35
|
interface CMSClientHooks {
|
|
36
36
|
/**
|
|
37
|
-
* Called before loading the dashboard page.
|
|
37
|
+
* Called before loading the dashboard page. Throw an error to cancel loading.
|
|
38
38
|
* @param context - Loader context with path, params, etc.
|
|
39
39
|
*/
|
|
40
|
-
beforeLoadDashboard?: (context: LoaderContext) => Promise<
|
|
40
|
+
beforeLoadDashboard?: (context: LoaderContext) => Promise<void> | void;
|
|
41
41
|
/**
|
|
42
42
|
* Called after the dashboard is loaded.
|
|
43
43
|
* @param context - Loader context
|
|
44
44
|
*/
|
|
45
45
|
afterLoadDashboard?: (context: LoaderContext) => Promise<void> | void;
|
|
46
46
|
/**
|
|
47
|
-
* Called before loading a content list page.
|
|
47
|
+
* Called before loading a content list page. Throw an error to cancel loading.
|
|
48
48
|
* @param typeSlug - The content type slug
|
|
49
49
|
* @param context - Loader context
|
|
50
50
|
*/
|
|
51
|
-
beforeLoadContentList?: (typeSlug: string, context: LoaderContext) => Promise<
|
|
51
|
+
beforeLoadContentList?: (typeSlug: string, context: LoaderContext) => Promise<void> | void;
|
|
52
52
|
/**
|
|
53
53
|
* Called after a content list is loaded.
|
|
54
54
|
* @param typeSlug - The content type slug
|
|
@@ -56,12 +56,12 @@ interface CMSClientHooks {
|
|
|
56
56
|
*/
|
|
57
57
|
afterLoadContentList?: (typeSlug: string, context: LoaderContext) => Promise<void> | void;
|
|
58
58
|
/**
|
|
59
|
-
* Called before loading the content editor page.
|
|
59
|
+
* Called before loading the content editor page. Throw an error to cancel loading.
|
|
60
60
|
* @param typeSlug - The content type slug
|
|
61
61
|
* @param id - The content item ID (undefined for new items)
|
|
62
62
|
* @param context - Loader context
|
|
63
63
|
*/
|
|
64
|
-
beforeLoadContentEditor?: (typeSlug: string, id: string | undefined, context: LoaderContext) => Promise<
|
|
64
|
+
beforeLoadContentEditor?: (typeSlug: string, id: string | undefined, context: LoaderContext) => Promise<void> | void;
|
|
65
65
|
/**
|
|
66
66
|
* Called after the content editor is loaded.
|
|
67
67
|
* @param typeSlug - The content type slug
|
|
@@ -34,21 +34,21 @@ interface LoaderContext {
|
|
|
34
34
|
*/
|
|
35
35
|
interface CMSClientHooks {
|
|
36
36
|
/**
|
|
37
|
-
* Called before loading the dashboard page.
|
|
37
|
+
* Called before loading the dashboard page. Throw an error to cancel loading.
|
|
38
38
|
* @param context - Loader context with path, params, etc.
|
|
39
39
|
*/
|
|
40
|
-
beforeLoadDashboard?: (context: LoaderContext) => Promise<
|
|
40
|
+
beforeLoadDashboard?: (context: LoaderContext) => Promise<void> | void;
|
|
41
41
|
/**
|
|
42
42
|
* Called after the dashboard is loaded.
|
|
43
43
|
* @param context - Loader context
|
|
44
44
|
*/
|
|
45
45
|
afterLoadDashboard?: (context: LoaderContext) => Promise<void> | void;
|
|
46
46
|
/**
|
|
47
|
-
* Called before loading a content list page.
|
|
47
|
+
* Called before loading a content list page. Throw an error to cancel loading.
|
|
48
48
|
* @param typeSlug - The content type slug
|
|
49
49
|
* @param context - Loader context
|
|
50
50
|
*/
|
|
51
|
-
beforeLoadContentList?: (typeSlug: string, context: LoaderContext) => Promise<
|
|
51
|
+
beforeLoadContentList?: (typeSlug: string, context: LoaderContext) => Promise<void> | void;
|
|
52
52
|
/**
|
|
53
53
|
* Called after a content list is loaded.
|
|
54
54
|
* @param typeSlug - The content type slug
|
|
@@ -56,12 +56,12 @@ interface CMSClientHooks {
|
|
|
56
56
|
*/
|
|
57
57
|
afterLoadContentList?: (typeSlug: string, context: LoaderContext) => Promise<void> | void;
|
|
58
58
|
/**
|
|
59
|
-
* Called before loading the content editor page.
|
|
59
|
+
* Called before loading the content editor page. Throw an error to cancel loading.
|
|
60
60
|
* @param typeSlug - The content type slug
|
|
61
61
|
* @param id - The content item ID (undefined for new items)
|
|
62
62
|
* @param context - Loader context
|
|
63
63
|
*/
|
|
64
|
-
beforeLoadContentEditor?: (typeSlug: string, id: string | undefined, context: LoaderContext) => Promise<
|
|
64
|
+
beforeLoadContentEditor?: (typeSlug: string, id: string | undefined, context: LoaderContext) => Promise<void> | void;
|
|
65
65
|
/**
|
|
66
66
|
* Called after the content editor is loaded.
|
|
67
67
|
* @param typeSlug - The content type slug
|