@btst/stack 2.5.6 → 2.6.1

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 (216) hide show
  1. package/README.md +23 -0
  2. package/dist/client/components/index.d.cts +9 -9
  3. package/dist/client/components/index.d.mts +9 -9
  4. package/dist/client/components/index.d.ts +9 -9
  5. package/dist/components/auto-form/index.cjs +8 -0
  6. package/dist/components/auto-form/index.d.cts +26 -0
  7. package/dist/components/auto-form/index.d.mts +26 -0
  8. package/dist/components/auto-form/index.d.ts +26 -0
  9. package/dist/components/auto-form/index.mjs +1 -0
  10. package/dist/components/empty/index.cjs +12 -0
  11. package/dist/components/empty/index.d.cts +15 -0
  12. package/dist/components/empty/index.d.mts +15 -0
  13. package/dist/components/empty/index.d.ts +15 -0
  14. package/dist/components/empty/index.mjs +1 -0
  15. package/dist/components/form-builder/index.cjs +16 -0
  16. package/dist/components/form-builder/index.d.cts +385 -0
  17. package/dist/components/form-builder/index.d.mts +385 -0
  18. package/dist/components/form-builder/index.d.ts +385 -0
  19. package/dist/components/form-builder/index.mjs +4 -0
  20. package/dist/components/markdown/index.cjs +9 -0
  21. package/dist/components/markdown/index.d.cts +30 -0
  22. package/dist/components/markdown/index.d.mts +30 -0
  23. package/dist/components/markdown/index.d.ts +30 -0
  24. package/dist/components/markdown/index.mjs +2 -0
  25. package/dist/components/markdown/style.css +394 -0
  26. package/dist/components/minimal-tiptap/style.css +548 -0
  27. package/dist/components/multi-select/index.cjs +7 -0
  28. package/dist/components/multi-select/index.d.cts +78 -0
  29. package/dist/components/multi-select/index.d.mts +78 -0
  30. package/dist/components/multi-select/index.d.ts +78 -0
  31. package/dist/components/multi-select/index.mjs +1 -0
  32. package/dist/components/search-select/index.cjs +7 -0
  33. package/dist/components/search-select/index.d.cts +15 -0
  34. package/dist/components/search-select/index.d.mts +15 -0
  35. package/dist/components/search-select/index.d.ts +15 -0
  36. package/dist/components/search-select/index.mjs +1 -0
  37. package/dist/components/stepped-auto-form/index.cjs +7 -0
  38. package/dist/components/stepped-auto-form/index.d.cts +37 -0
  39. package/dist/components/stepped-auto-form/index.d.mts +37 -0
  40. package/dist/components/stepped-auto-form/index.d.ts +37 -0
  41. package/dist/components/stepped-auto-form/index.mjs +1 -0
  42. package/dist/components/ui-builder/style.css +552 -0
  43. package/dist/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.cjs +1 -1
  44. package/dist/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +1 -1
  45. package/dist/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.2.0_react@19.2.0__react@19.2.0__react@19.2.0/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs +2 -2
  46. package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +1 -1
  47. package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +3 -3
  48. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +1 -1
  49. package/dist/packages/stack/src/plugins/ai-chat/client/components/shared/default-error.cjs +1 -1
  50. package/dist/packages/stack/src/plugins/ai-chat/client/components/shared/default-error.mjs +1 -1
  51. package/dist/packages/stack/src/plugins/ai-chat/client/plugin.cjs +44 -35
  52. package/dist/packages/stack/src/plugins/ai-chat/client/plugin.mjs +44 -35
  53. package/dist/packages/stack/src/plugins/blog/client/components/forms/markdown-editor-with-overrides.cjs +23 -0
  54. package/dist/packages/stack/src/plugins/blog/client/components/forms/markdown-editor-with-overrides.mjs +21 -0
  55. package/dist/packages/stack/src/plugins/blog/client/components/forms/markdown-editor.cjs +11 -12
  56. package/dist/packages/stack/src/plugins/blog/client/components/forms/markdown-editor.mjs +11 -12
  57. package/dist/packages/stack/src/plugins/blog/client/components/forms/post-forms.cjs +2 -2
  58. package/dist/packages/stack/src/plugins/blog/client/components/forms/post-forms.mjs +2 -2
  59. package/dist/packages/stack/src/plugins/blog/client/components/shared/default-error.cjs +1 -1
  60. package/dist/packages/stack/src/plugins/blog/client/components/shared/default-error.mjs +1 -1
  61. package/dist/packages/stack/src/plugins/blog/client/components/shared/search-input.cjs +0 -3
  62. package/dist/packages/stack/src/plugins/blog/client/components/shared/search-input.mjs +1 -1
  63. package/dist/packages/stack/src/plugins/blog/client/components/shared/search-modal.cjs +0 -3
  64. package/dist/packages/stack/src/plugins/blog/client/components/shared/search-modal.mjs +1 -1
  65. package/dist/packages/stack/src/plugins/blog/client/hooks/use-debounce.cjs +22 -0
  66. package/dist/packages/stack/src/plugins/blog/client/hooks/use-debounce.mjs +23 -2
  67. package/dist/packages/stack/src/plugins/blog/client/plugin.cjs +12 -6
  68. package/dist/packages/stack/src/plugins/blog/client/plugin.mjs +12 -6
  69. package/dist/packages/stack/src/plugins/cms/client/components/shared/default-error.cjs +1 -1
  70. package/dist/packages/stack/src/plugins/cms/client/components/shared/default-error.mjs +1 -1
  71. package/dist/packages/stack/src/plugins/cms/client/plugin.cjs +38 -26
  72. package/dist/packages/stack/src/plugins/cms/client/plugin.mjs +38 -26
  73. package/dist/packages/stack/src/plugins/form-builder/client/components/shared/default-error.cjs +1 -1
  74. package/dist/packages/stack/src/plugins/form-builder/client/components/shared/default-error.mjs +1 -1
  75. package/dist/packages/stack/src/plugins/form-builder/client/plugin.cjs +32 -20
  76. package/dist/packages/stack/src/plugins/form-builder/client/plugin.mjs +32 -20
  77. package/dist/packages/stack/src/plugins/kanban/client/components/shared/default-error.cjs +1 -1
  78. package/dist/packages/stack/src/plugins/kanban/client/components/shared/default-error.mjs +1 -1
  79. package/dist/packages/stack/src/plugins/kanban/client/plugin.cjs +6 -3
  80. package/dist/packages/stack/src/plugins/kanban/client/plugin.mjs +6 -3
  81. package/dist/packages/stack/src/plugins/ui-builder/client/components/page-renderer.cjs +1 -1
  82. package/dist/packages/stack/src/plugins/ui-builder/client/components/page-renderer.mjs +1 -1
  83. package/dist/packages/stack/src/plugins/ui-builder/client/components/shared/default-error.cjs +1 -1
  84. package/dist/packages/stack/src/plugins/ui-builder/client/components/shared/default-error.mjs +1 -1
  85. package/dist/packages/stack/src/plugins/ui-builder/client/plugin.cjs +24 -15
  86. package/dist/packages/stack/src/plugins/ui-builder/client/plugin.mjs +24 -15
  87. package/dist/packages/ui/src/components/auto-form/index.cjs +12 -2
  88. package/dist/packages/ui/src/components/auto-form/index.mjs +9 -2
  89. package/dist/packages/ui/src/components/auto-form/stepped-auto-form.cjs +2 -2
  90. package/dist/packages/ui/src/components/empty.cjs +28 -0
  91. package/dist/packages/ui/src/components/empty.mjs +27 -1
  92. package/dist/packages/ui/src/components/form-builder/components/index.mjs +2 -2
  93. package/dist/packages/ui/src/components/form-builder/edit-field-dialog.cjs +1 -1
  94. package/dist/packages/ui/src/components/form-builder/index.mjs +2 -2
  95. package/dist/packages/ui/src/components/form.mjs +1 -1
  96. package/dist/packages/ui/src/components/kanban.mjs +1 -1
  97. package/dist/packages/ui/src/components/multi-select.mjs +2 -2
  98. package/dist/packages/ui/src/components/search-select.cjs +13 -3
  99. package/dist/packages/ui/src/components/search-select.mjs +14 -4
  100. package/dist/packages/ui/src/components/ui-builder/internal/config-panel.cjs +1 -1
  101. package/dist/packages/ui/src/components/ui-builder/internal/props-panel.cjs +1 -1
  102. package/dist/plugins/ai-chat/client/index.d.cts +17 -4
  103. package/dist/plugins/ai-chat/client/index.d.mts +17 -4
  104. package/dist/plugins/ai-chat/client/index.d.ts +17 -4
  105. package/dist/plugins/blog/api/index.d.cts +2 -2
  106. package/dist/plugins/blog/api/index.d.mts +2 -2
  107. package/dist/plugins/blog/api/index.d.ts +2 -2
  108. package/dist/plugins/blog/client/hooks/index.cjs +3 -0
  109. package/dist/plugins/blog/client/hooks/index.d.cts +7 -226
  110. package/dist/plugins/blog/client/hooks/index.d.mts +7 -226
  111. package/dist/plugins/blog/client/hooks/index.d.ts +7 -226
  112. package/dist/plugins/blog/client/hooks/index.mjs +1 -0
  113. package/dist/plugins/blog/client/index.d.cts +46 -22
  114. package/dist/plugins/blog/client/index.d.mts +46 -22
  115. package/dist/plugins/blog/client/index.d.ts +46 -22
  116. package/dist/plugins/blog/query-keys.d.cts +2 -2
  117. package/dist/plugins/blog/query-keys.d.mts +2 -2
  118. package/dist/plugins/blog/query-keys.d.ts +2 -2
  119. package/dist/plugins/cms/client/index.d.cts +36 -15
  120. package/dist/plugins/cms/client/index.d.mts +36 -15
  121. package/dist/plugins/cms/client/index.d.ts +36 -15
  122. package/dist/plugins/form-builder/client/components/index.d.cts +2 -2
  123. package/dist/plugins/form-builder/client/components/index.d.mts +2 -2
  124. package/dist/plugins/form-builder/client/components/index.d.ts +2 -2
  125. package/dist/plugins/form-builder/client/index.d.cts +33 -15
  126. package/dist/plugins/form-builder/client/index.d.mts +33 -15
  127. package/dist/plugins/form-builder/client/index.d.ts +33 -15
  128. package/dist/plugins/kanban/api/index.d.cts +1 -1
  129. package/dist/plugins/kanban/api/index.d.mts +1 -1
  130. package/dist/plugins/kanban/api/index.d.ts +1 -1
  131. package/dist/plugins/kanban/client/components/index.d.cts +5 -5
  132. package/dist/plugins/kanban/client/components/index.d.mts +5 -5
  133. package/dist/plugins/kanban/client/components/index.d.ts +5 -5
  134. package/dist/plugins/kanban/client/index.d.cts +25 -10
  135. package/dist/plugins/kanban/client/index.d.mts +25 -10
  136. package/dist/plugins/kanban/client/index.d.ts +25 -10
  137. package/dist/plugins/kanban/query-keys.d.cts +1 -1
  138. package/dist/plugins/kanban/query-keys.d.mts +1 -1
  139. package/dist/plugins/kanban/query-keys.d.ts +1 -1
  140. package/dist/plugins/route-docs/client/index.d.cts +4 -4
  141. package/dist/plugins/route-docs/client/index.d.mts +4 -4
  142. package/dist/plugins/route-docs/client/index.d.ts +4 -4
  143. package/dist/plugins/ui-builder/client/components/index.d.cts +3 -3
  144. package/dist/plugins/ui-builder/client/components/index.d.mts +3 -3
  145. package/dist/plugins/ui-builder/client/components/index.d.ts +3 -3
  146. package/dist/plugins/ui-builder/client/hooks/index.d.cts +3 -3
  147. package/dist/plugins/ui-builder/client/hooks/index.d.mts +3 -3
  148. package/dist/plugins/ui-builder/client/hooks/index.d.ts +3 -3
  149. package/dist/plugins/ui-builder/client/index.d.cts +32 -18
  150. package/dist/plugins/ui-builder/client/index.d.mts +32 -18
  151. package/dist/plugins/ui-builder/client/index.d.ts +32 -18
  152. package/dist/plugins/ui-builder/index.d.cts +3 -3
  153. package/dist/plugins/ui-builder/index.d.mts +3 -3
  154. package/dist/plugins/ui-builder/index.d.ts +3 -3
  155. package/dist/shared/{stack.B2DwzF3r.d.ts → stack.ASwEoINr.d.ts} +1 -1
  156. package/dist/shared/{stack.C5ZSOJGJ.d.cts → stack.B1srlBud.d.mts} +1 -1
  157. package/dist/shared/stack.B8vT-Yt4.d.mts +228 -0
  158. package/dist/shared/stack.BAT540yW.d.ts +228 -0
  159. package/dist/shared/{stack.D0QupDcQ.d.ts → stack.BK9Z2dcL.d.ts} +1 -1
  160. package/dist/shared/stack.BwA7trxA.d.cts +228 -0
  161. package/dist/shared/{stack.Cl7ok_cY.d.cts → stack.CFECM0ew.d.cts} +1 -1
  162. package/dist/shared/stack.CZMWR72v.d.cts +10 -0
  163. package/dist/shared/stack.CZMWR72v.d.mts +10 -0
  164. package/dist/shared/stack.CZMWR72v.d.ts +10 -0
  165. package/dist/shared/{stack.VMmQdbsJ.d.mts → stack.DVtk5CNw.d.mts} +1 -1
  166. package/dist/shared/{stack.B8_74ror.d.ts → stack.DXnclTG7.d.ts} +4 -4
  167. package/dist/shared/{stack.C21-LFX8.d.cts → stack.DaZM10cp.d.cts} +4 -4
  168. package/dist/shared/{stack.Dq4qVr1F.d.mts → stack.DmpPDPxA.d.cts} +1 -1
  169. package/dist/shared/{stack.CL4mKxe7.d.mts → stack.cfCkioTe.d.mts} +4 -4
  170. package/dist/shared/stack.fdi94T4S.d.cts +291 -0
  171. package/dist/shared/stack.fdi94T4S.d.mts +291 -0
  172. package/dist/shared/stack.fdi94T4S.d.ts +291 -0
  173. package/package.json +115 -4
  174. package/src/__tests__/page-component-overrides.test.tsx +147 -0
  175. package/src/components/auto-form/index.ts +12 -0
  176. package/src/components/empty/index.ts +8 -0
  177. package/src/components/form-builder/index.ts +23 -0
  178. package/src/components/kanban/index.ts +9 -0
  179. package/src/components/markdown/index.ts +5 -0
  180. package/src/components/markdown/style.css +3 -0
  181. package/src/components/minimal-tiptap/index.ts +5 -0
  182. package/src/components/minimal-tiptap/style.css +1 -0
  183. package/src/components/multi-select/index.ts +5 -0
  184. package/src/components/search-select/index.ts +1 -0
  185. package/src/components/stepped-auto-form/index.ts +5 -0
  186. package/src/components/ui-builder/index.ts +50 -0
  187. package/src/components/ui-builder/style.css +5 -0
  188. package/src/plugins/ai-chat/client/components/shared/default-error.tsx +1 -1
  189. package/src/plugins/ai-chat/client/plugin.tsx +60 -32
  190. package/src/plugins/blog/client/components/forms/markdown-editor-with-overrides.tsx +29 -0
  191. package/src/plugins/blog/client/components/forms/markdown-editor.tsx +24 -21
  192. package/src/plugins/blog/client/components/forms/post-forms.tsx +2 -2
  193. package/src/plugins/blog/client/components/shared/default-error.tsx +2 -1
  194. package/src/plugins/blog/client/components/shared/posts-list.tsx +1 -1
  195. package/src/plugins/blog/client/components/shared/search-input.tsx +0 -2
  196. package/src/plugins/blog/client/components/shared/search-modal.tsx +0 -2
  197. package/src/plugins/blog/client/hooks/index.tsx +1 -0
  198. package/src/plugins/blog/client/plugin.tsx +41 -6
  199. package/src/plugins/cms/client/components/shared/default-error.tsx +3 -2
  200. package/src/plugins/cms/client/plugin.tsx +65 -32
  201. package/src/plugins/form-builder/client/components/shared/default-error.tsx +3 -2
  202. package/src/plugins/form-builder/client/plugin.tsx +56 -23
  203. package/src/plugins/kanban/client/components/shared/default-error.tsx +3 -2
  204. package/src/plugins/kanban/client/plugin.tsx +23 -3
  205. package/src/plugins/ui-builder/client/components/page-renderer.tsx +5 -3
  206. package/src/plugins/ui-builder/client/components/shared/default-error.tsx +3 -2
  207. package/src/plugins/ui-builder/client/plugin.tsx +41 -15
  208. package/dist/shared/stack.8nldKomx.d.cts +0 -114
  209. package/dist/shared/stack.8nldKomx.d.mts +0 -114
  210. package/dist/shared/stack.8nldKomx.d.ts +0 -114
  211. package/dist/shared/{stack.CxNeGV2z.d.mts → stack.B8D4r97Z.d.mts} +6 -6
  212. package/dist/shared/{stack.BWp0hcm9.d.cts → stack.BQmuNl5p.d.cts} +3 -3
  213. package/dist/shared/{stack.BWp0hcm9.d.mts → stack.BQmuNl5p.d.mts} +3 -3
  214. package/dist/shared/{stack.BWp0hcm9.d.ts → stack.BQmuNl5p.d.ts} +3 -3
  215. package/dist/shared/{stack.BFcg0tDz.d.ts → stack.DgKOwl20.d.ts} +6 -6
  216. package/dist/shared/{stack.DSxTDZBQ.d.cts → stack.uWSqCWAb.d.cts} +6 -6
@@ -251,32 +251,44 @@ function createContentEditorMeta(typeSlug, id, config) {
251
251
  const cmsClientPlugin = (config) => client.defineClientPlugin({
252
252
  name: "cms",
253
253
  routes: () => ({
254
- dashboard: yar.createRoute("/cms", () => ({
255
- PageComponent: () => /* @__PURE__ */ jsxRuntime.jsx(DashboardPageComponent, {}),
256
- loader: createDashboardLoader(config),
257
- meta: createDashboardMeta()
258
- })),
259
- contentList: yar.createRoute("/cms/:typeSlug", ({ params }) => ({
260
- PageComponent: () => /* @__PURE__ */ jsxRuntime.jsx(ContentListPageComponent, { typeSlug: params.typeSlug }),
261
- loader: createContentListLoader(params.typeSlug, config),
262
- meta: createContentListMeta(params.typeSlug, config)
263
- })),
264
- newContent: yar.createRoute("/cms/:typeSlug/new", ({ params }) => ({
265
- PageComponent: () => /* @__PURE__ */ jsxRuntime.jsx(ContentEditorPageComponent, { typeSlug: params.typeSlug }),
266
- loader: createContentEditorLoader(params.typeSlug, void 0, config),
267
- meta: createContentEditorMeta(params.typeSlug, void 0, config)
268
- })),
269
- editContent: yar.createRoute("/cms/:typeSlug/:id", ({ params }) => ({
270
- PageComponent: () => /* @__PURE__ */ jsxRuntime.jsx(
271
- ContentEditorPageComponent,
272
- {
273
- typeSlug: params.typeSlug,
274
- id: params.id
275
- }
276
- ),
277
- loader: createContentEditorLoader(params.typeSlug, params.id, config),
278
- meta: createContentEditorMeta(params.typeSlug, params.id, config)
279
- }))
254
+ dashboard: yar.createRoute("/cms", () => {
255
+ const CustomDashboard = config.pageComponents?.dashboard;
256
+ return {
257
+ PageComponent: CustomDashboard ?? (() => /* @__PURE__ */ jsxRuntime.jsx(DashboardPageComponent, {})),
258
+ loader: createDashboardLoader(config),
259
+ meta: createDashboardMeta()
260
+ };
261
+ }),
262
+ contentList: yar.createRoute("/cms/:typeSlug", ({ params }) => {
263
+ const CustomContentList = config.pageComponents?.contentList;
264
+ return {
265
+ PageComponent: CustomContentList ? () => /* @__PURE__ */ jsxRuntime.jsx(CustomContentList, { typeSlug: params.typeSlug }) : () => /* @__PURE__ */ jsxRuntime.jsx(ContentListPageComponent, { typeSlug: params.typeSlug }),
266
+ loader: createContentListLoader(params.typeSlug, config),
267
+ meta: createContentListMeta(params.typeSlug, config)
268
+ };
269
+ }),
270
+ newContent: yar.createRoute("/cms/:typeSlug/new", ({ params }) => {
271
+ const CustomNewContent = config.pageComponents?.newContent;
272
+ return {
273
+ PageComponent: CustomNewContent ? () => /* @__PURE__ */ jsxRuntime.jsx(CustomNewContent, { typeSlug: params.typeSlug }) : () => /* @__PURE__ */ jsxRuntime.jsx(ContentEditorPageComponent, { typeSlug: params.typeSlug }),
274
+ loader: createContentEditorLoader(params.typeSlug, void 0, config),
275
+ meta: createContentEditorMeta(params.typeSlug, void 0, config)
276
+ };
277
+ }),
278
+ editContent: yar.createRoute("/cms/:typeSlug/:id", ({ params }) => {
279
+ const CustomEditContent = config.pageComponents?.editContent;
280
+ return {
281
+ PageComponent: CustomEditContent ? () => /* @__PURE__ */ jsxRuntime.jsx(CustomEditContent, { typeSlug: params.typeSlug, id: params.id }) : () => /* @__PURE__ */ jsxRuntime.jsx(
282
+ ContentEditorPageComponent,
283
+ {
284
+ typeSlug: params.typeSlug,
285
+ id: params.id
286
+ }
287
+ ),
288
+ loader: createContentEditorLoader(params.typeSlug, params.id, config),
289
+ meta: createContentEditorMeta(params.typeSlug, params.id, config)
290
+ };
291
+ })
280
292
  }),
281
293
  sitemap: async () => {
282
294
  return [];
@@ -249,32 +249,44 @@ function createContentEditorMeta(typeSlug, id, config) {
249
249
  const cmsClientPlugin = (config) => defineClientPlugin({
250
250
  name: "cms",
251
251
  routes: () => ({
252
- dashboard: createRoute("/cms", () => ({
253
- PageComponent: () => /* @__PURE__ */ jsx(DashboardPageComponent, {}),
254
- loader: createDashboardLoader(config),
255
- meta: createDashboardMeta()
256
- })),
257
- contentList: createRoute("/cms/:typeSlug", ({ params }) => ({
258
- PageComponent: () => /* @__PURE__ */ jsx(ContentListPageComponent, { typeSlug: params.typeSlug }),
259
- loader: createContentListLoader(params.typeSlug, config),
260
- meta: createContentListMeta(params.typeSlug, config)
261
- })),
262
- newContent: createRoute("/cms/:typeSlug/new", ({ params }) => ({
263
- PageComponent: () => /* @__PURE__ */ jsx(ContentEditorPageComponent, { typeSlug: params.typeSlug }),
264
- loader: createContentEditorLoader(params.typeSlug, void 0, config),
265
- meta: createContentEditorMeta(params.typeSlug, void 0, config)
266
- })),
267
- editContent: createRoute("/cms/:typeSlug/:id", ({ params }) => ({
268
- PageComponent: () => /* @__PURE__ */ jsx(
269
- ContentEditorPageComponent,
270
- {
271
- typeSlug: params.typeSlug,
272
- id: params.id
273
- }
274
- ),
275
- loader: createContentEditorLoader(params.typeSlug, params.id, config),
276
- meta: createContentEditorMeta(params.typeSlug, params.id, config)
277
- }))
252
+ dashboard: createRoute("/cms", () => {
253
+ const CustomDashboard = config.pageComponents?.dashboard;
254
+ return {
255
+ PageComponent: CustomDashboard ?? (() => /* @__PURE__ */ jsx(DashboardPageComponent, {})),
256
+ loader: createDashboardLoader(config),
257
+ meta: createDashboardMeta()
258
+ };
259
+ }),
260
+ contentList: createRoute("/cms/:typeSlug", ({ params }) => {
261
+ const CustomContentList = config.pageComponents?.contentList;
262
+ return {
263
+ PageComponent: CustomContentList ? () => /* @__PURE__ */ jsx(CustomContentList, { typeSlug: params.typeSlug }) : () => /* @__PURE__ */ jsx(ContentListPageComponent, { typeSlug: params.typeSlug }),
264
+ loader: createContentListLoader(params.typeSlug, config),
265
+ meta: createContentListMeta(params.typeSlug, config)
266
+ };
267
+ }),
268
+ newContent: createRoute("/cms/:typeSlug/new", ({ params }) => {
269
+ const CustomNewContent = config.pageComponents?.newContent;
270
+ return {
271
+ PageComponent: CustomNewContent ? () => /* @__PURE__ */ jsx(CustomNewContent, { typeSlug: params.typeSlug }) : () => /* @__PURE__ */ jsx(ContentEditorPageComponent, { typeSlug: params.typeSlug }),
272
+ loader: createContentEditorLoader(params.typeSlug, void 0, config),
273
+ meta: createContentEditorMeta(params.typeSlug, void 0, config)
274
+ };
275
+ }),
276
+ editContent: createRoute("/cms/:typeSlug/:id", ({ params }) => {
277
+ const CustomEditContent = config.pageComponents?.editContent;
278
+ return {
279
+ PageComponent: CustomEditContent ? () => /* @__PURE__ */ jsx(CustomEditContent, { typeSlug: params.typeSlug, id: params.id }) : () => /* @__PURE__ */ jsx(
280
+ ContentEditorPageComponent,
281
+ {
282
+ typeSlug: params.typeSlug,
283
+ id: params.id
284
+ }
285
+ ),
286
+ loader: createContentEditorLoader(params.typeSlug, params.id, config),
287
+ meta: createContentEditorMeta(params.typeSlug, params.id, config)
288
+ };
289
+ })
278
290
  }),
279
291
  sitemap: async () => {
280
292
  return [];
@@ -9,7 +9,7 @@ function DefaultError({ error, resetErrorBoundary }) {
9
9
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center", children: [
10
10
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-full bg-destructive/10 p-4 mb-4", children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.AlertCircle, { className: "h-8 w-8 text-destructive" }) }),
11
11
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-medium text-foreground mb-2", children: "Something went wrong" }),
12
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mb-4 max-w-sm", children: error.message || "An unexpected error occurred" }),
12
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mb-4 max-w-sm", children: (error instanceof Error ? error.message : void 0) || "An unexpected error occurred" }),
13
13
  resetErrorBoundary && /* @__PURE__ */ jsxRuntime.jsx(button.Button, { variant: "outline", onClick: resetErrorBoundary, children: "Try again" })
14
14
  ] });
15
15
  }
@@ -7,7 +7,7 @@ function DefaultError({ error, resetErrorBoundary }) {
7
7
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center", children: [
8
8
  /* @__PURE__ */ jsx("div", { className: "rounded-full bg-destructive/10 p-4 mb-4", children: /* @__PURE__ */ jsx(AlertCircle, { className: "h-8 w-8 text-destructive" }) }),
9
9
  /* @__PURE__ */ jsx("h3", { className: "text-lg font-medium text-foreground mb-2", children: "Something went wrong" }),
10
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-4 max-w-sm", children: error.message || "An unexpected error occurred" }),
10
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-4 max-w-sm", children: (error instanceof Error ? error.message : void 0) || "An unexpected error occurred" }),
11
11
  resetErrorBoundary && /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: resetErrorBoundary, children: "Try again" })
12
12
  ] });
13
13
  }
@@ -264,26 +264,38 @@ function createSubmissionsMeta(formId, config) {
264
264
  const formBuilderClientPlugin = (config) => client.defineClientPlugin({
265
265
  name: "form-builder",
266
266
  routes: () => ({
267
- formList: yar.createRoute("/forms", () => ({
268
- PageComponent: () => /* @__PURE__ */ jsxRuntime.jsx(FormListPageComponent, {}),
269
- loader: createFormListLoader(config),
270
- meta: createFormListMeta()
271
- })),
272
- newForm: yar.createRoute("/forms/new", () => ({
273
- PageComponent: () => /* @__PURE__ */ jsxRuntime.jsx(FormBuilderPageComponent, {}),
274
- loader: createFormBuilderLoader(void 0, config),
275
- meta: createFormBuilderMeta(void 0, config)
276
- })),
277
- editForm: yar.createRoute("/forms/:id/edit", ({ params }) => ({
278
- PageComponent: () => /* @__PURE__ */ jsxRuntime.jsx(FormBuilderPageComponent, { id: params.id }),
279
- loader: createFormBuilderLoader(params.id, config),
280
- meta: createFormBuilderMeta(params.id, config)
281
- })),
282
- submissions: yar.createRoute("/forms/:id/submissions", ({ params }) => ({
283
- PageComponent: () => /* @__PURE__ */ jsxRuntime.jsx(SubmissionsPageComponent, { formId: params.id }),
284
- loader: createSubmissionsLoader(params.id, config),
285
- meta: createSubmissionsMeta(params.id, config)
286
- }))
267
+ formList: yar.createRoute("/forms", () => {
268
+ const CustomFormList = config.pageComponents?.formList;
269
+ return {
270
+ PageComponent: CustomFormList ?? (() => /* @__PURE__ */ jsxRuntime.jsx(FormListPageComponent, {})),
271
+ loader: createFormListLoader(config),
272
+ meta: createFormListMeta()
273
+ };
274
+ }),
275
+ newForm: yar.createRoute("/forms/new", () => {
276
+ const CustomNewForm = config.pageComponents?.newForm;
277
+ return {
278
+ PageComponent: CustomNewForm ?? (() => /* @__PURE__ */ jsxRuntime.jsx(FormBuilderPageComponent, {})),
279
+ loader: createFormBuilderLoader(void 0, config),
280
+ meta: createFormBuilderMeta(void 0, config)
281
+ };
282
+ }),
283
+ editForm: yar.createRoute("/forms/:id/edit", ({ params }) => {
284
+ const CustomEditForm = config.pageComponents?.editForm;
285
+ return {
286
+ PageComponent: CustomEditForm ? () => /* @__PURE__ */ jsxRuntime.jsx(CustomEditForm, { id: params.id }) : () => /* @__PURE__ */ jsxRuntime.jsx(FormBuilderPageComponent, { id: params.id }),
287
+ loader: createFormBuilderLoader(params.id, config),
288
+ meta: createFormBuilderMeta(params.id, config)
289
+ };
290
+ }),
291
+ submissions: yar.createRoute("/forms/:id/submissions", ({ params }) => {
292
+ const CustomSubmissions = config.pageComponents?.submissions;
293
+ return {
294
+ PageComponent: CustomSubmissions ? () => /* @__PURE__ */ jsxRuntime.jsx(CustomSubmissions, { formId: params.id }) : () => /* @__PURE__ */ jsxRuntime.jsx(SubmissionsPageComponent, { formId: params.id }),
295
+ loader: createSubmissionsLoader(params.id, config),
296
+ meta: createSubmissionsMeta(params.id, config)
297
+ };
298
+ })
287
299
  }),
288
300
  sitemap: async () => {
289
301
  return [];
@@ -262,26 +262,38 @@ function createSubmissionsMeta(formId, config) {
262
262
  const formBuilderClientPlugin = (config) => defineClientPlugin({
263
263
  name: "form-builder",
264
264
  routes: () => ({
265
- formList: createRoute("/forms", () => ({
266
- PageComponent: () => /* @__PURE__ */ jsx(FormListPageComponent, {}),
267
- loader: createFormListLoader(config),
268
- meta: createFormListMeta()
269
- })),
270
- newForm: createRoute("/forms/new", () => ({
271
- PageComponent: () => /* @__PURE__ */ jsx(FormBuilderPageComponent, {}),
272
- loader: createFormBuilderLoader(void 0, config),
273
- meta: createFormBuilderMeta(void 0, config)
274
- })),
275
- editForm: createRoute("/forms/:id/edit", ({ params }) => ({
276
- PageComponent: () => /* @__PURE__ */ jsx(FormBuilderPageComponent, { id: params.id }),
277
- loader: createFormBuilderLoader(params.id, config),
278
- meta: createFormBuilderMeta(params.id, config)
279
- })),
280
- submissions: createRoute("/forms/:id/submissions", ({ params }) => ({
281
- PageComponent: () => /* @__PURE__ */ jsx(SubmissionsPageComponent, { formId: params.id }),
282
- loader: createSubmissionsLoader(params.id, config),
283
- meta: createSubmissionsMeta(params.id, config)
284
- }))
265
+ formList: createRoute("/forms", () => {
266
+ const CustomFormList = config.pageComponents?.formList;
267
+ return {
268
+ PageComponent: CustomFormList ?? (() => /* @__PURE__ */ jsx(FormListPageComponent, {})),
269
+ loader: createFormListLoader(config),
270
+ meta: createFormListMeta()
271
+ };
272
+ }),
273
+ newForm: createRoute("/forms/new", () => {
274
+ const CustomNewForm = config.pageComponents?.newForm;
275
+ return {
276
+ PageComponent: CustomNewForm ?? (() => /* @__PURE__ */ jsx(FormBuilderPageComponent, {})),
277
+ loader: createFormBuilderLoader(void 0, config),
278
+ meta: createFormBuilderMeta(void 0, config)
279
+ };
280
+ }),
281
+ editForm: createRoute("/forms/:id/edit", ({ params }) => {
282
+ const CustomEditForm = config.pageComponents?.editForm;
283
+ return {
284
+ PageComponent: CustomEditForm ? () => /* @__PURE__ */ jsx(CustomEditForm, { id: params.id }) : () => /* @__PURE__ */ jsx(FormBuilderPageComponent, { id: params.id }),
285
+ loader: createFormBuilderLoader(params.id, config),
286
+ meta: createFormBuilderMeta(params.id, config)
287
+ };
288
+ }),
289
+ submissions: createRoute("/forms/:id/submissions", ({ params }) => {
290
+ const CustomSubmissions = config.pageComponents?.submissions;
291
+ return {
292
+ PageComponent: CustomSubmissions ? () => /* @__PURE__ */ jsx(CustomSubmissions, { formId: params.id }) : () => /* @__PURE__ */ jsx(SubmissionsPageComponent, { formId: params.id }),
293
+ loader: createSubmissionsLoader(params.id, config),
294
+ meta: createSubmissionsMeta(params.id, config)
295
+ };
296
+ })
285
297
  }),
286
298
  sitemap: async () => {
287
299
  return [];
@@ -14,7 +14,7 @@ function DefaultError({ error, reset }) {
14
14
  children: [
15
15
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-full bg-destructive/10 p-6 mb-4", children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.AlertCircle, { className: "h-8 w-8 text-destructive" }) }),
16
16
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold mb-2", children: "Something went wrong" }),
17
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground max-w-md mb-4", children: error?.message || "An unexpected error occurred. Please try again." }),
17
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground max-w-md mb-4", children: (error instanceof Error ? error.message : void 0) || "An unexpected error occurred. Please try again." }),
18
18
  reset && /* @__PURE__ */ jsxRuntime.jsxs(button.Button, { onClick: reset, variant: "outline", children: [
19
19
  /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.RefreshCw, { className: "mr-2 h-4 w-4" }),
20
20
  "Try Again"
@@ -12,7 +12,7 @@ function DefaultError({ error, reset }) {
12
12
  children: [
13
13
  /* @__PURE__ */ jsx("div", { className: "rounded-full bg-destructive/10 p-6 mb-4", children: /* @__PURE__ */ jsx(AlertCircle, { className: "h-8 w-8 text-destructive" }) }),
14
14
  /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-2", children: "Something went wrong" }),
15
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground max-w-md mb-4", children: error?.message || "An unexpected error occurred. Please try again." }),
15
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground max-w-md mb-4", children: (error instanceof Error ? error.message : void 0) || "An unexpected error occurred. Please try again." }),
16
16
  reset && /* @__PURE__ */ jsxs(Button, { onClick: reset, variant: "outline", children: [
17
17
  /* @__PURE__ */ jsx(RefreshCw, { className: "mr-2 h-4 w-4" }),
18
18
  "Try Again"
@@ -235,22 +235,25 @@ const kanbanClientPlugin = (config) => client.defineClientPlugin({
235
235
  name: "kanban",
236
236
  routes: () => ({
237
237
  boards: yar.createRoute("/kanban", () => {
238
+ const CustomBoards = config.pageComponents?.boards;
238
239
  return {
239
- PageComponent: () => /* @__PURE__ */ jsxRuntime.jsx(boardsListPage.BoardsListPageComponent, {}),
240
+ PageComponent: CustomBoards ?? (() => /* @__PURE__ */ jsxRuntime.jsx(boardsListPage.BoardsListPageComponent, {})),
240
241
  loader: createBoardsLoader(config),
241
242
  meta: createBoardsListMeta(config)
242
243
  };
243
244
  }),
244
245
  newBoard: yar.createRoute("/kanban/new", () => {
246
+ const CustomNewBoard = config.pageComponents?.newBoard;
245
247
  return {
246
- PageComponent: newBoardPage.NewBoardPageComponent,
248
+ PageComponent: CustomNewBoard ?? newBoardPage.NewBoardPageComponent,
247
249
  loader: createNewBoardLoader(config),
248
250
  meta: createNewBoardMeta(config)
249
251
  };
250
252
  }),
251
253
  board: yar.createRoute("/kanban/:boardId", ({ params: { boardId } }) => {
254
+ const CustomBoard = config.pageComponents?.board;
252
255
  return {
253
- PageComponent: () => /* @__PURE__ */ jsxRuntime.jsx(boardPage.BoardPageComponent, { boardId }),
256
+ PageComponent: CustomBoard ? () => /* @__PURE__ */ jsxRuntime.jsx(CustomBoard, { boardId }) : () => /* @__PURE__ */ jsxRuntime.jsx(boardPage.BoardPageComponent, { boardId }),
254
257
  loader: createBoardLoader(boardId, config),
255
258
  meta: createBoardMeta(boardId, config)
256
259
  };
@@ -233,22 +233,25 @@ const kanbanClientPlugin = (config) => defineClientPlugin({
233
233
  name: "kanban",
234
234
  routes: () => ({
235
235
  boards: createRoute("/kanban", () => {
236
+ const CustomBoards = config.pageComponents?.boards;
236
237
  return {
237
- PageComponent: () => /* @__PURE__ */ jsx(BoardsListPageComponent, {}),
238
+ PageComponent: CustomBoards ?? (() => /* @__PURE__ */ jsx(BoardsListPageComponent, {})),
238
239
  loader: createBoardsLoader(config),
239
240
  meta: createBoardsListMeta(config)
240
241
  };
241
242
  }),
242
243
  newBoard: createRoute("/kanban/new", () => {
244
+ const CustomNewBoard = config.pageComponents?.newBoard;
243
245
  return {
244
- PageComponent: NewBoardPageComponent,
246
+ PageComponent: CustomNewBoard ?? NewBoardPageComponent,
245
247
  loader: createNewBoardLoader(config),
246
248
  meta: createNewBoardMeta(config)
247
249
  };
248
250
  }),
249
251
  board: createRoute("/kanban/:boardId", ({ params: { boardId } }) => {
252
+ const CustomBoard = config.pageComponents?.board;
250
253
  return {
251
- PageComponent: () => /* @__PURE__ */ jsx(BoardPageComponent, { boardId }),
254
+ PageComponent: CustomBoard ? () => /* @__PURE__ */ jsx(CustomBoard, { boardId }) : () => /* @__PURE__ */ jsx(BoardPageComponent, { boardId }),
252
255
  loader: createBoardLoader(boardId, config),
253
256
  meta: createBoardMeta(boardId, config)
254
257
  };
@@ -15,7 +15,7 @@ function DefaultLoadingComponent() {
15
15
  function DefaultErrorComponent({ error }) {
16
16
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center min-h-[200px] p-4", children: [
17
17
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-destructive font-medium", children: index.uiBuilderLocalization.pageRenderer.error }),
18
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground mt-2", children: error.message })
18
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground mt-2", children: error instanceof Error ? error.message : String(error) })
19
19
  ] });
20
20
  }
21
21
  function DefaultNotFoundComponent() {
@@ -13,7 +13,7 @@ function DefaultLoadingComponent() {
13
13
  function DefaultErrorComponent({ error }) {
14
14
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center min-h-[200px] p-4", children: [
15
15
  /* @__PURE__ */ jsx("div", { className: "text-destructive font-medium", children: uiBuilderLocalization.pageRenderer.error }),
16
- /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground mt-2", children: error.message })
16
+ /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground mt-2", children: error instanceof Error ? error.message : String(error) })
17
17
  ] });
18
18
  }
19
19
  function DefaultNotFoundComponent() {
@@ -9,7 +9,7 @@ function DefaultError({ error, resetErrorBoundary }) {
9
9
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center", children: [
10
10
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-full bg-destructive/10 p-4 mb-4", children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.AlertCircle, { className: "h-8 w-8 text-destructive" }) }),
11
11
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-medium text-foreground mb-2", children: "Something went wrong" }),
12
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mb-4 max-w-sm", children: error.message || "An unexpected error occurred" }),
12
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mb-4 max-w-sm", children: (error instanceof Error ? error.message : void 0) || "An unexpected error occurred" }),
13
13
  resetErrorBoundary && /* @__PURE__ */ jsxRuntime.jsx(button.Button, { variant: "outline", onClick: resetErrorBoundary, children: "Try again" })
14
14
  ] });
15
15
  }
@@ -7,7 +7,7 @@ function DefaultError({ error, resetErrorBoundary }) {
7
7
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center", children: [
8
8
  /* @__PURE__ */ jsx("div", { className: "rounded-full bg-destructive/10 p-4 mb-4", children: /* @__PURE__ */ jsx(AlertCircle, { className: "h-8 w-8 text-destructive" }) }),
9
9
  /* @__PURE__ */ jsx("h3", { className: "text-lg font-medium text-foreground mb-2", children: "Something went wrong" }),
10
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-4 max-w-sm", children: error.message || "An unexpected error occurred" }),
10
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-4 max-w-sm", children: (error instanceof Error ? error.message : void 0) || "An unexpected error occurred" }),
11
11
  resetErrorBoundary && /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: resetErrorBoundary, children: "Try again" })
12
12
  ] });
13
13
  }
@@ -169,21 +169,30 @@ function createPageBuilderMeta(id, config) {
169
169
  const uiBuilderClientPlugin = (config) => client.defineClientPlugin({
170
170
  name: "ui-builder",
171
171
  routes: () => ({
172
- pageList: yar.createRoute("/ui-builder", () => ({
173
- PageComponent: () => /* @__PURE__ */ jsxRuntime.jsx(PageListPageComponent, {}),
174
- loader: createPageListLoader(config),
175
- meta: createPageListMeta()
176
- })),
177
- newPage: yar.createRoute("/ui-builder/new", () => ({
178
- PageComponent: () => /* @__PURE__ */ jsxRuntime.jsx(PageBuilderPageComponent, {}),
179
- loader: createPageBuilderLoader(void 0, config),
180
- meta: createPageBuilderMeta(void 0, config)
181
- })),
182
- editPage: yar.createRoute("/ui-builder/:id/edit", ({ params }) => ({
183
- PageComponent: () => /* @__PURE__ */ jsxRuntime.jsx(PageBuilderPageComponent, { id: params.id }),
184
- loader: createPageBuilderLoader(params.id, config),
185
- meta: createPageBuilderMeta(params.id, config)
186
- }))
172
+ pageList: yar.createRoute("/ui-builder", () => {
173
+ const CustomPageList = config.pageComponents?.pageList;
174
+ return {
175
+ PageComponent: CustomPageList ?? (() => /* @__PURE__ */ jsxRuntime.jsx(PageListPageComponent, {})),
176
+ loader: createPageListLoader(config),
177
+ meta: createPageListMeta()
178
+ };
179
+ }),
180
+ newPage: yar.createRoute("/ui-builder/new", () => {
181
+ const CustomNewPage = config.pageComponents?.newPage;
182
+ return {
183
+ PageComponent: CustomNewPage ?? (() => /* @__PURE__ */ jsxRuntime.jsx(PageBuilderPageComponent, {})),
184
+ loader: createPageBuilderLoader(void 0, config),
185
+ meta: createPageBuilderMeta(void 0, config)
186
+ };
187
+ }),
188
+ editPage: yar.createRoute("/ui-builder/:id/edit", ({ params }) => {
189
+ const CustomEditPage = config.pageComponents?.editPage;
190
+ return {
191
+ PageComponent: CustomEditPage ? () => /* @__PURE__ */ jsxRuntime.jsx(CustomEditPage, { id: params.id }) : () => /* @__PURE__ */ jsxRuntime.jsx(PageBuilderPageComponent, { id: params.id }),
192
+ loader: createPageBuilderLoader(params.id, config),
193
+ meta: createPageBuilderMeta(params.id, config)
194
+ };
195
+ })
187
196
  }),
188
197
  sitemap: async () => {
189
198
  return [];
@@ -167,21 +167,30 @@ function createPageBuilderMeta(id, config) {
167
167
  const uiBuilderClientPlugin = (config) => defineClientPlugin({
168
168
  name: "ui-builder",
169
169
  routes: () => ({
170
- pageList: createRoute("/ui-builder", () => ({
171
- PageComponent: () => /* @__PURE__ */ jsx(PageListPageComponent, {}),
172
- loader: createPageListLoader(config),
173
- meta: createPageListMeta()
174
- })),
175
- newPage: createRoute("/ui-builder/new", () => ({
176
- PageComponent: () => /* @__PURE__ */ jsx(PageBuilderPageComponent, {}),
177
- loader: createPageBuilderLoader(void 0, config),
178
- meta: createPageBuilderMeta(void 0, config)
179
- })),
180
- editPage: createRoute("/ui-builder/:id/edit", ({ params }) => ({
181
- PageComponent: () => /* @__PURE__ */ jsx(PageBuilderPageComponent, { id: params.id }),
182
- loader: createPageBuilderLoader(params.id, config),
183
- meta: createPageBuilderMeta(params.id, config)
184
- }))
170
+ pageList: createRoute("/ui-builder", () => {
171
+ const CustomPageList = config.pageComponents?.pageList;
172
+ return {
173
+ PageComponent: CustomPageList ?? (() => /* @__PURE__ */ jsx(PageListPageComponent, {})),
174
+ loader: createPageListLoader(config),
175
+ meta: createPageListMeta()
176
+ };
177
+ }),
178
+ newPage: createRoute("/ui-builder/new", () => {
179
+ const CustomNewPage = config.pageComponents?.newPage;
180
+ return {
181
+ PageComponent: CustomNewPage ?? (() => /* @__PURE__ */ jsx(PageBuilderPageComponent, {})),
182
+ loader: createPageBuilderLoader(void 0, config),
183
+ meta: createPageBuilderMeta(void 0, config)
184
+ };
185
+ }),
186
+ editPage: createRoute("/ui-builder/:id/edit", ({ params }) => {
187
+ const CustomEditPage = config.pageComponents?.editPage;
188
+ return {
189
+ PageComponent: CustomEditPage ? () => /* @__PURE__ */ jsx(CustomEditPage, { id: params.id }) : () => /* @__PURE__ */ jsx(PageBuilderPageComponent, { id: params.id }),
190
+ loader: createPageBuilderLoader(params.id, config),
191
+ meta: createPageBuilderMeta(params.id, config)
192
+ };
193
+ })
185
194
  }),
186
195
  sitemap: async () => {
187
196
  return [];
@@ -1,11 +1,13 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
4
6
  const jsxRuntime = require('react/jsx-runtime');
5
7
  const form = require('../form.cjs');
6
8
  const React = require('react');
7
9
  const reactHookForm = require('react-hook-form');
8
- require('../button.cjs');
10
+ const button = require('../button.cjs');
9
11
  const utils = require('../../lib/utils.cjs');
10
12
  const zod = require('@hookform/resolvers/zod');
11
13
  const object = require('./fields/object.cjs');
@@ -15,6 +17,13 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
15
17
 
16
18
  const React__default = /*#__PURE__*/_interopDefaultCompat(React);
17
19
 
20
+ function AutoFormSubmit({
21
+ children,
22
+ className,
23
+ disabled
24
+ }) {
25
+ return /* @__PURE__ */ jsxRuntime.jsx(button.Button, { type: "submit", disabled, className, children: children ?? "Submit" });
26
+ }
18
27
  function AutoForm({
19
28
  formSchema,
20
29
  values: valuesProp,
@@ -74,4 +83,5 @@ function AutoForm({
74
83
  ) }) });
75
84
  }
76
85
 
77
- module.exports = AutoForm;
86
+ exports.AutoFormSubmit = AutoFormSubmit;
87
+ exports.default = AutoForm;
@@ -3,12 +3,19 @@ import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { Form } from '../form.mjs';
4
4
  import React__default from 'react';
5
5
  import { useForm } from 'react-hook-form';
6
- import '../button.mjs';
6
+ import { Button } from '../button.mjs';
7
7
  import { cn } from '../../lib/utils.mjs';
8
8
  import { zodResolver } from '@hookform/resolvers/zod';
9
9
  import AutoFormObject from './fields/object.mjs';
10
10
  import { getObjectFormSchema, getDefaultValues } from './helpers.mjs';
11
11
 
12
+ function AutoFormSubmit({
13
+ children,
14
+ className,
15
+ disabled
16
+ }) {
17
+ return /* @__PURE__ */ jsx(Button, { type: "submit", disabled, className, children: children ?? "Submit" });
18
+ }
12
19
  function AutoForm({
13
20
  formSchema,
14
21
  values: valuesProp,
@@ -68,4 +75,4 @@ function AutoForm({
68
75
  ) }) });
69
76
  }
70
77
 
71
- export { AutoForm as default };
78
+ export { AutoFormSubmit, AutoForm as default };
@@ -255,7 +255,7 @@ function SteppedAutoForm({
255
255
  }, [isFirst]);
256
256
  if (!hasMultipleSteps) {
257
257
  return /* @__PURE__ */ jsxRuntime.jsxs(
258
- index,
258
+ index.default,
259
259
  {
260
260
  formSchema,
261
261
  values: initialValues,
@@ -343,7 +343,7 @@ function SteppedAutoForm({
343
343
  }
344
344
  ),
345
345
  /* @__PURE__ */ jsxRuntime.jsxs(
346
- index,
346
+ index.default,
347
347
  {
348
348
  formSchema: currentStepSchema,
349
349
  values: currentStepValues,