@btst/stack 4.5.1 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +2 -2
  2. package/dist/components/markdown/index.d.cts +4 -2
  3. package/dist/components/markdown/index.d.mts +4 -2
  4. package/dist/components/markdown/index.d.ts +4 -2
  5. package/dist/packages/stack/src/plugins/blog/client/components/pages/post-page.internal.cjs +7 -1
  6. package/dist/packages/stack/src/plugins/blog/client/components/pages/post-page.internal.mjs +7 -1
  7. package/dist/packages/stack/src/plugins/blog/client/components/shared/markdown-content.cjs +6 -1
  8. package/dist/packages/stack/src/plugins/blog/client/components/shared/markdown-content.mjs +6 -1
  9. package/dist/packages/ui/src/components/markdown-content.cjs +23 -3
  10. package/dist/packages/ui/src/components/markdown-content.mjs +25 -5
  11. package/dist/plugins/blog/client/index.d.cts +2 -0
  12. package/dist/plugins/blog/client/index.d.mts +2 -0
  13. package/dist/plugins/blog/client/index.d.ts +2 -0
  14. package/dist/plugins/cms/api/index.d.cts +1 -1
  15. package/dist/plugins/cms/api/index.d.mts +1 -1
  16. package/dist/plugins/cms/api/index.d.ts +1 -1
  17. package/dist/plugins/cms/query-keys.d.cts +1 -1
  18. package/dist/plugins/cms/query-keys.d.mts +1 -1
  19. package/dist/plugins/cms/query-keys.d.ts +1 -1
  20. package/dist/plugins/form-builder/api/index.d.cts +1 -1
  21. package/dist/plugins/form-builder/api/index.d.mts +1 -1
  22. package/dist/plugins/form-builder/api/index.d.ts +1 -1
  23. package/dist/plugins/form-builder/client/hooks/index.d.cts +1 -1
  24. package/dist/plugins/form-builder/client/hooks/index.d.mts +1 -1
  25. package/dist/plugins/form-builder/client/hooks/index.d.ts +1 -1
  26. package/dist/plugins/form-builder/query-keys.d.cts +1 -1
  27. package/dist/plugins/form-builder/query-keys.d.mts +1 -1
  28. package/dist/plugins/form-builder/query-keys.d.ts +1 -1
  29. package/dist/plugins/ui-builder/client/hooks/index.d.cts +1 -1
  30. package/dist/plugins/ui-builder/client/hooks/index.d.mts +1 -1
  31. package/dist/plugins/ui-builder/client/hooks/index.d.ts +1 -1
  32. package/dist/plugins/ui-builder/client/index.d.cts +1 -1
  33. package/dist/plugins/ui-builder/client/index.d.mts +1 -1
  34. package/dist/plugins/ui-builder/client/index.d.ts +1 -1
  35. package/dist/plugins/ui-builder/query-keys.d.cts +1 -1
  36. package/dist/plugins/ui-builder/query-keys.d.mts +1 -1
  37. package/dist/plugins/ui-builder/query-keys.d.ts +1 -1
  38. package/package.json +1 -1
  39. package/src/plugins/blog/__tests__/introduction-slot.test.tsx +86 -0
  40. package/src/plugins/blog/client/components/pages/post-page.internal.tsx +4 -1
  41. package/src/plugins/blog/client/components/shared/markdown-content.tsx +8 -1
  42. package/src/plugins/blog/client/overrides.ts +3 -0
  43. package/dist/shared/{stack.CyltNNZZ.d.ts → stack.BMlTZnZp.d.ts} +72 -72
  44. package/dist/shared/{stack.Bf6BGZNk.d.cts → stack.BV0uNV4f.d.cts} +72 -72
  45. package/dist/shared/{stack.BuxUQqL8.d.ts → stack.CGmh-Lpe.d.ts} +12 -12
  46. package/dist/shared/{stack.Egr3RWhA.d.mts → stack.Doy2_wgl.d.mts} +12 -12
  47. package/dist/shared/{stack.BLYaUcQa.d.mts → stack.lsbdKRj7.d.mts} +72 -72
  48. package/dist/shared/{stack.CX83YNuS.d.cts → stack.zch70Loj.d.cts} +12 -12
package/README.md CHANGED
@@ -52,13 +52,13 @@ Render the generated `<Toaster />` in your root layout and start from a clean co
52
52
  Run the released generator from the application root:
53
53
 
54
54
  ```bash
55
- pnpm dlx @btst/codegen@4.5.1 init \
55
+ pnpm dlx @btst/codegen@4.6.0 init \
56
56
  --framework nextjs \
57
57
  --adapter memory \
58
58
  --plugins blog
59
59
  ```
60
60
 
61
- The generator shows detected-file and conflict prompts before it writes. It installs `@btst/stack@4.5.1`, `next-themes@0.4.6`, registers Blog on the backend and client, mounts the API and page routes, adds the plugin CSS, and wires the shared provider.
61
+ The generator shows detected-file and conflict prompts before it writes. It installs `@btst/stack@4.6.0`, `next-themes@0.4.6`, registers Blog on the backend and client, mounts the API and page routes, adds the plugin CSS, and wires the shared provider.
62
62
 
63
63
  Set the trusted local origins in `.env.local`:
64
64
 
@@ -1,9 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ComponentType, MutableRefObject } from 'react';
2
+ import { ReactNode, ComponentType, MutableRefObject } from 'react';
3
3
 
4
4
  type MarkdownContentProps = {
5
5
  /** The markdown string to render */
6
6
  markdown: string;
7
+ /** Content inserted after the first top-level paragraph. Omitted when there is no paragraph. */
8
+ afterFirstParagraph?: ReactNode;
7
9
  /** Additional CSS class name */
8
10
  className?: string;
9
11
  /** Variant for different use cases - 'default' for full blog posts, 'chat' for compact chat messages */
@@ -13,7 +15,7 @@ type MarkdownContentProps = {
13
15
  /** Custom Image component for images */
14
16
  ImageComponent?: ComponentType<React.ImgHTMLAttributes<HTMLImageElement> & Record<string, any>>;
15
17
  };
16
- declare function MarkdownContent({ markdown, className, variant, LinkComponent, ImageComponent, }: MarkdownContentProps): react_jsx_runtime.JSX.Element;
18
+ declare function MarkdownContent({ markdown, afterFirstParagraph, className, variant, LinkComponent, ImageComponent, }: MarkdownContentProps): react_jsx_runtime.JSX.Element;
17
19
 
18
20
  interface MarkdownEditorProps {
19
21
  value?: string;
@@ -1,9 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ComponentType, MutableRefObject } from 'react';
2
+ import { ReactNode, ComponentType, MutableRefObject } from 'react';
3
3
 
4
4
  type MarkdownContentProps = {
5
5
  /** The markdown string to render */
6
6
  markdown: string;
7
+ /** Content inserted after the first top-level paragraph. Omitted when there is no paragraph. */
8
+ afterFirstParagraph?: ReactNode;
7
9
  /** Additional CSS class name */
8
10
  className?: string;
9
11
  /** Variant for different use cases - 'default' for full blog posts, 'chat' for compact chat messages */
@@ -13,7 +15,7 @@ type MarkdownContentProps = {
13
15
  /** Custom Image component for images */
14
16
  ImageComponent?: ComponentType<React.ImgHTMLAttributes<HTMLImageElement> & Record<string, any>>;
15
17
  };
16
- declare function MarkdownContent({ markdown, className, variant, LinkComponent, ImageComponent, }: MarkdownContentProps): react_jsx_runtime.JSX.Element;
18
+ declare function MarkdownContent({ markdown, afterFirstParagraph, className, variant, LinkComponent, ImageComponent, }: MarkdownContentProps): react_jsx_runtime.JSX.Element;
17
19
 
18
20
  interface MarkdownEditorProps {
19
21
  value?: string;
@@ -1,9 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ComponentType, MutableRefObject } from 'react';
2
+ import { ReactNode, ComponentType, MutableRefObject } from 'react';
3
3
 
4
4
  type MarkdownContentProps = {
5
5
  /** The markdown string to render */
6
6
  markdown: string;
7
+ /** Content inserted after the first top-level paragraph. Omitted when there is no paragraph. */
8
+ afterFirstParagraph?: ReactNode;
7
9
  /** Additional CSS class name */
8
10
  className?: string;
9
11
  /** Variant for different use cases - 'default' for full blog posts, 'chat' for compact chat messages */
@@ -13,7 +15,7 @@ type MarkdownContentProps = {
13
15
  /** Custom Image component for images */
14
16
  ImageComponent?: ComponentType<React.ImgHTMLAttributes<HTMLImageElement> & Record<string, any>>;
15
17
  };
16
- declare function MarkdownContent({ markdown, className, variant, LinkComponent, ImageComponent, }: MarkdownContentProps): react_jsx_runtime.JSX.Element;
18
+ declare function MarkdownContent({ markdown, afterFirstParagraph, className, variant, LinkComponent, ImageComponent, }: MarkdownContentProps): react_jsx_runtime.JSX.Element;
17
19
 
18
20
  interface MarkdownEditorProps {
19
21
  value?: string;
@@ -96,7 +96,13 @@ ${post.content ?? ""}`.slice(
96
96
  className: "object-cover transition-transform duration-200"
97
97
  }
98
98
  ) }),
99
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full px-3", children: /* @__PURE__ */ jsxRuntime.jsx(markdownContent.MarkdownContent, { markdown: post.content }) }),
99
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full px-3", children: /* @__PURE__ */ jsxRuntime.jsx(
100
+ markdownContent.MarkdownContent,
101
+ {
102
+ markdown: post.content,
103
+ afterFirstParagraph: overrides.postIntroductionSlot?.(post)
104
+ }
105
+ ) }),
100
106
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 w-full", children: [
101
107
  /* @__PURE__ */ jsxRuntime.jsx(
102
108
  whenVisible.WhenVisible,
@@ -94,7 +94,13 @@ ${post.content ?? ""}`.slice(
94
94
  className: "object-cover transition-transform duration-200"
95
95
  }
96
96
  ) }),
97
- /* @__PURE__ */ jsx("div", { className: "w-full px-3", children: /* @__PURE__ */ jsx(MarkdownContent, { markdown: post.content }) }),
97
+ /* @__PURE__ */ jsx("div", { className: "w-full px-3", children: /* @__PURE__ */ jsx(
98
+ MarkdownContent,
99
+ {
100
+ markdown: post.content,
101
+ afterFirstParagraph: overrides.postIntroductionSlot?.(post)
102
+ }
103
+ ) }),
98
104
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 w-full", children: [
99
105
  /* @__PURE__ */ jsx(
100
106
  WhenVisible,
@@ -7,7 +7,11 @@ const context = require('@btst/stack/context');
7
7
  const defaults = require('./defaults.cjs');
8
8
  require('highlight.js/styles/panda-syntax-light.css');
9
9
 
10
- function MarkdownContent({ markdown, className }) {
10
+ function MarkdownContent({
11
+ markdown,
12
+ className,
13
+ afterFirstParagraph
14
+ }) {
11
15
  const { router } = context.useStack();
12
16
  const Link = router?.Link ?? defaults.DefaultLink;
13
17
  const Image = router?.Image ?? defaults.DefaultImage;
@@ -15,6 +19,7 @@ function MarkdownContent({ markdown, className }) {
15
19
  markdownContent.MarkdownContent,
16
20
  {
17
21
  markdown,
22
+ afterFirstParagraph,
18
23
  className,
19
24
  variant: "default",
20
25
  LinkComponent: Link,
@@ -5,7 +5,11 @@ import { useStack } from '@btst/stack/context';
5
5
  import { DefaultLink, DefaultImage } from './defaults.mjs';
6
6
  import 'highlight.js/styles/panda-syntax-light.css';
7
7
 
8
- function MarkdownContent({ markdown, className }) {
8
+ function MarkdownContent({
9
+ markdown,
10
+ className,
11
+ afterFirstParagraph
12
+ }) {
9
13
  const { router } = useStack();
10
14
  const Link = router?.Link ?? DefaultLink;
11
15
  const Image = router?.Image ?? DefaultImage;
@@ -13,6 +17,7 @@ function MarkdownContent({ markdown, className }) {
13
17
  MarkdownContent$1,
14
18
  {
15
19
  markdown,
20
+ afterFirstParagraph,
16
21
  className,
17
22
  variant: "default",
18
23
  LinkComponent: Link,
@@ -17,6 +17,18 @@ const rehypeHighlight__default = /*#__PURE__*/_interopDefaultCompat(rehypeHighli
17
17
  const rehypeRaw__default = /*#__PURE__*/_interopDefaultCompat(rehypeRaw);
18
18
  const remarkGfm__default = /*#__PURE__*/_interopDefaultCompat(remarkGfm);
19
19
 
20
+ const IntroductionSlotContext = React.createContext(null);
21
+ function ParagraphRenderer({
22
+ node,
23
+ children,
24
+ ...props
25
+ }) {
26
+ const slot = React.useContext(IntroductionSlotContext);
27
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
28
+ /* @__PURE__ */ jsxRuntime.jsx("p", { ...props, children }),
29
+ node?.data && "btstIntroduction" in node.data && node.data.btstIntroduction === true ? slot : null
30
+ ] });
31
+ }
20
32
  const DefaultLink = (props) => {
21
33
  return /* @__PURE__ */ jsxRuntime.jsx("a", { ...props });
22
34
  };
@@ -173,8 +185,15 @@ function PreRenderer(props) {
173
185
  }
174
186
  );
175
187
  }
188
+ function markIntroduction() {
189
+ return (tree) => {
190
+ const paragraph = tree.children.find((node) => node.type === "element" && node.tagName === "p");
191
+ if (paragraph) paragraph.data = { ...paragraph.data, btstIntroduction: true };
192
+ };
193
+ }
176
194
  function MarkdownContent({
177
195
  markdown,
196
+ afterFirstParagraph,
178
197
  className,
179
198
  variant = "default",
180
199
  LinkComponent = DefaultLink,
@@ -264,6 +283,7 @@ function MarkdownContent({
264
283
  }, [ImageComponent]);
265
284
  const components = React.useMemo(() => {
266
285
  return {
286
+ p: ParagraphRenderer,
267
287
  a: AnchorRenderer,
268
288
  img: ImgRenderer,
269
289
  span: ({ node: _node, className: className2, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -293,14 +313,14 @@ function MarkdownContent({
293
313
  return plugins;
294
314
  }, [hasMath, mathPlugins]);
295
315
  const rehypePlugins = React.useMemo(() => {
296
- const plugins = [rehypeRaw__default, rehypeHighlight__default];
316
+ const plugins = [rehypeRaw__default, rehypeHighlight__default, markIntroduction];
297
317
  if (hasMath && mathPlugins?.rehypeKatex) {
298
318
  plugins.push(mathPlugins.rehypeKatex);
299
319
  }
300
320
  return plugins;
301
321
  }, [hasMath, mathPlugins]);
302
322
  const variantClass = variant === "chat" ? "markdown-content-chat" : "";
303
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils.cn("markdown-content", variantClass, className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "markdown-inner", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "markdown-body", children: /* @__PURE__ */ jsxRuntime.jsx(
323
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils.cn("markdown-content", variantClass, className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "markdown-inner", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "markdown-body", children: /* @__PURE__ */ jsxRuntime.jsx(IntroductionSlotContext.Provider, { value: afterFirstParagraph, children: /* @__PURE__ */ jsxRuntime.jsx(
304
324
  ReactMarkdown__default,
305
325
  {
306
326
  remarkPlugins,
@@ -308,7 +328,7 @@ function MarkdownContent({
308
328
  components,
309
329
  children: markdown
310
330
  }
311
- ) }) }) });
331
+ ) }) }) }) });
312
332
  }
313
333
 
314
334
  exports.MarkdownContent = MarkdownContent;
@@ -1,13 +1,25 @@
1
1
  "use client";
2
- import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import { cn } from '../lib/utils.mjs';
4
- import { useState, useMemo, useEffect, createElement, isValidElement, useRef } from 'react';
4
+ import { createContext, useState, useMemo, useEffect, createElement, isValidElement, useRef, useContext } from 'react';
5
5
  import ReactMarkdown from 'react-markdown';
6
6
  import rehypeHighlight from 'rehype-highlight';
7
7
  import rehypeRaw from 'rehype-raw';
8
8
  import remarkGfm from 'remark-gfm';
9
9
  import { CheckIcon, CopyIcon } from 'lucide-react';
10
10
 
11
+ const IntroductionSlotContext = createContext(null);
12
+ function ParagraphRenderer({
13
+ node,
14
+ children,
15
+ ...props
16
+ }) {
17
+ const slot = useContext(IntroductionSlotContext);
18
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
19
+ /* @__PURE__ */ jsx("p", { ...props, children }),
20
+ node?.data && "btstIntroduction" in node.data && node.data.btstIntroduction === true ? slot : null
21
+ ] });
22
+ }
11
23
  const DefaultLink = (props) => {
12
24
  return /* @__PURE__ */ jsx("a", { ...props });
13
25
  };
@@ -164,8 +176,15 @@ function PreRenderer(props) {
164
176
  }
165
177
  );
166
178
  }
179
+ function markIntroduction() {
180
+ return (tree) => {
181
+ const paragraph = tree.children.find((node) => node.type === "element" && node.tagName === "p");
182
+ if (paragraph) paragraph.data = { ...paragraph.data, btstIntroduction: true };
183
+ };
184
+ }
167
185
  function MarkdownContent({
168
186
  markdown,
187
+ afterFirstParagraph,
169
188
  className,
170
189
  variant = "default",
171
190
  LinkComponent = DefaultLink,
@@ -255,6 +274,7 @@ function MarkdownContent({
255
274
  }, [ImageComponent]);
256
275
  const components = useMemo(() => {
257
276
  return {
277
+ p: ParagraphRenderer,
258
278
  a: AnchorRenderer,
259
279
  img: ImgRenderer,
260
280
  span: ({ node: _node, className: className2, ...props }) => /* @__PURE__ */ jsx(
@@ -284,14 +304,14 @@ function MarkdownContent({
284
304
  return plugins;
285
305
  }, [hasMath, mathPlugins]);
286
306
  const rehypePlugins = useMemo(() => {
287
- const plugins = [rehypeRaw, rehypeHighlight];
307
+ const plugins = [rehypeRaw, rehypeHighlight, markIntroduction];
288
308
  if (hasMath && mathPlugins?.rehypeKatex) {
289
309
  plugins.push(mathPlugins.rehypeKatex);
290
310
  }
291
311
  return plugins;
292
312
  }, [hasMath, mathPlugins]);
293
313
  const variantClass = variant === "chat" ? "markdown-content-chat" : "";
294
- return /* @__PURE__ */ jsx("div", { className: cn("markdown-content", variantClass, className), children: /* @__PURE__ */ jsx("div", { className: "markdown-inner", children: /* @__PURE__ */ jsx("div", { className: "markdown-body", children: /* @__PURE__ */ jsx(
314
+ return /* @__PURE__ */ jsx("div", { className: cn("markdown-content", variantClass, className), children: /* @__PURE__ */ jsx("div", { className: "markdown-inner", children: /* @__PURE__ */ jsx("div", { className: "markdown-body", children: /* @__PURE__ */ jsx(IntroductionSlotContext.Provider, { value: afterFirstParagraph, children: /* @__PURE__ */ jsx(
295
315
  ReactMarkdown,
296
316
  {
297
317
  remarkPlugins,
@@ -299,7 +319,7 @@ function MarkdownContent({
299
319
  components,
300
320
  children: markdown
301
321
  }
302
- ) }) }) });
322
+ ) }) }) }) });
303
323
  }
304
324
 
305
325
  export { MarkdownContent };
@@ -224,6 +224,8 @@ interface BlogPluginOverrides {
224
224
  * ```
225
225
  */
226
226
  postBottomSlot?: (post: SerializedPost) => ReactNode;
227
+ /** Render content after the first top-level body paragraph, preserving a single Markdown document. Omitted if no paragraph exists. */
228
+ postIntroductionSlot?: (post: SerializedPost) => ReactNode;
227
229
  }
228
230
 
229
231
  /**
@@ -224,6 +224,8 @@ interface BlogPluginOverrides {
224
224
  * ```
225
225
  */
226
226
  postBottomSlot?: (post: SerializedPost) => ReactNode;
227
+ /** Render content after the first top-level body paragraph, preserving a single Markdown document. Omitted if no paragraph exists. */
228
+ postIntroductionSlot?: (post: SerializedPost) => ReactNode;
227
229
  }
228
230
 
229
231
  /**
@@ -224,6 +224,8 @@ interface BlogPluginOverrides {
224
224
  * ```
225
225
  */
226
226
  postBottomSlot?: (post: SerializedPost) => ReactNode;
227
+ /** Render content after the first top-level body paragraph, preserving a single Markdown document. Omitted if no paragraph exists. */
228
+ postIntroductionSlot?: (post: SerializedPost) => ReactNode;
227
229
  }
228
230
 
229
231
  /**
@@ -1,4 +1,4 @@
1
- export { C as CMSApiRouter, b as CMSRouteKey, d as CMS_QUERY_KEYS, c as cmsBackendPlugin } from '../../../shared/stack.Bf6BGZNk.cjs';
1
+ export { C as CMSApiRouter, b as CMSRouteKey, d as CMS_QUERY_KEYS, c as cmsBackendPlugin } from '../../../shared/stack.BV0uNV4f.cjs';
2
2
  import { DBAdapter } from '@btst/db';
3
3
  import { S as SerializedContentType, a as SerializedContentItemWithType, b as ContentType, c as ContentItem, d as SerializedContentItem, e as ContentItemWithType } from '../../../shared/stack.B3_aDcYL.cjs';
4
4
  export { C as CMSBackendConfig, f as CMSBackendHooks, g as CMSCreateOperationContext, h as CMSCreateResultContext, i as CMSDeleteOperationContext, j as CMSDeleteResultContext, k as CMSOperationErrorContext, l as CMSOperationLifecycleContext, m as CMSUpdateOperationContext, n as CMSUpdateResultContext, o as ContentTypeConfig } from '../../../shared/stack.B3_aDcYL.cjs';
@@ -1,4 +1,4 @@
1
- export { C as CMSApiRouter, b as CMSRouteKey, d as CMS_QUERY_KEYS, c as cmsBackendPlugin } from '../../../shared/stack.BLYaUcQa.mjs';
1
+ export { C as CMSApiRouter, b as CMSRouteKey, d as CMS_QUERY_KEYS, c as cmsBackendPlugin } from '../../../shared/stack.lsbdKRj7.mjs';
2
2
  import { DBAdapter } from '@btst/db';
3
3
  import { S as SerializedContentType, a as SerializedContentItemWithType, b as ContentType, c as ContentItem, d as SerializedContentItem, e as ContentItemWithType } from '../../../shared/stack.B3_aDcYL.mjs';
4
4
  export { C as CMSBackendConfig, f as CMSBackendHooks, g as CMSCreateOperationContext, h as CMSCreateResultContext, i as CMSDeleteOperationContext, j as CMSDeleteResultContext, k as CMSOperationErrorContext, l as CMSOperationLifecycleContext, m as CMSUpdateOperationContext, n as CMSUpdateResultContext, o as ContentTypeConfig } from '../../../shared/stack.B3_aDcYL.mjs';
@@ -1,4 +1,4 @@
1
- export { C as CMSApiRouter, b as CMSRouteKey, d as CMS_QUERY_KEYS, c as cmsBackendPlugin } from '../../../shared/stack.CyltNNZZ.js';
1
+ export { C as CMSApiRouter, b as CMSRouteKey, d as CMS_QUERY_KEYS, c as cmsBackendPlugin } from '../../../shared/stack.BMlTZnZp.js';
2
2
  import { DBAdapter } from '@btst/db';
3
3
  import { S as SerializedContentType, a as SerializedContentItemWithType, b as ContentType, c as ContentItem, d as SerializedContentItem, e as ContentItemWithType } from '../../../shared/stack.B3_aDcYL.js';
4
4
  export { C as CMSBackendConfig, f as CMSBackendHooks, g as CMSCreateOperationContext, h as CMSCreateResultContext, i as CMSDeleteOperationContext, j as CMSDeleteResultContext, k as CMSOperationErrorContext, l as CMSOperationLifecycleContext, m as CMSUpdateOperationContext, n as CMSUpdateResultContext, o as ContentTypeConfig } from '../../../shared/stack.B3_aDcYL.js';
@@ -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 CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.Bf6BGZNk.cjs';
3
+ import { C as CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.BV0uNV4f.cjs';
4
4
  import { S as SerializedContentType, I as InverseRelation, a as SerializedContentItemWithType, P as PaginatedContentItems } from '../../shared/stack.B3_aDcYL.cjs';
5
5
  import '@btst/stack/plugins/api';
6
6
  import '../../authorization/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 CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.BLYaUcQa.mjs';
3
+ import { C as CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.lsbdKRj7.mjs';
4
4
  import { S as SerializedContentType, I as InverseRelation, a as SerializedContentItemWithType, P as PaginatedContentItems } from '../../shared/stack.B3_aDcYL.mjs';
5
5
  import '@btst/stack/plugins/api';
6
6
  import '../../authorization/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 CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.CyltNNZZ.js';
3
+ import { C as CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.BMlTZnZp.js';
4
4
  import { S as SerializedContentType, I as InverseRelation, a as SerializedContentItemWithType, P as PaginatedContentItems } from '../../shared/stack.B3_aDcYL.js';
5
5
  import '@btst/stack/plugins/api';
6
6
  import '../../authorization/index.js';
@@ -1,4 +1,4 @@
1
- export { k as FORM_QUERY_KEYS, a as FormBuilderApiRouter, c as FormBuilderOperationError, e as FormBuilderOperations, b as FormBuilderRouteKey, g as FormListOperationResult, h as SubmissionDetailOperationResult, i as SubmissionListOperationResult, j as SubmitOperationResult, d as createFormBuilderOperations, f as formBuilderBackendPlugin } from '../../../shared/stack.CX83YNuS.cjs';
1
+ export { k as FORM_QUERY_KEYS, a as FormBuilderApiRouter, c as FormBuilderOperationError, e as FormBuilderOperations, b as FormBuilderRouteKey, g as FormListOperationResult, h as SubmissionDetailOperationResult, i as SubmissionListOperationResult, j as SubmitOperationResult, d as createFormBuilderOperations, f as formBuilderBackendPlugin } from '../../../shared/stack.zch70Loj.cjs';
2
2
  export { formBuilderPermissions } from '../permissions.cjs';
3
3
  import { S as SerializedForm, d as SerializedFormSubmissionWithData, F as Form, f as FormSubmission, a as SerializedFormSubmission, c as SerializedFormSubmissionSummary, g as FormSubmissionWithForm } from '../../../shared/stack.v2O65JqF.cjs';
4
4
  export { h as FormBuilderBackendConfig, i as FormBuilderBackendHooks, j as FormBuilderHookContext, k as FormBuilderOperationHookContext, l as FormCreateOperationContext, m as FormDeleteOperationContext, o as FormGetForUpdateOperationContext, n as FormGetOperationContext, p as FormListOperationContext, q as FormUpdateOperationContext, r as SubmissionCreateOperationContext, s as SubmissionDeleteOperationContext, t as SubmissionGetOperationContext, v as SubmissionHookContext, b as SubmissionListFormContext, u as SubmissionListOperationContext } from '../../../shared/stack.v2O65JqF.cjs';
@@ -1,4 +1,4 @@
1
- export { k as FORM_QUERY_KEYS, a as FormBuilderApiRouter, c as FormBuilderOperationError, e as FormBuilderOperations, b as FormBuilderRouteKey, g as FormListOperationResult, h as SubmissionDetailOperationResult, i as SubmissionListOperationResult, j as SubmitOperationResult, d as createFormBuilderOperations, f as formBuilderBackendPlugin } from '../../../shared/stack.Egr3RWhA.mjs';
1
+ export { k as FORM_QUERY_KEYS, a as FormBuilderApiRouter, c as FormBuilderOperationError, e as FormBuilderOperations, b as FormBuilderRouteKey, g as FormListOperationResult, h as SubmissionDetailOperationResult, i as SubmissionListOperationResult, j as SubmitOperationResult, d as createFormBuilderOperations, f as formBuilderBackendPlugin } from '../../../shared/stack.Doy2_wgl.mjs';
2
2
  export { formBuilderPermissions } from '../permissions.mjs';
3
3
  import { S as SerializedForm, d as SerializedFormSubmissionWithData, F as Form, f as FormSubmission, a as SerializedFormSubmission, c as SerializedFormSubmissionSummary, g as FormSubmissionWithForm } from '../../../shared/stack.OYT8WU4n.mjs';
4
4
  export { h as FormBuilderBackendConfig, i as FormBuilderBackendHooks, j as FormBuilderHookContext, k as FormBuilderOperationHookContext, l as FormCreateOperationContext, m as FormDeleteOperationContext, o as FormGetForUpdateOperationContext, n as FormGetOperationContext, p as FormListOperationContext, q as FormUpdateOperationContext, r as SubmissionCreateOperationContext, s as SubmissionDeleteOperationContext, t as SubmissionGetOperationContext, v as SubmissionHookContext, b as SubmissionListFormContext, u as SubmissionListOperationContext } from '../../../shared/stack.OYT8WU4n.mjs';
@@ -1,4 +1,4 @@
1
- export { k as FORM_QUERY_KEYS, a as FormBuilderApiRouter, c as FormBuilderOperationError, e as FormBuilderOperations, b as FormBuilderRouteKey, g as FormListOperationResult, h as SubmissionDetailOperationResult, i as SubmissionListOperationResult, j as SubmitOperationResult, d as createFormBuilderOperations, f as formBuilderBackendPlugin } from '../../../shared/stack.BuxUQqL8.js';
1
+ export { k as FORM_QUERY_KEYS, a as FormBuilderApiRouter, c as FormBuilderOperationError, e as FormBuilderOperations, b as FormBuilderRouteKey, g as FormListOperationResult, h as SubmissionDetailOperationResult, i as SubmissionListOperationResult, j as SubmitOperationResult, d as createFormBuilderOperations, f as formBuilderBackendPlugin } from '../../../shared/stack.CGmh-Lpe.js';
2
2
  export { formBuilderPermissions } from '../permissions.js';
3
3
  import { S as SerializedForm, d as SerializedFormSubmissionWithData, F as Form, f as FormSubmission, a as SerializedFormSubmission, c as SerializedFormSubmissionSummary, g as FormSubmissionWithForm } from '../../../shared/stack.C3bU9w6L.js';
4
4
  export { h as FormBuilderBackendConfig, i as FormBuilderBackendHooks, j as FormBuilderHookContext, k as FormBuilderOperationHookContext, l as FormCreateOperationContext, m as FormDeleteOperationContext, o as FormGetForUpdateOperationContext, n as FormGetOperationContext, p as FormListOperationContext, q as FormUpdateOperationContext, r as SubmissionCreateOperationContext, s as SubmissionDeleteOperationContext, t as SubmissionGetOperationContext, v as SubmissionHookContext, b as SubmissionListFormContext, u as SubmissionListOperationContext } from '../../../shared/stack.C3bU9w6L.js';
@@ -8,7 +8,7 @@ import '@btst/stack/context';
8
8
  import '../../permissions.cjs';
9
9
  import 'zod';
10
10
  import '@btst/stack/plugins/client';
11
- import '../../../../shared/stack.CX83YNuS.cjs';
11
+ import '../../../../shared/stack.zch70Loj.cjs';
12
12
  import '@btst/db';
13
13
  import 'zod/v4/core';
14
14
  import 'better-call';
@@ -8,7 +8,7 @@ import '@btst/stack/context';
8
8
  import '../../permissions.mjs';
9
9
  import 'zod';
10
10
  import '@btst/stack/plugins/client';
11
- import '../../../../shared/stack.Egr3RWhA.mjs';
11
+ import '../../../../shared/stack.Doy2_wgl.mjs';
12
12
  import '@btst/db';
13
13
  import 'zod/v4/core';
14
14
  import 'better-call';
@@ -8,7 +8,7 @@ import '@btst/stack/context';
8
8
  import '../../permissions.js';
9
9
  import 'zod';
10
10
  import '@btst/stack/plugins/client';
11
- import '../../../../shared/stack.BuxUQqL8.js';
11
+ import '../../../../shared/stack.CGmh-Lpe.js';
12
12
  import '@btst/db';
13
13
  import 'zod/v4/core';
14
14
  import 'better-call';
@@ -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 { F as FormsListDiscriminator, S as SubmissionsListDiscriminator, a as FormBuilderApiRouter } from '../../shared/stack.CX83YNuS.cjs';
3
+ import { F as FormsListDiscriminator, S as SubmissionsListDiscriminator, a as FormBuilderApiRouter } from '../../shared/stack.zch70Loj.cjs';
4
4
  import { P as PaginatedForms, S as SerializedForm, a as SerializedFormSubmission, e as PaginatedFormSubmissions, d as SerializedFormSubmissionWithData } from '../../shared/stack.v2O65JqF.cjs';
5
5
  import { StackIdentity } from '@btst/stack/context';
6
6
  import '@btst/stack/plugins/api';
@@ -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 { F as FormsListDiscriminator, S as SubmissionsListDiscriminator, a as FormBuilderApiRouter } from '../../shared/stack.Egr3RWhA.mjs';
3
+ import { F as FormsListDiscriminator, S as SubmissionsListDiscriminator, a as FormBuilderApiRouter } from '../../shared/stack.Doy2_wgl.mjs';
4
4
  import { P as PaginatedForms, S as SerializedForm, a as SerializedFormSubmission, e as PaginatedFormSubmissions, d as SerializedFormSubmissionWithData } from '../../shared/stack.OYT8WU4n.mjs';
5
5
  import { StackIdentity } from '@btst/stack/context';
6
6
  import '@btst/stack/plugins/api';
@@ -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 { F as FormsListDiscriminator, S as SubmissionsListDiscriminator, a as FormBuilderApiRouter } from '../../shared/stack.BuxUQqL8.js';
3
+ import { F as FormsListDiscriminator, S as SubmissionsListDiscriminator, a as FormBuilderApiRouter } from '../../shared/stack.CGmh-Lpe.js';
4
4
  import { P as PaginatedForms, S as SerializedForm, a as SerializedFormSubmission, e as PaginatedFormSubmissions, d as SerializedFormSubmissionWithData } from '../../shared/stack.C3bU9w6L.js';
5
5
  import { StackIdentity } from '@btst/stack/context';
6
6
  import '@btst/stack/plugins/api';
@@ -9,7 +9,7 @@ import '../../../../shared/stack.fdi94T4S.cjs';
9
9
  import 'react-hook-form';
10
10
  import 'react/jsx-runtime';
11
11
  import '@btst/stack/plugins/client';
12
- import '../../../../shared/stack.Bf6BGZNk.cjs';
12
+ import '../../../../shared/stack.BV0uNV4f.cjs';
13
13
  import '@btst/stack/plugins/api';
14
14
  import '../../../../authorization/index.cjs';
15
15
  import 'better-call';
@@ -9,7 +9,7 @@ import '../../../../shared/stack.fdi94T4S.mjs';
9
9
  import 'react-hook-form';
10
10
  import 'react/jsx-runtime';
11
11
  import '@btst/stack/plugins/client';
12
- import '../../../../shared/stack.BLYaUcQa.mjs';
12
+ import '../../../../shared/stack.lsbdKRj7.mjs';
13
13
  import '@btst/stack/plugins/api';
14
14
  import '../../../../authorization/index.mjs';
15
15
  import 'better-call';
@@ -9,7 +9,7 @@ import '../../../../shared/stack.fdi94T4S.js';
9
9
  import 'react-hook-form';
10
10
  import 'react/jsx-runtime';
11
11
  import '@btst/stack/plugins/client';
12
- import '../../../../shared/stack.CyltNNZZ.js';
12
+ import '../../../../shared/stack.BMlTZnZp.js';
13
13
  import '@btst/stack/plugins/api';
14
14
  import '../../../../authorization/index.js';
15
15
  import 'better-call';
@@ -15,7 +15,7 @@ import '../../../shared/stack.B3_aDcYL.cjs';
15
15
  import 'react-hook-form';
16
16
  import '@tanstack/react-query';
17
17
  import '@btst/stack/plugins/client/hooks';
18
- import '../../../shared/stack.Bf6BGZNk.cjs';
18
+ import '../../../shared/stack.BV0uNV4f.cjs';
19
19
  import '@btst/stack/plugins/api';
20
20
  import '../../../authorization/index.cjs';
21
21
  import 'better-call';
@@ -15,7 +15,7 @@ import '../../../shared/stack.B3_aDcYL.mjs';
15
15
  import 'react-hook-form';
16
16
  import '@tanstack/react-query';
17
17
  import '@btst/stack/plugins/client/hooks';
18
- import '../../../shared/stack.BLYaUcQa.mjs';
18
+ import '../../../shared/stack.lsbdKRj7.mjs';
19
19
  import '@btst/stack/plugins/api';
20
20
  import '../../../authorization/index.mjs';
21
21
  import 'better-call';
@@ -15,7 +15,7 @@ import '../../../shared/stack.B3_aDcYL.js';
15
15
  import 'react-hook-form';
16
16
  import '@tanstack/react-query';
17
17
  import '@btst/stack/plugins/client/hooks';
18
- import '../../../shared/stack.CyltNNZZ.js';
18
+ import '../../../shared/stack.BMlTZnZp.js';
19
19
  import '@btst/stack/plugins/api';
20
20
  import '../../../authorization/index.js';
21
21
  import 'better-call';
@@ -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 { a as ContentListDiscriminator, C as CMSApiRouter } from '../../shared/stack.Bf6BGZNk.cjs';
3
+ import { a as ContentListDiscriminator, C as CMSApiRouter } from '../../shared/stack.BV0uNV4f.cjs';
4
4
  import { C as ComponentLayer, V as Variable } from '../../shared/stack.DmpPDPxA.cjs';
5
5
  import { P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.B3_aDcYL.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 { a as ContentListDiscriminator, C as CMSApiRouter } from '../../shared/stack.BLYaUcQa.mjs';
3
+ import { a as ContentListDiscriminator, C as CMSApiRouter } from '../../shared/stack.lsbdKRj7.mjs';
4
4
  import { C as ComponentLayer, V as Variable } from '../../shared/stack.B1srlBud.mjs';
5
5
  import { P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.B3_aDcYL.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 { a as ContentListDiscriminator, C as CMSApiRouter } from '../../shared/stack.CyltNNZZ.js';
3
+ import { a as ContentListDiscriminator, C as CMSApiRouter } from '../../shared/stack.BMlTZnZp.js';
4
4
  import { C as ComponentLayer, V as Variable } from '../../shared/stack.BK9Z2dcL.js';
5
5
  import { P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.B3_aDcYL.js';
6
6
  import { UIBuilderPageSchemaType, PaginatedUIBuilderPages, SerializedUIBuilderPage } from './index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@btst/stack",
3
- "version": "4.5.1",
3
+ "version": "4.6.0",
4
4
  "description": "A composable, plugin-based library for building full-stack applications.",
5
5
  "repository": {
6
6
  "type": "git",