@btst/stack 2.5.2 → 2.5.4
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/plugins/ai-chat/api/plugin.cjs +1 -1
- package/dist/packages/stack/src/plugins/ai-chat/api/plugin.mjs +1 -1
- package/dist/packages/stack/src/plugins/route-docs/generator.cjs +2 -1
- package/dist/packages/stack/src/plugins/route-docs/generator.mjs +2 -1
- package/dist/packages/stack/src/plugins/ui-builder/client/components/page-renderer.cjs +7 -1
- package/dist/packages/stack/src/plugins/ui-builder/client/components/page-renderer.mjs +7 -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 +3 -3
- package/dist/plugins/blog/client/hooks/index.d.mts +3 -3
- package/dist/plugins/blog/client/hooks/index.d.ts +3 -3
- package/dist/plugins/blog/client/index.d.cts +1 -1
- package/dist/plugins/blog/client/index.d.mts +1 -1
- package/dist/plugins/blog/client/index.d.ts +1 -1
- 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/kanban/style.css +548 -1
- package/dist/plugins/ui-builder/client/components/index.d.cts +5 -3
- package/dist/plugins/ui-builder/client/components/index.d.mts +5 -3
- package/dist/plugins/ui-builder/client/components/index.d.ts +5 -3
- package/dist/plugins/ui-builder/client/hooks/index.d.cts +2 -2
- package/dist/plugins/ui-builder/client/hooks/index.d.mts +2 -2
- package/dist/plugins/ui-builder/client/hooks/index.d.ts +2 -2
- package/dist/plugins/ui-builder/client/index.d.cts +2 -2
- package/dist/plugins/ui-builder/client/index.d.mts +2 -2
- package/dist/plugins/ui-builder/client/index.d.ts +2 -2
- 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/plugins/ui-builder/style.css +548 -1
- package/dist/shared/{stack.Cj_zKww4.d.ts → stack.B2DwzF3r.d.ts} +1 -1
- package/dist/shared/{stack.DXnclTG7.d.ts → stack.B8_74ror.d.ts} +4 -4
- package/dist/shared/{stack.DaZM10cp.d.cts → stack.C21-LFX8.d.cts} +4 -4
- package/dist/shared/{stack.B-YHz18S.d.cts → stack.C5ZSOJGJ.d.cts} +29 -2
- package/dist/shared/{stack.cfCkioTe.d.mts → stack.CL4mKxe7.d.mts} +4 -4
- package/dist/shared/{stack.dH7u-TJH.d.mts → stack.Cl7ok_cY.d.cts} +1 -1
- package/dist/shared/{stack.GygI_T3X.d.ts → stack.D0QupDcQ.d.ts} +29 -2
- package/dist/shared/{stack.D1DMlJp-.d.mts → stack.Dq4qVr1F.d.mts} +29 -2
- package/dist/shared/{stack.B2xZTSiO.d.cts → stack.VMmQdbsJ.d.mts} +1 -1
- package/package.json +1 -1
- package/src/plugins/ai-chat/api/plugin.ts +2 -1
- package/src/plugins/route-docs/generator.ts +3 -1
- package/src/plugins/ui-builder/client/components/page-renderer.tsx +9 -0
- package/src/plugins/ui-builder/index.ts +1 -0
- package/src/plugins/ui-builder/types.ts +1 -0
- package/dist/plugins/shared/components-minimal-tiptap-styles.css +0 -547
- package/dist/shared/{stack.BQmuNl5p.d.mts → stack.BWp0hcm9.d.cts} +3 -3
- package/dist/shared/{stack.BQmuNl5p.d.ts → stack.BWp0hcm9.d.mts} +3 -3
- package/dist/shared/{stack.BQmuNl5p.d.cts → stack.BWp0hcm9.d.ts} +3 -3
|
@@ -86,7 +86,7 @@ const aiChatBackendPlugin = (config) => api.defineBackendPlugin({
|
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
const firstMessageContent = getMessageTextContent(firstMessage);
|
|
89
|
-
const modelMessages = ai.convertToModelMessages(uiMessages);
|
|
89
|
+
const modelMessages = await ai.convertToModelMessages(uiMessages);
|
|
90
90
|
const pageContextContent = pageContext && pageContext.trim() ? `
|
|
91
91
|
|
|
92
92
|
Current page context:
|
|
@@ -84,7 +84,7 @@ const aiChatBackendPlugin = (config) => defineBackendPlugin({
|
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
const firstMessageContent = getMessageTextContent(firstMessage);
|
|
87
|
-
const modelMessages = convertToModelMessages(uiMessages);
|
|
87
|
+
const modelMessages = await convertToModelMessages(uiMessages);
|
|
88
88
|
const pageContextContent = pageContext && pageContext.trim() ? `
|
|
89
89
|
|
|
90
90
|
Current page context:
|
|
@@ -66,7 +66,8 @@ function processZodType(zodType) {
|
|
|
66
66
|
}
|
|
67
67
|
if (zodType instanceof z__namespace.ZodDefault) {
|
|
68
68
|
const innerType = zodType._def?.innerType;
|
|
69
|
-
const
|
|
69
|
+
const rawDefault = zodType._def?.defaultValue;
|
|
70
|
+
const defaultValue = typeof rawDefault === "function" ? rawDefault() : rawDefault;
|
|
70
71
|
if (innerType) {
|
|
71
72
|
const innerSchema = processZodType(innerType);
|
|
72
73
|
if (defaultValue !== void 0) {
|
|
@@ -50,7 +50,8 @@ function processZodType(zodType) {
|
|
|
50
50
|
}
|
|
51
51
|
if (zodType instanceof z.ZodDefault) {
|
|
52
52
|
const innerType = zodType._def?.innerType;
|
|
53
|
-
const
|
|
53
|
+
const rawDefault = zodType._def?.defaultValue;
|
|
54
|
+
const defaultValue = typeof rawDefault === "function" ? rawDefault() : rawDefault;
|
|
54
55
|
if (innerType) {
|
|
55
56
|
const innerSchema = processZodType(innerType);
|
|
56
57
|
if (defaultValue !== void 0) {
|
|
@@ -25,6 +25,7 @@ function PageRenderer({
|
|
|
25
25
|
slug,
|
|
26
26
|
componentRegistry = registry.defaultComponentRegistry,
|
|
27
27
|
variableValues,
|
|
28
|
+
functionRegistry,
|
|
28
29
|
LoadingComponent = DefaultLoadingComponent,
|
|
29
30
|
ErrorComponent = DefaultErrorComponent,
|
|
30
31
|
NotFoundComponent = DefaultNotFoundComponent,
|
|
@@ -40,6 +41,7 @@ function PageRenderer({
|
|
|
40
41
|
slug,
|
|
41
42
|
componentRegistry,
|
|
42
43
|
variableValues,
|
|
44
|
+
functionRegistry,
|
|
43
45
|
NotFoundComponent,
|
|
44
46
|
className
|
|
45
47
|
}
|
|
@@ -51,6 +53,7 @@ function SuspensePageRendererContent({
|
|
|
51
53
|
slug,
|
|
52
54
|
componentRegistry = registry.defaultComponentRegistry,
|
|
53
55
|
variableValues,
|
|
56
|
+
functionRegistry,
|
|
54
57
|
NotFoundComponent = DefaultNotFoundComponent,
|
|
55
58
|
className
|
|
56
59
|
}) {
|
|
@@ -69,7 +72,8 @@ function SuspensePageRendererContent({
|
|
|
69
72
|
page: rootLayer,
|
|
70
73
|
componentRegistry,
|
|
71
74
|
variables,
|
|
72
|
-
variableValues
|
|
75
|
+
variableValues,
|
|
76
|
+
functionRegistry
|
|
73
77
|
}
|
|
74
78
|
);
|
|
75
79
|
}
|
|
@@ -77,6 +81,7 @@ function SuspensePageRenderer({
|
|
|
77
81
|
slug,
|
|
78
82
|
componentRegistry = registry.defaultComponentRegistry,
|
|
79
83
|
variableValues,
|
|
84
|
+
functionRegistry,
|
|
80
85
|
NotFoundComponent = DefaultNotFoundComponent,
|
|
81
86
|
className
|
|
82
87
|
}) {
|
|
@@ -86,6 +91,7 @@ function SuspensePageRenderer({
|
|
|
86
91
|
slug,
|
|
87
92
|
componentRegistry,
|
|
88
93
|
variableValues,
|
|
94
|
+
functionRegistry,
|
|
89
95
|
NotFoundComponent,
|
|
90
96
|
className
|
|
91
97
|
}
|
|
@@ -23,6 +23,7 @@ function PageRenderer({
|
|
|
23
23
|
slug,
|
|
24
24
|
componentRegistry = defaultComponentRegistry,
|
|
25
25
|
variableValues,
|
|
26
|
+
functionRegistry,
|
|
26
27
|
LoadingComponent = DefaultLoadingComponent,
|
|
27
28
|
ErrorComponent = DefaultErrorComponent,
|
|
28
29
|
NotFoundComponent = DefaultNotFoundComponent,
|
|
@@ -38,6 +39,7 @@ function PageRenderer({
|
|
|
38
39
|
slug,
|
|
39
40
|
componentRegistry,
|
|
40
41
|
variableValues,
|
|
42
|
+
functionRegistry,
|
|
41
43
|
NotFoundComponent,
|
|
42
44
|
className
|
|
43
45
|
}
|
|
@@ -49,6 +51,7 @@ function SuspensePageRendererContent({
|
|
|
49
51
|
slug,
|
|
50
52
|
componentRegistry = defaultComponentRegistry,
|
|
51
53
|
variableValues,
|
|
54
|
+
functionRegistry,
|
|
52
55
|
NotFoundComponent = DefaultNotFoundComponent,
|
|
53
56
|
className
|
|
54
57
|
}) {
|
|
@@ -67,7 +70,8 @@ function SuspensePageRendererContent({
|
|
|
67
70
|
page: rootLayer,
|
|
68
71
|
componentRegistry,
|
|
69
72
|
variables,
|
|
70
|
-
variableValues
|
|
73
|
+
variableValues,
|
|
74
|
+
functionRegistry
|
|
71
75
|
}
|
|
72
76
|
);
|
|
73
77
|
}
|
|
@@ -75,6 +79,7 @@ function SuspensePageRenderer({
|
|
|
75
79
|
slug,
|
|
76
80
|
componentRegistry = defaultComponentRegistry,
|
|
77
81
|
variableValues,
|
|
82
|
+
functionRegistry,
|
|
78
83
|
NotFoundComponent = DefaultNotFoundComponent,
|
|
79
84
|
className
|
|
80
85
|
}) {
|
|
@@ -84,6 +89,7 @@ function SuspensePageRenderer({
|
|
|
84
89
|
slug,
|
|
85
90
|
componentRegistry,
|
|
86
91
|
variableValues,
|
|
92
|
+
functionRegistry,
|
|
87
93
|
NotFoundComponent,
|
|
88
94
|
className
|
|
89
95
|
}
|
|
@@ -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.C21-LFX8.cjs';
|
|
2
|
+
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.BWp0hcm9.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.CL4mKxe7.mjs';
|
|
2
|
+
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.BWp0hcm9.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.B8_74ror.js';
|
|
2
|
+
import { P as Post, T as Tag, S as SerializedPost, a as SerializedTag } from '../../../shared/stack.BWp0hcm9.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.BWp0hcm9.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -135,14 +135,14 @@ declare function useCreatePost(): _tanstack_react_query.UseMutationResult<Serial
|
|
|
135
135
|
name: string;
|
|
136
136
|
slug: string;
|
|
137
137
|
})[];
|
|
138
|
+
published: boolean;
|
|
138
139
|
title: string;
|
|
139
140
|
content: string;
|
|
140
141
|
excerpt: string;
|
|
141
|
-
published: boolean;
|
|
142
142
|
slug?: string | undefined;
|
|
143
|
+
publishedAt?: Date | undefined;
|
|
143
144
|
createdAt?: Date | undefined;
|
|
144
145
|
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.BWp0hcm9.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -135,14 +135,14 @@ declare function useCreatePost(): _tanstack_react_query.UseMutationResult<Serial
|
|
|
135
135
|
name: string;
|
|
136
136
|
slug: string;
|
|
137
137
|
})[];
|
|
138
|
+
published: boolean;
|
|
138
139
|
title: string;
|
|
139
140
|
content: string;
|
|
140
141
|
excerpt: string;
|
|
141
|
-
published: boolean;
|
|
142
142
|
slug?: string | undefined;
|
|
143
|
+
publishedAt?: Date | undefined;
|
|
143
144
|
createdAt?: Date | undefined;
|
|
144
145
|
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.BWp0hcm9.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -135,14 +135,14 @@ declare function useCreatePost(): _tanstack_react_query.UseMutationResult<Serial
|
|
|
135
135
|
name: string;
|
|
136
136
|
slug: string;
|
|
137
137
|
})[];
|
|
138
|
+
published: boolean;
|
|
138
139
|
title: string;
|
|
139
140
|
content: string;
|
|
140
141
|
excerpt: string;
|
|
141
|
-
published: boolean;
|
|
142
142
|
slug?: string | undefined;
|
|
143
|
+
publishedAt?: Date | undefined;
|
|
143
144
|
createdAt?: Date | undefined;
|
|
144
145
|
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.BWp0hcm9.cjs';
|
|
7
7
|
export { UsePostsOptions, UsePostsResult } from './hooks/index.cjs';
|
|
8
8
|
import 'zod';
|
|
9
9
|
|
|
@@ -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.BWp0hcm9.mjs';
|
|
7
7
|
export { UsePostsOptions, UsePostsResult } from './hooks/index.mjs';
|
|
8
8
|
import 'zod';
|
|
9
9
|
|
|
@@ -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.BWp0hcm9.js';
|
|
7
7
|
export { UsePostsOptions, UsePostsResult } from './hooks/index.js';
|
|
8
8
|
import 'zod';
|
|
9
9
|
|
|
@@ -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.C21-LFX8.cjs';
|
|
3
3
|
import '@btst/stack/plugins/client';
|
|
4
|
-
import '../../shared/stack.
|
|
4
|
+
import '../../shared/stack.BWp0hcm9.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.CL4mKxe7.mjs';
|
|
3
3
|
import '@btst/stack/plugins/client';
|
|
4
|
-
import '../../shared/stack.
|
|
4
|
+
import '../../shared/stack.BWp0hcm9.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.B8_74ror.js';
|
|
3
3
|
import '@btst/stack/plugins/client';
|
|
4
|
-
import '../../shared/stack.
|
|
4
|
+
import '../../shared/stack.BWp0hcm9.js';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
6
6
|
import 'better-call';
|
|
7
7
|
import '@btst/db';
|