streamlit-nightly 1.46.2.dev20250702__py3-none-any.whl → 1.46.2.dev20250705__py3-none-any.whl
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.
- streamlit/auth_util.py +1 -1
- streamlit/elements/lib/column_types.py +9 -0
- streamlit/errors.py +6 -0
- streamlit/runtime/secrets.py +7 -3
- streamlit/static/index.html +1 -1
- streamlit/static/manifest.json +214 -214
- streamlit/static/static/js/{ErrorOutline.esm.MhIoYdvl.js → ErrorOutline.esm.Dl5aYA7P.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.MFVQ8TeX.js → FileDownload.esm.b9aAtFUL.js} +1 -1
- streamlit/static/static/js/{FileHelper.4MaelLoM.js → FileHelper.CZ-fo3AT.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.B0jg0hVR.js → FormClearHelper.X_JAWIDE.js} +1 -1
- streamlit/static/static/js/{Hooks.BRUa3Uwi.js → Hooks.DgDu8WWe.js} +1 -1
- streamlit/static/static/js/{InputInstructions.DIDrjUfW.js → InputInstructions.DRcWCO4-.js} +1 -1
- streamlit/static/static/js/{ProgressBar.D5j4Grse.js → ProgressBar.TfYA4ywP.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.DSEpNV6C.js → RenderInPortalIfExists.DdXJh4rR.js} +1 -1
- streamlit/static/static/js/{Toolbar.CQcJmHso.js → Toolbar.Vgf9NeBF.js} +1 -1
- streamlit/static/static/js/{base-input.BnnSlzQu.js → base-input.DVejzOG3.js} +1 -1
- streamlit/static/static/js/{checkbox.C3U3kKA7.js → checkbox.CHzUs1FT.js} +1 -1
- streamlit/static/static/js/{createSuper.Cy5MeyJ7.js → createSuper.DtVUSUG3.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.DfB1NFlz.js → data-grid-overlay-editor.0g3IWOH4.js} +1 -1
- streamlit/static/static/js/{downloader.DJTt16dd.js → downloader.C1bmi7_d.js} +1 -1
- streamlit/static/static/js/{es6.wyhZ4wJk.js → es6.DB9CkkEz.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.DFyVP9Ig.js → iframeResizer.contentWindow.BUdo9Eut.js} +1 -1
- streamlit/static/static/js/{index.Dr7_LGVT.js → index.B7_hmluD.js} +1 -1
- streamlit/static/static/js/{index.B-X33K52.js → index.BFvFGupf.js} +1 -1
- streamlit/static/static/js/{index.CG52VtIR.js → index.BGQkiO_L.js} +1 -1
- streamlit/static/static/js/{index.CvEUwmm2.js → index.BLe8vNj1.js} +1 -1
- streamlit/static/static/js/{index.DJzsQdj5.js → index.BPv94ryA.js} +1 -1
- streamlit/static/static/js/{index.DT8f2xQ9.js → index.BSU3uPDy.js} +1 -1
- streamlit/static/static/js/{index.C2ZYRKqZ.js → index.BYDy3exs.js} +1 -1
- streamlit/static/static/js/{index.B22EHN7-.js → index.Bxl-lvf7.js} +1 -1
- streamlit/static/static/js/{index.Cipw6ZXy.js → index.Bz1rmVZY.js} +1 -1
- streamlit/static/static/js/{index.DyTIPa0F.js → index.C6lv7LZF.js} +1 -1
- streamlit/static/static/js/{index.DynUmaAG.js → index.CL2tKcqp.js} +1 -1
- streamlit/static/static/js/{index.Cx59kXcb.js → index.CUgLUHzz.js} +1 -1
- streamlit/static/static/js/{index.BMd4yctQ.js → index.Ca71cNwT.js} +1 -1
- streamlit/static/static/js/{index.lQYpmexK.js → index.ChFrryup.js} +1 -1
- streamlit/static/static/js/{index.DLQQdwIj.js → index.CsowBPbe.js} +1 -1
- streamlit/static/static/js/{index.DsdPm0SS.js → index.D9G9SbyS.js} +1 -1
- streamlit/static/static/js/{index.DEc9e9_6.js → index.D9lVoZ0g.js} +1 -1
- streamlit/static/static/js/{index.gMS0zlRZ.js → index.D9m0XlZY.js} +1 -1
- streamlit/static/static/js/{index.DtbQuv3u.js → index.DBSP2Mzg.js} +1 -1
- streamlit/static/static/js/{index.B465_5qO.js → index.DJFU0ONs.js} +1 -1
- streamlit/static/static/js/{index.C4H2pObU.js → index.DJM4CJwf.js} +1 -1
- streamlit/static/static/js/{index.Do1oo2Dl.js → index.DQtc0wgD.js} +1 -1
- streamlit/static/static/js/{index.DzC4L_Us.js → index.DYOc3lvA.js} +1 -1
- streamlit/static/static/js/index.DkDMkGP_.js +197 -0
- streamlit/static/static/js/{index.C_ub2Pfc.js → index.DlvTB7Ab.js} +1 -1
- streamlit/static/static/js/{index.BHoorvVC.js → index.Dmsp2dPx.js} +64 -64
- streamlit/static/static/js/index.MJ13AaAl.js +1 -0
- streamlit/static/static/js/{index.z241Yt9a.js → index.Vqz4Rf-H.js} +1 -1
- streamlit/static/static/js/{index.BNiT2b3M.js → index.WCZtB2fX.js} +1 -1
- streamlit/static/static/js/{index.Dsil7y_J.js → index.ZDNW54LS.js} +1 -1
- streamlit/static/static/js/{index.D-doFAXM.js → index.bBcPxeDg.js} +1 -1
- streamlit/static/static/js/{index.CLg6_EPb.js → index.ffsleSUc.js} +1 -1
- streamlit/static/static/js/{index.UFChjuC3.js → index.fnZJbfUF.js} +1 -1
- streamlit/static/static/js/{index.CDk53kDT.js → index.lM0dtLa7.js} +1 -1
- streamlit/static/static/js/{index.CDhJdsJ-.js → index.pxx1WhzW.js} +1 -1
- streamlit/static/static/js/{index.DcEV00Pn.js → index.rSXfDs8E.js} +1 -1
- streamlit/static/static/js/{index.BSHRz8-s.js → index.zmzbyDg-.js} +1 -1
- streamlit/static/static/js/{input.C8HOZnEd.js → input.zZ5PCHhH.js} +1 -1
- streamlit/static/static/js/{memory.8fc2LDiK.js → memory.BGxwio87.js} +1 -1
- streamlit/static/static/js/{mergeWith.xmxP-tqn.js → mergeWith.CAjjDs4h.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.DtoLRumH.js → number-overlay-editor.D6O6Urda.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.DqUCGXEg.js → possibleConstructorReturn.Bv3kil8b.js} +1 -1
- streamlit/static/static/js/{sandbox.de7mpc93.js → sandbox.DqowwceX.js} +1 -1
- streamlit/static/static/js/{textarea.9dU6cbLz.js → textarea.mjUutfC5.js} +1 -1
- streamlit/static/static/js/{timepicker.DANyzCwb.js → timepicker.D5asOTRg.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.Bja4AaDo.js → toConsumableArray.CbOloveN.js} +1 -1
- streamlit/static/static/js/{uniqueId.q5r0gCRd.js → uniqueId.DldNV5wM.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.B0oxOutH.js → useBasicWidgetState.DILnXvLY.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.XxzVJXCy.js → useOnInputChange.Bpbev6mM.js} +1 -1
- streamlit/static/static/js/withFullScreenWrapper.Dgyv-A2q.js +1 -0
- streamlit/watcher/event_based_path_watcher.py +76 -44
- streamlit/watcher/local_sources_watcher.py +22 -19
- streamlit/watcher/polling_path_watcher.py +29 -18
- streamlit/watcher/util.py +7 -8
- {streamlit_nightly-1.46.2.dev20250702.dist-info → streamlit_nightly-1.46.2.dev20250705.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.46.2.dev20250702.dist-info → streamlit_nightly-1.46.2.dev20250705.dist-info}/RECORD +82 -82
- streamlit/static/static/js/index.DFtXcE7L.js +0 -197
- streamlit/static/static/js/index.DRodAgy0.js +0 -1
- streamlit/static/static/js/withFullScreenWrapper.eXXoswSf.js +0 -1
- {streamlit_nightly-1.46.2.dev20250702.data → streamlit_nightly-1.46.2.dev20250705.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.46.2.dev20250702.dist-info → streamlit_nightly-1.46.2.dev20250705.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.46.2.dev20250702.dist-info → streamlit_nightly-1.46.2.dev20250705.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.46.2.dev20250702.dist-info → streamlit_nightly-1.46.2.dev20250705.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
import{r as i,E as J,_ as Q,s as g,B as ht,z as W,j as n,ba as Z,bv as ft,C as F,bq as tt,b5 as et,bp as T,a$ as mt,bJ as yt,bH as q,bk as Ct,bK as v,bt as It,F as ot,aQ as bt,bL as vt,M as $,bm as xt,bl as wt}from"./index.BHoorvVC.js";import{g as St,C as Ft,I as Et,F as N,E as Ut,a as zt,s as Tt,u as Ht,b as Bt}from"./FileHelper.4MaelLoM.js";import{I as Dt}from"./InputInstructions.DIDrjUfW.js";import{i as Lt}from"./inputUtils.CQWz5UKz.js";import{E as Rt}from"./ErrorOutline.esm.MhIoYdvl.js";import{U as nt}from"./UploadFileInfo.C-jY39rj.js";import{T as $t}from"./textarea.9dU6cbLz.js";import"./base-input.BnnSlzQu.js";var at=i.forwardRef(function(t,e){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(J,Q({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),i.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),i.createElement("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}))});at.displayName="AttachFile";var rt=i.forwardRef(function(t,e){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(J,Q({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),i.createElement("rect",{width:24,height:24,fill:"none"}),i.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});rt.displayName="Send";const kt=g("div",{target:"e1togvvn0"})("border:none;position:relative;display:flex;"),Mt=g("div",{target:"e1togvvn1"})(({theme:t,extended:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.widgetBorderColor??t.colors.transparent,borderRadius:t.radii.chatInput,backgroundColor:t.colors.secondaryBg,position:"relative",flexGrow:1,display:"flex",alignItems:"center",paddingLeft:t.spacing.lg,maxHeight:e?"none":t.sizes.minElementHeight,gap:t.spacing.sm,overflow:"hidden",":focus-within":{borderColor:t.colors.primary}})),Vt=g("button",{target:"e1togvvn2"})(({theme:t,disabled:e,extended:s})=>{const p=ht(t),[f,u]=p?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:s?"0":t.radii.chatInput,borderTopLeftRadius:s?t.radii.default:"0",borderBottomRightRadius:t.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:e?f:u,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:p?t.colors.gray10:t.colors.gray90},"&:hover":{color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray,cursor:"not-allowed"}}}),Nt=g("div",{target:"e1togvvn3"})(({theme:t})=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,marginBottom:`-${t.sizes.borderWidth}`,pointerEvents:"none"})),Wt=g("div",{target:"e1togvvn4"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`})),At=g("div",{target:"e15560op0"})(({theme:t,height:e})=>({backgroundColor:t.colors.transparent,position:"absolute",left:0,bottom:0,minHeight:`max(${t.sizes.emptyDropdownHeight}, ${e})`,width:"100%",zIndex:t.zIndices.priority})),Pt=g("div",{target:"e15560op1"})(({theme:t,height:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.primary,borderRadius:t.radii.chatInput,backgroundColor:t.colors.secondaryBg,color:t.colors.primary,display:"flex",alignItems:"center",justifyContent:"center",height:e,width:"100%",fontWeight:t.fontWeights.bold})),Kt=g("div",{target:"e15560op2"})(({theme:t,disabled:e})=>({display:"flex",alignItems:"top",height:"100%",marginTop:`-${t.sizes.borderWidth}`,cursor:e?"not-allowed":"auto"})),Ot=g("div",{target:"e15560op3"})(({disabled:t})=>({pointerEvents:t?"none":"auto"})),_t=g("div",{target:"e15560op4"})(({theme:t})=>({marginTop:"0.625em",marginLeft:t.spacing.sm,height:t.spacing.xl,width:t.sizes.borderWidth,backgroundColor:t.colors.fadedText20})),Xt=g("div",{target:"e15560op5"})(({theme:t})=>({left:0,right:0,lineHeight:t.lineHeights.tight,paddingLeft:t.spacing.sm,paddingRight:t.spacing.sm,overflowX:"auto"})),Gt=g("div",{target:"e15560op6"})({display:"flex"}),jt=g("div",{target:"e15560op7"})({flex:"0 0 auto"}),Yt=g("div",{target:"e15560op8"})(({theme:t})=>({display:"flex",alignItems:"center",padding:t.spacing.sm,gap:t.spacing.twoXS})),qt=g("div",{target:"e15560op9"})(({theme:t})=>({color:t.colors.fadedText60})),Jt=g("div",{target:"e15560op10"})(({theme:t,fileStatus:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:e.type==="uploaded"?t.colors.bodyText:t.colors.fadedText60})),Qt=g("div",{target:"e15560op11"})(({theme:t})=>({marginRight:t.spacing.md,color:t.colors.fadedText60})),Zt=g("small",{target:"e15560op12"})(({theme:t})=>({display:"flex",alignItems:"center",maxHeight:t.sizes.smallElementHeight,color:t.colors.fadedText60,"& :hover":{color:t.colors.bodyText}}));function te({children:t,content:e}){const s=W();return n(ft,{content:e,placement:Z.TOP,overrides:{Body:{style:{top:`-${s.sizes.minElementHeight}`}}},children:t})}const ee=({fileInfo:t})=>{const e=W(),{type:s}=t.status;switch(s){case"uploading":return n(yt,{usingCustomTheme:!1,"data-testid":"stChatInputFileIconSpinner",size:"lg",margin:"0",padding:"0"});case"error":return n(te,{content:t.status.errorMessage,children:n(T,{color:e.colors.red,content:Rt,size:"lg"})});case"uploaded":return n(T,{content:Et,size:"lg"});default:return mt(s),null}},oe=({fileInfo:t,onDelete:e})=>F(Yt,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[n(qt,{children:n(ee,{fileInfo:t})}),n(Jt,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:t.name,fileStatus:t.status,children:t.name}),n(Qt,{children:St(t.size,N.Byte)}),n(Zt,{"data-testid":"stChatInputDeleteBtn",children:n(tt,{onClick:()=>e(t.id),kind:et.MINIMAL,children:n(T,{content:Ft,size:"lg"})})})]}),ne=i.memo(oe),ae=({items:t,onDelete:e})=>n(Xt,{"data-testid":"stChatUploadedFiles",children:n(Gt,{children:t.map(s=>n(jt,{children:n(ne,{fileInfo:s,onDelete:e})},s.id))})}),re=i.memo(ae),ie=({getNextLocalFileId:t,addFiles:e,updateFile:s,uploadClient:p,element:f,onUploadProgress:u,onUploadComplete:I})=>(y,d)=>{const m=q.CancelToken.source(),c=new nt(d.name,d.size,t(),{type:"uploading",cancelToken:m,progress:1});e([c]),p.uploadFile({formId:"",...f},y.uploadUrl,d,h=>u(h,c.id),m.token).then(()=>I(c.id,y)).catch(h=>{q.isCancel(h)||s(c.id,c.setStatus({type:"error",errorMessage:h?h.toString():"Unknown error"}))})},se=({acceptMultipleFiles:t,maxFileSize:e,uploadClient:s,uploadFile:p,addFiles:f,getNextLocalFileId:u,deleteExistingFiles:I,onUploadComplete:y})=>(d,m)=>{if(!t&&d.length===0&&m.length>1){const c=m.findIndex(h=>{var x;return((x=h.errors)==null?void 0:x[0].code)===Ut.TooManyFiles});c>=0&&(d.push(m[c].file),m.splice(c,1))}if(!t&&d.length>0&&I(),s.fetchFileURLs(d).then(c=>{Ct(c,d).forEach(([h,x])=>{p(h,x)})}).catch(c=>{f(d.map(h=>new nt(h.name,h.size,u(),{type:"error",errorMessage:c})))}),m.length>0){const c=m.map(h=>zt(h,u(),e));f(c)}y()},le=({getRootProps:t,getInputProps:e,acceptFile:s,disabled:p,theme:f})=>F(Kt,{disabled:p,children:[F(Ot,{"data-testid":"stChatInputFileUploadButton",disabled:p,...t(),children:[n("input",{...e()}),n(It,{content:`Upload or drag and drop ${s===v.Multiple?"files":"a file"}`,placement:Z.TOP,onMouseEnterDelay:500,children:n(tt,{kind:et.MINIMAL,disabled:p,children:n(T,{content:at,size:"lg",color:p?f.colors.fadedText40:f.colors.fadedText60})})})]}),n(_t,{})]}),de=i.memo(le),ce=({getRootProps:t,getInputProps:e,acceptFile:s,inputHeight:p})=>F(ot,{children:[n(At,{height:p,...t(),children:n("input",{...e()})}),n(Pt,{height:p,children:`Drag and drop ${s===v.Multiple?"files":"a file"} here`})]}),pe=i.memo(ce),ue=6.5,k=1,M=(t,e,s)=>s.map(p=>p.id===t?e:p),V=(t,e)=>e.find(s=>s.id===t);function ge({disabled:t,element:e,widgetMgr:s,fragmentId:p,uploadClient:f}){const u=W(),{placeholder:I,maxChars:y}=e,d=i.useRef(null),m=i.useRef(0),c=i.useRef({minHeight:0,maxHeight:0}),[h,x]=bt(),[E,B]=i.useState(e.default),[U,D]=i.useState(0),[H,it]=i.useState(!1),[w,S]=i.useState([]),[z,L]=i.useState(!1),R=i.useMemo(()=>w.some(o=>o.status.type==="uploading")?!1:E!==""||w.length>0,[w,E]),b=vt(e.acceptFile),A=Tt(e.maxUploadSizeMb,N.Megabyte,N.Byte),P=i.useCallback(o=>S(a=>[...a,...o]),[]),K=i.useCallback(o=>{S(a=>{const l=V(o,a);return $(l)?a:(l.status.type==="uploading"&&l.status.cancelToken.cancel(),l.status.type==="uploaded"&&l.status.fileUrls.deleteUrl&&f.deleteFile(l.status.fileUrls.deleteUrl),a.filter(r=>r.id!==o))})},[f]),st=()=>{const o=w.filter(a=>a.status.type==="uploaded").map(a=>{const{name:l,size:r,status:C}=a,{fileId:ut,fileUrls:gt}=C;return new xt({fileId:ut,fileUrls:gt,name:l,size:r})});return new wt({uploadedFileInfo:o})},O=()=>m.current++,lt=se({acceptMultipleFiles:b===v.Multiple,maxFileSize:A,uploadClient:f,uploadFile:ie({getNextLocalFileId:O,addFiles:P,updateFile:(o,a)=>{S(l=>M(o,a,l))},uploadClient:f,element:e,onUploadProgress:(o,a)=>{S(l=>{const r=V(a,l);if($(r)||r.status.type!=="uploading")return l;const C=Math.round(o.loaded*100/o.total);return r.status.progress===C?l:M(a,r.setStatus({type:"uploading",cancelToken:r.status.cancelToken,progress:C}),l)})},onUploadComplete:(o,a)=>{S(l=>{const r=V(o,l);return $(r)||r.status.type!=="uploading"?l:M(r.id,r.setStatus({type:"uploaded",fileId:a.fileId,fileUrls:a}),l)})}}),addFiles:P,getNextLocalFileId:O,deleteExistingFiles:()=>w.forEach(o=>K(o.id)),onUploadComplete:()=>{d.current&&d.current.focus()}}),{getRootProps:_,getInputProps:X}=Ht({onDrop:lt,multiple:b===v.Multiple,accept:Bt(e.fileType),maxSize:A}),G=()=>{let o=0;const{current:a}=d;return a&&(a.style.height="auto",o=a.scrollHeight,a.style.height=""),o},j=()=>{if(d.current&&d.current.focus(),!R||t)return;const o={data:E,fileUploaderState:st()};s.setChatInputValue(e,o,{fromUi:!0},p),S([]),B(""),D(0)},dt=o=>{const{metaKey:a,ctrlKey:l,shiftKey:r}=o;Lt(o)&&!r&&!l&&!a&&(o.preventDefault(),j())},ct=o=>{const{value:a}=o.target;y!==0&&a.length>y||(B(a),D(G()))};i.useEffect(()=>{if(e.setValue){e.setValue=!1;const o=e.value||"";B(o)}},[e]),i.useLayoutEffect(()=>{if(d.current){const{offsetHeight:o}=d.current;c.current.minHeight=o,c.current.maxHeight=o*ue}},[d]),i.useEffect(()=>{const o=r=>{var C;r.preventDefault(),r.stopPropagation(),!z&&((C=r.dataTransfer)!=null&&C.types.includes("Files"))&&L(!0)},a=r=>{r.preventDefault(),r.stopPropagation(),z&&(r.clientX<=0&&r.clientY<=0||r.clientX>=window.innerWidth&&r.clientY>=window.innerHeight)&&L(!1)},l=r=>{r.preventDefault(),r.stopPropagation(),z&&L(!1)};return window.addEventListener("dragover",o),window.addEventListener("drop",l),window.addEventListener("dragleave",a),()=>{window.removeEventListener("dragover",o),window.removeEventListener("drop",l),window.removeEventListener("dragleave",a)}},[z]),i.useLayoutEffect(()=>{const{minHeight:o}=c.current;it(U>0&&d.current?Math.abs(U-o)>k:!1)},[U]),i.useLayoutEffect(()=>{D(G())},[I]);const{maxHeight:Y}=c.current,pt=b!==v.None&&z;return F(ot,{children:[b===v.None?null:n(re,{items:[...w],onDelete:K}),n(kt,{className:"stChatInput","data-testid":"stChatInput",ref:x,children:pt?n(pe,{getRootProps:_,getInputProps:X,acceptFile:b,inputHeight:H?`${U+k}px`:u.sizes.minElementHeight}):F(Mt,{extended:H,children:[b===v.None?null:n(de,{getRootProps:_,getInputProps:X,acceptFile:b,disabled:t,theme:u}),n($t,{inputRef:d,value:E,placeholder:I,onChange:ct,onKeyDown:dt,"aria-label":I,disabled:t,rows:1,overrides:{Root:{style:{minHeight:u.sizes.minElementHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0",borderTopLeftRadius:"0",borderTopRightRadius:"0",borderBottomRightRadius:"0",borderBottomLeftRadius:"0"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:u.lineHeights.inputWidget,"::placeholder":{color:u.colors.fadedText60},height:H?`${U+k}px`:"auto",maxHeight:Y?`${Y}px`:"none",paddingLeft:u.spacing.none,paddingBottom:u.spacing.sm,paddingTop:u.spacing.sm,paddingRight:`calc(${u.iconSizes.xl} + 2 * ${u.spacing.sm} + ${u.spacing.sm})`}}}}),h>u.breakpoints.hideWidgetDetails&&n(Wt,{children:n(Dt,{dirty:R,value:E,maxLength:y,type:"chat",inForm:!1})}),n(Nt,{children:n(Vt,{onClick:j,disabled:!R||t,extended:H,"data-testid":"stChatInputSubmitButton",children:n(T,{content:rt,size:"xl",color:"inherit"})})})]})})]})}const xe=i.memo(ge);export{xe as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{s as p,r as n,aI as x,aH as h,bh as y,z as C,aQ as b,j as i,bi as w}from"./index.BHoorvVC.js";const F=p("div",{target:"e1q5ojhd0"})(({theme:e,isExpanded:t})=>({width:"100%",...t?{position:"fixed",top:0,left:0,bottom:0,right:0,background:e.colors.bgColor,zIndex:e.zIndices.fullscreenWrapper,padding:e.spacing.md,paddingTop:e.sizes.fullScreenHeaderHeight,overflow:"auto",display:"flex",alignItems:"center",justifyContent:"center"}:{}})),f=n.createContext(null);f.displayName="ElementFullscreenContext";const g=()=>{const{setFullScreen:e}=n.useContext(x),[t,c]=n.useState(!1),{fullHeight:s,fullWidth:u}=h(y),l=n.useCallback(r=>{c(r),e(r)},[e]),d=n.useCallback(()=>{document.body.style.overflow="hidden",l(!0)},[l]),o=n.useCallback(()=>{document.body.style.overflow="unset",l(!1)},[l]),a=n.useCallback(r=>{r.keyCode===27&&t&&o()},[o,t]);return n.useEffect(()=>(document.addEventListener("keydown",a,!1),()=>{document.removeEventListener("keydown",a,!1)}),[a]),n.useMemo(()=>({expanded:t,zoomIn:d,zoomOut:o,fullHeight:s,fullWidth:u}),[t,d,o,s,u])},E=({children:e,height:t})=>{const c=C(),{expanded:s,fullHeight:u,fullWidth:l,zoomIn:d,zoomOut:o}=g(),[a,r]=b(),m=n.useMemo(()=>({width:s?l:a,height:s?u:t,expanded:s,expand:d,collapse:o}),[s,u,l,t,a,d,o]);return i(f.Provider,{value:m,children:i(F,{ref:r,isExpanded:s,"data-testid":"stFullScreenFrame",theme:c,children:e})})};function v(e){const t=c=>i(E,{children:i(e,{...c})});return t.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,w(t,e)}export{f as E,v as w};
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|