@btst/stack 2.4.0 → 2.5.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 (225) hide show
  1. package/dist/node_modules/.pnpm/{@tiptap_core@3.15.3_@tiptap_pm@3.15.3 → @tiptap_core@3.20.0_@tiptap_pm@3.15.3}/node_modules/@tiptap/core/dist/index.cjs +68 -8
  2. package/dist/node_modules/.pnpm/{@tiptap_core@3.15.3_@tiptap_pm@3.15.3 → @tiptap_core@3.20.0_@tiptap_pm@3.15.3}/node_modules/@tiptap/core/dist/index.mjs +68 -8
  3. package/dist/node_modules/.pnpm/{@tiptap_extension-blockquote@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-blockquote@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-blockquote/dist/index.cjs +2 -2
  4. package/dist/node_modules/.pnpm/{@tiptap_extension-blockquote@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-blockquote@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-blockquote/dist/index.mjs +2 -2
  5. package/dist/node_modules/.pnpm/{@tiptap_extension-bold@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-bold@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-bold/dist/index.cjs +2 -2
  6. package/dist/node_modules/.pnpm/{@tiptap_extension-bold@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-bold@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-bold/dist/index.mjs +2 -2
  7. package/dist/node_modules/.pnpm/{@tiptap_extension-bubble-menu@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3 → @tiptap_extension-bubble-menu@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3}/node_modules/@tiptap/extension-bubble-menu/dist/index.cjs +1 -1
  8. package/dist/node_modules/.pnpm/{@tiptap_extension-bubble-menu@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3 → @tiptap_extension-bubble-menu@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3}/node_modules/@tiptap/extension-bubble-menu/dist/index.mjs +1 -1
  9. package/dist/node_modules/.pnpm/{@tiptap_extension-code-block-lowlight@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@ti_2245ac34d84b5693aa60775b0f7781e3 → @tiptap_extension-code-block-lowlight@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@ti_360e739196c451ebf408f4af5a9f3f24}/node_modules/@tiptap/extension-code-block-lowlight/dist/index.cjs +2 -2
  10. package/dist/node_modules/.pnpm/{@tiptap_extension-code-block-lowlight@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@ti_2245ac34d84b5693aa60775b0f7781e3 → @tiptap_extension-code-block-lowlight@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@ti_360e739196c451ebf408f4af5a9f3f24}/node_modules/@tiptap/extension-code-block-lowlight/dist/index.mjs +2 -2
  11. package/dist/node_modules/.pnpm/@tiptap_extension-code-block@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3/node_modules/@tiptap/extension-code-block/dist/index.cjs +319 -0
  12. package/dist/node_modules/.pnpm/@tiptap_extension-code-block@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3/node_modules/@tiptap/extension-code-block/dist/index.mjs +315 -0
  13. package/dist/node_modules/.pnpm/{@tiptap_extension-code-block@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3 → @tiptap_extension-code-block@3.20.0_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3}/node_modules/@tiptap/extension-code-block/dist/index.cjs +1 -1
  14. package/dist/node_modules/.pnpm/{@tiptap_extension-code-block@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3 → @tiptap_extension-code-block@3.20.0_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3}/node_modules/@tiptap/extension-code-block/dist/index.mjs +1 -1
  15. package/dist/node_modules/.pnpm/{@tiptap_extension-code@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-code@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-code/dist/index.cjs +1 -1
  16. package/dist/node_modules/.pnpm/{@tiptap_extension-code@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-code@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-code/dist/index.mjs +1 -1
  17. package/dist/node_modules/.pnpm/{@tiptap_extension-document@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-document@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-document/dist/index.cjs +1 -1
  18. package/dist/node_modules/.pnpm/{@tiptap_extension-document@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-document@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-document/dist/index.mjs +1 -1
  19. package/dist/node_modules/.pnpm/{@tiptap_extension-floating-menu@3.15.3_@floating-ui_dom@1.7.4_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3 → @tiptap_extension-floating-menu@3.15.3_@floating-ui_dom@1.7.4_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3}/node_modules/@tiptap/extension-floating-menu/dist/index.cjs +1 -1
  20. package/dist/node_modules/.pnpm/{@tiptap_extension-floating-menu@3.15.3_@floating-ui_dom@1.7.4_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3 → @tiptap_extension-floating-menu@3.15.3_@floating-ui_dom@1.7.4_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3}/node_modules/@tiptap/extension-floating-menu/dist/index.mjs +1 -1
  21. package/dist/node_modules/.pnpm/{@tiptap_extension-hard-break@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-hard-break@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-hard-break/dist/index.cjs +1 -1
  22. package/dist/node_modules/.pnpm/{@tiptap_extension-hard-break@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-hard-break@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-hard-break/dist/index.mjs +1 -1
  23. package/dist/node_modules/.pnpm/{@tiptap_extension-heading@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-heading@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-heading/dist/index.cjs +1 -1
  24. package/dist/node_modules/.pnpm/{@tiptap_extension-heading@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-heading@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-heading/dist/index.mjs +1 -1
  25. package/dist/node_modules/.pnpm/{@tiptap_extension-horizontal-rule@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3 → @tiptap_extension-horizontal-rule@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3}/node_modules/@tiptap/extension-horizontal-rule/dist/index.cjs +1 -1
  26. package/dist/node_modules/.pnpm/{@tiptap_extension-horizontal-rule@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3 → @tiptap_extension-horizontal-rule@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3}/node_modules/@tiptap/extension-horizontal-rule/dist/index.mjs +1 -1
  27. package/dist/node_modules/.pnpm/{@tiptap_extension-image@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-image@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-image/dist/index.cjs +1 -1
  28. package/dist/node_modules/.pnpm/{@tiptap_extension-image@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-image@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-image/dist/index.mjs +1 -1
  29. package/dist/node_modules/.pnpm/{@tiptap_extension-italic@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-italic@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-italic/dist/index.cjs +1 -1
  30. package/dist/node_modules/.pnpm/{@tiptap_extension-italic@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-italic@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-italic/dist/index.mjs +1 -1
  31. package/dist/node_modules/.pnpm/{@tiptap_extension-link@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3 → @tiptap_extension-link@3.20.0_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3}/node_modules/@tiptap/extension-link/dist/index.cjs +28 -22
  32. package/dist/node_modules/.pnpm/{@tiptap_extension-link@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3 → @tiptap_extension-link@3.20.0_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3}/node_modules/@tiptap/extension-link/dist/index.mjs +28 -22
  33. package/dist/node_modules/.pnpm/{@tiptap_extension-list@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3 → @tiptap_extension-list@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3}/node_modules/@tiptap/extension-list/dist/index.cjs +1 -1
  34. package/dist/node_modules/.pnpm/{@tiptap_extension-list@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3 → @tiptap_extension-list@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3}/node_modules/@tiptap/extension-list/dist/index.mjs +1 -1
  35. package/dist/node_modules/.pnpm/{@tiptap_extension-paragraph@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-paragraph@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-paragraph/dist/index.cjs +1 -1
  36. package/dist/node_modules/.pnpm/{@tiptap_extension-paragraph@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-paragraph@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-paragraph/dist/index.mjs +1 -1
  37. package/dist/node_modules/.pnpm/{@tiptap_extension-strike@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-strike@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-strike/dist/index.cjs +1 -1
  38. package/dist/node_modules/.pnpm/{@tiptap_extension-strike@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-strike@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-strike/dist/index.mjs +1 -1
  39. package/dist/node_modules/.pnpm/{@tiptap_extension-table@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3 → @tiptap_extension-table@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3}/node_modules/@tiptap/extension-table/dist/index.cjs +1 -1
  40. package/dist/node_modules/.pnpm/{@tiptap_extension-table@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3 → @tiptap_extension-table@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3}/node_modules/@tiptap/extension-table/dist/index.mjs +1 -1
  41. package/dist/node_modules/.pnpm/{@tiptap_extension-text-style@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-text-style@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-text-style/dist/index.cjs +1 -1
  42. package/dist/node_modules/.pnpm/{@tiptap_extension-text-style@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-text-style@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-text-style/dist/index.mjs +1 -1
  43. package/dist/node_modules/.pnpm/{@tiptap_extension-text@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-text@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-text/dist/index.cjs +1 -1
  44. package/dist/node_modules/.pnpm/{@tiptap_extension-text@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-text@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-text/dist/index.mjs +1 -1
  45. package/dist/node_modules/.pnpm/{@tiptap_extension-typography@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-typography@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-typography/dist/index.cjs +1 -1
  46. package/dist/node_modules/.pnpm/{@tiptap_extension-typography@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-typography@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-typography/dist/index.mjs +1 -1
  47. package/dist/node_modules/.pnpm/{@tiptap_extension-underline@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-underline@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-underline/dist/index.cjs +1 -1
  48. package/dist/node_modules/.pnpm/{@tiptap_extension-underline@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3_ → @tiptap_extension-underline@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3_}/node_modules/@tiptap/extension-underline/dist/index.mjs +1 -1
  49. package/dist/node_modules/.pnpm/{@tiptap_extensions@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3 → @tiptap_extensions@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3}/node_modules/@tiptap/extensions/dist/index.cjs +1 -1
  50. package/dist/node_modules/.pnpm/{@tiptap_extensions@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3 → @tiptap_extensions@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3}/node_modules/@tiptap/extensions/dist/index.mjs +1 -1
  51. package/dist/node_modules/.pnpm/{@tiptap_markdown@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3 → @tiptap_markdown@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3}/node_modules/@tiptap/markdown/dist/index.cjs +1 -1
  52. package/dist/node_modules/.pnpm/{@tiptap_markdown@3.15.3_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3 → @tiptap_markdown@3.15.3_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tiptap_pm@3.15.3}/node_modules/@tiptap/markdown/dist/index.mjs +1 -1
  53. package/dist/node_modules/.pnpm/{@tiptap_react@3.15.3_@floating-ui_dom@1.7.4_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tip_d7a2a9a319317617a8908309649a6dda → @tiptap_react@3.15.3_@floating-ui_dom@1.7.4_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tip_b42b5b2d59902d8a01cd4cc3e2d5dc64}/node_modules/@tiptap/react/dist/index.cjs +1 -1
  54. package/dist/node_modules/.pnpm/{@tiptap_react@3.15.3_@floating-ui_dom@1.7.4_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tip_d7a2a9a319317617a8908309649a6dda → @tiptap_react@3.15.3_@floating-ui_dom@1.7.4_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tip_b42b5b2d59902d8a01cd4cc3e2d5dc64}/node_modules/@tiptap/react/dist/index.mjs +2 -2
  55. package/dist/node_modules/.pnpm/{@tiptap_react@3.15.3_@floating-ui_dom@1.7.4_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tip_d7a2a9a319317617a8908309649a6dda → @tiptap_react@3.15.3_@floating-ui_dom@1.7.4_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tip_b42b5b2d59902d8a01cd4cc3e2d5dc64}/node_modules/@tiptap/react/dist/menus/index.cjs +2 -2
  56. package/dist/node_modules/.pnpm/{@tiptap_react@3.15.3_@floating-ui_dom@1.7.4_@tiptap_core@3.15.3_@tiptap_pm@3.15.3__@tip_d7a2a9a319317617a8908309649a6dda → @tiptap_react@3.15.3_@floating-ui_dom@1.7.4_@tiptap_core@3.20.0_@tiptap_pm@3.15.3__@tip_b42b5b2d59902d8a01cd4cc3e2d5dc64}/node_modules/@tiptap/react/dist/menus/index.mjs +2 -2
  57. package/dist/node_modules/.pnpm/@tiptap_starter-kit@3.15.3/node_modules/@tiptap/starter-kit/dist/index.cjs +17 -17
  58. package/dist/node_modules/.pnpm/@tiptap_starter-kit@3.15.3/node_modules/@tiptap/starter-kit/dist/index.mjs +17 -17
  59. package/dist/packages/stack/src/plugins/ai-chat/api/plugin.cjs +33 -47
  60. package/dist/packages/stack/src/plugins/ai-chat/api/plugin.mjs +33 -47
  61. package/dist/packages/stack/src/plugins/ai-chat/client/plugin.cjs +14 -21
  62. package/dist/packages/stack/src/plugins/ai-chat/client/plugin.mjs +15 -22
  63. package/dist/packages/stack/src/plugins/blog/api/plugin.cjs +28 -45
  64. package/dist/packages/stack/src/plugins/blog/api/plugin.mjs +22 -39
  65. package/dist/packages/stack/src/plugins/blog/client/plugin.cjs +23 -27
  66. package/dist/packages/stack/src/plugins/blog/client/plugin.mjs +24 -28
  67. package/dist/packages/stack/src/plugins/cms/api/plugin.cjs +14 -17
  68. package/dist/packages/stack/src/plugins/cms/api/plugin.mjs +14 -17
  69. package/dist/packages/stack/src/plugins/cms/client/plugin.cjs +11 -15
  70. package/dist/packages/stack/src/plugins/cms/client/plugin.mjs +12 -16
  71. package/dist/packages/stack/src/plugins/form-builder/api/plugin.cjs +58 -62
  72. package/dist/packages/stack/src/plugins/form-builder/api/plugin.mjs +58 -62
  73. package/dist/packages/stack/src/plugins/form-builder/client/plugin.cjs +12 -12
  74. package/dist/packages/stack/src/plugins/form-builder/client/plugin.mjs +13 -13
  75. package/dist/packages/stack/src/plugins/kanban/api/plugin.cjs +86 -117
  76. package/dist/packages/stack/src/plugins/kanban/api/plugin.mjs +83 -114
  77. package/dist/packages/stack/src/plugins/kanban/client/plugin.cjs +22 -29
  78. package/dist/packages/stack/src/plugins/kanban/client/plugin.mjs +23 -30
  79. package/dist/packages/stack/src/plugins/open-api/api/generator.cjs +2 -1
  80. package/dist/packages/stack/src/plugins/open-api/api/generator.mjs +2 -1
  81. package/dist/packages/stack/src/plugins/ui-builder/client/plugin.cjs +8 -8
  82. package/dist/packages/stack/src/plugins/ui-builder/client/plugin.mjs +9 -9
  83. package/dist/packages/stack/src/plugins/utils.cjs +42 -0
  84. package/dist/packages/stack/src/plugins/utils.mjs +41 -1
  85. package/dist/packages/ui/src/components/minimal-tiptap/components/bubble-menu/link-bubble-menu.cjs +1 -1
  86. package/dist/packages/ui/src/components/minimal-tiptap/components/bubble-menu/link-bubble-menu.mjs +1 -1
  87. package/dist/packages/ui/src/components/minimal-tiptap/extensions/code-block-lowlight/code-block-lowlight.cjs +1 -1
  88. package/dist/packages/ui/src/components/minimal-tiptap/extensions/code-block-lowlight/code-block-lowlight.mjs +1 -1
  89. package/dist/packages/ui/src/components/minimal-tiptap/extensions/color/color.cjs +1 -1
  90. package/dist/packages/ui/src/components/minimal-tiptap/extensions/color/color.mjs +1 -1
  91. package/dist/packages/ui/src/components/minimal-tiptap/extensions/file-handler/index.cjs +1 -1
  92. package/dist/packages/ui/src/components/minimal-tiptap/extensions/file-handler/index.mjs +1 -1
  93. package/dist/packages/ui/src/components/minimal-tiptap/extensions/horizontal-rule/horizontal-rule.cjs +1 -1
  94. package/dist/packages/ui/src/components/minimal-tiptap/extensions/horizontal-rule/horizontal-rule.mjs +1 -1
  95. package/dist/packages/ui/src/components/minimal-tiptap/extensions/image/components/image-view-block.cjs +1 -1
  96. package/dist/packages/ui/src/components/minimal-tiptap/extensions/image/components/image-view-block.mjs +1 -1
  97. package/dist/packages/ui/src/components/minimal-tiptap/extensions/image/image.cjs +2 -2
  98. package/dist/packages/ui/src/components/minimal-tiptap/extensions/image/image.mjs +2 -2
  99. package/dist/packages/ui/src/components/minimal-tiptap/extensions/markdown-paste/markdown-paste.cjs +1 -1
  100. package/dist/packages/ui/src/components/minimal-tiptap/extensions/markdown-paste/markdown-paste.mjs +1 -1
  101. package/dist/packages/ui/src/components/minimal-tiptap/extensions/reset-marks-on-enter/reset-marks-on-enter.cjs +1 -1
  102. package/dist/packages/ui/src/components/minimal-tiptap/extensions/reset-marks-on-enter/reset-marks-on-enter.mjs +1 -1
  103. package/dist/packages/ui/src/components/minimal-tiptap/extensions/unset-all-marks/unset-all-marks.cjs +1 -1
  104. package/dist/packages/ui/src/components/minimal-tiptap/extensions/unset-all-marks/unset-all-marks.mjs +1 -1
  105. package/dist/packages/ui/src/components/minimal-tiptap/hooks/use-minimal-tiptap.cjs +7 -7
  106. package/dist/packages/ui/src/components/minimal-tiptap/hooks/use-minimal-tiptap.mjs +7 -7
  107. package/dist/packages/ui/src/components/minimal-tiptap/hooks/use-tiptap-editor.cjs +1 -1
  108. package/dist/packages/ui/src/components/minimal-tiptap/hooks/use-tiptap-editor.mjs +1 -1
  109. package/dist/packages/ui/src/components/minimal-tiptap/minimal-tiptap.cjs +1 -1
  110. package/dist/packages/ui/src/components/minimal-tiptap/minimal-tiptap.mjs +1 -1
  111. package/dist/plugins/ai-chat/api/index.d.cts +1 -1
  112. package/dist/plugins/ai-chat/api/index.d.mts +1 -1
  113. package/dist/plugins/ai-chat/api/index.d.ts +1 -1
  114. package/dist/plugins/ai-chat/client/hooks/index.d.cts +1 -1
  115. package/dist/plugins/ai-chat/client/hooks/index.d.mts +1 -1
  116. package/dist/plugins/ai-chat/client/hooks/index.d.ts +1 -1
  117. package/dist/plugins/ai-chat/client/index.d.cts +8 -8
  118. package/dist/plugins/ai-chat/client/index.d.mts +8 -8
  119. package/dist/plugins/ai-chat/client/index.d.ts +8 -8
  120. package/dist/plugins/ai-chat/query-keys.d.cts +1 -1
  121. package/dist/plugins/ai-chat/query-keys.d.mts +1 -1
  122. package/dist/plugins/ai-chat/query-keys.d.ts +1 -1
  123. package/dist/plugins/blog/api/index.d.cts +1 -1
  124. package/dist/plugins/blog/api/index.d.mts +1 -1
  125. package/dist/plugins/blog/api/index.d.ts +1 -1
  126. package/dist/plugins/blog/client/index.d.cts +12 -12
  127. package/dist/plugins/blog/client/index.d.mts +12 -12
  128. package/dist/plugins/blog/client/index.d.ts +12 -12
  129. package/dist/plugins/blog/query-keys.d.cts +1 -1
  130. package/dist/plugins/blog/query-keys.d.mts +1 -1
  131. package/dist/plugins/blog/query-keys.d.ts +1 -1
  132. package/dist/plugins/client/index.cjs +1 -0
  133. package/dist/plugins/client/index.d.cts +8 -1
  134. package/dist/plugins/client/index.d.mts +8 -1
  135. package/dist/plugins/client/index.d.ts +8 -1
  136. package/dist/plugins/client/index.mjs +1 -1
  137. package/dist/plugins/cms/api/index.d.cts +2 -2
  138. package/dist/plugins/cms/api/index.d.mts +2 -2
  139. package/dist/plugins/cms/api/index.d.ts +2 -2
  140. package/dist/plugins/cms/client/hooks/index.d.cts +1 -1
  141. package/dist/plugins/cms/client/hooks/index.d.mts +1 -1
  142. package/dist/plugins/cms/client/hooks/index.d.ts +1 -1
  143. package/dist/plugins/cms/client/index.d.cts +6 -6
  144. package/dist/plugins/cms/client/index.d.mts +6 -6
  145. package/dist/plugins/cms/client/index.d.ts +6 -6
  146. package/dist/plugins/cms/query-keys.d.cts +2 -2
  147. package/dist/plugins/cms/query-keys.d.mts +2 -2
  148. package/dist/plugins/cms/query-keys.d.ts +2 -2
  149. package/dist/plugins/form-builder/api/index.d.cts +2 -2
  150. package/dist/plugins/form-builder/api/index.d.mts +2 -2
  151. package/dist/plugins/form-builder/api/index.d.ts +2 -2
  152. package/dist/plugins/form-builder/client/components/index.d.cts +1 -1
  153. package/dist/plugins/form-builder/client/components/index.d.mts +1 -1
  154. package/dist/plugins/form-builder/client/components/index.d.ts +1 -1
  155. package/dist/plugins/form-builder/client/hooks/index.d.cts +1 -1
  156. package/dist/plugins/form-builder/client/hooks/index.d.mts +1 -1
  157. package/dist/plugins/form-builder/client/hooks/index.d.ts +1 -1
  158. package/dist/plugins/form-builder/client/index.d.cts +6 -6
  159. package/dist/plugins/form-builder/client/index.d.mts +6 -6
  160. package/dist/plugins/form-builder/client/index.d.ts +6 -6
  161. package/dist/plugins/form-builder/query-keys.d.cts +2 -2
  162. package/dist/plugins/form-builder/query-keys.d.mts +2 -2
  163. package/dist/plugins/form-builder/query-keys.d.ts +2 -2
  164. package/dist/plugins/kanban/api/index.d.cts +1 -1
  165. package/dist/plugins/kanban/api/index.d.mts +1 -1
  166. package/dist/plugins/kanban/api/index.d.ts +1 -1
  167. package/dist/plugins/kanban/client/index.d.cts +12 -12
  168. package/dist/plugins/kanban/client/index.d.mts +12 -12
  169. package/dist/plugins/kanban/client/index.d.ts +12 -12
  170. package/dist/plugins/kanban/query-keys.d.cts +1 -1
  171. package/dist/plugins/kanban/query-keys.d.mts +1 -1
  172. package/dist/plugins/kanban/query-keys.d.ts +1 -1
  173. package/dist/plugins/ui-builder/client/hooks/index.d.cts +1 -1
  174. package/dist/plugins/ui-builder/client/hooks/index.d.mts +1 -1
  175. package/dist/plugins/ui-builder/client/hooks/index.d.ts +1 -1
  176. package/dist/plugins/ui-builder/client/index.d.cts +3 -3
  177. package/dist/plugins/ui-builder/client/index.d.mts +3 -3
  178. package/dist/plugins/ui-builder/client/index.d.ts +3 -3
  179. package/dist/plugins/ui-builder/index.d.cts +2 -2
  180. package/dist/plugins/ui-builder/index.d.mts +2 -2
  181. package/dist/plugins/ui-builder/index.d.ts +2 -2
  182. package/dist/shared/{stack.C-WUPMT6.d.cts → stack.B2xZTSiO.d.cts} +4 -4
  183. package/dist/shared/{stack.CczspVn2.d.mts → stack.B58oHdqm.d.mts} +1 -1
  184. package/dist/shared/{stack.BepFXT3w.d.mts → stack.B8D4r97Z.d.mts} +22 -22
  185. package/dist/shared/{stack.CVDTkMoO.d.mts → stack.B8QD11QU.d.cts} +7 -7
  186. package/dist/shared/{stack.CVDTkMoO.d.cts → stack.B8QD11QU.d.mts} +7 -7
  187. package/dist/shared/{stack.CVDTkMoO.d.ts → stack.B8QD11QU.d.ts} +7 -7
  188. package/dist/shared/{stack.kcdnD4gA.d.cts → stack.BgTmujxW.d.mts} +1 -1
  189. package/dist/shared/{stack.DdI5W6MB.d.mts → stack.BozPgbrZ.d.cts} +19 -19
  190. package/dist/shared/{stack.DdI5W6MB.d.ts → stack.BozPgbrZ.d.mts} +19 -19
  191. package/dist/shared/{stack.DdI5W6MB.d.cts → stack.BozPgbrZ.d.ts} +19 -19
  192. package/dist/shared/{stack.BUkC2EsZ.d.cts → stack.C9Mg2Q46.d.cts} +1 -1
  193. package/dist/shared/{stack.Kq2-QzOC.d.ts → stack.CLQuVdwK.d.ts} +1 -1
  194. package/dist/shared/{stack.B7ONvlD_.d.mts → stack.CSx98K5H.d.cts} +1 -1
  195. package/dist/shared/{stack.BEn34wW6.d.ts → stack.CTDVxbrA.d.ts} +12 -12
  196. package/dist/shared/{stack.C-Ptrz8s.d.ts → stack.Cj_zKww4.d.ts} +4 -4
  197. package/dist/shared/{stack.DWoCZff7.d.cts → stack.D-b5zbPm.d.cts} +12 -12
  198. package/dist/shared/{stack.CL8ts1Mu.d.ts → stack.DXnclTG7.d.ts} +8 -8
  199. package/dist/shared/{stack.heOA9gzA.d.cts → stack.DaZM10cp.d.cts} +8 -8
  200. package/dist/shared/{stack.CgWzG5jH.d.ts → stack.DgKOwl20.d.ts} +22 -22
  201. package/dist/shared/{stack.DTDxgFj8.d.mts → stack.FVWf2JhZ.d.mts} +12 -12
  202. package/dist/shared/{stack.Dk5r4W1F.d.mts → stack.cfCkioTe.d.mts} +8 -8
  203. package/dist/shared/{stack.6fUOjLs9.d.mts → stack.dH7u-TJH.d.mts} +4 -4
  204. package/dist/shared/{stack.DASmUVjX.d.ts → stack.sO33ZDhK.d.ts} +1 -1
  205. package/dist/shared/{stack.D3GB6wKv.d.cts → stack.uWSqCWAb.d.cts} +22 -22
  206. package/package.json +1 -1
  207. package/src/plugins/ai-chat/api/plugin.ts +48 -63
  208. package/src/plugins/ai-chat/client/plugin.tsx +23 -31
  209. package/src/plugins/blog/api/plugin.ts +31 -47
  210. package/src/plugins/blog/client/plugin.tsx +36 -39
  211. package/src/plugins/client/index.ts +5 -1
  212. package/src/plugins/cms/api/plugin.ts +14 -17
  213. package/src/plugins/cms/client/plugin.tsx +18 -21
  214. package/src/plugins/cms/types.ts +7 -7
  215. package/src/plugins/form-builder/api/plugin.ts +64 -64
  216. package/src/plugins/form-builder/client/plugin.tsx +19 -18
  217. package/src/plugins/form-builder/types.ts +19 -24
  218. package/src/plugins/kanban/api/plugin.ts +111 -136
  219. package/src/plugins/kanban/client/plugin.tsx +35 -41
  220. package/src/plugins/open-api/api/generator.ts +3 -1
  221. package/src/plugins/ui-builder/client/plugin.tsx +11 -10
  222. package/src/plugins/ui-builder/types.ts +4 -4
  223. package/src/plugins/utils.ts +92 -1
  224. /package/dist/node_modules/.pnpm/{@tiptap_core@3.15.3_@tiptap_pm@3.15.3 → @tiptap_core@3.20.0_@tiptap_pm@3.15.3}/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs +0 -0
  225. /package/dist/node_modules/.pnpm/{@tiptap_core@3.15.3_@tiptap_pm@3.15.3 → @tiptap_core@3.20.0_@tiptap_pm@3.15.3}/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.mjs +0 -0
@@ -30,6 +30,7 @@ import {
30
30
  getKanbanColumnsByBoardId,
31
31
  } from "./mutations";
32
32
  import { KANBAN_QUERY_KEYS } from "./query-key-defs";
33
+ import { runHookWithShim } from "../../utils";
33
34
  import { serializeBoard } from "./serializers";
34
35
  import type { QueryClient } from "@tanstack/react-query";
35
36
 
@@ -101,41 +102,41 @@ export interface KanbanApiContext<
101
102
  export interface KanbanBackendHooks {
102
103
  // ============ Board Hooks ============
103
104
  /**
104
- * Called before listing boards. Return false to deny access.
105
+ * Called before listing boards. Throw an error to deny access.
105
106
  */
106
107
  onBeforeListBoards?: (
107
108
  filter: z.infer<typeof BoardListQuerySchema>,
108
109
  context: KanbanApiContext,
109
- ) => Promise<boolean> | boolean;
110
+ ) => Promise<void> | void;
110
111
  /**
111
- * Called before creating a board. Return false to deny access.
112
+ * Called before creating a board. Throw an error to deny access.
112
113
  */
113
114
  onBeforeCreateBoard?: (
114
115
  data: z.infer<typeof createBoardSchema>,
115
116
  context: KanbanApiContext,
116
- ) => Promise<boolean> | boolean;
117
+ ) => Promise<void> | void;
117
118
  /**
118
- * Called before reading a single board. Return false to deny access.
119
+ * Called before reading a single board. Throw an error to deny access.
119
120
  */
120
121
  onBeforeReadBoard?: (
121
122
  boardId: string,
122
123
  context: KanbanApiContext,
123
- ) => Promise<boolean> | boolean;
124
+ ) => Promise<void> | void;
124
125
  /**
125
- * Called before updating a board. Return false to deny access.
126
+ * Called before updating a board. Throw an error to deny access.
126
127
  */
127
128
  onBeforeUpdateBoard?: (
128
129
  boardId: string,
129
130
  data: z.infer<typeof updateBoardSchema>,
130
131
  context: KanbanApiContext,
131
- ) => Promise<boolean> | boolean;
132
+ ) => Promise<void> | void;
132
133
  /**
133
- * Called before deleting a board. Return false to deny access.
134
+ * Called before deleting a board. Throw an error to deny access.
134
135
  */
135
136
  onBeforeDeleteBoard?: (
136
137
  boardId: string,
137
138
  context: KanbanApiContext,
138
- ) => Promise<boolean> | boolean;
139
+ ) => Promise<void> | void;
139
140
 
140
141
  /**
141
142
  * Called after boards are listed successfully.
@@ -214,27 +215,27 @@ export interface KanbanBackendHooks {
214
215
 
215
216
  // ============ Column Hooks ============
216
217
  /**
217
- * Called before creating a column. Return false to deny access.
218
+ * Called before creating a column. Throw an error to deny access.
218
219
  */
219
220
  onBeforeCreateColumn?: (
220
221
  data: z.infer<typeof createColumnSchema>,
221
222
  context: KanbanApiContext,
222
- ) => Promise<boolean> | boolean;
223
+ ) => Promise<void> | void;
223
224
  /**
224
- * Called before updating a column. Return false to deny access.
225
+ * Called before updating a column. Throw an error to deny access.
225
226
  */
226
227
  onBeforeUpdateColumn?: (
227
228
  columnId: string,
228
229
  data: z.infer<typeof updateColumnSchema>,
229
230
  context: KanbanApiContext,
230
- ) => Promise<boolean> | boolean;
231
+ ) => Promise<void> | void;
231
232
  /**
232
- * Called before deleting a column. Return false to deny access.
233
+ * Called before deleting a column. Throw an error to deny access.
233
234
  */
234
235
  onBeforeDeleteColumn?: (
235
236
  columnId: string,
236
237
  context: KanbanApiContext,
237
- ) => Promise<boolean> | boolean;
238
+ ) => Promise<void> | void;
238
239
 
239
240
  /**
240
241
  * Called after a column is created successfully
@@ -260,27 +261,27 @@ export interface KanbanBackendHooks {
260
261
 
261
262
  // ============ Task Hooks ============
262
263
  /**
263
- * Called before creating a task. Return false to deny access.
264
+ * Called before creating a task. Throw an error to deny access.
264
265
  */
265
266
  onBeforeCreateTask?: (
266
267
  data: z.infer<typeof createTaskSchema>,
267
268
  context: KanbanApiContext,
268
- ) => Promise<boolean> | boolean;
269
+ ) => Promise<void> | void;
269
270
  /**
270
- * Called before updating a task. Return false to deny access.
271
+ * Called before updating a task. Throw an error to deny access.
271
272
  */
272
273
  onBeforeUpdateTask?: (
273
274
  taskId: string,
274
275
  data: z.infer<typeof updateTaskSchema>,
275
276
  context: KanbanApiContext,
276
- ) => Promise<boolean> | boolean;
277
+ ) => Promise<void> | void;
277
278
  /**
278
- * Called before deleting a task. Return false to deny access.
279
+ * Called before deleting a task. Throw an error to deny access.
279
280
  */
280
281
  onBeforeDeleteTask?: (
281
282
  taskId: string,
282
283
  context: KanbanApiContext,
283
- ) => Promise<boolean> | boolean;
284
+ ) => Promise<void> | void;
284
285
 
285
286
  /**
286
287
  * Called after a task is created successfully
@@ -346,12 +347,11 @@ export const kanbanBackendPlugin = (hooks?: KanbanBackendHooks) =>
346
347
 
347
348
  try {
348
349
  if (hooks?.onBeforeListBoards) {
349
- const canList = await hooks.onBeforeListBoards(query, context);
350
- if (!canList) {
351
- throw ctx.error(403, {
352
- message: "Unauthorized: Cannot list boards",
353
- });
354
- }
350
+ await runHookWithShim(
351
+ () => hooks.onBeforeListBoards!(query, context),
352
+ ctx.error,
353
+ "Unauthorized: Cannot list boards",
354
+ );
355
355
  }
356
356
 
357
357
  const result = await getAllBoards(adapter, query);
@@ -381,12 +381,11 @@ export const kanbanBackendPlugin = (hooks?: KanbanBackendHooks) =>
381
381
 
382
382
  try {
383
383
  if (hooks?.onBeforeReadBoard) {
384
- const canRead = await hooks.onBeforeReadBoard(params.id, context);
385
- if (!canRead) {
386
- throw ctx.error(403, {
387
- message: "Unauthorized: Cannot read board",
388
- });
389
- }
384
+ await runHookWithShim(
385
+ () => hooks.onBeforeReadBoard!(params.id, context),
386
+ ctx.error,
387
+ "Unauthorized: Cannot read board",
388
+ );
390
389
  }
391
390
 
392
391
  const result = await getBoardById(adapter, params.id);
@@ -423,15 +422,11 @@ export const kanbanBackendPlugin = (hooks?: KanbanBackendHooks) =>
423
422
 
424
423
  try {
425
424
  if (hooks?.onBeforeCreateBoard) {
426
- const canCreate = await hooks.onBeforeCreateBoard(
427
- ctx.body,
428
- context,
425
+ await runHookWithShim(
426
+ () => hooks.onBeforeCreateBoard!(ctx.body, context),
427
+ ctx.error,
428
+ "Unauthorized: Cannot create board",
429
429
  );
430
- if (!canCreate) {
431
- throw ctx.error(403, {
432
- message: "Unauthorized: Cannot create board",
433
- });
434
- }
435
430
  }
436
431
 
437
432
  const { ...boardData } = ctx.body;
@@ -516,16 +511,16 @@ export const kanbanBackendPlugin = (hooks?: KanbanBackendHooks) =>
516
511
 
517
512
  try {
518
513
  if (hooks?.onBeforeUpdateBoard) {
519
- const canUpdate = await hooks.onBeforeUpdateBoard(
520
- ctx.params.id,
521
- { ...ctx.body, id: ctx.params.id },
522
- context,
514
+ await runHookWithShim(
515
+ () =>
516
+ hooks.onBeforeUpdateBoard!(
517
+ ctx.params.id,
518
+ { ...ctx.body, id: ctx.params.id },
519
+ context,
520
+ ),
521
+ ctx.error,
522
+ "Unauthorized: Cannot update board",
523
523
  );
524
- if (!canUpdate) {
525
- throw ctx.error(403, {
526
- message: "Unauthorized: Cannot update board",
527
- });
528
- }
529
524
  }
530
525
 
531
526
  const { slug: rawSlug, ...restBoardData } = ctx.body;
@@ -595,15 +590,11 @@ export const kanbanBackendPlugin = (hooks?: KanbanBackendHooks) =>
595
590
  }
596
591
 
597
592
  if (hooks?.onBeforeDeleteBoard) {
598
- const canDelete = await hooks.onBeforeDeleteBoard(
599
- ctx.params.id,
600
- context,
593
+ await runHookWithShim(
594
+ () => hooks.onBeforeDeleteBoard!(ctx.params.id, context),
595
+ ctx.error,
596
+ "Unauthorized: Cannot delete board",
601
597
  );
602
- if (!canDelete) {
603
- throw ctx.error(403, {
604
- message: "Unauthorized: Cannot delete board",
605
- });
606
- }
607
598
  }
608
599
 
609
600
  await adapter.delete<Board>({
@@ -641,15 +632,11 @@ export const kanbanBackendPlugin = (hooks?: KanbanBackendHooks) =>
641
632
 
642
633
  try {
643
634
  if (hooks?.onBeforeCreateColumn) {
644
- const canCreate = await hooks.onBeforeCreateColumn(
645
- ctx.body,
646
- context,
635
+ await runHookWithShim(
636
+ () => hooks.onBeforeCreateColumn!(ctx.body, context),
637
+ ctx.error,
638
+ "Unauthorized: Cannot create column",
647
639
  );
648
- if (!canCreate) {
649
- throw ctx.error(403, {
650
- message: "Unauthorized: Cannot create column",
651
- });
652
- }
653
640
  }
654
641
 
655
642
  // Get existing columns to determine order
@@ -704,16 +691,16 @@ export const kanbanBackendPlugin = (hooks?: KanbanBackendHooks) =>
704
691
 
705
692
  try {
706
693
  if (hooks?.onBeforeUpdateColumn) {
707
- const canUpdate = await hooks.onBeforeUpdateColumn(
708
- ctx.params.id,
709
- { ...ctx.body, id: ctx.params.id },
710
- context,
694
+ await runHookWithShim(
695
+ () =>
696
+ hooks.onBeforeUpdateColumn!(
697
+ ctx.params.id,
698
+ { ...ctx.body, id: ctx.params.id },
699
+ context,
700
+ ),
701
+ ctx.error,
702
+ "Unauthorized: Cannot update column",
711
703
  );
712
- if (!canUpdate) {
713
- throw ctx.error(403, {
714
- message: "Unauthorized: Cannot update column",
715
- });
716
- }
717
704
  }
718
705
 
719
706
  const updated = await adapter.update<Column>({
@@ -765,15 +752,11 @@ export const kanbanBackendPlugin = (hooks?: KanbanBackendHooks) =>
765
752
  }
766
753
 
767
754
  if (hooks?.onBeforeDeleteColumn) {
768
- const canDelete = await hooks.onBeforeDeleteColumn(
769
- ctx.params.id,
770
- context,
755
+ await runHookWithShim(
756
+ () => hooks.onBeforeDeleteColumn!(ctx.params.id, context),
757
+ ctx.error,
758
+ "Unauthorized: Cannot delete column",
771
759
  );
772
- if (!canDelete) {
773
- throw ctx.error(403, {
774
- message: "Unauthorized: Cannot delete column",
775
- });
776
- }
777
760
  }
778
761
 
779
762
  await adapter.delete<Column>({
@@ -810,16 +793,16 @@ export const kanbanBackendPlugin = (hooks?: KanbanBackendHooks) =>
810
793
  for (let i = 0; i < columnIds.length; i++) {
811
794
  const columnId = columnIds[i];
812
795
  if (!columnId) continue;
813
- const canUpdate = await hooks.onBeforeUpdateColumn(
814
- columnId,
815
- { id: columnId, order: i },
816
- context,
796
+ await runHookWithShim(
797
+ () =>
798
+ hooks.onBeforeUpdateColumn!(
799
+ columnId,
800
+ { id: columnId, order: i },
801
+ context,
802
+ ),
803
+ ctx.error,
804
+ "Unauthorized: Cannot reorder columns",
817
805
  );
818
- if (!canUpdate) {
819
- throw ctx.error(403, {
820
- message: "Unauthorized: Cannot reorder columns",
821
- });
822
- }
823
806
  }
824
807
  }
825
808
 
@@ -869,15 +852,11 @@ export const kanbanBackendPlugin = (hooks?: KanbanBackendHooks) =>
869
852
 
870
853
  try {
871
854
  if (hooks?.onBeforeCreateTask) {
872
- const canCreate = await hooks.onBeforeCreateTask(
873
- ctx.body,
874
- context,
855
+ await runHookWithShim(
856
+ () => hooks.onBeforeCreateTask!(ctx.body, context),
857
+ ctx.error,
858
+ "Unauthorized: Cannot create task",
875
859
  );
876
- if (!canCreate) {
877
- throw ctx.error(403, {
878
- message: "Unauthorized: Cannot create task",
879
- });
880
- }
881
860
  }
882
861
 
883
862
  // Get existing tasks in column to determine order
@@ -939,16 +918,16 @@ export const kanbanBackendPlugin = (hooks?: KanbanBackendHooks) =>
939
918
 
940
919
  try {
941
920
  if (hooks?.onBeforeUpdateTask) {
942
- const canUpdate = await hooks.onBeforeUpdateTask(
943
- ctx.params.id,
944
- { ...ctx.body, id: ctx.params.id },
945
- context,
921
+ await runHookWithShim(
922
+ () =>
923
+ hooks.onBeforeUpdateTask!(
924
+ ctx.params.id,
925
+ { ...ctx.body, id: ctx.params.id },
926
+ context,
927
+ ),
928
+ ctx.error,
929
+ "Unauthorized: Cannot update task",
946
930
  );
947
- if (!canUpdate) {
948
- throw ctx.error(403, {
949
- message: "Unauthorized: Cannot update task",
950
- });
951
- }
952
931
  }
953
932
 
954
933
  const updated = await adapter.update<Task>({
@@ -1000,15 +979,11 @@ export const kanbanBackendPlugin = (hooks?: KanbanBackendHooks) =>
1000
979
  }
1001
980
 
1002
981
  if (hooks?.onBeforeDeleteTask) {
1003
- const canDelete = await hooks.onBeforeDeleteTask(
1004
- ctx.params.id,
1005
- context,
982
+ await runHookWithShim(
983
+ () => hooks.onBeforeDeleteTask!(ctx.params.id, context),
984
+ ctx.error,
985
+ "Unauthorized: Cannot delete task",
1006
986
  );
1007
- if (!canDelete) {
1008
- throw ctx.error(403, {
1009
- message: "Unauthorized: Cannot delete task",
1010
- });
1011
- }
1012
987
  }
1013
988
 
1014
989
  await adapter.delete<Task>({
@@ -1052,16 +1027,16 @@ export const kanbanBackendPlugin = (hooks?: KanbanBackendHooks) =>
1052
1027
 
1053
1028
  // Check authorization before moving task
1054
1029
  if (hooks?.onBeforeUpdateTask) {
1055
- const canUpdate = await hooks.onBeforeUpdateTask(
1056
- taskId,
1057
- { id: taskId, columnId: targetColumnId, order: targetOrder },
1058
- context,
1030
+ await runHookWithShim(
1031
+ () =>
1032
+ hooks.onBeforeUpdateTask!(
1033
+ taskId,
1034
+ { id: taskId, columnId: targetColumnId, order: targetOrder },
1035
+ context,
1036
+ ),
1037
+ ctx.error,
1038
+ "Unauthorized: Cannot move task",
1059
1039
  );
1060
- if (!canUpdate) {
1061
- throw ctx.error(403, {
1062
- message: "Unauthorized: Cannot move task",
1063
- });
1064
- }
1065
1040
  }
1066
1041
 
1067
1042
  // Update task with new column and order
@@ -1105,16 +1080,16 @@ export const kanbanBackendPlugin = (hooks?: KanbanBackendHooks) =>
1105
1080
  for (let i = 0; i < taskIds.length; i++) {
1106
1081
  const taskId = taskIds[i];
1107
1082
  if (!taskId) continue;
1108
- const canUpdate = await hooks.onBeforeUpdateTask(
1109
- taskId,
1110
- { id: taskId, order: i },
1111
- context,
1083
+ await runHookWithShim(
1084
+ () =>
1085
+ hooks.onBeforeUpdateTask!(
1086
+ taskId,
1087
+ { id: taskId, order: i },
1088
+ context,
1089
+ ),
1090
+ ctx.error,
1091
+ "Unauthorized: Cannot reorder tasks",
1112
1092
  );
1113
- if (!canUpdate) {
1114
- throw ctx.error(403, {
1115
- message: "Unauthorized: Cannot reorder tasks",
1116
- });
1117
- }
1118
1093
  }
1119
1094
  }
1120
1095
 
@@ -2,6 +2,7 @@ import {
2
2
  defineClientPlugin,
3
3
  createApiClient,
4
4
  isConnectionError,
5
+ runClientHookWithShim,
5
6
  } from "@btst/stack/plugins/client";
6
7
  import { createRoute } from "@btst/yar";
7
8
  import type { QueryClient } from "@tanstack/react-query";
@@ -86,39 +87,39 @@ export interface KanbanClientConfig {
86
87
  */
87
88
  export interface KanbanClientHooks {
88
89
  /**
89
- * Called before loading boards list. Return false to cancel loading.
90
+ * Called before loading boards list. Throw an error to cancel loading.
90
91
  */
91
- beforeLoadBoards?: (context: LoaderContext) => Promise<boolean> | boolean;
92
+ beforeLoadBoards?: (context: LoaderContext) => Promise<void> | void;
92
93
  /**
93
- * Called after boards are loaded. Return false to cancel further processing.
94
+ * Called after boards are loaded. Throw an error to cancel further processing.
94
95
  */
95
96
  afterLoadBoards?: (
96
97
  boards: SerializedBoardWithColumns[] | null,
97
98
  context: LoaderContext,
98
- ) => Promise<boolean> | boolean;
99
+ ) => Promise<void> | void;
99
100
  /**
100
- * Called before loading a single board. Return false to cancel loading.
101
+ * Called before loading a single board. Throw an error to cancel loading.
101
102
  */
102
103
  beforeLoadBoard?: (
103
104
  boardId: string,
104
105
  context: LoaderContext,
105
- ) => Promise<boolean> | boolean;
106
+ ) => Promise<void> | void;
106
107
  /**
107
- * Called after a board is loaded. Return false to cancel further processing.
108
+ * Called after a board is loaded. Throw an error to cancel further processing.
108
109
  */
109
110
  afterLoadBoard?: (
110
111
  board: SerializedBoardWithColumns | null,
111
112
  boardId: string,
112
113
  context: LoaderContext,
113
- ) => Promise<boolean> | boolean;
114
+ ) => Promise<void> | void;
114
115
  /**
115
- * Called before loading the new board page. Return false to cancel.
116
+ * Called before loading the new board page. Throw an error to cancel.
116
117
  */
117
- beforeLoadNewBoard?: (context: LoaderContext) => Promise<boolean> | boolean;
118
+ beforeLoadNewBoard?: (context: LoaderContext) => Promise<void> | void;
118
119
  /**
119
- * Called after the new board page is loaded. Return false to cancel.
120
+ * Called after the new board page is loaded. Throw an error to cancel.
120
121
  */
121
- afterLoadNewBoard?: (context: LoaderContext) => Promise<boolean> | boolean;
122
+ afterLoadNewBoard?: (context: LoaderContext) => Promise<void> | void;
122
123
  /**
123
124
  * Called when a loading error occurs
124
125
  */
@@ -141,10 +142,10 @@ function createBoardsLoader(config: KanbanClientConfig) {
141
142
 
142
143
  try {
143
144
  if (hooks?.beforeLoadBoards) {
144
- const canLoad = await hooks.beforeLoadBoards(context);
145
- if (!canLoad) {
146
- throw new Error("Load prevented by beforeLoadBoards hook");
147
- }
145
+ await runClientHookWithShim(
146
+ () => hooks.beforeLoadBoards!(context),
147
+ "Load prevented by beforeLoadBoards hook",
148
+ );
148
149
  }
149
150
 
150
151
  const client = createApiClient<KanbanApiRouter>({
@@ -161,13 +162,10 @@ function createBoardsLoader(config: KanbanClientConfig) {
161
162
  const boards = queryClient.getQueryData<SerializedBoardWithColumns[]>(
162
163
  listQuery.queryKey,
163
164
  );
164
- const canContinue = await hooks.afterLoadBoards(
165
- boards || null,
166
- context,
165
+ await runClientHookWithShim(
166
+ () => hooks.afterLoadBoards!(boards || null, context),
167
+ "Load prevented by afterLoadBoards hook",
167
168
  );
168
- if (canContinue === false) {
169
- throw new Error("Load prevented by afterLoadBoards hook");
170
- }
171
169
  }
172
170
 
173
171
  const queryState = queryClient.getQueryState(listQuery.queryKey);
@@ -210,10 +208,10 @@ function createBoardLoader(boardId: string, config: KanbanClientConfig) {
210
208
 
211
209
  try {
212
210
  if (hooks?.beforeLoadBoard) {
213
- const canLoad = await hooks.beforeLoadBoard(boardId, context);
214
- if (!canLoad) {
215
- throw new Error("Load prevented by beforeLoadBoard hook");
216
- }
211
+ await runClientHookWithShim(
212
+ () => hooks.beforeLoadBoard!(boardId, context),
213
+ "Load prevented by beforeLoadBoard hook",
214
+ );
217
215
  }
218
216
 
219
217
  const client = createApiClient<KanbanApiRouter>({
@@ -229,14 +227,10 @@ function createBoardLoader(boardId: string, config: KanbanClientConfig) {
229
227
  const board = queryClient.getQueryData<SerializedBoardWithColumns>(
230
228
  boardQuery.queryKey,
231
229
  );
232
- const canContinue = await hooks.afterLoadBoard(
233
- board || null,
234
- boardId,
235
- context,
230
+ await runClientHookWithShim(
231
+ () => hooks.afterLoadBoard!(board || null, boardId, context),
232
+ "Load prevented by afterLoadBoard hook",
236
233
  );
237
- if (canContinue === false) {
238
- throw new Error("Load prevented by afterLoadBoard hook");
239
- }
240
234
  }
241
235
 
242
236
  const queryState = queryClient.getQueryState(boardQuery.queryKey);
@@ -278,17 +272,17 @@ function createNewBoardLoader(config: KanbanClientConfig) {
278
272
 
279
273
  try {
280
274
  if (hooks?.beforeLoadNewBoard) {
281
- const canLoad = await hooks.beforeLoadNewBoard(context);
282
- if (!canLoad) {
283
- throw new Error("Load prevented by beforeLoadNewBoard hook");
284
- }
275
+ await runClientHookWithShim(
276
+ () => hooks.beforeLoadNewBoard!(context),
277
+ "Load prevented by beforeLoadNewBoard hook",
278
+ );
285
279
  }
286
280
 
287
281
  if (hooks?.afterLoadNewBoard) {
288
- const canContinue = await hooks.afterLoadNewBoard(context);
289
- if (canContinue === false) {
290
- throw new Error("Load prevented by afterLoadNewBoard hook");
291
- }
282
+ await runClientHookWithShim(
283
+ () => hooks.afterLoadNewBoard!(context),
284
+ "Load prevented by afterLoadNewBoard hook",
285
+ );
292
286
  }
293
287
  } catch (error) {
294
288
  if (hooks?.onLoadError) {
@@ -96,7 +96,9 @@ function processZodType(zodType: z.ZodType<any>): Record<string, any> {
96
96
  // Handle default - unwrap and process inner type, including default value
97
97
  if (zodType instanceof z.ZodDefault) {
98
98
  const innerType = (zodType as any)._def?.innerType;
99
- const defaultValue = (zodType as any)._def?.defaultValue?.();
99
+ const rawDefault = (zodType as any)._def?.defaultValue;
100
+ const defaultValue =
101
+ typeof rawDefault === "function" ? rawDefault() : rawDefault;
100
102
  if (innerType) {
101
103
  const innerSchema = processZodType(innerType);
102
104
  // Include the default value in the OpenAPI schema if it's JSON-serializable
@@ -3,6 +3,7 @@ import { lazy } from "react";
3
3
  import {
4
4
  defineClientPlugin,
5
5
  createApiClient,
6
+ runClientHookWithShim,
6
7
  } from "@btst/stack/plugins/client";
7
8
  import { createRoute } from "@btst/yar";
8
9
  import type { QueryClient } from "@tanstack/react-query";
@@ -69,10 +70,10 @@ function createPageListLoader(config: UIBuilderClientConfig) {
69
70
  try {
70
71
  // Before hook - authorization check
71
72
  if (hooks?.beforeLoadPageList) {
72
- const canLoad = await hooks.beforeLoadPageList(context);
73
- if (!canLoad) {
74
- throw new Error("Load prevented by beforeLoadPageList hook");
75
- }
73
+ await runClientHookWithShim(
74
+ () => hooks.beforeLoadPageList!(context),
75
+ "Load prevented by beforeLoadPageList hook",
76
+ );
76
77
  }
77
78
 
78
79
  const client = createApiClient<CMSApiRouter>({
@@ -161,10 +162,10 @@ function createPageBuilderLoader(
161
162
  try {
162
163
  // Before hook - authorization check
163
164
  if (hooks?.beforeLoadPageBuilder) {
164
- const canLoad = await hooks.beforeLoadPageBuilder(id, context);
165
- if (!canLoad) {
166
- throw new Error("Load prevented by beforeLoadPageBuilder hook");
167
- }
165
+ await runClientHookWithShim(
166
+ () => hooks.beforeLoadPageBuilder!(id, context),
167
+ "Load prevented by beforeLoadPageBuilder hook",
168
+ );
168
169
  }
169
170
 
170
171
  const client = createApiClient<CMSApiRouter>({
@@ -273,11 +274,11 @@ function createPageBuilderMeta(
273
274
  * hooks: {
274
275
  * beforeLoadPageList: async (ctx) => {
275
276
  * const session = await getSession(ctx.headers)
276
- * return session?.user?.isAdmin === true
277
+ * if (!session?.user?.isAdmin) throw new Error("Admin access required")
277
278
  * },
278
279
  * beforeLoadPageBuilder: async (pageId, ctx) => {
279
280
  * const session = await getSession(ctx.headers)
280
- * return session?.user?.isAdmin === true
281
+ * if (!session?.user?.isAdmin) throw new Error("Admin access required")
281
282
  * },
282
283
  * onLoadError: () => redirect("/auth/sign-in"),
283
284
  * },
@@ -92,24 +92,24 @@ export interface LoaderContext {
92
92
  */
93
93
  export interface UIBuilderClientHooks {
94
94
  /**
95
- * Called before loading the page list. Return false to cancel loading.
95
+ * Called before loading the page list. Throw an error to cancel loading.
96
96
  * @param context - Loader context with path, params, etc.
97
97
  */
98
- beforeLoadPageList?: (context: LoaderContext) => Promise<boolean> | boolean;
98
+ beforeLoadPageList?: (context: LoaderContext) => Promise<void> | void;
99
99
  /**
100
100
  * Called after the page list is loaded.
101
101
  * @param context - Loader context
102
102
  */
103
103
  afterLoadPageList?: (context: LoaderContext) => Promise<void> | void;
104
104
  /**
105
- * Called before loading the page builder. Return false to cancel loading.
105
+ * Called before loading the page builder. Throw an error to cancel loading.
106
106
  * @param pageId - The page ID (undefined for new pages)
107
107
  * @param context - Loader context
108
108
  */
109
109
  beforeLoadPageBuilder?: (
110
110
  pageId: string | undefined,
111
111
  context: LoaderContext,
112
- ) => Promise<boolean> | boolean;
112
+ ) => Promise<void> | void;
113
113
  /**
114
114
  * Called after the page builder is loaded.
115
115
  * @param pageId - The page ID (undefined for new pages)