@btst/stack 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/dist/packages/stack/src/plugins/ai-chat/api/plugin.cjs +33 -47
  2. package/dist/packages/stack/src/plugins/ai-chat/api/plugin.mjs +33 -47
  3. package/dist/packages/stack/src/plugins/ai-chat/client/plugin.cjs +14 -21
  4. package/dist/packages/stack/src/plugins/ai-chat/client/plugin.mjs +15 -22
  5. package/dist/packages/stack/src/plugins/blog/api/plugin.cjs +28 -45
  6. package/dist/packages/stack/src/plugins/blog/api/plugin.mjs +22 -39
  7. package/dist/packages/stack/src/plugins/blog/client/plugin.cjs +23 -27
  8. package/dist/packages/stack/src/plugins/blog/client/plugin.mjs +24 -28
  9. package/dist/packages/stack/src/plugins/cms/api/plugin.cjs +14 -17
  10. package/dist/packages/stack/src/plugins/cms/api/plugin.mjs +14 -17
  11. package/dist/packages/stack/src/plugins/cms/client/plugin.cjs +11 -15
  12. package/dist/packages/stack/src/plugins/cms/client/plugin.mjs +12 -16
  13. package/dist/packages/stack/src/plugins/form-builder/api/plugin.cjs +58 -62
  14. package/dist/packages/stack/src/plugins/form-builder/api/plugin.mjs +58 -62
  15. package/dist/packages/stack/src/plugins/form-builder/client/plugin.cjs +12 -12
  16. package/dist/packages/stack/src/plugins/form-builder/client/plugin.mjs +13 -13
  17. package/dist/packages/stack/src/plugins/kanban/api/plugin.cjs +86 -117
  18. package/dist/packages/stack/src/plugins/kanban/api/plugin.mjs +83 -114
  19. package/dist/packages/stack/src/plugins/kanban/client/plugin.cjs +22 -29
  20. package/dist/packages/stack/src/plugins/kanban/client/plugin.mjs +23 -30
  21. package/dist/packages/stack/src/plugins/ui-builder/client/plugin.cjs +8 -8
  22. package/dist/packages/stack/src/plugins/ui-builder/client/plugin.mjs +9 -9
  23. package/dist/packages/stack/src/plugins/utils.cjs +42 -0
  24. package/dist/packages/stack/src/plugins/utils.mjs +41 -1
  25. package/dist/plugins/ai-chat/api/index.d.cts +1 -1
  26. package/dist/plugins/ai-chat/api/index.d.mts +1 -1
  27. package/dist/plugins/ai-chat/api/index.d.ts +1 -1
  28. package/dist/plugins/ai-chat/client/hooks/index.d.cts +1 -1
  29. package/dist/plugins/ai-chat/client/hooks/index.d.mts +1 -1
  30. package/dist/plugins/ai-chat/client/hooks/index.d.ts +1 -1
  31. package/dist/plugins/ai-chat/client/index.d.cts +8 -8
  32. package/dist/plugins/ai-chat/client/index.d.mts +8 -8
  33. package/dist/plugins/ai-chat/client/index.d.ts +8 -8
  34. package/dist/plugins/ai-chat/query-keys.d.cts +1 -1
  35. package/dist/plugins/ai-chat/query-keys.d.mts +1 -1
  36. package/dist/plugins/ai-chat/query-keys.d.ts +1 -1
  37. package/dist/plugins/blog/api/index.d.cts +1 -1
  38. package/dist/plugins/blog/api/index.d.mts +1 -1
  39. package/dist/plugins/blog/api/index.d.ts +1 -1
  40. package/dist/plugins/blog/client/index.d.cts +12 -12
  41. package/dist/plugins/blog/client/index.d.mts +12 -12
  42. package/dist/plugins/blog/client/index.d.ts +12 -12
  43. package/dist/plugins/blog/query-keys.d.cts +1 -1
  44. package/dist/plugins/blog/query-keys.d.mts +1 -1
  45. package/dist/plugins/blog/query-keys.d.ts +1 -1
  46. package/dist/plugins/client/index.cjs +1 -0
  47. package/dist/plugins/client/index.d.cts +8 -1
  48. package/dist/plugins/client/index.d.mts +8 -1
  49. package/dist/plugins/client/index.d.ts +8 -1
  50. package/dist/plugins/client/index.mjs +1 -1
  51. package/dist/plugins/cms/api/index.d.cts +2 -2
  52. package/dist/plugins/cms/api/index.d.mts +2 -2
  53. package/dist/plugins/cms/api/index.d.ts +2 -2
  54. package/dist/plugins/cms/client/hooks/index.d.cts +1 -1
  55. package/dist/plugins/cms/client/hooks/index.d.mts +1 -1
  56. package/dist/plugins/cms/client/hooks/index.d.ts +1 -1
  57. package/dist/plugins/cms/client/index.d.cts +6 -6
  58. package/dist/plugins/cms/client/index.d.mts +6 -6
  59. package/dist/plugins/cms/client/index.d.ts +6 -6
  60. package/dist/plugins/cms/query-keys.d.cts +2 -2
  61. package/dist/plugins/cms/query-keys.d.mts +2 -2
  62. package/dist/plugins/cms/query-keys.d.ts +2 -2
  63. package/dist/plugins/form-builder/api/index.d.cts +2 -2
  64. package/dist/plugins/form-builder/api/index.d.mts +2 -2
  65. package/dist/plugins/form-builder/api/index.d.ts +2 -2
  66. package/dist/plugins/form-builder/client/components/index.d.cts +1 -1
  67. package/dist/plugins/form-builder/client/components/index.d.mts +1 -1
  68. package/dist/plugins/form-builder/client/components/index.d.ts +1 -1
  69. package/dist/plugins/form-builder/client/hooks/index.d.cts +1 -1
  70. package/dist/plugins/form-builder/client/hooks/index.d.mts +1 -1
  71. package/dist/plugins/form-builder/client/hooks/index.d.ts +1 -1
  72. package/dist/plugins/form-builder/client/index.d.cts +6 -6
  73. package/dist/plugins/form-builder/client/index.d.mts +6 -6
  74. package/dist/plugins/form-builder/client/index.d.ts +6 -6
  75. package/dist/plugins/form-builder/query-keys.d.cts +2 -2
  76. package/dist/plugins/form-builder/query-keys.d.mts +2 -2
  77. package/dist/plugins/form-builder/query-keys.d.ts +2 -2
  78. package/dist/plugins/kanban/api/index.d.cts +1 -1
  79. package/dist/plugins/kanban/api/index.d.mts +1 -1
  80. package/dist/plugins/kanban/api/index.d.ts +1 -1
  81. package/dist/plugins/kanban/client/index.d.cts +12 -12
  82. package/dist/plugins/kanban/client/index.d.mts +12 -12
  83. package/dist/plugins/kanban/client/index.d.ts +12 -12
  84. package/dist/plugins/kanban/query-keys.d.cts +1 -1
  85. package/dist/plugins/kanban/query-keys.d.mts +1 -1
  86. package/dist/plugins/kanban/query-keys.d.ts +1 -1
  87. package/dist/plugins/ui-builder/client/hooks/index.d.cts +1 -1
  88. package/dist/plugins/ui-builder/client/hooks/index.d.mts +1 -1
  89. package/dist/plugins/ui-builder/client/hooks/index.d.ts +1 -1
  90. package/dist/plugins/ui-builder/client/index.d.cts +3 -3
  91. package/dist/plugins/ui-builder/client/index.d.mts +3 -3
  92. package/dist/plugins/ui-builder/client/index.d.ts +3 -3
  93. package/dist/plugins/ui-builder/index.d.cts +2 -2
  94. package/dist/plugins/ui-builder/index.d.mts +2 -2
  95. package/dist/plugins/ui-builder/index.d.ts +2 -2
  96. package/dist/shared/{stack.C-WUPMT6.d.cts → stack.B2xZTSiO.d.cts} +4 -4
  97. package/dist/shared/{stack.CczspVn2.d.mts → stack.B58oHdqm.d.mts} +1 -1
  98. package/dist/shared/{stack.CVDTkMoO.d.mts → stack.B8QD11QU.d.cts} +7 -7
  99. package/dist/shared/{stack.CVDTkMoO.d.cts → stack.B8QD11QU.d.mts} +7 -7
  100. package/dist/shared/{stack.CVDTkMoO.d.ts → stack.B8QD11QU.d.ts} +7 -7
  101. package/dist/shared/{stack.Kq2-QzOC.d.ts → stack.BDVEpue1.d.ts} +2 -2
  102. package/dist/shared/{stack.B7ONvlD_.d.mts → stack.BTvbxZvw.d.cts} +2 -2
  103. package/dist/shared/{stack.DdI5W6MB.d.mts → stack.BozPgbrZ.d.cts} +19 -19
  104. package/dist/shared/{stack.DdI5W6MB.d.cts → stack.BozPgbrZ.d.mts} +19 -19
  105. package/dist/shared/{stack.DdI5W6MB.d.ts → stack.BozPgbrZ.d.ts} +19 -19
  106. package/dist/shared/{stack.BUkC2EsZ.d.cts → stack.C9Mg2Q46.d.cts} +1 -1
  107. package/dist/shared/{stack.BEn34wW6.d.ts → stack.CTDVxbrA.d.ts} +12 -12
  108. package/dist/shared/{stack.C-Ptrz8s.d.ts → stack.Cj_zKww4.d.ts} +4 -4
  109. package/dist/shared/{stack.BepFXT3w.d.mts → stack.CxaFNQCV.d.mts} +25 -25
  110. package/dist/shared/{stack.DWoCZff7.d.cts → stack.D-b5zbPm.d.cts} +12 -12
  111. package/dist/shared/{stack.kcdnD4gA.d.cts → stack.DTtmJPQO.d.mts} +2 -2
  112. package/dist/shared/{stack.CL8ts1Mu.d.ts → stack.DXnclTG7.d.ts} +8 -8
  113. package/dist/shared/{stack.heOA9gzA.d.cts → stack.DaZM10cp.d.cts} +8 -8
  114. package/dist/shared/{stack.DTDxgFj8.d.mts → stack.FVWf2JhZ.d.mts} +12 -12
  115. package/dist/shared/{stack.Dk5r4W1F.d.mts → stack.cfCkioTe.d.mts} +8 -8
  116. package/dist/shared/{stack.6fUOjLs9.d.mts → stack.dH7u-TJH.d.mts} +4 -4
  117. package/dist/shared/{stack.CgWzG5jH.d.ts → stack.j75TpKh2.d.ts} +25 -25
  118. package/dist/shared/{stack.D3GB6wKv.d.cts → stack.n1_i1p2B.d.cts} +25 -25
  119. package/dist/shared/{stack.DASmUVjX.d.ts → stack.sO33ZDhK.d.ts} +1 -1
  120. package/package.json +1 -1
  121. package/src/plugins/ai-chat/api/plugin.ts +48 -63
  122. package/src/plugins/ai-chat/client/plugin.tsx +23 -31
  123. package/src/plugins/blog/api/plugin.ts +31 -47
  124. package/src/plugins/blog/client/plugin.tsx +36 -39
  125. package/src/plugins/client/index.ts +5 -1
  126. package/src/plugins/cms/api/plugin.ts +14 -17
  127. package/src/plugins/cms/client/plugin.tsx +18 -21
  128. package/src/plugins/cms/types.ts +7 -7
  129. package/src/plugins/form-builder/api/plugin.ts +64 -64
  130. package/src/plugins/form-builder/client/plugin.tsx +19 -18
  131. package/src/plugins/form-builder/types.ts +19 -24
  132. package/src/plugins/kanban/api/plugin.ts +111 -136
  133. package/src/plugins/kanban/client/plugin.tsx +35 -41
  134. package/src/plugins/ui-builder/client/plugin.tsx +11 -10
  135. package/src/plugins/ui-builder/types.ts +4 -4
  136. package/src/plugins/utils.ts +92 -1
@@ -34,21 +34,21 @@ interface LoaderContext {
34
34
  */
35
35
  interface CMSClientHooks {
36
36
  /**
37
- * Called before loading the dashboard page. Return false to cancel loading.
37
+ * Called before loading the dashboard page. Throw an error to cancel loading.
38
38
  * @param context - Loader context with path, params, etc.
39
39
  */
40
- beforeLoadDashboard?: (context: LoaderContext) => Promise<boolean> | boolean;
40
+ beforeLoadDashboard?: (context: LoaderContext) => Promise<void> | void;
41
41
  /**
42
42
  * Called after the dashboard is loaded.
43
43
  * @param context - Loader context
44
44
  */
45
45
  afterLoadDashboard?: (context: LoaderContext) => Promise<void> | void;
46
46
  /**
47
- * Called before loading a content list page. Return false to cancel loading.
47
+ * Called before loading a content list page. Throw an error to cancel loading.
48
48
  * @param typeSlug - The content type slug
49
49
  * @param context - Loader context
50
50
  */
51
- beforeLoadContentList?: (typeSlug: string, context: LoaderContext) => Promise<boolean> | boolean;
51
+ beforeLoadContentList?: (typeSlug: string, context: LoaderContext) => Promise<void> | void;
52
52
  /**
53
53
  * Called after a content list is loaded.
54
54
  * @param typeSlug - The content type slug
@@ -56,12 +56,12 @@ interface CMSClientHooks {
56
56
  */
57
57
  afterLoadContentList?: (typeSlug: string, context: LoaderContext) => Promise<void> | void;
58
58
  /**
59
- * Called before loading the content editor page. Return false to cancel loading.
59
+ * Called before loading the content editor page. Throw an error to cancel loading.
60
60
  * @param typeSlug - The content type slug
61
61
  * @param id - The content item ID (undefined for new items)
62
62
  * @param context - Loader context
63
63
  */
64
- beforeLoadContentEditor?: (typeSlug: string, id: string | undefined, context: LoaderContext) => Promise<boolean> | boolean;
64
+ beforeLoadContentEditor?: (typeSlug: string, id: string | undefined, context: LoaderContext) => Promise<void> | void;
65
65
  /**
66
66
  * Called after the content editor is loaded.
67
67
  * @param typeSlug - The content type slug
@@ -34,21 +34,21 @@ interface LoaderContext {
34
34
  */
35
35
  interface CMSClientHooks {
36
36
  /**
37
- * Called before loading the dashboard page. Return false to cancel loading.
37
+ * Called before loading the dashboard page. Throw an error to cancel loading.
38
38
  * @param context - Loader context with path, params, etc.
39
39
  */
40
- beforeLoadDashboard?: (context: LoaderContext) => Promise<boolean> | boolean;
40
+ beforeLoadDashboard?: (context: LoaderContext) => Promise<void> | void;
41
41
  /**
42
42
  * Called after the dashboard is loaded.
43
43
  * @param context - Loader context
44
44
  */
45
45
  afterLoadDashboard?: (context: LoaderContext) => Promise<void> | void;
46
46
  /**
47
- * Called before loading a content list page. Return false to cancel loading.
47
+ * Called before loading a content list page. Throw an error to cancel loading.
48
48
  * @param typeSlug - The content type slug
49
49
  * @param context - Loader context
50
50
  */
51
- beforeLoadContentList?: (typeSlug: string, context: LoaderContext) => Promise<boolean> | boolean;
51
+ beforeLoadContentList?: (typeSlug: string, context: LoaderContext) => Promise<void> | void;
52
52
  /**
53
53
  * Called after a content list is loaded.
54
54
  * @param typeSlug - The content type slug
@@ -56,12 +56,12 @@ interface CMSClientHooks {
56
56
  */
57
57
  afterLoadContentList?: (typeSlug: string, context: LoaderContext) => Promise<void> | void;
58
58
  /**
59
- * Called before loading the content editor page. Return false to cancel loading.
59
+ * Called before loading the content editor page. Throw an error to cancel loading.
60
60
  * @param typeSlug - The content type slug
61
61
  * @param id - The content item ID (undefined for new items)
62
62
  * @param context - Loader context
63
63
  */
64
- beforeLoadContentEditor?: (typeSlug: string, id: string | undefined, context: LoaderContext) => Promise<boolean> | boolean;
64
+ beforeLoadContentEditor?: (typeSlug: string, id: string | undefined, context: LoaderContext) => Promise<void> | void;
65
65
  /**
66
66
  * Called after the content editor is loaded.
67
67
  * @param typeSlug - The content type slug
@@ -1,7 +1,7 @@
1
- import { C as CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.BUkC2EsZ.cjs';
1
+ import { C as CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.C9Mg2Q46.cjs';
2
2
  import * as _tanstack_react_query from '@tanstack/react-query';
3
3
  import { createApiClient } from '@btst/stack/plugins/client';
4
- import { S as SerializedContentType, P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.CVDTkMoO.cjs';
4
+ import { S as SerializedContentType, P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.B8QD11QU.cjs';
5
5
  import '@btst/stack/plugins/api';
6
6
  import 'better-call';
7
7
  import 'zod';
@@ -1,7 +1,7 @@
1
- import { C as CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.CczspVn2.mjs';
1
+ import { C as CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.B58oHdqm.mjs';
2
2
  import * as _tanstack_react_query from '@tanstack/react-query';
3
3
  import { createApiClient } from '@btst/stack/plugins/client';
4
- import { S as SerializedContentType, P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.CVDTkMoO.mjs';
4
+ import { S as SerializedContentType, P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.B8QD11QU.mjs';
5
5
  import '@btst/stack/plugins/api';
6
6
  import 'better-call';
7
7
  import 'zod';
@@ -1,7 +1,7 @@
1
- import { C as CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.DASmUVjX.js';
1
+ import { C as CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.sO33ZDhK.js';
2
2
  import * as _tanstack_react_query from '@tanstack/react-query';
3
3
  import { createApiClient } from '@btst/stack/plugins/client';
4
- import { S as SerializedContentType, P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.CVDTkMoO.js';
4
+ import { S as SerializedContentType, P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.B8QD11QU.js';
5
5
  import '@btst/stack/plugins/api';
6
6
  import 'better-call';
7
7
  import 'zod';
@@ -1,7 +1,7 @@
1
- export { j as FORM_QUERY_KEYS, F as FormBuilderApiRouter, b as FormBuilderRouteKey, f as formBuilderBackendPlugin, g as getAllForms, c as getFormById, d as getFormBySlug, e as getFormSubmissions, s as serializeForm, h as serializeFormSubmission, i as serializeFormSubmissionWithData } from '../../../shared/stack.kcdnD4gA.cjs';
1
+ export { j as FORM_QUERY_KEYS, F as FormBuilderApiRouter, b as FormBuilderRouteKey, f as formBuilderBackendPlugin, g as getAllForms, c as getFormById, d as getFormBySlug, e as getFormSubmissions, s as serializeForm, h as serializeFormSubmission, i as serializeFormSubmissionWithData } from '../../../shared/stack.BTvbxZvw.cjs';
2
2
  import '@btst/stack/plugins/api';
3
3
  import 'better-call';
4
- import '../../../shared/stack.DdI5W6MB.cjs';
4
+ import '../../../shared/stack.BozPgbrZ.cjs';
5
5
  import 'zod';
6
6
  import '@btst/db';
7
7
  import '@tanstack/react-query';
@@ -1,7 +1,7 @@
1
- export { j as FORM_QUERY_KEYS, F as FormBuilderApiRouter, b as FormBuilderRouteKey, f as formBuilderBackendPlugin, g as getAllForms, c as getFormById, d as getFormBySlug, e as getFormSubmissions, s as serializeForm, h as serializeFormSubmission, i as serializeFormSubmissionWithData } from '../../../shared/stack.B7ONvlD_.mjs';
1
+ export { j as FORM_QUERY_KEYS, F as FormBuilderApiRouter, b as FormBuilderRouteKey, f as formBuilderBackendPlugin, g as getAllForms, c as getFormById, d as getFormBySlug, e as getFormSubmissions, s as serializeForm, h as serializeFormSubmission, i as serializeFormSubmissionWithData } from '../../../shared/stack.DTtmJPQO.mjs';
2
2
  import '@btst/stack/plugins/api';
3
3
  import 'better-call';
4
- import '../../../shared/stack.DdI5W6MB.mjs';
4
+ import '../../../shared/stack.BozPgbrZ.mjs';
5
5
  import 'zod';
6
6
  import '@btst/db';
7
7
  import '@tanstack/react-query';
@@ -1,7 +1,7 @@
1
- export { j as FORM_QUERY_KEYS, F as FormBuilderApiRouter, b as FormBuilderRouteKey, f as formBuilderBackendPlugin, g as getAllForms, c as getFormById, d as getFormBySlug, e as getFormSubmissions, s as serializeForm, h as serializeFormSubmission, i as serializeFormSubmissionWithData } from '../../../shared/stack.Kq2-QzOC.js';
1
+ export { j as FORM_QUERY_KEYS, F as FormBuilderApiRouter, b as FormBuilderRouteKey, f as formBuilderBackendPlugin, g as getAllForms, c as getFormById, d as getFormBySlug, e as getFormSubmissions, s as serializeForm, h as serializeFormSubmission, i as serializeFormSubmissionWithData } from '../../../shared/stack.BDVEpue1.js';
2
2
  import '@btst/stack/plugins/api';
3
3
  import 'better-call';
4
- import '../../../shared/stack.DdI5W6MB.js';
4
+ import '../../../shared/stack.BozPgbrZ.js';
5
5
  import 'zod';
6
6
  import '@btst/db';
7
7
  import '@tanstack/react-query';
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ComponentType } from 'react';
3
3
  import { A as AutoFormInputComponentProps } from '../../../../shared/stack.8nldKomx.cjs';
4
- import { a as SerializedFormSubmission } from '../../../../shared/stack.DdI5W6MB.cjs';
4
+ import { a as SerializedFormSubmission } from '../../../../shared/stack.BozPgbrZ.cjs';
5
5
  import 'react-hook-form';
6
6
  import 'zod';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ComponentType } from 'react';
3
3
  import { A as AutoFormInputComponentProps } from '../../../../shared/stack.8nldKomx.mjs';
4
- import { a as SerializedFormSubmission } from '../../../../shared/stack.DdI5W6MB.mjs';
4
+ import { a as SerializedFormSubmission } from '../../../../shared/stack.BozPgbrZ.mjs';
5
5
  import 'react-hook-form';
6
6
  import 'zod';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ComponentType } from 'react';
3
3
  import { A as AutoFormInputComponentProps } from '../../../../shared/stack.8nldKomx.js';
4
- import { a as SerializedFormSubmission } from '../../../../shared/stack.DdI5W6MB.js';
4
+ import { a as SerializedFormSubmission } from '../../../../shared/stack.BozPgbrZ.js';
5
5
  import 'react-hook-form';
6
6
  import 'zod';
7
7
 
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { S as SerializedForm, a as SerializedFormSubmission, b as SerializedFormSubmissionWithData } from '../../../../shared/stack.DdI5W6MB.cjs';
2
+ import { S as SerializedForm, a as SerializedFormSubmission, b as SerializedFormSubmissionWithData } from '../../../../shared/stack.BozPgbrZ.cjs';
3
3
 
4
4
  interface UseFormsOptions {
5
5
  /** Filter by status */
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { S as SerializedForm, a as SerializedFormSubmission, b as SerializedFormSubmissionWithData } from '../../../../shared/stack.DdI5W6MB.mjs';
2
+ import { S as SerializedForm, a as SerializedFormSubmission, b as SerializedFormSubmissionWithData } from '../../../../shared/stack.BozPgbrZ.mjs';
3
3
 
4
4
  interface UseFormsOptions {
5
5
  /** Filter by status */
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { S as SerializedForm, a as SerializedFormSubmission, b as SerializedFormSubmissionWithData } from '../../../../shared/stack.DdI5W6MB.js';
2
+ import { S as SerializedForm, a as SerializedFormSubmission, b as SerializedFormSubmissionWithData } from '../../../../shared/stack.BozPgbrZ.js';
3
3
 
4
4
  interface UseFormsOptions {
5
5
  /** Filter by status */
@@ -34,21 +34,21 @@ interface LoaderContext {
34
34
  */
35
35
  interface FormBuilderClientHooks {
36
36
  /**
37
- * Called before loading the form list page. Return false to cancel loading.
37
+ * Called before loading the form list page. Throw an error to cancel loading.
38
38
  * @param context - Loader context with path, params, etc.
39
39
  */
40
- beforeLoadFormList?: (context: LoaderContext) => Promise<boolean> | boolean;
40
+ beforeLoadFormList?: (context: LoaderContext) => Promise<void> | void;
41
41
  /**
42
42
  * Called after the form list is loaded.
43
43
  * @param context - Loader context
44
44
  */
45
45
  afterLoadFormList?: (context: LoaderContext) => Promise<void> | void;
46
46
  /**
47
- * Called before loading the form builder page. Return false to cancel loading.
47
+ * Called before loading the form builder page. Throw an error to cancel loading.
48
48
  * @param id - The form ID (undefined for new forms)
49
49
  * @param context - Loader context
50
50
  */
51
- beforeLoadFormBuilder?: (id: string | undefined, context: LoaderContext) => Promise<boolean> | boolean;
51
+ beforeLoadFormBuilder?: (id: string | undefined, context: LoaderContext) => Promise<void> | void;
52
52
  /**
53
53
  * Called after the form builder is loaded.
54
54
  * @param id - The form ID (undefined for new forms)
@@ -56,11 +56,11 @@ interface FormBuilderClientHooks {
56
56
  */
57
57
  afterLoadFormBuilder?: (id: string | undefined, context: LoaderContext) => Promise<void> | void;
58
58
  /**
59
- * Called before loading the submissions page. Return false to cancel loading.
59
+ * Called before loading the submissions page. Throw an error to cancel loading.
60
60
  * @param formId - The form ID
61
61
  * @param context - Loader context
62
62
  */
63
- beforeLoadSubmissions?: (formId: string, context: LoaderContext) => Promise<boolean> | boolean;
63
+ beforeLoadSubmissions?: (formId: string, context: LoaderContext) => Promise<void> | void;
64
64
  /**
65
65
  * Called after the submissions page is loaded.
66
66
  * @param formId - The form ID
@@ -34,21 +34,21 @@ interface LoaderContext {
34
34
  */
35
35
  interface FormBuilderClientHooks {
36
36
  /**
37
- * Called before loading the form list page. Return false to cancel loading.
37
+ * Called before loading the form list page. Throw an error to cancel loading.
38
38
  * @param context - Loader context with path, params, etc.
39
39
  */
40
- beforeLoadFormList?: (context: LoaderContext) => Promise<boolean> | boolean;
40
+ beforeLoadFormList?: (context: LoaderContext) => Promise<void> | void;
41
41
  /**
42
42
  * Called after the form list is loaded.
43
43
  * @param context - Loader context
44
44
  */
45
45
  afterLoadFormList?: (context: LoaderContext) => Promise<void> | void;
46
46
  /**
47
- * Called before loading the form builder page. Return false to cancel loading.
47
+ * Called before loading the form builder page. Throw an error to cancel loading.
48
48
  * @param id - The form ID (undefined for new forms)
49
49
  * @param context - Loader context
50
50
  */
51
- beforeLoadFormBuilder?: (id: string | undefined, context: LoaderContext) => Promise<boolean> | boolean;
51
+ beforeLoadFormBuilder?: (id: string | undefined, context: LoaderContext) => Promise<void> | void;
52
52
  /**
53
53
  * Called after the form builder is loaded.
54
54
  * @param id - The form ID (undefined for new forms)
@@ -56,11 +56,11 @@ interface FormBuilderClientHooks {
56
56
  */
57
57
  afterLoadFormBuilder?: (id: string | undefined, context: LoaderContext) => Promise<void> | void;
58
58
  /**
59
- * Called before loading the submissions page. Return false to cancel loading.
59
+ * Called before loading the submissions page. Throw an error to cancel loading.
60
60
  * @param formId - The form ID
61
61
  * @param context - Loader context
62
62
  */
63
- beforeLoadSubmissions?: (formId: string, context: LoaderContext) => Promise<boolean> | boolean;
63
+ beforeLoadSubmissions?: (formId: string, context: LoaderContext) => Promise<void> | void;
64
64
  /**
65
65
  * Called after the submissions page is loaded.
66
66
  * @param formId - The form ID
@@ -34,21 +34,21 @@ interface LoaderContext {
34
34
  */
35
35
  interface FormBuilderClientHooks {
36
36
  /**
37
- * Called before loading the form list page. Return false to cancel loading.
37
+ * Called before loading the form list page. Throw an error to cancel loading.
38
38
  * @param context - Loader context with path, params, etc.
39
39
  */
40
- beforeLoadFormList?: (context: LoaderContext) => Promise<boolean> | boolean;
40
+ beforeLoadFormList?: (context: LoaderContext) => Promise<void> | void;
41
41
  /**
42
42
  * Called after the form list is loaded.
43
43
  * @param context - Loader context
44
44
  */
45
45
  afterLoadFormList?: (context: LoaderContext) => Promise<void> | void;
46
46
  /**
47
- * Called before loading the form builder page. Return false to cancel loading.
47
+ * Called before loading the form builder page. Throw an error to cancel loading.
48
48
  * @param id - The form ID (undefined for new forms)
49
49
  * @param context - Loader context
50
50
  */
51
- beforeLoadFormBuilder?: (id: string | undefined, context: LoaderContext) => Promise<boolean> | boolean;
51
+ beforeLoadFormBuilder?: (id: string | undefined, context: LoaderContext) => Promise<void> | void;
52
52
  /**
53
53
  * Called after the form builder is loaded.
54
54
  * @param id - The form ID (undefined for new forms)
@@ -56,11 +56,11 @@ interface FormBuilderClientHooks {
56
56
  */
57
57
  afterLoadFormBuilder?: (id: string | undefined, context: LoaderContext) => Promise<void> | void;
58
58
  /**
59
- * Called before loading the submissions page. Return false to cancel loading.
59
+ * Called before loading the submissions page. Throw an error to cancel loading.
60
60
  * @param formId - The form ID
61
61
  * @param context - Loader context
62
62
  */
63
- beforeLoadSubmissions?: (formId: string, context: LoaderContext) => Promise<boolean> | boolean;
63
+ beforeLoadSubmissions?: (formId: string, context: LoaderContext) => Promise<void> | void;
64
64
  /**
65
65
  * Called after the submissions page is loaded.
66
66
  * @param formId - The form ID
@@ -1,7 +1,7 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { F as FormBuilderApiRouter, a as FormsListDiscriminator, S as SubmissionsListDiscriminator } from '../../shared/stack.kcdnD4gA.cjs';
2
+ import { F as FormBuilderApiRouter, a as FormsListDiscriminator, S as SubmissionsListDiscriminator } from '../../shared/stack.BTvbxZvw.cjs';
3
3
  import { createApiClient } from '@btst/stack/plugins/client';
4
- import { P as PaginatedForms, S as SerializedForm, c as PaginatedFormSubmissions, b as SerializedFormSubmissionWithData } from '../../shared/stack.DdI5W6MB.cjs';
4
+ import { P as PaginatedForms, S as SerializedForm, c as PaginatedFormSubmissions, b as SerializedFormSubmissionWithData } from '../../shared/stack.BozPgbrZ.cjs';
5
5
  import '@btst/stack/plugins/api';
6
6
  import 'better-call';
7
7
  import 'zod';
@@ -1,7 +1,7 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { F as FormBuilderApiRouter, a as FormsListDiscriminator, S as SubmissionsListDiscriminator } from '../../shared/stack.B7ONvlD_.mjs';
2
+ import { F as FormBuilderApiRouter, a as FormsListDiscriminator, S as SubmissionsListDiscriminator } from '../../shared/stack.DTtmJPQO.mjs';
3
3
  import { createApiClient } from '@btst/stack/plugins/client';
4
- import { P as PaginatedForms, S as SerializedForm, c as PaginatedFormSubmissions, b as SerializedFormSubmissionWithData } from '../../shared/stack.DdI5W6MB.mjs';
4
+ import { P as PaginatedForms, S as SerializedForm, c as PaginatedFormSubmissions, b as SerializedFormSubmissionWithData } from '../../shared/stack.BozPgbrZ.mjs';
5
5
  import '@btst/stack/plugins/api';
6
6
  import 'better-call';
7
7
  import 'zod';
@@ -1,7 +1,7 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { F as FormBuilderApiRouter, a as FormsListDiscriminator, S as SubmissionsListDiscriminator } from '../../shared/stack.Kq2-QzOC.js';
2
+ import { F as FormBuilderApiRouter, a as FormsListDiscriminator, S as SubmissionsListDiscriminator } from '../../shared/stack.BDVEpue1.js';
3
3
  import { createApiClient } from '@btst/stack/plugins/client';
4
- import { P as PaginatedForms, S as SerializedForm, c as PaginatedFormSubmissions, b as SerializedFormSubmissionWithData } from '../../shared/stack.DdI5W6MB.js';
4
+ import { P as PaginatedForms, S as SerializedForm, c as PaginatedFormSubmissions, b as SerializedFormSubmissionWithData } from '../../shared/stack.BozPgbrZ.js';
5
5
  import '@btst/stack/plugins/api';
6
6
  import 'better-call';
7
7
  import 'zod';
@@ -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.D3GB6wKv.cjs';
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.n1_i1p2B.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 'better-call';
@@ -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.BepFXT3w.mjs';
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.CxaFNQCV.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 'better-call';
@@ -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.CgWzG5jH.js';
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.j75TpKh2.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 'better-call';
@@ -73,29 +73,29 @@ interface KanbanClientConfig {
73
73
  */
74
74
  interface KanbanClientHooks {
75
75
  /**
76
- * Called before loading boards list. Return false to cancel loading.
76
+ * Called before loading boards list. Throw an error to cancel loading.
77
77
  */
78
- beforeLoadBoards?: (context: LoaderContext) => Promise<boolean> | boolean;
78
+ beforeLoadBoards?: (context: LoaderContext) => Promise<void> | void;
79
79
  /**
80
- * Called after boards are loaded. Return false to cancel further processing.
80
+ * Called after boards are loaded. Throw an error to cancel further processing.
81
81
  */
82
- afterLoadBoards?: (boards: SerializedBoardWithColumns[] | null, context: LoaderContext) => Promise<boolean> | boolean;
82
+ afterLoadBoards?: (boards: SerializedBoardWithColumns[] | null, context: LoaderContext) => Promise<void> | void;
83
83
  /**
84
- * Called before loading a single board. Return false to cancel loading.
84
+ * Called before loading a single board. Throw an error to cancel loading.
85
85
  */
86
- beforeLoadBoard?: (boardId: string, context: LoaderContext) => Promise<boolean> | boolean;
86
+ beforeLoadBoard?: (boardId: string, context: LoaderContext) => Promise<void> | void;
87
87
  /**
88
- * Called after a board is loaded. Return false to cancel further processing.
88
+ * Called after a board is loaded. Throw an error to cancel further processing.
89
89
  */
90
- afterLoadBoard?: (board: SerializedBoardWithColumns | null, boardId: string, context: LoaderContext) => Promise<boolean> | boolean;
90
+ afterLoadBoard?: (board: SerializedBoardWithColumns | null, boardId: string, context: LoaderContext) => Promise<void> | void;
91
91
  /**
92
- * Called before loading the new board page. Return false to cancel.
92
+ * Called before loading the new board page. Throw an error to cancel.
93
93
  */
94
- beforeLoadNewBoard?: (context: LoaderContext) => Promise<boolean> | boolean;
94
+ beforeLoadNewBoard?: (context: LoaderContext) => Promise<void> | void;
95
95
  /**
96
- * Called after the new board page is loaded. Return false to cancel.
96
+ * Called after the new board page is loaded. Throw an error to cancel.
97
97
  */
98
- afterLoadNewBoard?: (context: LoaderContext) => Promise<boolean> | boolean;
98
+ afterLoadNewBoard?: (context: LoaderContext) => Promise<void> | void;
99
99
  /**
100
100
  * Called when a loading error occurs
101
101
  */
@@ -73,29 +73,29 @@ interface KanbanClientConfig {
73
73
  */
74
74
  interface KanbanClientHooks {
75
75
  /**
76
- * Called before loading boards list. Return false to cancel loading.
76
+ * Called before loading boards list. Throw an error to cancel loading.
77
77
  */
78
- beforeLoadBoards?: (context: LoaderContext) => Promise<boolean> | boolean;
78
+ beforeLoadBoards?: (context: LoaderContext) => Promise<void> | void;
79
79
  /**
80
- * Called after boards are loaded. Return false to cancel further processing.
80
+ * Called after boards are loaded. Throw an error to cancel further processing.
81
81
  */
82
- afterLoadBoards?: (boards: SerializedBoardWithColumns[] | null, context: LoaderContext) => Promise<boolean> | boolean;
82
+ afterLoadBoards?: (boards: SerializedBoardWithColumns[] | null, context: LoaderContext) => Promise<void> | void;
83
83
  /**
84
- * Called before loading a single board. Return false to cancel loading.
84
+ * Called before loading a single board. Throw an error to cancel loading.
85
85
  */
86
- beforeLoadBoard?: (boardId: string, context: LoaderContext) => Promise<boolean> | boolean;
86
+ beforeLoadBoard?: (boardId: string, context: LoaderContext) => Promise<void> | void;
87
87
  /**
88
- * Called after a board is loaded. Return false to cancel further processing.
88
+ * Called after a board is loaded. Throw an error to cancel further processing.
89
89
  */
90
- afterLoadBoard?: (board: SerializedBoardWithColumns | null, boardId: string, context: LoaderContext) => Promise<boolean> | boolean;
90
+ afterLoadBoard?: (board: SerializedBoardWithColumns | null, boardId: string, context: LoaderContext) => Promise<void> | void;
91
91
  /**
92
- * Called before loading the new board page. Return false to cancel.
92
+ * Called before loading the new board page. Throw an error to cancel.
93
93
  */
94
- beforeLoadNewBoard?: (context: LoaderContext) => Promise<boolean> | boolean;
94
+ beforeLoadNewBoard?: (context: LoaderContext) => Promise<void> | void;
95
95
  /**
96
- * Called after the new board page is loaded. Return false to cancel.
96
+ * Called after the new board page is loaded. Throw an error to cancel.
97
97
  */
98
- afterLoadNewBoard?: (context: LoaderContext) => Promise<boolean> | boolean;
98
+ afterLoadNewBoard?: (context: LoaderContext) => Promise<void> | void;
99
99
  /**
100
100
  * Called when a loading error occurs
101
101
  */
@@ -73,29 +73,29 @@ interface KanbanClientConfig {
73
73
  */
74
74
  interface KanbanClientHooks {
75
75
  /**
76
- * Called before loading boards list. Return false to cancel loading.
76
+ * Called before loading boards list. Throw an error to cancel loading.
77
77
  */
78
- beforeLoadBoards?: (context: LoaderContext) => Promise<boolean> | boolean;
78
+ beforeLoadBoards?: (context: LoaderContext) => Promise<void> | void;
79
79
  /**
80
- * Called after boards are loaded. Return false to cancel further processing.
80
+ * Called after boards are loaded. Throw an error to cancel further processing.
81
81
  */
82
- afterLoadBoards?: (boards: SerializedBoardWithColumns[] | null, context: LoaderContext) => Promise<boolean> | boolean;
82
+ afterLoadBoards?: (boards: SerializedBoardWithColumns[] | null, context: LoaderContext) => Promise<void> | void;
83
83
  /**
84
- * Called before loading a single board. Return false to cancel loading.
84
+ * Called before loading a single board. Throw an error to cancel loading.
85
85
  */
86
- beforeLoadBoard?: (boardId: string, context: LoaderContext) => Promise<boolean> | boolean;
86
+ beforeLoadBoard?: (boardId: string, context: LoaderContext) => Promise<void> | void;
87
87
  /**
88
- * Called after a board is loaded. Return false to cancel further processing.
88
+ * Called after a board is loaded. Throw an error to cancel further processing.
89
89
  */
90
- afterLoadBoard?: (board: SerializedBoardWithColumns | null, boardId: string, context: LoaderContext) => Promise<boolean> | boolean;
90
+ afterLoadBoard?: (board: SerializedBoardWithColumns | null, boardId: string, context: LoaderContext) => Promise<void> | void;
91
91
  /**
92
- * Called before loading the new board page. Return false to cancel.
92
+ * Called before loading the new board page. Throw an error to cancel.
93
93
  */
94
- beforeLoadNewBoard?: (context: LoaderContext) => Promise<boolean> | boolean;
94
+ beforeLoadNewBoard?: (context: LoaderContext) => Promise<void> | void;
95
95
  /**
96
- * Called after the new board page is loaded. Return false to cancel.
96
+ * Called after the new board page is loaded. Throw an error to cancel.
97
97
  */
98
- afterLoadNewBoard?: (context: LoaderContext) => Promise<boolean> | boolean;
98
+ afterLoadNewBoard?: (context: LoaderContext) => Promise<void> | void;
99
99
  /**
100
100
  * Called when a loading error occurs
101
101
  */
@@ -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.D3GB6wKv.cjs';
2
+ import { K as KanbanApiRouter, j as BoardsListDiscriminator } from '../../shared/stack.n1_i1p2B.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.BepFXT3w.mjs';
2
+ import { K as KanbanApiRouter, j as BoardsListDiscriminator } from '../../shared/stack.CxaFNQCV.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.CgWzG5jH.js';
2
+ import { K as KanbanApiRouter, j as BoardsListDiscriminator } from '../../shared/stack.j75TpKh2.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 * as _tanstack_react_query from '@tanstack/react-query';
2
- import { S as SerializedUIBuilderPage } from '../../../../shared/stack.C-WUPMT6.cjs';
2
+ import { S as SerializedUIBuilderPage } from '../../../../shared/stack.B2xZTSiO.cjs';
3
3
  import { C as ComponentLayer, V as Variable } from '../../../../shared/stack.B-YHz18S.cjs';
4
4
  import 'zod';
5
5
  import 'react';
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { S as SerializedUIBuilderPage } from '../../../../shared/stack.6fUOjLs9.mjs';
2
+ import { S as SerializedUIBuilderPage } from '../../../../shared/stack.dH7u-TJH.mjs';
3
3
  import { C as ComponentLayer, V as Variable } from '../../../../shared/stack.D1DMlJp-.mjs';
4
4
  import 'zod';
5
5
  import 'react';
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { S as SerializedUIBuilderPage } from '../../../../shared/stack.C-Ptrz8s.js';
2
+ import { S as SerializedUIBuilderPage } from '../../../../shared/stack.Cj_zKww4.js';
3
3
  import { C as ComponentLayer, V as Variable } from '../../../../shared/stack.GygI_T3X.js';
4
4
  import 'zod';
5
5
  import 'react';
@@ -3,7 +3,7 @@ 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.C-WUPMT6.cjs';
6
+ import { c as UIBuilderClientHooks } from '../../../shared/stack.B2xZTSiO.cjs';
7
7
  import { a as ComponentRegistry, F as FieldConfigFunction, C as ComponentLayer } from '../../../shared/stack.B-YHz18S.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';
@@ -50,11 +50,11 @@ interface UIBuilderClientConfig {
50
50
  * hooks: {
51
51
  * beforeLoadPageList: async (ctx) => {
52
52
  * const session = await getSession(ctx.headers)
53
- * return session?.user?.isAdmin === true
53
+ * if (!session?.user?.isAdmin) throw new Error("Admin access required")
54
54
  * },
55
55
  * beforeLoadPageBuilder: async (pageId, ctx) => {
56
56
  * const session = await getSession(ctx.headers)
57
- * return session?.user?.isAdmin === true
57
+ * if (!session?.user?.isAdmin) throw new Error("Admin access required")
58
58
  * },
59
59
  * onLoadError: () => redirect("/auth/sign-in"),
60
60
  * },