@btst/stack 2.5.3 → 2.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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/packages/stack/src/plugins/ui-builder/client/registry.cjs +309 -37
- package/dist/packages/stack/src/plugins/ui-builder/client/registry.mjs +310 -38
- package/dist/packages/ui/src/lib/ui-builder/registry/form-field-overrides.cjs +207 -0
- package/dist/packages/ui/src/lib/ui-builder/registry/form-field-overrides.mjs +206 -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/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/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/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/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.B2xZTSiO.d.cts → 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.dH7u-TJH.d.mts → stack.VMmQdbsJ.d.mts} +1 -1
- package/package.json +1 -1
- package/src/plugins/ai-chat/api/plugin.ts +2 -1
- package/src/plugins/ui-builder/client/components/page-renderer.tsx +9 -0
- package/src/plugins/ui-builder/client/registry.ts +295 -19
- package/src/plugins/ui-builder/index.ts +1 -0
- package/src/plugins/ui-builder/types.ts +1 -0
- package/dist/shared/{stack.DMobugrZ.d.ts → stack.BFcg0tDz.d.ts} +9 -9
- package/dist/shared/{stack.BQmuNl5p.d.ts → stack.BWp0hcm9.d.cts} +3 -3
- package/dist/shared/{stack.BQmuNl5p.d.cts → stack.BWp0hcm9.d.mts} +3 -3
- package/dist/shared/{stack.BQmuNl5p.d.mts → stack.BWp0hcm9.d.ts} +3 -3
- package/dist/shared/{stack.Ba_Ks8qi.d.mts → stack.CxNeGV2z.d.mts} +9 -9
- package/dist/shared/{stack.CFqqZUes.d.cts → stack.DSxTDZBQ.d.cts} +9 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import { K as KanbanApiRouter, j as BoardsListDiscriminator } from '../../shared/stack.
|
|
2
|
+
import { K as KanbanApiRouter, j as BoardsListDiscriminator } from '../../shared/stack.DSxTDZBQ.cjs';
|
|
3
3
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
4
4
|
import { S as SerializedBoardWithColumns } from '../../shared/stack.DJaKVY7v.cjs';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import { K as KanbanApiRouter, j as BoardsListDiscriminator } from '../../shared/stack.
|
|
2
|
+
import { K as KanbanApiRouter, j as BoardsListDiscriminator } from '../../shared/stack.CxNeGV2z.mjs';
|
|
3
3
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
4
4
|
import { S as SerializedBoardWithColumns } from '../../shared/stack.DJaKVY7v.mjs';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import { K as KanbanApiRouter, j as BoardsListDiscriminator } from '../../shared/stack.
|
|
2
|
+
import { K as KanbanApiRouter, j as BoardsListDiscriminator } from '../../shared/stack.BFcg0tDz.js';
|
|
3
3
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
4
4
|
import { S as SerializedBoardWithColumns } from '../../shared/stack.DJaKVY7v.js';
|
|
5
5
|
import '@btst/stack/plugins/api';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentType, ReactNode } from 'react';
|
|
2
|
-
import { a as ComponentRegistry, P as PropValue } from '../../../../shared/stack.
|
|
2
|
+
import { a as ComponentRegistry, P as PropValue, F as FunctionRegistry } from '../../../../shared/stack.C5ZSOJGJ.cjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../../../shared/stack.8nldKomx.cjs';
|
|
@@ -12,6 +12,8 @@ interface PageRendererProps {
|
|
|
12
12
|
componentRegistry?: ComponentRegistry;
|
|
13
13
|
/** Runtime variable values to override defaults */
|
|
14
14
|
variableValues?: Record<string, PropValue>;
|
|
15
|
+
/** Function registry for resolving function-type variable bindings */
|
|
16
|
+
functionRegistry?: FunctionRegistry;
|
|
15
17
|
/** Custom loading component */
|
|
16
18
|
LoadingComponent?: ComponentType;
|
|
17
19
|
/** Custom error component */
|
|
@@ -80,7 +82,7 @@ interface PageRendererProps {
|
|
|
80
82
|
* }
|
|
81
83
|
* ```
|
|
82
84
|
*/
|
|
83
|
-
declare function PageRenderer({ slug, componentRegistry, variableValues, LoadingComponent, ErrorComponent, NotFoundComponent, className, }: PageRendererProps): ReactNode;
|
|
85
|
+
declare function PageRenderer({ slug, componentRegistry, variableValues, functionRegistry, LoadingComponent, ErrorComponent, NotFoundComponent, className, }: PageRendererProps): ReactNode;
|
|
84
86
|
/**
|
|
85
87
|
* SuspensePageRenderer - Suspense-based PageRenderer for SSR
|
|
86
88
|
*
|
|
@@ -105,7 +107,7 @@ declare function PageRenderer({ slug, componentRegistry, variableValues, Loading
|
|
|
105
107
|
* }
|
|
106
108
|
* ```
|
|
107
109
|
*/
|
|
108
|
-
declare function SuspensePageRenderer({ slug, componentRegistry, variableValues, NotFoundComponent, className, }: Omit<PageRendererProps, "LoadingComponent" | "ErrorComponent">): ReactNode;
|
|
110
|
+
declare function SuspensePageRenderer({ slug, componentRegistry, variableValues, functionRegistry, NotFoundComponent, className, }: Omit<PageRendererProps, "LoadingComponent" | "ErrorComponent">): ReactNode;
|
|
109
111
|
|
|
110
112
|
declare function PageListPage(): react_jsx_runtime.JSX.Element;
|
|
111
113
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentType, ReactNode } from 'react';
|
|
2
|
-
import { a as ComponentRegistry, P as PropValue } from '../../../../shared/stack.
|
|
2
|
+
import { a as ComponentRegistry, P as PropValue, F as FunctionRegistry } from '../../../../shared/stack.Dq4qVr1F.mjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../../../shared/stack.8nldKomx.mjs';
|
|
@@ -12,6 +12,8 @@ interface PageRendererProps {
|
|
|
12
12
|
componentRegistry?: ComponentRegistry;
|
|
13
13
|
/** Runtime variable values to override defaults */
|
|
14
14
|
variableValues?: Record<string, PropValue>;
|
|
15
|
+
/** Function registry for resolving function-type variable bindings */
|
|
16
|
+
functionRegistry?: FunctionRegistry;
|
|
15
17
|
/** Custom loading component */
|
|
16
18
|
LoadingComponent?: ComponentType;
|
|
17
19
|
/** Custom error component */
|
|
@@ -80,7 +82,7 @@ interface PageRendererProps {
|
|
|
80
82
|
* }
|
|
81
83
|
* ```
|
|
82
84
|
*/
|
|
83
|
-
declare function PageRenderer({ slug, componentRegistry, variableValues, LoadingComponent, ErrorComponent, NotFoundComponent, className, }: PageRendererProps): ReactNode;
|
|
85
|
+
declare function PageRenderer({ slug, componentRegistry, variableValues, functionRegistry, LoadingComponent, ErrorComponent, NotFoundComponent, className, }: PageRendererProps): ReactNode;
|
|
84
86
|
/**
|
|
85
87
|
* SuspensePageRenderer - Suspense-based PageRenderer for SSR
|
|
86
88
|
*
|
|
@@ -105,7 +107,7 @@ declare function PageRenderer({ slug, componentRegistry, variableValues, Loading
|
|
|
105
107
|
* }
|
|
106
108
|
* ```
|
|
107
109
|
*/
|
|
108
|
-
declare function SuspensePageRenderer({ slug, componentRegistry, variableValues, NotFoundComponent, className, }: Omit<PageRendererProps, "LoadingComponent" | "ErrorComponent">): ReactNode;
|
|
110
|
+
declare function SuspensePageRenderer({ slug, componentRegistry, variableValues, functionRegistry, NotFoundComponent, className, }: Omit<PageRendererProps, "LoadingComponent" | "ErrorComponent">): ReactNode;
|
|
109
111
|
|
|
110
112
|
declare function PageListPage(): react_jsx_runtime.JSX.Element;
|
|
111
113
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentType, ReactNode } from 'react';
|
|
2
|
-
import { a as ComponentRegistry, P as PropValue } from '../../../../shared/stack.
|
|
2
|
+
import { a as ComponentRegistry, P as PropValue, F as FunctionRegistry } from '../../../../shared/stack.D0QupDcQ.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../../../shared/stack.8nldKomx.js';
|
|
@@ -12,6 +12,8 @@ interface PageRendererProps {
|
|
|
12
12
|
componentRegistry?: ComponentRegistry;
|
|
13
13
|
/** Runtime variable values to override defaults */
|
|
14
14
|
variableValues?: Record<string, PropValue>;
|
|
15
|
+
/** Function registry for resolving function-type variable bindings */
|
|
16
|
+
functionRegistry?: FunctionRegistry;
|
|
15
17
|
/** Custom loading component */
|
|
16
18
|
LoadingComponent?: ComponentType;
|
|
17
19
|
/** Custom error component */
|
|
@@ -80,7 +82,7 @@ interface PageRendererProps {
|
|
|
80
82
|
* }
|
|
81
83
|
* ```
|
|
82
84
|
*/
|
|
83
|
-
declare function PageRenderer({ slug, componentRegistry, variableValues, LoadingComponent, ErrorComponent, NotFoundComponent, className, }: PageRendererProps): ReactNode;
|
|
85
|
+
declare function PageRenderer({ slug, componentRegistry, variableValues, functionRegistry, LoadingComponent, ErrorComponent, NotFoundComponent, className, }: PageRendererProps): ReactNode;
|
|
84
86
|
/**
|
|
85
87
|
* SuspensePageRenderer - Suspense-based PageRenderer for SSR
|
|
86
88
|
*
|
|
@@ -105,7 +107,7 @@ declare function PageRenderer({ slug, componentRegistry, variableValues, Loading
|
|
|
105
107
|
* }
|
|
106
108
|
* ```
|
|
107
109
|
*/
|
|
108
|
-
declare function SuspensePageRenderer({ slug, componentRegistry, variableValues, NotFoundComponent, className, }: Omit<PageRendererProps, "LoadingComponent" | "ErrorComponent">): ReactNode;
|
|
110
|
+
declare function SuspensePageRenderer({ slug, componentRegistry, variableValues, functionRegistry, NotFoundComponent, className, }: Omit<PageRendererProps, "LoadingComponent" | "ErrorComponent">): ReactNode;
|
|
109
111
|
|
|
110
112
|
declare function PageListPage(): react_jsx_runtime.JSX.Element;
|
|
111
113
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import { S as SerializedUIBuilderPage } from '../../../../shared/stack.
|
|
3
|
-
import { C as ComponentLayer, V as Variable } from '../../../../shared/stack.
|
|
2
|
+
import { S as SerializedUIBuilderPage } from '../../../../shared/stack.Cl7ok_cY.cjs';
|
|
3
|
+
import { C as ComponentLayer, V as Variable } from '../../../../shared/stack.C5ZSOJGJ.cjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '../../../../shared/stack.8nldKomx.cjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import { S as SerializedUIBuilderPage } from '../../../../shared/stack.
|
|
3
|
-
import { C as ComponentLayer, V as Variable } from '../../../../shared/stack.
|
|
2
|
+
import { S as SerializedUIBuilderPage } from '../../../../shared/stack.VMmQdbsJ.mjs';
|
|
3
|
+
import { C as ComponentLayer, V as Variable } from '../../../../shared/stack.Dq4qVr1F.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '../../../../shared/stack.8nldKomx.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import { S as SerializedUIBuilderPage } from '../../../../shared/stack.
|
|
3
|
-
import { C as ComponentLayer, V as Variable } from '../../../../shared/stack.
|
|
2
|
+
import { S as SerializedUIBuilderPage } from '../../../../shared/stack.B2DwzF3r.js';
|
|
3
|
+
import { C as ComponentLayer, V as Variable } from '../../../../shared/stack.D0QupDcQ.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '../../../../shared/stack.8nldKomx.js';
|
|
@@ -3,8 +3,8 @@ import * as react from 'react';
|
|
|
3
3
|
import react__default, { ComponentType } from 'react';
|
|
4
4
|
import * as _btst_yar from '@btst/yar';
|
|
5
5
|
import { QueryClient } from '@tanstack/react-query';
|
|
6
|
-
import { c as UIBuilderClientHooks } from '../../../shared/stack.
|
|
7
|
-
import { a as ComponentRegistry,
|
|
6
|
+
import { c as UIBuilderClientHooks } from '../../../shared/stack.Cl7ok_cY.cjs';
|
|
7
|
+
import { a as ComponentRegistry, b as FieldConfigFunction, C as ComponentLayer } from '../../../shared/stack.C5ZSOJGJ.cjs';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
9
|
import { A as AutoFormInputComponentProps, F as FieldConfigItem } from '../../../shared/stack.8nldKomx.cjs';
|
|
10
10
|
export { PageBuilderPage, PageListPage, PageRenderer, PageRendererProps, SuspensePageRenderer } from './components/index.cjs';
|
|
@@ -3,8 +3,8 @@ import * as react from 'react';
|
|
|
3
3
|
import react__default, { ComponentType } from 'react';
|
|
4
4
|
import * as _btst_yar from '@btst/yar';
|
|
5
5
|
import { QueryClient } from '@tanstack/react-query';
|
|
6
|
-
import { c as UIBuilderClientHooks } from '../../../shared/stack.
|
|
7
|
-
import { a as ComponentRegistry,
|
|
6
|
+
import { c as UIBuilderClientHooks } from '../../../shared/stack.VMmQdbsJ.mjs';
|
|
7
|
+
import { a as ComponentRegistry, b as FieldConfigFunction, C as ComponentLayer } from '../../../shared/stack.Dq4qVr1F.mjs';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
9
|
import { A as AutoFormInputComponentProps, F as FieldConfigItem } from '../../../shared/stack.8nldKomx.mjs';
|
|
10
10
|
export { PageBuilderPage, PageListPage, PageRenderer, PageRendererProps, SuspensePageRenderer } from './components/index.mjs';
|
|
@@ -3,8 +3,8 @@ import * as react from 'react';
|
|
|
3
3
|
import react__default, { ComponentType } from 'react';
|
|
4
4
|
import * as _btst_yar from '@btst/yar';
|
|
5
5
|
import { QueryClient } from '@tanstack/react-query';
|
|
6
|
-
import { c as UIBuilderClientHooks } from '../../../shared/stack.
|
|
7
|
-
import { a as ComponentRegistry,
|
|
6
|
+
import { c as UIBuilderClientHooks } from '../../../shared/stack.B2DwzF3r.js';
|
|
7
|
+
import { a as ComponentRegistry, b as FieldConfigFunction, C as ComponentLayer } from '../../../shared/stack.D0QupDcQ.js';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
9
|
import { A as AutoFormInputComponentProps, F as FieldConfigItem } from '../../../shared/stack.8nldKomx.js';
|
|
10
10
|
export { PageBuilderPage, PageListPage, PageRenderer, PageRendererProps, SuspensePageRenderer } from './components/index.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { C as ContentTypeConfig } from '../../shared/stack.B8QD11QU.cjs';
|
|
3
|
-
export { L as LoaderContext, b as PaginatedUIBuilderPages, P as ParsedUIBuilderPage, S as SerializedUIBuilderPage, c as UIBuilderClientHooks, a as UIBuilderPage, U as UIBuilderPageData } from '../../shared/stack.
|
|
4
|
-
export { C as ComponentLayer, a as ComponentRegistry, R as RegistryEntry, V as Variable } from '../../shared/stack.
|
|
3
|
+
export { L as LoaderContext, b as PaginatedUIBuilderPages, P as ParsedUIBuilderPage, S as SerializedUIBuilderPage, c as UIBuilderClientHooks, a as UIBuilderPage, U as UIBuilderPageData } from '../../shared/stack.Cl7ok_cY.cjs';
|
|
4
|
+
export { C as ComponentLayer, a as ComponentRegistry, F as FunctionRegistry, R as RegistryEntry, V as Variable } from '../../shared/stack.C5ZSOJGJ.cjs';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '../../shared/stack.8nldKomx.cjs';
|
|
7
7
|
import 'react-hook-form';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { C as ContentTypeConfig } from '../../shared/stack.B8QD11QU.mjs';
|
|
3
|
-
export { L as LoaderContext, b as PaginatedUIBuilderPages, P as ParsedUIBuilderPage, S as SerializedUIBuilderPage, c as UIBuilderClientHooks, a as UIBuilderPage, U as UIBuilderPageData } from '../../shared/stack.
|
|
4
|
-
export { C as ComponentLayer, a as ComponentRegistry, R as RegistryEntry, V as Variable } from '../../shared/stack.
|
|
3
|
+
export { L as LoaderContext, b as PaginatedUIBuilderPages, P as ParsedUIBuilderPage, S as SerializedUIBuilderPage, c as UIBuilderClientHooks, a as UIBuilderPage, U as UIBuilderPageData } from '../../shared/stack.VMmQdbsJ.mjs';
|
|
4
|
+
export { C as ComponentLayer, a as ComponentRegistry, F as FunctionRegistry, R as RegistryEntry, V as Variable } from '../../shared/stack.Dq4qVr1F.mjs';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '../../shared/stack.8nldKomx.mjs';
|
|
7
7
|
import 'react-hook-form';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { C as ContentTypeConfig } from '../../shared/stack.B8QD11QU.js';
|
|
3
|
-
export { L as LoaderContext, b as PaginatedUIBuilderPages, P as ParsedUIBuilderPage, S as SerializedUIBuilderPage, c as UIBuilderClientHooks, a as UIBuilderPage, U as UIBuilderPageData } from '../../shared/stack.
|
|
4
|
-
export { C as ComponentLayer, a as ComponentRegistry, R as RegistryEntry, V as Variable } from '../../shared/stack.
|
|
3
|
+
export { L as LoaderContext, b as PaginatedUIBuilderPages, P as ParsedUIBuilderPage, S as SerializedUIBuilderPage, c as UIBuilderClientHooks, a as UIBuilderPage, U as UIBuilderPageData } from '../../shared/stack.B2DwzF3r.js';
|
|
4
|
+
export { C as ComponentLayer, a as ComponentRegistry, F as FunctionRegistry, R as RegistryEntry, V as Variable } from '../../shared/stack.D0QupDcQ.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '../../shared/stack.8nldKomx.js';
|
|
7
7
|
import 'react-hook-form';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { QueryClient } from '@tanstack/react-query';
|
|
3
3
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
4
|
-
import { P as Post, T as Tag, c as createPostSchema, u as updatePostSchema, S as SerializedPost, a as SerializedTag } from './stack.
|
|
4
|
+
import { P as Post, T as Tag, c as createPostSchema, u as updatePostSchema, S as SerializedPost, a as SerializedTag } from './stack.BWp0hcm9.js';
|
|
5
5
|
import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
|
|
6
6
|
import * as better_call from 'better-call';
|
|
7
7
|
import { Adapter } from '@btst/db';
|
|
@@ -218,15 +218,15 @@ declare const blogBackendPlugin: (hooks?: BlogBackendHooks) => _btst_stack_plugi
|
|
|
218
218
|
name: z.ZodString;
|
|
219
219
|
slug: z.ZodString;
|
|
220
220
|
}, z.core.$strip>]>>>>;
|
|
221
|
-
title: z.ZodString;
|
|
222
221
|
slug: z.ZodOptional<z.ZodString>;
|
|
222
|
+
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
223
|
+
publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
223
224
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
224
225
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
225
|
-
|
|
226
|
+
title: z.ZodString;
|
|
226
227
|
content: z.ZodString;
|
|
227
228
|
excerpt: z.ZodString;
|
|
228
229
|
image: z.ZodOptional<z.ZodString>;
|
|
229
|
-
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
230
230
|
}, z.core.$strip>;
|
|
231
231
|
}, Post>;
|
|
232
232
|
readonly updatePost: better_call.StrictEndpoint<"/posts/:id", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { QueryClient } from '@tanstack/react-query';
|
|
3
3
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
4
|
-
import { P as Post, T as Tag, c as createPostSchema, u as updatePostSchema, S as SerializedPost, a as SerializedTag } from './stack.
|
|
4
|
+
import { P as Post, T as Tag, c as createPostSchema, u as updatePostSchema, S as SerializedPost, a as SerializedTag } from './stack.BWp0hcm9.cjs';
|
|
5
5
|
import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
|
|
6
6
|
import * as better_call from 'better-call';
|
|
7
7
|
import { Adapter } from '@btst/db';
|
|
@@ -218,15 +218,15 @@ declare const blogBackendPlugin: (hooks?: BlogBackendHooks) => _btst_stack_plugi
|
|
|
218
218
|
name: z.ZodString;
|
|
219
219
|
slug: z.ZodString;
|
|
220
220
|
}, z.core.$strip>]>>>>;
|
|
221
|
-
title: z.ZodString;
|
|
222
221
|
slug: z.ZodOptional<z.ZodString>;
|
|
222
|
+
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
223
|
+
publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
223
224
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
224
225
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
225
|
-
|
|
226
|
+
title: z.ZodString;
|
|
226
227
|
content: z.ZodString;
|
|
227
228
|
excerpt: z.ZodString;
|
|
228
229
|
image: z.ZodOptional<z.ZodString>;
|
|
229
|
-
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
230
230
|
}, z.core.$strip>;
|
|
231
231
|
}, Post>;
|
|
232
232
|
readonly updatePost: better_call.StrictEndpoint<"/posts/:id", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ZodObject, ZodSchema } from 'zod';
|
|
1
|
+
import { ZodObject, ZodSchema, ZodTuple } from 'zod';
|
|
2
2
|
import { ReactNode, ComponentType } from 'react';
|
|
3
3
|
import { F as FieldConfigItem } from './stack.8nldKomx.cjs';
|
|
4
4
|
|
|
@@ -44,5 +44,32 @@ interface RegistryEntry<T extends ComponentType<any>> {
|
|
|
44
44
|
}
|
|
45
45
|
type FieldConfigFunction = (layer: ComponentLayer, allowVariableBinding?: boolean) => FieldConfigItem;
|
|
46
46
|
type ComponentRegistry = Record<string, RegistryEntry<ComponentType<any>>>;
|
|
47
|
+
/**
|
|
48
|
+
* Function definition for the function registry.
|
|
49
|
+
* Describes a function that can be bound to component event handlers.
|
|
50
|
+
*/
|
|
51
|
+
interface FunctionDefinition {
|
|
52
|
+
/** Human-readable name for the function */
|
|
53
|
+
name: string;
|
|
54
|
+
/** Zod schema describing the function parameters (use z.tuple for ordered args, z.object for named params) */
|
|
55
|
+
schema: ZodTuple<any, any> | ZodObject<any> | ZodSchema<any>;
|
|
56
|
+
/** The actual function to call at runtime */
|
|
57
|
+
fn: (...args: any[]) => any;
|
|
58
|
+
/** Optional description shown in the UI */
|
|
59
|
+
description?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Optional TypeScript type signature for code generation.
|
|
62
|
+
* Use this when the Zod schema uses z.custom<T>() or other types
|
|
63
|
+
* that can't be automatically inferred at runtime.
|
|
64
|
+
* @example "(e: React.FormEvent<HTMLFormElement>) => void"
|
|
65
|
+
* @example "(data: { name: string; email: string }) => Promise<void>"
|
|
66
|
+
*/
|
|
67
|
+
typeSignature?: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Function registry type - a record of function ID to function definition.
|
|
71
|
+
* Used to provide callable functions that can be bound to component event handlers.
|
|
72
|
+
*/
|
|
73
|
+
type FunctionRegistry = Record<string, FunctionDefinition>;
|
|
47
74
|
|
|
48
|
-
export type { ComponentLayer as C,
|
|
75
|
+
export type { ComponentLayer as C, FunctionRegistry as F, PropValue as P, RegistryEntry as R, Variable as V, ComponentRegistry as a, FieldConfigFunction as b };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { QueryClient } from '@tanstack/react-query';
|
|
3
3
|
import { createApiClient } from '@btst/stack/plugins/client';
|
|
4
|
-
import { P as Post, T as Tag, c as createPostSchema, u as updatePostSchema, S as SerializedPost, a as SerializedTag } from './stack.
|
|
4
|
+
import { P as Post, T as Tag, c as createPostSchema, u as updatePostSchema, S as SerializedPost, a as SerializedTag } from './stack.BWp0hcm9.mjs';
|
|
5
5
|
import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
|
|
6
6
|
import * as better_call from 'better-call';
|
|
7
7
|
import { Adapter } from '@btst/db';
|
|
@@ -218,15 +218,15 @@ declare const blogBackendPlugin: (hooks?: BlogBackendHooks) => _btst_stack_plugi
|
|
|
218
218
|
name: z.ZodString;
|
|
219
219
|
slug: z.ZodString;
|
|
220
220
|
}, z.core.$strip>]>>>>;
|
|
221
|
-
title: z.ZodString;
|
|
222
221
|
slug: z.ZodOptional<z.ZodString>;
|
|
222
|
+
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
223
|
+
publishedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
223
224
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
224
225
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
225
|
-
|
|
226
|
+
title: z.ZodString;
|
|
226
227
|
content: z.ZodString;
|
|
227
228
|
excerpt: z.ZodString;
|
|
228
229
|
image: z.ZodOptional<z.ZodString>;
|
|
229
|
-
published: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
230
230
|
}, z.core.$strip>;
|
|
231
231
|
}, Post>;
|
|
232
232
|
readonly updatePost: better_call.StrictEndpoint<"/posts/:id", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ZodObject, ZodSchema } from 'zod';
|
|
1
|
+
import { ZodObject, ZodSchema, ZodTuple } from 'zod';
|
|
2
2
|
import { ReactNode, ComponentType } from 'react';
|
|
3
3
|
import { F as FieldConfigItem } from './stack.8nldKomx.js';
|
|
4
4
|
|
|
@@ -44,5 +44,32 @@ interface RegistryEntry<T extends ComponentType<any>> {
|
|
|
44
44
|
}
|
|
45
45
|
type FieldConfigFunction = (layer: ComponentLayer, allowVariableBinding?: boolean) => FieldConfigItem;
|
|
46
46
|
type ComponentRegistry = Record<string, RegistryEntry<ComponentType<any>>>;
|
|
47
|
+
/**
|
|
48
|
+
* Function definition for the function registry.
|
|
49
|
+
* Describes a function that can be bound to component event handlers.
|
|
50
|
+
*/
|
|
51
|
+
interface FunctionDefinition {
|
|
52
|
+
/** Human-readable name for the function */
|
|
53
|
+
name: string;
|
|
54
|
+
/** Zod schema describing the function parameters (use z.tuple for ordered args, z.object for named params) */
|
|
55
|
+
schema: ZodTuple<any, any> | ZodObject<any> | ZodSchema<any>;
|
|
56
|
+
/** The actual function to call at runtime */
|
|
57
|
+
fn: (...args: any[]) => any;
|
|
58
|
+
/** Optional description shown in the UI */
|
|
59
|
+
description?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Optional TypeScript type signature for code generation.
|
|
62
|
+
* Use this when the Zod schema uses z.custom<T>() or other types
|
|
63
|
+
* that can't be automatically inferred at runtime.
|
|
64
|
+
* @example "(e: React.FormEvent<HTMLFormElement>) => void"
|
|
65
|
+
* @example "(data: { name: string; email: string }) => Promise<void>"
|
|
66
|
+
*/
|
|
67
|
+
typeSignature?: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Function registry type - a record of function ID to function definition.
|
|
71
|
+
* Used to provide callable functions that can be bound to component event handlers.
|
|
72
|
+
*/
|
|
73
|
+
type FunctionRegistry = Record<string, FunctionDefinition>;
|
|
47
74
|
|
|
48
|
-
export type { ComponentLayer as C,
|
|
75
|
+
export type { ComponentLayer as C, FunctionRegistry as F, PropValue as P, RegistryEntry as R, Variable as V, ComponentRegistry as a, FieldConfigFunction as b };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ZodObject, ZodSchema } from 'zod';
|
|
1
|
+
import { ZodObject, ZodSchema, ZodTuple } from 'zod';
|
|
2
2
|
import { ReactNode, ComponentType } from 'react';
|
|
3
3
|
import { F as FieldConfigItem } from './stack.8nldKomx.mjs';
|
|
4
4
|
|
|
@@ -44,5 +44,32 @@ interface RegistryEntry<T extends ComponentType<any>> {
|
|
|
44
44
|
}
|
|
45
45
|
type FieldConfigFunction = (layer: ComponentLayer, allowVariableBinding?: boolean) => FieldConfigItem;
|
|
46
46
|
type ComponentRegistry = Record<string, RegistryEntry<ComponentType<any>>>;
|
|
47
|
+
/**
|
|
48
|
+
* Function definition for the function registry.
|
|
49
|
+
* Describes a function that can be bound to component event handlers.
|
|
50
|
+
*/
|
|
51
|
+
interface FunctionDefinition {
|
|
52
|
+
/** Human-readable name for the function */
|
|
53
|
+
name: string;
|
|
54
|
+
/** Zod schema describing the function parameters (use z.tuple for ordered args, z.object for named params) */
|
|
55
|
+
schema: ZodTuple<any, any> | ZodObject<any> | ZodSchema<any>;
|
|
56
|
+
/** The actual function to call at runtime */
|
|
57
|
+
fn: (...args: any[]) => any;
|
|
58
|
+
/** Optional description shown in the UI */
|
|
59
|
+
description?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Optional TypeScript type signature for code generation.
|
|
62
|
+
* Use this when the Zod schema uses z.custom<T>() or other types
|
|
63
|
+
* that can't be automatically inferred at runtime.
|
|
64
|
+
* @example "(e: React.FormEvent<HTMLFormElement>) => void"
|
|
65
|
+
* @example "(data: { name: string; email: string }) => Promise<void>"
|
|
66
|
+
*/
|
|
67
|
+
typeSignature?: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Function registry type - a record of function ID to function definition.
|
|
71
|
+
* Used to provide callable functions that can be bound to component event handlers.
|
|
72
|
+
*/
|
|
73
|
+
type FunctionRegistry = Record<string, FunctionDefinition>;
|
|
47
74
|
|
|
48
|
-
export type { ComponentLayer as C,
|
|
75
|
+
export type { ComponentLayer as C, FunctionRegistry as F, PropValue as P, RegistryEntry as R, Variable as V, ComponentRegistry as a, FieldConfigFunction as b };
|
package/package.json
CHANGED
|
@@ -467,7 +467,8 @@ export const aiChatBackendPlugin = <
|
|
|
467
467
|
const firstMessageContent = getMessageTextContent(firstMessage);
|
|
468
468
|
|
|
469
469
|
// Convert UIMessages to CoreMessages for streamText
|
|
470
|
-
|
|
470
|
+
// In AI SDK v6 this became async — await is a no-op for v5's sync return
|
|
471
|
+
const modelMessages = await convertToModelMessages(uiMessages);
|
|
471
472
|
|
|
472
473
|
// Build system prompt: base config + optional page context
|
|
473
474
|
const pageContextContent =
|
|
@@ -6,6 +6,7 @@ import { ErrorBoundary } from "react-error-boundary";
|
|
|
6
6
|
import LayerRenderer from "@workspace/ui/components/ui-builder/layer-renderer";
|
|
7
7
|
import type {
|
|
8
8
|
ComponentRegistry,
|
|
9
|
+
FunctionRegistry,
|
|
9
10
|
PropValue,
|
|
10
11
|
} from "@workspace/ui/components/ui-builder/types";
|
|
11
12
|
import { useSuspenseUIBuilderPageBySlug } from "../hooks/ui-builder-hooks";
|
|
@@ -59,6 +60,8 @@ export interface PageRendererProps {
|
|
|
59
60
|
componentRegistry?: ComponentRegistry;
|
|
60
61
|
/** Runtime variable values to override defaults */
|
|
61
62
|
variableValues?: Record<string, PropValue>;
|
|
63
|
+
/** Function registry for resolving function-type variable bindings */
|
|
64
|
+
functionRegistry?: FunctionRegistry;
|
|
62
65
|
/** Custom loading component */
|
|
63
66
|
LoadingComponent?: ComponentType;
|
|
64
67
|
/** Custom error component */
|
|
@@ -130,6 +133,7 @@ export function PageRenderer({
|
|
|
130
133
|
slug,
|
|
131
134
|
componentRegistry = defaultComponentRegistry,
|
|
132
135
|
variableValues,
|
|
136
|
+
functionRegistry,
|
|
133
137
|
LoadingComponent = DefaultLoadingComponent,
|
|
134
138
|
ErrorComponent = DefaultErrorComponent,
|
|
135
139
|
NotFoundComponent = DefaultNotFoundComponent,
|
|
@@ -144,6 +148,7 @@ export function PageRenderer({
|
|
|
144
148
|
slug={slug}
|
|
145
149
|
componentRegistry={componentRegistry}
|
|
146
150
|
variableValues={variableValues}
|
|
151
|
+
functionRegistry={functionRegistry}
|
|
147
152
|
NotFoundComponent={NotFoundComponent}
|
|
148
153
|
className={className}
|
|
149
154
|
/>
|
|
@@ -160,6 +165,7 @@ function SuspensePageRendererContent({
|
|
|
160
165
|
slug,
|
|
161
166
|
componentRegistry = defaultComponentRegistry,
|
|
162
167
|
variableValues,
|
|
168
|
+
functionRegistry,
|
|
163
169
|
NotFoundComponent = DefaultNotFoundComponent,
|
|
164
170
|
className,
|
|
165
171
|
}: Omit<PageRendererProps, "LoadingComponent" | "ErrorComponent">) {
|
|
@@ -183,6 +189,7 @@ function SuspensePageRendererContent({
|
|
|
183
189
|
componentRegistry={componentRegistry}
|
|
184
190
|
variables={variables}
|
|
185
191
|
variableValues={variableValues}
|
|
192
|
+
functionRegistry={functionRegistry}
|
|
186
193
|
/>
|
|
187
194
|
);
|
|
188
195
|
}
|
|
@@ -215,6 +222,7 @@ export function SuspensePageRenderer({
|
|
|
215
222
|
slug,
|
|
216
223
|
componentRegistry = defaultComponentRegistry,
|
|
217
224
|
variableValues,
|
|
225
|
+
functionRegistry,
|
|
218
226
|
NotFoundComponent = DefaultNotFoundComponent,
|
|
219
227
|
className,
|
|
220
228
|
}: Omit<PageRendererProps, "LoadingComponent" | "ErrorComponent">): ReactNode {
|
|
@@ -223,6 +231,7 @@ export function SuspensePageRenderer({
|
|
|
223
231
|
slug={slug}
|
|
224
232
|
componentRegistry={componentRegistry}
|
|
225
233
|
variableValues={variableValues}
|
|
234
|
+
functionRegistry={functionRegistry}
|
|
226
235
|
NotFoundComponent={NotFoundComponent}
|
|
227
236
|
className={className}
|
|
228
237
|
/>
|