@bothub-chat/ui 2.57.1-fix-ceo-725ba23a-a0d6-4208-966e-f78a5249dfc0 → 2.57.1-fix-images-685cbff9-2659-4fb3-9442-eeec31ea60bf

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.
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{styled as t,css as i}from"styled-components";import{Avatar as n}from"../avatar/index.js";import{Typography as o}from"../typography/index.js";import{Badge as a}from"../badge/index.js";import{Backdrop as p}from"../backdrop/index.js";import{Image as d}from"../image/index.js";import{Button as l}from"../button/index.js";import{Container as r}from"../container/index.js";import{ArrowNarrowLeftIcon as s}from"../../icons/arrow-narrow-left/index.js";import{ArrowNarrowRightIcon as m}from"../../icons/arrow-narrow-right/index.js";import{adaptive as c}from"../../adaptive/index.js";import{ZoommableImage as g}from"./zoommable-image/index.js";const h=t.div.withConfig({displayName:"styled__ImageFullScreenStyled",componentId:"sc-n12p0f-0"})(["display:flex;justify-content:center;align-items:center;position:fixed;top:0px;bottom:0px;left:0px;right:0px;padding-top:34px;z-index:",";pointer-events:none;@media (max-height:600px){--bothub-scale:0.8;}@media (max-height:460px){--bothub-scale:0.6;}@media (max-height:440px){--bothub-scale:0.5;}"],({theme:e})=>e.zIndex.modal+1),x=t(p).withConfig({displayName:"styled__ImageFullScreenBackdrop",componentId:"sc-n12p0f-1"})(["pointer-events:auto;"]),f=t(r).withConfig({displayName:"styled__ImageFullScreenContainer",componentId:"sc-n12p0f-2"})(["height:100%;"]),y=t.div.withConfig({displayName:"styled__ImageFullScreenContent",componentId:"sc-n12p0f-3"})(["display:flex;align-items:center;flex-direction:column;position:relative;height:100%;z-index:",";"],({theme:e})=>e.zIndex.modal+1),u=t.div.withConfig({displayName:"styled__ImageFullScreenTopBlock",componentId:"sc-n12p0f-4"})(["display:flex;flex-shrink:0;width:100%;background:",";border-bottom:1px solid ",";border-radius:17px;overflow:hidden;padding:16px 24px;pointer-events:auto;"],({theme:e})=>e.colors.grayScale.gray4,({theme:e})=>e.colors.grayScale.gray2),w=t.div.withConfig({displayName:"styled__ImageFullScreenTopBlockContent",componentId:"sc-n12p0f-5"})(["display:flex;justify-content:space-between;width:100%;"]),I=t.div.withConfig({displayName:"styled__ImageFullScreenAuthor",componentId:"sc-n12p0f-6"})(["display:flex;align-items:center;gap:12px;"]),v=t(n).attrs({size:30}).withConfig({displayName:"styled__ImageFullScreenAuthorAvatar",componentId:"sc-n12p0f-7"})([""]),_=t(o).attrs({variant:"body-m-medium"}).withConfig({displayName:"styled__ImageFullScreenAuthorName",componentId:"sc-n12p0f-8"})(["cursor:default;"]),b=t(a).attrs({variant:"info"}).withConfig({displayName:"styled__ImageFullScreenAuthorTag",componentId:"sc-n12p0f-9"})([""]),C=t.div.withConfig({displayName:"styled__ImageFullScreenToolbar",componentId:"sc-n12p0f-10"})([""]),S=t.div.withConfig({displayName:"styled__ImageFullScreenMain",componentId:"sc-n12p0f-11"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;"]),N=t.div.withConfig({displayName:"styled__ImageFullScreenCarousel",componentId:"sc-n12p0f-12"})(["position:relative;width:100vw;overflow:hidden;"]),F=t.div.withConfig({displayName:"styled__ImageFullScreenCarouselContainer",componentId:"sc-n12p0f-13"})(["display:flex;will-change:transform;touch-action:none;user-select:none;width:100%;height:100%;transition:transform 0.3s ease-in-out;"]),j=t.div.withConfig({displayName:"styled__ImageFullScreenSlide",componentId:"sc-n12p0f-14"})(["width:100vw;flex-shrink:0;pointer-events:none;display:flex;align-items:center;justify-content:center;& > *{pointer-events:all;}&:active{cursor:grabbing;}"]),k=t(g).withConfig({displayName:"styled__ImageFullScreenImage",componentId:"sc-n12p0f-15"})(["& > * > img{object-fit:cover;width:auto;height:auto;max-height:min(60vh,512px);pointer-events:none;user-select:none;"," @media (max-height:600px){max-width:256px;max-height:256px;}}& > div > span{max-height:min(60vh,512px);"," @media (max-width:600px){max-width:256px;max-height:256px;}@media (max-height:600px){max-width:256px;max-height:256px;}}"],c({merge:!0,desktop:i(["max-width:512px;"]),mobile:i(["max-width:256px;"])}),c({merge:!0,desktop:i(["max-width:512px;"]),mobile:i(["max-width:256px;"])})),z=t.div.withConfig({displayName:"styled__ImageFullScreenCarouselButtons",componentId:"sc-n12p0f-16"})(["display:flex;justify-content:center;align-items:center;position:absolute;top:0px;bottom:0px;left:0px;right:0px;width:100vw;z-index:1;pointer-events:none;"," @media (max-height:600px){gap:calc(min(256px,","px) + 48px);}"],c(({$imageWidth:e})=>({merge:!0,desktop:i(["gap:calc(min(512px,","px) + 48px);"],e),mobile:i(["gap:calc(min(256px,","px) + 48px);"],e)})),({$imageWidth:e})=>e),B=t(l).attrs({children:e(s,{})}).withConfig({displayName:"styled__ImageFullScreenCarouselPrevButton",componentId:"sc-n12p0f-17"})(["pointer-events:auto;"]),A=t(l).attrs({children:e(m,{})}).withConfig({displayName:"styled__ImageFullScreenCarouselNextButton",componentId:"sc-n12p0f-18"})(["pointer-events:auto;"]),P=t.div.withConfig({displayName:"styled__ImageFullScreenPreview",componentId:"sc-n12p0f-19"})(["display:flex;flex-shrink:0;border-radius:14px;overflow:hidden;background:",";margin-top:20px;pointer-events:auto;",""],({theme:e})=>e.colors.grayScale.gray3,c({merge:!0,desktop:i(["padding:10px;"]),mobile:i(["padding:8px;"])})),T=t.div.withConfig({displayName:"styled__ImageFullScreenPreviewImages",componentId:"sc-n12p0f-20"})(["display:flex;gap:10px;"]),$=t(d).attrs({width:64,height:64,loading:"skeleton"}).withConfig({displayName:"styled__ImageFullScreenPreviewImage",componentId:"sc-n12p0f-21"})(["display:inline-flex;width:auto;border-radius:10px;cursor:pointer;opacity:",";transition:0.225s opacity;object-fit:cover;&:hover{opacity:1;}"],({$active:e})=>e?1:.6);export{I as ImageFullScreenAuthor,v as ImageFullScreenAuthorAvatar,_ as ImageFullScreenAuthorName,b as ImageFullScreenAuthorTag,x as ImageFullScreenBackdrop,N as ImageFullScreenCarousel,z as ImageFullScreenCarouselButtons,F as ImageFullScreenCarouselContainer,A as ImageFullScreenCarouselNextButton,B as ImageFullScreenCarouselPrevButton,f as ImageFullScreenContainer,y as ImageFullScreenContent,k as ImageFullScreenImage,S as ImageFullScreenMain,P as ImageFullScreenPreview,$ as ImageFullScreenPreviewImage,T as ImageFullScreenPreviewImages,j as ImageFullScreenSlide,h as ImageFullScreenStyled,C as ImageFullScreenToolbar,u as ImageFullScreenTopBlock,w as ImageFullScreenTopBlockContent};
1
+ import{jsx as e}from"react/jsx-runtime";import{styled as t,css as i}from"styled-components";import{Avatar as n}from"../avatar/index.js";import{Typography as o}from"../typography/index.js";import{Badge as a}from"../badge/index.js";import{Backdrop as p}from"../backdrop/index.js";import{Image as d}from"../image/index.js";import{Button as l}from"../button/index.js";import{Container as r}from"../container/index.js";import{ArrowNarrowLeftIcon as s}from"../../icons/arrow-narrow-left/index.js";import{ArrowNarrowRightIcon as m}from"../../icons/arrow-narrow-right/index.js";import{adaptive as c}from"../../adaptive/index.js";import{ZoommableImage as g}from"./zoommable-image/index.js";const h=t.div.withConfig({displayName:"styled__ImageFullScreenStyled",componentId:"sc-n12p0f-0"})(["display:flex;justify-content:center;align-items:center;position:fixed;top:0px;bottom:0px;left:0px;right:0px;padding-top:34px;z-index:",";pointer-events:none;@media (max-height:600px){--bothub-scale:0.8;}@media (max-height:460px){--bothub-scale:0.6;}@media (max-height:440px){--bothub-scale:0.5;}"],({theme:e})=>e.zIndex.modal+1),x=t(p).withConfig({displayName:"styled__ImageFullScreenBackdrop",componentId:"sc-n12p0f-1"})(["pointer-events:auto;"]),f=t(r).withConfig({displayName:"styled__ImageFullScreenContainer",componentId:"sc-n12p0f-2"})(["height:100%;"]),y=t.div.withConfig({displayName:"styled__ImageFullScreenContent",componentId:"sc-n12p0f-3"})(["display:flex;align-items:center;flex-direction:column;position:relative;height:100%;z-index:",";"],({theme:e})=>e.zIndex.modal+1),u=t.div.withConfig({displayName:"styled__ImageFullScreenTopBlock",componentId:"sc-n12p0f-4"})(["display:flex;flex-shrink:0;width:100%;background:",";border-bottom:1px solid ",";border-radius:17px;overflow:hidden;padding:16px 24px;pointer-events:auto;"],({theme:e})=>e.colors.grayScale.gray4,({theme:e})=>e.colors.grayScale.gray2),w=t.div.withConfig({displayName:"styled__ImageFullScreenTopBlockContent",componentId:"sc-n12p0f-5"})(["display:flex;justify-content:space-between;width:100%;"]),v=t.div.withConfig({displayName:"styled__ImageFullScreenAuthor",componentId:"sc-n12p0f-6"})(["display:flex;align-items:center;gap:12px;"]),I=t(n).attrs({size:30}).withConfig({displayName:"styled__ImageFullScreenAuthorAvatar",componentId:"sc-n12p0f-7"})([""]),_=t(o).attrs({variant:"body-m-medium"}).withConfig({displayName:"styled__ImageFullScreenAuthorName",componentId:"sc-n12p0f-8"})(["cursor:default;"]),b=t(a).attrs({variant:"info"}).withConfig({displayName:"styled__ImageFullScreenAuthorTag",componentId:"sc-n12p0f-9"})([""]),C=t.div.withConfig({displayName:"styled__ImageFullScreenToolbar",componentId:"sc-n12p0f-10"})([""]),S=t.div.withConfig({displayName:"styled__ImageFullScreenMain",componentId:"sc-n12p0f-11"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;"]),N=t.div.withConfig({displayName:"styled__ImageFullScreenCarousel",componentId:"sc-n12p0f-12"})(["position:relative;width:100vw;overflow:hidden;"]),F=t.div.withConfig({displayName:"styled__ImageFullScreenCarouselContainer",componentId:"sc-n12p0f-13"})(["display:flex;will-change:transform;touch-action:none;user-select:none;width:100%;height:100%;transition:transform 0.3s ease-in-out;"]),j=t.div.withConfig({displayName:"styled__ImageFullScreenSlide",componentId:"sc-n12p0f-14"})(["width:100vw;flex-shrink:0;pointer-events:none;display:flex;align-items:center;justify-content:center;& > *{pointer-events:all;}&:active{cursor:grabbing;}"]),k=t(g).withConfig({displayName:"styled__ImageFullScreenImage",componentId:"sc-n12p0f-15"})(["& > * > img{object-fit:cover;width:auto;height:auto;max-height:60vh;pointer-events:none;user-select:none;"," @media (max-height:600px){max-width:256px;max-height:256px;}}& > div > span{max-height:min(60vh,512px);"," @media (max-width:600px){max-width:256px;max-height:256px;}@media (max-height:600px){max-width:256px;max-height:256px;}}"],c({merge:!0,desktop:i(["max-width:80vw;"]),mobile:i(["max-width:256px;"])}),c({merge:!0,desktop:i(["max-width:512px;"]),mobile:i(["max-width:256px;"])})),z=t.div.withConfig({displayName:"styled__ImageFullScreenCarouselButtons",componentId:"sc-n12p0f-16"})(["display:flex;justify-content:center;align-items:center;position:absolute;top:0px;bottom:0px;left:0px;right:0px;width:100vw;z-index:1;pointer-events:none;"," @media (max-height:600px){gap:calc(min(256px,","px) + 48px);}"],c(({$imageWidth:e})=>({merge:!0,desktop:i(["gap:calc(","px + 48px);"],e),mobile:i(["gap:calc(","px + 48px);"],e)})),({$imageWidth:e})=>e),B=t(l).attrs({children:e(s,{})}).withConfig({displayName:"styled__ImageFullScreenCarouselPrevButton",componentId:"sc-n12p0f-17"})(["pointer-events:auto;"]),A=t(l).attrs({children:e(m,{})}).withConfig({displayName:"styled__ImageFullScreenCarouselNextButton",componentId:"sc-n12p0f-18"})(["pointer-events:auto;"]),P=t.div.withConfig({displayName:"styled__ImageFullScreenPreview",componentId:"sc-n12p0f-19"})(["display:flex;flex-shrink:0;border-radius:14px;overflow:hidden;background:",";margin-top:20px;pointer-events:auto;",""],({theme:e})=>e.colors.grayScale.gray3,c({merge:!0,desktop:i(["padding:10px;"]),mobile:i(["padding:8px;"])})),T=t.div.withConfig({displayName:"styled__ImageFullScreenPreviewImages",componentId:"sc-n12p0f-20"})(["display:flex;gap:10px;"]),$=t(d).attrs({width:64,height:64,loading:"skeleton"}).withConfig({displayName:"styled__ImageFullScreenPreviewImage",componentId:"sc-n12p0f-21"})(["display:inline-flex;width:auto;border-radius:10px;cursor:pointer;opacity:",";transition:0.225s opacity;object-fit:cover;&:hover{opacity:1;}"],({$active:e})=>e?1:.6);export{v as ImageFullScreenAuthor,I as ImageFullScreenAuthorAvatar,_ as ImageFullScreenAuthorName,b as ImageFullScreenAuthorTag,x as ImageFullScreenBackdrop,N as ImageFullScreenCarousel,z as ImageFullScreenCarouselButtons,F as ImageFullScreenCarouselContainer,A as ImageFullScreenCarouselNextButton,B as ImageFullScreenCarouselPrevButton,f as ImageFullScreenContainer,y as ImageFullScreenContent,k as ImageFullScreenImage,S as ImageFullScreenMain,P as ImageFullScreenPreview,$ as ImageFullScreenPreviewImage,T as ImageFullScreenPreviewImages,j as ImageFullScreenSlide,h as ImageFullScreenStyled,C as ImageFullScreenToolbar,u as ImageFullScreenTopBlock,w as ImageFullScreenTopBlockContent};
@@ -1,7 +1,6 @@
1
1
  import{styled as e,css as o}from"styled-components";import{Typography as t}from"../../../typography/index.js";const r=e(t).withConfig({displayName:"styled__MessageParagraphStyled",componentId:"sc-1iz0fdp-0"})(["color:",";"," "," &::selection{","}"],({theme:e,$variant:o,$color:t})=>"user"===o?"custom"===e.scheme?e.colors.custom.message.user.text:"standard"===e.scheme?e.colors.base.white:e.bright?"dark"===e.mode?e.colors.base.black:e.colors.base.white:e.default.colors.base.white:"custom"===e.scheme?e.colors.custom.message.assistant.text:e.colors.base.white,({$disableMargin:e})=>!e&&o`
2
2
  margin: 10px 0px;
3
3
  `,({$wrap:e})=>e&&o`
4
- word-break: keep-all;
5
4
  white-space: pre-wrap;
6
5
  `,({$variant:e,$color:t})=>{switch(e){case"user":return o`
7
6
  background: ${({theme:e})=>"light"===e.mode?e.colors.accent.primaryLight:e.colors.base.white};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{styled as t,css as a}from"styled-components";import{Avatar as s}from"../avatar/index.js";import{Typography as i}from"../typography/index.js";import{Button as o}from"../button/index.js";import{ArrowNarrowDownIcon as r}from"../../icons/arrow-narrow-down/index.js";import{ArrowNarrowLeftIcon as n}from"../../icons/arrow-narrow-left/index.js";import{ArrowNarrowRightIcon as d}from"../../icons/arrow-narrow-right/index.js";import{ArrowNarrowUpIcon as p}from"../../icons/arrow-narrow-up/index.js";import{EditIcon as l}from"../../icons/edit/index.js";import{adaptive as m}from"../../adaptive/index.js";import{Badge as c}from"../badge/index.js";import{Scrollbar as g}from"../scrollbar/index.js";import{MessageImageButton as w}from"./components/image/button/index.js";import{MessageImageButtonZoneWrapper as f}from"./components/image/button/styled.js";const x=t.div.withConfig({displayName:"styled__MessageStyledWrapper",componentId:"sc-1wz70sd-0"})(["display:flex;align-items:flex-start;width:100%;",""],({$variant:e})=>{switch(e){case"user":return a(["justify-content:flex-start;flex-direction:row-reverse;margin-left:auto;"]);case"assistant":return a(["margin-right:auto;"])}}),h=t.div.withConfig({displayName:"styled__MessageStyledWithBottomPanel",componentId:"sc-1wz70sd-1"})(["display:flex;width:fit-content;max-width:100%;flex-direction:column;gap:8px;"]),y=t.div.withConfig({displayName:"styled__MessageStyled",componentId:"sc-1wz70sd-2"})(["display:flex;max-width:100%;",""],({$variant:e})=>{if("user"===e)return a(["flex-direction:row-reverse;"])}),u=t.div.withConfig({displayName:"styled__MessageContent",componentId:"sc-1wz70sd-3"})(["position:relative;display:grid;column-gap:12px;row-gap:8px;max-width:100%;"," @media (max-width:","){","}"],({$variant:e})=>{switch(e){case"user":return a(["grid-template-areas:'. top .' 'block block avatar' 'buttons buttons .';"]);case"assistant":return a(["grid-template-areas:'. top .' 'avatar block block' '. buttons timestamp';"])}},({theme:e})=>e.mobile.maxWidth,({$variant:e})=>{switch(e){case"user":return a(["grid-template-areas:'top top' 'block block' 'buttons buttons';"]);case"assistant":return a(["grid-template-areas:'top top .' 'block block block' 'buttons buttons timestamp';"])}}),b=t.div.withConfig({displayName:"styled__MessageTop",componentId:"sc-1wz70sd-4"})(["display:flex;gap:10px;width:100%;align-items:center;justify-content:space-between;grid-area:top;"]),_=t.div.withConfig({displayName:"styled__MessageSender",componentId:"sc-1wz70sd-5"})(["display:flex;align-items:center;gap:10px;"]),v=t(i).attrs({variant:"body-m-regular"}).withConfig({displayName:"styled__MessageName",componentId:"sc-1wz70sd-6"})(["color:",";"],({theme:e,$color:t})=>{switch(t){case"green":return"dark"===e.mode?e.default.colors.base.white:e.colors.gpt3;case"purple":return"dark"===e.mode?e.default.colors.base.white:e.colors.gpt4;default:return e.colors.base.white}}),z=t.div.withConfig({displayName:"styled__MessageTags",componentId:"sc-1wz70sd-7"})([""]),C=t(c).withConfig({displayName:"styled__MessageTag",componentId:"sc-1wz70sd-8"})([""]),I=t.div.withConfig({displayName:"styled__MessageAvatarWrapper",componentId:"sc-1wz70sd-9"})(["grid-area:avatar;align-self:flex-end;user-select:none;@media (max-width:","){display:none;}"],({theme:e})=>e.mobile.maxWidth),N=t(s).withConfig({displayName:"styled__MessageAvatar",componentId:"sc-1wz70sd-10"})([""]),k=t.div.withConfig({displayName:"styled__MessageBlockWrapper",componentId:"sc-1wz70sd-11"})(["grid-area:block;display:flex;flex-direction:column;justify-content:center;gap:6px;position:relative;overflow:auto;"]),M=t.div.withConfig({displayName:"styled__MessageBlock",componentId:"sc-1wz70sd-12"})(["position:relative;display:flex;border-radius:10px;width:100%;max-width:100%;overflow:auto;"," "," "," ",""],({$variant:e})=>{switch(e){case"user":return a(["border-bottom-right-radius:0px;"]);case"assistant":return a(["border-bottom-left-radius:0px;"])}},({$hexColor:e,$variant:t})=>"user"===t&&`background: ${e};`,({$hasTimestamp:e,$timestampPosition:t,$variant:s})=>e?"user"===s&&m({variant:"dashboard",merge:!0,desktop:a(["padding:",";"],"right"===t?"8px":"8px 8px 5px 8px"),tablet:a(["padding:",";"],"right"===t?"8px":"8px 8px 5px 8px")}):"user"===s&&m({variant:"dashboard",merge:!0,desktop:a(["padding:14px 16px;"]),tablet:a(["padding:14px;"])}),({$timestampPosition:e})=>"bottom"===e&&a(["flex-direction:column;"])),j=t.div.withConfig({displayName:"styled__MessageBlockBottomPanel",componentId:"sc-1wz70sd-13"})(["grid-area:buttons;display:flex;align-items:center;gap:14px;"]),B=t.div.withConfig({displayName:"styled__MessageBlockTransaction",componentId:"sc-1wz70sd-14"})(["display:block;"]),$=t(g).attrs({variant:"secondary"}).withConfig({displayName:"styled__MessageBlockScrollbarWrapper",componentId:"sc-1wz70sd-15"})([""]),A=t.div.withConfig({displayName:"styled__MessageBlockContent",componentId:"sc-1wz70sd-16"})(["display:flex;flex-direction:column;align-items:flex-start;gap:10px;grid-area:block;border-radius:10px;padding:",";max-width:100%;overflow:hidden;"],({$variant:e})=>{switch(e){case"user":return"8px";case"assistant":return"0px 8px 0px 0px"}}),W=t.span.attrs({role:"textbox",contentEditable:!0,suppressContentEditableWarning:!0}).withConfig({displayName:"styled__MessageBlockTextArea",componentId:"sc-1wz70sd-17"})(["min-width:10ch;min-height:1ch;min-height:1cap;width:100%;max-width:100%;height:auto;resize:none;overflow:clip;white-space:pre-wrap;border:none;outline:none;background-color:transparent;",""],m({desktop:a(["font-size:16px;"]),tablet:a(["font-size:14px;"]),mobile:a(["font-size:14px;"])})),S=t.div.withConfig({displayName:"styled__MessageButtonsStyled",componentId:"sc-1wz70sd-18"})(["margin-left:48px;@media (max-width:","){margin-left:12px;}"],({theme:e})=>e.mobile.maxWidth),T=t(i).attrs({variant:"body-m-regular"}).withConfig({displayName:"styled__MessageTransaction",componentId:"sc-1wz70sd-19"})(["text-transform:uppercase;color:",";"],({theme:e})=>"light"===e.mode?e.colors.grayScale.gray1:e.default.colors.base.white),P=t(o).attrs({variant:"text",iconSize:18}).withConfig({displayName:"styled__MessageAction",componentId:"sc-1wz70sd-20"})([""]),E=t(P).attrs({children:e(l,{})}).withConfig({displayName:"styled__MessageEditAction",componentId:"sc-1wz70sd-21"})([""]),L=t(w).attrs({variant:"primary-transparent",zone:!0,children:e(n,{})}).withConfig({displayName:"styled__MessageImageLeftArrowButton",componentId:"sc-1wz70sd-22"})(["","{justify-content:flex-start;}"],f),R=t(w).attrs({variant:"primary-transparent",zone:!0,children:e(d,{})}).withConfig({displayName:"styled__MessageImageRightArrowButton",componentId:"sc-1wz70sd-23"})(["","{justify-content:flex-end;}"],f),q=t(w).attrs({variant:"primary-transparent",zone:!0,children:e(p,{})}).withConfig({displayName:"styled__MessageImageTopArrowButton",componentId:"sc-1wz70sd-24"})(["","{align-items:flex-start;}"],f),D=t(w).attrs({variant:"primary-transparent",zone:!0,children:e(r,{})}).withConfig({displayName:"styled__MessageImageBottomArrowButton",componentId:"sc-1wz70sd-25"})(["","{align-items:flex-end;}"],f);export{P as MessageAction,N as MessageAvatar,I as MessageAvatarWrapper,M as MessageBlock,j as MessageBlockBottomPanel,A as MessageBlockContent,$ as MessageBlockScrollbarWrapper,W as MessageBlockTextArea,B as MessageBlockTransaction,k as MessageBlockWrapper,S as MessageButtonsStyled,u as MessageContent,E as MessageEditAction,D as MessageImageBottomArrowButton,L as MessageImageLeftArrowButton,R as MessageImageRightArrowButton,q as MessageImageTopArrowButton,v as MessageName,_ as MessageSender,y as MessageStyled,h as MessageStyledWithBottomPanel,x as MessageStyledWrapper,C as MessageTag,z as MessageTags,b as MessageTop,T as MessageTransaction};
1
+ import{jsx as e}from"react/jsx-runtime";import{styled as t,css as a}from"styled-components";import{Avatar as s}from"../avatar/index.js";import{Typography as i}from"../typography/index.js";import{Button as o}from"../button/index.js";import{ArrowNarrowDownIcon as r}from"../../icons/arrow-narrow-down/index.js";import{ArrowNarrowLeftIcon as n}from"../../icons/arrow-narrow-left/index.js";import{ArrowNarrowRightIcon as d}from"../../icons/arrow-narrow-right/index.js";import{ArrowNarrowUpIcon as p}from"../../icons/arrow-narrow-up/index.js";import{EditIcon as l}from"../../icons/edit/index.js";import{adaptive as m}from"../../adaptive/index.js";import{Badge as c}from"../badge/index.js";import{Scrollbar as g}from"../scrollbar/index.js";import{MessageImageButton as w}from"./components/image/button/index.js";import{MessageImageButtonZoneWrapper as x}from"./components/image/button/styled.js";const f=t.div.withConfig({displayName:"styled__MessageStyledWrapper",componentId:"sc-1wz70sd-0"})(["display:flex;align-items:flex-start;width:100%;",""],({$variant:e})=>{switch(e){case"user":return a(["justify-content:flex-start;flex-direction:row-reverse;margin-left:auto;"]);case"assistant":return a(["margin-right:auto;"])}}),h=t.div.withConfig({displayName:"styled__MessageStyledWithBottomPanel",componentId:"sc-1wz70sd-1"})(["display:flex;width:fit-content;max-width:100%;flex-direction:column;gap:8px;"]),y=t.div.withConfig({displayName:"styled__MessageStyled",componentId:"sc-1wz70sd-2"})(["display:flex;max-width:100%;",""],({$variant:e})=>{if("user"===e)return a(["flex-direction:row-reverse;"])}),u=t.div.withConfig({displayName:"styled__MessageContent",componentId:"sc-1wz70sd-3"})(["position:relative;display:grid;column-gap:12px;row-gap:8px;max-width:100%;"," @media (max-width:","){","}"],({$variant:e})=>{switch(e){case"user":return a(["grid-template-areas:'. top .' 'block block avatar' 'buttons buttons .';"]);case"assistant":return a(["grid-template-areas:'. top .' 'avatar block block' '. buttons timestamp';"])}},({theme:e})=>e.mobile.maxWidth,({$variant:e})=>{switch(e){case"user":return a(["grid-template-areas:'top top' 'block block' 'buttons buttons';"]);case"assistant":return a(["grid-template-areas:'top top .' 'block block block' 'buttons buttons timestamp';"])}}),b=t.div.withConfig({displayName:"styled__MessageTop",componentId:"sc-1wz70sd-4"})(["display:flex;gap:10px;width:100%;align-items:center;justify-content:space-between;grid-area:top;"]),_=t.div.withConfig({displayName:"styled__MessageSender",componentId:"sc-1wz70sd-5"})(["display:flex;align-items:center;gap:10px;"]),v=t(i).attrs({variant:"body-m-regular"}).withConfig({displayName:"styled__MessageName",componentId:"sc-1wz70sd-6"})(["color:",";"],({theme:e,$color:t})=>{switch(t){case"green":return"dark"===e.mode?e.default.colors.base.white:e.colors.gpt3;case"purple":return"dark"===e.mode?e.default.colors.base.white:e.colors.gpt4;default:return e.colors.base.white}}),z=t.div.withConfig({displayName:"styled__MessageTags",componentId:"sc-1wz70sd-7"})([""]),C=t(c).withConfig({displayName:"styled__MessageTag",componentId:"sc-1wz70sd-8"})([""]),I=t.div.withConfig({displayName:"styled__MessageAvatarWrapper",componentId:"sc-1wz70sd-9"})(["grid-area:avatar;align-self:flex-end;user-select:none;@media (max-width:","){display:none;}"],({theme:e})=>e.mobile.maxWidth),N=t(s).withConfig({displayName:"styled__MessageAvatar",componentId:"sc-1wz70sd-10"})([""]),k=t.div.withConfig({displayName:"styled__MessageBlockWrapper",componentId:"sc-1wz70sd-11"})(["grid-area:block;display:flex;flex-direction:column;justify-content:center;gap:6px;position:relative;overflow:auto;"]),M=t.div.withConfig({displayName:"styled__MessageBlock",componentId:"sc-1wz70sd-12"})(["position:relative;display:flex;border-radius:10px;width:100%;max-width:100%;overflow:auto;"," "," "," ",""],({$variant:e})=>{switch(e){case"user":return a(["border-bottom-right-radius:0px;"]);case"assistant":return a(["border-bottom-left-radius:0px;"])}},({$hexColor:e,$variant:t})=>"user"===t&&`background: ${e};`,({$hasTimestamp:e,$timestampPosition:t,$variant:s})=>e?"user"===s&&m({variant:"dashboard",merge:!0,desktop:a(["padding:",";"],"right"===t?"8px":"8px 8px 5px 8px"),tablet:a(["padding:",";"],"right"===t?"8px":"8px 8px 5px 8px")}):"user"===s&&m({variant:"dashboard",merge:!0,desktop:a(["padding:14px 16px;"]),tablet:a(["padding:14px;"])}),({$timestampPosition:e})=>"bottom"===e&&a(["flex-direction:column;"])),j=t.div.withConfig({displayName:"styled__MessageBlockBottomPanel",componentId:"sc-1wz70sd-13"})(["grid-area:buttons;display:flex;align-items:center;gap:14px;"]),B=t.div.withConfig({displayName:"styled__MessageBlockTransaction",componentId:"sc-1wz70sd-14"})(["display:block;"]),$=t(g).attrs({variant:"secondary"}).withConfig({displayName:"styled__MessageBlockScrollbarWrapper",componentId:"sc-1wz70sd-15"})([""]),A=t.div.withConfig({displayName:"styled__MessageBlockContent",componentId:"sc-1wz70sd-16"})(["display:flex;flex-direction:column;align-items:flex-start;gap:10px;grid-area:block;border-radius:10px;padding:",";max-width:100%;"],({$variant:e})=>{switch(e){case"user":return"8px";case"assistant":return"0px 8px 0px 0px"}}),W=t.span.attrs({role:"textbox",contentEditable:!0,suppressContentEditableWarning:!0}).withConfig({displayName:"styled__MessageBlockTextArea",componentId:"sc-1wz70sd-17"})(["min-width:10ch;min-height:1ch;min-height:1cap;width:100%;max-width:100%;height:auto;resize:none;overflow:clip;white-space:pre-wrap;border:none;outline:none;background-color:transparent;",""],m({desktop:a(["font-size:16px;"]),tablet:a(["font-size:14px;"]),mobile:a(["font-size:14px;"])})),S=t.div.withConfig({displayName:"styled__MessageButtonsStyled",componentId:"sc-1wz70sd-18"})(["margin-left:48px;@media (max-width:","){margin-left:12px;}"],({theme:e})=>e.mobile.maxWidth),T=t(i).attrs({variant:"body-m-regular"}).withConfig({displayName:"styled__MessageTransaction",componentId:"sc-1wz70sd-19"})(["text-transform:uppercase;color:",";"],({theme:e})=>"light"===e.mode?e.colors.grayScale.gray1:e.default.colors.base.white),P=t(o).attrs({variant:"text",iconSize:18}).withConfig({displayName:"styled__MessageAction",componentId:"sc-1wz70sd-20"})([""]),E=t(P).attrs({children:e(l,{})}).withConfig({displayName:"styled__MessageEditAction",componentId:"sc-1wz70sd-21"})([""]),L=t(w).attrs({variant:"primary-transparent",zone:!0,children:e(n,{})}).withConfig({displayName:"styled__MessageImageLeftArrowButton",componentId:"sc-1wz70sd-22"})(["","{justify-content:flex-start;}"],x),R=t(w).attrs({variant:"primary-transparent",zone:!0,children:e(d,{})}).withConfig({displayName:"styled__MessageImageRightArrowButton",componentId:"sc-1wz70sd-23"})(["","{justify-content:flex-end;}"],x),q=t(w).attrs({variant:"primary-transparent",zone:!0,children:e(p,{})}).withConfig({displayName:"styled__MessageImageTopArrowButton",componentId:"sc-1wz70sd-24"})(["","{align-items:flex-start;}"],x),D=t(w).attrs({variant:"primary-transparent",zone:!0,children:e(r,{})}).withConfig({displayName:"styled__MessageImageBottomArrowButton",componentId:"sc-1wz70sd-25"})(["","{align-items:flex-end;}"],x);export{P as MessageAction,N as MessageAvatar,I as MessageAvatarWrapper,M as MessageBlock,j as MessageBlockBottomPanel,A as MessageBlockContent,$ as MessageBlockScrollbarWrapper,W as MessageBlockTextArea,B as MessageBlockTransaction,k as MessageBlockWrapper,S as MessageButtonsStyled,u as MessageContent,E as MessageEditAction,D as MessageImageBottomArrowButton,L as MessageImageLeftArrowButton,R as MessageImageRightArrowButton,q as MessageImageTopArrowButton,v as MessageName,_ as MessageSender,y as MessageStyled,h as MessageStyledWithBottomPanel,f as MessageStyledWrapper,C as MessageTag,z as MessageTags,b as MessageTop,T as MessageTransaction};
package/package.json CHANGED
@@ -1,71 +1,71 @@
1
- {
2
- "name": "@bothub-chat/ui",
3
- "version": "2.57.1-fix-ceo-725ba23a-a0d6-4208-966e-f78a5249dfc0",
4
- "description": "Bothub UI Components",
5
- "keywords": [
6
- "bot",
7
- "chat",
8
- "chatgpt",
9
- "ai",
10
- "react"
11
- ],
12
- "repository": {
13
- "url": "https://github.com/bothubchat/bothub.git",
14
- "type": "git",
15
- "directory": "./packages/ui"
16
- },
17
- "publishConfig": {
18
- "access": "public",
19
- "registry": "https://registry.npmjs.org/"
20
- },
21
- "author": "dev2alert <atmpotn@yandex.ru>",
22
- "license": "MIT",
23
- "homepage": "https://bothub.chat",
24
- "files": [
25
- "./dist",
26
- "./fonts"
27
- ],
28
- "type": "module",
29
- "main": "./dist/index.js",
30
- "module": "./dist/index.js",
31
- "types": "./dist/index.d.ts",
32
- "exports": {
33
- ".": {
34
- "types": "./dist/index.d.ts",
35
- "import": "./dist/index.js",
36
- "default": "./dist/index.js"
37
- },
38
- "./components/*": "./dist/components/*",
39
- "./fonts/*": "./fonts/*",
40
- "./utils/*": "./dist/utils/*"
41
- },
42
- "sideEffects": false,
43
- "resolutions": {
44
- "react-helmet/react": "^19.0.0"
45
- },
46
- "peerDependencies": {
47
- "@uidotdev/usehooks": "^2.4.1",
48
- "react": "19.1.1",
49
- "react-dom": "19.1.1",
50
- "react-helmet": ">=2",
51
- "styled-components": "^6.0.7"
52
- },
53
- "dependencies": {
54
- "@dnd-kit/core": "^6.1.0",
55
- "@floating-ui/react": "^0.26.16",
56
- "@floating-ui/react-dom": "^2.1.0",
57
- "@react-spring/web": "^10",
58
- "date-fns": "^3.6.0",
59
- "highlight.js": "^11.11.0",
60
- "katex": "^0.16.10",
61
- "marked": "^16.2.1",
62
- "normalize.css": "^8.0.1",
63
- "rc-slider": "^11.1.8",
64
- "react-markdown": "^10.0.0",
65
- "rehype-katex": "^7.0.0",
66
- "remark-gfm": "^4.0.1",
67
- "remark-math": "^6.0.0",
68
- "tslib": "^2.6.2",
69
- "unist-util-visit": "^5.0.0"
70
- }
71
- }
1
+ {
2
+ "name": "@bothub-chat/ui",
3
+ "version": "2.57.1-fix-images-685cbff9-2659-4fb3-9442-eeec31ea60bf",
4
+ "description": "Bothub UI Components",
5
+ "keywords": [
6
+ "bot",
7
+ "chat",
8
+ "chatgpt",
9
+ "ai",
10
+ "react"
11
+ ],
12
+ "repository": {
13
+ "url": "https://github.com/bothubchat/bothub.git",
14
+ "type": "git",
15
+ "directory": "./packages/ui"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public",
19
+ "registry": "https://registry.npmjs.org/"
20
+ },
21
+ "author": "dev2alert <atmpotn@yandex.ru>",
22
+ "license": "MIT",
23
+ "homepage": "https://bothub.chat",
24
+ "files": [
25
+ "./dist",
26
+ "./fonts"
27
+ ],
28
+ "type": "module",
29
+ "main": "./dist/index.js",
30
+ "module": "./dist/index.js",
31
+ "types": "./dist/index.d.ts",
32
+ "exports": {
33
+ ".": {
34
+ "types": "./dist/index.d.ts",
35
+ "import": "./dist/index.js",
36
+ "default": "./dist/index.js"
37
+ },
38
+ "./components/*": "./dist/components/*",
39
+ "./fonts/*": "./fonts/*",
40
+ "./utils/*": "./dist/utils/*"
41
+ },
42
+ "sideEffects": false,
43
+ "resolutions": {
44
+ "react-helmet/react": "^19.0.0"
45
+ },
46
+ "peerDependencies": {
47
+ "@uidotdev/usehooks": "^2.4.1",
48
+ "react": "19.1.1",
49
+ "react-dom": "19.1.1",
50
+ "react-helmet": ">=2",
51
+ "styled-components": "^6.0.7"
52
+ },
53
+ "dependencies": {
54
+ "@dnd-kit/core": "^6.1.0",
55
+ "@floating-ui/react": "^0.26.16",
56
+ "@floating-ui/react-dom": "^2.1.0",
57
+ "@react-spring/web": "^10",
58
+ "date-fns": "^3.6.0",
59
+ "highlight.js": "^11.11.0",
60
+ "katex": "^0.16.10",
61
+ "marked": "^16.2.1",
62
+ "normalize.css": "^8.0.1",
63
+ "rc-slider": "^11.1.8",
64
+ "react-markdown": "^10.0.0",
65
+ "rehype-katex": "^7.0.0",
66
+ "remark-gfm": "^4.0.1",
67
+ "remark-math": "^6.0.0",
68
+ "tslib": "^2.6.2",
69
+ "unist-util-visit": "^5.0.0"
70
+ }
71
+ }