@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.
- package/README.md +85 -37
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/packages/better-stack/src/plugins/ai-chat/api/plugin.cjs +610 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/api/plugin.mjs +608 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-input.cjs +221 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-input.mjs +219 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.cjs +315 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-interface.mjs +313 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-layout.cjs +122 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-layout.mjs +120 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-message.cjs +397 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-message.mjs +391 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-sidebar.cjs +227 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/chat-sidebar.mjs +225 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/chat-page-skeleton.cjs +31 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/chat-page-skeleton.mjs +29 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/index.cjs +11 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/loading/index.mjs +8 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/404-page.cjs +18 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/404-page.mjs +16 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.cjs +39 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.internal.cjs +22 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.internal.mjs +20 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/pages/chat-page.mjs +37 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/default-error.cjs +18 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/default-error.mjs +16 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/error-placeholder.cjs +26 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/components/shared/error-placeholder.mjs +24 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/hooks/chat-hooks.cjs +199 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/hooks/chat-hooks.mjs +191 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/localization/index.cjs +63 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/localization/index.mjs +61 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/overrides.cjs +14 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/overrides.mjs +11 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/plugin.cjs +241 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/client/plugin.mjs +239 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/db.cjs +65 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/db.mjs +63 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/schemas.cjs +42 -0
- package/dist/packages/better-stack/src/plugins/ai-chat/schemas.mjs +38 -0
- package/dist/packages/better-stack/src/plugins/blog/api/plugin.cjs +8 -2
- package/dist/packages/better-stack/src/plugins/blog/api/plugin.mjs +8 -2
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/post-page.internal.cjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/pages/post-page.internal.mjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/shared/markdown-content.cjs +12 -309
- package/dist/packages/better-stack/src/plugins/blog/client/components/shared/markdown-content.mjs +13 -303
- package/dist/packages/better-stack/src/plugins/blog/client/components/shared/on-this-page.cjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/shared/on-this-page.mjs +1 -1
- package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.cjs +2 -2
- package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.mjs +2 -2
- package/dist/packages/better-stack/src/plugins/blog/client/components/shared/recent-posts-carousel.cjs +2 -2
- package/dist/packages/better-stack/src/plugins/blog/client/components/shared/recent-posts-carousel.mjs +2 -2
- package/dist/packages/ui/src/components/alert-dialog.cjs +1 -1
- package/dist/packages/ui/src/components/alert-dialog.mjs +1 -1
- package/dist/packages/{better-stack/src/plugins/blog/client/components/shared/better-blog-attribution.cjs → ui/src/components/better-stack-attribution.cjs} +3 -3
- package/dist/packages/{better-stack/src/plugins/blog/client/components/shared/better-blog-attribution.mjs → ui/src/components/better-stack-attribution.mjs} +3 -3
- package/dist/packages/ui/src/components/dialog.cjs +14 -0
- package/dist/packages/ui/src/components/dialog.mjs +14 -1
- package/dist/packages/ui/src/components/dropdown-menu.cjs +67 -0
- package/dist/packages/ui/src/components/dropdown-menu.mjs +62 -0
- package/dist/packages/ui/src/components/markdown-content.cjs +306 -0
- package/dist/packages/ui/src/components/markdown-content.mjs +297 -0
- package/dist/packages/ui/src/components/scroll-area.cjs +63 -0
- package/dist/packages/ui/src/components/scroll-area.mjs +60 -0
- package/dist/packages/ui/src/components/select.cjs +1 -1
- package/dist/packages/ui/src/components/select.mjs +1 -1
- package/dist/packages/ui/src/components/sheet.cjs +87 -0
- package/dist/packages/ui/src/components/sheet.mjs +69 -0
- package/dist/plugins/ai-chat/api/index.cjs +9 -0
- package/dist/plugins/ai-chat/api/index.d.cts +9 -0
- package/dist/plugins/ai-chat/api/index.d.mts +9 -0
- package/dist/plugins/ai-chat/api/index.d.ts +9 -0
- package/dist/plugins/ai-chat/api/index.mjs +2 -0
- package/dist/plugins/ai-chat/client/components/index.cjs +27 -0
- package/dist/plugins/ai-chat/client/components/index.d.cts +30 -0
- package/dist/plugins/ai-chat/client/components/index.d.mts +30 -0
- package/dist/plugins/ai-chat/client/components/index.d.ts +30 -0
- package/dist/plugins/ai-chat/client/components/index.mjs +11 -0
- package/dist/plugins/ai-chat/client/hooks/index.cjs +13 -0
- package/dist/plugins/ai-chat/client/hooks/index.d.cts +98 -0
- package/dist/plugins/ai-chat/client/hooks/index.d.mts +98 -0
- package/dist/plugins/ai-chat/client/hooks/index.d.ts +98 -0
- package/dist/plugins/ai-chat/client/hooks/index.mjs +1 -0
- package/dist/plugins/ai-chat/client/index.cjs +19 -0
- package/dist/plugins/ai-chat/client/index.d.cts +327 -0
- package/dist/plugins/ai-chat/client/index.d.mts +327 -0
- package/dist/plugins/ai-chat/client/index.d.ts +327 -0
- package/dist/plugins/ai-chat/client/index.mjs +7 -0
- package/dist/plugins/ai-chat/client.css +6 -0
- package/dist/plugins/ai-chat/query-keys.cjs +60 -0
- package/dist/plugins/ai-chat/query-keys.d.cts +478 -0
- package/dist/plugins/ai-chat/query-keys.d.mts +478 -0
- package/dist/plugins/ai-chat/query-keys.d.ts +478 -0
- package/dist/plugins/ai-chat/query-keys.mjs +58 -0
- package/dist/plugins/ai-chat/style.css +19 -0
- package/dist/plugins/blog/api/index.d.cts +1 -1
- package/dist/plugins/blog/api/index.d.mts +1 -1
- package/dist/plugins/blog/api/index.d.ts +1 -1
- package/dist/plugins/blog/client/components/shared/markdown-content-styles.css +85 -62
- package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
- package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
- package/dist/plugins/blog/client/index.d.cts +1 -1
- package/dist/plugins/blog/client/index.d.mts +1 -1
- package/dist/plugins/blog/client/index.d.ts +1 -1
- package/dist/plugins/blog/query-keys.d.cts +2 -2
- package/dist/plugins/blog/query-keys.d.mts +2 -2
- package/dist/plugins/blog/query-keys.d.ts +2 -2
- package/dist/shared/stack.Be1QIHEn.d.cts +23 -0
- package/dist/shared/stack.Be1QIHEn.d.mts +23 -0
- package/dist/shared/stack.Be1QIHEn.d.ts +23 -0
- package/dist/shared/stack.DorMi9CZ.d.cts +80 -0
- package/dist/shared/stack.DorMi9CZ.d.mts +80 -0
- package/dist/shared/stack.DorMi9CZ.d.ts +80 -0
- package/package.json +61 -3
- package/src/plugins/ai-chat/api/index.ts +2 -0
- package/src/plugins/ai-chat/api/plugin.ts +1083 -0
- package/src/plugins/ai-chat/client/components/chat-input.tsx +295 -0
- package/src/plugins/ai-chat/client/components/chat-interface.tsx +455 -0
- package/src/plugins/ai-chat/client/components/chat-layout.tsx +160 -0
- package/src/plugins/ai-chat/client/components/chat-message.tsx +505 -0
- package/src/plugins/ai-chat/client/components/chat-sidebar.tsx +296 -0
- package/src/plugins/ai-chat/client/components/index.ts +16 -0
- package/src/plugins/ai-chat/client/components/loading/chat-page-skeleton.tsx +57 -0
- package/src/plugins/ai-chat/client/components/loading/index.tsx +11 -0
- package/src/plugins/ai-chat/client/components/pages/404-page.tsx +27 -0
- package/src/plugins/ai-chat/client/components/pages/chat-page.internal.tsx +31 -0
- package/src/plugins/ai-chat/client/components/pages/chat-page.tsx +46 -0
- package/src/plugins/ai-chat/client/components/shared/default-error.tsx +28 -0
- package/src/plugins/ai-chat/client/components/shared/error-placeholder.tsx +22 -0
- package/src/plugins/ai-chat/client/hooks/chat-hooks.tsx +349 -0
- package/src/plugins/ai-chat/client/hooks/index.tsx +1 -0
- package/src/plugins/ai-chat/client/index.ts +14 -0
- package/src/plugins/ai-chat/client/localization/index.ts +156 -0
- package/src/plugins/ai-chat/client/overrides.ts +170 -0
- package/src/plugins/ai-chat/client/plugin.tsx +449 -0
- package/src/plugins/ai-chat/client.css +6 -0
- package/src/plugins/ai-chat/db.ts +65 -0
- package/src/plugins/ai-chat/query-keys.ts +87 -0
- package/src/plugins/ai-chat/schemas.ts +40 -0
- package/src/plugins/ai-chat/style.css +19 -0
- package/src/plugins/ai-chat/types.ts +29 -0
- package/src/plugins/blog/api/plugin.ts +10 -4
- package/src/plugins/blog/client/components/pages/post-page.internal.tsx +1 -1
- package/src/plugins/blog/client/components/shared/markdown-content-styles.css +85 -62
- package/src/plugins/blog/client/components/shared/markdown-content.tsx +19 -427
- package/src/plugins/blog/client/components/shared/on-this-page.tsx +1 -1
- package/src/plugins/blog/client/components/shared/page-wrapper.tsx +2 -2
- package/src/plugins/blog/client/components/shared/recent-posts-carousel.tsx +2 -2
- 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
- package/src/plugins/blog/client/components/shared/better-blog-attribution.tsx +0 -19
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/shared/{stack.DLhzx1-D.d.ts → stack.CcI4sYJP.d.cts} +1 -1
- package/dist/shared/{stack.DLhzx1-D.d.cts → stack.CcI4sYJP.d.mts} +1 -1
- package/dist/shared/{stack.DLhzx1-D.d.mts → stack.CcI4sYJP.d.ts} +1 -1
package/dist/packages/better-stack/src/plugins/blog/client/components/shared/markdown-content.mjs
CHANGED
|
@@ -1,315 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx
|
|
3
|
-
import {
|
|
4
|
-
import { useState, useMemo, useEffect, createElement, isValidElement, useRef } from 'react';
|
|
5
|
-
import ReactMarkdown from 'react-markdown';
|
|
6
|
-
import rehypeHighlight from 'rehype-highlight';
|
|
7
|
-
import rehypeRaw from 'rehype-raw';
|
|
8
|
-
import remarkGfm from 'remark-gfm';
|
|
9
|
-
import 'highlight.js/styles/panda-syntax-light.css';
|
|
10
|
-
import { CheckIcon, CopyIcon } from 'lucide-react';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { MarkdownContent as MarkdownContent$1 } from '../../../../../../../ui/src/components/markdown-content.mjs';
|
|
11
4
|
import { usePluginOverrides } from '@btst/stack/context';
|
|
12
5
|
import { DefaultImage, DefaultLink } from './defaults.mjs';
|
|
6
|
+
import 'highlight.js/styles/panda-syntax-light.css';
|
|
13
7
|
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
/\\begin\{(equation|align|gather|math)\}/.test(markdown);
|
|
18
|
-
}
|
|
19
|
-
function getNodeText(node) {
|
|
20
|
-
if (node == null) return "";
|
|
21
|
-
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
22
|
-
if (Array.isArray(node)) return node.map(getNodeText).join("");
|
|
23
|
-
if (isValidElement(node)) {
|
|
24
|
-
const props = node.props;
|
|
25
|
-
return getNodeText(props.children);
|
|
26
|
-
}
|
|
27
|
-
return "";
|
|
28
|
-
}
|
|
29
|
-
function simpleHash(str) {
|
|
30
|
-
let hash = 0;
|
|
31
|
-
for (let i = 0; i < str.length; i++) {
|
|
32
|
-
const char = str.charCodeAt(i);
|
|
33
|
-
hash = (hash << 5) - hash + char;
|
|
34
|
-
hash = hash & hash;
|
|
35
|
-
}
|
|
36
|
-
return Math.abs(hash).toString(36).slice(0, 6);
|
|
37
|
-
}
|
|
38
|
-
function isCheckboxElement(node) {
|
|
39
|
-
return isValidElement(node) && node.type === "input" && node.props.type === "checkbox";
|
|
40
|
-
}
|
|
41
|
-
function createTaskListItemRenderer() {
|
|
42
|
-
return function LiRenderer(props) {
|
|
43
|
-
const { className, children, ...rest } = props;
|
|
44
|
-
const isTaskItem = (className ?? "").split(" ").includes("task-list-item");
|
|
45
|
-
if (!isTaskItem) {
|
|
46
|
-
return /* @__PURE__ */ jsx("li", { className, ...rest, children });
|
|
47
|
-
}
|
|
48
|
-
const childArray = Array.isArray(children) ? children : [children];
|
|
49
|
-
const checkboxNode = childArray.find(isCheckboxElement);
|
|
50
|
-
const nonCheckboxChildren = childArray.filter((c) => !isCheckboxElement(c));
|
|
51
|
-
const labelText = getNodeText(nonCheckboxChildren);
|
|
52
|
-
const baseId = slugify(labelText || "task-item");
|
|
53
|
-
const hashSuffix = simpleHash(labelText || "task-item");
|
|
54
|
-
const uniqueId = `${baseId}-${hashSuffix}`;
|
|
55
|
-
return /* @__PURE__ */ jsxs("li", { className, ...rest, children: [
|
|
56
|
-
checkboxNode ? createElement(checkboxNode.type, {
|
|
57
|
-
...checkboxNode.props,
|
|
58
|
-
id: uniqueId,
|
|
59
|
-
"aria-label": labelText || "Task item"
|
|
60
|
-
}) : null,
|
|
61
|
-
/* @__PURE__ */ jsx("label", { htmlFor: uniqueId, children: nonCheckboxChildren })
|
|
62
|
-
] });
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
function createHeadingRenderer(tag) {
|
|
66
|
-
return function HeadingRenderer(props) {
|
|
67
|
-
const { children, ...rest } = props;
|
|
68
|
-
const text = getNodeText(children);
|
|
69
|
-
const id = slugify(text);
|
|
70
|
-
return createElement(
|
|
71
|
-
tag,
|
|
72
|
-
{ id, ...rest },
|
|
73
|
-
children,
|
|
74
|
-
text ? /* @__PURE__ */ jsx(
|
|
75
|
-
"a",
|
|
76
|
-
{
|
|
77
|
-
className: "heading-anchor",
|
|
78
|
-
href: `#${id}`,
|
|
79
|
-
"aria-label": "Link to heading",
|
|
80
|
-
children: "#"
|
|
81
|
-
}
|
|
82
|
-
) : null
|
|
83
|
-
);
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
function AnchorRenderer(props) {
|
|
87
|
-
const { Link } = usePluginOverrides("blog", {
|
|
88
|
-
Link: DefaultLink
|
|
89
|
-
});
|
|
90
|
-
const { href = "", children, className: anchorClassName, ...rest } = props;
|
|
91
|
-
return /* @__PURE__ */ jsx(Link, { href, className: anchorClassName, ...rest, children });
|
|
92
|
-
}
|
|
93
|
-
function ImgRenderer(props) {
|
|
94
|
-
const { Image } = usePluginOverrides("blog", {
|
|
8
|
+
function MarkdownContent({ markdown, className }) {
|
|
9
|
+
const { Link, Image } = usePluginOverrides("blog", {
|
|
10
|
+
Link: DefaultLink,
|
|
95
11
|
Image: DefaultImage
|
|
96
12
|
});
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
alt = "",
|
|
100
|
-
className: imgClassName,
|
|
101
|
-
width,
|
|
102
|
-
height,
|
|
103
|
-
style,
|
|
104
|
-
...rest
|
|
105
|
-
} = props;
|
|
106
|
-
const imageProps = {
|
|
107
|
-
src,
|
|
108
|
-
alt,
|
|
109
|
-
className: imgClassName,
|
|
110
|
-
style,
|
|
111
|
-
...rest
|
|
112
|
-
};
|
|
113
|
-
if (width != null && height != null) {
|
|
114
|
-
imageProps.width = width;
|
|
115
|
-
imageProps.height = height;
|
|
116
|
-
} else {
|
|
117
|
-
return /* @__PURE__ */ jsx("span", { className: "markdown-image-wrapper", children: /* @__PURE__ */ jsx(Image, { ...imageProps }) });
|
|
118
|
-
}
|
|
119
|
-
return /* @__PURE__ */ jsx(Image, { ...imageProps });
|
|
120
|
-
}
|
|
121
|
-
function CodeRenderer({ inline, className, children, ...rest }) {
|
|
122
|
-
const hasLanguage = /language-([a-z0-9-]+)/i.test(className ?? "");
|
|
123
|
-
const isInline = inline ?? !hasLanguage;
|
|
124
|
-
if (isInline) {
|
|
125
|
-
return /* @__PURE__ */ jsx("code", { className, ...rest, children });
|
|
126
|
-
}
|
|
127
|
-
return /* @__PURE__ */ jsx("code", { className, ...rest, children });
|
|
128
|
-
}
|
|
129
|
-
function PreRenderer(props) {
|
|
130
|
-
const { children, ...rest } = props;
|
|
131
|
-
const child = Array.isArray(children) ? children[0] : children;
|
|
132
|
-
let language;
|
|
133
|
-
if (isValidElement(child)) {
|
|
134
|
-
const className = child.props.className;
|
|
135
|
-
const match = /language-([a-z0-9-]+)/i.exec(className ?? "");
|
|
136
|
-
language = match?.[1];
|
|
137
|
-
}
|
|
138
|
-
const label = (language ?? "text").toUpperCase();
|
|
139
|
-
const preRef = useRef(null);
|
|
140
|
-
const [copied, setCopied] = useState(false);
|
|
141
|
-
const resetTimerRef = useRef(null);
|
|
142
|
-
let codeText = "";
|
|
143
|
-
if (isValidElement(child)) {
|
|
144
|
-
const childProps = child.props;
|
|
145
|
-
codeText = getNodeText(childProps.children);
|
|
146
|
-
}
|
|
147
|
-
const normalized = codeText.endsWith("\n") ? codeText.slice(0, -1) : codeText;
|
|
148
|
-
const lineCount = Math.max(1, normalized.split("\n").length);
|
|
149
|
-
const digitCount = String(lineCount).length;
|
|
150
|
-
const onCopy = async (e) => {
|
|
151
|
-
e.preventDefault();
|
|
152
|
-
e.stopPropagation();
|
|
153
|
-
try {
|
|
154
|
-
const text = preRef.current?.textContent ?? "";
|
|
155
|
-
if (text && typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
|
|
156
|
-
await navigator.clipboard.writeText(text);
|
|
157
|
-
setCopied(true);
|
|
158
|
-
if (resetTimerRef.current) window.clearTimeout(resetTimerRef.current);
|
|
159
|
-
resetTimerRef.current = window.setTimeout(() => {
|
|
160
|
-
setCopied(false);
|
|
161
|
-
resetTimerRef.current = null;
|
|
162
|
-
}, 2e3);
|
|
163
|
-
}
|
|
164
|
-
} catch {
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
return /* @__PURE__ */ jsxs(
|
|
168
|
-
"div",
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
MarkdownContent$1,
|
|
169
15
|
{
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
/* @__PURE__ */ jsxs("div", { className: "code-toolbar", children: [
|
|
176
|
-
/* @__PURE__ */ jsx("span", { className: "language-label", children: label }),
|
|
177
|
-
/* @__PURE__ */ jsx(
|
|
178
|
-
"button",
|
|
179
|
-
{
|
|
180
|
-
type: "button",
|
|
181
|
-
className: "copy-button",
|
|
182
|
-
onClick: onCopy,
|
|
183
|
-
"aria-label": copied ? "Copied" : "Copy code",
|
|
184
|
-
children: copied ? /* @__PURE__ */ jsx(CheckIcon, { size: 16 }) : /* @__PURE__ */ jsx(CopyIcon, { size: 16 })
|
|
185
|
-
}
|
|
186
|
-
)
|
|
187
|
-
] }),
|
|
188
|
-
/* @__PURE__ */ jsxs("div", { className: "code-content", children: [
|
|
189
|
-
/* @__PURE__ */ jsx("ol", { className: "line-numbers", "aria-hidden": true, children: Array.from({ length: lineCount }).map((_, idx) => /* @__PURE__ */ jsx("li", { children: idx + 1 }, idx + 1)) }),
|
|
190
|
-
/* @__PURE__ */ jsx("pre", { ref: preRef, ...rest, children })
|
|
191
|
-
] })
|
|
192
|
-
]
|
|
16
|
+
markdown,
|
|
17
|
+
className,
|
|
18
|
+
variant: "default",
|
|
19
|
+
LinkComponent: Link,
|
|
20
|
+
ImageComponent: Image
|
|
193
21
|
}
|
|
194
22
|
);
|
|
195
23
|
}
|
|
196
|
-
function MarkdownContent({ markdown, className }) {
|
|
197
|
-
const [mathPlugins, setMathPlugins] = useState(null);
|
|
198
|
-
const [isLoadingMath, setIsLoadingMath] = useState(false);
|
|
199
|
-
const hasMath = useMemo(() => containsMath(markdown), [markdown]);
|
|
200
|
-
useEffect(() => {
|
|
201
|
-
if (!hasMath || mathPlugins || isLoadingMath) return;
|
|
202
|
-
setIsLoadingMath(true);
|
|
203
|
-
const katexCSSId = "katex-css";
|
|
204
|
-
if (!document.getElementById(katexCSSId)) {
|
|
205
|
-
const link = document.createElement("link");
|
|
206
|
-
link.id = katexCSSId;
|
|
207
|
-
link.rel = "stylesheet";
|
|
208
|
-
link.href = "https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css";
|
|
209
|
-
link.integrity = "sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+";
|
|
210
|
-
link.crossOrigin = "anonymous";
|
|
211
|
-
document.head.appendChild(link);
|
|
212
|
-
const fontDisplayStyleId = "katex-font-display-override";
|
|
213
|
-
if (!document.getElementById(fontDisplayStyleId)) {
|
|
214
|
-
const style = document.createElement("style");
|
|
215
|
-
style.id = fontDisplayStyleId;
|
|
216
|
-
style.textContent = `
|
|
217
|
-
/* Override KaTeX font-face declarations to add font-display: swap */
|
|
218
|
-
@font-face {
|
|
219
|
-
font-family: 'KaTeX_Main';
|
|
220
|
-
font-style: normal;
|
|
221
|
-
font-weight: normal;
|
|
222
|
-
font-display: swap;
|
|
223
|
-
src: url('https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/fonts/KaTeX_Main-Regular.woff2') format('woff2');
|
|
224
|
-
}
|
|
225
|
-
@font-face {
|
|
226
|
-
font-family: 'KaTeX_Math';
|
|
227
|
-
font-style: italic;
|
|
228
|
-
font-weight: normal;
|
|
229
|
-
font-display: swap;
|
|
230
|
-
src: url('https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/fonts/KaTeX_Math-Italic.woff2') format('woff2');
|
|
231
|
-
}
|
|
232
|
-
@font-face {
|
|
233
|
-
font-family: 'KaTeX_Size1';
|
|
234
|
-
font-style: normal;
|
|
235
|
-
font-weight: normal;
|
|
236
|
-
font-display: swap;
|
|
237
|
-
src: url('https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/fonts/KaTeX_Size1-Regular.woff2') format('woff2');
|
|
238
|
-
}
|
|
239
|
-
@font-face {
|
|
240
|
-
font-family: 'KaTeX_Size2';
|
|
241
|
-
font-style: normal;
|
|
242
|
-
font-weight: normal;
|
|
243
|
-
font-display: swap;
|
|
244
|
-
src: url('https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/fonts/KaTeX_Size2-Regular.woff2') format('woff2');
|
|
245
|
-
}
|
|
246
|
-
@font-face {
|
|
247
|
-
font-family: 'KaTeX_Size3';
|
|
248
|
-
font-style: normal;
|
|
249
|
-
font-weight: normal;
|
|
250
|
-
font-display: swap;
|
|
251
|
-
src: url('https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/fonts/KaTeX_Size3-Regular.woff2') format('woff2');
|
|
252
|
-
}
|
|
253
|
-
@font-face {
|
|
254
|
-
font-family: 'KaTeX_Size4';
|
|
255
|
-
font-style: normal;
|
|
256
|
-
font-weight: normal;
|
|
257
|
-
font-display: swap;
|
|
258
|
-
src: url('https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/fonts/KaTeX_Size4-Regular.woff2') format('woff2');
|
|
259
|
-
}
|
|
260
|
-
`;
|
|
261
|
-
document.head.appendChild(style);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
Promise.all([import('remark-math'), import('rehype-katex')]).then(([remarkMathModule, rehypeKatexModule]) => {
|
|
265
|
-
setMathPlugins({
|
|
266
|
-
remarkMath: remarkMathModule.default,
|
|
267
|
-
rehypeKatex: rehypeKatexModule.default
|
|
268
|
-
});
|
|
269
|
-
}).catch((error) => {
|
|
270
|
-
console.error("Failed to load math plugins:", error);
|
|
271
|
-
}).finally(() => {
|
|
272
|
-
setIsLoadingMath(false);
|
|
273
|
-
});
|
|
274
|
-
}, [hasMath, mathPlugins, isLoadingMath]);
|
|
275
|
-
const components = useMemo(() => {
|
|
276
|
-
return {
|
|
277
|
-
a: AnchorRenderer,
|
|
278
|
-
img: ImgRenderer,
|
|
279
|
-
code: CodeRenderer,
|
|
280
|
-
pre: PreRenderer,
|
|
281
|
-
h1: createHeadingRenderer("h1"),
|
|
282
|
-
h2: createHeadingRenderer("h2"),
|
|
283
|
-
h3: createHeadingRenderer("h3"),
|
|
284
|
-
h4: createHeadingRenderer("h4"),
|
|
285
|
-
h5: createHeadingRenderer("h5"),
|
|
286
|
-
h6: createHeadingRenderer("h6"),
|
|
287
|
-
li: createTaskListItemRenderer()
|
|
288
|
-
};
|
|
289
|
-
}, []);
|
|
290
|
-
const remarkPlugins = useMemo(() => {
|
|
291
|
-
const plugins = [remarkGfm];
|
|
292
|
-
if (hasMath && mathPlugins?.remarkMath) {
|
|
293
|
-
plugins.push(mathPlugins.remarkMath);
|
|
294
|
-
}
|
|
295
|
-
return plugins;
|
|
296
|
-
}, [hasMath, mathPlugins]);
|
|
297
|
-
const rehypePlugins = useMemo(() => {
|
|
298
|
-
const plugins = [rehypeRaw, rehypeHighlight];
|
|
299
|
-
if (hasMath && mathPlugins?.rehypeKatex) {
|
|
300
|
-
plugins.push(mathPlugins.rehypeKatex);
|
|
301
|
-
}
|
|
302
|
-
return plugins;
|
|
303
|
-
}, [hasMath, mathPlugins]);
|
|
304
|
-
return /* @__PURE__ */ jsx("div", { className: cn("milkdown-custom", className), children: /* @__PURE__ */ jsx("div", { className: "milkdown", children: /* @__PURE__ */ jsx("div", { className: "milkdown-content", children: /* @__PURE__ */ jsx(
|
|
305
|
-
ReactMarkdown,
|
|
306
|
-
{
|
|
307
|
-
remarkPlugins,
|
|
308
|
-
rehypePlugins,
|
|
309
|
-
components,
|
|
310
|
-
children: markdown
|
|
311
|
-
}
|
|
312
|
-
) }) }) });
|
|
313
|
-
}
|
|
314
24
|
|
|
315
25
|
export { MarkdownContent };
|
package/dist/packages/better-stack/src/plugins/blog/client/components/shared/on-this-page.cjs
CHANGED
|
@@ -40,7 +40,7 @@ function OnThisPage({ markdown, className }) {
|
|
|
40
40
|
className
|
|
41
41
|
),
|
|
42
42
|
"aria-label": "Table of contents",
|
|
43
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-y-auto px-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 p-
|
|
43
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-y-auto px-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 p-2 pt-0 text-sm", children: [
|
|
44
44
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center gap-2 font-semibold text-muted-foreground sticky top-0 h-6 text-xs", children: [
|
|
45
45
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.TextAlignStart, { className: "w-3 h-3" }),
|
|
46
46
|
" ",
|
package/dist/packages/better-stack/src/plugins/blog/client/components/shared/on-this-page.mjs
CHANGED
|
@@ -38,7 +38,7 @@ function OnThisPage({ markdown, className }) {
|
|
|
38
38
|
className
|
|
39
39
|
),
|
|
40
40
|
"aria-label": "Table of contents",
|
|
41
|
-
children: /* @__PURE__ */ jsx("div", { className: "overflow-y-auto px-2", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 p-
|
|
41
|
+
children: /* @__PURE__ */ jsx("div", { className: "overflow-y-auto px-2", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 p-2 pt-0 text-sm", children: [
|
|
42
42
|
/* @__PURE__ */ jsxs("p", { className: "flex items-center gap-2 font-semibold text-muted-foreground sticky top-0 h-6 text-xs", children: [
|
|
43
43
|
/* @__PURE__ */ jsx(TextAlignStart, { className: "w-3 h-3" }),
|
|
44
44
|
" ",
|
package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
const jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
const context = require('@btst/stack/context');
|
|
6
|
-
const
|
|
6
|
+
const betterStackAttribution = require('../../../../../../../ui/src/components/better-stack-attribution.cjs');
|
|
7
7
|
const pageLayout = require('./page-layout.cjs');
|
|
8
8
|
|
|
9
9
|
function PageWrapper({
|
|
@@ -16,7 +16,7 @@ function PageWrapper({
|
|
|
16
16
|
});
|
|
17
17
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
18
18
|
/* @__PURE__ */ jsxRuntime.jsx(pageLayout.PageLayout, { className, "data-testid": testId, children }),
|
|
19
|
-
showAttribution && /* @__PURE__ */ jsxRuntime.jsx(
|
|
19
|
+
showAttribution && /* @__PURE__ */ jsxRuntime.jsx(betterStackAttribution.BetterStackAttribution, {})
|
|
20
20
|
] });
|
|
21
21
|
}
|
|
22
22
|
|
package/dist/packages/better-stack/src/plugins/blog/client/components/shared/page-wrapper.mjs
CHANGED
|
@@ -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 {
|
|
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(
|
|
17
|
+
showAttribution && /* @__PURE__ */ jsx(BetterStackAttribution, {})
|
|
18
18
|
] });
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -47,8 +47,8 @@ function RecentPostsCarousel({ posts, ref }) {
|
|
|
47
47
|
},
|
|
48
48
|
post.id
|
|
49
49
|
)) }),
|
|
50
|
-
/* @__PURE__ */ jsxRuntime.jsx(carousel.CarouselPrevious, { className: "-left-4
|
|
51
|
-
/* @__PURE__ */ jsxRuntime.jsx(carousel.CarouselNext, { className: "-right-4
|
|
50
|
+
/* @__PURE__ */ jsxRuntime.jsx(carousel.CarouselPrevious, { className: "-left-4 z-50 hover:cursor-pointer" }),
|
|
51
|
+
/* @__PURE__ */ jsxRuntime.jsx(carousel.CarouselNext, { className: "-right-4 z-50 hover:cursor-pointer" })
|
|
52
52
|
]
|
|
53
53
|
}
|
|
54
54
|
) })
|
|
@@ -45,8 +45,8 @@ function RecentPostsCarousel({ posts, ref }) {
|
|
|
45
45
|
},
|
|
46
46
|
post.id
|
|
47
47
|
)) }),
|
|
48
|
-
/* @__PURE__ */ jsx(CarouselPrevious, { className: "-left-4
|
|
49
|
-
/* @__PURE__ */ jsx(CarouselNext, { className: "-right-4
|
|
48
|
+
/* @__PURE__ */ jsx(CarouselPrevious, { className: "-left-4 z-50 hover:cursor-pointer" }),
|
|
49
|
+
/* @__PURE__ */ jsx(CarouselNext, { className: "-right-4 z-50 hover:cursor-pointer" })
|
|
50
50
|
]
|
|
51
51
|
}
|
|
52
52
|
) })
|
|
@@ -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.
|
|
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,
|
|
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
|
|
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: "
|
|
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.
|
|
24
|
+
exports.BetterStackAttribution = BetterStackAttribution;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
-
function
|
|
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: "
|
|
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 {
|
|
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 };
|