@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.
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/@tiptap_starter-kit@3.15.3/node_modules/@tiptap/starter-kit/dist/index.cjs +17 -17
- package/dist/node_modules/.pnpm/@tiptap_starter-kit@3.15.3/node_modules/@tiptap/starter-kit/dist/index.mjs +17 -17
- package/dist/packages/stack/src/plugins/ai-chat/api/plugin.cjs +33 -47
- package/dist/packages/stack/src/plugins/ai-chat/api/plugin.mjs +33 -47
- package/dist/packages/stack/src/plugins/ai-chat/client/plugin.cjs +14 -21
- package/dist/packages/stack/src/plugins/ai-chat/client/plugin.mjs +15 -22
- package/dist/packages/stack/src/plugins/blog/api/plugin.cjs +28 -45
- package/dist/packages/stack/src/plugins/blog/api/plugin.mjs +22 -39
- package/dist/packages/stack/src/plugins/blog/client/plugin.cjs +23 -27
- package/dist/packages/stack/src/plugins/blog/client/plugin.mjs +24 -28
- package/dist/packages/stack/src/plugins/cms/api/plugin.cjs +14 -17
- package/dist/packages/stack/src/plugins/cms/api/plugin.mjs +14 -17
- package/dist/packages/stack/src/plugins/cms/client/plugin.cjs +11 -15
- package/dist/packages/stack/src/plugins/cms/client/plugin.mjs +12 -16
- package/dist/packages/stack/src/plugins/form-builder/api/plugin.cjs +58 -62
- package/dist/packages/stack/src/plugins/form-builder/api/plugin.mjs +58 -62
- package/dist/packages/stack/src/plugins/form-builder/client/plugin.cjs +12 -12
- package/dist/packages/stack/src/plugins/form-builder/client/plugin.mjs +13 -13
- package/dist/packages/stack/src/plugins/kanban/api/plugin.cjs +86 -117
- package/dist/packages/stack/src/plugins/kanban/api/plugin.mjs +83 -114
- package/dist/packages/stack/src/plugins/kanban/client/plugin.cjs +22 -29
- package/dist/packages/stack/src/plugins/kanban/client/plugin.mjs +23 -30
- package/dist/packages/stack/src/plugins/open-api/api/generator.cjs +2 -1
- package/dist/packages/stack/src/plugins/open-api/api/generator.mjs +2 -1
- package/dist/packages/stack/src/plugins/ui-builder/client/plugin.cjs +8 -8
- package/dist/packages/stack/src/plugins/ui-builder/client/plugin.mjs +9 -9
- package/dist/packages/stack/src/plugins/utils.cjs +42 -0
- package/dist/packages/stack/src/plugins/utils.mjs +41 -1
- package/dist/packages/ui/src/components/minimal-tiptap/components/bubble-menu/link-bubble-menu.cjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/components/bubble-menu/link-bubble-menu.mjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/extensions/code-block-lowlight/code-block-lowlight.cjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/extensions/code-block-lowlight/code-block-lowlight.mjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/extensions/color/color.cjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/extensions/color/color.mjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/extensions/file-handler/index.cjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/extensions/file-handler/index.mjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/extensions/horizontal-rule/horizontal-rule.cjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/extensions/horizontal-rule/horizontal-rule.mjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/extensions/image/components/image-view-block.cjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/extensions/image/components/image-view-block.mjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/extensions/image/image.cjs +2 -2
- package/dist/packages/ui/src/components/minimal-tiptap/extensions/image/image.mjs +2 -2
- package/dist/packages/ui/src/components/minimal-tiptap/extensions/markdown-paste/markdown-paste.cjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/extensions/markdown-paste/markdown-paste.mjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/extensions/reset-marks-on-enter/reset-marks-on-enter.cjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/extensions/reset-marks-on-enter/reset-marks-on-enter.mjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/extensions/unset-all-marks/unset-all-marks.cjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/extensions/unset-all-marks/unset-all-marks.mjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/hooks/use-minimal-tiptap.cjs +7 -7
- package/dist/packages/ui/src/components/minimal-tiptap/hooks/use-minimal-tiptap.mjs +7 -7
- package/dist/packages/ui/src/components/minimal-tiptap/hooks/use-tiptap-editor.cjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/hooks/use-tiptap-editor.mjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/minimal-tiptap.cjs +1 -1
- package/dist/packages/ui/src/components/minimal-tiptap/minimal-tiptap.mjs +1 -1
- package/dist/plugins/ai-chat/api/index.d.cts +1 -1
- package/dist/plugins/ai-chat/api/index.d.mts +1 -1
- package/dist/plugins/ai-chat/api/index.d.ts +1 -1
- package/dist/plugins/ai-chat/client/hooks/index.d.cts +1 -1
- package/dist/plugins/ai-chat/client/hooks/index.d.mts +1 -1
- package/dist/plugins/ai-chat/client/hooks/index.d.ts +1 -1
- package/dist/plugins/ai-chat/client/index.d.cts +8 -8
- package/dist/plugins/ai-chat/client/index.d.mts +8 -8
- package/dist/plugins/ai-chat/client/index.d.ts +8 -8
- package/dist/plugins/ai-chat/query-keys.d.cts +1 -1
- package/dist/plugins/ai-chat/query-keys.d.mts +1 -1
- package/dist/plugins/ai-chat/query-keys.d.ts +1 -1
- package/dist/plugins/blog/api/index.d.cts +1 -1
- package/dist/plugins/blog/api/index.d.mts +1 -1
- package/dist/plugins/blog/api/index.d.ts +1 -1
- package/dist/plugins/blog/client/index.d.cts +12 -12
- package/dist/plugins/blog/client/index.d.mts +12 -12
- package/dist/plugins/blog/client/index.d.ts +12 -12
- package/dist/plugins/blog/query-keys.d.cts +1 -1
- package/dist/plugins/blog/query-keys.d.mts +1 -1
- package/dist/plugins/blog/query-keys.d.ts +1 -1
- package/dist/plugins/client/index.cjs +1 -0
- package/dist/plugins/client/index.d.cts +8 -1
- package/dist/plugins/client/index.d.mts +8 -1
- package/dist/plugins/client/index.d.ts +8 -1
- package/dist/plugins/client/index.mjs +1 -1
- package/dist/plugins/cms/api/index.d.cts +2 -2
- package/dist/plugins/cms/api/index.d.mts +2 -2
- package/dist/plugins/cms/api/index.d.ts +2 -2
- package/dist/plugins/cms/client/hooks/index.d.cts +1 -1
- package/dist/plugins/cms/client/hooks/index.d.mts +1 -1
- package/dist/plugins/cms/client/hooks/index.d.ts +1 -1
- package/dist/plugins/cms/client/index.d.cts +6 -6
- package/dist/plugins/cms/client/index.d.mts +6 -6
- package/dist/plugins/cms/client/index.d.ts +6 -6
- package/dist/plugins/cms/query-keys.d.cts +2 -2
- package/dist/plugins/cms/query-keys.d.mts +2 -2
- package/dist/plugins/cms/query-keys.d.ts +2 -2
- package/dist/plugins/form-builder/api/index.d.cts +2 -2
- package/dist/plugins/form-builder/api/index.d.mts +2 -2
- package/dist/plugins/form-builder/api/index.d.ts +2 -2
- package/dist/plugins/form-builder/client/components/index.d.cts +1 -1
- package/dist/plugins/form-builder/client/components/index.d.mts +1 -1
- package/dist/plugins/form-builder/client/components/index.d.ts +1 -1
- package/dist/plugins/form-builder/client/hooks/index.d.cts +1 -1
- package/dist/plugins/form-builder/client/hooks/index.d.mts +1 -1
- package/dist/plugins/form-builder/client/hooks/index.d.ts +1 -1
- package/dist/plugins/form-builder/client/index.d.cts +6 -6
- package/dist/plugins/form-builder/client/index.d.mts +6 -6
- package/dist/plugins/form-builder/client/index.d.ts +6 -6
- package/dist/plugins/form-builder/query-keys.d.cts +2 -2
- package/dist/plugins/form-builder/query-keys.d.mts +2 -2
- package/dist/plugins/form-builder/query-keys.d.ts +2 -2
- package/dist/plugins/kanban/api/index.d.cts +1 -1
- package/dist/plugins/kanban/api/index.d.mts +1 -1
- package/dist/plugins/kanban/api/index.d.ts +1 -1
- package/dist/plugins/kanban/client/index.d.cts +12 -12
- package/dist/plugins/kanban/client/index.d.mts +12 -12
- package/dist/plugins/kanban/client/index.d.ts +12 -12
- package/dist/plugins/kanban/query-keys.d.cts +1 -1
- package/dist/plugins/kanban/query-keys.d.mts +1 -1
- package/dist/plugins/kanban/query-keys.d.ts +1 -1
- package/dist/plugins/ui-builder/client/hooks/index.d.cts +1 -1
- package/dist/plugins/ui-builder/client/hooks/index.d.mts +1 -1
- package/dist/plugins/ui-builder/client/hooks/index.d.ts +1 -1
- package/dist/plugins/ui-builder/client/index.d.cts +3 -3
- package/dist/plugins/ui-builder/client/index.d.mts +3 -3
- package/dist/plugins/ui-builder/client/index.d.ts +3 -3
- package/dist/plugins/ui-builder/index.d.cts +2 -2
- package/dist/plugins/ui-builder/index.d.mts +2 -2
- package/dist/plugins/ui-builder/index.d.ts +2 -2
- package/dist/shared/{stack.C-WUPMT6.d.cts → stack.B2xZTSiO.d.cts} +4 -4
- package/dist/shared/{stack.CczspVn2.d.mts → stack.B58oHdqm.d.mts} +1 -1
- package/dist/shared/{stack.BepFXT3w.d.mts → stack.B8D4r97Z.d.mts} +22 -22
- package/dist/shared/{stack.CVDTkMoO.d.mts → stack.B8QD11QU.d.cts} +7 -7
- package/dist/shared/{stack.CVDTkMoO.d.cts → stack.B8QD11QU.d.mts} +7 -7
- package/dist/shared/{stack.CVDTkMoO.d.ts → stack.B8QD11QU.d.ts} +7 -7
- package/dist/shared/{stack.kcdnD4gA.d.cts → stack.BgTmujxW.d.mts} +1 -1
- package/dist/shared/{stack.DdI5W6MB.d.mts → stack.BozPgbrZ.d.cts} +19 -19
- package/dist/shared/{stack.DdI5W6MB.d.ts → stack.BozPgbrZ.d.mts} +19 -19
- package/dist/shared/{stack.DdI5W6MB.d.cts → stack.BozPgbrZ.d.ts} +19 -19
- package/dist/shared/{stack.BUkC2EsZ.d.cts → stack.C9Mg2Q46.d.cts} +1 -1
- package/dist/shared/{stack.Kq2-QzOC.d.ts → stack.CLQuVdwK.d.ts} +1 -1
- package/dist/shared/{stack.B7ONvlD_.d.mts → stack.CSx98K5H.d.cts} +1 -1
- package/dist/shared/{stack.BEn34wW6.d.ts → stack.CTDVxbrA.d.ts} +12 -12
- package/dist/shared/{stack.C-Ptrz8s.d.ts → stack.Cj_zKww4.d.ts} +4 -4
- package/dist/shared/{stack.DWoCZff7.d.cts → stack.D-b5zbPm.d.cts} +12 -12
- package/dist/shared/{stack.CL8ts1Mu.d.ts → stack.DXnclTG7.d.ts} +8 -8
- package/dist/shared/{stack.heOA9gzA.d.cts → stack.DaZM10cp.d.cts} +8 -8
- package/dist/shared/{stack.CgWzG5jH.d.ts → stack.DgKOwl20.d.ts} +22 -22
- package/dist/shared/{stack.DTDxgFj8.d.mts → stack.FVWf2JhZ.d.mts} +12 -12
- package/dist/shared/{stack.Dk5r4W1F.d.mts → stack.cfCkioTe.d.mts} +8 -8
- package/dist/shared/{stack.6fUOjLs9.d.mts → stack.dH7u-TJH.d.mts} +4 -4
- package/dist/shared/{stack.DASmUVjX.d.ts → stack.sO33ZDhK.d.ts} +1 -1
- package/dist/shared/{stack.D3GB6wKv.d.cts → stack.uWSqCWAb.d.cts} +22 -22
- package/package.json +1 -1
- package/src/plugins/ai-chat/api/plugin.ts +48 -63
- package/src/plugins/ai-chat/client/plugin.tsx +23 -31
- package/src/plugins/blog/api/plugin.ts +31 -47
- package/src/plugins/blog/client/plugin.tsx +36 -39
- package/src/plugins/client/index.ts +5 -1
- package/src/plugins/cms/api/plugin.ts +14 -17
- package/src/plugins/cms/client/plugin.tsx +18 -21
- package/src/plugins/cms/types.ts +7 -7
- package/src/plugins/form-builder/api/plugin.ts +64 -64
- package/src/plugins/form-builder/client/plugin.tsx +19 -18
- package/src/plugins/form-builder/types.ts +19 -24
- package/src/plugins/kanban/api/plugin.ts +111 -136
- package/src/plugins/kanban/client/plugin.tsx +35 -41
- package/src/plugins/open-api/api/generator.ts +3 -1
- package/src/plugins/ui-builder/client/plugin.tsx +11 -10
- package/src/plugins/ui-builder/types.ts +4 -4
- package/src/plugins/utils.ts +92 -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/jsx-runtime/jsx-runtime.cjs +0 -0
- /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.
|
|
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<
|
|
110
|
+
) => Promise<void> | void;
|
|
110
111
|
/**
|
|
111
|
-
* Called before creating a board.
|
|
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<
|
|
117
|
+
) => Promise<void> | void;
|
|
117
118
|
/**
|
|
118
|
-
* Called before reading a single board.
|
|
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<
|
|
124
|
+
) => Promise<void> | void;
|
|
124
125
|
/**
|
|
125
|
-
* Called before updating a board.
|
|
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<
|
|
132
|
+
) => Promise<void> | void;
|
|
132
133
|
/**
|
|
133
|
-
* Called before deleting a board.
|
|
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<
|
|
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.
|
|
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<
|
|
223
|
+
) => Promise<void> | void;
|
|
223
224
|
/**
|
|
224
|
-
* Called before updating a column.
|
|
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<
|
|
231
|
+
) => Promise<void> | void;
|
|
231
232
|
/**
|
|
232
|
-
* Called before deleting a column.
|
|
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<
|
|
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.
|
|
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<
|
|
269
|
+
) => Promise<void> | void;
|
|
269
270
|
/**
|
|
270
|
-
* Called before updating a task.
|
|
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<
|
|
277
|
+
) => Promise<void> | void;
|
|
277
278
|
/**
|
|
278
|
-
* Called before deleting a task.
|
|
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<
|
|
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
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
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
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
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
|
-
|
|
427
|
-
ctx.body,
|
|
428
|
-
|
|
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
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
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
|
-
|
|
599
|
-
ctx.params.id,
|
|
600
|
-
|
|
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
|
-
|
|
645
|
-
ctx.body,
|
|
646
|
-
|
|
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
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
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
|
-
|
|
769
|
-
ctx.params.id,
|
|
770
|
-
|
|
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
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
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
|
-
|
|
873
|
-
ctx.body,
|
|
874
|
-
|
|
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
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
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
|
-
|
|
1004
|
-
ctx.params.id,
|
|
1005
|
-
|
|
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
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
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
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
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.
|
|
90
|
+
* Called before loading boards list. Throw an error to cancel loading.
|
|
90
91
|
*/
|
|
91
|
-
beforeLoadBoards?: (context: LoaderContext) => Promise<
|
|
92
|
+
beforeLoadBoards?: (context: LoaderContext) => Promise<void> | void;
|
|
92
93
|
/**
|
|
93
|
-
* Called after boards are loaded.
|
|
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<
|
|
99
|
+
) => Promise<void> | void;
|
|
99
100
|
/**
|
|
100
|
-
* Called before loading a single board.
|
|
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<
|
|
106
|
+
) => Promise<void> | void;
|
|
106
107
|
/**
|
|
107
|
-
* Called after a board is loaded.
|
|
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<
|
|
114
|
+
) => Promise<void> | void;
|
|
114
115
|
/**
|
|
115
|
-
* Called before loading the new board page.
|
|
116
|
+
* Called before loading the new board page. Throw an error to cancel.
|
|
116
117
|
*/
|
|
117
|
-
beforeLoadNewBoard?: (context: LoaderContext) => Promise<
|
|
118
|
+
beforeLoadNewBoard?: (context: LoaderContext) => Promise<void> | void;
|
|
118
119
|
/**
|
|
119
|
-
* Called after the new board page is loaded.
|
|
120
|
+
* Called after the new board page is loaded. Throw an error to cancel.
|
|
120
121
|
*/
|
|
121
|
-
afterLoadNewBoard?: (context: LoaderContext) => Promise<
|
|
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
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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
|
-
|
|
165
|
-
boards || null,
|
|
166
|
-
|
|
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
|
-
|
|
214
|
-
|
|
215
|
-
|
|
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
|
-
|
|
233
|
-
board || null,
|
|
234
|
-
|
|
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
|
-
|
|
282
|
-
|
|
283
|
-
|
|
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
|
-
|
|
289
|
-
|
|
290
|
-
|
|
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
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
-
|
|
165
|
-
|
|
166
|
-
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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.
|
|
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<
|
|
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.
|
|
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<
|
|
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)
|