@btst/stack 3.0.0-rc.1 → 3.0.0-rc.2
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/README.md +4 -8
- package/dist/next/index.d.cts +13 -7
- package/dist/next/index.d.mts +13 -7
- package/dist/next/index.d.ts +13 -7
- package/dist/packages/stack/src/next/page.cjs +8 -6
- package/dist/packages/stack/src/next/page.mjs +8 -6
- package/dist/packages/stack/src/plugins/comments/client/components/comment-thread.cjs +1 -1
- package/dist/packages/stack/src/plugins/comments/client/components/comment-thread.mjs +1 -1
- package/dist/packages/stack/src/react-router/page.cjs +17 -11
- package/dist/packages/stack/src/react-router/page.mjs +17 -11
- package/dist/packages/stack/src/tanstack/page.cjs +5 -3
- package/dist/packages/stack/src/tanstack/page.mjs +5 -3
- 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 +2 -2
- package/dist/plugins/blog/client/index.d.mts +2 -2
- package/dist/plugins/blog/client/index.d.ts +2 -2
- 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/cms/api/index.d.cts +1 -1
- package/dist/plugins/cms/api/index.d.mts +1 -1
- package/dist/plugins/cms/api/index.d.ts +1 -1
- package/dist/plugins/cms/query-keys.d.cts +1 -1
- package/dist/plugins/cms/query-keys.d.mts +1 -1
- package/dist/plugins/cms/query-keys.d.ts +1 -1
- package/dist/plugins/comments/client/components/index.d.cts +5 -0
- package/dist/plugins/comments/client/components/index.d.mts +5 -0
- package/dist/plugins/comments/client/components/index.d.ts +5 -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/client/hooks/index.d.cts +1 -1
- package/dist/plugins/kanban/client/hooks/index.d.mts +1 -1
- package/dist/plugins/kanban/client/hooks/index.d.ts +1 -1
- 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 +1 -1
- package/dist/plugins/ui-builder/client/index.d.mts +1 -1
- package/dist/plugins/ui-builder/client/index.d.ts +1 -1
- package/dist/plugins/ui-builder/query-keys.d.cts +1 -1
- package/dist/plugins/ui-builder/query-keys.d.mts +1 -1
- package/dist/plugins/ui-builder/query-keys.d.ts +1 -1
- package/dist/react-router/index.d.cts +14 -4
- package/dist/react-router/index.d.mts +14 -4
- package/dist/react-router/index.d.ts +14 -4
- package/dist/shared/{stack.H5B8miAV.d.cts → stack.CKGjOI3Z.d.cts} +11 -11
- package/dist/shared/{stack.80-y2TTR.d.mts → stack.DZHEHd-S.d.mts} +11 -11
- package/dist/shared/{stack.CRelKJfH.d.ts → stack.DseBJmGF.d.ts} +4 -4
- package/dist/shared/{stack.INBa9-TO.d.cts → stack.DzwZw-Ck.d.cts} +4 -4
- package/dist/shared/{stack.DrUBX-QE.d.mts → stack.EOPVnJrF.d.cts} +6 -1
- package/dist/shared/{stack.DrUBX-QE.d.ts → stack.EOPVnJrF.d.mts} +6 -1
- package/dist/shared/{stack.DrUBX-QE.d.cts → stack.EOPVnJrF.d.ts} +6 -1
- package/dist/shared/{stack.Bk5UB_BT.d.ts → stack.WELCDuMs.d.ts} +11 -11
- package/dist/shared/{stack.3di7vQs6.d.mts → stack.oVIdV7XS.d.mts} +4 -4
- package/dist/tanstack/index.d.cts +20 -12
- package/dist/tanstack/index.d.mts +20 -12
- package/dist/tanstack/index.d.ts +20 -12
- package/package.json +6 -6
- package/src/__tests__/entry-factories.test.tsx +104 -4
- package/src/__tests__/package-metadata.test.ts +21 -0
- package/src/next/index.tsx +2 -0
- package/src/next/page.tsx +17 -9
- package/src/plugins/comments/__tests__/client-sweep.test.tsx +23 -0
- package/src/plugins/comments/client/components/comment-thread.tsx +6 -2
- package/src/react-router/index.tsx +1 -0
- package/src/react-router/page.tsx +34 -12
- package/src/shared/entry-factories.ts +9 -0
- package/src/tanstack/index.tsx +2 -0
- package/src/tanstack/page.tsx +28 -11
- package/dist/shared/{stack.BvxHSZYT.d.cts → stack.BsmDN8r9.d.cts} +3 -3
- package/dist/shared/{stack.eq5eg1yt.d.cts → stack.CuI_-z-_.d.cts} +22 -22
- package/dist/shared/{stack.B0muOwUF.d.mts → stack.D18Dq3ve.d.cts} +7 -7
- package/dist/shared/{stack.B0muOwUF.d.ts → stack.D18Dq3ve.d.mts} +7 -7
- package/dist/shared/{stack.B0muOwUF.d.cts → stack.D18Dq3ve.d.ts} +7 -7
- package/dist/shared/{stack.Dj04W2c3.d.mts → stack.D2RVkQD8.d.mts} +22 -22
- package/dist/shared/{stack.B-hEIoUw.d.ts → stack.DOzsgzkY.d.ts} +3 -3
- package/dist/shared/{stack.CMbX8Q5C.d.ts → stack.DXrOtuek.d.ts} +22 -22
- package/dist/shared/{stack.f8Vke-eH.d.mts → stack.NGKtwA6S.d.mts} +3 -3
|
@@ -30,6 +30,11 @@ interface CommentThreadProps {
|
|
|
30
30
|
className?: string;
|
|
31
31
|
/** Localization strings — defaults to English */
|
|
32
32
|
localization?: Partial<CommentsLocalization>;
|
|
33
|
+
/**
|
|
34
|
+
* Sign-in URL for unauthenticated users in this thread.
|
|
35
|
+
* Overrides the `loginPath` from the nearest `StackProvider`.
|
|
36
|
+
*/
|
|
37
|
+
loginHref?: string;
|
|
33
38
|
/**
|
|
34
39
|
* Number of top-level comments to load per page.
|
|
35
40
|
* Clicking "Load more" fetches the next page. Default: 10.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BoardListResult, C as CreateKanbanTaskInput, i as KANBAN_QUERY_KEYS, b as KanbanApiContext, K as KanbanApiRouter, c as KanbanBackendHooks, a as KanbanRouteKey, e as createKanbanTask, f as findOrCreateKanbanBoard, g as getAllBoards, d as getBoardById, h as getKanbanColumnsByBoardId, k as kanbanBackendPlugin } from '../../../shared/stack.
|
|
1
|
+
export { B as BoardListResult, C as CreateKanbanTaskInput, i as KANBAN_QUERY_KEYS, b as KanbanApiContext, K as KanbanApiRouter, c as KanbanBackendHooks, a as KanbanRouteKey, e as createKanbanTask, f as findOrCreateKanbanBoard, g as getAllBoards, d as getBoardById, h as getKanbanColumnsByBoardId, k as kanbanBackendPlugin } from '../../../shared/stack.CuI_-z-_.cjs';
|
|
2
2
|
import { B as BoardWithColumns, S as SerializedBoardWithColumns, C as ColumnWithTasks, a as SerializedColumn, T as Task, b as SerializedTask } from '../../../shared/stack.DJaKVY7v.cjs';
|
|
3
3
|
import '@btst/stack/plugins/api';
|
|
4
4
|
import '@btst/db';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BoardListResult, C as CreateKanbanTaskInput, i as KANBAN_QUERY_KEYS, b as KanbanApiContext, K as KanbanApiRouter, c as KanbanBackendHooks, a as KanbanRouteKey, e as createKanbanTask, f as findOrCreateKanbanBoard, g as getAllBoards, d as getBoardById, h as getKanbanColumnsByBoardId, k as kanbanBackendPlugin } from '../../../shared/stack.
|
|
1
|
+
export { B as BoardListResult, C as CreateKanbanTaskInput, i as KANBAN_QUERY_KEYS, b as KanbanApiContext, K as KanbanApiRouter, c as KanbanBackendHooks, a as KanbanRouteKey, e as createKanbanTask, f as findOrCreateKanbanBoard, g as getAllBoards, d as getBoardById, h as getKanbanColumnsByBoardId, k as kanbanBackendPlugin } from '../../../shared/stack.D2RVkQD8.mjs';
|
|
2
2
|
import { B as BoardWithColumns, S as SerializedBoardWithColumns, C as ColumnWithTasks, a as SerializedColumn, T as Task, b as SerializedTask } from '../../../shared/stack.DJaKVY7v.mjs';
|
|
3
3
|
import '@btst/stack/plugins/api';
|
|
4
4
|
import '@btst/db';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BoardListResult, C as CreateKanbanTaskInput, i as KANBAN_QUERY_KEYS, b as KanbanApiContext, K as KanbanApiRouter, c as KanbanBackendHooks, a as KanbanRouteKey, e as createKanbanTask, f as findOrCreateKanbanBoard, g as getAllBoards, d as getBoardById, h as getKanbanColumnsByBoardId, k as kanbanBackendPlugin } from '../../../shared/stack.
|
|
1
|
+
export { B as BoardListResult, C as CreateKanbanTaskInput, i as KANBAN_QUERY_KEYS, b as KanbanApiContext, K as KanbanApiRouter, c as KanbanBackendHooks, a as KanbanRouteKey, e as createKanbanTask, f as findOrCreateKanbanBoard, g as getAllBoards, d as getBoardById, h as getKanbanColumnsByBoardId, k as kanbanBackendPlugin } from '../../../shared/stack.DXrOtuek.js';
|
|
2
2
|
import { B as BoardWithColumns, S as SerializedBoardWithColumns, C as ColumnWithTasks, a as SerializedColumn, T as Task, b as SerializedTask } from '../../../shared/stack.DJaKVY7v.js';
|
|
3
3
|
import '@btst/stack/plugins/api';
|
|
4
4
|
import '@btst/db';
|
|
@@ -4,7 +4,7 @@ import { S as SerializedBoardWithColumns, c as SerializedBoard, a as SerializedC
|
|
|
4
4
|
import { ResourceFormConfig, ResourceFormResult } from '@btst/stack/plugins/client/hooks';
|
|
5
5
|
import { a as KanbanUser } from '../../../../shared/stack.Dlgtumru.cjs';
|
|
6
6
|
import '@btst/stack/plugins/client';
|
|
7
|
-
import '../../../../shared/stack.
|
|
7
|
+
import '../../../../shared/stack.CuI_-z-_.cjs';
|
|
8
8
|
import '@btst/stack/plugins/api';
|
|
9
9
|
import '@btst/db';
|
|
10
10
|
import 'zod';
|
|
@@ -4,7 +4,7 @@ import { S as SerializedBoardWithColumns, c as SerializedBoard, a as SerializedC
|
|
|
4
4
|
import { ResourceFormConfig, ResourceFormResult } from '@btst/stack/plugins/client/hooks';
|
|
5
5
|
import { a as KanbanUser } from '../../../../shared/stack.Cp_6mO5s.mjs';
|
|
6
6
|
import '@btst/stack/plugins/client';
|
|
7
|
-
import '../../../../shared/stack.
|
|
7
|
+
import '../../../../shared/stack.D2RVkQD8.mjs';
|
|
8
8
|
import '@btst/stack/plugins/api';
|
|
9
9
|
import '@btst/db';
|
|
10
10
|
import 'zod';
|
|
@@ -4,7 +4,7 @@ import { S as SerializedBoardWithColumns, c as SerializedBoard, a as SerializedC
|
|
|
4
4
|
import { ResourceFormConfig, ResourceFormResult } from '@btst/stack/plugins/client/hooks';
|
|
5
5
|
import { a as KanbanUser } from '../../../../shared/stack.B9NtGpAR.js';
|
|
6
6
|
import '@btst/stack/plugins/client';
|
|
7
|
-
import '../../../../shared/stack.
|
|
7
|
+
import '../../../../shared/stack.DXrOtuek.js';
|
|
8
8
|
import '@btst/stack/plugins/api';
|
|
9
9
|
import '@btst/db';
|
|
10
10
|
import 'zod';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
|
|
2
2
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
3
|
-
import { j as BoardsListDiscriminator, K as KanbanApiRouter } from '../../shared/stack.
|
|
3
|
+
import { j as BoardsListDiscriminator, K as KanbanApiRouter } from '../../shared/stack.CuI_-z-_.cjs';
|
|
4
4
|
import { P as Priority, S as SerializedBoardWithColumns, c as SerializedBoard, a as SerializedColumn, b as SerializedTask } from '../../shared/stack.DJaKVY7v.cjs';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
6
6
|
import '@btst/db';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
|
|
2
2
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
3
|
-
import { j as BoardsListDiscriminator, K as KanbanApiRouter } from '../../shared/stack.
|
|
3
|
+
import { j as BoardsListDiscriminator, K as KanbanApiRouter } from '../../shared/stack.D2RVkQD8.mjs';
|
|
4
4
|
import { P as Priority, S as SerializedBoardWithColumns, c as SerializedBoard, a as SerializedColumn, b as SerializedTask } from '../../shared/stack.DJaKVY7v.mjs';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
6
6
|
import '@btst/db';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
|
|
2
2
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
3
|
-
import { j as BoardsListDiscriminator, K as KanbanApiRouter } from '../../shared/stack.
|
|
3
|
+
import { j as BoardsListDiscriminator, K as KanbanApiRouter } from '../../shared/stack.DXrOtuek.js';
|
|
4
4
|
import { P as Priority, S as SerializedBoardWithColumns, c as SerializedBoard, a as SerializedColumn, b as SerializedTask } from '../../shared/stack.DJaKVY7v.js';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
6
6
|
import '@btst/db';
|
|
@@ -9,7 +9,7 @@ import '../../../../shared/stack.CPsYC2-Z.cjs';
|
|
|
9
9
|
import 'react-hook-form';
|
|
10
10
|
import 'react/jsx-runtime';
|
|
11
11
|
import '@btst/stack/plugins/client';
|
|
12
|
-
import '../../../../shared/stack.
|
|
12
|
+
import '../../../../shared/stack.BsmDN8r9.cjs';
|
|
13
13
|
import '@btst/stack/plugins/api';
|
|
14
14
|
import '../../../../shared/stack.aXdBOJAR.cjs';
|
|
15
15
|
import 'better-call';
|
|
@@ -9,7 +9,7 @@ import '../../../../shared/stack.CPsYC2-Z.mjs';
|
|
|
9
9
|
import 'react-hook-form';
|
|
10
10
|
import 'react/jsx-runtime';
|
|
11
11
|
import '@btst/stack/plugins/client';
|
|
12
|
-
import '../../../../shared/stack.
|
|
12
|
+
import '../../../../shared/stack.NGKtwA6S.mjs';
|
|
13
13
|
import '@btst/stack/plugins/api';
|
|
14
14
|
import '../../../../shared/stack.aXdBOJAR.mjs';
|
|
15
15
|
import 'better-call';
|
|
@@ -9,7 +9,7 @@ import '../../../../shared/stack.CPsYC2-Z.js';
|
|
|
9
9
|
import 'react-hook-form';
|
|
10
10
|
import 'react/jsx-runtime';
|
|
11
11
|
import '@btst/stack/plugins/client';
|
|
12
|
-
import '../../../../shared/stack.
|
|
12
|
+
import '../../../../shared/stack.DOzsgzkY.js';
|
|
13
13
|
import '@btst/stack/plugins/api';
|
|
14
14
|
import '../../../../shared/stack.aXdBOJAR.js';
|
|
15
15
|
import 'better-call';
|
|
@@ -15,7 +15,7 @@ import 'zod';
|
|
|
15
15
|
import '../../../shared/stack.aXdBOJAR.cjs';
|
|
16
16
|
import 'react-hook-form';
|
|
17
17
|
import '@btst/stack/plugins/client/hooks';
|
|
18
|
-
import '../../../shared/stack.
|
|
18
|
+
import '../../../shared/stack.BsmDN8r9.cjs';
|
|
19
19
|
import '@btst/stack/plugins/api';
|
|
20
20
|
import 'better-call';
|
|
21
21
|
import '@btst/db';
|
|
@@ -15,7 +15,7 @@ import 'zod';
|
|
|
15
15
|
import '../../../shared/stack.aXdBOJAR.mjs';
|
|
16
16
|
import 'react-hook-form';
|
|
17
17
|
import '@btst/stack/plugins/client/hooks';
|
|
18
|
-
import '../../../shared/stack.
|
|
18
|
+
import '../../../shared/stack.NGKtwA6S.mjs';
|
|
19
19
|
import '@btst/stack/plugins/api';
|
|
20
20
|
import 'better-call';
|
|
21
21
|
import '@btst/db';
|
|
@@ -15,7 +15,7 @@ import 'zod';
|
|
|
15
15
|
import '../../../shared/stack.aXdBOJAR.js';
|
|
16
16
|
import 'react-hook-form';
|
|
17
17
|
import '@btst/stack/plugins/client/hooks';
|
|
18
|
-
import '../../../shared/stack.
|
|
18
|
+
import '../../../shared/stack.DOzsgzkY.js';
|
|
19
19
|
import '@btst/stack/plugins/api';
|
|
20
20
|
import 'better-call';
|
|
21
21
|
import '@btst/db';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
|
|
2
2
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
3
|
-
import { C as ContentListDiscriminator, a as CMSApiRouter } from '../../shared/stack.
|
|
3
|
+
import { C as ContentListDiscriminator, a as CMSApiRouter } from '../../shared/stack.BsmDN8r9.cjs';
|
|
4
4
|
import { C as ComponentLayer, V as Variable } from '../../shared/stack.B2xi4jj7.cjs';
|
|
5
5
|
import { P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.aXdBOJAR.cjs';
|
|
6
6
|
import { UIBuilderPageSchemaType, PaginatedUIBuilderPages, SerializedUIBuilderPage } from './index.cjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
|
|
2
2
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
3
|
-
import { C as ContentListDiscriminator, a as CMSApiRouter } from '../../shared/stack.
|
|
3
|
+
import { C as ContentListDiscriminator, a as CMSApiRouter } from '../../shared/stack.NGKtwA6S.mjs';
|
|
4
4
|
import { C as ComponentLayer, V as Variable } from '../../shared/stack.DycBcTeg.mjs';
|
|
5
5
|
import { P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.aXdBOJAR.mjs';
|
|
6
6
|
import { UIBuilderPageSchemaType, PaginatedUIBuilderPages, SerializedUIBuilderPage } from './index.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
|
|
2
2
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
3
|
-
import { C as ContentListDiscriminator, a as CMSApiRouter } from '../../shared/stack.
|
|
3
|
+
import { C as ContentListDiscriminator, a as CMSApiRouter } from '../../shared/stack.DOzsgzkY.js';
|
|
4
4
|
import { C as ComponentLayer, V as Variable } from '../../shared/stack.7b3vsM8_.js';
|
|
5
5
|
import { P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.aXdBOJAR.js';
|
|
6
6
|
import { UIBuilderPageSchemaType, PaginatedUIBuilderPages, SerializedUIBuilderPage } from './index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StackRequestHandler, G as GetStackClient } from '../shared/stack.
|
|
1
|
+
import { S as StackRequestHandler, G as GetStackClient, R as ResolveStackClient } from '../shared/stack.EOPVnJrF.cjs';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
4
4
|
import { QueryClient, DehydrateOptions } from '@tanstack/react-query';
|
|
@@ -38,10 +38,15 @@ declare function toReactRouterHandlers(handler: StackRequestHandler): {
|
|
|
38
38
|
* are not available inside the library, so the factory types the subset it
|
|
39
39
|
* uses; the results remain assignable to the generated route exports.
|
|
40
40
|
*/
|
|
41
|
-
interface ReactRouterPageLoaderArgs {
|
|
41
|
+
interface ReactRouterPageLoaderArgs<TContext = unknown> {
|
|
42
|
+
/** The request that triggered the route loader. */
|
|
43
|
+
request: Request;
|
|
44
|
+
/** Parameters for the React Router catch-all route. */
|
|
42
45
|
params: {
|
|
43
46
|
"*"?: string;
|
|
44
47
|
} & Record<string, string | undefined>;
|
|
48
|
+
/** Request-local values supplied by React Router middleware. */
|
|
49
|
+
context: TContext;
|
|
45
50
|
}
|
|
46
51
|
interface CreateReactRouterPageOptions {
|
|
47
52
|
/** Returns the stack client for a given QueryClient (`lib/stack-client`). */
|
|
@@ -85,7 +90,12 @@ interface CreateReactRouterPageOptions {
|
|
|
85
90
|
* ```
|
|
86
91
|
*/
|
|
87
92
|
declare function createReactRouterPage(options: CreateReactRouterPageOptions): {
|
|
88
|
-
loader: (
|
|
93
|
+
loader: (loaderArgs: ReactRouterPageLoaderArgs<unknown>) => Promise<{
|
|
94
|
+
path: string;
|
|
95
|
+
dehydratedState: _tanstack_react_query.DehydratedState;
|
|
96
|
+
meta: any;
|
|
97
|
+
}>;
|
|
98
|
+
createLoader: <TContext = unknown>(getLoaderStackClient?: ResolveStackClient<ReactRouterPageLoaderArgs<TContext>>) => (loaderArgs: ReactRouterPageLoaderArgs<TContext>) => Promise<{
|
|
89
99
|
path: string;
|
|
90
100
|
dehydratedState: _tanstack_react_query.DehydratedState;
|
|
91
101
|
meta: any;
|
|
@@ -118,5 +128,5 @@ declare function createReactRouterPage(options: CreateReactRouterPageOptions): {
|
|
|
118
128
|
*/
|
|
119
129
|
declare function reactRouter(): StackRouterConfig;
|
|
120
130
|
|
|
121
|
-
export { GetStackClient, StackRequestHandler, createReactRouterPage, reactRouter, toReactRouterHandlers };
|
|
131
|
+
export { GetStackClient, ResolveStackClient, StackRequestHandler, createReactRouterPage, reactRouter, toReactRouterHandlers };
|
|
122
132
|
export type { CreateReactRouterPageOptions, ReactRouterPageLoaderArgs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StackRequestHandler, G as GetStackClient } from '../shared/stack.
|
|
1
|
+
import { S as StackRequestHandler, G as GetStackClient, R as ResolveStackClient } from '../shared/stack.EOPVnJrF.mjs';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
4
4
|
import { QueryClient, DehydrateOptions } from '@tanstack/react-query';
|
|
@@ -38,10 +38,15 @@ declare function toReactRouterHandlers(handler: StackRequestHandler): {
|
|
|
38
38
|
* are not available inside the library, so the factory types the subset it
|
|
39
39
|
* uses; the results remain assignable to the generated route exports.
|
|
40
40
|
*/
|
|
41
|
-
interface ReactRouterPageLoaderArgs {
|
|
41
|
+
interface ReactRouterPageLoaderArgs<TContext = unknown> {
|
|
42
|
+
/** The request that triggered the route loader. */
|
|
43
|
+
request: Request;
|
|
44
|
+
/** Parameters for the React Router catch-all route. */
|
|
42
45
|
params: {
|
|
43
46
|
"*"?: string;
|
|
44
47
|
} & Record<string, string | undefined>;
|
|
48
|
+
/** Request-local values supplied by React Router middleware. */
|
|
49
|
+
context: TContext;
|
|
45
50
|
}
|
|
46
51
|
interface CreateReactRouterPageOptions {
|
|
47
52
|
/** Returns the stack client for a given QueryClient (`lib/stack-client`). */
|
|
@@ -85,7 +90,12 @@ interface CreateReactRouterPageOptions {
|
|
|
85
90
|
* ```
|
|
86
91
|
*/
|
|
87
92
|
declare function createReactRouterPage(options: CreateReactRouterPageOptions): {
|
|
88
|
-
loader: (
|
|
93
|
+
loader: (loaderArgs: ReactRouterPageLoaderArgs<unknown>) => Promise<{
|
|
94
|
+
path: string;
|
|
95
|
+
dehydratedState: _tanstack_react_query.DehydratedState;
|
|
96
|
+
meta: any;
|
|
97
|
+
}>;
|
|
98
|
+
createLoader: <TContext = unknown>(getLoaderStackClient?: ResolveStackClient<ReactRouterPageLoaderArgs<TContext>>) => (loaderArgs: ReactRouterPageLoaderArgs<TContext>) => Promise<{
|
|
89
99
|
path: string;
|
|
90
100
|
dehydratedState: _tanstack_react_query.DehydratedState;
|
|
91
101
|
meta: any;
|
|
@@ -118,5 +128,5 @@ declare function createReactRouterPage(options: CreateReactRouterPageOptions): {
|
|
|
118
128
|
*/
|
|
119
129
|
declare function reactRouter(): StackRouterConfig;
|
|
120
130
|
|
|
121
|
-
export { GetStackClient, StackRequestHandler, createReactRouterPage, reactRouter, toReactRouterHandlers };
|
|
131
|
+
export { GetStackClient, ResolveStackClient, StackRequestHandler, createReactRouterPage, reactRouter, toReactRouterHandlers };
|
|
122
132
|
export type { CreateReactRouterPageOptions, ReactRouterPageLoaderArgs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StackRequestHandler, G as GetStackClient } from '../shared/stack.
|
|
1
|
+
import { S as StackRequestHandler, G as GetStackClient, R as ResolveStackClient } from '../shared/stack.EOPVnJrF.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
4
4
|
import { QueryClient, DehydrateOptions } from '@tanstack/react-query';
|
|
@@ -38,10 +38,15 @@ declare function toReactRouterHandlers(handler: StackRequestHandler): {
|
|
|
38
38
|
* are not available inside the library, so the factory types the subset it
|
|
39
39
|
* uses; the results remain assignable to the generated route exports.
|
|
40
40
|
*/
|
|
41
|
-
interface ReactRouterPageLoaderArgs {
|
|
41
|
+
interface ReactRouterPageLoaderArgs<TContext = unknown> {
|
|
42
|
+
/** The request that triggered the route loader. */
|
|
43
|
+
request: Request;
|
|
44
|
+
/** Parameters for the React Router catch-all route. */
|
|
42
45
|
params: {
|
|
43
46
|
"*"?: string;
|
|
44
47
|
} & Record<string, string | undefined>;
|
|
48
|
+
/** Request-local values supplied by React Router middleware. */
|
|
49
|
+
context: TContext;
|
|
45
50
|
}
|
|
46
51
|
interface CreateReactRouterPageOptions {
|
|
47
52
|
/** Returns the stack client for a given QueryClient (`lib/stack-client`). */
|
|
@@ -85,7 +90,12 @@ interface CreateReactRouterPageOptions {
|
|
|
85
90
|
* ```
|
|
86
91
|
*/
|
|
87
92
|
declare function createReactRouterPage(options: CreateReactRouterPageOptions): {
|
|
88
|
-
loader: (
|
|
93
|
+
loader: (loaderArgs: ReactRouterPageLoaderArgs<unknown>) => Promise<{
|
|
94
|
+
path: string;
|
|
95
|
+
dehydratedState: _tanstack_react_query.DehydratedState;
|
|
96
|
+
meta: any;
|
|
97
|
+
}>;
|
|
98
|
+
createLoader: <TContext = unknown>(getLoaderStackClient?: ResolveStackClient<ReactRouterPageLoaderArgs<TContext>>) => (loaderArgs: ReactRouterPageLoaderArgs<TContext>) => Promise<{
|
|
89
99
|
path: string;
|
|
90
100
|
dehydratedState: _tanstack_react_query.DehydratedState;
|
|
91
101
|
meta: any;
|
|
@@ -118,5 +128,5 @@ declare function createReactRouterPage(options: CreateReactRouterPageOptions): {
|
|
|
118
128
|
*/
|
|
119
129
|
declare function reactRouter(): StackRouterConfig;
|
|
120
130
|
|
|
121
|
-
export { GetStackClient, StackRequestHandler, createReactRouterPage, reactRouter, toReactRouterHandlers };
|
|
131
|
+
export { GetStackClient, ResolveStackClient, StackRequestHandler, createReactRouterPage, reactRouter, toReactRouterHandlers };
|
|
122
132
|
export type { CreateReactRouterPageOptions, ReactRouterPageLoaderArgs };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
|
|
2
2
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { c as createPostSchema, u as updatePostSchema } from './stack.
|
|
4
|
+
import { c as createPostSchema, u as updatePostSchema } from './stack.D18Dq3ve.cjs';
|
|
5
5
|
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from './stack.Dsatjh0B.cjs';
|
|
6
6
|
import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
|
|
7
7
|
import { DBAdapter } from '@btst/db';
|
|
@@ -317,12 +317,6 @@ declare const blogBackendPlugin: (hooks?: BlogBackendHooks) => _btst_stack_plugi
|
|
|
317
317
|
title: string;
|
|
318
318
|
content: string;
|
|
319
319
|
excerpt: string;
|
|
320
|
-
slug?: string | undefined;
|
|
321
|
-
publishedAt?: unknown;
|
|
322
|
-
createdAt?: unknown;
|
|
323
|
-
updatedAt?: unknown;
|
|
324
|
-
image?: string | undefined;
|
|
325
|
-
published?: boolean | undefined;
|
|
326
320
|
tags?: ({
|
|
327
321
|
name: string;
|
|
328
322
|
} | {
|
|
@@ -330,16 +324,16 @@ declare const blogBackendPlugin: (hooks?: BlogBackendHooks) => _btst_stack_plugi
|
|
|
330
324
|
name: string;
|
|
331
325
|
slug: string;
|
|
332
326
|
})[] | undefined;
|
|
333
|
-
}, {
|
|
334
|
-
title: string;
|
|
335
|
-
content: string;
|
|
336
|
-
excerpt: string;
|
|
337
327
|
slug?: string | undefined;
|
|
338
328
|
publishedAt?: unknown;
|
|
339
329
|
createdAt?: unknown;
|
|
340
330
|
updatedAt?: unknown;
|
|
341
331
|
image?: string | undefined;
|
|
342
332
|
published?: boolean | undefined;
|
|
333
|
+
}, {
|
|
334
|
+
title: string;
|
|
335
|
+
content: string;
|
|
336
|
+
excerpt: string;
|
|
343
337
|
tags?: ({
|
|
344
338
|
name: string;
|
|
345
339
|
} | {
|
|
@@ -347,6 +341,12 @@ declare const blogBackendPlugin: (hooks?: BlogBackendHooks) => _btst_stack_plugi
|
|
|
347
341
|
name: string;
|
|
348
342
|
slug: string;
|
|
349
343
|
})[] | undefined;
|
|
344
|
+
slug?: string | undefined;
|
|
345
|
+
publishedAt?: unknown;
|
|
346
|
+
createdAt?: unknown;
|
|
347
|
+
updatedAt?: unknown;
|
|
348
|
+
image?: string | undefined;
|
|
349
|
+
published?: boolean | undefined;
|
|
350
350
|
}>;
|
|
351
351
|
}, Post>;
|
|
352
352
|
readonly updatePost: better_call.StrictEndpoint<"/posts/:id", {} & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
|
|
2
2
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { c as createPostSchema, u as updatePostSchema } from './stack.
|
|
4
|
+
import { c as createPostSchema, u as updatePostSchema } from './stack.D18Dq3ve.mjs';
|
|
5
5
|
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from './stack.Dsatjh0B.mjs';
|
|
6
6
|
import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
|
|
7
7
|
import { DBAdapter } from '@btst/db';
|
|
@@ -317,12 +317,6 @@ declare const blogBackendPlugin: (hooks?: BlogBackendHooks) => _btst_stack_plugi
|
|
|
317
317
|
title: string;
|
|
318
318
|
content: string;
|
|
319
319
|
excerpt: string;
|
|
320
|
-
slug?: string | undefined;
|
|
321
|
-
publishedAt?: unknown;
|
|
322
|
-
createdAt?: unknown;
|
|
323
|
-
updatedAt?: unknown;
|
|
324
|
-
image?: string | undefined;
|
|
325
|
-
published?: boolean | undefined;
|
|
326
320
|
tags?: ({
|
|
327
321
|
name: string;
|
|
328
322
|
} | {
|
|
@@ -330,16 +324,16 @@ declare const blogBackendPlugin: (hooks?: BlogBackendHooks) => _btst_stack_plugi
|
|
|
330
324
|
name: string;
|
|
331
325
|
slug: string;
|
|
332
326
|
})[] | undefined;
|
|
333
|
-
}, {
|
|
334
|
-
title: string;
|
|
335
|
-
content: string;
|
|
336
|
-
excerpt: string;
|
|
337
327
|
slug?: string | undefined;
|
|
338
328
|
publishedAt?: unknown;
|
|
339
329
|
createdAt?: unknown;
|
|
340
330
|
updatedAt?: unknown;
|
|
341
331
|
image?: string | undefined;
|
|
342
332
|
published?: boolean | undefined;
|
|
333
|
+
}, {
|
|
334
|
+
title: string;
|
|
335
|
+
content: string;
|
|
336
|
+
excerpt: string;
|
|
343
337
|
tags?: ({
|
|
344
338
|
name: string;
|
|
345
339
|
} | {
|
|
@@ -347,6 +341,12 @@ declare const blogBackendPlugin: (hooks?: BlogBackendHooks) => _btst_stack_plugi
|
|
|
347
341
|
name: string;
|
|
348
342
|
slug: string;
|
|
349
343
|
})[] | undefined;
|
|
344
|
+
slug?: string | undefined;
|
|
345
|
+
publishedAt?: unknown;
|
|
346
|
+
createdAt?: unknown;
|
|
347
|
+
updatedAt?: unknown;
|
|
348
|
+
image?: string | undefined;
|
|
349
|
+
published?: boolean | undefined;
|
|
350
350
|
}>;
|
|
351
351
|
}, Post>;
|
|
352
352
|
readonly updatePost: better_call.StrictEndpoint<"/posts/:id", {} & {
|
|
@@ -2,7 +2,7 @@ import * as _tanstack_react_query from '@tanstack/react-query';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { ResourceFormConfig, ResourceFormResult } from '@btst/stack/plugins/client/hooks';
|
|
4
4
|
import { S as SerializedPost, a as SerializedTag } from './stack.Dsatjh0B.js';
|
|
5
|
-
import { c as createPostSchema, u as updatePostSchema } from './stack.
|
|
5
|
+
import { c as createPostSchema, u as updatePostSchema } from './stack.D18Dq3ve.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Options for the usePosts hook
|
|
@@ -137,9 +137,6 @@ declare function usePostForm<TValues>(config: ResourceFormConfig<TValues, Serial
|
|
|
137
137
|
/** Create a new post */
|
|
138
138
|
declare function useCreatePost(): _tanstack_react_query.UseMutationResult<SerializedPost | null, Error, {
|
|
139
139
|
title: string;
|
|
140
|
-
content: string;
|
|
141
|
-
excerpt: string;
|
|
142
|
-
published: boolean;
|
|
143
140
|
tags: ({
|
|
144
141
|
name: string;
|
|
145
142
|
} | {
|
|
@@ -147,6 +144,9 @@ declare function useCreatePost(): _tanstack_react_query.UseMutationResult<Serial
|
|
|
147
144
|
name: string;
|
|
148
145
|
slug: string;
|
|
149
146
|
})[];
|
|
147
|
+
content: string;
|
|
148
|
+
excerpt: string;
|
|
149
|
+
published: boolean;
|
|
150
150
|
slug?: string | undefined;
|
|
151
151
|
publishedAt?: Date | undefined;
|
|
152
152
|
createdAt?: Date | undefined;
|
|
@@ -2,7 +2,7 @@ import * as _tanstack_react_query from '@tanstack/react-query';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { ResourceFormConfig, ResourceFormResult } from '@btst/stack/plugins/client/hooks';
|
|
4
4
|
import { S as SerializedPost, a as SerializedTag } from './stack.Dsatjh0B.cjs';
|
|
5
|
-
import { c as createPostSchema, u as updatePostSchema } from './stack.
|
|
5
|
+
import { c as createPostSchema, u as updatePostSchema } from './stack.D18Dq3ve.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Options for the usePosts hook
|
|
@@ -137,9 +137,6 @@ declare function usePostForm<TValues>(config: ResourceFormConfig<TValues, Serial
|
|
|
137
137
|
/** Create a new post */
|
|
138
138
|
declare function useCreatePost(): _tanstack_react_query.UseMutationResult<SerializedPost | null, Error, {
|
|
139
139
|
title: string;
|
|
140
|
-
content: string;
|
|
141
|
-
excerpt: string;
|
|
142
|
-
published: boolean;
|
|
143
140
|
tags: ({
|
|
144
141
|
name: string;
|
|
145
142
|
} | {
|
|
@@ -147,6 +144,9 @@ declare function useCreatePost(): _tanstack_react_query.UseMutationResult<Serial
|
|
|
147
144
|
name: string;
|
|
148
145
|
slug: string;
|
|
149
146
|
})[];
|
|
147
|
+
content: string;
|
|
148
|
+
excerpt: string;
|
|
149
|
+
published: boolean;
|
|
150
150
|
slug?: string | undefined;
|
|
151
151
|
publishedAt?: Date | undefined;
|
|
152
152
|
createdAt?: Date | undefined;
|
|
@@ -25,10 +25,15 @@ interface StackClientLike {
|
|
|
25
25
|
* QueryClient (per-request on the server, singleton on the client).
|
|
26
26
|
*/
|
|
27
27
|
type GetStackClient = (queryClient: QueryClient) => StackClientLike;
|
|
28
|
+
/**
|
|
29
|
+
* Consumer-provided resolver for lifecycle phases that can await request-aware
|
|
30
|
+
* stack client creation.
|
|
31
|
+
*/
|
|
32
|
+
type ResolveStackClient<TContext> = (queryClient: QueryClient, context: TContext) => StackClientLike | PromiseLike<StackClientLike>;
|
|
28
33
|
/**
|
|
29
34
|
* A framework-agnostic BTST API handler, as returned by
|
|
30
35
|
* `createBackendHandler(...).handler`.
|
|
31
36
|
*/
|
|
32
37
|
type StackRequestHandler = (request: Request) => Response | Promise<Response>;
|
|
33
38
|
|
|
34
|
-
export type { GetStackClient as G, StackRequestHandler as S };
|
|
39
|
+
export type { GetStackClient as G, ResolveStackClient as R, StackRequestHandler as S };
|
|
@@ -25,10 +25,15 @@ interface StackClientLike {
|
|
|
25
25
|
* QueryClient (per-request on the server, singleton on the client).
|
|
26
26
|
*/
|
|
27
27
|
type GetStackClient = (queryClient: QueryClient) => StackClientLike;
|
|
28
|
+
/**
|
|
29
|
+
* Consumer-provided resolver for lifecycle phases that can await request-aware
|
|
30
|
+
* stack client creation.
|
|
31
|
+
*/
|
|
32
|
+
type ResolveStackClient<TContext> = (queryClient: QueryClient, context: TContext) => StackClientLike | PromiseLike<StackClientLike>;
|
|
28
33
|
/**
|
|
29
34
|
* A framework-agnostic BTST API handler, as returned by
|
|
30
35
|
* `createBackendHandler(...).handler`.
|
|
31
36
|
*/
|
|
32
37
|
type StackRequestHandler = (request: Request) => Response | Promise<Response>;
|
|
33
38
|
|
|
34
|
-
export type { GetStackClient as G, StackRequestHandler as S };
|
|
39
|
+
export type { GetStackClient as G, ResolveStackClient as R, StackRequestHandler as S };
|
|
@@ -25,10 +25,15 @@ interface StackClientLike {
|
|
|
25
25
|
* QueryClient (per-request on the server, singleton on the client).
|
|
26
26
|
*/
|
|
27
27
|
type GetStackClient = (queryClient: QueryClient) => StackClientLike;
|
|
28
|
+
/**
|
|
29
|
+
* Consumer-provided resolver for lifecycle phases that can await request-aware
|
|
30
|
+
* stack client creation.
|
|
31
|
+
*/
|
|
32
|
+
type ResolveStackClient<TContext> = (queryClient: QueryClient, context: TContext) => StackClientLike | PromiseLike<StackClientLike>;
|
|
28
33
|
/**
|
|
29
34
|
* A framework-agnostic BTST API handler, as returned by
|
|
30
35
|
* `createBackendHandler(...).handler`.
|
|
31
36
|
*/
|
|
32
37
|
type StackRequestHandler = (request: Request) => Response | Promise<Response>;
|
|
33
38
|
|
|
34
|
-
export type { GetStackClient as G, StackRequestHandler as S };
|
|
39
|
+
export type { GetStackClient as G, ResolveStackClient as R, StackRequestHandler as S };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _btst_stack_plugins_client from '@btst/stack/plugins/client';
|
|
2
2
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { c as createPostSchema, u as updatePostSchema } from './stack.
|
|
4
|
+
import { c as createPostSchema, u as updatePostSchema } from './stack.D18Dq3ve.js';
|
|
5
5
|
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from './stack.Dsatjh0B.js';
|
|
6
6
|
import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
|
|
7
7
|
import { DBAdapter } from '@btst/db';
|
|
@@ -317,12 +317,6 @@ declare const blogBackendPlugin: (hooks?: BlogBackendHooks) => _btst_stack_plugi
|
|
|
317
317
|
title: string;
|
|
318
318
|
content: string;
|
|
319
319
|
excerpt: string;
|
|
320
|
-
slug?: string | undefined;
|
|
321
|
-
publishedAt?: unknown;
|
|
322
|
-
createdAt?: unknown;
|
|
323
|
-
updatedAt?: unknown;
|
|
324
|
-
image?: string | undefined;
|
|
325
|
-
published?: boolean | undefined;
|
|
326
320
|
tags?: ({
|
|
327
321
|
name: string;
|
|
328
322
|
} | {
|
|
@@ -330,16 +324,16 @@ declare const blogBackendPlugin: (hooks?: BlogBackendHooks) => _btst_stack_plugi
|
|
|
330
324
|
name: string;
|
|
331
325
|
slug: string;
|
|
332
326
|
})[] | undefined;
|
|
333
|
-
}, {
|
|
334
|
-
title: string;
|
|
335
|
-
content: string;
|
|
336
|
-
excerpt: string;
|
|
337
327
|
slug?: string | undefined;
|
|
338
328
|
publishedAt?: unknown;
|
|
339
329
|
createdAt?: unknown;
|
|
340
330
|
updatedAt?: unknown;
|
|
341
331
|
image?: string | undefined;
|
|
342
332
|
published?: boolean | undefined;
|
|
333
|
+
}, {
|
|
334
|
+
title: string;
|
|
335
|
+
content: string;
|
|
336
|
+
excerpt: string;
|
|
343
337
|
tags?: ({
|
|
344
338
|
name: string;
|
|
345
339
|
} | {
|
|
@@ -347,6 +341,12 @@ declare const blogBackendPlugin: (hooks?: BlogBackendHooks) => _btst_stack_plugi
|
|
|
347
341
|
name: string;
|
|
348
342
|
slug: string;
|
|
349
343
|
})[] | undefined;
|
|
344
|
+
slug?: string | undefined;
|
|
345
|
+
publishedAt?: unknown;
|
|
346
|
+
createdAt?: unknown;
|
|
347
|
+
updatedAt?: unknown;
|
|
348
|
+
image?: string | undefined;
|
|
349
|
+
published?: boolean | undefined;
|
|
350
350
|
}>;
|
|
351
351
|
}, Post>;
|
|
352
352
|
readonly updatePost: better_call.StrictEndpoint<"/posts/:id", {} & {
|
|
@@ -2,7 +2,7 @@ import * as _tanstack_react_query from '@tanstack/react-query';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { ResourceFormConfig, ResourceFormResult } from '@btst/stack/plugins/client/hooks';
|
|
4
4
|
import { S as SerializedPost, a as SerializedTag } from './stack.Dsatjh0B.mjs';
|
|
5
|
-
import { c as createPostSchema, u as updatePostSchema } from './stack.
|
|
5
|
+
import { c as createPostSchema, u as updatePostSchema } from './stack.D18Dq3ve.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Options for the usePosts hook
|
|
@@ -137,9 +137,6 @@ declare function usePostForm<TValues>(config: ResourceFormConfig<TValues, Serial
|
|
|
137
137
|
/** Create a new post */
|
|
138
138
|
declare function useCreatePost(): _tanstack_react_query.UseMutationResult<SerializedPost | null, Error, {
|
|
139
139
|
title: string;
|
|
140
|
-
content: string;
|
|
141
|
-
excerpt: string;
|
|
142
|
-
published: boolean;
|
|
143
140
|
tags: ({
|
|
144
141
|
name: string;
|
|
145
142
|
} | {
|
|
@@ -147,6 +144,9 @@ declare function useCreatePost(): _tanstack_react_query.UseMutationResult<Serial
|
|
|
147
144
|
name: string;
|
|
148
145
|
slug: string;
|
|
149
146
|
})[];
|
|
147
|
+
content: string;
|
|
148
|
+
excerpt: string;
|
|
149
|
+
published: boolean;
|
|
150
150
|
slug?: string | undefined;
|
|
151
151
|
publishedAt?: Date | undefined;
|
|
152
152
|
createdAt?: Date | undefined;
|