@btst/stack 1.3.0 → 1.4.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.
Files changed (241) hide show
  1. package/README.md +85 -37
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
  26. 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
  27. 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
  28. 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
  29. 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
  30. 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
  31. 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
  32. 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
  33. 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
  34. 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
  35. 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
  36. 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
  37. 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
  38. 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
  39. 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
  40. 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
  41. 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
  42. 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
  43. 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
  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/medium.cjs +1 -1
  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/medium.mjs +1 -1
  46. 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
  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/sidecar.mjs +1 -1
  48. package/dist/packages/better-stack/src/plugins/ai-chat/api/plugin.cjs +610 -0
  49. package/dist/packages/better-stack/src/plugins/ai-chat/api/plugin.mjs +608 -0
  50. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-input.cjs +221 -0
  51. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-input.mjs +219 -0
  52. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.cjs +315 -0
  53. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.mjs +313 -0
  54. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-layout.cjs +122 -0
  55. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-layout.mjs +120 -0
  56. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-message.cjs +397 -0
  57. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-message.mjs +391 -0
  58. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-sidebar.cjs +227 -0
  59. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-sidebar.mjs +225 -0
  60. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/chat-page-skeleton.cjs +31 -0
  61. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/chat-page-skeleton.mjs +29 -0
  62. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/index.cjs +11 -0
  63. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/index.mjs +8 -0
  64. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/404-page.cjs +18 -0
  65. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/404-page.mjs +16 -0
  66. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.cjs +39 -0
  67. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.internal.cjs +22 -0
  68. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.internal.mjs +20 -0
  69. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.mjs +37 -0
  70. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/default-error.cjs +18 -0
  71. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/default-error.mjs +16 -0
  72. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/error-placeholder.cjs +26 -0
  73. package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/error-placeholder.mjs +24 -0
  74. package/dist/packages/better-stack/src/plugins/ai-chat/client/hooks/chat-hooks.cjs +199 -0
  75. package/dist/packages/better-stack/src/plugins/ai-chat/client/hooks/chat-hooks.mjs +191 -0
  76. package/dist/packages/better-stack/src/plugins/ai-chat/client/localization/index.cjs +63 -0
  77. package/dist/packages/better-stack/src/plugins/ai-chat/client/localization/index.mjs +61 -0
  78. package/dist/packages/better-stack/src/plugins/ai-chat/client/overrides.cjs +14 -0
  79. package/dist/packages/better-stack/src/plugins/ai-chat/client/overrides.mjs +11 -0
  80. package/dist/packages/better-stack/src/plugins/ai-chat/client/plugin.cjs +241 -0
  81. package/dist/packages/better-stack/src/plugins/ai-chat/client/plugin.mjs +239 -0
  82. package/dist/packages/better-stack/src/plugins/ai-chat/db.cjs +65 -0
  83. package/dist/packages/better-stack/src/plugins/ai-chat/db.mjs +63 -0
  84. package/dist/packages/better-stack/src/plugins/ai-chat/schemas.cjs +42 -0
  85. package/dist/packages/better-stack/src/plugins/ai-chat/schemas.mjs +38 -0
  86. package/dist/packages/better-stack/src/plugins/blog/api/plugin.cjs +8 -2
  87. package/dist/packages/better-stack/src/plugins/blog/api/plugin.mjs +8 -2
  88. package/dist/packages/better-stack/src/plugins/blog/client/components/pages/post-page.internal.cjs +1 -1
  89. package/dist/packages/better-stack/src/plugins/blog/client/components/pages/post-page.internal.mjs +1 -1
  90. package/dist/packages/better-stack/src/plugins/blog/client/components/shared/markdown-content.cjs +12 -309
  91. package/dist/packages/better-stack/src/plugins/blog/client/components/shared/markdown-content.mjs +13 -303
  92. package/dist/packages/better-stack/src/plugins/blog/client/components/shared/on-this-page.cjs +1 -1
  93. package/dist/packages/better-stack/src/plugins/blog/client/components/shared/on-this-page.mjs +1 -1
  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/better-stack/src/plugins/blog/client/components/shared/recent-posts-carousel.cjs +2 -2
  97. package/dist/packages/better-stack/src/plugins/blog/client/components/shared/recent-posts-carousel.mjs +2 -2
  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 +27 -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 +11 -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 +19 -0
  130. package/dist/plugins/ai-chat/client/index.d.cts +327 -0
  131. package/dist/plugins/ai-chat/client/index.d.mts +327 -0
  132. package/dist/plugins/ai-chat/client/index.d.ts +327 -0
  133. package/dist/plugins/ai-chat/client/index.mjs +7 -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 +85 -62
  145. package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
  146. package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
  147. package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
  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 +2 -2
  152. package/dist/plugins/blog/query-keys.d.mts +2 -2
  153. package/dist/plugins/blog/query-keys.d.ts +2 -2
  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.DorMi9CZ.d.cts +80 -0
  158. package/dist/shared/stack.DorMi9CZ.d.mts +80 -0
  159. package/dist/shared/stack.DorMi9CZ.d.ts +80 -0
  160. package/package.json +61 -3
  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 +455 -0
  165. package/src/plugins/ai-chat/client/components/chat-layout.tsx +160 -0
  166. package/src/plugins/ai-chat/client/components/chat-message.tsx +505 -0
  167. package/src/plugins/ai-chat/client/components/chat-sidebar.tsx +296 -0
  168. package/src/plugins/ai-chat/client/components/index.ts +16 -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/hooks/chat-hooks.tsx +349 -0
  177. package/src/plugins/ai-chat/client/hooks/index.tsx +1 -0
  178. package/src/plugins/ai-chat/client/index.ts +14 -0
  179. package/src/plugins/ai-chat/client/localization/index.ts +156 -0
  180. package/src/plugins/ai-chat/client/overrides.ts +170 -0
  181. package/src/plugins/ai-chat/client/plugin.tsx +449 -0
  182. package/src/plugins/ai-chat/client.css +6 -0
  183. package/src/plugins/ai-chat/db.ts +65 -0
  184. package/src/plugins/ai-chat/query-keys.ts +87 -0
  185. package/src/plugins/ai-chat/schemas.ts +40 -0
  186. package/src/plugins/ai-chat/style.css +19 -0
  187. package/src/plugins/ai-chat/types.ts +29 -0
  188. package/src/plugins/blog/api/plugin.ts +10 -4
  189. package/src/plugins/blog/client/components/pages/post-page.internal.tsx +1 -1
  190. package/src/plugins/blog/client/components/shared/markdown-content-styles.css +85 -62
  191. package/src/plugins/blog/client/components/shared/markdown-content.tsx +19 -427
  192. package/src/plugins/blog/client/components/shared/on-this-page.tsx +1 -1
  193. package/src/plugins/blog/client/components/shared/page-wrapper.tsx +2 -2
  194. package/src/plugins/blog/client/components/shared/recent-posts-carousel.tsx +2 -2
  195. 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
  196. package/src/plugins/blog/client/components/shared/better-blog-attribution.tsx +0 -19
  197. 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
  198. 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
  199. 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
  200. 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
  201. 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
  202. 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
  203. 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
  204. 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
  205. 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
  206. 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
  207. 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
  208. 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
  209. 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
  210. 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
  211. 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
  212. 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
  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/constants.cjs +0 -0
  214. 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
  215. 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
  216. 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
  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/Combination.cjs +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/Combination.mjs +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/aggresiveCapture.cjs +0 -0
  220. 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
  221. 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
  222. 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
  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/component.cjs +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/component.mjs +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/hook.cjs +0 -0
  226. 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
  227. 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
  228. 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
  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/assignRef.cjs +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/assignRef.mjs +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/useMergeRef.cjs +0 -0
  232. 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
  233. 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
  234. 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
  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/exports.cjs +0 -0
  236. 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
  237. 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
  238. 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
  239. package/dist/shared/{stack.DLhzx1-D.d.ts → stack.CcI4sYJP.d.cts} +1 -1
  240. package/dist/shared/{stack.DLhzx1-D.d.cts → stack.CcI4sYJP.d.mts} +1 -1
  241. package/dist/shared/{stack.DLhzx1-D.d.mts → stack.CcI4sYJP.d.ts} +1 -1
@@ -0,0 +1,225 @@
1
+ "use client";
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { useState } from 'react';
4
+ import { Button } from '../../../../../../ui/src/components/button.mjs';
5
+ import { Input } from '../../../../../../ui/src/components/input.mjs';
6
+ import { ScrollArea } from '../../../../../../ui/src/components/scroll-area.mjs';
7
+ import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from '../../../../../../ui/src/components/dropdown-menu.mjs';
8
+ import { AlertDialog, AlertDialogContent, AlertDialogHeader, AlertDialogTitle, AlertDialogDescription, AlertDialogFooter, AlertDialogCancel, AlertDialogAction } from '../../../../../../ui/src/components/alert-dialog.mjs';
9
+ import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from '../../../../../../ui/src/components/dialog.mjs';
10
+ import { MessageSquarePlus, MessageSquare, MoreHorizontal, Pencil, Trash2 } from 'lucide-react';
11
+ import { cn } from '../../../../../../ui/src/lib/utils.mjs';
12
+ import { usePluginOverrides, useBasePath } from '@btst/stack/context';
13
+ import { useConversations, useRenameConversation, useDeleteConversation } from '../hooks/chat-hooks.mjs';
14
+ import { AI_CHAT_LOCALIZATION } from '../localization/index.mjs';
15
+
16
+ function ChatSidebar({
17
+ currentConversationId,
18
+ onNewChat,
19
+ className
20
+ }) {
21
+ const { navigate, localization: customLocalization } = usePluginOverrides("ai-chat", {});
22
+ const basePath = useBasePath();
23
+ const localization = { ...AI_CHAT_LOCALIZATION, ...customLocalization };
24
+ const { conversations, isLoading } = useConversations();
25
+ const renameMutation = useRenameConversation();
26
+ const deleteMutation = useDeleteConversation();
27
+ const [renameDialogOpen, setRenameDialogOpen] = useState(false);
28
+ const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);
29
+ const [selectedConversation, setSelectedConversation] = useState(null);
30
+ const [newTitle, setNewTitle] = useState("");
31
+ const handleNewChat = () => {
32
+ if (navigate) {
33
+ navigate(`${basePath}/chat`);
34
+ }
35
+ if (onNewChat) {
36
+ onNewChat();
37
+ }
38
+ };
39
+ const handleConversationClick = (conversation) => {
40
+ if (navigate) {
41
+ navigate(`${basePath}/chat/${conversation.id}`);
42
+ }
43
+ };
44
+ const handleRenameClick = (conversation) => {
45
+ setSelectedConversation(conversation);
46
+ setNewTitle(conversation.title);
47
+ setRenameDialogOpen(true);
48
+ };
49
+ const handleDeleteClick = (conversation) => {
50
+ setSelectedConversation(conversation);
51
+ setDeleteDialogOpen(true);
52
+ };
53
+ const handleRenameConfirm = async () => {
54
+ if (selectedConversation && newTitle.trim()) {
55
+ await renameMutation.mutateAsync({
56
+ id: selectedConversation.id,
57
+ title: newTitle.trim()
58
+ });
59
+ setRenameDialogOpen(false);
60
+ setSelectedConversation(null);
61
+ setNewTitle("");
62
+ }
63
+ };
64
+ const handleDeleteConfirm = async () => {
65
+ if (selectedConversation) {
66
+ await deleteMutation.mutateAsync({ id: selectedConversation.id });
67
+ setDeleteDialogOpen(false);
68
+ setSelectedConversation(null);
69
+ if (selectedConversation.id === currentConversationId && navigate) {
70
+ navigate(`${basePath}/chat`);
71
+ }
72
+ }
73
+ };
74
+ const formatDate = (dateString) => {
75
+ const date = new Date(dateString);
76
+ const now = /* @__PURE__ */ new Date();
77
+ const diffMs = now.getTime() - date.getTime();
78
+ const diffMins = Math.floor(diffMs / 6e4);
79
+ const diffHours = Math.floor(diffMs / 36e5);
80
+ const diffDays = Math.floor(diffMs / 864e5);
81
+ if (diffMins < 1) return localization.TIME_JUST_NOW;
82
+ if (diffMins < 60)
83
+ return localization.TIME_MINUTES_AGO.replace("{count}", String(diffMins));
84
+ if (diffHours < 24)
85
+ return localization.TIME_HOURS_AGO.replace("{count}", String(diffHours));
86
+ if (diffDays === 1) return localization.TIME_YESTERDAY;
87
+ if (diffDays < 7)
88
+ return localization.TIME_DAYS_AGO.replace("{count}", String(diffDays));
89
+ return date.toLocaleDateString();
90
+ };
91
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col h-full bg-muted/30 border-r", className), children: [
92
+ /* @__PURE__ */ jsx("div", { className: "p-4 border-b", children: /* @__PURE__ */ jsxs(
93
+ Button,
94
+ {
95
+ onClick: handleNewChat,
96
+ className: "w-full justify-start gap-2",
97
+ variant: "outline",
98
+ children: [
99
+ /* @__PURE__ */ jsx(MessageSquarePlus, { className: "h-4 w-4" }),
100
+ localization.SIDEBAR_NEW_CHAT
101
+ ]
102
+ }
103
+ ) }),
104
+ /* @__PURE__ */ jsx(ScrollArea, { className: "flex-1", children: /* @__PURE__ */ jsx("div", { className: "p-2", children: isLoading ? /* @__PURE__ */ jsx("div", { className: "p-4 text-center text-sm text-muted-foreground", children: localization.CHAT_LOADING }) : conversations.length === 0 ? /* @__PURE__ */ jsx("div", { className: "p-4 text-center text-sm text-muted-foreground", children: localization.SIDEBAR_NO_CONVERSATIONS }) : /* @__PURE__ */ jsx("div", { className: "space-y-1", children: conversations.map((conversation) => /* @__PURE__ */ jsxs(
105
+ "div",
106
+ {
107
+ className: cn(
108
+ "group flex items-center gap-2 rounded-lg px-3 py-2 hover:bg-accent cursor-pointer transition-colors overflow-hidden",
109
+ currentConversationId === conversation.id && "bg-accent"
110
+ ),
111
+ children: [
112
+ /* @__PURE__ */ jsxs(
113
+ "button",
114
+ {
115
+ type: "button",
116
+ className: "flex-1 flex items-center gap-2 text-left min-w-0 overflow-hidden",
117
+ onClick: () => handleConversationClick(conversation),
118
+ children: [
119
+ /* @__PURE__ */ jsx(MessageSquare, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
120
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0 overflow-hidden", children: [
121
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium truncate", children: conversation.title }),
122
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground truncate", children: formatDate(conversation.updatedAt) })
123
+ ] })
124
+ ]
125
+ }
126
+ ),
127
+ /* @__PURE__ */ jsxs(DropdownMenu, { children: [
128
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
129
+ Button,
130
+ {
131
+ variant: "ghost",
132
+ size: "icon",
133
+ className: "h-8 w-8 opacity-0 group-hover:opacity-100 transition-opacity",
134
+ children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" })
135
+ }
136
+ ) }),
137
+ /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", children: [
138
+ /* @__PURE__ */ jsxs(
139
+ DropdownMenuItem,
140
+ {
141
+ onClick: (e) => {
142
+ e.stopPropagation();
143
+ handleRenameClick(conversation);
144
+ },
145
+ children: [
146
+ /* @__PURE__ */ jsx(Pencil, { className: "h-4 w-4 mr-2" }),
147
+ localization.CONVERSATION_RENAME
148
+ ]
149
+ }
150
+ ),
151
+ /* @__PURE__ */ jsxs(
152
+ DropdownMenuItem,
153
+ {
154
+ onClick: (e) => {
155
+ e.stopPropagation();
156
+ handleDeleteClick(conversation);
157
+ },
158
+ className: "text-destructive focus:text-destructive",
159
+ children: [
160
+ /* @__PURE__ */ jsx(Trash2, { className: "h-4 w-4 mr-2" }),
161
+ localization.CONVERSATION_DELETE
162
+ ]
163
+ }
164
+ )
165
+ ] })
166
+ ] })
167
+ ]
168
+ },
169
+ conversation.id
170
+ )) }) }) }),
171
+ /* @__PURE__ */ jsx(Dialog, { open: renameDialogOpen, onOpenChange: setRenameDialogOpen, children: /* @__PURE__ */ jsxs(DialogContent, { children: [
172
+ /* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: localization.CONVERSATION_RENAME }) }),
173
+ /* @__PURE__ */ jsx(
174
+ Input,
175
+ {
176
+ value: newTitle,
177
+ onChange: (e) => setNewTitle(e.target.value),
178
+ placeholder: localization.CONVERSATION_RENAME_PLACEHOLDER,
179
+ onKeyDown: (e) => {
180
+ if (e.key === "Enter") {
181
+ void handleRenameConfirm();
182
+ }
183
+ }
184
+ }
185
+ ),
186
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [
187
+ /* @__PURE__ */ jsx(
188
+ Button,
189
+ {
190
+ variant: "outline",
191
+ onClick: () => setRenameDialogOpen(false),
192
+ children: localization.CONVERSATION_RENAME_CANCEL
193
+ }
194
+ ),
195
+ /* @__PURE__ */ jsx(
196
+ Button,
197
+ {
198
+ onClick: handleRenameConfirm,
199
+ disabled: !newTitle.trim() || renameMutation.isPending,
200
+ children: localization.CONVERSATION_RENAME_SAVE
201
+ }
202
+ )
203
+ ] })
204
+ ] }) }),
205
+ /* @__PURE__ */ jsx(AlertDialog, { open: deleteDialogOpen, onOpenChange: setDeleteDialogOpen, children: /* @__PURE__ */ jsxs(AlertDialogContent, { children: [
206
+ /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [
207
+ /* @__PURE__ */ jsx(AlertDialogTitle, { children: localization.CONVERSATION_DELETE_CONFIRM_TITLE }),
208
+ /* @__PURE__ */ jsx(AlertDialogDescription, { children: localization.CONVERSATION_DELETE_CONFIRM_DESCRIPTION })
209
+ ] }),
210
+ /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [
211
+ /* @__PURE__ */ jsx(AlertDialogCancel, { children: localization.CONVERSATION_DELETE_CANCEL }),
212
+ /* @__PURE__ */ jsx(
213
+ AlertDialogAction,
214
+ {
215
+ onClick: handleDeleteConfirm,
216
+ className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
217
+ children: localization.CONVERSATION_DELETE_CONFIRM_BUTTON
218
+ }
219
+ )
220
+ ] })
221
+ ] }) })
222
+ ] });
223
+ }
224
+
225
+ export { ChatSidebar };
@@ -0,0 +1,31 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ const jsxRuntime = require('react/jsx-runtime');
5
+ const skeleton = require('../../../../../../../ui/src/components/skeleton.cjs');
6
+
7
+ function ChatPageSkeleton() {
8
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-[calc(100vh-4rem)] w-full overflow-hidden", children: [
9
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden md:flex w-72 flex-col border-r bg-muted/30", children: [
10
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 border-b", children: /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-10 w-full" }) }),
11
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 p-2 space-y-2", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 p-3", children: [
12
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-4 shrink-0" }),
13
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-1.5", children: [
14
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-full" }),
15
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-3 w-20" })
16
+ ] })
17
+ ] }, i)) })
18
+ ] }),
19
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 flex flex-col min-w-0", children: [
20
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 p-2 border-b", children: [
21
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-9 w-9 md:hidden" }),
22
+ /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-9 w-9 hidden md:block" }),
23
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1" })
24
+ ] }),
25
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 p-4 space-y-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-3xl mx-auto w-full space-y-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-center justify-center h-full min-h-[300px]", children: /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-48" }) }) }) }),
26
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t p-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-3xl mx-auto", children: /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-12 w-full rounded-lg" }) }) })
27
+ ] })
28
+ ] });
29
+ }
30
+
31
+ exports.ChatPageSkeleton = ChatPageSkeleton;
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { Skeleton } from '../../../../../../../ui/src/components/skeleton.mjs';
4
+
5
+ function ChatPageSkeleton() {
6
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-[calc(100vh-4rem)] w-full overflow-hidden", children: [
7
+ /* @__PURE__ */ jsxs("div", { className: "hidden md:flex w-72 flex-col border-r bg-muted/30", children: [
8
+ /* @__PURE__ */ jsx("div", { className: "p-4 border-b", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-10 w-full" }) }),
9
+ /* @__PURE__ */ jsx("div", { className: "flex-1 p-2 space-y-2", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 p-3", children: [
10
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4 shrink-0" }),
11
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-1.5", children: [
12
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-full" }),
13
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-20" })
14
+ ] })
15
+ ] }, i)) })
16
+ ] }),
17
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col min-w-0", children: [
18
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 p-2 border-b", children: [
19
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-9 md:hidden" }),
20
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-9 hidden md:block" }),
21
+ /* @__PURE__ */ jsx("div", { className: "flex-1" })
22
+ ] }),
23
+ /* @__PURE__ */ jsx("div", { className: "flex-1 p-4 space-y-4", children: /* @__PURE__ */ jsx("div", { className: "max-w-3xl mx-auto w-full space-y-4", children: /* @__PURE__ */ jsx("div", { className: "flex flex-col items-center justify-center h-full min-h-[300px]", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-48" }) }) }) }),
24
+ /* @__PURE__ */ jsx("div", { className: "border-t p-4", children: /* @__PURE__ */ jsx("div", { className: "max-w-3xl mx-auto", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-12 w-full rounded-lg" }) }) })
25
+ ] })
26
+ ] });
27
+ }
28
+
29
+ export { ChatPageSkeleton };
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ const jsxRuntime = require('react/jsx-runtime');
4
+ const chatPageSkeleton = require('./chat-page-skeleton.cjs');
5
+
6
+ function ChatLoading() {
7
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "chat-skeleton", children: /* @__PURE__ */ jsxRuntime.jsx(chatPageSkeleton.ChatPageSkeleton, {}) });
8
+ }
9
+
10
+ exports.ChatPageSkeleton = chatPageSkeleton.ChatPageSkeleton;
11
+ exports.ChatLoading = ChatLoading;
@@ -0,0 +1,8 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { ChatPageSkeleton } from './chat-page-skeleton.mjs';
3
+
4
+ function ChatLoading() {
5
+ return /* @__PURE__ */ jsx("div", { "data-testid": "chat-skeleton", children: /* @__PURE__ */ jsx(ChatPageSkeleton, {}) });
6
+ }
7
+
8
+ export { ChatLoading, ChatPageSkeleton };
@@ -0,0 +1,18 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ const jsxRuntime = require('react/jsx-runtime');
5
+ const context = require('@btst/stack/context');
6
+ const errorPlaceholder = require('../shared/error-placeholder.cjs');
7
+ const index = require('../../localization/index.cjs');
8
+
9
+ function NotFoundPage({ message }) {
10
+ const { localization } = context.usePluginOverrides("ai-chat", {
11
+ localization: index.AI_CHAT_LOCALIZATION
12
+ });
13
+ const title = localization?.CHAT_PAGE_NOT_FOUND_TITLE ?? index.AI_CHAT_LOCALIZATION.CHAT_PAGE_NOT_FOUND_TITLE;
14
+ const desc = message || (localization?.CHAT_PAGE_NOT_FOUND_DESCRIPTION ?? index.AI_CHAT_LOCALIZATION.CHAT_PAGE_NOT_FOUND_DESCRIPTION);
15
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "404-page", className: "flex flex-col h-[calc(100vh-4rem)]", children: /* @__PURE__ */ jsxRuntime.jsx(errorPlaceholder.ErrorPlaceholder, { title, message: desc }) });
16
+ }
17
+
18
+ exports.NotFoundPage = NotFoundPage;
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { usePluginOverrides } from '@btst/stack/context';
4
+ import { ErrorPlaceholder } from '../shared/error-placeholder.mjs';
5
+ import { AI_CHAT_LOCALIZATION } from '../../localization/index.mjs';
6
+
7
+ function NotFoundPage({ message }) {
8
+ const { localization } = usePluginOverrides("ai-chat", {
9
+ localization: AI_CHAT_LOCALIZATION
10
+ });
11
+ const title = localization?.CHAT_PAGE_NOT_FOUND_TITLE ?? AI_CHAT_LOCALIZATION.CHAT_PAGE_NOT_FOUND_TITLE;
12
+ const desc = message || (localization?.CHAT_PAGE_NOT_FOUND_DESCRIPTION ?? AI_CHAT_LOCALIZATION.CHAT_PAGE_NOT_FOUND_DESCRIPTION);
13
+ return /* @__PURE__ */ jsx("div", { "data-testid": "404-page", className: "flex flex-col h-[calc(100vh-4rem)]", children: /* @__PURE__ */ jsx(ErrorPlaceholder, { title, message: desc }) });
14
+ }
15
+
16
+ export { NotFoundPage };
@@ -0,0 +1,39 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ const jsxRuntime = require('react/jsx-runtime');
5
+ const React = require('react');
6
+ const context = require('@btst/stack/context');
7
+ const components = require('@btst/stack/client/components');
8
+ const defaultError = require('../shared/default-error.cjs');
9
+ const index = require('../loading/index.cjs');
10
+ const _404Page = require('./404-page.cjs');
11
+
12
+ const ChatPage = React.lazy(
13
+ () => import('./chat-page.internal.cjs').then((m) => ({ default: m.ChatPage }))
14
+ );
15
+ function ChatPageComponent({ conversationId }) {
16
+ const { onRouteError } = context.usePluginOverrides("ai-chat", {});
17
+ return /* @__PURE__ */ jsxRuntime.jsx(
18
+ components.ComposedRoute,
19
+ {
20
+ path: conversationId ? `/chat/${conversationId}` : "/chat",
21
+ PageComponent: ChatPage,
22
+ ErrorComponent: defaultError.DefaultError,
23
+ LoadingComponent: index.ChatLoading,
24
+ NotFoundComponent: _404Page.NotFoundPage,
25
+ props: { conversationId },
26
+ onError: (error) => {
27
+ if (onRouteError) {
28
+ onRouteError(conversationId ? "chatConversation" : "chat", error, {
29
+ path: conversationId ? `/chat/${conversationId}` : "/chat",
30
+ isSSR: typeof window === "undefined",
31
+ params: conversationId ? { id: conversationId } : void 0
32
+ });
33
+ }
34
+ }
35
+ }
36
+ );
37
+ }
38
+
39
+ exports.ChatPageComponent = ChatPageComponent;
@@ -0,0 +1,22 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ const jsxRuntime = require('react/jsx-runtime');
5
+ const chatLayout = require('../chat-layout.cjs');
6
+ const context = require('@btst/stack/context');
7
+
8
+ function ChatPage({ conversationId }) {
9
+ const { apiBaseURL, apiBasePath, mode } = context.usePluginOverrides("ai-chat", {});
10
+ const showSidebar = mode !== "public";
11
+ return /* @__PURE__ */ jsxRuntime.jsx(
12
+ chatLayout.ChatLayout,
13
+ {
14
+ apiBaseURL: apiBaseURL ?? "",
15
+ apiBasePath: apiBasePath ?? "",
16
+ conversationId,
17
+ showSidebar
18
+ }
19
+ );
20
+ }
21
+
22
+ exports.ChatPage = ChatPage;
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { ChatLayout } from '../chat-layout.mjs';
4
+ import { usePluginOverrides } from '@btst/stack/context';
5
+
6
+ function ChatPage({ conversationId }) {
7
+ const { apiBaseURL, apiBasePath, mode } = usePluginOverrides("ai-chat", {});
8
+ const showSidebar = mode !== "public";
9
+ return /* @__PURE__ */ jsx(
10
+ ChatLayout,
11
+ {
12
+ apiBaseURL: apiBaseURL ?? "",
13
+ apiBasePath: apiBasePath ?? "",
14
+ conversationId,
15
+ showSidebar
16
+ }
17
+ );
18
+ }
19
+
20
+ export { ChatPage };
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { lazy } from 'react';
4
+ import { usePluginOverrides } from '@btst/stack/context';
5
+ import { ComposedRoute } from '@btst/stack/client/components';
6
+ import { DefaultError } from '../shared/default-error.mjs';
7
+ import { ChatLoading } from '../loading/index.mjs';
8
+ import { NotFoundPage } from './404-page.mjs';
9
+
10
+ const ChatPage = lazy(
11
+ () => import('./chat-page.internal.mjs').then((m) => ({ default: m.ChatPage }))
12
+ );
13
+ function ChatPageComponent({ conversationId }) {
14
+ const { onRouteError } = usePluginOverrides("ai-chat", {});
15
+ return /* @__PURE__ */ jsx(
16
+ ComposedRoute,
17
+ {
18
+ path: conversationId ? `/chat/${conversationId}` : "/chat",
19
+ PageComponent: ChatPage,
20
+ ErrorComponent: DefaultError,
21
+ LoadingComponent: ChatLoading,
22
+ NotFoundComponent: NotFoundPage,
23
+ props: { conversationId },
24
+ onError: (error) => {
25
+ if (onRouteError) {
26
+ onRouteError(conversationId ? "chatConversation" : "chat", error, {
27
+ path: conversationId ? `/chat/${conversationId}` : "/chat",
28
+ isSSR: typeof window === "undefined",
29
+ params: conversationId ? { id: conversationId } : void 0
30
+ });
31
+ }
32
+ }
33
+ }
34
+ );
35
+ }
36
+
37
+ export { ChatPageComponent };
@@ -0,0 +1,18 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ const jsxRuntime = require('react/jsx-runtime');
5
+ const errorPlaceholder = require('./error-placeholder.cjs');
6
+ const context = require('@btst/stack/context');
7
+ const index = require('../../localization/index.cjs');
8
+
9
+ function DefaultError({ error }) {
10
+ const { localization } = context.usePluginOverrides("ai-chat", {
11
+ localization: index.AI_CHAT_LOCALIZATION
12
+ });
13
+ const title = localization?.CHAT_GENERIC_ERROR_TITLE ?? index.AI_CHAT_LOCALIZATION.CHAT_GENERIC_ERROR_TITLE;
14
+ const message = process.env.NODE_ENV === "production" ? localization?.CHAT_GENERIC_ERROR_MESSAGE ?? index.AI_CHAT_LOCALIZATION.CHAT_GENERIC_ERROR_MESSAGE : error?.message ?? localization?.CHAT_GENERIC_ERROR_MESSAGE ?? index.AI_CHAT_LOCALIZATION.CHAT_GENERIC_ERROR_MESSAGE;
15
+ return /* @__PURE__ */ jsxRuntime.jsx(errorPlaceholder.ErrorPlaceholder, { title, message });
16
+ }
17
+
18
+ exports.DefaultError = DefaultError;
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { ErrorPlaceholder } from './error-placeholder.mjs';
4
+ import { usePluginOverrides } from '@btst/stack/context';
5
+ import { AI_CHAT_LOCALIZATION } from '../../localization/index.mjs';
6
+
7
+ function DefaultError({ error }) {
8
+ const { localization } = usePluginOverrides("ai-chat", {
9
+ localization: AI_CHAT_LOCALIZATION
10
+ });
11
+ const title = localization?.CHAT_GENERIC_ERROR_TITLE ?? AI_CHAT_LOCALIZATION.CHAT_GENERIC_ERROR_TITLE;
12
+ const message = process.env.NODE_ENV === "production" ? localization?.CHAT_GENERIC_ERROR_MESSAGE ?? AI_CHAT_LOCALIZATION.CHAT_GENERIC_ERROR_MESSAGE : error?.message ?? localization?.CHAT_GENERIC_ERROR_MESSAGE ?? AI_CHAT_LOCALIZATION.CHAT_GENERIC_ERROR_MESSAGE;
13
+ return /* @__PURE__ */ jsx(ErrorPlaceholder, { title, message });
14
+ }
15
+
16
+ export { DefaultError };
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ const jsxRuntime = require('react/jsx-runtime');
4
+ const lucideReact = require('lucide-react');
5
+
6
+ function ErrorPlaceholder({
7
+ title,
8
+ message
9
+ }) {
10
+ return /* @__PURE__ */ jsxRuntime.jsxs(
11
+ "div",
12
+ {
13
+ className: "flex min-h-[400px] flex-col items-center justify-center gap-6 p-8",
14
+ "data-testid": "error-placeholder",
15
+ children: [
16
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CloudAlert, { className: "size-16 text-muted-foreground" }),
17
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center space-y-2", children: [
18
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-semibold", children: title }),
19
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground max-w-md", children: message })
20
+ ] })
21
+ ]
22
+ }
23
+ );
24
+ }
25
+
26
+ exports.ErrorPlaceholder = ErrorPlaceholder;
@@ -0,0 +1,24 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { CloudAlert } from 'lucide-react';
3
+
4
+ function ErrorPlaceholder({
5
+ title,
6
+ message
7
+ }) {
8
+ return /* @__PURE__ */ jsxs(
9
+ "div",
10
+ {
11
+ className: "flex min-h-[400px] flex-col items-center justify-center gap-6 p-8",
12
+ "data-testid": "error-placeholder",
13
+ children: [
14
+ /* @__PURE__ */ jsx(CloudAlert, { className: "size-16 text-muted-foreground" }),
15
+ /* @__PURE__ */ jsxs("div", { className: "text-center space-y-2", children: [
16
+ /* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold", children: title }),
17
+ /* @__PURE__ */ jsx("p", { className: "text-muted-foreground max-w-md", children: message })
18
+ ] })
19
+ ]
20
+ }
21
+ );
22
+ }
23
+
24
+ export { ErrorPlaceholder };