@btst/stack 1.3.1 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/README.md +85 -37
  2. package/dist/node_modules/.pnpm/@radix-ui_react-accordion@1.2.12_@types_react-dom@19.2.3_@types_react@19.2.6__@types_re_947719a27ff11ec6f09710dd9e85efc5/node_modules/@radix-ui/react-accordion/dist/index.cjs +321 -0
  3. package/dist/node_modules/.pnpm/@radix-ui_react-accordion@1.2.12_@types_react-dom@19.2.3_@types_react@19.2.6__@types_re_947719a27ff11ec6f09710dd9e85efc5/node_modules/@radix-ui/react-accordion/dist/index.mjs +306 -0
  4. package/dist/node_modules/.pnpm/{@radix-ui_react-alert-dialog@1.1.15_@types_react-dom@19.2.2_@types_react@19.2.2__@types_ec789942cd38340bd7362c09e7d34384 → @radix-ui_react-alert-dialog@1.1.15_@types_react-dom@19.2.3_@types_react@19.2.6__@types_4f58c757aa677e233cf96d60fda2f1da}/node_modules/@radix-ui/react-alert-dialog/dist/index.cjs +2 -2
  5. package/dist/node_modules/.pnpm/{@radix-ui_react-alert-dialog@1.1.15_@types_react-dom@19.2.2_@types_react@19.2.2__@types_ec789942cd38340bd7362c09e7d34384 → @radix-ui_react-alert-dialog@1.1.15_@types_react-dom@19.2.3_@types_react@19.2.6__@types_4f58c757aa677e233cf96d60fda2f1da}/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs +2 -2
  6. package/dist/node_modules/.pnpm/{@radix-ui_react-arrow@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@1_9e04309f365863673e44407648bb0cb6 → @radix-ui_react-arrow@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_35df44f6d87656c1401686c91d770dbb}/node_modules/@radix-ui/react-arrow/dist/index.cjs +1 -1
  7. package/dist/node_modules/.pnpm/{@radix-ui_react-arrow@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@1_9e04309f365863673e44407648bb0cb6 → @radix-ui_react-arrow@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_35df44f6d87656c1401686c91d770dbb}/node_modules/@radix-ui/react-arrow/dist/index.mjs +1 -1
  8. package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.12_@types_react-dom@19.2.3_@types_react@19.2.6__@types__d025a77f62ee83ca6bd8b0ea1f9de738/node_modules/@radix-ui/react-collapsible/dist/index.cjs +168 -0
  9. package/dist/node_modules/.pnpm/@radix-ui_react-collapsible@1.1.12_@types_react-dom@19.2.3_@types_react@19.2.6__@types__d025a77f62ee83ca6bd8b0ea1f9de738/node_modules/@radix-ui/react-collapsible/dist/index.mjs +146 -0
  10. package/dist/node_modules/.pnpm/{@radix-ui_react-collection@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_re_6d7c277722b3619c9ee7e64e9a822c45 → @radix-ui_react-collection@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_re_59aa5e150e70a3e7bfb1567148b021b5}/node_modules/@radix-ui/react-collection/dist/index.cjs +2 -2
  11. package/dist/node_modules/.pnpm/{@radix-ui_react-collection@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_re_6d7c277722b3619c9ee7e64e9a822c45 → @radix-ui_react-collection@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_re_59aa5e150e70a3e7bfb1567148b021b5}/node_modules/@radix-ui/react-collection/dist/index.mjs +2 -2
  12. package/dist/node_modules/.pnpm/{@radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.2_@types_react@19.2.2__@_ca5522e5d45d4722cb9eb5ce53defa61 → @radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@_9ee1db7daf927866cf505b31d40047ad}/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +4 -4
  13. package/dist/node_modules/.pnpm/{@radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.2_@types_react@19.2.2__@_ca5522e5d45d4722cb9eb5ce53defa61 → @radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@_9ee1db7daf927866cf505b31d40047ad}/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +4 -4
  14. package/dist/node_modules/.pnpm/@radix-ui_react-dropdown-menu@2.1.16_@types_react-dom@19.2.3_@types_react@19.2.6__@type_a50051c7210b6fbd5be09388bda08578/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs +282 -0
  15. package/dist/node_modules/.pnpm/@radix-ui_react-dropdown-menu@2.1.16_@types_react-dom@19.2.3_@types_react@19.2.6__@type_a50051c7210b6fbd5be09388bda08578/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs +247 -0
  16. package/dist/node_modules/.pnpm/{@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_r_93de389b3f622f9f764acc8e59ec80c0 → @radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_r_0a31b7f987af9482d13505312e1a1be9}/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +3 -3
  17. package/dist/node_modules/.pnpm/{@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_r_93de389b3f622f9f764acc8e59ec80c0 → @radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_r_0a31b7f987af9482d13505312e1a1be9}/node_modules/@radix-ui/react-focus-scope/dist/index.mjs +3 -3
  18. package/dist/node_modules/.pnpm/{@radix-ui_react-id@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-id@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-id/dist/index.cjs +1 -1
  19. package/dist/node_modules/.pnpm/{@radix-ui_react-id@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-id@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-id/dist/index.mjs +1 -1
  20. package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.16_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_82ed1fcd848b6984d9291a784d477cf4/node_modules/@radix-ui/react-menu/dist/index.cjs +845 -0
  21. package/dist/node_modules/.pnpm/@radix-ui_react-menu@2.1.16_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@1_82ed1fcd848b6984d9291a784d477cf4/node_modules/@radix-ui/react-menu/dist/index.mjs +799 -0
  22. package/dist/node_modules/.pnpm/{@radix-ui_react-popper@1.2.8_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_d6285b8269ea5d6b59b300f5be279a0c → @radix-ui_react-popper@1.2.8_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_7ac2caae1e39f9ba93d5015614525161}/node_modules/@radix-ui/react-popper/dist/index.cjs +7 -7
  23. package/dist/node_modules/.pnpm/{@radix-ui_react-popper@1.2.8_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_d6285b8269ea5d6b59b300f5be279a0c → @radix-ui_react-popper@1.2.8_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_7ac2caae1e39f9ba93d5015614525161}/node_modules/@radix-ui/react-popper/dist/index.mjs +7 -7
  24. package/dist/node_modules/.pnpm/{@radix-ui_react-portal@1.1.9_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_478b3d5dd4afab1a3dcce7ed1748cb95 → @radix-ui_react-portal@1.1.9_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_1bb4e0f97f86496802d28a2e74e2a8b9}/node_modules/@radix-ui/react-portal/dist/index.cjs +2 -2
  25. package/dist/node_modules/.pnpm/{@radix-ui_react-portal@1.1.9_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_478b3d5dd4afab1a3dcce7ed1748cb95 → @radix-ui_react-portal@1.1.9_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_1bb4e0f97f86496802d28a2e74e2a8b9}/node_modules/@radix-ui/react-portal/dist/index.mjs +2 -2
  26. package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.5_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_90f8e5c12233caef3399d5fd66452a13/node_modules/@radix-ui/react-presence/dist/index.cjs +147 -0
  27. package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.5_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_90f8e5c12233caef3399d5fd66452a13/node_modules/@radix-ui/react-presence/dist/index.mjs +131 -0
  28. package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@types_fe1151d1f393bbc1072b24a86dff3a23/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +244 -0
  29. package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@types_fe1151d1f393bbc1072b24a86dff3a23/node_modules/@radix-ui/react-roving-focus/dist/index.mjs +224 -0
  30. package/dist/node_modules/.pnpm/@radix-ui_react-scroll-area@1.2.10_@types_react-dom@19.2.3_@types_react@19.2.6__@types__e3f7735e9b444a10b3bbfd9fe97d44d0/node_modules/@radix-ui/react-scroll-area/dist/index.cjs +742 -0
  31. package/dist/node_modules/.pnpm/@radix-ui_react-scroll-area@1.2.10_@types_react-dom@19.2.3_@types_react@19.2.6__@types__e3f7735e9b444a10b3bbfd9fe97d44d0/node_modules/@radix-ui/react-scroll-area/dist/index.mjs +719 -0
  32. package/dist/node_modules/.pnpm/{@radix-ui_react-select@2.2.6_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_802c3d414c85063bee785fcc98a39c07 → @radix-ui_react-select@2.2.6_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_38dc681bb1f2bcfeb5249d8ca2bc01f5}/node_modules/@radix-ui/react-select/dist/index.cjs +17 -17
  33. package/dist/node_modules/.pnpm/{@radix-ui_react-select@2.2.6_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_802c3d414c85063bee785fcc98a39c07 → @radix-ui_react-select@2.2.6_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_38dc681bb1f2bcfeb5249d8ca2bc01f5}/node_modules/@radix-ui/react-select/dist/index.mjs +17 -17
  34. package/dist/node_modules/.pnpm/{@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +1 -1
  35. package/dist/node_modules/.pnpm/{@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +1 -1
  36. package/dist/node_modules/.pnpm/{@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +1 -1
  37. package/dist/node_modules/.pnpm/{@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs +1 -1
  38. package/dist/node_modules/.pnpm/{@radix-ui_react-use-size@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-size@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-size/dist/index.cjs +1 -1
  39. package/dist/node_modules/.pnpm/{@radix-ui_react-use-size@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-size@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-size/dist/index.mjs +1 -1
  40. package/dist/node_modules/.pnpm/{@radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.2.2_@types_react@19.2.2__@typ_a84e98a44624c31e835a98d4b8b0c30d → @radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.2.3_@types_react@19.2.6__@typ_f453379bbd5a4932ec515167f81be42a}/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +1 -1
  41. package/dist/node_modules/.pnpm/{@radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.2.2_@types_react@19.2.2__@typ_a84e98a44624c31e835a98d4b8b0c30d → @radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.2.3_@types_react@19.2.6__@typ_f453379bbd5a4932ec515167f81be42a}/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs +1 -1
  42. package/dist/node_modules/.pnpm/{react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0 → react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +1 -1
  43. package/dist/node_modules/.pnpm/{react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0 → react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll-bar/dist/es2015/component.mjs +1 -1
  44. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +2 -2
  45. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/SideEffect.mjs +2 -2
  46. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/UI.cjs +2 -2
  47. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/UI.mjs +2 -2
  48. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/medium.cjs +1 -1
  49. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/medium.mjs +1 -1
  50. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +9 -0
  51. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/sidecar.mjs +1 -1
  52. package/dist/packages/better-stack/src/plugins/ai-chat/api/plugin.cjs +610 -0
  53. package/dist/packages/better-stack/src/plugins/ai-chat/api/plugin.mjs +608 -0
  54. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-input.cjs +221 -0
  55. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-input.mjs +219 -0
  56. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.cjs +341 -0
  57. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.mjs +339 -0
  58. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-layout.cjs +135 -0
  59. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-layout.mjs +133 -0
  60. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-message.cjs +429 -0
  61. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-message.mjs +423 -0
  62. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-sidebar.cjs +227 -0
  63. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-sidebar.mjs +225 -0
  64. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/chat-page-skeleton.cjs +31 -0
  65. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/chat-page-skeleton.mjs +29 -0
  66. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/index.cjs +11 -0
  67. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/index.mjs +8 -0
  68. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/404-page.cjs +18 -0
  69. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/404-page.mjs +16 -0
  70. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.cjs +39 -0
  71. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.internal.cjs +22 -0
  72. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.internal.mjs +20 -0
  73. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.mjs +37 -0
  74. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/default-error.cjs +18 -0
  75. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/default-error.mjs +16 -0
  76. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/error-placeholder.cjs +26 -0
  77. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/error-placeholder.mjs +24 -0
  78. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/tool-call-display.cjs +123 -0
  79. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/tool-call-display.mjs +121 -0
  80. package/dist/packages/better-stack/src/plugins/ai-chat/client/hooks/chat-hooks.cjs +199 -0
  81. package/dist/packages/better-stack/src/plugins/ai-chat/client/hooks/chat-hooks.mjs +191 -0
  82. package/dist/packages/better-stack/src/plugins/ai-chat/client/localization/index.cjs +63 -0
  83. package/dist/packages/better-stack/src/plugins/ai-chat/client/localization/index.mjs +61 -0
  84. package/dist/packages/better-stack/src/plugins/ai-chat/client/overrides.cjs +14 -0
  85. package/dist/packages/better-stack/src/plugins/ai-chat/client/overrides.mjs +11 -0
  86. package/dist/packages/better-stack/src/plugins/ai-chat/client/plugin.cjs +241 -0
  87. package/dist/packages/better-stack/src/plugins/ai-chat/client/plugin.mjs +239 -0
  88. package/dist/packages/better-stack/src/plugins/ai-chat/db.cjs +65 -0
  89. package/dist/packages/better-stack/src/plugins/ai-chat/db.mjs +63 -0
  90. package/dist/packages/better-stack/src/plugins/ai-chat/schemas.cjs +42 -0
  91. package/dist/packages/better-stack/src/plugins/ai-chat/schemas.mjs +38 -0
  92. package/dist/packages/better-stack/src/plugins/blog/client/components/shared/markdown-content.cjs +12 -309
  93. package/dist/packages/better-stack/src/plugins/blog/client/components/shared/markdown-content.mjs +13 -303
  94. package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.cjs +2 -2
  95. package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.mjs +2 -2
  96. package/dist/packages/ui/src/components/accordion.cjs +67 -0
  97. package/dist/packages/ui/src/components/accordion.mjs +62 -0
  98. package/dist/packages/ui/src/components/alert-dialog.cjs +1 -1
  99. package/dist/packages/ui/src/components/alert-dialog.mjs +1 -1
  100. package/dist/packages/{better-stack/src/plugins/blog/client/components/shared/better-blog-attribution.cjs → ui/src/components/better-stack-attribution.cjs} +3 -3
  101. package/dist/packages/{better-stack/src/plugins/blog/client/components/shared/better-blog-attribution.mjs → ui/src/components/better-stack-attribution.mjs} +3 -3
  102. package/dist/packages/ui/src/components/dialog.cjs +14 -0
  103. package/dist/packages/ui/src/components/dialog.mjs +14 -1
  104. package/dist/packages/ui/src/components/dropdown-menu.cjs +67 -0
  105. package/dist/packages/ui/src/components/dropdown-menu.mjs +62 -0
  106. package/dist/packages/ui/src/components/markdown-content.cjs +306 -0
  107. package/dist/packages/ui/src/components/markdown-content.mjs +297 -0
  108. package/dist/packages/ui/src/components/scroll-area.cjs +63 -0
  109. package/dist/packages/ui/src/components/scroll-area.mjs +60 -0
  110. package/dist/packages/ui/src/components/select.cjs +1 -1
  111. package/dist/packages/ui/src/components/select.mjs +1 -1
  112. package/dist/packages/ui/src/components/sheet.cjs +87 -0
  113. package/dist/packages/ui/src/components/sheet.mjs +69 -0
  114. package/dist/plugins/ai-chat/api/index.cjs +9 -0
  115. package/dist/plugins/ai-chat/api/index.d.cts +9 -0
  116. package/dist/plugins/ai-chat/api/index.d.mts +9 -0
  117. package/dist/plugins/ai-chat/api/index.d.ts +9 -0
  118. package/dist/plugins/ai-chat/api/index.mjs +2 -0
  119. package/dist/plugins/ai-chat/client/components/index.cjs +29 -0
  120. package/dist/plugins/ai-chat/client/components/index.d.cts +30 -0
  121. package/dist/plugins/ai-chat/client/components/index.d.mts +30 -0
  122. package/dist/plugins/ai-chat/client/components/index.d.ts +30 -0
  123. package/dist/plugins/ai-chat/client/components/index.mjs +12 -0
  124. package/dist/plugins/ai-chat/client/hooks/index.cjs +13 -0
  125. package/dist/plugins/ai-chat/client/hooks/index.d.cts +98 -0
  126. package/dist/plugins/ai-chat/client/hooks/index.d.mts +98 -0
  127. package/dist/plugins/ai-chat/client/hooks/index.d.ts +98 -0
  128. package/dist/plugins/ai-chat/client/hooks/index.mjs +1 -0
  129. package/dist/plugins/ai-chat/client/index.cjs +21 -0
  130. package/dist/plugins/ai-chat/client/index.d.cts +156 -0
  131. package/dist/plugins/ai-chat/client/index.d.mts +156 -0
  132. package/dist/plugins/ai-chat/client/index.d.ts +156 -0
  133. package/dist/plugins/ai-chat/client/index.mjs +8 -0
  134. package/dist/plugins/ai-chat/client.css +6 -0
  135. package/dist/plugins/ai-chat/query-keys.cjs +60 -0
  136. package/dist/plugins/ai-chat/query-keys.d.cts +478 -0
  137. package/dist/plugins/ai-chat/query-keys.d.mts +478 -0
  138. package/dist/plugins/ai-chat/query-keys.d.ts +478 -0
  139. package/dist/plugins/ai-chat/query-keys.mjs +58 -0
  140. package/dist/plugins/ai-chat/style.css +19 -0
  141. package/dist/plugins/blog/api/index.d.cts +1 -1
  142. package/dist/plugins/blog/api/index.d.mts +1 -1
  143. package/dist/plugins/blog/api/index.d.ts +1 -1
  144. package/dist/plugins/blog/client/components/shared/markdown-content-styles.css +91 -62
  145. package/dist/plugins/blog/client/hooks/index.d.cts +4 -4
  146. package/dist/plugins/blog/client/hooks/index.d.mts +4 -4
  147. package/dist/plugins/blog/client/hooks/index.d.ts +4 -4
  148. package/dist/plugins/blog/client/index.d.cts +1 -1
  149. package/dist/plugins/blog/client/index.d.mts +1 -1
  150. package/dist/plugins/blog/client/index.d.ts +1 -1
  151. package/dist/plugins/blog/query-keys.d.cts +7 -7
  152. package/dist/plugins/blog/query-keys.d.mts +7 -7
  153. package/dist/plugins/blog/query-keys.d.ts +7 -7
  154. package/dist/shared/stack.Be1QIHEn.d.cts +23 -0
  155. package/dist/shared/stack.Be1QIHEn.d.mts +23 -0
  156. package/dist/shared/stack.Be1QIHEn.d.ts +23 -0
  157. package/dist/shared/stack.DaOcgmrM.d.cts +323 -0
  158. package/dist/shared/stack.DaOcgmrM.d.mts +323 -0
  159. package/dist/shared/stack.DaOcgmrM.d.ts +323 -0
  160. package/package.json +59 -1
  161. package/src/plugins/ai-chat/api/index.ts +2 -0
  162. package/src/plugins/ai-chat/api/plugin.ts +1083 -0
  163. package/src/plugins/ai-chat/client/components/chat-input.tsx +295 -0
  164. package/src/plugins/ai-chat/client/components/chat-interface.tsx +494 -0
  165. package/src/plugins/ai-chat/client/components/chat-layout.tsx +175 -0
  166. package/src/plugins/ai-chat/client/components/chat-message.tsx +561 -0
  167. package/src/plugins/ai-chat/client/components/chat-sidebar.tsx +296 -0
  168. package/src/plugins/ai-chat/client/components/index.ts +18 -0
  169. package/src/plugins/ai-chat/client/components/loading/chat-page-skeleton.tsx +57 -0
  170. package/src/plugins/ai-chat/client/components/loading/index.tsx +11 -0
  171. package/src/plugins/ai-chat/client/components/pages/404-page.tsx +27 -0
  172. package/src/plugins/ai-chat/client/components/pages/chat-page.internal.tsx +31 -0
  173. package/src/plugins/ai-chat/client/components/pages/chat-page.tsx +46 -0
  174. package/src/plugins/ai-chat/client/components/shared/default-error.tsx +28 -0
  175. package/src/plugins/ai-chat/client/components/shared/error-placeholder.tsx +22 -0
  176. package/src/plugins/ai-chat/client/components/tool-call-display.tsx +197 -0
  177. package/src/plugins/ai-chat/client/hooks/chat-hooks.tsx +349 -0
  178. package/src/plugins/ai-chat/client/hooks/index.tsx +1 -0
  179. package/src/plugins/ai-chat/client/index.ts +25 -0
  180. package/src/plugins/ai-chat/client/localization/index.ts +156 -0
  181. package/src/plugins/ai-chat/client/overrides.ts +241 -0
  182. package/src/plugins/ai-chat/client/plugin.tsx +449 -0
  183. package/src/plugins/ai-chat/client.css +6 -0
  184. package/src/plugins/ai-chat/db.ts +65 -0
  185. package/src/plugins/ai-chat/query-keys.ts +87 -0
  186. package/src/plugins/ai-chat/schemas.ts +40 -0
  187. package/src/plugins/ai-chat/style.css +19 -0
  188. package/src/plugins/ai-chat/types.ts +29 -0
  189. package/src/plugins/blog/client/components/shared/markdown-content-styles.css +91 -62
  190. package/src/plugins/blog/client/components/shared/markdown-content.tsx +19 -427
  191. package/src/plugins/blog/client/components/shared/page-wrapper.tsx +2 -2
  192. package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +0 -9
  193. package/src/plugins/blog/client/components/shared/better-blog-attribution.tsx +0 -19
  194. package/dist/node_modules/.pnpm/{@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-compose-refs@1.1.2_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +0 -0
  195. package/dist/node_modules/.pnpm/{@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-compose-refs@1.1.2_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +0 -0
  196. package/dist/node_modules/.pnpm/{@radix-ui_react-context@1.1.2_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-context@1.1.2_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-context/dist/index.cjs +0 -0
  197. package/dist/node_modules/.pnpm/{@radix-ui_react-context@1.1.2_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-context@1.1.2_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-context/dist/index.mjs +0 -0
  198. package/dist/node_modules/.pnpm/{@radix-ui_react-direction@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-direction@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-direction/dist/index.cjs +0 -0
  199. package/dist/node_modules/.pnpm/{@radix-ui_react-direction@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-direction@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-direction/dist/index.mjs +0 -0
  200. package/dist/node_modules/.pnpm/{@radix-ui_react-focus-guards@1.1.3_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-focus-guards@1.1.3_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +0 -0
  201. package/dist/node_modules/.pnpm/{@radix-ui_react-focus-guards@1.1.3_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-focus-guards@1.1.3_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +0 -0
  202. package/dist/node_modules/.pnpm/{@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.2_@types_react@19.2.2__@types_rea_bdc15f10281778271ffcbe8dd3cd491e → @radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_a92a69cb1cb39305138539e4fa72f596}/node_modules/@radix-ui/react-primitive/dist/index.cjs +0 -0
  203. package/dist/node_modules/.pnpm/{@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.2_@types_react@19.2.2__@types_rea_bdc15f10281778271ffcbe8dd3cd491e → @radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_a92a69cb1cb39305138539e4fa72f596}/node_modules/@radix-ui/react-primitive/dist/index.mjs +0 -0
  204. package/dist/node_modules/.pnpm/{@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +0 -0
  205. package/dist/node_modules/.pnpm/{@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs +0 -0
  206. package/dist/node_modules/.pnpm/{@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +0 -0
  207. package/dist/node_modules/.pnpm/{@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +0 -0
  208. package/dist/node_modules/.pnpm/{@radix-ui_react-use-previous@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-previous@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-previous/dist/index.cjs +0 -0
  209. package/dist/node_modules/.pnpm/{@radix-ui_react-use-previous@1.1.1_@types_react@19.2.2_react@19.2.0 → @radix-ui_react-use-previous@1.1.1_@types_react@19.2.6_react@19.2.0}/node_modules/@radix-ui/react-use-previous/dist/index.mjs +0 -0
  210. package/dist/node_modules/.pnpm/{react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0 → react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +0 -0
  211. package/dist/node_modules/.pnpm/{react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0 → react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll-bar/dist/es2015/constants.mjs +0 -0
  212. package/dist/node_modules/.pnpm/{react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0 → react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +0 -0
  213. package/dist/node_modules/.pnpm/{react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0 → react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll-bar/dist/es2015/utils.mjs +0 -0
  214. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +0 -0
  215. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/Combination.mjs +0 -0
  216. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +0 -0
  217. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.mjs +0 -0
  218. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +0 -0
  219. package/dist/node_modules/.pnpm/{react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0 → react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0}/node_modules/react-remove-scroll/dist/es2015/handleScroll.mjs +0 -0
  220. package/dist/node_modules/.pnpm/{react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0 → react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0}/node_modules/react-style-singleton/dist/es2015/component.cjs +0 -0
  221. package/dist/node_modules/.pnpm/{react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0 → react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0}/node_modules/react-style-singleton/dist/es2015/component.mjs +0 -0
  222. package/dist/node_modules/.pnpm/{react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0 → react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0}/node_modules/react-style-singleton/dist/es2015/hook.cjs +0 -0
  223. package/dist/node_modules/.pnpm/{react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0 → react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0}/node_modules/react-style-singleton/dist/es2015/hook.mjs +0 -0
  224. package/dist/node_modules/.pnpm/{react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0 → react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0}/node_modules/react-style-singleton/dist/es2015/singleton.cjs +0 -0
  225. package/dist/node_modules/.pnpm/{react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0 → react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0}/node_modules/react-style-singleton/dist/es2015/singleton.mjs +0 -0
  226. package/dist/node_modules/.pnpm/{use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0 → use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +0 -0
  227. package/dist/node_modules/.pnpm/{use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0 → use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-callback-ref/dist/es2015/assignRef.mjs +0 -0
  228. package/dist/node_modules/.pnpm/{use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0 → use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +0 -0
  229. package/dist/node_modules/.pnpm/{use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0 → use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-callback-ref/dist/es2015/useMergeRef.mjs +0 -0
  230. package/dist/node_modules/.pnpm/{use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0 → use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-callback-ref/dist/es2015/useRef.cjs +0 -0
  231. package/dist/node_modules/.pnpm/{use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0 → use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-callback-ref/dist/es2015/useRef.mjs +0 -0
  232. package/dist/node_modules/.pnpm/{use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0 → use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-sidecar/dist/es2015/exports.cjs +0 -0
  233. package/dist/node_modules/.pnpm/{use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0 → use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-sidecar/dist/es2015/exports.mjs +0 -0
  234. package/dist/node_modules/.pnpm/{use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0 → use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-sidecar/dist/es2015/medium.cjs +0 -0
  235. package/dist/node_modules/.pnpm/{use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0 → use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0}/node_modules/use-sidecar/dist/es2015/medium.mjs +0 -0
  236. package/dist/shared/{stack.CbuN2zVV.d.ts → stack.CcI4sYJP.d.cts} +3 -3
  237. package/dist/shared/{stack.CbuN2zVV.d.cts → stack.CcI4sYJP.d.mts} +3 -3
  238. package/dist/shared/{stack.CbuN2zVV.d.mts → stack.CcI4sYJP.d.ts} +3 -3
@@ -0,0 +1,23 @@
1
+ type Conversation = {
2
+ id: string;
3
+ userId?: string;
4
+ title: string;
5
+ createdAt: Date;
6
+ updatedAt: Date;
7
+ };
8
+ type Message = {
9
+ id: string;
10
+ conversationId: string;
11
+ role: "system" | "user" | "assistant" | "data";
12
+ content: string;
13
+ createdAt: Date;
14
+ };
15
+ interface SerializedConversation extends Omit<Conversation, "createdAt" | "updatedAt"> {
16
+ createdAt: string;
17
+ updatedAt: string;
18
+ }
19
+ interface SerializedMessage extends Omit<Message, "createdAt"> {
20
+ createdAt: string;
21
+ }
22
+
23
+ export type { Conversation as C, Message as M, SerializedConversation as S, SerializedMessage as a };
@@ -0,0 +1,23 @@
1
+ type Conversation = {
2
+ id: string;
3
+ userId?: string;
4
+ title: string;
5
+ createdAt: Date;
6
+ updatedAt: Date;
7
+ };
8
+ type Message = {
9
+ id: string;
10
+ conversationId: string;
11
+ role: "system" | "user" | "assistant" | "data";
12
+ content: string;
13
+ createdAt: Date;
14
+ };
15
+ interface SerializedConversation extends Omit<Conversation, "createdAt" | "updatedAt"> {
16
+ createdAt: string;
17
+ updatedAt: string;
18
+ }
19
+ interface SerializedMessage extends Omit<Message, "createdAt"> {
20
+ createdAt: string;
21
+ }
22
+
23
+ export type { Conversation as C, Message as M, SerializedConversation as S, SerializedMessage as a };
@@ -0,0 +1,23 @@
1
+ type Conversation = {
2
+ id: string;
3
+ userId?: string;
4
+ title: string;
5
+ createdAt: Date;
6
+ updatedAt: Date;
7
+ };
8
+ type Message = {
9
+ id: string;
10
+ conversationId: string;
11
+ role: "system" | "user" | "assistant" | "data";
12
+ content: string;
13
+ createdAt: Date;
14
+ };
15
+ interface SerializedConversation extends Omit<Conversation, "createdAt" | "updatedAt"> {
16
+ createdAt: string;
17
+ updatedAt: string;
18
+ }
19
+ interface SerializedMessage extends Omit<Message, "createdAt"> {
20
+ createdAt: string;
21
+ }
22
+
23
+ export type { Conversation as C, Message as M, SerializedConversation as S, SerializedMessage as a };
@@ -0,0 +1,323 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { UIMessage } from 'ai';
3
+ import { ComponentType, FormEvent } from 'react';
4
+
5
+ /**
6
+ * AI Chat plugin localization strings
7
+ */
8
+ interface AiChatLocalization {
9
+ CHAT_PLACEHOLDER: string;
10
+ CHAT_SEND_BUTTON: string;
11
+ CHAT_EMPTY_STATE: string;
12
+ CHAT_LOADING: string;
13
+ CHAT_ERROR: string;
14
+ CHAT_RETRY: string;
15
+ CHAT_GENERIC_ERROR_TITLE: string;
16
+ CHAT_GENERIC_ERROR_MESSAGE: string;
17
+ CHAT_PAGE_NOT_FOUND_TITLE: string;
18
+ CHAT_PAGE_NOT_FOUND_DESCRIPTION: string;
19
+ SIDEBAR_TITLE: string;
20
+ SIDEBAR_NEW_CHAT: string;
21
+ SIDEBAR_NO_CONVERSATIONS: string;
22
+ SIDEBAR_SEARCH_PLACEHOLDER: string;
23
+ CONVERSATION_RENAME: string;
24
+ CONVERSATION_RENAME_PLACEHOLDER: string;
25
+ CONVERSATION_RENAME_SAVE: string;
26
+ CONVERSATION_RENAME_CANCEL: string;
27
+ CONVERSATION_DELETE: string;
28
+ CONVERSATION_DELETE_CONFIRM_TITLE: string;
29
+ CONVERSATION_DELETE_CONFIRM_DESCRIPTION: string;
30
+ CONVERSATION_DELETE_CONFIRM_BUTTON: string;
31
+ CONVERSATION_DELETE_CANCEL: string;
32
+ IMAGE_UPLOAD_BUTTON: string;
33
+ IMAGE_UPLOAD_UPLOADING: string;
34
+ IMAGE_UPLOAD_ERROR_NOT_IMAGE: string;
35
+ IMAGE_UPLOAD_ERROR_TOO_LARGE: string;
36
+ IMAGE_UPLOAD_SUCCESS: string;
37
+ IMAGE_UPLOAD_FAILURE: string;
38
+ FILE_UPLOAD_BUTTON: string;
39
+ FILE_UPLOAD_ERROR_TOO_LARGE: string;
40
+ FILE_UPLOAD_SUCCESS: string;
41
+ FILE_UPLOAD_FAILURE: string;
42
+ TIME_JUST_NOW: string;
43
+ TIME_MINUTES_AGO: string;
44
+ TIME_HOURS_AGO: string;
45
+ TIME_YESTERDAY: string;
46
+ TIME_DAYS_AGO: string;
47
+ MESSAGE_COPY: string;
48
+ MESSAGE_COPIED: string;
49
+ MESSAGE_RETRY: string;
50
+ MESSAGE_EDIT: string;
51
+ MESSAGE_SAVE: string;
52
+ MESSAGE_CANCEL: string;
53
+ A11Y_USER_MESSAGE: string;
54
+ A11Y_ASSISTANT_MESSAGE: string;
55
+ A11Y_COPY_CODE: string;
56
+ A11Y_CODE_COPIED: string;
57
+ }
58
+
59
+ /**
60
+ * Plugin mode for AI Chat
61
+ * - 'authenticated': Conversations persisted with userId (default)
62
+ * - 'public': Stateless chat, no persistence (ideal for public chatbots)
63
+ */
64
+ type AiChatMode = "authenticated" | "public";
65
+ /**
66
+ * State of a tool call execution
67
+ */
68
+ type ToolCallState = "input-streaming" | "input-available" | "output-available" | "output-error";
69
+ /**
70
+ * Props passed to custom tool call renderer components
71
+ */
72
+ interface ToolCallProps<TInput = unknown, TOutput = unknown> {
73
+ /** Unique identifier for this tool call */
74
+ toolCallId: string;
75
+ /** Name of the tool being called */
76
+ toolName: string;
77
+ /** Current state of the tool call execution */
78
+ state: ToolCallState;
79
+ /** Input arguments passed to the tool (may be partial during streaming) */
80
+ input: TInput | undefined;
81
+ /** Output from the tool (only available when state is 'output-available') */
82
+ output: TOutput | undefined;
83
+ /** Error message (only available when state is 'output-error') */
84
+ errorText?: string;
85
+ /** Whether the tool call is currently in progress */
86
+ isLoading: boolean;
87
+ }
88
+ /**
89
+ * A component that renders a custom UI for a specific tool call.
90
+ * Return `null` to fall back to the default tool call accordion.
91
+ */
92
+ type ToolCallRenderer<TInput = unknown, TOutput = unknown> = ComponentType<ToolCallProps<TInput, TOutput>>;
93
+ /**
94
+ * Allowed file type categories for uploads
95
+ */
96
+ type AllowedFileType = "image" | "text" | "pdf" | "markdown" | "csv" | "json";
97
+ /**
98
+ * Default allowed file types (images only for best AI model compatibility)
99
+ * Consumers can expand this by passing allowedFileTypes in overrides
100
+ */
101
+ declare const DEFAULT_ALLOWED_FILE_TYPES: AllowedFileType[];
102
+ /**
103
+ * Context passed to lifecycle hooks
104
+ */
105
+ interface RouteContext {
106
+ /** Current route path */
107
+ path: string;
108
+ /** Route parameters (e.g., { id: "abc123" }) */
109
+ params?: Record<string, string>;
110
+ /** Whether rendering on server (true) or client (false) */
111
+ isSSR: boolean;
112
+ /** Additional context properties */
113
+ [key: string]: any;
114
+ }
115
+ /**
116
+ * Overridable components and functions for the AI Chat plugin
117
+ *
118
+ * External consumers can provide their own implementations of these
119
+ * to customize the behavior for their framework (Next.js, React Router, etc.)
120
+ */
121
+ interface AiChatPluginOverrides {
122
+ /**
123
+ * Plugin mode - should match backend config
124
+ * @default 'authenticated'
125
+ */
126
+ mode?: AiChatMode;
127
+ /**
128
+ * API base URL
129
+ */
130
+ apiBaseURL: string;
131
+ /**
132
+ * API base path
133
+ */
134
+ apiBasePath: string;
135
+ /**
136
+ * Navigation function for programmatic navigation
137
+ */
138
+ navigate: (path: string) => void | Promise<void>;
139
+ /**
140
+ * Refresh function to invalidate server-side cache (e.g., Next.js router.refresh())
141
+ */
142
+ refresh?: () => void | Promise<void>;
143
+ /**
144
+ * Link component for navigation
145
+ */
146
+ Link?: ComponentType<React.ComponentProps<"a"> & Record<string, any>>;
147
+ /**
148
+ * Image component for displaying images
149
+ */
150
+ Image?: ComponentType<React.ImgHTMLAttributes<HTMLImageElement> & Record<string, any>>;
151
+ /**
152
+ * Function used to upload a file and return its URL.
153
+ * Called for images, PDFs, text files, and other supported file types.
154
+ */
155
+ uploadFile?: (file: File) => Promise<string>;
156
+ /**
157
+ * Allowed file types for upload.
158
+ * By default, all types are enabled: image, text, pdf, markdown, csv, json
159
+ * Set to empty array to disable file uploads entirely.
160
+ * @default ['image', 'text', 'pdf', 'markdown', 'csv', 'json']
161
+ */
162
+ allowedFileTypes?: AllowedFileType[];
163
+ /**
164
+ * Localization object for the AI Chat plugin
165
+ */
166
+ localization?: Partial<AiChatLocalization>;
167
+ /**
168
+ * Optional headers to pass with API requests (e.g., for SSR auth)
169
+ */
170
+ headers?: HeadersInit;
171
+ /**
172
+ * Whether to show the attribution
173
+ * @default true
174
+ */
175
+ showAttribution?: boolean;
176
+ /**
177
+ * Suggested prompts to display in the empty chat state.
178
+ * When provided, these appear as clickable buttons that populate the input field.
179
+ *
180
+ * @example
181
+ * ```tsx
182
+ * chatSuggestions: [
183
+ * "What can you help me with?",
184
+ * "Tell me about your features",
185
+ * "How do I get started?",
186
+ * ]
187
+ * ```
188
+ */
189
+ chatSuggestions?: string[];
190
+ /**
191
+ * Custom renderers for tool calls. Keys should match tool names.
192
+ * Each renderer receives ToolCallProps and can return custom UI.
193
+ *
194
+ * @example
195
+ * ```tsx
196
+ * toolRenderers: {
197
+ * getWeather: ({ toolName, input, output, state, isLoading }) => (
198
+ * <WeatherCard location={input?.location} weather={output} loading={isLoading} />
199
+ * ),
200
+ * searchDocs: ({ input, output, isLoading }) => (
201
+ * <SearchResults query={input?.query} results={output} loading={isLoading} />
202
+ * ),
203
+ * }
204
+ * ```
205
+ */
206
+ toolRenderers?: Record<string, ToolCallRenderer>;
207
+ /**
208
+ * Called when a route is rendered
209
+ * @param routeName - Name of the route (e.g., 'chat', 'chatConversation')
210
+ * @param context - Route context with path, params, etc.
211
+ */
212
+ onRouteRender?: (routeName: string, context: RouteContext) => void | Promise<void>;
213
+ /**
214
+ * Called when a route encounters an error
215
+ * @param routeName - Name of the route
216
+ * @param error - The error that occurred
217
+ * @param context - Route context
218
+ */
219
+ onRouteError?: (routeName: string, error: Error, context: RouteContext) => void | Promise<void>;
220
+ /**
221
+ * Called before the chat page is rendered
222
+ * Return false to prevent rendering (e.g., for authorization)
223
+ * @param context - Route context
224
+ */
225
+ onBeforeChatPageRendered?: (context: RouteContext) => boolean;
226
+ /**
227
+ * Called before a conversation page is rendered
228
+ * Return false to prevent rendering (e.g., for authorization)
229
+ * @param id - The conversation ID
230
+ * @param context - Route context
231
+ */
232
+ onBeforeConversationPageRendered?: (id: string, context: RouteContext) => boolean;
233
+ }
234
+
235
+ interface ChatInterfaceProps {
236
+ apiPath?: string;
237
+ initialMessages?: UIMessage[];
238
+ id?: string;
239
+ /** Variant: 'full' for full-page layout, 'widget' for embedded widget */
240
+ variant?: "full" | "widget";
241
+ className?: string;
242
+ /** Called whenever messages change (for persistence). Only fires in public mode. */
243
+ onMessagesChange?: (messages: UIMessage[]) => void;
244
+ }
245
+ declare function ChatInterface({ apiPath, initialMessages, id, variant, className, onMessagesChange, }: ChatInterfaceProps): react_jsx_runtime.JSX.Element;
246
+
247
+ interface ChatLayoutProps {
248
+ /** API base URL */
249
+ apiBaseURL: string;
250
+ /** API base path */
251
+ apiBasePath: string;
252
+ /** Current conversation ID (if viewing existing conversation) */
253
+ conversationId?: string;
254
+ /** Layout mode: 'full' for full page with sidebar, 'widget' for embeddable widget */
255
+ layout?: "full" | "widget";
256
+ /** Additional class name for the container */
257
+ className?: string;
258
+ /** Whether to show the sidebar (default: true for full layout) */
259
+ showSidebar?: boolean;
260
+ /** Height of the widget (only applies to widget layout) */
261
+ widgetHeight?: string | number;
262
+ /** Initial messages to populate the chat (useful for localStorage persistence in public mode) */
263
+ initialMessages?: UIMessage[];
264
+ /** Called whenever messages change (for persistence). Only fires in public mode. */
265
+ onMessagesChange?: (messages: UIMessage[]) => void;
266
+ }
267
+ /**
268
+ * ChatLayout component that provides a full-page chat experience with sidebar
269
+ * or a compact widget mode for embedding.
270
+ */
271
+ declare function ChatLayout({ apiBaseURL, apiBasePath, conversationId, layout, className, showSidebar, widgetHeight, initialMessages, onMessagesChange, }: ChatLayoutProps): react_jsx_runtime.JSX.Element;
272
+
273
+ interface ChatSidebarProps {
274
+ currentConversationId?: string;
275
+ onNewChat?: () => void;
276
+ className?: string;
277
+ }
278
+ declare function ChatSidebar({ currentConversationId, onNewChat, className, }: ChatSidebarProps): react_jsx_runtime.JSX.Element;
279
+
280
+ interface ChatMessageProps {
281
+ message: UIMessage;
282
+ isStreaming?: boolean;
283
+ variant?: "default" | "compact";
284
+ /** Callback when user wants to retry/regenerate an AI response */
285
+ onRetry?: () => void;
286
+ /** Callback when user edits their message - receives the new text */
287
+ onEdit?: (newText: string) => void;
288
+ /** Whether retry is currently in progress */
289
+ isRetrying?: boolean;
290
+ }
291
+ declare function ChatMessage({ message, isStreaming, variant, onRetry, onEdit, isRetrying, }: ChatMessageProps): react_jsx_runtime.JSX.Element;
292
+
293
+ /** Represents an attached file with metadata */
294
+ interface AttachedFile {
295
+ /** Data URL or uploaded URL */
296
+ url: string;
297
+ /** MIME type of the file */
298
+ mediaType: string;
299
+ /** Original filename */
300
+ filename: string;
301
+ }
302
+ interface ChatInputProps {
303
+ input?: string;
304
+ handleInputChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
305
+ handleSubmit: (e: FormEvent<HTMLFormElement>, files?: AttachedFile[]) => void;
306
+ isLoading: boolean;
307
+ placeholder?: string;
308
+ variant?: "default" | "compact";
309
+ /** Callback when files are attached (for controlled mode) */
310
+ onFilesAttached?: (files: AttachedFile[]) => void;
311
+ /** Attached files (for controlled mode) */
312
+ attachedFiles?: AttachedFile[];
313
+ }
314
+ declare function ChatInput({ input, handleInputChange, handleSubmit, isLoading, placeholder, variant, onFilesAttached, attachedFiles: controlledFiles, }: ChatInputProps): react_jsx_runtime.JSX.Element;
315
+
316
+ /**
317
+ * Default tool call display component.
318
+ * Shows an accordion with tool name, status, inputs, and outputs.
319
+ */
320
+ declare function ToolCallDisplay({ toolCallId, toolName, state, input, output, errorText, isLoading, }: ToolCallProps): react_jsx_runtime.JSX.Element;
321
+
322
+ export { ChatInterface as C, DEFAULT_ALLOWED_FILE_TYPES as D, ChatLayout as e, ChatSidebar as g, ChatMessage as h, ChatInput as i, ToolCallDisplay as j };
323
+ export type { AiChatMode as A, ToolCallProps as T, AiChatPluginOverrides as a, AllowedFileType as b, ToolCallState as c, ToolCallRenderer as d, ChatLayoutProps as f };