@btst/stack 2.0.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.cjs +9 -1
- package/dist/api/index.d.cts +4 -4
- package/dist/api/index.d.mts +4 -4
- package/dist/api/index.d.ts +4 -4
- package/dist/api/index.mjs +9 -1
- package/dist/client/index.d.cts +2 -2
- package/dist/client/index.d.mts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/UI.cjs +2 -2
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/UI.mjs +2 -2
- package/dist/packages/stack/src/plugins/ai-chat/api/getters.cjs +42 -0
- package/dist/packages/stack/src/plugins/ai-chat/api/getters.mjs +39 -0
- package/dist/packages/stack/src/plugins/ai-chat/api/plugin.cjs +5 -0
- package/dist/packages/stack/src/plugins/ai-chat/api/plugin.mjs +5 -0
- package/dist/packages/stack/src/plugins/blog/api/getters.cjs +131 -0
- package/dist/packages/stack/src/plugins/blog/api/getters.mjs +127 -0
- package/dist/packages/stack/src/plugins/blog/api/plugin.cjs +9 -107
- package/dist/packages/stack/src/plugins/blog/api/plugin.mjs +9 -107
- package/dist/packages/stack/src/plugins/blog/client/plugin.cjs +1 -1
- package/dist/packages/stack/src/plugins/blog/client/plugin.mjs +1 -1
- package/dist/packages/stack/src/plugins/cms/api/getters.cjs +146 -0
- package/dist/packages/stack/src/plugins/cms/api/getters.mjs +138 -0
- package/dist/packages/stack/src/plugins/cms/api/plugin.cjs +560 -622
- package/dist/packages/stack/src/plugins/cms/api/plugin.mjs +559 -621
- package/dist/packages/stack/src/plugins/cms/client/components/pages/content-editor-page.internal.cjs +1 -1
- package/dist/packages/stack/src/plugins/cms/client/components/pages/content-editor-page.internal.mjs +1 -1
- package/dist/packages/stack/src/plugins/cms/client/hooks/cms-hooks.cjs +6 -3
- package/dist/packages/stack/src/plugins/cms/client/hooks/cms-hooks.mjs +6 -3
- package/dist/packages/stack/src/plugins/form-builder/api/getters.cjs +111 -0
- package/dist/packages/stack/src/plugins/form-builder/api/getters.mjs +104 -0
- package/dist/packages/stack/src/plugins/form-builder/api/plugin.cjs +16 -88
- package/dist/packages/stack/src/plugins/form-builder/api/plugin.mjs +12 -84
- package/dist/packages/stack/src/plugins/form-builder/client/components/pages/submissions-page.internal.cjs +1 -1
- package/dist/packages/stack/src/plugins/form-builder/client/components/pages/submissions-page.internal.mjs +1 -1
- package/dist/packages/stack/src/plugins/kanban/api/getters.cjs +84 -0
- package/dist/packages/stack/src/plugins/kanban/api/getters.mjs +81 -0
- package/dist/packages/stack/src/plugins/kanban/api/plugin.cjs +9 -123
- package/dist/packages/stack/src/plugins/kanban/api/plugin.mjs +9 -123
- package/dist/packages/stack/src/plugins/kanban/client/plugin.cjs +1 -1
- package/dist/packages/stack/src/plugins/kanban/client/plugin.mjs +1 -1
- package/dist/packages/ui/src/components/calendar.cjs +2 -2
- package/dist/packages/ui/src/components/calendar.mjs +2 -2
- package/dist/packages/ui/src/components/sonner.cjs +34 -0
- package/dist/packages/ui/src/components/sonner.mjs +32 -0
- package/dist/packages/ui/src/components/ui-builder/components/code-panel.cjs +3 -2
- package/dist/packages/ui/src/components/ui-builder/components/code-panel.mjs +3 -2
- package/dist/packages/ui/src/components/ui-builder/index.cjs +10 -4
- package/dist/packages/ui/src/components/ui-builder/index.mjs +10 -4
- package/dist/packages/ui/src/components/ui-builder/internal/components/element-selector.cjs +22 -23
- package/dist/packages/ui/src/components/ui-builder/internal/components/element-selector.mjs +22 -23
- package/dist/packages/ui/src/components/ui-builder/internal/components/layer-context-menu-portal.cjs +261 -0
- package/dist/packages/ui/src/components/ui-builder/internal/components/layer-context-menu-portal.mjs +255 -0
- package/dist/packages/ui/src/components/ui-builder/internal/components/layer-context-menu.cjs +125 -0
- package/dist/packages/ui/src/components/ui-builder/internal/components/layer-context-menu.mjs +119 -0
- package/dist/packages/ui/src/components/ui-builder/internal/components/layer-menu.cjs +6 -17
- package/dist/packages/ui/src/components/ui-builder/internal/components/layer-menu.mjs +7 -18
- package/dist/packages/ui/src/components/ui-builder/internal/components/nav.cjs +23 -18
- package/dist/packages/ui/src/components/ui-builder/internal/components/nav.mjs +23 -18
- package/dist/packages/ui/src/components/ui-builder/internal/components/tree-row-node.cjs +8 -23
- package/dist/packages/ui/src/components/ui-builder/internal/components/tree-row-node.mjs +9 -24
- package/dist/packages/ui/src/components/ui-builder/internal/editor-panel.cjs +9 -41
- package/dist/packages/ui/src/components/ui-builder/internal/editor-panel.mjs +9 -41
- package/dist/packages/ui/src/components/ui-builder/internal/layers-panel.cjs +7 -16
- package/dist/packages/ui/src/components/ui-builder/internal/layers-panel.mjs +7 -16
- package/dist/packages/ui/src/components/ui-builder/internal/utils/render-utils.cjs +16 -11
- package/dist/packages/ui/src/components/ui-builder/internal/utils/render-utils.mjs +16 -11
- package/dist/packages/ui/src/components/ui-builder/internal/utils/templates.cjs +260 -20
- package/dist/packages/ui/src/components/ui-builder/internal/utils/templates.mjs +260 -20
- package/dist/packages/ui/src/components/ui-builder/internal/variables-panel.cjs +105 -17
- package/dist/packages/ui/src/components/ui-builder/internal/variables-panel.mjs +107 -19
- package/dist/packages/ui/src/components/ui-builder/layer-renderer.cjs +4 -2
- package/dist/packages/ui/src/components/ui-builder/layer-renderer.mjs +4 -2
- package/dist/packages/ui/src/hooks/use-keyboard-shortcuts.cjs +3 -1
- package/dist/packages/ui/src/hooks/use-keyboard-shortcuts.mjs +3 -1
- package/dist/packages/ui/src/lib/ui-builder/hooks/use-layer-actions.cjs +107 -0
- package/dist/packages/ui/src/lib/ui-builder/hooks/use-layer-actions.mjs +105 -0
- package/dist/packages/ui/src/lib/ui-builder/registry/form-field-overrides.cjs +9 -7
- package/dist/packages/ui/src/lib/ui-builder/registry/form-field-overrides.mjs +9 -7
- package/dist/packages/ui/src/lib/ui-builder/shortcuts/shortcut-registry.cjs +71 -0
- package/dist/packages/ui/src/lib/ui-builder/shortcuts/shortcut-registry.mjs +68 -0
- package/dist/packages/ui/src/lib/ui-builder/store/editor-store.cjs +48 -3
- package/dist/packages/ui/src/lib/ui-builder/store/editor-store.mjs +48 -3
- package/dist/packages/ui/src/lib/ui-builder/store/layer-store.cjs +4 -1
- package/dist/packages/ui/src/lib/ui-builder/store/layer-store.mjs +4 -1
- package/dist/packages/ui/src/lib/ui-builder/store/schema-utils.cjs +8 -0
- package/dist/packages/ui/src/lib/ui-builder/store/schema-utils.mjs +8 -1
- package/dist/packages/ui/src/lib/ui-builder/utils/paste-validation.cjs +25 -0
- package/dist/packages/ui/src/lib/ui-builder/utils/paste-validation.mjs +23 -0
- package/dist/packages/ui/src/lib/ui-builder/utils/variable-resolver.cjs +42 -3
- package/dist/packages/ui/src/lib/ui-builder/utils/variable-resolver.mjs +42 -3
- package/dist/plugins/ai-chat/api/index.cjs +3 -0
- package/dist/plugins/ai-chat/api/index.d.cts +27 -4
- package/dist/plugins/ai-chat/api/index.d.mts +27 -4
- package/dist/plugins/ai-chat/api/index.d.ts +27 -4
- package/dist/plugins/ai-chat/api/index.mjs +1 -0
- package/dist/plugins/ai-chat/client/hooks/index.d.cts +2 -2
- package/dist/plugins/ai-chat/client/hooks/index.d.mts +2 -2
- package/dist/plugins/ai-chat/client/hooks/index.d.ts +2 -2
- package/dist/plugins/ai-chat/query-keys.d.cts +9 -284
- package/dist/plugins/ai-chat/query-keys.d.mts +9 -284
- package/dist/plugins/ai-chat/query-keys.d.ts +9 -284
- package/dist/plugins/api/index.d.cts +4 -3
- package/dist/plugins/api/index.d.mts +4 -3
- package/dist/plugins/api/index.d.ts +4 -3
- package/dist/plugins/blog/api/index.cjs +4 -0
- package/dist/plugins/blog/api/index.d.cts +3 -2
- package/dist/plugins/blog/api/index.d.mts +3 -2
- package/dist/plugins/blog/api/index.d.ts +3 -2
- package/dist/plugins/blog/api/index.mjs +1 -0
- package/dist/plugins/blog/client/hooks/index.d.cts +6 -6
- package/dist/plugins/blog/client/hooks/index.d.mts +6 -6
- package/dist/plugins/blog/client/hooks/index.d.ts +6 -6
- package/dist/plugins/blog/client/index.d.cts +1 -1
- package/dist/plugins/blog/client/index.d.mts +1 -1
- package/dist/plugins/blog/client/index.d.ts +1 -1
- package/dist/plugins/blog/query-keys.cjs +7 -4
- package/dist/plugins/blog/query-keys.d.cts +81 -27
- package/dist/plugins/blog/query-keys.d.mts +81 -27
- package/dist/plugins/blog/query-keys.d.ts +81 -27
- package/dist/plugins/blog/query-keys.mjs +7 -4
- package/dist/plugins/client/index.d.cts +2 -2
- package/dist/plugins/client/index.d.mts +2 -2
- package/dist/plugins/client/index.d.ts +2 -2
- package/dist/plugins/cms/api/index.cjs +4 -0
- package/dist/plugins/cms/api/index.d.cts +61 -5
- package/dist/plugins/cms/api/index.d.mts +61 -5
- package/dist/plugins/cms/api/index.d.ts +61 -5
- package/dist/plugins/cms/api/index.mjs +1 -0
- 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/query-keys.d.cts +2 -1
- package/dist/plugins/cms/query-keys.d.mts +2 -1
- package/dist/plugins/cms/query-keys.d.ts +2 -1
- package/dist/plugins/form-builder/api/index.cjs +4 -0
- package/dist/plugins/form-builder/api/index.d.cts +77 -7
- package/dist/plugins/form-builder/api/index.d.mts +77 -7
- package/dist/plugins/form-builder/api/index.d.ts +77 -7
- package/dist/plugins/form-builder/api/index.mjs +1 -0
- 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/query-keys.d.cts +2 -1
- package/dist/plugins/form-builder/query-keys.d.mts +2 -1
- package/dist/plugins/form-builder/query-keys.d.ts +2 -1
- package/dist/plugins/kanban/api/index.cjs +3 -0
- package/dist/plugins/kanban/api/index.d.cts +49 -52
- package/dist/plugins/kanban/api/index.d.mts +49 -52
- package/dist/plugins/kanban/api/index.d.ts +49 -52
- package/dist/plugins/kanban/api/index.mjs +1 -0
- package/dist/plugins/kanban/client/components/index.d.cts +1 -1
- package/dist/plugins/kanban/client/components/index.d.mts +1 -1
- package/dist/plugins/kanban/client/components/index.d.ts +1 -1
- package/dist/plugins/kanban/client/hooks/index.d.cts +1 -1
- package/dist/plugins/kanban/client/hooks/index.d.mts +1 -1
- package/dist/plugins/kanban/client/hooks/index.d.ts +1 -1
- package/dist/plugins/kanban/client/index.d.cts +1 -1
- package/dist/plugins/kanban/client/index.d.mts +1 -1
- package/dist/plugins/kanban/client/index.d.ts +1 -1
- package/dist/plugins/kanban/query-keys.cjs +4 -3
- package/dist/plugins/kanban/query-keys.d.cts +2 -1
- package/dist/plugins/kanban/query-keys.d.mts +2 -1
- package/dist/plugins/kanban/query-keys.d.ts +2 -1
- package/dist/plugins/kanban/query-keys.mjs +4 -3
- package/dist/plugins/open-api/api/index.d.cts +2 -2
- package/dist/plugins/open-api/api/index.d.mts +2 -2
- package/dist/plugins/open-api/api/index.d.ts +2 -2
- package/dist/plugins/route-docs/client/index.d.cts +1 -1
- package/dist/plugins/route-docs/client/index.d.mts +1 -1
- package/dist/plugins/route-docs/client/index.d.ts +1 -1
- package/dist/plugins/ui-builder/client/components/index.d.cts +1 -1
- package/dist/plugins/ui-builder/client/components/index.d.mts +1 -1
- package/dist/plugins/ui-builder/client/components/index.d.ts +1 -1
- package/dist/plugins/ui-builder/client/hooks/index.d.cts +2 -2
- package/dist/plugins/ui-builder/client/hooks/index.d.mts +2 -2
- package/dist/plugins/ui-builder/client/hooks/index.d.ts +2 -2
- package/dist/plugins/ui-builder/client/index.d.cts +16 -6
- package/dist/plugins/ui-builder/client/index.d.mts +16 -6
- package/dist/plugins/ui-builder/client/index.d.ts +16 -6
- package/dist/plugins/ui-builder/index.d.cts +3 -3
- package/dist/plugins/ui-builder/index.d.mts +3 -3
- package/dist/plugins/ui-builder/index.d.ts +3 -3
- package/dist/shared/{stack.DYCFcnkL.d.mts → stack.6fUOjLs9.d.mts} +1 -1
- package/dist/shared/{stack.BoA0xkJv.d.mts → stack.7n9Y_u7N.d.cts} +33 -7
- package/dist/shared/{stack.BoA0xkJv.d.cts → stack.7n9Y_u7N.d.mts} +33 -7
- package/dist/shared/{stack.BoA0xkJv.d.ts → stack.7n9Y_u7N.d.ts} +33 -7
- package/dist/shared/{stack.BdJFrdyt.d.cts → stack.B-YHz18S.d.cts} +2 -2
- package/dist/shared/stack.BeSm90va.d.ts +289 -0
- package/dist/shared/{stack.kFbDspnF.d.ts → stack.C-Ptrz8s.d.ts} +1 -1
- package/dist/shared/{stack.BYysGdHl.d.cts → stack.C-WUPMT6.d.cts} +1 -1
- package/dist/shared/{stack.DzH_wcvr.d.cts → stack.CIrIsc-A.d.cts} +2 -2
- package/dist/shared/{stack.DzH_wcvr.d.mts → stack.CIrIsc-A.d.mts} +2 -2
- package/dist/shared/{stack.DzH_wcvr.d.ts → stack.CIrIsc-A.d.ts} +2 -2
- package/dist/shared/stack.CMh_EdxW.d.cts +289 -0
- package/dist/shared/{stack.BsXokfNh.d.cts → stack.CXjzTMsb.d.cts} +1 -1
- package/dist/shared/{stack.BsXokfNh.d.mts → stack.CXjzTMsb.d.mts} +1 -1
- package/dist/shared/{stack.BsXokfNh.d.ts → stack.CXjzTMsb.d.ts} +1 -1
- package/dist/shared/{stack.ChVuHi5e.d.mts → stack.D1DMlJp-.d.mts} +2 -2
- package/dist/shared/stack.Dg09R0oB.d.mts +289 -0
- package/dist/shared/{stack.EhM4pmtN.d.ts → stack.GygI_T3X.d.ts} +2 -2
- package/dist/shared/{stack.DKDMI-QO.d.mts → stack.QD1y_7NY.d.cts} +7 -1
- package/dist/shared/{stack.DKDMI-QO.d.ts → stack.QD1y_7NY.d.mts} +7 -1
- package/dist/shared/{stack.DKDMI-QO.d.cts → stack.QD1y_7NY.d.ts} +7 -1
- package/package.json +1 -1
- package/src/__tests__/stack-api.test.ts +118 -0
- package/src/api/index.ts +15 -1
- package/src/plugins/ai-chat/__tests__/getters.test.ts +109 -0
- package/src/plugins/ai-chat/api/getters.ts +71 -0
- package/src/plugins/ai-chat/api/index.ts +1 -0
- package/src/plugins/ai-chat/api/plugin.ts +8 -0
- package/src/plugins/api/index.ts +3 -1
- package/src/plugins/blog/__tests__/getters.test.ts +540 -0
- package/src/plugins/blog/api/getters.ts +243 -0
- package/src/plugins/blog/api/index.ts +7 -0
- package/src/plugins/blog/api/plugin.ts +13 -141
- package/src/plugins/blog/client/plugin.tsx +2 -1
- package/src/plugins/blog/query-keys.ts +16 -13
- package/src/plugins/cms/__tests__/getters.test.ts +206 -0
- package/src/plugins/cms/api/getters.ts +244 -0
- package/src/plugins/cms/api/index.ts +5 -0
- package/src/plugins/cms/api/plugin.ts +50 -154
- package/src/plugins/cms/client/components/pages/content-editor-page.internal.tsx +1 -1
- package/src/plugins/cms/client/hooks/cms-hooks.tsx +3 -0
- package/src/plugins/cms/types.ts +1 -1
- package/src/plugins/form-builder/__tests__/getters.test.ts +159 -0
- package/src/plugins/form-builder/api/getters.ts +203 -0
- package/src/plugins/form-builder/api/index.ts +1 -0
- package/src/plugins/form-builder/api/plugin.ts +22 -115
- package/src/plugins/form-builder/client/components/pages/submissions-page.internal.tsx +1 -1
- package/src/plugins/form-builder/types.ts +2 -2
- package/src/plugins/kanban/__tests__/getters.test.ts +172 -0
- package/src/plugins/kanban/api/getters.ts +149 -0
- package/src/plugins/kanban/api/index.ts +1 -0
- package/src/plugins/kanban/api/plugin.ts +16 -146
- package/src/plugins/kanban/client/plugin.tsx +2 -1
- package/src/plugins/kanban/query-keys.ts +8 -5
- package/src/types.ts +44 -5
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/DayPicker.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/DayPicker.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/classes/CalendarDay.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/classes/CalendarDay.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/classes/DateLib.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/classes/DateLib.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Button.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Button.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/CaptionLabel.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/CaptionLabel.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Chevron.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Chevron.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Day.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Day.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/DayButton.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/DayButton.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Dropdown.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Dropdown.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/DropdownNav.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/DropdownNav.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Footer.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Footer.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Month.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Month.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/MonthCaption.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/MonthCaption.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/MonthGrid.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/MonthGrid.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Months.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Months.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Nav.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Nav.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/NextMonthButton.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/NextMonthButton.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Option.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Option.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Root.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Root.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Select.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Select.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Week.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Week.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/WeekNumber.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/WeekNumber.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Weekday.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Weekday.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Weekdays.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Weekdays.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Weeks.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/Weeks.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/YearsDropdown.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/YearsDropdown.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/custom-components.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/components/custom-components.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatCaption.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatCaption.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatDay.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatDay.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/index.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/formatters/index.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getComponents.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getComponents.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDates.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDates.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDays.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDays.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getFormatters.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getFormatters.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getLabels.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getLabels.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getMonths.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getMonths.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getWeeks.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getWeeks.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/index.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/index.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelDayButton.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelDayButton.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelGrid.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelGrid.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelGridcell.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelGridcell.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelNav.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelNav.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelNext.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelNext.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelPrevious.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelPrevious.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelWeekday.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelWeekday.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/locale/en-US.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/locale/en-US.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/noonDateLib.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/noonDateLib.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/selection/useMulti.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/selection/useMulti.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/selection/useRange.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/selection/useRange.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/selection/useSingle.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/selection/useSingle.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/useAnimation.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/useAnimation.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/useCalendar.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/useCalendar.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/useDayPicker.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/useDayPicker.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/useFocus.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/useFocus.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/useSelection.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/useSelection.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/addToRange.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/addToRange.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/toTimeZone.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/toTimeZone.mjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/typeguards.cjs +0 -0
- package/dist/node_modules/.pnpm/{react-day-picker@9.13.0_react@19.2.0 → react-day-picker@9.13.2_react@19.2.0}/node_modules/react-day-picker/dist/esm/utils/typeguards.mjs +0 -0
- package/dist/shared/{stack.CcI4sYJP.d.ts → stack.BkYlUT_8.d.cts} +6 -6
- package/dist/shared/{stack.CcI4sYJP.d.cts → stack.BkYlUT_8.d.mts} +6 -6
- package/dist/shared/{stack.CcI4sYJP.d.mts → stack.BkYlUT_8.d.ts} +6 -6
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
+
import { createApiClient } from '@btst/stack/plugins/client';
|
|
3
|
+
import { M as Message, C as Conversation, S as SerializedConversation, a as SerializedMessage } from './stack.Be1QIHEn.mjs';
|
|
4
|
+
import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
|
|
5
|
+
import * as better_call from 'better-call';
|
|
6
|
+
import * as zod_v4_core from 'zod/v4/core';
|
|
7
|
+
import * as zod from 'zod';
|
|
8
|
+
import { LanguageModel, Tool } from 'ai';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Context passed to AI Chat API hooks
|
|
12
|
+
*/
|
|
13
|
+
interface ChatApiContext<TBody = any, TParams = any, TQuery = any> {
|
|
14
|
+
body?: TBody;
|
|
15
|
+
params?: TParams;
|
|
16
|
+
query?: TQuery;
|
|
17
|
+
request?: Request;
|
|
18
|
+
headers?: Headers;
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Configuration hooks for AI Chat backend plugin
|
|
23
|
+
* All hooks are optional and allow consumers to customize behavior
|
|
24
|
+
*/
|
|
25
|
+
interface AiChatBackendHooks {
|
|
26
|
+
/**
|
|
27
|
+
* Called before processing a chat message. Return false to deny access.
|
|
28
|
+
* @param messages - Array of messages being sent
|
|
29
|
+
* @param context - Request context with headers, etc.
|
|
30
|
+
*/
|
|
31
|
+
onBeforeChat?: (messages: Array<{
|
|
32
|
+
role: string;
|
|
33
|
+
content: string;
|
|
34
|
+
}>, context: ChatApiContext) => Promise<boolean> | boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Called before listing conversations. Return false to deny access.
|
|
37
|
+
* @param context - Request context with headers, etc.
|
|
38
|
+
*/
|
|
39
|
+
onBeforeListConversations?: (context: ChatApiContext) => Promise<boolean> | boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Called before getting a single conversation. Return false to deny access.
|
|
42
|
+
* @param conversationId - ID of the conversation being accessed
|
|
43
|
+
* @param context - Request context with headers, etc.
|
|
44
|
+
*/
|
|
45
|
+
onBeforeGetConversation?: (conversationId: string, context: ChatApiContext) => Promise<boolean> | boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Called before creating a conversation. Return false to deny access.
|
|
48
|
+
* @param data - Conversation data being created
|
|
49
|
+
* @param context - Request context with headers, etc.
|
|
50
|
+
*/
|
|
51
|
+
onBeforeCreateConversation?: (data: {
|
|
52
|
+
id?: string;
|
|
53
|
+
title?: string;
|
|
54
|
+
}, context: ChatApiContext) => Promise<boolean> | boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Called before updating a conversation. Return false to deny access.
|
|
57
|
+
* @param conversationId - ID of the conversation being updated
|
|
58
|
+
* @param data - Updated conversation data
|
|
59
|
+
* @param context - Request context with headers, etc.
|
|
60
|
+
*/
|
|
61
|
+
onBeforeUpdateConversation?: (conversationId: string, data: {
|
|
62
|
+
title?: string;
|
|
63
|
+
}, context: ChatApiContext) => Promise<boolean> | boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Called before deleting a conversation. Return false to deny access.
|
|
66
|
+
* @param conversationId - ID of the conversation being deleted
|
|
67
|
+
* @param context - Request context with headers, etc.
|
|
68
|
+
*/
|
|
69
|
+
onBeforeDeleteConversation?: (conversationId: string, context: ChatApiContext) => Promise<boolean> | boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Called after a chat message is processed successfully
|
|
72
|
+
* @param conversationId - ID of the conversation
|
|
73
|
+
* @param messages - Array of messages in the conversation
|
|
74
|
+
* @param context - Request context
|
|
75
|
+
*/
|
|
76
|
+
onAfterChat?: (conversationId: string, messages: Message[], context: ChatApiContext) => Promise<void> | void;
|
|
77
|
+
/**
|
|
78
|
+
* Called after conversations are read successfully
|
|
79
|
+
* @param conversations - Array of conversations that were read
|
|
80
|
+
* @param context - Request context
|
|
81
|
+
*/
|
|
82
|
+
onConversationsRead?: (conversations: Conversation[], context: ChatApiContext) => Promise<void> | void;
|
|
83
|
+
/**
|
|
84
|
+
* Called after a single conversation is read successfully
|
|
85
|
+
* @param conversation - The conversation with messages
|
|
86
|
+
* @param context - Request context
|
|
87
|
+
*/
|
|
88
|
+
onConversationRead?: (conversation: Conversation & {
|
|
89
|
+
messages: Message[];
|
|
90
|
+
}, context: ChatApiContext) => Promise<void> | void;
|
|
91
|
+
/**
|
|
92
|
+
* Called after a conversation is created successfully
|
|
93
|
+
* @param conversation - The created conversation
|
|
94
|
+
* @param context - Request context
|
|
95
|
+
*/
|
|
96
|
+
onConversationCreated?: (conversation: Conversation, context: ChatApiContext) => Promise<void> | void;
|
|
97
|
+
/**
|
|
98
|
+
* Called after a conversation is updated successfully
|
|
99
|
+
* @param conversation - The updated conversation
|
|
100
|
+
* @param context - Request context
|
|
101
|
+
*/
|
|
102
|
+
onConversationUpdated?: (conversation: Conversation, context: ChatApiContext) => Promise<void> | void;
|
|
103
|
+
/**
|
|
104
|
+
* Called after a conversation is deleted successfully
|
|
105
|
+
* @param conversationId - ID of the deleted conversation
|
|
106
|
+
* @param context - Request context
|
|
107
|
+
*/
|
|
108
|
+
onConversationDeleted?: (conversationId: string, context: ChatApiContext) => Promise<void> | void;
|
|
109
|
+
/**
|
|
110
|
+
* Called when a chat operation fails
|
|
111
|
+
* @param error - The error that occurred
|
|
112
|
+
* @param context - Request context
|
|
113
|
+
*/
|
|
114
|
+
onChatError?: (error: Error, context: ChatApiContext) => Promise<void> | void;
|
|
115
|
+
/**
|
|
116
|
+
* Called when listing conversations fails
|
|
117
|
+
* @param error - The error that occurred
|
|
118
|
+
* @param context - Request context
|
|
119
|
+
*/
|
|
120
|
+
onListConversationsError?: (error: Error, context: ChatApiContext) => Promise<void> | void;
|
|
121
|
+
/**
|
|
122
|
+
* Called when getting a conversation fails
|
|
123
|
+
* @param error - The error that occurred
|
|
124
|
+
* @param context - Request context
|
|
125
|
+
*/
|
|
126
|
+
onGetConversationError?: (error: Error, context: ChatApiContext) => Promise<void> | void;
|
|
127
|
+
/**
|
|
128
|
+
* Called when creating a conversation fails
|
|
129
|
+
* @param error - The error that occurred
|
|
130
|
+
* @param context - Request context
|
|
131
|
+
*/
|
|
132
|
+
onCreateConversationError?: (error: Error, context: ChatApiContext) => Promise<void> | void;
|
|
133
|
+
/**
|
|
134
|
+
* Called when updating a conversation fails
|
|
135
|
+
* @param error - The error that occurred
|
|
136
|
+
* @param context - Request context
|
|
137
|
+
*/
|
|
138
|
+
onUpdateConversationError?: (error: Error, context: ChatApiContext) => Promise<void> | void;
|
|
139
|
+
/**
|
|
140
|
+
* Called when deleting a conversation fails
|
|
141
|
+
* @param error - The error that occurred
|
|
142
|
+
* @param context - Request context
|
|
143
|
+
*/
|
|
144
|
+
onDeleteConversationError?: (error: Error, context: ChatApiContext) => Promise<void> | void;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Plugin mode for AI Chat
|
|
148
|
+
* - 'authenticated': Conversations persisted with userId (default)
|
|
149
|
+
* - 'public': Stateless chat, no persistence (ideal for public chatbots)
|
|
150
|
+
*/
|
|
151
|
+
type AiChatMode = "authenticated" | "public";
|
|
152
|
+
/**
|
|
153
|
+
* Configuration for AI Chat backend plugin
|
|
154
|
+
*/
|
|
155
|
+
interface AiChatBackendConfig {
|
|
156
|
+
/**
|
|
157
|
+
* The language model to use for chat completions.
|
|
158
|
+
* Supports any model from AI SDK providers (OpenAI, Anthropic, Google, etc.)
|
|
159
|
+
*/
|
|
160
|
+
model: LanguageModel;
|
|
161
|
+
/**
|
|
162
|
+
* Plugin mode:
|
|
163
|
+
* - 'authenticated': Conversations persisted with userId (requires getUserId)
|
|
164
|
+
* - 'public': Stateless chat, no persistence (ideal for public chatbots)
|
|
165
|
+
* @default 'authenticated'
|
|
166
|
+
*/
|
|
167
|
+
mode?: AiChatMode;
|
|
168
|
+
/**
|
|
169
|
+
* Extract userId from request context (authenticated mode only).
|
|
170
|
+
* Return null/undefined to deny access in authenticated mode.
|
|
171
|
+
* This function is called for all conversation operations.
|
|
172
|
+
* @example (ctx) => ctx.headers?.get('x-user-id')
|
|
173
|
+
*/
|
|
174
|
+
getUserId?: (context: ChatApiContext) => string | null | undefined | Promise<string | null | undefined>;
|
|
175
|
+
/**
|
|
176
|
+
* Optional system prompt to prepend to all conversations
|
|
177
|
+
*/
|
|
178
|
+
systemPrompt?: string;
|
|
179
|
+
/**
|
|
180
|
+
* Optional tools to make available to the model.
|
|
181
|
+
* Uses AI SDK v5 tool format.
|
|
182
|
+
* @see https://ai-sdk.dev/docs/ai-sdk-core/tools-and-tool-calling
|
|
183
|
+
*/
|
|
184
|
+
tools?: Record<string, Tool>;
|
|
185
|
+
/**
|
|
186
|
+
* Optional hooks for customizing plugin behavior
|
|
187
|
+
*/
|
|
188
|
+
hooks?: AiChatBackendHooks;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* AI Chat backend plugin
|
|
192
|
+
* Provides API endpoints for AI-powered chat with conversation history
|
|
193
|
+
* Uses AI SDK v5 for model interactions
|
|
194
|
+
*
|
|
195
|
+
* @param config - Configuration including model, tools, and optional hooks
|
|
196
|
+
*/
|
|
197
|
+
declare const aiChatBackendPlugin: (config: AiChatBackendConfig) => _btst_stack_plugins_api.BackendPlugin<{
|
|
198
|
+
chat: better_call.StrictEndpoint<"/chat", {
|
|
199
|
+
method: "POST";
|
|
200
|
+
body: zod.ZodObject<{
|
|
201
|
+
messages: zod.ZodArray<zod.ZodUnion<readonly [zod.ZodObject<{
|
|
202
|
+
role: zod.ZodEnum<{
|
|
203
|
+
system: "system";
|
|
204
|
+
user: "user";
|
|
205
|
+
assistant: "assistant";
|
|
206
|
+
data: "data";
|
|
207
|
+
}>;
|
|
208
|
+
content: zod.ZodString;
|
|
209
|
+
id: zod.ZodOptional<zod.ZodString>;
|
|
210
|
+
}, zod_v4_core.$strip>, zod.ZodObject<{
|
|
211
|
+
role: zod.ZodEnum<{
|
|
212
|
+
system: "system";
|
|
213
|
+
user: "user";
|
|
214
|
+
assistant: "assistant";
|
|
215
|
+
data: "data";
|
|
216
|
+
}>;
|
|
217
|
+
parts: zod.ZodArray<zod.ZodObject<{
|
|
218
|
+
type: zod.ZodString;
|
|
219
|
+
text: zod.ZodOptional<zod.ZodString>;
|
|
220
|
+
}, zod_v4_core.$loose>>;
|
|
221
|
+
id: zod.ZodOptional<zod.ZodString>;
|
|
222
|
+
metadata: zod.ZodOptional<zod.ZodAny>;
|
|
223
|
+
}, zod_v4_core.$strip>]>>;
|
|
224
|
+
conversationId: zod.ZodOptional<zod.ZodString>;
|
|
225
|
+
model: zod.ZodOptional<zod.ZodString>;
|
|
226
|
+
}, zod_v4_core.$strip>;
|
|
227
|
+
}, Response>;
|
|
228
|
+
createConversation: better_call.StrictEndpoint<"/chat/conversations", {
|
|
229
|
+
method: "POST";
|
|
230
|
+
body: zod.ZodObject<{
|
|
231
|
+
id: zod.ZodOptional<zod.ZodString>;
|
|
232
|
+
title: zod.ZodOptional<zod.ZodString>;
|
|
233
|
+
}, zod_v4_core.$strip>;
|
|
234
|
+
}, Conversation>;
|
|
235
|
+
listConversations: better_call.StrictEndpoint<"/chat/conversations", {
|
|
236
|
+
method: "GET";
|
|
237
|
+
}, Conversation[]>;
|
|
238
|
+
getConversation: better_call.StrictEndpoint<"/chat/conversations/:id", {
|
|
239
|
+
method: "GET";
|
|
240
|
+
}, Conversation & {
|
|
241
|
+
messages: Message[];
|
|
242
|
+
}>;
|
|
243
|
+
updateConversation: better_call.StrictEndpoint<"/chat/conversations/:id", {
|
|
244
|
+
method: "PUT";
|
|
245
|
+
body: zod.ZodObject<{
|
|
246
|
+
title: zod.ZodOptional<zod.ZodString>;
|
|
247
|
+
}, zod_v4_core.$strip>;
|
|
248
|
+
}, Conversation>;
|
|
249
|
+
deleteConversation: better_call.StrictEndpoint<"/chat/conversations/:id", {
|
|
250
|
+
method: "DELETE";
|
|
251
|
+
}, {
|
|
252
|
+
success: boolean;
|
|
253
|
+
}>;
|
|
254
|
+
}, {
|
|
255
|
+
getAllConversations: (userId?: string) => Promise<Conversation[]>;
|
|
256
|
+
getConversationById: (id: string) => Promise<(Conversation & {
|
|
257
|
+
messages: Message[];
|
|
258
|
+
}) | null>;
|
|
259
|
+
}>;
|
|
260
|
+
type AiChatApiRouter = ReturnType<ReturnType<typeof aiChatBackendPlugin>["routes"]>;
|
|
261
|
+
|
|
262
|
+
type ConversationWithMessages = SerializedConversation & {
|
|
263
|
+
messages: SerializedMessage[];
|
|
264
|
+
};
|
|
265
|
+
declare function createAiChatQueryKeys(client: ReturnType<typeof createApiClient<AiChatApiRouter>>, headers?: HeadersInit): {
|
|
266
|
+
conversations: {
|
|
267
|
+
_def: readonly ["conversations"];
|
|
268
|
+
} & {
|
|
269
|
+
list: (() => Omit<{
|
|
270
|
+
queryKey: readonly ["conversations", "list", string];
|
|
271
|
+
queryFn: _tanstack_react_query.QueryFunction<SerializedConversation[], readonly ["conversations", "list", string]>;
|
|
272
|
+
} & {
|
|
273
|
+
_def: readonly ["conversations", "list"];
|
|
274
|
+
}, "_def">) & {
|
|
275
|
+
_def: readonly ["conversations", "list"];
|
|
276
|
+
};
|
|
277
|
+
detail: ((id: string) => Omit<{
|
|
278
|
+
queryKey: readonly ["conversations", "detail", string];
|
|
279
|
+
queryFn: _tanstack_react_query.QueryFunction<ConversationWithMessages | null, readonly ["conversations", "detail", string]>;
|
|
280
|
+
} & {
|
|
281
|
+
_def: readonly ["conversations", "detail"];
|
|
282
|
+
}, "_def">) & {
|
|
283
|
+
_def: readonly ["conversations", "detail"];
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
export { createAiChatQueryKeys as c, aiChatBackendPlugin as d };
|
|
289
|
+
export type { AiChatBackendHooks as A, ChatApiContext as C, AiChatMode as a, AiChatBackendConfig as b, AiChatApiRouter as e, ConversationWithMessages as f };
|
|
@@ -11,8 +11,8 @@ interface ComponentLayer<TProps extends Record<string, PropValue> = Record<strin
|
|
|
11
11
|
props: ComponentProps<TProps>;
|
|
12
12
|
children: ComponentLayer[] | string | VariableReference;
|
|
13
13
|
}
|
|
14
|
-
type VariableValueType = 'string' | 'number' | 'boolean';
|
|
15
|
-
type VariableValue<T extends VariableValueType> = T extends 'string' ? string : T extends 'number' ? number : T extends 'boolean' ? boolean : never;
|
|
14
|
+
type VariableValueType = 'string' | 'number' | 'boolean' | 'function';
|
|
15
|
+
type VariableValue<T extends VariableValueType> = T extends 'string' ? string : T extends 'number' ? number : T extends 'boolean' ? boolean : T extends 'function' ? string : never;
|
|
16
16
|
interface Variable<T extends VariableValueType = VariableValueType> {
|
|
17
17
|
id: string;
|
|
18
18
|
name: string;
|
|
@@ -48,6 +48,12 @@ type Task = {
|
|
|
48
48
|
type ColumnWithTasks = Column & {
|
|
49
49
|
tasks: Task[];
|
|
50
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* Board with columns and tasks
|
|
53
|
+
*/
|
|
54
|
+
type BoardWithColumns = Board & {
|
|
55
|
+
columns: ColumnWithTasks[];
|
|
56
|
+
};
|
|
51
57
|
interface SerializedTask extends Omit<Task, "createdAt" | "updatedAt" | "completedAt"> {
|
|
52
58
|
completedAt?: string;
|
|
53
59
|
createdAt: string;
|
|
@@ -67,4 +73,4 @@ interface SerializedBoardWithColumns extends SerializedBoard {
|
|
|
67
73
|
columns: SerializedColumn[];
|
|
68
74
|
}
|
|
69
75
|
|
|
70
|
-
export type {
|
|
76
|
+
export type { BoardWithColumns as B, Column as C, Priority as P, SerializedBoardWithColumns as S, Task as T, SerializedBoard as a, SerializedColumn as b, SerializedTask as c, Board as d, ColumnWithTasks as e };
|
|
@@ -48,6 +48,12 @@ type Task = {
|
|
|
48
48
|
type ColumnWithTasks = Column & {
|
|
49
49
|
tasks: Task[];
|
|
50
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* Board with columns and tasks
|
|
53
|
+
*/
|
|
54
|
+
type BoardWithColumns = Board & {
|
|
55
|
+
columns: ColumnWithTasks[];
|
|
56
|
+
};
|
|
51
57
|
interface SerializedTask extends Omit<Task, "createdAt" | "updatedAt" | "completedAt"> {
|
|
52
58
|
completedAt?: string;
|
|
53
59
|
createdAt: string;
|
|
@@ -67,4 +73,4 @@ interface SerializedBoardWithColumns extends SerializedBoard {
|
|
|
67
73
|
columns: SerializedColumn[];
|
|
68
74
|
}
|
|
69
75
|
|
|
70
|
-
export type {
|
|
76
|
+
export type { BoardWithColumns as B, Column as C, Priority as P, SerializedBoardWithColumns as S, Task as T, SerializedBoard as a, SerializedColumn as b, SerializedTask as c, Board as d, ColumnWithTasks as e };
|
|
@@ -48,6 +48,12 @@ type Task = {
|
|
|
48
48
|
type ColumnWithTasks = Column & {
|
|
49
49
|
tasks: Task[];
|
|
50
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* Board with columns and tasks
|
|
53
|
+
*/
|
|
54
|
+
type BoardWithColumns = Board & {
|
|
55
|
+
columns: ColumnWithTasks[];
|
|
56
|
+
};
|
|
51
57
|
interface SerializedTask extends Omit<Task, "createdAt" | "updatedAt" | "completedAt"> {
|
|
52
58
|
completedAt?: string;
|
|
53
59
|
createdAt: string;
|
|
@@ -67,4 +73,4 @@ interface SerializedBoardWithColumns extends SerializedBoard {
|
|
|
67
73
|
columns: SerializedColumn[];
|
|
68
74
|
}
|
|
69
75
|
|
|
70
|
-
export type {
|
|
76
|
+
export type { BoardWithColumns as B, Column as C, Priority as P, SerializedBoardWithColumns as S, Task as T, SerializedBoard as a, SerializedColumn as b, SerializedTask as c, Board as d, ColumnWithTasks as e };
|
package/package.json
CHANGED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest";
|
|
2
|
+
import { stack } from "../api";
|
|
3
|
+
import { defineBackendPlugin } from "../plugins/api";
|
|
4
|
+
import { createDbPlugin } from "@btst/db";
|
|
5
|
+
import { createMemoryAdapter } from "@btst/adapter-memory";
|
|
6
|
+
import type { Adapter, DatabaseDefinition } from "@btst/db";
|
|
7
|
+
import { blogBackendPlugin } from "../plugins/blog/api";
|
|
8
|
+
import { kanbanBackendPlugin } from "../plugins/kanban/api";
|
|
9
|
+
|
|
10
|
+
const testAdapter = (db: DatabaseDefinition): Adapter =>
|
|
11
|
+
createMemoryAdapter(db)({});
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A minimal plugin with no `api` factory, to verify backward compatibility.
|
|
15
|
+
*/
|
|
16
|
+
const noApiPlugin = defineBackendPlugin({
|
|
17
|
+
name: "no-api",
|
|
18
|
+
dbPlugin: createDbPlugin("no-api", {}),
|
|
19
|
+
routes: () => ({}),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
describe("stack.api surface", () => {
|
|
23
|
+
it("exposes adapter on the returned backend", () => {
|
|
24
|
+
const backend = stack({
|
|
25
|
+
basePath: "/api",
|
|
26
|
+
plugins: { blog: blogBackendPlugin() },
|
|
27
|
+
adapter: testAdapter,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
expect(backend.adapter).toBeDefined();
|
|
31
|
+
expect(typeof backend.adapter.findMany).toBe("function");
|
|
32
|
+
expect(typeof backend.adapter.findOne).toBe("function");
|
|
33
|
+
expect(typeof backend.adapter.create).toBe("function");
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it("exposes typed api namespace for plugins with api factory", () => {
|
|
37
|
+
const backend = stack({
|
|
38
|
+
basePath: "/api",
|
|
39
|
+
plugins: { blog: blogBackendPlugin() },
|
|
40
|
+
adapter: testAdapter,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
expect(backend.api).toBeDefined();
|
|
44
|
+
expect(backend.api.blog).toBeDefined();
|
|
45
|
+
expect(typeof backend.api.blog.getAllPosts).toBe("function");
|
|
46
|
+
expect(typeof backend.api.blog.getPostBySlug).toBe("function");
|
|
47
|
+
expect(typeof backend.api.blog.getAllTags).toBe("function");
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it("exposes kanban api namespace", () => {
|
|
51
|
+
const backend = stack({
|
|
52
|
+
basePath: "/api",
|
|
53
|
+
plugins: { kanban: kanbanBackendPlugin() },
|
|
54
|
+
adapter: testAdapter,
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
expect(backend.api.kanban).toBeDefined();
|
|
58
|
+
expect(typeof backend.api.kanban.getAllBoards).toBe("function");
|
|
59
|
+
expect(typeof backend.api.kanban.getBoardById).toBe("function");
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it("plugins without api factory are not present in api", () => {
|
|
63
|
+
const backend = stack({
|
|
64
|
+
basePath: "/api",
|
|
65
|
+
plugins: { noApi: noApiPlugin },
|
|
66
|
+
adapter: testAdapter,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
expect((backend.api as any).noApi).toBeUndefined();
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it("api functions are bound to the shared adapter and return real data", async () => {
|
|
73
|
+
const backend = stack({
|
|
74
|
+
basePath: "/api",
|
|
75
|
+
plugins: { blog: blogBackendPlugin() },
|
|
76
|
+
adapter: testAdapter,
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
// Seed data via adapter directly
|
|
80
|
+
await backend.adapter.create({
|
|
81
|
+
model: "post",
|
|
82
|
+
data: {
|
|
83
|
+
title: "Hello World",
|
|
84
|
+
slug: "hello-world",
|
|
85
|
+
content: "Content",
|
|
86
|
+
excerpt: "",
|
|
87
|
+
published: true,
|
|
88
|
+
tags: [],
|
|
89
|
+
createdAt: new Date(),
|
|
90
|
+
updatedAt: new Date(),
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
// Retrieve via stack.api
|
|
95
|
+
const posts = await backend.api.blog.getAllPosts();
|
|
96
|
+
expect(posts.items).toHaveLength(1);
|
|
97
|
+
expect(posts.items[0]!.slug).toBe("hello-world");
|
|
98
|
+
|
|
99
|
+
// Verify same adapter - data is shared
|
|
100
|
+
const bySlug = await backend.api.blog.getPostBySlug("hello-world");
|
|
101
|
+
expect(bySlug).not.toBeNull();
|
|
102
|
+
expect(bySlug!.title).toBe("Hello World");
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it("combines multiple plugins in a single stack call", () => {
|
|
106
|
+
const backend = stack({
|
|
107
|
+
basePath: "/api",
|
|
108
|
+
plugins: {
|
|
109
|
+
blog: blogBackendPlugin(),
|
|
110
|
+
kanban: kanbanBackendPlugin(),
|
|
111
|
+
},
|
|
112
|
+
adapter: testAdapter,
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
expect(typeof backend.api.blog.getAllPosts).toBe("function");
|
|
116
|
+
expect(typeof backend.api.kanban.getAllBoards).toBe("function");
|
|
117
|
+
});
|
|
118
|
+
});
|
package/src/api/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type {
|
|
|
3
3
|
BackendLibConfig,
|
|
4
4
|
BackendLib,
|
|
5
5
|
PrefixedPluginRoutes,
|
|
6
|
+
PluginApis,
|
|
6
7
|
StackContext,
|
|
7
8
|
} from "../types";
|
|
8
9
|
import { defineDb } from "@btst/db";
|
|
@@ -33,7 +34,9 @@ export function stack<
|
|
|
33
34
|
TPlugins extends Record<string, any>,
|
|
34
35
|
TRoutes extends
|
|
35
36
|
PrefixedPluginRoutes<TPlugins> = PrefixedPluginRoutes<TPlugins>,
|
|
36
|
-
>(
|
|
37
|
+
>(
|
|
38
|
+
config: BackendLibConfig<TPlugins>,
|
|
39
|
+
): BackendLib<TRoutes, PluginApis<TPlugins>> {
|
|
37
40
|
const { plugins, adapter, dbSchema, basePath } = config;
|
|
38
41
|
|
|
39
42
|
// Collect all routes from all plugins with type-safe prefixed keys
|
|
@@ -67,6 +70,14 @@ export function stack<
|
|
|
67
70
|
}
|
|
68
71
|
}
|
|
69
72
|
|
|
73
|
+
// Build the typed api surface by calling each plugin's api factory
|
|
74
|
+
const pluginApis = {} as PluginApis<TPlugins>;
|
|
75
|
+
for (const [pluginKey, plugin] of Object.entries(plugins)) {
|
|
76
|
+
if (plugin.api) {
|
|
77
|
+
(pluginApis as any)[pluginKey] = plugin.api(adapterInstance);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
70
81
|
// Create the composed router
|
|
71
82
|
const router = createRouter(allRoutes, {
|
|
72
83
|
basePath: basePath,
|
|
@@ -76,6 +87,8 @@ export function stack<
|
|
|
76
87
|
handler: router.handler,
|
|
77
88
|
router,
|
|
78
89
|
dbSchema: betterDbSchema,
|
|
90
|
+
adapter: adapterInstance,
|
|
91
|
+
api: pluginApis,
|
|
79
92
|
};
|
|
80
93
|
}
|
|
81
94
|
|
|
@@ -83,5 +96,6 @@ export type {
|
|
|
83
96
|
BackendPlugin,
|
|
84
97
|
BackendLibConfig,
|
|
85
98
|
BackendLib,
|
|
99
|
+
PluginApis,
|
|
86
100
|
StackContext,
|
|
87
101
|
} from "../types";
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach } from "vitest";
|
|
2
|
+
import { createMemoryAdapter } from "@btst/adapter-memory";
|
|
3
|
+
import { defineDb } from "@btst/db";
|
|
4
|
+
import type { Adapter } from "@btst/db";
|
|
5
|
+
import { aiChatSchema } from "../db";
|
|
6
|
+
import { getAllConversations, getConversationById } from "../api/getters";
|
|
7
|
+
|
|
8
|
+
const createTestAdapter = (): Adapter => {
|
|
9
|
+
const db = defineDb({}).use(aiChatSchema);
|
|
10
|
+
return createMemoryAdapter(db)({});
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
async function createConversation(
|
|
14
|
+
adapter: Adapter,
|
|
15
|
+
title: string,
|
|
16
|
+
userId?: string,
|
|
17
|
+
): Promise<any> {
|
|
18
|
+
return adapter.create({
|
|
19
|
+
model: "conversation",
|
|
20
|
+
data: {
|
|
21
|
+
title,
|
|
22
|
+
...(userId ? { userId } : {}),
|
|
23
|
+
createdAt: new Date(),
|
|
24
|
+
updatedAt: new Date(),
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
describe("ai-chat getters", () => {
|
|
30
|
+
let adapter: Adapter;
|
|
31
|
+
|
|
32
|
+
beforeEach(() => {
|
|
33
|
+
adapter = createTestAdapter();
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
describe("getAllConversations", () => {
|
|
37
|
+
it("returns empty array when no conversations exist", async () => {
|
|
38
|
+
const convs = await getAllConversations(adapter);
|
|
39
|
+
expect(convs).toEqual([]);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it("returns all conversations sorted by updatedAt desc", async () => {
|
|
43
|
+
await createConversation(adapter, "First");
|
|
44
|
+
await createConversation(adapter, "Second");
|
|
45
|
+
|
|
46
|
+
const convs = await getAllConversations(adapter);
|
|
47
|
+
expect(convs).toHaveLength(2);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it("filters conversations by userId", async () => {
|
|
51
|
+
await createConversation(adapter, "Alice Conv", "user-alice");
|
|
52
|
+
await createConversation(adapter, "Bob Conv", "user-bob");
|
|
53
|
+
await createConversation(adapter, "No User Conv");
|
|
54
|
+
|
|
55
|
+
const aliceConvs = await getAllConversations(adapter, "user-alice");
|
|
56
|
+
expect(aliceConvs).toHaveLength(1);
|
|
57
|
+
expect(aliceConvs[0]!.title).toBe("Alice Conv");
|
|
58
|
+
|
|
59
|
+
const allConvs = await getAllConversations(adapter);
|
|
60
|
+
expect(allConvs).toHaveLength(3);
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
describe("getConversationById", () => {
|
|
65
|
+
it("returns null when conversation does not exist", async () => {
|
|
66
|
+
const conv = await getConversationById(adapter, "nonexistent");
|
|
67
|
+
expect(conv).toBeNull();
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it("returns conversation with messages", async () => {
|
|
71
|
+
const conv = (await createConversation(adapter, "My Chat")) as any;
|
|
72
|
+
|
|
73
|
+
await adapter.create({
|
|
74
|
+
model: "message",
|
|
75
|
+
data: {
|
|
76
|
+
conversationId: conv.id,
|
|
77
|
+
role: "user",
|
|
78
|
+
content: JSON.stringify([{ type: "text", text: "Hello!" }]),
|
|
79
|
+
createdAt: new Date(Date.now() - 1000),
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
await adapter.create({
|
|
83
|
+
model: "message",
|
|
84
|
+
data: {
|
|
85
|
+
conversationId: conv.id,
|
|
86
|
+
role: "assistant",
|
|
87
|
+
content: JSON.stringify([{ type: "text", text: "Hi there!" }]),
|
|
88
|
+
createdAt: new Date(),
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const result = await getConversationById(adapter, conv.id);
|
|
93
|
+
expect(result).not.toBeNull();
|
|
94
|
+
expect(result!.id).toBe(conv.id);
|
|
95
|
+
expect(result!.title).toBe("My Chat");
|
|
96
|
+
expect(result!.messages).toHaveLength(2);
|
|
97
|
+
expect(result!.messages[0]!.role).toBe("user");
|
|
98
|
+
expect(result!.messages[1]!.role).toBe("assistant");
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it("returns conversation with empty messages array if none exist", async () => {
|
|
102
|
+
const conv = (await createConversation(adapter, "Empty Chat")) as any;
|
|
103
|
+
|
|
104
|
+
const result = await getConversationById(adapter, conv.id);
|
|
105
|
+
expect(result).not.toBeNull();
|
|
106
|
+
expect(result!.messages).toEqual([]);
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
});
|