@btst/stack 1.3.1 → 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 (229) 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/client/components/shared/markdown-content.cjs +12 -309
  87. package/dist/packages/better-stack/src/plugins/blog/client/components/shared/markdown-content.mjs +13 -303
  88. package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.cjs +2 -2
  89. package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.mjs +2 -2
  90. package/dist/packages/ui/src/components/alert-dialog.cjs +1 -1
  91. package/dist/packages/ui/src/components/alert-dialog.mjs +1 -1
  92. package/dist/packages/{better-stack/src/plugins/blog/client/components/shared/better-blog-attribution.cjs → ui/src/components/better-stack-attribution.cjs} +3 -3
  93. package/dist/packages/{better-stack/src/plugins/blog/client/components/shared/better-blog-attribution.mjs → ui/src/components/better-stack-attribution.mjs} +3 -3
  94. package/dist/packages/ui/src/components/dialog.cjs +14 -0
  95. package/dist/packages/ui/src/components/dialog.mjs +14 -1
  96. package/dist/packages/ui/src/components/dropdown-menu.cjs +67 -0
  97. package/dist/packages/ui/src/components/dropdown-menu.mjs +62 -0
  98. package/dist/packages/ui/src/components/markdown-content.cjs +306 -0
  99. package/dist/packages/ui/src/components/markdown-content.mjs +297 -0
  100. package/dist/packages/ui/src/components/scroll-area.cjs +63 -0
  101. package/dist/packages/ui/src/components/scroll-area.mjs +60 -0
  102. package/dist/packages/ui/src/components/select.cjs +1 -1
  103. package/dist/packages/ui/src/components/select.mjs +1 -1
  104. package/dist/packages/ui/src/components/sheet.cjs +87 -0
  105. package/dist/packages/ui/src/components/sheet.mjs +69 -0
  106. package/dist/plugins/ai-chat/api/index.cjs +9 -0
  107. package/dist/plugins/ai-chat/api/index.d.cts +9 -0
  108. package/dist/plugins/ai-chat/api/index.d.mts +9 -0
  109. package/dist/plugins/ai-chat/api/index.d.ts +9 -0
  110. package/dist/plugins/ai-chat/api/index.mjs +2 -0
  111. package/dist/plugins/ai-chat/client/components/index.cjs +27 -0
  112. package/dist/plugins/ai-chat/client/components/index.d.cts +30 -0
  113. package/dist/plugins/ai-chat/client/components/index.d.mts +30 -0
  114. package/dist/plugins/ai-chat/client/components/index.d.ts +30 -0
  115. package/dist/plugins/ai-chat/client/components/index.mjs +11 -0
  116. package/dist/plugins/ai-chat/client/hooks/index.cjs +13 -0
  117. package/dist/plugins/ai-chat/client/hooks/index.d.cts +98 -0
  118. package/dist/plugins/ai-chat/client/hooks/index.d.mts +98 -0
  119. package/dist/plugins/ai-chat/client/hooks/index.d.ts +98 -0
  120. package/dist/plugins/ai-chat/client/hooks/index.mjs +1 -0
  121. package/dist/plugins/ai-chat/client/index.cjs +19 -0
  122. package/dist/plugins/ai-chat/client/index.d.cts +327 -0
  123. package/dist/plugins/ai-chat/client/index.d.mts +327 -0
  124. package/dist/plugins/ai-chat/client/index.d.ts +327 -0
  125. package/dist/plugins/ai-chat/client/index.mjs +7 -0
  126. package/dist/plugins/ai-chat/client.css +6 -0
  127. package/dist/plugins/ai-chat/query-keys.cjs +60 -0
  128. package/dist/plugins/ai-chat/query-keys.d.cts +478 -0
  129. package/dist/plugins/ai-chat/query-keys.d.mts +478 -0
  130. package/dist/plugins/ai-chat/query-keys.d.ts +478 -0
  131. package/dist/plugins/ai-chat/query-keys.mjs +58 -0
  132. package/dist/plugins/ai-chat/style.css +19 -0
  133. package/dist/plugins/blog/api/index.d.cts +1 -1
  134. package/dist/plugins/blog/api/index.d.mts +1 -1
  135. package/dist/plugins/blog/api/index.d.ts +1 -1
  136. package/dist/plugins/blog/client/components/shared/markdown-content-styles.css +85 -62
  137. package/dist/plugins/blog/client/hooks/index.d.cts +4 -4
  138. package/dist/plugins/blog/client/hooks/index.d.mts +4 -4
  139. package/dist/plugins/blog/client/hooks/index.d.ts +4 -4
  140. package/dist/plugins/blog/client/index.d.cts +1 -1
  141. package/dist/plugins/blog/client/index.d.mts +1 -1
  142. package/dist/plugins/blog/client/index.d.ts +1 -1
  143. package/dist/plugins/blog/query-keys.d.cts +7 -7
  144. package/dist/plugins/blog/query-keys.d.mts +7 -7
  145. package/dist/plugins/blog/query-keys.d.ts +7 -7
  146. package/dist/shared/stack.Be1QIHEn.d.cts +23 -0
  147. package/dist/shared/stack.Be1QIHEn.d.mts +23 -0
  148. package/dist/shared/stack.Be1QIHEn.d.ts +23 -0
  149. package/dist/shared/stack.DorMi9CZ.d.cts +80 -0
  150. package/dist/shared/stack.DorMi9CZ.d.mts +80 -0
  151. package/dist/shared/stack.DorMi9CZ.d.ts +80 -0
  152. package/package.json +59 -1
  153. package/src/plugins/ai-chat/api/index.ts +2 -0
  154. package/src/plugins/ai-chat/api/plugin.ts +1083 -0
  155. package/src/plugins/ai-chat/client/components/chat-input.tsx +295 -0
  156. package/src/plugins/ai-chat/client/components/chat-interface.tsx +455 -0
  157. package/src/plugins/ai-chat/client/components/chat-layout.tsx +160 -0
  158. package/src/plugins/ai-chat/client/components/chat-message.tsx +505 -0
  159. package/src/plugins/ai-chat/client/components/chat-sidebar.tsx +296 -0
  160. package/src/plugins/ai-chat/client/components/index.ts +16 -0
  161. package/src/plugins/ai-chat/client/components/loading/chat-page-skeleton.tsx +57 -0
  162. package/src/plugins/ai-chat/client/components/loading/index.tsx +11 -0
  163. package/src/plugins/ai-chat/client/components/pages/404-page.tsx +27 -0
  164. package/src/plugins/ai-chat/client/components/pages/chat-page.internal.tsx +31 -0
  165. package/src/plugins/ai-chat/client/components/pages/chat-page.tsx +46 -0
  166. package/src/plugins/ai-chat/client/components/shared/default-error.tsx +28 -0
  167. package/src/plugins/ai-chat/client/components/shared/error-placeholder.tsx +22 -0
  168. package/src/plugins/ai-chat/client/hooks/chat-hooks.tsx +349 -0
  169. package/src/plugins/ai-chat/client/hooks/index.tsx +1 -0
  170. package/src/plugins/ai-chat/client/index.ts +14 -0
  171. package/src/plugins/ai-chat/client/localization/index.ts +156 -0
  172. package/src/plugins/ai-chat/client/overrides.ts +170 -0
  173. package/src/plugins/ai-chat/client/plugin.tsx +449 -0
  174. package/src/plugins/ai-chat/client.css +6 -0
  175. package/src/plugins/ai-chat/db.ts +65 -0
  176. package/src/plugins/ai-chat/query-keys.ts +87 -0
  177. package/src/plugins/ai-chat/schemas.ts +40 -0
  178. package/src/plugins/ai-chat/style.css +19 -0
  179. package/src/plugins/ai-chat/types.ts +29 -0
  180. package/src/plugins/blog/client/components/shared/markdown-content-styles.css +85 -62
  181. package/src/plugins/blog/client/components/shared/markdown-content.tsx +19 -427
  182. package/src/plugins/blog/client/components/shared/page-wrapper.tsx +2 -2
  183. 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
  184. package/src/plugins/blog/client/components/shared/better-blog-attribution.tsx +0 -19
  185. 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
  186. 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
  187. 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
  188. 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
  189. 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
  190. 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
  191. 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
  192. 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
  193. 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
  194. 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
  195. 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
  196. 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
  197. 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
  198. 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
  199. 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
  200. 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
  201. 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
  202. 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
  203. 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
  204. 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
  205. 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
  206. 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
  207. 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
  208. 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
  209. 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
  210. 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
  211. 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
  212. 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
  213. 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
  214. 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
  215. 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
  216. 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
  217. 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
  218. 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
  219. 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
  220. 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
  221. 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
  222. 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
  223. 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
  224. 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
  225. 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
  226. 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
  227. package/dist/shared/{stack.CbuN2zVV.d.ts → stack.CcI4sYJP.d.cts} +3 -3
  228. package/dist/shared/{stack.CbuN2zVV.d.cts → stack.CcI4sYJP.d.mts} +3 -3
  229. package/dist/shared/{stack.CbuN2zVV.d.mts → stack.CcI4sYJP.d.ts} +3 -3
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
3
  import { usePluginOverrides } from '@btst/stack/context';
4
- import { BetterBlogAttribution } from './better-blog-attribution.mjs';
4
+ import { BetterStackAttribution } from '../../../../../../../ui/src/components/better-stack-attribution.mjs';
5
5
  import { PageLayout } from './page-layout.mjs';
6
6
 
7
7
  function PageWrapper({
@@ -14,7 +14,7 @@ function PageWrapper({
14
14
  });
15
15
  return /* @__PURE__ */ jsxs(Fragment, { children: [
16
16
  /* @__PURE__ */ jsx(PageLayout, { className, "data-testid": testId, children }),
17
- showAttribution && /* @__PURE__ */ jsx(BetterBlogAttribution, {})
17
+ showAttribution && /* @__PURE__ */ jsx(BetterStackAttribution, {})
18
18
  ] });
19
19
  }
20
20
 
@@ -2,7 +2,7 @@
2
2
  'use strict';
3
3
 
4
4
  const jsxRuntime = require('react/jsx-runtime');
5
- const index = require('../../../../node_modules/.pnpm/@radix-ui_react-alert-dialog@1.1.15_@types_react-dom@19.2.2_@types_react@19.2.2__@types_ec789942cd38340bd7362c09e7d34384/node_modules/@radix-ui/react-alert-dialog/dist/index.cjs');
5
+ const index = require('../../../../node_modules/.pnpm/@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');
6
6
  const utils = require('../lib/utils.cjs');
7
7
  const button = require('./button.cjs');
8
8
 
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
- import { Root as Root2, Trigger as Trigger2, Content as Content2, Title as Title2, Description as Description2, Cancel, Action, Portal as Portal2, Overlay as Overlay2 } from '../../../../node_modules/.pnpm/@radix-ui_react-alert-dialog@1.1.15_@types_react-dom@19.2.2_@types_react@19.2.2__@types_ec789942cd38340bd7362c09e7d34384/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs';
3
+ import { Root as Root2, Content as Content2, Title as Title2, Description as Description2, Cancel, Action, Portal as Portal2, Overlay as Overlay2, Trigger as Trigger2 } from '../../../../node_modules/.pnpm/@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';
4
4
  import { cn } from '../lib/utils.mjs';
5
5
  import { buttonVariants } from './button.mjs';
6
6
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  const jsxRuntime = require('react/jsx-runtime');
4
4
 
5
- function BetterBlogAttribution() {
5
+ function BetterStackAttribution() {
6
6
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full text-center", children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center justify-center gap-1 py-2 text-gray-500 text-sm", children: [
7
7
  "Powered by",
8
8
  " ",
@@ -12,7 +12,7 @@ function BetterBlogAttribution() {
12
12
  className: "flex items-center gap-1 font-semibold underline",
13
13
  href: "https://www.better-stack.ai",
14
14
  target: "_blank",
15
- rel: "noreferrer noopener",
15
+ rel: "noopener",
16
16
  "aria-label": "Better Stack \u2014 Composable full-stack plugin system for React frameworks",
17
17
  title: "Better Stack \u2014 Composable full-stack plugin system for React frameworks",
18
18
  children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "cursor-pointer", children: "Better-Stack" })
@@ -21,4 +21,4 @@ function BetterBlogAttribution() {
21
21
  ] }) });
22
22
  }
23
23
 
24
- exports.BetterBlogAttribution = BetterBlogAttribution;
24
+ exports.BetterStackAttribution = BetterStackAttribution;
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
 
3
- function BetterBlogAttribution() {
3
+ function BetterStackAttribution() {
4
4
  return /* @__PURE__ */ jsx("div", { className: "w-full text-center", children: /* @__PURE__ */ jsxs("p", { className: "flex items-center justify-center gap-1 py-2 text-gray-500 text-sm", children: [
5
5
  "Powered by",
6
6
  " ",
@@ -10,7 +10,7 @@ function BetterBlogAttribution() {
10
10
  className: "flex items-center gap-1 font-semibold underline",
11
11
  href: "https://www.better-stack.ai",
12
12
  target: "_blank",
13
- rel: "noreferrer noopener",
13
+ rel: "noopener",
14
14
  "aria-label": "Better Stack \u2014 Composable full-stack plugin system for React frameworks",
15
15
  title: "Better Stack \u2014 Composable full-stack plugin system for React frameworks",
16
16
  children: /* @__PURE__ */ jsx("span", { className: "cursor-pointer", children: "Better-Stack" })
@@ -19,4 +19,4 @@ function BetterBlogAttribution() {
19
19
  ] }) });
20
20
  }
21
21
 
22
- export { BetterBlogAttribution };
22
+ export { BetterStackAttribution };
@@ -91,6 +91,19 @@ function DialogHeader({ className, ...props }) {
91
91
  }
92
92
  );
93
93
  }
94
+ function DialogFooter({ className, ...props }) {
95
+ return /* @__PURE__ */ jsxRuntime.jsx(
96
+ "div",
97
+ {
98
+ "data-slot": "dialog-footer",
99
+ className: utils.cn(
100
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
101
+ className
102
+ ),
103
+ ...props
104
+ }
105
+ );
106
+ }
94
107
  function DialogTitle({
95
108
  className,
96
109
  ...props
@@ -121,6 +134,7 @@ function DialogDescription({
121
134
  exports.Dialog = Dialog;
122
135
  exports.DialogContent = DialogContent;
123
136
  exports.DialogDescription = DialogDescription;
137
+ exports.DialogFooter = DialogFooter;
124
138
  exports.DialogHeader = DialogHeader;
125
139
  exports.DialogOverlay = DialogOverlay;
126
140
  exports.DialogPortal = DialogPortal;
@@ -75,6 +75,19 @@ function DialogHeader({ className, ...props }) {
75
75
  }
76
76
  );
77
77
  }
78
+ function DialogFooter({ className, ...props }) {
79
+ return /* @__PURE__ */ jsx(
80
+ "div",
81
+ {
82
+ "data-slot": "dialog-footer",
83
+ className: cn(
84
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
85
+ className
86
+ ),
87
+ ...props
88
+ }
89
+ );
90
+ }
78
91
  function DialogTitle({
79
92
  className,
80
93
  ...props
@@ -102,4 +115,4 @@ function DialogDescription({
102
115
  );
103
116
  }
104
117
 
105
- export { Dialog, DialogContent, DialogDescription, DialogHeader, DialogOverlay, DialogPortal, DialogTitle };
118
+ export { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle };
@@ -0,0 +1,67 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ const jsxRuntime = require('react/jsx-runtime');
5
+ const index = require('../../../../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');
6
+ require('lucide-react');
7
+ const utils = require('../lib/utils.cjs');
8
+
9
+ function DropdownMenu({
10
+ ...props
11
+ }) {
12
+ return /* @__PURE__ */ jsxRuntime.jsx(index.Root, { "data-slot": "dropdown-menu", ...props });
13
+ }
14
+ function DropdownMenuTrigger({
15
+ ...props
16
+ }) {
17
+ return /* @__PURE__ */ jsxRuntime.jsx(
18
+ index.Trigger,
19
+ {
20
+ "data-slot": "dropdown-menu-trigger",
21
+ ...props
22
+ }
23
+ );
24
+ }
25
+ function DropdownMenuContent({
26
+ className,
27
+ sideOffset = 4,
28
+ ...props
29
+ }) {
30
+ return /* @__PURE__ */ jsxRuntime.jsx(index.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
31
+ index.Content,
32
+ {
33
+ "data-slot": "dropdown-menu-content",
34
+ sideOffset,
35
+ className: utils.cn(
36
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
37
+ className
38
+ ),
39
+ ...props
40
+ }
41
+ ) });
42
+ }
43
+ function DropdownMenuItem({
44
+ className,
45
+ inset,
46
+ variant = "default",
47
+ ...props
48
+ }) {
49
+ return /* @__PURE__ */ jsxRuntime.jsx(
50
+ index.Item,
51
+ {
52
+ "data-slot": "dropdown-menu-item",
53
+ "data-inset": inset,
54
+ "data-variant": variant,
55
+ className: utils.cn(
56
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
57
+ className
58
+ ),
59
+ ...props
60
+ }
61
+ );
62
+ }
63
+
64
+ exports.DropdownMenu = DropdownMenu;
65
+ exports.DropdownMenuContent = DropdownMenuContent;
66
+ exports.DropdownMenuItem = DropdownMenuItem;
67
+ exports.DropdownMenuTrigger = DropdownMenuTrigger;
@@ -0,0 +1,62 @@
1
+ "use client";
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { Root as Root2, Trigger, Portal as Portal2, Content as Content2, Item as Item2 } from '../../../../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';
4
+ import 'lucide-react';
5
+ import { cn } from '../lib/utils.mjs';
6
+
7
+ function DropdownMenu({
8
+ ...props
9
+ }) {
10
+ return /* @__PURE__ */ jsx(Root2, { "data-slot": "dropdown-menu", ...props });
11
+ }
12
+ function DropdownMenuTrigger({
13
+ ...props
14
+ }) {
15
+ return /* @__PURE__ */ jsx(
16
+ Trigger,
17
+ {
18
+ "data-slot": "dropdown-menu-trigger",
19
+ ...props
20
+ }
21
+ );
22
+ }
23
+ function DropdownMenuContent({
24
+ className,
25
+ sideOffset = 4,
26
+ ...props
27
+ }) {
28
+ return /* @__PURE__ */ jsx(Portal2, { children: /* @__PURE__ */ jsx(
29
+ Content2,
30
+ {
31
+ "data-slot": "dropdown-menu-content",
32
+ sideOffset,
33
+ className: cn(
34
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
35
+ className
36
+ ),
37
+ ...props
38
+ }
39
+ ) });
40
+ }
41
+ function DropdownMenuItem({
42
+ className,
43
+ inset,
44
+ variant = "default",
45
+ ...props
46
+ }) {
47
+ return /* @__PURE__ */ jsx(
48
+ Item2,
49
+ {
50
+ "data-slot": "dropdown-menu-item",
51
+ "data-inset": inset,
52
+ "data-variant": variant,
53
+ className: cn(
54
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
55
+ className
56
+ ),
57
+ ...props
58
+ }
59
+ );
60
+ }
61
+
62
+ export { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger };
@@ -0,0 +1,306 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ const jsxRuntime = require('react/jsx-runtime');
5
+ const utils = require('../lib/utils.cjs');
6
+ const React = require('react');
7
+ const ReactMarkdown = require('react-markdown');
8
+ const rehypeHighlight = require('rehype-highlight');
9
+ const rehypeRaw = require('rehype-raw');
10
+ const remarkGfm = require('remark-gfm');
11
+ const lucideReact = require('lucide-react');
12
+
13
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
14
+
15
+ const ReactMarkdown__default = /*#__PURE__*/_interopDefaultCompat(ReactMarkdown);
16
+ const rehypeHighlight__default = /*#__PURE__*/_interopDefaultCompat(rehypeHighlight);
17
+ const rehypeRaw__default = /*#__PURE__*/_interopDefaultCompat(rehypeRaw);
18
+ const remarkGfm__default = /*#__PURE__*/_interopDefaultCompat(remarkGfm);
19
+
20
+ const DefaultLink = (props) => {
21
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { ...props });
22
+ };
23
+ const DefaultImage = (props) => {
24
+ return /* @__PURE__ */ jsxRuntime.jsx("img", { ...props });
25
+ };
26
+ function containsMath(markdown) {
27
+ return /\$\$[\s\S]+?\$\$/.test(markdown) || // Display math
28
+ /(?<!\$)\$(?!\$)[^\$\n]+?\$(?!\$)/.test(markdown) || // Inline math (not $$)
29
+ /\\begin\{(equation|align|gather|math)\}/.test(markdown);
30
+ }
31
+ function slugify(text) {
32
+ return text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
33
+ }
34
+ function getNodeText(node) {
35
+ if (node == null) return "";
36
+ if (typeof node === "string" || typeof node === "number") return String(node);
37
+ if (Array.isArray(node)) return node.map(getNodeText).join("");
38
+ if (React.isValidElement(node)) {
39
+ const props = node.props;
40
+ return getNodeText(props.children);
41
+ }
42
+ return "";
43
+ }
44
+ function simpleHash(str) {
45
+ let hash = 0;
46
+ for (let i = 0; i < str.length; i++) {
47
+ const char = str.charCodeAt(i);
48
+ hash = (hash << 5) - hash + char;
49
+ hash = hash & hash;
50
+ }
51
+ return Math.abs(hash).toString(36).slice(0, 6);
52
+ }
53
+ function isCheckboxElement(node) {
54
+ return React.isValidElement(node) && node.type === "input" && node.props.type === "checkbox";
55
+ }
56
+ function createTaskListItemRenderer() {
57
+ return function LiRenderer(props) {
58
+ const { className, children, ...rest } = props;
59
+ const isTaskItem = (className ?? "").split(" ").includes("task-list-item");
60
+ if (!isTaskItem) {
61
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { className, ...rest, children });
62
+ }
63
+ const childArray = Array.isArray(children) ? children : [children];
64
+ const checkboxNode = childArray.find(isCheckboxElement);
65
+ const nonCheckboxChildren = childArray.filter((c) => !isCheckboxElement(c));
66
+ const labelText = getNodeText(nonCheckboxChildren);
67
+ const baseId = slugify(labelText || "task-item");
68
+ const hashSuffix = simpleHash(labelText || "task-item");
69
+ const uniqueId = `${baseId}-${hashSuffix}`;
70
+ return /* @__PURE__ */ jsxRuntime.jsxs("li", { className, ...rest, children: [
71
+ checkboxNode ? React.createElement(checkboxNode.type, {
72
+ ...checkboxNode.props,
73
+ id: uniqueId,
74
+ "aria-label": labelText || "Task item"
75
+ }) : null,
76
+ /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: uniqueId, children: nonCheckboxChildren })
77
+ ] });
78
+ };
79
+ }
80
+ function createHeadingRenderer(tag) {
81
+ return function HeadingRenderer(props) {
82
+ const { children, ...rest } = props;
83
+ const text = getNodeText(children);
84
+ const id = slugify(text);
85
+ return React.createElement(
86
+ tag,
87
+ { id, ...rest },
88
+ children,
89
+ text ? /* @__PURE__ */ jsxRuntime.jsx(
90
+ "a",
91
+ {
92
+ className: "heading-anchor",
93
+ href: `#${id}`,
94
+ "aria-label": "Link to heading",
95
+ children: "#"
96
+ }
97
+ ) : null
98
+ );
99
+ };
100
+ }
101
+ function CodeRenderer({ inline, className, children, ...rest }) {
102
+ const hasLanguage = /language-([a-z0-9-]+)/i.test(className ?? "");
103
+ const isInline = inline ?? !hasLanguage;
104
+ if (isInline) {
105
+ return /* @__PURE__ */ jsxRuntime.jsx("code", { className, ...rest, children });
106
+ }
107
+ return /* @__PURE__ */ jsxRuntime.jsx("code", { className, ...rest, children });
108
+ }
109
+ function PreRenderer(props) {
110
+ const { children, ...rest } = props;
111
+ const child = Array.isArray(children) ? children[0] : children;
112
+ let language;
113
+ if (React.isValidElement(child)) {
114
+ const className = child.props.className;
115
+ const match = /language-([a-z0-9-]+)/i.exec(className ?? "");
116
+ language = match?.[1];
117
+ }
118
+ const label = (language ?? "text").toUpperCase();
119
+ const preRef = React.useRef(null);
120
+ const [copied, setCopied] = React.useState(false);
121
+ const resetTimerRef = React.useRef(null);
122
+ let codeText = "";
123
+ if (React.isValidElement(child)) {
124
+ const childProps = child.props;
125
+ codeText = getNodeText(childProps.children);
126
+ }
127
+ const normalized = codeText.endsWith("\n") ? codeText.slice(0, -1) : codeText;
128
+ const lineCount = Math.max(1, normalized.split("\n").length);
129
+ const digitCount = String(lineCount).length;
130
+ const onCopy = async (e) => {
131
+ e.preventDefault();
132
+ e.stopPropagation();
133
+ try {
134
+ const text = preRef.current?.textContent ?? "";
135
+ if (text && typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
136
+ await navigator.clipboard.writeText(text);
137
+ setCopied(true);
138
+ if (resetTimerRef.current) window.clearTimeout(resetTimerRef.current);
139
+ resetTimerRef.current = window.setTimeout(() => {
140
+ setCopied(false);
141
+ resetTimerRef.current = null;
142
+ }, 2e3);
143
+ }
144
+ } catch {
145
+ }
146
+ };
147
+ return /* @__PURE__ */ jsxRuntime.jsxs(
148
+ "div",
149
+ {
150
+ className: "markdown-code-block",
151
+ style: {
152
+ ["--code-gutter-width"]: `${digitCount + 1}ch`
153
+ },
154
+ children: [
155
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "code-toolbar", children: [
156
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "language-label", children: label }),
157
+ /* @__PURE__ */ jsxRuntime.jsx(
158
+ "button",
159
+ {
160
+ type: "button",
161
+ className: "copy-button",
162
+ onClick: onCopy,
163
+ "aria-label": copied ? "Copied" : "Copy code",
164
+ children: copied ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { size: 16 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CopyIcon, { size: 16 })
165
+ }
166
+ )
167
+ ] }),
168
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "code-content", children: [
169
+ /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "line-numbers", "aria-hidden": true, children: Array.from({ length: lineCount }).map((_, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: idx + 1 }, idx + 1)) }),
170
+ /* @__PURE__ */ jsxRuntime.jsx("pre", { ref: preRef, ...rest, children })
171
+ ] })
172
+ ]
173
+ }
174
+ );
175
+ }
176
+ function MarkdownContent({
177
+ markdown,
178
+ className,
179
+ variant = "default",
180
+ LinkComponent = DefaultLink,
181
+ ImageComponent = DefaultImage
182
+ }) {
183
+ const [mathPlugins, setMathPlugins] = React.useState(null);
184
+ const [isLoadingMath, setIsLoadingMath] = React.useState(false);
185
+ const hasMath = React.useMemo(() => containsMath(markdown), [markdown]);
186
+ React.useEffect(() => {
187
+ if (!hasMath || mathPlugins || isLoadingMath) return;
188
+ setIsLoadingMath(true);
189
+ const katexCSSId = "katex-css";
190
+ if (typeof document !== "undefined" && !document.getElementById(katexCSSId)) {
191
+ const link = document.createElement("link");
192
+ link.id = katexCSSId;
193
+ link.rel = "stylesheet";
194
+ link.href = "https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css";
195
+ link.integrity = "sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+";
196
+ link.crossOrigin = "anonymous";
197
+ document.head.appendChild(link);
198
+ const fontDisplayStyleId = "katex-font-display-override";
199
+ if (!document.getElementById(fontDisplayStyleId)) {
200
+ const style = document.createElement("style");
201
+ style.id = fontDisplayStyleId;
202
+ style.textContent = `
203
+ @font-face {
204
+ font-family: 'KaTeX_Main';
205
+ font-style: normal;
206
+ font-weight: normal;
207
+ font-display: swap;
208
+ src: url('https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/fonts/KaTeX_Main-Regular.woff2') format('woff2');
209
+ }
210
+ @font-face {
211
+ font-family: 'KaTeX_Math';
212
+ font-style: italic;
213
+ font-weight: normal;
214
+ font-display: swap;
215
+ src: url('https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/fonts/KaTeX_Math-Italic.woff2') format('woff2');
216
+ }
217
+ `;
218
+ document.head.appendChild(style);
219
+ }
220
+ }
221
+ Promise.all([import('remark-math'), import('rehype-katex')]).then(([remarkMathModule, rehypeKatexModule]) => {
222
+ setMathPlugins({
223
+ remarkMath: remarkMathModule.default,
224
+ rehypeKatex: rehypeKatexModule.default
225
+ });
226
+ }).catch((error) => {
227
+ console.error("Failed to load math plugins:", error);
228
+ }).finally(() => {
229
+ setIsLoadingMath(false);
230
+ });
231
+ }, [hasMath, mathPlugins, isLoadingMath]);
232
+ const AnchorRenderer = React.useMemo(() => {
233
+ return function AnchorRendererComponent(props) {
234
+ const { href = "", children, className: anchorClassName, ...rest } = props;
235
+ return /* @__PURE__ */ jsxRuntime.jsx(LinkComponent, { href, className: anchorClassName, ...rest, children });
236
+ };
237
+ }, [LinkComponent]);
238
+ const ImgRenderer = React.useMemo(() => {
239
+ return function ImgRendererComponent(props) {
240
+ const {
241
+ src = "",
242
+ alt = "",
243
+ className: imgClassName,
244
+ width,
245
+ height,
246
+ style,
247
+ ...rest
248
+ } = props;
249
+ const imageProps = {
250
+ src,
251
+ alt,
252
+ className: imgClassName,
253
+ style,
254
+ ...rest
255
+ };
256
+ if (width != null && height != null) {
257
+ imageProps.width = width;
258
+ imageProps.height = height;
259
+ } else {
260
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "markdown-image-wrapper", children: /* @__PURE__ */ jsxRuntime.jsx(ImageComponent, { ...imageProps }) });
261
+ }
262
+ return /* @__PURE__ */ jsxRuntime.jsx(ImageComponent, { ...imageProps });
263
+ };
264
+ }, [ImageComponent]);
265
+ const components = React.useMemo(() => {
266
+ return {
267
+ a: AnchorRenderer,
268
+ img: ImgRenderer,
269
+ code: CodeRenderer,
270
+ pre: PreRenderer,
271
+ h1: createHeadingRenderer("h1"),
272
+ h2: createHeadingRenderer("h2"),
273
+ h3: createHeadingRenderer("h3"),
274
+ h4: createHeadingRenderer("h4"),
275
+ h5: createHeadingRenderer("h5"),
276
+ h6: createHeadingRenderer("h6"),
277
+ li: createTaskListItemRenderer()
278
+ };
279
+ }, [AnchorRenderer, ImgRenderer]);
280
+ const remarkPlugins = React.useMemo(() => {
281
+ const plugins = [remarkGfm__default];
282
+ if (hasMath && mathPlugins?.remarkMath) {
283
+ plugins.push(mathPlugins.remarkMath);
284
+ }
285
+ return plugins;
286
+ }, [hasMath, mathPlugins]);
287
+ const rehypePlugins = React.useMemo(() => {
288
+ const plugins = [rehypeRaw__default, rehypeHighlight__default];
289
+ if (hasMath && mathPlugins?.rehypeKatex) {
290
+ plugins.push(mathPlugins.rehypeKatex);
291
+ }
292
+ return plugins;
293
+ }, [hasMath, mathPlugins]);
294
+ const variantClass = variant === "chat" ? "markdown-content-chat" : "";
295
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils.cn("markdown-content", variantClass, className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "markdown-inner", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "markdown-body", children: /* @__PURE__ */ jsxRuntime.jsx(
296
+ ReactMarkdown__default,
297
+ {
298
+ remarkPlugins,
299
+ rehypePlugins,
300
+ components,
301
+ children: markdown
302
+ }
303
+ ) }) }) });
304
+ }
305
+
306
+ exports.MarkdownContent = MarkdownContent;