@bikdotai/bik-component-library 0.0.821-beta.2 → 0.0.821-beta.4

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,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),c=require("react"),l=require("../../../constants/Theme.js"),R=require("../../../hooks/useWindowSize.js"),g=require("../GiftedChat/types.js"),S=require("../GiftedChat/utils.js"),A=require("./types.js"),P=n=>n&&typeof n=="object"&&"default"in n?n:{default:n},q=P(c),B=n=>{const{currentMessage:d,position:s,renderMessageText:C,renderTicks:T,renderTime:v,renderCustomView:y,isCustomViewBottom:h,isUnsatisfactoryMessageFn:m,messagesGroupedByAiTraceId:x,onPress:j,containerStyle:t,bubbleStyles:i,appType:I=A.GiftedChatAppType.Bik}=n,u=R.useWindowSize(),e=d,r=I===A.GiftedChatAppType.Manifest,b=c.useMemo(()=>e.category===S.Constants.ChatActivity.Category.ACTIVITY&&e.activityType===S.Constants.ChatActivity.Type.PRIVATE_NOTE,[e.category,e.activityType]),M=c.useMemo(()=>{const[p,f]=S.isStringifiedArray(e?.message);return p&&f&&Array.isArray(f)},[e?.message]),k=e?.channelId===g.MESSAGE_CHANNELS.SMTP||e?.channelName===g.MESSAGE_CHANNELS.SMTP,E=c.useMemo(()=>{const p={borderRadius:8,minHeight:20,margin:0,flexGrow:u?1:0,width:"100%"},f=e?.channelId===g.MESSAGE_CHANNELS.GMAIL||e?.channelName===g.MESSAGE_CHANNELS.GMAIL;let a={};if(r)return s==="left"?a=i&&typeof i.left=="object"?i.left:{}:a=i&&typeof i.right=="object"?i.right:{},{...a};if(s==="left")a={...u||f||k?{maxWidth:"100%"}:{},...b?{background:l.COLORS.background.warning.light}:{backgroundColor:e?.isPrivateMail?l.COLORS.background.blue.light:l.COLORS.background.warning.light}};else{const N=m&&m({aiTraceId:e.eventProperties?.aiTraceId,messagesGroupedByAiTraceId:x});a={backgroundColor:e.status==="failed"||N?l.COLORS.background.negative.light:l.COLORS.background.brandUltraLight,...b?{background:l.COLORS.background.warning.light}:{},...!u&&M?{maxWidth:500}:{}}}const L=i&&typeof i=="object"?"left"in i||"right"in i?s==="left"?i.left??{}:i.right??{}:i:{};return{...p,...a,...L}},[e?.channelId,e?.channelName,e?.meta?.aiUsed,e?.status,e?.eventProperties?.aiTraceId,s,u,b,M,m,x,e?.isPrivateMail,i,r]),O=c.useCallback(()=>o.jsxs("div",{children:[!h&&y?.(n),C?.(n),h&&y?.(n)]}),[h,y,C,n]),w=c.useMemo(()=>!r||typeof t!="object"?{}:s==="left"&&"left"in t&&t.left&&typeof t.left=="object"?t.left:s==="right"&&"right"in t&&t.right&&typeof t.right=="object"?t.right:{},[r,t,s]),G=!r&&t&&typeof t=="object"?"left"in t||"right"in t?s==="left"?t.left??{}:t.right??{}:t:{};return o.jsx("div",{style:{display:"flex",marginTop:r?0:6,marginBottom:r?0:d?.messageInformation?.reactions?.length>0?24:6,flexGrow:u?1:0,...r?{alignItems:"flex-end",...s==="right"?{cursor:"pointer"}:{}}:{},...w,...G},...r?{onClick:j}:{},children:o.jsx("div",{style:E,children:o.jsxs("div",{style:s==="right"?{display:"flex",flexWrap:"wrap",alignItems:"flex-end",justifyContent:"flex-end",columnGap:6}:void 0,children:[o.jsx("div",{id:d.chatActivityId||`message-${d.psqlId}`,children:O()}),o.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",flexShrink:0},children:[v?.(n),T?.(d)]})]})})})},_=q.default.memo(B);exports.Bubble=_;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),c=require("react"),l=require("../../../constants/Theme.js"),R=require("../../../hooks/useWindowSize.js"),f=require("../GiftedChat/types.js"),p=require("../GiftedChat/utils.js"),T=require("./types.js"),P=n=>n&&typeof n=="object"&&"default"in n?n:{default:n},q=P(c),B=n=>{const{currentMessage:d,position:s,renderMessageText:C,renderTicks:x,renderTime:v,renderCustomView:y,isCustomViewBottom:h,isUnsatisfactoryMessageFn:m,messagesGroupedByAiTraceId:M,onPress:j,containerStyle:t,bubbleStyles:i,appType:I=T.GiftedChatAppType.Bik}=n,u=R.useWindowSize(),e=d,r=I===T.GiftedChatAppType.Manifest,b=c.useMemo(()=>e.category===p.Constants.ChatActivity.Category.ACTIVITY&&e.activityType===p.Constants.ChatActivity.Type.PRIVATE_NOTE,[e.category,e.activityType]),A=c.useMemo(()=>{const[S,g]=p.isStringifiedArray(e?.message);return S&&g&&Array.isArray(g)},[e?.message]),k=e?.channelId===f.MESSAGE_CHANNELS.SMTP||e?.channelName===f.MESSAGE_CHANNELS.SMTP,E=c.useMemo(()=>{const S={borderRadius:8,minHeight:20,margin:0,flexGrow:u?1:0,width:"100%"},g=e?.channelId===f.MESSAGE_CHANNELS.GMAIL||e?.channelName===f.MESSAGE_CHANNELS.GMAIL;let a={};if(r)return s==="left"?a=i&&typeof i.left=="object"?i.left:{}:a=i&&typeof i.right=="object"?i.right:{},{...a};if(s==="left")a={...u||g||k?{maxWidth:"100%"}:{},...b?{background:l.COLORS.background.warning.light}:{backgroundColor:e?.isPrivateMail?l.COLORS.background.blue.light:l.COLORS.background.warning.light}};else{const G=m&&m({aiTraceId:e.eventProperties?.aiTraceId,messagesGroupedByAiTraceId:M});a={backgroundColor:e.status==="failed"||G?l.COLORS.background.negative.light:l.COLORS.background.brandUltraLight,...b?{background:l.COLORS.background.warning.light}:{},...!u&&A?{maxWidth:500}:{}}}const w=i&&typeof i=="object"?"left"in i||"right"in i?s==="left"?i.left??{}:i.right??{}:i:{};return{...S,...a,...w}},[e?.channelId,e?.channelName,e?.meta?.aiUsed,e?.status,e?.eventProperties?.aiTraceId,s,u,b,A,m,M,e?.isPrivateMail,i,r]),O=c.useCallback(()=>o.jsxs("div",{children:[!h&&y?.(n),C?.(n),h&&y?.(n)]}),[h,y,C,n]),L=c.useMemo(()=>!r||typeof t!="object"?{}:s==="left"&&"left"in t&&t.left&&typeof t.left=="object"?t.left:s==="right"&&"right"in t&&t.right&&typeof t.right=="object"?t.right:{},[r,t,s]),N=!r&&t&&typeof t=="object"?"left"in t||"right"in t?s==="left"?t.left??{}:t.right??{}:t:{};return o.jsx("div",{style:{display:"flex",marginTop:r?0:6,marginBottom:r?0:d?.messageInformation?.reactions?.length>0?24:6,flexGrow:u?1:0,...r?{alignItems:"flex-end",...s==="right"?{cursor:"pointer"}:{}}:{},...L,...N},...r?{onClick:j}:{},children:o.jsx("div",{style:E,children:o.jsxs("div",{children:[o.jsx("div",{id:d.chatActivityId||`message-${d.psqlId}`,children:O()}),o.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end"},children:[v?.(n),x?.(d)]})]})})})},_=q.default.memo(B);exports.Bubble=_;
2
2
  //# sourceMappingURL=Bubble.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Bubble.js","sources":["../../../../../src/components/BikGiftedChat/Bubble/Bubble.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from 'react';\nimport { COLORS } from '../../../constants/Theme';\nimport { useWindowSize } from '../../../hooks/useWindowSize';\nimport { MESSAGE_CHANNELS } from '../GiftedChat/types';\nimport { Constants, isStringifiedArray } from '../GiftedChat/utils';\nimport { IMessage } from '../types';\nimport { BubbleProps, GiftedChatAppType } from './types';\n\nconst BubbleComponent = <TMessage extends IMessage = IMessage>(\n\tprops: BubbleProps<TMessage>,\n): React.ReactElement => {\n\tconst {\n\t\tcurrentMessage,\n\t\tposition,\n\t\trenderMessageText,\n\t\trenderTicks,\n\t\trenderTime,\n\t\trenderCustomView,\n\t\tisCustomViewBottom,\n\t\tisUnsatisfactoryMessageFn,\n\t\tmessagesGroupedByAiTraceId,\n\t\tonPress,\n\t\tcontainerStyle,\n\t\tbubbleStyles,\n\t\tappType = GiftedChatAppType.Bik,\n\t} = props;\n\n\tconst isMobile = useWindowSize();\n\tconst message = currentMessage as any;\n\tconst isManifestApp = appType === GiftedChatAppType.Manifest;\n\n\t// Check if message is a private note\n\tconst isPrivateNote = useMemo(\n\t\t() =>\n\t\t\tmessage.category === Constants.ChatActivity.Category.ACTIVITY &&\n\t\t\tmessage.activityType === Constants.ChatActivity.Type.PRIVATE_NOTE,\n\t\t[message.category, message.activityType],\n\t);\n\n\t// Check if message is a carousel (array of items)\n\tconst isCarouselMessage = useMemo(() => {\n\t\tconst [parsedSuccessfully, parsedMessage] = isStringifiedArray(\n\t\t\tmessage?.message,\n\t\t);\n\t\treturn parsedSuccessfully && parsedMessage && Array.isArray(parsedMessage);\n\t}, [message?.message]);\n\tconst isSmtp =\n\t\tmessage?.channelId === MESSAGE_CHANNELS.SMTP ||\n\t\tmessage?.channelName === MESSAGE_CHANNELS.SMTP;\n\n\t// Generates wrapper styles for the message bubble\n\t// Handles position-based styling, channel-specific layouts, and message states\n\tconst wrapperStyles = useMemo((): React.CSSProperties => {\n\t\tconst baseStyles: React.CSSProperties = {\n\t\t\tborderRadius: 8,\n\t\t\tminHeight: 20,\n\t\t\tmargin: 0,\n\t\t\tflexGrow: isMobile ? 1 : 0,\n\t\t\twidth: '100%',\n\t\t};\n\n\t\t// Check if message is from email channels\n\t\tconst isGmail =\n\t\t\tmessage?.channelId === MESSAGE_CHANNELS.GMAIL ||\n\t\t\tmessage?.channelName === MESSAGE_CHANNELS.GMAIL;\n\n\t\tlet dynamicStyles: React.CSSProperties = {};\n\n\t\tif (isManifestApp) {\n\t\t\tif (position === 'left') {\n\t\t\t\tdynamicStyles =\n\t\t\t\t\tbubbleStyles && typeof bubbleStyles.left === 'object'\n\t\t\t\t\t\t? bubbleStyles.left\n\t\t\t\t\t\t: {};\n\t\t\t} else {\n\t\t\t\tdynamicStyles =\n\t\t\t\t\tbubbleStyles && typeof bubbleStyles.right === 'object'\n\t\t\t\t\t\t? bubbleStyles.right\n\t\t\t\t\t\t: {};\n\t\t\t}\n\t\t\treturn { ...dynamicStyles };\n\t\t} else {\n\t\t\tif (position === 'left') {\n\t\t\t\tdynamicStyles = {\n\t\t\t\t\t...(isMobile || isGmail || isSmtp ? { maxWidth: '100%' } : {}),\n\t\t\t\t\t...(isPrivateNote\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tbackground: COLORS.background.warning.light,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\tbackgroundColor: message?.isPrivateMail\n\t\t\t\t\t\t\t\t\t? COLORS.background.blue.light\n\t\t\t\t\t\t\t\t\t: COLORS.background.warning.light,\n\t\t\t\t\t\t }),\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tconst isUnsatisfactory =\n\t\t\t\t\tisUnsatisfactoryMessageFn &&\n\t\t\t\t\tisUnsatisfactoryMessageFn({\n\t\t\t\t\t\taiTraceId: message.eventProperties?.aiTraceId,\n\t\t\t\t\t\tmessagesGroupedByAiTraceId,\n\t\t\t\t\t});\n\n\t\t\t\tdynamicStyles = {\n\t\t\t\t\tbackgroundColor:\n\t\t\t\t\t\tmessage.status === 'failed' || isUnsatisfactory\n\t\t\t\t\t\t\t? COLORS.background.negative.light\n\t\t\t\t\t\t\t: COLORS.background.brandUltraLight,\n\t\t\t\t\t...(isPrivateNote\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tbackground: COLORS.background.warning.light,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {}),\n\t\t\t\t\t...(!isMobile && isCarouselMessage ? { maxWidth: 500 } : {}),\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\tconst extraBubbleStyles: React.CSSProperties =\n\t\t\tbubbleStyles && typeof bubbleStyles === 'object'\n\t\t\t\t? 'left' in bubbleStyles || 'right' in bubbleStyles\n\t\t\t\t\t? position === 'left'\n\t\t\t\t\t\t? (bubbleStyles as { left?: React.CSSProperties }).left ?? {}\n\t\t\t\t\t\t: (bubbleStyles as { right?: React.CSSProperties }).right ?? {}\n\t\t\t\t\t: (bubbleStyles as React.CSSProperties)\n\t\t\t\t: {};\n\n\t\treturn { ...baseStyles, ...dynamicStyles, ...extraBubbleStyles };\n\t}, [\n\t\tmessage?.channelId,\n\t\tmessage?.channelName,\n\t\tmessage?.meta?.aiUsed,\n\t\tmessage?.status,\n\t\tmessage?.eventProperties?.aiTraceId,\n\t\tposition,\n\t\tisMobile,\n\t\tisPrivateNote,\n\t\tisCarouselMessage,\n\t\tisUnsatisfactoryMessageFn,\n\t\tmessagesGroupedByAiTraceId,\n\t\tmessage?.isPrivateMail,\n\t\tbubbleStyles,\n\t\tisManifestApp,\n\t]);\n\n\t// Renders the content of the message bubble\n\t// Handles custom views and message text in the correct order\n\tconst renderContent = useCallback(() => {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t{!isCustomViewBottom && renderCustomView?.(props)}\n\n\t\t\t\t{renderMessageText?.(props)}\n\n\t\t\t\t{isCustomViewBottom && renderCustomView?.(props)}\n\t\t\t</div>\n\t\t);\n\t}, [isCustomViewBottom, renderCustomView, renderMessageText, props]);\n\n\tconst manifestContainerStyle = useMemo(() => {\n\t\tif (!isManifestApp || typeof containerStyle !== 'object') return {};\n\t\tif (\n\t\t\tposition === 'left' &&\n\t\t\t'left' in containerStyle &&\n\t\t\tcontainerStyle.left &&\n\t\t\ttypeof containerStyle.left === 'object'\n\t\t) {\n\t\t\treturn containerStyle.left;\n\t\t}\n\t\tif (\n\t\t\tposition === 'right' &&\n\t\t\t'right' in containerStyle &&\n\t\t\tcontainerStyle.right &&\n\t\t\ttypeof containerStyle.right === 'object'\n\t\t) {\n\t\t\treturn containerStyle.right;\n\t\t}\n\t\treturn {};\n\t}, [isManifestApp, containerStyle, position]);\n\n\tconst extraContainerStyle: React.CSSProperties =\n\t\t!isManifestApp && containerStyle && typeof containerStyle === 'object'\n\t\t\t? 'left' in containerStyle || 'right' in containerStyle\n\t\t\t\t? position === 'left'\n\t\t\t\t\t? (containerStyle as { left?: React.CSSProperties }).left ?? {}\n\t\t\t\t\t: (containerStyle as { right?: React.CSSProperties }).right ?? {}\n\t\t\t\t: (containerStyle as React.CSSProperties)\n\t\t\t: {};\n\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tmarginTop: isManifestApp ? 0 : 6,\n\t\t\t\tmarginBottom: isManifestApp\n\t\t\t\t\t? 0\n\t\t\t\t\t: currentMessage?.['messageInformation']?.reactions?.length > 0\n\t\t\t\t\t? 24\n\t\t\t\t\t: 6,\n\t\t\t\tflexGrow: isMobile ? 1 : 0,\n\t\t\t\t...(isManifestApp\n\t\t\t\t\t? {\n\t\t\t\t\t\t\talignItems: 'flex-end',\n\t\t\t\t\t\t\t...(position === 'right' ? { cursor: 'pointer' } : {}),\n\t\t\t\t\t }\n\t\t\t\t\t: {}),\n\t\t\t\t...manifestContainerStyle,\n\t\t\t\t...extraContainerStyle,\n\t\t\t}}\n\t\t\t{...(isManifestApp ? { onClick: onPress } : {})}\n\t\t>\n\t\t\t<div style={wrapperStyles}>\n\t\t\t\t<div\n\t\t\t\t\t// For sent (right) messages, lay the content and the time/ticks\n\t\t\t\t\t// in a wrapping row so a short message keeps the time beside it\n\t\t\t\t\t// (with a gap) like WhatsApp, while wide/long content pushes the\n\t\t\t\t\t// time onto its own line below.\n\t\t\t\t\tstyle={\n\t\t\t\t\t\tposition === 'right'\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\tflexWrap: 'wrap',\n\t\t\t\t\t\t\t\t\talignItems: 'flex-end',\n\t\t\t\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\t\t\t\tcolumnGap: 6,\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{/* Message content */}\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={\n\t\t\t\t\t\t\tcurrentMessage['chatActivityId'] ||\n\t\t\t\t\t\t\t`message-${currentMessage['psqlId']}`\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderContent()}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{/* Message metadata (time and status) */}\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\tflexDirection: 'row',\n\t\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\t\tflexShrink: 0,\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderTime?.(props)}\n\t\t\t\t\t\t{renderTicks?.(currentMessage)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\n// Export memoized version for performance\nexport const Bubble = React.memo(BubbleComponent) as typeof BubbleComponent;\n\nexport default Bubble;\n"],"names":["BubbleComponent","props","currentMessage","position","renderMessageText","renderTicks","renderTime","renderCustomView","isCustomViewBottom","isUnsatisfactoryMessageFn","messagesGroupedByAiTraceId","onPress","containerStyle","bubbleStyles","appType","GiftedChatAppType","isMobile","useWindowSize","message","isManifestApp","isPrivateNote","useMemo","Constants","isCarouselMessage","parsedSuccessfully","parsedMessage","isStringifiedArray","isSmtp","MESSAGE_CHANNELS","wrapperStyles","baseStyles","isGmail","dynamicStyles","COLORS","isUnsatisfactory","extraBubbleStyles","renderContent","useCallback","manifestContainerStyle","extraContainerStyle","jsx","jsxs","Bubble","React"],"mappings":"6XAQMA,EACLC,GACwB,CACxB,KAAM,CACL,eAAAC,EACA,SAAAC,EACA,kBAAAC,EACA,YAAAC,EACA,WAAAC,EACA,iBAAAC,EACA,mBAAAC,EACA,0BAAAC,EACA,2BAAAC,EACA,QAAAC,EACA,eAAAC,EACA,aAAAC,EACA,QAAAC,EAAUC,EAAAA,kBAAkB,GAAA,EACzBd,EAEEe,EAAWC,EAAAA,cAAA,EACXC,EAAUhB,EACViB,EAAgBL,IAAYC,EAAAA,kBAAkB,SAG9CK,EAAgBC,EAAAA,QACrB,IACCH,EA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AAmD,OAAS,GAC7DA,EACF,CAAA,EAEJ,OACC4B,EAAAA,IAAC,MAAA,CACA,MAAO,CACN,QAAS,OACT,UAAWrB,EAAgB,EAAI,EAC/B,aAAcA,EACX,EACAjB,GAAiB,oBAAuB,WAAW,OAAS,EAC5D,GACA,EACH,SAAUc,EAAW,EAAI,EACzB,GAAIG,EACD,CACA,WAAY,WACZ,GAAIhB,IAAa,QAAU,CAAE,OAAQ,SAAA,EAAc,CAAA,CAAC,EAEpD,CAAA,EACH,GAAGmC,EACH,GAAGC,CAAA,EAEH,GAAIpB,EAAgB,CAAE,QAASR,CAAA,EAAY,CAAA,EAE5C,SAAA6B,EAAAA,IAAC,MAAA,CAAI,MAAOX,EACX,SAAAY,EAAAA,KAAC,MAAA,CAKA,MACCtC,IAAa,QACV,CACA,QAAS,OACT,SAAU,OACV,WAAY,WACZ,eAAgB,WAChB,UAAW,CAAA,EAEX,OAIJ,SAAA,CAAAqC,EAAAA,IAAC,MAAA,CACA,GACCtC,EAAe,gBACf,WAAWA,EAAe,MAAS,GAGnC,SAAAkC,EAAA,CAAc,CAAA,EAIhBK,EAAAA,KAAC,MAAA,CACA,MAAO,CACN,QAAS,OACT,cAAe,MACf,eAAgB,WAChB,WAAY,CAAA,EAGZ,SAAA,CAAAnC,IAAaL,CAAK,EAClBI,IAAcH,CAAc,CAAA,CAAA,CAAA,CAC9B,CAAA,CAAA,CACD,CACD,CAAA,CAAA,CAGH,EAGawC,EAASC,EAAAA,QAAM,KAAK3C,CAAe"}
1
+ {"version":3,"file":"Bubble.js","sources":["../../../../../src/components/BikGiftedChat/Bubble/Bubble.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from 'react';\nimport { COLORS } from '../../../constants/Theme';\nimport { useWindowSize } from '../../../hooks/useWindowSize';\nimport { MESSAGE_CHANNELS } from '../GiftedChat/types';\nimport { Constants, isStringifiedArray } from '../GiftedChat/utils';\nimport { IMessage } from '../types';\nimport { BubbleProps, GiftedChatAppType } from './types';\n\nconst BubbleComponent = <TMessage extends IMessage = IMessage>(\n\tprops: BubbleProps<TMessage>,\n): React.ReactElement => {\n\tconst {\n\t\tcurrentMessage,\n\t\tposition,\n\t\trenderMessageText,\n\t\trenderTicks,\n\t\trenderTime,\n\t\trenderCustomView,\n\t\tisCustomViewBottom,\n\t\tisUnsatisfactoryMessageFn,\n\t\tmessagesGroupedByAiTraceId,\n\t\tonPress,\n\t\tcontainerStyle,\n\t\tbubbleStyles,\n\t\tappType = GiftedChatAppType.Bik,\n\t} = props;\n\n\tconst isMobile = useWindowSize();\n\tconst message = currentMessage as any;\n\tconst isManifestApp = appType === GiftedChatAppType.Manifest;\n\n\t// Check if message is a private note\n\tconst isPrivateNote = useMemo(\n\t\t() =>\n\t\t\tmessage.category === Constants.ChatActivity.Category.ACTIVITY &&\n\t\t\tmessage.activityType === Constants.ChatActivity.Type.PRIVATE_NOTE,\n\t\t[message.category, message.activityType],\n\t);\n\n\t// Check if message is a carousel (array of items)\n\tconst isCarouselMessage = useMemo(() => {\n\t\tconst [parsedSuccessfully, parsedMessage] = isStringifiedArray(\n\t\t\tmessage?.message,\n\t\t);\n\t\treturn parsedSuccessfully && parsedMessage && Array.isArray(parsedMessage);\n\t}, [message?.message]);\n\tconst isSmtp =\n\t\tmessage?.channelId === MESSAGE_CHANNELS.SMTP ||\n\t\tmessage?.channelName === MESSAGE_CHANNELS.SMTP;\n\n\t// Generates wrapper styles for the message bubble\n\t// Handles position-based styling, channel-specific layouts, and message states\n\tconst wrapperStyles = useMemo((): React.CSSProperties => {\n\t\tconst baseStyles: React.CSSProperties = {\n\t\t\tborderRadius: 8,\n\t\t\tminHeight: 20,\n\t\t\tmargin: 0,\n\t\t\tflexGrow: isMobile ? 1 : 0,\n\t\t\twidth: '100%',\n\t\t};\n\n\t\t// Check if message is from email channels\n\t\tconst isGmail =\n\t\t\tmessage?.channelId === MESSAGE_CHANNELS.GMAIL ||\n\t\t\tmessage?.channelName === MESSAGE_CHANNELS.GMAIL;\n\n\t\tlet dynamicStyles: React.CSSProperties = {};\n\n\t\tif (isManifestApp) {\n\t\t\tif (position === 'left') {\n\t\t\t\tdynamicStyles =\n\t\t\t\t\tbubbleStyles && typeof bubbleStyles.left === 'object'\n\t\t\t\t\t\t? bubbleStyles.left\n\t\t\t\t\t\t: {};\n\t\t\t} else {\n\t\t\t\tdynamicStyles =\n\t\t\t\t\tbubbleStyles && typeof bubbleStyles.right === 'object'\n\t\t\t\t\t\t? bubbleStyles.right\n\t\t\t\t\t\t: {};\n\t\t\t}\n\t\t\treturn { ...dynamicStyles };\n\t\t} else {\n\t\t\tif (position === 'left') {\n\t\t\t\tdynamicStyles = {\n\t\t\t\t\t...(isMobile || isGmail || isSmtp ? { maxWidth: '100%' } : {}),\n\t\t\t\t\t...(isPrivateNote\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tbackground: COLORS.background.warning.light,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\tbackgroundColor: message?.isPrivateMail\n\t\t\t\t\t\t\t\t\t? COLORS.background.blue.light\n\t\t\t\t\t\t\t\t\t: COLORS.background.warning.light,\n\t\t\t\t\t\t }),\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tconst isUnsatisfactory =\n\t\t\t\t\tisUnsatisfactoryMessageFn &&\n\t\t\t\t\tisUnsatisfactoryMessageFn({\n\t\t\t\t\t\taiTraceId: message.eventProperties?.aiTraceId,\n\t\t\t\t\t\tmessagesGroupedByAiTraceId,\n\t\t\t\t\t});\n\n\t\t\t\tdynamicStyles = {\n\t\t\t\t\tbackgroundColor:\n\t\t\t\t\t\tmessage.status === 'failed' || isUnsatisfactory\n\t\t\t\t\t\t\t? COLORS.background.negative.light\n\t\t\t\t\t\t\t: COLORS.background.brandUltraLight,\n\t\t\t\t\t...(isPrivateNote\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tbackground: COLORS.background.warning.light,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {}),\n\t\t\t\t\t...(!isMobile && isCarouselMessage ? { maxWidth: 500 } : {}),\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\tconst extraBubbleStyles: React.CSSProperties =\n\t\t\tbubbleStyles && typeof bubbleStyles === 'object'\n\t\t\t\t? 'left' in bubbleStyles || 'right' in bubbleStyles\n\t\t\t\t\t? position === 'left'\n\t\t\t\t\t\t? (bubbleStyles as { left?: React.CSSProperties }).left ?? {}\n\t\t\t\t\t\t: (bubbleStyles as { right?: React.CSSProperties }).right ?? {}\n\t\t\t\t\t: (bubbleStyles as React.CSSProperties)\n\t\t\t\t: {};\n\n\t\treturn { ...baseStyles, ...dynamicStyles, ...extraBubbleStyles };\n\t}, [\n\t\tmessage?.channelId,\n\t\tmessage?.channelName,\n\t\tmessage?.meta?.aiUsed,\n\t\tmessage?.status,\n\t\tmessage?.eventProperties?.aiTraceId,\n\t\tposition,\n\t\tisMobile,\n\t\tisPrivateNote,\n\t\tisCarouselMessage,\n\t\tisUnsatisfactoryMessageFn,\n\t\tmessagesGroupedByAiTraceId,\n\t\tmessage?.isPrivateMail,\n\t\tbubbleStyles,\n\t\tisManifestApp,\n\t]);\n\n\t// Renders the content of the message bubble\n\t// Handles custom views and message text in the correct order\n\tconst renderContent = useCallback(() => {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t{!isCustomViewBottom && renderCustomView?.(props)}\n\n\t\t\t\t{renderMessageText?.(props)}\n\n\t\t\t\t{isCustomViewBottom && renderCustomView?.(props)}\n\t\t\t</div>\n\t\t);\n\t}, [isCustomViewBottom, renderCustomView, renderMessageText, props]);\n\n\tconst manifestContainerStyle = useMemo(() => {\n\t\tif (!isManifestApp || typeof containerStyle !== 'object') return {};\n\t\tif (\n\t\t\tposition === 'left' &&\n\t\t\t'left' in containerStyle &&\n\t\t\tcontainerStyle.left &&\n\t\t\ttypeof containerStyle.left === 'object'\n\t\t) {\n\t\t\treturn containerStyle.left;\n\t\t}\n\t\tif (\n\t\t\tposition === 'right' &&\n\t\t\t'right' in containerStyle &&\n\t\t\tcontainerStyle.right &&\n\t\t\ttypeof containerStyle.right === 'object'\n\t\t) {\n\t\t\treturn containerStyle.right;\n\t\t}\n\t\treturn {};\n\t}, [isManifestApp, containerStyle, position]);\n\n\tconst extraContainerStyle: React.CSSProperties =\n\t\t!isManifestApp && containerStyle && typeof containerStyle === 'object'\n\t\t\t? 'left' in containerStyle || 'right' in containerStyle\n\t\t\t\t? position === 'left'\n\t\t\t\t\t? (containerStyle as { left?: React.CSSProperties }).left ?? {}\n\t\t\t\t\t: (containerStyle as { right?: React.CSSProperties }).right ?? {}\n\t\t\t\t: (containerStyle as React.CSSProperties)\n\t\t\t: {};\n\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tmarginTop: isManifestApp ? 0 : 6,\n\t\t\t\tmarginBottom: isManifestApp\n\t\t\t\t\t? 0\n\t\t\t\t\t: currentMessage?.['messageInformation']?.reactions?.length > 0\n\t\t\t\t\t? 24\n\t\t\t\t\t: 6,\n\t\t\t\tflexGrow: isMobile ? 1 : 0,\n\t\t\t\t...(isManifestApp\n\t\t\t\t\t? {\n\t\t\t\t\t\t\talignItems: 'flex-end',\n\t\t\t\t\t\t\t...(position === 'right' ? { cursor: 'pointer' } : {}),\n\t\t\t\t\t }\n\t\t\t\t\t: {}),\n\t\t\t\t...manifestContainerStyle,\n\t\t\t\t...extraContainerStyle,\n\t\t\t}}\n\t\t\t{...(isManifestApp ? { onClick: onPress } : {})}\n\t\t>\n\t\t\t<div style={wrapperStyles}>\n\t\t\t\t<div>\n\t\t\t\t\t{/* Message content */}\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={\n\t\t\t\t\t\t\tcurrentMessage['chatActivityId'] ||\n\t\t\t\t\t\t\t`message-${currentMessage['psqlId']}`\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderContent()}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{/* Message metadata (time and status) — bottom bar, time/ticks\n\t\t\t\t\t right-aligned. The 8px gap above comes from the time/ticks\n\t\t\t\t\t rows' own top padding. */}\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\tflexDirection: 'row',\n\t\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderTime?.(props)}\n\t\t\t\t\t\t{renderTicks?.(currentMessage)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\n// Export memoized version for performance\nexport const Bubble = React.memo(BubbleComponent) as typeof BubbleComponent;\n\nexport default Bubble;\n"],"names":["BubbleComponent","props","currentMessage","position","renderMessageText","renderTicks","renderTime","renderCustomView","isCustomViewBottom","isUnsatisfactoryMessageFn","messagesGroupedByAiTraceId","onPress","containerStyle","bubbleStyles","appType","GiftedChatAppType","isMobile","useWindowSize","message","isManifestApp","isPrivateNote","useMemo","Constants","isCarouselMessage","parsedSuccessfully","parsedMessage","isStringifiedArray","isSmtp","MESSAGE_CHANNELS","wrapperStyles","baseStyles","isGmail","dynamicStyles","COLORS","isUnsatisfactory","extraBubbleStyles","renderContent","useCallback","manifestContainerStyle","extraContainerStyle","jsx","jsxs","Bubble","React"],"mappings":"6XAQMA,EACLC,GACwB,CACxB,KAAM,CACL,eAAAC,EACA,SAAAC,EACA,kBAAAC,EACA,YAAAC,EACA,WAAAC,EACA,iBAAAC,EACA,mBAAAC,EACA,0BAAAC,EACA,2BAAAC,EACA,QAAAC,EACA,eAAAC,EACA,aAAAC,EACA,QAAAC,EAAUC,EAAAA,kBAAkB,GAAA,EACzBd,EAEEe,EAAWC,EAAAA,cAAA,EACXC,EAAUhB,EACViB,EAAgBL,IAAYC,EAAAA,kBAAkB,SAG9CK,EAAgBC,EAAAA,QACrB,IACCH,EAAQ,WAAaI,EAAAA,UAAU,aAAa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,EAEJ,OACC4B,EAAAA,IAAC,MAAA,CACA,MAAO,CACN,QAAS,OACT,UAAWrB,EAAgB,EAAI,EAC/B,aAAcA,EACX,EACAjB,GAAiB,oBAAuB,WAAW,OAAS,EAC5D,GACA,EACH,SAAUc,EAAW,EAAI,EACzB,GAAIG,EACD,CACA,WAAY,WACZ,GAAIhB,IAAa,QAAU,CAAE,OAAQ,SAAA,EAAc,CAAA,CAAC,EAEpD,CAAA,EACH,GAAGmC,EACH,GAAGC,CAAA,EAEH,GAAIpB,EAAgB,CAAE,QAASR,CAAA,EAAY,CAAA,EAE5C,SAAA6B,EAAAA,IAAC,MAAA,CAAI,MAAOX,EACX,gBAAC,MAAA,CAEA,SAAA,CAAAW,EAAAA,IAAC,MAAA,CACA,GACCtC,EAAe,gBACf,WAAWA,EAAe,MAAS,GAGnC,SAAAkC,EAAA,CAAc,CAAA,EAMhBK,EAAAA,KAAC,MAAA,CACA,MAAO,CACN,QAAS,OACT,cAAe,MACf,eAAgB,UAAA,EAGhB,SAAA,CAAAnC,IAAaL,CAAK,EAClBI,IAAcH,CAAc,CAAA,CAAA,CAAA,CAC9B,CAAA,CACD,CAAA,CACD,CAAA,CAAA,CAGH,EAGawC,EAASC,EAAAA,QAAM,KAAK3C,CAAe"}
@@ -1,46 +1,46 @@
1
- import { jsxs as b, jsx as C } from "react/jsx-runtime";
1
+ import { jsxs as p, jsx as C } from "react/jsx-runtime";
2
2
  import R, { useMemo as f, useCallback as U } from "react";
3
3
  import { COLORS as o } from "../../../constants/Theme.js";
4
4
  import { useWindowSize as V } from "../../../hooks/useWindowSize.js";
5
5
  import { MESSAGE_CHANNELS as g } from "../GiftedChat/types.js";
6
- import { Constants as v, isStringifiedArray as W } from "../GiftedChat/utils.js";
7
- import { GiftedChatAppType as I } from "./types.js";
8
- const _ = (a) => {
6
+ import { Constants as I, isStringifiedArray as _ } from "../GiftedChat/utils.js";
7
+ import { GiftedChatAppType as M } from "./types.js";
8
+ const O = (s) => {
9
9
  const {
10
10
  currentMessage: l,
11
11
  position: r,
12
- renderMessageText: x,
13
- renderTicks: M,
14
- renderTime: k,
12
+ renderMessageText: T,
13
+ renderTicks: x,
14
+ renderTime: A,
15
15
  renderCustomView: m,
16
16
  isCustomViewBottom: y,
17
17
  isUnsatisfactoryMessageFn: u,
18
18
  messagesGroupedByAiTraceId: S,
19
- onPress: A,
19
+ onPress: k,
20
20
  containerStyle: t,
21
21
  bubbleStyles: i,
22
- appType: w = I.Bik
23
- } = a, c = V(), e = l, n = w === I.Manifest, h = f(
24
- () => e.category === v.ChatActivity.Category.ACTIVITY && e.activityType === v.ChatActivity.Type.PRIVATE_NOTE,
22
+ appType: w = M.Bik
23
+ } = s, c = V(), e = l, n = w === M.Manifest, h = f(
24
+ () => e.category === I.ChatActivity.Category.ACTIVITY && e.activityType === I.ChatActivity.Type.PRIVATE_NOTE,
25
25
  [e.category, e.activityType]
26
- ), T = f(() => {
27
- const [p, d] = W(
26
+ ), v = f(() => {
27
+ const [b, d] = _(
28
28
  e?.message
29
29
  );
30
- return p && d && Array.isArray(d);
31
- }, [e?.message]), j = e?.channelId === g.SMTP || e?.channelName === g.SMTP, G = f(() => {
32
- const p = {
30
+ return b && d && Array.isArray(d);
31
+ }, [e?.message]), j = e?.channelId === g.SMTP || e?.channelName === g.SMTP, P = f(() => {
32
+ const b = {
33
33
  borderRadius: 8,
34
34
  minHeight: 20,
35
35
  margin: 0,
36
36
  flexGrow: c ? 1 : 0,
37
37
  width: "100%"
38
38
  }, d = e?.channelId === g.GMAIL || e?.channelName === g.GMAIL;
39
- let s = {};
39
+ let a = {};
40
40
  if (n)
41
- return r === "left" ? s = i && typeof i.left == "object" ? i.left : {} : s = i && typeof i.right == "object" ? i.right : {}, { ...s };
41
+ return r === "left" ? a = i && typeof i.left == "object" ? i.left : {} : a = i && typeof i.right == "object" ? i.right : {}, { ...a };
42
42
  if (r === "left")
43
- s = {
43
+ a = {
44
44
  ...c || d || j ? { maxWidth: "100%" } : {},
45
45
  ...h ? {
46
46
  background: o.background.warning.light
@@ -53,16 +53,16 @@ const _ = (a) => {
53
53
  aiTraceId: e.eventProperties?.aiTraceId,
54
54
  messagesGroupedByAiTraceId: S
55
55
  });
56
- s = {
56
+ a = {
57
57
  backgroundColor: e.status === "failed" || L ? o.background.negative.light : o.background.brandUltraLight,
58
58
  ...h ? {
59
59
  background: o.background.warning.light
60
60
  } : {},
61
- ...!c && T ? { maxWidth: 500 } : {}
61
+ ...!c && v ? { maxWidth: 500 } : {}
62
62
  };
63
63
  }
64
64
  const E = i && typeof i == "object" ? "left" in i || "right" in i ? r === "left" ? i.left ?? {} : i.right ?? {} : i : {};
65
- return { ...p, ...s, ...E };
65
+ return { ...b, ...a, ...E };
66
66
  }, [
67
67
  e?.channelId,
68
68
  e?.channelName,
@@ -72,17 +72,17 @@ const _ = (a) => {
72
72
  r,
73
73
  c,
74
74
  h,
75
- T,
75
+ v,
76
76
  u,
77
77
  S,
78
78
  e?.isPrivateMail,
79
79
  i,
80
80
  n
81
- ]), P = U(() => /* @__PURE__ */ b("div", { children: [
82
- !y && m?.(a),
83
- x?.(a),
84
- y && m?.(a)
85
- ] }), [y, m, x, a]), B = f(() => !n || typeof t != "object" ? {} : r === "left" && "left" in t && t.left && typeof t.left == "object" ? t.left : r === "right" && "right" in t && t.right && typeof t.right == "object" ? t.right : {}, [n, t, r]), N = !n && t && typeof t == "object" ? "left" in t || "right" in t ? r === "left" ? t.left ?? {} : t.right ?? {} : t : {};
81
+ ]), G = U(() => /* @__PURE__ */ p("div", { children: [
82
+ !y && m?.(s),
83
+ T?.(s),
84
+ y && m?.(s)
85
+ ] }), [y, m, T, s]), B = f(() => !n || typeof t != "object" ? {} : r === "left" && "left" in t && t.left && typeof t.left == "object" ? t.left : r === "right" && "right" in t && t.right && typeof t.right == "object" ? t.right : {}, [n, t, r]), N = !n && t && typeof t == "object" ? "left" in t || "right" in t ? r === "left" ? t.left ?? {} : t.right ?? {} : t : {};
86
86
  return /* @__PURE__ */ C(
87
87
  "div",
88
88
  {
@@ -98,46 +98,33 @@ const _ = (a) => {
98
98
  ...B,
99
99
  ...N
100
100
  },
101
- ...n ? { onClick: A } : {},
102
- children: /* @__PURE__ */ C("div", { style: G, children: /* @__PURE__ */ b(
103
- "div",
104
- {
105
- style: r === "right" ? {
106
- display: "flex",
107
- flexWrap: "wrap",
108
- alignItems: "flex-end",
109
- justifyContent: "flex-end",
110
- columnGap: 6
111
- } : void 0,
112
- children: [
113
- /* @__PURE__ */ C(
114
- "div",
115
- {
116
- id: l.chatActivityId || `message-${l.psqlId}`,
117
- children: P()
118
- }
119
- ),
120
- /* @__PURE__ */ b(
121
- "div",
122
- {
123
- style: {
124
- display: "flex",
125
- flexDirection: "row",
126
- justifyContent: "flex-end",
127
- flexShrink: 0
128
- },
129
- children: [
130
- k?.(a),
131
- M?.(l)
132
- ]
133
- }
134
- )
135
- ]
136
- }
137
- ) })
101
+ ...n ? { onClick: k } : {},
102
+ children: /* @__PURE__ */ C("div", { style: P, children: /* @__PURE__ */ p("div", { children: [
103
+ /* @__PURE__ */ C(
104
+ "div",
105
+ {
106
+ id: l.chatActivityId || `message-${l.psqlId}`,
107
+ children: G()
108
+ }
109
+ ),
110
+ /* @__PURE__ */ p(
111
+ "div",
112
+ {
113
+ style: {
114
+ display: "flex",
115
+ flexDirection: "row",
116
+ justifyContent: "flex-end"
117
+ },
118
+ children: [
119
+ A?.(s),
120
+ x?.(l)
121
+ ]
122
+ }
123
+ )
124
+ ] }) })
138
125
  }
139
126
  );
140
- }, $ = R.memo(_);
127
+ }, $ = R.memo(O);
141
128
  export {
142
129
  $ as Bubble
143
130
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Bubble.js","sources":["../../../../../src/components/BikGiftedChat/Bubble/Bubble.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from 'react';\nimport { COLORS } from '../../../constants/Theme';\nimport { useWindowSize } from '../../../hooks/useWindowSize';\nimport { MESSAGE_CHANNELS } from '../GiftedChat/types';\nimport { Constants, isStringifiedArray } from '../GiftedChat/utils';\nimport { IMessage } from '../types';\nimport { BubbleProps, GiftedChatAppType } from './types';\n\nconst BubbleComponent = <TMessage extends IMessage = IMessage>(\n\tprops: BubbleProps<TMessage>,\n): React.ReactElement => {\n\tconst {\n\t\tcurrentMessage,\n\t\tposition,\n\t\trenderMessageText,\n\t\trenderTicks,\n\t\trenderTime,\n\t\trenderCustomView,\n\t\tisCustomViewBottom,\n\t\tisUnsatisfactoryMessageFn,\n\t\tmessagesGroupedByAiTraceId,\n\t\tonPress,\n\t\tcontainerStyle,\n\t\tbubbleStyles,\n\t\tappType = GiftedChatAppType.Bik,\n\t} = props;\n\n\tconst isMobile = useWindowSize();\n\tconst message = currentMessage as any;\n\tconst isManifestApp = appType === GiftedChatAppType.Manifest;\n\n\t// Check if message is a private note\n\tconst isPrivateNote = useMemo(\n\t\t() =>\n\t\t\tmessage.category === Constants.ChatActivity.Category.ACTIVITY &&\n\t\t\tmessage.activityType === Constants.ChatActivity.Type.PRIVATE_NOTE,\n\t\t[message.category, message.activityType],\n\t);\n\n\t// Check if message is a carousel (array of items)\n\tconst isCarouselMessage = useMemo(() => {\n\t\tconst [parsedSuccessfully, parsedMessage] = isStringifiedArray(\n\t\t\tmessage?.message,\n\t\t);\n\t\treturn parsedSuccessfully && parsedMessage && Array.isArray(parsedMessage);\n\t}, [message?.message]);\n\tconst isSmtp =\n\t\tmessage?.channelId === MESSAGE_CHANNELS.SMTP ||\n\t\tmessage?.channelName === MESSAGE_CHANNELS.SMTP;\n\n\t// Generates wrapper styles for the message bubble\n\t// Handles position-based styling, channel-specific layouts, and message states\n\tconst wrapperStyles = useMemo((): React.CSSProperties => {\n\t\tconst baseStyles: React.CSSProperties = {\n\t\t\tborderRadius: 8,\n\t\t\tminHeight: 20,\n\t\t\tmargin: 0,\n\t\t\tflexGrow: isMobile ? 1 : 0,\n\t\t\twidth: '100%',\n\t\t};\n\n\t\t// Check if message is from email channels\n\t\tconst isGmail =\n\t\t\tmessage?.channelId === MESSAGE_CHANNELS.GMAIL ||\n\t\t\tmessage?.channelName === MESSAGE_CHANNELS.GMAIL;\n\n\t\tlet dynamicStyles: React.CSSProperties = {};\n\n\t\tif (isManifestApp) {\n\t\t\tif (position === 'left') {\n\t\t\t\tdynamicStyles =\n\t\t\t\t\tbubbleStyles && typeof bubbleStyles.left === 'object'\n\t\t\t\t\t\t? bubbleStyles.left\n\t\t\t\t\t\t: {};\n\t\t\t} else {\n\t\t\t\tdynamicStyles =\n\t\t\t\t\tbubbleStyles && typeof bubbleStyles.right === 'object'\n\t\t\t\t\t\t? bubbleStyles.right\n\t\t\t\t\t\t: {};\n\t\t\t}\n\t\t\treturn { ...dynamicStyles };\n\t\t} else {\n\t\t\tif (position === 'left') {\n\t\t\t\tdynamicStyles = {\n\t\t\t\t\t...(isMobile || isGmail || isSmtp ? { maxWidth: '100%' } : {}),\n\t\t\t\t\t...(isPrivateNote\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tbackground: COLORS.background.warning.light,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\tbackgroundColor: message?.isPrivateMail\n\t\t\t\t\t\t\t\t\t? COLORS.background.blue.light\n\t\t\t\t\t\t\t\t\t: COLORS.background.warning.light,\n\t\t\t\t\t\t }),\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tconst isUnsatisfactory =\n\t\t\t\t\tisUnsatisfactoryMessageFn &&\n\t\t\t\t\tisUnsatisfactoryMessageFn({\n\t\t\t\t\t\taiTraceId: message.eventProperties?.aiTraceId,\n\t\t\t\t\t\tmessagesGroupedByAiTraceId,\n\t\t\t\t\t});\n\n\t\t\t\tdynamicStyles = {\n\t\t\t\t\tbackgroundColor:\n\t\t\t\t\t\tmessage.status === 'failed' || isUnsatisfactory\n\t\t\t\t\t\t\t? COLORS.background.negative.light\n\t\t\t\t\t\t\t: COLORS.background.brandUltraLight,\n\t\t\t\t\t...(isPrivateNote\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tbackground: COLORS.background.warning.light,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {}),\n\t\t\t\t\t...(!isMobile && isCarouselMessage ? { maxWidth: 500 } : {}),\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\tconst extraBubbleStyles: React.CSSProperties =\n\t\t\tbubbleStyles && typeof bubbleStyles === 'object'\n\t\t\t\t? 'left' in bubbleStyles || 'right' in bubbleStyles\n\t\t\t\t\t? position === 'left'\n\t\t\t\t\t\t? (bubbleStyles as { left?: React.CSSProperties }).left ?? {}\n\t\t\t\t\t\t: (bubbleStyles as { right?: React.CSSProperties }).right ?? {}\n\t\t\t\t\t: (bubbleStyles as React.CSSProperties)\n\t\t\t\t: {};\n\n\t\treturn { ...baseStyles, ...dynamicStyles, ...extraBubbleStyles };\n\t}, [\n\t\tmessage?.channelId,\n\t\tmessage?.channelName,\n\t\tmessage?.meta?.aiUsed,\n\t\tmessage?.status,\n\t\tmessage?.eventProperties?.aiTraceId,\n\t\tposition,\n\t\tisMobile,\n\t\tisPrivateNote,\n\t\tisCarouselMessage,\n\t\tisUnsatisfactoryMessageFn,\n\t\tmessagesGroupedByAiTraceId,\n\t\tmessage?.isPrivateMail,\n\t\tbubbleStyles,\n\t\tisManifestApp,\n\t]);\n\n\t// Renders the content of the message bubble\n\t// Handles custom views and message text in the correct order\n\tconst renderContent = useCallback(() => {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t{!isCustomViewBottom && renderCustomView?.(props)}\n\n\t\t\t\t{renderMessageText?.(props)}\n\n\t\t\t\t{isCustomViewBottom && renderCustomView?.(props)}\n\t\t\t</div>\n\t\t);\n\t}, [isCustomViewBottom, renderCustomView, renderMessageText, props]);\n\n\tconst manifestContainerStyle = useMemo(() => {\n\t\tif (!isManifestApp || typeof containerStyle !== 'object') return {};\n\t\tif (\n\t\t\tposition === 'left' &&\n\t\t\t'left' in containerStyle &&\n\t\t\tcontainerStyle.left &&\n\t\t\ttypeof containerStyle.left === 'object'\n\t\t) {\n\t\t\treturn containerStyle.left;\n\t\t}\n\t\tif (\n\t\t\tposition === 'right' &&\n\t\t\t'right' in containerStyle &&\n\t\t\tcontainerStyle.right &&\n\t\t\ttypeof containerStyle.right === 'object'\n\t\t) {\n\t\t\treturn containerStyle.right;\n\t\t}\n\t\treturn {};\n\t}, [isManifestApp, containerStyle, position]);\n\n\tconst extraContainerStyle: React.CSSProperties =\n\t\t!isManifestApp && containerStyle && typeof containerStyle === 'object'\n\t\t\t? 'left' in containerStyle || 'right' in containerStyle\n\t\t\t\t? position === 'left'\n\t\t\t\t\t? (containerStyle as { left?: React.CSSProperties }).left ?? {}\n\t\t\t\t\t: (containerStyle as { right?: React.CSSProperties }).right ?? {}\n\t\t\t\t: (containerStyle as React.CSSProperties)\n\t\t\t: {};\n\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tmarginTop: isManifestApp ? 0 : 6,\n\t\t\t\tmarginBottom: isManifestApp\n\t\t\t\t\t? 0\n\t\t\t\t\t: currentMessage?.['messageInformation']?.reactions?.length > 0\n\t\t\t\t\t? 24\n\t\t\t\t\t: 6,\n\t\t\t\tflexGrow: isMobile ? 1 : 0,\n\t\t\t\t...(isManifestApp\n\t\t\t\t\t? {\n\t\t\t\t\t\t\talignItems: 'flex-end',\n\t\t\t\t\t\t\t...(position === 'right' ? { cursor: 'pointer' } : {}),\n\t\t\t\t\t }\n\t\t\t\t\t: {}),\n\t\t\t\t...manifestContainerStyle,\n\t\t\t\t...extraContainerStyle,\n\t\t\t}}\n\t\t\t{...(isManifestApp ? { onClick: onPress } : {})}\n\t\t>\n\t\t\t<div style={wrapperStyles}>\n\t\t\t\t<div\n\t\t\t\t\t// For sent (right) messages, lay the content and the time/ticks\n\t\t\t\t\t// in a wrapping row so a short message keeps the time beside it\n\t\t\t\t\t// (with a gap) like WhatsApp, while wide/long content pushes the\n\t\t\t\t\t// time onto its own line below.\n\t\t\t\t\tstyle={\n\t\t\t\t\t\tposition === 'right'\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\tflexWrap: 'wrap',\n\t\t\t\t\t\t\t\t\talignItems: 'flex-end',\n\t\t\t\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\t\t\t\tcolumnGap: 6,\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{/* Message content */}\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={\n\t\t\t\t\t\t\tcurrentMessage['chatActivityId'] ||\n\t\t\t\t\t\t\t`message-${currentMessage['psqlId']}`\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderContent()}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{/* Message metadata (time and status) */}\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\tflexDirection: 'row',\n\t\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\t\tflexShrink: 0,\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderTime?.(props)}\n\t\t\t\t\t\t{renderTicks?.(currentMessage)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\n// Export memoized version for performance\nexport const Bubble = React.memo(BubbleComponent) as typeof BubbleComponent;\n\nexport default Bubble;\n"],"names":["BubbleComponent","props","currentMessage","position","renderMessageText","renderTicks","renderTime","renderCustomView","isCustomViewBottom","isUnsatisfactoryMessageFn","messagesGroupedByAiTraceId","onPress","containerStyle","bubbleStyles","appType","GiftedChatAppType","isMobile","useWindowSize","message","isManifestApp","isPrivateNote","useMemo","Constants","isCarouselMessage","parsedSuccessfully","parsedMessage","isStringifiedArray","isSmtp","MESSAGE_CHANNELS","wrapperStyles","baseStyles","isGmail","dynamicStyles","COLORS","isUnsatisfactory","extraBubbleStyles","renderContent","useCallback","manifestContainerStyle","extraContainerStyle","jsx","jsxs","Bubble","React"],"mappings":";;;;;;;AAQA,MAAMA,IAAkB,CACvBC,MACwB;AACxB,QAAM;AAAA,IACL,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,2BAAAC;AAAA,IACA,4BAAAC;AAAA,IACA,SAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,SAAAC,IAAUC,EAAkB;AAAA,EAAA,IACzBd,GAEEe,IAAWC,EAAA,GACXC,IAAUhB,GACViB,IAAgBL,MAAYC,EAAkB,UAG9CK,IAAgBC;AAAA,IACrB,MACCH,EAAQ,aAAaI,EAAU,aAAa,SAAS,YACrDJ,EAAQ,iBAAiBI,EAAU,aAAa,KAAK;AAAA,IACtD,CAACJ,EAAQ,UAAUA,EAAQ,YAAY;AAAA,EAAA,GAIlCK,IAAoBF,EAAQ,MAAM;AACvC,UAAM,CAACG,GAAoBC,CAAa,IAAIC;AAAA,MAC3CR,GAAS;AAAA,IAAA;AAEV,WAAOM,KAAsBC,KAAiB,MAAM,QAAQA,CAAa;AAAA,EAC1E,GAAG,CAACP,GAAS,OAAO,CAAC,GACfS,IACLT,GAAS,cAAcU,EAAiB,QACxCV,GAAS,gBAAgBU,EAAiB,MAIrCC,IAAgBR,EAAQ,MAA2B;AACxD,UAAMS,IAAkC;AAAA,MACvC,cAAc;AAAA,MACd,WAAW;AAAA,MACX,QAAQ;AAAA,MACR,UAAUd,IAAW,IAAI;AAAA,MACzB,OAAO;AAAA,IAAA,GAIFe,IACLb,GAAS,cAAcU,EAAiB,SACxCV,GAAS,gBAAgBU,EAAiB;AAE3C,QAAII,IAAqC,CAAA;AAEzC,QAAIb;AACH,aAA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CAAA;AAAA,MAE5C,UAAA,gBAAA6B,EAAC,OAAA,EAAI,OAAOX,GACX,UAAA,gBAAAY;AAAA,QAAC;AAAA,QAAA;AAAA,UAKA,OACCtC,MAAa,UACV;AAAA,YACA,SAAS;AAAA,YACT,UAAU;AAAA,YACV,YAAY;AAAA,YACZ,gBAAgB;AAAA,YAChB,WAAW;AAAA,UAAA,IAEX;AAAA,UAIJ,UAAA;AAAA,YAAA,gBAAAqC;AAAA,cAAC;AAAA,cAAA;AAAA,gBACA,IACCtC,EAAe,kBACf,WAAWA,EAAe,MAAS;AAAA,gBAGnC,UAAAkC,EAAA;AAAA,cAAc;AAAA,YAAA;AAAA,YAIhB,gBAAAK;AAAA,cAAC;AAAA,cAAA;AAAA,gBACA,OAAO;AAAA,kBACN,SAAS;AAAA,kBACT,eAAe;AAAA,kBACf,gBAAgB;AAAA,kBAChB,YAAY;AAAA,gBAAA;AAAA,gBAGZ,UAAA;AAAA,kBAAAnC,IAAaL,CAAK;AAAA,kBAClBI,IAAcH,CAAc;AAAA,gBAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAC9B;AAAA,QAAA;AAAA,MAAA,EACD,CACD;AAAA,IAAA;AAAA,EAAA;AAGH,GAGawC,IAASC,EAAM,KAAK3C,CAAe;"}
1
+ {"version":3,"file":"Bubble.js","sources":["../../../../../src/components/BikGiftedChat/Bubble/Bubble.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from 'react';\nimport { COLORS } from '../../../constants/Theme';\nimport { useWindowSize } from '../../../hooks/useWindowSize';\nimport { MESSAGE_CHANNELS } from '../GiftedChat/types';\nimport { Constants, isStringifiedArray } from '../GiftedChat/utils';\nimport { IMessage } from '../types';\nimport { BubbleProps, GiftedChatAppType } from './types';\n\nconst BubbleComponent = <TMessage extends IMessage = IMessage>(\n\tprops: BubbleProps<TMessage>,\n): React.ReactElement => {\n\tconst {\n\t\tcurrentMessage,\n\t\tposition,\n\t\trenderMessageText,\n\t\trenderTicks,\n\t\trenderTime,\n\t\trenderCustomView,\n\t\tisCustomViewBottom,\n\t\tisUnsatisfactoryMessageFn,\n\t\tmessagesGroupedByAiTraceId,\n\t\tonPress,\n\t\tcontainerStyle,\n\t\tbubbleStyles,\n\t\tappType = GiftedChatAppType.Bik,\n\t} = props;\n\n\tconst isMobile = useWindowSize();\n\tconst message = currentMessage as any;\n\tconst isManifestApp = appType === GiftedChatAppType.Manifest;\n\n\t// Check if message is a private note\n\tconst isPrivateNote = useMemo(\n\t\t() =>\n\t\t\tmessage.category === Constants.ChatActivity.Category.ACTIVITY &&\n\t\t\tmessage.activityType === Constants.ChatActivity.Type.PRIVATE_NOTE,\n\t\t[message.category, message.activityType],\n\t);\n\n\t// Check if message is a carousel (array of items)\n\tconst isCarouselMessage = useMemo(() => {\n\t\tconst [parsedSuccessfully, parsedMessage] = isStringifiedArray(\n\t\t\tmessage?.message,\n\t\t);\n\t\treturn parsedSuccessfully && parsedMessage && Array.isArray(parsedMessage);\n\t}, [message?.message]);\n\tconst isSmtp =\n\t\tmessage?.channelId === MESSAGE_CHANNELS.SMTP ||\n\t\tmessage?.channelName === MESSAGE_CHANNELS.SMTP;\n\n\t// Generates wrapper styles for the message bubble\n\t// Handles position-based styling, channel-specific layouts, and message states\n\tconst wrapperStyles = useMemo((): React.CSSProperties => {\n\t\tconst baseStyles: React.CSSProperties = {\n\t\t\tborderRadius: 8,\n\t\t\tminHeight: 20,\n\t\t\tmargin: 0,\n\t\t\tflexGrow: isMobile ? 1 : 0,\n\t\t\twidth: '100%',\n\t\t};\n\n\t\t// Check if message is from email channels\n\t\tconst isGmail =\n\t\t\tmessage?.channelId === MESSAGE_CHANNELS.GMAIL ||\n\t\t\tmessage?.channelName === MESSAGE_CHANNELS.GMAIL;\n\n\t\tlet dynamicStyles: React.CSSProperties = {};\n\n\t\tif (isManifestApp) {\n\t\t\tif (position === 'left') {\n\t\t\t\tdynamicStyles =\n\t\t\t\t\tbubbleStyles && typeof bubbleStyles.left === 'object'\n\t\t\t\t\t\t? bubbleStyles.left\n\t\t\t\t\t\t: {};\n\t\t\t} else {\n\t\t\t\tdynamicStyles =\n\t\t\t\t\tbubbleStyles && typeof bubbleStyles.right === 'object'\n\t\t\t\t\t\t? bubbleStyles.right\n\t\t\t\t\t\t: {};\n\t\t\t}\n\t\t\treturn { ...dynamicStyles };\n\t\t} else {\n\t\t\tif (position === 'left') {\n\t\t\t\tdynamicStyles = {\n\t\t\t\t\t...(isMobile || isGmail || isSmtp ? { maxWidth: '100%' } : {}),\n\t\t\t\t\t...(isPrivateNote\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tbackground: COLORS.background.warning.light,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\tbackgroundColor: message?.isPrivateMail\n\t\t\t\t\t\t\t\t\t? COLORS.background.blue.light\n\t\t\t\t\t\t\t\t\t: COLORS.background.warning.light,\n\t\t\t\t\t\t }),\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tconst isUnsatisfactory =\n\t\t\t\t\tisUnsatisfactoryMessageFn &&\n\t\t\t\t\tisUnsatisfactoryMessageFn({\n\t\t\t\t\t\taiTraceId: message.eventProperties?.aiTraceId,\n\t\t\t\t\t\tmessagesGroupedByAiTraceId,\n\t\t\t\t\t});\n\n\t\t\t\tdynamicStyles = {\n\t\t\t\t\tbackgroundColor:\n\t\t\t\t\t\tmessage.status === 'failed' || isUnsatisfactory\n\t\t\t\t\t\t\t? COLORS.background.negative.light\n\t\t\t\t\t\t\t: COLORS.background.brandUltraLight,\n\t\t\t\t\t...(isPrivateNote\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tbackground: COLORS.background.warning.light,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {}),\n\t\t\t\t\t...(!isMobile && isCarouselMessage ? { maxWidth: 500 } : {}),\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\tconst extraBubbleStyles: React.CSSProperties =\n\t\t\tbubbleStyles && typeof bubbleStyles === 'object'\n\t\t\t\t? 'left' in bubbleStyles || 'right' in bubbleStyles\n\t\t\t\t\t? position === 'left'\n\t\t\t\t\t\t? (bubbleStyles as { left?: React.CSSProperties }).left ?? {}\n\t\t\t\t\t\t: (bubbleStyles as { right?: React.CSSProperties }).right ?? {}\n\t\t\t\t\t: (bubbleStyles as React.CSSProperties)\n\t\t\t\t: {};\n\n\t\treturn { ...baseStyles, ...dynamicStyles, ...extraBubbleStyles };\n\t}, [\n\t\tmessage?.channelId,\n\t\tmessage?.channelName,\n\t\tmessage?.meta?.aiUsed,\n\t\tmessage?.status,\n\t\tmessage?.eventProperties?.aiTraceId,\n\t\tposition,\n\t\tisMobile,\n\t\tisPrivateNote,\n\t\tisCarouselMessage,\n\t\tisUnsatisfactoryMessageFn,\n\t\tmessagesGroupedByAiTraceId,\n\t\tmessage?.isPrivateMail,\n\t\tbubbleStyles,\n\t\tisManifestApp,\n\t]);\n\n\t// Renders the content of the message bubble\n\t// Handles custom views and message text in the correct order\n\tconst renderContent = useCallback(() => {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t{!isCustomViewBottom && renderCustomView?.(props)}\n\n\t\t\t\t{renderMessageText?.(props)}\n\n\t\t\t\t{isCustomViewBottom && renderCustomView?.(props)}\n\t\t\t</div>\n\t\t);\n\t}, [isCustomViewBottom, renderCustomView, renderMessageText, props]);\n\n\tconst manifestContainerStyle = useMemo(() => {\n\t\tif (!isManifestApp || typeof containerStyle !== 'object') return {};\n\t\tif (\n\t\t\tposition === 'left' &&\n\t\t\t'left' in containerStyle &&\n\t\t\tcontainerStyle.left &&\n\t\t\ttypeof containerStyle.left === 'object'\n\t\t) {\n\t\t\treturn containerStyle.left;\n\t\t}\n\t\tif (\n\t\t\tposition === 'right' &&\n\t\t\t'right' in containerStyle &&\n\t\t\tcontainerStyle.right &&\n\t\t\ttypeof containerStyle.right === 'object'\n\t\t) {\n\t\t\treturn containerStyle.right;\n\t\t}\n\t\treturn {};\n\t}, [isManifestApp, containerStyle, position]);\n\n\tconst extraContainerStyle: React.CSSProperties =\n\t\t!isManifestApp && containerStyle && typeof containerStyle === 'object'\n\t\t\t? 'left' in containerStyle || 'right' in containerStyle\n\t\t\t\t? position === 'left'\n\t\t\t\t\t? (containerStyle as { left?: React.CSSProperties }).left ?? {}\n\t\t\t\t\t: (containerStyle as { right?: React.CSSProperties }).right ?? {}\n\t\t\t\t: (containerStyle as React.CSSProperties)\n\t\t\t: {};\n\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tmarginTop: isManifestApp ? 0 : 6,\n\t\t\t\tmarginBottom: isManifestApp\n\t\t\t\t\t? 0\n\t\t\t\t\t: currentMessage?.['messageInformation']?.reactions?.length > 0\n\t\t\t\t\t? 24\n\t\t\t\t\t: 6,\n\t\t\t\tflexGrow: isMobile ? 1 : 0,\n\t\t\t\t...(isManifestApp\n\t\t\t\t\t? {\n\t\t\t\t\t\t\talignItems: 'flex-end',\n\t\t\t\t\t\t\t...(position === 'right' ? { cursor: 'pointer' } : {}),\n\t\t\t\t\t }\n\t\t\t\t\t: {}),\n\t\t\t\t...manifestContainerStyle,\n\t\t\t\t...extraContainerStyle,\n\t\t\t}}\n\t\t\t{...(isManifestApp ? { onClick: onPress } : {})}\n\t\t>\n\t\t\t<div style={wrapperStyles}>\n\t\t\t\t<div>\n\t\t\t\t\t{/* Message content */}\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={\n\t\t\t\t\t\t\tcurrentMessage['chatActivityId'] ||\n\t\t\t\t\t\t\t`message-${currentMessage['psqlId']}`\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderContent()}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{/* Message metadata (time and status) — bottom bar, time/ticks\n\t\t\t\t\t right-aligned. The 8px gap above comes from the time/ticks\n\t\t\t\t\t rows' own top padding. */}\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\tflexDirection: 'row',\n\t\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderTime?.(props)}\n\t\t\t\t\t\t{renderTicks?.(currentMessage)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\n// Export memoized version for performance\nexport const Bubble = React.memo(BubbleComponent) as typeof BubbleComponent;\n\nexport default Bubble;\n"],"names":["BubbleComponent","props","currentMessage","position","renderMessageText","renderTicks","renderTime","renderCustomView","isCustomViewBottom","isUnsatisfactoryMessageFn","messagesGroupedByAiTraceId","onPress","containerStyle","bubbleStyles","appType","GiftedChatAppType","isMobile","useWindowSize","message","isManifestApp","isPrivateNote","useMemo","Constants","isCarouselMessage","parsedSuccessfully","parsedMessage","isStringifiedArray","isSmtp","MESSAGE_CHANNELS","wrapperStyles","baseStyles","isGmail","dynamicStyles","COLORS","isUnsatisfactory","extraBubbleStyles","renderContent","useCallback","manifestContainerStyle","extraContainerStyle","jsx","jsxs","Bubble","React"],"mappings":";;;;;;;AAQA,MAAMA,IAAkB,CACvBC,MACwB;AACxB,QAAM;AAAA,IACL,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,2BAAAC;AAAA,IACA,4BAAAC;AAAA,IACA,SAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,SAAAC,IAAUC,EAAkB;AAAA,EAAA,IACzBd,GAEEe,IAAWC,EAAA,GACXC,IAAUhB,GACViB,IAAgBL,MAAYC,EAAkB,UAG9CK,IAAgBC;AAAA,IACrB,MACCH,EAAQ,aAAaI,EAAU,aAAa,SAAS,YACrDJ,EAAQ,iBAAiBI,EAAU,aAAa,KAAK;AAAA,IACtD,CAACJ,EA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beta.2",
3
+ "version": "0.0.821-beta.4",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",